solorice/config/spicetify/Extracted/Raw/xpui/xpui.js
Kristofers Solo a42ded1119 Use dotter
2024-08-28 09:02:07 +03:00

2 lines
2.2 MiB
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var e,t,i,n,r,a,s={31321:(e,t,i)=>{"use strict";i.d(t,{n:()=>s});var n=i(30171),r=i(53129),a=i(86070);const s=({icon:e,activeIcon:t,label:i,isActive:s,...o})=>(0,a.jsx)(r.Zp,{label:i,children:(0,a.jsx)(n.H,{"aria-label":`${i}, ${s?"selected":"unselected"}, button`,"aria-pressed":s,semanticColor:s?"textBrightAccent":"textSubdued",iconOnly:s?t:e,"aria-haspopup":"menu",size:"small",...o})})},27481:(e,t,i)=>{"use strict";i.d(t,{t:()=>y});var n=i(41978),r=i(8331),a=i(2189),s=i(11808),o=i(31321),l=i(32622),c=i(55784),u=i(56437),d=i(39796),m=i(30758),p=i(66416),h=i(83542),g=i(95302),f=i(86070);const v=(0,m.memo)((function({onFeedbackReasonSelect:e}){const t=new Map([["not_relevant",s.Ru.get("ad-formats.ad-feedback.dislike.not-relevant")],["too_often",s.Ru.get("ad-formats.ad-feedback.dislike.too-often")],["unpleasant",s.Ru.get("ad-formats.ad-feedback.dislike.unpleasant-content")],["offensive",s.Ru.get("ad-formats.ad-feedback.dislike.offensive-content")],["do_not_like",s.Ru.get("ad-formats.ad-feedback.dislike.do-not-like")]]);return(0,f.jsx)(g.pZ,{value:"dislike-ad",children:(0,f.jsx)(p.W,{children:Array.from(t).map((([t,i])=>(0,f.jsx)(g.pZ,{value:i,children:(0,f.jsx)(h.D,{role:"menuitem","aria-label":i,onClick:()=>e(t,i),children:i})},t)))})})})),y=({item:e})=>{const t=(0,n.wA)(),{logAdFeedback:i}=(0,l.L)(e),m=(0,n.d4)((t=>(0,u.N2)(t,e.id)));return(0,f.jsx)(d.b,{menu:(0,f.jsx)(v,{onFeedbackReasonSelect:(n,r)=>{e.id&&(t((0,c.NI)({adId:e.id,reason:r})),i(`dislike_${n}`))}}),children:(0,f.jsx)(o.n,{item:e,icon:r.P,activeIcon:a.X,label:s.Ru.get("ad-formats.ad-feedback.dislike"),isActive:m,"":"button-dislike-ad",onClick:()=>{if(e.id){if(m)return t((0,c.vA)({adId:e.id})),void i("cancel_dislike");t((0,c.NI)({adId:e.id})),i("dislike_menu")}}})})}},6612:(e,t,i)=>{"use strict";i.d(t,{T:()=>y});var n=i(41978),r=i(35608),a=i(29050),s=i(11808),o=i(31321),l=i(32622),c=i(55784),u=i(56437),d=i(39796),m=i(30758),p=i(66416),h=i(83542),g=i(95302),f=i(86070);const v=(0,m.memo)((function({onFeedbackReasonSelect:e}){const t=new Map([["relevant",s.Ru.get("ad-formats.ad-feedback.like.relevant")],["interested_in_brand",s.Ru.get("ad-formats.ad-feedback.like.interested-in-brand")],["interested_in_product",s.Ru.get("ad-formats.ad-feedback.like.interested-in-product")],["enjoyable",s.Ru.get("ad-formats.ad-feedback.like.enjoyable-content")],["discovered_new",s.Ru.get("ad-formats.ad-feedback.like.discovered-new")]]);return(0,f.jsx)(g.pZ,{value:"like-ad",children:(0,f.jsx)(p.W,{children:Array.from(t).map((([t,i])=>(0,f.jsx)(g.pZ,{value:i,children:(0,f.jsx)(h.D,{role:"menuitem","aria-label":i,onClick:()=>e(t,i),children:i})},t)))})})})),y=({item:e})=>{const t=(0,n.wA)(),{logAdFeedback:i}=(0,l.L)(e),m=(0,n.d4)((t=>(0,u.Tt)(t,e.id)));return(0,f.jsx)(d.b,{menu:(0,f.jsx)(v,{onFeedbackReasonSelect:(n,r)=>{e.id&&(t((0,c.F$)({adId:e.id,reason:r})),i(`like_${n}`))}}),children:(0,f.jsx)(o.n,{item:e,icon:r.G,activeIcon:a.q,label:s.Ru.get("ad-formats.ad-feedback.like"),isActive:m,"":"button-like-ad",onClick:()=>{if(e.id){if(m)return t((0,c.D$)({adId:e.id})),void i("cancel_like");t((0,c.F$)({adId:e.id})),i("like_menu")}}})})}},24226:(e,t,i)=>{"use strict";i.d(t,{Cp:()=>r,G5:()=>a,bT:()=>s,dY:()=>o,mr:()=>l});var n=i(30758);const r=(0,n.createContext)({adsAPI:null,homeAds:null}),a=()=>{const{adsAPI:e}=(0,n.useContext)(r);if(null===e)throw new Error("useAdsAPI must be used within a AdsAPIProvider");return e},s=()=>{const{home:e}=a(),t=(0,n.useContext)(r);if(!t.homeAds)throw new Error("useHomeAdsAPI must be used within a HomeAdsProvider");return{...e,...t.homeAds}},o=()=>a().inStreamApi,l=()=>o().getInStreamAd()},71259:(e,t,i)=>{"use strict";i.d(t,{o:()=>T});var n=i(30758),r=i(12783),a=i(435),s=i(34330),o=i(55773),l=i(11808),c=i(16047),u=i(66060),d=i(24284),m=i(83681),p=i(43830),h=i(56105),g=i(59996);const f="c5Ml9BbBuUEHjNkcSwZA";var v=i(86070);const y="70px",b=({adId:e,advertiser:t,tagline:i,displayImage:n,buttonMessage:r,cardOnClick:a,buttonOnClick:s,clickthroughUrl:o})=>(0,v.jsx)(g.N,{to:(0,h.H)(o),className:f,"":"leavebehind",children:(0,v.jsx)(c.v,{onClick:a,onClickHint:l.Ru.get("ad-formats.learnMore"),layout:"wide",variant:"tinted",id:e,size:"xl",title:(0,v.jsx)(u.d,{weight:"bold",variant:"ballad",lineClamp:1,"":"leavebehind-advertiser",children:t}),subtitle:(0,v.jsx)(d.j,{as:"div",lineClamp:2,"":"leavebehind-tagline",children:i}),media:(0,v.jsx)(m.C,{"":"leavebehind-image",src:n.src,alt:n.alt,imageHeight:y,imageWidth:y,size:"xl"}),trailing:(0,v.jsx)(p.$,{onClick:()=>{s&&s()},"":"leavebehind-button",colorSet:"invertedLight",size:"small","aria-label":l.Ru.get("ad-formats.learnMore"),children:r})})});var _=i(23956),E=i(35657),C=i(57893),x=i(39733);const S="zlUJfROzFEOsEDWL7ucP",A="Fxvq1Fw7XQdGRDvYokRg",T=({leavebehinds:e,seeAllButton:t,surface:i,uri:c})=>{const u=(0,x.vh)(),d=(0,C.w)(C.P),[m,p]=(0,n.useState)(void 0);(0,n.useEffect)((()=>{e&&e.length>0&&m!==e[0].requestId&&c&&(e.forEach(((e,t)=>{e.uri===c&&(e.trackingEvents?.viewed.forEach((async t=>{try{await d(t)}catch(n){const r=n;u.send((0,s.G)({error_type:"trackingURLFailure",error_message:r.message,http_error_code:422,surface:(0,_.Fh)(i),request_url:t,request_type:"leavebehindAds",lineitem_id:e.lineitemId,ad_content_origin:(0,E.Zl)(i)}))}})),u.send((0,o.x)({leavebehind_lineitem_id:e.lineitemId,leavebehind_request_id:e.requestId,event:"event_viewed",event_reason:`viewed_on_${(0,_.Fh)(i).toLowerCase()}`,surface:(0,_.Fh)(i),surface_position:t+1,uri:c})))})),p(e[0].requestId))}),[u,d,e,c,i,m]);const h=({eventReason:e,lineitemId:t,requestId:n,trackingEvents:r,surfacePosition:a})=>{((e,t)=>{t?.forEach((async t=>{try{await d(t)}catch(n){const r=n;u.send((0,s.G)({error_type:"trackingURLFailure",error_message:r.name,http_error_code:422,surface:(0,_.Fh)(i),request_url:t,request_type:"leavebehindAds",lineitem_id:e,ad_content_origin:(0,E.Zl)(i)}))}}))})(t,r),u.send((0,o.x)({leavebehind_lineitem_id:t,leavebehind_request_id:n,event:"event_clicked",event_reason:e,surface:(0,_.Fh)(i),surface_position:a,uri:c}))};return(0,v.jsxs)("section",{"":"leavebehinds-wrapper",children:[(0,v.jsxs)("div",{className:A,children:[(0,v.jsx)(r.E,{as:"h2",semanticColor:"textBase",variant:"titleSmall",paddingBottom:(0,a.po)("tighter"),"":"leavebehinds-title",children:l.Ru.get("podcast-ads.recent_ads")}),t]}),(0,v.jsx)("div",{className:S,"":"leavebehinds-list-wrapper",children:e.map(((e,t)=>(0,v.jsx)(b,{...e,buttonOnClick:()=>{h({eventReason:"button_clicked",lineitemId:e.lineitemId,trackingEvents:e.trackingEvents?.clicked,requestId:e.requestId,surfacePosition:t+1})},cardOnClick:()=>{h({eventReason:"card_clicked",lineitemId:e.lineitemId,trackingEvents:e.trackingEvents?.clicked,requestId:e.requestId,surfacePosition:t+1})}},e.adId)))})]})}},39402:(e,t,i)=>{"use strict";i.d(t,{J:()=>d});var n=i(37985),r=i(30171),a=i(55773),s=i(11808),o=i(23956),l=i(35657),c=i(39733),u=i(86070);const d=({leavebehinds:e,surface:t,uri:i,pathname:d,state:m})=>{const p=(0,c.vh)(),h=`${s.Ru.get("view.see-all")} (${e.length<=l.E9?s.Ru.formatNumber(e.length):s.Ru.formatNumber(l.E9)})`;return(0,u.jsx)(n.N_,{to:d,state:m,children:(0,u.jsx)(r.H,{"":"leavebehinds-see-all",size:"small",onClick:()=>{p.send((0,a.x)({leavebehind_request_id:e[0].requestId,event:"event_clicked",event_reason:"cta_see_all",surface:(0,o.Fh)(t),uri:i}))},children:h})})}},21866:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});var n=i(30758),r=i(34330),a=i(81987),s=i(47927),o=i(23956),l=i(35657),c=i(39733),u=i(19159),d=i(40312);const m=function(e){const[t,i]=(0,n.useState)(),[m,p]=(0,n.useState)(!1),h=(0,c.vh)(),g=(0,a.NC)(u.SAn,{loadingValue:!1});return{data:t,error:m,getLeavebehinds:(0,n.useCallback)((async()=>{try{const t=await s.b6(d.n.getInstance(),(0,o.Fh)(e.surface),e.uri,e.playlistName,g);i(t.body)}catch(t){const i=t;h.send((0,r.G)({error_type:"fetchAdsFailure",error_message:i.name,http_error_code:i.status,surface:(0,o.Fh)(e.surface),request_type:"leavebehindAds",ad_content_origin:(0,l.Zl)(e.surface)})),p(!0)}}),[h,e.playlistName,e.surface,e.uri,g])}}},35657:(e,t,i)=>{"use strict";i.d(t,{E9:()=>o,NI:()=>u,Qd:()=>s,Zl:()=>c,iT:()=>l,pU:()=>r,un:()=>a});var n=i(23956);const r=2,a=3,s=6,o=8,l=(e,t)=>{const i=e.leavebehindAds;let n=[];return i&&(n=i.map((i=>({adId:i.adId,advertiser:i.advertiser,tagline:i.tagline,displayImage:{src:i?.logoImage||i?.displayImage,alt:`${i.advertiser} logo`},buttonMessage:i.buttonMessage,clickthroughUrl:i.clickthroughUrl,trackingEvents:i.trackingEvents,requestId:e.requestId,lineitemId:i.lineitemId,uri:t})))),n};function c(e){switch(e){case n.ui.PODCAST_SCROLL_NPV:case n.ui.SHOW_PAGE:case n.ui.EPISODE_PAGE:case n.ui.PODCAST_SEE_ALL:return"podcast";case n.ui.MUSIC_NPV:case n.ui.PLAYLIST:case n.ui.MUSIC_SEE_ALL:return"music";case n.ui.UNKNOWN:return"unknown";case n.ui.UNRECOGNIZED:default:return"unrecognized"}}function u(e){switch(e){case n.ui.EPISODE_PAGE:case n.ui.PODCAST_SEE_ALL:case n.ui.PLAYLIST:case n.ui.MUSIC_SEE_ALL:case n.ui.SHOW_PAGE:return o;case n.ui.MUSIC_NPV:case n.ui.PODCAST_SCROLL_NPV:case n.ui.UNKNOWN:case n.ui.UNRECOGNIZED:default:return}}},97438:(e,t,i)=>{"use strict";i.d(t,{E:()=>c});var n=i(97500),r=i.n(n),a=i(38308),s=i(45518),o=i(3080),l=i(86070);const c=({backgroundColor:e,children:t,style:i})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.K,{backgroundColor:e}),(0,l.jsx)(s.a,{children:(0,l.jsx)("div",{className:r()(o.A.ActionBar,"contentSpacing"),style:i,"":"action-bar",children:t})})]})},38308:(e,t,i)=>{"use strict";i.d(t,{K:()=>a});const n="main-actionBarBackground-background";var r=i(86070);const a=({backgroundColor:e})=>(0,r.jsx)("div",{className:n,style:{backgroundColor:e}})},37712:(e,t,i)=>{"use strict";i.d(t,{S:()=>a});var n=i(3080),r=i(86070);const a=({testId:e,children:t})=>(0,r.jsx)("div",{className:n.A.ActionBarRow,"":e??"action-bar-row",children:t})},59706:(e,t,i)=>{"use strict";i.d(t,{x:()=>x});var n=i(97500),r=i.n(n),a=i(12783),s=i(43178),o=i(64343),l=i(30171),c=i(49217),u=i(43830),d=i(11808),m=i(1527),p=i(73128);const h="lIp2JaiMRS6_yF05q5N9",g="uzQIGWrDxI1E09vQnrXk",f="s58sp4t3h1uU9n_42KqD",v="c0KyMkxeMCWQGE7cR8s_",y="I2hCY2G1sJIBaTtEfJt_",b="bXJ77rNIJ18Y0GfegQdr",_="y9bkifFKNExwjaoINLm9",E="Qsmn7PN8jFZ8tATBCnFs";var C=i(86070);const x=({title:e,description:t,id:i,visible:n,primaryButtonText:x,secondaryButtonText:S,checkboxText:A,onHide:T,onPrimaryButtonClick:I,onSecondaryButtonClick:N=T,onCheckboxClick:w,onCloseClick:R=N,showButtons:k=!0,children:O,placement:P="auto",hideArrow:L,className:j,popperOptions:D,zIndex:M,maxWidth:U,tippyClassName:B,tippyWrapperClassName:F,hideOnClickOutside:H=!0,useSecondaryStyling:V=!1,childRef:G,fadeOut:z=!1,renderInline:W=!0,descriptionId:K})=>(0,C.jsx)(p.W,{renderInline:W,visible:n,placement:P,hideArrow:L,popperOptions:D,className:B,tippyWrapperClassName:F,zIndex:M,maxWidth:U,onHide:H?T:()=>{},childRef:G,fadeOut:z,overlay:(0,C.jsxs)("div",{className:r()(h,j),"":`${i}-hook`,children:[(0,C.jsxs)("div",{className:g,children:[(0,C.jsx)(a.E,{as:"p",className:f,variant:"bodyMediumBold",children:e}),!k&&(0,C.jsx)(m.a,{size:"sm",className:E,onClick:e=>R?.(e),ariaLabel:d.Ru.get("close"),icon:s.M})]}),(0,C.jsx)(a.E,{as:"p",className:v,variant:"bodySmall",id:K,children:t}),k&&(0,C.jsxs)("div",{className:y,children:[(0,C.jsx)("div",{children:A&&(0,C.jsx)(o.c,{id:"dont.show.onboarding.npv",onChange:w,semanticColor:"essentialBase",className:b,children:(0,C.jsx)(a.E,{variant:"bodySmall",children:A()})})}),(0,C.jsxs)("div",{className:_,children:[S&&(0,C.jsx)(l.H,{onClick:N,size:"small",children:S()}),x&&(V?(0,C.jsx)(c.n,{onClick:I,size:"small",children:x()}):(0,C.jsx)(u.$,{colorSet:"invertedLight",onClick:I,size:"small",children:x()}))]})]})]}),children:O})},31843:(e,t,i)=>{"use strict";i.d(t,{D:()=>m,y:()=>p});var n=i(30758),r=i(41978),a=i(11808),s=i(74509),o=i(89199),l=i(73128),c=i(45346),u=i(94757),d=i(86070);const m=l.d,p=({id:e,options:t,children:i})=>{const l=(0,r.wA)(),p=(0,n.useCallback)((()=>{l((0,s.zL)())}),[l]),h=(0,c.W)(),g={isCTA:!0,placement:m.rightTop,...t,primaryButtonText:()=>a.Ru.get("login"),secondaryButtonText:()=>a.Ru.get("action-trigger.button.not-now"),onLogInteraction:h};return(0,d.jsx)(o.U,{className:u.A.container,id:e,onPrimaryButtonClick:p,options:g,children:i})}},60822:(e,t,i)=>{"use strict";i.d(t,{k:()=>u});var n=i(30758),r=i(11808),a=i(89199),s=i(45346),o=i(21451),l=i(94757),c=i(86070);const u=({id:e,children:t,targetURI:i,fadeOut:u=!1})=>{const d=(0,n.useCallback)((()=>{window.open((0,o.rw)(i).href)}),[i]),m={getTitle:()=>r.Ru.get("action-trigger.available-in-app-only"),getDescription:()=>r.Ru.get("action-trigger.listen-mixed-media-episode"),primaryButtonText:()=>r.Ru.get("action-trigger.button.get-app"),secondaryButtonText:()=>r.Ru.get("action-trigger.button.not-now"),isCTA:!0,intentPrimaryButton:"download-app",onLogInteraction:(0,s.W)(),shouldHideOnScroll:!0,fadeOut:u};return(0,c.jsx)(a.U,{className:l.A.container,id:e,onPrimaryButtonClick:d,options:m,children:t})}},97684:(e,t,i)=>{"use strict";i.d(t,{M:()=>L,t:()=>O});var n=i(30758),r=i(75930),a=i(83547),s=i(64488),o=i(76702),l=i(30171),c=i(81987),u=i(11808),d=i(84492),m=i(19159),p=i(57276),h=i(21056),g=i(50562),f=i(98097);const v=new(i(5277).fq);function y(e){const t=(0,n.useRef)([]);t.current=Array.isArray(e)?e:[e];return()=>{const e=t.current,i=function(e){return v.create(e,(()=>{const t=new Audio(e);return t.load(),t}))}(e[Math.floor(Math.random()*e.length)]);i.play()}}const b={helmet:"main-addButton-helmet",ZoomInAnimation:"main-addButton-zoomInAnimation"};var _=i(86070);function E(e,t){return(0,_.jsx)(p._,{src:t?(0,d.b)("images/mando_helmet_felix.png"):(0,d.b)("images/mando_helmet.png"),className:b.helmet,width:e,height:e,loading:"lazy"})}function C(e){const{surface:t,isViewingVariant:i,isPlayingVariant:n}=(0,g.h)(),r=(0,c.NC)(m.JKv,{loadingValue:m.WdJ.DISABLED}),a=r!==m.WdJ.DISABLED,s=r===m.WdJ.HELMET_AND_SOUND||r===m.WdJ.FELIX,o=r===m.WdJ.FELIX,l=y(function(e){return e?[(0,d.b)("sounds/mando_this_is_the_way_felix.mp3")]:[(0,d.b)("sounds/mando_this_is_the_way_103.mp3"),(0,d.b)("sounds/mando_this_is_the_way_107.mp3")]}(o));if(t===h.u.ALBUM||t===h.u.TRACK||t===h.u.PLAYLIST){const t=a&&i===f.K.MANDALORIAN,n=s&&t;return{content:t?E(e,o):null,playSound:n?l:()=>{}}}if(t===h.u.NOW_PLAYING){const t=a&&n===f.K.MANDALORIAN,i=s&&t;return{content:t?E(e,o):null,playSound:i?l:()=>{}}}return{content:null,playSound:()=>{}}}var x=i(53129),S=i(14874);const A=(0,n.memo)((function({size:e,onEnd:t}){return(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:1.3*e,height:1.3*e,viewBox:"0 0 384 384",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(1.3*e-e)/2}px`},children:[(0,_.jsxs)("g",{id:"_R_G",children:[(0,_.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_4_G_N_3_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_4_G",transform:" translate(0, 0.006) translate(0, 0)",children:(0,_.jsx)("path",{id:"_R_G_L_4_G_D_0_P_0",fill: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),fillOpacity:"1",fillRule:"nonzero",d:" M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z "})})})})}),(0,_.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_3_G_N_2_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_3_G",children:(0,_.jsx)("path",{id:"_R_G_L_3_G_D_0_P_0",fill: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),fillOpacity:"1",fillRule:"nonzero",d:" M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z "})})})})}),(0,_.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_2_G_N_2_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_2_G",children:(0,_.jsx)("path",{id:"_R_G_L_2_G_D_0_P_0",stroke: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -162 C89.41,-162 162,-89.41 162,0 C162,89.41 89.41,162 0,162 C-89.41,162 -162,89.41 -162,0 C-162,-89.41 -89.41,-162 0,-162z "})})})})}),(0,_.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_1_G_N_2_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_1_G",children:(0,_.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",fill: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),fillOpacity:"1",fillRule:"nonzero",d:" M96 -7 C96,-7 96,7 96,7 C96,7 -96,7 -96,7 C-96,7 -96,-7 -96,-7 C-96,-7 96,-7 96,-7z M7 -96 C7,-96 7,96 7,96 C7,96 -7,96 -7,96 C-7,96 -7,-96 -7,-96 C-7,-96 7,-96 7,-96z "})})})})}),(0,_.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_0_G_N_2_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_0_G",transform:" rotate(-130) scale(1.03, 1.03)",children:(0,_.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",fill:"#1ed760",fillOpacity:"1",fillRule:"nonzero",d:" M-92.21 15.2 C-92.21,15.2 -27.04,91.53 -27.04,91.53 C-27.04,91.53 94.27,-50.53 94.27,-50.53 C94.27,-50.53 75.27,-66.67 75.27,-66.67 C75.27,-66.67 -27.04,53.15 -27.04,53.15 C-27.04,53.15 -75.83,-3.92 -75.83,-3.92 C-75.83,-3.92 -92.21,15.2 -92.21,15.2z M-162 0 C-162,-89.47 -89.47,-162 0,-162 C89.47,-162 162,-89.47 162,0 C162,89.47 89.47,162 0,162 C-89.47,162 -162,89.47 -162,0z "})})})})})]}),(0,_.jsx)("g",{id:"time_group"}),(0,_.jsxs)("defs",{children:[(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_D_0_P_0",fill:"freeze",attributeName:"fill",from: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),to: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),keyTimes:"0;0.9090909;0.9545455;1",values:"#b3b3b3;#1db954;#1ed760;#1ed760",keySplines:"0 0 0 1;0.328 0.103 0.661 1;0 0 0 0",calcMode:"spline",ref:e=>{e&&e.addEventListener("endEvent",t,{once:!0})}}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z ",to:"M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z ",keyTimes:"0;0.9545455;1",values:"M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ;M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ;M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ",keySplines:"0 0 0.34 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_T_0",fill:"freeze",attributeName:"transform",from:"1 1",to:"0.99 0.99",type:"scale",additive:"sum",keyTimes:"0;0.9545455;1",values:"1 1;0.99 0.99;0.99 0.99",keySplines:"0.692 0 0.64 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"0",keyTimes:"0;0.0454545;0.0454591;0.9545455;0.9545455;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_D_0_P_0",fill:"freeze",attributeName:"fill",from: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),to: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),keyTimes:"0;0.1818182;0.4545455;1",values:"#b3b3b3;#b3b3b3;#121212;#121212",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z ",to:"M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z ",keyTimes:"0;0.9545455;1",values:"M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z M6 -96 C6,-96 6,96 6,96 C6,96 -6,96 -6,96 C-6,96 -6,-96 -6,-96 C-6,-96 6,-96 6,-96z ;M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z M87.74 -37.48 C87.74,-37.48 70.28,60.99 70.28,60.99 C70.28,60.99 46.22,61 46.22,61 C46.22,61 62.59,-37.21 62.59,-37.21 C62.59,-37.21 87.74,-37.48 87.74,-37.48z ;M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z M87.74 -37.48 C87.74,-37.48 70.28,60.99 70.28,60.99 C70.28,60.99 46.22,61 46.22,61 C46.22,61 62.59,-37.21 62.59,-37.21 C62.59,-37.21 87.74,-37.48 87.74,-37.48z ",keySplines:"0.66 0 0.34 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"0",to:"130",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"0;130;130",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"0",keyTimes:"0;0.0454545;0.0454591;0.9545455;0.9545455;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"0",to:"130",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"0;130;130",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"1",to:"0",keyTimes:"0;0.0454545;0.0454546;1",values:"1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"0",to:"130",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"0;130;130",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"1",to:"0",keyTimes:"0;0.0454545;0.0454546;1",values:"1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G",fill:"freeze",attributeName:"opacity",from:"0",to:"1",keyTimes:"0;0.7727273;0.9545455;1",values:"0;0;1;1",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"0",to:"130",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"0;130;130",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 192 C192,192 192,198 192,198 C192,198 192,198 192,198 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"1",keyTimes:"0;0.7727273;0.7727318;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"0s",from:"0",to:"1",xlinkHref:"#time_group"})]})]})})),T=(0,n.memo)((function({size:e,onEnd:t}){return(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:1.3*e,height:1.3*e,viewBox:"0 0 384 384",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(1.3*e-e)/2}px`},children:[(0,_.jsxs)("g",{id:"_R_G",children:[(0,_.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_4_G_N_3_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_4_G",transform:" translate(0, 0.006) translate(0, 0)",children:(0,_.jsx)("path",{id:"_R_G_L_4_G_D_0_P_0",fill:"#1ed760",fillOpacity:"1",fillRule:"nonzero",d:" M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z "})})})})}),(0,_.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_3_G_N_2_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_3_G",children:(0,_.jsx)("path",{id:"_R_G_L_3_G_D_0_P_0",fill:"#121212",fillOpacity:"1",fillRule:"nonzero",d:" M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z "})})})})}),(0,_.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_2_G_N_2_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_2_G",transform:" rotate(-130) scale(1.03, 1.03)",children:(0,_.jsx)("path",{id:"_R_G_L_2_G_D_0_P_0",fill:"#1ed760",fillOpacity:"1",fillRule:"nonzero",d:" M-92.21 15.2 C-92.21,15.2 -27.04,91.53 -27.04,91.53 C-27.04,91.53 94.27,-50.53 94.27,-50.53 C94.27,-50.53 75.27,-66.67 75.27,-66.67 C75.27,-66.67 -27.04,53.15 -27.04,53.15 C-27.04,53.15 -75.83,-3.92 -75.83,-3.92 C-75.83,-3.92 -92.21,15.2 -92.21,15.2z M-162 0 C-162,-89.47 -89.47,-162 0,-162 C89.47,-162 162,-89.47 162,0 C162,89.47 89.47,162 0,162 C-89.47,162 -162,89.47 -162,0z "})})})})}),(0,_.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_1_G_N_2_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_1_G",children:(0,_.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",fill: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),fillOpacity:"1",fillRule:"nonzero",d:" M96 -7 C96,-7 96,7 96,7 C96,7 -96,7 -96,7 C-96,7 -96,-7 -96,-7 C-96,-7 96,-7 96,-7z M7 -96 C7,-96 7,96 7,96 C7,96 -7,96 -7,96 C-7,96 -7,-96 -7,-96 C-7,-96 7,-96 7,-96z "})})})})}),(0,_.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_0_G_N_2_T_0",transform:" translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_0_G",children:(0,_.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",stroke: getComputedStyle(document.body).getPropertyValue("--spice-subtext").trim(),strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:"14",strokeOpacity:"1",d:" M0 -162 C89.41,-162 162,-89.41 162,0 C162,89.41 89.41,162 0,162 C-89.41,162 -162,89.41 -162,0 C-162,-89.41 -89.41,-162 0,-162z "})})})})})]}),(0,_.jsx)("g",{id:"time_group"}),(0,_.jsxs)("defs",{children:[(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_D_0_P_0",fill:"freeze",attributeName:"fill",from:"#1ed760",to:"#1ed760",keyTimes:"0;0.9545455;1",values:"#1ed760;#b3b3b3;#b3b3b3",keySplines:"1 0 1 1;0 0 0 0",calcMode:"spline",ref:e=>{e&&e.addEventListener("endEvent",t,{once:!0})}}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z ",to:"M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z ",keyTimes:"0;0.9545455;1",values:"M-0.2 -0.01 C-0.2,0.1 -0.11,0.19 0,0.19 C0.11,0.19 0.2,0.1 0.2,-0.01 C0.2,-0.11 0.11,-0.2 0,-0.2 C-0.11,-0.2 -0.2,-0.11 -0.2,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ;M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ;M-156 -0.01 C-156,86.02 -86.02,155.99 0,155.99 C86.02,155.99 156,86.02 156,-0.01 C156,-86.03 86.02,-156.01 0,-156.01 C-86.02,-156.01 -156,-86.02 -156,-0.01z M-168 0 C-168,-92.78 -92.78,-168 0,-168 C92.78,-168 168,-92.79 168,0 C168,92.78 92.78,168 0,168 C-92.78,168 -168,92.78 -168,0z ",keySplines:"0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_T_0",fill:"freeze",attributeName:"transform",from:"0.99 0.99",to:"1 1",type:"scale",additive:"sum",keyTimes:"0;0.9545455;1",values:"0.99 0.99;1 1;1 1",keySplines:"0.66 0 0.34 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_4_G_N_3_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"0",keyTimes:"0;0.0454545;0.0454591;0.9545455;0.9545455;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_D_0_P_0",fill:"freeze",attributeName:"fill",from:"#121212",to:"#121212",keyTimes:"0;0.0454545;0.1818182;1",values:"#121212;#121212;#b3b3b3;#b3b3b3",keySplines:"0.167 0.167 0.833 0.833;0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z ",to:"M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z ",keyTimes:"0;0.9545455;1",values:"M87.22 -37.47 C87.22,-37.47 83.61,-14.6 83.61,-14.6 C83.61,-14.6 -98.73,-15.53 -98.73,-15.53 C-98.73,-15.53 -98.93,-39.44 -98.93,-39.44 C-98.93,-39.44 87.22,-37.47 87.22,-37.47z M87.74 -37.48 C87.74,-37.48 70.28,60.99 70.28,60.99 C70.28,60.99 46.22,61 46.22,61 C46.22,61 62.59,-37.21 62.59,-37.21 C62.59,-37.21 87.74,-37.48 87.74,-37.48z ;M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z M6 -96 C6,-96 6,96 6,96 C6,96 -6,96 -6,96 C-6,96 -6,-96 -6,-96 C-6,-96 6,-96 6,-96z ;M96 -6 C96,-6 96,6 96,6 C96,6 -96,6 -96,6 C-96,6 -96,-6 -96,-6 C-96,-6 96,-6 96,-6z M6 -96 C6,-96 6,96 6,96 C6,96 -6,96 -6,96 C-6,96 -6,-96 -6,-96 C-6,-96 6,-96 6,-96z ",keySplines:"0.66 0 0.34 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"-230",to:"0",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"-230;0;0",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_3_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"0",keyTimes:"0;0.0454545;0.0454591;0.9545455;0.9545455;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"-230",to:"0",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"-230;0;0",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_2_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"1",to:"0",keyTimes:"0;0.0454545;0.0454546;1",values:"1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"-230",to:"0",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"-230;0;0",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"1",keyTimes:"0;0.9545455;0.95455;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:"-230",to:"0",type:"rotate",additive:"sum",keyTimes:"0;0.9545455;1",values:"-230;0;0",keySplines:"0.8 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_N_1_T_0",fill:"freeze",keyTimes:"0;0.9545455;1",path:"M192 198 C192,198 192,192 192,192 C192,192 192,192 192,192 ",keyPoints:"0;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.36666666666666664s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:"0",to:"1",keyTimes:"0;0.9545455;0.95455;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"0s",from:"0",to:"1",xlinkHref:"#time_group"})]})]})}));var I=i(71306);const N=(0,n.memo)((function({size:e,onEnd:t}){const i=e>16?2.35:2.5;return(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:e*i,height:e*i,viewBox:"0 0 224 224",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(e*i-e)/2}px`},children:[(0,_.jsxs)("defs",{children:[(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G_D_0_P_0",fill:"freeze",attributeName:"stroke-width",from:30,to:0,keyTimes:"0;0.1219512;0.804878;1",values:"30;30;0;0",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline",ref:e=>{e&&e.addEventListener("endEvent",t,{once:!0})}}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G_D_0_P_0",fill:"freeze",attributeName:"rx",from:15,to:110,keyTimes:"0;0.1219512;0.804878;1",values:"15;15;110;110",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G_D_0_P_0",fill:"freeze",attributeName:"ry",from:15,to:110,keyTimes:"0;0.1219512;0.804878;1",values:"15;15;110;110",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.1219512;0.804878;1",values:"1;1;0;0",keySplines:"0.2 0 0.4 1;0.2 0 0.4 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_7_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.1219512;0.1219537;0.8292683;0.8292683;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G_D_0_P_0",fill:"freeze",attributeName:"stroke-width",from:30,to:0,keyTimes:"0;0.2926829;0.9756098;1",values:"30;30;0;0",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G_D_0_P_0",fill:"freeze",attributeName:"rx",from:15,to:110,keyTimes:"0;0.2926829;0.9756098;1",values:"15;15;110;110",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G_D_0_P_0",fill:"freeze",attributeName:"ry",from:15,to:110,keyTimes:"0;0.2926829;0.9756098;1",values:"15;15;110;110",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.2926829;0.9756098;1",values:"1;1;0;0",keySplines:"0.2 0 0.4 1;0.2 0 0.4 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_6_G_M",fill:"freeze",attributeName:"opacity",from:0,to:1,keyTimes:"0;0.2926829;0.2926854;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_5_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.7804878;1",values:"1;0;0",keySplines:"0.6 0 0.7 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_5_G",fill:"freeze",keyTimes:"0;0.7804878;1",path:"M122.25 123.17 C200.25,137.25 197.5,23.92 197.5,23.92 C197.5,23.92 197.5,23.92 197.5,23.92 ",keyPoints:"0;1;1",keySplines:"0.95 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_5_G",fill:"freeze",attributeName:"transform",from:"0.6 0.6",to:"0.9 0.9",type:"scale",additive:"sum",keyTimes:"0;0.7804878;1",values:"0.6 0.6;0.9 0.9;0.9 0.9",keySplines:"0.8 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_5_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.2439024;0.2439049;0.804878;0.8048781;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_4_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.6585366;1",values:"1;0;0",keySplines:"0.6 0 1 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_4_G",fill:"freeze",keyTimes:"0;0.6585366;1",path:"M98 105.92 C19.75,106.25 32.25,37.42 32.25,37.42 C32.25,37.42 32.25,37.42 32.25,37.42 ",keyPoints:"0;1;1",keySplines:"0.95 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_4_G",fill:"freeze",attributeName:"transform",from:"0.6 0.6",to:"0.9 0.9",type:"scale",additive:"sum",keyTimes:"0;0.6585366;1",values:"0.6 0.6;0.9 0.9;0.9 0.9",keySplines:"0.8 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_4_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.2439024;0.2439049;0.6829268;0.6829269;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_3_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.7317073;1",values:"1;0;0",keySplines:"0.6 0 1 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_3_G",fill:"freeze",keyTimes:"0;0.7317073;1",path:"M112.5 123.17 C73.75,194.5 72,43.17 72,43.17 C72,43.17 72,43.17 72,43.17 ",keyPoints:"0;1;1",keySplines:"0.95 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_3_G",fill:"freeze",attributeName:"transform",from:"0.6 0.6",to:"0.9 0.9",type:"scale",additive:"sum",keyTimes:"0;0.7317073;1",values:"0.6 0.6;0.9 0.9;0.9 0.9",keySplines:"0.8 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_3_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.2439024;0.2439049;0.804878;0.8048781;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_2_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.804878;1",values:"1;0;0",keySplines:"0.6 0 1 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_2_G",fill:"freeze",keyTimes:"0;0.804878;1",path:"M112 134.92 C160.75,190.75 155.25,45.67 155.25,45.67 C155.25,45.67 155.25,45.67 155.25,45.67 ",keyPoints:"0;1;1",keySplines:"0.95 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_2_G",fill:"freeze",attributeName:"transform",from:"0.6 0.6",to:"0.9 0.9",type:"scale",additive:"sum",keyTimes:"0;0.804878;1",values:"0.6 0.6;0.9 0.9;0.9 0.9",keySplines:"0.8 0 0.8 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_2_G_M",fill:"freeze",attributeName:"opacity",from:0,to:0,keyTimes:"0;0.2439024;0.2439049;0.8536585;0.8536586;1",values:"0;0;1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_0",fill:"freeze",attributeName:"fill",from:I.ONy,to:I.ONy,keyTimes:"0;0.1219512;0.2439024;1",values:"#ffffff;#ffffff;#1db954;#1db954",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_0",fill:"freeze",attributeName:"d",attributeType:"XML",from:"M-6.18 -8.52 C-5.37,-8.78 -4.5,-8.82 -3.67,-8.63 C-2.84,-8.43 -2.07,-8.02 -1.46,-7.43 C-1.46,-7.43 -1.45,-7.43 -1.45,-7.43 C-1.06,-7.06 -0.54,-6.85 0,-6.85 C0.54,-6.85 1.06,-7.06 1.45,-7.43 C1.45,-7.43 1.46,-7.43 1.46,-7.43 C1.99,-7.94 2.63,-8.31 3.32,-8.53 C4.02,-8.75 4.76,-8.8 5.48,-8.69 C6.44,-8.53 7.34,-8.08 8.04,-7.41 C8.74,-6.73 9.22,-5.85 9.41,-4.9 C9.55,-4.2 9.53,-3.48 9.34,-2.79 C9.16,-2.11 8.83,-1.47 8.36,-0.93 C8.36,-0.93 0.4,8.56 0.4,8.56 C0.35,8.62 0.29,8.67 0.22,8.7 C0.15,8.73 0.08,8.75 0,8.75 C-0.07,8.75 -0.15,8.73 -0.22,8.7 C-0.29,8.67 -0.35,8.62 -0.39,8.56 C-0.39,8.56 -8.35,-0.92 -8.35,-0.92 C-8.35,-0.92 -8.36,-0.93 -8.36,-0.93 C-8.83,-1.47 -9.16,-2.11 -9.35,-2.79 C-9.53,-3.48 -9.55,-4.2 -9.41,-4.9 C-9.41,-4.9 -9.41,-4.9 -9.41,-4.9 C-9.25,-5.74 -8.86,-6.52 -8.29,-7.16 C-7.73,-7.79 -7,-8.27 -6.18,-8.52z ",to:"M0.03 0 C0.02,0 0.02,0 0.02,0 C0.01,0 0.01,0 0.01,-0.01 C0.01,-0.01 0.01,-0.01 0.01,-0.01 C0,-0.01 0,-0.01 0,-0.01 C0,-0.01 0,-0.01 -0.01,-0.01 C-0.01,-0.01 -0.01,-0.01 -0.01,-0.01 C-0.01,0 -0.01,0 -0.01,0 C-0.02,0 -0.02,0 -0.02,0 C-0.03,0 -0.03,0 -0.03,-0.01 C-0.04,-0.01 -0.04,-0.01 -0.04,-0.02 C-0.04,-0.02 -0.04,-0.02 -0.04,-0.02 C-0.04,-0.03 -0.04,-0.03 -0.03,-0.03 C-0.03,-0.03 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0.03,-0.03 0.03,-0.03 C0.03,-0.03 0.03,-0.03 0.03,-0.03 C0.04,-0.03 0.04,-0.03 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.01 0.04,-0.01 0.03,-0.01 C0.03,0 0.03,0 0.03,0z ",keyTimes:"0;0.1219512;0.2439024;1",values:"M-6.18 -8.52 C-5.37,-8.78 -4.5,-8.82 -3.67,-8.63 C-2.84,-8.43 -2.07,-8.02 -1.46,-7.43 C-1.46,-7.43 -1.45,-7.43 -1.45,-7.43 C-1.06,-7.06 -0.54,-6.85 0,-6.85 C0.54,-6.85 1.06,-7.06 1.45,-7.43 C1.45,-7.43 1.46,-7.43 1.46,-7.43 C1.99,-7.94 2.63,-8.31 3.32,-8.53 C4.02,-8.75 4.76,-8.8 5.48,-8.69 C6.44,-8.53 7.34,-8.08 8.04,-7.41 C8.74,-6.73 9.22,-5.85 9.41,-4.9 C9.55,-4.2 9.53,-3.48 9.34,-2.79 C9.16,-2.11 8.83,-1.47 8.36,-0.93 C8.36,-0.93 0.4,8.56 0.4,8.56 C0.35,8.62 0.29,8.67 0.22,8.7 C0.15,8.73 0.08,8.75 0,8.75 C-0.07,8.75 -0.15,8.73 -0.22,8.7 C-0.29,8.67 -0.35,8.62 -0.39,8.56 C-0.39,8.56 -8.35,-0.92 -8.35,-0.92 C-8.35,-0.92 -8.36,-0.93 -8.36,-0.93 C-8.83,-1.47 -9.16,-2.11 -9.35,-2.79 C-9.53,-3.48 -9.55,-4.2 -9.41,-4.9 C-9.41,-4.9 -9.41,-4.9 -9.41,-4.9 C-9.25,-5.74 -8.86,-6.52 -8.29,-7.16 C-7.73,-7.79 -7,-8.27 -6.18,-8.52z ;M-6.18 -8.52 C-5.37,-8.78 -4.5,-8.82 -3.67,-8.63 C-2.84,-8.43 -2.07,-8.02 -1.46,-7.43 C-1.46,-7.43 -1.45,-7.43 -1.45,-7.43 C-1.06,-7.06 -0.54,-6.85 0,-6.85 C0.54,-6.85 1.06,-7.06 1.45,-7.43 C1.45,-7.43 1.46,-7.43 1.46,-7.43 C1.99,-7.94 2.63,-8.31 3.32,-8.53 C4.02,-8.75 4.76,-8.8 5.48,-8.69 C6.44,-8.53 7.34,-8.08 8.04,-7.41 C8.74,-6.73 9.22,-5.85 9.41,-4.9 C9.55,-4.2 9.53,-3.48 9.34,-2.79 C9.16,-2.11 8.83,-1.47 8.36,-0.93 C8.36,-0.93 0.4,8.56 0.4,8.56 C0.35,8.62 0.29,8.67 0.22,8.7 C0.15,8.73 0.08,8.75 0,8.75 C-0.07,8.75 -0.15,8.73 -0.22,8.7 C-0.29,8.67 -0.35,8.62 -0.39,8.56 C-0.39,8.56 -8.35,-0.92 -8.35,-0.92 C-8.35,-0.92 -8.36,-0.93 -8.36,-0.93 C-8.83,-1.47 -9.16,-2.11 -9.35,-2.79 C-9.53,-3.48 -9.55,-4.2 -9.41,-4.9 C-9.41,-4.9 -9.41,-4.9 -9.41,-4.9 C-9.25,-5.74 -8.86,-6.52 -8.29,-7.16 C-7.73,-7.79 -7,-8.27 -6.18,-8.52z ;M0.03 0 C0.02,0 0.02,0 0.02,0 C0.01,0 0.01,0 0.01,-0.01 C0.01,-0.01 0.01,-0.01 0.01,-0.01 C0,-0.01 0,-0.01 0,-0.01 C0,-0.01 0,-0.01 -0.01,-0.01 C-0.01,-0.01 -0.01,-0.01 -0.01,-0.01 C-0.01,0 -0.01,0 -0.01,0 C-0.02,0 -0.02,0 -0.02,0 C-0.03,0 -0.03,0 -0.03,-0.01 C-0.04,-0.01 -0.04,-0.01 -0.04,-0.02 C-0.04,-0.02 -0.04,-0.02 -0.04,-0.02 C-0.04,-0.03 -0.04,-0.03 -0.03,-0.03 C-0.03,-0.03 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0.03,-0.03 0.03,-0.03 C0.03,-0.03 0.03,-0.03 0.03,-0.03 C0.04,-0.03 0.04,-0.03 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.01 0.04,-0.01 0.03,-0.01 C0.03,0 0.03,0 0.03,0z ;M0.03 0 C0.02,0 0.02,0 0.02,0 C0.01,0 0.01,0 0.01,-0.01 C0.01,-0.01 0.01,-0.01 0.01,-0.01 C0,-0.01 0,-0.01 0,-0.01 C0,-0.01 0,-0.01 -0.01,-0.01 C-0.01,-0.01 -0.01,-0.01 -0.01,-0.01 C-0.01,0 -0.01,0 -0.01,0 C-0.02,0 -0.02,0 -0.02,0 C-0.03,0 -0.03,0 -0.03,-0.01 C-0.04,-0.01 -0.04,-0.01 -0.04,-0.02 C-0.04,-0.02 -0.04,-0.02 -0.04,-0.02 C-0.04,-0.03 -0.04,-0.03 -0.03,-0.03 C-0.03,-0.03 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0,-0.07 0,-0.07 C0,-0.07 0.03,-0.03 0.03,-0.03 C0.03,-0.03 0.03,-0.03 0.03,-0.03 C0.04,-0.03 0.04,-0.03 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.02 0.04,-0.02 0.04,-0.02 C0.04,-0.01 0.04,-0.01 0.03,-0.01 C0.03,0 0.03,0 0.03,0z ",keySplines:"0.333 0 0.667 1;0.333 0 0.667 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_1",fill:"freeze",attributeName:"fill",from:I.ONy,to:I.ONy,keyTimes:"0;0.1219512;0.2439024;1",values:"#ffffff;#ffffff;#1db954;#1db954",keySplines:"0 0 0 1;0 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G",fill:"freeze",attributeName:"opacity",from:.7000000000000001,to:1,keyTimes:"0;0.1219512;1",values:"0.7000000000000001;1;1",keySplines:"0.167 0.167 0.833 0.833;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_1_T_0",fill:"freeze",attributeName:"transform",from:"1 1",to:"1 1",type:"scale",additive:"sum",keyTimes:"0;0.1219512;0.2439024;0.5121951;1",values:"1 1;0.8 0.8;1.25 1.25;1 1;1 1",keySplines:"0.333 0 0.667 1;0.333 0 0.667 1;0.333 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.2439024;0.2439025;1",values:"1;1;0;0",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_0_G_D_1_P_0",fill:"freeze",attributeName:"stroke-width",from:2,to:1,keyTimes:"0;0.2439024;0.5121951;1",values:"2;2;1;1",keySplines:"0.333 0 0 1;0.333 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_0_G",fill:"freeze",attributeName:"transform",from:"4 4",to:"4 4",type:"scale",additive:"sum",keyTimes:"0;0.2439024;0.5121951;1",values:"4 4;4 4;4 4;4 4",keySplines:"0.333 0 0 1;0.333 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_1_T_0",fill:"freeze",attributeName:"transform",from:"1 1",to:"1 1",type:"scale",additive:"sum",keyTimes:"0;0.1219512;0.2439024;0.5121951;1",values:"1 1;0.8 0.8;1.25 1.25;1 1;1 1",keySplines:"0.333 0 0.667 1;0.333 0 0.667 1;0.333 0 0 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_1_T_0_M",fill:"freeze",attributeName:"opacity",from:0,to:1,keyTimes:"0;0.2439024;0.2439049;1",values:"0;0;1;1",keySplines:"0 0 0 0;0 0 0 0;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"1s",from:0,to:1,xlinkHref:"#time_group"})]}),(0,_.jsxs)("g",{id:"_R_G",children:[(0,_.jsx)("g",{id:"_R_G_L_7_G_M",children:(0,_.jsx)("g",{id:"_R_G_L_7_G",transform:" translate(112, 112) translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_7_G_D_0_P_0_G_0_T_0",children:(0,_.jsx)("ellipse",{id:"_R_G_L_7_G_D_0_P_0",stroke:I.imx,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:30,strokeOpacity:1,cx:0,cy:0})})})}),(0,_.jsx)("g",{id:"_R_G_L_6_G_M",children:(0,_.jsx)("g",{id:"_R_G_L_6_G",transform:" translate(112, 112) translate(0, 0)",children:(0,_.jsx)("g",{id:"_R_G_L_6_G_D_0_P_0_G_0_T_0",children:(0,_.jsx)("ellipse",{id:"_R_G_L_6_G_D_0_P_0",stroke:I.imx,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:30,strokeOpacity:1,cx:0,cy:0})})})}),(0,_.jsx)("g",{id:"_R_G_L_5_G_M",children:(0,_.jsx)("g",{id:"_R_G_L_5_G",children:(0,_.jsx)("path",{id:"_R_G_L_5_G_D_0_P_0",fill:I.ONy,fillOpacity:1,fillRule:"nonzero",d:" M22.28 -19.53 C16.88,-24.89 8.3,-25.2 2.54,-20.44 C2.54,-20.44 1.5,-19.48 0,-19.48 C-1.54,-19.48 -2.54,-20.44 -2.54,-20.44 C-8.3,-25.2 -16.86,-24.86 -22.24,-19.53 C-28,-13.81 -28,-4.51 -22.24,1.21 C-22.24,1.21 -4.04,22.54 -4.04,22.54 C-1.91,25.03 1.91,25.03 4.04,22.54 C4.04,22.54 22.28,1.21 22.28,1.21 C28,-4.51 28.05,-13.81 22.28,-19.53z "})})}),(0,_.jsx)("g",{id:"_R_G_L_4_G_M",children:(0,_.jsx)("g",{id:"_R_G_L_4_G",children:(0,_.jsx)("path",{id:"_R_G_L_4_G_D_0_P_0",fill:I.imx,fillOpacity:1,fillRule:"nonzero",d:" M22.28 -19.53 C16.88,-24.89 8.3,-25.2 2.54,-20.44 C2.54,-20.44 1.5,-19.48 0,-19.48 C-1.54,-19.48 -2.54,-20.44 -2.54,-20.44 C-8.3,-25.2 -16.86,-24.86 -22.24,-19.53 C-28,-13.81 -28,-4.51 -22.24,1.21 C-22.24,1.21 -4.04,22.54 -4.04,22.54 C-1.91,25.03 1.91,25.03 4.04,22.54 C4.04,22.54 22.28,1.21 22.28,1.21 C28,-4.51 28.05,-13.81 22.28,-19.53z "})})}),(0,_.jsx)("g",{id:"_R_G_L_3_G_M",children:(0,_.jsx)("g",{id:"_R_G_L_3_G",children:(0,_.jsx)("path",{id:"_R_G_L_3_G_D_0_P_0",fill:I.ONy,fillOpacity:1,fillRule:"nonzero",d:" M22.28 -19.53 C16.88,-24.89 8.3,-25.2 2.54,-20.44 C2.54,-20.44 1.5,-19.48 0,-19.48 C-1.54,-19.48 -2.54,-20.44 -2.54,-20.44 C-8.3,-25.2 -16.86,-24.86 -22.24,-19.53 C-28,-13.81 -28,-4.51 -22.24,1.21 C-22.24,1.21 -4.04,22.54 -4.04,22.54 C-1.91,25.03 1.91,25.03 4.04,22.54 C4.04,22.54 22.28,1.21 22.28,1.21 C28,-4.51 28.05,-13.81 22.28,-19.53z "})})}),(0,_.jsx)("g",{id:"_R_G_L_2_G_M",children:(0,_.jsx)("g",{id:"_R_G_L_2_G",children:(0,_.jsx)("path",{id:"_R_G_L_2_G_D_0_P_0",fill:I.imx,fillOpacity:1,fillRule:"nonzero",d:" M22.28 -19.53 C16.88,-24.89 8.3,-25.2 2.54,-20.44 C2.54,-20.44 1.5,-19.48 0,-19.48 C-1.54,-19.48 -2.54,-20.44 -2.54,-20.44 C-8.3,-25.2 -16.86,-24.86 -22.24,-19.53 C-28,-13.81 -28,-4.51 -22.24,1.21 C-22.24,1.21 -4.04,22.54 -4.04,22.54 C-1.91,25.03 1.91,25.03 4.04,22.54 C4.04,22.54 22.28,1.21 22.28,1.21 C28,-4.51 28.05,-13.81 22.28,-19.53z "})})}),(0,_.jsx)("g",{id:"_R_G_L_1_G_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_1_G_N_1_T_0",transform:" translate(112, 112)",children:(0,_.jsxs)("g",{id:"_R_G_L_1_G",transform:" scale(4, 4)",children:[(0,_.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",fill:I.ONy,fillOpacity:1,fillRule:"nonzero",d:" M-6.18 -8.52 C-5.37,-8.78 -4.5,-8.82 -3.67,-8.63 C-2.84,-8.43 -2.07,-8.02 -1.46,-7.43 C-1.46,-7.43 -1.45,-7.43 -1.45,-7.43 C-1.06,-7.06 -0.54,-6.85 0,-6.85 C0.54,-6.85 1.06,-7.06 1.45,-7.43 C1.45,-7.43 1.46,-7.43 1.46,-7.43 C1.99,-7.94 2.63,-8.31 3.32,-8.53 C4.02,-8.75 4.76,-8.8 5.48,-8.69 C6.44,-8.53 7.34,-8.08 8.04,-7.41 C8.74,-6.73 9.22,-5.85 9.41,-4.9 C9.55,-4.2 9.53,-3.48 9.34,-2.79 C9.16,-2.11 8.83,-1.47 8.36,-0.93 C8.36,-0.93 0.4,8.56 0.4,8.56 C0.35,8.62 0.29,8.67 0.22,8.7 C0.15,8.73 0.08,8.75 0,8.75 C-0.07,8.75 -0.15,8.73 -0.22,8.7 C-0.29,8.67 -0.35,8.62 -0.39,8.56 C-0.39,8.56 -8.35,-0.92 -8.35,-0.92 C-8.35,-0.92 -8.36,-0.93 -8.36,-0.93 C-8.83,-1.47 -9.16,-2.11 -9.35,-2.79 C-9.53,-3.48 -9.55,-4.2 -9.41,-4.9 C-9.41,-4.9 -9.41,-4.9 -9.41,-4.9 C-9.25,-5.74 -8.86,-6.52 -8.29,-7.16 C-7.73,-7.79 -7,-8.27 -6.18,-8.52z "}),(0,_.jsx)("path",{id:"_R_G_L_1_G_D_0_P_1",fill:I.ONy,fillOpacity:1,fillRule:"nonzero",d:" M-3.22 -10.57 C-4.4,-10.85 -5.63,-10.8 -6.79,-10.43 C-7.94,-10.06 -8.98,-9.39 -9.79,-8.49 C-10.59,-7.58 -11.14,-6.47 -11.37,-5.29 C-11.57,-4.29 -11.54,-3.26 -11.28,-2.28 C-11.02,-1.3 -10.54,-0.4 -9.88,0.37 C-9.88,0.37 -1.93,9.85 -1.93,9.85 C-1.69,10.13 -1.4,10.36 -1.06,10.51 C-0.73,10.67 -0.37,10.75 0,10.75 C0.37,10.75 0.73,10.67 1.06,10.51 C1.4,10.36 1.69,10.13 1.93,9.85 C1.93,9.85 9.88,0.37 9.88,0.37 C10.54,-0.4 11.02,-1.3 11.28,-2.28 C11.54,-3.26 11.57,-4.29 11.37,-5.28 C11.37,-5.28 11.37,-5.29 11.37,-5.29 C11.1,-6.64 10.42,-7.89 9.43,-8.85 C8.43,-9.81 7.17,-10.44 5.8,-10.66 C5.8,-10.66 5.8,-10.66 5.8,-10.66 C4.77,-10.83 3.72,-10.75 2.73,-10.44 C1.74,-10.13 0.83,-9.6 0.08,-8.88 C0.06,-8.86 0.03,-8.85 0,-8.85 C-0.03,-8.85 -0.06,-8.86 -0.08,-8.88 C-0.96,-9.72 -2.04,-10.3 -3.22,-10.57z "})]})})}),(0,_.jsx)("g",{id:"_R_G_L_0_G_N_1_T_0_M",children:(0,_.jsx)("g",{id:"_R_G_L_0_G_N_1_T_0",transform:" translate(112, 112)",children:(0,_.jsxs)("g",{id:"_R_G_L_0_G",transform:" translate(0, 0)",children:[(0,_.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",fill:I.imx,fillOpacity:1,fillRule:"nonzero",d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "}),(0,_.jsx)("path",{id:"_R_G_L_0_G_D_1_P_0",stroke:I.imx,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:2,strokeOpacity:1,d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "})]})})})]}),(0,_.jsx)("g",{id:"time_group"})]})})),w=(0,n.memo)((function({size:e,onEnd:t}){const i=2.35;return(0,_.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:e*i,height:e*i,viewBox:"0 0 224 224",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(e*i-e)/2}px`},children:[(0,_.jsxs)("defs",{children:[(0,_.jsx)("animate",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_0",fill:"freeze",attributeName:"stroke-width",from:1,to:2,keyTimes:"0;0.3225806;0.6451613;1",values:"1;1;2;2",keySplines:"0.6 0 0.7 1;0.6 0 0.7 1;0 0 0 0",calcMode:"spline",ref:e=>{e&&e.addEventListener("endEvent",t,{once:!0})}}),(0,_.jsx)("animate",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_1_G",fill:"freeze",attributeName:"opacity",from:0,to:.7000000000000001,keyTimes:"0;0.3225806;0.6451613;1",values:"0;0;0.7000000000000001;0.7000000000000001",keySplines:"0.6 0 0.7 1;0.6 0 0.7 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_T_0",fill:"freeze",keyTimes:"0;0.3225806;0.483871;0.6451613;0.9677419;1",path:"M112 140 C112,140 100,140 100,140 C100,140 124,140 124,140 C124,140 100,140 100,140 C100,140 112,140 112,140 C112,140 112,140 112,140 ",keyPoints:"0;0.17;0.5;0.83;1;1",keySplines:"0.8 0 0.8 1;0.8 0 0.8 1;0.8 0 0.8 1;0.2 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_1_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:0,to:0,type:"rotate",additive:"sum",keyTimes:"0;0.2580645;0.3870968;0.5483871;0.7096774;0.9677419;1",values:"0;3;-4;6;-6;0;0",keySplines:"0.6 0 0.667 1;0.333 0 0.667 1;0.333 0 0.667 1;0.333 0 0.667 1;0.6 0 0.667 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_0_G_D_1_P_0",fill:"freeze",attributeName:"stroke-width",from:1,to:2,keyTimes:"0;0.3225806;0.6451613;1",values:"1;1;2;2",keySplines:"0.3 0 0.4 1;0.3 0 0.4 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_0_G",fill:"freeze",attributeName:"opacity",from:1,to:0,keyTimes:"0;0.3225806;0.6451613;1",values:"1;1;0;0",keySplines:"0.3 0 0.4 1;0.3 0 0.4 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateMotion",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_T_0",fill:"freeze",keyTimes:"0;0.3225806;0.483871;0.6451613;0.9677419;1",path:"M112 140 C112,140 100,140 100,140 C100,140 124,140 124,140 C124,140 100,140 100,140 C100,140 112,140 112,140 C112,140 112,140 112,140 ",keyPoints:"0;0.17;0.5;0.83;1;1",keySplines:"0.8 0 0.8 1;0.8 0 0.8 1;0.8 0 0.8 1;0.2 0 0.2 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animateTransform",{dur:"0.5166667s",begin:"0s",xlinkHref:"#_R_G_L_0_G_N_2_T_0",fill:"freeze",attributeName:"transform",from:0,to:0,type:"rotate",additive:"sum",keyTimes:"0;0.2580645;0.3870968;0.5483871;0.7096774;0.9677419;1",values:"0;3;-4;6;-6;0;0",keySplines:"0.6 0 0.667 1;0.333 0 0.667 1;0.333 0 0.667 1;0.333 0 0.667 1;0.6 0 0.667 1;0 0 0 0",calcMode:"spline"}),(0,_.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"1s",from:0,to:1,xlinkHref:"#time_group"})]}),(0,_.jsxs)("g",{id:"_R_G",children:[(0,_.jsx)("g",{id:"_R_G_L_1_G_N_2_T_0",children:(0,_.jsx)("g",{id:"_R_G_L_1_G",transform:" translate(0, -28) scale(4, 4) translate(0, 0)",children:(0,_.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",stroke:I.ONy,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:1,strokeOpacity:1,d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "})})}),(0,_.jsx)("g",{id:"_R_G_L_0_G_N_2_T_0",children:(0,_.jsxs)("g",{id:"_R_G_L_0_G",transform:" translate(0.214, -27.999) scale(4, 4) translate(0, 0)",children:[(0,_.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",fill:I.imx,fillOpacity:1,fillRule:"nonzero",d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "}),(0,_.jsx)("path",{id:"_R_G_L_0_G_D_1_P_0",stroke:I.imx,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:1,strokeOpacity:1,d:" M8.73 -8.13 C9.58,-7.31 10.16,-6.25 10.39,-5.09 C10.56,-4.24 10.53,-3.37 10.31,-2.54 C10.09,-1.7 9.68,-0.93 9.12,-0.28 C9.12,-0.28 1.16,9.21 1.16,9.21 C1.02,9.38 0.84,9.51 0.64,9.61 C0.44,9.7 0.22,9.75 0,9.75 C-0.22,9.75 -0.44,9.7 -0.64,9.61 C-0.84,9.51 -1.02,9.38 -1.16,9.21 C-1.16,9.21 -9.12,-0.28 -9.12,-0.28 C-9.68,-0.93 -10.09,-1.7 -10.31,-2.54 C-10.53,-3.37 -10.56,-4.25 -10.39,-5.09 C-10.19,-6.11 -9.73,-7.05 -9.04,-7.82 C-8.35,-8.59 -7.47,-9.16 -6.49,-9.48 C-5.5,-9.79 -4.45,-9.83 -3.45,-9.6 C-2.44,-9.37 -1.51,-8.87 -0.77,-8.16 C-0.56,-7.96 -0.28,-7.85 0,-7.85 C0.28,-7.85 0.56,-7.96 0.77,-8.16 C1.41,-8.77 2.18,-9.22 3.03,-9.49 C3.87,-9.75 4.77,-9.82 5.64,-9.68 C6.8,-9.49 7.88,-8.94 8.73,-8.13z "})]})})]}),(0,_.jsx)("g",{id:"time_group"})]})}));var R=i(22552),k=i(73356);let O=function(e){return e.xs="small",e.sm="medium",e.md="large",e}({});var P=function(e){return e.none="none",e.positive="positive",e.undo="undo",e}(P||{});const L=n.memo((function({onClick:e,isAdded:t,size:i,disabled:d=!1,isEpisode:p=!1,isAudiobook:h=!1,isMiniPlayer:g=!1,className:f,condensedAll:v,condensed:y,placement:b}){const E=t?u.Ru.get("contextmenu.remove-from-your-episodes"):u.Ru.get("web-player.aligned-curation.tooltips.add-to-your-episodes"),I=t?u.Ru.get("remove_from_your_library"):u.Ru.get("save_to_your_library"),L=t?u.Ru.get("web-player.aligned-curation.tooltips.remove-from-liked-songs"):u.Ru.get("web-player.aligned-curation.tooltips.add-to-liked-songs");let j=I;p?j=E:g&&(j=L);const D=(0,k.j)(),[M,U]=(0,n.useState)(P.none),B=(0,n.useCallback)((()=>U(P.none)),[U]);let F;switch(i){case O.xs:F=16;break;case O.sm:F=24;break;default:F=32}const{setState:H,Icon:V}=(0,R.Q)(t?S.t.CURATED:S.t.UNCURATED,S.A),{content:G,playSound:z}=C(F),W=(0,n.useCallback)((i=>{if(d)return;const{currentTarget:n,detail:r}=i;U(t?P.undo:P.positive),H(t?S.t.UNCURATED:S.t.CURATED),e(i),t||z(),r>0&&n&&n.blur()}),[d,t,H,e,z]),K=(0,c.NC)(m.N_Z,{loadingValue:!1});let Y;G&&t?Y=G:K||D||M===P.none||(Y=p||h?M===P.positive?(0,_.jsx)(A,{size:F,onEnd:B}):(0,_.jsx)(T,{size:F,onEnd:B}):M===P.positive?(0,_.jsx)(N,{size:F,onEnd:B}):(0,_.jsx)(w,{size:F,onEnd:B}));return(0,_.jsx)(x.Zp,{label:j,placement:b,children:(0,_.jsx)(l.H,{semanticColor:t?"textBrightAccent":"textSubdued",iconOnly:K?V:()=>{if(Y)return Y;let e;return e=p||h?t?r.k:a.P:t?s.F:o.g,(0,_.jsx)(e,{size:i})},"aria-checked":t,"aria-label":j,onClick:W,"":"add-button",size:i,className:f,condensedAll:v,condensed:y})})}))},85072:(e,t,i)=>{"use strict";i.d(t,{e:()=>k});var n=i(30758),r=i(97500),a=i.n(r),s=i(79133),o=i.n(s),l=i(71306),c=i(90201),u=i(46798),d=i(86070);const m=({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","":"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,"":"user-icon"});var p=i(92433);const h="main-avatar-avatar",g="main-avatar-image",f="main-avatar-withBadge",v="main-avatar-piled",y="main-avatar-piledIcon",b="main-avatar-placeholderWrapper",_="Q4hOdDPRDHPhfou2xbDg",E="main-avatar-placeholderTransparent",C={},x=[l.MS1,l.wfD,l.pfM,l.zDo,l.mZi,l.RQU],S=e=>{if(!C[e]){const t=function(e){let t,i=0;if(0===e.length)return i;for(let n=0,r=e.length;n<r;n++)t=e.charCodeAt(n),i=(i<<5)-i+t,i|=0;return i}(e),i=Math.abs(t)%x.length;C[e]=x[i]}return C[e]},A=e=>o()(e)[0].toUpperCase(),T=e=>{const t=S(e);return(e=>{const{r:t,g:i,b:n}=e.rgb;return(299*t+587*i+114*n)/1e3>=128})((0,p.j)(t))?l.Ql9:l.ONy},I=({username:e,displayName:t,userIconSize:i,transparent:n,className:r})=>{const s=e&&t,o=s?(e=>({background:S(e),color:T(e)}))(e):{},l=s?{placeholderText:A(t)}:{};return(0,d.jsx)("div",{className:a()(b,r,{[_]:!s,[E]:n}),"":"placeholder-wrapper",style:o,children:(0,d.jsx)(m,{iconSize:i,...l})})};var N=i(57276),w=i(80913);const R=.93328125,k=(0,n.memo)((function(e){const{label:t,images:i,width:n,className:r,imageClassName:s,withBadge:o,userIconSize:l,testID:c,piled:u,username:m,displayName:p,placeholderClassName:b,customPlaceholder:_,transparent:E}=e,C=(0,w.h)(i,{desiredSize:n}),x=_||(0,d.jsx)(I,{username:m,displayName:p,userIconSize:l,transparent:E,className:b});return(0,d.jsxs)("figure",{className:a()(h,{[f]:o},r),title:t,style:{width:u?n*R:n,height:n,...u&&{marginInlineStart:.03125*n}},"":c,children:[(0,d.jsx)("div",{className:a()({[v]:u}),style:{width:n,height:n,insetInlineStart:u?-.06671875000000005*n:0},children:C?(0,d.jsx)(N._,{loading:"eager",src:C,alt:t,className:a()(g,s),children:x}):x}),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:y,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"})})})})]})}))},1527:(e,t,i)=>{"use strict";i.d(t,{a:()=>o});var n=i(30758),r=i(30171),a=i(53129),s=i(86070);const o=n.forwardRef((function({onClick:e,ariaLabel:t,standalone:i=!1,tabIndex:n=0,className:o="",icon:l,size:c="md",semanticColor:u,condensed:d,condensedAll:m,disableTooltip:p=!1,testId:h,disabled:g=!1,placement:f},v){const y=l,b="sm"===c||"md"===c||"lg"===c?c:void 0,_="small"===c||"medium"===c||"large"===c?c:void 0;return(0,s.jsx)(a.Zp,{label:t,disabled:p,placement:f,children:(0,s.jsx)(r.H,{"":h,className:o,onClick:e,"aria-label":t,"aria-hidden":i,tabIndex:n,ref:v,iconOnly:y,buttonSize:b,size:_,semanticColor:u,condensed:d,condensedAll:m,disabled:g})})}))},80852:(e,t,i)=>{"use strict";i.d(t,{v:()=>a});var n=i(59996),r=i(86070);const a=({href:e,children:t,...i})=>(0,r.jsx)(n.N,{to:e,...i,children:t})},18326:(e,t,i)=>{"use strict";i.d(t,{I:()=>l});var n=i(30758),r=i(47231),a=i(45346),s=i(62720),o=i(86070);const l=n.memo((function({uri:e,size:t=r.M.md,className:i,onClick:l,canDownload:c,condensedAll:u}){const[d,m]=(0,s.A)(e),p=(0,a.W)(),h=(0,n.useCallback)((()=>{p({targetUri:e,intent:d?"unsave":"save",type:"click"}),m(!d)}),[p,e,d,m]);return(0,o.jsx)(r.f,{className:i,isFollowing:d,onFollow:h,onClick:l,uri:e,size:t,canDownload:c,condensedAll:u,condensed:!0})}))},47231:(e,t,i)=>{"use strict";i.d(t,{M:()=>A,f:()=>I});var n=i(30758),r=i(97500),a=i.n(r),s=i(30171),o=i(21383),l=i(85212),c=i(11808),u=i(87832),d=i(6292),m=i(85065);var p=i(53129),h=i(88305),g=i(35421),f=i(50668),v=i(3469),y=i(58302),b=i(24679);const _="x-downloadButton-DownloadButton",E="x-downloadButton-button",C="x-downloadButton-cancelDownload",x="x-downloadButton-progress";var S=i(86070);let A=function(e){return e.xs="small",e.sm="medium",e.md="large",e}({});const T=e=>{const{currentTarget:t,detail:i}=e;i>0&&t&&t.blur()},I=({uri:e,isFollowing:t,onFollow:i,size:r=A.sm,className:I,onClick:N=(()=>{}),showUpsell:w=!0,canDownload:R=!0,condensedAll:k,condensed:O})=>{const[P,L]=(0,n.useState)(!1),{capability:j,availability:D,addDownload:M}=(0,y.$)(e,R),U=(0,v.V)(),B=(0,b.e)(e);((e,t)=>{const i=(0,u.i)(),r=(0,n.useRef)(!1);(0,n.useEffect)((()=>{e===m.kw.DOWNLOADING&&!1===r.current&&(r.current=!0,i.say(c.Ru.get("download.downloading",t.totalItems)))}),[i,e,t]);const a=(0,d.Z)(e);(0,n.useEffect)((()=>{a===m.kw.DOWNLOADING&&e===m.kw.YES&&(r.current=!1,i.say(c.Ru.get("download.complete")))}),[i,a,e])})(D,B);const F=(0,n.useCallback)((e=>{e.preventDefault(),j===m.vs.NO_PERMISSION?N(e,m.NV.NO_PERMISSION):(!1===t?(i(),L(!0)):M(),N(e,m.NV.ADD)),T(e)}),[M,j,t,N,i]),H=(0,n.useCallback)((t=>{t.preventDefault(),U(e),T(t),N(t,m.NV.REMOVE)}),[e,U,N]);if((0,n.useEffect)((()=>{!0===P&&!0===t&&(M(),L(!1))}),[t,P,M]),D===m.kw.YES)return(0,S.jsx)(p.Zp,{label:c.Ru.get("download.remove"),children:(0,S.jsx)(s.H,{className:I,onClick:H,iconOnly:o.F,semanticColor:"textBrightAccent",size:r,"aria-label":c.Ru.get("download.remove"),"aria-checked":!0,condensedAll:k,condensed:O})});if(j===m.vs.NO_CAPABILITY||j===m.vs.NO_PERMISSION_HIDE)return null;if(j===m.vs.NO_PERMISSION)return w?(0,S.jsx)("div",{className:a()(_,I),children:(0,S.jsx)(f.y,{offset:[-2,20],action:"toggle",trigger:"click",content:(0,S.jsx)(g.z,{children:(0,S.jsx)("span",{children:c.Ru.get("download.upsell")})}),renderInline:!1,children:(0,S.jsx)("div",{children:(0,S.jsx)(p.Zp,{label:c.Ru.get("download.download"),children:(0,S.jsx)(s.H,{onClick:F,iconOnly:l.i,size:r,"aria-label":c.Ru.get("download.download"),"aria-checked":!1,condensedAll:k,condensed:O})})})})}):null;if(D===m.kw.NO)return(0,S.jsx)(p.Zp,{label:c.Ru.get("download.download"),children:(0,S.jsx)(s.H,{className:I,onClick:F,iconOnly:l.i,size:r,"aria-label":c.Ru.get("download.download"),"aria-checked":!1,condensedAll:k,condensed:O})});let V;switch(r){case A.xs:V=16;break;case A.sm:V=24;break;default:V=32}return(0,S.jsxs)("div",{className:a()(C,I),role:"switch","aria-checked":!0,children:[(0,S.jsx)(p.Zp,{label:c.Ru.get("download.cancel"),children:(0,S.jsx)("button",{style:{height:V,width:V},className:a()(E,I),onClick:H,"aria-label":c.Ru.get("download.cancel")})}),(0,S.jsx)("span",{className:a()(x),children:(0,S.jsx)(h.C,{"aria-valuetext":c.Ru.get("progress.downloading-tracks"),percentage:B.percentage,size:V})})]})}},27734:(e,t,i)=>{"use strict";i.d(t,{M:()=>r.M,e:()=>c});var n=i(30758),r=i(47231),a=i(45346),s=i(62720),o=i(86070);const l=n.memo((function({uri:e,size:t=r.M.md,className:i,onClick:l,showUpsell:c,canDownload:u,condensed:d}){const[m,p]=(0,s.A)(e),h=(0,a.W)(),g=(0,n.useCallback)((()=>{h({targetUri:e,intent:m?"remove-from-library":"add-to-library",type:"click"}),p(!m)}),[h,e,m,p]);return(0,o.jsx)(r.f,{className:i,isFollowing:m,onFollow:g,onClick:l,uri:e,size:t,showUpsell:c,canDownload:u,condensed:d})})),c=n.memo((function(e){return(0,o.jsx)(l,{...e})}))},37065:(e,t,i)=>{"use strict";i.d(t,{O:()=>u});var n=i(30171),r=i(34489),a=i(11808),s=i(53129),o=i(32994),l=i(42116),c=i(86070);const u=({isDisliked:e=!1,onClick:t=(()=>{}),className:i,size:u="medium"})=>{const d=(0,l.y)();return(0,c.jsx)(s.Zp,{label:a.Ru.get("playback-control.ban"),children:(0,c.jsx)(n.H,{role:"switch","aria-label":a.Ru.get("playback-control.ban"),"aria-checked":e,className:i,onClick:t,iconOnly:r.P,size:d===o.E.MEDIUM?u:"small"})})}},70675:(e,t,i)=>{"use strict";i.d(t,{M:()=>c,e:()=>u});var n=i(30758),r=i(30171),a=i(76727),s=i(11808),o=i(53129),l=i(86070);let c=function(e){return e.xs="small",e.sm="medium",e.md="large",e}({});const u=n.forwardRef((function({onClick:e=(()=>{}),size:t=c.md,label:i=s.Ru.get("more"),ariaLabel:n,placement:u,className:d,condensedAll:m},p){return(0,l.jsx)(o.Zp,{label:i,placement:u,children:(0,l.jsx)(r.H,{onClick:e,iconOnly:a.x,size:t,"aria-label":n||i,"aria-haspopup":"menu",ref:p,"":"more-button",className:d,condensedAll:m,condensed:!0})})}))},68244:(e,t,i)=>{"use strict";i.d(t,{b:()=>l});var n=i(30758),r=i(97684),a=i(45346),s=i(62720),o=i(86070);const l=n.memo((function({uri:e,className:t,onClick:i,size:l=r.t.xs,condensed:c}){const[u,d]=(0,s.A)(e),m=(0,a.W)(),p=(0,n.useCallback)((t=>{t.preventDefault(),m({targetUri:e,intent:u?"remove-from-library":"add-to-library",type:"click"}),i&&i(!u),d(!u)}),[m,e,u,i,d]);return(0,o.jsx)(r.M,{className:t,size:l,onClick:p,isAdded:!!u,isEpisode:!0,condensed:c})}))},74322:(e,t,i)=>{"use strict";i.d(t,{b:()=>c});var n=i(30758),r=i(97684),a=i(9285),s=i(45346),o=i(62720),l=i(86070);const c=n.memo((function({uri:e,className:t,onClick:i,size:c=r.t.xs,placement:u,isMiniPlayer:d}){const m=(0,a.i)(e),[p,h]=(0,o.A)(m),g=(0,s.W)(),f=(0,n.useCallback)((e=>{e.preventDefault(),g({targetUri:m,intent:p?"remove-from-library":"add-to-library",type:"click"}),i&&i(!p),h(!p)}),[p,g,m,i,h]);return(0,l.jsx)(r.M,{className:t,size:c,onClick:f,isAdded:p,placement:u,condensed:!0,isMiniPlayer:d})}))},80784:(e,t,i)=>{"use strict";i.d(t,{w:()=>m});var n=i(30758),r=i(97500),a=i.n(r),s=i(69808),o=i(11808),l=i(1527),c=i(30531);const u="pvGZ831aNzHTQMZ8CA_u";var d=i(86070);const m=(0,n.memo)((function({onClick:e=(()=>{}),size:t,className:i,uri:r,sharingInfo:m,interactionData:p,ariaLabel:h=o.Ru.get("mwp.list.item.share"),condensedAll:g,placement:f,semanticColor:v,disableTooltip:y}){const{onCopyLink:b}=(0,c.L)({sharingInfo:m,uri:r,interactionData:p}),_=(0,n.useCallback)((()=>{b(),e()}),[e,b]);return(0,d.jsx)(l.a,{ariaLabel:h,size:t,onClick:_,className:a()(u,i),icon:s.C,condensedAll:g,placement:f,condensed:!0,semanticColor:v,disableTooltip:y})}))},47493:(e,t,i)=>{"use strict";i.d(t,{a:()=>v});var n=i(36315),r=i(11808),a=i(33493),s=i(98584),o=i(2977),l=i(80227),c=i(95813),u=i(89807),d=i(67613),m=i(71588),p=i(88778),h=i(63198),g=i(26876),f=i(86070);const v=({name:e,uri:t,images:i,artists:v=[],sharingInfo:y,year:b,isHero:_=!1,onClick:E,testId:C,index:x,requestId:S,color:A,variant:T,isPlayable:I,isRestricted:N})=>{let w;const R=(0,g.J)(t),k=()=>v.map((e=>e.name)).join(r.Ru.getSeparator()),O=!(0,h.V)()&&N;return w=_?(0,f.jsx)(c.A,{index:x,onClick:E,headerText:e,featureIdentifier:"album",uri:t,playUri:R,isPlayable:I,ariaPauseLabel:r.Ru.get("tracklist.a11y.pause",e,k()),ariaPlayLabel:r.Ru.get("tracklist.a11y.play",e,k()),renderCardImage:()=>(0,f.jsx)(o.M,{isHero:!0,images:i,color:A,FallbackComponent:e=>(0,f.jsx)(n.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,t)=>(0,f.jsxs)(l.c,{isHero:!0,children:[O&&(0,f.jsx)(d.$,{}),(0,f.jsx)(u.t,{children:r.Ru.get("card.tag.album")}),v.map(((i,n)=>[n>0&&r.Ru.getSeparator(),(0,f.jsx)(a.m,{artist:i,index:n,logger:e,spec:t},i.uri)]))]}),testId:C,requestId:S}):(0,f.jsx)(s.Z,{variant:T,onClick:E,headerText:e,featureIdentifier:"album",uri:t,playUri:R,isPlayable:I,ariaPauseLabel:r.Ru.get("tracklist.a11y.pause",e,k()),index:x,ariaPlayLabel:r.Ru.get("tracklist.a11y.play",e,k()),renderCardImage:()=>(0,f.jsx)(o.M,{isHero:_,images:i,color:A,FallbackComponent:e=>(0,f.jsx)(n.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,t)=>(0,f.jsxs)(l.c,{children:[O&&(0,f.jsx)(d.$,{}),!!b&&(0,f.jsxs)("time",{dateTime:b.toString(),children:[b," • "]}),v.map(((i,n)=>[n>0&&r.Ru.getSeparator(),(0,f.jsx)(a.m,{artist:i,index:n,logger:e,spec:t},i.uri)]))]}),testId:C,requestId:S}),(0,f.jsx)(m.h,{menu:(0,f.jsx)(p.h,{uri:t,artistUri:v?.[0]?.uri,sharingInfo:y}),children:w})}},80331:(e,t,i)=>{"use strict";i.d(t,{R:()=>h});var n=i(30758),r=i(11808),a=i(98584),s=i(2977),o=i(80227),l=i(67613),c=i(71588),u=i(88778),d=i(63198),m=i(13797),p=i(86070);const h=n.memo((function({images:e,name:t,uri:i,type:n,year:h,sharingInfo:g,latest:f,showType:v,onClick:y,delegatePlayback:b=!1,isPlaying:_,onPlay:E,index:C,navigationUrl:x,variant:S,isRestricted:A}){const T=f?r.Ru.get("artist.latest-release"):h,I=(0,d.V)(),N=v&&T?`${T} • `:T,w=A&&!I;return(0,p.jsx)(c.h,{menu:(0,p.jsx)(u.h,{uri:i,sharingInfo:g}),children:(0,p.jsx)(a.Z,{variant:S,onClick:y,featureIdentifier:"album",headerText:t,uri:i,index:C,delegatePlayback:b,isPlaying:_,onPlay:E,navigationUrl:x,renderCardImage:()=>(0,p.jsx)(s.M,{images:e}),renderSubHeaderContent:()=>(0,p.jsxs)(o.c,{children:[w&&(0,p.jsx)(l.$,{}),!!N&&(0,p.jsx)("time",{dateTime:(h||"").toString(),children:N}),v&&(0,m.C)(n)]})})})}))},13713:(e,t,i)=>{"use strict";i.d(t,{a:()=>p});var n=i(69725),r=i(11808),a=i(98584),s=i(2977),o=i(80227),l=i(95813),c=i(89807),u=i(71588),d=i(17202),m=i(86070);const p=e=>{const{name:t,uri:i,images:p,isHero:h,onClick:g,testId:f,index:v,requestId:y,color:b,variant:_}=e;let E;return E=h?(0,m.jsx)(l.A,{index:v,onClick:g,headerText:t,featureIdentifier:"artist",uri:i,renderCardImage:()=>(0,m.jsx)(s.M,{isHero:h,isCircular:!0,images:p,color:b,FallbackComponent:e=>(0,m.jsx)(n.r,{size:"xxlarge",...e})}),renderSubHeaderContent:()=>(0,m.jsx)(o.c,{isHero:!0,children:(0,m.jsx)(c.t,{children:r.Ru.get("card.tag.artist")})}),testId:f,requestId:y}):(0,m.jsx)(a.Z,{variant:_,index:v,onClick:g,headerText:t,featureIdentifier:"artist",uri:i,renderCardImage:()=>(0,m.jsx)(s.M,{isHero:h,isCircular:!0,images:p,color:b,FallbackComponent:e=>(0,m.jsx)(n.r,{size:"xxlarge",...e})}),renderSubHeaderContent:()=>(0,m.jsx)(o.c,{children:(0,m.jsx)("span",{children:r.Ru.get("card.tag.artist")})}),testId:f,requestId:y}),(0,m.jsx)(u.h,{menu:(0,m.jsx)(d.t,{uri:i}),children:E})}},33493:(e,t,i)=>{"use strict";i.d(t,{m:()=>u});var n=i(30758),r=i(12783),a=i(71588),s=i(17202),o=i(59996),l=i(45311),c=i(86070);const u=({artist:e,index:t,logger:i,spec:u})=>{const d=(0,n.useCallback)((()=>{i&&u&&i.logInteraction(u.cardLinkFactory({position:t}).hitUiNavigate({destination:e.uri}))}),[i,u,t,e.uri]);return(0,l.s)(e)&&e.uri?(0,c.jsx)(a.h,{menu:(0,c.jsx)(s.t,{uri:e.uri}),children:(0,c.jsx)(o.N,{to:e.uri,dir:"auto",onClick:d,children:e.name})},e.uri):(0,c.jsxs)(r.E,{variant:"bodySmall",children:[e.name," "]})}},12805:(e,t,i)=>{"use strict";i.d(t,{M:()=>x});var n=i(97500),r=i.n(n),a=i(12783),s=i(97675),o=i(92366),l=i(11808),c=i(98584),u=i(2977),d=i(80227),m=i(95813),p=i(89807),h=i(71588),g=i(71072),f=i(36921),v=i(15847);const y="udGpsOceE80fzjUaGxkU",b="wMX24UZ671wvuRJkkUOC";var _=i(86070);const E=({isPreRelease:e,publishDate:t})=>e&&t?("string"==typeof t&&(t=new Date(t)),(0,_.jsx)(a.E,{variant:"bodySmall",semanticColor:"textSubdued",children:(0,_.jsx)("span",{children:l.Ru.get("web-player.prerelease.releases_on",{date:l.Ru.formatDate((0,v.ad)(t.toISOString()),(0,v.s7)({month:"long",day:"numeric",year:"numeric"}))})})})):null,C=({signifierText:e})=>e?(0,_.jsx)(a.E,{as:"div",variant:"bodySmall",semanticColor:"textBrightAccent",children:e}):null,x=({name:e,uri:t,images:i,authorName:n,isHero:v,onClick:x,testId:S,index:A,requestId:T,isLocked:I=!1,color:N,signifierText:w,isPreRelease:R=!1,publishDate:k,variant:O})=>{let P;return P=v?(0,_.jsx)(m.A,{index:A,onClick:x,headerText:e,featureIdentifier:"audiobook",uri:t,isPlayable:!1,dragMimeType:f.fl.AUDIOBOOKS,renderCardImage:()=>(0,_.jsx)(u.M,{isHero:!0,images:i,color:N,FallbackComponent:e=>(0,_.jsx)(s.l,{size:"xxlarge",...e})}),renderSubHeaderContent:()=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(p.t,{children:l.Ru.get("card.tag.audiobook")}),(0,_.jsx)(a.E,{variant:"bodySmall",children:n})]}),getSignifierContent:()=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(E,{isPreRelease:R,publishDate:k}),(0,_.jsx)(C,{signifierText:w})]}),testId:S,requestId:T}):(0,_.jsx)(c.Z,{variant:O,index:A,onClick:x,headerText:e,featureIdentifier:"audiobook",uri:t,isPlayable:!1,dragMimeType:f.fl.AUDIOBOOKS,renderCardImage:()=>(0,_.jsx)(u.M,{images:i,color:N,FallbackComponent:e=>(0,_.jsx)(s.l,{size:"xxlarge",...e})}),renderSubHeaderContent:()=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(d.c,{lineClamp:w?1:2,children:[I&&(0,_.jsx)(o.y,{size:"small",className:y}),(0,_.jsx)(E,{isPreRelease:R,publishDate:k}),(0,_.jsx)(a.E,{as:"span",variant:"bodySmall",className:r()({[b]:R&&n}),children:n})]}),(0,_.jsx)(C,{signifierText:w})]}),testId:S,requestId:T}),(0,_.jsx)(h.h,{menu:(0,_.jsx)(g.p,{uri:t}),children:P})}},98584:(e,t,i)=>{"use strict";i.d(t,{Z:()=>R,_:()=>N});var n=i(30758),r=i(97500),a=i.n(r),s=i(9183),o=i(98768),l=i(84608),c=i(2512),u=i(81987),d=i(98632),m=i(61544),p=i(11808),h=i(20288),g=i(59996),f=i(82455),v=i(27685),y=i(67062),b=i(14627),_=i(80460),E=i(45346),C=i(19159),x=i(42582),S=i(72091),A=i(53209),T=i(58794),I=i(86070);let N=function(e){return e.Default="default",e.Compact="compact",e.Big="big",e}({});const w=e=>e.delegateNavigation?(0,I.jsx)(I.Fragment,{children:e.children}):(0,I.jsx)(g.N,{className:T.A.cardTitleWrapper,to:e.to,search:e.search,pathname:e.pathname,children:e.children}),R=({onClick:e=(()=>{}),delegatePlayback:t=!1,delegateLogging:i=!1,delegateNavigation:r=!1,playInsteadOfNavigating:g=!1,isPlaying:R,onPlay:k=(()=>{}),onContextMenu:O=(()=>{}),onTouchStart:P=(()=>{}),onTouchEnd:L=(()=>{}),featureIdentifier:j,uri:D,renderCardImage:M,renderSubHeaderContent:U=(()=>null),isPlayable:B=!0,isDownloadable:F=!1,headerText:H,hasNewEpisodeIndicator:V,className:G,playUri:z=D,albumURI:W,testId:K,ariaPlayLabel:Y,ariaPauseLabel:q,index:Z,navigationUrl:$,requestId:Q,dragMimeType:J,variant:X=N.Default})=>{const ee=X!==N.Compact&&"function"==typeof U,te=X===N.Compact?2:1,ie=(0,s.Zp)(),ne=(0,E.W)(),re=W?`?highlight=${D}`:"",ae=(0,u.NC)(C.wMq),{draggable:se,onDragStart:oe}=(0,b.P)({itemUris:[D],itemMimeTypes:J?[J]:[],dragLabelText:H}),{spec:le,logger:ce,UBIFragment:ue}=(0,S.r)(d.y,{data:{uri:D,position:Z,reason:Q??""}}),de=W||D,me=(0,m.o_)(de,{parseUnknown:!0}),pe=(0,_.W)({type:"link",uri:de}),{isPlaying:he,togglePlay:ge,isActive:fe}=(0,x.P)({uri:z},{featureIdentifier:j});let ve=he;t&&"boolean"==typeof R&&(ve=R);const ye=(0,n.useCallback)((()=>{let e=le.cardPlayButtonFactory().hitPause({itemToBePaused:D});ve||(e=fe?le.cardPlayButtonFactory().hitResume({itemToBeResumed:D}):le.cardPlayButtonFactory().hitPlay({itemToBePlayed:D}));const n=ce.logInteraction(e);if(k(D,n),i||ne({targetUri:D,intent:ve?"pause":"play",type:"click"}),t){if("function"!=typeof k)throw Error("No delegate playback handler provided")}else ge({loggingParams:n})}),[i,t,fe,ve,ce,ne,k,le,ge,D]),be=(0,n.useCallback)((()=>{ne({targetUri:D,intent:"navigate",type:"click"});const e=le.hitUiNavigate({destination:$??D});ce.logInteraction(e)}),[ce,$,ne,le,D]),_e=(0,n.useCallback)((()=>{if(e(D),g)return void ye();if(r)return;let t;be(),me&&(t=me.toURLPath(!0)+re);let i=$??t;i=pe?(0,A.hF)(i||""):i,i&&ie(i)}),[e,D,g,r,be,me,$,pe,ye,re,ie]);return(0,I.jsx)(ue,{spec:le,children:(0,I.jsx)(y.E,{uri:D,trigger:y.l.OnMouseDown,children:(0,I.jsx)(o.Z,{onContextMenu:O,onTouchStart:P,onTouchEnd:L,"":K,onDragStart:oe,className:a()(T.A.cardContainer,T.A.draggable,G,{[T.A.scrollAnimation]:ae}),id:`${D}-${Z}`,size:"md",variant:"naked",onClick:_e,title:(0,I.jsx)(w,{delegateNavigation:r,to:W??D,search:re,pathname:$,children:(0,I.jsxs)(l.Z,{variant:"ballad",lineClamp:te,title:H,className:T.A.cardTitle,onClick:_e,dir:"auto",children:[V&&(0,I.jsx)(f.Tc,{className:T.A.newEpisodeIndicator}),H]})}),subtitle:ee?(0,I.jsx)(c.j,{variant:"mesto",lineClamp:2,as:"div",dir:"auto",children:U(ce,le)}):void 0,draggable:se,trailing:F&&(0,I.jsx)(h.M,{uri:D,className:T.A.DownloadStatusIndicator,size:"small"}),media:(0,I.jsxs)("div",{className:T.A.imageContainer,children:[M(),B&&(0,I.jsx)("div",{className:a()(T.A.PlayButtonContainer,{[T.A.PlayButtonContainerVisible]:ve}),children:(0,I.jsx)(v.R,{isPlaying:ve,onClick:ye,ariaPlayLabel:Y??p.Ru.get("playlist.a11y.play",H),ariaPauseLabel:q??p.Ru.get("playlist.a11y.pause",H)})})]})})})})}},2977:(e,t,i)=>{"use strict";i.d(t,{M:()=>d});var n=i(97500),r=i.n(n),a=i(91494),s=i(57276),o=i(3554),l=i(50699),c=i(86070);const u=e=>(0,c.jsx)(a.e,{size:"xxlarge",...e}),d=e=>{const{children:t,isHero:i=!1,isCircular:n=!1,FallbackComponent:a=u,images:d=[],color:m,desiredSize:p=300,desiredLabel:h="standard",loadingMode:g="lazy",is1DCardHeader:f=!1}=e,v=(0,o.g)(d,{desiredSize:p,desiredLabel:h}),y={"--card-color":m};return(0,c.jsx)("div",{className:r()(l.A.imageWrapper,{[l.A.hero]:i,[l.A.circular]:n}),style:y,children:(0,c.jsxs)("div",{children:[(0,c.jsx)(s._,{className:r()(l.A.image,{[l.A.circular]:n,[l.A.headerImage]:f}),src:v?.url,loading:g,testid:"card-image",fadeIn:!0,children:a&&(0,c.jsx)("div",{className:l.A.imagePlaceholder,children:(0,c.jsx)(a,{"aria-hidden":!0,"":"card-image-fallback"})})}),t]})})}},80227:(e,t,i)=>{"use strict";i.d(t,{c:()=>m});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783);const o="i6jA7UnVNDJFGlAgtutp",l="LaSOZAQLcR1DzFgdKrUx",c="JS9WYvoqyy3vUXqMt5Hv",u="qZH56jw74skju8uLzuF3";var d=i(86070);const m=n.memo((function({isHero:e,children:t,lineClamp:i=2}){return(0,d.jsx)(s.E,{as:"div",variant:"bodySmall",className:a()(o,{[u]:e,[l]:1===i,[c]:2===i}),semanticColor:"textSubdued",children:t})}))},62952:(e,t,i)=>{"use strict";i.d(t,{U:()=>D});var n=i(30758),r=i(37985),a=i(12783),s=i(11808),o=i(98584),l=i(2977),c=i(80227),u=i(97500),d=i.n(u);const m="SlbzF58tYfJdBqTpDBZE",p="VFWaXWtN61bTc_4UOexe",h="C3sIZDdL9EfwMJcSgl8t";var g=i(86070);const f=({children:e})=>(0,g.jsx)("span",{className:m,children:e}),v=e=>(0,g.jsx)("span",{className:d()(e.className,p,{[h]:e.noSeparator}),children:e.children});var y=i(73671),b=i(34471);const _="GSY8YnDV4YNR_W53fPhi",E="dQYtZdjVyebpK221a_JU",C=(0,n.memo)((function(e){const{src:t,description:i,...r}=e,[s,o]=(0,n.useState)("inherit");return(0,n.useEffect)((()=>{t&&async function(e){const{colorRaw:t}=await(0,b.extractColors)(e),{h:i,s:n,l:r}=t.hsl,a=`hsl(${360*i}, ${100*n}%, ${Math.min(100*r,30)}%)`;o(a)}(t)}),[t]),t?(0,g.jsx)("div",{className:_,style:{backgroundColor:s},"":"episode-fallback-image-container",children:(0,g.jsx)("div",{className:E,children:(0,g.jsx)(a.E,{as:"p",variant:"titleSmall",children:i})})}):(0,g.jsx)(y.L,{...r,size:"xxlarge"})}));var x=i(95813),S=i(89807),A=i(71588),T=i(58345),I=i(38916),N=i(53129),w=i(82455),R=i(14627),k=i(58237),O=i(78074),P=i(15847),L=i(3554);const j="Qb8_f8zfu_KeMGbDtEOO",D=({description:e,isExplicit:t,images:i,name:u,uri:d,durationMilliseconds:m,releaseDate:p,resume_point:h,showImages:y,sharingInfo:b,is19PlusOnly:_,isHero:E,onClick:D,testId:M,index:U,requestId:B,color:F,episodeShow:H,variant:V})=>{let G;const z=p?new Date(p):void 0,W=z&&!isNaN(z.getTime())&&!isNaN(m),K=(0,L.g)(y,{desiredSize:48}),Y=(0,w.hD)(d,z?.toISOString(),h?.resume_position_ms,h?.fully_played),q=H?.uri||"",{draggable:Z,onDragStart:$}=(0,R.P)({itemUris:[q],dragLabelText:H?.name}),Q=(0,n.useCallback)((()=>{D?.(q)}),[D,q]);return G=E?(0,g.jsx)(x.A,{index:U,onClick:D,headerText:u,featureIdentifier:"episode",uri:d,isPlayable:!0,isDownloadable:!0,hasNewEpisodeIndicator:Y,renderCardImage:()=>(0,g.jsx)(l.M,{isHero:!0,images:i,color:F,FallbackComponent:t=>(0,g.jsx)(C,{...t,description:e,src:K&&K.url})}),renderSubHeaderContent:()=>(0,g.jsx)(c.c,{isHero:!0,children:(0,g.jsxs)(f,{children:[t&&!_&&(0,g.jsx)(v,{className:j,noSeparator:!0,children:(0,g.jsx)(k.g,{})}),_&&(0,g.jsx)(v,{className:j,noSeparator:!0,children:(0,g.jsx)(O.q,{size:16})}),(0,g.jsx)(v,{children:(0,g.jsx)(S.t,{children:s.Ru.get("card.tag.episode")})}),W&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(v,{children:(0,P.gD)(z)}),(0,g.jsx)(v,{children:s.Ru.get("episode.length",Math.ceil(m/6e4))})]}),H&&(0,g.jsx)(v,{children:(0,g.jsx)(N.Zp,{label:H?.name,showDelay:N.uF,children:(0,g.jsx)(a.E,{as:"span",children:(0,g.jsx)(A.h,{menu:(0,g.jsx)(I.H,{uri:q}),children:(0,g.jsx)(r.N_,{draggable:Z,to:q,onDrag:$,dir:"auto",onClick:Q,children:H?.name})})})})})]})}),testId:M,requestId:B}):(0,g.jsx)(o.Z,{variant:V,index:U,onClick:D,headerText:u,featureIdentifier:"episode",uri:d,isPlayable:!0,isDownloadable:!0,hasNewEpisodeIndicator:Y,renderCardImage:()=>(0,g.jsx)(l.M,{images:i,color:F,FallbackComponent:t=>(0,g.jsx)(C,{...t,description:e,src:K&&K.url})}),renderSubHeaderContent:()=>(0,g.jsxs)(c.c,{children:[t&&!_&&(0,g.jsx)(v,{className:j,noSeparator:!0,children:(0,g.jsx)(k.g,{})}),_&&(0,g.jsx)(v,{className:j,noSeparator:!0,children:(0,g.jsx)(O.q,{size:16})}),W&&(0,g.jsxs)(f,{children:[(0,g.jsx)(v,{children:(0,P.gD)(z)}),(0,g.jsx)(v,{children:s.Ru.get("episode.length",Math.ceil(m/6e4))})]})]}),testId:M,requestId:B}),(0,g.jsx)(A.h,{menu:(0,g.jsx)(T.b,{uri:d,sharingInfo:b}),children:G})}},95813:(e,t,i)=>{"use strict";i.d(t,{A:()=>L});var n=i(30758),r=i(97500),a=i.n(r),s=i(9183),o=i(98632),l=i(61544),c=i(12783),u=i(21953),d=i(59996),m=i(82455);const p="XLAiqekZxk4Z7Nok9a58",h="A49BHvl5C1wTQ0ZGCq6V",g="Jiy7CZomKxCOUMtOMwF_";var f=i(86070);const v=n.memo((function({search:e,children:t,to:i,onClick:n,isHero:r,title:a,hasNewEpisodeIndicator:s=!1,navigationUrl:o,disableLink:l=!1}){const v=r?"titleMedium":"bodyMediumBold",y=(0,f.jsxs)(c.E,{as:"div",variant:v,className:h,paddingBottom:u.vw,semanticColor:"textBase",children:[s&&(0,f.jsx)(m.Tc,{className:g}),t]});return l?y:(0,f.jsx)(d.N,{to:i,onClick:n,title:a,className:p,dir:"auto",search:e,pathname:o,children:y})}));var y=i(80227),b=i(20288),_=i(27685),E=i(14627),C=i(80460),x=i(45346),S=i(42582),A=i(72091),T=i(53209);const I="mXNT9H2GU7lDW4cGx0q1",N="ouEZqTcvcvMfvezimm_J",w="pueeb339I8KrXZr0SDm1",R="cofBW8sjoBtMAmzDgqKt",k="Ykx_9AV9dI9vTLVV2b7h",O="NI1OxoVdokxENPAjoeOk",P="eUHZjKB8k8xrDIVk_cy9",L=e=>{const{onClick:t=(()=>{}),onContextMenu:i=(()=>{}),onTouchStart:r=(()=>{}),onTouchEnd:c=(()=>{}),delegatePlayback:u=!1,delegateLogging:d=!1,delegateNavigation:m=!1,playInsteadOfNavigating:p=!1,isPlaying:h,onPlay:g=(()=>{}),featureIdentifier:L,uri:j,renderCardImage:D,renderSubHeaderContent:M=(()=>null),isPlayable:U=!0,isDownloadable:B=!1,headerText:F,hasNewEpisodeIndicator:H=!1,className:V,playUri:G=j,albumURI:z,testId:W,ariaPlayLabel:K,ariaPauseLabel:Y,index:q,requestId:Z,dragMimeType:$,getSignifierContent:Q=(()=>null)}=e,J=(0,s.Zp)(),X=(0,x.W)(),ee=z?`?highlight=${j}`:"",te=z||j,ie=(0,C.W)({type:"link",uri:te}),{draggable:ne,onDragStart:re}=(0,E.P)({itemUris:[j],itemMimeTypes:$?[$]:[],dragLabelText:F}),ae=(0,n.useCallback)((e=>{e.target===e.currentTarget&&re(e)}),[re]),{spec:se,logger:oe,UBIFragment:le}=(0,A.r)(o.y,{data:{uri:j,position:q,reason:Z??""}}),{isPlaying:ce,isActive:ue,togglePlay:de}=(0,S.P)({uri:G},{featureIdentifier:L});let me=ce;u&&"boolean"==typeof h&&(me=h);const pe=(0,n.useCallback)((()=>{let e=se.cardPlayButtonFactory().hitPause({itemToBePaused:j});me||(e=ue?se.cardPlayButtonFactory().hitResume({itemToBeResumed:j}):se.cardPlayButtonFactory().hitPlay({itemToBePlayed:j}));const t=oe.logInteraction(e);if(g(j,t),d||X({targetUri:j,intent:me?"pause":"play",type:"click"}),u){if("function"!=typeof g)throw Error("No delegate playback handler provided")}else de({loggingParams:t})}),[d,u,ue,me,oe,X,g,se,de,j]),he=(0,n.useCallback)((()=>{X({targetUri:j,intent:"navigate",type:"click"});const e=se.hitUiNavigate({destination:j});oe.logInteraction(e)}),[oe,X,se,j]),ge=(0,n.useCallback)((()=>{if(t(j),p)return void pe();if(m)return;he();const e=(0,l.o_)(te).toURLPath(!0),i=ie?(0,T.hF)(`${e}${ee}`):`${e}${ee}`;J(i)}),[t,j,p,m,he,te,ie,ee,J,pe]);return(0,f.jsx)(le,{spec:se,children:(0,f.jsx)("div",{className:a()(I,V),onContextMenu:i,onTouchStart:r,onTouchEnd:c,"":W,children:(0,f.jsxs)("div",{draggable:ne,onDragStart:ae,className:w,children:[D(),(0,f.jsxs)("div",{className:R,children:[(0,f.jsx)(v,{to:z||j,search:ee,onClick:he,isHero:!0,title:F,hasNewEpisodeIndicator:H,children:F}),M?(0,f.jsx)(y.c,{isHero:!0,children:M(oe,se)}):null,Q()]}),B&&(0,f.jsx)(b.M,{uri:j,className:k,size:"small"}),U&&(0,f.jsx)("div",{className:a()(O,{[P]:me}),children:(0,f.jsx)(_.R,{isPlaying:me,onClick:pe,ariaPlayLabel:K,ariaPauseLabel:Y})}),(0,f.jsx)("div",{onClick:ge,className:N,"":"herocard-click-handler"})]})})})}},89807:(e,t,i)=>{"use strict";i.d(t,{t:()=>s});var n=i(12783);const r="hSL9Sb4ko4GNvUVuPQOw";var a=i(86070);const s=({semanticColor:e,children:t})=>t?(0,a.jsx)(n.E,{variant:"bodySmall",semanticColor:e,className:r,children:t}):null},33779:(e,t,i)=>{"use strict";i.d(t,{B:()=>E});var n=i(30758),r=i(91494),a=i(12783),s=i(11808),o=i(98584),l=i(2977),c=i(80227),u=i(95813),d=i(89807),m=i(71588),p=i(40440),h=i(91584),g=i(59996),f=i(2983),v=i(10608),y=i(29159),b=i(86070);const _=(e,t)=>(i,n)=>{n&&e.logInteraction(t.cardLinkFactory({position:0}).hitUiNavigate({destination:n}))},E=({name:e,uri:t,images:i,description:E,authorName:C,authorUri:x,isHero:S=!1,onClick:A=(()=>{}),testId:T,index:I,requestId:N,color:w,isPlayable:R,variant:k})=>{let O,P=(0,b.jsx)(p.W,{uri:t}),L=R,j=!1;const D=x||"",M=(0,n.useCallback)((()=>{A?.(D)}),[A,D]);return(0,v.c0)(t)&&(L=!0,P=(0,b.jsx)(f.gb,{}),j=!0),O=S?(0,b.jsx)(u.A,{index:I,onClick:A,headerText:e,featureIdentifier:"playlist",uri:t,isDownloadable:!0,playInsteadOfNavigating:j,renderCardImage:()=>(0,b.jsx)(l.M,{isHero:!0,images:i,color:w,FallbackComponent:e=>(0,b.jsx)(r.e,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,t)=>(0,b.jsxs)(c.c,{isHero:!0,children:[(0,b.jsx)(d.t,{children:s.Ru.get("card.tag.playlist")}),E?(0,b.jsx)(y.N,{source:E,LinkComponent:g.N,onLinkClick:_(e,t)}):C&&x&&(0,b.jsx)(m.h,{menu:(0,b.jsx)(h.B,{uri:D}),children:(0,b.jsx)(a.E,{variant:"bodySmall",children:(0,b.jsx)(g.N,{to:D,onClick:M,children:C})})})]}),testId:T,requestId:N,isPlayable:L}):(0,b.jsx)(o.Z,{variant:k,index:I,onClick:A,headerText:e,featureIdentifier:"playlist",uri:t,isDownloadable:!0,playInsteadOfNavigating:j,renderCardImage:()=>(0,b.jsx)(l.M,{images:i,color:w,FallbackComponent:e=>(0,b.jsx)(r.e,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,t)=>(0,b.jsx)(c.c,{children:E?(0,b.jsx)(y.N,{source:E,LinkComponent:g.N,onLinkClick:_(e,t)}):C&&(0,b.jsx)("span",{children:s.Ru.get("search.playlist-by",C)})}),testId:T,requestId:N,isPlayable:L}),(0,b.jsx)(m.h,{menu:P,children:O})}},24633:(e,t,i)=>{"use strict";i.d(t,{a:()=>h});var n=i(30758),r=i(69725),a=i(11808),s=i(98584),o=i(2977),l=i(80227),c=i(95813),u=i(89807),d=i(71588),m=i(91584),p=i(86070);const h=n.memo((function({images:e,name:t,uri:i,onClick:h,isHero:g,testId:f,index:v,requestId:y,color:b,variant:_}){let E;const C=(0,n.useCallback)((()=>(0,p.jsx)(o.M,{isCircular:!0,isHero:g,images:e,color:b,FallbackComponent:e=>(0,p.jsx)(r.r,{size:"xxlarge",...e})})),[b,e,g]),x=(0,n.useCallback)((()=>(0,p.jsx)(l.c,{isHero:g,children:g?(0,p.jsx)(u.t,{children:a.Ru.get("card.tag.profile")}):a.Ru.get("card.tag.profile")})),[g]);return E=g?(0,p.jsx)(c.A,{index:v,onClick:h,headerText:t,featureIdentifier:"profile",uri:i,isPlayable:!1,renderCardImage:C,renderSubHeaderContent:x,testId:f,requestId:y}):(0,p.jsx)(s.Z,{variant:_,index:v,onClick:h,headerText:t,featureIdentifier:"profile",uri:i,isPlayable:!1,renderCardImage:C,renderSubHeaderContent:x,testId:f,requestId:y}),(0,p.jsx)(d.h,{menu:(0,p.jsx)(m.B,{uri:i}),children:E})}))},67613:(e,t,i)=>{"use strict";i.d(t,{$:()=>s});var n=i(88952);const r="m0QxD0cLU3Jpd338szjv";var a=i(86070);const s=()=>(0,a.jsx)(n.u,{className:r,size:"xsmall",semanticColor:"textBase"})},98105:(e,t,i)=>{"use strict";i.d(t,{o:()=>p});var n=i(11808),r=i(98584),a=i(2977),s=i(80227),o=i(95813),l=i(89807),c=i(71588),u=i(38916),d=i(54443),m=i(86070);const p=({images:e,name:t,uri:i,publisher:p,sharingInfo:h,mediaType:g,isHero:f=!1,onClick:v,testId:y,index:b,requestId:_,color:E,variant:C})=>{let x;const S=g===d.Q.MIXED?n.Ru.get("type.show"):n.Ru.get("card.tag.show");return x=f?(0,m.jsx)(o.A,{index:b,onClick:v,delegatePlayback:!0,headerText:t,featureIdentifier:"show",uri:i,isPlayable:!1,renderCardImage:()=>(0,m.jsx)(a.M,{isHero:!0,images:e,color:E}),renderSubHeaderContent:()=>(0,m.jsxs)(s.c,{isHero:!0,children:[(0,m.jsx)(l.t,{children:S}),p&&(0,m.jsx)("span",{children:p})]}),testId:y,requestId:_}):(0,m.jsx)(r.Z,{variant:C,onClick:v,isPlayable:!1,delegatePlayback:!0,headerText:t,featureIdentifier:"show",uri:i,index:b,renderCardImage:()=>(0,m.jsx)(a.M,{isHero:f,images:e,color:E}),renderSubHeaderContent:()=>(0,m.jsx)(s.c,{children:p&&(0,m.jsx)("span",{children:p})}),testId:y,requestId:_}),(0,m.jsx)(c.h,{menu:(0,m.jsx)(u.H,{uri:i,sharingInfo:h}),children:x})}},42674:(e,t,i)=>{"use strict";i.d(t,{M:()=>b,u:()=>y});var n=i(30758),r=i(97500),a=i.n(r),s=i(98584),o=i(5780),l=i(57920),c=i(58794),u=i(50699);const d="B3NcOBJt_x6GdEDzdMX4",m="cwkCVR8XspK0RXEmmHqW",p="CFjzd1Z8fj7reHf6vhG8",h="oQ4jLC_wmDT4a46KRq9P",g="Lvk9XE_3mFINTyLzY_Nr";var f=i(86070);const v=(0,n.memo)((({isLoading:e})=>{const t=(0,l.h)("shimmer");return(0,f.jsx)("div",{ref:t,className:a()(u.A.imageWrapper,{[h]:e})})})),y=(0,n.memo)((({cardImage:e,isLoading:t,variant:i})=>(0,f.jsxs)("div",{className:a()(c.A.card,d),"aria-hidden":!0,"":"skeleton-card",children:[(0,f.jsx)("div",{className:a()(c.A.imageContainer,c.A.imageContainerSkeleton),children:e||(0,f.jsx)(v,{isLoading:t})}),(0,f.jsxs)("div",{className:c.A.cardMetadata,children:[(0,f.jsx)(o.Y,{as:"div",variant:"bodyMediumBold",className:m,charCount:15,isLoading:t}),i!==s._.Compact&&(0,f.jsx)(o.Y,{as:"div",variant:"bodySmall",className:p,charCount:10,isLoading:t})]})]}))),b=(0,n.memo)((({isLoading:e})=>(0,f.jsx)("div",{className:a()(d,g),"aria-hidden":!0,"":"skeleton-big-card",children:(0,f.jsx)(o.Y,{as:"div",isLoading:e,className:g})})))},48511:(e,t,i)=>{"use strict";i.d(t,{w:()=>E});var n=i(11808),r=i(98584),a=i(2977),s=i(80227),o=i(95813),l=i(89807),c=i(71588),u=i(48100),d=i(15739),m=i(9813),p=i(54687),h=i(8031),g=i(58237),f=i(78074),v=i(94672);const y="UHjdTucjadSs9x3SjoAp",b="iHomw25Q7DDHLVQxfgNW";var _=i(86070);const E=({name:e,uri:t,images:i,album:E,artists:C,isExplicit:x,is19PlusOnly:S,isHero:A=!1,onClick:T,testId:I,index:N,requestId:w,isLyricsMatch:R,color:k,hasAssociatedVideo:O,variant:P})=>{let L;const{badges:j,hasBadges:D}=(0,v.b)({isExplicit:x,isMOGEFRestricted:S,hasAssociatedVideo:O});return L=A?(0,_.jsx)(o.A,{index:N,onClick:T,headerText:e,featureIdentifier:"track",uri:t,albumURI:E?.uri,renderCardImage:()=>(0,_.jsx)(a.M,{isHero:!0,images:i,color:k}),renderSubHeaderContent:()=>(0,_.jsxs)(s.c,{isHero:!0,children:[D&&(0,_.jsxs)(m.P,{children:[j.explicit&&(0,_.jsx)(g.g,{}),j.nineteen&&(0,_.jsx)(f.q,{className:y,size:16}),j.hasAssociatedVideo&&(0,_.jsx)(p.l,{})]}),(0,_.jsx)(l.t,{children:n.Ru.get("card.tag.track")}),(0,_.jsx)(d.l,{artists:C,className:b}),R&&(0,_.jsx)(h.G,{})]}),testId:I,requestId:w}):(0,_.jsx)(r.Z,{variant:P,index:N,onClick:T,headerText:e,featureIdentifier:"track",uri:t,albumURI:E?.uri,renderCardImage:()=>(0,_.jsx)(a.M,{images:i,color:k}),renderSubHeaderContent:()=>(0,_.jsxs)(s.c,{children:[x&&!S&&(0,_.jsx)(g.g,{className:y}),S&&(0,_.jsx)(f.q,{size:16,className:y}),(0,_.jsx)(d.l,{artists:C,className:b}),R&&(0,_.jsx)(h.G,{})]}),testId:I,requestId:w}),(0,_.jsx)(c.h,{menu:(0,_.jsx)(u.P,{uri:t,artists:C,albumUri:E?.uri}),children:L})}},9783:(e,t,i)=>{"use strict";i.d(t,{O:()=>z});var n=i(30758),r=i(97500),a=i.n(r),s=i(41978),o=i(1256),l=i(94526),c=i(98768),u=i(84608),d=i(2512),m=i(88482),p=i(81987),h=i(98632),g=i(11808),f=i(97393),v=i(39796),y=i(71588),b=i(11098),_=i(15739),E=i(38273),C=i(19159),x=i(58237),S=i(78074),A=i(14403),T=i(28004),I=i(42582),N=i(99744),w=i(48905),R=i(72091),k=i(71817),O=i(94672);const P="ak6gYegwMkcNWd6xPIy5",L="cKtgEwzPvLoFLbM2op0D",j="d42g9OybmMicQKsRF86I",D="XVySLcfMggFYO3c9HYKs",M="DPmEbaBR_rtvwGSuWCXT",U="nbujTuv5mDum1zNR8wfh",B="VhA41F8smbkebJG9jYiy",F="LtcBzRcDxuIVYfjr7yt1",H="iXKaEy6qo9NvVG87pXJl";var V=i(86070);const G="song_videos",z=({className:e,title:t,trackUri:i,artists:r,album:z,contentRating:W,index:K,hoverBackgroundColor:Y,contentAlign:q,size:Z="md",referrerIdentifier:$})=>{const Q=(0,s.wA)(),J=(0,N.z)(),{isPlaying:X,togglePlay:ee,isActive:te}=(0,I.P)({uri:i},{featureIdentifier:G}),ie=(0,p.NC)(C.J1t,{loadingValue:!1}),{activeDevice:ne}=(0,A.v)((e=>({activeDevice:e.activeDevice}))),re=ne&&!ne.isLocal&&!(null===ne.supportedMediaTypes||ne.supportedMediaTypes.has(T.Bd.Video)),ae=(0,p.NC)(C.b2),se=(0,p.NC)(C.wl5),oe=(0,p.NC)(C.ZoB),{spec:le,logger:ce}=(0,R.r)(h.y,{data:{position:K,uri:i,reason:"related-videos-card"}}),ue=X?(0,V.jsx)(o._,{size:"large",width:36}):(0,V.jsx)(l.A,{size:"large",width:36}),{badges:de,hasBadges:me}=(0,O.b)({contentRating:W?.label}),pe=(0,n.useCallback)((()=>{const e=le.cardPlayButtonFactory().hitPlay({itemToBePlayed:i});ce.logInteraction(e);const t=()=>J.play({uri:i},{featureIdentifier:G,referrerIdentifier:$});return ae&&"home"===$||se&&"now_playing_panel"===$||oe?ie&&re?new Promise((e=>{Q(E.ug.actions.open({onCancel:()=>{e()},onConfirm:()=>{e(t())}}))})):t():J.playAsNextInQueue([{uri:i,type:k.c.TRACK,uid:null,provider:""}])}),[le,i,ce,ae,$,se,oe,J,ie,re,Q]),he=(0,n.useCallback)((()=>{if(te){let e=le.cardPlayButtonFactory().hitPause({itemToBePaused:i});X||(e=le.cardPlayButtonFactory().hitResume({itemToBeResumed:i}));const t=ce.logInteraction(e);return ee({loggingParams:t}),Promise.resolve()}return pe()}),[te,pe,le,i,X,ce,ee]),ge=(0,w.t)(le);return(0,V.jsx)(y.h,{menu:(0,V.jsx)(b.o,{uri:i,albumUri:z?.uri,artists:[{name:r[0].profile.name,uri:r[0].uri}]}),children:(0,V.jsx)(c.Z,{contentAlign:q,className:a()(M,e),variant:"naked",id:i,size:Z,hoverBackgroundColor:Y,title:(0,V.jsx)(u.Z,{variant:"ballad",lineClamp:1,title:t,dir:"auto",children:t}),subtitle:(0,V.jsx)(d.j,{variant:"mesto",lineClamp:1,as:"div",dir:"auto",semanticColor:"textSubdued",children:(0,V.jsxs)("div",{className:B,children:[me&&(0,V.jsxs)(V.Fragment,{children:[de.explicit&&(0,V.jsx)(x.g,{className:H}),de.nineteen&&(0,V.jsx)(S.q,{className:H})]}),(0,V.jsx)(_.l,{artists:r.map((e=>({uri:e.uri,name:e.profile.name}))),className:F})]})}),media:(0,V.jsxs)("div",{className:D,children:[(0,V.jsx)("div",{className:a()(L),children:(0,V.jsx)("div",{className:a()(j),children:ue})}),(0,V.jsx)(m._,{src:z?.coverArt?.sources[0].url,className:P})]}),onClick:he,trailing:(0,V.jsx)(v.b,{menu:(0,V.jsx)(b.o,{uri:i,albumUri:z?.uri,artists:[{name:r[0].profile.name,uri:r[0].uri}]}),children:(0,V.jsx)(f.e,{size:f.M.xs,label:g.Ru.get("more.label.context",t),className:U})}),ref:ge})})}},60765:(e,t,i)=>{"use strict";i.d(t,{F:()=>S});var n=i(30758),r=i(97500),a=i.n(r),s=i(89732),o=i(62473);function l(){const e=(0,n.useRef)(0);return(0,n.useCallback)((t=>{const i=t.currentTarget,n=i.style.scrollBehavior;let r=!1;const a=i.scrollLeft,s=t.clientX;let o=0;function l(){cancelAnimationFrame(e.current),document.removeEventListener("wheel",c)}function c(){l(),i.style.scrollBehavior=n}function u(){i.scrollLeft+=o,o*=.95,Math.abs(o)>.5?e.current=requestAnimationFrame(u):c()}i.style.userSelect="none",i.style.scrollBehavior="auto",l();const d=e=>{const t=e.clientX-s;Math.abs(t)>10&&(r=!0);const n=i.scrollLeft;i.scrollLeft=a-t,o=i.scrollLeft-n};document.addEventListener("mousemove",d),document.addEventListener("mouseup",(()=>{const t=e=>{e.preventDefault(),e.stopImmediatePropagation()};!0===r&&(i.addEventListener("click",t,{once:!0,capture:!0}),setTimeout((()=>{i.removeEventListener("click",t,{capture:!0})}))),i.style.removeProperty("user-select"),document.removeEventListener("mousemove",d),l(),e.current=requestAnimationFrame(u),document.addEventListener("wheel",c,{once:!0})}),{once:!0})}),[])}var c=i(43396),u=i(24359),d=i(26969);const m="search-searchCategory-contentArea",p="search-searchCategory-catergoryGrid",h="MUloQuW1xQawwVs0mDp4",g="OlnSvEViCZ_vVdnc3mSQ",f="FjMPyh7lOujDVYQRvp0H",v="search-searchCategory-carousel",y="search-searchCategory-carouselButton",b="search-searchCategory-carouselButtonVisible";var _=i(86070),E=function(e){return e[e.LEFT=-1]="LEFT",e[e.RIGHT=1]="RIGHT",e}(E||{});function C(e,t,i){(0,u.MS)(e,t),function(e,t){const i=e.offsetLeft,n=e.offsetWidth,r=i+n,a=t.scrollLeft,s=t.offsetWidth;(a>0||(a+s)/2<=r)&&t.scroll({left:n/2+i-s/2})}(t,i)}function x(e,t){const i=e.querySelector('[tabindex="0"]')||e.firstElementChild;if(i&&i instanceof HTMLElement)if(t===E.RIGHT){if(document.activeElement===e||!i.nextElementSibling)return void C(i,e.querySelector("a[href], button")??e,e);i.nextElementSibling instanceof HTMLElement&&C(i,i.nextElementSibling,e)}else if(t===E.LEFT){if(document.activeElement===e||!i.previousElementSibling){const t=e.querySelectorAll("a[href], button");if(!t||!t.length)return;return void C(i,t[t.length-1]??e,e)}if(i.previousElementSibling instanceof HTMLElement)return void C(i,i.previousElementSibling,e)}}const S=e=>{const{children:t,className:i,showButtons:r=!0,ariaLabel:u,applyLightThemeControls:C=!1}=e,S=(0,n.useRef)(null),A=(0,n.useRef)(null),[T,I]=(0,n.useState)(!1),[N,w]=(0,n.useState)(!1),R=(0,n.useCallback)((()=>{if(!S.current||!A.current)return;const e=S.current,t=A.current,i=e.scrollWidth-e.clientWidth,n=Math.abs(e.scrollLeft),r=n<1?Math.floor(n):Math.ceil(n),a=t.offsetWidth>e.clientWidth;w(a&&0!==r),I(a&&r<i)}),[]);(0,d.w)({refOrElement:A,observeOnly:"width",onResize:R}),(0,d.w)({refOrElement:S,observeOnly:"width",onResize:R});const k=n.Children.toArray(t).length;(0,n.useLayoutEffect)(R,[k,R]);const O=(0,n.useCallback)((e=>{const t=e*(S.current.clientWidth/2);S.current.scrollBy({left:t}),R()}),[R]),P=(0,c.W)(),L=(0,n.useCallback)((e=>{"ArrowLeft"===e.key?(e.preventDefault(),x(S.current,P?E.RIGHT:E.LEFT)):"ArrowRight"===e.key&&(e.preventDefault(),x(S.current,P?E.LEFT:E.RIGHT))}),[P]),j=P?T:N,D=P?N:T,M=r&&(j||D),U=l(),B=function(){const e=(0,n.useRef)(!0),t=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)((n=>{if(!n.deltaY)return;const r=n.currentTarget;e.current&&(e.current=!1,t.current=r.style.scrollBehavior,r.style.scrollBehavior="auto"),r.scrollLeft+=n.deltaY+n.deltaX,i.current&&clearTimeout(i.current),i.current=setTimeout((()=>{e.current=!0,r.style.scrollBehavior=t.current??""}),100)}),[])}();return(0,_.jsxs)("div",{className:a()(m,i),children:[(0,_.jsx)("div",{ref:S,className:a()(p,{[g]:D&&!j,[h]:j&&!D,[f]:j&&D}),onScroll:R,onKeyDown:L,onMouseDown:U,onWheel:B,role:"list","aria-label":u,tabIndex:0,children:(0,_.jsx)("div",{ref:A,role:"presentation",children:t})}),M&&(0,_.jsxs)("div",{className:a()(v,{"encore-light-theme":C}),dir:"ltr",children:[(0,_.jsx)("button",{className:a()(y,{[b]:j}),tabIndex:-1,onClick:()=>O(E.LEFT),"aria-hidden":"true",children:(0,_.jsx)(s.g,{autoMirror:!1,semanticColor:"textBase",size:"small"})}),(0,_.jsx)("button",{className:a()(y,{[b]:D}),tabIndex:-1,onClick:()=>O(E.RIGHT),"aria-hidden":"true",children:(0,_.jsx)(o.V,{autoMirror:!1,semanticColor:"textBase",size:"small"})})]})]})}},76174:(e,t,i)=>{"use strict";i.d(t,{T:()=>g});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(30171),l=i(43830),c=i(67889);const u="main-confirmDialog-container",d="main-confirmDialog-overlay",m="main-confirmDialog-buttonContainer",p="main-confirmDialog-button";var h=i(86070);const g=(0,n.forwardRef)((({onClose:e=(()=>{}),onOutside:t,isOpen:i=!0,titleText:n,descriptionText:r,cancelText:g,confirmText:f,confirmLabel:v,onConfirm:y,allowHTML:b=!1,shouldCloseOnEsc:_=!0,shouldCloseOnOverlayClick:E=!0,shouldFocusAfterRender:C=!0,...x},S)=>(0,h.jsx)(c.A,{animated:!0,shouldCloseOnEsc:_,shouldCloseOnOverlayClick:E,overlayClassName:d,onRequestClose:t??e,contentLabel:x["aria-label"],isOpen:i,shouldFocusAfterRender:C,...x,children:(0,h.jsxs)("div",{ref:S,className:a()("encore-light-theme",u),children:[(0,h.jsx)(s.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:n}),r&&(b?(0,h.jsx)(s.E,{as:"p",variant:"bodySmall",semanticColor:"textBase",dangerouslySetInnerHTML:{__html:r},"":"confirm-dialog-description"}):(0,h.jsx)(s.E,{as:"p",variant:"bodySmall",semanticColor:"textBase","":"confirm-dialog-description",children:r})),(0,h.jsxs)("div",{className:m,children:[g&&(0,h.jsx)(o.H,{onClick:e,semanticColor:"textBase",className:p,children:g}),(0,h.jsx)(l.$,{"aria-label":v,autoFocus:!0,onClick:y,className:p,children:f})]})]})})))},90250:(e,t,i)=>{"use strict";i.d(t,{n:()=>b});var n=i(61544),r=i(11808),a=i(10642),s=i(59996),o=i(63135),l=i(82101),c=i(95421),u=i(95339),d=i(46159),m=i(36485),p=i(86070);const h=({item:e,onClick:t})=>(0,p.jsx)(p.Fragment,{children:e.artists.map(((i,a)=>{const o=(0,n.o_)(i.uri)?.toURLPath(!0);return(0,p.jsxs)("span",{children:[a>0?r.Ru.getSeparator():null,o?(0,p.jsx)(s.N,{to:o,"":`context-item-info-${e.type}`,dir:"auto",onClick:t,children:i.name}):(0,p.jsx)("span",{dir:"auto",children:i.name})]},a)}))}),g=({item:e,onClick:t})=>{const{show:i}=e,r=(0,n.o_)(i.uri)?.toURLPath(!0);return r?(0,p.jsx)(s.N,{to:r,"":"context-item-info-show",dir:"auto",onClick:t,children:i.name}):(0,p.jsx)("span",{dir:"auto",children:i.name})},f=({item:e,onClick:t})=>{const{book:i}=e,r=(0,n.o_)(i.uri)?.toURLPath(!0);return r?(0,p.jsx)(s.N,{to:r,"":"context-item-info-book",dir:"auto",onClick:t,children:i.name}):(0,p.jsx)("span",{dir:"auto",children:i.name})},v={"":"context-item-info-ad-subtitle"},y=({item:e,onClick:t})=>{const i=(0,a.iz)(e);return i.url?(0,p.jsx)("a",{...v,onClick:e=>{t?.(e,i.url||void 0)},href:i.url??void 0,rel:"noopener noreferrer",target:"_blank",dir:"auto",children:i.subtitle}):(0,p.jsx)("span",{dir:"auto",children:i.subtitle})},b=({item:e,onClick:t})=>(0,u.v)(e)||(0,d.v)(e)?(0,p.jsx)(h,{item:e,onClick:t}):(0,c.p)(e)?(0,p.jsx)(g,{item:e,onClick:t}):(0,l.d)(e)?(0,p.jsx)(f,{item:e,onClick:t}):(0,o.N)(e)?(0,p.jsx)(y,{item:e,onClick:t}):(0,m.d)(e)},29184:(e,t,i)=>{"use strict";i.d(t,{R:()=>h});var n=i(61544),r=i(59996),a=i(8144),s=i(30270),o=i(63135),l=i(82101),c=i(95421),u=i(95339),d=i(46159),m=i(36485),p=i(86070);const h=({item:e,children:t,onClick:i,adUrl:h})=>{const{isSongVideoPlayingVideo:g}=(0,a.k)(),{trackPageEnhancedEnabled:f,trackPageLinksNoLyricsEnabled:v}=(0,s.Zo)(),y=h??function(e,{isVideoPlaying:t=!1,renderTrackLink:i}){if((0,u.v)(e)){const r=i?e.uri:e.album.uri,a=t?e.artists[0].uri:r;return(0,n.o_)(a)?.toURLPath(!0)}if((0,c.p)(e)||(0,l.d)(e)||(0,d.v)(e))return(0,n.o_)(e?.uri)?.toURLPath(!0);(0,o.N)(e)||(0,m.k)(e)}(e,{isVideoPlaying:g,renderTrackLink:f||v});return(0,u.v)(e)&&e.isLocal?(0,p.jsx)(p.Fragment,{children:t}):(0,u.v)(e)||(0,c.p)(e)||(0,l.d)(e)||(0,d.v)(e)?void 0===y?(0,p.jsx)(p.Fragment,{children:t}):(0,p.jsx)(r.N,{"":"context-item-link",to:y,onClick:i,children:t}):(0,o.N)(e)?y?(0,p.jsx)("a",{"":"context-item-info-ad-title",onClick:e=>{i?.(e,y)},href:y,rel:"noopener noreferrer",target:"_blank",children:t}):(0,p.jsx)(p.Fragment,{children:t}):(0,m.d)(e)}},39796:(e,t,i)=>{"use strict";i.d(t,{b:()=>a});var n=i(64981),r=i(86070);const a=({children:e,...t})=>(0,r.jsx)(n.t,{...t,action:"toggle",trigger:"click",children:e})},64981:(e,t,i)=>{"use strict";i.d(t,{t:()=>b});var n=i(30758),r=i(90549),a=i(16121),s=i(86070);const o=({toggleContextMenu:e,children:t})=>(0,s.jsx)(s.Fragment,{children:n.cloneElement(t,{onClick:i=>{t.props.onClick?.(i),e(i)}})}),l=({openContextMenu:e,children:t})=>{const i=(0,a.Oj)();return(0,s.jsx)(s.Fragment,{children:n.cloneElement(t,{onFocus:i=>{document.documentElement.classList.contains("no-focus-outline")||(t.props.onFocus?.(i),e(i))},onBlur:e=>{t.props.onBlur?.(e),i({type:"close"})},onMouseEnter:i=>{t.props.onMouseEnter?.(i),e(i)},onMouseLeave:e=>{t.props.onMouseLeave?.(e),i({type:"close"})}})})};var c=i(20167);const u=({openContextMenu:e,children:t})=>{const i=(0,a.Oj)(),{isTouching:r}=(0,a.fd)(),o=(0,n.useRef)();return(0,s.jsx)(s.Fragment,{children:n.cloneElement(t,{onContextMenu:i=>{t.props.onContextMenu?.(i),r||e(i),i.stopPropagation()},onTouchStart:e=>{o.current=Date.now(),t.props.onTouchStart?.(e),i({type:"touch",value:!0})},onTouchEnd:n=>{var r;t.props.onTouchEnd?.(n),(r=o.current)&&Date.now()-500>r&&(i({type:"touch",value:!1}),e(n)),document.body.hasAttribute("data-dragging-type")&&document.body.removeAttribute("data-dragging-type")}})})},d=({openContextMenu:e,children:t})=>(0,s.jsx)(s.Fragment,{children:n.cloneElement(t,{onContextMenu:i=>{t.props.onContextMenu?.(i),e(i),i.stopPropagation()}})}),m=({openContextMenu:e,children:t})=>(0,c.g)()?(0,s.jsx)(d,{openContextMenu:e,children:t}):(0,s.jsx)(u,{openContextMenu:e,children:t});var p=i(19817);const h=(0,n.forwardRef)((function({isOpen:e,handleContextMenu:t,trigger:i,children:r},a){return(0,p.d)(r)?(0,s.jsx)(s.Fragment,{children:r(e,t,a)}):"click"===i?(0,s.jsx)(o,{toggleContextMenu:t,children:r}):"right-click"===i?(0,s.jsx)(m,{openContextMenu:t,children:r}):"hover-or-focus"===i?(0,s.jsx)(l,{openContextMenu:t,children:r}):(0,s.jsx)(s.Fragment,{children:(0,n.cloneElement)(r,{ref:a})})}));function g(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 f=i(4049),v=i(60656);const y=({children:e,menu:t,action:i="toggle",trigger:o="click",renderInline:l=!1,offset:c=[0,8],placement:u="bottom-start",preventScrollingWhileOpen:d=!0,onShow:m,onHide:p,onClickOutside:y,snapshotReferenceElementPositionWhileOpen:b=!1,autoUpdate:_=!0,interactive:E=!0})=>{const C=(0,a.Oj)(),x=(0,a.fd)(),S=(0,f.M)({action:i,menu:t}),A=(0,v.ZY)();(0,n.useEffect)((()=>{_&&C({type:"update",menu:t})}),[_,C,t]);const T=(0,n.useCallback)((()=>{C({type:"close"})}),[C]),I=(0,n.useMemo)((()=>x.triggerElement&&b?x.triggerElement.getBoundingClientRect():null),[x.isOpen]);return(0,s.jsx)(r.A,{onClickOutside:(e,t)=>{y?y(T,e,t):T()},placement:u,trigger:o,offset:c,preventScrollingWhileOpen:d,triggerRef:x.triggerElement??void 0,appendTo:!A||l?void 0:()=>A.body,isOpen:x.isOpen,position:g(x.event),menu:x.menu,onShow:m,onHide:(...e)=>{T(),p?.(...e)},getReferenceClientRect:I?()=>I:null,interactive:E,children:(0,s.jsx)(h,{isOpen:x.isOpen,handleContextMenu:S,trigger:o,children:e})})},b=e=>(0,s.jsx)(a.SF,{children:(0,s.jsx)(y,{...e})})},71588:(e,t,i)=>{"use strict";i.d(t,{h:()=>a});var n=i(64981),r=i(86070);const a=e=>(0,r.jsx)(n.t,{...e,action:"open",trigger:"right-click"})},66416:(e,t,i)=>{"use strict";i.d(t,{W:()=>g});var n=i(30758),r=i(97500),a=i.n(r),s=i(81987),o=i(16121),l=i(71137),c=i(82097),u=i(52002),d=i(75621),m=i(62943),p=i(80720),h=i(86070);const g=({children:e,onClose:t,getInitialFocusElement:i,onFocusVerticalItem:r,...g})=>{const f=(0,o.Oj)(),v=(0,n.useCallback)((()=>{t?.(),f({type:"close"})}),[f,t]),y=(0,n.useCallback)((e=>{f({type:"modifierKeyHeld",value:e.altKey||e.ctrlKey})}),[f]),b=(0,s.NC)(m.rW);return(0,h.jsx)(c.s,{onError:e=>(0,d.Jy)(e,"Menu"),children:(0,h.jsx)(l.R,{children:(0,h.jsx)(u.e,{className:a()("encore-dark-theme","encore-layout-themes",{"circular-sp-vietnamese":b},p.A.menu),onClose:v,onKeyDown:y,onKeyUp:y,getInitialFocusElement:i,onFocusVerticalItem:r,...g,children:[Spicetify.ContextMenuV2.renderItems(),e].flat()})})})}},18456:(e,t,i)=>{"use strict";i.d(t,{y:()=>c});var n=i(97500),r=i.n(n),a=i(31322),s=i(65313),o=i(80720),l=i(86070);const c=({children:e,divider:t})=>(0,l.jsx)(s.u,{className:o.A.menuItem,children:(0,l.jsx)(a.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})})},83542:(e,t,i)=>{"use strict";i.d(t,{D:()=>h});var n=i(30758),r=i(97500),a=i.n(r),s=i(5162),o=i(31322),l=i(16121),c=i(72592),u=i(93966),d=i(65313),m=i(80720),p=i(86070);const h=({children:e,disabled:t,divider:i,onClick:r=(()=>{}),leadingIcon:h,trailingIcon:g,elementRef:f,CheckedIcon:v=s.i,autoClose:y=!0,innerClassName:b,semanticColor:_,...E})=>{const C=(0,l.Oj)(),x=(0,n.useRef)(null),S=(0,n.useCallback)((e=>{x.current=e,f&&f(e)}),[f]),{handleMouseEnter:A,handleMouseMove:T,handleMouseLeave:I,handleFocus:N}=(0,c.t)(x),w=(0,n.useCallback)((e=>{e.stopPropagation(),r(e),!t&&y&&C({type:"close"})}),[r,t,y,C]),R=(0,n.useCallback)((e=>{e.stopPropagation()}),[]);return(0,p.jsx)(d.u,{className:m.A.menuItem,children:(0,p.jsxs)(u.H,{className:a()(m.A.menuItemButton,{[m.A.disabled]:t,[m.A.dividerBefore]:"before"===i||"both"===i,[m.A.dividerAfter]:"after"===i||"both"===i}),"aria-disabled":t,onClick:w,onFocus:N,onMouseEnter:A,onMouseMove:T,onMouseLeave:I,onContextMenu:R,ref:S,...E,children:[h,(0,p.jsx)(o.Z,{variant:"mesto",dir:"auto",className:a()("ellipsis-one-line",m.A.menuItemLabel,b),semanticColor:_,children:e}),g,E["aria-checked"]&&v&&(0,p.jsx)(v,{iconSize:16,semanticColor:_})]})})}},61921:(e,t,i)=>{"use strict";i.d(t,{g:()=>f});var n=i(30758),r=i(3956),a=i(31322),s=i(3869),o=i(97500),l=i.n(o),c=i(72592),u=i(93966),d=i(65313),m=i(80720),p=i(86070);const h=(0,n.forwardRef)((function({children:e,disabled:t=!1,onClick:i=(()=>{}),setIsOpen:r,onTouchStart:a,outerRef:s,divider:o},h){const{handleMouseEnter:g,handleMouseMove:f,handleMouseLeave:v,handleFocus:y}=(0,c.t)(s,r),b=(0,n.useCallback)((e=>{e.stopPropagation(),i(e)}),[i]),_=(0,n.useCallback)((e=>{e.stopPropagation()}),[]);return(0,p.jsx)(d.u,{className:m.A.menuItem,children:(0,p.jsx)(u.H,{className:l()(m.A.menuItemButton,{[m.A.disabled]:t,[m.A.dividerBefore]:"before"===o,[m.A.dividerAfter]:"after"===o}),onClick:b,onFocus:y,onMouseEnter:g,onMouseMove:f,onMouseLeave:v,onTouchStart:a,onContextMenu:_,ref:h,role:"menuitem",children:e})})}));var g=i(90547);const f=({displayText:e,depth:t=1,children:i,divider:o,placement:l="right-start",onOpenChange:c,onClick:u,disabled:d,leadingIcon:f,menuBoundary:v=document.body})=>{const[y,b]=(0,n.useState)(!1),_=(0,n.useRef)(null),E=(0,n.useCallback)((()=>{b((e=>!e))}),[]),C=(0,n.useRef)(c);return C.current=c,(0,n.useEffect)((()=>C.current?.(y)),[y]),(0,p.jsx)(r.Ay,{render:()=>(0,p.jsx)(g.Q,{className:m.A.menu,depth:t,children:i}),offset:[0,0],interactive:!0,visible:y,arrow:!1,animation:!1,placement:l,popperOptions:{modifiers:[{name:"preventOverflow",options:{boundary:document.body,altAxis:!0,padding:10}},{name:"flip",options:{boundary:v}}]},children:(0,p.jsxs)(h,{divider:o,setIsOpen:b,onTouchStart:E,ref:_,outerRef:_,onClick:u,disabled:d,children:[(0,p.jsxs)("div",{className:m.A.subMenuLeading,children:[f,(0,p.jsx)(a.Z,{variant:"mesto",dir:"auto",className:"ellipsis-one-line",children:e})]}),(0,p.jsx)("span",{children:(0,p.jsx)(s.J,{className:m.A.subMenuIcon,iconSize:16,"aria-hidden":"true"})})]})})}},90549:(e,t,i)=>{"use strict";i.d(t,{A:()=>c,v:()=>l});var n=i(30758),r=i(3956),a=i(72537);var s=i(95302),o=i(86070);const l="context-menu",c=({menu:e,onClickOutside:t,children:i,trigger:c,offset:u,placement:d,isOpen:m,preventScrollingWhileOpen:p,triggerRef:h,position:g,getReferenceClientRect:f,onShow:v,onHide:y,appendTo:b,interactive:_=!0})=>{const E=(0,n.useRef)(null),C=(0,n.useRef)(null);((e,t)=>{(0,n.useEffect)((()=>{const i=e=>{t.current&&!t.current.contains(e.target)&&e.preventDefault()};if(e){const e={passive:!1};window.addEventListener("mousewheel",i,e),window.addEventListener("touchmove",i,e)}return()=>{window.removeEventListener("mousewheel",i),window.removeEventListener("touchmove",i)}}),[e,t])})(m&&p,E);const{updateAfterFirstLayout:x,cancel:S}=((e,t)=>{const i=(0,n.useRef)(0),r=(0,n.useCallback)((()=>{cancelAnimationFrame(i.current)}),[]),a=(0,n.useCallback)((()=>{e.current&&0!==e.current?.getBoundingClientRect().width?(t.current?.popperInstance?.update(),cancelAnimationFrame(i.current)):i.current=requestAnimationFrame(a)}),[e,t]);return(0,n.useEffect)((()=>()=>{cancelAnimationFrame(i.current)}),[a]),{updateAfterFirstLayout:a,cancel:r}})(E,C),A=(0,n.useCallback)((e=>{S(),e.reference.removeAttribute("data-context-menu-open"),y()}),[S,y]);(0,n.useEffect)((()=>{const e=C.current;if(!e||!e.reference||"click"===c)return()=>{};const t=e.reference,i=A.bind(void 0,e);return t.addEventListener("click",i),()=>{t.removeEventListener("click",i)}}),[E,C,A,c]);let T=null;f?T=f:"right-click"!==c&&h||(T=()=>({width:0,height:0,top:g?.y??0,bottom:g?.y??0,left:g?.x??0,right:g?.x??0,x:0,y:0,toJSON:()=>{}}));const I=(0,n.useMemo)((()=>{return[(e=t,{name:"hideOnContextMenu",defaultValue:!0,fn:function(t){function i(i){e?e(t,i):t.hide()}const n=(0,a.e)(!1);return{onShow(){n?.addEventListener("contextmenu",i,{once:!0})},onHide(){n?.removeEventListener("contextmenu",i)}}}})];var e}),[t]);return(0,o.jsxs)(o.Fragment,{children:[i,m&&(0,o.jsx)(r.Ay,{onCreate:e=>{C.current=e},onShow:e=>{x(),e.reference.setAttribute("data-context-menu-open","true"),v?.(e)},onHide:A,visible:m,plugins:I,render:t=>(0,o.jsx)((Spicetify.ContextMenuV2._context||(Spicetify.ContextMenuV2._context=n.createContext(null))).Provider,{value:{props:e?.props,trigger:c,target:h},children:(0,o.jsx)(s.pZ,{value:"contextmenu",children:(0,o.jsx)("div",{ref:E,id:l,"data-placement":t["data-placement"],"":"context-menu",children:m?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,i)=>{t?.(e,i)},interactive:_,offset:u,...b?{appendTo:b}:{},reference:h,getReferenceClientRect:T,aria:{expanded:"hover-or-focus"!==c&&"auto"}})]})}},16121:(e,t,i)=>{"use strict";i.d(t,{Oj:()=>c,SF:()=>d,fd:()=>o});var n=i(30758),r=i(86070);const a={isOpen:!1,modifierKeyHeld:!1,isTouching:!1,menu:null,event:null,triggerElement:null},s=(0,n.createContext)(a);function o(){const e=n.useContext(s);if(void 0===e)throw new Error("useContextMenuState must be used within a ContextMenuProvider");return e}const l=(0,n.createContext)((()=>{}));function c(){const e=n.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{...a};case"update":return{...e,menu:t.menu};default:throw new Error("Unknown action recieved!")}}const d=({children:e})=>{const[t,i]=(0,n.useReducer)(u,a);return(0,r.jsx)(l.Provider,{value:i,children:(0,r.jsx)(s.Provider,{value:t,children:e})})}},71137:(e,t,i)=>{"use strict";i.d(t,{P:()=>s,R:()=>l});var n=i(30758),r=i(90549);var a=i(86070);const s=(0,n.createContext)({registerCloseCallback:()=>{},closeToDepth:()=>{},isOnPathToSubmenu:()=>!1}),o=()=>()=>{},l=({children:e})=>{const t=(0,n.useRef)([]),i=(0,n.useRef)(),l=(o(),(0,n.useCallback)(((e,n)=>{t.current.push(e),i.current=n}),[])),c=(0,n.useCallback)((e=>{for(i.current=void 0;t.current.length>e;){const e=t.current.pop();e&&e(!1)}}),[]);return(0,a.jsx)(s.Provider,{value:{registerCloseCallback:l,closeToDepth:c,isOnPathToSubmenu:(e,t)=>{const n=document.getElementById(r.v),a=!t&&i.current?.x===e.x&&i.current?.y===e.y;if(!i.current||!n||a)return!1;const s=Array.from(n.querySelectorAll('[role="menu"]')).sort(((e,t)=>parseInt(e.getAttribute("data-depth")||"0",10)-parseInt(t.getAttribute("data-depth")||"0",10))).pop();if(!s)return!1;const o=s.getBoundingClientRect();let l=o.left;i.current.x>o.right&&(l=o.right);const c=i.current,u={x:l,y:o.top},d={x:l,y:o.bottom},m={x:u.x-c.x,y:u.y-c.y},p={x:d.x-c.x,y:d.y-c.y},h=(e,t)=>e.x*t.y-e.y*t.x,g=(h(e,p)-h(c,p))/h(m,p),f=-1*(h(e,m)-h(c,m))/h(m,p),v=g>0&&f>0&&g+f<1||Math.abs(e.x-c.x)+Math.abs(e.y-c.y)<=1;return v}},children:e})}},4049:(e,t,i)=>{"use strict";i.d(t,{M:()=>a});var n=i(30758),r=i(16121);const a=({action:e,menu:t})=>{const i=(0,r.Oj)();return(0,n.useCallback)(((n,r)=>{n.persist(),n.preventDefault(),i({type:e,event:n,triggerElement:n.currentTarget,menu:r||t})}),[t,i,e])}},13367:(e,t,i)=>{"use strict";i.d(t,{r:()=>m});var n=i(30758),r=i(41978),a=i(6361),s=i(11808),o=i(91543),l=i(83542),c=i(95302),u=i(86070);const d=({divider:e})=>{const t=(0,r.wA)(),i=(0,n.useCallback)((()=>{t((0,o.$c)())}),[t]);return(0,u.jsx)(l.D,{role:"menuitem",divider:e,onClick:i,leadingIcon:(0,u.jsx)(a.G,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("context-menu.about-recommendations")})},m=n.memo((function(e){return(0,u.jsx)(c.pZ,{value:"about-recommendations",children:(0,u.jsx)(d,{...e})})}))},30038:(e,t,i)=>{"use strict";i.d(t,{K:()=>S});var n=i(30758),r=i(10775),a=i(61544),s=i(11808),o=i(83542),l=i(15742);i(8385);const c=Spicetify.GraphQL.Definitions["queryAlbumTrackUris"]=new l.l("queryAlbumTrackUris","query","d7e0931e046b9f18a194f008ae9ebf856bf3f1d2bb07681ab29a11f060760cfb",null);var u=i(45346),d=i(67848),m=i(95302),p=i(69916),h=i(99744),g=i(2435),f=i(50486),v=i(48604),y=i(79303),b=i(86070);const _=e=>({uri:e,uid:null}),E=({uris:e,divider:t,spec:i,logger:a})=>{const l=(0,u.W)(),c=(0,h.z)(),d=(0,n.useCallback)((()=>{l({intent:"add-to-queue",type:"click"}),c.addToQueue(e.map(_)),i&&a&&a.logInteraction(i.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:e.length}))}),[l,c,e,i,a]);return(0,b.jsx)(o.D,{role:"menuitem",divider:t,onClick:d,leadingIcon:(0,b.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.add-to-queue")})},C=({uris:e,spec:t,logger:i})=>{const a=(0,u.W)(),l=(0,h.z)(),{request:d}=(0,n.useContext)(p.j),m=(0,n.useCallback)((async()=>{a({intent:"add-to-queue",type:"click"}),t&&i&&i.logInteraction(t.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:e.length}));const n=await d(c,{uri:e[0],offset:0,limit:100});if("Album"!==n?.data?.albumUnion.__typename)return;const r=(n?.data.albumUnion.tracks.items||[]).map((e=>e.track.uri));l.addToQueue(r.map(_))}),[i,a,l,d,t,e]);return(0,b.jsx)(o.D,{role:"menuitem",onClick:m,leadingIcon:(0,b.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.add-to-queue")})},x=({uris:e,spec:t,logger:i})=>{const a=(0,u.W)(),l=(0,h.z)(),c=(0,v.m)(),d=(0,n.useCallback)((async()=>{a({intent:"add-to-queue",type:"click"});const n=(await c.getContents(e[0],{limit:100})).items.filter((e=>!!e)).map((e=>e.uri));t&&i&&i.logInteraction(t.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:n.length})),l.addToQueue(n.map(_))}),[i,a,l,c,t,e]);return(0,b.jsx)(o.D,{role:"menuitem",onClick:d,leadingIcon:(0,b.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.add-to-queue")})},S=n.memo((function(e){const{uri:t}=(0,f.f)(),i=(0,d.U)(),n={...e,logger:(0,y.s)()},r=(0,g.o)((e=>(e?.restrictions?.disallowAddToQueueReasons||[]).length>0));if(!t||i||r)return null;let s=(0,b.jsx)(E,{...n});return(0,a._T)(e.uris[0])?s=(0,b.jsx)(C,{...n}):(0,a.tb)(e.uris[0])&&(s=(0,b.jsx)(x,{...n})),(0,b.jsx)(m.pZ,{value:"add-to-queue",children:s})}))},65183:(e,t,i)=>{"use strict";i.d(t,{m:()=>g});var n=i(30758),r=i(90058),a=i(11808),s=i(83542),o=i(16121),l=i(68398),c=i(30531),u=i(95302),d=i(79303),m=i(1696),p=i(86070);const h=({uri:e,sharingInfo:t,displayText:i,divider:u,isPrivatePlaylist:h=!1,spec:g})=>{const{modifierKeyHeld:f}=(0,o.fd)(),{onCopyLink:v}=(0,c.L)({sharingInfo:t,uri:e,interactionData:{intent:"share",type:"click"}}),y=(0,d.s)(),{onCopyLink:b}=(0,l.J)({uri:e,permissionLevel:"VIEWER"}),_=(0,n.useCallback)((()=>{f?(0,m.l)(e):h?b():v(),y.logInteraction(g.copyLinkButtonFactory().hitCopyToClipboard())}),[f,h,y,g,e,b,v]);return(0,p.jsx)(s.D,{role:"menuitem",divider:u,onClick:_,leadingIcon:(0,p.jsx)(r._,{semanticColor:"textSubdued",size:"small"}),children:f?a.Ru.get("context-menu.copy-spotify-uri"):i})},g=n.memo((function(e){return(0,p.jsx)(u.pZ,{value:"copy-link",children:(0,p.jsx)(h,{...e})})}))},45293:(e,t,i)=>{"use strict";i.d(t,{j:()=>p});var n=i(30758),r=i(6288),a=i(11808),s=i(83542),o=i(45346),l=i(95302),c=i(42947),u=i(79303),d=i(86070);const m=({position:e,divider:t,onCreateCallback:i=(()=>{}),spec:l})=>{const m=(0,o.W)(),{createFolder:p}=(0,c.Z)(),h=(0,u.s)(),g=(0,n.useCallback)((async()=>{m({intent:"playlisting",type:"click"});const t=await p(a.Ru.get("playlist.default_folder_name"),e),n=l.createButtonFactory().hitCreateFolder();n&&h.logInteraction(n),i(t)}),[m,p,e,l,h,i]);return(0,d.jsx)(s.D,{role:"menuitem",divider:t,onClick:g,leadingIcon:(0,d.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.create-folder")})},p=n.memo((function(e){return(0,d.jsx)(l.pZ,{value:"create-folder",children:(0,d.jsx)(m,{...e})})}))},71955:(e,t,i)=>{"use strict";i.d(t,{u:()=>h});var n=i(30758),r=i(41978),a=i(34489),s=i(11808),o=i(90751),l=i(83542),c=i(45346),u=i(95302),d=i(79303),m=i(86070);const p=({uri:e,divider:t,spec:i})=>{const u=(0,c.W)(),p=(0,r.wA)(),h=(0,d.s)(),g=(0,n.useCallback)((()=>{u({intent:"playlisting",type:"click"}),p((0,o.O)(e)),i&&h.logInteraction(i.deleteButtonFactory().hitDeletePlaylist({playlistToBeDeleted:e}))}),[p,h,u,i,e]);return(0,m.jsx)(l.D,{role:"menuitem",divider:t,onClick:g,leadingIcon:(0,m.jsx)(a.P,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.delete")})},h=n.memo((function(e){return(0,m.jsx)(u.pZ,{value:"delete-playlist",children:(0,m.jsx)(p,{...e})})}))},23038:(e,t,i)=>{"use strict";i.d(t,{u:()=>M,d:()=>U});var n=i(30758),r=i(21383),a=i(85212),s=i(11808),o=i(83542),l=i(3469),c=i(61921),u=i(12783),d=i(18486),m=i(22614),p=i(69898),h=i(25639),g=i(81987),f=i(52608),v=i(19159),y=i(11926),b=i(85065);const _=864e5,E=5e3;function C(e,t=!1){const i=(0,f.n)(),n=(0,g.NC)(v.z53,{loadingValue:!1}),r=(0,y.B)(),a=i&&n&&r.getCapabilities().canRemoteDownload,s=(0,p.jE)(),{data:o}=(0,h.I)({queryKey:["useOfflineContextForDevices",e],queryFn:()=>r.getContextForDevices(e),gcTime:_,staleTime:0,refetchInterval:t&&E,enabled:a,placeholderData:()=>s.getQueriesData({queryKey:["useOfflineContextForDevices"]})?.find((([e,t])=>!!t))?.[1]?.map((e=>({...e,contextDownloadAvailability:b.kw.NO,contextDownloadPercentage:0})))});return a?o??[]:[]}var x=i(73015),S=i(79303),A=i(36485),T=i(86070);function I(e){switch(e){case b.kw.NO:return(0,T.jsx)(a.i,{size:"small",semanticColor:"textBase"});case b.kw.WAITING:case b.kw.DOWNLOADING:return(0,T.jsx)(u.E,{semanticColor:"textSubdued",children:(0,T.jsx)(d.C,{size:16})});case b.kw.YES:return(0,T.jsx)(r.F,{size:"small",semanticColor:"textBrightAccent"});default:return(0,A.k)(e),null}}const N=({name:e,deviceId:t,cacheId:i,type:r,deviceType:a,clientPlatform:c,contextDownloadAvailability:u,isLocal:d,uri:h,spec:g,addDownloadPrerequisites:f,localDownloadAvailability:v})=>{const _=(0,S.s)(),E=(0,y.B)(),{enqueueSnackbar:C}=(0,x.d)(),A=function(){const e=(0,p.jE)();return(0,n.useCallback)((t=>e.invalidateQueries({queryKey:["useOfflineContextForDevices",t]})),[e])}(),N=(0,l.V)(),w=(0,m.t)(r),R=d?v:u,k=R!==b.kw.NO,O=R===b.kw.YES,P={remoteClientPlatform:c.toString(),remoteDeviceId:t,remoteDeviceType:a.toString()};return(0,T.jsx)(o.D,{onClick:async()=>{let n;k?(N(h,d?void 0:{deviceId:t,cacheId:i,deviceName:e,clientPlatform:c,deviceType:a}),n=O?d?g.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:h}):g.remoteDeviceDownloadButtonFactory().hitRemoveDownloadFromRemoteDevice({itemToRemoveFromDownloads:h,...P}):d?g.downloadButtonFactory().hitStopDownload({itemToStopDownload:h}):g.remoteDeviceDownloadButtonFactory().hitStopDownloadToRemoteDevice({itemToStopDownload:h,...P})):(f(),E.addDownload(h,{deviceId:t,cacheId:i}),n=d?g.downloadButtonFactory().hitDownload({itemToDownload:h}):g.remoteDeviceDownloadButtonFactory().hitDownloadToRemoteDevice({itemToDownload:h,...P}),C(s.Ru.get("web-player.remote-downloads.feedback.downloading-to-remote-device",e))),A(h),_.logInteraction(n)},"aria-checked":k,role:"menuitemcheckbox",leadingIcon:(0,T.jsx)(w,{iconSize:16,semanticColor:"textSubdued"}),trailingIcon:I(R),CheckedIcon:null,children:d?s.Ru.get("web-player.remote-downloads.context-menu.this-computer"):e})};var w=i(62720);var R=i(43396),k=i(95302),O=i(58302);const P=({uri:e,divider:t,addToLibrary:i=!0,showUri:r,canDownload:o,spec:l})=>{const u=(0,S.s)(),[d,m]=(0,n.useState)(!1),p=C(e,d),h=(0,R.W)(),g=function(e,t=!0,i){const[r,a]=(0,w.A)(e),[s,o]=(0,w.A)(i);return(0,n.useCallback)((()=>{!r&&t?a(!0):!t&&i&&(s||o(!0))}),[t,r,s,a,o,i])}(e,i,r),{availability:f}=(0,O.$)(e,o),v=(0,n.useMemo)((()=>l.downloadToDeviceSubmenuFactory()),[l]);return(0,T.jsx)(c.g,{displayText:s.Ru.get("contextmenu.download"),depth:1,placement:h?"left-start":"right-start",divider:t,onOpenChange:e=>{m(e),e&&u.logImpression(v.impression())},leadingIcon:(0,T.jsx)(a.i,{semanticColor:"textSubdued",size:"small"}),children:(0,T.jsx)(k.pZ,{value:"download",children:p.map((t=>(0,T.jsx)(N,{uri:e,spec:v,addDownloadPrerequisites:g,localDownloadAvailability:f,...t},t.cacheId)))})})};var L=i(45346);const j=({uri:e,divider:t,addToLibrary:i=!0,showUri:c,canDownload:u,spec:d})=>{const m=(0,L.W)(),p=(0,S.s)(),[h,g]=(0,w.A)(e),[f,v]=(0,w.A)(c),{capability:y,availability:_,addDownload:E}=(0,O.$)(e,u),C=(0,l.V)(),x=(0,n.useCallback)((()=>{if(y===b.vs.NO_PERMISSION)return;let t;m({targetUri:e,intent:_!==b.kw.NO?"remove-from-download":"download",type:"click"}),_!==b.kw.NO?(C(e),t=d.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e})):(!h&&i?g(!0):!i&&c&&(f||v(!0)),E(),t=d.downloadButtonFactory().hitDownload({itemToDownload:e})),p.logInteraction(t)}),[y,_,E,C,h,p,m,g,d,e,i,c,f,v]);return y===b.vs.NO_CAPABILITY||y===b.vs.NO_PERMISSION_HIDE?null:(0,T.jsx)(o.D,{divider:t,onClick:x,role:"menuitemcheckbox",disabled:y===b.vs.NO_PERMISSION,leadingIcon:_!==b.kw.NO?(0,T.jsx)(r.F,{semanticColor:"textBrightAccent",size:"small"}):(0,T.jsx)(a.i,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.download")})},D=e=>{const t=C(e.uri).some((({isLocal:e})=>!e))?P:j;return(0,T.jsx)(t,{...e})},M=n.memo((function(e){return(0,T.jsx)(k.pZ,{value:"download-episode",children:(0,T.jsx)(D,{...e})})})),U=n.memo((function(e){return(0,T.jsx)(k.pZ,{value:"download-playlist",children:(0,T.jsx)(D,{...e})})}))},31055:(e,t,i)=>{"use strict";i.d(t,{T:()=>p});var n=i(30758),r=i(17652),a=i(11808),s=i(83542),o=i(90498),l=i(45346),c=i(95302),u=i(79303),d=i(86070);const m=({uri:e,name:t,description:i,image:c,divider:m,spec:p})=>{const h=(0,l.W)(),g=(0,n.useContext)(o.$$),f=(0,u.s)(),v=(0,n.useCallback)((()=>{h({intent:"playlisting",type:"click"}),g({type:"open",playlistDetails:{name:t,description:i,image:c,uri:e}}),p&&f.logInteraction(p.editButtonFactory({uri:e}).hitUiReveal())}),[i,g,c,f,t,h,p,e]);return(0,d.jsx)(s.D,{role:"menuitem",divider:m,onClick:v,leadingIcon:(0,d.jsx)(r.G,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.edit-details")})},p=n.memo((function(e){return(0,d.jsx)(c.pZ,{value:"edit-details",children:(0,d.jsx)(m,{...e})})}))},9987:(e,t,i)=>{"use strict";i.d(t,{ET:()=>C,T5:()=>E,jK:()=>x});var n=i(30758),r=i(41978),a=i(88647),s=i(43178),o=i(83547),l=i(75930),c=i(42349),u=i(11808),d=i(90751),m=i(83542),p=i(45346),h=i(52608),g=i(95302),f=i(11898),v=i(62720),y=i(72091),b=i(86070);const _=n.memo((function({uri:e,divider:t,saveSuccess:i,removeSuccess:a,removeLabel:s,saveLabel:o,useDialog:l=!1,initialState:u=!1,leadingIconAdd:g,leadingIconRemove:_}){const E=(0,r.wA)(),C=(0,p.W)(),x=!(0,h.n)(),[S,A]=(0,v.A)(e,u),T=(0,f.f)(),{spec:I,logger:N}=(0,y.r)(c.F,{data:{uri:e}}),w=(0,n.useCallback)((()=>{const t=I.followButtonFactory();l&&S?E((0,d.aw)(e)):(C({targetUri:e,intent:S?"remove-from-library":"add-to-library",type:"click"}),A(!S),S?(N.logInteraction(t.hitUnfollow({itemToBeUnfollowed:e})),a&&E(a(e))):(N.logInteraction(t.hitFollow({itemToBeFollowed:e})),i&&E(i(e))))}),[I,l,S,E,e,C,A,N,a,i]);return(0,b.jsx)(m.D,{role:"menuitem",divider:t,disabled:x&&!T?.getCapabilities().canModifyOffline,onClick:w,leadingIcon:S?_:g,children:S?s:o})})),E=n.memo((function({uri:e,divider:t,useDialog:i,initialState:n=!1}){return(0,b.jsx)(g.pZ,{value:"follow-artist",children:(0,b.jsx)(_,{uri:e,divider:t,removeLabel:u.Ru.get("unfollow"),saveLabel:u.Ru.get("follow"),useDialog:i,initialState:n,leadingIconAdd:(0,b.jsx)(a.h,{semanticColor:"textSubdued",size:"small"}),leadingIconRemove:(0,b.jsx)(s.M,{semanticColor:"textBrightAccent",size:"small"})})})})),C=n.memo((function({uri:e,divider:t,useDialog:i=!1,initialState:n=!1}){return(0,b.jsx)(g.pZ,{value:"follow-playlist",children:(0,b.jsx)(_,{uri:e,divider:t,removeLabel:u.Ru.get("contextmenu.remove-from-library"),saveLabel:u.Ru.get("contextmenu.add-to-library"),useDialog:i,initialState:n,leadingIconAdd:(0,b.jsx)(o.P,{semanticColor:"textSubdued",size:"small"}),leadingIconRemove:(0,b.jsx)(l.k,{semanticColor:"textBrightAccent",size:"small"})})})})),x=n.memo((function({uri:e,divider:t,useDialog:i=!1,initialState:n=!1}){return(0,b.jsx)(g.pZ,{value:"follow-show",children:(0,b.jsx)(_,{uri:e,divider:t,removeLabel:u.Ru.get("unfollow"),saveLabel:u.Ru.get("follow"),useDialog:i,initialState:n,leadingIconAdd:(0,b.jsx)(a.h,{semanticColor:"textSubdued",size:"small"}),leadingIconRemove:(0,b.jsx)(s.M,{semanticColor:"textBrightAccent",size:"small"})})})}))},23487:(e,t,i)=>{"use strict";i.d(t,{Jn:()=>h,V9:()=>g,du:()=>f,fe:()=>v});var n=i(69725),r=i(36315),a=i(73671),s=i(97675),o=i(61544),l=i(11808),c=i(83542),u=i(80460),d=i(53209),m=i(86070);const p=({uri:e,queryParams:t="",displayText:i,divider:n,leadingIcon:r})=>{const a=(0,u.W)({type:"link",uri:e}),s=(0,o.o_)(e),l=`${(0,o.o_)(s)?.toURLPath(!0)||""}${t}`,p=a?(0,d.hF)(l):l;return(0,m.jsx)(c.D,{role:"menuitem",divider:n,to:p,leadingIcon:r,children:i})},h=({uri:e,contextUri:t,divider:i,displayText:r=l.Ru.get("contextmenu.go-to-artist"),hideLeadingIcon:a=!1})=>e!==t?(0,m.jsx)(p,{divider:i,uri:e,displayText:r,leadingIcon:!a&&(0,m.jsx)(n.r,{semanticColor:"textSubdued",size:"small"})}):null,g=({uri:e,contextUri:t,highlightedUri:i,divider:n})=>e!==t?(0,m.jsx)(p,{divider:n,uri:e,displayText:l.Ru.get("contextmenu.go-to-album"),queryParams:`?highlight=${i}`,leadingIcon:(0,m.jsx)(r.I,{semanticColor:"textSubdued",size:"small"})}):null,f=({uri:e,contextUri:t,divider:i})=>e!==t?(0,m.jsx)(p,{divider:i,uri:e,displayText:l.Ru.get("context-menu.episode-page-link"),leadingIcon:(0,m.jsx)(a.L,{semanticColor:"textSubdued",size:"small"})}):null,v=({uri:e,contextUri:t,divider:i})=>e!==t?(0,m.jsx)(p,{divider:i,uri:e,displayText:l.Ru.get("contextmenu.go-to-audiobook"),leadingIcon:(0,m.jsx)(s.l,{semanticColor:"textSubdued",size:"small"})}):null},72522:(e,t,i)=>{"use strict";i.d(t,{z:()=>A});var n=i(30758),r=i(9183),a=i(12783),s=i(28899),o=i(61544),l=i(11808),c=i(83542),u=i(97500),d=i.n(u),m=i(65313),p=i(80720),h=i(86070);const g=({children:e,disabled:t,className:i})=>(0,h.jsx)(m.u,{className:p.A.menuItem,children:(0,h.jsx)("div",{role:"menuitem","aria-disabled":t,className:d()(p.A.menuItemStatic,i),children:e})});var f=i(45346),v=i(90224),y=i(52608),b=i(95302),_=i(38481);var E=i(21596),C=i(79303);const x="aDmzyffYDLrlNO5zDfIA",S=({uri:e,displayText:t,divider:i,spec:u})=>{const d=(0,r.Zp)(),m=!(0,y.n)(),p=(0,f.W)(),b=(0,E.A9)(),S=(0,v.p)(),A=(0,C.s)(),T=(0,n.useCallback)((async()=>{p({targetUri:e,intent:"go-to-radio",type:"click"});const t=await((e,t)=>e.build().withHost(_.mz).withPath(`/seed_to_playlist/${t}`).withQueryParameters({"response-format":"json"}).withoutMarket().withEndpointIdentifier("/seed_to_playlist/{uri}").send())(b,e),[i]=t.body.mediaItems,n=(0,o.o_)(i.uri).toURLPath(!0);u&&A.logInteraction(u.navigateButtonFactory({identifier:"go-to-radio"}).hitUiNavigate({destination:n})),d(n)}),[p,e,u,b,d,A]);if(!S){const e=l.Ru.get("contextmenu.go-to-radio-dsa");return(0,h.jsxs)(g,{disabled:!0,className:x,children:[(0,h.jsx)(a.E,{variant:"bodySmall",semanticColor:"textSubdued",as:"p",children:t}),(0,h.jsx)(a.E,{variant:"marginal",semanticColor:"textSubdued",as:"p",children:e})]})}return(0,h.jsx)(c.D,{role:"menuitem",divider:i,disabled:m,onClick:T,leadingIcon:(0,h.jsx)(s.v,{semanticColor:"textSubdued",size:"small"}),children:t})},A=n.memo((function(e){return(0,h.jsx)(b.pZ,{value:"go-to-radio",children:(0,h.jsx)(S,{...e})})}))},91619:(e,t,i)=>{"use strict";i.d(t,{w:()=>f});var n=i(30758),r=i(83547),a=i(36721),s=i(81987),o=i(11808),l=i(83542),c=i(96122),u=i(6823),d=i(19159),m=i(95302),p=i(79303),h=i(86070);const g=({uri:e,divider:t,spec:i})=>{const{add:s,remove:d}=(0,u.p)("ignoreinrecs"),[m]=(0,c.o)("ignoreinrecs",[e]),g=(0,p.s)(),f=(0,n.useCallback)((()=>{let t;m?(d(e),t=i.excludeRecommendationsButtonFactory().hitIncludeInRecommendations({contextToBeIncluded:e})):(s(e),t=i.excludeRecommendationsButtonFactory().hitExcludeFromRecommendations({contextToBeExcluded:e})),g.logInteraction(t)}),[m,g,d,e,i,s]);return(0,h.jsx)(l.D,{role:"menuitem",divider:t,onClick:f,leadingIcon:m?(0,h.jsx)(r.P,{semanticColor:"textSubdued",size:"small"}):(0,h.jsx)(a.f,{semanticColor:"textSubdued",size:"small"}),children:m?o.Ru.get("contextmenu.include-in-recommendations"):o.Ru.get("contextmenu.exclude-from-recommendations")})},f=n.memo((function(e){return(0,s.NC)(d.rVs)?(0,h.jsx)(m.pZ,{value:"toggle-ignore-in-recommendations",children:(0,h.jsx)(g,{...e})}):null}))},91795:(e,t,i)=>{"use strict";i.d(t,{n:()=>g});var n=i(30758),r=i(88647),a=i(11808),s=i(83542),o=i(57262),l=i(68398),c=i(52608),u=i(19159),d=i(95302),m=i(79303),p=i(86070);const h=({uri:e,divider:t,spec:i})=>{const{onCopyLink:n}=(0,l.J)({uri:e,permissionLevel:"CONTRIBUTOR"}),o=!(0,c.n)(),u=(0,m.s)();return(0,p.jsx)(s.D,{role:"menuitem",divider:t,onClick:()=>{if(n(),u&&i){const e=i.inviteCollaboratorsButtonFactory().hitCopyToClipboard();e&&u.logInteraction(e)}},disabled:o,leadingIcon:(0,p.jsx)(r.h,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.invite-collaborators")})},g=n.memo((function(e){return(0,p.jsx)(o.u,{property:u.G6N,renderNewExperience:()=>(0,p.jsx)(d.pZ,{value:"leave-playlist",children:(0,p.jsx)(h,{...e})}),renderOldExperience:()=>null})}))},82751:(e,t,i)=>{"use strict";i.d(t,{_:()=>g});var n=i(30758),r=i(41978),a=i(64133),s=i(11808),o=i(90751),l=i(83542),c=i(57262),u=i(19159),d=i(95302),m=i(79303),p=i(86070);const h=({uri:e,divider:t,spec:i})=>{const c=(0,r.wA)(),u=(0,m.s)(),d=(0,n.useCallback)((()=>{c((0,o.aP)(e)),u.logInteraction(i.leavePlaylistButtonFactory().hitLeavePlaylist({playlist:e}))}),[c,u,i,e]);return(0,p.jsx)(l.D,{role:"menuitem",divider:t,onClick:d,leadingIcon:(0,p.jsx)(a.r,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.leave-playlist")})},g=n.memo((function(e){return(0,p.jsx)(c.u,{property:u.G6N,renderNewExperience:()=>(0,p.jsx)(d.pZ,{value:"leave-playlist",children:(0,p.jsx)(h,{...e})}),renderOldExperience:()=>null})}))},23561:(e,t,i)=>{"use strict";i.d(t,{x:()=>g});var n=i(30758),r=i(7875),a=i(83542),s=i(53107),o=i(91335),l=i(45346),c=i(95302),u=i(99744),d=i(53830),m=i(79303),p=i(86070);const h=({uri:e,divider:t,spec:i,type:c})=>{const h=(0,l.W)(),g=(0,n.useContext)(o.wv),f=(0,u.z)().getState(),v=(0,s.LK)(c),y=(0,m.s)(),b=(0,n.useCallback)((()=>{h({intent:"share",type:"click"}),y.logInteraction(i.shareEmbedButtonFactory({uri:e}).hitUiReveal());const t=f?.item?.uri,n=(0,d.s)(f);g({type:"open",uri:e,currentTrackUri:t,currentPosition:n,entityType:c})}),[h,y,i,e,f,c,g]);return(0,p.jsx)(a.D,{role:"menuitem",divider:t,onClick:b,leadingIcon:(0,p.jsx)(r.D,{semanticColor:"textSubdued",size:"small"}),children:v})},g=n.memo((function(e){return(0,p.jsx)(c.pZ,{value:"ewg-open",children:(0,p.jsx)(h,{...e})})}))},91039:(e,t,i)=>{"use strict";i.d(t,{q:()=>b});var n=i(30758),r=i(41978),a=i(3074),s=i.n(a),o=i(88497),l=i(6193),c=i(11808),u=i(83542),d=i(39733),m=i(45346),p=i(95302),h=i(20167),g=i(79303),f=i(86070);function v(){let e=s().create().hex;return e=e.replace(/-/g,""),e.substr(0,16)}const y=n.memo((function({uri:e,context:t,divider:i,spec:r}){const a=(0,d.vh)(),s=(0,m.W)(),p=(0,g.s)(),h=(0,n.useCallback)((()=>{const i=`${e}${t?`?context=${encodeURIComponent(t)}`:""}`;s({targetUri:i,intent:"open-in-app",type:"click"}),p.logInteraction(r.openInDesktopButtonFactory().hitOpenApp({destination:e,app:"desktop"})),a.send((0,l.N)({link:window.location.href,entity_uri:i,source:"open-in-app",deeplink_session_id:v()})),window.open(i)}),[e,t,s,p,r,a]);return(0,f.jsx)(u.D,{role:"menuitem",divider:i,onClick:h,leadingIcon:(0,f.jsx)(o.D,{semanticColor:"textSubdued",size:"small"}),children:c.Ru.get("contextmenu.open_desktop_app")})})),b=n.memo((function(e){const{isPWA:t,isDesktop:i}=(0,r.d4)((e=>e.platform));return t||i||(0,h.g)()?null:(0,f.jsx)(p.pZ,{value:"open-in-app",children:(0,f.jsx)(y,{...e})})}))},79095:(e,t,i)=>{"use strict";i.d(t,{k:()=>b});var n=i(30758),r=i(37813),a=i(84739),s=i(11808),o=i(83542),l=i(10608),c=i(95302),u=i(70583),d=i(25558),m=i(11898),p=i(79303),h=i(71817),g=i(36485),f=i(86070);const v=(e,t,i)=>{switch(t){case h.c.FOLDER:return e?s.Ru.get("contextmenu.unpin-folder"):s.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)(i)?e?s.Ru.get("contextmenu.unpin-dj"):s.Ru.get("contextmenu.pin-dj"):e?s.Ru.get("contextmenu.unpin-playlist"):s.Ru.get("contextmenu.pin-playlist");case h.c.ALBUM:return e?s.Ru.get("contextmenu.unpin-album"):s.Ru.get("contextmenu.pin-album");case h.c.ARTIST:return e?s.Ru.get("contextmenu.unpin-artist"):s.Ru.get("contextmenu.pin-artist");case h.c.SHOW:return e?s.Ru.get("contextmenu.unpin-show"):s.Ru.get("contextmenu.pin-show");case h.c.AUDIOBOOK:return e?s.Ru.get("contextmenu.unpin-audiobook"):s.Ru.get("contextmenu.pin-audiobook");case h.c.PRE_RELEASE_ALBUM:return e?s.Ru.get("contextmenu.unpin-prerelease-album"):s.Ru.get("contextmenu.pin-prerelease-album");case h.c.PRE_RELEASE_BOOK:return e?s.Ru.get("contextmenu.unpin-prerelease-audiobook"):s.Ru.get("contextmenu.pin-prerelease-audiobook");default:return(0,g.k)(t),""}},y=({uri:e,canPin:t,isPinned:i,type:s,divider:l,spec:c})=>{const h=(0,p.s)(),g=(0,m.f)(),y=(0,n.useCallback)((()=>{t===u.oT.NO_IN_FOLDER?g.getEvents().emit(d.UV.UPDATE_PIN_ERROR,{reason:d.uL.NO_PIN_IN_FOLDER,uri:e}):i?(g.unpin(e),c&&h.logInteraction(c.pinButtonFactory().hitUnpinItem({itemToUnpin:e}))):(g.pin(e),c&&h.logInteraction(c.pinButtonFactory().hitPinItem({itemToPin:e})))}),[t,g,e,i,h,c]);return(0,f.jsx)(o.D,{role:"menuitem",divider:l,onClick:y,leadingIcon:i?(0,f.jsx)(r.H,{semanticColor:"textBrightAccent",size:"small"}):(0,f.jsx)(a.z,{semanticColor:"textSubdued",size:"small"}),children:v(i,s,e)})},b=n.memo((function(e){return(0,f.jsx)(c.pZ,{value:"pin-action",children:(0,f.jsx)(y,{...e})})}))},3711:(e,t,i)=>{"use strict";i.d(t,{U:()=>v});var n=i(30758),r=i(72119),a=i(92366),s=i(11808),o=i(83542),l=i(57262),c=i(45346),u=i(19159),d=i(95302),m=i(82129),p=i(42947),h=i(79303),g=i(86070);const f=({uri:e,divider:t,isPrivate:i,spec:l})=>{const u=(0,c.W)(),{setPrivateState:d}=(0,m.x)(e),{setPublishedState:f}=(0,p.Z)(),v=(0,h.s)(),y=(0,n.useCallback)((()=>{if(u({intent:"playlisting",type:"click"}),i||f(e,!1),d(!i),l){let t;t=i?l.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPublic({playlistToBeMadePublic:e}):l.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPrivate({playlistToBeMadePrivate:e}),v.logInteraction(t)}}),[i,v,u,d,f,l,e]);return(0,g.jsx)(o.D,{role:"menuitem",divider:t,onClick:y,leadingIcon:i?(0,g.jsx)(r.d,{semanticColor:"textSubdued",size:"small"}):(0,g.jsx)(a.y,{semanticColor:"textSubdued",size:"small"}),children:i?s.Ru.get("contextmenu.make-playlist-public"):s.Ru.get("contextmenu.make-playlist-private")})},v=n.memo((function(e){return(0,g.jsx)(l.u,{property:u.G6N,renderNewExperience:()=>(0,g.jsx)(d.pZ,{value:"toggle-private",children:(0,g.jsx)(f,{...e})}),renderOldExperience:()=>null})}))},463:(e,t,i)=>{"use strict";i.d(t,{_:()=>h});var n=i(30758),r=i(95089),a=i(11808),s=i(83542),o=i(73015),l=i(45346),c=i(95302),u=i(42947),d=i(79303),m=i(86070);const p=({uri:e,divider:t,isPublished:i,spec:c})=>{const p=(0,l.W)(),{setPublishedState:h}=(0,u.Z)(),{enqueueSnackbar:g}=(0,o.d)(),f=(0,d.s)(),v=(0,n.useCallback)((()=>{if(p({intent:"playlisting",type:"click"}),h(e,!i),c){let t;t=i?c.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPrivate({playlistToBeMadePrivate:e}):c.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPublic({playlistToBeMadePublic:e}),f.logInteraction(t)}g(i?a.Ru.get("feedback.playlist-unpublish"):a.Ru.get("feedback.playlist-publish"))}),[g,i,f,p,h,c,e]);return(0,m.jsx)(s.D,{role:"menuitem",divider:t,onClick:v,disabled:void 0===i,leadingIcon:(0,m.jsx)(r.T,{semanticColor:"textSubdued",size:"small"}),children:i?a.Ru.get("contextmenu.make-secret"):a.Ru.get("contextmenu.make-public")})},h=n.memo((function(e){return(0,m.jsx)(c.pZ,{value:"toggle-published",children:(0,m.jsx)(p,{...e})})}))},92305:(e,t,i)=>{"use strict";i.d(t,{R:()=>p});var n=i(30758),r=i(41978),a=i(46007),s=i(70932),o=i(42349),l=i(90751),c=i(83542),u=i(52608),d=i(72091),m=i(86070);const p=n.memo((function({uri:e,rateLabel:t,metadata:i}){const p=!(0,u.n)(),h=(0,r.wA)(),{spec:g,logger:f}=(0,d.r)(o.F,{data:{uri:e}}),v=(0,n.useCallback)((async()=>{const t=g.rateButtonFactory();f.logInteraction(t.hitUiReveal()),h((0,l.eH)(e,i))}),[h,f,i,g,e]),y=i?.rating?.rating;return(0,m.jsx)(c.D,{role:"menuitem",disabled:p,onClick:v,leadingIcon:y?(0,m.jsx)(a.j,{size:"small",semanticColor:"textSubdued"}):(0,m.jsx)(s.a,{size:"small",semanticColor:"textSubdued"}),children:t})}))},80425:(e,t,i)=>{"use strict";i.d(t,{D:()=>g});var n=i(30758),r=i(4977),a=i(61544),s=i(11808),o=i(83542),l=i(45346),c=i(95302),u=i(48604),d=i(42299),m=i(82129),p=i(86070);const h=e=>{const t=(0,u.m)(),{removeItems:i}=(0,m.x)(e.playlistUri),{uris:a,uids:c,divider:h,playlistUri:g,removePlaylistItems:f=i,canBeRemoved:v}=e,y=(0,l.W)(),b=(0,d.J)(g),{hasUidsGeneratedFromIndicies:_}=t.getCapabilities(),E=(0,n.useCallback)((()=>{y({targetUri:g,intent:"playlisting",type:"click"});const e=a.map(((e,t)=>({uri:e,uid:c[t]||""})));f(e)}),[y,g,f,c,a]);return _&&!c.every((e=>Number.isInteger(Number(e))))?null:v||b?.canRemove?(0,p.jsx)(o.D,{role:"menuitem",divider:h,onClick:E,leadingIcon:(0,p.jsx)(r.x,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.remove-from-playlist")}):null},g=n.memo((function(e){return(0,a.tb)(e.playlistUri)?(0,p.jsx)(c.pZ,{value:"remove-from-playlist",children:(0,p.jsx)(h,{...e})}):null}))},58235:(e,t,i)=>{"use strict";i.d(t,{c:()=>h});var n=i(30758),r=i(4977),a=i(61544),s=i(11808),o=i(83542),l=i(45346),c=i(95302),u=i(99744),d=i(79303),m=i(86070);const p=({uids:e,uris:t,contextUri:i,divider:c,spec:p})=>{const h=(0,l.W)(),g=(0,u.z)(),f=(0,d.s)(),v=(0,n.useMemo)((()=>e.map(((e,i)=>({uid:e,uri:t[i]})))),[e,t]),y=(0,n.useCallback)((()=>{h({intent:"remove-from-queue",type:"click"}),f.logInteraction(p.removeFromQueueButtonFactory().hitRemoveItemsFromQueue({numberOfItemsToRemoveFromQueue:t.length})),g.removeFromQueue(v)}),[h,f,p,t.length,g,v]);return i&&"queue"===(0,a.o_)(i)?.id?(0,m.jsx)(o.D,{role:"menuitem",divider:c,onClick:y,leadingIcon:(0,m.jsx)(r.x,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("contextmenu.remove-from-queue")}):null},h=n.memo((function(e){return(0,m.jsx)(c.pZ,{value:"remove-from-queue",children:(0,m.jsx)(p,{...e})})}))},49813:(e,t,i)=>{"use strict";i.d(t,{P:()=>_});var n=i(30758),r=i(23298),a=i(61544),s=i(70825),o=i(11808),l=i(83542),c=i(52608),u=i(61323),d=i(60102);var m=i(24172),p=i(95302),h=i(23679),g=i(42582),f=i(94313),v=i(79303),y=i(86070);const b=({uri:e,currentUserUri:t,canReportUser:i,divider:p,spec:b})=>{const[_,E]=(0,n.useState)(!1),C=(0,d.N)(u.u),x=(0,v.s)(),S=!(0,c.n)();(0,n.useEffect)((()=>{(0,a.tb)(e)&&C.canReportPlaylist(e,t).then(E),(0,a.ec)(e)&&E(!0),(0,a.AP)(e)&&E(!!i),((0,a.WB)(e)||(0,s.gH)(e))&&E(!0)}),[e,t,i,C]);const{openURLWithSessionTransfer:A}=(0,h.L)(),{isActive:T}=(0,g.P)({uri:e},{featureIdentifier:"context_menu"}),[I]=(0,f.S)(1e3,(t=>t.item?.uri===e)),N=(0,n.useCallback)((async()=>{if(!_)return;const t=await C.getReportURL(e,T?I:null);A(t),b&&x.logInteraction(b.reportButtonFactory().hitUiNavigate({destination:e}))}),[_,C,e,T,I,A,b,x]);return C.isURIReportable(e)&&e!==t?(0,y.jsx)(l.D,{role:"link",divider:p,disabled:!_||S,onClick:N,leadingIcon:(0,y.jsx)(r.Y,{semanticColor:"textSubdued",size:"small"}),trailingIcon:(0,y.jsx)(m.p,{size:"small"}),children:o.Ru.get("contextmenu.report")}):null},_=n.memo((function(e){return(0,y.jsx)(p.pZ,{value:"report",children:(0,y.jsx)(b,{...e})})}))},34539:(e,t,i)=>{"use strict";i.d(t,{N7:()=>b,TR:()=>y,tt:()=>E,zD:()=>_});var n=i(30758),r=i(41978),a=i(75930),s=i(83547),o=i(11808),l=i(90751),c=i(83542),u=i(45346),d=i(52608),m=i(95302),p=i(11898),h=i(62720),g=i(79303),f=i(86070);const v=n.memo((function({uri:e,divider:t,removeLabel:i,saveLabel:o,useDialog:m=!1,initialState:v=!1,spec:y}){const b=(0,r.wA)(),_=(0,u.W)(),E=!(0,d.n)(),[C,x]=(0,h.A)(e,v),S=(0,p.f)(),A=(0,g.s)(),T=(0,n.useCallback)((()=>{m&&C?b((0,l.aw)(e)):(_({targetUri:e,intent:C?"remove-from-library":"add-to-library",type:"click"}),x(!C),C?A.logInteraction(y.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e})):A.logInteraction(y.saveButtonFactory().hitLike({itemToBeLiked:e})))}),[m,C,b,e,_,x,A,y]);return(0,f.jsx)(c.D,{role:"menuitem",divider:t,disabled:E&&!S?.getCapabilities().canModifyOffline,onClick:T,leadingIcon:C?(0,f.jsx)(a.k,{semanticColor:"textBrightAccent",size:"small"}):(0,f.jsx)(s.P,{semanticColor:"textSubdued",size:"small"}),children:C?i:o})})),y=n.memo((function({uri:e,divider:t,useDialog:i=!1,initialState:n=!1,spec:r}){return(0,f.jsx)(m.pZ,{value:"save-track",children:(0,f.jsx)(v,{uri:e,divider:t,removeLabel:o.Ru.get("remove_from_your_liked_songs"),saveLabel:o.Ru.get("save_to_your_liked_songs"),useDialog:i,initialState:n,spec:r})})})),b=n.memo((function({uri:e,divider:t,useDialog:i=!1,initialState:n=!1,spec:r}){return(0,f.jsx)(m.pZ,{value:"save-episode",children:(0,f.jsx)(v,{uri:e,divider:t,removeLabel:o.Ru.get("contextmenu.remove-from-your-episodes"),saveLabel:o.Ru.get("contextmenu.save-to-your-episodes"),useDialog:i,initialState:n,spec:r})})})),_=n.memo((function({uri:e,divider:t,useDialog:i=!1,initialState:n=!1,spec:r}){return(0,f.jsx)(m.pZ,{value:"save-album",children:(0,f.jsx)(v,{uri:e,divider:t,removeLabel:o.Ru.get("contextmenu.remove-from-library"),saveLabel:o.Ru.get("contextmenu.add-to-library"),useDialog:i,initialState:n,spec:r})})})),E=n.memo((function({uri:e,divider:t,useDialog:i=!1,initialState:n=!1,spec:r}){return(0,f.jsx)(m.pZ,{value:"save-book",children:(0,f.jsx)(v,{uri:e,divider:t,removeLabel:o.Ru.get("contextmenu.remove-from-library"),saveLabel:o.Ru.get("contextmenu.add-to-library"),useDialog:i,initialState:n,spec:r})})}))},707:(e,t,i)=>{"use strict";i.d(t,{i:()=>f});var n=i(30758),r=i(101),a=i(39911),s=i(81987),o=i(11808),l=i(83542),c=i(18024),u=i(73015),d=i(19159),m=i(95302),p=i(79303),h=i(86070);const g=({spec:e,divider:t})=>{const[i,m]=(0,c.J)(),{enqueueSnackbar:g}=(0,u.d)(),f=e.canvasVideosFactory(),v=(0,p.s)(),y=(0,n.useCallback)((()=>{v.logInteraction(f.toggleCanvasVideosFactory().hitToggleState(i?{stateBeforeToggle:"show_canvas_video",stateAfterToggle:"show_static_artwork"}:{stateBeforeToggle:"show_static_artwork",stateAfterToggle:"show_canvas_video"})),i?(m(!1),g(o.Ru.get("contextmenu.looping-visuals-hide.feedback"))):(m(!0),g(o.Ru.get("contextmenu.looping-visuals-show.feedback")))}),[f,i,g,m,v]);return(0,s.NC)(d.yJ8)!==d.NtL.CONTROL?(0,h.jsx)(l.D,{role:"menuitem",onClick:y,divider:t,leadingIcon:i?(0,h.jsx)(r.d,{semanticColor:"textSubdued",size:"small"}):(0,h.jsx)(a.C,{semanticColor:"textSubdued",size:"small"}),children:i?o.Ru.get("contextmenu.looping-visuals-hide"):o.Ru.get("contextmenu.looping-visuals-show")}):null},f=n.memo((function(e){return(0,h.jsx)(m.pZ,{value:"add-to-existing",children:(0,h.jsx)(g,{...e})})}))},16015:(e,t,i)=>{"use strict";i.d(t,{I:()=>m});var n=i(30758),r=i(41978),a=i(10629),s=i(90751),o=i(83542),l=i(45346),c=i(95302),u=i(86070);const d=({uri:e,displayText:t,divider:i,ubiLogger:c,contextMenuSpec:d})=>{const m=(0,r.wA)(),p=(0,l.W)(),h=(0,n.useMemo)((()=>d.showCreditsFactory()),[d]),g=(0,n.useCallback)((async()=>{c.logInteraction(h.hitUiReveal()),p({targetUri:e,intent:"show-credits",type:"click"}),m((0,s.P0)(!0,e))}),[e,m,p,c,h]);return(0,u.jsx)(o.D,{role:"menuitem",divider:i,onClick:g,leadingIcon:(0,u.jsx)(a.L,{semanticColor:"textSubdued",size:"small"}),children:t})},m=n.memo((function(e){return(0,u.jsx)(c.pZ,{value:"show-credits",children:(0,u.jsx)(d,{...e})})}))},58357:(e,t,i)=>{"use strict";i.d(t,{y:()=>F});var n=i(30758),r=i(78840),a=i(11808),s=i(97500),o=i.n(s),l=i(61921),c=i(16121),u=i(83542),d=i(87925),m=i(95302),p=i(11898),h=i(42947),g=i(79303),f=i(86070);const v=(e,t)=>{const{addPlaylists:i,movePlaylists:r,containsPlaylists:a}=(0,h.Z)(),s=(0,p.f)(),o=(0,d.l)(),l=(0,g.s)();return(0,n.useCallback)((async n=>{const[c]=await a([e]);let u;c?(r({uri:e},n),u=t.moveToFolderSubmenuFactory().addToFolderButtonFactory().hitSort(),o.contains("ylpin",[e]).then((([t])=>{t&&s.unpin(e)}))):(i([e],n),u=t.moveToFolderSubmenuFactory().addToFolderButtonFactory().hitFollow({itemToBeFollowed:e})),u&&l.logInteraction(u)}),[a,e,l,r,t,o,s,i])},y=({uri:e,folder:t,spec:i,children:n,divider:r})=>{const a=v(e,i);return(0,f.jsx)(u.D,{role:"menuitem",onClick:()=>a({after:t}),divider:r,children:n??t.name})},b=n.memo((function(e){return(0,f.jsx)(m.pZ,{value:"add-to-existing",children:(0,f.jsx)(y,{...e})})}));var _=i(45293),E=i(26694),C=i(51757);function x(e){const{item:t,filter:i}=e,n=(0,f.jsx)(E.M,{searchWords:[i],textToHighlight:t.displayTitle});return(0,f.jsxs)(b,{...e,children:[(0,f.jsx)("div",{dir:"auto",className:C.A.addToPlaylistTitle,children:n}),t.displaySubtitle?(0,f.jsxs)("div",{dir:"auto",className:C.A.addToPlaylistSubtitle,children:[(0,f.jsx)(r.h,{size:"small"}),(0,f.jsx)(E.M,{searchWords:[i],textToHighlight:t.displaySubtitle})]}):null]})}var S=i(25763),A=i(93966),T=i(65313),I=i(64693);const N=()=>(0,f.jsx)(T.u,{className:I.A.filterPlaylistSearch,children:(0,f.jsx)(A.H,{role:"menuitem",as:"div",children:(0,f.jsx)(S.S,{alwaysExpanded:!0,placeholder:a.Ru.get("contextmenu.find-folder")})})});var w=i(75652),R=i(55084),k=i(67196);const O=({uri:e,children:t,divider:i,spec:r})=>{const a=(0,k.g)(),s=(0,g.s)(),o=(0,n.useCallback)((()=>{a.move({uri:e},{before:"start"});const t=r.moveToFolderSubmenuFactory().removeFromFoldersFactory().hitSort();s.logInteraction(t)}),[s,a,r,e]);return(0,f.jsx)(u.D,{role:"menuitem",onClick:o,divider:i,children:t})},P=n.memo((function(e){return(0,f.jsx)(m.pZ,{value:"move-to-root",children:(0,f.jsx)(O,{...e})})}));var L=i(15549),j=i(43396),D=i(47327),M=i(76986);const U=({uriToBeAdded:e,folder:t,items:i,displayText:r,depth:s,spec:u,leadingIcon:d})=>{const m=(0,j.W)(),p=(0,c.Oj)(),h=v(e,u),{filter:g}=(0,n.useContext)(L.g),y=1===s,E=(0,n.useMemo)((()=>0===g.length?i:(0,w.G)(g,i,!0)),[g,i]),C=(0,n.useMemo)((()=>t?.items.find((t=>t.uri===e))),[t?.items,e]),S=(0,n.useCallback)(((e=t)=>{e&&!y&&(h({after:e}),p({type:"close"}))}),[h,p,t,y]);return(0,f.jsx)(l.g,{displayText:r,depth:s,placement:m?"left-start":"right-start",onClick:()=>S(),leadingIcon:d,children:t&&(0,f.jsxs)("div",{className:o()({[M.A.filterPlaylistSearchContainer]:y}),style:{"--context-menu-submenu-length":i.filter((t=>(0,D.sA)(t)&&t.uri!==e)).length+(C?0:1)},children:[y&&(0,f.jsx)(N,{}),(0,f.jsx)(_.j,{position:y?{before:"start"}:{after:t},onCreateCallback:S,divider:!C&&y?void 0:"after",spec:u}),!C&&y&&(0,f.jsx)(P,{uri:e,spec:u,divider:"after",children:a.Ru.get("contextmenu.remove-from-folders")}),E.map((t=>(0,D.sA)(t)&&t.uri!==e?(0,R.A)(t)?(0,f.jsx)(x,{uri:e,folder:t,item:t,filter:g??"",spec:u},t.uri):(e=>e.items.some((e=>(0,D.sA)(e))))(t)?(0,f.jsx)(U,{folder:t,uriToBeAdded:e,items:t.items,displayText:t.name,depth:s+1,spec:u},t.uri):(0,f.jsx)(b,{folder:t,uri:e,spec:u},t.uri):null))]})})};var B=i(73482);const F=n.memo((function({uriToBeAdded:e,isInLibrary:t,spec:i}){const s=(0,B.u)();return(0,f.jsx)(m.pZ,{value:"add-to-folder",children:(0,f.jsx)(n.Suspense,{fallback:null,children:(0,f.jsx)(L.s,{uri:"spotify:internal:foldersubmenufolders",children:(0,f.jsx)(U,{uriToBeAdded:e,folder:s??null,items:s?.items||[],displayText:t?a.Ru.get("contextmenu.move-playlist-to-folder"):a.Ru.get("contextmenu.add-playlist-to-folder"),depth:1,spec:i,leadingIcon:(0,f.jsx)(r.h,{semanticColor:"textSubdued",size:"small"})})})})})}))},5861:(e,t,i)=>{"use strict";i.d(t,{o:()=>K});var n=i(30758),r=i(6288),a=i(61544),s=i(11808),o=i(83542),l=i(97500),c=i.n(l),u=i(81987),d=i(61921),m=i(41978),p=i(347),h=i(35293),g=i(95302),f=i(48604);function v(e){return e.isLoaded&&!e.isOwnedBySelf&&e.canAdd}var y=i(79303),b=i(7353),_=i(86070);const E=({uris:e,playlist:t,disabled:i,divider:r,spec:s,children:l})=>{const c=(0,f.m)(),u=(0,m.wA)(),d=(0,y.s)(),g=(0,n.useCallback)((async()=>{let i=e;if((0,a.tb)(e[0])){i=(await c.getContents(e[0])).items.filter(b.P).map((e=>e.uri))}if(1===e.length){const i=s?.addToOtherPlaylistFactory().hitAddToPlaylist({playlist:t.uri,itemToBeAdded:e[0]});i&&d.logInteraction(i)}u((0,h.io)(t.uri,i))}),[d,s,e,u,t.uri,c]);return(0,_.jsx)(o.D,{role:"menuitem",divider:r,onClick:g,disabled:i,trailingIcon:v({isLoaded:t.isLoaded,isOwnedBySelf:t.isOwnedBySelf,canAdd:t.canAdd})?(0,_.jsx)(p.B,{size:"small"}):null,children:l??t.name})},C=n.memo((function(e){return(0,_.jsx)(g.pZ,{value:"add-to-existing",children:(0,_.jsx)(E,{...e})})}));var x=i(58591);const S=({uris:e,reference:t,displayText:i,divider:s,spec:l})=>{const{createPlaylistFromAlbum:c,createPlaylistFromTracks:u,createPlaylistFromPlaylist:d}=(0,x.A)(),m=(0,f.m)(),p=(0,y.s)(),h=(0,n.useCallback)((async()=>{let i;const n=null!==t?{after:t}:{before:"start"};if(i=(0,a._T)(e[0])?await c(e[0],n):(0,a.tb)(e[0])?await d(e[0],n):await u(e,n),1===e.length){const t=l.addToPlaylistButtonFactory().hitAddToPlaylist({playlist:i??"",itemToBeAdded:e[0]});t&&p.logInteraction(t)}}),[p,l,e,c,t,d,u]);return(0,a.tb)(e[0])&&!m.getCapabilities().canFetchAllTracks?null:(0,_.jsx)(o.D,{role:"menuitem",divider:s,onClick:h,leadingIcon:(0,_.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),children:i})},A=n.memo((function(e){return(0,_.jsx)(g.pZ,{value:"new-playlist",children:(0,_.jsx)(S,{...e})})}));var T=i(78840),I=i(26694),N=i(51757);function w(e){const{item:t,filter:i}=e,n=(0,_.jsx)(I.M,{searchWords:[i],textToHighlight:t.displayTitle});return(0,_.jsx)(C,{...e,children:(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{dir:"auto",className:N.A.addToPlaylistTitle,children:n}),t.displaySubtitle?(0,_.jsxs)("div",{dir:"auto",className:N.A.addToPlaylistSubtitle,children:[(0,_.jsx)(T.h,{size:"small"}),(0,_.jsx)(I.M,{searchWords:[i],textToHighlight:t.displaySubtitle})]}):null]})})}var R=i(25763),k=i(93966),O=i(65313),P=i(64693);const L=()=>(0,_.jsx)(O.u,{className:P.A.filterPlaylistSearch,children:(0,_.jsx)(k.H,{role:"menuitem",as:"div",children:(0,_.jsx)(R.S,{alwaysExpanded:!0,placeholder:s.Ru.get("contextmenu.find-playlist")})})});var j=i(75652),D=i(55084),M=i(15549),U=i(43396),B=i(19159),F=i(47327),H=i(76986);const V=({uris:e,reference:t,items:i,displayText:r,depth:a,spec:o,leadingIcon:l,menuBoundary:m})=>{const p=(0,U.W)(),{filter:h}=(0,n.useContext)(M.g),g=1===a,f=(0,u.NC)(B.N_Z,{loadingValue:!1}),v=(0,n.useMemo)((()=>0===h.length?i:(0,j.G)(h,i)),[h,i]);return(0,_.jsx)(d.g,{displayText:r,depth:a,placement:p?"left-start":"right-start",leadingIcon:l,menuBoundary:m,children:(0,_.jsxs)("div",{className:c()({[H.A.filterPlaylistSearchContainer]:g}),style:{"--context-menu-submenu-length":i.filter((e=>(0,F.sA)(e)||(0,F.Af)(e)&&e.canAdd)).length},children:[g&&(0,_.jsx)(L,{}),(0,_.jsx)(A,{divider:"after",uris:e,reference:t,displayText:f?s.Ru.get("web-player.aligned-curation.contextmenu.new-playlist"):s.Ru.get("contextmenu.create-playlist"),spec:o}),v.map((t=>(0,F.sA)(t)?(0,_.jsx)(V,{reference:t,uris:e,items:t.items,displayText:t.name,depth:a+1,spec:o},t.uri):(0,F.Af)(t)&&t.canAdd?(0,D.A)(t)?(0,_.jsx)(w,{uris:e,playlist:t,item:t,filter:h??"",spec:o},t.uri):(0,_.jsx)(C,{uris:e,playlist:t,spec:o},t.uri):null))]})})},G=e=>(0,_.jsx)(M.s,{uri:`spotify:internal:foldersubmenu:${e.reference?.uri??"root"}`,children:(0,_.jsx)(V,{...e})});var z=i(73482);const W=n.memo((function({uris:e,isSmartRecommendation:t,isPlaylist:i,spec:l,isEmpty:c,menuBoundary:u}){const d=(0,f.m)();let m=s.Ru.get("contextmenu.add-to-playlist");t?m=s.Ru.get("contextmenu.add-to-another-playlist"):i&&(m=s.Ru.get("contextmenu.add-playlist-to-other-playlist"));const p=(0,z.u)();return(0,a.tb)(e[0])&&!d.getCapabilities().canFetchAllTracks?null:c?(0,_.jsx)(o.D,{role:"menuitem",leadingIcon:(0,_.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),disabled:!0,children:m}):(0,_.jsx)(g.pZ,{value:"add-to-playlist",children:(0,_.jsx)(n.Suspense,{fallback:null,children:(0,_.jsx)(G,{uris:e,items:p?.items||[],reference:null,displayText:m,depth:1,spec:l,leadingIcon:(0,_.jsx)(r.u,{semanticColor:"textSubdued",size:"small"}),menuBoundary:u})})})})),K=e=>(0,_.jsx)(W,{...e})},88778:(e,t,i)=>{"use strict";i.d(t,{h:()=>_});var n=i(30758),r=i(11808),a=i(66416),s=i(30038),o=i(65183),l=i(72522),c=i(23561),u=i(91039),d=i(79095),m=i(34539),p=i(5861),h=i(96264),g=i(95302),f=i(70583),v=i(6576),y=i(71817),b=i(86070);const _=n.memo((function({uri:e,sharingInfo:t,canPin:i=f.oT.NO,isPinned:n=!1,useDialogForUnfollow:_=!1,isInLibrary:E}){const{spec:C}=(0,v.o)(e);return(0,b.jsx)(g.pZ,{value:"album",children:(0,b.jsxs)(a.W,{children:[(0,b.jsx)(m.zD,{uri:e,useDialog:_,initialState:E,spec:C}),(0,b.jsx)(s.K,{spec:C,uris:[e]}),(0,b.jsx)(l.z,{spec:C,divider:"after",uri:e,displayText:r.Ru.get("contextmenu.go-to-artist-radio")}),i!==f.oT.NO&&(0,b.jsx)(d.k,{uri:e,canPin:i,isPinned:n,type:y.c.ALBUM,spec:C}),(0,b.jsx)(p.o,{spec:C,uris:[e]}),(0,b.jsxs)(h.h,{divider:"before",children:[(0,b.jsx)(o.m,{uri:e,spec:C,sharingInfo:t,displayText:r.Ru.get("context-menu.copy-album-link")}),(0,b.jsx)(c.x,{spec:C,uri:e,type:y.c.ALBUM})]}),(0,b.jsx)(u.q,{spec:C,divider:"before",uri:e})]})})}))},17202:(e,t,i)=>{"use strict";i.d(t,{t:()=>R});var n=i(30758),r=i(11808),a=i(66416),s=i(40871),o=i(64133),l=i(81987),c=i(83542),u=i(73015),d=i(45346),m=i(96122),p=i(6823),h=i(19159),g=i(95302),f=i(86070);const v=({uri:e,divider:t})=>{const i=(0,d.W)(),{add:a,remove:l}=(0,p.p)("artistban"),[h]=(0,m.o)("artistban",[e]),{enqueueSnackbar:g}=(0,u.d)(),v=(0,n.useCallback)((async()=>{i({targetUri:e,intent:h?"ban":"unban",type:"click"}),h?await l(e):(await a(e),g(r.Ru.get("feedback.ban-artist")))}),[i,e,h,l,a,g]),y=h?r.Ru.get("context-menu.unban-artist"):r.Ru.get("context-menu.ban-artist");return(0,f.jsx)(c.D,{role:"menuitem",divider:t,disabled:void 0===h,onClick:v,leadingIcon:h?(0,f.jsx)(s.V,{semanticColor:"essentialNegative",size:"small"}):(0,f.jsx)(o.r,{semanticColor:"textSubdued",size:"small"}),children:y})},y=n.memo((e=>(0,l.NC)(h.wEf,{loadingValue:!1})?(0,f.jsx)(g.pZ,{value:"ban-artist",children:(0,f.jsx)(v,{...e})}):null));var b=i(65183),_=i(9987),E=i(72522),C=i(23561),x=i(91039),S=i(79095),A=i(49813),T=i(96264),I=i(70583),N=i(6576),w=i(71817);const R=n.memo((function({uri:e,sharingInfo:t,canPin:i=I.oT.NO,isPinned:n=!1,useDialogForUnfollow:s=!1,isInLibrary:o}){const{spec:l}=(0,N.o)(e);return(0,f.jsx)(g.pZ,{value:"artist",children:(0,f.jsxs)(a.W,{children:[(0,f.jsx)(_.T5,{uri:e,useDialog:s,initialState:o}),(0,f.jsx)(y,{uri:e}),i!==I.oT.NO&&(0,f.jsx)(S.k,{uri:e,canPin:i,isPinned:n,type:w.c.ARTIST,spec:l}),(0,f.jsx)(E.z,{uri:e,displayText:r.Ru.get("contextmenu.go-to-artist-radio"),spec:l}),(0,f.jsx)(A.P,{spec:l,uri:e}),(0,f.jsxs)(T.h,{children:[(0,f.jsx)(b.m,{spec:l,uri:e,sharingInfo:t,displayText:r.Ru.get("contextmenu.share.copy-artist-link")}),(0,f.jsx)(C.x,{spec:l,uri:e,type:w.c.ARTIST})]}),(0,f.jsx)(x.q,{spec:l,divider:"before",uri:e})]})})}))},71072:(e,t,i)=>{"use strict";i.d(t,{p:()=>A});var n=i(30758),r=i(81987),a=i(11808),s=i(66416),o=i(65183),l=i(23487),c=i(23561),u=i(91039),d=i(79095),m=i(92305),p=i(80425),h=i(49813),g=i(34539),f=i(5861),v=i(96264),y=i(19159),b=i(95302),_=i(70583),E=i(48215),C=i(6576),x=i(71817),S=i(86070);const A=n.memo((function({uri:e,uid:t,contextUri:i,sharingInfo:n,canPin:A=_.oT.NO,isPinned:T=!1,useDialogForUnfollow:I=!1,isInLibrary:N,includeGoToAudiobook:w,canBeRemovedFromPlaylist:R,isPreRelease:k=!1}){const O=(0,r.NC)(y.McC,{loadingValue:!1}),{spec:P}=(0,C.o)(e),L=(0,r.NC)(y.y4c,{loadingValue:!1}),j=(0,r.NC)(y.skl),{data:D}=(0,E.W)(e);return(0,S.jsx)(b.pZ,{value:"show",children:(0,S.jsxs)(s.W,{children:[O&&!k&&(0,S.jsx)(f.o,{spec:P,uris:[e]}),O&&t&&(0,S.jsx)(p.D,{uris:[e],uids:[t],playlistUri:i||"",canBeRemoved:R}),(0,S.jsx)(g.tt,{uri:e,useDialog:I,initialState:N,spec:P,divider:"after"}),w&&(0,S.jsx)(l.fe,{uri:e,contextUri:i,divider:"after"}),j&&!k&&(0,S.jsx)(m.R,{uri:e,rateLabel:a.Ru.get("web-player.audiobooks.rating.rateThisAudiobook"),metadata:D}),A!==_.oT.NO&&(0,S.jsx)(d.k,{uri:e,canPin:A,isPinned:T,type:x.c.AUDIOBOOK,spec:P}),k?(0,S.jsx)(o.m,{spec:P,uri:e,sharingInfo:n,displayText:a.Ru.get("context-menu.copy-book-link")}):(0,S.jsxs)(v.h,{children:[(0,S.jsx)(o.m,{spec:P,uri:e,sharingInfo:n,displayText:a.Ru.get("context-menu.copy-book-link")}),(0,S.jsx)(c.x,{spec:P,uri:e,type:x.c.AUDIOBOOK})]}),L&&(0,S.jsx)(h.P,{spec:P,uri:e}),(0,S.jsx)(u.q,{spec:P,divider:"before",uri:e})]})})}))},99686:(e,t,i)=>{"use strict";i.d(t,{r:()=>p});var n=i(30758),r=i(81987),a=i(66416),s=i(30038),o=i(58235),l=i(49813),c=i(19159),u=i(95302),d=i(6576),m=i(86070);const p=n.memo((function({uri:e,removeFromQueueData:t}){const{spec:i}=(0,d.o)(e),n=(0,r.NC)(c.pCm,{loadingValue:!1});return(0,m.jsx)(u.pZ,{value:"chapter",children:(0,m.jsxs)(a.W,{children:[(0,m.jsx)(s.K,{spec:i,uris:[e]}),t&&(0,m.jsx)(o.c,{spec:i,uids:t.uid?[t.uid]:[],uris:[e],contextUri:t.contextUri}),n&&(0,m.jsx)(l.P,{spec:i,uri:e})]})})}))},58345:(e,t,i)=>{"use strict";i.d(t,{b:()=>P});var n=i(30758),r=i(81987),a=i(11808),s=i(66416),o=i(30038),l=i(65183),c=i(23038),u=i(23487),d=i(75930),m=i(5162),p=i(83542),h=i(95302),g=i(11898),f=i(86070);const v=({uri:e,isPlayed:t,onChange:i=(()=>{}),divider:r})=>{const s=(0,g.f)(),o=(0,n.useCallback)((()=>{t?s.markAsUnPlayed(e):s.markAsPlayed(e),i(!t)}),[s,i,t,e]);return s.getCapabilities()?.canMarkEpisodesAsDone?(0,f.jsx)(p.D,{role:"menuitem",divider:r,onClick:o,testid:"mark-as-played-or-unplayed","data-test-state":t?"played":"unplayed",leadingIcon:t?(0,f.jsx)(d.k,{semanticColor:"textBrightAccent",size:"small"}):(0,f.jsx)(m.i,{semanticColor:"textSubdued",size:"small"}),children:t?a.Ru.get("contextmenu.mark-as-unplayed"):a.Ru.get("contextmenu.mark-as-played")}):null},y=n.memo((function(e){return(0,f.jsx)(h.pZ,{value:"mark-as-played",children:(0,f.jsx)(v,{...e})})}));var b=i(23561),_=i(91039),E=i(80425),C=i(58235),x=i(49813),S=i(34539),A=i(5861),T=i(99686),I=i(96264),N=i(19159),w=i(35818),R=i(94901),k=i(6576),O=i(71817);const P=n.memo((function({uri:e,isPlayed:t=null,contextUri:i,uid:n,sharingInfo:d,onMarkAsPlayed:m=(()=>{}),canBeRemovedFromPlaylist:p,provider:g}){const v=(0,w.d)(e),{spec:P}=(0,k.o)(e),L=(0,r.NC)(N.qht,{loadingValue:!1});if(void 0===v?.episodeOrChapter)return null;const j=v.episodeOrChapter;if((0,R.Gr)(j))return(0,f.jsx)(T.r,{uri:e});const D=!(j.podcastSubscription.isPaywalled&&!j.podcastSubscription.isUserSubscribed),M="autoplay"===g;return v?.episodeOrChapter?(0,f.jsx)(h.pZ,{value:"episode",children:(0,f.jsxs)(s.W,{children:[(0,f.jsx)(A.o,{spec:P,uris:[e]}),n&&(0,f.jsx)(E.D,{uris:[e],uids:[n],playlistUri:i||"",canBeRemoved:p}),(0,f.jsx)(S.N7,{uri:e,spec:P}),(0,f.jsx)(o.K,{spec:P,uris:[e]}),n&&!M&&(0,f.jsx)(C.c,{spec:P,uids:[n],uris:[e],contextUri:i}),(0,f.jsx)(c.u,{spec:P,uri:e,canDownload:D}),(0,f.jsx)(u.du,{uri:e,contextUri:i}),null!==t&&(0,f.jsx)(y,{uri:e,isPlayed:t,onChange:m}),(0,f.jsxs)(I.h,{divider:"before",children:[(0,f.jsx)(l.m,{spec:P,uri:e,sharingInfo:d,displayText:a.Ru.get("context-menu.copy-episode-link")}),(0,f.jsx)(b.x,{spec:P,uri:e,type:O.c.EPISODE})]}),L&&(0,f.jsx)(x.P,{spec:P,uri:e}),(0,f.jsx)(_.q,{divider:"before",uri:e,spec:P,context:i})]})}):null}))},39685:(e,t,i)=>{"use strict";i.d(t,{I:()=>h});var n=i(30758),r=i(69725),a=i(11808),s=i(61921),o=i(23487),l=i(15742),c=i(8385);const u=Spicetify.GraphQL.Definitions["queryTrackArtists"]=new l.l("queryTrackArtists","query","47fe6e7ca333272699906da2964bfa38336c2aa28303489997404a82bd46e056",null);var d=i(43396),m=i(95302),p=i(86070);const h=n.memo((function({trackUri:e,contextUri:t,menuBoundary:i}){let n=[];const l=(h={uri:e},(0,c.I)(u,h,g));var h,g;"Track"===l.data?.trackUnion.__typename&&(n=l.data.trackUnion.artists.items.map((e=>({uri:e.uri,name:e.profile.name}))));const f=(0,d.W)();return(0,p.jsx)(s.g,{displayText:a.Ru.get("contextmenu.go-to-artist"),depth:1,placement:f?"left-start":"right-start",leadingIcon:(0,p.jsx)(r.r,{semanticColor:"textSubdued",size:"small"}),menuBoundary:i,children:(0,p.jsx)(m.pZ,{value:"go-to-artist",children:n.map((({uri:e,name:i})=>(0,p.jsx)(o.Jn,{displayText:i,uri:e,contextUri:t,hideLeadingIcon:!0},e)))})})}))},49350:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var n=i(30758),r=i(66416),a=i(30038),s=i(80425),o=i(58235),l=i(34539),c=i(5861),u=i(95302),d=i(6576),m=i(86070);const p=n.memo((function({uri:e,uid:t,contextUri:i,canBeRemovedFromPlaylist:n}){const{spec:p}=(0,d.o)(e);return(0,m.jsx)(u.pZ,{value:"local-file",children:(0,m.jsxs)(r.W,{children:[(0,m.jsx)(c.o,{spec:p,uris:[e]}),t&&(0,m.jsx)(s.D,{uris:[e],uids:[t],playlistUri:i||"",canBeRemoved:n}),(0,m.jsx)(l.TR,{uri:e,spec:p}),(0,m.jsx)(a.K,{spec:p,uris:[e]}),t&&(0,m.jsx)(o.c,{spec:p,uids:[t],uris:[e],contextUri:i})]})})}))},40440:(e,t,i)=>{"use strict";i.d(t,{W:()=>M});var n=i(30758),r=i(11808),a=i(66416),s=i(13367),o=i(30038),l=i(65183),c=i(71955),u=i(23038),d=i(31055),m=i(9987),p=i(91619),h=i(91795),g=i(82751),f=i(23561),v=i(91039),y=i(79095),b=i(3711),_=i(463),E=i(49813),C=i(58357),x=i(5861),S=i(96264),A=i(80561),T=i(35219),I=i(10608),N=i(95302),w=i(70583),R=i(62720),k=i(42299),O=i(49993),P=i(6576),L=i(71817),j=i(86070);const D=n.memo((function({uri:e,isPublished:t,canPin:i=w.oT.NO,isPinned:n=!1}){const T=(0,k.J)(e,{decorateFormatListData:!0}),[I]=(0,R.A)(e),{spec:D}=(0,P.o)(e),M=!!T?.permissions?.isPrivate,U=(0,O.v)(e)??T?.isPublished??t,B=T?.hasSpotifyAudiobooks;return T?.permissions&&!T.permissions.canView&&I?T&&(0,j.jsx)(N.pZ,{value:"playlist",children:(0,j.jsx)(a.W,{children:(0,j.jsx)(m.ET,{uri:e})})}):T&&(0,j.jsx)(N.pZ,{value:"playlist",children:(0,j.jsxs)(a.W,{children:[!T.isOwnedBySelf&&(0,j.jsx)(m.ET,{uri:e}),!B&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(o.K,{spec:D,uris:[e]}),(0,j.jsx)(A._,{uri:e,spec:D})]}),I&&!M&&(0,j.jsx)(_._,{spec:D,divider:"both",uri:e,isPublished:U}),T.isOwnedBySelf&&(0,j.jsx)(d.T,{spec:D,uri:e,name:T.name,description:T.description,image:T.images[0]}),!T.isOwnedBySelf&&(0,j.jsx)(E.P,{spec:D,uri:e}),T.isOwnedBySelf&&(0,j.jsx)(c.u,{spec:D,uri:e}),!B&&(0,j.jsx)(u.d,{spec:D,uri:e}),T.permissions?.canAdministratePermissions&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b.U,{spec:D,divider:"before",uri:e,isPrivate:M}),!B&&(0,j.jsx)(h.n,{uri:e,spec:D})]}),T.permissions?.canCancelMembership&&(0,j.jsx)(g._,{spec:D,divider:"before",uri:e}),(0,j.jsx)(p.w,{spec:D,uri:e}),(0,j.jsx)(C.y,{uriToBeAdded:e,isInLibrary:I,spec:D}),!B&&(0,j.jsx)(x.o,{spec:D,uris:[e],isPlaylist:!0,isEmpty:0===T.totalLength}),i!==w.oT.NO&&(0,j.jsx)(y.k,{uri:e,canPin:i,isPinned:n,type:L.c.PLAYLIST,spec:D}),(T.isOwnedBySelf||!M)&&(0,j.jsxs)(S.h,{divider:"before",children:[(0,j.jsx)(l.m,{spec:D,uri:e,displayText:r.Ru.get("contextmenu.share.copy-playlist-link"),isPrivatePlaylist:M}),!T.hasSpotifyAudiobooks&&(0,j.jsx)(f.x,{spec:D,uri:e,type:L.c.PLAYLIST})]}),!!T?.formatListData&&(0,j.jsx)(s.r,{divider:"before"}),(0,j.jsx)(v.q,{spec:D,divider:"before",uri:e})]})})})),M=e=>(0,I.c0)(e.uri)?(0,j.jsx)(T.g,{}):(0,j.jsx)(D,{...e})},96264:(e,t,i)=>{"use strict";i.d(t,{h:()=>u});var n=i(30758),r=i(69808),a=i(11808),s=i(61921),o=i(43396),l=i(95302),c=i(86070);const u=n.memo((function({children:e,divider:t,menuBoundary:i}){const n=(0,o.W)();return(0,c.jsx)(l.pZ,{value:"share",children:(0,c.jsx)(s.g,{divider:t,displayText:a.Ru.get("contextmenu.share"),placement:n?"left-start":"right-start",leadingIcon:(0,c.jsx)(r.C,{semanticColor:"textSubdued",size:"small"}),menuBoundary:i,children:e})})}))},38916:(e,t,i)=>{"use strict";i.d(t,{H:()=>S});var n=i(30758),r=i(81987),a=i(11808),s=i(66416),o=i(65183),l=i(9987),c=i(23561),u=i(91039),d=i(79095),m=i(92305),p=i(49813),h=i(71072),g=i(96264),f=i(19159),v=i(95302),y=i(70583),b=i(48215),_=i(94901),E=i(6576),C=i(71817),x=i(86070);const S=n.memo((function({uri:e,sharingInfo:t,canPin:i=y.oT.NO,isPinned:n=!1,useDialogForUnfollow:S,isInLibrary:A}){const{spec:T}=(0,E.o)(e),I=(0,r.NC)(f.yt8,{loadingValue:!1}),N=(0,r.NC)(f.skl),{data:w}=(0,b.W)(e);return w&&(0,_.Go)(w)?(0,x.jsx)(h.p,{uri:e,sharingInfo:t,useDialogForUnfollow:!0,isInLibrary:A}):(0,x.jsx)(v.pZ,{value:"show",children:(0,x.jsxs)(s.W,{children:[(0,x.jsx)(l.jK,{uri:e,useDialog:S,initialState:A}),N&&(0,x.jsx)(m.R,{uri:e,rateLabel:a.Ru.get("web-player.show.rating.rateShow"),metadata:w}),i!==y.oT.NO&&(0,x.jsx)(d.k,{uri:e,canPin:i,isPinned:n,type:C.c.SHOW,spec:T}),(0,x.jsxs)(g.h,{children:[(0,x.jsx)(o.m,{spec:T,uri:e,sharingInfo:t,displayText:a.Ru.get("context-menu.copy-show-link")}),(0,x.jsx)(c.x,{spec:T,uri:e,type:C.c.SHOW})]}),I&&(0,x.jsx)(p.P,{spec:T,uri:e}),(0,x.jsx)(u.q,{spec:T,divider:"before",uri:e})]})})}))},48100:(e,t,i)=>{"use strict";i.d(t,{P:()=>H});var n=i(30758),r=i(17298),a=i(11808),s=i(66416),o=i(13367),l=i(34861),c=i(61544),u=i(83542),d=i(61943),m=i(42299),p=i(86070);const h=({uri:e,uid:t,contextUri:i,spec:r,logger:s,divider:o})=>{const m=(0,n.useCallback)((()=>{let t;i&&(0,c.tb)(i)?t=r.addRecommendationFactory().hitAddToPlaylist({playlist:i??"",itemToBeAdded:e}):i&&(0,c.Z0)(i)&&(t=r.addRecommendationFactory().hitLike({itemToBeLiked:e})),t&&s.logInteraction(t)}),[i,s,r,e]),{addRecommendation:h}=(0,d.t)({uri:e,uid:t,contextUri:i,onAddRecommendation:m});return(0,p.jsx)(u.D,{role:"menuitem",divider:o,onClick:h,leadingIcon:(0,p.jsx)(l.v,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.add-recommendation-to-this-playlist")})},g=e=>{const t=(0,m.J)(e.contextUri);return t?.canAdd?(0,p.jsx)(h,{...e}):null},f=e=>e.contextUri&&(0,c.tb)(e.contextUri)?(0,p.jsx)(g,{...e}):e.contextUri&&(0,c.Z0)(e.contextUri)?(0,p.jsx)(h,{...e}):null;var v=i(30038),y=i(65183),b=i(23487),_=i(72522),E=i(23561),C=i(91039),x=i(80425),S=i(58235),A=i(4977);const T=({uri:e,uid:t,contextUri:i,spec:r,logger:s,divider:o})=>{const l=(0,n.useCallback)((()=>{s.logInteraction(r.removeRecommendationFactory().hitRemoveRecommendation({contextUri:i??"",recommendedItemUri:e}))}),[i,s,r,e]),{removeRecommendation:c}=(0,d.t)({uri:e,uid:t,contextUri:i,onRemoveRecommendation:l});return(0,p.jsx)(u.D,{role:"menuitem",divider:o,onClick:c,leadingIcon:(0,p.jsx)(A.x,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.remove-recommendation")})};var I=i(34539),N=i(707),w=i(16015),R=i(5861),k=i(39685),O=i(96264),P=i(53212),L=i(80561),j=i(95302),D=i(6576),M=i(72091),U=i(71817);const B=n.memo((function({uri:e,uid:t,artists:i=[],albumUri:n,contextUri:l,sharingInfo:c,removePlaylistItems:u,isSmartRecommendation:d,entityContextUri:m=l,canBeRemovedFromPlaylist:h,provider:g,showCanvasAction:A=!1,menuBoundary:P}){const{spec:B,logger:F,UBIFragment:H}=(0,M.r)(r.w,{data:{uri:e}}),{spec:V}=(0,D.o)(e),G="autoplay"===g||d;return(0,p.jsx)(H,{spec:B,children:(0,p.jsx)(j.pZ,{value:"track","":"track-menu",children:(0,p.jsxs)(s.W,{children:[d&&m?(0,p.jsx)(f,{uri:e,uid:t,contextUri:m,spec:B,logger:F}):null,d&&m?(0,p.jsx)(T,{uri:e,uid:t,contextUri:m,spec:B,logger:F,divider:"after"}):null,(0,p.jsx)(R.o,{spec:V,uris:[e],isSmartRecommendation:d,menuBoundary:P}),t&&!G?(0,p.jsx)(x.D,{uris:[e],uids:[t],playlistUri:l||"",removePlaylistItems:u,canBeRemoved:h}):null,(0,p.jsx)(I.TR,{uri:e,spec:V}),(0,p.jsx)(v.K,{spec:V,uris:[e]}),t&&(0,p.jsx)(S.c,{spec:V,uids:[t],uris:[e],contextUri:l}),(0,p.jsx)(L._,{contextUri:m,uri:e,spec:V}),(0,p.jsx)(_.z,{spec:V,uri:e,displayText:a.Ru.get("contextmenu.go-to-song-radio"),divider:"before"}),i.length>1?(0,p.jsx)(k.I,{trackUri:e,contextUri:l,menuBoundary:P}):(0,p.jsx)(b.Jn,{uri:i?.[0]?.uri,contextUri:l}),(0,p.jsx)(b.V9,{uri:n,contextUri:l,highlightedUri:e}),(0,p.jsx)(w.I,{uri:e,displayText:a.Ru.get("contextmenu.show-credits"),ubiLogger:F,contextMenuSpec:B}),A&&(0,p.jsx)(N.i,{spec:V}),(0,p.jsxs)(O.h,{divider:"before",menuBoundary:P,children:[(0,p.jsx)(y.m,{spec:V,uri:e,sharingInfo:c,displayText:a.Ru.get("context-menu.copy-track-link")}),(0,p.jsx)(E.x,{spec:V,uri:e,type:U.c.TRACK})]}),G&&(0,p.jsx)(o.r,{divider:"before"}),(0,p.jsx)(C.q,{spec:V,divider:"before",uri:e,context:l})]})})})})),F=e=>{const{showCanvasToggleInContextMenu:t}=(0,P.a)({tryAvoidGraphQLFetching:!1});return(0,p.jsx)(B,{...e,showCanvasAction:t})},H=n.memo((function({canSwitchVisuals:e,...t}){return e?(0,p.jsx)(F,{...t}):(0,p.jsx)(B,{...t,showCanvasAction:!1})}))},91584:(e,t,i)=>{"use strict";i.d(t,{B:()=>z});var n=i(30758),r=i(41978),a=i(11808),s=i(66416),o=i(24944),l=i(90751),c=i(83542),u=i(73015),d=i(45346),m=i(52608),p=i(95302),h=i(59744),g=i(40312),f=i(46361),v=i(21596),y=i(86070);const b=({currentUserUri:e,uri:t,name:i,divider:s})=>{const p=(0,d.W)(),b=!(0,m.n)(),{isBlocked:_,blockUser:E,unblockUser:C}=function(e,t,i){const[s,o]=(0,n.useState)(!1),c=(0,r.wA)(),d=(0,h.a)(),m=(0,v.A9)(),{enqueueSnackbar:p}=(0,u.d)();return(0,n.useEffect)((()=>{e&&(0,f.zP)(m,{currentUserUri:e,uri:t}).then((e=>{if(d()){if(200!==e.status)throw new Error("Invalid response from socialgraph");o(e.body?.[0]?.is_dismissed||!1)}}))}),[e,t,d,m]),{isBlocked:s,blockUser:()=>{e&&c((0,l.zj)(t,i))},unblockUser:async()=>{e&&(await(0,f.kV)(g.n.getInstance(),{currentUserUri:e,uri:t}),p(a.Ru.get("feedback.unblock-user")))}}}(e,t,i),x=(0,n.useCallback)((async()=>{p({targetUri:t,intent:_?"unblock":"block",type:"click"}),_?await C():await E()}),[p,t,E,C,_]);if(!e||e===t)return null;const S=_?a.Ru.get("contextmenu.unblock"):a.Ru.get("contextmenu.block");return(0,y.jsx)(c.D,{role:"menuitem",divider:s,disabled:b,onClick:x,leadingIcon:(0,y.jsx)(o.V,{semanticColor:"textSubdued",size:"small"}),children:S})},_=n.memo((function(e){return(0,y.jsx)(p.pZ,{value:"block-user",children:(0,y.jsx)(b,{...e})})}));var E=i(65183),C=i(17652);const x=n.memo((function({onClick:e,divider:t,canEdit:i}){return e&&i?(0,y.jsx)(p.pZ,{value:"edit-profile",children:(0,y.jsx)(c.D,{role:"menuitem",divider:t,onClick:e,leadingIcon:(0,y.jsx)(C.G,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("contextmenu.edit-profile")})}):null}));var S=i(43178),A=i(88647),T=i(42349),I=i(419),N=i(7939),w=i(72091);const R=()=>{},k=({uri:e,divider:t,onRemoveCallback:i=R})=>{const{spec:s,logger:o}=(0,w.r)(T.F,{data:{uri:e}}),l=(0,d.W)(),u=!(0,m.n)(),p=(0,r.d4)(N.Ht).user,[h,g]=(0,I.Y)(e),f=(0,n.useCallback)((()=>{const t=s.followButtonFactory();l({targetUri:e,intent:h?"unfollow":"follow",type:"click"}),h?(g(!1),o.logInteraction(t.hitUnfollow({itemToBeUnfollowed:e})),i(e)):(g(!0),o.logInteraction(t.hitFollow({itemToBeFollowed:e})))}),[h,o,l,i,g,s,e]);if(p&&p.uri===e)return null;const v=h?a.Ru.get("contextmenu.unfollow"):a.Ru.get("contextmenu.follow");return(0,y.jsx)(c.D,{role:"menuitem",testid:"follow-user-context-menu-item",divider:t,disabled:u,onClick:f,leadingIcon:h?(0,y.jsx)(S.M,{semanticColor:"textBrightAccent",size:"small"}):(0,y.jsx)(A.h,{semanticColor:"textSubdued",size:"small"}),children:v})},O=n.memo((function(e){return(0,y.jsx)(p.pZ,{value:"follow-user",children:(0,y.jsx)(k,{...e})})}));var P=i(49813),L=i(57262),j=i(36721),D=i(13874),M=i(42047),U=i(86523),B=i(89128);function F({userUri:e}){const{currentSession:t}=(0,M.D)(),i=(0,U.d)(),s=(0,r.wA)(),o=(0,n.useCallback)((()=>{const i=(0,B.Bj)(t?.sessionMembers??[],e);i&&s((0,l.A9)(D.EL.REMOVE_PARTICIPANT,void 0,i))}),[t?.sessionMembers,s,e]),u=(0,B.kt)(i,e);return t?.active&&e&&u?(0,y.jsx)(c.D,{role:"menuitem",onClick:o,leadingIcon:(0,y.jsx)(j.f,{semanticColor:"textSubdued",size:"small"}),children:a.Ru.get("web-player.social-connect.kick-users.remove-the-user")}):(0,y.jsx)(y.Fragment,{})}var H=i(19159),V=i(79973),G=i(6576);const z=n.memo((function({uri:e,onEditProfileCallback:t}){const{user:i}=(0,r.d4)(N.Ht),{spec:n}=(0,G.o)(e),{data:o,loading:l}=(0,V.Z)(f.E$,[{uri:e}]);return l?null:o?(0,y.jsx)(p.pZ,{value:"user",children:(0,y.jsxs)(s.W,{children:[(0,y.jsx)(O,{uri:e}),(0,y.jsx)(F,{userUri:e}),(0,y.jsx)(L.u,{property:H.NAP,renderNewExperience:()=>(0,y.jsx)(_,{uri:o.uri,name:o.name,currentUserUri:i?.uri})}),(0,y.jsx)(x,{onClick:t,canEdit:!(e!==i?.uri||o.edit_image_disabled&&o.edit_name_disabled)}),(0,y.jsx)(P.P,{spec:n,uri:e,canReportUser:!o.report_abuse_disabled,currentUserUri:i?.uri}),(0,y.jsx)(E.m,{spec:n,uri:e,displayText:a.Ru.get("contextmenu.share.copy-profile-link")})]})}):null}))},11098:(e,t,i)=>{"use strict";i.d(t,{o:()=>O});var n=i(30758),r=i(17298),a=i(11808),s=i(66416),o=i(30038),l=i(65183),c=i(23487),u=i(72522),d=i(23561),m=i(91039),p=i(80425),h=i(58235),g=i(34539),f=i(707),v=i(16015),y=i(5861),b=i(39685),_=i(96264),E=i(53212),C=i(80561),x=i(9285),S=i(95302),A=i(2435),T=i(6576),I=i(72091),N=i(71817),w=i(86070);const R=n.memo((function({uri:e,uid:t,artists:i=[],albumUri:n,contextUri:E,sharingInfo:R,removePlaylistItems:k,canBeRemovedFromPlaylist:O,showCanvasAction:P=!1}){const L=(0,A.o)((e=>e),((e,t)=>e?.item?.uri===t?.item?.uri)),j=L?.item?.uri,D=(0,x.i)(e),M=j===e,{spec:U,logger:B,UBIFragment:F}=(0,I.r)(r.w,{data:{uri:D}}),{spec:H}=(0,T.o)(e);return(0,w.jsx)(F,{spec:U,children:(0,w.jsx)(S.pZ,{value:"track","":"track-menu",children:(0,w.jsxs)(s.W,{children:[M&&(0,w.jsx)(y.o,{spec:H,uris:[D]}),M&&t&&(0,w.jsx)(p.D,{uris:[D],uids:[t],playlistUri:E||"",removePlaylistItems:k,canBeRemoved:O}),M&&(0,w.jsx)(g.TR,{uri:D,spec:H}),(0,w.jsx)(o.K,{spec:H,uris:[e]}),t&&(0,w.jsx)(h.c,{spec:H,uids:[t],uris:[e],contextUri:E}),(0,w.jsx)(C._,{uri:e,contextUri:E,spec:H}),M&&(0,w.jsx)(u.z,{spec:H,uri:D,displayText:a.Ru.get("contextmenu.go-to-song-radio"),divider:"before"}),i.length>1?(0,w.jsx)(b.I,{trackUri:e,contextUri:E}):(0,w.jsx)(c.Jn,{uri:i?.[0]?.uri,contextUri:E}),(0,w.jsx)(c.V9,{uri:n,contextUri:E,highlightedUri:D}),(0,w.jsx)(v.I,{uri:D,displayText:a.Ru.get("contextmenu.show-credits"),ubiLogger:B,contextMenuSpec:U}),P&&(0,w.jsx)(f.i,{spec:H}),(0,w.jsxs)(_.h,{divider:"before",children:[(0,w.jsx)(l.m,{spec:H,uri:e,sharingInfo:R,displayText:a.Ru.get("context-menu.copy-track-link")}),(0,w.jsx)(d.x,{spec:H,uri:e,type:N.c.TRACK})]}),(0,w.jsx)(m.q,{spec:H,divider:"before",uri:e,context:E})]})})})})),k=e=>{const{showCanvasToggleInContextMenu:t}=(0,E.a)({tryAvoidGraphQLFetching:!1});return(0,w.jsx)(R,{...e,showCanvasAction:t})},O=n.memo((function({canSwitchVisuals:e,...t}){return e?(0,w.jsx)(k,{...t}):(0,w.jsx)(R,{...t,showCanvasAction:!1})}))},64350:(e,t,i)=>{"use strict";i.d(t,{G:()=>T});var n=i(97500),r=i.n(n),a=i(11808),s=i(12783);const o="YNXLVjlRXPfM4xObTojA",l="CVRy4NtxZYSle8dJ1E67",c="holKDGFNEFSz85czBeSv",u="gqidZhN1lgoZDfI_7E6w",d="_IQ8dgA5pEr_V8PfUkWa",m="xNkPMA_OvAxcFTdfyroI";var p=i(86070);const h=({value:e,label:t,hasDivider:i=!1})=>(0,p.jsxs)("div",{className:c,"aria-hidden":"true",children:[(0,p.jsx)(s.E,{variant:"titleSmall",className:r()({[d]:i}),children:e}),(0,p.jsx)(s.E,{variant:"marginal",semanticColor:"textSubdued",children:t})]});var g=i(30758);const f=1e3,v=60*f,y=60*v,b=24*y;var _=i(65570),E=i(6200);const C={days:0,hours:0,minutes:0,seconds:0};function x(e){return e>0?function(e){const t=Math.abs(e);return{days:Math.floor(t/b),hours:Math.floor(t%b/y),minutes:Math.floor(t%y/v),seconds:Math.floor(t%v/f)}}(e):C}var S=i(67464),A=i(71817);const T=({targetDate:e,className:t,onComplete:i,images:n,imageTitle:s})=>{const{days:c,hours:d,minutes:f,seconds:v}=((e,t)=>{const i=(0,g.useRef)(t);i.current=t;const[n,r]=(0,g.useState)((()=>x((0,_.u)(e))));return(0,E.$)((t=>{const n=(0,_.u)(e),a=x(n);r(a),n<=0&&(t(),i.current?.())}),1e3),n})(e,i),y=void 0!==n&&n.length>0&&s,b=a.Ru.get("web-player.prerelease.countdown_label",{days:c,hours:d,minutes:f,seconds:v});return(0,p.jsxs)("div",{className:r()(o,t,{[l]:y}),role:"timer",children:[(0,p.jsx)("span",{className:m,children:b}),y&&(0,p.jsx)(S.b,{images:n,type:A.c.ALBUM,shape:S.u.ROUNDED_CORNERS,className:u,title:s}),(0,p.jsx)(h,{value:c,label:a.Ru.get("web-player.prerelease.days",c),hasDivider:!0}),(0,p.jsx)(h,{value:d,label:a.Ru.get("web-player.prerelease.hours",d),hasDivider:!0}),(0,p.jsx)(h,{value:f,label:a.Ru.get("web-player.prerelease.minutes",f),hasDivider:!0}),(0,p.jsx)(h,{value:v,label:a.Ru.get("web-player.prerelease.seconds",v)})]})}},37582:(e,t,i)=>{"use strict";i.d(t,{N:()=>p});var n=i(30758),r=i(97500),a=i.n(r),s=i(578),o=i(57276);const l="cover-art",c="cover-art-auto-height",u="cover-art-icon",d="cover-art-image";var m=i(86070);const p=(0,n.memo)((function({imgSrc:e,className:t,onClick:i,type:n,width:r,height:p,loading:h="lazy"}){const g=a()(l,t,{[c]:!p});return(0,m.jsxs)("div",{className:g,style:{width:r||"auto",height:p||"auto"},onClick:i,"aria-hidden":"true",children:[(0,m.jsx)("div",{className:u,children:(0,m.jsx)(s.s,{type:n})}),(0,m.jsx)(o._,{testid:"cover-art-image",loading:h,src:e,className:d})]})}))},72953:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var n=i(30758),r=i(97500),a=i.n(r),s=i(61544),o=i(31225),l=i(86070);const c="div";class u extends n.Component{constructor(e){super(e),this.state={isDropTargetActive:!1},this.enterEventCount=0,this.leaveEventCount=0}componentDidMount(){document.body.addEventListener("dragend",this.handleDragEnd)}shouldComponentUpdate(e,t){return t.isDropTargetActive!==this.state.isDropTargetActive||e.children!==this.props.children||e.onDragEnter!==this.props.onDragEnter||e.onDragLeave!==this.props.onDragLeave||e.onDrop!==this.props.onDrop||e.types.length!==this.props.types.length||e.types.some(((e,t)=>e!==this.props.types[t]))}componentWillUnmount(){document.body.removeEventListener("dragend",this.handleDragEnd)}handleDragOver=e=>{this.getMatchingMimeTypes(e).length>0&&(e.preventDefault(),e.dataTransfer.dropEffect="copy")};handleDragEnter=e=>{this.enterEventCount&&!e.relatedTarget||(this.enterEventCount++,1===this.enterEventCount&&this.getMatchingMimeTypes(e).length>0&&(this.props.onDragEnter?.(e),this.setState({isDropTargetActive:!0})))};handleDragLeave=e=>{this.leaveEventCount++,this.leaveEventCount===this.enterEventCount&&this.getMatchingMimeTypes(e).length>0&&(this.enterEventCount=0,this.leaveEventCount=0,this.props.onDragLeave?.(e),this.setState({isDropTargetActive:!1}))};handleDragEnd=()=>{this.enterEventCount=0,this.leaveEventCount=0};handleDrop=e=>{if(0===this.getMatchingMimeTypes(e).length)return;const{onDragLeave:t,onDrop:i}=this.props,n=this.getMatchingDropData(e);this.enterEventCount=0,this.leaveEventCount=0;const r=e.defaultPrevented;e.preventDefault(),t?.(e),r||i(e,n),this.setState({isDropTargetActive:!1})};getMatchingMimeTypes(e){const t=this.props.types;return Array.from(e.dataTransfer.types).filter((e=>t.includes(e)))}getMatchingDropData(e){const t=this.getMatchingMimeTypes(e),i={};t.forEach((t=>{const n=e.dataTransfer.getData(t),r=0===t.indexOf("text/x-spotify"),a=r?n.split("\n"):[n];i[t]=a.map((e=>{if(r){const t=(0,s.o_)(e);if(t)return t.toURI()}return e})).filter((e=>!!e))}));const n=e.dataTransfer.getData("text/plain");return i.all=n?n.split("\n").map((e=>{const t=(0,s.o_)(e);return t?t.toURI():e})):[],i}render(){const{types:e=[],as:t=c,testId:i,className:n=""}=this.props,r=t,s=e.filter(Boolean).map((e=>`GlueDropTarget--${e.replace("text/x-spotify-","")}`));return(0,l.jsx)(r,{className:a()("GlueDropTarget",s,{"GlueDropTarget--active":this.state.isDropTargetActive},n),onDragOver:this.handleDragOver,onDragEnter:this.handleDragEnter,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop,onContextMenu:this.props.onContextMenu,"":i,children:this.props.children})}}const d=e=>{const{supportsDragAndDrop:t}=(0,o._)();if(!t){const t=e.as??c;return(0,l.jsx)(t,{children:e.children})}return(0,l.jsx)(u,{...e})}},31685:(e,t,i)=>{"use strict";i.d(t,{Q:()=>g});var n=i(51778),r=i(11808),a=i(30758),s=i(95925),o=i(51154);var l=i(85993),c=i(2435),u=i(63135),d=i(95421),m=i(95339),p=i(86070);function h(e){return e.includes("Spotify")?e:`Spotify ${e}`}const g=({children:e,usePlayingItem:t})=>{let i=h(e);(e=>{const{mainLandmarkRef:t}=(0,s.JT)(),i=(0,o.J)(),n=i.location?.state?.preventMoveFocus,r=(0,a.useRef)(i.length<2);r.current=i.length<2,(0,a.useLayoutEffect)((()=>{const i=t.current;!n&&!r.current&&i&&e&&(i.setAttribute("aria-label",e),i.focus({preventScroll:!0}))}),[e,t,n])})(e);const{isPlaying:g}=(0,l.GK)(),f=(0,c.o)((e=>e?.item));return f&&(g||t)&&((0,m.v)(f)?i=[f.name,f.artists.map((e=>e.name)).join(r.Ru.getSeparator())].join(" • "):(0,d.p)(f)?i=[f.name,f.show.name].join(" • "):(0,u.N)(f)&&(i=h(r.Ru.get("ad-formats.advertisement")))),(0,p.jsx)(n.mg,{defaultTitle:"Spotify",defer:!1,children:(0,p.jsx)("title",{children:i})})}},20288:(e,t,i)=>{"use strict";i.d(t,{M:()=>f});var n=i(30758),r=i(97500),a=i.n(r),s=i(21383),o=i(11808),l=i(18486),c=i(88305),u=i(58302),d=i(24679),m=i(85065),p=i(46798);const h="hcxPtZcvjM07S6ydT685";var g=i(86070);const f=n.memo((function({uri:e,className:t,size:i="small",as:n="div"}){const{availability:r}=(0,u.$)(e),f=(0,d.e)(e);return r===m.kw.NO?null:(0,g.jsx)(n,{className:a()(h,t),children:r===m.kw.DOWNLOADING?(0,g.jsx)(c.C,{percentage:f.percentage,size:(0,p.k)(i)}):r===m.kw.WAITING?(0,g.jsx)(l.C,{size:(0,p.k)(i)}):r===m.kw.YES?(0,g.jsx)(s.F,{size:i,title:o.Ru.get("shared.library.filter.downloaded")}):null})}))},18486:(e,t,i)=>{"use strict";i.d(t,{C:()=>a});var n=i(30758),r=i(86070);const a=(0,n.memo)((function({size:e}){const t=2e3,i=20*Math.PI,n=i-.8*i,a=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:`${i} ${i}`,strokeDashoffset:n,stroke:"currentColor",strokeWidth:"2",fill:"transparent",r:10,cx:"12",cy:"12",children:(0,r.jsx)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${a} 12 12`,to:`${360+a} 12 12`,dur:"2000ms",repeatCount:"indefinite"})})})}))},61074:(e,t,i)=>{"use strict";i.d(t,{C:()=>c});var n=i(97500),r=i.n(n),a=i(2976);const s="main-dropDown-dropDown",o="main-dropDown-isSafari";var l=i(86070);const c=({value:e,id:t,children:i,disabled:n,onSelect:c,className:u,dir:d})=>(0,l.jsx)("span",{className:u,children:(0,l.jsx)("select",{className:r()(s,{[o]:(0,a.n)()}),value:e?.toString(),id:t,disabled:n,onBlur:()=>{},onChange:e=>{c(e.target.value)},dir:d,children:i})})},53107:(e,t,i)=>{"use strict";i.d(t,{kS:()=>ve,LK:()=>ge});var n=i(30758),r=i(97500),a=i.n(r),s=i(31186),o=i(12783),l=i(43178),c=i(30171),u=i(42425),d=i(54555),m=i(88311),p=i(64343),h=i(43830),g=i(61544),f=i(11808),v=i(61074),y=i(91335),b=i(67889),_=i(45346);const E=[1,60,3600],C=[3600,60,1],x={seconds:NaN,humanString:"-:--"};function S(e){if(!isFinite(e))return x.humanString;let t=Math.round(e);return C.reduce(((e,i,n)=>{const r=0===e.length?1:2;if(t>=i||e.length>0||n===E.length-2){const n=Math.floor(t/i);t-=n*i,e.push(n.toString().padStart(r,"0"))}return e}),[]).join(":")}function A(e){let t=NaN;if("number"==typeof e)t=Math.round(e);else if("string"==typeof e){const i=e.split(":");i.length<=E.length&&(t=i.reverse().reduce(((e,t,i)=>e+=function(e){const t=parseInt(e,10);return t>=0?t:NaN}(t)*E[i]),0))}return isNaN(t)?x:{seconds:t,humanString:S(t)}}var T=i(95302),I=i(60833),N=i(99008),w=i(94901),R=i(71817),k=i(1696);const O="main-embedWidgetGenerator-container",P="main-embedWidgetGenerator-contentCode",L="main-embedWidgetGenerator-visible",j="main-embedWidgetGenerator-code",D="main-embedWidgetGenerator-timestampInput",M="main-embedWidgetGenerator-content",U="main-embedWidgetGenerator-contentHeader",B="main-embedWidgetGenerator-contentFooter",F="main-embedWidgetGenerator-contentIframe",H="main-embedWidgetGenerator-copyWrapper",V="main-embedWidgetGenerator-copyBtn",G="main-embedWidgetGenerator-darkControl",z="main-embedWidgetGenerator-widthField",W="main-embedWidgetGenerator-tooltipInitiator",K="main-embedWidgetGenerator-tooltip",Y="main-embedWidgetGenerator-transControl",q="main-embedWidgetGenerator-header",Z="main-embedWidgetGenerator-closeBtn",$="main-embedWidgetGenerator-theme",Q="main-embedWidgetGenerator-themeDescription",J="main-embedWidgetGenerator-themeRadio",X="main-embedWidgetGenerator-active",ee="main-embedWidgetGenerator-terms",te="main-embedWidgetGenerator-dimensionsContainer",ie="main-embedWidgetGenerator-dimensionLabel",ne="main-embedWidgetGenerator-dimensionField",re="main-embedWidgetGenerator-crossSep",ae="main-embedWidgetGenerator-startAt",se="main-embedWidgetGenerator-loadingIndicator";var oe=i(86070);const le=352,ce="100%",ue={frameBorder:0,allowFullScreen:!0,allow:["autoplay","clipboard-write","encrypted-media","fullscreen","picture-in-picture"].join("; "),loading:"lazy"};let de=function(e){return e[e.PODCAST_AUDIO=0]="PODCAST_AUDIO",e[e.PODCAST_VIDEO=1]="PODCAST_VIDEO",e[e.TRACK=2]="TRACK",e[e.PLAYLIST=3]="PLAYLIST",e[e.ARTIST=4]="ARTIST",e[e.ALBUM=5]="ALBUM",e}({});const me={disallow:{timestamp:!0,theme:!1,width:!1},defaults:{theme:"1",height:le,width:ce},theme:[["1",null],["0","#282828"]],height:[[le,"normal"],[152,"compact"]],constraints:{width:{min:250,max:600,minPercentage:40,maxPercentage:100}}},pe={[de.PODCAST_AUDIO]:{disallow:{timestamp:!1,theme:!1,width:!1},defaults:{theme:"1",height:le,width:ce},theme:[["1",null],["0","#282828"]],height:[[le,"normal"],[152,"compact"]],constraints:{width:{min:250,max:600,minPercentage:40,maxPercentage:100}}},[de.PODCAST_VIDEO]:{disallow:{timestamp:!1,theme:!1,width:!0},defaults:{theme:"1",height:351,width:624},theme:[["1",null],["0","#282828"]],height:[[351,"normal"],[279,"compact"]],constraints:{width:{min:400,max:700,minPercentage:40,maxPercentage:100}}},[de.TRACK]:me,[de.PLAYLIST]:me,[de.ARTIST]:me,[de.ALBUM]:me},he={disallow:{timestamp:!0,theme:!0,width:!0},defaults:{theme:"1",height:le,width:ce},theme:[],height:[],constraints:{width:{min:250,max:600,minPercentage:40,maxPercentage:100}}};const ge=e=>{switch(e){case R.c.SHOW:return f.Ru.get("ewg.title.show");case R.c.AUDIOBOOK:return f.Ru.get("ewg.title.audiobook");case R.c.EPISODE:return f.Ru.get("ewg.title.episode");case R.c.TRACK:return f.Ru.get("ewg.title.track");case R.c.ALBUM:return f.Ru.get("ewg.title.album");case R.c.ARTIST:return f.Ru.get("ewg.title.artist");case R.c.PLAYLISTV2:case R.c.PLAYLIST:return f.Ru.get("ewg.title.playlist");default:return f.Ru.get("ewg.title")}},fe=({uri:e,currentTrackUri:t,currentPosition:i,isOpen:r,entityType:E})=>{const C=(0,n.useMemo)((()=>(0,g.o_)(e)),[e]),x=t===e,S=ge(E),[T,ce]=(0,n.useState)(null),[me,fe]=(0,n.useState)(null),[ve,ye]=(0,n.useState)(null),[be,_e]=(0,n.useState)(null),[Ee,Ce]=(0,n.useState)(!1),[xe,Se]=(0,n.useState)(!1),[Ae,Te]=(0,n.useState)(x?i??0:0),[Ie,Ne]=(0,n.useState)(!0),[we,Re]=(0,n.useState)(!1),[ke,Oe]=(0,n.useState)(f.Ru.get("ewg.copy")),Pe=null!==T?pe[T]:he,Le=(0,N.T)(),je=(0,I.L)(e,"#FFF"),De=(0,_.W)(),Me=(0,n.useRef)(null),Ue=(0,n.useRef)(null),Be=(0,n.useContext)(y.wv),Fe=(0,n.useCallback)((()=>{Be({type:"close"})}),[Be]),He=()=>{if(!Ue?.current)return;const e=Ue.current.value;if(T){const[t,i]=function(e,t){const{width:i}=pe[e].constraints,n=parseInt(t.replace(/px|%$/,""),10);if(Number.isFinite(n)){if(-1!==t.indexOf("%")){const e=Math.max(i.minPercentage,Math.min(i.maxPercentage,Math.round(n)));return[`${e}%`,`${e}%`]}const e=Math.max(i.min,Math.min(i.max,Math.round(n)));return[`${e}px`,e.toString()]}return["100%","100%"]}(T,e);Ue.current.value=t,_e(i)}},Ve=()=>{if(Me?.current){const e=A(Me.current.value);Me.current.value=e.humanString,e.seconds!==Ae&&(Ne(!0),Te(e.seconds))}};(0,n.useEffect)((()=>{if(T===de.PODCAST_VIDEO&&ve){const e=parseInt(ve,10);_e(351===e?624..toString():496..toString())}}),[ve,T]),(0,n.useEffect)((()=>{(async()=>{const t=C?.type;if(t===g.NQ.EPISODE){const t=await Le.getEpisodeOrChapter(e);return t.type===R.c.EPISODE&&t.mediaTypes?.includes(w.Cx.Video)?ce(de.PODCAST_VIDEO):ce(de.PODCAST_AUDIO)}if(t===g.NQ.SHOW){const t=E===R.c.SHOW?await Le.getContents(e,{offset:0,limit:1}):await Le.getBookContents(e,{offset:0,limit:1,doRefreshSubscription:!1});if(t.items.length>0&&null!==t.items[0]){const e=await Le.getEpisodeOrChapter(t.items[0].uri);return e.type===R.c.EPISODE&&e.mediaTypes?.includes(w.Cx.Video)?ce(de.PODCAST_VIDEO):ce(de.PODCAST_AUDIO)}}t===g.NQ.TRACK?ce(de.TRACK):t===g.NQ.ARTIST?ce(de.ARTIST):t===g.NQ.ALBUM?ce(de.ALBUM):ce(de.PLAYLIST)})()}),[E,Le,e,C]),(0,n.useEffect)((()=>{ye(Pe.defaults.height.toString()),fe(Pe.defaults.theme),_e(Pe.defaults.width.toString())}),[Pe]);const Ge=T===de.PODCAST_VIDEO,ze=null!==T?function(e,t,i,n,r){const a=(0,g.o_)(e);if(!a)return null;const s=a.toURLPath(),o=new URL(`https://open.spotify.com/embed/${s}${r?"/video":""}`);return o.searchParams.set("utm_source","generator"),t&&"1"!==t&&o.searchParams.set("theme",t),i&&void 0!==n&&o.searchParams.set("t",n.toString()),o}(e,me,xe,Ae,Ge):null,We=ze&&Pe!==he&&ve&&be?(0,oe.jsx)("iframe",{onLoad:()=>{Ne(!1)},style:{borderRadius:"12px"},src:ze?.toString(),width:be,height:ve,...ue},ze?.toString()):null,Ke=We?(s.renderToStaticMarkup(We)||"").replace(/src=".*?"/,`src="${ze?.toString()}"`):"";return(0,oe.jsxs)(b.A,{isOpen:r,contentLabel:S,children:[(0,oe.jsxs)("div",{className:a()(O),children:[(0,oe.jsxs)("div",{className:q,children:[(0,oe.jsx)(o.E,{as:"h1",variant:"titleSmall",children:S}),(0,oe.jsx)("button",{className:Z,onClick:()=>{Fe(),De({type:"click",intent:"close"})},children:(0,oe.jsx)(l.M,{size:"small","aria-label":f.Ru.get("close")})})]}),(0,oe.jsxs)("div",{className:M,children:[(0,oe.jsxs)("div",{className:U,children:[(0,oe.jsxs)("div",{className:$,style:{visibility:Pe.disallow.theme?"hidden":"visible"},children:[(0,oe.jsxs)("p",{className:Q,children:[f.Ru.get("ewg.color"),":"]}),Pe.theme.map((([e,t])=>{return(0,oe.jsx)("button",{style:{backgroundColor:null===t?je:t},className:a()(J,{[X]:me===e}),onClick:(i=e,()=>{me!==i&&(Ne(!0),fe(i))})},e);var i}))]}),(0,oe.jsxs)("div",{className:te,children:[(0,oe.jsxs)("div",{className:ie,children:[f.Ru.get("ewg.size"),":"]}),(0,oe.jsxs)("div",{className:ne,children:[ve&&(0,oe.jsx)(v.C,{id:"ewg-height",value:ve,onSelect:ye,children:Pe.height.map((([e,t])=>(0,oe.jsxs)("option",{value:e,children:["normal"===t?f.Ru.get("ewg.size.normal"):f.Ru.get("ewg.size.compact")," ","(",e,"px)"]},e)))}),Pe.disallow.width?null:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("span",{className:re,children:"×"}),(0,oe.jsxs)("div",{className:z,children:[(0,oe.jsx)("input",{className:G,type:"text",ref:Ue,defaultValue:Pe.defaults.width,onKeyUp:e=>{"Enter"===e.key&&He()},onBlur:He}),(0,oe.jsx)(c.H,{"aria-label":f.Ru.get("ewg.help"),"aria-describedby":"ewg-help-text",size:"small",iconOnly:u.N,className:W,onMouseOver:()=>Ce(!0),onMouseLeave:()=>Ce(!1)}),(0,oe.jsx)("div",{onFocus:()=>Ce(!0),onMouseOver:()=>Ce(!0),onMouseLeave:()=>Ce(!1),className:a()(K,{[L]:Ee}),children:(0,oe.jsx)(d.m,{id:"ewg-help-text",children:f.Ru.get("ewg.help-text")})})]})]})]})]})]}),(0,oe.jsxs)("div",{className:F,style:{height:le,maxHeight:"calc(100vh - 402px)"},children:[Ie&&(0,oe.jsx)("div",{className:se,children:(0,oe.jsx)(m.I,{})}),We]}),(0,oe.jsx)("small",{className:ee,dangerouslySetInnerHTML:{__html:f.Ru.get("ewg.terms",{devTerms:"https://developer.spotify.com/terms/",platfRules:"https://www.spotify.com/platform-rules/"})}}),(0,oe.jsxs)("div",{className:B,children:[(0,oe.jsxs)("div",{className:ae,style:{visibility:Pe.disallow.timestamp?"hidden":"visible"},children:[(0,oe.jsx)(p.c,{className:G,checked:xe,type:"checkbox",id:"ewg-timestamp",onChange:e=>{const t=e.currentTarget.checked;xe!==t&&(Ne(!0),Se(t),De({type:"click",intent:"toggle",itemIdSuffix:`timestamp/${t}`}))},"":"timestamp-checkbox"}),(0,oe.jsx)("label",{htmlFor:"ewg-timestamp",children:f.Ru.get("ewg.start-at")}),(0,oe.jsx)("input",{className:a()(Y,D),disabled:!xe,type:"text",defaultValue:A(Math.floor(Ae/1e3).toString()).humanString,ref:Me,onBlur:Ve,onKeyUp:e=>{"Enter"===e.key&&Ve()}})]}),(0,oe.jsxs)("div",{className:H,children:[(0,oe.jsx)(p.c,{className:G,checked:we,type:"checkbox",id:"ewg-showcode",onChange:e=>{const t=e.currentTarget.checked;Re(t),De({type:"click",intent:"show-more",itemIdSuffix:`showcode/${t}`})}}),(0,oe.jsx)("label",{htmlFor:"ewg-showcode",children:f.Ru.get("ewg.showcode")}),(0,oe.jsx)(h.$,{className:V,size:"small",onClick:()=>{(0,k.l)(Ke),De({type:"click",intent:"copy"}),Oe(f.Ru.get("ewg.copied")),setTimeout((()=>Oe(f.Ru.get("ewg.copy"))),5e3)},children:ke})]})]})]})]}),(0,oe.jsx)("section",{className:a()(P,{[L]:we}),children:(0,oe.jsx)("pre",{className:j,"":"iframe-code",children:Ke})})]})},ve=()=>{const e=(0,n.useContext)(y.Fx);return e.uri?(0,oe.jsx)(T.pZ,{value:"embed-widget-generator",children:(0,oe.jsx)(fe,{...e})}):null}},91335:(e,t,i)=>{"use strict";i.d(t,{Fx:()=>o,id:()=>c,wv:()=>s});var n=i(30758),r=i(86070);const a={isOpen:!1,uri:""},s=(0,n.createContext)(void 0),o=(0,n.createContext)(a);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{...a,isOpen:!1};default:throw new Error("Unknown action received!")}}const c=({children:e})=>{const[t,i]=(0,n.useReducer)(l,a);return(0,r.jsx)(s.Provider,{value:i,children:(0,r.jsx)(o.Provider,{value:t,children:e})})}},28754:(e,t,i)=>{"use strict";i.d(t,{p:()=>A});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(43830),l=i(80852),c=i(63332);const u="(min-width: 0px)",d="(min-width: 0px) and (max-width: 767px)",m="(min-width: 768px)",p="(min-width: 768px) and (max-width: 1023px)",h="(min-width: 1024px)",g="(min-width: 1024px) and (max-width: 1279px)",f="(min-width: 1280px)",v="(min-width: 1280px) and (max-width: 1919px)",y="(min-width: 1920px)",b="FvfvGU3jvHRskUU9v9_8",_="Q9AlbZn2EGzy3MTWXa8X",E="mxmxS0y8LiwSs5nueKPT",C="GXxVAveNFStY3pBI_NO4",x="eHcXC2s97InYP7rMNT0H";var S=i(86070);const A=(0,n.memo)((function(e){const{children:t,message:i,title:n,linkTitle:r,linkTo:A,onClick:T,renderInline:I=!1}=e,{isXSOnly:N,isSMOnly:w}={isXS:(0,c.U)(u),isXSOnly:(0,c.U)(d),isSM:(0,c.U)(m),isSMOnly:(0,c.U)(p),isMD:(0,c.U)(h),isMDOnly:(0,c.U)(g),isLG:(0,c.U)(f),isLGOnly:(0,c.U)(v),isXL:(0,c.U)(y)},R=N||w;return(0,S.jsxs)("section",{className:a()(b,{[_]:I}),children:[t,(0,S.jsx)(s.E,{as:"h1",variant:R?"titleSmall":"titleMedium",className:C,children:n}),(0,S.jsx)(s.E,{variant:R?"bodySmall":"bodyMedium",className:x,children:i}),r&&(A||T)&&(0,S.jsx)(o.$,{colorSet:"invertedLight",className:E,href:A,onClick:T,component:l.v,children:r})]})}))},53576:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(30758),r=i(11986),a=i(86070);const s=(0,n.memo)((function({children:e}){return(0,a.jsx)("span",{className:r.A.detailsText,children:e})}))},82442:(e,t,i)=>{"use strict";i.d(t,{z:()=>f,K:()=>g});var n=i(30758),r=i(97500),a=i.n(r),s=i(8143),o=i(31252),l=i(80913);const c={small:"(max-width: 1023px)",medium:"(max-width: 1279px)",large:"(max-width: 1599px)",xlarge:"(min-width: 1600px)"},u=()=>Object.keys(c).find((e=>window.matchMedia(c[e]).matches));var d=i(42116),m=i(45396),p=i(11986),h=i(86070);let g=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.SMALL=1]="SMALL",e[e.LARGE=2]="LARGE",e[e.XLARGE=3]="XLARGE",e}({});const f=({children:e,backgroundColor:t,backgroundImages:i,size:r=g.DEFAULT})=>{const c=(0,n.useRef)(null),f=(0,d.y)(),v=(0,n.useRef)(null),{imageUrl:y}=function(e,t){const[i,r]=(0,n.useState)({imageUrl:""}),[a,s]=(0,n.useState)(u());return(0,o.s)((()=>{s(u())})),(0,n.useLayoutEffect)((()=>{const i=t?.current?t.current.clientWidth:null;if(e&&e.length){const t=(0,l.h)(e,{desiredSize:i??void 0});r({imageUrl:t??""})}else r({imageUrl:""})}),[t,e,a]),i}(i,c),b=(0,n.useCallback)((e=>{const t=e.target,i=t.scrollTop/t.offsetHeight;i>parseInt(p.A.BACKGROUND_HEIGHT_PERCENTAGE,10)/100||requestAnimationFrame((()=>{v.current?.style.setProperty("--scroll",i.toString())}))}),[]);return(0,m.g)(b,{disabled:!y||navigator.hardwareConcurrency<=4}),(0,h.jsxs)("div",{ref:c,className:a()(p.A.container,{[p.A.nonWrapped]:!y,[p.A.withBackgroundImage]:y,[p.A.smallHeader]:r===g.SMALL,[p.A.largeHeader]:r===g.LARGE,[p.A.xlargeHeader]:r===g.XLARGE}),children:[!y&&(0,h.jsx)("div",{className:a()(p.A.backgroundColor),style:{backgroundColor:t}}),!y&&(0,h.jsx)("div",{className:a()(p.A.backgroundColor,p.A.overlay)}),y&&(0,s.createPortal)((0,h.jsxs)("div",{ref:v,children:[(0,h.jsx)("div",{"":"background-image",className:a()(p.A.background,p.A.gradient),style:{backgroundImage:`url(${y})`}}),(0,h.jsx)("div",{className:a()(p.A.background,p.A.overlay),style:{"--bgColor":t}})]}),document.querySelector(".under-main-view")),(0,h.jsx)("div",{className:a()(p.A.contentWrapper,"contentSpacing"),children:(0,h.jsx)(d.o.Provider,{value:f,children:e})})]})}},56341:(e,t,i)=>{"use strict";i.d(t,{K:()=>u});var n=i(30758),r=i(97500),a=i.n(r),s=i(32572),o=i(14627),l=i(11986),c=i(86070);const u=(0,n.memo)((function({dragUri:e,dragMimeType:t,onContextMenu:i,onTouchStart:n,onTouchEnd:r,onClick:u,ariaLabel:d,...m}){const{draggable:p,onDragStart:h}=(0,o.P)({itemUris:e?[e]:[],itemMimeTypes:t?[t]:[],dragLabelText:m.name}),g={className:a()(l.A.imageContainer,l.A.imageContainerNew,{[l.A.imageContainerClickable]:!!u}),draggable:p&&!!e,onDragStart:h,onContextMenu:i,onTouchStart:n,onTouchEnd:r,children:(0,c.jsx)(s.b,{...m})};return u?(0,c.jsx)("button",{...g,"aria-label":d,onClick:u}):(0,c.jsx)("div",{...g})}))},64572:(e,t,i)=>{"use strict";i.d(t,{X:()=>o});var n=i(97500),r=i.n(n),a=i(11986),s=i(86070);const o=({children:e})=>(0,s.jsx)("div",{className:r()(a.A.imageContainer,a.A.imageContainerNew),children:e})},54874:(e,t,i)=>{"use strict";i.d(t,{D:()=>s,e:()=>l});var n=i(11808),r=i(31843),a=i(86070);const s="entityHeaderAdd",o={placement:r.D.bottomLeft,zIndex:1,getTitle:({triggerAction:e})=>((e||{}).type,n.Ru.get("action-trigger.save-library")),getDescription:({triggerAction:e})=>((e||{}).type,n.Ru.get("action-trigger.logged-out-continue"))},l=({children:e})=>(0,a.jsx)(r.y,{id:s,options:o,"":"login-trigger",children:e})},74793:(e,t,i)=>{"use strict";i.d(t,{Y:()=>s});var n=i(30758),r=i(11986),a=i(86070);const s=(0,n.memo)((function({children:e}){return(0,a.jsx)("div",{className:r.A.headerText,children:e})}))},59116:(e,t,i)=>{"use strict";i.d(t,{h:()=>d});var n=i(30758),r=i(97500),a=i.n(r),s=i(50513),o=i(41695),l=i(34629),c=i(11986),u=i(86070);const d=(0,n.forwardRef)((({children:e},t)=>{const i=(0,l.v7)(),{ref:r,inView:d}=(0,s.Wx)({initialInView:!0,rootMargin:"0px 100%",root:i.current}),m=a()(c.A.topbarContent,{[c.A.topbarContentFadeIn]:!d}),p=(0,n.useCallback)((e=>{r(e),t&&("function"==typeof t?t(e):t.current=e)}),[r,t]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{ref:p}),(0,u.jsx)(o.g,{className:m,children:e})]})}))},21752:(e,t,i)=>{"use strict";i.d(t,{X:()=>o});var n=i(12783),r=i(14627),a=i(11986),s=i(86070);const o=({text:e,dragUri:t,dragLabel:i,onContextMenu:o})=>{const{draggable:l,onDragStart:c}=(0,r.P)({itemUris:t?[t]:[],dragLabelText:i});return(0,s.jsx)(n.E,{as:"span",variant:"titleSmall",className:a.A.topbarTitle,draggable:l&&!(!t||!i),onDragStart:c,onContextMenu:o,children:e})}},32572:(e,t,i)=>{"use strict";i.d(t,{b:()=>h,u:()=>p});var n=i(30758),r=i(97500),a=i.n(r),s=i(578),o=i(11986),l=i(86070);const c=({type:e,className:t})=>(0,l.jsx)("div",{className:a()(o.A.image,o.A.imagePlaceholder,t),children:(0,l.jsx)(s.s,{type:e})});var u=i(14627),d=i(53044),m=i(57276);let p=function(e){return e[e.ROUNDED_CORNERS=0]="ROUNDED_CORNERS",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e}({});const h=n.memo(n.forwardRef((function({name:e,images:t,placeholderType:i,renderImage:n,className:r,shape:s=p.SQUARE,loading:h="lazy",dragUri:g,onContextMenu:f},v){const[y,b,_]=(0,d.P)(t),{draggable:E,onDragStart:C}=(0,u.P)({itemUris:g?[g]:[],dragLabelText:e});return(0,l.jsx)("div",{ref:v,onContextMenu:f,className:a()(o.A.image,r),draggable:E&&!(!g||!e),onDragStart:C,children:n?(0,l.jsx)("div",{className:a()(o.A.image,o.A.shadow,{[o.A.roundedCorners]:s===p.ROUNDED_CORNERS,[o.A.circle]:s===p.CIRCLE}),children:n()}):(0,l.jsx)(m._,{loading:h,src:y,alt:e,className:a()(o.A.image,o.A.shadow,{[o.A.roundedCorners]:s===p.ROUNDED_CORNERS,[o.A.circle]:s===p.CIRCLE}),srcSet:b||void 0,sizes:_,children:(0,l.jsx)(c,{type:i,className:a()(o.A.image,o.A.shadow,{[o.A.roundedCorners]:s===p.ROUNDED_CORNERS,[o.A.circle]:s===p.CIRCLE})})})})})))},51271:(e,t,i)=>{"use strict";i.d(t,{t:()=>Y});var n=i(30758),r=i(97500),a=i.n(r),s=i(41978),o=i(12783),l=i(88952),c=i(61544),u=i(11808),d=i(88497),m=i(81987),p=i(85072),h=i(71588),g=i(17202),f=i(91584),v=i(59996),y=i(45311),b=i(19159),_=i(32994),E=i(42116),C=i(11986),x=i(86070);function S(e){return e.displayName||e.name||""}const A=e=>{let t=null;return(0,c.ec)(e)&&(t=(0,x.jsx)(g.t,{uri:e})),(0,c.AP)(e)&&(t=(0,x.jsx)(f.B,{uri:e})),t},T=({creator:e,onClick:t,position:i=0})=>{const r=(0,n.useCallback)((n=>{t?.(n,{position:i,creator:e})}),[e,t,i]);return(0,y.s)(e)?(0,x.jsx)(h.h,{menu:A(e.uri),children:(0,x.jsx)(o.E,{variant:"bodySmallBold",children:(0,x.jsx)(v.N,{"":"creator-link",to:e.uri,onClick:r,children:S(e)})})}):(0,x.jsx)(o.E,{variant:"bodySmall",children:S(e)})},I=({creator:e,onClick:t,isSmallIcon:i})=>{const[n,r]=u.Ru.get("playlist.header.made-for","USER").split("USER");return(0,x.jsxs)("div",{className:a()(C.A.metaDataText,C.A.creatorWrapper,{[C.A.smallMadeForIcon]:i}),children:[(0,x.jsx)(d.D,{semanticColor:"textBrightAccent"}),(0,x.jsx)(o.E,{variant:"bodySmall",children:n}),(0,x.jsx)(T,{creator:e,onClick:t}),r&&(0,x.jsx)(o.E,{variant:"bodySmall",children:r})]})},N=({creator:e,onClick:t,isSmallIcon:i})=>(0,x.jsxs)("div",{className:a()(C.A.metaDataText,C.A.creatorWrapper),children:[e.images.length>0&&(0,x.jsx)(p.e,{label:S(e),images:e.images.map((e=>({url:e.url,width:e.width||null,height:e.height||null}))),width:i?20:24,userIconSize:i?"xsmall":"small"}),(0,x.jsx)(T,{creator:e,onClick:t})]}),w=({creators:e,onPiledCreatorsClick:t,isSmallIcon:i})=>{const n=(0,x.jsx)("div",{className:C.A.piled,children:e.slice(0,3).map(((e,t)=>(0,x.jsx)(p.e,{label:S(e),images:e.images.map((e=>({url:e.url,width:e.width||null,height:e.height||null}))),width:i?20:24,userIconSize:i?"xsmall":"small",piled:t>0},e.uri)))});let r=u.Ru.get("playlist.header.creator-and-others",S(e[0]),e.length-1);return 2===e.length&&(r=u.Ru.get("playlist.header.creator-and-co-creator",S(e[0]),S(e[1]))),t?(0,x.jsxs)("button",{className:a()(C.A.metaDataText,C.A.creatorWrapper,C.A.creatorButton),onClick:t,children:[n,r]}):(0,x.jsxs)("div",{className:a()(C.A.metaDataText,C.A.creatorWrapper),children:[n,r]})},R=({creators:e,onCreatorClick:t})=>(0,x.jsx)(x.Fragment,{children:e.map(((e,i)=>(0,x.jsxs)(n.Fragment,{children:[0!==i&&(0,x.jsx)("span",{className:C.A.divider}),(0,x.jsx)(T,{creator:e,onClick:t,position:i})]},e.id)))}),k=({creators:e,onPiledCreatorsClick:t,onCreatorClick:i})=>{const n=(0,m.NC)(b.G6N),r=(0,E.y)(),a=r===(_.E.SMALL||r===_.E.XSMALL);if(1===e.length){const[t]=e;return t.isMadeFor?(0,x.jsx)(I,{creator:t,onClick:i,isSmallIcon:a}):(0,x.jsx)(N,{creator:t,onClick:i,isSmallIcon:a})}return e.length>0&&e.every((e=>(0,c.AP)(e.uri)))&&n?(0,x.jsx)(w,{creators:e,onPiledCreatorsClick:t,isSmallIcon:a}):(0,x.jsx)(R,{creators:e,onCreatorClick:i})};var O=i(53129),P=i(7939),L=i(46751),j=i(46079);const D=36e5,M=864e5;var U=i(11088);const B="poz9gZKE7xqFwgk231J4";function F(e,t){return e-e%t}const H=({durationMs:e,className:t})=>{const i=e>M;let n;var r;n=i?M:F(r=e,r>36e6?D:r>18e6?18e5:r>36e5?9e5:r>18e5?3e5:6e4);const{hours:s,minutes:o}=(0,j.S)(n);if(0===s&&0===o)return null;let l=(0,U.j)({h:s,m:o,s:0});return l=i?u.Ru.get("time.over",l):u.Ru.get("time.estimated",l),(0,x.jsx)("span",{className:a()(B,t),children:l})};var V=i(80913),G=i(43697),z=i(15847);function W(e,t,i,n,r,a){if(0===e)return null;let s;return s=!t||i||n?!i||n||t?!n||t||i?u.Ru.get("tracklist-header.items-counter",e):u.Ru.get("tracklist-header.audiobooks-counter",e):u.Ru.get("tracklist-header.episodes-counter",e):u.Ru.get("tracklist-header.songs-counter",e),(0,x.jsxs)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:[s,r>0?u.Ru.getSeparator():null,a?(0,x.jsx)(H,{durationMs:r}):(0,x.jsx)(L.d,{durationMs:r})]})}const K=function({to:e,children:t,onClick:i=(()=>{})}){const r=(0,n.useCallback)((t=>{i(t,e)}),[i,e]);return(0,x.jsx)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:e?(0,x.jsx)(v.N,{to:e,onClick:r,children:t}):t})},Y=e=>{const{author:t,creators:i,onPiledCreatorsClick:r,onCreatorClick:d,releaseDate:m,releaseDatePrecision:p,totalItems:h=0,totalFollowers:g=0,onTotalFollowersClick:f,totalFollowing:y=0,onTotalFollowingClick:b,totalSaves:_=0,publicPlaylists:E=0,privatePlaylists:S=0,newEntries:A=0,durationMilliseconds:T=0,isEstimatedDuration:I=!1,daylistNextUpdate:N,userUri:w,albumType:R,isTrack:L,album:j,timeZone:D,hasTracks:M=!1,hasEpisodes:U=!1,hasAudiobooks:B=!1,theyFollowUs:F=!1,playcount:H,isPreRelease:Y,isRestricted:q}=e,Z=(0,s.d4)(P.Ht),$=Z.overrides?.locale||u.Ru.getLocaleForTranslation(),Q=void 0!==m&&(0,z.ad)(m).getTime()>(new Date).getTime();return(0,x.jsxs)("div",{className:C.A.metaData,children:[t&&(0,x.jsx)(o.E,{className:C.A.metaDataAuthor,variant:Y?"bodySmallBold":"titleSmall","":"entityAuthor",children:t}),i&&(0,x.jsx)(n.Suspense,{fallback:null,children:(0,x.jsx)(k,{creators:i,onPiledCreatorsClick:r,onCreatorClick:d})}),R&&(0,x.jsxs)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:[q&&(0,x.jsx)(l.u,{className:C.A.metaDataRestrictedIcon,size:"xsmall",semanticColor:"textBase"}),R]}),E>0&&(0,x.jsx)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:u.Ru.get("user.public-playlists",E)}),S>0&&(0,x.jsx)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:u.Ru.get("user.private-playlists",S)}),j&&(0,x.jsx)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:(0,x.jsx)(v.N,{to:j.uri,children:j.name})}),m&&(0,x.jsx)(O.Zp,{label:(0,z.rh)((0,z.ad)(m),$,{month:"long",day:"numeric",year:"numeric"},p),disabled:Q,children:(0,x.jsx)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:Q?u.Ru.get("web-player.prerelease.releases_on",{date:u.Ru.formatDate((0,z.ad)(m),(0,z.s7)({month:"long",day:"numeric",year:"numeric",timeZone:D},p))}):(0,z.ad)(m).getUTCFullYear()})}),_>0&&(0,x.jsx)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:u.Ru.get("saves",_)}),g>0&&(0,x.jsx)(K,{to:w?(0,c.Qj)((0,G.v)(w),["followers"]).toURI():null,onClick:f,children:u.Ru.get("user.followers",g)}),y>0&&(0,x.jsx)(K,{to:w?(0,c.Qj)((0,G.v)(w),["following"]).toURI():null,onClick:b,children:u.Ru.get("user.following",y)}),F&&(0,x.jsx)(o.E,{variant:"bodySmall",semanticColor:"textSubdued",className:a()(C.A.metaDataText,C.A.theyFollowUs),children:u.Ru.get("user.they_follow_us")}),W(h,M,U,B,T,I),N&&(0,x.jsx)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:u.Ru.get("web-player.playlist.daylist.next-update",u.Ru.formatDate((0,z.ad)(N),{timeStyle:"short"}))}),L&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o.E,{variant:"bodySmall",className:C.A.metaDataText,children:(0,V.f)(T)}),H&&H>0?(0,x.jsx)(o.E,{variant:"bodySmall",className:C.A.metaDataText,"":"playcount",children:u.Ru.formatNumber(H)}):null]}),A>0&&(0,x.jsx)(o.E,{variant:"bodySmall",className:a()(C.A.metaDataText,C.A.newEntriesIndicator),children:u.Ru.get("chart.new-entries",A)})]})}},79056:(e,t,i)=>{"use strict";i.d(t,{B:()=>s});var n=i(12783),r=i(11986),a=i(86070);const s=({children:e})=>(0,a.jsx)(n.E,{variant:"bodySmall",className:r.A.pretitle,children:e})},67325:(e,t,i)=>{"use strict";i.d(t,{g:()=>o});var n=i(12783),r=i(32994),a=i(42116),s=i(86070);const o=({children:e,className:t})=>{const i=(0,a.y)()===r.E.SMALL?"bodyMediumBold":"titleSmall";return(0,s.jsx)(n.E,{variant:i,"":"entityAuthor",className:t,children:e})}},55194:(e,t,i)=>{"use strict";i.d(t,{mm:()=>x,Cl:()=>C,tw:()=>E});var n=i(30758),r=i(97500),a=i.n(r),s=i(80481),o=i(8159),l=i(12783),c=i(26969),u=i(86070);const d=(0,n.memo)((function(e){const{children:t,scale:i,variant:r="headlineLarge",...a}=e,s=(0,n.useRef)(null),[d,m]=(0,n.useState)(!1),p=(0,o.YQ)((()=>{s.current&&(()=>{if(!s.current)return;m(!1);let e=!1;for(let t=0;t<i.fontSizes.length;t++){const n=i.fontSizes[t];s.current.style.fontSize=n,s.current.style.whiteSpace="collapse balance";const r=s.current.getBoundingClientRect().height;s.current.style.whiteSpace="nowrap";const a=s.current.getBoundingClientRect().height;if(e=t===i.fontSizes.length-1,r===a)break}s.current.style.whiteSpace=e?"collapse balance":"nowrap",m(!0)})()}),200,{leading:!0,maxWait:200});return(0,c.w)({refOrElement:s,onResize:p}),(0,n.useLayoutEffect)((()=>{p()}),[p,i]),(0,u.jsx)(l.E,{as:"h1",ref:s,style:{visibility:d?"visible":"hidden",width:"100%"},variant:r,semanticColor:"textBase",dir:"auto",...a,children:t})}));var m=i(14627),p=i(32994),h=i(42116),g=i(11986);const f=s.H0.fontSize,v=s.A7.fontSize,y=s.nk.fontSize,b=s.et.fontSize,_={fontSizes:[v,"4.5rem","3rem",f]},E={fontSizes:[f,b]},C={fontSizes:[y,f]},x=(0,n.memo)((function(e){const{ariaLabel:t,children:i,className:n,canEdit:r,onClick:s,editTitle:o,onContextMenu:l,onTouchStart:c,onTouchEnd:f,dragUri:v="",dragMimeType:y,dragLabel:b,scaleAtMinWidth:E=_}=e,{draggable:C,onDragStart:x}=(0,m.P)({itemUris:[v],itemMimeTypes:y?[y]:[],dragLabelText:b}),S=(0,h.y)()===p.E.SMALL?E:_;return(0,u.jsx)("span",{dir:"auto",className:a()(n,g.A.title),onContextMenu:l,onTouchStart:c,onTouchEnd:f,draggable:C&&!(!v||!b),onDragStart:x,"":"entityTitle",children:r?(0,u.jsx)("button",{"aria-label":t,className:a()(g.A.titleButton),onClick:s,title:o,children:(0,u.jsx)("span",{className:g.A.titleInner,children:(0,u.jsx)(d,{scale:S,children:i})})}):(0,u.jsx)(d,{scale:S,children:i})})}))},54401:(e,t,i)=>{"use strict";i.d(t,{R:()=>me});var n=i(30758),r=i(97500),a=i.n(r),s=i(9183),o=i(37985),l=i(21953),c=i(12783),u=i(91494),d=i(61544),m=i(11808),p=i(26436),h=i(97684),g=i(27734),f=i(97393),v=i(68244),y=i(80784),b=i(39796),_=i(58345),E=i(44694),C=i(65500),x=i(64820),S=i(16972),A=i(85065),T=i(72091),I=i(6111),N=i(86070);const w={intent:"share",type:"click",itemIdSuffix:"contextmenu/episode/share"},R=n.memo((function({episodeUri:e,showUri:t,sharingInfo:i,canDownload:r,requestId:s,onMarkAsPlayed:o,onMoreButtonClick:l,name:c,fullyPlayed:u,index:d}){const R=(0,S.T)(e),{spec:k,logger:O}=(0,T.r)(p.d,{data:{uri:e,reason:s||"",position:d}}),P=(0,C.v)(e),L=(0,n.useMemo)((()=>(0,N.jsx)(E.g,{size:"medium",uri:e})),[e]),j=(0,n.useMemo)((()=>(0,N.jsx)(g.e,{uri:e,size:g.M.sm,className:a()({[I.A.visibleAction]:(0,x.X)(R)}),onClick:(t,i)=>{i===A.NV.ADD?O.logInteraction(k.downloadButtonFactory().hitDownload({itemToDownload:e})):A.NV.REMOVE&&O.logInteraction(k.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},canDownload:r,condensed:!0})),[e,R,k,O,r]),D=(0,n.useMemo)((()=>(0,N.jsx)(y.w,{uri:e,sharingInfo:i,interactionData:w,onClick:()=>{O.logInteraction(k.copyLinkFactory().hitShare({entityToBeShared:e,shareId:i?.shareId||""}))}})),[e,i,k,O]),M=(0,n.useMemo)((()=>(0,N.jsx)(v.b,{uri:e,size:h.t.sm,className:I.A.visibleAction,onClick:t=>{t?O.logInteraction(k.saveToLibraryButtonFactory().hitLike({itemToBeLiked:e})):O.logInteraction(k.saveToLibraryButtonFactory().hitRemoveLike({itemNoLongerLiked:e}))},condensed:!0})),[e,k,O]),U=(0,n.useMemo)((()=>(0,N.jsx)(b.b,{menu:(0,N.jsx)(_.b,{uri:e,showUri:t,isPlayed:u,onMarkAsPlayed:o}),children:(0,N.jsx)(f.e,{size:f.M.sm,label:m.Ru.get("more.label.context",c),onClick:l})})),[e,u,c,o,l,t]);return(0,N.jsxs)(N.Fragment,{children:[D,j,P?L:M,U]})}));var k=i(87320),O=i(82455),P=i(27685),L=i(54687),j=i(39516);var D=i(67464),M=i(89942),U=i(32994),B=i(71817),F=i(85793),H=i(71338);const V="TT1tIewS2iI8Uz8kLuQB",G="Mn93NeoqnZzVnPIP83_9",z="show-episodeBlock-title",W="show-episodeBlock-titleLink",K="show-episodeBlock-actions",Y="show-episodeBlock-titleContainer",q="q80ZFqNlDZCC7OTfUPj8",Z="show-episodeBlock-metadata",$="YhOAZFuFU1oI_YQSof4z",Q="DKIjGP8CcZyjr2O2HNST",J="A7qeQBIk3sqr7bYadWA8",X="_IJaGA3ZdVU0NiTxbGsI",ee="show-episodeBlock-imageContainer",te="show-episodeBlock-showImage",ie="show-episodeBlock-description",ne="hFCGY5gjCjN10WzV2VQ4",re="gk0rZwqBxJjSeiWV5lgV",ae="te8hrsPnSvx9SUkzV0ME",se="show-episodeBlock-header",oe="acjrpluRnLumVxPt2QG9",le="show-episodeBlock-descriptionContainer",ce="DyuLxip2Kl8P7H8fW62u",ue="vak8N953oXaq9F7jZDsD",de="WBxE9PQe96PpkE9RuTo5",me=n.memo(n.forwardRef((function({uri:e,name:t,showName:i,showUri:r,size:p,description:h,durationMs:g,images:f,badges:v,fullyPlayed:y,releaseDate:b,resumePositionMs:_,isCurrentlyPlaying:E,isPlaying:C,onContextMenu:x,onTouchStart:S,onTouchEnd:A,handlePlaybackClick:T,handleDragStart:I,handleClick:w,position:me,index:pe,isPlayable:he,isPaywalled:ge,isUserSubscribed:fe,episodeSharingInfo:ve,playButtonWrapper:ye=null,highlightText:be=(e=>e),onMarkAsPlayed:_e,contentInformation:Ee,requestId:Ce,onMoreButtonClick:xe,status:Se,variant:Ae="default",mediaTypes:Te},Ie){const Ne=(0,s.Zp)(),we=E&&C,Re=(0,d.o_)(e).toURLPath(!0),ke=(0,d.o_)(r)?.toURLPath(!0),Oe=function({episodeUri:e}){const[t,i]=(0,n.useState)([]),r=(0,j.o)();return(0,n.useEffect)((()=>{let t=!0;return async function(){const n=await r.getArtists(e);t&&i(n)}(),()=>{t=!1}}),[e,r]),t}({episodeUri:e}),Pe=(0,O.hD)(e,b,_,y),Le=Te?.includes(F.C.Video)??!1,je=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),Ne(Re),w&&w(e)}),[Ne,Re,w]),De=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),ke&&Ne(ke)}),[ke,Ne]),Me=ge&&!fe,Ue=(0,n.useCallback)((e=>{e.stopPropagation(),Me||T(e)}),[T,Me]),Be=Me||he,Fe=m.Ru.get("tracklist.a11y.play",t,i),He=m.Ru.get("tracklist.a11y.pause",t,i),Ve=(0,N.jsx)(P.R,{size:"small",version:"next-best-episode"===Ae?P.H.primary:P.H.secondary,onClick:Ue,isPlaying:we,disabled:!Be,locked:Me,ariaPlayLabel:Fe,ariaPauseLabel:He}),Ge=ye?ye(Ve):Ve;return(0,N.jsxs)("div",{ref:Ie,className:a()(V,{[G]:E,[re]:p===U.E.MEDIUM,[ae]:p===U.E.LARGE,[X]:p===U.E.XSMALL,[de]:"next-best-episode"===Ae}),"":`episode-${pe}`,draggable:!!I,onDragStart:I,onClick:je,onContextMenu:x,onTouchStart:S,onTouchEnd:A,children:[Se&&(0,N.jsx)(c.E,{className:oe,paddingBottom:l.vw,children:Se}),Ee&&(0,N.jsx)(k.g,{className:ue,cardHeaderText:Ee.cardHeaderText,buttonText:Ee.buttonText,buttonTarget:Ee.buttonTarget}),"default"===Ae&&(0,N.jsx)("div",{className:ee,children:(0,N.jsx)(D.b,{className:te,type:B.c.EPISODE,size:(e=>{switch(e){case U.E.LARGE:return M.Qe.SIZE_112;case U.E.MEDIUM:return M.Qe.SIZE_64;default:return M.Qe.SIZE_48}})(p),title:t,shape:D.u.ROUNDED_CORNERS,images:f})}),(0,N.jsxs)("div",{className:se,children:[(0,N.jsxs)("div",{className:Y,children:[(0,N.jsx)(o.N_,{className:W,to:Re,onClick:je,children:(0,N.jsxs)(c.E,{as:"div",variant:"bodyMediumBold",className:z,"":"episodeTitle",children:[Pe&&(0,N.jsx)(O.Tc,{}),be(t)]})}),Oe.length>0&&(0,N.jsxs)("div",{className:$,children:[(0,N.jsx)(u.e,{size:"small",className:J}),(0,N.jsx)(c.E,{as:"p",variant:"bodySmall",className:Q,children:be(Oe.join(m.Ru.getSeparator()))})]})]}),(0,N.jsxs)("div",{className:q,children:[Le&&(0,N.jsx)(c.E,{variant:"bodySmall",semanticColor:"textSubdued",children:(0,N.jsx)(L.T,{})}),i&&ke&&(0,N.jsx)(o.N_,{className:W,to:ke,onClick:De,children:(0,N.jsx)(c.E,{variant:"bodySmall",semanticColor:"textSubdued",children:be(i)})})]})]}),(0,N.jsx)("div",{className:le,children:(0,N.jsx)(c.E,{as:"p",variant:"bodySmall",className:ie,children:be(h??"")})}),(0,N.jsxs)("div",{className:Z,children:[(0,N.jsx)("div",{className:ne,children:v}),(0,N.jsx)(H.j,{isPlaying:we,fullyPlayed:y,durationMs:g,releaseDate:b,resumePositionMs:_,position:E?me:void 0})]}),(0,N.jsx)("div",{onClick:e=>{e.stopPropagation()},className:K,children:(0,N.jsx)(R,{episodeUri:e,showUri:r??"",sharingInfo:ve,canDownload:!ge||ge&&fe,requestId:Ce,index:pe,name:t,fullyPlayed:y,onMarkAsPlayed:_e,onMoreButtonClick:xe})}),(0,N.jsx)("div",{className:ce,children:Ge})]})})))},87320:(e,t,i)=>{"use strict";i.d(t,{g:()=>v});var n=i(30758),r=i(97500),a=i.n(r),s=i(19643),o=i(12783),l=i(43830),c=i(81987),u=i(61544),d=i(80852),m=i(19159);const p="rFwxt8s8DYY8p1O7tYZW",h="sA2HogGQNi8R_zpCWei5",g="H92pPTuqDR5DcoTtjcb3";var f=i(86070);const v=({cardHeaderText:e,buttonText:t,buttonTarget:i,className:r})=>{const v=(0,c.NC)(m._Nj),y=(0,n.useCallback)((e=>{e.stopPropagation()}),[]),b=(0,u.o_)(i).toURLPath(!0);return v?(0,f.jsxs)("div",{className:a()(p,r),onClick:y,children:[(0,f.jsxs)("div",{className:h,children:[(0,f.jsx)(s.p,{className:g,size:"small",semanticColor:"textBase"}),(0,f.jsx)(o.E,{as:"span",variant:"bodyMediumBold",semanticColor:"textBase",children:e})]}),(0,f.jsx)(l.$,{size:"small",colorSet:"invertedLight",component:d.v,href:b,children:t})]}):null}},83716:(e,t,i)=>{"use strict";i.d(t,{k:()=>G});var n=i(30758),r=i(97500),a=i.n(r),s=i(9183),o=i(12783),l=i(21953),c=i(66060),u=i(24284),d=i(30400),m=i(16047),p=i(61544),h=i(11808),g=i(87320),f=i(26436),v=i(27734),y=i(97393),b=i(68244),_=i(80784),E=i(39796),C=i(58345),x=i(44694),S=i(65500),A=i(32994),T=i(64820),I=i(16972),N=i(85065),w=i(72091),R=i(6111),k=i(86070);const O={intent:"share",type:"click",itemIdSuffix:"contextmenu/episode/share"},P=n.memo((function({episodeUri:e,showUri:t,sharingInfo:i,size:r,canDownload:s,requestId:o,onMarkAsPlayed:l,onMoreButtonClick:c,name:u,fullyPlayed:d,index:m}){const p=(0,I.T)(e),{spec:g,logger:P}=(0,w.r)(f.d,{data:{uri:e,reason:o||"",position:m}}),L=r===A.E.LARGE?"medium":"small",j=(0,n.useMemo)((()=>(0,k.jsx)(v.e,{uri:e,size:L,className:a()({[R.A.visibleAction]:(0,T.X)(p)}),onClick:(t,i)=>{i===N.NV.ADD?P.logInteraction(g.downloadButtonFactory().hitDownload({itemToDownload:e})):N.NV.REMOVE&&P.logInteraction(g.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},canDownload:s,condensed:!0})),[e,p,g,P,L,s]),D=(0,n.useMemo)((()=>(0,k.jsx)(_.w,{uri:e,sharingInfo:i,interactionData:O,size:L,onClick:()=>{P.logInteraction(g.copyLinkFactory().hitShare({entityToBeShared:e,shareId:i?.shareId||""}))}})),[e,i,g,P,L]),M=(0,n.useMemo)((()=>(0,k.jsx)(b.b,{uri:e,size:L,className:R.A.visibleAction,onClick:t=>{t?P.logInteraction(g.saveToLibraryButtonFactory().hitLike({itemToBeLiked:e})):P.logInteraction(g.saveToLibraryButtonFactory().hitRemoveLike({itemNoLongerLiked:e}))},condensed:!0})),[e,g,P,L]),U=(0,S.v)(e),B=(0,n.useMemo)((()=>(0,k.jsx)(x.g,{size:L,uri:e,className:R.A.visibleAction})),[e,L]),F=(0,n.useMemo)((()=>(0,k.jsx)(E.b,{menu:(0,k.jsx)(C.b,{uri:e,showUri:t,isPlayed:d,onMarkAsPlayed:l}),children:(0,k.jsx)(y.e,{size:L,label:h.Ru.get("more.label.context",u),onClick:c})})),[e,d,u,l,c,t,L]);return(0,k.jsxs)(k.Fragment,{children:[U?B:M,j,D,F]})}));var L=i(59996),j=i(82455),D=i(27685),M=i(54687),U=i(67464),B=i(89942),F=i(71817),H=i(85793),V=i(71338);const G=n.memo(n.forwardRef((function({uri:e,name:t,showName:i,showUri:r,size:f,description:v,durationMs:y,images:b,badges:_,fullyPlayed:E,releaseDate:C,resumePositionMs:x,isCurrentlyPlaying:S,isPlaying:T,onContextMenu:I,onTouchStart:N,onTouchEnd:w,handlePlaybackClick:O,draggable:G,handleDragStart:z,handleClick:W,position:K,index:Y,isPlayable:q,isPaywalled:Z,isUserSubscribed:$,episodeSharingInfo:Q,playButtonWrapper:J=null,highlightText:X=(e=>e),onMarkAsPlayed:ee,contentInformation:te,requestId:ie,mediaTypes:ne,onMoreButtonClick:re,status:ae,variant:se="default"},oe){const le=(0,s.Zp)(),ce=S&&T,ue=f===A.E.LARGE,de=(0,p.o_)(e).toURLPath(!0),me=(0,p.o_)(r)?.toURLPath(!0),pe=(0,j.hD)(e,C,x,E),he=Z&&!$,ge=ne?.includes(H.C.Video)??!1,fe=_?.props.children.filter((e=>!1!==e))||[],ve=he||q,ye=h.Ru.get("tracklist.a11y.play",t,i),be=h.Ru.get("tracklist.a11y.pause",t,i),_e=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),le(de),W&&W(e)}),[le,de,W]),Ee=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),me&&le(me)}),[me,le]),Ce=(0,n.useCallback)((e=>{e.stopPropagation(),he||O(e)}),[O,he]),xe=(0,k.jsx)(D.R,{size:"small",version:"next-best-episode"===se?D.H.primary:D.H.secondary,onClick:Ce,isPlaying:ce,disabled:!ve,locked:he,ariaPlayLabel:ye,ariaPauseLabel:be}),Se=J?J(xe):xe,Ae=(0,k.jsx)(k.Fragment,{children:ae&&(0,k.jsx)(o.E,{variant:"bodySmall",semanticColor:"textSubdued",paddingBottom:l.vw,children:ae})}),Te=(0,k.jsxs)(c.d,{className:R.A.title,href:de,onClick:_e,lineClamp:2,children:[pe&&(0,k.jsx)(j.Tc,{}),X(t)]}),Ie=(0,k.jsxs)(u.j,{lineClamp:2,paddingBottom:ue?l.v4:void 0,children:[ge&&(0,k.jsx)(M.T,{className:R.A.videoLabel}),i&&me&&(0,k.jsx)(L.N,{to:me,onClick:Ee,children:(0,k.jsx)(o.E,{variant:"bodySmall",semanticColor:"textSubdued",children:X(i)})})]}),Ne=(0,k.jsxs)("div",{className:R.A.showDetailsWithProgress,children:[(0,k.jsx)(d.v,{lineClamp:2,paddingBottom:ue?l.vw:void 0,children:X(v??"")}),(0,k.jsxs)("div",{className:R.A.metadata,children:[fe.length>0&&(0,k.jsx)("div",{className:R.A.badges,children:_}),(0,k.jsx)(V.j,{isPlaying:ce,fullyPlayed:E,durationMs:y,releaseDate:C,resumePositionMs:x,position:S?K:void 0})]})]}),we=(0,k.jsxs)("div",{className:R.A.footer,children:[(0,k.jsx)("div",{onClick:e=>{e.stopPropagation()},className:R.A.actions,children:(0,k.jsx)(P,{episodeUri:e,showUri:r??"",sharingInfo:Q,size:f,canDownload:!Z||Z&&$,requestId:ie,index:Y,name:t,fullyPlayed:E,onMarkAsPlayed:ee,onMoreButtonClick:re})}),(0,k.jsx)("div",{children:Se})]}),Re="default"===se&&(0,k.jsx)("div",{className:R.A.imageContainer,children:(0,k.jsx)(U.b,{className:a()(R.A.showImage,{[R.A.largeImage]:ue}),type:F.c.EPISODE,size:(e=>{switch(e){case A.E.LARGE:return B.Qe.SIZE_112;case A.E.MEDIUM:return B.Qe.SIZE_64;default:return B.Qe.SIZE_48}})(f),title:t,shape:U.u.ROUNDED_CORNERS,images:b})});return(0,k.jsxs)("div",{className:a()(R.A.episodeBlock,{[R.A.isActive]:S,[R.A.nextBestEpisode]:"next-best-episode"===se}),"":`episode-${Y}`,draggable:G&&!!z,onDragStart:z,onClick:_e,onContextMenu:I,onTouchStart:N,onTouchEnd:w,children:[te&&(0,k.jsx)(g.g,{className:R.A.contentInformationBanner,cardHeaderText:te.cardHeaderText,buttonText:te.buttonText,buttonTarget:te.buttonTarget}),(0,k.jsx)(m.v,{size:"xxl",ref:oe,media:Re,title:Te,id:`episode-${Y}`,subtitle:i&&me?Ie:Ne,pretitle:Ae,body:i&&me?Ne:void 0,variant:"naked",footer:we,hoverBackgroundColor:"backgroundHighlight",layout:ue?"wide":"regular",horizontalGap:ue?l.lT:l.CJ,verticalGap:l.v4,paddingBlockStart:l.CD,paddingBlockEnd:l.CD})]})})))},82097:(e,t,i)=>{"use strict";i.d(t,{s:()=>c});var n=i(29615),r=i(30758),a=i(51154),s=i(86070);const o=({error:e,resetErrorBoundary:t})=>{const i=(0,a.J)();return(0,r.useEffect)((()=>{const e=i.listen((()=>{t()}));return()=>{e()}}),[i,t]),null},l=({fallback:e,children:t})=>(0,s.jsx)(r.Suspense,{fallback:e,children:t}),c=({FallbackComponent:e=o,suspenseFallback:t,children:i,onError:r})=>{const a=t??null;return(0,s.jsx)(l,{fallback:a,children:(0,s.jsx)(n.tH,{FallbackComponent:e,onError:r,children:i})})}},8261:(e,t,i)=>{"use strict";i.d(t,{x:()=>p});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(43830),l=i(67889);const c="KIbfbFDao0SHpZsKoKZD",u="yZh70k8am9QCTKmucbwo";var d=i(86070);const m=()=>window.location.reload(),p=(0,n.memo)((function({headingMessage:e,message:t,onDismissDialog:i=m,isOpen:n=!1,buttonLabel:r,animated:p,isRemoteConfigInitialized:h=!0}){const g=h?l.A:l.h;return(0,d.jsx)(g,{isOpen:n,shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:e,animated:p,children:(0,d.jsxs)("div",{className:a()(c,"encore-light-theme"),children:[(0,d.jsx)(s.E,{variant:"titleSmall",as:"h1",children:e}),(0,d.jsx)(s.E,{as:"p",variant:"bodyMedium",children:t}),(0,d.jsx)("div",{className:u,children:(0,d.jsx)(o.$,{onClick:i,autoFocus:!0,children:r})})]})})}))},34071:(e,t,i)=>{"use strict";i.d(t,{N:()=>_});var n=i(30758),r=i(12783),a=i(11808),s=i(2408),o=i(86070);const l=n.memo((function({text:e,onTimeStampClick:t,children:i,className:a,enableTimestamps:l=!1}){const c=(0,n.useMemo)((()=>(0,o.jsx)(s.q,{html:e,onTimeStampClick:t,enableTimestamps:l})),[e,l,t]);return(0,o.jsxs)(r.E,{as:"div",variant:"bodyMedium",className:a,children:[c,i]})})),c="show-show-moreButton",u=(0,n.memo)((function({text:e,onTimeStampClick:t,onToggle:i,className:n,enableTimestamps:s}){return(0,o.jsx)(l,{className:n,text:e,onTimeStampClick:t,enableTimestamps:s,children:(0,o.jsx)("button",{"aria-expanded":!1,className:c,onClick:i,children:(0,o.jsxs)(r.E,{variant:"bodyMediumBold",children:["… ",a.Ru.get("show_more")]})})})})),d=(e,t,i)=>{const n=a.Ru.get("show_more").length,r=e.length+n+6;return i<=1&&r<t},m=(0,n.memo)((function({paragraphs:e,clickHandler:t,maxCharactersPerLine:i,maxLines:n,toggleExpandedState:r,className:s,enableTimestamps:c}){let m=!1,p=0;const h=e.map(((h,g)=>{const f=Math.round(h.length/i);if(p+=f>0?f:1,m)return null;const v=n-(p-f);if(!(g+1===e.length&&(d(h,i,v)||f<=v))&&p>=n){m=!0;const e=((e,t,i)=>{const n=a.Ru.get("show_more").length;if(d(e,t,i))return e;const r=t*i-n-6;return e.slice(0,r)})(h,i,v);return(0,o.jsx)(u,{text:e,onTimeStampClick:t,onToggle:r,className:s,enableTimestamps:c},g)}return(0,o.jsx)(l,{className:s,text:h,onTimeStampClick:t,enableTimestamps:c},g)})).filter((e=>null!==e)).map(((e,t,i)=>t+1===i.length?e:[e," "])).flat();return(0,o.jsx)(o.Fragment,{children:h})}));var p=i(31252);const h="TQXhY8PT8v1vogxO85c_",g="RKzJftL6TOVUXkXOPykT",f="mCKPqUiNNAO6GM3nRBXe",v=(e,t)=>({...e,...t}),y=(e="")=>e.split(/[ \u00a0]{2}/).filter(Boolean),b=(e="")=>e.replace("<p>","").split(/(?:<\/p>)/).filter(Boolean),_=(0,n.memo)((function({content:e,htmlContent:t,maxLines:i=2,className:c,onTimeStampClick:u=(()=>{}),onExpanded:d,enableTimestamps:_=!1,enableAutomaticLinkification:E=!1,isOpen:C=null}){const[x,S]=(0,n.useReducer)(v,(e=>({isOpen:e,contentWidth:0}))(C)),{isOpen:A,contentWidth:T}=x,I=(0,n.useRef)(null),N=(0,n.useRef)(!0),w=(0,n.useCallback)((()=>{S({isOpen:!A}),d&&d(!A)}),[A,d]);(0,n.useEffect)((()=>{S({isOpen:C})}),[e,C]),(0,n.useEffect)((()=>{null!==x.isOpen&&(N.current?N.current=!1:I.current?.querySelector("button[aria-expanded]")?.focus())}),[x.isOpen]);const R=T?T/7.8:Number.MAX_VALUE,k=(0,n.useCallback)((e=>{e&&(I.current=e,S({contentWidth:e.clientWidth}))}),[]),O=(0,n.useMemo)((()=>t?b(t).map((e=>(0,o.jsx)(s.q,{html:e,onTimeStampClick:u,enableTimestamps:_,enableAutomaticLinkification:E},e))):((e,t,i)=>y(e).map(((e,n)=>(0,o.jsx)(l,{className:g,text:e,onTimeStampClick:t,enableTimestamps:i},n))))(e,u,_)),[e,_,E,t,u]),P=(0,n.useMemo)((()=>t?b(t):y(e)),[e,t]);return(0,p.s)((()=>{I.current&&S({contentWidth:I.current.clientWidth})})),(0,o.jsx)("div",{className:c,children:(0,o.jsxs)("div",{ref:k,className:h,children:[A&&(0,o.jsxs)(o.Fragment,{children:[O,(0,o.jsx)("button",{"aria-expanded":!0,className:f,onClick:w,children:(0,o.jsx)(r.E,{variant:"bodyMediumBold",children:a.Ru.get("show_less")})})]}),!A&&(0,o.jsx)(m,{className:g,paragraphs:P,clickHandler:u,enableTimestamps:_,maxCharactersPerLine:R,maxLines:i,toggleExpandedState:w})]})})}))},25763:(e,t,i)=>{"use strict";i.d(t,{S:()=>N});var n=i(30758),r=i(97500),a=i.n(r),s=i(8159),o=i(62412),l=i(43178),c=i(11808),u=i(53129),d=i(15549),m=i(8461);let p=function(e){return e.FILTER="enable_filter_item",e}({});var h=i(55388),g=i(97813);const f="x-filterBox-filterInputContainer",v="x-filterBox-expandedOrHasFilter",y="x-filterBox-expandButton",b="x-filterBox-filterInput",_="x-filterBox-fullWidth",E="x-filterBox-overlay",C="x-filterBox-expandRight",x="x-filterBox-searchIconContainer",S="x-filterBox-searchIcon",A="x-filterBox-clearButton";var T=i(86070);const I=e=>(0,h.x)(m.W.FILTER,e),N=n.memo((function({alwaysExpanded:e=!1,placeholder:t,filterBoxApiRef:i,outerRef:r,onFilter:m,onClear:h,onActivate:N,clearOnEscapeInElementRef:w,debounceFilterChangeTimeout:R=200,expandDirection:k="left",fullWidth:O=!1,useExpandCallback:P=I}){const{filter:L,setFilter:j}=(0,n.useContext)(d.g),[D,M]=(0,n.useState)(e||!!L),[U,B]=(0,n.useState)(L),F=(0,n.useRef)(null),H=(0,n.useRef)(null),V=r??F;!function(e){const t=(0,g.m)();(0,n.useEffect)((()=>(t.enableMenuItem(e),()=>{t.disableMenuItem(e)})),[t,e])}(p.FILTER);const G=(0,s.YQ)(((e,t=!1)=>{m&&!t&&m(e),j(e)}),R,{leading:!1,trailing:!0,maxWait:1e3}),z=(0,n.useCallback)((()=>{h?.(),B(""),G("",!0)}),[h,G]);(0,n.useImperativeHandle)(i,(()=>({clearFilter:z})));const W=(0,n.useCallback)((()=>{!1!==N?.()&&(M(!0),V.current?.focus())}),[M,V,N]);P(W);const K=(0,n.useCallback)((e=>{const t=e.currentTarget.value;B(t),G(t)}),[G,B]),Y=(0,n.useCallback)((()=>{U||e||M(!1)}),[U,e,M]),q=(0,n.useCallback)((t=>{"Escape"===t.key&&(U?(t.stopPropagation(),z()):e||(M(!1),H.current?.focus()))}),[e,z,U]);return(0,n.useEffect)((()=>{const e=e=>{"Escape"===e.key&&w?.current?.contains(e.target)&&z()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[z,w]),(0,T.jsx)(u.Zp,{label:t,disabled:D||!t,children:(0,T.jsxs)("div",{className:a()(f,{[v]:D}),role:"search",children:[(0,T.jsx)("input",{ref:V,className:a()(b,{[_]:O}),role:"searchbox",maxLength:80,autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,placeholder:t,onChange:K,onKeyDown:q,onBlur:Y,value:U,"aria-hidden":!D,tabIndex:D?void 0:-1}),(0,T.jsxs)("div",{className:E,children:[(0,T.jsx)("span",{className:x,children:(0,T.jsx)(o.C,{size:"small",className:S,"aria-hidden":!0})}),U&&(0,T.jsx)("button",{className:A,onClick:e=>{e.stopPropagation(),z(),V.current?.focus()},"aria-label":c.Ru.get("search.a11y.clear-input"),children:(0,T.jsx)(l.M,{size:"small"})})]}),(0,T.jsx)("button",{className:a()(y,{[C]:"right"===k}),onClick:W,"":"expand-button","aria-hidden":D,tabIndex:D?-1:void 0,"aria-label":t,ref:H,children:(0,T.jsx)(o.C,{size:"small",className:S})})]})})}))},77925:(e,t,i)=>{"use strict";i.d(t,{s:()=>g});var n=i(30758),r=i(97500),a=i.n(r),s=i(76792),o=i(63731),l=i(60765),c=i(24359);const u="IVnoxrO3iL_tz5ULI8g_";var d=i(86070);const m={marginBlockEnd:0,willChange:"transform, opacity"},p=({filterId:e=null,isPrimaryFilter:t,isPlaceholder:i,resetFilterIds:r,toggleFilterId:o,className:l,innerRef:c,onFilterClick:p,index:h=0,...g})=>{const f=g.selected,v=(0,n.useCallback)((()=>{if(!e)return r(),void p(null,!1,h);p(e,!!f,h),o(e)}),[e,r,o,p,f,h]),y=(0,n.useCallback)((e=>{e.detail>1||i||v()}),[i,v]);return(0,d.jsx)(s.v,{...g,className:a()(l,{[u]:i}),onClick:y,selectedColorSet:"invertedLight",secondary:f&&!t,style:m,ref:c,tabIndex:-1})},h=({filterId:e=null,isPlaceholder:t,resetFilterIds:i,toggleFilterId:r,className:s,innerRef:l,onFilterClick:c,index:p=0,...h})=>{const g=h.selected,f=(0,n.useCallback)((()=>{if(!e)return i(),void c(null,!1,p);c(e,!!g,p),r(e)}),[e,i,r,c,g,p]),v=(0,n.useCallback)((e=>{e.detail>1||t||f()}),[t,f]);return(0,d.jsx)(o.m,{...h,"aria-label":h["aria-label"],className:a()(s,{[u]:t}),onClick:v,style:m,ref:l,tabIndex:-1})},g=(0,n.memo)((function({placeholderFilters:e=[],availableFilters:t,selectedFilters:i,toggleFilterId:r,resetFilterIds:a,onFilterClick:s,ariaLabel:o,clearBtnAriaLabel:u,className:m,applyLightThemeControls:g=!1}){const f=!(i||t),v=f?e:[...i??[],...t??[]],y=(0,n.useRef)(null),b=(0,n.useCallback)((()=>{(0,c.MS)(y.current,y.current?.nextElementSibling instanceof HTMLElement?y.current?.nextElementSibling:null),a()}),[a]);return 0===v.length?null:(0,d.jsxs)(l.F,{className:m,ariaLabel:o,applyLightThemeControls:g,children:[!!i?.length&&(0,d.jsx)(h,{resetFilterIds:b,toggleFilterId:r,onFilterClick:s,"aria-label":u??o,innerRef:y}),v.map(((e,t)=>{const n=i?.includes(e),o=0===t;return(0,d.jsx)(p,{filterId:e.id,isPrimaryFilter:o,isPlaceholder:f,onFilterClick:s,resetFilterIds:a,toggleFilterId:r,selected:n,index:t,children:e.getName()},e.id)}))]})}))},27014:(e,t,i)=>{"use strict";i.d(t,{W:()=>o});var n=i(30758),r=i(49217),a=i(11808),s=i(86070);const o=(0,n.memo)((function({isFollowing:e,onClick:t,disabled:i=!1,buttonText:n,size:o="small",className:l}){const c=e?a.Ru.get("following"):a.Ru.get("follow");return(0,s.jsx)(r.n,{onClick:t,disabled:i,size:o,className:l,children:n||c})}))},89199:(e,t,i)=>{"use strict";i.d(t,{U:()=>p,h:()=>m});var n=i(30758),r=i(97500),a=i.n(r),s=i(81987),o=i(59706);var l=i(19159),c=i(45396),u=i(21451),d=i(86070);const m=function(e){let t=e,i=[];return{addListener:e=>{i.push(e)},removeListener:e=>{i=i.filter((t=>t!==e))},get:()=>t,set:e=>{t=e(t),i.forEach((e=>{e(t)}))}}}({triggerId:null,triggerAction:null}),p=({id:e,children:t,childRef:i,options:{placement:r,isCTA:p,intentPrimaryButton:h="login",getDescription:g,getTitle:f,hideArrow:v,shouldHideOnOutsideClick:y=(()=>!0),shouldHideOnScroll:b=!1,fadeOut:_=!1,popperOptions:E,zIndex:C,maxWidth:x,tippyClassName:S,primaryButtonText:A,secondaryButtonText:T,checkboxText:I,useSecondaryStyling:N,onLogInteraction:w,tippyWrapperClassName:R,renderInline:k},onPrimaryButtonClick:O=(()=>{}),onSecondaryButtonClick:P,onCheckboxClick:L,className:j,onHide:D,onShow:M})=>{const U=p?"tooltip-with-cta":"tooltip-without-cta",[{triggerId:B,triggerAction:F},H]=function(e){const t=(0,n.useState)()[1];return(0,n.useEffect)((()=>(e.addListener(t),()=>{e.removeListener(t)})),[e,t]),[e.get(),e.set]}(m),V=Boolean(B&&B===e),G=(0,s.NC)(l.rWU),z=(0,n.useCallback)((e=>{e.stopPropagation();const t=(0,u.cX)((0,u.KY)(void 0,!0),"spotify_web_player").toString();w?.({itemIdSuffix:U,intent:h,type:"click",targetUri:t}),H((e=>({...e,triggerAction:null,triggerId:null}))),O()}),[O,w,H,U,h]),W=(0,n.useCallback)((e=>t=>{t.stopPropagation&&t.stopPropagation(),w?.({intent:"close-upsell",type:"click",itemIdSuffix:`${U}/${e}`}),H((e=>({...e,triggerAction:null,triggerId:null})))}),[w,H,U]);(0,n.useEffect)((()=>{D&&M&&(V?M():D())}),[D,M,V]);const K=(0,n.useRef)(!1);(0,n.useEffect)((()=>{!K.current&&V&&(w?.({intent:"open-upsell",type:"view",itemIdSuffix:U}),K.current=!0),K.current&&!V&&(K.current=!1)}),[w,U,V]);const Y=(0,n.useCallback)((()=>{b&&V&&H((e=>({...e,triggerAction:null,triggerId:null})))}),[H,b,V]);(0,c.g)(Y);const q=f({triggerAction:F}),Z=g({triggerAction:F}),$=y({triggerAction:F});return(0,d.jsx)(o.x,{placement:r,className:a()(j,{"circular-sp-vietnamese":G}),tippyClassName:S,tippyWrapperClassName:R,popperOptions:E,zIndex:C,maxWidth:x,title:q,description:Z,hideArrow:v,id:e,visible:V,showButtons:p,hideOnClickOutside:$,onHide:W("backdrop"),onSecondaryButtonClick:P??W("close-button"),onPrimaryButtonClick:z,primaryButtonText:A,secondaryButtonText:T,onCheckboxClick:L,checkboxText:I,useSecondaryStyling:N,childRef:i,fadeOut:_,renderInline:k,children:t})}},67889:(e,t,i)=>{"use strict";i.d(t,{h:()=>b,A:()=>_});var n=i(97500),r=i.n(n),a=i(76595),s=i.n(a),o=i(81987),l=i(19159);const c="lij5P44ZbO8C0Oh8ZJtb",u="x3YuUrWGHgimbC8VFa2e",d="qQItFS8myykGhpxMYzyA",m="GenericModal__overlay",p="AvH27oyRpOm17rom9Bnt",h="sXrNbiybT8RKnisJnpV3",g="qh9X1aEYVqtUP2alr32V",f="F9EQJ9z0gxjxglXhzCcg",v="zogFp9G1AEqb8AKOd5BO";var y=i(86070);const b=e=>{const{isOpen:t,contentLabel:i,children:n,className:a,overlayClassName:o,animated:l,animation:b,shouldFocusAfterRender:_=!0,isCircularSPVietnameseEnabled:E=!1,...C}=e;let x=0;return l?x=300:b?.closeTimeoutMs&&(x=b.closeTimeoutMs),(0,y.jsx)(s(),{className:{base:r()(v,{"circular-sp-vietnamese":E,[c]:l},[b?.modal?.base,a]),afterOpen:r()({[u]:l},[b?.modal?.afterOpen]),beforeClose:r()({[d]:l},[b?.modal?.beforeClose])},overlayClassName:{base:r()(m,{[p]:l},[b?.overlay?.base,o]),afterOpen:r()({[h]:l},[b?.overlay?.afterOpen]),beforeClose:r()({[g]:l},[b?.overlay?.beforeClose])},bodyOpenClassName:f,isOpen:t,...x?{closeTimeoutMS:x}:{},shouldFocusAfterRender:_,preventScroll:!0,ariaHideApp:!1,contentLabel:i,...C,children:n})},_=e=>{const t=(0,o.NC)(l.rWU);return(0,y.jsx)(b,{...e,isCircularSPVietnameseEnabled:t})}},2408:(e,t,i)=>{"use strict";i.d(t,{q:()=>E});var n=i(30758),r=i(97500),a=i.n(r),s=i(6936),o=i.n(s),l=i(12783);const c=/(\((?:[0-9]{1,3}:){1,2}[0-9]{2}\))/g;var u=i(59996),d=i(86070);const m=/((?:(?:https?:\/\/)|www\.)(?:(?:(?:[a-z\u00a1-\uffff0-9][-_]*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?:[/?#][^\s"]*)?)/gi,p=/^https?:\/\//;function h(e){return"string"==typeof e?(0,d.jsx)(d.Fragment,{children:e.split(m).map(((e,t)=>t%2?(0,d.jsx)(u.N,{to:`${p.test(e)?"":"https://"}${e}`,children:e},t):e))}):e}var g=i(84337);const f="playlist-playlist-heading",v="playlist-playlist-playlistDescription",y="playlist-playlist-list",b="playlist-playlist-listItem",_="playlist-playlist-paragraph",E=n.memo(n.forwardRef((function({html:e,onTimeStampClick:t,enableTimestamps:i=!1,enableAutomaticLinkification:r=!1,semanticColor:s="textSubdued",className:l,asTextContent:u=!1},m){const p=(0,n.useMemo)((()=>{const n=i?e.split(c).map((e=>e.match(c)?`(<time>${e.replace("(","").replace(")","")}</time>)`:e)).join(""):e;let a;try{a=o()(n,{transform:C(t,s,r,u),dangerouslySetChildren:[]})}catch{a=e}return a}),[i,r,e,t,s,u]);return(0,d.jsx)("div",{ref:m,className:a()(v,l),children:p})})));function C(e=(()=>{}),t,i,r){let a=0;const s={_:(e,t,s)=>{const o=void 0===t?e:s;return(0,d.jsx)(n.Fragment,{children:i&&!r?h(o):o},"fragment"+a++)}};if(r)return s;return{...s,p:e=>(0,d.jsx)(l.E,{as:"p",variant:"bodyMedium",semanticColor:t,className:_,children:i?h(e.children):e.children}),a:t=>t.href?.startsWith("#t=")?(0,d.jsx)(g.D,{onClick:e,children:t.children}):t.href?(0,d.jsx)(u.N,{to:t.href,children:t.children}):(0,d.jsx)(d.Fragment,{children:t.children}),ul:e=>(0,d.jsx)("ul",{className:y,children:e.children}),ol:e=>(0,d.jsx)("ol",{className:y,children:e.children}),li:e=>(0,d.jsx)(l.E,{as:"li",variant:"bodyMedium",semanticColor:t,className:b,children:i?h(e.children):e.children}),br:()=>(0,d.jsx)("br",{}),h1:e=>(0,d.jsx)(l.E,{as:"h1",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h2:e=>(0,d.jsx)(l.E,{as:"h2",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h3:e=>(0,d.jsx)(l.E,{as:"h3",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h4:e=>(0,d.jsx)(l.E,{as:"h4",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h5:e=>(0,d.jsx)(l.E,{as:"h5",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),h6:e=>(0,d.jsx)(l.E,{as:"h6",variant:"bodyMediumBold",semanticColor:t,className:f,children:e.children}),time:t=>(0,d.jsx)(g.D,{onClick:e,children:t.children})}}},91087:(e,t,i)=>{"use strict";i.d(t,{f:()=>c});var n=i(42425),r=i(53129);const a="x-settings-tooltip",s="x-settings-tooltipIconWrapper",o="x-settings-tooltipIcon";var l=i(86070);const c=({message:e,placement:t="top",messageClassName:i})=>(0,l.jsx)("div",{className:a,children:(0,l.jsx)(r.Zp,{showDelay:0,label:e,placement:t,labelClassName:i,children:(0,l.jsx)("div",{className:s,children:(0,l.jsx)(n.N,{size:"small",tabIndex:0,"aria-describedby":r.WO,className:o})})})})},26694:(e,t,i)=>{"use strict";i.d(t,{M:()=>o});var n=i(11170),r=i.n(n);const a={highlightedText:"main-contextMenu-highlightedText"};var s=i(86070);function o({searchWords:e,textToHighlight:t,...i}){return 0===e.length||e.every((e=>!e))?(0,s.jsx)(s.Fragment,{children:t}):(0,s.jsx)(r(),{highlightClassName:a.highlightedText,searchWords:e,textToHighlight:t,autoEscape:!0,...i})}},311:(e,t,i)=>{"use strict";i.d(t,{y:()=>f});var n=i(30758),r=i(97500),a=i.n(r),s=i(81987),o=i(5780),l=i(57920),c=i(33956);const u="zUf7jtv9GPOKC1jYO5TO",d="T8QLel3PoQTgJUpGYj7Q";var m=i(86070);const p=(0,n.memo)((({isLoading:e})=>{const t=(0,l.h)("shimmer");return(0,m.jsx)("div",{className:c.A.imageContainer,children:(0,m.jsx)("div",{ref:t,className:a()(c.A.imageWrapper,{[d]:e})})})})),h=(0,n.memo)((({isLoading:e})=>(0,m.jsx)("div",{className:a()(c.A.shortcut,u),"":"skeleton-shortcut",children:(0,m.jsxs)("div",{className:c.A.draggable,children:[(0,m.jsx)(p,{isLoading:e}),(0,m.jsx)("div",{className:a()(c.A.main,c.A.skeletonShortcut),children:(0,m.jsx)(o.Y,{as:"p",variant:"bodyMediumBold",className:c.A.name,isLoading:e})})]})})));var g=i(19159);const f=(0,n.memo)((({withTitle:e})=>{const t=(0,s.NC)(g._SF)?8:6,i=t%4==0;return(0,m.jsxs)("section",{className:c.A.shortcuts,children:[e&&(0,m.jsx)("div",{className:c.A.title,children:(0,m.jsx)(o.Y,{as:"h2",variant:"titleMedium",charCount:25,isLoading:!0})}),(0,m.jsx)("div",{className:a()(c.A.grid,{[c.A.gridOf4Columns]:i}),children:[...new Array(t).keys()].slice(0,8).map(((e,t)=>(0,m.jsx)(h,{isLoading:!0},t)))})]})}))},89333:(e,t,i)=>{"use strict";i.d(t,{$X:()=>g,cU:()=>m,wI:()=>h});var n=i(30758),r=i(71306),a=i(24226),s=i(24189),o=i(73513),l=i(76306),c=i(69916),u=i(3554),d=i(86070);const m=e=>{const t=(0,u.g)(e.images);return{uri:e.uri,imageUrl:t?.url}},p=(0,n.createContext)({fetchMultipleColors:()=>{},resetColor:()=>{},setColorFromUri:()=>{},clearColor:()=>{}}),h=({children:e})=>{const t=(0,s.as)(),{request:i}=(0,n.useContext)(c.j),[u,m]=(0,n.useState)({}),[h,g]=(0,n.useState)(r.l0o),{extractedHomeAdColor:[f]}=(0,a.bT)(),v=(0,n.useCallback)((()=>{t((0,s.Mo)(f?.colorRaw||h))}),[h,t,f]),y=(0,n.useCallback)((()=>{t((0,s.Hf)())}),[t]),b=(0,n.useCallback)((e=>{const i=u[e];t((0,s.Mo)(i||r.l0o))}),[t,u]),_=(0,n.useCallback)((async e=>{const t={};(await(0,l.j)(i,e.map((e=>e.imageUrl||"")))).forEach((({colorRaw:i},n)=>{const r=i.toCSS(o.a.HEX);t[e[n].uri]=r,0===n&&g(r)})),m(t)}),[i]);return(0,d.jsx)(p.Provider,{value:{setColorFromUri:b,resetColor:v,fetchMultipleColors:_,clearColor:y},children:e})};function g(){const e=(0,n.useContext)(p);if(null===e)throw new Error("Trying to use 'ShortcutsColorContext' without 'ShortcutsColorProvider'!");return e}},53129:(e,t,i)=>{"use strict";i.d(t,{Zp:()=>v,uF:()=>f,WO:()=>g});var n=i(30758),r=i(97500),a=i.n(r),s=i(94079),o=i(16121),l=i(60656);const c="main-contextMenu-tippy",u="main-contextMenu-tippyEnter",d="main-contextMenu-tippyEnterActive";var m=i(86070);const p=({children:e,className:t,showDelay:i=200})=>{const[r,p]=n.useState(!1),h=(0,o.Oj)(),g=(0,l.ZY)(),f=(0,n.useRef)(null),v=(0,n.useRef)(!0);return(0,n.useEffect)((()=>(v.current=!0,()=>{v.current=!1}))),(0,n.useEffect)((()=>{const e=setTimeout((()=>{v.current&&(p(!0),g?.addEventListener("click",t,{once:!0}))}),i);function t(){v.current&&(p(!1),h({type:"close"}),clearTimeout(e))}return()=>{g?.removeEventListener("click",t),clearTimeout(e)}}),[g,i,h]),(0,m.jsx)(s.A,{in:r,timeout:200,unmountOnExit:!0,classNames:{enter:u,enterActive:d},nodeRef:f,children:(0,m.jsx)("div",{className:a()(c,t),ref:f,children:e})})};var h=i(50668);const g="hover-or-focus-tooltip",f=1e3,v=({label:e,children:t,renderInline:i,showDelay:n,disabled:r,placement:a="top",labelClassName:s})=>(0,m.jsx)(h.y,{action:"open",trigger:"hover-or-focus",placement:a,interactive:!1,content:r?null:(0,m.jsx)(p,{showDelay:n,className:s,children:(0,m.jsx)("span",{id:g,role:"tooltip",children:e})}),renderInline:i,children:t})},41361:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(11808),r=i(86070);const a=({fill:e="#fff",width:t=32,height:i=32})=>(0,r.jsxs)("svg",{width:t,height:i,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("title",{children:n.Ru.get("close")}),(0,r.jsx)("path",{d:"M31.098 29.794L16.955 15.65 31.097 1.51 29.683.093 15.54 14.237 1.4.094-.016 1.508 14.126 15.65-.016 29.795l1.414 1.414L15.54 17.065l14.144 14.143",fill:e,fillRule:"evenodd"})]})},24604:(e,t,i)=>{"use strict";i.d(t,{M:()=>d});var n=i(97500),r=i.n(n),a=i(78492),s=i(12783);const o="artist-artistVerifiedBadge-wrapper",l="artist-artistVerifiedBadge-badge",c="artist-artistVerifiedBadge-fillColor";var u=i(86070);const d=({text:e,iconSize:t="medium",className:i})=>(0,u.jsxs)("span",{className:r()(o,i),children:[(0,u.jsx)("div",{className:`${l} ${c}`}),(0,u.jsx)(a.O,{semanticColor:"textAnnouncement",className:l,size:t}),e?(0,u.jsx)(s.E,{variant:"bodySmall",children:e}):null]})},52586:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var n=i(86070);const r=({className:e,name:t})=>(0,n.jsx)("svg",{height:16,role:"img",width:16,viewBox:"0 0 24 24",className:e,name:t,"aria-hidden":"true",children:(0,n.jsx)("circle",{cx:"50%",cy:"50%",r:"6",fill:"currentColor"})})},1689:(e,t,i)=>{"use strict";i.d(t,{m:()=>o});var n=i(11808);const r="main-loadingIndicator-circle",a="main-loadingIndicator-loadingIcon";var s=i(86070);const o=()=>(0,s.jsxs)("div",{className:a,children:[(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"12px",width:"56px",x:"0px",y:"0px",viewBox:"0 0 1 100",xmlSpace:"preserve","":"loadingIcon",children:[(0,s.jsx)("circle",{className:r,cx:"-140",cy:"50",r:"32"}),(0,s.jsx)("circle",{className:r,cx:"0",cy:"50",r:"32"}),(0,s.jsx)("circle",{className:r,cx:"140",cy:"50",r:"32"})]}),(0,s.jsx)("span",{className:"hidden-visually",children:n.Ru.get("page.loading")})]})},50415:(e,t,i)=>{"use strict";i.d(t,{K:()=>s});var n=i(11808),r=i(74627),a=i(86070);const s=e=>(0,a.jsx)(r.v,{...e,text:n.Ru.get("paid")})},57386:(e,t,i)=>{"use strict";i.d(t,{P:()=>a});var n=i(14934),r=i(86070);const a=({iconSize:e,className:t})=>(0,r.jsx)("div",{className:t,children:(0,r.jsx)(n.E,{size:e,"aria-hidden":!0})})},39710:(e,t,i)=>{"use strict";i.d(t,{R:()=>a});var n=i(59996),r=i(86070);const a=({uri:e,enabled:t,className:i,children:a,onClick:s})=>t?(0,r.jsx)(n.N,{to:e,className:i,onClick:s,children:a}):(0,r.jsx)(r.Fragment,{children:a})},59996:(e,t,i)=>{"use strict";i.d(t,{N:()=>m});var n=i(30758),r=i(37985),a=i(61544),s=i(63574),o=i(45346),l=i(34629),c=i(99744),u=i(53209),d=i(86070);const m=(0,n.memo)((0,n.forwardRef)((function(e,t){const{to:i,pageId:m,onClick:h,children:g,draggable:f=!1,state:v,search:y,pathname:b,tabIndex:_,stopPropagation:E=!1,...C}=e,x=(0,o.W)(),S=(0,c.z)(),A=(0,n.useContext)(l.ql),T=b||(0,a.o_)(i,{parseUnknown:!0}),I=p(T)?T.toURLPath(!0):T,N=(0,a.o_)(I,{parseUnknown:!0}),w=(0,s.W)({uri:N?.toURI(),type:"link"}),R={onClick:(0,n.useCallback)((e=>{x({intent:"navigate",type:"click",targetUri:i}),E&&e.stopPropagation(),h&&h(e,(0,a.o_)(i,{parseUnknown:!0})?.toURI())}),[x,i,E,h]),draggable:f,...C},k={pageId:m,...v,referrer:e.referrer||A||S.getReferrer()};if(T){let e,i;e=p(T)?w?(0,u.hF)(T.toURLPath(!0)):T.toURLPath(!0):w?(0,u.hF)(T):T;const n=e.split("?");return n.length>1&&(e=n[0],i=n[1]),(0,d.jsx)(r.N_,{...R,ref:t,to:{pathname:e,search:y??i},state:k,tabIndex:_,children:g})}const O=y?`${i}${y}`:i;return(0,d.jsx)("a",{...R,ref:t,href:O,target:"_blank",rel:"noopener",tabIndex:_,children:g})})));function p(e){return!!e&&"string"!=typeof e}},83028:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});var n=i(30758),r=i(97500),a=i.n(r),s=i(98367),o=i(12783),l=i(68637),c=i(11808),u=i(1689);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 m=i(52608);const p="main-loadingPage-container";var h=i(86070);const g=({loading:e=!0})=>(0,h.jsx)("div",{className:a()(p,"contentSpacing"),children:e?(0,h.jsx)(u.m,{}):null}),f=e=>{const{hasError:t,errorMessage:i,loadOffline:r=!1,timeoutInMs:u}=e,f=(0,m.n)(),[v,y,b]=function(e,t,i=3e4){const[r,a]=(0,n.useReducer)(d,{loading:!1,error:e});return(0,n.useEffect)((()=>{if(e)return a({type:"ERROR"}),()=>{};const t=setTimeout((()=>{a({type:"LOADING"})}),200);return()=>{clearTimeout(t)}}),[e]),(0,n.useEffect)((()=>{let e;return t&&(e=window.setTimeout((()=>{a({type:"ERROR"})}),i)),()=>{clearTimeout(e)}}),[r.loading,t,i]),[r.loading,t,r.error]}(t,f,u),[_,E]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{const e=setTimeout((()=>{E(!0)}),1e3);return()=>{clearTimeout(e)}}),[]),y||r?b?(0,h.jsxs)("div",{className:a()(p,"contentSpacing"),children:[(0,h.jsx)(l.b,{size:"xxlarge","aria-hidden":"true"}),(0,h.jsx)(o.E,{as:"p",variant:"titleMedium",children:i}),(0,h.jsx)(o.E,{as:"p",variant:"bodyMedium",children:c.Ru.get("error.not_found.body")})]}):_?(0,h.jsx)(g,{loading:v}):(0,h.jsx)("div",{"":"loading-page"}):(0,h.jsxs)("div",{className:a()(p,"contentSpacing"),children:[(0,h.jsx)(s.P,{size:"xxlarge","aria-hidden":"true"}),(0,h.jsx)(o.E,{as:"p",variant:"titleMedium",children:c.Ru.get("offline.feedback-text")})]})}},55187:(e,t,i)=>{"use strict";i.d(t,{h:()=>d});var n=i(30758),r=i(89199),a=i(17847),s=i(63198),o=i(17818),l=i(60102);var c=i(25558),u=i(86070);const d=({children:e,action:t,uri:i})=>{const d=(0,s.V)(),m=(0,l.N)(o.JD);let p;const h=()=>{const e={triggerId:a.d,triggerAction:{type:t}};r.h.set((t=>({...t,...e}))),m.storeAction(o.j8,{operation:c.tS.ADD,uris:[i]})};try{p=n.Children.only(e)}catch(t){return(0,u.jsx)(u.Fragment,{children:e})}return d?n.cloneElement(p,{onClick:h}):(0,u.jsx)(u.Fragment,{children:e})}},95141:(e,t,i)=>{"use strict";i.d(t,{r:()=>v});var n=i(30758),r=i(97500),a=i.n(r),s=i(63332);var o=i(43396),l=i(73356),c=i(26969);const u="main-trackInfo-overlay",d="main-trackInfo-equalGradientWidth",m="EOLjmX4qyDsRvnxBK0JO",p="main-trackInfo-rightToLeft",h="main-trackInfo-contentContainer",g="main-trackInfo-contentWrapper";var f=i(86070);const v=({children:e,title:t,speed:i=.2,pauseAtEndEdgeDurationMs:r=1200,initialMouseIntDelayMs:v=200,startAnimationOnMount:y=!0,startAnimationOnMountDelayMs:b=1e3,iterationCount:_="single",iterationCountOnTouchDevices:E="infinite",scrollMethod:C="transform",equalGradientWidth:x})=>{const S=(0,n.useRef)(null),A=(0,n.useRef)(null),T=(0,n.useRef)(null),I=(0,n.useRef)(0),N=(0,n.useRef)("scrolling"),w=(0,o.W)()?"rtl":"ltr",R=(0,n.useRef)("ltr"),k=(0,n.useRef)(_),O=(0,l.j)(),P=(0,s.U)("(any-pointer: coarse)"),L=(0,n.useRef)({initialMouseInteraction:null,animationOnMount:null}),j=(0,n.useCallback)((()=>T.current&&S.current?T.current.clientWidth-S.current.clientWidth:0),[]),D=(0,n.useCallback)((()=>"rtl"===R.current?1:-1),[R]),M=(0,n.useCallback)((()=>{const e=j();return e>0&&w!==R.current?0+-1*D()*e:0}),[j,w,D]),U=(0,n.useCallback)((()=>{T.current?.style.setProperty("--trans-x",`${M()}px`)}),[M]),B=(0,n.useCallback)((e=>{S.current?.classList.toggle(m,e)}),[]),F=(0,n.useCallback)((()=>{if(O)return;if(I.current)return;let e=!1,t=0,n=1,a=!1;const s=o=>{const l=j();if(l<=0)return;let c=!0,u=t;if(e){if(a)B(!1),o>a+r&&(a=!1);else if("paused"===N.current);else{u+=n*(60*(o-e)/1e3)*i,u>l?(n*=-1,a=o,u=l):u<0&&(n*=-1,a=o,u=0,c="infinite"===k.current)}if(u!==t&&B(!0),t=u,"transform"===C){const e=D()*t+M();T.current?.style.setProperty("--trans-x",`${e}px`),A.current.scrollLeft=0}else"scroll"===C&&(A.current.scrollLeft=t)}e=o,I.current=0,c&&(I.current=requestAnimationFrame(s))};N.current="scrolling",s(0)}),[O,j,C,r,i,B,D,M]),H=(0,n.useCallback)((()=>I.current),[]),V=(0,n.useCallback)((()=>{N.current="paused"}),[]),G=(0,n.useCallback)((()=>{N.current="scrolling"}),[]),z=(0,n.useCallback)((()=>{cancelAnimationFrame(I.current),N.current="paused",I.current=0;const e=j();B(e>0)}),[j,B]),W=(0,n.useCallback)((()=>{Object.values(L.current).forEach((e=>e&&clearTimeout(e)))}),[]),K=(0,n.useCallback)((e=>{H()?V():"focus"!==e&&(L.current.initialMouseInteraction=setTimeout(F,v))}),[F,V,v,H]),Y=(0,n.useCallback)((()=>{L.current.initialMouseInteraction&&clearTimeout(L.current.initialMouseInteraction),H()&&G()}),[G,H]);return(0,n.useEffect)((()=>{y&&(L.current.animationOnMount&&clearTimeout(L.current.animationOnMount),L.current.animationOnMount=setTimeout(F,b))}),[F,b,y]),(0,n.useEffect)((()=>()=>{z(),W(),U()}),[z,W,U]),(0,n.useEffect)((()=>{const e=T.current?.children[0];e&&(R.current=getComputedStyle(e).direction,"rtl"===R.current&&S.current?.classList.add(p)),U()}),[w,M,U]),(0,c.w)({onResize:()=>{z(),U()},refOrElement:S,observeOnly:"width"}),(0,n.useEffect)((()=>{P&&(k.current=E)}),[P,E]),(0,f.jsx)("div",{ref:S,className:a()(u,x&&d),onMouseOver:()=>K("mouse"),onFocus:()=>K("focus"),onMouseOut:Y,onBlur:Y,title:O&&t?t:void 0,children:(0,f.jsx)("div",{ref:A,className:h,children:(0,f.jsx)("div",{ref:T,className:a()(g,x&&d),children:e})})})}},14294:(e,t,i)=>{"use strict";i.d(t,{k:()=>p});var n=i(30758),r=i(41978),a=i(37985),s=i(11808),o=i(45346),l=i(57402),c=i(99744),u=i(53209),d=i(39554),m=i(86070);const p=(0,n.memo)((0,n.forwardRef)((function(e,t){const{onClick:i,to:p,referrer:h,navigationalRoot:g,...f}=e,v=(0,c.z)(),y=s.Ru.getLocaleForURLPath(),b=(0,r.d4)(l.MU),_=(0,r.d4)(l.NR),E=(0,u.CW)(p),C=(0,d.p)({urlLocale:y,entity:E,localeFeatureFlag:b,entityFeatureFlag:_,type:"link"})?(0,u.hF)(p):p,x=(0,o.W)(),S=(0,n.useCallback)((e=>{x({intent:"navigate",type:"click",targetUri:C}),i&&i(e)}),[x,i,C]);return(0,m.jsx)(a.k2,{ref:t,draggable:!1,end:e.end,to:C,state:{referrer:h||v.getReferrer(),navigationalRoot:g},"aria-label":e["aria-label"],tabIndex:e.tabIndex,onClick:S,...f,children:e.children})})))},82455:(e,t,i)=>{"use strict";i.d(t,{Ih:()=>f,Tc:()=>g,hD:()=>h});var n=i(30758),r=i(97500),a=i.n(r),s=i(61544),o=i(11808),l=i(53129);const c="atZHmMpyVJ8qoM6YbYdA",u="lokp6OWWTWj_WazpVjAR";var d=i(86070);const m=6048e5,p=3e5;function h(e,t,i,n=!1){const r=(0,s.gH)(e),a=function(e){const t=new Date;return!!e&&Math.floor(t.getTime()-Date.parse(e))<m}(t),o=function(e,t){return!!e||!!t&&t>p}(n,i);return r&&a&&!o}const g=n.memo((function({className:e,label:t}){const i=t||o.Ru.get("type.newEpisode");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l.Zp,{label:i,children:(0,d.jsx)("span",{className:a()(c,e),"aria-label":i})}),t]})})),f=n.memo((function({isMusicAndTalk:e,className:t}){const i=e?o.Ru.get("type.newEpisode"):o.Ru.get("type.newPodcastEpisode");return(0,d.jsx)(g,{label:i,className:a()(u,t)})}))},57262:(e,t,i)=>{"use strict";i.d(t,{u:()=>o});var n=i(30758),r=i(81987),a=i(86070);const s=({renderOldExperience:e=(()=>null),renderNewExperience:t=(()=>null),forceNewExperience:i,property:n})=>(0,r.NC)(n)||i?t():e(),o=({suspenseFallback:e=null,renderNewExperience:t,renderOldExperience:i,forceNewExperience:r=!1,property:o})=>(0,a.jsx)(n.Suspense,{fallback:e,children:(0,a.jsx)(s,{renderNewExperience:t,renderOldExperience:i,forceNewExperience:r,property:o})})},45518:(e,t,i)=>{"use strict";i.d(t,{a:()=>o});var n=i(30758),r=i(58246),a=(i(95104),i(83026));var s=i(86070);r.ae.plugin(r.lW);const o=(0,n.memo)((function({className:e,children:t,options:i,style:r,onInstanceCreated:o}){const l=function(){const[e,t]=(0,n.useState)("mouse");return(0,n.useEffect)((()=>{const e=e=>{t(e.pointerType)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}}),[]),e}(),c=(0,n.useRef)(null),[u]=(0,a.d)({defer:!1,options:{update:{elementEvents:[],...i?.update},scrollbars:{theme:"os-theme-spotify",autoHide:"mouse"===l?"leave":"never",autoHideDelay:800,clickScroll:!0,autoHideSuspend:!1,...i?.scrollbars},...i},events:{initialized:o}});return(0,n.useEffect)((()=>{c.current&&u(c.current)}),[u]),(0,s.jsx)("div",{"data-overlayscrollbars-initialize":!0,style:r,ref:c,className:e,children:t})}))},43058:(e,t,i)=>{"use strict";i.d(t,{o:()=>v});var n=i(30758),r=i(9183),a=i(89101),s=i(62412),o=i(35764),l=i(68637),c=i(43830),u=i(91708),d=i(11808),m=i(48905),p=i(72091);const h="main-pageErrorTemplate-errorBody";var g=i(86070);const f={"/":a.H,"/search":s.C,"/collection":o.M},v=n.memo((function(){const e=(0,r.zy)(),t=(i=e.pathname,f[i]||l.b);var i;const{spec:a,logger:s}=(0,p.r)(u.W,{data:{uri:e.pathname}}),o=(0,m.t)(a),v=(0,n.useCallback)((()=>{const e=a.reloadPageButtonFactory().hitRefreshContent();s.logInteraction(e),window.location.reload()}),[a,s]);return(0,g.jsxs)("div",{className:h,ref:o,children:[(0,g.jsx)(t,{width:46,height:46}),(0,g.jsx)("h1",{children:d.Ru.get("error-dialog.generic.header")}),(0,g.jsx)("p",{children:d.Ru.get("error-dialog.generic.body")}),(0,g.jsx)(c.$,{onClick:v,children:d.Ru.get("fatal-error.button-label")})]})}))},91204:(e,t,i)=>{"use strict";i.d(t,{u:()=>b});var n=i(30758),r=i(9183),a=i(48697),s=i(27268),o=i(30171),l=i(69922),c=i(43830),u=i(11808),d=i(45346),m=i(67848),p=i(16288),h=i(77339),g=i(23679);const f="wTtSN5qCRogLw_ONPzid",v="Zp4roOZZCr2D0jkQgTwW";var y=i(86070);const b=function({title:e,placement:t,arrow:i,children:b}){const _=(0,m.U)(),{openURLWithSessionTransfer:E}=(0,g.L)(),[C,x]=(0,n.useState)(!1),S=(0,r.Zp)(),A=(0,p.k)(!0),{url:T,isExternal:I}=A,N=(0,d.W)(),w=(0,n.useCallback)((()=>{x(!1),N({intent:"upgrade-to-premium",type:"click"}),!1===I?S(T):E(T)}),[N,I,T,S,E]);return _?(0,y.jsx)(a.W,{onShow:()=>x(!0),onHide:()=>x(!1),placement:t,overlay:C&&(0,y.jsx)(h.s,{children:(0,y.jsx)("div",{children:(0,y.jsxs)(s.A,{role:"alertdialog",popoverTitle:e,arrow:i,colorSet:"announcement",className:f,children:[u.Ru.get("pick-and-shuffle.upsell.message"),(0,y.jsxs)("div",{className:v,children:[(0,y.jsx)(o.H,{buttonSize:l.$.sm,onClick:()=>x(!1),children:u.Ru.get("pick-and-shuffle.upsell.dismiss")}),(0,y.jsx)(c.$,{buttonSize:l.$.sm,onClick:w,colorSet:"invertedLight",children:u.Ru.get("pick-and-shuffle.upsell.explore-premium")})]})]})})}),children:b}):b}},38838:(e,t,i)=>{"use strict";i.d(t,{H4:()=>n});i(30758),i(97500),i(11808),i(53129),i(25390);i(86070);let n=function(e){return e.primary="primary",e.secondary="secondary",e.transparent="transparent",e}({})},27685:(e,t,i)=>{"use strict";i.d(t,{H:()=>h,R:()=>g});var n=i(30758),r=i(94526),a=i(88952),s=i(1256),o=i(43830),l=i(30171),c=i(11808),u=i(53129),d=i(25390);const m="ix_8kg3iUb9VS5SmTnBY";var p=i(86070);let h=function(e){return e.primary="primary",e.secondary="secondary",e.transparent="transparent",e}({});const g=n.memo((0,n.forwardRef)((function(e,t){const{onClick:i,isPlaying:n,locked:g,version:f=h.primary,size:v="medium",disabled:y=!1,children:b,ariaPauseLabel:_,ariaPlayLabel:E,isLoading:C,condensedAll:x=!1,...S}=e,A=e=>{const{currentTarget:t,detail:r}=e;i(e),n||(0,d.aX)(e,"play/resume"),r>0&&t&&t.blur()};let T=c.Ru.get("play"),I=r.A;g?(T=c.Ru.get("mwp.header.content.unavailable"),I=a.u):n?(T=_??c.Ru.get("pause"),I=s._):T=E??T;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.Zp,{label:T,showDelay:u.uF,children:(0,p.jsx)("div",{className:m,children:(()=>{const e={iconOnly:I,size:v,onClick:A,disabled:y||C,"aria-label":T,ref:t,"":"play-button",...S};switch(f){case h.secondary:return(0,p.jsx)(o.$,{...e,colorSet:"invertedLight"});case h.transparent:return(0,p.jsx)(l.H,{...e,semanticColor:"textBase",condensedAll:x});default:return(0,p.jsx)(o.$,{...e})}})()})}),b]})})))},76652:(e,t,i)=>{"use strict";i.d(t,{D:()=>v});var n=i(30758),r=i(97500),a=i.n(r),s=i(27685),o=i(81987),l=i(84492),c=i(19159),u=i(21056),d=i(50562),m=i(98097);const p="a7Y8huZIZOVb02vySpQo";function h(){const{surface:e,isViewingVariant:t}=(0,d.h)(),i=(0,o.NC)(c.cOL,{loadingValue:!1});if(e===u.u.PLAYLIST){return{buttonClassName:i&&t===m.K.FC_24?p:null,styles:{"--triangle-light-image":`url(${(0,l.b)("images/FC24_Spotify_PlayButton_V2_TriangleLight.svg")})`}}}return{buttonClassName:null,styles:void 0}}var g=i(45346),f=i(86070);const v=n.memo((function({uri:e,ariaPlayLabel:t,ariaPauseLabel:i,onClick:n,isPlaying:r,size:o,locked:l,...c}){const u=(0,g.W)(),{buttonClassName:d,styles:m}=h();return(0,f.jsx)(s.R,{ariaPlayLabel:t,ariaPauseLabel:i,isPlaying:r,onClick:t=>{l||u({targetUri:e,intent:r?"pause":"play",type:"click",itemIdSuffix:"button"}),n(t)},size:o,locked:l,className:a()(d),style:m,...c})}))},13466:(e,t,i)=>{"use strict";i.d(t,{x:()=>d});var n=i(30758),r=i(94526),a=i(88952),s=i(1256),o=i(11808),l=i(53129),c=i(25390),u=i(86070);const d=n.forwardRef((function({className:e,iconClassName:t,isPlaying:i,isLocked:n,onClick:d=(()=>{}),playAriaLabel:m=o.Ru.get("play")},p){let h=(0,u.jsx)(r.A,{className:t});n?h=(0,u.jsx)(a.u,{size:"large"}):i&&(h=(0,u.jsx)(s._,{className:t}));let g=o.Ru.get("play");return g=n?o.Ru.get("mwp.header.content.unavailable"):i?o.Ru.get("pause"):m,(0,u.jsx)(l.Zp,{label:g,children:(0,u.jsx)("button",{onClick:e=>{d(e,i?"pause":"play"),i||(0,c.aX)(e,"play/resume")},className:e,"aria-label":g,ref:p,children:h})})}))},90498:(e,t,i)=>{"use strict";i.d(t,{$$:()=>o,NV:()=>a,Pj:()=>u,iE:()=>l});var n=i(30758),r=i(86070);let a=function(e){return e.TITLE="title",e.DESCRIPTION="description",e.NONE="NONE",e}({});const s={isOpen:!1,isImagePickerOpen:!1,playlistDetails:{uri:"",name:"",description:"",image:void 0},focusedElement:a.NONE},o=(0,n.createContext)(void 0),l=(0,n.createContext)(s);function c(e,t){switch(t.type){case"open":return{...e,isOpen:!0,playlistDetails:t.playlistDetails,focusedElement:t.focusedElement||a.NONE};case"close":return{...s};case"openWithImagePicker":return{...e,isOpen:!0,isImagePickerOpen:!0,playlistDetails:t.playlistDetails,focusedElement:a.NONE};default:throw new Error("Unknown action received!")}}const u=({children:e})=>{const[t,i]=(0,n.useReducer)(c,s);return(0,r.jsx)(o.Provider,{value:i,children:(0,r.jsx)(l.Provider,{value:t,children:e})})}},73128:(e,t,i)=>{"use strict";i.d(t,{W:()=>d,d:()=>u});var n=i(30758),r=i(23137),a=i(97500),s=i.n(a),o=i(60656);const l="main-contextMenu-tippyWrapper";var c=i(86070);const u={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"},d=({visible:e,overlay:t,placement:i,children:a,childRef:u,maxWidth:d=336,hideArrow:m=!1,className:p="",tippyWrapperClassName:h,popperOptions:g={},onHide:f,zIndex:v,fadeOut:y=!1,useLazyMounting:b=!1,renderInline:_=!0,theme:E="activation",triggerTarget:C,offset:x=[0,14],aria:S,animation:A=!0,keepChildrenMounted:T=!1})=>{const[I,N]=(0,n.useState)(!1),w=(0,n.useMemo)((()=>({onMount:()=>N(!0),onHidden:()=>N(!1)})),[]),R=(0,n.useCallback)(((e,t)=>f?.(t)),[f]),k=(0,o.ZY)();return T||e||y?(0,c.jsx)(n.Suspense,{fallback:a??null,children:(0,c.jsx)(r.Ay,{animation:!!A&&"shift-toward-subtle",maxWidth:d,aria:S,visible:e,theme:E,placement:i||"auto",interactive:!0,arrow:!m,content:I||!b?t:"",className:p,onClickOutside:R,popperOptions:g,zIndex:v,offset:x,reference:u,triggerTarget:C,...b&&w,appendTo:!k||_?void 0:()=>k.body,children:(0,c.jsx)("div",{className:s()(l,h),children:a})})}):(0,c.jsx)(c.Fragment,{children:a})}},12330:(e,t,i)=>{"use strict";i.d(t,{z:()=>W});var n=i(30758),r=i(12783),a=i(81987),s=i(11808),o=i(55665),l=i(71588),c=i(48100),u=i(59996),d=i(9813),m=i(71801),p=i(17930),h=i(84075),g=i(41609),f=i(72445),v=i(84537),y=i(72605),b=i(96849),_=i(6941),E=i(40009),C=i(69905),x=i(81783),S=i(98912),A=i(54687),T=i(12274),I=i(4096),N=i(48200),w=i(59355),R=i(58237),k=i(78074),O=i(95302),P=i(16972),L=i(72091),j=i(79787),D=i(94672),M=i(76748),U=i(86070);const B=n.memo((function({uri:e,name:t,totalMilliseconds:i,artists:n,isPlayable:r,contentRating:a,imageUrl:B,albumUri:F,contextUri:H,index:V,playcount:G,usePlayContextItem:z,hasAssociatedVideo:W}){const{spec:K}=(0,L.r)(o.i,{data:{position:V,reason:"",uri:e}}),{isActive:Y,isPlaying:q,triggerPlay:Z,togglePlay:$}=z({uri:e,index:V}),Q=(0,P.T)(e),J=(0,N.g)(e,r),{badges:X,hasBadges:ee}=(0,D.b)({downloadAvailability:Q,contentRating:a,hasAssociatedVideo:W}),te=a===j.x7.NineteenPlus,ie=n.map((e=>e.name)).join(s.Ru.getSeparator()),ne=(0,I.c)();return(0,U.jsx)(O.pZ,{value:"row",index:V,children:(0,U.jsx)(l.h,{menu:(0,U.jsx)(c.P,{uri:e,contextUri:H,albumUri:F,artists:n}),children:(0,U.jsxs)(S.w,{uri:e,onTriggerPlay:(e,t)=>{Z({loggingParams:t})},isActive:Y,contextUri:H,isPlayable:J,ageRestricted:te,dragMetadata:{name:t,createdBy:ie},index:V,ariaRowIndex:V,spec:K,children:[(0,U.jsx)(_.y,{ariaColIndex:0,children:(0,U.jsx)(g.$,{uri:e,playAriaLabel:s.Ru.get("tracklist.a11y.play",t,ie),isPlaying:q,isActive:Y,onClick:(e,t)=>{$({loggingParams:t})},spec:K,children:(0,U.jsx)(v.a,{children:V+1})})}),(0,U.jsxs)(E.U,{ariaColIndex:1,children:[(0,U.jsx)(p.e,{src:B}),(0,U.jsxs)(h.l,{children:[ne?(0,U.jsx)(u.N,{to:e,className:M.A.rowTitle,"":"internal-track-link",children:(0,U.jsx)(x.p,{titleText:t,children:t})}):(0,U.jsx)(x.p,{titleText:t,children:t}),ee&&(0,U.jsxs)(d.P,{children:[X.download&&(0,U.jsx)(w._,{}),X.explicit&&(0,U.jsx)(R.g,{}),X.nineteen&&(0,U.jsx)(k.q,{className:M.A.nineteen,size:16}),X.hasAssociatedVideo&&(0,U.jsx)(A.l,{separator:""})]})]})]}),(0,U.jsx)(C.o,{ariaColIndex:2,children:(0,U.jsx)(y.Y,{playcount:G})}),(0,U.jsxs)(b.l,{ariaColIndex:3,children:[(0,U.jsx)(T.d,{uri:e,spec:K}),(0,U.jsx)(m.P,{duration:i}),(0,U.jsx)(f.Y,{menu:(0,U.jsx)(c.P,{uri:e,albumUri:F,contextUri:H,artists:n}),label:s.Ru.get("more.label.track",t,ie),spec:K})]})]})})})}),((e,t)=>e.uri===t.uri));var F=i(45546),H=i(46288),V=i(19159),G=i(42582);const z="artist-popularTrackList-seeMore",W=({uri:e,nrTracks:t,initialTracks:i})=>{const{usePlayContextItem:o}=(0,G.P)({uri:e},{featureIdentifier:"artist"}),l=(0,a.NC)(V.LX5),[c,u]=(0,n.useState)(!1),d=(0,n.useCallback)((()=>{u(!c)}),[c]),m=(0,n.useCallback)((({uri:e,contextUri:t,totalMilliseconds:i,name:n,artists:r,contentRating:a,isPlayable:s,playcount:c,imageUrl:u,albumUri:d,hasAssociatedVideo:m},p)=>(0,U.jsx)(B,{index:p,uri:e,contextUri:t,totalMilliseconds:i,name:n,artists:r,isPlayable:s,contentRating:a,playcount:c||0,imageUrl:u,albumUri:d,usePlayContextItem:o,hasAssociatedVideo:m&&l},e)),[o,l]),p=(0,n.useCallback)((e=>({uri:e.uri})),[]),h=(0,n.useMemo)((()=>[H.$.INDEX,H.$.TITLE_AND_ARTIST,H.$.PLAYS,H.$.DURATION]),[]);return(0,U.jsxs)(O.pZ,{value:"artist-popular-tracks-list",children:[(0,U.jsx)(F.S4,{ariaLabel:s.Ru.get("tracklist.popular-tracks"),renderRow:m,nrTracks:Math.min(t,c?10:5),tracks:i,resolveItem:p,columns:h}),t>5?(0,U.jsx)("button",{"aria-expanded":c,className:z,onClick:d,children:(0,U.jsx)(r.E,{as:"div",variant:"bodySmallBold",children:c?s.Ru.get("artist-page.tracks.showless"):s.Ru.get("artist-page.tracks.seemore")})}):null]})}},13786:(e,t,i)=>{"use strict";i.d(t,{v:()=>m});var n=i(49217),r=i(75930),a=i(43830),s=i(83547),o=i(11808),l=i(55187),c=i(7571),u=i(37477),d=i(86070);const m=({uri:e,isBook:t=!1})=>{const{isPreSaved:i,addPresave:m,removePresave:p}=(0,c.w)({uri:e,isBook:t});return i?(0,d.jsx)(n.n,{onClick:p,iconTrailing:r.k,children:o.Ru.get("web-player.prerelease.presaved")}):(0,d.jsx)(l.h,{uri:e,action:u.no.SAVE_PRERELEASE,children:(0,d.jsx)(a.$,{disabled:void 0===i,onClick:m,iconTrailing:s.P,children:o.Ru.get("web-player.prerelease.presave")})})}},67062:(e,t,i)=>{"use strict";i.d(t,{E:()=>E,l:()=>b});var n=i(30758),r=i(81987),a=i(61544),s=i(2287),o=i(73426),l=i(15691),c=i(42832),u=i(4143),d=i(75224);const m=e=>{const t=(0,l.U)(e,c.RB),{metadataOptions:i,contentsOptions:n}=(0,u.$)(t,"");return(0,d.r)(e,i,n)},p=({children:e,callback:t,hoverDelayMs:i=200})=>{const r=(0,n.useRef)();return n.cloneElement(e,{onMouseEnter:n=>{r.current=setTimeout(t,i),e.props.onMouseEnter?.(n)},onMouseLeave:t=>{clearTimeout(r.current),e.props.onMouseLeave?.(t)}})},h=({children:e,callback:t,...i})=>n.cloneElement(e,{onMouseDown:i=>{t(),e.props.onMouseDown?.(i)},...i}),g=({children:e,callback:t})=>{const i=(0,n.useRef)(t);return(0,n.useEffect)((()=>{i.current()}),[]),e};var f=i(19159),v=i(36485),y=i(86070);let b=function(e){return e[e.OnMouseDown=0]="OnMouseDown",e[e.OnHover=1]="OnHover",e[e.OnRender=2]="OnRender",e}({});const _=e=>{const t=(e=>{const t=(0,a.o_)(e);switch(t?.type){case a.NQ.ALBUM:return s.w;case a.NQ.PLAYLIST:case a.NQ.PLAYLIST_V2:return m;case a.NQ.ARTIST:return o.R;default:return()=>()=>{}}})(e.uri)(e.uri);switch(e.trigger){case b.OnMouseDown:return(0,y.jsx)(h,{callback:t,children:e.children});case b.OnHover:return(0,y.jsx)(p,{callback:t,hoverDelayMs:e.hoverDelayMs,children:e.children});case b.OnRender:return(0,y.jsx)(g,{callback:t,children:e.children});default:return(0,v.d)(e)}},E=({uri:e,trigger:t,children:i,...a})=>{const s=(0,r.NC)(f.JhO,{loadingValue:!1}),o=n.cloneElement(i,a);return s?(0,y.jsx)(n.Fragment,{children:(0,y.jsx)(_,{uri:e,trigger:t,children:o})},e):o}},21048:(e,t,i)=>{"use strict";i.d(t,{z2:()=>q});var n=i(30758),r=i(97500),a=i.n(r),s=i(91969),o=i(8159),l=i(60656);function c(e,t,i){const n=e.current;if(null===n)return 0;const r=n.getBoundingClientRect();return"vertical"===i?1-Math.max(0,Math.min((t.clientY-r.top)/r.height,1)):Math.max(0,Math.min((t.clientX-r.left)/r.width,1))}var u=i(10239),d=i(81987),m=i(84492);const p=20,h=[{name:"dark",frames:p},{name:"normal",frames:p},{name:"dark",frames:p},{name:"normal",frames:p},{name:"dark",frames:320},{name:"dark",frames:80,isStartOfFlashlightEnter:!0},{name:"flashlight-on",frames:p},{name:"dark",frames:p},{name:"flashlight-on",frames:p},{name:"dark",frames:40},{name:"flashlight-on",isInfinite:!0},{name:"dark",frames:p,isStartOfExit:!0},{name:"flashlight-on",frames:p},{name:"dark",frames:p},{name:"flashlight-on",frames:p},{name:"dark",frames:p},{name:"normal",isInfinite:!0,isEndOfExit:!0}],g=200;function f(e,t){const i=document.createElement("canvas"),n=i.getContext("2d");if(null===n)return null;const r=Math.sqrt(e**2+t**2),a=g;return i.width=r/1.5+2*a,i.height=r+2*a,n.translate(a,a),{canvas:i,context:n,width:i.width-2*a,height:i.height-2*a,padding:a}}function v(e,t,i,n,r=0){const a=n/2*Math.PI/180,s=i/Math.cos(a),o=Math.sin(a)*s*2;e.beginPath(),e.moveTo((t-o)/2,r),e.lineTo(t/2,r+i),e.lineTo((t-o)/2+o,r),e.closePath()}function y(e,t){const i=function(e,t){const i=(0,n.useMemo)((()=>{const e=new Image;return e.src=(0,m.b)("images/stranger-things-nether-bottom-left.png"),e}),[]),r=(0,n.useMemo)((()=>{const e=new Image;return e.src=(0,m.b)("images/stranger-things-nether-bottom-right.png"),e}),[]);return function(n){if(r){const i=e-r.naturalWidth,a=t-r.naturalHeight;n.drawImage(r,0,0,r.naturalWidth,r.naturalHeight,i,a,r.naturalWidth,r.naturalHeight)}if(i){const e=0,r=t-i.naturalHeight;n.drawImage(i,0,0,i.naturalWidth,i.naturalHeight,e,r,i.naturalWidth,i.naturalHeight)}}}(e,t),[r,a]=(0,n.useState)(b(e,t)),[s,o]=(0,n.useState)(_(e,t));return(0,n.useEffect)((()=>{a(b(e,t)),o(_(e,t))}),[e,t]),(n,a,o,l)=>{if(!r||!s)return;const c=o/100,u=a.left+a.width*c,d=a.top+a.height/2;let m=0;m=c>.5?(c-.5)/.5*-60:60-c/.5*60;const p=r.width,g=r.height,f=-r.width/2,v=-r.height,y=p,b=g;n.save(),n.fillStyle="rgba(0, 0, 0, 0.85)",n.fillRect(0,0,e,t);const _=n.createLinearGradient(e/2,0,e/2,t);_.addColorStop(0,"rgba(57, 139, 216, 0.3)"),_.addColorStop(1,"rgba(0, 29, 62, 0.15)"),n.fillStyle=_,n.fillRect(0,0,e,t),"flashlight-on"===h[l].name?(n.save(),n.translate(u,d),n.rotate(m*Math.PI/180),n.globalCompositeOperation="destination-out",n.drawImage(r,0,0,p,g,f,v+100,y,b),n.restore(),i(n),n.save(),n.translate(u,d),n.rotate(m*Math.PI/180),n.globalCompositeOperation="source-over",n.drawImage(s,0,0,p,g,f,v+100,y,b),n.restore()):i(n),n.restore()}}function b(e,t){const i=f(e,t);if(!i)return null;const{canvas:n,context:r,width:a,height:s,padding:o}=i,l=r.createLinearGradient(a/2,0,a/2,s);l.addColorStop(0,"rgba(0, 0, 0, 1)"),l.addColorStop(1,"rgba(0, 0, 0, 0)");const c=r.createLinearGradient(a/2,0,a/2,s);return c.addColorStop(.7,"rgba(0, 0, 0, 1)"),c.addColorStop(1,"rgba(0, 0, 0, 0)"),r.save(),r.fillStyle="rgba(0, 0, 0, 1)",v(r,a,s,30,120),r.filter="blur(10px)",r.fill(),r.restore(),r.globalCompositeOperation="destination-out",r.fillStyle=c,r.fillRect(-o,-o,a+2*o,s+2*o),r.globalCompositeOperation="source-over",r.fillStyle="rgba(0, 0, 0, 1)",v(r,a,s,5,40),r.filter="blur(30px)",r.fill(),r.fillStyle="rgba(0, 0, 0, 1)",v(r,a,s,30,80),r.filter="blur(40px)",r.fill(),r.restore(),r.globalCompositeOperation="destination-out",r.fillStyle=l,r.fillRect(-o,-o,a+2*o,s+2*o),n}function _(e,t){const i=f(e,t);if(!i)return null;const{canvas:n,context:r,width:a,height:s,padding:o}=i;r.save(),r.fillStyle="rgba(80, 170, 255, 0.6)",v(r,a,s,30,120),r.filter="blur(10px)",r.fill(),r.restore();const l=r.createLinearGradient(a/2,0,a/2,s);l.addColorStop(.7,"rgba(0, 0, 0, 1)"),l.addColorStop(1,"rgba(0, 0, 0, 0)"),r.globalCompositeOperation="destination-out",r.fillStyle=l,r.fillRect(-o,-o,a+2*o,s+2*o),r.globalCompositeOperation="source-over",r.fillStyle="rgba(80, 170, 255, 0.8)",v(r,a,s,5,40),r.filter="blur(30px)",r.fill(),r.fillStyle="rgba(80, 170, 255, 0.4)",v(r,a,s,30,150),r.filter="blur(40px)",r.fill(),r.restore(),r.save(),r.translate(a/2,s-140),r.scale(1,10),r.fillStyle="rgba(198, 238, 251, 0.2)",r.filter="blur(24px)",r.beginPath(),r.arc(0,0,22,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 0.2)",r.filter="blur(18px)",r.beginPath(),r.arc(0,0,20,0,2*Math.PI),r.fill(),r.restore(),r.save(),r.translate(a/2,s-70),r.scale(1,5),r.fillStyle="rgba(198, 238, 251, 0.1)",r.filter="blur(14px)",r.beginPath(),r.arc(0,0,18,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 0.1)",r.filter="blur(8px)",r.beginPath(),r.arc(0,0,20,0,2*Math.PI),r.fill(),r.restore(),r.fillStyle="rgba(100, 190, 255, 1)",r.filter="blur(22px)",r.beginPath(),r.arc(a/2,s+100,20,0,2*Math.PI),r.fill(),r.fillStyle="rgba(198, 238, 251, 1)",r.filter="blur(4px)",r.beginPath(),r.arc(a/2,s+100,14,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 1)",r.filter="blur(1px)",r.beginPath(),r.arc(a/2,s+100,12,0,2*Math.PI),r.fill();const c=r.createLinearGradient(a/2,0,a/2,s);return c.addColorStop(0,"rgba(0, 0, 0, 1)"),c.addColorStop(1,"rgba(0, 0, 0, 0)"),r.globalCompositeOperation="destination-out",r.fillStyle=c,r.fillRect(-o,-o,a+2*o,s+2*o),r.globalCompositeOperation="source-over",n}const E=100,C=[{size:6,alpha:.5},{size:6,alpha:.4},{size:12,alpha:.3},{size:12,alpha:.3},{size:12,alpha:.3},{size:14,alpha:.2},{size:20,alpha:.2},{size:30,alpha:.2},{size:40,alpha:.1}],x=64,S=8,A=2;function T(e,t){const i=(0,n.useMemo)((()=>{const e=new Image;return e.src=(0,m.b)("images/stranger-things-spores.png"),e}),[]),[r,a]=(0,n.useState)(I(e,t));return(0,n.useEffect)((()=>{r?function(e,t,i){e.forEach((e=>{e.x=Math.random()*t,e.y=Math.random()*i}))}(r,e,t):a(I(e,t))}),[e,t,r]),function(n){null!==i&&r.forEach((r=>{r.x-=r.directionX*r.velocityX,r.y-=r.directionY*r.velocityY,r.y>t+10?(r.x=Math.random()*e,r.y=-10):r.x<-10&&(r.x=e+10,r.y=Math.random()*t);const a=r.spriteSheetX,s=r.spriteSheetY,o=x,l=x,c=r.x-r.size/2,u=r.y-r.size/2,d=r.size,m=r.size;n.save(),n.globalAlpha*=r.alpha,n.drawImage(i,a,s,o,l,c,u,d,m),n.restore()}))}}function I(e,t){const i=[];for(let n=0;n<E;n++){const n=Math.floor(Math.random()*C.length),r=Math.floor(Math.random()*S),a=Math.floor(Math.random()*A),s=C[n].size,o=C[n].alpha;i.push({alpha:o,size:s,spriteSheetX:r*x,spriteSheetY:a*x,x:Math.random()*e,y:Math.random()*t,directionX:Math.random()>.5?1:-1,directionY:Math.random()>.5?1:-1,velocityX:s/300,velocityY:s/400})}return i}class N{_subscribers=[];_active=!1;unsubscribeToActivity(e){const t=this._subscribers.findIndex((t=>t.fn===e));-1!==t&&(clearTimeout(this._subscribers[t].inactiveTimeout),this._subscribers.splice(t,1))}subscribeToActivity(e,t){this._subscribers.push({fn:t,msInactive:e,isActive:!1})}enableActivityMonitor(){window.addEventListener("mousemove",this._onActivity),window.addEventListener("mouseup",this._onActivity),window.addEventListener("keydown",this._onActivity),window.addEventListener("scroll",this._onActivity,!0)}disableActivityMonitor(){window.removeEventListener("mousemove",this._onActivity),window.removeEventListener("mouseup",this._onActivity),window.removeEventListener("keydown",this._onActivity),window.removeEventListener("scroll",this._onActivity,!0),this._subscribers.forEach((e=>clearTimeout(e.inactiveTimeout))),this._subscribers=[]}_onActivity=()=>{this._subscribers.forEach((e=>{this._active||(this._active=!0,e.fn(this._active)),clearTimeout(e.inactiveTimeout),e.inactiveTimeout=setTimeout((()=>{this._active=!1,e.fn(this._active)}),e.msInactive)}))}}class w{frame=0;lastPhaseFrame=0;phase=0;animationFrameRequestId=null;flickerTimerId=null;isPlaying=!0;start(){this.lastPhaseFrame=this.frame,this.phase=0;const e=()=>setTimeout((()=>{this.flickerTimerId=e(),this.isPlaying&&h[this.phase].isInfinite&&this.setPhase(h.findIndex((e=>e.isStartOfFlashlightEnter)))}),15e3*Math.random()+5e3);this.flickerTimerId=e()}stop(){const e=h.findIndex((e=>e.isStartOfExit));this.phase<e&&this.setPhase(e),null!==this.flickerTimerId&&clearTimeout(this.flickerTimerId)}setPhase(e){this.lastPhaseFrame=this.frame,this.phase=e}}const R="TNGv07zrye9gB_3ukweR";var k=i(86070);const O=e=>{const{getPercentage:t,isDragging:i=!1,isPlayingStrangerThings:r=!1,progressBar:a}=e,s=(0,n.useMemo)((()=>new N),[]),o=(0,n.useMemo)((()=>new w),[]),l=(0,n.useRef)(null),[c,u]=(0,n.useState)(null),[d,m]=(0,n.useState)(window.innerHeight),[p,g]=(0,n.useState)(window.innerWidth),[f,v]=(0,n.useState)(!1),[b,_]=(0,n.useState)(!1),E=T(p,d),C=y(p,d),x=(0,n.useCallback)((e=>{!i&&r&&(e?o.stop():(o.start(),_(!0)))}),[i,r,o]),S=(0,n.useCallback)((()=>{r&&(o.setPhase(h.findIndex((e=>e.isStartOfFlashlightEnter))),_(!0))}),[r,o]),A=(0,n.useCallback)((()=>{o.stop()}),[o]),I=(0,n.useCallback)((()=>{if(!b)return void v(!0);v(!1);const e=window.innerHeight,t=window.innerWidth;g(t),m(e)}),[b]),O=(0,n.useCallback)((()=>{if(!l.current)return;const{frame:e,lastPhaseFrame:i,phase:n}=o;if(o.frame=e+1,h[n].isEndOfExit)_(!1);else{if(h[n].isInfinite||e-i===h[n].frames&&o.setPhase(n+1),l.current.width=p,l.current.height=d,"normal"!==h[n].name){const e=l.current.getContext("2d");if(!e||!c)return;const i=t();C(e,c,i,n),E(e)}o.animationFrameRequestId=requestAnimationFrame(O)}}),[d,p,C,E,t,c,o]);return(0,n.useEffect)((()=>{window.addEventListener("resize",I);const e=s;return e.enableActivityMonitor(),e.subscribeToActivity(5e3,x),()=>{window.removeEventListener("resize",I),e.disableActivityMonitor(),e.unsubscribeToActivity(x)}}),[s,x,I]),(0,n.useEffect)((()=>{r||o.stop()}),[r,o]),(0,n.useEffect)((()=>{i?S():i||A()}),[i,S,A]),(0,n.useEffect)((()=>{b?(f&&I(),o.animationFrameRequestId=requestAnimationFrame(O)):o.animationFrameRequestId&&cancelAnimationFrame(o.animationFrameRequestId)}),[b,O,I,f,o]),(0,n.useEffect)((()=>{a.current&&u(a.current.getBoundingClientRect())}),[p,d,a]),b?(0,k.jsx)("canvas",{className:R,ref:l,width:p,height:d}):null};var P=i(19159);const L=e=>(0,d.NC)(P.c3z,{loadingValue:!1})&&e.isPlayingStrangerThings?(0,k.jsx)(O,{...e}):null;var j=i(2976);const D="playback-progressbar",M="playback-progressbar-isInteractive",U="progress-bar",B="x-progressBar-progressBarBg",F="x-progressBar-sliderArea",H="oShi2lRbnhFkEr2LlUqC",V="ZqlJ1uWjMeen9ye7Y7GC",G="x-progressBar-fillColor",z="VI_bMRxDl9fS6qksct7W",W="sW0M_K97doEB3B4Ts58i",K="progress-bar--isDragging",Y="progress-bar__slider",q=({value:e,max:t,step:i,labelText:r,isInteractive:d=!0,forceActiveStyles:m=!1,onDragStart:p,onDragMove:h,onDragEnd:g,onStepForward:f,onStepBackward:v,saberConfig:y=null,isPlayingStrangerThings:b=!1,isAttackOnTitanEasterEggActive:_,direction:E="horizontal",enableAnimation:C,updateFrequency:x,offFrequencyUpdate:S,className:A,...T})=>{const I=(0,n.useRef)(null),{isDragging:N,onMouseDown:w}=(({progressBarRef:e,onDragStart:t,onDragMove:i,onDragEnd:r,direction:a="horizontal"})=>{const[s,u]=(0,n.useState)(!1),d=(0,n.useRef)(!1),m=(0,l.ZY)(),p=(0,n.useRef)(t),h=(0,n.useRef)(i),g=(0,n.useRef)(r);p.current=t,h.current=i,g.current=r;const f=(0,o.YQ)((t=>{h.current(c(e,t,a)),d.current=!0}),20,{leading:!0,maxWait:20});return{isDragging:s,onMouseDown:(0,n.useCallback)((t=>{const i=t=>{u(!1),f.cancel(),g.current(c(e,t,a),{wasDraggedBeforeReleased:d.current}),m?.removeEventListener("pointermove",f),d.current=!1};0===t.button&&(p.current(c(e,t,a)),u(!0),m?.addEventListener("pointermove",f),m?.addEventListener("pointerup",i,{once:!0}),d.current=!1)}),[f,e,a,m])}})({progressBarRef:I,onDragStart:p,onDragMove:h,onDragEnd:g,direction:E}),R=d?100*Math.max(0,Math.min(1,e/t)):0,O=m||N,P=d&&null!==y,q=d&&!(0,j.n)(),Z=(({onStepForward:e,onStepBackward:t,value:i})=>(0,o.YQ)((n=>{parseFloat(n.target.value)>i?e?.():t?.()}),100,{trailing:!1,leading:!0,maxWait:200}))({onStepForward:f,onStepBackward:v,value:e}),$=(0,n.useCallback)((()=>R),[R]),Q=(0,l.ZY)(),J=(0,n.useRef)(Q?.visibilityState),X=Q?.visibilityState,ee=N||S||"hidden"===X||"hidden"===J.current||0===e;J.current=X;const te=C?H:"";return(0,k.jsxs)("div",{className:a()(D,A,{[M]:d,[V]:ee}),"":T["data-testid"],children:[(0,k.jsx)(s.o,{disabled:!d,type:"range",min:0,max:t,value:e,step:i,onChange:Z,"aria-valuetext":T["aria-valuetext"],children:r}),(0,k.jsxs)("div",{className:a()(U,{[z]:null!==y,[K]:O}),style:{...P?y:null,"--progress-bar-transform":`${R}%`,"--progress-bar-duration":`${Number(x)}ms`,..._?{"--fg-color":u.q,"--is-active-fg-color":u.q}:null},onPointerDown:w,"":"progress-bar",children:[P?(0,k.jsx)("div",{className:W,"":"progress-bar-saber-overlay"}):null,(0,k.jsxs)("div",{ref:I,className:B,"":"progress-bar-background",children:[(0,k.jsx)("div",{className:F,children:(0,k.jsx)("div",{className:a()(G,te)})}),(0,k.jsx)("div",{className:a()(Y,te)})]}),q&&(0,k.jsx)("div",{style:{width:"100%"},children:(0,k.jsx)(L,{getPercentage:$,progressBar:I,isPlayingStrangerThings:b,isDragging:N})})]})]})}},88305:(e,t,i)=>{"use strict";i.d(t,{C:()=>l});var n=i(30758);const r="main-progressRing-circleShadow",a="main-progressRing-circleColor";var s=i(86070);const o=20*Math.PI,l=n.memo((function({percentage:e,size:t,ariaValueText:i},n){const l=o-e/100*o;return(0,s.jsxs)("svg",{height:t,width:t,viewBox:"0 0 24 24",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e),...i?{"aria-valuetext":i}:{},...n,children:[(0,s.jsx)("circle",{className:r,r:"10",cx:"12",cy:"12"}),(0,s.jsx)("circle",{"":"circleColor",className:a,strokeDasharray:`${o} ${o}`,strokeDashoffset:`${l}`,r:"10",cx:"12",cy:"12"}),(0,s.jsx)("rect",{width:"6",height:"6",fill:"white",x:"9",y:"9"})]})}))},4584:(e,t,i)=>{"use strict";i.d(t,{F:()=>o});var n=i(30758),r=i(11808),a=i(76174),s=i(86070);const o=n.memo((function({onClose:e,onRemove:t,isOpen:i,tracks:n,title:o}){return(0,s.jsx)(a.T,{"aria-label":o,titleText:o,onConfirm:i=>{t(n),e(i)},onClose:e,confirmText:r.Ru.get("remove"),descriptionText:r.Ru.get("playlist.remove_multiple_description"),cancelText:r.Ru.get("playlist.delete-cancel"),isOpen:i})}))},43717:(e,t,i)=>{"use strict";i.d(t,{Ad:()=>s,O_:()=>a,wK:()=>o});var n=i(30758),r=i(86070);const a=(0,n.createContext)({ids:[],setIds:()=>{},dropOriginUri:void 0,setDropOriginUri:()=>{},sectionId:0,setSectionId:()=>{},draggingIsInProgress:!1,setDraggingIsInProgress:()=>{}}),s=({children:e})=>{const[t,i]=(0,n.useState)([]),[s,o]=(0,n.useState)(void 0),[l,c]=(0,n.useState)(0),[u,d]=(0,n.useState)(!1);return(0,r.jsx)(a.Provider,{value:{ids:t,setIds:i,dropOriginUri:s,setDropOriginUri:o,sectionId:l,setSectionId:c,draggingIsInProgress:u,setDraggingIsInProgress:d},children:e})};function o(){return(0,n.useContext)(a).ids}},95925:(e,t,i)=>{"use strict";i.d(t,{JT:()=>o,ZC:()=>s});var n=i(30758),r=i(86070);const a=(0,n.createContext)(null),s=({children:e,mainLandmarkRef:t,lyricsCinemaRef:i,leftSidebarRef:n,rightSidebarRef:s,nowPlayingBarRef:o})=>(0,r.jsx)(a.Provider,{value:{mainLandmarkRef:t,lyricsCinemaRef:i,leftSidebarRef:n,rightSidebarRef:s,nowPlayingBarRef:o},children:e}),o=()=>{const e=(0,n.useContext)(a);if(null===e)throw new Error("GlobalElementRefsContext used without being initialized.");return e}},60751:(e,t,i)=>{"use strict";i.d(t,{$:()=>c,g:()=>u});var n=i(30758),r=i(8159),a=i(45879),s=i(34629),o=i(67550);const l=30;function c(){const e=parseInt(o.A.TRACKLIST_HEADER_HEIGHT,10),t=a.uC+e;u((0,s.v7)(),t,30)}function u(e,t=l,i=l,a=l,s=200){const o=(0,r.YQ)((t=>{if(!e.current)return;const i=t<0?-1:1,n=100*t*t;e.current.scrollTop=e.current.scrollTop+i*n}),50,{leading:!0,trailing:!1,maxWait:50}),c=(0,n.useCallback)((()=>{if(!e.current)return;let n=0,r=0,l=null,c=Date.now(),u=0;const d=e.current.getBoundingClientRect(),m=()=>{l&&window.cancelAnimationFrame(l),l=null,o.cancel()},p=()=>{o(u),l=window.requestAnimationFrame(p)},h=e=>{n=e.clientY,r=e.clientX,u=(()=>{const{top:e,right:o,bottom:l,left:u}=d;if(!(r>=u&&r<=o))return 0;const m=e,p=e+t+a,h=l-i-a,g=l;let f=0;const v=n>=m&&n<=p,y=n>=h&&n<=g,b=Date.now()-c;if(v&&b>s)if(n<p-a)f=-1;else{const e=m+t;f=(n-e)/(p-e)-1}else y&&b>s&&(f=n>g-a?1:(n-h)/(g-i-h));return v||y||(c=Date.now()),f})(),0!==u?l??=window.requestAnimationFrame(p):m()},g=()=>{m(),document.removeEventListener("dragover",h)};document.addEventListener("dragend",g,{once:!0}),document.addEventListener("drop",g,{once:!0}),document.addEventListener("pointerup",g,{once:!0}),document.addEventListener("dragover",h)}),[a,i,t,s,e,o]);(0,n.useEffect)((()=>(document.addEventListener("dragstart",c),()=>{document.removeEventListener("dragstart",c)})),[c])}},15549:(e,t,i)=>{"use strict";i.d(t,{g:()=>o,s:()=>l});var n=i(30758),r=i(50766),a=i(86070);const s=(0,r.vt)((e=>({lastFilterState:"",lastFilteredUri:"",setLastState:(t,i)=>{e({lastFilterState:t,lastFilteredUri:i})}}))),o=(0,n.createContext)({setFilter:()=>{throw new Error("setFilter must be used within a FilterProvider")},filter:""}),l=({uri:e,children:t})=>{const{lastFilterState:i,lastFilteredUri:r,setLastState:l}=s.getState(),[c,u]=(0,n.useState)(r===e?i:""),d=(0,n.useCallback)((t=>{u(t),l(t,e)}),[l,e]),m=(0,n.useMemo)((()=>({filter:c,setFilter:d})),[c,d]);return(0,a.jsx)(o.Provider,{value:m,children:t})}},15691:(e,t,i)=>{"use strict";i.d(t,{E:()=>o,U:()=>l});var n=i(30758),r=i(75235),a=i(86070);const s=e=>Boolean(e);function o({uri:e,children:t,defaultState:i,sortContext:o,localStorageKey:l="sortedState",validator:c=s}){const[u={},d]=(0,r.x)(l,{}),m=(0,n.useRef)(u);(0,n.useEffect)((()=>{m.current=u}));const p=(0,n.useCallback)((t=>{if(JSON.stringify(t)===JSON.stringify(i)){const t={...m.current};delete t[e],d(t)}else d({...m.current,[e]:t})}),[i,d,e]),h=(0,n.useMemo)((()=>{const t=u[e];return{sortState:c(t)?t:i,setSortState:p}}),[u,e,c,i,p]);return(0,a.jsx)(o.Provider,{value:h,children:t})}const l=(e,t,i="sortedState",n=s)=>{const[a={}]=(0,r.x)(i,{}),o=a[e];return n(o)?o:t}},65265:(e,t,i)=>{"use strict";i.d(t,{h:()=>d});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(11808),l=i(59996);const c="search-recentSearches-seeAll";var u=i(86070);const d=(0,n.memo)((function(e){const{link:t,pageId:i,className:n,label:r,state:d,pathname:m,onClick:p}=e;return(0,u.jsx)(l.N,{to:t,className:a()(c,n),pageId:i,state:d,pathname:m,"":e["data-testid"],onClick:p,children:(0,u.jsx)(s.E,{variant:"bodySmallBold",children:r||o.Ru.get("search.see-all")})})}))},1019:(e,t,i)=>{"use strict";i.d(t,{p:()=>u});var n=i(57734),r=i(30758),a=i(26668),s=i(72091);var o=i(17869),l=i(48905),c=i(86070);const u=({index:e,id:t,logShelfImpressions:i=!1,...u})=>{const{seeAllUri:d}=u,{onClickShelfTitle:m,onClickShelfSeeAll:p,spec:h}=(({seeAllUri:e,index:t,id:i})=>{const{spec:n,logger:o}=(0,s.r)(a.f,{data:{identifier:i,position:t,uri:e??""}}),l=(0,r.useCallback)((()=>{const e=n.swipeUiReveal();o.logInteraction(e)}),[o,n]),c=(0,r.useCallback)((e=>{const t=n.shelfHeaderFactory().shelfCarouselControlsFactory(),i="next"===e?t.shelfCarouselControlsNextFactory():t.shelfCarouselControlsPreviousFactory();o.logInteraction(i.hitUiReveal())}),[o,n]);return{onClickShelfTitle:(0,r.useCallback)((()=>{const t=n.shelfHeaderFactory().shelfHeaderTitleFactory().hitUiNavigate({destination:e??""});o.logInteraction(t)}),[o,e,n]),onClickShelfSeeAll:(0,r.useCallback)((()=>{const t=n.shelfHeaderFactory().shelfHeaderSeeAllFactory().hitUiNavigate({destination:e??""});o.logInteraction(t)}),[o,e,n]),onSwipe:l,onClickCarouselControls:c,spec:n}})({seeAllUri:d,index:e,id:t}),g=(0,l.t)(h);return(0,c.jsx)(o.r,{spec:h,children:(0,c.jsx)(n.$,{...u,elementRef:i?g:void 0,onClickShelfTitle:m,onClickShelfSeeAll:p})})}},4594:(e,t,i)=>{"use strict";i.d(t,{k:()=>v});var n=i(30758),r=i(97500),a=i.n(r),s=i(66060),o=i(83681),l=i(16047),c=i(11808),u=i(59996),d=i(65265);const m="_WZEvLWCKIvdsvaCs6x5",p="MVQhEntGN2lszQdk9z4m",h="ag7k_TUtB1kcSDM06CkY",g="KpzkVLd9fh2ZrKqZoFg5";var f=i(86070);const v=n.memo((({pretitle:e,trailing:t,title:i,titleVariant:n="titleSmall",subtitle:r,media:v,seeAllUri:y,seeAllLabel:b=c.Ru.get("shelf.see-all"),seeAllProps:_,pageId:E,hasMoreElements:C,className:x,onClickTitle:S,onClickSeeAll:A})=>(0,f.jsx)(l.v,{"":"rich-title-row-shelf-header",id:"header-only",variant:"naked",paddingInlineStart:"none",paddingInlineEnd:"none",className:a()(m,x),title:(0,f.jsx)(s.d,{semanticColor:"textBase",lineClamp:1,variant:n,className:g,children:y?(0,f.jsx)(u.N,{"":"see-all-link",to:y||"",pageId:E,onClick:S,children:i}):i}),pretitle:e?(0,f.jsx)(s.d,{variant:"marginal",semanticColor:"textSubdued",children:e}):null,subtitle:r?(0,f.jsx)(s.d,{variant:"bodySmall",semanticColor:"textSubdued",children:r}):null,media:v?(0,f.jsx)(o.C,{className:h,src:v,circle:!0}):null,trailing:void 0!==t?t:C&&y?(0,f.jsx)(d.h,{link:y,className:p,pageId:E,onClick:A,label:b,..._}):null})))},57734:(e,t,i)=>{"use strict";i.d(t,{$:()=>h});var n=i(30758),r=i(97500),a=i.n(r),s=i(82097),o=i(4594),l=i(16436),c=i(42331),u=i(75621),d=i(66632),m=i(86070);const p=n.memo((function({title:e,subtitle:t,pretitle:i,media:r,trailing:s,children:u,seeAllUri:p,showAll:h,className:g="",total:f,testId:v="component",pageId:y,seeAllLabel:b,alwaysShowSeeAll:_=!1,showSeeAll:E=!0,onClickShelfTitle:C,onClickShelfSeeAll:x,elementRef:S,renderSubHeader:A,rowGap:T,colGap:I,withEncoreCards:N=!0,fullPage:w=!1,minNrCardsToRender:R=10,rowTruncationMethod:k="floor"}){const[O,P]=(0,n.useState)(0),[L,j]=(0,n.useState)(1),D=(0,c.R)(),M=(0,n.useCallback)((e=>{const{columnCount:t}=e;if(P(t),h)j(1/0);else{const i=D.getMaxRowCount?.(e)??1,n="floor"===k?Math.floor:Math.ceil,r=Math.max(1,Math.min(n((f??1/0)/t),i));j(r)}}),[f,h,D,k]),U=(0,n.useCallback)((({columnCount:e})=>{let t=Math.max(R,e)*L;return L>1&&(t=e*L),(0,m.jsx)(m.Fragment,{children:h?u:Array.isArray(u)&&u.flat().filter(((e,i)=>i<t))})}),[R,L,h,u]);if(Array.isArray(u)&&0===u.length)return null;const B=!!E&&((f&&f>O||_)&&!!p&&!h),F=L*O;return(0,m.jsxs)("section",{ref:S,className:a()(g,d.A.shelf,"Shelf",{[d.A.withEncoreCards]:N,[d.A.fullPage]:w}),"":`${v}-shelf`,"aria-label":e??"",children:[e&&(0,m.jsx)("div",{className:d.A.header,children:(0,m.jsx)(o.k,{seeAllUri:p,seeAllLabel:b,pageId:y,hasMoreElements:B,onClickTitle:C,onClickSeeAll:x,title:e,subtitle:t,pretitle:i,media:r,trailing:s,titleVariant:w?"titleMedium":void 0})}),A&&(0,m.jsx)("div",{className:d.A.subHeader,children:A()}),(0,m.jsx)(l.E,{className:a()(d.A.shelfGrid,{[d.A.singleRow]:!h,[`nrVisibleCards-${F}`]:!h}),render:U,onLayoutChange:M,rowGap:T,colGap:I,rowCount:L})]})}));p.displayName="BaseShelf";const h=e=>(0,m.jsx)(s.s,{onError:e=>{(0,u.Jy)(e,"Shelf")},children:(0,m.jsx)(p,{...e})})},44237:(e,t,i)=>{"use strict";i.d(t,{_:()=>d});var n=i(30758),r=i(97500),a=i.n(r),s=i(21953),o=i(5780),l=i(16436),c=i(66632),u=i(86070);const d=(0,n.memo)((({children:e,isLoading:t,showAll:i,withTitle:r})=>{const d=(0,n.useCallback)((({columnCount:t})=>(0,u.jsx)(u.Fragment,{children:i?e:Array.isArray(e)&&e.filter(((e,i)=>i<t))})),[e,i]);return Array.isArray(e)&&0===e.length?null:(0,u.jsxs)("section",{className:c.A.skeletonShelf,"":"skeleton-shelf",children:[r&&(0,u.jsx)("div",{className:c.A.header,children:(0,u.jsx)("div",{className:c.A.topRow,children:(0,u.jsx)("div",{className:c.A.titleWrapper,children:(0,u.jsx)(o.Y,{as:"span",charCount:25,className:c.A.title,isLoading:t})})})}),(0,u.jsx)(l.E,{className:a()(c.A.shelfGrid,{[c.A.singleRow]:!i}),rowGap:s.CJ,colGap:s.CJ,render:d,rowCount:1})]})}))},5780:(e,t,i)=>{"use strict";i.d(t,{Y:()=>u});var n=i(97500),r=i.n(n),a=i(12783),s=i(57920);const o="dxnMpEuxRQ5Ml60ftDcz",l="jFPYamKaGvZv7JA45KCu";var c=i(86070);const u=({as:e,variant:t,className:i,charCount:n,isLoading:u})=>{const d=(0,s.h)("shimmer");return(0,c.jsx)(a.E,{ref:d,as:e,variant:t,className:r()(o,i,{[l]:u}),style:{width:n?`${n}ch`:void 0},tabIndex:-1,"aria-hidden":!0})}},2e3:(e,t,i)=>{"use strict";i.d(t,{g:()=>k});var n=i(30758),r=i(3074),a=i.n(r),s=i(3869),o=i(96554),l=i(12783),c=i(81987),u=i(28895),d=i(39796),m=i(45686),p=i(34413),h=i(66416),g=i(18456),f=i(83542),v=i(46288),y=i(11808),b=i(46990),_=i(60870),E=i(86070);const C=({onSelect:e})=>{const{viewMode:t,setViewMode:i}=(0,b.a)();return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(g.y,{children:y.Ru.get("web-player.your-library-x.sort-and-view-picker.view-as")}),_.i.map((({value:n,icon:r,text:a},s)=>(0,E.jsx)(f.D,{role:"menuitemradio","aria-checked":t===n,divider:s===_.i.length-1?"after":void 0,autoClose:!1,leadingIcon:r(),onClick:()=>{i(n),e?.(n)},children:a()},n)))]})},x=({heading:e,selected:t,onSelect:i,options:n,enableViewModeMenu:r=!1,onSelectViewMode:a,sortOrder:s,...o})=>{let l;s&&(s===v.H.ASC||s===v.H.SECONDARY_ASC?l=m.U:s!==v.H.DESC&&s!==v.H.SECONDARY_DESC||(l=p.R));return(0,E.jsxs)(h.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),...o,children:[e?(0,E.jsx)(g.y,{children:e}):null,n.map((({key:e,value:n},r)=>(0,E.jsx)(f.D,{role:"menuitemradio","aria-checked":e===t.key,CheckedIcon:l,onClick:()=>i(e,r),children:n},e))),r&&(0,E.jsx)(C,{onSelect:a})]})};var S=i(38637),A=i(72091),T=i(62943);const I="x-sortBox-sortDropdown",N="cvTLPmjt6T7M85EKcB8w",w="SbDHY3fVADNJ4l9qOLQ2",R=({isOpen:e,className:t})=>e?(0,E.jsx)(s.J,{size:"small","aria-hidden":"true",className:t}):(0,E.jsx)(o.y,{size:"small","aria-hidden":"true",className:t}),k=({heading:e,options:t,selected:i,onSelect:r,sortOrder:s,variant:o="bodySmall",semanticColor:m,disabled:p,onClick:h,ariaLabel:g,enableViewModeMenu:f=!1})=>{const v=(0,c.NC)(T.mA)&&f,{viewMode:y}=(0,S.a)();i||(i=t?.[0]);const b=_.i.find((({value:e})=>e===y))||_.i[0],C=(0,n.useMemo)((()=>`sortboxlist-${a().create().hex}`),[]),{spec:k,logger:O}=(0,A.r)(u.d,{});return(0,E.jsx)(d.b,{menu:(0,E.jsx)(x,{selected:i,options:t,onSelect:(e,t)=>{r(e,t);const i=k.sortBySectionFactory().sortOptionFactory({identifier:e}).hitSort();O.logInteraction(i)},sortOrder:s,heading:e,enableViewModeMenu:v,onSelectViewMode:e=>{const t=k.viewAsSectionFactory().viewOptionFactory({identifier:e}).hitUiElementToggle();O.logInteraction(t)},id:C}),children:(e,t,n)=>(0,E.jsxs)("button",{className:I,onClick:e=>{p||(h?.(e),t(e))},ref:n,type:"button","aria-label":g,role:"combobox","aria-controls":C,"aria-expanded":e,children:[(0,E.jsx)(l.E,{semanticColor:m,variant:o,className:N,children:i?.value||(v?b.text():"")}),v?b.icon():(0,E.jsx)(R,{isOpen:e,className:w})]})})}},82580:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(97500),r=i.n(n),a=i(14294);const s="liKqY2CEkAKTwX2SfNCu",o="fwTMCeAaUoWDj9WcQbgy",l="bEEDwYBSsninmQ7a4QK9";var c=i(86070);const u=({className:e,noLink:t=!1,customLink:i="/",hasText:n=!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"})]}),m=(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"})]}),p=n?m:d;return t?(0,c.jsx)("div",{className:r()(s,e),children:p}):i.startsWith("https://")?(0,c.jsx)("a",{href:i,className:r()(s,e),children:p}):(0,c.jsx)(a.k,{to:i,className:r()(s,e),children:p})}},57735:(e,t,i)=>{"use strict";i.d(t,{l:()=>d});var n=i(97500),r=i.n(n);const a="x-toggle-wrapper",s="x-toggle-indicator",o="JCFCfOY_6UEZZSOO2xrl",l="x-toggle-indicatorWrapper",c="x-toggle-input";var u=i(86070);const d=({value:e,disabled:t,onSelected:i,id:n,className:d,condensed:m=!1,inputRef:p})=>(0,u.jsxs)("label",{className:r()(a,d),children:[(0,u.jsx)("input",{id:n,className:c,type:"checkbox",disabled:t,checked:e,onChange:e=>{const t=e.target.checked;i(t)},ref:p}),(0,u.jsx)("span",{className:r()(l,{[o]:m}),children:(0,u.jsx)("span",{className:r()(s,{[o]:m})})})]})},35421:(e,t,i)=>{"use strict";i.d(t,{z:()=>d});var n=i(30758),r=i(97500),a=i.n(r),s=i(95165),o=i(43259);const l="qSTDtICR1fiIGRni1cwy",c="CUSHxAzlZWmBNuM0o1Vq";var u=i(86070);const d=({children:e,className:t,arrowClassName:i,disableAutoFocus:r})=>{const d=(0,n.useRef)(null);return(0,o.s)(),(0,s.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:a()(l,t),children:[e,(0,u.jsx)("div",{"data-popper-arrow":"",className:a()(c,i)})]})}},50668:(e,t,i)=>{"use strict";i.d(t,{y:()=>a});var n=i(64981),r=i(86070);const a=({children:e,content:t,...i})=>(0,r.jsx)(n.t,{renderInline:!0,preventScrollingWhileOpen:!1,placement:"top-start",menu:t,...i,children:e})},41695:(e,t,i)=>{"use strict";i.d(t,{g:()=>u});var n=i(30758),r=i(97500),a=i.n(r),s=i(8143),o=i(73809),l=i(5510),c=i(86070);const u=({children:e,className:t=""})=>{const{elementRef:i}=n.useContext(o.J),r=a()(l.A.topbarContent,t);return i?(0,s.createPortal)((0,c.jsx)("div",{"":"topbar-content",className:r,children:e}),i):null}},73809:(e,t,i)=>{"use strict";i.d(t,{J:()=>a,X:()=>s});var n=i(30758),r=i(86070);const a=n.createContext({}),s=({children:e})=>{const[t,i]=n.useState();return(0,r.jsx)(a.Provider,{value:{elementRef:t,setElementRef:i},children:e})}},94676:(e,t,i)=>{"use strict";i.d(t,{N:()=>h});var n=i(97500),r=i.n(n),a=i(30758),s=i(76792),o=i(59996);const l="nLNTsyonBwoRIzAv1AME",c="E4I5I7G2CfW32hLWZaqE",u="w4ZoklZWkrsyrVA34vI8";var d=i(86070);const m=({title:e,uri:t,className:i,onClick:n,position:l})=>{const m=(0,a.useCallback)((e=>{n?.(e,{uri:t,position:l})}),[n,l,t]);return(0,d.jsx)(o.N,{"aria-label":e,className:r()(c,u,i),to:t,onClick:m,children:(0,d.jsx)(s.v,{as:"span",children:e})})};function p(e){return!!e.uri&&!!e.title}const h=({topics:e,className:t,onClick:i})=>(0,d.jsx)("div",{className:r()(l,t),children:e.filter(p).map(((e,t)=>{const n=`${e.uri}-${t}`;return(0,d.jsx)(m,{title:e.title,uri:e.uri,position:t,onClick:i},n)}))})},67984:(e,t,i)=>{"use strict";i.d(t,{S1:()=>o,z1:()=>l});var n=i(30758),r=i(86070);const a=[0,()=>{}],s=(0,n.createContext)(a),o=({children:e})=>{const t=(0,n.useState)(0);return(0,r.jsx)(s.Provider,{value:t,children:e})},l=()=>{const e=(0,n.useContext)(s);if(!e)throw Error("useNrValidItemsContext must be used within a NrValidItemsProvider");return e}},78560:(e,t,i)=>{"use strict";i.d(t,{k:()=>o,m:()=>s});var n=i(30758),r=i(48604),a=i(86070);const s=(0,n.createContext)({toggleSelected:()=>!1,isSelected:()=>!1,getSelected:()=>[],clearSelected:()=>{},selectAll:()=>{},pushPopSelected:()=>{}});function o({resolveItem:e,getItems:t,nrTracks:i,children:o}){const l=(0,n.useRef)([{index:0,range:[]}]),c=(0,r.m)(),{canMoveMultipleItems:u}=c.getCapabilities(),d=(0,n.useRef)({}),[m,p]=(0,n.useState)(0),h=e=>{d.current=e(d.current),p((e=>e+1))},g=e=>t(e,e,{cachedOnly:!0})[0],f=()=>{Object.keys(d.current).length>0&&h((()=>({}))),l.current=[{index:0,range:[]}]},v=t=>{const i=g(t);if(!i)return!1;const{uid:n=t.toString()}=e(i,t);return Boolean(i&&d.current[n])},y=t=>{v(t)?(t=>{const i=g(t),{uid:n=t.toString()}=e(i,t);h((e=>(delete e[n],{...e}))),l.current.length>1&&l.current.pop()})(t):(t=>{const i=g(t);if(!i)return;const{uri:n,uid:r=t.toString(),type:a}=e(i,t);n&&r&&(h((e=>({...e,[r]:{uid:r,uri:n,index:t,type:a}}))),l.current.push({index:t,range:[]}))})(t)};return(0,a.jsx)(s.Provider,{value:{toggleSelected:(t,i,n)=>{u&&(i||n)||f(),u&&i?(t=>{const i={...d.current},n=l.current[l.current.length-1];n.range.forEach((e=>{delete i[e]})),n.range=[];const r=Math.min(n.index,t),a=Math.max(n.index,t);for(let t=r;t<=a;t++){const r=g(t);if(!r)continue;const{uri:a,uid:s=t.toString(),type:o}=e(r,t);a&&s&&(i[s]={uid:s,uri:a,index:t,type:o},n.range.push(t))}h((()=>i))})(t):y(t)},isSelected:v,getSelected:()=>Object.values(d.current).sort(((e,t)=>e.index-t.index)),clearSelected:f,selectAll:()=>{const n=t(0,i,{cachedOnly:!0}),r={},a=Array.from(Array(i).keys());for(let t=0;t<=i;t++){const i=n[t];if(!i)continue;const{uri:a,uid:s=t.toString(),type:o}=e(i,t);a&&s&&(r[s]={uid:s,uri:a,index:t,type:o})}h((()=>r)),l.current=[{index:0,range:a}]},pushPopSelected:(e,t)=>{u||f();const i=e+t,n=v(e),r=v(i);r?y(e):n&&!r?y(i):n||r||(y(i),y(e))}},children:o})}},45546:(e,t,i)=>{"use strict";i.d(t,{FL:()=>ge,S4:()=>Ee,g0:()=>Ce});var n=i(30758),r=i(97500),a=i.n(r),s=i(84492),o=i(52840),l=i(11808),c=i(77142),u=i(89661),d=i(19447),m=i(78975),p=i(15549);const h=e=>{const{filter:t}=(0,n.useContext)(p.g),i=(0,n.useRef)(!1);(0,n.useEffect)((()=>{i.current=!0;const e=setTimeout((()=>{i.current=!1}),1e3);return()=>{clearTimeout(e)}}),[t]),(0,n.useEffect)((()=>{""===t&&i.current&&e()}))};var g=i(61544),f=i(78560),v=i(8159),y=i(42224),b=i(8461),_=i(55388),E=i(4852);const C=["meta+c"],x=["meta+shift+c"];const S=["meta+x"];var A=i(76748);const T=(e,t,i,r)=>{const{clearSelected:a,selectAll:s,getSelected:o}=(0,n.useContext)(f.m),l=(0,n.useCallback)((()=>{if(!e.current)return;const n=document.querySelector(`.${A.A.trackList}`),r=n?.isEqualNode(e.current)||!1,a=document.activeElement?.closest(`.${A.A.trackList}`);(a?.isEqualNode(e.current)||!1||r&&!a)&&(t?i().then((()=>{s()})):s())}),[e,t,i,s]),c=(0,n.useCallback)((async(e,t)=>{const i=o().map((({uri:e})=>t?e:(0,g.o_)(e)?.toURL())).join("\n");i.length&&await e(i)}),[o]),u=(0,n.useCallback)((t=>{if(e.current?.contains(document.activeElement)){const e=o();if(0===e.length)return;r(e,(()=>{a()}),t)}}),[a,o,r,e]);return function(e){const t=(0,y._)(),i=(0,v.YQ)((()=>{e((e=>t.copy(e)))}),50,{leading:!0,trailing:!1});(0,E.f)(S,i),(0,_.x)(b.W.CUT,i)}((0,n.useCallback)((async e=>{await c(e,!1),u(!0)}),[c,u])),function(e){const t=(0,y._)(),i=(0,v.YQ)((()=>{e((e=>t.copy(e)),!1)}),50,{leading:!0,trailing:!1}),n=(0,v.YQ)((()=>{e((e=>t.copy(e)),!0)}),50,{leading:!0,trailing:!1});(0,E.f)(C,i),(0,E.f)(x,n),(0,_.x)(b.W.COPY,i),(0,_.x)(b.W.COPY_ADVANCED,n)}(c),(0,_.x)(b.W.SELECT_ALL,l),(0,_.x)(b.W.DELETE,(()=>u())),{handleDelete:u}};var I=i(50513),N=i(96554),w=i(3869),R=i(81987),k=i(80851),O=i(71588),P=i(66416),L=i(18456),j=i(83542),D=i(86070);const M=n.memo((function({name:e,visible:t,columnType:i,onClick:n}){return(0,D.jsx)(j.D,{role:"menuitemcheckbox",autoClose:!1,onClick:n,"aria-checked":t,"data-column":i,semanticColor:t?"textBrightAccent":"textBase",children:e})}));var U=i(34892),B=i(46288);const F=()=>{const e=(0,n.useContext)(U._),t=(0,n.useMemo)((()=>({[B.$.INDEX]:"#",[B.$.TITLE_AND_ARTIST]:l.Ru.get("tracklist.header.title"),[B.$.TITLE]:l.Ru.get("tracklist.header.title"),[B.$.PLAYS]:l.Ru.get("tracklist.header.plays"),[B.$.ADDED_AT]:l.Ru.get("tracklist.header.date-added"),[B.$.ADDED_BY]:l.Ru.get("tracklist.header.added-by"),[B.$.DURATION]:l.Ru.get("tracklist.header.duration"),[B.$.ALBUM]:l.Ru.get("tracklist.header.album"),[B.$.RELEASE_DATE]:l.Ru.get("tracklist.header.release-date"),[B.$.EVENT_DATE]:l.Ru.get("tracklist.header.event"),[B.$.EVENT_INFO]:l.Ru.get("tracklist.header.event"),[B.$.ACTIONS]:l.Ru.get("tracklist.header.actions"),[B.$.ALBUM_OR_PODCAST]:l.Ru.get("tracklist.header.album-or-podcast"),[B.$.ALBUM_OR_SHOW]:l.Ru.get("music_and_talk.album_or_show"),[B.$.CONCERT_DATE]:l.Ru.get("tracklist.header.date"),[B.$.CONCERT_VENUE]:l.Ru.get("tracklist.header.venue"),[B.$.ARTIST]:l.Ru.get("card.tag.artist"),[B.$.ADD]:null,[B.$.TITLE_AND_AUTHOR]:l.Ru.get("tracklist.header.title"),[B.$.AUTHOR]:l.Ru.get("shared.library.sort-by.author"),[B.$.BPM]:"BPM",[B.$.KEY]:"KEY",[B.$.VIBE]:"VIBE"})),[]);return e?(0,D.jsxs)(P.W,{children:[(0,D.jsx)(L.y,{children:l.Ru.get("tracklist.header.columns")}),e.columns.filter((e=>e.toggleable)).map(((i,n)=>(0,D.jsx)(M,{columnType:i.columnType,name:t[i.columnType]??i.columnType,visible:i.visible&&!i.options?.hideDuration,onClick:()=>{i.toggleable&&e?.toggleVisible(i.columnType)}},`column-visibility-action-${n}`)))]}):null};var H=i(71188),V=i(12783),G=i(67859),z=i(53129);const W=({className:e,children:t,onSort:i,as:n="div",columnIndex:r})=>(0,D.jsxs)(n,{className:a()(A.A.column,e),onClick:()=>i(B.$.TITLE,r),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:l.Ru.get("tracklist.header.title")}),t]}),K=({className:e,children:t,as:i="div"})=>(0,D.jsxs)(i,{className:a()(A.A.column,e),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:a()("standalone-ellipsis-one-line",e),children:l.Ru.get("tracklist.header.event")}),t]});var Y=i(96849),q=i(6941),Z=i(43396),$=i(75235),Q=i(67550);const J=parseInt(Q.A.MINMIMUM_COLUMN_WIDTH,10),X=(e,t,i)=>!e&&(t>J||i),ee=({index:e,tracklistRef:t,hasIndex:i,columnPersistenceKey:r})=>{const a=(0,n.useRef)(null),s=(0,Z.W)(),[o,l]=(0,$.x)("column-widths",{}),c=(0,n.useCallback)((e=>{const n=e.reduce(((e,t,n)=>((!i||n>0)&&(e+=t),e)),0);e.filter(Boolean).forEach(((e,r)=>{i&&0===r||t.current.style.setProperty(`--col${r}`,100*e/n+"fr")}))}),[i,t]);(0,n.useEffect)((()=>{if(!r)return;const e=o[r];Array.isArray(e)&&c(e)}),[o,c,r]);const u=(0,n.useCallback)((i=>{const n=i.target;let u=i.clientX;t.current?.classList.add(A.A.columnResizing);const d=i=>{const r=i.clientX-u;if(0===r)return;u=i.clientX;const a=s?-1:1,o=n.closest('[role="columnheader"]');let l=o,c=e,d=(l?.clientWidth??0)+a*r,m=!!l&&"none"===getComputedStyle(l).display;for(;l&&!X(m,d,a*r>0);)m||c--,l=l.previousElementSibling,d=(l?.clientWidth??0)+a*r,m=!!l&&"none"===getComputedStyle(l).display;let p=o?.nextElementSibling,h=e+1,g=(p?.clientWidth??0)-a*r,f=!!p&&"none"===getComputedStyle(p).display;for(;p&&!X(f,g,a*r<0);)f||h++,p=p.nextElementSibling,g=(p?.clientWidth??0)-a*r,f=!!p&&"none"===getComputedStyle(p).display;l&&p&&(t.current.style.setProperty(`--col${c}`,`${Math.max(d,J)}px`),t.current.style.setProperty(`--col${h}`,`${Math.max(g,J)}px`))};document.addEventListener("mouseup",(()=>{t.current?.classList.remove(A.A.columnResizing),(()=>{if(!a.current)return;const e=a.current.closest('[role="row"]'),t=Array.from(e.children).map((e=>e.clientWidth));r?l({...o,[r]:t}):c(t)})(),document.removeEventListener("mousemove",d)}),{once:!0}),document.addEventListener("mousemove",d)}),[o,e,s,l,c,r,t]);return(0,D.jsx)("div",{ref:a,onMouseDown:u,className:A.A.resizeHandle})};var te=i(9474),ie=i(45879),ne=i(19159),re=i(34629);const ae=()=>{},se={[B.$.INDEX]:()=>(0,D.jsx)(D.Fragment,{children:"#"}),[B.$.TITLE_AND_ARTIST]:({className:e,children:t,onSort:i,as:n="div",alternativeText:r,columnIndex:s})=>(0,D.jsxs)(n,{className:a()(A.A.column,e),onClick:()=>i(B.$.TITLE_AND_ARTIST,s),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:r||l.Ru.get("tracklist.header.title")}),t]}),[B.$.TITLE]:W,[B.$.PLAYS]:()=>(0,D.jsx)(V.E,{variant:"bodySmall",className:A.A.playsHeader,children:l.Ru.get("tracklist.header.plays")}),[B.$.ADDED_BY]:({className:e,children:t,onSort:i,as:n="div",columnIndex:r})=>(0,D.jsxs)(n,{className:a()(A.A.column,e),onClick:()=>i(B.$.ADDED_BY,r),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:l.Ru.get("tracklist.header.added-by")}),t]}),[B.$.ADDED_AT]:({className:e,children:t,onSort:i,as:n="div",columnIndex:r})=>(0,D.jsxs)(n,{className:a()(A.A.column,e),onClick:()=>i(B.$.ADDED_AT,r),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:l.Ru.get("tracklist.header.date-added")}),t]}),[B.$.RELEASE_DATE]:({className:e,children:t,as:i="div"})=>(0,D.jsxs)(i,{className:a()(A.A.column,e),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:a()("standalone-ellipsis-one-line",e),children:l.Ru.get("tracklist.header.release-date")}),t]}),[B.$.DURATION]:({className:e,children:t,onSort:i,as:n="div",columnIndex:r})=>(0,D.jsx)(z.Zp,{label:l.Ru.get("tracklist.header.duration"),children:(0,D.jsxs)(n,{"aria-label":l.Ru.get("tracklist.header.duration"),className:a()(A.A.column,A.A.durationHeader,e),onClick:()=>i(B.$.DURATION,r),children:[t,(0,D.jsx)(G.t,{size:"small"})]})}),[B.$.EVENT_DATE]:K,[B.$.EVENT_INFO]:K,[B.$.CONCERT_DATE]:({className:e,children:t,as:i="div"})=>(0,D.jsxs)(i,{className:a()(A.A.column,e),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:a()("standalone-ellipsis-one-line",e),children:l.Ru.get("tracklist.header.date")}),t]}),[B.$.CONCERT_VENUE]:({className:e,children:t,as:i="div"})=>(0,D.jsxs)(i,{className:a()(A.A.column,e),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:a()("standalone-ellipsis-one-line",e),children:l.Ru.get("tracklist.header.venue")}),t]}),[B.$.ACTIONS]:({className:e})=>(0,D.jsx)("div",{"aria-label":l.Ru.get("tracklist.header.actions"),className:a()(A.A.column,A.A.actionsHeader,e)}),[B.$.ALBUM]:({className:e,children:t,onSort:i,as:n="div",columnIndex:r})=>(0,D.jsxs)(n,{className:a()(A.A.column,e),onClick:()=>i(B.$.ALBUM,r),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:l.Ru.get("tracklist.header.album")}),t]}),[B.$.ALBUM_OR_PODCAST]:({className:e,children:t,onSort:i,as:n="div",columnIndex:r})=>(0,D.jsxs)(n,{className:a()(A.A.column,e),onClick:()=>i(B.$.ALBUM_OR_PODCAST,r),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:a()("standalone-ellipsis-one-line",e),children:l.Ru.get("tracklist.header.album-or-podcast")}),t]}),[B.$.ALBUM_OR_SHOW]:({className:e,children:t,onSort:i,as:n="div",columnIndex:r})=>(0,D.jsxs)(n,{className:a()(A.A.column,e),onClick:()=>i(B.$.ALBUM_OR_SHOW,r),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:a()("standalone-ellipsis-one-line",e),children:l.Ru.get("music_and_talk.album_or_show")}),t]}),[B.$.ARTIST]:({className:e,children:t,onSort:i,as:n="div",columnIndex:r})=>(0,D.jsxs)(n,{className:a()(A.A.column,e),onClick:()=>i(B.$.ARTIST,r),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:l.Ru.get("card.tag.artist")}),t]}),[B.$.TITLE_AND_AUTHOR]:W,[B.$.AUTHOR]:({className:e,children:t,as:i="div"})=>(0,D.jsxs)(i,{className:a()(A.A.column,e),children:[(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:l.Ru.get("shared.library.sort-by.author")}),t]}),[B.$.BPM]:()=>(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:"BPM"}),[B.$.KEY]:()=>(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:"Key"}),[B.$.VIBE]:()=>(0,D.jsx)(V.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:"Vibe"}),get[B.$.ADD](){throw Error("Add has no corresponding column header component")}},oe=(e,t,i,n,r,s)=>(o,c,u)=>{const d=(0,R.NC)(ne.xkq),{columnType:m}=o,p=((e,t,i)=>t.column!==B.$.TITLE&&t.column!==B.$.ARTIST||e!==B.$.TITLE_AND_ARTIST?i.has(e)?t.column!==e?B.H.NONE:t.order:B.H.NONE:t.order)(m,t,e),h=se[m],g=e.has(m),f=g?i:ae,v=(0,H.rP)(p),y=(0,H.T4)(p);let b;v&&(b="ascending"),y&&(b="descending"),p===B.H.NONE&&(b="none");const _=(0,H.kj)(m,t)?l.Ru.get("card.tag.artist"):void 0,E=(0,te.y)(c,m,u),C=(0,D.jsxs)(h,{className:a()({[A.A.sortable]:g}),onSort:f,alternativeText:_,as:g?"button":"div",columnIndex:c,children:[y&&(0,D.jsx)(N.y,{size:"small",semanticColor:"textBrightAccent",className:A.A.arrow,"aria-hidden":"true"}),v&&(0,D.jsx)(w.J,{size:"small",className:A.A.arrow,semanticColor:"textBrightAccent","aria-hidden":"true"})]}),x=m===B.$.DURATION&&o.options?.hideDuration,S=E!==q.y&&E!==Y.l;return(0,D.jsxs)(E,{role:"columnheader",ariaColIndex:c,ariaSort:b,children:[!x&&(0,D.jsx)("div",{"":"column-header-context-menu",children:C}),S&&d&&(0,D.jsx)(ee,{index:c,tracklistRef:n,hasIndex:r,columnPersistenceKey:s})]},m)},le=parseInt(Q.A.TRACKLIST_HEADER_HEIGHT,10),ce=({columns:e,sortableColumns:t,onSort:i,sortState:n,tracklistRef:r,top:s=ie.uC,columnPersistenceKey:o})=>{const l=(0,re.v7)(),c=(0,R.NC)(ne.Lkd),u=isNaN(le)?100:le,{ref:d,inView:m}=(0,I.Wx)({threshold:[1],root:l.current,rootMargin:`-${s+1}px 100000px ${u}px 100000px`,initialInView:!0}),p=e.some((({columnType:e})=>e===B.$.INDEX)),h=(0,D.jsx)(k.$,{rowIndex:0,className:a()(A.A.trackListHeaderRow,A.A.trackListRowGrid),children:e.map(oe(t,n,i,r,p,o))});return(0,D.jsx)("div",{className:a()(A.A.trackListHeader,{[A.A.trackListHeaderStuck]:!m}),ref:d,style:{top:s},children:c?(0,D.jsx)(O.h,{menu:(0,D.jsx)(F,{}),children:(0,D.jsx)("div",{children:h})}):h})};var ue=i(88321),de=i(64844),me=i(26969);const pe={column:null,order:B.H.NONE},he=20,ge=56,fe=(e,t,i)=>{const n=t?1:0;return e<504?Math.min(2+n,i):e<728?Math.min(3+n,i):e<984?Math.min(4+n,i):e<1208?Math.min(5+n,i):Math.min(6+n,i)};function ve({tracks:e,nrTracks:t,fetchTracks:i,limit:n=100,...r}){const a=(0,ue.E)({nrItems:t,fetch:i,limit:n,initialItems:e});return(0,D.jsx)(ye,{...r,itemsCache:a})}function ye({resolveItem:e,onNrValidItemsChange:t,itemsCache:i,...r}){const{getItems:a,nrValidItems:s,invalidateCache:o,cacheAll:l,hasItems:c}=i;return(0,n.useLayoutEffect)((()=>{t?.(s)}),[s,t]),(0,D.jsx)(f.k,{resolveItem:e,getItems:a,nrTracks:s,children:(0,D.jsx)(_e,{...r,resolveItem:e,getItems:a,nrTracks:s,invalidateCache:o,cacheAll:l,hasItems:c})})}const be=(e,t)=>(e?32:ge)+(t?8:0);function _e({nrTracks:e,renderRow:t,sortableColumns:i=new Set,sortState:r=pe,onSort:p=(()=>{}),onRemove:g=(()=>{}),canFetchAllTracks:v=!1,rowPlaceholder:y=u.nd,hasHeaderRow:b=!1,columns:_,outerRef:E,outerDomRef:C,ariaLabel:x,testID:S="track-list",resolveItem:I,headerTop:N,getItems:w,invalidateCache:R,cacheAll:k,hasItems:O,isConcertPlaylist:P,isQueuePanelTracklist:L,isCompactMode:j=!1,columnPersistenceKey:M,className:U}){const F=(0,re.v7)(),{getSelected:H}=(0,n.useContext)(f.m),V=_.map((e=>"string"==typeof e?{columnType:e,visible:!0,toggleable:!1}:e)),G=(0,n.useRef)(null),z=(0,n.useRef)({firstIndex:-1,lastIndex:-1}),[W,K]=(0,n.useState)(V.length),Y=C??G,q=V.some((({columnType:e})=>e===B.$.INDEX)),Z=l.Ru.getLocaleForTranslation()===o.h.ar,$=be(j,Z),{handleDelete:Q}=T(Y,v,k,g),J=(0,n.useCallback)((()=>{if(!Y.current)return;const e=Y.current.offsetWidth,t=fe(e,q,V.length);K(t)}),[V,q,Y]);(0,me.w)({refOrElement:Y,observeOnly:"width",onResize:J}),(0,n.useLayoutEffect)((()=>{J()}),[J]),(0,d.g)(Y);const X=(0,n.useCallback)((e=>{F.current&&(F.current.scrollTop=e*$)}),[F,$]),ee=(0,n.useCallback)((t=>{if(v&&t.length>0){const i=[];k().then((()=>{w(0,e).forEach(((e,n)=>{if(e){const{uri:r,uid:a}=I(e,n);t.some((e=>e.uid===a||e.uri===r))&&i.push(n)}})),i.length>0&&X(Math.min(...i))})).catch((e=>{console.error(e)}))}}),[k,v,w,e,I,X]),te=(0,n.useCallback)((()=>{const e=H();ee(e.map((({uid:e})=>({uid:e}))))}),[H,ee]);h(te);const ie=(0,n.useCallback)((()=>z.current),[]);(0,n.useImperativeHandle)(E,(()=>({update:()=>R(),getRows:()=>w(0,e,{cachedOnly:!0}),scrollToItem:e=>ee([e]),getSelected:H,scrollToIndex:X,getVisibleTrackWindow:ie})));const ne=(0,m.d)((()=>Q())),ae=(0,n.useCallback)(((e,t)=>(0,D.jsx)(y,{height:e},t)),[y]);return(0,D.jsxs)(c.f,{"aria-rowcount":e+Number(b),"aria-colcount":W,"aria-label":x,ref:Y,className:a()(U,{[A.A.trackList]:!P,[A.A.indexable]:q,[A.A.delayedVisibility]:!O,[A.A.concertTrackList]:P,[A.A.queuePanelTracklist]:L,[A.A.trackListCompactMode]:j}),style:{"--placeholder-image":`url(${(0,s.b)("images/tracklist-placeholder.png")})`,"--placeholder-image-compact":`url(${(0,s.b)("images/tracklist-placeholder-compact.png")})`},onKeyDown:ne,"":S,children:[b&&(0,D.jsx)(ce,{columns:V,sortableColumns:i,sortState:r,onSort:p,top:N,tracklistRef:Y,columnPersistenceKey:M}),(0,D.jsx)(de.L,{renderRows:(e,i)=>{Math.max(i-e+1,0)>0&&(z.current={firstIndex:e,lastIndex:i});return w(e,i).map(((i,n)=>i?t(i,e+n):ae(`${$}px`,`${e+n}`)))},nrRows:e,rowHeight:$,scrollNodeRef:F,nrRowsOverscan:he,renderPlaceholder:ae})]})}const Ee=n.memo(ve),Ce=n.memo(ye)},98912:(e,t,i)=>{"use strict";i.d(t,{Y:()=>S,w:()=>A});var n=i(30758),r=i(97500),a=i.n(r),s=i(41978),o=i(8159),l=i(61272),c=i(61544),u=i(11808),d=i(53851),m=i(80851),p=i(72842),h=i(9559),g=i(41265),f=i(78560),v=i(73015),y=i(45346),b=i(7939),_=i(85513),E=i(79303),C=i(76748),x=i(86070);let S=function(e){return e[e.None=0]="None",e[e.Before=1]="Before",e[e.After=2]="After",e}({});const A=({children:e,uri:t,index:i,ariaRowIndex:r,dragMetadata:A,draggable:T=!0,contextUri:I,isPlayable:N,ageRestricted:w,showUnplayableAsEnabled:R=!1,onTriggerPlay:k,onTriggerPaywall:O,isActive:P,onMove:L,onContextMenu:j,onInsert:D,allowedDropTypes:M=[],initialSelectedState:U=!1,spec:B,canRemovePlaylistItems:F,removePlaylistItems:H,isLocked:V,onDoubleClick:G,className:z,isCompactMode:W=!1})=>{const{toggleSelected:K,isSelected:Y,getSelected:q,clearSelected:Z}=(0,n.useContext)(f.m),$=(0,g.q)({index:i,contextUri:I,onContextMenu:j,canRemovePlaylistItems:F,removePlaylistItems:H}),Q=(0,s.wA)(),J=(0,s.d4)(b.Bi),X=(0,n.useRef)(null);let ee;const{name:te,createdBy:ie,sectionId:ne=0}=A,[re,ae]=(0,n.useState)(S.None),{enqueueSnackbar:se}=(0,v.d)();(0,n.useEffect)((()=>{U&&X.current&&(K(i,!1,!1),(0,p.Ai)(X.current))}),[]);const oe=(0,l.U0)((e=>e.find((e=>M?.includes(e)))),[M]),{draggable:le,onDragStart:ce}=(0,h.R)({index:i,contextUri:I,sectionId:ne,label:`${te} • ${ie}`}),ue=(0,n.useCallback)((e=>{if(oe(Array.from(e.dataTransfer.types))&&X.current){e.preventDefault();const{top:t,height:i}=X.current.getBoundingClientRect(),n=e.clientY<t+i/2;e.dataTransfer.dropEffect="copy",n&&re!==S.Before&&ae(S.Before),n||re===S.After||ae(S.After)}}),[re,oe]),de=(0,n.useCallback)((()=>{ae(S.None)}),[]),me=(0,n.useCallback)((e=>{if(M.length>0){e.preventDefault();const t=e.dataTransfer.getData("text/x-spotify-context"),n=parseInt(e.dataTransfer.getData("text/x-spotify-section"),10)||0,r=q();if(L&&t===I&&ne===n&&r.length>0)L(r,i,re,{section:n,origin:n});else if(D){let r=[];M.forEach((t=>{const i=e.dataTransfer.getData(t);i&&(r=r.concat(i.split("\n").map((e=>{const t=(0,c.o_)(e);return t?t.toURI():e}))))})),r.length>0&&D(r,i,re,t,{section:ne,origin:n})}}ae(S.None),Z()}),[M,L,D,I,i,re,q,Z,ne]),pe=(0,y.W)(),he=(0,E.s)(),ge=(0,o.YQ)((e=>{if(!(e.target instanceof Node))return;if(!e.currentTarget.contains(e.target))return;pe({intent:"play",type:"double-click"});const i=B?he.logInteraction(B.doubleHitPlay({itemToBePlayed:t})):void 0;k(e,i)}),_.d,{leading:!0,trailing:!1}),fe=(0,n.useCallback)((e=>{B&&O&&he.logInteraction(B.doubleHitShowPaywall({paywalledItem:t})),O?.(e)}),[he,O,B,t]),ve=(0,n.useCallback)((()=>{se(u.Ru.get("feedback.unable-to-play"))}),[se]),ye=(0,n.useCallback)((()=>Q((0,d.Tf)(t))),[t,Q]);V?ee=fe:N?ee=ge:(w&&!J&&(ee=ye),ee=G||ve);const be=Y(i),_e=be&&Y(i-1),Ee=be&&Y(i+1);return(0,x.jsx)(m.$,{rowIndex:r,"aria-selected":be,children:(0,x.jsx)("div",{"":"tracklist-row",className:a()(C.A.trackListRow,C.A.trackListRowGrid,z,{[C.A.active]:P,[C.A.disabled]:!N,[C.A.showDisabledAsEnabled]:R,[C.A.selected]:be,[C.A.isPreviousRowSelected]:_e,[C.A.isNextRowSelected]:Ee,[C.A.dropTargetBefore]:re===S.Before,[C.A.dropTargetAfter]:re===S.After,[C.A.rowCompactMode]:W}),onDoubleClick:ee,draggable:le&&T,onDragStart:ce,onDragOver:ue,onDragLeave:de,onDrop:me,ref:X,...$,children:e})})}},34892:(e,t,i)=>{"use strict";i.d(t,{_:()=>o,a:()=>l});var n=i(30758),r=i(46288),a=i(86070);const s={[r.$.ACTIONS]:!1,[r.$.ADD]:!1,[r.$.ADDED_BY]:!1,[r.$.ALBUM_OR_PODCAST]:!1,[r.$.ALBUM_OR_SHOW]:!1,[r.$.ARTIST]:!1,[r.$.CONCERT_DATE]:!1,[r.$.CONCERT_VENUE]:!1,[r.$.EVENT_DATE]:!1,[r.$.EVENT_INFO]:!1,[r.$.PLAYS]:!0,[r.$.RELEASE_DATE]:!1,[r.$.INDEX]:!1,[r.$.TITLE]:!1,[r.$.TITLE_AND_ARTIST]:!1,[r.$.ALBUM]:!0,[r.$.ADDED_AT]:!0,[r.$.DURATION]:!0,[r.$.TITLE_AND_AUTHOR]:!1,[r.$.AUTHOR]:!1,[r.$.BPM]:!1,[r.$.KEY]:!1,[r.$.VIBE]:!1},o=(0,n.createContext)(null),l=({columns:e,children:t})=>{const i=e=>({columnType:e,visible:!0,toggleable:s[e],options:e===r.$.DURATION?{hideDuration:!1}:void 0}),[l,c]=(0,n.useState)((()=>e.map(i)));(0,n.useEffect)((()=>{c(e.map(i))}),[e]);const u=(0,n.useCallback)((e=>{c(l.map((t=>t.columnType===e?e===r.$.DURATION?{...t,options:{hideDuration:!t.options?.hideDuration}}:{...t,visible:!t.visible}:t)))}),[l]),d=(0,n.useMemo)((()=>l.filter((e=>e.visible))),[l]);return(0,a.jsx)(o.Provider,{value:{columns:l,visibleColumns:d,toggleVisible:u},children:t})}},84401:(e,t,i)=>{"use strict";i.d(t,{g:()=>v});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(61544),l=i(71588),c=i(88778),u=i(38916),d=i(53129),m=i(59996),p=i(14627),h=i(79303),g=i(76748),f=i(86070);const v=({children:e,uri:t,name:i,nonInteractive:r=!1,creatorUri:v,spec:y})=>{let b=null;const{draggable:_,onDragStart:E}=(0,p.P)({itemUris:[t],dragLabelText:i}),C=(0,h.s)(),x=(0,n.useCallback)((()=>{y&&C.logInteraction(y.albumLinkFactory({uri:t}).hitUiNavigate({destination:t}))}),[C,y,t]);return r?(0,f.jsx)("span",{className:a()("standalone-ellipsis-one-line",g.A.text),children:e}):((0,o._T)(t)&&(b=(0,f.jsx)(c.h,{uri:t,artistUri:v})),(0,o.WB)(t)&&(b=(0,f.jsx)(u.H,{uri:t})),(0,f.jsx)(l.h,{menu:b,children:(0,f.jsx)(s.E,{variant:"bodySmall",children:(0,f.jsx)(d.Zp,{label:i,showDelay:d.uF,children:(0,f.jsx)(m.N,{draggable:_,onDragStart:E,className:a()("standalone-ellipsis-one-line"),to:t,dir:"auto",onClick:x,children:e})})})}))}},31894:(e,t,i)=>{"use strict";i.d(t,{y:()=>u});var n=i(30758),r=i(71588),a=i(17202),s=i(59996),o=i(14627),l=i(45311),c=i(86070);const u=({children:e,uri:t,name:i,onClick:u,index:d})=>{const{draggable:m,onDragStart:p}=(0,o.P)({itemUris:[t],dragLabelText:i}),h=(0,n.useCallback)((()=>{u?.(t,d)}),[u,t,d]);return(0,l.s)({uri:t})?(0,c.jsx)(r.h,{menu:(0,c.jsx)(a.t,{uri:t}),children:(0,c.jsx)(s.N,{draggable:m,to:t,onDragStart:p,dir:"auto",onClick:h,children:e})}):(0,c.jsx)(c.Fragment,{children:e})}},15739:(e,t,i)=>{"use strict";i.d(t,{l:()=>u});var n=i(30758),r=i(12783),a=i(11808),s=i(53129),o=i(31894),l=i(79303),c=i(86070);const u=({artists:e,spec:t,className:i})=>{const u=(0,l.s)(),d=(0,n.useCallback)(((e,i)=>{t&&u.logInteraction(t.artistLinkFactory({position:i??0,uri:e}).hitUiNavigate({destination:e}))}),[u,t]);if(!e||0===e.length)return null;const m=e.map((({name:e})=>e)).join(a.Ru.getSeparator());return(0,c.jsx)(s.Zp,{label:m,showDelay:s.uF,children:(0,c.jsx)(r.E,{as:"span",variant:"bodySmall",className:i,children:e.map((({uri:e,name:t},i)=>(0,c.jsxs)(n.Fragment,{children:[i>0&&a.Ru.getSeparator(),(0,c.jsx)(o.y,{name:t,uri:e,onClick:d,index:i,children:t},e)]},e)))})})}},9813:(e,t,i)=>{"use strict";i.d(t,{P:()=>s});var n=i(12783),r=i(76748),a=i(86070);const s=({children:e})=>e?(0,a.jsx)(n.E,{variant:"bodyMedium",className:r.A.rowBadges,semanticColor:"textSubdued",children:e}):null},71801:(e,t,i)=>{"use strict";i.d(t,{P:()=>u});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(80913),l=i(76748),c=i(86070);const u=(0,n.memo)((function({duration:e,className:t,dataTestId:i}){return(0,c.jsx)(s.E,{"":i,as:"div",variant:"bodySmall",className:a()(t,l.A.rowDuration),semanticColor:"textSubdued",children:e?(0,o.f)(e):"-:--"})}))},17930:(e,t,i)=>{"use strict";i.d(t,{e:()=>m});var n=i(97500),r=i.n(n),a=i(90507),s=i(58715),o=i(73671),l=i(76748),c=i(86070);const u=({isVideo:e,isEpisode:t})=>{let i=a.v;return e?i=s.B:t&&(i=o.L),(0,c.jsx)("div",{className:r()(l.A.rowImage,l.A.rowImageFallback),style:{borderRadius:4},children:(0,c.jsx)(i,{size:"small"})})};var d=i(57276);const m=({src:e,isVideo:t=!1,isEpisode:i=!1})=>e?(0,c.jsx)(d._,{className:r()(l.A.rowImage,{[l.A.rowImageVideo]:t}),draggable:!1,src:e,loading:"eager",width:"40",height:"40",radius:4,children:(0,c.jsx)(u,{isVideo:t,isEpisode:i})}):(0,c.jsx)(u,{isVideo:t,isEpisode:i})},84075:(e,t,i)=>{"use strict";i.d(t,{l:()=>o});var n=i(97500),r=i.n(n),a=i(76748),s=i(86070);const o=({children:e,className:t})=>(0,s.jsx)("div",{className:r()(a.A.rowMainContent,t),children:e})},25973:(e,t,i)=>{"use strict";i.d(t,{q:()=>a});var n=i(76748),r=i(86070);const a=({children:e})=>(0,r.jsx)("div",{className:n.A.rowMainContentCompact,children:e})},41609:(e,t,i)=>{"use strict";i.d(t,{$:()=>h});var n=i(30758),r=i(97500),a=i.n(r),s=i(8159),o=i(13466),l=i(45346),c=i(76104),u=i(85513),d=i(79303),m=i(76748),p=i(86070);const h=n.forwardRef((function({className:e="",children:t,onClick:i,isPlaying:n,isActive:r,isLocked:h=!1,playAriaLabel:g,uri:f,spec:v},y){const b=(0,l.W)(),_=(0,d.s)(),E=(0,s.YQ)((e=>{const{currentTarget:t,detail:a}=e;let s;if(e.stopPropagation(),a>0&&t&&t.blur(),b({intent:n?"pause":"play",type:"click"}),v&&!h){const e=v.playbackButtonFactory();let t;t=r&&n?e.hitPause({itemToBePaused:f}):r&&!n?e.hitResume({itemToBeResumed:f}):e.hitPlay({itemToBePlayed:f}),s=_.logInteraction(t)}else v&&_.logInteraction(v.playbackButtonFactory().hitShowPaywall({paywalledItem:f}));i(e,s)}),u.d,{leading:!0,trailing:!1});return(0,p.jsxs)("div",{className:a()(m.A.rowMarker,e),children:[n?(0,p.jsx)(c.J,{className:m.A.playingIcon,animated:!0}):t,(0,p.jsx)(o.x,{className:m.A.rowPlayPauseButton,iconClassName:m.A.rowPlayPauseIcon,onClick:E,isPlaying:n,isLocked:h,playAriaLabel:g,ref:y})]})}))},72445:(e,t,i)=>{"use strict";i.d(t,{Y:()=>c});var n=i(30758),r=i(97393),a=i(39796),s=i(79303),o=i(76748),l=i(86070);const c=({menu:e,label:t,spec:i})=>{const c=(0,s.s)(),u=(0,n.useCallback)((()=>{i&&c.logInteraction(i.contextButtonFactory().hitUiReveal())}),[c,i]);return(0,l.jsx)(a.b,{menu:e,onShow:u,children:(0,l.jsx)(r.e,{className:o.A.rowMoreButton,size:r.M.xs,label:t})})}},84537:(e,t,i)=>{"use strict";i.d(t,{a:()=>s});var n=i(12783),r=i(76748),a=i(86070);const s=({children:e})=>e?"number"==typeof e?(0,a.jsx)(n.E,{variant:"bodyMedium",className:r.A.number,children:e}):(0,a.jsx)("span",{className:r.A.icon,children:e}):null},89661:(e,t,i)=>{"use strict";i.d(t,{Bz:()=>g,nd:()=>p,qq:()=>h});var n=i(30758),r=i(97500),a=i.n(r),s=i(76748),o=i(86070);const l=n.memo((function(){return(0,o.jsx)("div",{className:a()(s.A.placeholder,s.A.rowSectionVariable,s.A.placeholderVariable)})})),c=n.memo((function(){return(0,o.jsx)("div",{className:a()(s.A.placeholder,s.A.rowSectionEnd,s.A.placeholderEnd)})})),u=n.memo((function(){return(0,o.jsx)("div",{className:a()(s.A.placeholder,s.A.rowSectionIndex,s.A.placeholderIndex)})})),d=n.memo((function(){return(0,o.jsx)("div",{className:a()(s.A.placeholder,s.A.rowSectionStart,s.A.placeholderStartWithCoverImage)})})),m=n.memo((function(){return(0,o.jsx)("div",{className:a()(s.A.placeholder,s.A.rowSectionStart,s.A.placeholderStart)})})),p=n.memo((function({height:e}){return(0,o.jsxs)("div",{className:s.A.trackListRowGrid,style:{height:e},"":"tracklist-row-placeholder",children:[(0,o.jsx)(u,{}),(0,o.jsx)(d,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(c,{})]})})),h=n.memo((function({height:e}){return(0,o.jsxs)("div",{className:s.A.trackListRowGrid,style:{height:e},"":"tracklist-row-placeholder",children:[(0,o.jsx)(d,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(c,{})]})})),g=n.memo((function({height:e}){return(0,o.jsxs)("div",{className:s.A.trackListRowGrid,style:{height:e},"":"tracklist-row-placeholder",children:[(0,o.jsx)(u,{}),(0,o.jsx)(m,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(c,{})]})}))},72605:(e,t,i)=>{"use strict";i.d(t,{Y:()=>l});var n=i(30758),r=i(12783),a=i(11808),s=i(76748),o=i(86070);const l=(0,n.memo)((function({playcount:e}){return e<1?null:(0,o.jsx)(r.E,{as:"div",variant:"bodySmall",className:s.A.rowPlayCount,children:a.Ru.formatNumber(e)})}))},96849:(e,t,i)=>{"use strict";i.d(t,{l:()=>o});var n=i(67707),r=i(16474),a=i(76748),s=i(86070);const o=({children:e,ariaColIndex:t,ariaSort:i,role:o="gridcell"})=>"columnheader"===o?(0,s.jsx)(r.A,{columnIndex:t,ariaSort:i,className:a.A.rowSectionEnd,children:e}):(0,s.jsx)(n.T,{columnIndex:t,className:a.A.rowSectionEnd,children:e})},6941:(e,t,i)=>{"use strict";i.d(t,{y:()=>o});var n=i(67707),r=i(16474),a=i(76748),s=i(86070);const o=({children:e,ariaColIndex:t,ariaSort:i,role:o="gridcell"})=>"columnheader"===o?(0,s.jsx)(r.A,{columnIndex:t,ariaSort:i,className:a.A.rowSectionIndex,children:e}):(0,s.jsx)(n.T,{columnIndex:t,className:a.A.rowSectionIndex,children:e})},40009:(e,t,i)=>{"use strict";i.d(t,{U:()=>o});var n=i(67707),r=i(16474),a=i(76748),s=i(86070);const o=({children:e,ariaColIndex:t,ariaSort:i,role:o="gridcell"})=>"columnheader"===o?(0,s.jsx)(r.A,{columnIndex:t,ariaSort:i,className:a.A.rowSectionStart,children:e}):(0,s.jsx)(n.T,{columnIndex:t,className:a.A.rowSectionStart,children:e})},69905:(e,t,i)=>{"use strict";i.d(t,{o:()=>o});var n=i(67707),r=i(16474),a=i(76748),s=i(86070);const o=({children:e,ariaColIndex:t,ariaSort:i,role:o="gridcell"})=>"columnheader"===o?(0,s.jsx)(r.A,{columnIndex:t,ariaSort:i,className:a.A.rowSectionVariable,children:e}):(0,s.jsx)(n.T,{columnIndex:t,className:a.A.rowSectionVariable,children:e})},92421:(e,t,i)=>{"use strict";i.d(t,{p:()=>l});var n=i(97500),r=i.n(n),a=i(12783),s=i(76748),o=i(86070);const l=({children:e})=>(0,o.jsx)(a.E,{className:r()(s.A.rowSubTitle,"standalone-ellipsis-one-line"),variant:"bodySmall",semanticColor:"textSubdued",children:e})},12165:(e,t,i)=>{"use strict";i.d(t,{Y:()=>a});var n=i(12783),r=i(86070);const a=({children:e})=>(0,r.jsx)(n.E,{className:"standalone-ellipsis-one-line",variant:"bodySmall",semanticColor:"textSubdued",children:e})},81783:(e,t,i)=>{"use strict";i.d(t,{p:()=>c});var n=i(97500),r=i.n(n),a=i(12783),s=i(53129),o=i(76748),l=i(86070);const c=({titleText:e,children:t})=>{const i=(0,l.jsx)(a.E,{variant:"bodyMedium",semanticColor:"textBase",dir:"auto",className:r()(o.A.rowTitle,"standalone-ellipsis-one-line"),as:"div",children:t});return(0,l.jsx)(s.Zp,{label:e,showDelay:s.uF,children:i})}},42832:(e,t,i)=>{"use strict";i.d(t,{RB:()=>u,cL:()=>d,dh:()=>c,gc:()=>o,sn:()=>m,ws:()=>l});var n=i(30758),r=i(15691),a=i(46288),s=i(86070);const o=[a.$.ADDED_AT,a.$.TITLE_AND_ARTIST,a.$.TITLE,a.$.ARTIST,a.$.ALBUM],l=[a.$.INDEX,a.$.TITLE_AND_ARTIST,a.$.TITLE,a.$.ARTIST,a.$.ALBUM,a.$.DURATION],c=[a.$.INDEX,a.$.TITLE_AND_AUTHOR,a.$.TITLE,a.$.ADDED_AT],u={column:null,order:a.H.NONE},d=(0,n.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a TracksSortProvider")},sortState:u}),m=n.memo((function({uri:e,children:t}){return(0,s.jsx)(r.E,{uri:e,defaultState:u,sortContext:d,children:t})}))},42504:(e,t,i)=>{"use strict";i.d(t,{E:()=>p});var n=i(30758),r=i(12783),a=i(11808),s=i(26694),o=i(53129),l=i(31894),c=i(79303),u=i(76748),d=i(86070);const m=({name:e,uri:t,nonInteractive:i,children:n,onClick:r,index:a})=>i?(0,d.jsx)("span",{className:u.A.text,children:n}):(0,d.jsx)(l.y,{name:e,uri:t,onClick:r,index:a,children:n},t),p=({artists:e,filter:t,nonInteractive:i=!1,spec:l})=>{const u=(0,c.s)(),p=(0,n.useCallback)(((e,t)=>{l&&u.logInteraction(l.artistLinkFactory({position:t??0,uri:e}).hitUiNavigate({destination:e}))}),[u,l]),h=e.map((({name:e})=>e)).join(a.Ru.getSeparator());return(0,d.jsx)(o.Zp,{label:h,showDelay:o.uF,children:(0,d.jsx)(r.E,{as:"div",variant:"bodySmall",children:e.map((({uri:e,name:r},o)=>(0,d.jsxs)(n.Fragment,{children:[o>0&&a.Ru.getSeparator(),(0,d.jsx)(m,{uri:e,name:r,nonInteractive:i,onClick:p,index:o,children:(0,d.jsx)(s.M,{searchWords:[t??""],textToHighlight:r})},e)]},e)))})})}},41265:(e,t,i)=>{"use strict";i.d(t,{q:()=>A});var n=i(30758),r=i(4049),a=i(61544),s=i(66416),o=i(30038),l=i(80425),c=i(58235),u=i(75930),d=i(83547),m=i(11808),p=i(83542),h=i(45346),g=i(95302),f=i(11898),v=i(86070);const y=({trackUris:e})=>{const t=(0,f.f)(),[i,r]=(0,n.useState)((()=>{let i=null;for(const n of e){const e=t.containsSync(n);if(!0===e)i=!0;else if(!1===e)return!1}return i})),a=(0,h.W)();(0,n.useEffect)((()=>{t.contains(...e).then((e=>r(e.every(Boolean))))}),[t,e]);const s=(0,n.useCallback)((async()=>{i?await t.remove({uris:e}):await t.add({uris:e}),a({intent:i?"remove-from-library":"add-to-library",type:"click"})}),[i,t,a,e]);return(0,v.jsx)(p.D,{role:"menuitem",onClick:s,disabled:null===i,leadingIcon:i?(0,v.jsx)(u.k,{semanticColor:"textBrightAccent",size:"small"}):(0,v.jsx)(d.P,{semanticColor:"textSubdued",size:"small"}),children:i?m.Ru.get("remove_from_your_liked_songs"):m.Ru.get("save_to_your_liked_songs")})},b=n.memo((function(e){return(0,v.jsx)(g.pZ,{value:"save-multiple-track",children:(0,v.jsx)(y,{...e})})}));var _=i(5861),E=i(6576);const C=n.memo((function({uris:e,uids:t,contextUri:i,removePlaylistItems:n,canRemovePlaylistItems:r}){const{spec:u}=(0,E.o)(e[0]);return(0,v.jsx)(g.pZ,{value:"multi-select",children:(0,v.jsxs)(s.W,{children:[(0,v.jsx)(o.K,{spec:u,uris:e}),(0,v.jsx)(c.c,{spec:u,uids:t,uris:e,contextUri:i}),(0,v.jsx)(b,{trackUris:e.filter((e=>(0,a.U_)(e)||(0,a.Pk)(e)))}),i&&(0,a.tb)(i)?(0,v.jsx)(l.D,{uris:e,uids:t,playlistUri:i||"",removePlaylistItems:n,canBeRemoved:r}):null,(0,v.jsx)(_.o,{spec:u,uris:e})]})})}));var x=i(78560),S=i(24359);function A({index:e,contextUri:t,onContextMenu:i,canRemovePlaylistItems:a,removePlaylistItems:s,isTreeGrid:o=!1}){const l=(0,n.useRef)(i);l.current=i;const c=(0,n.useContext)(x.m),{pushPopSelected:u,toggleSelected:d,isSelected:m,getSelected:p}=c,h=(0,r.M)({action:"open"});return{onClick:(0,n.useCallback)((t=>{d(e,t.shiftKey,t.ctrlKey||t.metaKey)}),[d,e]),onContextMenu:(0,n.useCallback)((i=>{const n=m(e);if(n||d(e,i.shiftKey,i.ctrlKey||i.metaKey),!l.current)return;const r=p().map((({uri:e})=>e)),o=p().map((({uid:e})=>e));r.length>1&&n?h(i,(0,v.jsx)(C,{uris:r,uids:o,contextUri:t,removePlaylistItems:s,canRemovePlaylistItems:a})):l.current?.(i)}),[m,e,p,d,h,t,a,s]),onKeyDown:(0,n.useCallback)((t=>{if(!(t.target instanceof Node))return;const i=!t.currentTarget.contains(t.target),n=!t.currentTarget.querySelector(S.nu)?.contains(t.target);if(!o&&i||o&&n)return;const r="ArrowUp"===t.key?-1:1;["ArrowUp","ArrowDown"].includes(t.key)&&(t.shiftKey?u(e,r):d(e+r,!1,!1))}),[o,u,e,d])}}},95973:(e,t,i)=>{"use strict";i.d(t,{d:()=>B});var n=i(30758),r=i(96157),a=i(55665),s=i(11808),o=i(64981),l=i(48100),c=i(59996),u=i(15739),d=i(9813),m=i(71801),p=i(84075),h=i(25973),g=i(41609),f=i(72445),v=i(84537),y=i(72605),b=i(92421),_=i(12165),E=i(81783),C=i(69915),x=i(98912),S=i(46288),A=i(9474),T=i(54687),I=i(12274),N=i(4096),w=i(48200),R=i(59355),k=i(58237),O=i(78074),P=i(95302),L=i(16972),j=i(72091),D=i(94672),M=i(76748),U=i(86070);const B=n.memo((function({uri:e,name:t,isPlayable:i,duration_ms:n,artists:B,isExplicit:F,isMOGEFRestricted:H,index:V,trackNumber:G,playcount:z,shouldHighLight:W=!1,contextUri:K,uid:Y,usePlayContextItem:q,isReleased:Z=!0,isCompactMode:$=!1,hasAssociatedVideo:Q=!1}){const{spec:J}=(0,j.r)(a.i,{data:{position:V,reason:"",uri:e}}),X=(0,C.w)(),ee=(0,L.T)(e),te=(0,w.g)(e,i),{badges:ie,hasBadges:ne}=(0,D.b)({downloadAvailability:ee,isExplicit:F,isMOGEFRestricted:H,hasAssociatedVideo:Q}),re=B.map((e=>e.name)).join(s.Ru.getSeparator()),ae=e=>e.map((e=>({...e,key:e.uri}))),{isActive:se,isPlaying:oe,triggerPlay:le,togglePlay:ce}=q({uid:Y,uri:e,index:V}),ue=(0,N.c)();return(0,U.jsx)(P.pZ,{value:"row",index:V,children:(0,U.jsx)(o.t,{trigger:"right-click",action:"open",menu:Z&&(0,U.jsx)(l.P,{uri:e,albumUri:K,artists:ae(B),contextUri:K}),preventScrollingWhileOpen:Z,children:(0,U.jsx)(x.w,{uri:e,contextUri:K,isPlayable:te,index:V,isActive:se,onTriggerPlay:(e,t)=>{le({loggingParams:t})},ageRestricted:H,ariaRowIndex:V+1,dragMetadata:{name:t,createdBy:re},initialSelectedState:W,spec:J,draggable:Z,isCompactMode:$,children:X.map((({columnType:i,options:a},o)=>{const C=(0,A.y)(o,i,X);switch(i){case S.$.INDEX:return(0,U.jsx)(C,{ariaColIndex:o,children:(0,U.jsx)(g.$,{uri:e,playAriaLabel:s.Ru.get("tracklist.a11y.play",t,re),onClick:(e,t)=>{ce({loggingParams:t})},isPlaying:oe,isActive:se,spec:J,isLocked:!Z,children:(0,U.jsx)(v.a,{children:G})})},o);case S.$.TITLE_AND_ARTIST:return(0,U.jsx)(C,{ariaColIndex:o,children:(0,U.jsxs)(p.l,{children:[ue&&Z?(0,U.jsx)(c.N,{to:e,className:M.A.rowTitle,"":"internal-track-link",children:(0,U.jsx)(E.p,{titleText:t,children:t})}):(0,U.jsx)(E.p,{titleText:t,children:t}),ne&&(0,U.jsxs)(d.P,{children:[ie.download&&(0,U.jsx)(R._,{}),ie.explicit&&(0,U.jsx)(k.g,{}),ie.nineteen&&(0,U.jsx)(O.q,{className:M.A.nineteen,size:16}),ie.hasAssociatedVideo&&(0,U.jsx)(T.l,{})]}),(0,U.jsx)(b.p,{children:(0,U.jsx)(u.l,{artists:B.map((e=>({uri:e.uri,name:e.name}))),spec:J})})]})},o);case S.$.TITLE:return(0,U.jsx)(C,{ariaColIndex:o,children:(0,U.jsxs)(h.q,{children:[ue&&Z?(0,U.jsx)(c.N,{to:e,className:M.A.rowTitle,"":"internal-track-link",children:(0,U.jsx)(E.p,{titleText:t,children:t})}):(0,U.jsx)(E.p,{titleText:t,children:t}),ne&&(0,U.jsxs)(d.P,{children:[ie.download&&(0,U.jsx)(R._,{}),ie.explicit&&(0,U.jsx)(k.g,{}),ie.nineteen&&(0,U.jsx)(O.q,{className:M.A.nineteen,size:16}),ie.hasAssociatedVideo&&(0,U.jsx)(T.l,{separator:""})]})]})},o);case S.$.ARTIST:return(0,U.jsx)(C,{ariaColIndex:o,children:(0,U.jsx)(_.Y,{children:(0,U.jsx)(u.l,{artists:B.map((e=>({uri:e.uri,name:e.name}))),spec:J})})},o);case S.$.PLAYS:return(0,U.jsx)(C,{ariaColIndex:o,children:(0,U.jsx)(y.Y,{playcount:z})},o);case S.$.DURATION:return(0,U.jsxs)(C,{ariaColIndex:o,children:[Z&&(0,U.jsx)(I.d,{uri:e,spec:J}),!a?.hideDuration&&(0,U.jsx)(m.P,{duration:n}),Z?(0,U.jsx)(f.Y,{menu:(0,U.jsx)(l.P,{uri:e,albumUri:K,artists:ae(B)}),label:s.Ru.get("more.label.track",t,re),spec:J}):(0,U.jsx)(r.In,{size:"small"})]},o);default:return null}}))})})})}),((e,t)=>e.uri===t.uri&&e.isCompactMode===t.isCompactMode))},65159:(e,t,i)=>{"use strict";i.d(t,{W:()=>we});var n=i(30758),r=i(41978),a=i(9183),s=i(58715),o=i(73671),l=i(97675),c=i(90507),u=i(45893),d=i(55665),m=i(61544),p=i(11808),h=i(90751),g=i(71588),f=i(71072),v=i(58345),y=i(49350),b=i(48100),_=i(34136),E=i(26694),C=i(50415),x=i(59996),S=i(15549),A=i(42504),T=i(12783),I=i(85072),N=i(91584),w=i(79303),R=i(76748),k=i(86070);const O=({uri:e,imageUrl:t,name:i,showAvatar:r,spec:a,isCompactMode:s=!1})=>{const o=(0,w.s)(),l=(0,n.useCallback)((()=>{a&&o.logInteraction(a.addedByLinkFactory({position:0,uri:e}).hitUiNavigate({destination:e}))}),[o,a,e]);return(0,k.jsx)(g.h,{menu:(0,k.jsx)(N.B,{uri:e}),children:(0,k.jsxs)(x.N,{className:R.A.addedBy,to:e,onClick:l,children:[r&&(0,k.jsx)(I.e,{images:[{url:t,width:null,height:null}],label:i,width:s?16:24,userIconSize:"small"}),(0,k.jsx)(T.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:i})]})})};var P=i(84401),L=i(9813),j=i(15847);const D=({concertsCount:e="1",concertDate:t,concertURI:i,index:n,spec:r})=>{const a=(0,w.s)(),s=()=>{const e=r.eventLinkFactory({position:n,uri:i,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:i});a.logInteraction(e)},o=p.Ru.formatDate((0,j.ad)(t),{month:"short",day:"numeric"});return"1"===e?(0,k.jsx)(T.E,{className:R.A.eventDate,variant:"bodySmall",semanticColor:"textSubdued",children:(0,k.jsx)(x.N,{to:i,onClick:s,children:o})}):(0,k.jsx)(T.E,{className:R.A.eventDate,variant:"bodySmall",semanticColor:"textSubdued",children:(0,k.jsx)(x.N,{to:i,onClick:s,children:p.Ru.get("concerts_near_you.date",e,o)})})},M=({dateAdded:e,prefix:t})=>{let i=e.getTime()>0&&p.Ru.formatRelativeDate(e,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"});return i&&t&&(i=`${t} ${i}`),(0,k.jsx)(T.E,{variant:"bodySmall",semanticColor:"textSubdued",children:i})};var U=i(71801),B=i(68179),F=i(45346);const H=({eventDate:e,ticketingSiteURL:t})=>{const i=(0,F.W)(),n=p.Ru.formatDate((0,j.ad)(e),{year:"numeric",month:"short",day:"numeric"}),r=p.Ru.get("tracklist.livestream");return(0,j.ad)(e)<new Date?(0,k.jsx)(T.E,{className:R.A.eventDate,variant:"bodySmall",semanticColor:"textSubdued",children:`${r} • ${n}`}):(0,k.jsx)(T.E,{className:R.A.eventDate,variant:"bodySmall",semanticColor:"textSubdued",children:(0,k.jsxs)("a",{href:t,onClick:()=>{i({targetUri:t,intent:"navigate",type:"click"})},children:[(0,k.jsx)(B.T,{className:R.A.eventTicketIcon,height:19}),`${r} • ${n}`]})})},V=({concertsCount:e="1",concertVenue:t,concertURI:i,index:n,spec:r})=>{const a=(0,w.s)(),s="1"===e?t:p.Ru.get("concerts_near_you.multiple_locations");return(0,k.jsx)(T.E,{className:R.A.eventVenue,variant:"bodySmall",semanticColor:"textSubdued",children:(0,k.jsx)(x.N,{to:i,onClick:()=>{const e=r.eventLinkFactory({position:n,uri:i,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:i});a.logInteraction(e)},children:s})})};var G=i(3554);const z=({uri:e,imageUrl:t,displayName:i,username:n,piled:r,onClick:a})=>{const s=(0,k.jsx)(I.e,{images:[{url:t,width:null,height:null}],label:i,width:24,userIconSize:"small",piled:r,displayName:i,username:n,className:R.A.facepileAvatar});return e?(0,k.jsx)(g.h,{menu:(0,k.jsx)(N.B,{uri:e}),children:(0,k.jsx)(x.N,{className:R.A.facepile,to:e,onClick:a,children:s})}):(0,k.jsx)("span",{className:R.A.facepile,children:s})},W=({users:e,spec:t})=>{const i=(0,w.s)();return(0,k.jsx)(n.Fragment,{children:e.slice(0,5).map(((e,n)=>(0,k.jsx)(z,{uri:e.uri,imageUrl:(0,G.g)(e.images)?.url||"",displayName:e.displayName,username:e.username,piled:n>0,onClick:()=>{if(!t||!e.uri)return;const r=t.addedByLinkFactory({position:n,uri:e.uri}).hitUiNavigate({destination:e.uri});i.logInteraction(r)}},e.uri||e.displayName)))})};var K=i(97500),Y=i.n(K),q=i(93240),Z=i(37065),$=i(37637);const Q=({isDisliked:e,feedbackPath:t,feedbackUri:i,deleteFeedbackPath:r,spec:a,onClick:s,name:o,contextUri:l})=>{const c=(0,w.s)(),{enqueueSnackbar:u}=(0,q.dh)(),{setDislikeFeedback:d,removeDislikeFeedback:m}=(0,$.I)({uri:i,setFeedbackPath:t,removeFeedbackPath:r,contextUri:l}),h=(0,n.useCallback)((async()=>{m(),s?.(),a&&l&&c.logInteraction(a.addRecommendationButtonFactory().hitAddToPlaylist({playlist:l,itemToBeAdded:i}))}),[m,s,a,l,c,i]),g=(0,n.useCallback)((async()=>{d(),s?.(),u(p.Ru.get("feedback.hide-song",o)),a&&l&&c.logInteraction(a.removeRecommendationButtonFactory().hitRemoveRecommendation({recommendedItemUri:i,contextUri:l}))}),[d,s,u,o,a,l,c,i]);return(0,k.jsx)(Z.O,{className:Y()(R.A.rowFeedbackButton,R.A.rowFeedback),onClick:e?h:g,isDisliked:e,size:"small"})};var J=i(17930),X=i(84075),ee=i(25973),te=i(41609),ie=i(72445),ne=i(84537);const re=({releaseDate:e})=>(0,k.jsx)(T.E,{variant:"bodySmall",children:(0,j.gD)((0,j.ad)(e))});var ae=i(92421),se=i(12165),oe=i(81783),le=i(69915),ce=i(98912),ue=i(46288),de=i(9474),me=i(54687),pe=i(12274),he=i(73015),ge=i(4096),fe=i(48200),ve=i(59355),ye=i(58237),be=i(78074),_e=i(95302),Ee=i(16972),Ce=i(42582),xe=i(72091),Se=i(71817),Ae=i(54443),Te=i(36485),Ie=i(94672);const Ne=e=>e?.type===Se.c.SHOW,we=n.memo((function({uri:e,uid:t,name:i,duration_ms:T,artists:I,albumOrShow:N,isMOGEFRestricted:j,isExplicit:B,isPlayable:F,isLocal:z=!1,isPaywalled:K,isUserSubscribed:Y,index:q,playIndex:Z=null,isMixedMedia:$,addedBy:Se,hasDecoratedAddedBy:we,dateAdded:Re,release_date:ke,type:Oe,imgUrl:Pe,contextUri:Le,onMove:je,onInsert:De,usePlayContextItem:Me,allowedDropTypes:Ue,feedbackPath:Be,feedbackUri:Fe,deleteFeedbackPath:He,isDisliked:Ve,ticketingSiteURL:Ge="",eventDate:ze,concertsCount:We,concertDate:Ke,concertURI:Ye="",concertVenue:qe,isConcert:Ze,isBlend:$e=!1,canRemove:Qe,playlistName:Je,authorName:Xe,isOutOfMarket:et,consumptionCapExplanation:tt,isOwnedBySelf:it=!1,isCompactMode:nt=!1,hasAssociatedVideo:rt=!1}){const at=(0,w.s)(),{spec:st}=(0,xe.r)(d.i,{data:{position:q,reason:"",uri:e}}),ot=(0,r.wA)(),lt=(0,a.Zp)(),{filter:ct}=(0,n.useContext)(S.g),ut=(0,Ee.T)(e),dt=(0,fe.g)(e,F,z,et),mt=(0,le.w)(),{enqueueSnackbar:pt}=(0,he.d)(),ht="episode"===Oe,gt="audiobook"===Oe,ft="track"!==Oe&&Ne(N)&&N.mediaType===Ae.Q.VIDEO,vt=K&&!Y,yt=gt&&vt,{badges:bt,hasBadges:_t}=(0,Ie.b)({downloadAvailability:ut,isExplicit:B,isMOGEFRestricted:j,isPaywalled:K,hasAssociatedVideo:rt}),Et=(0,ge.c)(),Ct=()=>{const e=st.eventLinkFactory({position:q,uri:Ye,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:Ye});at.logInteraction(e)};let xt=q+1;$&&(xt=ft?(0,k.jsx)(s.B,{"":"video-icon",size:"small","aria-hidden":"true"}):ht?(0,k.jsx)(o.L,{"":"podcast-icon",size:"small","aria-hidden":"true"}):gt?(0,k.jsx)(l.l,{"":"audiobook-icon",size:"small","aria-hidden":"true"}):(0,k.jsx)(c.v,{"":"track-icon",size:"small","aria-hidden":"true"}));let St=(0,k.jsx)(b.P,{uri:e,uid:t,albumUri:N?.uri,artists:I,contextUri:Le,canBeRemovedFromPlaylist:Qe});ht?St=(0,k.jsx)(v.b,{uri:e,uid:t,showUri:N?.uri,contextUri:Le,canBeRemovedFromPlaylist:Qe}):z?St=(0,k.jsx)(y.A,{uri:e,uid:t,contextUri:Le,canBeRemovedFromPlaylist:Qe}):gt&&(St=(0,k.jsx)(f.p,{uri:e,uid:t,contextUri:Le,includeGoToAudiobook:!0,canBeRemovedFromPlaylist:Qe}));let At=I?.map((e=>e.name)).join(p.Ru.getSeparator())||"";ht&&Ne(N)?At=N.publisher:gt&&(At=Xe||"");const Tt=Se?.[0],It=(0,G.g)(Tt?.images,{desiredWidth:24,desiredLabel:"small"}),Nt=(0,Ce.P)({uri:e},{featureIdentifier:"playlist"}),wt=Me({uid:t,uri:e,index:Z??q}),{isActive:Rt,isPlaying:kt,triggerPlay:Ot,togglePlay:Pt}=gt?Nt:wt,Lt=()=>(0,k.jsx)(oe.p,{titleText:i,children:(0,k.jsx)(E.M,{searchWords:[ct],textToHighlight:i})}),jt=(0,n.useCallback)(((e,t)=>{gt&&tt?ot((0,h._3)(tt)):Ot({loggingParams:t})}),[tt,ot,gt,Ot]),Dt=(0,n.useCallback)(((t,i)=>{gt&&tt?ot((0,h._3)(tt)):yt?lt((0,m.o_)(e).toURLPath(!0)):Pt({loggingParams:i})}),[tt,ot,gt,lt,Pt,yt,e]);return(0,k.jsx)(_e.pZ,{value:"row",index:q,children:(0,k.jsx)(_.f,{renderInline:!1,enabled:!0,showUri:N?.uri,children:(t,n)=>(0,k.jsx)(g.h,{menu:St,children:(0,k.jsx)(ce.w,{uri:e,contextUri:Le,index:q,onTriggerPlay:jt,isCompactMode:nt,onTriggerPaywall:t=>{yt?lt((0,m.o_)(e).toURLPath(!0)):n(t)},onDoubleClick:()=>{gt?lt((0,m.o_)(e).toURLPath(!0)):pt(p.Ru.get("feedback.unable-to-play"))},isLocked:vt,isActive:Rt,ariaRowIndex:q+1,isPlayable:dt,ageRestricted:j,dragMetadata:{name:i,createdBy:At},onMove:je,onInsert:De,allowedDropTypes:Ue,spec:st,canRemovePlaylistItems:Qe,children:mt.map((({columnType:t,options:n},r)=>{const a=(0,de.y)(r,t,mt);return(0,k.jsx)(a,{ariaColIndex:r,children:(()=>{switch(t){case ue.$.INDEX:return(0,k.jsx)(k.Fragment,{children:(0,k.jsx)(_.f,{showUri:N?.uri??"",renderInline:!1,enabled:vt,children:(0,k.jsx)(te.$,{uri:e,playAriaLabel:p.Ru.get("tracklist.a11y.play",i,At),onClick:Dt,isPlaying:kt,isActive:Rt,isLocked:vt,spec:st,children:(0,k.jsx)(ne.a,{children:xt})})})});case ue.$.TITLE_AND_ARTIST:case ue.$.TITLE_AND_AUTHOR:return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(J.e,{src:Pe,isVideo:ft,isEpisode:ht}),(0,k.jsxs)(X.l,{children:[Et||gt?(0,k.jsx)(x.N,{to:e,className:R.A.rowTitle,"":"internal-track-link",children:Lt()}):Lt(),_t&&(0,k.jsxs)(L.P,{children:[bt.download&&(0,k.jsx)(ve._,{}),bt.explicit&&(0,k.jsx)(ye.g,{}),bt.paid&&(0,k.jsx)(C.K,{}),bt.nineteen&&(0,k.jsx)(be.q,{className:R.A.nineteen,size:16}),bt.hasAssociatedVideo&&(0,k.jsx)(me.l,{})]}),(0,k.jsxs)(ae.p,{children:[!ht&&!ft&&I&&(0,k.jsx)(A.E,{nonInteractive:z,artists:I,filter:ct,spec:st}),(ht||gt)&&!ft&&At]})]})]});case ue.$.TITLE:return(0,k.jsxs)(ee.q,{children:[Et||gt?(0,k.jsx)(x.N,{to:e,className:R.A.rowTitle,"":"internal-track-link",children:Lt()}):Lt(),_t&&(0,k.jsxs)(L.P,{children:[bt.download&&(0,k.jsx)(ve._,{}),bt.explicit&&(0,k.jsx)(ye.g,{}),bt.paid&&(0,k.jsx)(C.K,{}),bt.nineteen&&(0,k.jsx)(be.q,{className:R.A.nineteen,size:16}),bt.hasAssociatedVideo&&(0,k.jsx)(me.l,{separator:""})]})]});case ue.$.ARTIST:case ue.$.AUTHOR:return(0,k.jsxs)(se.Y,{children:[!ht&&!ft&&I&&(0,k.jsx)(A.E,{nonInteractive:z,artists:I,filter:ct,spec:st}),(ht||gt)&&!ft&&At]});case ue.$.ALBUM_OR_PODCAST:case ue.$.ALBUM:return N?(0,k.jsx)(P.g,{nonInteractive:z,uri:N.uri,name:N.name,creatorUri:I?.[0]?.uri,spec:st,children:(0,k.jsx)(E.M,{searchWords:[ct],textToHighlight:N.name})}):null;case ue.$.ADDED_BY:return(0,k.jsx)(k.Fragment,{children:$e?(0,k.jsx)(W,{users:Se,spec:st}):(0,k.jsx)(O,{name:Tt?.displayName||Tt?.username||"",isCompactMode:nt,uri:Tt?.uri||"",imageUrl:It?.url||"",showAvatar:we,spec:st})});case ue.$.RELEASE_DATE:return(0,k.jsx)(k.Fragment,{children:ht&&(0,k.jsx)(re,{releaseDate:ke})});case ue.$.EVENT_DATE:return(0,k.jsx)(k.Fragment,{children:ze&&Ge?(0,k.jsx)(_e.pZ,{value:"ticket-link",children:(0,k.jsx)(H,{eventDate:ze,ticketingSiteURL:Ge})}):null});case ue.$.CONCERT_DATE:return(0,k.jsx)(k.Fragment,{children:Ke?(0,k.jsx)(_e.pZ,{value:"ticket-link",children:(0,k.jsx)(D,{concertsCount:We,concertDate:Ke,concertURI:Ye,index:q,spec:st})}):null});case ue.$.EVENT_INFO:case ue.$.CONCERT_VENUE:return(0,k.jsx)(k.Fragment,{children:qe&&Ye?(0,k.jsx)(_e.pZ,{value:"ticket-link",children:(0,k.jsx)(V,{concertsCount:We,concertVenue:qe,concertURI:Ye,index:q,spec:st})}):null});case ue.$.ADDED_AT:return(0,k.jsx)(k.Fragment,{children:Re?(0,k.jsx)(M,{dateAdded:new Date(Re)}):null});case ue.$.DURATION:return(0,k.jsxs)(k.Fragment,{children:[Be&&He&&(0,k.jsx)(Q,{isDisliked:Ve,feedbackPath:Be,deleteFeedbackPath:He,feedbackUri:Fe||e,name:Je,contextUri:Le}),!ft&&!et&&(0,k.jsx)(pe.d,{uri:e,spec:st,type:Oe,isOwnedBySelf:it}),Ze&&(0,k.jsx)(x.N,{to:Ye,onClick:Ct,children:(0,k.jsx)(u.l,{className:R.A.eventTicketIcon,height:19})}),!n?.hideDuration&&(0,k.jsx)(U.P,{duration:T}),(0,k.jsx)(ie.Y,{menu:St,label:p.Ru.get("more.label.track",i,At),spec:st})]});case ue.$.ACTIONS:case ue.$.ADD:case ue.$.ALBUM_OR_SHOW:case ue.$.PLAYS:case ue.$.BPM:case ue.$.KEY:case ue.$.VIBE:return null;default:(0,Te.d)(t)}return null})()},`column-${r}`)}))})})})})}),((e,t)=>e.uri===t.uri&&e.allowedDropTypes.length===t.allowedDropTypes.length&&e.isPlayable===t.isPlayable&&e.isMixedMedia===t.isMixedMedia&&e.consumptionCapExplanation===t.consumptionCapExplanation&&e.isCompactMode===t.isCompactMode))},54687:(e,t,i)=>{"use strict";i.d(t,{T:()=>g,l:()=>h});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(58715),l=i(81987),c=i(11808),u=i(19159);const d="nOw3c5b4tD945Qcv8oV4";var m=i(86070);const p=(0,n.memo)((({separator:e="•",iconSize:t="small",className:i,variant:n="bodySmall"})=>(0,m.jsxs)(s.E,{as:"span",className:a()(d,i),children:[(0,m.jsx)(o.B,{size:t}),(0,m.jsx)(s.E,{as:"span",variant:n,children:c.Ru.get("card.tag.video")}),(0,m.jsx)(s.E,{as:"span",variant:n,children:e})]}))),h=(0,n.memo)((({separator:e})=>(0,l.NC)(u.LX5)?(0,m.jsx)(p,{separator:e}):null)),g=(0,n.memo)((({separator:e,...t})=>(0,m.jsx)(p,{separator:e,...t})))},77142:(e,t,i)=>{"use strict";i.d(t,{f:()=>o});var n=i(30758),r=i(72842);var a=i(65987),s=i(86070);const o=n.forwardRef((function({children:e,className:t,onKeyDown:i=(()=>{}),isFluid:o=!1,style:l,...c},u){const d=(0,n.useRef)(null);(e=>{const t=(0,n.useRef)(null);(0,n.useEffect)((()=>{const i=e.current;if(!i)return()=>{};const n=e=>{const i=e.target;if(i instanceof HTMLElement){const e=parseInt(i.closest("[aria-rowindex]")?.getAttribute("aria-rowindex")??"",10),n=parseInt(i.closest("[aria-colindex]")?.getAttribute("aria-colindex")??"",10);t.current={target:i,rowIndex:e,colIndex:n}}};return i.addEventListener("focusout",n),()=>{i.removeEventListener("focusout",n)}}),[e]),(0,n.useEffect)((()=>{if(t.current&&e.current){const{target:i,rowIndex:n,colIndex:a}=t.current,s=e.current?.contains(i);!s&&Number.isInteger(n)&&Number.isInteger(a)&&(0,r.oe)(e.current,n,a),t.current=null}}))})(d),(0,n.useImperativeHandle)(u,(()=>d.current));const m=(0,n.useCallback)((e=>{d.current?.contains(e.target)&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||e.preventDefault(),"ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||document.documentElement.classList.remove("no-focus-outline"),"ArrowUp"===e.key&&(0,r.YR)(d.current,a.O.UP,o),"ArrowDown"===e.key&&(0,r.YR)(d.current,a.O.DOWN,o),"ArrowLeft"===e.key&&(0,r.YR)(d.current,a.O.LEFT,o),"ArrowRight"===e.key&&(0,r.YR)(d.current,a.O.RIGHT,o),i(e))}),[i,o]);return(0,s.jsx)("div",{ref:d,role:"grid","aria-rowcount":c["aria-rowcount"],"aria-colcount":c["aria-colcount"],"aria-label":c["aria-label"],className:t,onKeyDown:m,tabIndex:0,"":c["data-testid"],style:l,children:e})}))},67707:(e,t,i)=>{"use strict";i.d(t,{T:()=>o});var n=i(30758),r=i(12649),a=i(62673),s=i(86070);const o=({children:e,columnIndex:t,className:i,...o})=>{const l=(0,n.useRef)(null);return(0,a.g)(l),(0,r.l)(l),(0,s.jsx)("div",{ref:l,className:i,role:"gridcell","aria-colindex":t+1,...o,children:e})}},16474:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(30758),r=i(12649),a=i(62673),s=i(86070);const o=({children:e,ariaSort:t,columnIndex:i,className:o})=>{const l=(0,n.useRef)(null);return(0,a.g)(l),(0,r.l)(l),(0,s.jsx)("div",{ref:l,className:o,role:"columnheader","aria-colindex":i+1,...t?{"aria-sort":t}:{},tabIndex:-1,children:e})}},80851:(e,t,i)=>{"use strict";i.d(t,{$:()=>s});var n=i(30758),r=i(72842),a=i(86070);const s=({children:e,rowIndex:t,className:i,"aria-selected":s})=>{const o=(0,n.useRef)(null);return(0,n.useEffect)((()=>{const e=o.current,t=e=>{const t=e.currentTarget;t.contains(document.activeElement)||(0,r.Ai)(t)};return e&&e.addEventListener("click",t),()=>{e&&e.removeEventListener("click",t)}}),[]),(0,a.jsx)("div",{ref:o,className:i,role:"row","aria-rowindex":t+1,"aria-selected":s,children:e})}},12649:(e,t,i)=>{"use strict";i.d(t,{l:()=>r});var n=i(30758);const r=e=>{(0,n.useEffect)((()=>{if(!e.current)return;let t=e.current.parentElement;do{if(!t)return;t.getAttribute("role")||t.setAttribute("role","presentation"),t=t.parentElement}while("grid"!==t?.getAttribute("role"))}),[e])}},96475:(e,t,i)=>{"use strict";i.d(t,{$:()=>d});var n=i(30758),r=i(65987),a=i(24359);function s(e,t,i=!0,n=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,a.fk)(e))return;const s=e.querySelector('[tabindex="0"]');t===r.O.UP&&(0,a.MS)(s,o(e,s,r.O.UP,i,n)),t===r.O.DOWN&&(0,a.MS)(s,o(e,s,r.O.DOWN,i,n))}function o(e,t,i,n,s){const o=t.closest('li[role="listitem"]');if(!o)return t;let l=o,c=t;const u=Array.from(e.querySelectorAll('li[role="listitem"]')),d=u.indexOf(o);if(d<0)return t;if(i===r.O.UP){if(document.activeElement===e){if(l=u[u.length-1],s){const e=l?.querySelectorAll(a.nu);c=e[e.length-1]}else c=l?.querySelector(a.nu);return c??t}if(s){const e=Array.from(o.querySelectorAll(a.nu)),i=e.indexOf(t)-1;if(i>=0)return e[i]}let i=d-1;const r=()=>!c&&(!n&&i>=0||n&&d!==i);do{l=u[i];if(n&&!l&&(i=u.length-1,l=u[i]),s){const e=l?.querySelectorAll(a.nu);c=e?e[e.length-1]:null}else c=l?.querySelector(a.nu);i-=1}while(r())}else if(i===r.O.DOWN){if(document.activeElement===e)return l=u[0],c=l?.querySelector(a.nu),c??t;if(s){const e=Array.from(o.querySelectorAll(a.nu)),i=e.indexOf(t)+1;if(i<e.length)return e[i]}let i=d+1;const r=()=>{const e=!n&&i<=u.length;return!c&&(e||n&&d!==i)};do{l=u[i];n&&!l&&(i=0,l=u[i]),c=l?.querySelector(a.nu),i+=1}while(r())}return c||t}var l=i(22210),c=i(81996),u=i(86070);const d=(0,n.forwardRef)((({onKeyDown:e,children:t,circular:i=!0,allowsMultipleInteractiveChildrenInItem:o=!1,...d},m)=>{const p=(0,c.N)(m);(0,l.R)(p);const h=(0,n.useCallback)((t=>{p.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),document.documentElement.classList.remove("no-focus-outline")),"ArrowUp"===t.key&&s(p.current,r.O.UP,i,o),"ArrowDown"===t.key&&s(p.current,r.O.DOWN,i,o),e?.(t))}),[i,o,p,e]),g=(0,n.useCallback)((e=>{if(!p.current)return;const t=e.target,i=p.current.querySelector('[tabindex="0"]');t.closest('li[role="listitem"]')&&t!==i&&(0,a.MS)(i,t,{preventScroll:!0})}),[p]);return(0,u.jsx)("ul",{role:"list",ref:p,onKeyDown:h,onFocus:g,tabIndex:0,...d,children:t})}))},5122:(e,t,i)=>{"use strict";i.d(t,{c:()=>s});var n=i(30758),r=i(62673),a=i(86070);const s=({children:e,innerRef:t,...i})=>{const s=(0,n.useRef)(null),o=t??s;return(0,r.g)(o),(0,a.jsx)("li",{ref:o,role:"listitem",...i,children:e})}},63898:(e,t,i)=>{"use strict";i.d(t,{R:()=>p});var n=i(30758),r=i(65987),a=i(24359);function s(e,t,i=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,a.fk)(e))return;const n=e.querySelector('[tabindex="0"]');t===r.O.UP&&(0,a.MS)(n,o(e,n,r.O.UP,i)),t===r.O.DOWN&&(0,a.MS)(n,o(e,n,r.O.DOWN,i)),t===r.O.RIGHT&&(0,a.MS)(n,l(n,r.O.RIGHT,i)),t===r.O.LEFT&&(0,a.MS)(n,l(n,r.O.LEFT,i)),t===r.O.HOME&&(0,a.MS)(n,c(r.O.HOME,i)??n),t===r.O.END&&(0,a.MS)(n,c(r.O.END,i)??n)}function o(e,t,i,n=!1){const s=t.closest('li[role="row"]');if(!s)return t;let o=s;const c=Array.from(e.querySelectorAll('li[role="row"]')),u=Array.from(s.querySelectorAll(a.nu)),d=c.indexOf(s);if(d<0)return t;const m=(n&&t!==u[0]||!n&&t!==s)&&!(t instanceof HTMLLIElement);if(i===r.O.UP){if(document.activeElement===e){o=c[c.length-1];return(n?o.querySelector(a.nu):o)??t}if(m)return l(t,r.O.LEFT,n);let i=d-1;if(-1===i)return t;o=c[i],i-=1}else if(i===r.O.DOWN){if(document.activeElement===e){o=c[0];return(n?o.querySelector(a.nu):o)??t}if(m)return l(t,r.O.RIGHT,n);let i=d+1;if(i===c.length)return t;o=c[i],i+=1}return(n?o.querySelector(a.nu):o)??t}function l(e,t,i=!1){const n=e.closest('li[role="row"]');if(!n)return e;let s=e;const o=Array.from(n.querySelectorAll(a.nu)),l=o.indexOf(e);let c=0;if(t===r.O.RIGHT&&l-1!==o.length)c=l+1;else{if(t===r.O.LEFT&&-1===l)return n;if(t===r.O.LEFT&&0!==l)c=l-1;else if(t===r.O.LEFT&&0===l){return(i?n.querySelector(a.nu):n)??n}}return s=o.at(c),s??e}function c(e,t=!1){const{currentFocus:i,listEl:n}=function(){const e=document.activeElement,t=e?.closest("ul");return((0,r.I)(e)||e instanceof HTMLLIElement)&&t?{currentFocus:e,listEl:t}:{currentFocus:null,listEl:null}}();if(null===i||null===n)return null;const s=i.closest('li[role="row"]');if(!s)return i;const o=Array.from(n.querySelectorAll('li[role="row"]')),l=Array.from(s.querySelectorAll(a.nu));if(o.indexOf(s)<0)return i;const c=t&&i===l[0]||!t&&i===s;if(e===r.O.HOME){if(c){return(t?o[0].querySelector(a.nu):o[0])??i}return(t?l[1]:l[0])??i}if(e===r.O.END){if(c){return(t?o[o.length-1].querySelector(a.nu):o[o.length-1])??i}return l[l.length-1]??i}return i}var u=i(22210),d=i(81996),m=i(86070);const p=(0,n.forwardRef)((({onKeyDown:e,children:t,firstInteractiveIsWrapper:i=!1,...o},l)=>{const c=(0,d.N)(l);(0,u.R)(c);const p=(0,n.useCallback)((t=>{c.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"Home"!==t.key&&"End"!==t.key||t.preventDefault(),"ArrowUp"!==t.key&&"ArrowDown"!==t.key||document.documentElement.classList.remove("no-focus-outline"),"ArrowUp"===t.key&&s(c.current,r.O.UP,i),"ArrowDown"===t.key&&s(c.current,r.O.DOWN,i),"ArrowRight"===t.key&&s(c.current,r.O.RIGHT,i),"ArrowLeft"===t.key&&s(c.current,r.O.LEFT,i),"Home"===t.key&&s(c.current,r.O.HOME,i),"End"===t.key&&s(c.current,r.O.END,i),e?.(t))}),[i,c,e]),h=(0,n.useCallback)((e=>{if(!c.current)return;const t=e.target,i=c.current.querySelector('[tabindex="0"]');t.closest('li[role="row"]')&&t!==i&&(0,a.MS)(i,t,{preventScroll:!0})}),[c]);return(0,m.jsx)("ul",{role:"treegrid",ref:c,onKeyDown:p,onFocus:h,tabIndex:0,...o,children:t})}))},56914:(e,t,i)=>{"use strict";i.d(t,{W:()=>s});var n=i(30758),r=i(62673),a=i(86070);const s=({children:e,innerRef:t,reRunOnDOMUpdate:i=!1,...s})=>{const o=(0,n.useRef)(null),l=t??o;return(0,r.g)(l,i),(0,a.jsx)("li",{ref:l,"aria-expanded":"true","aria-level":1,role:"row",...s,children:e})}},91969:(e,t,i)=>{"use strict";i.d(t,{o:()=>r});var n=i(86070);function r({children:e,...t}){return(0,n.jsxs)("label",{className:"hidden-visually",children:[e,(0,n.jsx)("input",{...t})]})}},34136:(e,t,i)=>{"use strict";i.d(t,{f:()=>b});var n=i(12783),r=i(43830),a=i(30171),s=i(11808),o=i(16121),l=i(19817),c=i(35421),u=i(50668),d=i(30758),m=i(99008);const p="a_fhw77sDAmUWT0DjcLz",h="IVCTj3T2ms7JvLUiF4hZ",g="_vX7nRSblUeXv4DTYkKu",f="ST9Bhw7AdmFCTZDIKw3n";var v=i(86070);const y=({showUri:e})=>{const t=(0,o.Oj)(),i=function(e){const t=(0,m.T)(),[i,n]=(0,d.useState)(null);return(0,d.useEffect)((()=>{!async function(){try{const i=await t.getAccessInfo(e);n(i)}catch(e){console.error(e),n(void 0)}}()}),[t,e]),i}(e);if(null===i)return null;let l=(()=>{const e=s.Ru.get("paywalls.modal-heading"),i=(0,v.jsxs)(v.Fragment,{children:[s.Ru.get("paywalls.modal-body-p1"),(0,v.jsx)("br",{}),(0,v.jsx)("br",{}),s.Ru.get("paywalls.modal-body-p2"),(0,v.jsx)("br",{}),(0,v.jsx)("br",{}),s.Ru.get("paywalls.modal-body-p3")]});return(0,v.jsxs)("div",{className:p,children:[(0,v.jsx)(n.E,{as:"div",variant:"bodyMediumBold",className:h,children:e}),(0,v.jsx)(n.E,{as:"div",variant:"bodySmall",className:g,children:i}),(0,v.jsx)("div",{className:f,children:(0,v.jsx)(a.H,{size:"small",semanticColor:"textBase",onClick:()=>{t({type:"close"})},children:s.Ru.get("close")})})]})})();return i?.basic&&(l=(e=>{const i=e.title,a=e.body;return(0,v.jsxs)("div",{className:p,children:[(0,v.jsx)(n.E,{as:"div",variant:"bodyMediumBold",className:h,children:i}),(0,v.jsx)(n.E,{as:"div",variant:"bodySmall",className:g,children:a}),(0,v.jsx)("div",{className:f,children:(0,v.jsx)(r.$,{size:"small",colorSet:"invertedLight",onClick:()=>{t({type:"close"})},children:e.cta})})]})})(i.basic)),i?.upsellLink&&(l=(e=>{const i=e.title,o=e.body;return(0,v.jsxs)("div",{className:p,children:[(0,v.jsx)(n.E,{as:"div",variant:"bodyMediumBold",className:h,children:i}),(0,v.jsx)(n.E,{as:"div",variant:"bodySmall",className:g,children:o}),(0,v.jsxs)("div",{className:f,children:[(0,v.jsx)(a.H,{size:"small",semanticColor:"textBase",onClick:()=>{t({type:"close"})},children:s.Ru.get("close")}),(0,v.jsx)(r.$,{size:"small",colorSet:"invertedLight",href:e.url,children:e.cta})]})]})})(i.upsellLink)),(0,v.jsx)(c.z,{children:l})},b=({children:e,enabled:t,showUri:i,renderInline:n=!0})=>t&&i?(0,v.jsx)(u.y,{trigger:"click",action:"toggle",offset:[-2,20],renderInline:n,content:(0,v.jsx)(y,{showUri:i}),children:e}):(0,l.d)(e)?e(!1,(()=>{}),{current:null}):e},51736:(e,t,i)=>{"use strict";i.d(t,{F:()=>O});var n=i(30758),r=i(81987),a=i(11808),s=i(89661),o=i(69915),l=i(95973),c=i(97500),u=i.n(c),d=i(36315),m=i(12783),p=i(76748),h=i(86070);const g=({children:e})=>(0,h.jsx)(m.E,{dir:"auto",className:u()(p.A.rowTitle,p.A.discTitle,"standalone-ellipsis-one-line"),as:"div",variant:"bodyMediumBold",children:e});var f=i(84075),v=i(84537),y=i(6941),b=i(40009);const _=({discNumber:e})=>(0,h.jsxs)("div",{className:u()(p.A.trackListRowGrid,p.A.discRow),children:[(0,h.jsx)(y.y,{ariaColIndex:0,children:(0,h.jsx)("div",{className:p.A.rowMarker,children:(0,h.jsx)(v.a,{children:(0,h.jsx)(d.I,{size:"small"})})})}),(0,h.jsx)(b.U,{ariaColIndex:1,children:(0,h.jsx)(f.l,{children:(0,h.jsx)(g,{children:a.Ru.get("tracklist.disc-sperator.title",e)})})})]});var E=i(45546),C=i(61272),x=i(5350),S=i(86495),A=i(90461),T=i(69916);const I=(e,t)=>{const{request:i}=(0,n.useContext)(T.j),r=(0,C.lB)((()=>t),[t]),a=(0,n.useMemo)((()=>function(e){return(0,A.YD)(e)?e.items.reduce(((e,t)=>(e.push(t.discNumber-1),e.concat(Array(t.nrTracks??0).fill(t.discNumber)))),[]):null}(r)),[r]);return(0,n.useCallback)((async(t,n)=>{const s=await i(x.xt,{uri:e,offset:null!==a?t-a[t]:t,limit:n});return(0,S.TI)(s?.data,r)}),[r,a,i,e])};var N=i(84512),w=i(19159),R=i(95302),k=i(71817);const O=n.memo((function({ariaLabel:e,nrTracks:t,discs:i,albumUri:c,highlightUri:u,scrollToIndex:d,usePlayContextItem:m,hasHeaderRow:p=!0,initalTracks:g,isCompactMode:f=!1}){const v=(0,r.NC)(w.LX5),y=I(c,i),b=(0,n.useRef)(null),C=(0,n.useRef)(!1),[x,S]=(0,n.useState)(null);(0,n.useEffect)((()=>{b.current&&(x?b.current.scrollToIndex(x):d&&b.current.scrollToIndex(d))}),[x,d]);const A=(0,n.useCallback)((async(e,t)=>{const i=await y(e,t);if(u&&!x){const e=i.items?.findIndex((e=>e.type===k.c.TRACK&&e?.uri===u));S(e||-1)}return i}),[y,u,x]),T=(0,o.w)(),O=(0,n.useCallback)((e=>({uri:e.type===k.c.TRACK?e.linkedUri??e.uri:""})),[]),P=(0,n.useCallback)(((e,t)=>{if("AlbumDisc"===e.type)return(0,h.jsx)(_,{discNumber:e.discNumber},`${t}-${e.discNumber}`);const i=e.linkedUri??e.uri,n=e.playcount?parseInt(e.playcount,10):0,r=!(C.current||!u||u!==e.uri&&u!==i);r&&(C.current=!0);const s=e.hasAssociatedVideo;return(0,h.jsxs)("div",{children:[u===e.uri&&(0,h.jsx)(N.c,{artistOrShow:e.artists.map((e=>e.name)).join(a.Ru.getSeparator()),title:e.name,uri:i,entityType:N.p.TRACK}),(0,h.jsx)(l.d,{index:t,trackNumber:e.trackNumber,contextUri:c,uri:i,uid:e.uid,duration_ms:e.duration.milliseconds,name:e.name,isPlayable:e.isPlayable,artists:e.artists,isExplicit:e.isExplicit,isMOGEFRestricted:e.is19PlusOnly,playcount:n,shouldHighLight:r,usePlayContextItem:m,isCompactMode:f,hasAssociatedVideo:s&&v})]},t+e.uri)}),[u,c,m,f,v]);return(0,h.jsx)(R.pZ,{value:"album-tracklist",children:(0,h.jsx)(E.S4,{ariaLabel:e,hasHeaderRow:p,rowPlaceholder:s.Bz,columns:T,renderRow:P,resolveItem:O,nrTracks:t,fetchTracks:A,limit:300,outerRef:b,tracks:g,isCompactMode:f,columnPersistenceKey:"album-tracklist"},c)})}))},23520:(e,t,i)=>{"use strict";i.d(t,{g:()=>Et});var n=i(30758),r=i(30171),a=i(33265),s=i(21968),o=i(11808),l=i(53129),c=i(64981),u=i(97500),d=i.n(u),m=i(43830),p=i(81987),h=i(38324),g=i(84492),f=i(16121),v=i(71137);var y=i(82097),b=i(15549),_=i(25763),E=i(79303),C=i(86070);const x=({spec:e})=>{const t=(0,E.s)();return(0,C.jsx)(_.S,{placeholder:o.Ru.get("web-player.aligned-curation.search-placeholder"),fullWidth:!0,alwaysExpanded:!0,onFilter:()=>{t.logInteraction(e.textFilterInputFieldFactory().keyStrokeFilter())},onClear:()=>{t.logInteraction(e.textFilterClearButtonFactory().hitClearFilter())},onActivate:()=>(t.logInteraction(e.textFilterInputFieldFactory().hitFocusInputField()),!0)})};var S=i(69898),A=i(8159),T=i(61544);var I=i(45518),N=i(75930),w=i(16047),R=i(66060),k=i(24284),O=i(78840),P=i(12783),L=i(26694),j=i(72592),D=i(93966),M=i(65313);const U="DquSH3YjnaIIXMZiOvwA",B="cnJ6YaknIWRMDw3dnmMW",F="XixSU8ZwGqTebpHgzKQ6",H="Sgz3pjuXbCc1XOotX1Pn",V="qISxXDflO0j7RZURLAdK",G="EzJYnyBsM_CeBFaheU9o",z="Ag3Wh5j_CDv9I3pyKUti",W="X5mwWAw7ijxPvQOoabzQ",K="_fXgQSvNv1uUeA96LmFb",Y="rGZ6_xipMRzzUqX45tXU",q="ovCS4AiOf70DjkuziQNg",Z="kU3__q1yYBoYAn9HeS68",$="LAdTOeZ2QwKXGF4XAXZ8",Q="GDbY_Uz53APNwtpujCCQ",J="iWcofSXjs9MuRfHzkuI9",X="jFkiGjErQ20kJyxKC0AR",ee="RHoNK4qVATbstzJZm5G8",te="_iJX4yzDZzSHy_g9vp3G",ie="v8g3JwlNkChF4Ph5BDA9",ne="XvgFwKtvocRdadc47KE9",re="aSq_W0q0xVhSsAVDHdip",ae="pEh4oZCtjjsplTeN2TAx",se=({onClick:e=(()=>{}),...t})=>{const i=(0,n.useRef)(null),{handleMouseEnter:r,handleMouseMove:a,handleMouseLeave:s,handleFocus:o}=(0,j.t)(i),l=(0,n.useCallback)((t=>{t.stopPropagation(),e(t)}),[e]),c=(0,n.useCallback)((e=>{e.stopPropagation()}),[]);return(0,C.jsx)(M.u,{children:(0,C.jsx)(D.H,{className:ne,onClick:l,onFocus:o,onMouseEnter:r,onMouseMove:a,onMouseLeave:s,onContextMenu:c,ref:i,as:"button",role:"menuitem",...t})})};var oe=i(19159),le=i(87128);const ce=()=>{const e=(0,le.x)().getCapabilities().canFilterOnCurationState,t=(0,p.NC)(oe.lFB);return e&&t};var ue=i(265),de=i(67464),me=i(89942),pe=i(38861),he=i(48604),ge=i(71817);const fe=({selected:e})=>e?(0,C.jsx)(N.k,{semanticColor:"textBrightAccent",size:"small"}):(0,C.jsx)("span",{className:z}),ve=n.memo((function({index:e,playlist:t,filter:i,isSelected:r,onSelect:a,...s}){const l=(0,he.m)(),c=t.type===ge.c.PLAYLIST&&t.isLoading,u=ce();(0,n.useEffect)((()=>{c&&l.resync(t.uri)}),[l,t.uri,c]);const d=(0,pe._)(),m=(0,n.useMemo)((()=>{if(t.type===ge.c.YOUR_EPISODES)return o.Ru.get("web-player.your-library-x.subtitle-your-episodes");const e=t.trackCount,i=t.episodeCount,n=t.bookCount;if(void 0===e&&void 0===i&&void 0===n)return o.Ru.get("tracklist-header.songs-counter",0);if(e&&i&&n)return o.Ru.get("tracklist-header.items-counter",e+i+n);return[e&&e>0?o.Ru.get("tracklist-header.songs-counter",e):void 0,i&&i>0?o.Ru.get("tracklist-header.episodes-counter",i):void 0,n&&n>0?o.Ru.get("tracklist-header.audiobooks-counter",n):void 0].filter((e=>e)).join(o.Ru.getSeparator())}),[t]);return(0,C.jsx)(se,{role:"menuitemcheckbox","aria-checked":r(t),onClick:i=>{i.preventDefault(),i.stopPropagation(),a(t,e)},onKeyDown:i=>{" "===i.key&&(i.preventDefault(),i.stopPropagation(),a(t,e))},...s,children:(0,C.jsx)(w.v,{id:t.uri,className:Z,title:(0,C.jsx)(R.d,{lineClamp:1,className:Q,dir:"auto",children:(0,C.jsx)(L.M,{searchWords:[i],textToHighlight:t.name})}),subtitle:u&&(0,C.jsxs)(k.j,{lineClamp:1,children:[t.fromFolder&&(0,C.jsx)(O.h,{className:ae,size:"xsmall",semanticColor:"textSubdued"}),(0,C.jsx)(P.E,{variant:"marginal",children:t.fromFolder?[t.fromFolder.name,m].join(" • "):m})]}),media:(0,C.jsx)(de.b,{fadeIn:!0,images:d("images"in t?t.images:[],32),shape:de.u.ROUNDED_CORNERS,size:me.Qe.SIZE_32,iconSize:"xsmall",type:t.type,title:t.name,className:$,color:t.color,loadingMode:"eager"}),trailing:(0,C.jsxs)("div",{className:J,children:[(0,C.jsx)(ue.g,{pinned:t.pinned,size:"small"}),(0,C.jsx)(fe,{selected:r(t)})]}),variant:"naked",size:"md",hoverAnimationDuration:"0ms"},t.uri)})}));var ye=i(62473),be=i(3956);const _e=(0,n.forwardRef)((function({children:e,setIsOpen:t,onTouchStart:i,onClick:r=(()=>{}),outerRef:a,...s},o){const{handleMouseEnter:l,handleMouseMove:c,handleMouseLeave:u,handleFocus:d}=(0,j.t)(a,t),m=(0,n.useCallback)((e=>{e.stopPropagation(),r(e)}),[r]),p=(0,n.useCallback)((e=>{e.stopPropagation()}),[]);return(0,C.jsx)(M.u,{children:(0,C.jsx)(D.H,{className:ne,onClick:m,onFocus:d,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onTouchStart:i,onContextMenu:p,ref:o,role:"menuitem",as:"button",...s,children:e})})})),Ee=({component:e,placement:t="right-start",children:i,onClick:r,...a})=>{const[s,o]=(0,n.useState)(!1),l=(0,n.useRef)(null),c=(0,n.useCallback)((()=>{o((e=>!e))}),[]),u=document.getElementById("curation-sheet-list");return(0,C.jsx)(be.Ay,{render:()=>s?i:null,interactive:!0,visible:s,arrow:!1,animation:!1,appendTo:u||void 0,placement:t,offset:[0,0],popperOptions:{modifiers:[{name:"preventOverflow",options:{boundary:document.body,altAxis:!0,padding:10}},{name:"flip",options:{boundary:document.body}}]},children:(0,C.jsx)(_e,{setIsOpen:o,onTouchStart:c,ref:l,outerRef:l,onClick:r,...a,children:e})})};var Ce=i(43396);const xe=function({folder:e,filter:t}){const i=ce(),r=(0,n.useMemo)((()=>{const t=e.folderCount,i=e.playlistCount;return t||i?i&&i>0&&!t?o.Ru.get("web-player.your-library-x.rows.folder.number-of-playlists",i):t&&t>0&&!i?o.Ru.get("web-player.your-library-x.rows.folder.number-of-folders",t):[o.Ru.get("web-player.your-library-x.rows.folder.number-of-folders",t),o.Ru.get("web-player.your-library-x.rows.folder.number-of-playlists",i)].join(" • "):null}),[e]);return(0,C.jsx)(w.v,{id:e.uri,className:Z,title:(0,C.jsx)(R.d,{lineClamp:1,className:Q,dir:"auto",children:(0,C.jsx)(L.M,{searchWords:[t],textToHighlight:e.name})}),subtitle:i&&(0,C.jsx)(k.j,{lineClamp:1,children:(0,C.jsx)(P.E,{variant:"marginal",children:r})}),media:(0,C.jsx)(de.b,{shape:de.u.ROUNDED_CORNERS,size:me.Qe.SIZE_32,iconSize:"small",type:e.type,title:e.name,loadingMode:"eager",className:$}),trailing:(0,C.jsxs)("div",{className:J,children:[(0,C.jsx)(ue.g,{pinned:e.pinned,size:"small"}),(0,C.jsx)(ye.V,{size:"small",className:re,semanticColor:"textSubdued"})]}),variant:"naked",size:"md",hoverAnimationDuration:"0ms"},e.uri)},Se=n.memo((function({folder:e,filter:t,id:i,children:n,...r}){const a=(0,Ce.W)();return(0,C.jsx)(Ee,{component:(0,C.jsx)(xe,{folder:e,filter:t}),placement:a?"left-start":"right-start","aria-controls":i,...r,children:n})}));var Ae=i(6643);const Te="_JrbaF1J_Oo1FG4il1HV",Ie="O0HhMc4yyMlmf_03MiPW",Ne=({uri:e,folderUri:t,changes:i,onSelect:r})=>{const a=(0,le.x)(),[s,o]=(0,n.useState)([]),l=(0,n.useCallback)((async()=>{const i=await a.getCurationContexts({curatedItemUri:e,folderUri:t,flatten:!0,curationStateFilter:Ae.F.ONLY_CURATED,offset:0,limit:50});o(i.items)}),[a,t,e]);(0,n.useEffect)((()=>{l()}),[l]);const c=(0,n.useCallback)((e=>i.has(e.uri)?!e.hasCuratedItems:e.hasCuratedItems),[i]);return(0,C.jsxs)("div",{className:Te,children:[s.length>0&&(0,C.jsx)("div",{className:Ie,children:(0,C.jsx)(P.E,{variant:"marginalBold",semanticColor:"textBase",children:"Saved in"})}),s.map(((e,t)=>e&&e.type!==ge.c.FOLDER?(0,C.jsx)(ve,{index:t,playlist:e,filter:"",isSelected:c,onSelect:r},`${e.uri}`):null))]})},we=({title:e,className:t})=>e?(0,C.jsx)("div",{className:d()(H,t),children:(0,C.jsx)(P.E,{variant:"marginalBold",className:G,children:e})}):null;var Re=i(9183),ke=i(6288),Oe=i(58591);const Pe=n.memo((function({hideCurationSheet:e,uri:t,folderUri:i,saveChanges:r,onCreate:a,...s}){const{createPlaylistFromTracks:l}=(0,Oe.A)(),c=(0,Re.Zp)(),u=(0,n.useCallback)((async()=>{const n=i?{after:{uri:i}}:{before:"start"};r();let s=null;try{s=await l([t],n);const i=(0,T.o_)(s);i&&c(i.toURLPath(!0)),e()}finally{a(s)}}),[l,i,e,c,a,r,t]);return(0,C.jsx)(se,{role:"menuitem",onClick:u,...s,children:(0,C.jsx)(w.v,{id:"new-playlist",title:o.Ru.get("web-player.aligned-curation.button.new-playlist"),media:(0,C.jsx)(ke.u,{size:"small"}),variant:"naked",size:"md",hoverAnimationDuration:"0ms"})})}));var Le=i(5122);const je=({height:e,...t})=>(0,C.jsx)(Le.c,{className:q,style:{height:e},...t});var De=i(61272),Me=i(88321);let Ue=function(e){return e.ADD="add",e.REMOVE="remove",e}({});var Be=i(50244),Fe=i(52002),He=i(90547),Ve=i(64844),Ge=i(52509),ze=i(62943);const We=n.memo((function e({title:t,folderUri:i,uri:r,changes:a,saveChanges:s,toggleChange:l,hideCurationSheet:c,depth:u=0,filter:m="",id:h,spec:g}){const f=(0,le.x)(),v=(0,E.s)(),y=(0,p.NC)(ze.rW),b=ce(),_=(0,n.useRef)(null),x=(0,n.useRef)(null),N=(0,Be.y)(_),w=(0,S.jE)(),R=0===u,k=(0,n.useMemo)((()=>g.curationContextListFactory({uri:i??""})),[i,g]),O=R?18e5:3e5,{hasItems:P,getItems:L,nrValidItems:j,getPageQueriesData:D,invalidateCache:M}=function({id:e,params:t,fetch:i,limit:r,getPageQueryOptions:a}){const s=(0,De.lB)((()=>t),[t]),o=(0,De.lB)((()=>["react-query-items-cache",e,s]),[e,r,s]),l=(0,n.useCallback)(((e,t)=>[...o,{offset:e,limit:t}]),[o]),c=(0,S.jE)(),u=(0,n.useCallback)((async(e,t)=>{const n=a?.(s,e,t),r=n?.gcTime,o=n?.staleTime;return void 0!==n||void 0!==o||void 0!==r?c.fetchQuery({...n,queryKey:l(e,t),queryFn:()=>i(s,e,t),staleTime:o,gcTime:r}):i(s,e,t)}),[i,a,l,s,c]),{invalidateCache:d,...m}=(0,Me.E)({nrItems:r,fetch:u,limit:r});return{...m,invalidateCache:(0,n.useCallback)((()=>{c.invalidateQueries({queryKey:o}),d()}),[d,c,o]),getPageQueriesData:(0,n.useCallback)((e=>c.getQueriesData({...e,queryKey:o,predicate:t=>{const i=t.queryKey,n=i?.[2],r=i?.[3];return e?.predicate?.(n,r)??!0}})),[o,c])}}({id:"curation-list",params:{curatedItemUri:r,folderUri:i,textFilter:m,curationStateFilter:b?Ae.F.ONLY_UNCURATED:Ae.F.NONE},fetch:(0,n.useCallback)(((e,t,i)=>f.getCurationContexts({...e,offset:t,limit:i})),[f]),limit:50,getPageQueryOptions:(0,n.useCallback)(((e,t,i)=>0===t?{staleTime:0,cacheTime:O}:void 0),[O])});(0,Ge.L)((0,A.YQ)(M,200,{leading:!0,trailing:!0,maxWait:1e3}));const F=P&&!m?j:D({predicate:e=>e.folderUri===i&&!e.textFilter}).sort((([e],[t])=>(w.getQueryState(t)?.dataUpdatedAt??0)-(w.getQueryState(e)?.dataUpdatedAt??0))).at(0)?.[1]?.totalLength;let H;P?H=j+1:void 0!==F&&(H=F+1);const G=(0,n.useCallback)((e=>a.has(e.uri)?!e.hasCuratedItems:!!e.hasCuratedItems),[a]),z=(0,n.useCallback)(((e,t)=>{const i=k.curationContextItemFactory({uri:e.uri,position:t});l(e.uri,{type:e.hasCuratedItems?Ue.REMOVE:Ue.ADD,name:e.name,image:"images"in e&&e.images.at(0)?.url||""}),v.logInteraction(G(e)?i.hitDeselectEntityInList({entityToBeDeselected:e.uri}):i.hitSelectEntityInList({entityToBeSelected:e.uri}))}),[G,k,v,l]),W=(0,n.useCallback)((e=>{v.logInteraction(k.createPlaylistButtonFactory({uri:e??""}).hitCreatePlaylist())}),[k,v]),q=(0,n.useCallback)(((e,t,i,n)=>(0,C.jsx)(je,{height:e,"aria-posinset":n,"aria-setsize":i},t)),[]),Z=(0,n.useCallback)(((t,i)=>L(t,i).map(((i,n)=>{const o=t+n,d=o+2;if(!i)return q("56px",o,H,d);const p=`curation-folder-submenu-${(0,T.o_)(i.uri)?.id}`;return i.type===ge.c.FOLDER?(0,C.jsx)(Se,{folder:i,filter:m,id:p,"aria-setsize":H,"aria-posinset":d,children:(0,C.jsx)(e,{title:i.name,folderUri:i.uri,uri:r,toggleChange:l,changes:a,saveChanges:s,hideCurationSheet:c,depth:u+1,id:p,spec:g})},`${i.uri}`):(0,C.jsx)(ve,{index:o,playlist:i,filter:m,isSelected:G,onSelect:z,"aria-setsize":H,"aria-posinset":d},`${i.uri}`)}))),[L,q,H,r,l,a,s,c,u,m,g,G,z]);(0,n.useLayoutEffect)((()=>{R||void 0===F||function(e){const t=e?.closest("[data-tippy-root]");if(t&&"_tippy"in t){const e=t._tippy;e?.popperInstance?.forceUpdate()}}(x.current)}),[R,F]);const $=R?Fe.e:He.Q;return(0,C.jsxs)($,{"aria-label":o.Ru.get("web-player.aligned-curation.add-to-playlist-menu"),depth:u,className:d()(X,{"circular-sp-vietnamese":y,[U]:!R,[B]:!R}),id:h,ref:R?null:x,children:[(0,C.jsx)(we,{title:t,className:V}),(0,C.jsx)(Pe,{hideCurationSheet:c,uri:r,folderUri:i,saveChanges:s,onCreate:W,className:d()(ne,ee,{[ie]:N,[te]:0!==F}),"aria-setsize":H,"aria-posinset":1}),(0,C.jsx)(I.a,{onInstanceCreated:e=>{_.current=e.elements().viewport},className:K,style:{height:56*(F??(R?7:1))+"px"},children:(0,C.jsxs)("div",{className:Y,children:[b&&(0,C.jsx)(Ne,{uri:r,folderUri:i,changes:a,onSelect:z}),(0,C.jsx)(Ve.L,{renderRows:Z,nrRows:j,rowHeight:56,scrollNodeRef:_,renderPlaceholder:q})]})})]})}));var Ke=i(73015);function Ye(){const{enqueueSnackbar:e}=(0,Ke.d)();return(0,n.useCallback)((()=>{e("Something went wrong")}),[e])}var qe=i(70070),Ze=i(3554);var $e=i(77339),Qe=i(70583),Je=i(75621),Xe=i(48905),et=i(72091);const tt=({uri:e,onChangesSaved:t,onHasChanges:i,onHide:a})=>{const{changes:s,toggleChange:l,saveChanges:c}=((e,t)=>{const i=(0,le.x)(),r=(0,he.m)(),a=(0,qe.W)(),s=Ye(),[l,c]=(0,n.useState)(new Map),u=(0,n.useCallback)(((e,t)=>{c((i=>{const n=new Map(i);return n.has(e)?n.delete(e):n.set(e,t),n}))}),[c]),d=(0,n.useCallback)((async(e,t)=>{let i=o.Ru.get("web-player.aligned-curation.feedback.changes-saved"),n=!1;if(1===e.length&&0===t.length){const t=l.get(e[0]);if(i=o.Ru.get("web-player.aligned-curation.feedback.added",t?.name),n=t?.image,!n&&(0,T.nu)(e[0])){const t=await Promise.race([r.getMetadata(e[0]).then((({images:e})=>e)),new Promise((e=>setTimeout((()=>e([])),1e3)))]);n=(0,Ze.g)(t,{desiredSize:24})?.url}}else if(0===e.length&&1===t.length){const e=l.get(t[0]);i=o.Ru.get("web-player.aligned-curation.feedback.removed",e?.name),n=e?.image}a({message:i,imageSrc:n})}),[l,a,r]),m=(0,n.useCallback)((async()=>{if(0===l.size)return;const n=[],r=[];for(const[e,t]of l)t.type===Ue.ADD?n.push(e):t.type===Ue.REMOVE&&r.push(e);try{const a=await(i?.curateItems(e,n,r));d(n,r),t?.(a,e,l)}catch{s()}}),[l,i,e,d,t,s]);return{changes:l,toggleChange:u,saveChanges:m}})(e,t),u=(0,p.NC)(ze.rW),{setFilter:f,filter:y}=(0,n.useContext)(b.g);(0,n.useEffect)((()=>()=>f("")),[f]),(0,n.useEffect)((()=>{i?.(s.size>0)}),[s,i]);const{spec:_,logger:E}=(0,et.r)(h.c,{data:{uri:e}}),S=(0,Xe.t)(_),A=(0,n.useMemo)((()=>_.filterContainerFactory()),[_]),I=(0,n.useMemo)((()=>_.doneButtonFactory()),[_]),N=(0,n.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),s.size&&(c(),a(),E.logInteraction(I.hitUiHide()),Array.from(s).forEach((([t,i])=>{const n=t===Qe.BP||t===Qe.Xn,r=i.type===Ue.ADD;let a;a=n?r?I.hitLike({itemToBeLiked:e}):I.hitRemoveLike({itemNoLongerLiked:e}):r?I.hitAddToPlaylist({playlist:t,itemToBeAdded:e}):I.hitRemoveItemFromPlaylist({playlist:t,itemToBeRemovedFromPlaylist:e}),E.logInteraction(a)})))}),[s,I,E,a,c,e]);return(0,C.jsx)($e.s,{focusTrapOptions:{allowOutsideClick:!0},children:(0,C.jsxs)("form",{className:d()({"circular-sp-vietnamese":u},U),style:{"--placeholder-image":`url(${(0,g.b)("images/ac-row-placeholder.png")})`},onClick:e=>{e.stopPropagation()},onSubmit:N,onKeyDownCapture:e=>{"Enter"===e.key&&e.metaKey&&N(e)},ref:S,children:[(0,C.jsx)(we,{title:o.Ru.get("web-player.aligned-curation.title")}),(0,C.jsx)("div",{className:F,children:(0,C.jsx)(x,{spec:A})}),(0,C.jsx)(v.R,{children:(0,C.jsx)(We,{uri:e,toggleChange:l,changes:s,saveChanges:c,hideCurationSheet:a,depth:0,filter:y,id:"curation-sheet-list",spec:_})}),(0,C.jsxs)("div",{className:W,children:[(0,C.jsx)(r.H,{type:"button",semanticColor:"textSubdued",size:"small",onClick:()=>{a(),E.logInteraction(_.cancelButtonFactory().hitUiHide())},condensed:!0,children:o.Ru.get("web-player.aligned-curation.button.cancel")}),0===s.size?null:(0,C.jsx)(m.$,{type:"submit",colorSet:"invertedLight",size:"small",children:o.Ru.get("web-player.aligned-curation.button.done")})]})]})})},it=n.memo((function({...e}){return(0,C.jsx)(y.s,{onError:e=>{(0,Je.Jy)(e,"CurationSheet")},children:(0,C.jsx)(b.s,{uri:"spotify:internal:aligned-curation",children:(0,C.jsx)(tt,{...e})})})})),nt=e=>{const t=(0,f.Oj)();return(()=>{const e=(0,f.Oj)();(0,n.useEffect)((()=>{const t=t=>{"Escape"===t.key&&e({type:"close"})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[e])})(),(0,C.jsx)(it,{...e,onHide:()=>t({type:"close"})})},rt=({uri:e,placement:t,onChangesSaved:i,onShow:r,children:a})=>{const s=(0,n.useRef)(!1),o=(0,n.useCallback)((e=>{s.current=e}),[]),l=(0,n.useCallback)((e=>{s.current||e()}),[]);return(0,C.jsx)(c.t,{menu:(0,C.jsx)(nt,{uri:e,onChangesSaved:i,onHasChanges:o}),onClickOutside:l,onShow:r,snapshotReferenceElementPositionWhileOpen:!0,autoUpdate:!1,placement:t,children:a})};var at=i(22911),st=i(19316),ot=i(69314),lt=i(36011),ct=i(95273),ut=i(73879),dt=i(93240),mt=i(41781);function pt(){const e=(0,mt.h)();return{closeSnackbar:(0,n.useCallback)((t=>{t instanceof RegExp?e.current.forEach((e=>{t.test(`${e}`)&&(0,dt.mk)(e)})):(0,dt.mk)(t)}),[e]),closeSnackbarWithKeyPrefix:(0,n.useCallback)((t=>{e.current.forEach((e=>{`${e}`.startsWith(t)&&(0,dt.mk)(e)}))}),[e])}}var ht=i(71359);var gt=i(14874),ft=i(55030),vt=i(9285),yt=i(12811),bt=i(22552),_t=i(36406);const Et=(0,n.memo)((function({uri:e,size:t="small",className:i,condensed:c=!0,labelPlacement:u,menuPlacement:d}){const m=(0,vt.i)(e),p=(0,n.useRef)(m);p.current=m;const h=(0,n.useRef)(null),g=(0,n.useCallback)((()=>{h.current=m}),[m]),{isCurated:f,curateDefault:v,defaultCurationContextUri:y}=function(e,t=!1){const i=(0,le.x)(),r=(0,n.useCallback)((()=>i.isCuratedSync(e)||t),[t,i,e]),[a,s]=(0,n.useState)(r),o=(0,n.useCallback)((()=>i.curateDefault(e)),[i,e]);return(0,n.useEffect)((()=>{s(r)}),[r]),(0,n.useEffect)((()=>i.getEvents().addListener(_t.oq.UPDATE_CURATED_ITEM,(t=>{t.data.uri===e&&s(t.data.isCurated)}),{uri:e})),[i,e]),{isCurated:a,curateDefault:o,defaultCurationContextUri:i.getDefaultCurationContextUri(e)}}(m),b=function(){const{enqueueCustomSnackbar:e}=(0,ht.i)(),{closeSnackbarWithKeyPrefix:t}=pt();return(0,n.useCallback)(Spicetify.Snackbar.enqueueImageSnackbar=(({onChangeCurationClick:i,message:n,imageSrc:r})=>(t("default-curation"),e((0,C.jsx)(at.O,{children:(0,C.jsx)(ct.P,{leading:(0,C.jsx)(ot.w,{src:r,type:ge.c.PLAYLIST,title:n}),center:(0,C.jsx)(lt.z,{children:n}),trailing:(0,C.jsx)(st.M,{ctaText:o.Ru.get("web-player.aligned-curation.feedback.change-button"),onCtaClick:i})})}),{autoHideDuration:ut.r,keyPrefix:"default-curation"}))),[t,e])}(),{closeSnackbarWithKeyPrefix:_}=pt(),E=Ye(),{setState:x,Icon:S}=(0,bt.Q)(f?gt.t.CURATED:gt.t.UNCURATED,gt.A),{spec:A,logger:T}=(0,et.r)(a.S,{}),I=(0,ft.d$)(e),{spec:N,logger:w}=(0,et.r)(s.e,{data:{uri:e}});(0,n.useEffect)((()=>{I&&w.logImpression(N.impression())}),[I,w,N]);const R=(0,n.useCallback)((async(t,i)=>{t.preventDefault();const n=function(e){if(e===Qe.BP)return(0,yt.zK)();if(Qe.Xn)return(0,yt.dB)();return null}(y);x(gt.t.CURATED);const r=y===Qe.BP||y===Qe.Xn;T.logInteraction(r?A.hitLike({itemToBeLiked:e}):A.hitAddToPlaylist({playlist:y,itemToBeAdded:e})),!r&&I&&w.logInteraction(N.hitAddToPlaylist({itemToBeAdded:e,playlist:Qe.BP}));try{await v();const t=n?.name?o.Ru.get("web-player.aligned-curation.feedback.added",n?.name):o.Ru.get("web-player.aligned-curation.feedback.added-to-library");b({onChangeCurationClick:t=>{i?.(t),T.logInteraction(A.defaultCurationSnackbarFactory().changeCurationContextButtonFactory({uri:e}).hitUiReveal())},message:t,imageSrc:(0,Ze.g)(n?.images,{desiredSize:24})?.url})}catch{E()}}),[y,x,T,A,e,v,b,E,I,w,N]),k=(0,n.useCallback)(((e,t)=>{t===p.current&&!1===e&&x(gt.t.UNCURATED)}),[x]),O=function(e,t){if(e)return o.Ru.get("web-player.aligned-curation.tooltips.add-to-playlist");if(t===Qe.BP)return o.Ru.get("web-player.aligned-curation.tooltips.add-to-liked-songs");if(t===Qe.Xn)return o.Ru.get("web-player.aligned-curation.tooltips.add-to-your-episodes");return o.Ru.get("web-player.aligned-curation.tooltips.add-to-your-library")}(f,y);return(0,C.jsx)(rt,{uri:m,placement:d,onChangesSaved:k,onShow:g,children:(e,n,a)=>(0,C.jsx)(l.Zp,{label:O,placement:u,children:(0,C.jsx)(r.H,{size:t,className:i,"aria-checked":f,"aria-label":O,condensed:c,iconOnly:S,semanticColor:f?"textBrightAccent":void 0,ref:a,onClick:t=>{e&&h.current&&h.current!==m&&(h.current=m,n(t)),f?(n(t),T.logInteraction(A.hitUiReveal()),_("default-curation")):R(t,n)}})})})}))},12274:(e,t,i)=>{"use strict";i.d(t,{d:()=>h});var n=i(97500),r=i.n(n),a=i(30758),s=i(68244),o=i(74322),l=i(79303),c=i(76748),u=i(86070);const d=({uri:e,type:t,spec:i})=>{const n=(0,l.s)(),r=(0,a.useCallback)((t=>{if(!i)return;const r=t?i.heartButtonFactory().hitLike({itemToBeLiked:e}):i.heartButtonFactory().hitRemoveLike({itemNoLongerLiked:e});n.logInteraction(r)}),[i,n,e]);return"episode"===t?(0,u.jsx)(s.b,{uri:e,className:c.A.rowHeartButton,onClick:r,condensed:!0}):(0,u.jsx)(o.b,{uri:e,className:c.A.rowHeartButton,onClick:r})};var m=i(23520),p=i(27281);const h=({uri:e,spec:t,type:i,isOwnedBySelf:n})=>(0,p.v)(e)?(0,u.jsx)(m.g,{uri:e,className:r()(c.A.curationButton,{[c.A.ownedBySelf]:n})}):(0,u.jsx)(d,{uri:e,type:i,spec:t})},70070:(e,t,i)=>{"use strict";i.d(t,{W:()=>d});var n=i(30758),r=i(22911),a=i(69314),s=i(36011),o=i(95273),l=i(71359),c=i(71817),u=i(86070);function d(){const{enqueueCustomSnackbar:e}=(0,l.i)();Spicetify.Snackbar.enqueueCustomSnackbar=e;return(0,n.useCallback)(Spicetify.Snackbar.enqueueImageSnackbar=(({message:t,imageSrc:i})=>{e((0,u.jsx)(r.O,{children:(0,u.jsx)(o.P,{leading:!1===i?void 0:(0,u.jsx)(a.w,{src:i,type:c.c.PLAYLIST,title:t}),center:(0,u.jsx)(s.z,{children:t})})}),{identifier:t})}),[e])}},51340:(e,t,i)=>{"use strict";i.d(t,{y:()=>z});var n=i(30758),r=i(43178),a=i(12783),s=i(58093),o=i(11808),l=i(85072),c=i(97500),u=i.n(c),d=i(89732),m=i(62473),p=i(57276),h=i(31252);const g="od_kF1rLZbir8kM_F607",f="qyKJPLjz8o4jnbk92JOn",v="zsVdTdACMZA_MWB3HlEW",y="nsakAYOtgZOAcEO4ObrM",b="uJjmxe0T11dUVeW6Biz8",_="F1K3uW1jqwG0wxFHO5gl",E="Ii9XdJaXIuKbmR1zC4Rt";var C=i(86070);const x=n.memo((function(e){const{images:t,initialSelected:i=0}=e,[r,a]=(0,n.useState)(i),[s,l]=(0,n.useState)(0),c=(0,n.useRef)(null);return(0,n.useEffect)((()=>{const e=c.current;e&&l(e.clientWidth)}),[]),(0,h.s)((()=>{const e=c.current;e&&l(e.clientWidth)})),0===t.length?null:(0,C.jsxs)("div",{className:g,children:[t.length>1&&(0,C.jsxs)(C.Fragment,{children:[0!==r&&(0,C.jsx)("button",{type:"button","aria-label":o.Ru.get("gallery.prev"),onClick:()=>a(r-1),className:u()(f,v),children:(0,C.jsx)(d.g,{})}),r!==t.length-1&&(0,C.jsx)("button",{type:"button","aria-label":o.Ru.get("gallery.next"),onClick:()=>a(r+1),className:u()(f,y),children:(0,C.jsx)(m.V,{})})]}),(0,C.jsx)("ul",{className:b,ref:c,dir:"auto",children:t.map(((e,t)=>(0,C.jsx)("li",{"aria-hidden":r!==t,className:_,style:{transform:`translateX(-${r*s}px)`},children:(0,C.jsx)(p._,{loading:"lazy",src:e.url,width:e.width,height:e.height,className:E})},t)))})]})}));var S=i(67889),A=i(59996),T=i(45518),I=i(6900),N=i(81742),w=i(69590),R=i(83600),k=i(24172),O=i(79787);const P="DVWIV41y6daOMjQKR8Zj",L="oORVTPvg6eTQflVKKgw8",j="muHL0_3HjlqTZDoapgc9";function D(e){switch(e){case O.EK.Facebook:return(0,C.jsx)(I.G,{className:L});case O.EK.Twitter:return(0,C.jsx)(N.f,{className:L});case O.EK.Instagram:return(0,C.jsx)(w.Y,{className:L});case O.EK.Wikipedia:return(0,C.jsx)(k.p,{className:L});case O.EK.Soundbetter:return(0,C.jsx)(R.S,{className:L});case O.EK.Other:default:return null}}function M(e){if(e.name===O.EK.Soundbetter){const t=new URL(e.url);return t.searchParams.append("utm_source","open.spotify.com"),t.searchParams.append("utm_medium","referral"),t.searchParams.append("utm_campaign","hireme_link_spotify"),t.href}return e.url}function U(e){switch(e){case O.EK.Facebook:return"Facebook";case O.EK.Twitter:return"Twitter";case O.EK.Instagram:return"Instagram";case O.EK.Wikipedia:return"Wikipedia";case O.EK.Soundbetter:return"Hire Me on SoundBetter";case O.EK.Other:default:return"Other"}}const B=({links:e})=>0===e.length?null:(0,C.jsx)("div",{className:P,children:e.map((e=>(0,C.jsxs)("a",{rel:"noopener noreferrer",target:"_blank",href:M(e),className:j,children:[D(e.name),(0,C.jsx)(a.E,{variant:"bodySmall",children:U(e.name)})]},e.url)))});var F=i(29159),H=i(48905),V=i(72091),G=i(82864);const z=n.memo((function(e){const{artistUri:t,name:i,bio:c="",bioSource:u=null,images:d=[],avatarImages:m=[],worldRank:p,monthlyListeners:h,topCities:g,followers:f,externalLinks:v=[],isOpen:y,closeModal:b}=e,{spec:_}=(0,V.r)(s._,{data:{identifier:"",uri:t}}),E=(0,n.useCallback)((()=>{_.closeButtonFactory().hitUiHide(),b()}),[b,_]),I=(0,H.t)(_);return(0,C.jsxs)(S.A,{contentLabel:i,className:G.A.modal,isOpen:y,onRequestClose:E,animation:{modal:{base:G.A.modalBase,afterOpen:G.A.modalAfterOpen,beforeClose:G.A.modalBeforeClose}},animated:!0,children:[(0,C.jsx)("button",{type:"button","aria-label":o.Ru.get("close"),onClick:E,className:G.A.close,children:(0,C.jsx)(r.M,{size:"small"})}),(0,C.jsxs)(T.a,{className:G.A.scrollbars,children:[(0,C.jsx)(x,{images:d}),(0,C.jsx)("div",{className:G.A.content,ref:I,children:(0,C.jsxs)("div",{className:G.A.columnContainer,children:[(0,C.jsxs)("div",{className:G.A.statsContainer,children:[p>0?(0,C.jsxs)("div",{className:G.A.rank,children:[(0,C.jsxs)(a.E,{as:"div",variant:"titleSmall",children:["#",p]}),(0,C.jsx)(a.E,{as:"div",variant:"marginal",children:o.Ru.get("artist-page.world_rank")})]}):null,"number"==typeof f?(0,C.jsxs)("div",{className:G.A.stats,children:[(0,C.jsx)(a.E,{as:"div",variant:"titleMedium",semanticColor:"textBase",children:o.Ru.formatNumber(f)}),(0,C.jsx)(a.E,{as:"div",variant:"bodySmall",children:o.Ru.get("followers")})]}):null,"number"==typeof h?(0,C.jsxs)("div",{className:G.A.stats,children:[(0,C.jsx)(a.E,{as:"div",variant:"titleMedium",semanticColor:"textBase",children:o.Ru.formatNumber(h)}),(0,C.jsx)(a.E,{as:"div",variant:"bodySmall",children:o.Ru.get("monthly_listeners")})]}):null,g&&g.length?g.map((({city:e,numberOfListeners:t,country:i},n)=>(0,C.jsxs)("div",{className:G.A.cityBlock,children:[(0,C.jsx)(a.E,{as:"div",variant:"bodySmallBold",semanticColor:"textBase",children:o.Ru.get("artist-page.where-people-listen-from",e||"",i||"")}),(0,C.jsx)(a.E,{as:"div",variant:"bodySmall",children:o.Ru.get("artist-page.how-many-listeners",t||0)})]},n))):null,(0,C.jsx)(n.Suspense,{fallback:null,children:(0,C.jsx)(B,{links:v})})]}),(0,C.jsx)("div",{className:G.A.bioContainer,children:c?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(a.E,{as:"div",variant:"bodyMedium",className:G.A.bio,dir:"auto",children:(0,C.jsx)(F.y,{source:c,LinkComponent:A.N,onLinkClick:E})}),u===O.B3.Autobiography&&(0,C.jsxs)("div",{className:G.A.postedBy,children:[(0,C.jsx)(l.e,{images:m,label:i,width:32,userIconSize:"small",className:G.A.postedByAvatar}),(0,C.jsx)(a.E,{as:"div",variant:"bodySmall",children:o.Ru.get("acq.artist.about.attribution",{artist:i})})]})]}):null})]})})]})]})}))},40536:(e,t,i)=>{"use strict";i.d(t,{C:()=>a,U:()=>r});var n=i(30758);const r=(0,n.createContext)(null);function a(){const e=(0,n.useContext)(r);if(null===e)throw new Error("useBuddyFeedContext() must be used within a BuddyFeedContext.Provider");return e}},66575:(e,t,i)=>{"use strict";i.d(t,{C:()=>a,U:()=>r});var n=i(30758);const r=(0,n.createContext)(null);function a(){const e=(0,n.useContext)(r);if(null===e)throw new Error("useBuddyFeedContext() must be used within a BuddyFeedContext.Provider");return e}},25391:(e,t,i)=>{"use strict";i.d(t,{A:()=>Ce});var n=i(30758),r=i(41978),a=i(49217),s=i(33973),o=i(43178),l=i(43830),c=i(81987),u=i(11808),d=i(8159),m=i(62412),p=i(12783),h=i(40312),g=i(32045),f=i(79303);const v="LUZuAtOgmXbneOoxnP8P",y="dIOLAcD26GH01pNjZHBL",b="r4ZTDlEunjDS3sz3L2zK",_="Tro85cCjPA7ZHyzR1zAE",E="ha09EFavr4tw3Rcf14Wt",C="e7m85731K8PcdAPpY0_T",x="IFRpxU2fT2MFYfqhTXIg",S="ihYHUpb9FuqRKkywvHIQ",A="q9rlL6VTsRm59YxuIceC";var T=i(86070);const I="ArrowUp",N="ArrowDown",w="Escape",R=[w,N,I,"Tab"],k=e=>{const{placeholder:t,onSelectLocation:i,onCancel:r,spec:a}=e,s=(0,n.useRef)(null),l=(0,n.useRef)(null),c=(0,n.useRef)(null),v=(0,n.useRef)(-1),[y,k]=(0,n.useState)(""),[O]=(0,d.d7)(y,300),P=O.trim(),[L,j]=(0,n.useState)(),[D,M]=(0,n.useState)(!1),U=(0,f.s)(),B=(0,n.useMemo)((()=>a?.changeLocationFormFactory()),[a]),F=(0,n.useMemo)((()=>a?.locationsResponseFactory()),[a]),H=(0,n.useMemo)((()=>B?.changeLocationInputFactory()),[B]),V=(0,n.useMemo)((()=>B?.changeLocationClearFactory()),[B]);(0,n.useEffect)((()=>{if(M(!1),P.length<=1)return void j(void 0);let e=!0;return(0,g.kr)(h.n.getInstance(),P).then((t=>{e&&j(t.body.results)}),(()=>{e&&(j(void 0),M(!0))})),()=>{e=!1}}),[H,U,P]),(0,n.useEffect)((()=>{const e=e=>{s.current?.contains(e.target)||r()};return document?.addEventListener("click",e,!0),()=>{document?.removeEventListener("click",e,!0)}}),[r]);return(0,T.jsxs)("div",{ref:s,className:b,"data-interaction-context":"location-selector",onKeyDown:e=>{const t=e.key;if(!R.includes(t))return;e.preventDefault();const i=L?.length??0;let n=v.current;switch(t){case w:return void r();case I:n=Math.max(v.current-1,-1);break;case N:case"Tab":n=Math.min(v.current+1,i-1);break;default:return}if(n<0)l.current?.focus();else{const e=c.current?.childNodes[n]?.firstChild;e instanceof HTMLButtonElement&&e.focus()}v.current=n},children:[(0,T.jsxs)("div",{className:_,children:[(0,T.jsx)(m.C,{size:"small"}),(0,T.jsx)("input",{className:E,type:"search",id:"change-location-input",placeholder:t,value:y,onChange:e=>{const t=e.target.value;k(t),v.current=-1,H&&(t.trim().length<1&&U.logInteraction(H.keyStrokeUiHide()),U.logInteraction(H.keyStrokeTextEdit({fieldToBeChanged:"loction"})))},ref:l,"aria-label":t,autoFocus:!0}),y.length>0&&(0,T.jsx)("button",{className:C,"aria-label":u.Ru.get("search.a11y.clear-input"),onClick:()=>{k(""),V&&U.logInteraction(V.hitTextClear())},children:(0,T.jsx)(o.M,{size:"small"})})]}),D&&(0,T.jsx)(p.E,{as:"p",variant:"bodyMedium",className:x,children:u.Ru.get("concert.error.general_error_title")}),0===L?.length&&(0,T.jsx)(p.E,{as:"p",variant:"bodyMedium",className:x,children:u.Ru.get("concert.error.no_locations_found_subtitle")}),(0,T.jsx)("ol",{className:S,ref:c,children:L?.map(((e,t)=>(0,T.jsx)("li",{children:(0,T.jsx)("button",{className:A,tabIndex:t+1,onClick:()=>((e,t)=>{if(i(e),!F)return;const n=F.locationResultFactory({identifier:e.location||e.geonameId?.toString(10)||"",position:t}).hitUiHide();U.logInteraction(n)})(e,t),children:(0,T.jsx)(p.E,{variant:"bodyMedium",children:e.location})})},e.geonameId)))})]})};var O=i(30171),P=i(62473),L=i(89732),j=i(58406),D=i(13094),M=i(67889);const U=["Escape","ArrowDown","ArrowUp","Tab"],B=e=>U.includes(e);var F=i(15742),H=i(8385);const V=Spicetify.GraphQL.Definitions["searchConcertLocations"]=new F.l("searchConcertLocations","query","afde8f028ae24689fd30b335fb73ec3a33e39a5aa2551608064b5cd0d9e6f7b4",null);var G=i(43396),z=i(75235);const W="pdkMNbSQl8Yi5tl0iOF9",K="lbKmnVjXCdZ3kRBxjKQZ",Y="VAJ54U4IyPKmKRWXweMn",q="r3oh3bOf2I7DZQEND5Uz",Z="XwomR4z9c60ph1tYBcdm",$="bQATTxDxEbS7xXRsr_Mt",Q="wFdZQwoko8rVRTLeFG5G",J="jcDbJiJUoAVWZ7h1Rhhy",X="UkSUgC7NQnYbptBJEAM9",ee="xfncDja0wZotJaVS3aq9",te="gJedMi0s8_RQ4d2aWYzI",ie=({onCancel:e,onChange:t,onBack:i,title:r,children:a})=>{const[s,l]=(0,z.x)("recent-locations",[]),[c,d]=(0,n.useState)(""),h=(0,G.W)(),g=(0,n.useRef)(null),f=(0,n.useRef)(null),v=(0,n.useRef)(-1),{data:y}=(b={query:c},(0,H.I)(V,b,_));var b,_;const E=(e=>"items"in(e?.concertLocations??{}))(y)?y.concertLocations.items:[];return(0,T.jsx)("div",{onKeyDown:e=>{const t=e.key;if(!B(t))return;e.preventDefault();const i=((e,t,i)=>{switch(i){case"ArrowDown":case"Tab":return Math.min(e+1,t);case"ArrowUp":return Math.max(e-1,-1);default:return e}})(v?.current??-1,E.length,t),n=g.current?.childNodes[i]?.firstChild;i>=0&&n instanceof HTMLButtonElement&&n.focus(),-1===i&&f.current?.focus(),v.current=i},"data-interaction-context":"location-selector",children:(0,T.jsx)(M.A,{isOpen:!0,onRequestClose:e,children:(0,T.jsxs)("section",{className:W,children:[i&&(0,T.jsx)("div",{className:q,children:(0,T.jsx)(O.H,{iconOnly:h?P.V:L.g,size:"small",onClick:i,"aria-label":u.Ru.get("navbar.go-back")})}),(0,T.jsx)("div",{className:Y,children:(0,T.jsx)(O.H,{iconOnly:o.M,size:"small",onClick:e,"aria-label":u.Ru.get("close")})}),(0,T.jsxs)("div",{className:K,children:[(0,T.jsxs)("div",{className:Z,children:[(0,T.jsx)(p.E,{as:"h3",variant:"bodyMediumBold",children:r??u.Ru.get("concert.location.search.header")}),(0,T.jsx)(j.E,{iconLeading:(0,T.jsx)(m.C,{}),children:(0,T.jsx)(D.Z,{placeholder:u.Ru.get("concert.location.search.placeholder"),onChange:e=>d(e.currentTarget.value),value:c,ref:f,autoFocus:!0})})]}),!c&&(0,T.jsx)(T.Fragment,{children:a}),c&&y?.concertLocations&&0===E.length&&(0,T.jsx)(p.E,{as:"p",variant:"bodyMedium",children:u.Ru.get("concert.error.no_locations_found_subtitle")}),c&&(0,T.jsx)("ol",{className:$,ref:g,children:E.map(((e,i)=>(0,T.jsx)("li",{children:(0,T.jsx)("button",{tabIndex:i+1,className:ee,onClick:()=>{const i={geonameId:Number(e.geonameId),name:e.name,country:e.country,geohash:e.geoHash};s.find((e=>e.geonameId===i.geonameId))||l([...s,i]),t(i)},children:[e.name,e.country].join(u.Ru.getSeparator())})},e.geonameId)))}),!!s?.length&&!c&&(0,T.jsxs)("div",{className:Q,children:[(0,T.jsx)("div",{className:J,children:(0,T.jsx)(p.E,{as:"h3",variant:"bodyMediumBold",children:u.Ru.get("concert.location.search.recent")})}),(0,T.jsx)("ol",{children:s.map(((e,i)=>(0,T.jsxs)("li",{className:X,children:[(0,T.jsx)("button",{tabIndex:i+1,className:ee,onClick:()=>t({geonameId:Number(e.geonameId),name:e.name,country:e.country,geohash:e.geohash}),children:(0,T.jsx)("div",{className:te,children:[e.name,e.country].join(u.Ru.getSeparator())})}),(0,T.jsx)(O.H,{"aria-label":u.Ru.get("remove"),iconOnly:o.M,size:"small",onClick:t=>{t.stopPropagation(),l(s.filter((t=>t.geonameId!==e.geonameId)))}})]},e.geonameId)))})]})]})]})})})};var ne=i(31322);const re=Spicetify.GraphQL.Definitions["saveLocation"]=new F.l("saveLocation","mutation","5502351e9f201ae29014ca55d3b24b755ba261a1a9eb35fb498cb4c7df419353",null);var ae=i(39733);const se="WZzy7tMC5xlIMwoZ32JU",oe="LkdC_QJiLoD0OTOWnkJV",le="WqruN54NvYqlA2XlTJ0Z",ce="GS4yLEr0XMj8kw2iMAd8",ue="prICvcudVq_SL6dqkZBw",de="YLM_DWbpYGBpvqtDEhum",me="h8jjXJERT64OZi2sHCbi",pe=(e,t)=>e(re,{geonameId:t}),he=({onCancel:e,onSave:t,location:i,storeConcertLocation:r=pe})=>{const[a,c]=(0,n.useState)(!1),[d,m]=(0,n.useState)(!1),{getGraphQLLoader:p}=(0,ae.mv)(),h=p();return(0,T.jsx)("div",{onKeyDown:t=>{const i=t.key;B(i)&&"Escape"===i&&e()},"data-interaction-context":"location-selector",children:(0,T.jsx)(M.A,{isOpen:!0,onRequestClose:e,children:(0,T.jsxs)("section",{className:se,children:[(0,T.jsx)("div",{className:le,children:(0,T.jsx)(O.H,{iconOnly:o.M,size:"medium",onClick:e,"aria-label":u.Ru.get("close")})}),(0,T.jsxs)("div",{className:oe,children:[(0,T.jsx)("div",{className:ce,children:(0,T.jsx)(ne.Z,{variant:"celloCanon",children:u.Ru.get("concerts.location.change.confirm",i.name)})}),(0,T.jsx)("div",{className:ue,children:(0,T.jsx)(s.t,{size:"xlarge"})}),(0,T.jsx)("div",{className:de,children:(0,T.jsx)(ne.Z,{semanticColor:"textSubdued",children:u.Ru.get("concerts.location.change.info")})}),(0,T.jsx)(l.$,{onClick:async()=>{c(!0),m(!1);try{const n=await r(h,String(i.geonameId));if(e=n?.data?.storeUserLocation,void 0===e||!("success"in e)||!0!==e.success)throw Error();t()}catch{m(!0),c(!1)}var e},disabled:a,children:u.Ru.get("concerts.location.change.button")}),d&&(0,T.jsx)("div",{className:me,children:(0,T.jsx)(ne.Z,{semanticColor:"textWarning",children:u.Ru.get("concerts.location.change.error")})})]})]})})})},ge=Spicetify.GraphQL.Definitions["userLocation"]=new F.l("userLocation","query","079939378ca79b67c6d047be9152ea940d21f10bbfa2f5d4cf4d8320d87774c2",null),fe=(e,t)=>(0,H.I)(ge,e,t),ve="Hj5kpRfIocJic5jcxsW_",ye="aJduGcVsoCwJvV1jVqjl",be=({onClick:e})=>{const{data:t}=fe({});return t?(0,T.jsxs)("div",{className:ve,children:[(0,T.jsxs)("div",{className:ye,children:[(0,T.jsx)(s.t,{size:"small"}),(0,T.jsxs)("div",{children:[(0,T.jsx)(ne.Z,{as:"div",semanticColor:"textPositive",variant:"ballad",children:t.me?.profile?.location?.name}),(0,T.jsx)(ne.Z,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("concerts.location.preferred")})]}),(0,T.jsx)(a.n,{onClick:e,size:"small",children:u.Ru.get("concerts.location.change")})]}),(0,T.jsx)(ne.Z,{semanticColor:"textSubdued",variant:"finale",children:u.Ru.get("concerts.location.preferred.info")})]}):null};var _e=i(19159),Ee=i(7939);const Ce=e=>{const{isAnonymous:t}=(0,r.d4)(Ee.Ht),{data:i,invalidate:d}=fe({}),m=i?.me?.profile?.location,[p,h]=(0,n.useState)(),{handleLocationChange:g,locationStr:b,headerSpec:_}=e,[E,C]=(0,n.useState)(e.isDialogDefaultOpen??!1),[x,S]=(0,n.useState)(e.dialog??"browse"),[A,I]=(0,n.useState)();(0,n.useEffect)((()=>{p||h(m?.name)}),[m?.name,h,p]);const N=(0,n.useMemo)((()=>_?.changeLocationButtonFactory()),[_]),w=(0,n.useMemo)((()=>_?.changeLocationUiFactory({identifier:b})),[_,b]),R=(0,f.s)(),O=(0,c.NC)(_e.b3k),P=()=>{C(!1),S(e.dialog??"browse"),I(void 0)},L=e=>{g(e),P()},j=void 0!==p&&e.locationStr!==u.Ru.get("concerts.default_location")&&p!==e.locationStr;return p!==m?.name&&e.locationStr===m?.name&&h(m.name),(0,T.jsxs)("div",{className:v,children:[j?(0,T.jsxs)("div",{className:y,children:[m&&(0,T.jsx)(a.n,{size:"small",iconOnly:o.M,"aria-label":u.Ru.get("close"),onClick:()=>g({geonameId:Number(m.geonameId),name:m.name})}),(0,T.jsx)(l.$,{size:"small",iconTrailing:o.M,onClick:()=>C(!0),children:b})]}):(0,T.jsx)(a.n,{iconLeading:s.t,onClick:()=>{N&&!E&&R.logInteraction(N.hitUiReveal()),C(!E)},size:"small",children:b}),E&&!O&&(0,T.jsx)(k,{placeholder:u.Ru.get("concerts.input.search_placeholder"),onSelectLocation:e=>{g(e),C(!1)},onCancel:()=>C(!1),spec:w}),E&&O&&"browse"===x&&(0,T.jsx)(ie,{title:u.Ru.get("concert.location.search.header"),onChange:L,onCancel:P,spec:w,children:!t&&(0,T.jsx)(be,{onClick:()=>S("preferred")})}),E&&O&&"preferred"===x&&(0,T.jsx)(ie,{title:u.Ru.get("concerts.location.preferred"),onChange:e=>{S("confirm"),I(e)},onCancel:P,onBack:e.dialog?void 0:()=>S("browse"),spec:w}),E&&O&&"confirm"===x&&A&&(0,T.jsx)(he,{location:A,onCancel:P,onSave:async()=>{h(void 0),await d(),L(A)}})]})}},76881:(e,t,i)=>{"use strict";i.d(t,{A:()=>v});var n=i(30758),r=i(12783),a=i(88482),s=i(59996),o=i(32912);const l="D_V60ibMxH9Vy7kyvWvc",c="anRK1X9LKn5HxZQJB5Tl",u="shUifmqVle_F5ILRpCqe",d="_WibGTg4OzGdsTf18zK1",m="LHhL2094jqvK0MNwlGAu",p="yRQGIh3Y05BG51IHUW2b",h="fT86P9Div4C8GXI9hZ36",g="G8sU0RZZT_ZhaEv7B26V";var f=i(86070);const v=(0,n.memo)((({date:e,image:t,title:i,subTitle:n,dateRange:v,uri:y,onClick:b})=>{const _=e?(0,o.l4)(e):void 0;return(0,f.jsxs)(s.N,{to:y,className:l,"":"concert-row",onClick:b,children:[(0,f.jsx)("time",{dateTime:e,className:c,children:_&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(r.E,{as:"div",variant:"bodySmall",children:(0,o.tj)(_)}),(0,f.jsx)(r.E,{variant:"bodyMediumBold",children:(0,o.Py)(_)})]})}),t&&(0,f.jsx)(a._,{src:t,alt:"",role:"presentation",className:u}),(0,f.jsxs)("div",{className:m,children:[(0,f.jsxs)("div",{className:p,children:[(0,f.jsx)(r.E,{variant:"bodyMedium",className:d,children:i}),(0,f.jsx)(r.E,{variant:"bodySmall","":"event-venue",semanticColor:"textSubdued",children:n})]}),(0,f.jsx)(r.E,{as:"span",variant:"bodyMedium",semanticColor:"textSubdued",className:h,children:v}),(0,f.jsx)("div",{className:g,children:_&&(0,f.jsx)(r.E,{variant:"bodyMedium",semanticColor:"textSubdued",children:(0,o.WB)(_)})})]})]})}))},6362:(e,t,i)=>{"use strict";i.d(t,{I:()=>v});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(61544),l=i(59996),c=i(32912),u=i(7722),d=i(79303),m=i(48905),p=i(76119),h=i(86070);function g(e){return e.name?e.name:""}const f=({children:e,uri:t,condensed:i,spec:r,index:s})=>{const c=(0,d.s)(),u=(0,o.o_)(t),g=null!==u&&(0,o.ly)(u)?u.id:"",f=(0,n.useMemo)((()=>r.tourElementFactory({identifier:g,uri:t,position:s||0,reason:""})),[r,t,g,s]),v=(0,m.t)(f);return(0,h.jsx)(l.N,{to:t,className:a()(p.A.item,{[p.A.condensed]:i}),onClick:()=>{c.logInteraction(f.hitUiNavigate({destination:t}))},ref:v,children:e})},v=n.memo((function({concert:e,spec:t,index:i,condensed:n,elevatedDate:r,titleVariant:o="bodyMediumBold"}){const{venue:l,uri:d}=e,m=(0,c.l4)(e.date.isoString);return(0,h.jsxs)(f,{uri:d,condensed:n,spec:t,index:i,children:[(0,h.jsxs)("time",{className:a()(p.A.date,{[p.A.condensed]:n,[p.A.elevated]:r}),dateTime:(0,c.WB)(m),children:[(0,h.jsx)(s.E,{as:"h5",variant:"bodySmallBold",className:p.A.dateMonth,children:(0,c.tj)(m)}),(0,h.jsx)(s.E,{as:"h1",variant:"titleSmall",className:p.A.dateDay,children:(0,c.Py)(m)})]}),(0,h.jsxs)("div",{className:p.A.info,children:[(0,h.jsx)(s.E,{as:"h3",variant:o,semanticColor:"textBase",className:a()(p.A.title,{[p.A.condensed]:n}),children:l.location?.name}),(0,h.jsx)(s.E,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",className:p.A.eventName,children:(0,u.i3)(e)}),(0,h.jsxs)(s.E,{as:"span",semanticColor:"textSubdued",variant:"bodySmall",className:a()(p.A.timeAndVenue,{[p.A.condensed]:n}),children:[(0,h.jsx)("time",{className:p.A.time,children:(0,c.MW)(m)}),g(l)]})]})]})}))},84512:(e,t,i)=>{"use strict";i.d(t,{c:()=>E,p:()=>y});var n=i(30758),r=i(93240),a=i(81987),s=i(90936),o=i(63860),l=i(11808),c=i(76174),u=i(55030),d=i(70583),m=i(11898),p=i(27774),h=i(48905),g=i(72091),f=i(62943),v=i(86070);let y=function(e){return e.ALBUM="album",e.ARTIST="artist",e.AUDIOBOOK="audiobook",e.EPISODE="episode",e.PLAYLIST="playlist",e.PODCAST="podcast",e.TRACK="track",e}({});const b=e=>e===y.TRACK?l.Ru.get("web-player.deeplink-intent.add-to-library.liked-songs-title"):e===y.EPISODE?l.Ru.get("web-player.deeplink-intent.add-to-library.episodes-title"):l.Ru.get("web-player.deeplink-intent.add-to-library.title"),_=({entityType:e,artistOrShow:t,title:i})=>e===y.ARTIST||e===y.PODCAST?l.Ru.get("web-player.deeplink-intent.add-to-library.artist-description",{name:t??""}):l.Ru.get("web-player.deeplink-intent.add-to-library.description",{title:i??"",name:t??""}),E=e=>{const{intent:t,clear:i}=(0,u.AT)();return t!==u.pg.ADD_TO_LIBRARY?null:(0,v.jsx)(C,{...e,clearDeeplinkIntent:i})};function C({uri:e,entityType:t,artistOrShow:i,title:u,clearDeeplinkIntent:E}){const C=(0,m.f)(),x=(0,p._)(),{enqueueSnackbar:S}=(0,r.dh)(),[A,T]=(0,n.useState)(null),I=(0,a.NC)(f.oH),{spec:N,logger:w}=(0,g.r)(s.K0,{data:{uri:e,identifier:t}}),{spec:R,logger:k}=(0,g.r)(o.y4,{data:{uri:e,identifier:t}}),O=(0,h.t)(N);(0,n.useEffect)((()=>{t===y.PLAYLIST?x?.contains([e]).then((e=>T(e[0]))):C.contains(e).then((e=>T(e[0])))}),[t,C,x,e]),(0,n.useEffect)((()=>{A&&(S(l.Ru.get("web-player.deeplink-intent.add-to-library.already-in-library")),k.logImpression(R.impression()),E())}),[E,S,A,k,R]);const P=(0,n.useCallback)((()=>{w.logInteraction(N.closeButtonFactory().hitUiHide()),E()}),[E,w,N]),L=(0,n.useCallback)((()=>{t===y.PLAYLIST?x?.add([e],{before:"start"}):C.add({uris:[e]}),t===y.EPISODE||t===y.TRACK?w.logInteraction(N.addButtonFactory().hitAddToPlaylist({playlist:t===y.TRACK?d.BP:d.Xn,itemToBeAdded:e})):w.logInteraction(N.addButtonFactory().hitFollow({itemToBeFollowed:e})),E()}),[E,t,C,w,x,N,e]);return null!==A&&I?(0,v.jsx)(c.T,{ref:O,titleText:b(t),descriptionText:_({entityType:t,artistOrShow:i,title:u}),confirmText:l.Ru.get("playlist.extender.button.add"),cancelText:l.Ru.get("block-user.dialog.cancel"),onConfirm:L,onClose:P,"aria-label":b(t)}):null}},55030:(e,t,i)=>{"use strict";i.d(t,{AT:()=>s,d$:()=>o,pg:()=>a});var n=i(30758),r=i(37985);let a=function(e){return e.ADD_TO_LIBRARY="addToLibrary",e}({});const s=()=>{const[e,t]=(0,r.ok)(),[i,s]=(0,n.useState)((e=>e.get("intent")===a.ADD_TO_LIBRARY?a.ADD_TO_LIBRARY:null)(e));return{intent:i,clear:(0,n.useCallback)((()=>{s(null),t((e=>(e.delete("intent"),e)))}),[t])}},o=e=>{const[t]=(0,r.ok)(),i=t.get("intent");if(e){const n=t.get("highlight");return i===a.ADD_TO_LIBRARY&&n===e}return i===a.ADD_TO_LIBRARY}},62878:(e,t,i)=>{"use strict";i.d(t,{G:()=>a});var n=i(30758),r=i(86070);const a=e=>(0,r.jsx)(n.Suspense,{fallback:null,children:(0,n.createElement)((0,n.lazy)((async()=>{const{FeatureActivationSection:e}=await Promise.all([i.e(4151),i.e(3417)]).then(i.bind(i,50769));return{default:e}})),e)})},11521:(e,t,i)=>{"use strict";i.d(t,{G:()=>E,v:()=>C});var n=i(47493),r=i(13713),a=i(12805),s=i(62952),o=i(33779),l=i(24633),c=i(98105),u=i(48511),d=i(5492),m=i(70812),p=i(79787),h=i(49669),g=i(4323),f=i(4055),v=i(8035),y=i(84773),b=i(36485),_=i(86070);function E(e,t){return C(e.content)?function(e,t){const i=t,E=(0,d.f0)(e),C=(0,d.Uk)(e);switch(e.__typename){case"Album":return(0,_.jsx)(n.a,{uri:e.uri,name:e.name,images:E,color:C,sharingInfo:null,artists:(0,h.K)(e.artists),isPlayable:e.playability.playable,isRestricted:e.playability.reason===p.$c.CatalogueRestricted,index:t},i);case"Artist":return(0,_.jsx)(r.a,{uri:e.uri,name:e.profile.name,images:E,color:C,index:t},i);case"Audiobook":return(0,_.jsx)(a.M,{uri:e.uri,name:e.name,images:E,color:C,authorName:e.authors?.[0]?.name??"",index:t,signifierText:e.accessInfo?.signifier?.text??void 0},i);case"Chapter":{if("Audiobook"!==e.audiobookV2.data.__typename)return null;const n=e.audiobookV2.data;return(0,_.jsx)(a.M,{uri:n.uri,name:n.name,images:E,color:C,authorName:n.authors?.[0]?.name??"",index:t,signifierText:n.accessInfo?.signifier?.text??void 0},i)}case"Episode":return(0,_.jsx)(s.U,{uri:e.uri,name:e.name,images:E,color:C,showImages:(0,d.o8)(e),description:e.description??"",durationMilliseconds:e.duration.totalMilliseconds,releaseDate:(0,f.JO)(e.releaseDate),resume_point:{resume_position_ms:e.playedState.playPositionMilliseconds,fully_played:e.playedState.state===p._w.Completed},isExplicit:(0,g.V)(e.contentRating),is19PlusOnly:(0,g.r)(e.contentRating),sharingInfo:null,index:t},i);case"Playlist":{let n="";return"User"===e.ownerV2.data.__typename&&(n=e.ownerV2.data.name),(0,_.jsx)(o.B,{uri:e.uri,name:e.name,images:E,color:C,description:e.description,authorName:n,index:t,isPlayable:!(0,m.p)(e?.attributes)},i)}case"Podcast":return(0,_.jsx)(c.o,{uri:e.uri,name:e.name,images:E,color:C,publisher:e.publisher?.name??"",sharingInfo:null,mediaType:(0,v.w)(e.mediaType),index:t},i);case"Track":return(0,_.jsx)(u.w,{uri:e.uri,name:e.name,images:E,color:C,artists:(0,y.S)(e.artists),album:e.albumOfTrack?{uri:e.albumOfTrack.uri,name:e.albumOfTrack.name}:null,isExplicit:(0,g.V)(e.contentRating),is19PlusOnly:(0,g.r)(e.contentRating),sharingInfo:null,index:t},i);case"User":return(0,_.jsx)(l.a,{uri:e.uri,name:e.name,images:E,color:C,index:t},i);case"GenericError":case"NotFound":case"RestrictedContent":case"DiscoveryFeed":return null;default:return(0,b.k)(e),null}}(e.content.data,t):null}function C(e){switch(e.__typename){case"AlbumResponseWrapper":case"ArtistResponseWrapper":case"EpisodeOrChapterResponseWrapper":case"PlaylistResponseWrapper":case"PodcastOrAudiobookResponseWrapper":case"TrackResponseWrapper":return!0;case"UserResponseWrapper":case"DiscoveryFeedResponseWrapper":case"PromotionResponseWrapper":case"ConcertV2ResponseWrapper":case"UnknownType":return!1;default:return(0,b.k)(e),!1}}},89070:(e,t,i)=>{"use strict";i.d(t,{g:()=>Pi});var n=i(30758),r=i(81987),a=i(12783),s=i(46007),o=i(22844),l=i(89790),c=i(52396),u=i(84997),d=i(99262),m=i(36315),p=i(17652),h=i(30627),g=i(84515),f=i(89306),v=i(70932),y=i(11808),b=(i(45603),i(97500)),_=i.n(b),E=i(9183),C=i(69644),x=i(30171),S=i(98632),A=i(61544),T=i(84492),I=i(97684),N=i(44694),w=i(65500),R=i(62720),k=i(86070);const O=({uri:e,size:t})=>{const[i,n]=(0,R.A)(e);return(0,k.jsx)(I.M,{size:t,isAdded:i,onClick:()=>{n(!i)},condensed:!0})},P=({uri:e,size:t})=>(0,w.v)(e)?(0,k.jsx)(N.g,{uri:e,size:t}):(0,k.jsx)(O,{uri:e,size:t});var L=i(70675),j=i(2977),D=i(39796),M=i(53129),U=i(59996),B=i(27685),F=i(67062),H=i(72419),V=i(15742),G=i(8385);const z=Spicetify.GraphQL.Definitions["feedBaselineLookup"]=new V.l("feedBaselineLookup","query","35c82d20fb7cb785e7927487fe27223249e66050944b4632c951ede5338d6a1b",null),W=(e,t)=>(0,G.I)(z,e,t);var K=i(23342),Y=i(95534),q=i(11521),Z=i(19159),$=i(3554);const Q=(0,n.createContext)(new Map);function J(e,t){const i=new Map;for(const t of e)i.set(t,null);return t&&t.lookup.forEach((e=>{if(!("AlbumResponseWrapper"!==e.__typename&&"PlaylistResponseWrapper"!==e.__typename||"Album"!==e.data.__typename&&"Playlist"!==e.data.__typename||"TrackResponseWrapper"!==e.data.previewItem?.__typename||"Track"!==e.data.previewItem.data.__typename)){const t=(0,$.g)(e.data.previewItem.data.albumOfTrack?.coverArt?.sources||[])?.url||null,n=e.data.previewItem.data.albumOfTrack?.coverArt?.extractedColors?.colorDark?.hex||null;i.set(e._uri,{canvas:e.data.previewItem.data.canvas,backgroundImageUrl:t,backgroundColor:n})}})),i}var X=i(14627),ee=i(64736),te=i(63574),ie=i(45346),ne=i(16059),re=i(94921),ae=i(76104),se=i(73356),oe=i(26969),le=i(42582),ce=i(72091),ue=i(53209);const de={screenLg:"1200px",homeRegularDensityMinWidth:"210px",homeRegularDensityMinWidthSmallScreens:"160px",homeFeedBaselineMinWidth:"380px",homeFeedBaselineMaxWidth:"480px",homeFeedBaselineHalfWidth:"430px",gridContainer:"DgRp3EC01YPhzdK9Imn5",withFiniteRowCount:"ihWXb2VdDvsS3bvPrpJF",uniformRowHeight:"frDxJ3jhWuIFWag59N0Q",card:"Q36ugVAb7krhThyRTmJ_",overlayForCenteredImage:"ky4dHMtg46D0NG1znEYF",overlayTop:"QSkuUiKpZ4MHrdOB83XV",playlistOverlayBottom:"C2dCWzsDwu1iDX7ttMKA",overlayBottom:"AqLt2Nk3rygv3mAt_6gi",hasFooter:"FuL5IvTt_AoeX2tB_U_Q",header:"XKQRNQAUOAjRwwjuUnRU",image:"QSrmESe9Ad31lVmBDdTo",headerContainer:"ZhCb7WHaVm5AdY29Cvaq",titleClamp:"auugTSHlDcy58VCqeLjc",titleLink:"YSflHyCWx4tGL7LrqtLE",subtitleClamp:"wQxxts1zXZeP5bXczeWQ",background:"ieyJDLNudPfN0Dc6bwjh",canvas:"Do4x701ZrO6oFWJWnsNw",currentlyPlayingStatus:"uw7snqn4j_j7v0S1Fpmi",footerPlayContainer:"PHgLQg31p9qeCUcSicCg",footerPlayContainerLeft:"lGxecOZ8oBfh2DzjoP0p",footerPlayContainerRight:"Hf9Q0qSpT2RXgmYT6bNE",footer:"OGu88AVNWY3IM3QlZjG0",footerDescription:"bdiJ1G8TQ1rV0_rYDjws",footerDescriptionContent:"FUyKOZGo4cLlF8PSnINm",expandFooterButton:"ZZqy7vcJrfQy4lXxCTB6",playButtonContainer:"qWtIAYA_A_mOQIlxBb02",isPlayingContext:"BdPspy97AcLd4WhT_L2N",centeredContainer:"TLbWzWrBDxGsZRv8m6lg",isExpandedFooter:"Icn8TjyVe6vIEWpxmYhl",artworkImage:"IpLgaK4Oik13ltWcX5FA",videoPreviewImage:"MzQSLz6VPWpujKF9qcci"},me=Number(de.homeFeedBaselineHalfWidth.replace("px",""))||430,pe=({onClick:e=(()=>{}),onPlay:t=(()=>{}),onContextMenu:i=(()=>{}),uri:r,headerText:s,renderFooter:o,isPlayable:l=!0,isAddable:c=!0,renderSubtitle:u,className:d,playUri:m=r,testId:p,ariaPlayLabel:h,ariaPauseLabel:g,index:f,shelfIndex:v,requestId:b,images:I,color:N,dragMimeType:w,shouldRenderHeaderImage:R=!0,shouldRenderCenteredImage:O=!1,videoPreviewImage:V,onMoreButtonClick:G,menu:z})=>{const K=(0,n.useContext)(Q).get(r),{data:Y}=W({uris:[r]},{enabled:void 0===K}),{canvas:q,backgroundImageUrl:Z,backgroundColor:$}=K??J([r],Y).get(r)??{},pe=(0,E.Zp)(),he=(0,ie.W)(),ge=(0,te.W)({type:"link",uri:r}),{spec:fe,logger:ve,UBIFragment:ye}=(0,ce.r)(S.y,{data:{uri:r,position:f,reason:b??""}}),{isPlaying:be,isActive:_e,togglePlay:Ee}=(0,le.P)({uri:m},{featureIdentifier:"home"}),{draggable:Ce,onDragStart:xe}=(0,X.P)({itemUris:[r],itemMimeTypes:w?[w]:[],dragLabelText:s}),Se=(0,n.useCallback)((()=>{let e=fe.cardPlayButtonFactory().hitPause({itemToBePaused:r});be||(e=_e?fe.cardPlayButtonFactory().hitResume({itemToBeResumed:r}):fe.cardPlayButtonFactory().hitPlay({itemToBePlayed:r}));const i=ve.logInteraction(e);t(r,i),he({targetUri:r,intent:be?"pause":"play",type:"click"}),Ee({loggingParams:i})}),[_e,be,ve,he,t,fe,Ee,r]),Ae=(0,n.useCallback)((()=>{he({targetUri:r,intent:"navigate",type:"click"});const e=fe.hitUiNavigate({destination:r});ve.logInteraction(e)}),[ve,he,fe,r]),Te=(0,n.useCallback)((()=>{e(r),Ae()}),[e,r,Ae]),Ie=(0,A.o_)(r)?.toURLPath(!0)??"",Ne=ge?(0,ue.hF)(Ie):Ie,we=(0,n.useRef)(null),[Re,ke]=(0,n.useState)(!1),[Oe,Pe]=(0,n.useState)(!1),Le=(0,n.useCallback)((e=>{e.stopPropagation(),ke((e=>!e))}),[]),je=(0,n.useRef)(null),De=(0,n.useCallback)((()=>{je.current&&Pe(je.current.scrollHeight>je.current.clientHeight)}),[]),Me=Re?y.Ru.get("show_less"):y.Ru.get("show_more");(0,n.useLayoutEffect)((()=>{setImmediate((()=>{De()}))}),[De]);const Ue=(0,se.j)(),Be=(0,n.useRef)(null),Fe=(0,ee.K)({ref:Be});let He=(0,k.jsx)("div",{className:de.background});O||(q?.fileId&&!Ue?He=(0,k.jsx)(H.Gg,{className:de.canvas,fileId:q.fileId,canvasType:q.type,canvasUri:q.uri,playbackType:H.RT.LoopOnHover,playerContainerClass:`BigCard_${f}_${v}`,mouseHoverRef:we}):Z&&(He=(0,k.jsx)("img",{alt:"",className:de.background,src:Z})));let Ve=null;V?(R=!0,Ve=(0,k.jsx)("img",{src:V,className:de.videoPreviewImage,alt:""})):O&&(Ve=(0,k.jsx)("div",{className:de.artworkImage,children:(0,k.jsx)(j.M,{images:I,color:N,desiredSize:180*window.devicePixelRatio})}));const[Ge,ze]=(0,n.useState)(32),We=(0,n.useCallback)((()=>{const e=we.current?.clientWidth??re.Pm,t=2*(Be.current?.clientWidth??re.Pm),i=e<me?24:32,n=(0,ne.L)(s,i,700);ze(n>t?24:32)}),[s]);(0,oe.w)({refOrElement:we,onResize:We,observeOnly:"width",observeOnMount:!0});const Ke={"--background-color":$||N||"","--mask-image":`url(${(0,T.b)("images/mask.png")})`,"--mask-image-rtl":`url(${(0,T.b)("images/mask-rtl.png")})`,"--mask-image-expanded":`url(${(0,T.b)("images/expanded-mask.png")})`,"--mask-image-expanded-rtl":`url(${(0,T.b)("images/expanded-mask-rtl.png")})`,"--title-line-clamp":2,"--title-font-size":`${Ge}px`,"--title-font-size-small":(32===Ge?24:20)+"px","--min-width":`${re.Pm}px`};return(0,k.jsx)(ye,{spec:fe,children:(0,k.jsx)(F.E,{uri:r,trigger:F.l.OnMouseDown,children:(0,k.jsxs)(C.a,{variant:"naked",onClick:()=>{Te(),pe(Ne)},ref:we,className:_()(de.card,d,"encore-medium-devices-theme",{[de.isPlayingContext]:be,[de.isExpandedFooter]:Re}),style:Ke,"":p,draggable:Ce,onDragStart:xe,onContextMenu:i,children:[He,O?(0,k.jsx)("div",{className:de.overlayForCenteredImage}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("div",{className:de.overlayTop}),(0,k.jsx)("div",{className:_()({[de.playlistOverlayBottom]:Boolean(o),[de.overlayBottom]:!Boolean(o)})})]}),(0,k.jsxs)("header",{className:de.header,children:[R&&(0,k.jsx)("div",{className:de.image,children:(0,k.jsx)(j.M,{images:I,color:N,is1DCardHeader:!0})}),(0,k.jsxs)("div",{className:de.headerContainer,children:[(0,k.jsx)(U.N,{to:r,className:de.titleLink,children:(0,k.jsx)(M.Zp,{label:s,disabled:!Fe,children:(0,k.jsx)(a.E,{as:"span",variant:"titleSmall",semanticColor:"textBase",ref:Be,className:de.titleClamp,children:s})})}),(0,k.jsx)(a.E,{as:"span",variant:"bodySmall",className:de.subtitleClamp,children:u()})]})]}),Ve&&(0,k.jsx)(U.N,{onClick:Te,to:Ne,className:de.centeredContainer,children:Ve}),(0,k.jsxs)("div",{className:de.footer,children:[(0,k.jsxs)("div",{className:de.footerDescription,children:[(0,k.jsx)(a.E,{variant:"bodySmall",className:de.footerDescriptionContent,ref:je,children:o?.()}),(Oe||Re)&&(0,k.jsx)(x.H,{onClick:Le,className:de.expandFooterButton,size:"small",condensedAll:!0,semanticColor:"textBase",tabIndex:0,children:Me})]}),(0,k.jsxs)("div",{className:de.footerPlayContainer,children:[(0,k.jsx)("div",{className:de.footerPlayContainerLeft,children:be&&(0,k.jsxs)("div",{className:de.currentlyPlayingStatus,children:[(0,k.jsx)(ae.J,{animated:!0}),(0,k.jsx)(a.E,{variant:"bodySmall",semanticColor:"textPositive",children:y.Ru.get("playing")})]})}),(0,k.jsxs)("div",{className:de.footerPlayContainerRight,onClick:e=>{e.stopPropagation()},children:[(0,k.jsx)(D.b,{menu:z,children:(0,k.jsx)(L.e,{size:"large",label:y.Ru.get("more"),onClick:G})}),c&&(0,k.jsx)(P,{size:"large",uri:r}),l&&(0,k.jsx)("div",{className:de.playButtonContainer,children:(0,k.jsx)(B.R,{isPlaying:be,onClick:Se,ariaPlayLabel:h,ariaPauseLabel:g,version:be?B.H.primary:B.H.secondary})})]})]})]})]})})})};var he=i(89807),ge=i(71588),fe=i(88778),ve=i(71072),ye=i(58345),be=i(40440),_e=i(1019),Ee=i(54687),Ce=i(5492),xe=i(42331),Se=i(29159),Ae=i(46751),Te=i(70812),Ie=i(17869),Ne=i(49669),we=i(4055),Re=i(85793),ke=i(7353),Oe=i(36485),Pe=i(15847);const Le="SsbbQFeJun2Ts_EIktpr",je="c9BGAQRNNsdwX3UTMr6I",De="uywGjRMxNHg8g1bYlRCw",Me="lx7nfGbsUkI_2pC6caw9",Ue="NI0fdMJhx5vQuNSdmzsG",Be="kKlHj6lIKU67CC1irRYP",Fe="bAtY2R6yehmYQinDdUo8",He="xrnpBm515hmJJbcxfudp",Ve="zEXW4c9SPtH2KBs6ziag",Ge="dwXI_X_KOCLVx2Ki1h9R";function ze({data:e,index:t,shelfIndex:i}){const n=t,r=(0,Ce.f0)(e),o=(0,Ce.Uk)(e);let l;switch(e.__typename){case"Album":l=(0,k.jsx)(fe.h,{uri:e.uri});break;case"Audiobook":l=(0,k.jsx)(ve.p,{uri:e.uri});break;case"Episode":l=(0,k.jsx)(ye.b,{uri:e.uri});break;case"Playlist":l=(0,k.jsx)(be.W,{uri:e.uri});break;default:return(0,Oe.k)(e),null}switch(e.__typename){case"Album":return(0,k.jsx)(ge.h,{menu:l,children:(0,k.jsx)(pe,{index:t,shelfIndex:i,headerText:e.name,uri:e.uri,images:r,color:o,isPlayable:!0,isAddable:!0,renderSubtitle:()=>(0,k.jsxs)("div",{className:Ue,children:[(0,k.jsx)(he.t,{children:y.Ru.get("card.tag.album")}),(0,k.jsx)("span",{children:(0,Ne.K)(e.artists).map(((e,t)=>[t>0&&y.Ru.getSeparator(),(0,k.jsx)(U.N,{to:e.uri,stopPropagation:!0,children:(0,k.jsx)(a.E,{variant:"bodySmall",className:Be,children:e.name})},e.uri)]))})]}),menu:l})},n);case"Audiobook":return(0,k.jsx)(ge.h,{menu:l,children:(0,k.jsx)(pe,{index:t,shelfIndex:i,headerText:e.name,shouldRenderHeaderImage:!1,uri:e.uri,images:r,color:o,isAddable:!0,isPlayable:!0,shouldRenderCenteredImage:!0,renderFooter:()=>{const t=e.rating?.averageRating,i=e.accessInfo?.signifier?.text,n=(e.description||"").replace(/<[^>]*>?/gm,""),r=(0,we.JO)(e.publishDate),o=r?new Date(r):void 0;return(0,k.jsxs)(k.Fragment,{children:[i&&(0,k.jsx)(a.E,{variant:"bodySmall",as:"div",semanticColor:"textBrightAccent",children:i}),o&&!isNaN(o.getTime())&&(0,k.jsx)(he.t,{semanticColor:"textBase",children:(0,Pe.gD)(o)}),e.audiobookDuration&&!isNaN(e.audiobookDuration.totalMilliseconds)&&(0,k.jsx)(he.t,{semanticColor:"textBase",children:(0,k.jsx)(Ae.d,{durationMs:e.audiobookDuration.totalMilliseconds})}),!0===t?.showAverage&&void 0!==t.average&&(0,k.jsxs)(he.t,{semanticColor:"textBase",children:[(0,k.jsx)(s.j,{size:"xsmall"})," ",y.Ru.formatNumber(t.average,{maximumFractionDigits:1})]}),(0,k.jsx)("span",{children:(0,k.jsx)(Se.N,{source:n??"",LinkComponent:U.N})})]})},renderSubtitle:()=>(0,k.jsxs)("div",{className:Ue,children:[(0,k.jsx)(he.t,{children:y.Ru.get("card.tag.audiobook")}),(0,k.jsx)("span",{children:e.authors?.[0]?.name})]}),menu:l})},n);case"Episode":{const s=e.mediaTypes?.includes(Re.C.Video);return(0,k.jsx)(ge.h,{menu:l,children:(0,k.jsx)(pe,{index:t,shelfIndex:i,headerText:e.name,shouldRenderHeaderImage:!1,uri:e.uri,images:r,color:o,isAddable:!0,isPlayable:!0,shouldRenderCenteredImage:!0,videoPreviewImage:"ImageV2"===e.videoThumbnailImage?.data.__typename?(0,$.g)(e.videoThumbnailImage.data.sources)?.url:void 0,renderSubtitle:()=>(0,k.jsxs)("div",{className:Ue,children:[s?(0,k.jsx)(Ee.T,{className:Ge}):(0,k.jsx)(he.t,{children:y.Ru.get("card.tag.episode")}),(0,k.jsx)("span",{children:"Podcast"===e.podcastV2.data.__typename?(0,k.jsx)(U.N,{to:e.podcastV2.data.uri,stopPropagation:!0,children:(0,k.jsx)(a.E,{variant:"bodySmall",className:Fe,children:e.podcastV2.data.name})}):""})]}),renderFooter:()=>{const t=(0,we.JO)(e.releaseDate),i=t?new Date(t):void 0;return(0,k.jsxs)(k.Fragment,{children:[i&&!isNaN(i.getTime())&&(0,k.jsx)(he.t,{semanticColor:"textBase",children:(0,Pe.gD)(i)}),!isNaN(e.duration.totalMilliseconds)&&(0,k.jsx)(he.t,{semanticColor:"textBase",children:(0,k.jsx)(Ae.d,{durationMs:e.duration.totalMilliseconds})}),(0,k.jsx)("span",{children:(0,k.jsx)(Se.N,{source:e.description??"",LinkComponent:U.N})})]})},menu:l})},n)}case"Playlist":return(0,k.jsx)(ge.h,{menu:l,children:(0,k.jsx)(pe,{index:t,shelfIndex:i,headerText:e.name,uri:e.uri,images:r,color:o,isAddable:!0,isPlayable:!(0,Te.p)(e?.attributes),renderSubtitle:()=>(0,k.jsxs)("div",{className:Ue,children:[(0,k.jsx)(he.t,{children:y.Ru.get("card.tag.playlist")}),"User"===e.ownerV2.data.__typename&&(0,k.jsx)("span",{children:e.ownerV2.data.name})]}),renderFooter:()=>(0,k.jsx)(Se.N,{source:e.description??"",LinkComponent:U.N,onLinkClick:e=>{e.stopPropagation()}}),menu:l})},n);default:return(0,Oe.k)(e),null}}const We=({icon:e})=>{switch(e){case"trending":return(0,k.jsx)(o.L,{size:"small"});case"briefcase":return(0,k.jsx)(l.o,{size:"small"});case"enhance":return(0,k.jsx)(c.M,{size:"small"});case"headphones":return(0,k.jsx)(u.r,{size:"small"});case"add-to-playlist":return(0,k.jsx)(d.u,{size:"small"});case"album":return(0,k.jsx)(m.I,{size:"small"});case"edit":return(0,k.jsx)(p.G,{size:"small"});case"lab":return(0,k.jsx)(h.X,{size:"small"});case"light-bulb":return(0,k.jsx)(g.N,{size:"small"});case"preview":return(0,k.jsx)(f.W,{size:"small"});case"star":return(0,k.jsx)(v.a,{size:"small"});default:return null}},Ke=({title:e,icon:t})=>(0,k.jsxs)("header",{className:He,children:[e&&t&&(0,k.jsx)(We,{icon:t}),e&&(0,k.jsx)(a.E,{variant:"bodySmall",semanticColor:"textSubdued",className:Ve,children:e})]});const Ye=({spec:e,section:t,index:i})=>{const n=t.items.map(((e,t)=>(({item:e,index:t,shelfIndex:i})=>(0,q.v)(e.content)&&function(e){switch(e.__typename){case"Album":case"Audiobook":case"Episode":case"Playlist":return!0;default:return!1}}(e.content.data)?(0,k.jsx)("div",{className:je,children:(0,k.jsx)("div",{className:De,children:(0,k.jsxs)("div",{className:Me,children:[(0,k.jsx)(Ke,{icon:e.recsplanation?.iconName,title:e.recsplanation.title?.transformedLabel}),(0,k.jsx)(ze,{data:e.content.data,index:t,shelfIndex:i})]})})},t):null)({item:e,index:t,shelfIndex:i}))).filter(ke.P);return(0,k.jsx)(xe.x,{config:(0,re.s1)(re.yV.HOME_FEED_BASELINE),children:(0,k.jsx)(Ie.r,{spec:e.shelvesFactory(),children:(0,k.jsx)(_e.p,{id:t.uri,className:Le,index:i,total:n.length,rowTruncationMethod:"ceil",children:n})})})};var qe=i(62878),Ze=i(56053),$e=i(4594),Qe=i(64133),Je=i(78424),Xe=(i(5460),i(66416)),et=i(83542),tt=i(14874),it=i(69725),nt=i(91494),rt=i(90507),at=i(58715),st=i(45729),ot=i(79787);const lt=e=>{switch(e){case ot.r7.Album:return m.I;case ot.r7.Artist:return it.r;case ot.r7.Playlist:return nt.e;case ot.r7.Track:return rt.v;case ot.r7.Video:return at.B;default:return st.d}},ct=e=>{const t=(0,A.o_)(e);if(t)return{href:t.toURLPath(),isExternalTarget:!1};return URL.canParse(e)&&new URL(e).host.includes("open.spotify.com")?{href:e,isExternalTarget:!0}:{href:e,isExternalTarget:!1}};var ut=i(38481),dt=i(21596),mt=i(75235);const pt=(0,n.createContext)({onSetDisliked:()=>{},isDislikedInLocalStorage:!1}),ht=({children:e,promotionUri:t})=>{const[i,n]=(0,mt.x)(`home-promotion-disliked:${t}`,!1);return i?null:(0,k.jsx)(pt.Provider,{value:{onSetDisliked:()=>n(!0),isDislikedInLocalStorage:i},children:e})};var gt=i(98767),ft=i(30531),vt=i(47586),yt=i(79303);const bt="vM8M5NM7DIyeDgnEvDwt",_t="nMEsN3cKwfOWwnhr6ORE",Et="vvyeNsGyrEOq4WPTy_7i",Ct=()=>{},xt=e=>"PromotionResponseWrapper"===e.content?.__typename&&"PromotionDefaultNative"===e.content.data.__typename,St=({promotionSectionItem:e,spec:t})=>{const i=(0,yt.s)(),r=(0,E.Zp)(),a=e.content.data,s=t.promotionItemFactory({identifier:"default_native",uri:a.target}),{copyUri:o,iconActions:l,libraryUri:c,playUri:u,notInterestedUri:d}=(0,n.useMemo)((()=>(e=>{let t,i,n,r;const a=[];return e.forEach((e=>{e.type!==ot.j3.Navigate&&e.target&&e.type&&(e.type===ot.j3.Play&&(t=e.target),e.type===ot.j3.AddToLibrary&&(i=e.target),e.type===ot.j3.Share&&(n=e.target),e.type===ot.j3.NotInterested&&(r=e.target),a.push({target:e.target,type:e.type}))})),{iconActions:a,notInterestedUri:r,copyUri:n,libraryUri:i,playUri:t}})(a.actions)),[a.actions]),[m,p]=(0,R.A)(c??""),{setState:h,Icon:g}=(0,vt.Q)(m?tt.t.CURATED:tt.t.UNCURATED,tt.A),{isPlaying:f,togglePlay:v,isActive:b}=(0,le.P)({uri:u??""},{featureIdentifier:"home_promotion"}),_=u?()=>{const e=(0,gt.$I)({isPlaying:f,isActive:b,spec:s.playButtonFactory({uri:u}),logger:i,uri:u});v({loggingParams:e})}:Ct,{onCopyLink:C}=(0,ft.L)({sharingInfo:null,uri:o??"",interactionData:{intent:"share",type:"click"}}),{href:x,isExternalTarget:S}=ct(a.target),{onNotInterested:A}=(e=>{const{onSetDisliked:t,isDislikedInLocalStorage:i}=(0,n.useContext)(pt),r=(0,dt.A9)(),[a,s]=(0,n.useState)(i?"INIT":"SUCCESS");return{isMarkedNotInterested:i||"SUCCESS"===a,onNotInterested:(0,n.useCallback)((async()=>{if(s("PENDING"),e)try{await r.build().withHost(ut.L1).withMethod("POST").withPath(`feedback/v1/feedback/home-promotion/dislike?uri=${encodeURIComponent(e)}&reason=local`).withEndpointIdentifier("feedback/v1/feedback/home-promotion/dislike").withoutMarket().send(),t(!0)}catch(e){s("ERROR")}}),[e,r,t])}})(d),T=(0,n.useCallback)((()=>{c&&(h(m?tt.t.UNCURATED:tt.t.CURATED),m?i.logInteraction(s.saveButtonFactory({uri:c}).hitRemoveLike({itemNoLongerLiked:c})):i.logInteraction(s.saveButtonFactory({uri:c}).hitLike({itemToBeLiked:c})),p(!m))}),[m,c,i,s,h,p]),I=(0,n.useCallback)(((e,t)=>{i.logInteraction(s.hitUiNavigate({destination:a.target})),S||(t.preventDefault(),r(x))}),[s,i,a.target,x,S,r]),N=(0,n.useCallback)((()=>{o&&(i.logInteraction(s.shareButtonFactory({uri:o}).hitCopyToClipboard()),C())}),[s,i,C,o]),w=(0,n.useCallback)((()=>{d&&(i.logInteraction(s.notInterestedButtonFactory({uri:d}).hitDislike({itemToBeDisliked:d})),A())}),[s,i,A,d]),O=(e=>{if(!e||!("__typename"in e)||"ImageV2"!==e.__typename)return;const t=[];return e.sources.forEach((e=>{t.push(`${e.url} ${e.maxWidth}w`)})),{src:e.imageId,srcSet:t.length>0?t.join(", "):void 0}})(a.mediaSlot?.image?.data);return(0,k.jsx)(Je.M,{actions:l,addToLibraryButtonLabel:y.Ru.get("save_to_your_library"),addToLibraryIcon:g,body:a.bodyTranslation?.transformedLabel,className:_t,contextMenu:d?(0,k.jsx)(D.b,{menu:(0,k.jsx)(Xe.W,{children:(0,k.jsx)(et.D,{role:"menuitem",leadingIcon:(0,k.jsx)(Qe.r,{semanticColor:"textSubdued",size:"small"}),onClick:w,children:y.Ru.get("promotions.context-menu.not-interested")})}),children:(0,k.jsx)(L.e,{size:L.M.xs,label:y.Ru.get("show_more"),className:Et})}):null,href:x,isExternalLinkTargetFn:()=>S,isInLibrary:m,isPlaying:f,mediaSlotImageFallbackIcon:lt(a.mediaSlot?.fallbackIcon),mediaSlotImageSrc:O?.src,onAddToLibrary:T,onNavigate:I,onPlay:_,onShare:N,pauseButtonLabel:y.Ru.get("playlist.a11y.pause",a.titleTranslation?.transformedLabel||""),playButtonLabel:y.Ru.get("playlist.a11y.play",a.titleTranslation?.transformedLabel||""),pretitle:a.pretitleTranslation?.transformedLabel,pretitleSemanticColor:(e=>{switch(e){case ot.cf.TextAnnouncement:return"textAnnouncement";case ot.cf.TextBrightAccent:return"textBrightAccent";case ot.cf.TextNegative:return"textNegative";case ot.cf.TextPositive:return"textPositive";case ot.cf.TextSubdued:return"textSubdued";case ot.cf.TextWarning:return"textWarning";default:return"textBase"}})(a.pretitleSemanticColor),removeFromLibraryButtonLabel:y.Ru.get("remove_from_your_library"),shareButtonLabel:y.Ru.get("mwp.list.item.share"),subtitle:a.subtitleTranslation?.transformedLabel,title:a.titleTranslation?.transformedLabel})};var At=i(48905);const Tt=({section:e})=>{const t=e.data.title?.text||y.Ru.get("promotions.default-section-title"),i=e.sectionItems.items.find(xt),{spec:n}=(0,ce.r)(Ze.b,{data:{uri:e.uri}}),r=n.promotionFactory({uri:i?.uri}),a=r.promotionItemFactory({identifier:"default_native",uri:i?.content.data.uri}),s=(0,At.t)(a);return i?(0,k.jsx)(ht,{promotionUri:i.content.data.uri,children:(0,k.jsx)(Ie.r,{spec:n,children:(0,k.jsxs)("section",{ref:s,className:_()(bt,"FixedShelf"),children:[(0,k.jsx)($e.k,{title:t}),(0,k.jsx)(St,{promotionSectionItem:i,spec:r})]})})}):null};var It=i(89732),Nt=i(62473),wt=i(75922);const Rt="JYoTSXH6KEr_MIwisdZi",kt=({title:e,pretitle:t,body:i,uri:r,images:a,spec:s})=>{const o=(0,yt.s)(),l=(0,E.Zp)(),[c,u]=(0,R.A)(r||""),{isPlaying:d,togglePlay:m,isActive:p}=(0,le.P)({uri:r},{featureIdentifier:"album"}),{onCopyLink:h}=(0,ft.L)({sharingInfo:null,uri:r,interactionData:{intent:"share",type:"click",itemIdSuffix:"album/share"}}),g=(0,n.useCallback)((()=>{const e=(0,gt.$I)({isPlaying:d,isActive:p,spec:s.playButtonFactory(),logger:o,uri:r});m({loggingParams:e})}),[s,p,d,o,m,r]),{href:f,isExternalTarget:v}=ct(r),b=(0,n.useCallback)(((e,t)=>{o.logInteraction(s.hitUiNavigate({destination:r})),v||(t.preventDefault(),l(f))}),[s,o,r,f,v,l]),{setState:_,Icon:C}=(0,vt.Q)(c?tt.t.CURATED:tt.t.UNCURATED,tt.A),x=(0,n.useCallback)((()=>{_(c?tt.t.UNCURATED:tt.t.CURATED),o.logInteraction(c?s.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:r}):s.saveButtonFactory().hitLike({itemToBeLiked:r})),u(!c)}),[_,c,o,s,r,u]),S=(0,n.useCallback)((()=>{o.logInteraction(s.shareButtonFactory().hitCopyToClipboard()),h()}),[s,o,h]);return(0,k.jsx)(Je.M,{title:e,href:f,pretitle:t,body:i,isExternalLinkTargetFn:()=>!1,actions:[{target:r,type:"PLAY"},{target:r,type:"ADD_TO_LIBRARY"},{target:r,type:"SHARE"}],onPlay:g,onAddToLibrary:x,onShare:S,isPlaying:d,isInLibrary:c,onNavigate:b,mediaSlotImageSrc:a[0]?.url,playButtonLabel:y.Ru.get("playlist.a11y.play",e),pauseButtonLabel:y.Ru.get("playlist.a11y.pause",e),addToLibraryButtonLabel:y.Ru.get("save_to_your_library"),removeFromLibraryButtonLabel:y.Ru.get("remove_from_your_library"),shareButtonLabel:y.Ru.get("mwp.list.item.share"),className:Rt,addToLibraryIcon:C})};var Ot=i(13797);const Pt=({name:e,uri:t,images:i,artists:n,spec:r,type:a})=>(0,k.jsx)(ge.h,{menu:(0,k.jsx)(fe.h,{uri:t,artistUri:n?.[0]?.uri}),children:(0,k.jsx)(kt,{title:e,pretitle:`${(0,Ot.C)(a)} • ${n.map((e=>e.name)).join(y.Ru.getSeparator())}`,uri:t,images:i,spec:r})}),Lt=({name:e,uri:t,images:i,description:n,spec:r})=>(0,k.jsx)(ge.h,{menu:(0,k.jsx)(be.W,{uri:t}),children:(0,k.jsx)(kt,{title:e,pretitle:y.Ru.get("playlist"),body:n,uri:t,images:i,spec:r})}),jt="ixncPYxvXKu9liUB7s4j",Dt="Qhy0EgG4oltMwIF_10L6",Mt=({spec:e,section:t})=>{const{spec:i,logger:a}=(0,ce.r)(wt.j,{}),s=(0,r.NC)(Z.es$),o=(0,At.t)(i,s);let l,c;"Artist"===t.data.spotlightData?.artist?.data.__typename&&(l=(0,$.g)(t.data.spotlightData?.artist?.data?.visuals?.avatarImage?.sources,{desiredSize:48}),c=t.data.spotlightData?.artist?.data?.uri);const u=t.data?.title?.originalLabel?.baseText?.text?.includes("{0}")?t.data?.title?.originalLabel?.baseText?.text.split("{0}")[0]:t.data.subtitle?.transformedLabel,d=u&&t.data?.title?.transformedLabel?.includes(u)?t.data?.title?.transformedLabel?.split(u)[1]:t.data?.title?.transformedLabel,m=t.sectionItems.items.map(((e,t)=>((e,t)=>{if((0,q.v)(e.content)){const i=e.content.data,n=(0,Ce.f0)(i);switch(i.__typename){case"Album":return(0,k.jsx)(Pt,{uri:i.uri,name:i.name,images:n,artists:(0,Ne.K)(i.artists),type:i.albumType,spec:t});case"Playlist":return(0,k.jsx)(Lt,{uri:i.uri,name:i.name,images:n,spec:t});case"GenericError":case"NotFound":case"Artist":case"DiscoveryFeed":case"RestrictedContent":case"Audiobook":case"Chapter":case"Episode":case"Podcast":case"Track":case"User":return null;default:return(0,Oe.k)(i),null}}return null})(e,i.spotlightCardFactory({position:t,uri:e.uri})))).filter((e=>!!e)),[p,h]=(0,n.useState)(m[0]),[g,f]=(0,n.useState)(0),v=(0,n.useCallback)((()=>{f(g+1),h(m[g+1]),a.logInteraction(i.nextButtonFactory().hitUiReveal())}),[g,a,m,i]),b=(0,n.useCallback)((()=>{f(g-1),h(m[g-1]),a.logInteraction(i.previousButtonFactory().hitUiReveal())}),[g,a,m,i]),E=m.length>1?(0,k.jsxs)("div",{className:Dt,children:[(0,k.jsx)(M.Zp,{label:y.Ru.get("carousel.left"),children:(0,k.jsx)(x.H,{size:"small",iconOnly:It.g,"aria-label":y.Ru.get("carousel.left"),disabled:0===g,onClick:b})}),(0,k.jsx)(M.Zp,{label:y.Ru.get("carousel.right"),children:(0,k.jsx)(x.H,{size:"small",iconOnly:Nt.V,"aria-label":y.Ru.get("carousel.right"),disabled:g===m.length-1,onClick:v})})]}):null;return t.sectionItems.items.length<1?null:(0,k.jsx)(Ie.r,{spec:e.shelvesFactory(),children:(0,k.jsxs)("section",{className:_()(jt,"FixedShelf"),ref:o,children:[(0,k.jsx)($e.k,{seeAllUri:c,title:d,pretitle:u,trailing:E,media:l?.url,onClickTitle:()=>{c&&a.logInteraction(i.shelfHeaderFactory().hitUiNavigate({destination:c}))}}),p]})})};const Ut=({spec:e,section:t,index:i})=>{const r=(0,n.useMemo)((()=>t.sectionItems.items.some((e=>(0,q.v)(e.content)))),[t.sectionItems]),a=(0,n.useMemo)((()=>{const e=t.data.subtitle?.text,i=t.data.title?.originalLabel?.textAttributes?.textFormatArguments?.[0]?.uri;return e||i?{title:t.data.title?.text,pretitle:t.data.subtitle?.text,seeAllUri:i??void 0}:null}),[t.data.subtitle?.text,t.data.title?.originalLabel?.textAttributes?.textFormatArguments,t.data.title?.text]);return r?(0,k.jsx)(Ie.r,{spec:e.shelvesFactory(),children:(0,k.jsx)(xe.x,{config:(0,re.s1)(re.yV.HOME_REGULAR_DENSITY),children:(0,k.jsx)(_e.p,{total:t.sectionItems.totalCount,seeAllUri:t.uri,pageId:t.uri,title:t.data.title?.text??"",index:i,id:t.uri,richTitleShelfHeaderProps:a,children:t.sectionItems.items.map(q.G).filter((e=>!!e))})})}):null};var Bt=i(16047),Ft=i(66060),Ht=i(30400),Vt=i(66978),Gt=i(27734),zt=i(68244),Wt=i(96764),Kt=i(67464),Yt=i(89942),qt=i(85065),Zt=i(18573),$t=i(71817),Qt=i(71338);const Jt="ubMQsXP3CCwMEJi6tnho",Xt="OcOWYyTpgcznZpr7iYKo",ei="K9qB4diV_SsqMcbe5yod",ti="N2jZRaFadmYgJhYjmQKl",ii="NkvQ69_6UEZhjPv5yhiU",ni="kh55qg0nSVBoa3NT6KXN",ri="bdUVsoFLb6_IWRNOFy70",ai="egwkEuixleNAyxtZ8VqK",si="jmr32npX3X9HISaorWLE",oi="MSUfesevRw8ejexzIkdl",li=({episode:e,index:t})=>{const{togglePlay:i,isPlaying:r,isActive:a}=(0,le.P)({uri:e.uri},{featureIdentifier:"home",referrerIdentifier:"home"}),s=e.playedState.state===ot._w.Completed,o=e.playedState.state===ot._w.InProgress,l=e.playedState?.playPositionMilliseconds??0,c=(0,Zt.Wx)(e.restrictions,e.playability),u=!(c.isPaywalled&&!c.isUserSubscribed),d="Podcast"===e.podcastV2.data.__typename?e.podcastV2.data.name:"",m=y.Ru.get("tracklist.a11y.play",e.name,d),p=y.Ru.get("tracklist.a11y.pause",e.name,d),{spec:h,logger:g}=(0,ce.r)(Vt.q,{}),f=h.notificationItemFactory({position:t,identifier:e.uri}),v=(0,n.useCallback)((t=>{let n;t.preventDefault(),a&&!r&&(n=f.playButtonFactory().hitResume({itemToBeResumed:e.uri})),r||a||(n=f.playButtonFactory().hitPlay({itemToBePlayed:e.uri})),r&&(n=f.playButtonFactory().hitPause({itemToBePaused:e.uri})),n&&g.logInteraction(n),i()}),[i,g,f,e.uri,r,a]),b=(0,n.useCallback)((()=>{const t=f.titleFactory().hitUiNavigate({destination:e.uri});g.logInteraction(t)}),[g,f,e.uri]),_=(0,n.useCallback)(((t,i)=>{let n;i===qt.NV.ADD?n=f.downloadButtonFactory().hitDownload({itemToDownload:e.uri}):i===qt.NV.REMOVE&&(n=f.downloadButtonFactory().hitUiReveal()),n&&g.logInteraction(n)}),[g,f,e.uri]),E=(0,Wt.V)(e.uri),C=(0,n.useCallback)((()=>{E()}),[E]),x=(0,n.useCallback)((t=>{const i=f.saveButtonFactory().hitLike({itemToBeLiked:e.uri}),n=f.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});g.logInteraction(t?i:n)}),[f,g,e.uri]);return(0,k.jsx)(Bt.v,{variant:"naked",id:e.uri,className:Xt,onClick:C,hoverBackgroundColor:"backgroundHighlight",media:(0,k.jsx)(Kt.b,{className:oi,type:$t.c.EPISODE,size:Yt.Qe.SIZE_88,title:e.name,images:e.coverArt?.sources}),title:(0,k.jsx)(Ft.d,{lineClamp:2,className:ei,children:(0,k.jsx)(U.N,{to:e.uri,onClick:b,title:e.name,children:e.name})}),subtitle:(0,k.jsx)(Ht.v,{lineClamp:2,as:"p",variant:"bodySmall",children:e.description}),footer:(0,k.jsxs)("div",{className:ii,children:[(0,k.jsx)(zt.b,{uri:e.uri,size:"small",onClick:x,condensed:!1}),(0,k.jsx)(Gt.e,{uri:e.uri,size:"small",canDownload:u,onClick:_,condensed:!1,className:ti}),(0,k.jsx)(Qt.j,{isPlaying:r,fullyPlayed:s,durationMs:e.duration.totalMilliseconds,releaseDate:o?"":e.releaseDate?.isoString,resumePositionMs:l,position:r?l:void 0,className:ri,progressBarClassName:ai,progressStateClassName:si,compactVariant:!0}),(0,k.jsx)("div",{className:ni,children:(0,k.jsx)(B.R,{size:"small",onClick:v,isPlaying:r,ariaPlayLabel:m,ariaPauseLabel:p,version:B.H.secondary})})]}),size:"md"})};const ci=({index:e,section:t,spec:i})=>{const n=(0,r.NC)(Z.hWV),a=t.sectionItems.items.length,s=t.data.title?.text??"",o=t.sectionItems.items;return n?(0,k.jsx)(xe.x,{config:(0,re.s1)(re.yV.HOME_LOW_DENSITY),children:(0,k.jsx)(Ie.r,{spec:i.shelvesFactory(),children:(0,k.jsx)(_e.p,{id:t.uri,index:e,total:a,pageId:"home",title:s,className:Jt,children:o.map(((e,t)=>function(e,t){if("EpisodeOrChapterResponseWrapper"!==e.content.__typename)return null;const i=e.content.data;return"Episode"!==i.__typename?null:(0,k.jsx)(li,{episode:i,index:t},e.uri)}(e,t))).filter(Boolean)})})}):null};var ui=i(9783);const di=({spec:e,section:t,shelfTitle:i,index:n})=>(0,k.jsx)(xe.x,{config:(0,re.s1)(re.yV.MUSIC_VIDEOS),children:(0,k.jsx)(Ie.r,{spec:e.shelvesFactory(),children:(0,k.jsx)(_e.p,{total:t.sectionItems.totalCount,seeAllUri:t.uri,pageId:t.uri,index:n,title:i,id:t.uri,logShelfImpressions:!0,children:t.sectionItems.items.map(((e,t)=>{if("TrackResponseWrapper"!==e.content.__typename||"Track"!==e.content.data.__typename)return null;const i=e.content.data;return(0,k.jsx)(ui.O,{title:i.name,trackUri:i.uri,artists:i.artists.items,album:i.albumOfTrack,contentRating:i.contentRating,referrerIdentifier:"home",index:t},i.uri)}))})})});var mi=i(5244);const pi=({spec:e,section:t,index:i})=>(0,k.jsx)(Ie.r,{spec:e.shelvesFactory(),children:(0,k.jsx)(mi.RecentlyPlayed,{title:t.data.title?.text??void 0,showAll:!1,index:i})});var hi=i(65551),gi=i(84608),fi=i(63818),vi=i(47315),yi=i(57276);const bi="mwc_1Zp_E6v9sr0fTnL1",_i="Zg_jTjYYhVRuKwqeO4s3",Ei="X3QSU3mxBfBtfhpubU5I",Ci="ZMRUy3XCzjoj3U3v8zNb",xi="Fj9nUGnQyCPsnhDKLx7n",Si="knJzYlLp6ylpADL42ohP",Ai=({canvas:e,canvasContainerClass:t,mouseHoverRef:i,onCardLoaded:r})=>{const a=(0,se.j)();if((0,n.useEffect)((()=>{!a&&e?.fileId&&e?.uri||r?.()}),[a,r,e?.fileId,e?.uri]),!a&&e?.fileId&&e?.uri)return(0,k.jsx)(H.Gg,{className:xi,fileId:e.fileId,playerContainerClass:t,canvasUri:e.uri,playbackType:H.RT.LoopOnHover,mouseHoverRef:i,onLoaded:r});const s=(0,$.g)(e?.thumbnail?.sources,{desiredSize:300,desiredLabel:"standard"});return(0,k.jsx)(yi._,{className:Ci,src:s?.url,loading:"lazy",testid:"card-image",fadeIn:!0,children:(0,k.jsx)(nt.e,{size:"xxlarge"})})},Ti=({uri:e,index:t,canvas:i,sectionUri:r,discoveryFeedUri:a,uri:s,canvasContainerClass:o,title:l})=>{const{open:c}=(0,vi.P)(),{spec:u,logger:d}=(0,ce.r)(fi.y,{data:{position:t,uri:e,reason:"watch-feed-card"}}),m=(0,At.t)(u),[p,h]=(0,n.useState)(!1),g=()=>{const e=u.hitUiReveal();d.logInteraction(e),c(r,a,s)},f=(0,n.useRef)(null);return(0,k.jsxs)("div",{className:bi,tabIndex:0,role:"button",onClick:g,ref:f,onKeyDown:e=>{"Enter"===e.key&&g()},children:[(0,k.jsxs)("div",{className:Ei,ref:m,children:[!p&&(0,k.jsx)("div",{className:_i}),(0,k.jsx)(Ai,{canvas:i,canvasContainerClass:o,mouseHoverRef:f,onCardLoaded:()=>h(!0)})]}),(0,k.jsx)("div",{className:Si,children:(0,k.jsx)(gi.Z,{variant:"ballad",lineClamp:2,title:l,dir:"auto",children:l})})]})},Ii="a_zIjVculIT6AAmqITi3",Ni="Flfusx_bjoqsdTvLD3n9";const wi=({shelfTitle:e,section:t,spec:i,index:r})=>{const a=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,oe.w)({refOrElement:a,observeOnly:"width",observeOnMount:!0,onResize:()=>{const e=s.current;if(!e)return;const t=e.children[0];if(!t)return;const i=t.getBoundingClientRect().top;for(const t of e.children)t.nodeType===Node.ELEMENT_NODE&&(t.getBoundingClientRect().top>i?t.style.display="none":t.style.display="block")}}),(0,k.jsx)(Ie.r,{spec:i.shelvesFactory(),children:(0,k.jsxs)("section",{className:Ii,ref:a,children:[(0,k.jsx)($e.k,{title:e}),(0,k.jsx)("div",{className:Ni,ref:s,children:t.sectionItems.items.map(((e,t)=>"DiscoveryFeedResponseWrapper"===e.content.__typename&&"DiscoveryFeed"===e.content.data.__typename?((e,t,i)=>{if("TrackResponseWrapper"!==e.firstItem?.__typename||"Track"!==e.firstItem.data.__typename)return null;const n=e.firstItem.data;return(0,k.jsx)(Ti,{index:i,uri:n.uri,sectionUri:"spotify:section:0JQ5DABRtFWApcy61XJEvU",discoveryFeedUri:t,canvas:n.canvas,title:e.title??"",canvasContainerClass:`Home_WatchFeed_Canvas_${r}_${i}`},`${n.uri}-${i}`)})(e.content.data,e.uri,t):null))})]})})};var Ri=i(2983),ki=i(40223);const Oi=({spec:e,greeting:t,section:i,index:n})=>{const a=(0,ki.b8)(),s=(0,r.NC)(Z.BYw),o=(0,r.NC)(Z.hWV),l=(0,r.NC)(Z.k6b),c=(0,r.NC)(Z.sZb);switch(i.data?.__typename){case"HomeGenericSectionData":return(0,k.jsx)(Ut,{spec:e,section:(0,K.M)(i,i.data),index:n});case"HomeShortsSectionData":return(0,k.jsx)(hi.$,{spec:e,greeting:t,section:(0,K.M)(i,i.data)});case"HomeRecentlyPlayedSectionData":return(0,k.jsx)(pi,{spec:e,section:(0,K.M)(i,i.data),index:n});case"HomeGridSectionData":return o?(0,k.jsx)(ci,{spec:e,index:n,section:(0,K.M)(i,i.data)}):null;case"HomePromotionSectionData":return c?(0,k.jsx)(Tt,{section:(0,K.M)(i,i.data),spec:e}):null;case"HomeSpotlightSectionData":return l?(0,k.jsx)(Mt,{spec:e,section:(0,K.M)(i,i.data)}):null;case"HomeNativeAdsSectionData":case"HomeOnboardingSectionData":case"HomeOnboardingSectionDataV2":return null;case"HomeYourDJSectionData":{const e=(0,K.M)(i,i.data),{data:t,sectionItems:n}=e,r=n.items[0];if(a(i,i.data)&&"PlaylistResponseWrapper"===r.content.__typename&&"Playlist"===r.content.data.__typename){const{data:e}=r.content;return(0,k.jsx)(Ri.ed,{uri:e.uri,shelfTitle:t.title?.text??"",title:e.name,description:e.description??""})}return null}case"HomeWatchFeedSectionData":if(s){const t=(0,K.M)(i,i.data);return(0,k.jsx)(wi,{shelfTitle:i.data.title?.text??"",spec:e,index:n,section:t})}return null;case"HomeFeatureActivationSectionDataV2":return(0,k.jsx)(qe.G,{sectionItems:i.sectionItems.items,uri:i.uri,localStorageKey:i.data.localStorageKey});case"HomeMusicVideosSectionData":return(0,k.jsx)(di,{shelfTitle:i.data.title?.text??"",spec:e,section:(0,K.M)(i,i.data),index:n});case"HomeFeedBaselineSectionData":case"HomeFeatureActivationSectionData":case null:case void 0:return null;default:return(0,Oe.k)(i.data),null}};const Pi=({spec:e,greeting:t,container:i})=>{const a=(0,r.NC)(Z.q4i),s=(0,n.useMemo)((()=>((e,t)=>{const i=[];let n=[],r=!1;const a=e.sections.items,s=e.sections.items.reduce(((e,i)=>{if("HomeFeedBaselineSectionData"===i.data?.__typename){if(t&&!r){const t={uri:"spotify:home:feed-baseline-unified-shelf",items:(a.filter((e=>"HomeFeedBaselineSectionData"===e.data?.__typename))??[]).reduce(((e,t)=>(t.sectionItems.items.forEach((i=>{e.push({uri:i.uri,content:i.content,recsplanation:t.data})})),e)),[])};r=!0,e.push({localOverrideTypename:"HomeFeedBaselineUnifiedShelf",localItem:t})}return e}return e.push({localOverrideTypename:!1,item:i}),e}),[]);return n=function(e){const t=e.sections.items;return t.length>0&&"HomeShortsSectionData"===t[0].data?.__typename}(e)?[s[0],...i,...s.slice(1)]:[...i,...s],n})(i,a)),[i,a]),o=function(e){const t=(0,r.NC)(Z.q4i),i=(0,n.useMemo)((()=>t?e.sections.items.reduce(((e,t)=>("HomeFeedBaselineSectionData"===t.data?.__typename&&(0,K.M)(t,t.data).sectionItems.items.forEach((t=>{const{content:i}=t;if((0,q.v)(i)){const{data:t}=i;"GenericError"!==t.__typename&&"NotFound"!==t.__typename&&"RestrictedContent"!==t.__typename&&"DiscoveryFeed"!==t.__typename&&e.push(t.uri)}})),e)),[]):[]),[e,t]),{data:a}=W({uris:i},{enabled:i.length>0,gcTime:Y.gO,staleTime:Y.jl});return(0,n.useMemo)((()=>J(i,a)),[a,i])}(i);return(0,k.jsx)(k.Fragment,{children:(0,k.jsx)(Q.Provider,{value:o,children:s.map(((i,n)=>"HomeFeedBaselineUnifiedShelf"===i.localOverrideTypename?(0,k.jsx)(Ye,{spec:e,section:i.localItem,index:n},`${n}-${i.localItem.uri}`):(0,k.jsx)(Oi,{spec:e,greeting:t,section:i.item,index:n},`${n}-${i.item.uri}`)))})})}},65551:(e,t,i)=>{"use strict";i.d(t,{$:()=>Ce,P:()=>Ee});var n=i(30758),r=i(97500),a=i.n(r),s=i(81987),o=i(82097),l=i(89333),c=i(91494),u=i(36315),d=i(69725),m=i(73671),p=i(61544),h=i(11808),g=i(71588),f=i(88778),v=i(17202),y=i(58345),b=i(40440),_=i(38916),E=i(21383),C=i(75456),x=i(16972),S=i(85065),A=i(94313),T=i(85993),I=i(33956),N=i(86070);const w=(0,n.memo)((function({item:e}){const t=(0,x.T)(e.uri),i=e.duration_ms??0,{isPlaying:n,isActive:r}=(0,T.te)(e.uri),[a]=(0,A.S)(1e4,(t=>t.item?.uri===e.uri)),s=e.resume_point?.resume_position_ms??0,o=n||r?a:s,l=Math.round(100/(i/o)),c=t===S.kw.YES,u=i&&o>0;return c||u?(0,N.jsxs)("div",{className:I.A.episodeExtraContent,children:[c?(0,N.jsx)(E.F,{size:"small",semanticColor:"textBrightAccent",className:I.A.iconDownloaded}):null,u?(0,N.jsx)(C.z,{className:I.A.episodeProgressBar,value:l,semanticColor:"essentialBase"}):null]}):null}));var R=i(9183),k=i(12783),O=i(23398),P=i(24226),L=i(59996),j=i(82455),D=i(27685),M=i(14627),U=i(63574),B=i(45346),F=i(24189),H=i(76104),V=i(65876),G=i(42582),z=i(72091),W=i(53209);const K=n.memo((function({index:e,item:t,image:i,showPlayButton:r,extraContent:s,size:o,playInsteadOfNavigating:c=!1,onContextMenu:u=(()=>{}),onTouchStart:d=(()=>{}),onTouchEnd:m=(()=>{})}){const h=(0,R.Zp)(),g=(0,B.W)(),{setColorFromUri:f,resetColor:v,clearColor:y}=(0,l.$X)(),b=(0,j.hD)(t.uri,t.release_date,t.resume_point?.resume_position_ms,t.resume_point?.fully_played),{spec:_,logger:E}=(0,z.r)(O.X,{data:{position:e,uri:t.uri}}),{isPlaying:C,isActive:x,togglePlay:S}=(0,G.P)({uri:t.uri},{featureIdentifier:"home",referrerIdentifier:"home"}),A=(0,p.o_)(t.uri),T=(0,U.W)({type:"link",uri:t.uri}),w=(0,n.useCallback)((()=>{g({targetUri:t.uri,intent:C?"pause":"play",type:"click"});const e=_.playButtonFactory();let i;i=C?e.hitPause({itemToBePaused:t.uri}):x?e.hitResume({itemToBeResumed:t.uri}):e.hitPlay({itemToBePlayed:t.uri});const n=E.logInteraction(i);S({loggingParams:n})}),[x,C,t.uri,E,g,_,S]),K=(0,n.useCallback)((()=>{g({targetUri:t.uri,intent:"navigate",type:"click"});const e=_.hitUiNavigate({destination:t.uri});E.logInteraction(e)}),[t.uri,E,g,_]),Y=(0,n.useCallback)((()=>{if(c)return void w();let e;K(),A&&(e=A.toURLPath(!0));const t=T?(0,W.hF)(e||""):e;t&&h(t)}),[c,K,A,T,w,h]),q=(0,n.useCallback)((()=>{f(t.uri)}),[t.uri,f]),{extractedHomeAdColorRef:Z}=(0,P.bT)(),$=(0,F.as)(),Q=(0,V.A)((()=>Z.current?$((0,F.Mo)(Z.current.colorRaw)):y()));(0,n.useEffect)((()=>Q),[Q]);const{draggable:J,onDragStart:X}=(0,M.P)({itemUris:[t.uri],dragLabelText:t.name});return(0,N.jsx)("div",{className:I.A.shortcut,onContextMenu:u,onTouchStart:d,onTouchEnd:m,onMouseEnter:q,onMouseLeave:v,children:(0,N.jsxs)("div",{className:I.A.draggable,draggable:J,onDragStart:X,children:[i,(0,N.jsxs)("div",{className:I.A.main,children:[(0,N.jsxs)("div",{className:I.A.content,children:[(0,N.jsx)("div",{className:I.A.nameContainer,children:(0,N.jsx)(L.N,{to:t.uri,onClick:K,title:t.name,children:(0,N.jsx)(k.E,{as:"p",variant:"small"===o?"bodySmallBold":"bodyMediumBold",className:a()(I.A.name),children:t.name})})}),s||null]}),(0,N.jsxs)("div",{className:I.A.trailingIndicator,children:[(r||C)&&(0,N.jsxs)("div",{className:I.A.PlayButtonContainer,children:[C&&(0,N.jsx)(H.J,{className:I.A.equaliser,animated:!0}),r&&(0,N.jsx)(D.R,{className:I.A.playButton,isPlaying:C,onClick:w,size:"small"===o?"small":"medium"})]}),b&&!C&&(0,N.jsx)(j.Tc,{className:I.A.shortcutNewEpisodeIndicator})]})]}),(0,N.jsx)("div",{onClick:Y,className:I.A.shortcutLink})]})})}));var Y=i(57276),q=i(3554);const Z=(0,n.memo)((function({images:e=[],fallbackIcon:t=c.e}){const i=(0,q.g)(e);return(0,N.jsx)("div",{className:I.A.imageContainer,children:(0,N.jsx)("div",{className:I.A.imageWrapper,children:(0,N.jsx)(Y._,{className:I.A.image,src:i?.url,loading:"lazy",testid:"shortcut-image",children:(0,N.jsx)(t,{"aria-hidden":!0})})})})}));var $=i(2983),Q=i(10608);const J=n.memo((function(e){return(0,p.Z0)(e.item.uri)?(0,N.jsx)(K,{...e,image:(0,N.jsx)(Z,{images:e.item.images,fallbackIcon:c.e}),showPlayButton:e.showPlayButton}):(0,Q.c0)(e.item.uri)?(0,N.jsx)(g.h,{menu:(0,N.jsx)($.gb,{}),children:(0,N.jsx)(K,{...e,image:(0,N.jsx)(Z,{images:e.item.images,fallbackIcon:c.e}),playInsteadOfNavigating:!0})}):(0,N.jsx)(g.h,{menu:(0,N.jsx)(b.W,{uri:e.item.uri}),children:(0,N.jsx)(K,{...e,image:(0,N.jsx)(Z,{images:e.item.images,fallbackIcon:c.e})})})})),X=n.memo((function(e){return(0,N.jsx)(g.h,{menu:(0,N.jsx)(f.h,{uri:e.item.uri}),children:(0,N.jsx)(K,{...e,image:(0,N.jsx)(Z,{images:e.item.images,fallbackIcon:u.I})})})})),ee=n.memo((function(e){return(0,N.jsx)(g.h,{menu:(0,N.jsx)(v.t,{uri:e.item.uri}),children:(0,N.jsx)(K,{...e,image:(0,N.jsx)(Z,{images:e.item.images,fallbackIcon:d.r})})})})),te=n.memo((function(e){return(0,N.jsx)(g.h,{menu:(0,N.jsx)(_.H,{uri:e.item.uri}),children:(0,N.jsx)(K,{...e,image:(0,N.jsx)(Z,{images:e.item.images,fallbackIcon:m.L}),showPlayButton:!1})})})),ie=n.memo((function(e){const t=e.item.podcast?.images??e.item.images;return(0,N.jsx)(g.h,{menu:(0,N.jsx)(y.b,{uri:e.item.uri}),children:(0,N.jsx)(K,{...e,showPlayButton:!0,image:(0,N.jsx)(Z,{images:t,fallbackIcon:m.L}),extraContent:(0,N.jsx)(w,{...e})})})}));var ne=i(57386),re=i(36269);const ae="J6UEDIqMSJhYlwGoeUZB",se="ZjFf4lVC48DSryAjP9qB",oe=n.memo((function(e){const t=(0,re.u)(),i={...e.item,...t};return(0,N.jsx)(K,{...e,item:i,image:(0,N.jsx)(Z,{images:e.item.images,fallbackIcon:()=>(0,N.jsx)("div",{className:ae,children:(0,N.jsx)(ne.P,{iconSize:"large",className:se})})})})}));var le=i(4594),ce=i(52608),ue=i(19159),de=i(26969),me=i(70812),pe=i(75621),he=i(71817);const ge=e=>{if(null!==e&&"object"==typeof e){const{type:t}=e;return t===he.c.YOUR_EPISODES}return!1},fe=n.memo((function({title:e,tagline:t,items:i}){const{fetchMultipleColors:r}=(0,l.$X)(),o=!(0,ce.n)(),c=e??(()=>{const e=(new Date).getHours();let t=h.Ru.get("home.evening");return e>=5&&e<12?t=h.Ru.get("home.morning"):e>=12&&e<18&&(t=h.Ru.get("home.afternoon")),t})(),u=(0,s.NC)(ue.kSk),d=(0,s.NC)(ue._SF);(0,n.useEffect)((()=>{const e=i?.map(l.cU)||[];r(e)}),[i,r]);const[m,g]=(0,n.useState)("small"),f=(0,n.useRef)(null);if((0,de.w)({onResize:({width:e})=>{e<1141&&"small"!==m?g("small"):e>=1141&&"large"!==m&&g("large")},refOrElement:f}),o||!i?.length)return null;const v=i.filter(((e,t)=>ge(e)||!e.error)).filter(((e,t)=>t<(d?8:6))),y=v.length%4==0;return(0,N.jsxs)("section",{className:I.A.shortcuts,"aria-label":c,ref:f,children:[!u&&(0,N.jsx)(le.k,{title:c,subtitle:t,titleVariant:"titleMedium"}),(0,N.jsx)("div",{className:a()(I.A.grid,{[I.A.gridOf4Columns]:y}),children:v.map(((e,t)=>{if(ge(e))return(0,N.jsx)(oe,{index:t,item:e,showPlayButton:!0,shouldSetBackgroundColor:0===t,size:m},`${t}-${e.uri}`);const i=function(e){const t=((0,p.o_)(e)||{}).type;switch(t){case p.NQ.ARTIST:return ee;case p.NQ.ALBUM:case p.NQ.COLLECTION_ALBUM:return X;case p.NQ.PLAYLIST:case p.NQ.PLAYLIST_V2:return J;case p.NQ.SHOW:return te;case p.NQ.EPISODE:return ie;case p.NQ.COLLECTION:return J;default:return console.warn(`Unable to resolve entity shortcut from ${e} of type "${t||"unknown"}"`),te}}(e.uri);return(0,N.jsx)(i,{index:t,item:e,showPlayButton:!(0,me.p)(e.formatListAttributes),shouldSetBackgroundColor:0===t,size:m},`${t}-${e.uri}`)}))})]})})),ve=e=>(0,N.jsx)(o.s,{onError:e=>{(0,pe.Jy)(e,"HomeShortcutsGrid")},children:(0,N.jsx)(fe,{...e})});var ye=i(5492),be=i(75235),_e=i(17869);const Ee="home-shortcuts-override";const Ce=({spec:e,greeting:t,section:i})=>{const n=i.sectionItems.items.map(ye.b1);let r=function(){const[e]=(0,be.x)(Ee,[]);return e}().concat(n);return r.length<8&&r.length%2!=0&&(r=r.slice(0,r.length-1)),(0,N.jsx)(_e.r,{spec:e.shortcutsFactory(),children:(0,N.jsx)(ve,{items:r,title:t??void 0})})}},68046:(e,t,i)=>{"use strict";i.d(t,{f:()=>o,q:()=>l});var n=i(30758),r=i(42674),a=i(44237),s=i(86070);const o=(0,n.memo)((({cardCount:e,showAll:t,withTitle:i})=>(0,s.jsx)(a._,{isLoading:!0,withTitle:i,showAll:t??!1,children:[...new Array(e).keys()].map(((e,t)=>(0,s.jsx)(r.u,{isLoading:!0},t)))}))),l=(0,n.memo)((({cardCount:e})=>(0,s.jsx)(s.Fragment,{children:[...new Array(e).keys()].map(((e,t)=>(0,s.jsx)(r.M,{isLoading:!0},t)))})))},42750:(e,t,i)=>{"use strict";i.d(t,{JI:()=>c,ZZ:()=>d,iL:()=>u});var n=i(30758),r=i(36485),a=i(86070);function s(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,n.createContext)(void 0),l=(0,n.createContext)((()=>{})),c=({children:e})=>{const[t,i]=(0,n.useReducer)(s,{isOpen:!1});return(0,a.jsx)(l.Provider,{value:i,children:(0,a.jsx)(o.Provider,{value:t,children:e})})};function u(){const e=(0,n.useContext)(o);if(void 0===e)throw new Error("useLanguageSelectionModalState must be used within a LanguageSelectionModalContextProvider");return e}function d(){const e=(0,n.useContext)(l);if(void 0===e)throw new Error("useLanguageSelectionModalDispatch must be used within a LanguageSelectionModalDispatchContextProvider");return e}},45109:(e,t,i)=>{"use strict";i.d(t,{b:()=>x});var n=i(30758),r=i(11808),a=i(71188),s=i(4584),o=i(15549),l=i(42832),c=i(69915),u=i(67984),d=i(65159),m=i(45546),p=i(46288),h=i(73516),g=i(95302),f=i(11898),v=i(79303),y=i(7353),b=i(3554),_=i(86070);const E=new Set(l.gc),C=new Set([]),x=n.memo((function({nrTracks:e,collectionUri:t,initialItems:i,uri:x,sortable:S=!0,scrollToUri:A,usePlayContextItem:T,outerDomRef:I,spec:N,isCompactMode:w=!1,tagFilter:R}){const k=(0,f.f)(),O=(0,n.useRef)(null),{filter:P}=(0,n.useContext)(o.g),L=(0,n.useRef)((()=>{})),[j,D]=(0,n.useState)([]),{sortState:M,setSortState:U}=(0,n.useContext)(l.cL),B=(0,v.s)(),F=(0,c.w)(),H=(0,n.useCallback)(((e,t)=>{e===p.$.ADDED_AT?U({column:p.$.ADDED_AT,order:M.order===p.H.ASC?p.H.DESC:p.H.ASC}):U((0,a.So)(e,M)),N&&B.logInteraction(N.columnHeaderFactory({identifier:e,position:t||0}).hitSort())}),[B,U,M,N]);(0,n.useEffect)((()=>{O.current&&A&&O.current.scrollToItem({uri:A})}),[A]);const V=(0,n.useCallback)((e=>{const t=e.map((e=>e.uri));L.current(),k.remove({uris:t})}),[k]),G=(0,n.useCallback)(((e,t)=>{L.current=t,e.length>1?D(e):V(e)}),[V]),[,z]=(0,u.z1)(),W=(0,n.useCallback)((async(e,t)=>{const i=await k.getTracks({offset:e,limit:t,uri:x,sort:(0,h.c)(M),filters:[P??null,R??null].filter(y.P)}),n=i?.totalLength??0;return{items:i?.items??[],totalLength:n}}),[P,R,k,M,x]),K=(0,n.useCallback)(((e,i)=>{const n=(0,b.g)(e.album?.images,{desiredSize:40,desiredLabel:"small"});return(0,_.jsx)(d.W,{index:i,contextUri:t,uri:e.uri,isPlayable:e.isPlayable,duration_ms:e.duration.milliseconds,name:e.name,artists:e.artists,albumOrShow:e.album,isExplicit:e.isExplicit,isMixedMedia:!1,isPaywalled:!1,isUserSubscribed:!1,isLocal:e.isLocal,addedBy:[],dateAdded:e.addedAt,hasDecoratedAddedBy:!1,release_date:"",isMOGEFRestricted:e.is19PlusOnly,type:e.type,imgUrl:n?.url||"",onMove:()=>{},onInsert:()=>{},usePlayContextItem:T,allowedDropTypes:[],isDisliked:!1,playlistName:r.Ru.get("sidebar.liked_songs"),isOwnedBySelf:!0,isCompactMode:w,hasAssociatedVideo:e.hasAssociatedVideo},i+e.uri)}),[t,T,w]),Y=(0,n.useCallback)((e=>({uri:e.uri,uid:e.uri})),[]);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(g.pZ,{value:"liked-songs-tracklist",children:(0,_.jsx)(m.S4,{ariaLabel:r.Ru.get("sidebar.liked_songs"),hasHeaderRow:!0,columns:F,sortableColumns:k.getCapabilities().canSortTracksAndEpisodes&&S?E:C,sortState:M,onSort:H,renderRow:K,resolveItem:Y,onRemove:G,nrTracks:e,fetchTracks:W,limit:50,canFetchAllTracks:k.getCapabilities().canFetchAllItems,outerRef:O,outerDomRef:I,tracks:i,onNrValidItemsChange:z,isCompactMode:w,columnPersistenceKey:"liked-songs-tracklist"},t)}),(0,_.jsx)(s.F,{title:r.Ru.get("remove_from_your_liked_songs"),isOpen:j.length>0,tracks:j,onClose:e=>{e.stopPropagation(),D([])},onRemove:V})]})}))},46631:(e,t,i)=>{"use strict";i.d(t,{x:()=>I});var n=i(30758),r=i(41978),a=i(12783),s=i(11808),o=i(97500),l=i.n(o),c=i(50513);const u="lyrics-lyricsContent-lyric",d="lyrics-lyricsContent-active",m="lyrics-lyricsContent-highlight",p="lyrics-lyricsContent-unsynced",h="lyrics-lyricsContent-isInteractive",g="lyrics-lyricsContent-text",f="Zg6tXwNaAAopLykLK7Cw",v="lyrics-lyricsContent-provider";var y=i(86070);const b=n.memo((function({onObserve:e,text:t,lineNumber:i,activeLineIndex:r,isTimeSynced:a,translationText:s,onClick:o,onActiveLineChange:v,windowIsVisible:b}){const{ref:_,inView:E}=(0,c.Wx)({threshold:0}),C=(0,n.useRef)(!1);(0,n.useEffect)((()=>{C.current||E&&b&&(e(t),C.current=!0)}),[E,e,t,b]);const x=(0,n.useRef)(),S=(0,n.useRef)(!0);(0,n.useEffect)((()=>{v(x,S.current),S.current=!1}),[r,v]);const A=(0,n.useCallback)((e=>{_(e),x.current=e||void 0}),[_]);return(0,y.jsxs)("div",{dir:"auto",className:l()(u,{[h]:!!o,[d]:r===i,[m]:r>i,[p]:!a}),"":"fullscreen-lyric",ref:A,onClick:o,children:[(0,y.jsx)("div",{className:g,children:t}),s&&(0,y.jsx)("div",{className:f,children:s})]})}));var _=i(94313);const E={start:0,end:1,text:""};var C=i(15212),x=i(39733),S=i(2435);var A=i(75560),T=i(50892);const I=n.memo((function({trackUri:e,data:t,format:i,onLineClick:o,onActiveLineChange:l,isSnippet:c}){const{provider:u,providerLyricsId:d,providerDisplayName:m,syncType:p,isTimeSynced:h}=t,g=(0,r.d4)(A.s),{lyricWithEmptyLines:f,activeLineIndex:I,hasSkipped:N,shouldAnimateScroll:w}=((e,t,i)=>{const r=(0,n.useRef)(0),{lyrics:a=[],isTimeSynced:s,alternatives:o}=t,l=(0,n.useRef)(0),[c]=(0,_.f)(500,(t=>t?.item?.uri===e)),u=i?o?.find((({language:e})=>e.substring(0,2)===i.substring(0,2)))?.lines:null,d=(0,n.useMemo)((()=>[...new Array(2).fill(E),...a].map(((e,t)=>({...e,lineNumber:t,translationText:u?.[t-2]})))),[a,u]),m=s?d.findIndex((({start:e,end:t})=>c>=e&&c<t)):-1,p=l.current;l.current=m;const h=Math.abs(m-p)<=4,g=Math.abs(c-r.current)>2e3;return r.current=c,{lyricWithEmptyLines:d,activeLineIndex:m,prevActiveLineIndex:p,lineIndexDiff:m-p,shouldAnimateScroll:h,hasSkipped:g}})(e,t,g),R=function(e){const{trackUri:t,format:i,provider:r,providerLyricsId:a,syncType:s,isSnippet:o}=e,[l,c]=(0,n.useState)(!1),[u,d]=(0,n.useState)(0),[m,p]=(0,n.useState)(!1),h=(0,S.o)((e=>e?.playbackId??void 0)),g=(0,n.useMemo)((()=>(0,C.W)({lyrics_format:i,track_uri:t,provider:r,provider_lyrics_id:a,sync_type:s,playback_id:h,is_snippet:o})),[i,t,r,a,s,h,o]);(0,n.useEffect)((()=>{c(!1),d(0),p(!1);const e=setTimeout((()=>{p(!0)}),1500);return()=>{clearTimeout(e)}}),[g]);const f=(0,x.vh)();return(0,n.useEffect)((()=>{l||u>=140&&m&&(f.send(g),c(!0))}),[u,l,g,f,m]),(0,n.useCallback)((e=>{e.length>1&&d((t=>t+e.length))}),[d])}({trackUri:e,format:i,provider:u,providerLyricsId:d,syncType:p,isSnippet:c}),k=(0,T.g)();return(0,y.jsxs)(y.Fragment,{children:[f.map((({text:e,lineNumber:t,translationText:i})=>(0,y.jsx)(b,{text:e,translationText:i,lineNumber:t,activeLineIndex:I,isTimeSynced:h,onObserve:R,onClick:o&&(e=>o(e,f[t].start)),onActiveLineChange:(e,i)=>l({lineRef:e,firstUpdate:i,isFirstLine:h&&0===t,isActiveLine:h&&I===t,activeLineIndex:I,hasSkipped:N,shouldAnimateScroll:w}),windowIsVisible:"visible"===k},t))),!c&&m&&(0,y.jsx)("div",{className:v,children:(0,y.jsx)(a.E,{as:"p",variant:"bodySmall",dir:"auto",children:s.Ru.get("web-player.lyrics.providedBy",m)})})]})}))},32375:(e,t,i)=>{"use strict";i.d(t,{A:()=>Ae});var n=i(97500),r=i.n(n),a=i(41978),s=i(71306),o=i(81987),l=i(42594),c=i(61544),u=i(31685),d=i(1689),m=i(30758),p=i(12783),h=i(11808),g=i(46631),f=i(34629),v=i(99744);const y="lyrics-lyrics-contentContainer",b="lyrics-lyrics-contentWrapper",_="GML6YUVCeJvRhGznLnqm";var E=i(86070);const C=({trackUri:e,data:t,format:i,spec:n,logger:r,isSnippet:a})=>{const s=(0,v.z)(),o=(0,f.v7)(),{isTimeSynced:l}=t,c=(0,m.useCallback)(((e,t)=>{if(n&&r){const e=n.lyricsLineFactory().hitSeekToTime({msToSeekTo:t});r.logInteraction(e)}e.currentTarget.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),s.seekTo(t);const i=s.getState();i&&!i.isPaused||s.resume()}),[r,s,n]),u=(0,m.useCallback)((({lineRef:e,firstUpdate:t,isFirstLine:i,isActiveLine:n,activeLineIndex:r,hasSkipped:a,shouldAnimateScroll:s})=>{if(e.current&&o.current&&(n||i&&r<0)){const i=e.current.getBoundingClientRect().top,n=o.current.getBoundingClientRect().height,r=n/4,l=i>=r&&i<=n-r;if(!l&&!(t||a))return;const c="visible"===document.visibilityState&&s&&l?"smooth":"auto";e.current?.scrollIntoView({behavior:c,block:"center",inline:"center"})}}),[o]);return(0,E.jsx)("div",{className:y,children:(0,E.jsxs)("div",{className:b,children:[!a&&!l&&(0,E.jsx)(p.E,{as:"p",variant:"bodySmall",className:_,dir:"auto",children:h.Ru.get("web-player.lyrics.unsynced")}),(0,E.jsx)(g.x,{trackUri:e,data:t,format:i,onLineClick:l?c:void 0,onActiveLineChange:u,isSnippet:a},e)]})})};var x=i(84771),S=i(36485);const A="e7eFLioNSG5PAi1qVFT4",T="vkO5F4KbLk8mbjZoy1Lf",I=(0,m.memo)((function({version:e}){const{getMessage:t}=(()=>{const e=[h.Ru.get("web-player.lyrics.noLyrics0"),h.Ru.get("web-player.lyrics.noLyrics1"),h.Ru.get("web-player.lyrics.noLyrics2"),h.Ru.get("web-player.lyrics.noLyrics3")];return{getMessage:t=>{let i;switch(t){case"ad":i=h.Ru.get("web-player.lyrics.ad");break;case"error":i=h.Ru.get("web-player.lyrics.error");break;case"unavailable":i=e[Math.floor(Math.random()*e.length)];break;default:(0,S.k)(t),i=""}return i}}})();return(0,E.jsx)("div",{className:A,children:(0,E.jsx)("span",{className:T,children:t(e)})})}));var N=i(9183),w=i(37985),R=i(43830),k=i(16288),O=i(23679),P=i(48905);const L="hS_lrRHiW4BSWL8WcE8Q",j="O7ooKKJG0MArEwDgD6IV",D="XZ1MeB_1byeFy7W6Eg6u",M="lq_cmE3Xcg5QJhvbBnPR",U="zPI8TW58LMxEQDIq_GdA",B="lyrics",F=({spec:e,logger:t})=>{const{openURLWithSessionTransfer:i}=(0,O.L)(),n=(0,k.k)(),{url:r,isExternal:a}=n,s=(0,N.Zp)(),o=(0,m.useCallback)((()=>{const n=new URL(r),o=new URLSearchParams(n.search);o.append("ref",B),n.search=o.toString();const l=n.href;if(!1===a){const e=(0,w.PI)({ref:B});s({pathname:"/premium",search:e.toString()})}else i(l);t.logInteraction(e.lyricsUpsellFactory().lyricsUpsellButtonFactory().hitNavigateToExternalUri({destination:l}))}),[r,a,t,e,s,i]),l=(0,P.t)(e.lyricsUpsellFactory());return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:L}),(0,E.jsx)("div",{className:j,children:(0,E.jsxs)("div",{className:U,ref:l,children:[(0,E.jsx)(p.E,{semanticColor:"textBase",variant:"titleLarge",className:M,children:h.Ru.get("web-player.lyrics.upsell.title")}),(0,E.jsx)(R.$,{className:D,size:"small",onClick:o,colorSet:"invertedLight",children:h.Ru.get("web-player.lyrics.upsell.button")})]})})]})};var H=i(28875),V=i(90706),G=i(16187),z=i(58528),W=i(3869),K=i(96554),Y=i(39796),q=i(66416),Z=i(18456),$=i(83542),Q=i(91648),J=i(62283);const X="na1tzIwfHqXPiMw_7NOd",ee="lVJJcrObmZtZsWaq8H3A",te=[{volume:Q.Y9.SING_ALONG_OFF,icon:(0,E.jsx)(H.X,{size:"small"}),get label(){return h.Ru.get("singalong.off")}},{volume:Q.Y9.HIGH,icon:(0,E.jsx)(V.C,{size:"small"}),get label(){return h.Ru.get("singalong.more-vocal")}},{volume:Q.Y9.LOW,icon:(0,E.jsx)(G.D,{size:"small"}),get label(){return h.Ru.get("singalong.less-vocal")}}],ie=m.memo((function({currentTrackUri:e}){const{isSupported:t,volume:i,setVocalVolume:n}=(e=>{const t=(0,J.S)(),[i,n]=(0,m.useState)(Q.Y9.SING_ALONG_OFF),{isSupported:r}=t.getCapabilities();return(0,m.useEffect)((()=>{t.setStatus(Q.nW.DISABLED).then((()=>{n(Q.Y9.SING_ALONG_OFF)}))}),[e,t]),(0,m.useEffect)((()=>()=>{t.setStatus(Q.nW.DISABLED)}),[t]),{isSupported:r,volume:i,setVocalVolume:(0,m.useCallback)((async e=>{e===Q.Y9.SING_ALONG_OFF?await t.setStatus(Q.nW.DISABLED):await t.setStatus(Q.nW.ENABLED),await t.setVocalVolume(e),n(e)}),[t])}})(e),a=(0,m.useCallback)((e=>{t&&n(e.volume)}),[t,n]);if(!t)return null;const s=te.find((e=>e.volume===i)),o=s?.volume===Q.Y9.SING_ALONG_OFF;return(0,E.jsx)(Y.b,{menu:(0,E.jsxs)(q.W,{children:[(0,E.jsx)(Z.y,{children:h.Ru.get("singalong.title")}),te.map((e=>(0,E.jsx)($.D,{role:"menuitemradio","aria-checked":i===e.volume,"aria-label":e.label,onClick:()=>a(e),leadingIcon:e.icon,children:e.label},e.volume)))]}),children:(e,t,i)=>(0,E.jsxs)("button",{onClick:t,ref:i,type:"button",className:r()(X,{[ee]:o}),children:[o?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(z.q,{size:"small"}),(0,E.jsx)(p.E,{variant:"bodySmall",children:h.Ru.get("singalong.button")})]}):(0,E.jsxs)(E.Fragment,{children:[s.icon,(0,E.jsx)(p.E,{variant:"bodySmall",children:s.label})]}),e?(0,E.jsx)(W.J,{size:"small"}):(0,E.jsx)(K.y,{size:"small"})]})})}));var ne=i(57444),re=i(98535),ae=i(12669),se=i(19159),oe=i(52893),le=i(73513),ce=i(14403),ue=i(2435),de=i(72091);const me="lyrics-lyrics-container",pe="VznvlkEh9fhk1AKhhZwe",he="iSeDDdAUlWo8OJbCKDLw",ge="rSXzEXBdsRTaK6qSBHYg",fe="UdJMosuRv5_ySWnmSPZH",ve="zEwFftu1Dw68QKaKj_EE",ye="lyrics-lyrics-background",be=(0,E.jsx)("div",{className:ve,children:(0,E.jsx)(d.m,{})}),_e=(0,E.jsx)(I,{version:"error"}),Ee=(0,E.jsx)(I,{version:"ad"}),Ce=(0,E.jsx)(I,{version:"unavailable"}),xe={active:s.ONy,inactive:s.Ql9,passed:s.Ql9,background:s.wdA,messaging:s.ONy},Se=(e,t)=>{switch(t){case se.bYw.CONTROL:default:return e;case se.bYw.EMPTY_LYRICS:return{...e,lyrics:[]};case se.bYw.TRUNCATED_LYRICS:return{...e,lyrics:e.lyrics.slice(0,5)}}},Ae=({format:e})=>{const t=(0,re.X)(),i=(0,ce.v)((e=>e.activeDevice?.isLocal)),n=(0,ue.o)((e=>e?.item),((e,t)=>e?.uri===t?.uri)),s=n?.uri||"",{spec:d,logger:m}=(0,de.r)(l.V,{data:{uri:s}}),{data:p,loading:h,error:g}=(0,ne.I)(s,n?.images),f=(0,o.NC)(se.bOR),v=(0,o.NC)(se.JSO,{loadingValue:se.bYw.CONTROL});let y=!1,b=xe;p?.hasLyrics&&(f&&(y=p.showUpsell),v!==se.bYw.TRUNCATED_LYRICS&&v!==se.bYw.EMPTY_LYRICS||(y=!0),b={active:p.colors.activeText,inactive:p.colors.text,passed:oe.Q.fromCSS(p.colors.activeText,.7).toCSS(le.a.RGBA),background:p.colors.background,messaging:p.colors.text}),(0,ae.z)(b.background,xe.background);const _=(0,ue.o)((e=>e?.nextItems?.[0]),((e,t)=>e?.uri===t?.uri));(0,ne.I)(_?.uri,_?.images);let S=be,A=!1;if(s)if((0,c.AI)(s))S=Ee;else if(g)S=_e;else if(h)S=be;else if(p)if(p.hasLyrics){const n=i??!1;A=t&&p.hasVocalRemoval&&n,S=(0,E.jsx)(C,{trackUri:s,data:Se(p,v),format:e,spec:d,logger:m,isSnippet:y})}else S=Ce;const T=(0,a.d4)((e=>e.ads.leaderboard.isEnabled)),I={"--lyrics-color-active":b.active,"--lyrics-color-inactive":b.inactive,"--lyrics-color-passed":b.passed,"--lyrics-color-background":b.background,"--lyrics-color-messaging":b.messaging,"--show-gradient-over-lyrics":y?"block":void 0};return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(u.Q,{usePlayingItem:!0,children:"Spotify"}),(0,E.jsxs)("div",{className:r()(me,{[pe]:T}),style:I,children:[(0,E.jsx)("div",{className:ye}),S,(0,E.jsxs)("div",{className:he,children:[(0,E.jsx)("div",{className:ge,children:"cinema"!==e&&(0,E.jsx)(x.R,{})}),(0,E.jsx)("div",{className:fe,children:A?(0,E.jsx)(ie,{currentTrackUri:s}):null})]}),y&&(0,E.jsx)(F,{spec:d,logger:m})]})]})}},84771:(e,t,i)=>{"use strict";i.d(t,{R:()=>O});var n=i(30758),r=i(97500),a=i.n(r),s=i(41978),o=i(69179),l=i(5162),c=i(12783),u=i(96554),d=i(81987),m=i(11808),p=i(39796),h=i(66416),g=i(83542),f=i(57444),v=i(59189),y=i(75560),b=i(2435),_=i(62943);const E="ZEIqEgvTSLMYDUyg4fwD",C="JCMG2XpPpmwVFJCmRsv8",x="G5xyHz2quLjuzQhFHUb4",S="qYiwqn2o_ph2NxiAfCpG",A="aENlvMWeYBOLGGB34Tpl",T="GdrYdqKUxEn8rN8JLnFW",I="AH1Gz87FuBEFAIF3XbA4";var N=i(86070);const w=e=>{try{if(e){const t=new Intl.DisplayNames([e],{type:"language"}).of(e);return t?t.charAt(0).toUpperCase()+t.slice(1):e}return""}catch(t){return e||""}},R=()=>{const e=(0,s.wA)(),t=(0,b.o)((e=>e?.item),((e,t)=>e?.uri===t?.uri)),{data:i}=(0,f.I)(t?.uri||"",t?.images),r=(0,s.d4)(y.s),l=(0,n.useCallback)((()=>{e(r?(0,v.gL)(""):(0,v.gL)(navigator.language))}),[e,r]);return i?.hasLyrics&&(i.alternatives||[]).length>0?(0,N.jsx)("button",{className:E,onClick:l,children:(0,N.jsx)("div",{className:a()(S,{[x]:r}),children:(0,N.jsx)(o.H,{fill:"white",size:"small"})})}):null},k=()=>{const e=(0,s.wA)(),t=(0,b.o)((e=>e?.item),((e,t)=>e?.uri===t?.uri)),{data:i}=(0,f.I)(t?.uri||"",t?.images),r=(0,s.d4)(y.s),[d,_]=(0,n.useState)(!1),R=i?.hasLyrics&&(i.alternatives||[]).length>0,k=r&&i?.hasLyrics&&(i.alternatives||[]).find((e=>e.language.substring(0,2)===r.substring(0,2)));if(!R)return null;const O=(0,N.jsx)(h.W,{children:[{language:""},...i.alternatives||[]].map((({language:t})=>{let i=m.Ru.get("web-player.lyrics.translation.none");return t&&(i=w(t)),(0,N.jsx)(g.D,{trailingIcon:t===r?(0,N.jsx)(l.i,{size:"small",semanticColor:"textBrightAccent"}):null,role:"menuitem",onClick:()=>{e((0,v.gL)(t))},children:i},t)}))});return(0,N.jsx)("div",{className:E,children:(0,N.jsx)(p.b,{renderInline:!0,menu:O,onShow:()=>_(!0),onHide:()=>_(!1),children:(0,N.jsxs)("div",{className:a()(C,{[x]:k}),children:[(0,N.jsx)("div",{className:S,children:k?(0,N.jsx)(o.H,{fill:"black",size:"small"}):(0,N.jsx)(o.H,{size:"small"})}),(0,N.jsxs)("div",{className:I,children:[(0,N.jsx)(c.E,{variant:"bodySmallBold",children:r?k?m.Ru.get("web-player.lyrics.translating.to",w(r)):m.Ru.get("web-player.lyrics.translation.not_available",w(r)):m.Ru.get("web-player.lyrics.translate")}),(0,N.jsx)(u.y,{className:a()(A,{[T]:d}),size:"small"})]})]})})})},O=()=>{switch((0,d.NC)(_.Tc,{loadingValue:_.LZ.CONTROL})){case _.LZ.CONTROL:default:return null;case _.LZ.SYSTEM_LANGUAGE:return(0,N.jsx)(R,{});case _.LZ.ALL_LANGUAGES:return(0,N.jsx)(k,{})}}},38008:(e,t,i)=>{"use strict";i.d(t,{q:()=>y});var n=i(48446),r=i(11808),a=i(57734),s=i(30758),o=i(98584),l=i(2977),c=i(80227),u=i(29159),d=i(79303),m=i(48905),p=i(86070);const h=({merchId:e,spec:t,uri:i,url:n,images:r,description:a,merchName:h="",testId:g,index:f,merchVariant:v,variant:y})=>{const b=(0,d.s)(),_=(0,s.useMemo)((()=>t.merchCardFactory({identifier:e,uri:i,position:f})),[e,i,t,f]),E=()=>{window.open(n,"_blank");const e=_.hitNavigateToExternalUri({destination:n});b.logInteraction(e)},C=(0,m.t)(_);return(0,p.jsx)("div",{ref:C,children:(0,p.jsx)(o.Z,{variant:y,delegateNavigation:!0,index:f,onClick:E,headerText:h,featureIdentifier:"playlist",requestId:v,uri:i,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(l.M,{images:r}),renderSubHeaderContent:()=>(0,p.jsx)(c.c,{children:a?(0,p.jsx)(u.N,{source:a,onLinkClick:E}):h&&(0,p.jsxs)("span",{children:["Description: ",h]})}),testId:g})})};var g=i(95302),f=i(72091),v=i(25504);const y=({id:e,merchItems:t,merchVariant:i,uri:s})=>{const{spec:o}=(0,f.r)(n.k,{data:{identifier:e,uri:s,position:0,reason:i}});return(0,p.jsx)(g.pZ,{value:"shelf/offers","":"merch-shelf",children:(0,p.jsx)(a.$,{total:t.length,title:r.Ru.get("web-player.merch.title"),className:v.A.shelfSpace,seeAllLabel:r.Ru.get("web-player.merch.seeAllUri"),children:t.map(((e,t)=>e.url&&e.name?(0,p.jsx)(g.pZ,{value:"card",index:t,children:(0,p.jsx)(h,{index:t,url:e.url,uri:e.uri,merchName:e.name,description:e.description||"",images:e.image?.sources||[],merchVariant:i,merchId:e.uri,spec:o},e.url)},e.url):null))})})}},54015:(e,t,i)=>{"use strict";i.d(t,{b:()=>s});var n=i(37582),r=i(80913),a=i(86070);const s=({item:e,size:t,maxSize:i=t,desiredLabel:s="",className:o})=>{const l=(0,r.h)(e?.images??void 0,{desiredSize:i,desiredLabel:s});return(0,a.jsx)("div",{className:o,children:(0,a.jsx)(n.N,{loading:"eager",imgSrc:l,width:t,height:t,type:e?.type})})}},42470:(e,t,i)=>{"use strict";i.d(t,{l:()=>w});var n=i(97500),r=i.n(n),a=i(39803),s=i(11808),o=i(10115),l=i(30758),c=i(58715),u=i(12783),d=i(30171),m=i(81987),p=i(96395),h=i(64245),g=i(62338),f=i(93766),v=i(19287),y=i(91947),b=i(19159),_=i(99744),E=i(2435),C=i(41753),x=i(72091),S=i(16951),A=i(86070);const T=(0,l.memo)((()=>(0,A.jsx)(c.B,{size:"xsmall"}))),I=(0,l.memo)((({size:e="xsmall",className:t,separator:i="•",variant:n="marginal"})=>{const r=(0,_.z)(),a=s.Ru.get("npv.song-videos.switch-to-video"),{signals:o,uri:I}=(0,E.o)((e=>({signals:e?.signals,uri:e?.item?.uri}))),{videoPlayerMode:N}=(0,v.d)(),{spec:w,logger:R}=(0,x.r)(p.p6,{data:{identifier:N===y.K.cinema?p.gw.CINEMA:p.gw.DESKTOP}}),k=w.musicVideoLabelFactory({uri:I||""}),{isActive:O,panelSend:P}=(0,h.AI)(f.Z.NowPlayingView),L=(0,h.Ev)(g.$S.NPV_BUTTON_CLICK),j=(0,l.useCallback)((()=>{R.logInteraction(k.hitPlay({itemToBePlayed:I||""})),r.sendSignal(C.L.SWITCH_TO_VIDEO),!O&&L&&P(g.$S.NPV_BUTTON_CLICK)}),[L,O,R,P,r,k,I]),D=(0,m.NC)(b.LX5);return null!==o&&null!==I&&o?.includes(C.L.SWITCH_TO_VIDEO)&&D?(0,A.jsxs)("div",{className:S.A.npbSwitchButtonContainer,children:[(0,A.jsx)(d.Q,{onClick:j,iconLeading:"xsmall"===e?T:c.B,size:"small",style:{padding:"0",transform:"none"},className:t,"aria-label":a,as:"div",tabIndex:-1,children:(0,A.jsx)(u.E,{as:"span",variant:n,className:S.A.label,children:s.Ru.get("card.tag.video")})}),(0,A.jsx)(u.E,{as:"span",variant:n,children:i})]}):null}));var N=i(72556);const w=({item:e,className:t,enableVideoButton:i=!1,size:n="small",variant:l})=>(0,A.jsxs)("div",{className:r()(t,{[N.A.xsmallBadges]:"xsmall"===n}),children:[(0,o.N)(e)&&(0,A.jsx)(a.R,{semanticColor:"textPositive",title:s.Ru.get("web-player.smart-shuffle.icon-hover-label"),size:n,"":"enhance-badge"}),i&&(0,A.jsx)(I,{size:n,variant:l})]})},91573:(e,t,i)=>{"use strict";i.d(t,{d:()=>ue});var n=i(97500),r=i.n(n),a=i(42470),s=i(30758),o=i(19643),l=i(12783),c=i(81987),u=i(11808),d=i(53129),m=i(15742),p=i(8385);const h=Spicetify.GraphQL.Definitions["episodeSponsoredContent"]=new m.l("episodeSponsoredContent","query","a5c1fe722b60c29ad247ea3df57ace52043382a7f080d525f58745db78a42618",null);var g=i(64736),f=i(19159),v=i(72556),y=i(86070);const b=({item:e})=>{const t=(0,c.NC)(f.USK),i=(0,s.useRef)(null),n=(0,g.K)({ref:i}),r=(a=e.metadata?.["podcast.contains_sponsored_content"],"false"!==a&&("true"===a||void 0));var a;const m=t&&void 0===r&&"episode"===e.type,{data:b}=(_=e,E={enabled:m,gcTime:36e5,staleTime:18e5},(0,p.I)(h,_,E));var _,E;const C="Episode"===b?.episodeUnionV2.__typename&&b?.episodeUnionV2.containsSponsoredContent;return(r??C)&&t?(0,y.jsx)(d.Zp,{label:u.Ru.get("playback-info.dsa-promotional-content"),disabled:!n,children:(0,y.jsxs)("div",{className:v.A.pretitle,children:[(0,y.jsx)("div",{children:(0,y.jsx)(o.p,{size:"xsmall"})}),(0,y.jsx)(l.E,{variant:"marginal",semanticColor:"textSubdued",ref:i,className:v.A.ellipsis,children:u.Ru.get("playback-info.dsa-promotional-content")})]})}):null};var _=i(6313),E=i(36733),C=i(95141),x=i(87178),S=i(31923),A=i(40937);const T=()=>{const e=(0,S.A)(),{isPuffinPanelActive:t,togglePuffin:i}=(0,x.c)(),n=(0,s.useCallback)((()=>{t||i()}),[t,i]);return e===A.Yn.LOSSLESS||e===A.Yn.LOSSLESS_24?(0,y.jsx)("button",{className:v.A.qualityLabel,onClick:n,children:"Lossless"}):null};var I=i(61544),N=i(90250),w=i(71588),R=i(71072),k=i(36921),O=i(14627);const P=({item:e,onClick:t})=>{const{book:i}=e,n=(0,I.o_)(i.uri)?.toURLPath(!0),{draggable:r,onDragStart:a}=(0,O.P)({itemUris:[i.uri],itemMimeTypes:[k.fl.AUDIOBOOKS],dragLabelText:e.book.name});return n?(0,y.jsx)(w.h,{menu:(0,y.jsx)(R.p,{uri:i.uri}),children:(0,y.jsx)("span",{draggable:r,onDragStart:a,children:(0,y.jsx)(N.n,{item:e,onClick:t})})}):(0,y.jsx)("span",{dir:"auto",children:i.name})};var L=i(38916);const j=({item:e,onClick:t})=>{const{show:i}=e,n=(0,I.o_)(i.uri)?.toURLPath(!0),{draggable:r,onDragStart:a}=(0,O.P)({itemUris:[i.uri],dragLabelText:i.name});return n?(0,y.jsx)(w.h,{menu:(0,y.jsx)(L.H,{uri:i.uri}),children:(0,y.jsx)("span",{draggable:r,onDragStart:a,children:(0,y.jsx)(N.n,{item:e,onClick:t})})}):(0,y.jsx)("span",{dir:"auto",children:i.name})};var D=i(17202),M=i(59996);const U=({item:e,onClick:t})=>{const{draggable:i,onDragStart:n}=(0,O.P)();return(0,y.jsx)(y.Fragment,{children:e.artists.map(((e,r)=>{const a=(0,I.o_)(e.uri)?.toURLPath(!0);return(0,y.jsxs)("span",{children:[r>0?u.Ru.getSeparator():null,a?(0,y.jsx)(w.h,{menu:(0,y.jsx)(D.t,{uri:e.uri}),children:(0,y.jsx)(M.N,{to:a,"":"context-item-info-artist",dir:"auto",draggable:i,onDragStart:t=>{n(t,{itemUris:[e.uri],dragLabelText:e.name})},onClick:t,children:e.name})}):(0,y.jsx)("span",{dir:"auto",children:e.name})]},r)}))})},B=({item:e,onClick:t})=>{const{draggable:i,onDragStart:n}=(0,O.P)();return(0,y.jsx)(y.Fragment,{children:e.artists.map(((e,r)=>{const a=(0,I.o_)(e.uri)?.toURLPath(!0);return(0,y.jsxs)("span",{children:[r>0?u.Ru.getSeparator():null,a?(0,y.jsx)(w.h,{menu:(0,y.jsx)(D.t,{uri:e.uri}),children:(0,y.jsx)(M.N,{to:a,"":"context-item-info-artist",dir:"auto",draggable:i,onClick:t,onDragStart:t=>{n(t,{itemUris:[e.uri],dragLabelText:e.name})},children:e.name})}):(0,y.jsx)("span",{dir:"auto",children:e.name})]},r)}))})};var F=i(49502),H=i(36902),V=i(63135),G=i(82101),z=i(95421),W=i(95339),K=i(46159),Y=i(36485);const q=(0,s.lazy)((()=>i.e(2687).then(i.bind(i,82687)))),Z=(0,s.lazy)((()=>i.e(355).then(i.bind(i,30355)))),$=({item:e,referrer:t,onClick:i,typeVariant:n="marginal"})=>{const a=(0,E.w)(e);let o=null;const c=(0,_.XX)(e),u=(0,V.N)(e)?c?.title:e.name,d=(0,H.j)();if((0,W.v)(e))o=(0,y.jsx)(U,{item:e,onClick:i});else if((0,z.p)(e))o=(0,y.jsx)(j,{item:e,onClick:i});else if((0,G.d)(e))o=(0,y.jsx)(P,{item:e,onClick:i});else if((0,V.N)(e)){if(t===F.G.NPV)return null;o=(0,y.jsx)(s.Suspense,{fallback:!0,children:a?(0,y.jsx)(Z,{item:e,surface:"NPB",variant:"marginal"}):(0,y.jsx)(q,{item:e,onClick:i})})}else(0,K.v)(e)?o=(0,y.jsx)(B,{item:e,onClick:i}):(0,Y.d)(e);return(0,y.jsxs)("div",{className:r()(v.A.subtitle,v.A.subtitleWithGap),children:[(0,y.jsx)(C.r,{title:u,children:(0,y.jsx)(l.E,{"":"context-item-info-subtitles",as:"div",variant:n,className:v.A.subtitle,semanticColor:"textSubdued",children:o})},e.uri),d&&t===F.G.NPB&&(0,y.jsx)(T,{})]})};var Q=i(41978),J=i(51306),X=i(21441),ee=i(29184);const te=({item:e,onClick:t,isNowPlayingView:i=!1})=>{const n=(0,Q.wA)(),{title:r,url:a}=(0,_.XX)(e),s=i?J.V.AD_NPV:J.V.NPB;return(0,y.jsx)(ee.R,{item:e,adUrl:a,onClick:e=>(t?.(e,a??void 0),n((0,X.q5)(J.c.ADVERTISER_TITLE,s))),children:r})};var ie=i(80243);const ne=({item:e,context:t,onClick:i})=>(0,y.jsx)(w.h,{menu:(0,y.jsx)(ie.W,{context:t,item:e}),children:(0,y.jsx)(ee.R,{item:e,onClick:i,children:e.name})});var re=i(36321);const ae=({item:e,context:t,onClick:i})=>{const{draggable:n,onDragStart:r}=(0,O.P)({itemUris:[e.uri],dragLabelText:(0,re.r)(e)});return(0,y.jsx)(w.h,{menu:(0,y.jsx)(ie.W,{context:t,item:e}),children:(0,y.jsx)("span",{draggable:n,onDragStart:r,children:(0,y.jsx)(ee.R,{item:e,onClick:i,children:e.name})})})},se=({item:e,context:t,onClick:i})=>{const{draggable:n,onDragStart:r}=(0,O.P)();return(0,y.jsx)(w.h,{menu:(0,y.jsx)(ie.W,{context:t,item:e}),children:(0,y.jsx)("span",{draggable:n,onDragStart:t=>{r(t,{itemUris:[e.uri],dragLabelText:(0,re.r)(e)})},children:(0,y.jsx)(ee.R,{item:e,onClick:i,children:e.name})})})},oe=({item:e,context:t,onClick:i})=>{const{draggable:n,onDragStart:r}=(0,O.P)();return(0,y.jsx)(w.h,{menu:(0,y.jsx)(ie.W,{context:t,item:e}),children:(0,y.jsx)("span",{draggable:n,onDragStart:t=>{r(t,{itemUris:[e.uri],dragLabelText:(0,re.r)(e)})},children:(0,y.jsx)(ee.R,{item:e,onClick:i,children:e.name})})})},le=(0,s.lazy)((()=>i.e(641).then(i.bind(i,20641)))),ce=({context:e,item:t,onClick:i,typeVariant:n="bodySmall",isNowPlayingView:r=!1})=>{const a=(0,E.w)(t);let o=null;const c=(0,_.XX)(t),u=(0,V.N)(t)?c?.title:t.name;return(0,z.p)(t)?o=(0,y.jsx)(ae,{onClick:i,item:t,context:e}):(0,W.v)(t)?o=(0,y.jsx)(se,{onClick:i,item:t,context:e}):(0,G.d)(t)?o=(0,y.jsx)(ne,{onClick:i,item:t,context:e}):(0,V.N)(t)?o=(0,y.jsx)(s.Suspense,{fallback:!0,children:a?(0,y.jsx)(le,{item:t,surface:"NPB",variant:"bodySmall"}):(0,y.jsx)(te,{onClick:i,item:t,isNowPlayingView:r})}):(0,K.v)(t)?o=(0,y.jsx)(oe,{onClick:i,item:t,context:e}):(0,Y.d)(t),(0,y.jsx)("div",{className:v.A.title,children:(0,y.jsx)(C.r,{title:u,children:(0,y.jsx)(l.E,{"":"context-item-info-title",as:"div",variant:n,className:v.A.title,dir:"auto",children:o})},t.uri)})},ue=({context:e,item:t,referrer:i,className:n,titleTypeVariant:s,subtitleTypeVariant:o,onTitleClick:l,onSubtitleClick:c,enableVideoButton:u=!1,size:d="small"})=>(0,y.jsxs)("div",{className:r()(n,v.A.container),children:[i!==F.G.NPV&&(0,y.jsx)(b,{item:t}),(0,y.jsx)(ce,{context:e,item:t,onClick:(e,t)=>l?.(t),typeVariant:s,isNowPlayingView:i===F.G.NPV}),(0,y.jsx)(a.l,{className:v.A.badges,item:t,enableVideoButton:u,size:d}),(0,y.jsx)($,{item:t,onClick:(e,t)=>c?.(t),typeVariant:o,referrer:i})]})},49502:(e,t,i)=>{"use strict";i.d(t,{G:()=>n});let n=function(e){return e.NPV="npv",e.NPB="npb",e}({})},80243:(e,t,i)=>{"use strict";i.d(t,{W:()=>f});var n=i(99686),r=i(58345),a=i(49350),s=i(48100),o=i(11098),l=i(10115),c=i(8144),u=i(10608),d=i(82101),m=i(95421),p=i(95339),h=i(46159),g=i(86070);const f=({context:e,item:t,canSwitchVisuals:i=!1})=>{const{isSongVideo:f}=(0,c.k)(),v=f?o.o:s.P;return(0,p.v)(t)?t.isLocal?(0,g.jsx)(a.A,{uid:t.uid??"",uri:t.uri,contextUri:e.uri}):(0,g.jsx)(v,{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:i}):(0,m.p)(t)?(0,g.jsx)(r.b,{uri:t.uri,uid:t.uid??"",contextUri:e.uri??""}):(0,d.d)(t)?(0,g.jsx)(n.r,{uri:t.uri}):(0,u.bJ)(e,t)?null:(0,h.v)(t)?(0,g.jsx)(s.P,{uri:t.uri,uid:t.uid??"",contextUri:e.uri??"",provider:t.provider,canSwitchVisuals:i}):null}},16337:(e,t,i)=>{"use strict";i.d(t,{R:()=>d});var n=i(30758),r=i(41978),a=i(61544),s=i(35293),o=i(72953),l=i(14627),c=i(45346),u=i(86070);const d=({uri:e,owner:t,children:i})=>{const d=(0,r.wA)(),m=(0,c.W)(),p=(0,r.d4)((e=>e.session.user?.id)),h=(0,a.tb)(e),g=(0,n.useCallback)(((t,i)=>{const n=[...i[l.O[a.NQ.ALBUM]]||[],...i[l.O[a.NQ.TRACK]]||[],...i[l.O[a.NQ.LOCAL_TRACK]]||[],...i[l.O[a.NQ.EPISODE]]||[]];n.length>0&&(d((0,s.io)(e,n)),m({targetUri:e,intent:"add",type:"drop"}))}),[d,m,e]);return h&&t===p?(0,u.jsx)(o.A,{types:[l.O[a.NQ.ALBUM],l.O[a.NQ.TRACK],l.O[a.NQ.EPISODE],l.O[a.NQ.LOCAL]],onDrop:g,testId:"cover-drop-target",children:i}):(0,u.jsx)(u.Fragment,{children:i})}},55571:(e,t,i)=>{"use strict";i.d(t,{a:()=>h});var n=i(30758),r=i(97500),a=i.n(r),s=i(11808),o=i(37065),l=i(9829),c=i(73015),u=i(37637),d=i(94961),m=i(95339),p=i(86070);const h=({context:e,item:t,className:i,onClick:r=(()=>{})})=>{const{dislikeEndpoint:h,shouldShowFeedbackControls:g}=(0,l.d)(e),{enqueueSnackbar:f}=(0,c.d)(),v=e.metadata?.[d.W.CONTEXT_DESCRIPTION]??"",{setDislikeFeedback:y}=(0,u.I)({uri:t.uri,setFeedbackPath:h,contextUri:e.uri}),b=(0,n.useCallback)((async()=>{y(),f(s.Ru.get("feedback.hide-song",v)),r?.()}),[y,f,v,r]);return(0,m.v)(t)&&g?(0,p.jsx)(o.O,{className:a()(i,{"control-button":!i,"control-button-feedback":!i}),isDisliked:!1,onClick:b}):null}},33440:(e,t,i)=>{"use strict";i.d(t,{x:()=>G});const n="playback-bar",r="playback-bar__progress-time-elapsed",a="gglUjikTBtMzCZFgSmpS",s="dN6OLjjcmnuleiECu55A",o="DSdahCi0SDG37V9ZmsGO",l="playback-progressbar-container";var c=i(30758),u=i(97500),d=i.n(u),m=i(41978),p=i(12783),h=i(81987),g=i(11808),f=i(21048),v=i(10239),y=i(45879),b=i(75235),_=i(80913);const E="main-playbackBarRemainingTime-container";var C=i(86070);const x=({position:e,duration:t,isPreview:i,semanticColor:n="textSubdued",isFullscreenMode:r=!1,className:a})=>{const[s,o]=(0,b.x)(y.fC,!1),l=(0,c.useCallback)((()=>{i||o(!s)}),[s,o,i]);return(0,C.jsx)(p.E,{as:"div","":"playback-duration","data-test-position":e,variant:r?"bodyMedium":"marginal",className:d()(E,a),onClick:l,semanticColor:n,children:s?`-${(0,_.f)(t-e)}`:(0,_.f)(t)})};var S=i(84492),A=i(2435),T=i(95339);const I="Bn7RYdPUyzN4qo1bC1Ic",N="OEe8k2xe6o6x9x0FAc4b",w=[{name:"Anakin",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"7px","--core-color":"white","--edge-glow-color":"rgb(55, 132, 214)","--blur-glow-color":"#2e77d0","--blur-radius":"16px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_anakin.png")})`,"--saber-hilt-overlap":"5px"}},{name:"Luke",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(135, 220, 90)","--blur-glow-color":"#1ed760","--blur-radius":"16px","--spread-radius":"4px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_luke.png")})`,"--saber-hilt-overlap":"5px"}},{name:"Vader",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"10px","--core-color":"white","--edge-glow-color":"rgb(229, 17, 21)","--blur-glow-color":"#cd1a2b","--blur-radius":"20px","--spread-radius":"14px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_vader.png")})`,"--saber-hilt-overlap":"6px"}},{name:"Rey",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"8px","--core-color":"white","--edge-glow-color":"rgb(249, 164, 11)","--blur-glow-color":"rgb(253, 175, 33)","--blur-radius":"20px","--spread-radius":"5px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_rey.png")})`,"--saber-hilt-overlap":"3px"}},{name:"Leia",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(55, 132, 214)","--blur-glow-color":"#2e77d0","--blur-radius":"16px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_leia.png")})`,"--saber-hilt-overlap":"2px"}},{name:"Mace",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(90, 22, 167)","--blur-glow-color":"rgb(172, 57, 193)","--blur-radius":"20px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_mace.png")})`,"--saber-hilt-overlap":"1px"}},{name:"Ahsoka",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"6px","--core-color":"white","--edge-glow-color":"rgb(255,255,255)","--blur-glow-color":"rgb(255,255,255)","--blur-radius":"20px","--spread-radius":"5px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_ahsoka1.png")})`,"--saber-hilt-overlap":"-9px","--saber-hilt-width":"100px","--saber-hilt-height":"36px"}}],R=["spotify:playlist:37i9dQZF1DXaUaRhCgtpCo","spotify:playlist:69BOXIItwwyxTgdz6flzvU","spotify:playlist:37i9dQZF1DWUgUvAPAFxdh"],k=["official_star_wars","kirbysayshi","hansencc"],O=/Star Wars/i,P="THX1138",L=P.length;function j({onChange:e}){const t=function(){const[e,t]=(0,c.useState)([]),[i,n]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{const r=r=>{for(e.push(r.key);e.length>L;)e.shift();e.join("")===P&&n(!i),t([...e])};return window.addEventListener("keypress",r),()=>{window.removeEventListener("keypress",r)}}),[e,i]),(0,A.o)((e=>{const t=e?.context.uri??"",i=e?.context?.metadata?.context_owner??"",n=e?.item??void 0;return!!R.includes(t)||!!k.includes(i)||!!(0,T.v)(n)&&(O.test(n.name)||O.test(n.album.name))}))||i}(),{next:i,config:n}=function(e){const[t,i]=(0,c.useState)(0);return{next:()=>{i((t+1)%w.length)},config:e?w[t]:null}}(t),r=(0,c.useRef)(e);return r.current=e,(0,c.useEffect)((()=>{r.current(n?.vars??null)}),[n]),n?(0,C.jsx)("div",{className:I,children:(0,C.jsx)("button",{"":"saber-hilt-button","aria-label":g.Ru.get("playback-control.a11y.lightsaber-hilt-button",n?.name),className:N,style:n.vars,onClick:i})}):null}const D=["spotify:playlist:37i9dQZF1DXc3KPAjGyPdm"];var M=i(45346),U=i(19159),B=i(99744),F=i(94313),H=i(26440);const V=1e3,G=({isPreview:e,isFullscreenMode:t=!1,timerPlacement:i="inline",onChange:u,onDragStart:y,onDragEnd:b})=>{const E=(0,h.NC)(U.O14),[S,T]=(0,c.useState)(null),I=(0,M.W)(),N=(0,B.z)(),w=(0,A.o)((e=>e),((e,t)=>e?.duration===t?.duration&&e?.hasContext===t?.hasContext&&e?.restrictions?.canSeek===t?.restrictions?.canSeek)),{seekBackward:R,seekForward:k,seekOffsetMs:O}=(0,H.p)(),P=w?.duration??0,L=w?.hasContext??!1,G=w?.restrictions?.canSeek??!1,[z,W,K]=(0,F.S)(V),[Y,q]=(0,c.useState)(null),Z=null!==Y?Y:z,$=null!==Y?Y:z+(E&&!K?V:0),Q=e=>{q(e*P),y?.()},J=(Z>0||P>0)&&"true"!==w?.item?.metadata?.is_narration,X=(0,_.f)(J?Z:NaN),ee=(0,_.f)(J?P:NaN),te=(0,m.d4)((e=>!!e?.ui?.fullscreenMode?.isOpen)),ie=(0,A.o)((e=>{const t=e?.context.uri??"";return D.includes(t)})),ne=(0,v.O)();if(t!==te)return null;const re="above"===i?s:a;return(0,C.jsxs)("div",{className:d()(n,re),children:[(0,C.jsx)(p.E,{"":"playback-position",as:"div",variant:t?"bodyMedium":"marginal",className:r,semanticColor:t?"textBase":"textSubdued",children:X}),(0,C.jsxs)("div",{className:l,children:[L?(0,C.jsx)(j,{onChange:e=>{T(e)}}):null,(0,C.jsx)(f.z2,{labelText:g.Ru.get("playback-control.a11y.seek-slider-button"),value:$,updateFrequency:V,offFrequencyUpdate:K,max:P,step:O,"aria-valuetext":g.Ru.get("download.progress-global",X,ee),isInteractive:L&&J,onDragStart:Q,onDragMove:Q,onDragEnd:(e,{wasDraggedBeforeReleased:t})=>{if(q(null),I({intent:"seek",type:"click"}),b?.(),!G)return;const i=e*P;W(i),N.seekTo(i);const n=t?"drag":"hit";u?.(i,n)},onStepBackward:()=>{if(!G)return;const e=R();W(Math.max(0,Math.min(P,z-e)))},onStepForward:()=>{if(!G)return;const e=k();W(Math.max(0,Math.min(P,z+e)))},saberConfig:S,isPlayingStrangerThings:ie,isAttackOnTitanEasterEggActive:ne,"":"playback-progressbar",enableAnimation:E})]}),(0,C.jsx)(x,{position:Z,duration:J?P:NaN,isPreview:e,semanticColor:t?"textBase":"textSubdued",isFullscreenMode:t,className:o})]})}},17580:(e,t,i)=>{"use strict";i.d(t,{x:()=>E});var n=i(97500),r=i.n(n),a=i(8159),s=i(94526),o=i(1256),l=i(43830),c=i(11808),u=i(53129),d=i(57262),m=i(25390),p=i(45346),h=i(19159),g=i(99744),f=i(2435),v=i(10132),y=i(46798);const b="main-playPauseButton-button";var _=i(86070);const E=({iconSize:e="small",onClick:t,className:i})=>{const n=(0,g.z)(),E=(0,p.W)(),{hasContext:C,isPaused:x,canPause:S,canResume:A}=(0,f.o)((e=>({hasContext:e?.hasContext,isPaused:e?.isPaused,canPause:e?.restrictions.canPause,canResume:e?.restrictions.canResume})),v.a),T=(0,a.YQ)((e=>{E({type:"click",intent:x?"play":"pause"}),x&&A?(t?.("resume"),n.resume(),(0,m.aX)(e,"play/resume")):!x&&S&&(t?.("pause"),n.pause())}),100,{leading:!0,trailing:!1}),I=x?c.Ru.get("playback-control.play"):c.Ru.get("playback-control.pause"),N={"--button-size":2*(0,y.k)(e)+"px"},w={small:"small",medium:"medium",large:"large"},R=!C||(x?!A:!S);return(0,_.jsx)(d.u,{property:h.kvg,renderOldExperience:()=>(0,_.jsx)(u.Zp,{label:I,children:(0,_.jsx)("button",{style:N,className:r()(b,i),onClick:T,disabled:R,"aria-label":I,"":"control-button-playpause",children:x?(0,_.jsx)(s.A,{size:e}):(0,_.jsx)(o._,{size:e})})}),renderNewExperience:()=>(0,_.jsx)(u.Zp,{label:I,children:(0,_.jsx)(l.$,{iconOnly:x?s.A:o._,className:i,size:w[e]||"small",disabled:R,"aria-label":I,"":"control-button-playpause",onClick:T,colorSet:"invertedLight"})})})}},39877:(e,t,i)=>{"use strict";i.d(t,{s:()=>x});var n=i(97500),r=i.n(n),a=i(42658),s=i(57841),o=i(30171),l=i(11808),c=i(53129),u=i(57262),d=i(45346),m=i(19159),p=i(54164),h=i(2435),g=i(67275),f=i(46798);const v="main-repeatButton-button",y="main-repeatButton-active",b="vW9NFcNIj8useE43Vx9G";var _=i(86070);function E(e,t,i){return t&&i?(e+1)%3:t?(e+1)%2:i?1===e?2:(e+2)%4:g.p.REPEAT_NONE}const C={[g.p.REPEAT_NONE]:{get label(){return l.Ru.get("playback-control.disable-repeat")},intent:"repeat-off",ariaChecked:"false"},[g.p.REPEAT_CONTEXT]:{get label(){return l.Ru.get("playback-control.enable-repeat")},intent:"repeat-all",ariaChecked:"true"},[g.p.REPEAT_TRACK]:{get label(){return l.Ru.get("playback-control.enable-repeat-one")},intent:"repeat-single",ariaChecked:"mixed"}},x=({iconSize:e="small",onClick:t,className:i})=>{const n=(0,d.W)(),{setRepeat:l,repeat:x}=(0,p.V)(),[S,A]=(0,h.o)((e=>[e?.restrictions.canToggleRepeatContext??!1,e?.restrictions.canToggleRepeatTrack??!1])),T=!S&&!A,I=()=>{const e=E(x,S,A);n({type:"click",intent:C[e].intent}),t?.(e),l(e)},N={"--button-size":2*(0,f.k)(e)+"px"},w=C[E(x,S,A)].label,R=x!==g.p.REPEAT_NONE;return(0,_.jsx)(u.u,{property:m.kvg,renderOldExperience:()=>(0,_.jsx)(c.Zp,{label:w,children:(0,_.jsx)("button",{style:N,className:r()(v,i,{[y]:R}),onClick:I,disabled:T,role:"checkbox","aria-checked":C[x].ariaChecked,"aria-label":w,"":"control-button-repeat",children:x===g.p.REPEAT_TRACK?(0,_.jsx)(a.I,{size:e}):(0,_.jsx)(s.B,{size:e})})}),renderNewExperience:()=>(0,_.jsx)(c.Zp,{label:w,children:(0,_.jsx)(o.H,{className:r()({[b]:R},i),iconOnly:x===g.p.REPEAT_TRACK?a.I:s.B,size:"small",disabled:T,"aria-label":w,"":"control-button-repeat",onClick:I,role:"checkbox","aria-checked":C[x].ariaChecked,semanticColor:R?"textBrightAccent":void 0})})})}},59783:(e,t,i)=>{"use strict";i.d(t,{h:()=>v});var n=i(97500),r=i.n(n),a=i(44802),s=i(30171),o=i(11808),l=i(53129),c=i(57262),u=i(45346),d=i(19159),m=i(99744),p=i(2435),h=i(46798);const g="main-seekBackButton-button";var f=i(86070);const v=({iconSize:e="small",onClick:t,className:i})=>{const n=(0,u.W)(),v=(0,m.z)(),y=(0,p.o)((e=>e?.restrictions.canSeek??!1)),b=()=>{n({type:"click",intent:"skip-back-15"}),t?.(-15e3),v.seekBackward(15e3)},_={"--button-size":2*(0,h.k)(e)+"px"};return(0,f.jsx)(c.u,{property:d.kvg,renderOldExperience:()=>(0,f.jsx)(l.Zp,{label:o.Ru.get("playback-control.skip-backward-15"),children:(0,f.jsx)("button",{style:_,className:r()(g,i),onClick:b,disabled:!y,"aria-label":o.Ru.get("playback-control.skip-backward-15"),"":"control-button-seek-back-15",children:(0,f.jsx)(a.e,{size:e})})}),renderNewExperience:()=>(0,f.jsx)(l.Zp,{label:o.Ru.get("playback-control.skip-backward-15"),children:(0,f.jsx)(s.H,{iconOnly:a.e,size:"small",onClick:b,disabled:!y,"aria-label":o.Ru.get("playback-control.skip-backward-15"),"":"control-button-seek-back-15",className:i})})})}},19558:(e,t,i)=>{"use strict";i.d(t,{v:()=>v});var n=i(97500),r=i.n(n),a=i(98856),s=i(30171),o=i(11808),l=i(53129),c=i(57262),u=i(45346),d=i(19159),m=i(99744),p=i(2435),h=i(46798);const g="main-seekForwardButton-button";var f=i(86070);const v=({iconSize:e="small",onClick:t,className:i})=>{const n=(0,u.W)(),v=(0,m.z)(),y=(0,p.o)((e=>e?.restrictions.canSeek??!1)),b=()=>{n({type:"click",intent:"skip-forward-15"}),t?.(15e3),v.seekForward(15e3)},_={"--button-size":2*(0,h.k)(e)+"px"};return(0,f.jsx)(c.u,{property:d.kvg,renderOldExperience:()=>(0,f.jsx)(l.Zp,{label:o.Ru.get("playback-control.skip-forward-15"),children:(0,f.jsx)("button",{style:_,className:r()(g,i),onClick:b,disabled:!y,"aria-label":o.Ru.get("playback-control.skip-forward-15"),"":"control-button-seek-forward-15",children:(0,f.jsx)(a.A,{size:e})})}),renderNewExperience:()=>(0,f.jsx)(l.Zp,{label:o.Ru.get("playback-control.skip-forward-15"),children:(0,f.jsx)(s.H,{iconOnly:a.A,size:"small",onClick:b,disabled:!y,"aria-label":o.Ru.get("playback-control.skip-forward-15"),"":"control-button-seek-forward-15",className:i})})})}},76576:(e,t,i)=>{"use strict";i.d(t,{u:()=>b});var n=i(97500),r=i.n(n),a=i(56013),s=i(30171),o=i(11808),l=i(53129),c=i(57262),u=i(91204),d=i(45346),m=i(19159),p=i(54164),h=i(46798);const g="main-shuffleButton-button",f="main-shuffleButton-active",v="fZjbVIqD8Xc3auRZOxu5";var y=i(86070);const b=({iconSize:e="small",onClick:t,className:i})=>{const n=(0,d.W)(),{shuffle:b,setShuffle:_,canToggleShuffle:E}=(0,p.V)(),C=()=>{const e=!b;n({type:"click",intent:"shuffle"}),t?.(e),_(e)},x=b?o.Ru.get("playback-control.disable-shuffle"):o.Ru.get("playback-control.enable-shuffle"),S={"--button-size":2*(0,h.k)(e)+"px"};return(0,y.jsx)(u.u,{placement:"top",arrow:"bottom",title:o.Ru.get("pick-and-shuffle.upsell.title.shuffle-button"),children:(0,y.jsx)(l.Zp,{label:x,children:(0,y.jsx)(c.u,{property:m.kvg,renderOldExperience:()=>(0,y.jsx)("button",{style:S,className:r()(g,i,{[f]:b}),onClick:C,disabled:!E,role:"switch","aria-checked":b?"true":"false","aria-label":x,"":"control-button-shuffle",children:(0,y.jsx)(a.p,{size:e})}),renderNewExperience:()=>(0,y.jsx)(s.H,{className:r()({[v]:b},i),iconOnly:a.p,size:"small",onClick:C,disabled:!E,role:"switch","aria-checked":b?"true":"false","aria-label":x,"":"control-button-shuffle",semanticColor:b?"textBrightAccent":void 0})})})})}},84019:(e,t,i)=>{"use strict";i.d(t,{d:()=>b});var n=i(97500),r=i.n(n),a=i(8159),s=i(164),o=i(30171),l=i(11808),c=i(53129),u=i(57262),d=i(25390),m=i(45346),p=i(19159),h=i(99744),g=i(2435),f=i(46798);const v="main-skipBackButton-button";var y=i(86070);const b=({iconSize:e="small",onClick:t,className:i})=>{const n=(0,h.z)(),b=(0,m.W)(),_=(0,g.o)((e=>(e?.restrictions.canSkipPrevious||e?.restrictions.canSeek)??!1)),E=(0,a.YQ)((e=>{b({type:"click",intent:"previous"}),t?.(),n.skipToPrevious(),(0,d.aX)(e,"skip-back")}),100,{leading:!0,trailing:!1}),C={"--button-size":2*(0,f.k)(e)+"px"};return(0,y.jsx)(u.u,{property:p.kvg,renderOldExperience:()=>(0,y.jsx)(c.Zp,{label:l.Ru.get("playback-control.skip-back"),children:(0,y.jsx)("button",{style:C,className:r()(v,i),onClick:E,disabled:!_,"aria-label":l.Ru.get("playback-control.skip-back"),"":"control-button-skip-back",children:(0,y.jsx)(s.A,{size:e})})}),renderNewExperience:()=>(0,y.jsx)(c.Zp,{label:l.Ru.get("playback-control.skip-back"),children:(0,y.jsx)(o.H,{iconOnly:s.A,size:"small",disabled:!_,"aria-label":l.Ru.get("playback-control.skip-back"),"":"control-button-skip-back",onClick:E,className:i})})})}},63449:(e,t,i)=>{"use strict";i.d(t,{$:()=>b});var n=i(97500),r=i.n(n),a=i(8159),s=i(52098),o=i(30171),l=i(11808),c=i(53129),u=i(57262),d=i(25390),m=i(45346),p=i(19159),h=i(99744),g=i(2435),f=i(46798);const v="main-skipForwardButton-button";var y=i(86070);const b=({iconSize:e="small",onClick:t,className:i})=>{const n=(0,h.z)(),b=(0,m.W)(),_=(0,g.o)((e=>e?.restrictions.canSkipNext??null)),E=(0,a.YQ)((e=>{b({type:"click",intent:"next"}),t?.(),n.skipToNext(),(0,d.aX)(e,"skip-forward")}),100,{leading:!0,trailing:!1}),C={"--button-size":2*(0,f.k)(e)+"px"};return(0,y.jsx)(u.u,{property:p.kvg,renderOldExperience:()=>(0,y.jsx)(c.Zp,{label:l.Ru.get("playback-control.skip-forward"),children:(0,y.jsx)("button",{style:C,className:r()(v,i),onClick:E,disabled:!_,"aria-label":l.Ru.get("playback-control.skip-forward"),"":"control-button-skip-forward",children:(0,y.jsx)(s.s,{size:e})})}),renderNewExperience:()=>(0,y.jsx)(c.Zp,{label:l.Ru.get("playback-control.skip-forward"),children:(0,y.jsx)(o.H,{iconOnly:s.s,size:"small",disabled:!_,"aria-label":l.Ru.get("playback-control.skip-forward"),"":"control-button-skip-forward",onClick:E,className:i})})})}},31570:(e,t,i)=>{"use strict";i.d(t,{w:()=>te});var n=i(11808),r=i(64981),a=i(53129),s=i(52539),o=i(13210),l=i(2413),c=i(89724),u=i(70055),d=i(96301),m=i(68960),p=i(53117),h=i(37738),g=i(71423),f=i(25204),v=i(95393),y=i(74382),b=i(40707),_=i(39531),E=i(30416),C=i(813),x=i(70864),S=i(29147),A=i(23134),T=i(14129),I=i(44836),N=i(20399),w=i(54098),R=i(63077),k=i(46427),O=i(43854),P=i(31519),L=i(45364),j=i(23005),D=i(6250);const M="INvB6IvAqjjvyfm0ezDi";var U=i(86070);const B={.5:s.D4,.6:o.k,.7:l.l,.8:c.W9,.9:u.l,1:d.P,1.1:m.g,1.2:p.Dx,1.3:h.A,1.4:g.l,1.5:f.in,1.6:v.h,1.7:y.e,1.8:b.B,1.9:_.T,2:E.c,2.1:C.F,2.2:x.W,2.3:S.Z,2.4:A.U,2.5:T.X,2.6:I.m,2.7:N.n,2.8:w.Y,2.9:R.X,3:k.f,3.1:O.y,3.2:P.T,3.3:L.Q,3.4:j.l,3.5:D.i},F=({speed:e,iconSize:t=20})=>{const i=B[e];return i?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(i,{className:M,iconSize:t,style:{width:`${t}px`,height:`${t}px`}}),(0,U.jsx)("span",{className:"hidden-visually",children:`${e}x`})]}):(0,U.jsx)("span",{children:`${e}x`})};var H=i(30758),V=i(66416),G=i(18456),z=i(83542);const W=[.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];var K=i(45346);const Y="Is0ZfXiIyRoHd9y1OWtv",q=function({selectedSpeed:e,setSelectedSpeed:t}){const i=(0,K.W)(),r=W,a=(0,H.useRef)(null),s=(0,H.useCallback)((e=>{null!==e&&(a.current=e)}),[]);return(0,H.useEffect)((()=>{a?.current&&a.current.scrollIntoView({block:"center"})}),[a]),(0,U.jsxs)(V.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,U.jsx)(G.y,{children:n.Ru.get("playback-control.playback-speed")}),(0,U.jsx)("div",{className:Y,children:r.map((r=>(0,U.jsx)(z.D,{elementRef:r===e?s:void 0,onClick:()=>{t(r),i({type:"click",intent:"choose-speed",itemIdSuffix:`option-${r}x`})},"":`playback-speed-option-${r}`,role:"menuitemradio","aria-label":n.Ru.get("playback-control.playback-speed-button-a11y",r),"aria-checked":r===e,children:`${r}x`},r)))})]})};var Z=i(75235),$=i(54164);function Q(){const{setSpeed:e,canChangeSpeed:t}=(0,$.V)(),[i,n]=(0,Z.x)("playbackSpeed",1);return{speed:(0,H.useMemo)((()=>((e=1)=>{const t=W,[i]=t.slice().sort(((t,i)=>Math.abs(t-e)-Math.abs(i-e)));return i})(i??W)),[i]),setSpeed:(0,H.useCallback)((t=>{n(t),e(t)}),[n,e]),canChangeSpeed:t}}var J=i(14403),X=i(28004);const ee="Ww5ppB6W74laf1c0H_pR",te=({iconSize:e=20,onClick:t})=>{const{speed:i,setSpeed:s,canChangeSpeed:o}=Q(),l=(0,K.W)(),c=(0,J.v)((({connectionStatus:e})=>e===X.zP.NOT_CONNECTED)),u={"--button-size":2*e+"px"};return o?(0,U.jsx)(r.t,{renderInline:!0,placement:"top-start",menu:(0,U.jsx)(q,{selectedSpeed:i,setSelectedSpeed:e=>{t?.(e),s(e)}}),children:(t,r,s)=>(0,U.jsx)(a.Zp,{label:n.Ru.get("playback-control.change-playback-speed"),children:(0,U.jsx)("button",{style:u,ref:s,className:ee,onClick:e=>{r(e),l({type:"click",intent:"choose-speed"})},"aria-label":n.Ru.get("playback-control.change-playback-speed"),disabled:!c,"":"control-button-playback-speed",children:(0,U.jsx)(F,{speed:i,iconSize:e})})})}):null}},48169:(e,t,i)=>{"use strict";i.d(t,{M:()=>T,V:()=>A});var n=i(30758),r=i(97500),a=i.n(r),s=i(8159),o=i(11808),l=i(53129),c=i(21048),u=i(28875),d=i(16187),m=i(41293),p=i(90706),h=i(86070);const g=({volume:e=1,iconSize:t="small",...i})=>{const n={size:t,role:"presentation",...i};return 0===e?(0,h.jsx)(u.X,{"aria-label":o.Ru.get("playback-control.a11y.volume-off"),...n}):e<1/3?(0,h.jsx)(d.D,{"aria-label":o.Ru.get("playback-control.a11y.volume-low"),...n}):e<2/3?(0,h.jsx)(m.z,{"aria-label":o.Ru.get("playback-control.a11y.volume-medium"),...n}):(0,h.jsx)(p.C,{"aria-label":o.Ru.get("playback-control.a11y.volume-high"),...n})};var f=i(9580),v=i(46798);const y="volume-bar",b="RyUTmsGCr7jM4YTwqq8p",_="volume-bar__slider-container",E="DLZvnBAg9muHrwjSyIus",C="ekolz0hXwCXtCyFNmvqb",x="volume-bar__icon-button",S="aDDQP2meKLCk46Bn7Zz1";let A=function(e){return e[e.SHOW_SLIDER_ALWAYS=0]="SHOW_SLIDER_ALWAYS",e[e.SHOW_SLIDER_ON_HOVER=1]="SHOW_SLIDER_ON_HOVER",e}({});const T=({iconSize:e="small",onVolumeBarClick:t,onVolumeBarDrag:i,onToggleMuteClick:r,className:u,mode:d=A.SHOW_SLIDER_ALWAYS,sliderSize:m,sliderDirection:p="horizontal"})=>{const{volume:T,setVolume:I,raiseVolume:N,lowerVolume:w}=(0,f.n)(),R=-1!==T,k=Math.min(1,Math.max(0,T)),[O,P]=(0,n.useState)({isDragging:!1,isHoveringButton:!1,toggleVolumeLevel:null,dragPosition:0,shouldDragValueBeUsed:!1}),{shouldDragValueBeUsed:L,dragPosition:j,isHoveringButton:D,toggleVolumeLevel:M,isDragging:U}=O;let B=L?j:k;R||(B=1);const F=(0,s.YQ)((e=>{const t=Math.min(1,Math.max(0,e));I(t)}),25,{maxWait:50,leading:!0}),H=()=>{P((e=>({...e,isHoveringButton:!0})))},V=()=>{P((e=>({...e,isHoveringButton:!1})))},G=0===T?o.Ru.get("playback-control.unmute"):o.Ru.get("playback-control.mute"),z={"--button-size":2*(0,v.k)(e)+"px","--slider-width":m?`${m}px`:"100%"};return(0,h.jsxs)("div",{style:z,className:a()(y,u,{[S]:!R,[b]:"vertical"===p,[E]:d===A.SHOW_SLIDER_ON_HOVER}),"":"volume-bar",dir:"ltr",onWheel:e=>{if(!R)return;const t=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX,i=Math.max(-120,Math.min(120,e?.nativeEvent?.wheelDelta||t))/1200,n=Math.max(0,Math.min(1,B+i));I(n)},children:[(0,h.jsx)(l.Zp,{label:G,children:(0,h.jsx)("button",{className:a()(x,"control-button"),onClick:()=>{0===B?(r?.("not_muted"),F(M??.7)):(P((e=>({...e,toggleVolumeLevel:B}))),r?.("muted"),F(0))},disabled:!R,"aria-label":0===T?o.Ru.get("playback-control.unmute"):o.Ru.get("playback-control.mute"),onMouseEnter:H,onMouseLeave:V,"aria-describedby":"volume-icon","":"volume-bar-toggle-mute-button",children:(0,h.jsx)(g,{id:"volume-icon",iconSize:e,volume:B})})}),(0,h.jsx)("div",{className:a()(_,{[C]:"vertical"===p}),onMouseEnter:H,onMouseLeave:V,children:(0,h.jsx)(c.z2,{labelText:o.Ru.get("playback-control.a11y.volume-slider-button"),value:B,max:1,step:.1,onDragStart:e=>{P((t=>({...t,isDragging:!0,dragPosition:e,shouldDragValueBeUsed:!0})))},onDragMove:e=>{P((t=>({...t,dragPosition:e,shouldDragValueBeUsed:!0}))),U&&(i?.(e),F(e))},onDragEnd:e=>{P((e=>({...e,shouldDragValueBeUsed:!1,dragPosition:0,isDragging:!1}))),t?.(e),F(e)},onStepBackward:w,onStepForward:N,forceActiveStyles:D,direction:p})})]})}},19944:(e,t,i)=>{"use strict";i.d(t,{h:()=>y});var n=i(20196),r=i(51306),a=i(71588),s=i(24241),o=i(35149),l=i(10354),c=i(16337),u=i(9201),d=i(14627),m=i(95421),p=i(95339),h=i(72091),g=i(71817);const f="main-nowPlayingView-coverArt";var v=i(86070);const y=({context:e,item:t,index:i,canSwitchVisuals:y=!1})=>{const{spec:b,logger:_}=(0,h.r)(n.J,{}),{draggable:E,onDragStart:C}=(0,d.P)();return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(a.h,{menu:(0,v.jsx)(o.W,{context:e,item:t,canSwitchVisuals:y}),children:(0,v.jsx)("div",{draggable:E&&((0,p.v)(t)||(0,m.p)(t)),onDragStart:e=>{C(e,{itemUris:[t.uri],dragLabelText:(0,u.r)(t)})},children:(0,v.jsx)(c.R,{uri:e.uri,owner:e.metadata?.context_owner,children:(0,v.jsx)(l.e,{context:t.type===g.c.TRACK?t.album:e,item:t,index:i,isVisible:!0,onClick:()=>{_.logInteraction(b.coverArtFactory({uri:t.uri}).hitUiNavigate({destination:t.type===g.c.TRACK?t.album.uri:t.uri}))},adEventReason:r.c.COVER_ART,children:(0,v.jsx)(s.b,{className:f,item:t,maxSize:384,desiredLabel:"xlarge"})})})})})})}},65303:(e,t,i)=>{"use strict";i.d(t,{w:()=>p,X:()=>m});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(53129);const l="main-nowPlayingView-section",c="main-nowPlayingView-sectionHeader",u="main-nowPlayingView-sectionHeaderText";var d=i(86070);const m=({action:e,children:t,className:i,icon:n,tooltipLabel:r})=>(0,d.jsxs)(s.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",className:a()(c,i),children:[n,(0,d.jsx)(o.Zp,{label:r,children:(0,d.jsx)("div",{className:u,children:t})}),e]}),p=(0,n.forwardRef)((({children:e,className:t,style:i,testId:n},r)=>{const s={};return n&&(s["data-testid"]=n),(0,d.jsx)("div",{ref:r,className:a()(l,t),style:i,...s,children:e})}))},49278:(e,t,i)=>{"use strict";i.d(t,{F:()=>c});var n=i(30758),r=i(64245),a=i(19287),s=i(91947);const o="KrBYgWLGb5aRHjoD_prX";var l=i(86070);const c=()=>{const{setVideoPlayerUIFlag:e}=(0,a.d)(),t=(0,r.XB)();return(0,n.useEffect)((()=>(e(s.n.npv,!0),()=>{e(s.n.npv,!1)})),[t,e]),(0,l.jsx)("div",{id:"VideoPlayerNpv_ReactPortal",className:o})}},10596:(e,t,i)=>{"use strict";i.d(t,{I:()=>c});var n=i(85212),r=i(98367),a=i(12783),s=i(11808),o=i(81436),l=i(86070);const c=({showDownloadInformation:e})=>(0,l.jsxs)("div",{className:o.A.emptyStateContainer,children:[e?(0,l.jsx)(n.i,{size:"xxlarge",className:o.A.icon}):(0,l.jsx)(r.P,{size:"xxlarge",className:o.A.icon}),(0,l.jsx)(a.E,{as:"h1",variant:"titleLarge",semanticColor:"textBase",dir:"auto",children:s.Ru.get("web-player.offline.empty-state.title")}),(0,l.jsx)(a.E,{as:"h2",variant:"bodyMedium",semanticColor:"textSubdued",dir:"auto",className:o.A.info,children:e?s.Ru.get("web-player.offline.empty-state.subtitle"):s.Ru.get("offline.callout-disconnected")})]})},54963:(e,t,i)=>{"use strict";i.d(t,{_:()=>u,s:()=>c});var n=i(30758),r=i(97500),a=i.n(r),s=i(96434);const o="ffFwfKcPDbmAPLXzxzKq";var l=i(86070);const c=(0,n.createContext)(null),u=({label:e,style:t,focusTransferId:i,children:r,className:u,nodeRef:d})=>{const m=(0,n.useRef)(null),p=d??m;return(0,s.X)(i??null,p),(0,l.jsx)(c.Provider,{value:p,children:(0,l.jsx)("aside",{"aria-label":e,className:a()(o,u),style:t,id:"Desktop_PanelContainer_Id",ref:p,tabIndex:-1,children:r})})}},68566:(e,t,i)=>{"use strict";i.d(t,{w:()=>f});var n=i(30758),r=i(97500),a=i.n(r),s=i(45518),o=i(50244),l=i(34629);const c="AAdBM1nhG73supMfnYX7",u="W3E0IT3_STcazjTeyOJa",d="mdMUqcSHFw1lZIcYEblu",m="cZCuJDjrGA2QMXja_Sua",p="zduvaX0Ioxqd5ypeWoAf";var h=i(86070);const g=({fixedHeader:e,scrollNodeRef:t,children:i})=>{const n=(0,o.y)(t);return(0,h.jsxs)("div",{className:a()(c),children:[(0,h.jsx)("div",{className:a()(u,{[d]:n}),children:e}),i]})},f=n.forwardRef((({children:e,className:t,fixedHeader:i},r)=>{const o=(0,n.useRef)(null),u=(0,h.jsx)(l.bi.Provider,{value:{scrollNodeRef:o},children:(0,h.jsx)(s.a,{className:m,onInstanceCreated:e=>{o.current=e.elements().viewport},children:(0,h.jsx)("div",{ref:r,className:a()(c,p,t),children:e})})});return i?(0,h.jsx)(g,{fixedHeader:i,scrollNodeRef:o,children:u}):u}))},77783:(e,t,i)=>{"use strict";i.d(t,{a:()=>M});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(89732),l=i(43178),c=i(20196),u=i(61544),d=i(11808),m=i(1527),p=i(71588),h=i(88778),g=i(17202),f=i(58345),v=i(40440),y=i(48100),b=i(53129),_=i(59996),E=i(95141),C=i(64245),x=i(62338),S=i(14627),A=i(63135),T=i(72091);const I="eTT681T6oUKXsIMiP8pT",N="gwmgu53xszgwAXxqLT0h",w="fNXmHtlrj4UVWmhQrJ_5",R="XOSSUjLDKk9RRmiX_UWa",k="XNFZdOLgMlx491fEWdYJ",O="icNf66tgG3uxDMbCCIaN";var P=i(86070);const L={[u.NQ.PLAYLIST]:v.W,[u.NQ.PLAYLIST_V2]:v.W,[u.NQ.ALBUM]:h.h,[u.NQ.TRACK]:y.P,[u.NQ.ARTIST]:g.t,[u.NQ.EPISODE]:f.b},j=({link:e,title:t,item:i,panelLinkRef:n,variant:r,semanticColor:a})=>{const{spec:o,logger:l}=(0,T.r)(c.J,{}),d=(0,P.jsx)(E.r,{children:(0,P.jsx)(s.E,{as:"h1",variant:r,semanticColor:a,children:t||""})},t||""),m=(0,u.o_)(e);let h,g=!1,f=[];const v=m&&L[m.type];if(v){const e=m.toURI();h=(0,P.jsx)(v,{uri:e}),g=!(!e||!t),f=g?[e]:[]}const y=(0,C.XB)().split("_").join(" "),{draggable:b,onDragStart:x}=(0,S.P)({itemUris:f,dragLabelText:t??""});return(0,P.jsx)(p.h,{menu:h,children:(0,P.jsx)("div",{className:I,children:e&&t?(0,P.jsx)(_.N,{ref:n,"aria-label":`${y} link`,draggable:b&&g,onDragStart:g?x:void 0,to:e,search:i?`?uid=${i.uid}&uri=${i.uri}`:void 0,className:N,onClick:()=>{l.logInteraction(o.contextLinkFactory().hitUiNavigate({destination:e||""}))},children:d}):d})})},D=x.$S.PANEL_CLOSE_CLICK,M=({link:e,title:t,titleSlot:i,actions:r,onClose:s,className:c,panelLinkRef:u,preventDefaultClose:p=!1,onBack:h,item:g,titleVariant:f="bodyMediumBold",titleSemanticColor:v="textBase"})=>{const y=(0,C._Y)(),_=(0,C.Ev)(D),E=(0,n.useCallback)((()=>{s?.(),p||y(D)}),[s,p,y]),x=null!==g&&(0,A.N)(g);return(0,P.jsx)(n.Suspense,{fallback:null,children:(0,P.jsxs)("div",{className:a()(w,c),children:[h&&(0,P.jsx)("span",{className:O,children:(0,P.jsx)(b.Zp,{label:d.Ru.get("desktop.login.Back"),children:(0,P.jsx)(m.a,{ariaLabel:d.Ru.get("desktop.login.Back"),className:k,size:"sm",onClick:h,icon:o.g})})}),i||(0,P.jsx)(j,{title:t,panelLinkRef:u,item:g,link:e,variant:f,semanticColor:v}),(0,P.jsxs)("span",{className:a()(O,R),children:[r,!x&&(0,P.jsx)("div",{"":"PanelHeader_CloseButton",children:(0,P.jsx)(b.Zp,{label:d.Ru.get("close"),children:(0,P.jsx)(m.a,{ariaLabel:d.Ru.get("close"),className:k,size:"sm",onClick:E,icon:l.M,disabled:!_})})})]})]})})}},38818:(e,t,i)=>{"use strict";i.d(t,{MQ:()=>f,pF:()=>g,wk:()=>h});var n=i(30758),r=i(97191),a=i(41978),s=i(81987),o=i(93766),l=i(22865),c=i(86800),u=i(52608),d=i(19159),m=i(51396),p=i(86070);const h=(0,n.createContext)(null),g=({playerAPI:e,children:t})=>{const i=(0,s.NC)(d.eWj),o=(0,s.NC)(d.VUN),g=(0,s.NC)(d.xId),f=(0,m.q)(),v=(0,c.E)(),y=(0,a.Pj)(),b=!(0,u.n)(),_=(0,n.useMemo)((()=>{const t={isAutoToggleNPVEnabled:v,isQueueOnRightPanelEnabled:i,isDevicePickerSidePanelEnabled:o,isOverlaySidebarAnimationsEnabled:g};return(0,l.BV)(e,f,y,t,b)}),[v,i,o,g,e,f,y,b]),[E,C]=(0,n.useState)(_.initialState),x=(0,n.useMemo)((()=>(0,r.U4)(_).start()),[_]),S=(0,n.useCallback)((e=>{(e.changed??!0)&&C(e)}),[]);return(0,n.useEffect)((()=>{const e=x.subscribe(S);return()=>e.unsubscribe()}),[x]),(0,p.jsx)(h.Provider,{value:[E,x,_],children:t})};function f(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}}},48451:(e,t,i)=>{"use strict";i.d(t,{X:()=>r});var n=i(34891);function r(){const[e]=(0,n.s)();return e.value}},34891:(e,t,i)=>{"use strict";i.d(t,{s:()=>a});var n=i(30758),r=i(38818);function a(){const e=(0,n.useContext)(r.wk);if(!e)throw new Error("usePanelStateMachine() must be used within a PanelStateMachineContextProvider");return e}},35606:(e,t,i)=>{"use strict";i.d(t,{B:()=>o});var n=i(30758),r=i(71306),a=i(88497),s=i(86070);const o=n.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"},i={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,s.jsxs)("div",{style:t,children:[e&&(0,s.jsx)("style",{children:"@keyframes fadein {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}"}),(0,s.jsx)(a.D,{style:i})]})}))},80091:(e,t,i)=>{"use strict";i.d(t,{S:()=>c,K:()=>u});var n=i(30758);const r={BREAKPOINT_VERTICAL_MEDIUM:"170px",BREAKPOINT_VERTICAL_SMALL:"132px",BREAKPOINT_HORIZONTAL_SMALL:"299px"};function a(e,t=r){const i=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),n=function(e,t){if(!e)return"DEFAULT";if(e<=parseInt(t.BREAKPOINT_HORIZONTAL_SMALL,10))return"SMALL";return"DEFAULT"}(e?.innerWidth,t);return{horizontal:n,vertical:i}}var s=i(60656),o=i(86070);const l=(0,n.createContext)({horizontal:"DEFAULT",vertical:"DEFAULT"}),c=({children:e})=>{const t=(0,s.ox)(),[i,r]=(0,n.useState)((()=>a(t)));return(0,n.useEffect)((()=>{const e=()=>{const{vertical:e,horizontal:n}=a(t);e===i.vertical&&n===i.horizontal||r({vertical:e,horizontal:n})};return t?.addEventListener("resize",e),()=>{t?.removeEventListener("resize",e)}}),[i.horizontal,i.vertical,t]),(0,o.jsx)(l.Provider,{value:i,children:e})},u=()=>{const e=(0,n.useContext)(l);if(void 0===e)throw new Error("usePiPMiniPlayerSize must be used within a PiPSizeProvider");return e}},39733:(e,t,i)=>{"use strict";i.d(t,{mv:()=>a,rP:()=>r,vh:()=>s});var n=i(30758);const r=(0,n.createContext)(null);function a(){const e=(0,n.useContext)(r);if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e}function s(){const e=(0,n.useContext)(r);if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e.getEventSender()}},90392:(e,t,i)=>{"use strict";i.d(t,{VV:()=>s,cM:()=>o,nI:()=>c});var n=i(30758),r=i(86070);const a={isOpen:!1,uri:null},s=(0,n.createContext)(void 0),o=(0,n.createContext)(a);function l(e,t){switch(t.type){case"open":return{...e,isOpen:!0,uri:t.uri};case"close":return{...a};default:throw new Error("Unknown action received!")}}const c=({children:e})=>{const[t,i]=(0,n.useReducer)(l,a);return(0,r.jsx)(s.Provider,{value:i,children:(0,r.jsx)(o.Provider,{value:t,children:e})})}},78487:(e,t,i)=>{"use strict";i.d(t,{R:()=>a});var n=i(30758),r=i(75296);const a=()=>{const[e,t]=(0,n.useState)(!1),i=(0,r.K)(r.X.CollaborativePlaylists);return(0,n.useEffect)((()=>{i&&t(!0)}),[i,t]),{toggleActivationVisible:e,setToggleActivationVisible:t}}},35790:(e,t,i)=>{"use strict";i.d(t,{GM:()=>c,Mj:()=>s,qS:()=>a,vB:()=>u});var n=i(30758),r=i(86070);const a=(e,t)=>({type:"OPEN",name:e,handle:t}),s=e=>({type:"CLOSE",name:e});function o(e,t){switch(t.type){case"OPEN":{const{name:i,handle:n}=t;return e.map.has(i)?e:(e.map.set(i,n),{...e,map:e.map})}case"CLOSE":{const{name:i}=t;return e.map.delete(i)?{...e,map:e.map}:e}}return e}const l=(0,n.createContext)(null),c=({children:e})=>{const t={map:new Map},[i,a]=(0,n.useReducer)(o,t);return(0,r.jsx)(l.Provider,{value:[i,a],children:e})};function u(){const e=(0,n.useContext)(l);if(null===e)throw new Error("Trying to use 'PopupWindowContext' without 'PopupWindowProvider'!");return e}},3217:(e,t,i)=>{"use strict";i.d(t,{p:()=>v});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(21953),l=i(30171),c=i(43830),u=i(11808),d=i(67889);const m="jAjrv_00X1qyxaEHmJCb",p="YVnLJCNcdaEeIGBQYqJS",h="pxocyhWhrvAeBiSlfjbd",g="aOt09fJWpST6CG8xfHuo";var f=i(86070);const v=n.memo((function({onClose:e,onConfirm:t,isOpen:i,itemCount:r}){const v=(0,n.useCallback)((i=>{t(),e(i)}),[t,e]),y=u.Ru.get("queue.confirm-title",r);return(0,f.jsx)(d.A,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:e,contentLabel:y,isOpen:i,children:(0,f.jsxs)("div",{className:m,children:[(0,f.jsx)(s.E,{as:"h2",variant:"bodyMediumBold",className:p,children:y}),(0,f.jsx)(s.E,{as:"p",variant:"bodySmall",className:h,paddingBottom:o.lT,children:u.Ru.get("queue.confirm-message")}),(0,f.jsxs)("div",{className:a()("encore-light-theme",g),children:[(0,f.jsx)(l.H,{onClick:e,children:u.Ru.get("queue.cancel-button")}),(0,f.jsx)(c.$,{onClick:v,children:u.Ru.get("queue.confirm-button")})]})]})})}))},30377:(e,t,i)=>{"use strict";i.d(t,{H:()=>l});var n=i(8129),r=i(12783),a=i(11808),s=i(12025),o=i(86070);const l=()=>(0,o.jsxs)("div",{className:s.A.emptyContainer,children:[(0,o.jsx)(n.q,{size:"xxlarge","aria-hidden":"true"}),(0,o.jsxs)("div",{className:s.A.titleContainer,children:[(0,o.jsx)(r.E,{as:"h1",variant:"titleMedium",semanticColor:"textBase",children:a.Ru.get("history.empty-title")}),(0,o.jsx)("p",{children:a.Ru.get("history.empty-description")})]})]})},46353:(e,t,i)=>{"use strict";i.d(t,{K:()=>u});var n=i(10543),r=i(12783),a=i(43830),s=i(11808),o=i(59996),l=i(12025),c=i(86070);const u=()=>(0,c.jsxs)("div",{className:l.A.emptyContainer,children:[(0,c.jsx)(n.j,{size:"xxlarge","aria-hidden":"true"}),(0,c.jsxs)("div",{className:l.A.titleContainer,children:[(0,c.jsx)(r.E,{as:"h1",variant:"titleMedium",semanticColor:"textBase",children:s.Ru.get("queue.empty-title")}),(0,c.jsx)("p",{children:s.Ru.get("queue.empty-description")})]}),(0,c.jsx)(o.N,{to:"/search",children:(0,c.jsx)(a.$,{colorSet:"invertedLight",children:s.Ru.get("queue.fine-something")})})]})},13191:(e,t,i)=>{"use strict";i.d(t,{$y:()=>l,Nf:()=>u,Qc:()=>c});var n=i(30758),r=i(36485);function a(e,t){switch(t.type){case"OPEN":return{...e,isOpen:!0};case"CLOSE":return{...e,isOpen:!1};default:(0,r.d)(t)}}var s=i(86070);const o=(0,n.createContext)(void 0),l=({children:e})=>{const t=(0,n.useReducer)(a,{isOpen:!1});return(0,s.jsx)(o.Provider,{value:t,children:e})},c=()=>{const e=(0,n.useContext)(o);if(!e)throw new Error("useSearchModalState must be used within SearchModalProvider");const[t]=e;return t},u=()=>{const e=(0,n.useContext)(o);if(!e)throw new Error("useSearchModalDispatch must be used within SearchModalProvider");const[,t]=e;return t}},22252:(e,t,i)=>{"use strict";i.d(t,{o:()=>k});var n=i(30758),r=i(41978),a=i(9183),s=i(8159),o=i(37055),l=i(61544),c=i(21441),u=i(97500),d=i.n(u),m=i(71306),p=i(12783),h=i(62412),g=i(43178),f=i(11808);const v="main-topBar-searchBar",y="x-searchInput-searchInputSearchIcon",b="x-searchInput-searchInputInput",_="ovi95fYvIJ3N3nJxcqY3",E="aTNG01R8uEHt_AdZOcNm",C="x-searchInput-searchInputIconContainer",x="oL_QO4urQFvjTy5NwIyF";var S=i(86070);const A=({onSearch:e,handleSubmit:t,handleChange:i,handleKeyDown:n,handleFocus:r,handleClear:a,onClick:s,inputRef:o,value:l})=>(0,S.jsxs)("div",{className:d()(v,{[_]:!e}),children:[(0,S.jsx)("form",{onSubmit:t,role:"search",children:(0,S.jsx)(p.E,{variant:"bodySmall",as:"input",style:{color:m.Ql9},ref:o,className:d()(b),value:l,maxLength:800,autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,onChange:i,onKeyDown:n,placeholder:e?f.Ru.get("search.search-for-label"):f.Ru.get("navbar.search"),onFocus:r,"":"search-input",onClick:s})}),(0,S.jsxs)("div",{className:C,children:[(0,S.jsx)("span",{className:y,children:(0,S.jsx)(h.C,{className:x,"aria-hidden":!0,size:"small"})}),l&&(0,S.jsx)("button",{className:E,onClick:a,"aria-label":f.Ru.get("search.a11y.clear-input"),children:(0,S.jsx)(g.M,{className:x,size:"small"})})]})]});var T=i(6029),I=i(8461),N=i(55388),w=i(34629),R=i(72091);const k=n.memo((function({isSearchChipsEnabled:e=!1,onSearch:t=!0,onClick:i}){const u=(0,a.zy)(),d=(0,a.Zp)(),m=(0,n.useRef)(null),p=(0,n.useRef)(null),h=(0,r.wA)(),[{category:g,query:f},v]=(0,T.o)(),[y,b]=(0,n.useState)(f),_=!!g,E=(0,w.v7)(),C=u.pathname.startsWith("/recent-searches"),x=_||C,{spec:k,logger:O}=(0,R.r)(o.F,{}),P=(0,s.YQ)(((t,i,n)=>{let r;if(n){const{interactionId:e}=O.logInteraction(n);r=e}e?v(t,g,!1,r):v(t,null,i,r),E.current&&(E.current.scrollTop=0)}),200),L=(0,n.useCallback)(((e=!1)=>{m.current!==document.activeElement&&(p.current=document.activeElement,m.current&&m.current.focus()),e&&m.current?.select()}),[m]);(0,N.x)(I.W.SHOW_SEARCH,(()=>L(!0)));const j=u.pathname.startsWith("/search"),D=u?.state?.fromBrowse||!1;(0,n.useEffect)((()=>{!x&&t&&j&&!D&&(e&&f||L())}),[f,L,u.key,t,j,x,e,D]),(0,n.useEffect)((()=>{j||b("")}),[j,f]);return(0,S.jsx)(A,{inputRef:m,onClick:i,onSearch:t,value:y,handleSubmit:e=>{e.preventDefault(),y&&O.logInteraction(k.keyStrokeSearch());const t=(0,l.o_)(y,{parseUnknown:!0});if(t?.type===l.NQ.AD){const e=(0,l.cE)(t.id);if(t.id===e)return;h((0,c.gt)(t.id))}else t?d(t.toURLPath(!0),{state:{preventMoveFocus:!0,redirectToHome:(0,l.cr)(t)}}):y||d("/search",{state:{preventMoveFocus:!0}});y&&E.current?.querySelector("h1, h2, h3, h4")?.focus()},handleChange:e=>{const t=e.currentTarget.value,i=k.keyStrokeChangeSearchQuery({searchQueryString:t});b(t),P(t,x,i)},handleKeyDown:e=>{if("Escape"===e.key)if(y){const e=k.hitTextClear();b(""),P("",x,e)}else m.current&&m.current.blur(),p.current instanceof HTMLElement&&p.current.focus()},handleFocus:()=>{e||!x&&t||P(y,x,null)},handleClear:()=>{m.current&&m.current.focus();const e=k.hitTextClear();b(""),P("",x,e)}})}))},35738:(e,t,i)=>{"use strict";i.d(t,{j4:()=>o,tY:()=>s});var n=i(30758),r=i(86070);const a=(0,n.createContext)(null),s=({instance:e,children:t})=>(0,r.jsx)(a.Provider,{value:e,children:t}),o=()=>{const e=(0,n.useContext)(a);if(null===e)throw new Error("useSettingsAPI must be used within a SettingsProvider");return e}},95244:(e,t,i)=>{"use strict";i.d(t,{B:()=>P,q:()=>j});var n=i(30758),r=i(41978),a=i(81987),s=i(26436),o=i(61544),l=i(53851),c=i(60822),u=i(71588),d=i(58345),m=i(54401),p=i(83716),h=i(34136),g=i(89199),f=i(50415),v=i(14627),y=i(45346),b=i(63198),_=i(4096),E=i(39249),C=i(19159),x=i(58237),S=i(78074),A=i(95302),T=i(42116),I=i(94313),N=i(48905),w=i(72091),R=i(79787),k=i(94672),O=i(86070);function P(e){return{uri:e.uri,name:e.name,trailer:e.trailer,showTypes:e.showTypes}}const L=e=>`activation-trigger-mme-${e}`,j=n.memo((function({index:e=-1,showMetadata:t,episode:i,usePlayContextItem:j,status:D,variant:M}){const U=(0,_.c)(),B=i.playedState.playPositionMilliseconds,F=i.uri,H=(0,n.useRef)(null),[V,G]=(0,n.useState)(i.playedState.state===R._w.Completed),{draggable:z,onDragStart:W}=(0,v.P)(),K=(0,b.V)(),Y=(0,T.y)(),q=(0,y.W)(),Z=(0,r.wA)(),{UBIFragment:$,spec:Q,logger:J}=(0,w.r)(s.d,{data:{uri:F,reason:i.requestId||"",position:e}}),X=(0,N.t)(Q),{isActive:ee,isPlaying:te,togglePlay:ie}=j({uri:F}),[ne]=(0,I.S)(1e4,(e=>e?.item?.uri===F));(0,n.useEffect)((()=>{te&&(H.current=ne)}),[te,ne]),(0,n.useEffect)((()=>{!te&&H.current&&i.duration.milliseconds<=H.current&&G(!0)}),[te,i.duration.milliseconds]);const re=(0,n.useCallback)((e=>{e||(H.current=0),G(e)}),[]),ae=e=>{if(e.target!==e.currentTarget)return;const n=`${i.name} • ${t.name}`;W(e,{itemUris:[F],dragLabelText:n,contextUri:t.uri})},se=P(t),oe=(0,E.C)({...i,coverArt:{sources:i.coverArt}},se),le=(0,n.useCallback)((()=>{if(i.episodeType===R.I_.Episode&&U)g.h.set((()=>({triggerId:L(i.uri),triggerAction:null})));else if(K)oe();else{let e;e=te?Q.playButtonFactory().hitPause({itemToBePaused:F}):ee?Q.playButtonFactory().hitResume({itemToBeResumed:F}):Q.playButtonFactory().hitPlay({itemToBePlayed:F});const t=J.logInteraction(e);q({targetUri:F,intent:te?"pause":"play",type:"click"}),ie({loggingParams:t})}}),[ee,oe,q,ie,F,te,K,i,U,J,Q]),ce=(0,n.useCallback)((()=>{J.logInteraction(Q.hitUiNavigate({destination:F})),q({type:"click",targetUri:F,intent:"navigate"})}),[F,q,J,Q]),ue=i.podcastSubscription?.isPaywalled??!1,de=i.podcastSubscription?.isUserSubscribed??!1,me=ue&&!de,pe=ue&&K,{badges:he}=(0,k.b)({contentRating:i.contentRating?.label,isPaywalled:ue}),ge=(0,n.useCallback)((()=>Z((0,l.Tf)(t.uri))),[t.uri,Z]),fe=(0,n.useCallback)((e=>{let n=e;return(me||pe)&&(n=(0,O.jsx)(h.f,{enabled:!0,showUri:i.podcast?.uri||t.uri,children:n})),!i.playability.playable&&he.nineteen&&(n=(0,O.jsx)("div",{onClick:e=>{e.stopPropagation(),ge()},children:e})),n=(0,O.jsx)(c.k,{id:L(F),targetURI:(0,o.o_)(F),children:n}),n}),[F,me,pe,t.uri,he.nineteen,i.playability.playable,ge,i.podcast?.uri]),ve=(0,a.NC)(C.cKd,{loadingValue:!1});return(0,O.jsx)($,{spec:Q,children:(0,O.jsx)(A.pZ,{value:"row",index:e,children:(0,O.jsx)(u.h,{onShow:()=>{J.logInteraction(Q.secondaryHitUiReveal())},menu:(0,O.jsx)(d.b,{uri:F,showUri:t.uri,sharingInfo:i.sharingInfo,isPlayed:V,onMarkAsPlayed:re}),children:ve?(0,O.jsx)(p.k,{ref:X,requestId:i.requestId,index:e,uri:F,size:Y,images:i.coverArt||[],name:i.name,showName:i.podcast?.name||t.name,description:i.description,isPlayable:i.playability.playable||me,fullyPlayed:V,durationMs:i.duration.milliseconds,releaseDate:i.releaseDate?.isoString||"",resumePositionMs:H.current??B,draggable:z,handleDragStart:ae,handlePlaybackClick:le,handleClick:ce,isCurrentlyPlaying:ee,isPaywalled:ue,isUserSubscribed:de,isPlaying:te,position:te?ne:void 0,episodeSharingInfo:i.sharingInfo,onMarkAsPlayed:re,contentInformation:i.contentInformation,showUri:i.podcast?.uri||t.uri,mediaTypes:i.mediaTypes??void 0,badges:(0,O.jsxs)(O.Fragment,{children:[he.explicit&&(0,O.jsx)(x.g,{}),he.paid&&(0,O.jsx)(f.K,{}),he.nineteen&&(0,O.jsx)(S.q,{size:16})]}),playButtonWrapper:fe,onMoreButtonClick:()=>{J.logInteraction(Q.moreButtonFactory().hitUiReveal())},status:D,variant:M}):(0,O.jsx)(m.R,{ref:X,requestId:i.requestId,index:e,uri:F,size:Y,images:i.coverArt||[],name:i.name,showName:t.name,description:i.description,isPlayable:i.playability.playable||me,fullyPlayed:V,durationMs:i.duration.milliseconds,releaseDate:i.releaseDate?.isoString||"",resumePositionMs:H.current??B,handleDragStart:ae,handlePlaybackClick:le,handleClick:ce,isCurrentlyPlaying:ee,isPaywalled:ue,isUserSubscribed:de,isPlaying:te,position:te?ne:void 0,episodeSharingInfo:i.sharingInfo,onMarkAsPlayed:re,contentInformation:i.contentInformation,badges:(0,O.jsxs)(O.Fragment,{children:[he.explicit&&(0,O.jsx)(x.g,{}),he.paid&&(0,O.jsx)(f.K,{}),he.nineteen&&(0,O.jsx)(S.q,{size:16})]}),playButtonWrapper:fe,onMoreButtonClick:()=>{J.logInteraction(Q.moreButtonFactory().hitUiReveal())},showUri:t.uri,mediaTypes:i.mediaTypes??void 0,status:D,variant:M})})})})}))},55160:(e,t,i)=>{"use strict";i.d(t,{u:()=>ie,Y:()=>ne});var n=i(30758),r=i(97500),a=i.n(r),s=i(41978),o=i(30171),l=i(20741),c=i(11808),u=i(39796),d=i(53129),m=i(12783),p=i(56013),h=i(71254),g=i(66416),f=i(83542),v=i(38273),y=i(65313),b=i(32411);const _="zNnlcxsmnV1RiWXSd4IA",E="a3sk2brhAAMoZderfRfg";var C=i(86070);const x=({icon:e,name:t,isActive:i,onClick:n,isDsaRestricted:r})=>{const a=i?"textBrightAccent":void 0;return(0,C.jsx)(f.D,{role:"menuitemradio",leadingIcon:(0,C.jsx)(e,{iconSize:16,semanticColor:a}),onClick:n,"aria-checked":i,disabled:r,children:(0,C.jsx)(m.E,{variant:"bodySmall",semanticColor:a,children:t})})},S=({shuffleMode:e,onClick:t,spec:i,logger:r,isDsaRestricted:a})=>{const l=(0,s.wA)(),u=(0,n.useCallback)((()=>{l(v.cI.actions.open())}),[l]),d=(0,n.useCallback)((()=>{t(b.j.ON,(e=>{i&&(e?r.logInteraction(i?.toggleShuffleButtonFactory().hitShuffleDisable()):r.logInteraction(i?.toggleShuffleButtonFactory().hitShuffleEnable()))}))}),[r,t,i]),f=(0,n.useCallback)((()=>{const e=e=>{i&&(e?r.logInteraction(i?.toggleSmartShuffleButtonFactory().hitSelectShuffleMode({previousMode:"smart_shuffle",selectedMode:"linear"})):r.logInteraction(i?.toggleSmartShuffleButtonFactory().hitSelectShuffleMode({previousMode:"linear",selectedMode:"smart_shuffle"})))};a||t(b.j.SMART_SHUFFLE,e)}),[a,r,t,i]),S=a?c.Ru.get("web-player.smart-shuffle.dsa-message"):c.Ru.get("web-player.smart-shuffle.menu-text");return(0,C.jsxs)(g.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,C.jsx)(x,{icon:p.p,name:c.Ru.get("web-player.smart-shuffle.shuffle"),isActive:e===b.j.ON,onClick:d}),(0,C.jsx)(x,{icon:h.k,name:c.Ru.get("web-player.smart-shuffle.smart-shuffle"),isActive:e===b.j.SMART_SHUFFLE,onClick:f,isDsaRestricted:a}),(0,C.jsx)(m.E,{className:_,variant:"bodySmall",semanticColor:"textSubdued",as:"p",children:S}),!a&&(0,C.jsx)(y.u,{children:(0,C.jsx)(o.H,{role:"menuitem",className:E,semanticColor:"textSubdued",onClick:u,size:"small",children:c.Ru.get("web-player.smart-shuffle.menu-button")})})]})},A={[b.j.OFF]:{icon:p.p,label:e=>e?c.Ru.get("web-player.smart-shuffle.button-disable-shuffle-specific",e):c.Ru.get("web-player.smart-shuffle.button-disable-shuffle-generic")},[b.j.ON]:{icon:p.p,semanticColor:"textBrightAccent",label:e=>e?c.Ru.get("web-player.smart-shuffle.button-enable-shuffle-specific",e):c.Ru.get("web-player.smart-shuffle.button-enable-shuffle-generic")},[b.j.SMART_SHUFFLE]:{icon:h.k,semanticColor:"textBrightAccent",label:e=>e?c.Ru.get("web-player.smart-shuffle.button-enable-smart-shuffle-specific",e):c.Ru.get("web-player.smart-shuffle.button-enable-smart-shuffle-generic")}};var T=i(27268),I=i(48697),N=i(39751),w=i(81987),R=i(45396),k=i(62943);const O={bottomEnd:N.dw.topStart,top:N.dw.bottom},P=({placement:e,onHide:t,label:i})=>{(0,R.g)(t);const n=(0,w.NC)(k.rW);return(0,C.jsx)("div",{className:a()({"circular-sp-vietnamese":n}),children:(0,C.jsx)(T.A,{arrow:O[e],colorSet:"announcement",onClose:t,children:i})})},L=e=>{const{placement:t,visible:i,children:n}=e;return(0,C.jsx)(I.W,{placement:t,withPortal:!0,overlay:i&&(0,C.jsx)(P,{...e}),children:n})};var j=i(25639),D=i(52608),M=i(8811),U=i(60102);function B(){return(0,U.N)(M.X)}var F=i(90224),H=i(69898),V=i(47342),G=i(2435),z=i(80707),W=i(85993),K=i(8159);const Y=e=>["use-shuffle",e,"shuffle-mode"];const q=e=>{const t=(e=>{const t=B(),i=!(0,D.n)();let n=(0,j.I)({queryKey:["use-shuffle",e,"can-smart-shuffle"],queryFn:()=>t.getAvailableShuffleModes(e),staleTime:36e5,gcTime:72e5}).data;return i&&(n=[b.j.OFF,b.j.ON]),n})(e),[i,r]=function(e){const t=B(),i=(0,H.jE)(),r=(0,n.useRef)(null),{isActive:a}=(0,W.l_)(e),s=(0,G.o)(z.l),[o]=(0,K.d7)(s,1e3),l=(0,j.I)({queryKey:Y(e),queryFn:async()=>await t.getShuffle(e),staleTime:0,gcTime:72e5}).data;(0,n.useEffect)((()=>{i.invalidateQueries({queryKey:Y(e)})}),[e,o,i]);const c=(0,n.useCallback)((n=>{const a=Y(e);if(r.current&&clearTimeout(r.current),n!==b.j.SMART_SHUFFLE)return t.setShuffle(e,n);i.setQueryData(a,b.j.SMART_SHUFFLE),r.current=setTimeout((()=>t.setShuffle(e,n)),1e3)}),[e,i,t]);return(0,n.useEffect)((()=>{const n=t.getEvents(),r=Y(e),s=n.addListener(V.S.UPDATE,(({data:t})=>{t.contextURI===e&&i.setQueryData(r,t.shuffleMode)})),o=n.addListener(V.S.UPDATE_COMPLETE,(({data:t})=>{t.contextURI!==e||a||i.invalidateQueries({queryKey:r})})),l=n.addListener(V.S.UPDATE_ERROR,(()=>{i.invalidateQueries({queryKey:r})}));return()=>{s(),o(),l()}}),[e,a,o,i,t]),[l??b.j.OFF,c]}(e),a=(0,F.p)(),s=(0,n.useMemo)((()=>{if(!t)return;const e=void 0!==i?t.indexOf(i):-1;let n=t[(e+1)%t.length];return a||n!==b.j.SMART_SHUFFLE||(n=t[(e+2)%t.length]),n}),[i,t,a]),o=(0,n.useCallback)((()=>{if(void 0!==s)return r(s),s}),[s,r]);return{shuffleMode:i,nextShuffleMode:s,availableShuffleModes:t,setShuffleMode:r,cycleShuffleMode:o,isDsaRestricted:!a}};var Z=i(65796),$=i(73015),Q=i(75235),J=i(79303),X=i(72091);const ee="E1ikFpkPVaoLplbQdrTP",te="nozebc1PGSbzmePU25qY",ie=({label:e,shuffleModeConfig:t,size:i="large",onClick:r,disabled:s=!1,activationVisible:l=!1,shuffleIsOn:c,focusOnRender:u=!1,offsetDotDistance:m=!0,withPadding:p=!1})=>{const h=(0,n.useRef)(null);return(0,n.useEffect)((()=>{u&&h.current?.focus()}),[u]),(0,C.jsx)(d.Zp,{label:e,children:(0,C.jsx)(o.H,{onClick:s?void 0:r,iconOnly:t.icon,semanticColor:t.semanticColor,size:i,"aria-describedby":l?"smartShuffleActivationDescription":void 0,"aria-label":e,"aria-disabled":s,condensedAll:!p,className:a()({[ee]:c,[te]:m}),ref:h})})},ne=({entityName:e,contextUri:t,activationPlacement:i,size:r,isActive:a=!1,offsetDotDistance:o=!0,withPadding:d=!1,disabled:m=!1,shuffleContext:p,withActivation:h=!0,withSnackbar:g=!0})=>{const{shuffleMode:f,nextShuffleMode:v,availableShuffleModes:y,setShuffleMode:_,cycleShuffleMode:E,isDsaRestricted:x}=q(t),{spec:T}=(0,X.r)(l.a,{data:{uri:t}}),I=(0,n.useMemo)((()=>T.menuShuffleButtonFactory()),[T]),N=(0,J.s)(),{enqueueSnackbar:w}=(0,$.d)(),[R,k]=(0,n.useState)(!1),{isOpen:O}=(0,s.d4)((e=>e.ui.introducingSmartShuffleModal)),P=A[f],j=void 0!==v?A[v]:void 0,D=y?.includes(b.j.SMART_SHUFFLE),[M,U,B,H]=(0,Z.Z)(y,p,h,f),V=(0,n.useCallback)((e=>{e===b.j.SMART_SHUFFLE?w(a?c.Ru.get("web-player.smart-shuffle.enabled-smart-shuffle"):c.Ru.get("web-player.smart-shuffle.enabled-smart-shuffle-not-active-playlist")):f===b.j.SMART_SHUFFLE&&w(c.Ru.get("web-player.smart-shuffle.disabled-smart-shuffle"))}),[f,w,a]),G=()=>{H(!1),U(!1)},z=(0,n.useCallback)((e=>e===b.j.SMART_SHUFFLE?"smart_shuffle":e===b.j.ON?"shuffle":"linear"),[]),[W,K]=(0,Q.x)("smart-shuffle-menu",0),Y=(0,F.p)(),ee=W>=3||!D,te={label:j?.label?.(e,!!D&&Y)??c.Ru.get("web-player.smart-shuffle.smart-shuffle"),shuffleModeConfig:P,size:r,activationVisible:M,shuffleIsOn:f!==b.j.OFF,offsetDotDistance:o,withPadding:d,disabled:m};return ee?(0,C.jsx)(L,{visible:B,onHide:G,placement:i,label:c.Ru.get("web-player.smart-shuffle.activation-text"),children:(0,C.jsx)(ie,{...te,onClick:()=>{const e=f,t=E();G(),g&&V(t),D?N.logInteraction(T.regularShuffleButtonFactory().hitSelectShuffleMode({previousMode:z(e),selectedMode:z(t)})):N.logInteraction(t===b.j.ON?T.regularShuffleButtonFactory().hitShuffleEnable():T.regularShuffleButtonFactory().hitShuffleDisable())},focusOnRender:R})}):(0,C.jsx)(L,{visible:M,onHide:G,placement:i,label:c.Ru.get("web-player.smart-shuffle.activation-message"),children:(0,C.jsx)(u.b,{menu:(0,C.jsx)(S,{shuffleMode:f,onClick:(e,t)=>{const i=e===f?b.j.OFF:e;_(i),V(i),t(i===b.j.OFF)},spec:I,logger:N,isDsaRestricted:x}),onHide:()=>{W+1===3&&(k(!0),N.logImpression(T.tristateOnboardingTooltipFactory().impression())),K(W+1)},onShow:()=>{G(),N.logInteraction(T.menuShuffleButtonFactory().hitUiReveal())},onClickOutside:e=>{O||e()},children:(e,t)=>(0,C.jsx)(ie,{...te,onClick:e=>{t(e)}})})})}},86204:(e,t,i)=>{"use strict";i.d(t,{w:()=>o});var n=i(30758),r=i(59490),a=i(86070);const s=({renderDisabled:e=(()=>null),renderEnabled:t})=>(0,r.XR)(!0)?t():e(),o=e=>(0,a.jsx)(n.Suspense,{fallback:null,children:(0,a.jsx)(s,{...e})})},95114:(e,t,i)=>{"use strict";i.d(t,{n:()=>x,J2:()=>_,B2:()=>C});var n=i(30758),r=i(93240);function a(e){const{timeout:t,style:i={},mode:n}=e;return{duration:"object"==typeof t?t[n]||0:t,easing:i.transitionTimingFunction,delay:i.transitionDelay}}const s={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:i=300,easing:n=s.easeInOut,delay:r=0}=t||{};return(Array.isArray(e)?e:[e]).map((e=>{const t="string"==typeof i?i:o(i),a="string"==typeof r?r:o(r);return`${e} ${t} ${n} ${a}`})).join(",")}var c=i(68916),u=i(86070);const d={entering:{opacity:1},entered:{opacity:1}},m=(0,n.forwardRef)(((e,t)=>{const{children:i,in:s,timeout:o=0,style:m,onEnter:p,onEntered:h,onExit:g,onExited:f,...v}=e,y=(0,n.useRef)(null),b=(0,c.S)([y,i.ref,t]);return(0,u.jsx)(r.eB,{appear:!0,in:s,nodeRef:y,onEnter:(e,t)=>{const i=a({style:m,timeout:o,mode:"enter"});e.style.transition=l("opacity",i),p&&p(e,t)},onEntered:h,onExit:e=>{const t=a({style:m,timeout:o,mode:"exit"});e.style.transition=l("opacity",t),g&&g(e)},onExited:f,timeout:o,...v,children:(e,t)=>(0,n.cloneElement)(i,{style:{opacity:0,visibility:"exited"!==e||s?void 0:"hidden",...d[e],...m,...i.props.style},ref:b,...t})})}));var p=i(22911),h=i(36011),g=i(95273);function f({message:e}){return(0,u.jsx)(p.O,{children:(0,u.jsx)(g.P,{center:(0,u.jsx)(h.z,{children:e})})})}const v=(0,n.forwardRef)((({id:e,style:t,children:i},n)=>{const{closeSnackbar:a}=(0,r.dh)();return(0,u.jsx)("div",{ref:n,role:"status",id:e?String(e):void 0,style:t,onClick:()=>{a(e)},children:i})})),y=(0,n.forwardRef)((({message:e,id:t,style:i},n)=>(0,u.jsx)(v,{id:t,style:i,ref:n,children:(0,u.jsx)(f,{message:e})}))),b={snackbarContainer:"SmJ9PevS7h5IWNQ3K9z3",snackbar:"yrSYBVErq__9yOFyugns"},_=(0,n.createContext)({current:[]}),E=(0,n.createContext)((()=>{})),C=()=>(0,n.useContext)(E);function x({children:e,domRootRef:t}){const i=(0,n.useRef)([]),[a,s]=(0,n.useState)(null);return(0,u.jsx)(r.n,{maxSnack:3,domRoot:a??t?.current??void 0,anchorOrigin:{vertical:"bottom",horizontal:"center"},classes:{containerRoot:b.snackbarContainer,root:b.snackbar},TransitionComponent:m,Components:{default:y,headless:v},preventDuplicate:!0,disableWindowBlurListener:!0,onEnter:(e,t,n)=>{i.current.push(n)},onExit:(e,t)=>{i.current=i.current.filter((e=>e!==t))},children:(0,u.jsx)(_.Provider,{value:i,children:(0,u.jsx)(E.Provider,{value:s,children:e})})})}},19316:(e,t,i)=>{"use strict";i.d(t,{M:()=>a});var n=i(30171),r=i(86070);function a({ctaText:e,onCtaClick:t}){return(0,r.jsx)(n.H,{semanticColor:"textBrightAccent",onClick:t,condensedAll:!0,size:"small","aria-hidden":"true",children:e})}},69314:(e,t,i)=>{"use strict";i.d(t,{w:()=>l});var n=i(67464),r=i(89942),a=i(38861);const s={snackbarImage:"XTygmcBFgNjoo0ckBBll"};var o=i(86070);function l({src:e,title:t,type:i}){const l=(0,a.dZ)();return(0,o.jsx)(n.b,{fadeIn:!0,images:e?[{url:l(e,24)}]:[],title:t,type:i,size:r.Qe.SIZE_24,shape:n.u.ROUNDED_CORNERS,iconSize:"xsmall",className:s.snackbarImage})}},36011:(e,t,i)=>{"use strict";i.d(t,{z:()=>a});var n=i(12783),r=i(86070);function a({children:e}){return(0,r.jsx)(n.E,{variant:"bodyMedium",semanticColor:"textBase",children:e})}},95273:(e,t,i)=>{"use strict";i.d(t,{P:()=>l});const n="TcJ5lUfQ25AJNoCrWO5Z",r="xaCo5LWfBMxqfWjUA3o2",a="r4Hbxvv02KfOVeZ_v335",s="Hkw5_oNxFTDAuh5Bdw6Q";var o=i(86070);const l=({leading:e,center:t,trailing:i})=>(0,o.jsxs)("div",{className:n,children:[e?(0,o.jsx)("div",{className:r,children:e}):null,(0,o.jsx)("div",{className:a,children:t}),i?(0,o.jsx)("div",{className:s,children:i}):null]})},22911:(e,t,i)=>{"use strict";i.d(t,{O:()=>l});var n=i(97500),r=i.n(n),a=i(69644);const s="RQREWe_yBdtc_g6eC3wQ";var o=i(86070);const l=({children:e})=>(0,o.jsx)(a.a,{variant:"elevated",className:r()("encore-light-theme","encore-layout-themes",s),children:e})},94723:(e,t,i)=>{"use strict";i.d(t,{g:()=>h});var n=i(30758),r=i(97500),a=i.n(r),s=i(12783),o=i(11808),l=i(85072);const c="w0kwPDoelauN3C9dVoVe",u="xzLZD9uD3b4u9wecXAJY",d="DaFhhSm73r7rNpomErhI";var m=i(86070);const p=({children:e})=>(0,m.jsx)(m.Fragment,{children:e}),h=(0,n.forwardRef)((function({users:e,maxSlots:t=3,size:i,withoutOverflowBadge:n=!1,dropShadow:r=!1,AvatarWrapper:h=p},g){const f=Math.max(2,t),v=e.length>f?e.length-f+1:0,y=e.slice(0,f),{userIconSize:b,width:_,smallFontSize:E,largeFontSize:C}=(e=>{switch(e){case"xxlarge":return{userIconSize:"xlarge",width:64,smallFontSize:24,largeFontSize:32};case"xlarge":return{userIconSize:"large",width:48,smallFontSize:18,largeFontSize:24};case"large":return{userIconSize:"medium",width:32,smallFontSize:12,largeFontSize:16};case"medium":default:return{userIconSize:"small",width:24,smallFontSize:9,largeFontSize:12};case"small":return{userIconSize:"xsmall",width:18,smallFontSize:8,largeFontSize:10}}})(i),x=v>9?E:C,S=(0,m.jsx)("span",{className:a()(u,"encore-inverted-light-set"),style:{width:_,height:_},role:"presentation",children:(0,m.jsx)(s.E,{variant:"bodySmallBold",style:{fontSize:x},semanticColor:"textBase",children:`+${v}`})});return(0,m.jsx)("div",{className:a()(c),ref:g,children:y.map(((e,t)=>!n&&v>0&&t===f-1?(0,m.jsx)(h,{index:t,children:(0,m.jsx)(l.e,{images:[],userIconSize:b,label:o.Ru.get("web-player.social-connect.facepile.and-others",v),width:_,piled:!0,customPlaceholder:S})},"others"):(0,m.jsx)(h,{index:t,user:e,children:(0,m.jsx)(l.e,{images:e.images,userIconSize:b,label:e.displayName,displayName:e.displayName,username:e.username,width:_,piled:t>0,imageClassName:r?d:void 0})},e.displayName)))})}))},98406:(e,t,i)=>{"use strict";i.d(t,{$:()=>p});var n=i(30758),r=i(41978),a=i(43830),s=i(91903),o=i(11808),l=i(90751),c=i(61967),u=i(69641),d=i(13874),m=i(86070);const p=()=>{const e=(0,r.wA)(),t=(0,c.Y)(),{logStartJam:i}=(0,u.O)(),p=(0,n.useCallback)((async()=>{try{i(),await t()}catch(t){e((0,l.A9)(d.EL.ERROR))}}),[t,e,i]);return(0,m.jsx)(a.$,{iconLeading:s.V,size:"small",onClick:p,children:o.Ru.get("web-player.social-connect.menu-action.title")})}},30293:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var n=i(30758),r=i(85808),a=i(11808),s=i(39733),o=i(73015),l=i(1696);const c=()=>{const{enqueueSnackbar:e}=(0,o.d)(),t=(0,s.vh)();return(0,n.useCallback)((async i=>{try{if(!i)return;await(0,l.l)(i.shareableUrl);const n=(0,r.c)({share_id:i?.shareId,entity_uri:i?.spotifyUri,share_url:i?.shareableUrl});t.send(n),e(a.Ru.get("web-player.social-connect.invitation-modal.success-toast-message"))}catch(e){TypeError}}),[e,t])}},69641:(e,t,i)=>{"use strict";i.d(t,{O:()=>c});var n=i(30758),r=i(26960),a=i(27563),s=i(50486),o=i(72091),l=i(86070);const c=()=>{const{spec:e,logger:t,UBIFragment:i}=(0,o.r)(r.J,{}),{uri:c}=(0,s.f)(),u=(0,n.useCallback)(((i,n)=>{const r=e.inviteButtonFactory().hitShare({entityToBeShared:i,shareId:n});t.logInteraction(r)}),[t,e]),d=(0,n.useCallback)((()=>{const i=e.endButtonFactory().hitUiReveal();t.logInteraction(i)}),[t,e]),m=(0,n.useCallback)((()=>{const i=e.leaveButtonFactory().hitUiReveal();t.logInteraction(i)}),[t,e]),p=(0,n.useCallback)((()=>{const i=e.facepileButtonFactory().hitUiNavigate({destination:a.S.PARTICIPANTS_PAGE});t.logInteraction(i)}),[t,e]),h=(0,n.useCallback)((t=>(0,l.jsx)(i,{spec:e,...t})),[i,e]);return{logInviteClick:u,logEndClick:d,logLeaveClick:m,logFacePileClick:p,logStartJam:(0,n.useCallback)((()=>{const i=e.createJamButtonFactory().hitUiNavigate({destination:c??""});t.logInteraction(i)}),[t,e,c]),UBIFragmentWithSpec:h}}},54659:(e,t,i)=>{"use strict";i.d(t,{Z:()=>X});var n=i(82097),r=i(30758),a=i(41978),s=i(12783),o=i(81987),l=i(11808),c=i(57735),u=i(97500),d=i.n(u),m=i(33242),p=i(69644),h=i(30171),g=i(43178),f=i(43830),v=i(90058);const y="_GA0LJ6qjoKBsWLq34XF",b="s_iKX8Su0w1W5b9yObSm",_="aQ5ntWUtU9bcqS9fS9aC",E="SxLR9RMcR2XyJCZuxYqv",C="vtk1i3JMLWObMppMQ0gH",x="x8qh9EgeC3AdLO0C54Og",S="Dm9gGjGoA7yNxClwSV24",A="MPtthrsnd9PdsCTssJqk";var T=i(86070);const I=({onClose:e,onCopyLink:t,inviteUrl:i})=>(0,T.jsxs)(p.a,{className:y,padding:"0",children:[(0,T.jsxs)("div",{className:b,children:[(0,T.jsxs)("div",{className:E,children:[(0,T.jsx)(s.E,{variant:"bodySmallBold",children:l.Ru.get("web-player.social-connect.invitation.qr-code.title")}),(0,T.jsx)(s.E,{variant:"bodySmall",semanticColor:"textSubdued",children:l.Ru.get("web-player.social-connect.invitation.qr-code.description")})]}),(0,T.jsx)(h.H,{semanticColor:"textSubdued",iconOnly:g.M,size:"small",onClick:e,condensedAll:!0,"aria-label":l.Ru.get("web-player.social-connect.invitation-modal.button-tertiary")})]}),(0,T.jsx)("div",{className:C}),(0,T.jsxs)("div",{className:d()(b,_,x),children:[(0,T.jsx)(f.$,{iconLeading:v._,colorSet:"invertedLight",size:"small",onClick:t,className:S,children:l.Ru.get("web-player.social-connect.invitation-modal.button-primary")}),(0,T.jsx)("div",{className:A,children:(0,T.jsx)(m.Ay,{value:i,size:100})})]})]});var N=i(49217),w=i(90751),R=i(13874);const k=({onClick:e})=>{const t=(0,a.wA)(),i=(0,r.useCallback)((()=>{e(),t((0,w.A9)(R.EL.END_SESSION))}),[t,e]);return(0,T.jsx)(N.n,{size:"small",onClick:i,children:l.Ru.get("web-player.social-connect.end-session.end-session-button")})},O=({onClick:e})=>(0,T.jsx)(N.n,{size:"small",onClick:async t=>{e(t)},children:l.Ru.get("web-player.social-connect.invite-button")}),P=({onClick:e})=>{const t=(0,a.wA)(),i=(0,r.useCallback)((()=>{e(),t((0,w.A9)(R.EL.LEAVE_SESSION))}),[t,e]);return(0,T.jsx)(N.n,{size:"small",onClick:i,children:l.Ru.get("web-player.social-connect.leave-session.leave-session-button")})};var L=i(9183),j=i(21798),D=i(94723),M=i(65519),U=i(27563),B=i(19159);const F="E6U6SyOECK4IENpzZw2R",H="rirXgOjB8QWiJWDk5hSD",V=({currentSession:e,username:t,onClick:i})=>{const{sessionMembers:n}=e,a=(0,L.Zp)(),c=(0,o.NC)(B.eWj),{setQueueView:u}=(0,j.m)(),d=n.length+2>3?n.length-3:0,m=(0,M.t)(e,t,{userFirst:!0}),p=(0,r.useCallback)((()=>{i&&i(),c?u(j.p.PARTICIPANT_LIST):a(U.S.PARTICIPANTS_PAGE)}),[c,a,i,u]);return(0,T.jsxs)(N.n,{size:"small",className:F,onClick:p,"aria-label":l.Ru.get("web-player.social-connect.participant-list.title"),children:[(0,T.jsx)(D.g,{users:m,maxSlots:3,withoutOverflowBadge:!0}),d>0&&(0,T.jsx)(s.E,{variant:"bodySmallBold",semanticColor:"textBase",className:H,children:`+${d}`})]})};var G=i(30293),z=i(69641),W=i(42047);const K="CyBimvsotsoxqwtiZeAn",Y="_GKa4bilkTYbQLgcLogI",q="uXHR7rkHhuz9kVPNWwYW",Z="KFGFA5pPG0hgIB97pZfI",$=({id:e,label:t,value:i,onChange:n})=>(0,T.jsxs)("label",{htmlFor:e,className:Z,children:[(0,T.jsx)(s.E,{variant:"bodySmall",semanticColor:"textSubdued",children:t}),(0,T.jsx)(c.l,{id:e,value:i,onSelected:n,condensed:!0})]}),Q=({className:e,emptyStateComponent:t})=>{const{currentSession:i,setQueueOnlyMode:n,setParticipantVolumeControl:c}=(0,W.D)(),u=(0,a.d4)((({session:e})=>e.user?.id)),d=i?.joinSessionShortLink,{logFacePileClick:m,logInviteClick:p,logEndClick:h,logLeaveClick:g,UBIFragmentWithSpec:f}=(0,z.O)(),v=(0,G.Z)(),y=(0,o.NC)(B.eWj),[b,_]=(0,r.useState)(!0),E=(0,r.useCallback)((()=>{m()}),[m]),C=(0,r.useCallback)((async()=>{i?.joinSessionShortLink&&await v(i.joinSessionShortLink),p(d?.spotifyUri??"",d?.shareId??"")}),[v,i?.joinSessionShortLink,d?.shareId,d?.spotifyUri,p]),x=(0,r.useCallback)((async()=>{y?_((e=>!e)):C()}),[C,y]),S=(0,r.useCallback)((()=>{h()}),[h]),A=(0,r.useCallback)((()=>{g()}),[g]);if(!i?.active)return t?(0,T.jsx)(T.Fragment,{children:t}):null;const N=i.sessionMembers.find((e=>e.id===i.sessionOwnerId));return(0,T.jsx)(f,{children:(0,T.jsxs)("div",{className:e,children:[(0,T.jsx)("div",{className:K,children:(0,T.jsx)(s.E,{as:"h1",variant:"titleSmall",semanticColor:"textBase",children:l.Ru.get("web-player.social-connect.session-info.title",{host:N?.displayName??""})})}),(0,T.jsxs)("div",{className:Y,children:[(0,T.jsxs)("div",{className:q,children:[(0,T.jsx)(V,{currentSession:i,username:u,onClick:E}),(0,T.jsx)(O,{onClick:x}),i.isSessionOwner?(0,T.jsx)(k,{onClick:S}):(0,T.jsx)(P,{onClick:A})]}),b&&(0,T.jsx)(I,{onClose:()=>_(!1),onCopyLink:C,inviteUrl:d?.shareableUrl??""}),i.isSessionOwner&&(0,T.jsxs)("div",{children:[(0,T.jsx)($,{id:"queueOnlyMode",label:l.Ru.get("web-player.social-connect.controls.queue-only-mode"),value:!i.queueOnlyMode,onChange:e=>n(!e)}),"UNAVAILABLE"!==i.participantVolumeControl&&(0,T.jsx)($,{id:"participantVolumeControl",label:l.Ru.get("web-player.social-connect.controls.participant-volume-control"),value:"ENABLED"===i.participantVolumeControl,onChange:e=>c(e)})]})]})]})})};var J=i(75621);const X=e=>(0,T.jsx)(n.s,{onError:e=>{(0,J.Jy)(e,"JamQueueHeader")},suspenseFallback:e.emptyStateComponent,children:(0,T.jsx)(Q,{...e})})},80801:(e,t,i)=>{"use strict";i.d(t,{N:()=>a,z:()=>s});var n=i(30758),r=i(86070);const a=(0,n.createContext)(void 0),s=({value:e,children:t})=>(0,r.jsx)(a.Provider,{value:e,children:t})},12203:(e,t,i)=>{"use strict";i.d(t,{U:()=>m,o:()=>p});var n=i(30758),r=i(5800),a=i(66108),s=i(36485);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 a.g.BUDDY_FEED;case"now_playing_bar":return a.g.NOW_PLAYING_BAR;case"user_profile":return a.g.PROFILE;case"playlists_sidebar":return a.g.PLAYLISTS_SIDEBAR;case"deeplink":return a.g.DEEP_LINK;case"home":return a.g.HOME;case"search":return a.g.SEARCH;case"your_library":return a.g.COLLECTION;case"now_playing_panel":return a.g.NOW_PLAYING_PANEL;case"whats_new_panel":return a.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,s.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 i=this.locationKeys.indexOf(e.key),n=t?.key?this.locationKeys.indexOf(t.key):-1;this.direction=i>n?r.$.FORWARD:r.$.BACK}this.location=e}};getNavigationReason(e){const{location:t,action:i}=this.history;return this.pageView?"POP"===i?this.direction:t.state?.navigationReason:e===a.g.DEEP_LINK?r.$.DEEP_LINK:r.$.CLIENT_STARTED}reportPageView=e=>{const{location:t,action:i}=this.history;this.onLocationChange(t);const n=e.pageId&&e.pageId===this.pageView?.pageId&&e.entityUri===this.pageView?.entityUri,s=function(e,t){const i=e.pageId===r.$h.WATCHFEED,n=t?.pageId===r.$h.WATCHFEED&&e.pageId===r.$h.HOME;return!i&&!n}(e,this.pageView),o=t.pathname===this.pageView?.pathname;if(n||o&&s)return;const l=e?.navigationalRoot??t.state?.navigationalRoot??a.g.DEEP_LINK,c="POP"!==i?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??a.g.UNKNOWN,pageId:this.pageView.pageId??"UNKNOWN",entityUri:this.pageView.entityUri??"UNKNOWN"};this.pageView.interactionId?this.ubiLogger.logNavigation({...u,interactionId:this.pageView.interactionId}):this.ubiLogger.logNavigation({...u,navigationReason:this.pageView.navigationReason??r.$.UNKNOWN})}}var c=i(51154),u=i(79303),d=i(86070);const m=(0,n.createContext)(void 0),p=({children:e})=>{const t=(0,c.J)(),i=(0,u.s)(),r=(0,n.useMemo)((()=>new l(t,i)),[t,i]);return(0,n.useEffect)((()=>()=>r.unsubscribe()),[r]),(0,d.jsx)(m.Provider,{value:r,children:e})}},60870:(e,t,i)=>{"use strict";i.d(t,{i:()=>c,p:()=>l});var n=i(84033),r=i(31307),a=i(11808),s=i(82447),o=i(86070);const l=[s.I.COMPACT,s.I.LIST],c=[{value:s.I.COMPACT,text:()=>a.Ru.get("web-player.your-library-x.sort-and-view-picker.compact"),icon:()=>(0,o.jsx)(n.d,{size:"small"})},{value:s.I.LIST,text:()=>a.Ru.get("web-player.your-library-x.sort-and-view-picker.list"),icon:()=>(0,o.jsx)(r.N,{size:"small"})}]},35219:(e,t,i)=>{"use strict";i.d(t,{g:()=>o});var n=i(30758),r=i(66416),a=i(13367),s=i(86070);const o=n.memo((()=>(0,s.jsx)(r.W,{children:(0,s.jsx)(a.r,{divider:"before"})})))},78519:(e,t,i)=>{"use strict";i.d(t,{r:()=>h,c:()=>g});var n=i(30758),r=i(97500),a=i.n(r),s=i(81987),o=i(11808),l=i(59706),c=i(46597),u=i(75235),d=i(62943);const m="FT7SGxbdTRfWBMTUYheP";var p=i(86070);const h="yourdj.ylx.tooltipshown",g=({children:e,onTooltipShown:t,api:i,parentRef:r})=>{const[g,f]=(0,n.useState)(!1),[v,y]=(0,n.useState)(!1),b=(0,s.NC)(d.rW);(0,n.useImperativeHandle)(i,(()=>({visible:g,hide:()=>{f(!1)}})));const{isPlaying:_}=(0,c.I)(),E=(0,n.useRef)(null),C=(0,n.useMemo)((()=>new IntersectionObserver((([e])=>y(e.isIntersecting)))),[]);(0,n.useEffect)((()=>(r?.current&&C.observe(r.current),()=>C.disconnect())),[C,r]);const[x,S]=(0,u.x)(h,!1),A=(0,n.useCallback)((e=>{x||(t?.(e),S(!0),f(!0))}),[x,t,S]),T=(0,n.useCallback)((()=>{E.current&&clearTimeout(E?.current)}),[]);return(0,n.useEffect)((()=>_||!v?(f(!1),T):(x||(E.current=setTimeout((()=>{A("dj_in_ylx")}),2e3)),T)),[x,A,_,v,T]),(0,p.jsx)(l.x,{title:o.Ru.get("ylx.clicktoplay"),description:o.Ru.get("web-player.your-dj.ylx.tooltip.description"),visible:g,id:h,showButtons:!1,hideOnClickOutside:!1,onSecondaryButtonClick:()=>f(!1),placement:"right",renderInline:!1,tippyWrapperClassName:m,className:a()({"circular-sp-vietnamese":b}),children:e})}},79803:(e,t,i)=>{"use strict";i.d(t,{b:()=>s});var n=i(57386),r=i(99837),a=i(86070);const s=()=>(0,a.jsx)("div",{className:r.A.coverContainer,children:(0,a.jsx)(n.P,{iconSize:"xxlarge",className:r.A.coverIcon})})},265:(e,t,i)=>{"use strict";i.d(t,{g:()=>o});var n=i(37813),r=i(11808),a=i(16833),s=i(86070);const o=({pinned:e,size:t="xsmall"})=>e?(0,s.jsx)(n.H,{semanticColor:"textBrightAccent",size:t,title:r.Ru.get("web-player.your-library-x.pinned"),className:a.A.icon}):null},14627:(e,t,i)=>{"use strict";i.d(t,{O:()=>c.O9,P:()=>g});var n=i(30758),r=i(31186),a=i(12783),s=i(61544);const o="main-dragAndDrop-dndImageShelter",l="main-dragAndDrop-dndImage";var c=i(36921),u=i(43717),d=i(31225),m=i(7353),p=i(86070);const h=({text:e})=>(0,p.jsx)(a.E,{variant:"bodyMedium",dir:"auto",children:e}),g=e=>{const{setIds:t,setDropOriginUri:i,setSectionId:a}=(0,n.useContext)(u.O_),{supportsDragAndDrop:g}=(0,d._)();return{draggable:g,onDragStart:(n,u)=>{if(!g)return;const{itemUris:d=[],itemMimeTypes:f=[],dragLabelText:v="",contextUri:y="",sectionId:b=0,dropOriginUri:_="",itemIds:E}={...e,...u};n.defaultPrevented||t(E??d),i(_),a(b),window.addEventListener("click",(()=>{document.body.removeAttribute("data-dragging-type")}),{once:!0});const C=d.map((e=>(0,s.o_)(e))).filter(m.P),x=C.map((e=>e?.toURL()));if(0===C.length||n.metaKey)return void n.preventDefault();n.dataTransfer.setData("text/x-spotify-context",y),n.dataTransfer.setData("text/uri-list",x.join("\n")),n.dataTransfer.setData("text/plain",x.join("\n")),n.dataTransfer.setData("text/x-spotify-section",`${b||0}`);const S={};C.forEach(((e,t)=>{const i=f[t]??c.O9[e.type];i&&(S[i]??=[],S[i].push(e.toURI()))})),document.body.setAttribute("data-dragging-type",Object.keys(S).join(" ")),Object.entries(S).forEach((([e,t])=>{n.dataTransfer.setData(e,t.join("\n"))})),E?.length===d.length&&n.dataTransfer.setData(c.fl.UIDS,E.join("\n"));const A=(0,r.renderToString)((0,p.jsx)(h,{text:v}));if("function"==typeof n.dataTransfer.setDragImage){const e=function(e){const t=document.createElement("p");t.className=l,t.innerHTML=e;const i=document.createElement("div");return i.className=o,document.body.appendChild(t),document.body.appendChild(i),{element:t,remove(){requestAnimationFrame((()=>{t.parentNode&&t.parentNode.removeChild(t),i.parentNode&&i.parentNode.removeChild(i)}))}}}(A);n.dataTransfer.setDragImage(e.element,0,0),e.remove()}}}}},64736:(e,t,i)=>{"use strict";i.d(t,{K:()=>a});var n=i(30758),r=i(26969);const a=({ref:e})=>{const[t,i]=(0,n.useState)(!1);return(0,r.w)({refOrElement:e,observeOnMount:!0,onResize:()=>{e.current&&i(e.current?.offsetWidth<e.current?.scrollWidth||e.current?.offsetHeight<e.current?.scrollHeight)}}),t}},63574:(e,t,i)=>{"use strict";i.d(t,{W:()=>c});var n=i(41978),r=i(61544),a=i(11808),s=i(5538),o=i(71817),l=i(39554);const c=({type:e,uri:t})=>{const i=(0,n.d4)(s.MU),c=(0,n.d4)(s.NR);if(void 0===t)return!1;const u=a.Ru.getLocaleForURLPath(),d=t===o.c.HOME?t:(0,r.o_)(t)?.type;return(0,l.p)({localeFeatureFlag:i,entityFeatureFlag:c,urlLocale:u,entity:d,type:e})}},84288:(e,t,i)=>{"use strict";var n=i(46588),r=i(99576),a=i(66790),s=i(81987),o=i(66465),l=i(78827),c=i(74987),u=i(11808);const d="PWA_DISPLAY_MODE_CHANGED";var m=i(67900),p=i(90751),h=i(51778),g=i(41978),f=i(16121),v=i(91335),y=i(82097),b=i(30758);const _="main-appShell-container",E="main-appShell-sideBar",C="main-appShell-navItems",x="main-appShell-mainContent",S="main-appShell-topBar",A="main-appShell-cards",T="main-appShell-cardsHeader",I="main-appShell-cardsWrapper",N="main-appShell-card",w="main-appShell-playbackBar";var R=i(86070);const k=(0,b.memo)((function(){return(0,R.jsxs)("div",{className:_,children:[(0,R.jsx)("div",{className:E,children:(0,R.jsxs)("svg",{className:C,width:"232",height:"704",viewBox:"0 0 232 704",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("path",{fill:"#000",d:"M0 0h227v704H0z"}),(0,R.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,R.jsx)("path",{fill:"#404040",d:"M53 162h122v11H53zM64 258h95v11H64z"}),(0,R.jsx)("path",{fill:"#fff",d:"M16 248h32v32H16z"}),(0,R.jsx)("path",{d:"M38 263h-5v-5h-2v5h-5v2h5v5h2v-5h5v-2z",fill:"#000"}),(0,R.jsx)("path",{fill:"url(#paint0_linear)",d:"M16 292h32v32H16z"}),(0,R.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,R.jsx)("path",{fill:"#404040",d:"M64 303h79v11H64z"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 353h142v11H16zM16 395h53v11H16zM16 437h98v11H16zM16 479h143v11H16zM16 521h97v11H16z",opacity:"0.6"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 218h71v11H16z"}),(0,R.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,R.jsx)("path",{fill:"#404040",d:"M53 78h122v11H53zM53 120h122v11H53z"}),(0,R.jsx)("defs",{children:(0,R.jsxs)("linearGradient",{id:"paint0_linear",x1:"0",y1:"308",x2:"32",y2:"340",gradientUnits:"userSpaceOnUse",children:[(0,R.jsx)("stop",{stopColor:"#450AF5"}),(0,R.jsx)("stop",{offset:"1",stopColor:"#C4EFD9"})]})})]})}),(0,R.jsxs)("div",{className:x,children:[(0,R.jsx)("div",{className:S,children:(0,R.jsxs)("svg",{width:"125",height:"95",viewBox:"0 0 125 95",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{x:"0",y:"31",width:"125",height:"32",rx:"16",fill:"#282828"}),(0,R.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,R.jsx)("path",{fill:"#404040",d:"M1014 42h66v11h-66z"})]})}),(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{className:A,children:[(0,R.jsxs)("div",{className:T,children:[(0,R.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,R.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,R.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,R.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,R.jsxs)("div",{className:I,children:[(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]}),(0,R.jsxs)("div",{className:A,children:[(0,R.jsxs)("div",{className:T,children:[(0,R.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,R.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,R.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,R.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,R.jsxs)("div",{className:I,children:[(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]}),(0,R.jsxs)("div",{className:A,children:[(0,R.jsxs)("div",{className:T,children:[(0,R.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,R.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,R.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,R.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,R.jsxs)("div",{className:I,children:[(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,R.jsxs)("svg",{className:N,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,R.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]})]})]}),(0,R.jsxs)("div",{className:w,children:[(0,R.jsx)("div",{children:(0,R.jsx)("svg",{width:"175",height:"40",viewBox:"0 0 175 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,R.jsx)("path",{fill:"#404040",d:"M53 5h122v11H53zM53 23h101v11H53zM0 0h40v40H0z"})})}),(0,R.jsx)("div",{children:(0,R.jsxs)("svg",{width:"216",height:"48",viewBox:"0 0 216 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.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,R.jsx)("circle",{cx:"108",cy:"24",r:"20",fill:"#fff"}),(0,R.jsx)("path",{d:"M100 16h16v16h-16V16z",fill:"#fff"}),(0,R.jsx)("path",{d:"M104.018 30l10.392-6-10.392-6v12z",fill:"#000"})]})}),(0,R.jsx)("div",{children:(0,R.jsx)("svg",{width:"99",height:"16",viewBox:"0 0 99 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,R.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 O=i(8261);const P=b.memo((function(){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(O.x,{isOpen:!0,isRemoteConfigInitialized:!1,headingMessage:u.Ru.get("error-dialog.generic.header"),message:u.Ru.get("error-dialog.generic.body"),buttonLabel:u.Ru.get("fatal-error.button-label")}),(0,R.jsx)(k,{})]})}));var L=i(89333),j=i(49141),D=i(99744);const M=()=>{const e=(0,D.z)(),t=(0,g.Pj)(),i=(0,b.useRef)(),n=(0,j.S)();return(0,b.useEffect)((()=>{i.current=n}),[n]),(0,b.useEffect)((()=>navigator&&navigator.mediaSession?(navigator.mediaSession.setActionHandler("previoustrack",(()=>{const t=i.current?.isOpen;t||e.skipToPrevious()})),navigator.mediaSession.setActionHandler("nexttrack",(()=>{const t=i.current?.isOpen;t||e.skipToNext()})),navigator.mediaSession.setActionHandler("play",(()=>{const t=i.current?.isOpen;t||e.resume()})),navigator.mediaSession.setActionHandler("pause",(()=>{const t=i.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 U=i(23431),B=i(91947),F=i(89956),H=i(72814),V=i(19936),G=i(63135),z=i(82101),W=i(95421),K=i(95339),Y=i(46159),q=i(36485);function Z(e){return e?.map((({url:e,width:t,height:i})=>({src:e,sizes:`${t}x${i}`})))??[]}function $(e){window.navigator.mediaSession&&(window.navigator.mediaSession.metadata=function(e){return(0,K.v)(e)?new window.MediaMetadata({title:e.name,artist:e.artists.map((e=>e.name)).join(u.Ru.getSeparator()),album:e.album.name,artwork:Z(e.images)}):(0,W.p)(e)?new window.MediaMetadata({title:e.name,artist:"",album:e.show.name,artwork:Z(e.images)}):(0,z.d)(e)?new window.MediaMetadata({title:e.name,artist:"",album:e.book.name,artwork:Z(e.images)}):(0,G.N)(e)?new window.MediaMetadata({title:u.Ru.get("ad-formats.advertisement"),artist:"",album:"",artwork:Z(e.images)}):(0,Y.v)(e)||void 0===e?new window.MediaMetadata({title:"",artist:"",album:"",artwork:[]}):(0,q.d)(e)}(e))}const Q=()=>((0,V.p)(H.gd.UPDATE,(({data:e})=>$(e?.item??void 0))),null),J=()=>{const e=(0,g.d4)(U.c)===B.K.pip;return!(0,F.Ek)()||e?(0,R.jsx)(Q,{}):null};var X=i(96131),ee=i(35736),te=i(48253),ie=i(62988),ne=i(61544);function re(e=""){const t=`https://open.spotify.com${e}`;let i="";const n=/^\/\w+\/([a-zA-Z0-9]+)[/\w+]*/.exec(e);n&&(i=n[1]);let r=e,a=e;const s=e.match(/^\/search\/(.*)\/(.*)/);return/^\/genre\//.test(e)||/^\/view\//.test(e)?a="/browse/genres":"/"===e?(a="/browse",r="/browse/featured"):"/browse/charts"===e?a="/charts":"/collection/tracks"===e?a="/collection/songs":"/search"===e?a="/search":s?(a="podcasts"===s[2]?"/search/shows":`/search/${s[2]}`,r=`/search/${s[2]}`):e.match(/\/search\/(?<query>.*)/)?(a="/search",r="/search/results"):"/download"===e?a="/upsell":"/queue"===e?a="/nowplaying/queue":/^\/artist\/[a-zA-Z0-9]+\/related/.test(e)?(r=(0,ne.IT)(i).toString(),a="/artist/related"):/^\/artist\/[a-zA-Z0-9]+\/about/.test(e)?(r=(0,ne.IT)(i).toString(),a="/artist/about"):/^\/artist\/[a-zA-Z0-9]+\/concerts/.test(e)?(r=(0,ne.IT)(i).toString(),a="/artist/concerts"):(0,ne.ec)(t)?(r=(0,ne.IT)(i).toString(),a="/artist"):(0,ne.tb)(t)?(r=(0,ne.Ps)(i).toString(),a="/playlist"):(0,ne._T)(t)?(r=(0,ne.Q0)(i).toString(),a="/album"):(0,ne.gH)(t)?(r=(0,ne.iM)(i).toString(),a="/episode"):(0,ne.WB)(t)?(r=(0,ne.Mc)(i).toString(),a="/shows"):(0,ne.AP)(t)?(r=(0,ne.Qj)(i).toString(),a="/profile"):(0,ne.U_)(t)&&(r=(0,ne.tR)(i).toString(),a="/track"),{viewUri:r,mappedPageId:a}}var ae=i(84577);const se="#login";var oe=i(9183);var le=i(56991);class ce extends b.Component{constructor(e){super(e);const{eventSender:t,location:i,isAnonymous:n}=this.props;t.send(me(i.pathname,n))}shouldComponentUpdate(e){const{eventSender:t,navigationType:i,location:n,isAnonymous:r}=e,{location:a}=this.props,s=n.hash===se||a.hash===se;return(0,X.j)(n,a)||i===ee.rc.Replace||s||((0,le.D)(n.pathname),t.send(function(e,t=!1){const{viewUri:i,mappedPageId:n}=re(e),r={page:n,type:"exit",view_uri:i};return t?(0,ie.s)(r):(0,te.x)(r)}(a.pathname,r)),t.send(me(n.pathname,r))),!1}render(){return null}}const ue=(0,g.Ng)((function(e,t){return{...t,isAnonymous:e.session.isAnonymous}}))((de=ce,e=>{const t=(0,oe.zy)(),i=(0,oe.Zp)(),n=(0,oe.wQ)(),r=(0,oe.g)();return(0,R.jsx)(de,{...e,navigate:i,navigationType:n,location:t,params:r})}));var de;function me(e,t=!1){const{viewUri:i,mappedPageId:n}=re(e),r={page:n,type:"enter",view_uri:i};return t?(0,ie.s)(r):(0,te.x)(r)}var pe=i(90498),he=i(56717),ge=i(24226);var fe=i(34330),ve=i(39733);const ye=({fetchHomeAd:e,setHomeAd:t,adsSlotConfig:i,fetchRef:n})=>{const r=(0,ve.vh)();return{fetchAndSetHomeAd:(0,b.useMemo)((()=>e&&i?.hpto?async()=>{const i=e();n.current=i;try{t(i);const e=await i;n.current===i&&t(e)}catch(e){n.current===i&&t(void 0);const a=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:a,request_type:"hpto"}))}}:void 0),[r,n,e,t,i])}};function be(e){const[t,i]=(0,b.useState)(!1);return(0,b.useEffect)((()=>i(!1)),[e]),{dismissed:t,dismiss(){i(!0)}}}function _e(){const e=(0,b.useState)(),t=(0,b.useRef)(e[0]);return{imageUrlToExtractHomeAdColorFrom:(0,b.useState)(),extractedHomeAdColor:[e[0],function(i){t.current=i,e[1](i)}],extractedHomeAdColorRef:t}}const Ee=b.useState;var Ce=i(19159);const xe=()=>({allowSwitchingBetweenHomeAdsAndHpto:(0,s.NC)(Ce.htx)});var Se=i(32493);const Ae=b.useState;var Te=i(34594);function Ie({adsSlotConfig:e}){const t=(0,oe.Zp)(),[n,r]=Ae(),a=e&&Te.r.hpto in e;return(0,b.useEffect)((()=>{if(!a)return()=>{};const e=(async()=>{const e=await Promise.resolve().then(i.bind(i,95338)),{slotsClient:n,adsCoreConnector:a}=e,s=await Promise.resolve().then(i.bind(i,11928)),{AdSlotEvent_AdSlotEventType:o,SubSlotRequest:l}=s;return await a.addNewSlot(Te.r.hpto),await a.enableSlot(Te.r.hpto),n.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()))}}),[a,t,r]),{previewHomeAd:n,setPreviewHomeAd:r}}function Ne({fetchHomeAd:e,adsSlotConfig:t,enableLegacyHptoContainerLoader:i}){const{homeAd:n,setHomeAd:r}=function(){const[e,t]=Ee();return{homeAd:e,setHomeAd:t}}(),{fetchAndSetHomeAd:a}=(s={fetchHomeAd:e,setHomeAd:r,adsSlotConfig:t},{...ye({...s,fetchRef:(0,b.useRef)()})});var s;return function({enableLegacyHptoContainerLoader:e}={}){const{allowSwitchingBetweenHomeAdsAndHpto:t}=xe(),i=(0,g.wA)();(0,b.useEffect)((()=>{!t&&e&&i((0,Se.T)())}),[e,t,i])}({enableLegacyHptoContainerLoader:i}),{setHomeAd:r,fetchAndSetHomeAd:a,homeAd:n,..._e(),...be(n),...Ie({adsSlotConfig:t})}}const we=({instance:e,children:t})=>{const{adsSlotConfig:i}=function({getAdsSlotConfig:e}){const[t,i]=(0,b.useState)();return(0,b.useEffect)((function(){e?.().then(i)}),[e]),{adsSlotConfig:t}}({getAdsSlotConfig:e?.config.getAdsSlotConfig}),n=Ne({adsSlotConfig:i,...e?.home});return(0,R.jsx)(ge.Cp.Provider,{value:{adsAPI:e||null,homeAds:n},children:t})};var Re=i(66575),ke=i(40536),Oe=i(67503),Pe=i(62338),Le=i(35738),je=i(87925),De=i(36118),Me=i(10034),Ue=i(41944);const Be=({children:e,providers:t})=>{if(void 0===e)throw new Error("MultiProvider requires children!");return t.reduceRight(((e,t)=>(0,b.cloneElement)(t,void 0,e)),(0,R.jsx)(b.Fragment,{children:e}))};var Fe=i(21596),He=i(142);const Ve=({instance:e,children:t})=>(0,R.jsx)(He.c.Provider,{value:e,children:t}),Ge=(0,b.createContext)(null);const ze=({instance:e,children:t})=>(0,R.jsx)(Ge.Provider,{value:e,children:t});var We=i(69916);const Ke=({request:e,children:t})=>(0,R.jsx)(We.j.Provider,{value:{request:e},children:t});var Ye=i(77527);const qe=({instance:e,children:t})=>(0,R.jsx)(Ye.M.Provider,{value:e,children:t});var Ze=i(62283),$e=i(30052),Qe=i(79303),Je=i(68524);const Xe=({instance:e,children:t})=>(0,R.jsx)(Je.J.Provider,{value:e,children:t}),et=({instance:e,children:t})=>(0,R.jsx)(ve.rP.Provider,{value:e,children:t}),tt=Spicetify.ReactComponent.PlatformProvider=({platform:e,children:t})=>{const i=(0,D.z)(),n=[(0,R.jsx)(et,{instance:e}),(0,R.jsx)(Oe.D,{}),(0,R.jsx)(Ke,{request:e.getGraphQLLoader()}),(0,R.jsx)(Me.J,{platformData:e.getPlatformData()}),(0,R.jsx)(Ue.P,{configuration:e.getRemoteConfiguration()}),(0,R.jsx)(we,{instance:e.getAdManagers()}),(0,R.jsx)(Ze.A,{instance:e.getSingAlongAPI()}),(0,R.jsx)($e.a,{value:null}),(0,R.jsx)(Qe.V,{instance:e.getUBILogger()}),(0,R.jsx)(je.Z,{instance:e.getCollectionPlatformAPI()}),(0,R.jsx)(De.m,{instance:e.getEqualizerAPI()}),(0,R.jsx)(Re.U.Provider,{value:e.getBuddyFeedAPI()}),(0,R.jsx)(ke.U.Provider,{value:e.getBuddyFeedLegacyAPI()}),(0,R.jsx)(Pe.pF,{playerAPI:i}),(0,R.jsx)(Le.tY,{instance:e.getSettingsAPI()}),(0,R.jsx)(Fe.UD,{instance:e.getRequestBuilder()}),(0,R.jsx)(Ve,{instance:e.getAudioOutputDevicesAPI()}),(0,R.jsx)(ze,{instance:e.getExternalAccessoryAPI()}),(0,R.jsx)(qe,{instance:e.getPlaybackFiltersAPI()}),(0,R.jsx)(Xe,{instance:e.getUrlDispenserServiceClient()}),(0,R.jsx)(he.K,{})];return(0,R.jsx)(Be,{providers:n,children:t})};var it=i(90392),nt=i(35790);class rt{constructor(e,t,i){this.currentState=e,this.desktopUBILogger=i,this.sessionDebounceTime=t,rt.checkIfForeground(this.currentState)&&(this.startTime=Date.now())}reportFocusChanged(e){this.reportWindowStateChanged({...this.currentState,focused:e})}reportPiPFocusChanged(e){this.reportWindowStateChanged({...this.currentState,pipFocused:e})}reportVisibilityChanged(e){this.reportWindowStateChanged({...this.currentState,visible:e})}reportWindowStateChanged(e){if(this.currentState===e)return;const t=rt.checkIfForeground(this.currentState),i=rt.checkIfForeground(e);i&&!t?this.startSession():t&&!i&&this.endSession(),this.currentState=e}startSession(){this.startTime=void 0;const e=Date.now();this.timerId=setTimeout((()=>{this.startTime=e,this.desktopUBILogger.logClientGainedFocus()}),this.sessionDebounceTime)}endSession(){this.startTime?this.desktopUBILogger.logClientLostFocus():clearTimeout(this.timerId)}static checkIfForeground(e){return e.visible&&e.focused}registerMainWindowCallbacks(e,t){e.addEventListener("visibilitychange",(()=>{const t=!e.hidden;this.reportVisibilityChanged(t)})),t.addEventListener("blur",(()=>{this.reportFocusChanged(!1)})),t.addEventListener("focus",(()=>{this.reportFocusChanged(!0)}))}registerPiPWindowCallbacks(e){e.addEventListener("blur",(()=>{this.reportPiPFocusChanged(!1)})),e.addEventListener("focus",(()=>{this.reportPiPFocusChanged(!0)}))}}const at=(0,b.createContext)(void 0),st=({children:e})=>{const t=(0,Qe.s)(),i=(0,s.NC)(Ce.m18),n=(0,b.useMemo)((()=>new rt({visible:!document.hidden,focused:document.hasFocus(),pipFocused:!1},i,t)),[t,i]);return(0,R.jsx)(at.Provider,{value:n,children:e})},ot=()=>(0,b.useContext)(at);var lt=i(12203);const ct=({history:e,children:t})=>{const[i,n]=(0,b.useState)((()=>({location:e.location,action:e.action})));return(0,b.useLayoutEffect)((()=>{e.listen(((e,t)=>n({location:e,action:t})))}),[e]),(0,R.jsx)(oe.Ix,{location:i.location,navigationType:i.action,navigator:e,children:t})};var ut=i(24189),dt=i(74258),mt=i(51722),pt=i(69898),ht=i(35252),gt=i(13506),ft=i(95625),vt=i(84640);const yt=()=>(0,ft.v8)("sp_key"),bt=e=>{const t=(0,vt.V)(),i=(()=>{const e=yt();return setInterval((()=>{e!==yt()&&window.location.reload()}),5e3)})();t.on(c.TransportEvent.LOGGED_OUT,(()=>{clearInterval(i),e()}))};const _t=864e5,Et=Spicetify.ReactComponent.PlatformProvider=({platform:e,children:t})=>{const i=(0,s.NC)(Ce.QMQ),n=(0,F.Ek)()?"always":void 0,r=new dt.E({defaultOptions:{queries:{gcTime:0,networkMode:n},mutations:{networkMode:n}}});if((0,b.useEffect)((()=>{var e;bt((()=>{(0,gt.k)()})),e=()=>{console.log("Detected hard reload. Deleting persisted cache."),(0,gt.k)()},window.addEventListener("keydown",(t=>{const i=(t.ctrlKey||t.metaKey)&&t.shiftKey&&"R"===t.key.toUpperCase(),n=t.ctrlKey&&"F5"===t.key.toUpperCase();(i||n)&&e()}))}),[]),(0,b.useEffect)((()=>{i||(0,gt.k)()}),[i]),i){const i=(0,gt.Z)(),n=e.getSession(),a=["v1",e.username,n.locale,n.market];return(0,R.jsx)(ht.t,{client:r,persistOptions:{persister:i,buster:a.join(":"),maxAge:_t,hydrateOptions:{defaultOptions:{queries:{gcTime:_t}}},dehydrateOptions:{shouldDehydrateQuery:e=>!!e.meta?.persist&&(0,mt.XS)(e)}},children:t})}return(0,R.jsx)(pt.Ht,{client:r,children:t})};var Ct=i(83028),xt=i(50586);var St=i(97500),At=i.n(St),Tt=i(74404);function It(){const e=(0,s.NC)(Ce.g3o),t=(0,g.wA)();return(0,b.useEffect)((()=>{e&&t((0,Tt.$h)("dev"))}),[e,t]),null}function Nt(){const e=(0,s.NC)(Ce.SqX),t=(0,g.wA)();return(0,b.useEffect)((()=>{t((0,Tt.ab)(e))}),[e,t]),null}function wt(){return(0,R.jsxs)(b.Suspense,{fallback:null,children:[(0,R.jsx)(It,{}),(0,R.jsx)(Nt,{})]})}var Rt=i(16645),kt=(i(3899),i(15212)),Ot=i(72948),Pt=i(23073);const Lt=b.createContext(null),jt=({children:e})=>{const t=(0,b.useRef)(null);return(0,R.jsx)(Lt.Provider,{value:t,children:e})};var Dt=i(94794),Mt=i(96395),Ut=i(35672);const Bt=e=>{e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()},Ft=()=>{document.fullscreenElement&&document.exitFullscreen?document.exitFullscreen():document.mozFullScreen&&document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitIsFullScreen&&document.webkitExitFullscreen&&document.webkitExitFullscreen()},Ht=()=>!!(document.fullscreenElement||document.webkitIsFullScreen||document.mozFullScreen),Vt="ylcmjHXKpwmez5_bBVgt",Gt="kChcaF3yz3SoL5dZPwEr",zt="npv-nowPlayingBar-container",Wt="npv-nowPlayingBar-controls",Kt="npv-nowPlayingBar-section",Yt="npv-nowPlayingBar-left",qt="npv-nowPlayingBar-center",Zt="npv-nowPlayingBar-right",$t="npv-exitFullScreenButton-button",Qt="Lgyj1e9c3lrdgVGlMIyV",Jt=(0,b.memo)((function({iconSize:e="small",onClick:t}){return(0,R.jsx)("button",{className:$t,onClick:()=>{t?.(),Ft()},"aria-label":u.Ru.get("npv.exit-full-screen"),title:u.Ru.get("npv.exit-full-screen"),children:(0,R.jsx)(Ut.b,{size:e})})}));var Xt=i(58528),ei=i(30171),ti=i(53129);const ii="main-genericButton-button",ni="main-genericButton-buttonActive",ri="main-genericButton-buttonActiveDot",ai=(0,b.forwardRef)(((e,t)=>{const i=e.isActive??!1,n=At()(ii,{[ni]:i||e.isActiveNoIndicator,[ri]:i},e.className);return(0,R.jsx)(ti.Zp,{label:e.label,children:(0,R.jsx)(ei.H,{ref:t,style:e.style,"aria-label":e.label,size:"small",className:n,disabled:e.disabled,iconOnly:e.icon,onClick:e.onToggle,"":e.testId,"data-active":i.toString(),"aria-pressed":i,"data-restore-focus-key":e.restoreFocusKey})})})),si=()=>(0,R.jsx)(Xt.q,{iconSize:24}),oi=({onClick:e,enabled:t})=>{const i=(0,b.useCallback)((()=>{e?.(!t)}),[e,t]);return(0,R.jsx)(ai,{className:Qt,isActive:t,onToggle:i,label:u.Ru.get("web-player.lyrics.title"),testId:"fullscreen-mode-overlay-lyrics-button",icon:si})},li=(0,b.memo)(oi);var ci=i(97684),ui=i(68244),di=i(74322);const mi=({item:e,onClick:t})=>(0,K.v)(e)?(0,R.jsx)(di.b,{uri:e.uri,size:ci.t.sm,onClick:t}):(0,W.p)(e)?(0,R.jsx)(ui.b,{uri:e.uri,size:ci.t.sm,onClick:t,condensed:!0}):null;var pi=i(48701),hi=i(90405),gi=i(2435);function fi(){const e=(0,gi.o)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri));return(0,W.p)(e)||(0,z.d)(e)?"audio"===e.mediaType||"mixed"===e.mediaType:!!(0,G.N)(e)&&e.isPodcastAd}var vi=i(87485),yi=i(18013),bi=i(86204),_i=i(66877);const Ei="Psc33HXPyazZYAAr1tgz",Ci="VGJz_GOARJ6j02JICvW6",xi="VpNHGG5ZhoxQ8AqW709S",Si="P7395UzhjxLUlLZvj5fb",Ai=function(e){const{children:t,active:i=!1,focus:n=!0,label:r,onClick:a,noBackground:s=!1}=e;return(0,R.jsx)(ti.Zp,{label:r,children:(0,R.jsx)("button",{className:At()(Ei,{[Si]:i,[Ci]:s,[xi]:n}),onClick:a,"aria-label":r,children:t})})};var Ti=i(39796),Ii=i(66416),Ni=i(18456),wi=i(83542),Ri=i(95302);const ki=({languages:e=[],activeLanguage:t,onSelectLanguage:i,onClose:n})=>{const r=(0,s.NC)(Ce.bFi);return(0,R.jsx)(Ri.pZ,{value:"subtitles",children:(0,R.jsxs)(Ii.W,{onClose:n,getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,R.jsx)(Ni.y,{divider:"after",children:u.Ru.get("subtitles-picker.heading")}),(0,R.jsx)(wi.D,{onClick:()=>{i(null)},"aria-checked":!t,role:"menuitemradio",children:u.Ru.get("subtitles-picker.option_off")}),e.map((e=>(0,R.jsxs)(wi.D,{onClick:()=>{i(e)},role:"menuitemradio","aria-checked":"string"==typeof t&&e.toLowerCase()===t.toLowerCase(),children:[Oi(e)," ",r?`(${u.Ru.get("subtitles-picker.autogenerated")})`:null]},e)))]})})};function Oi(e){const[t]=e.toLowerCase().split("-");let i="";switch(t){case"zh":i=u.Ru.get("subtitles-picker.option_zh");break;case"cs":i=u.Ru.get("subtitles-picker.option_cs");break;case"nl":i=u.Ru.get("subtitles-picker.option_nl");break;case"en":i=u.Ru.get("subtitles-picker.option_en");break;case"fi":i=u.Ru.get("subtitles-picker.option_fi");break;case"fr":i=u.Ru.get("subtitles-picker.option_fr");break;case"de":i=u.Ru.get("subtitles-picker.option_de");break;case"el":i=u.Ru.get("subtitles-picker.option_el");break;case"hu":i=u.Ru.get("subtitles-picker.option_hu");break;case"id":i=u.Ru.get("subtitles-picker.option_id");break;case"it":i=u.Ru.get("subtitles-picker.option_it");break;case"ja":i=u.Ru.get("subtitles-picker.option_ja");break;case"ms":i=u.Ru.get("subtitles-picker.option_ms");break;case"pl":i=u.Ru.get("subtitles-picker.option_pl");break;case"pt":i=u.Ru.get("subtitles-picker.option_pt");break;case"es":i=u.Ru.get("subtitles-picker.option_es");break;case"sv":i=u.Ru.get("subtitles-picker.option_sv");break;case"tr":i=u.Ru.get("subtitles-picker.option_tr");break;case"vi":i=u.Ru.get("subtitles-picker.option_vi");break;default:i=e}return e.endsWith("-x-cc")&&(i+=" [CC]"),i}const Pi=e=>(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(ki,{...e})});var Li=i(95284),ji=i(19287),Di=i(47439),Mi=i(60102);function Ui(){return(0,Mi.N)(Di.n)}var Bi=i(65662),Fi=i(50486),Hi=i(72091);const Vi=Bi.S.SUBTITLE_LANGUAGES_CHANGED;const Gi=b.memo((function({renderInline:e=!1,noBackground:t,iconSize:i="small"}){const{isSupported:n,availableLanguages:r,preferredLanguage:a,setPreferredLanguage:s}=function(){const e=Ui(),t=e.getCapabilities(),{videoPlayerMode:i}=(0,ji.d)(),{uri:n}=(0,Fi.f)(),{spec:r,logger:a}=(0,Hi.r)(Li.E,{data:{uri:n??"",identifier:i}}),[s,o]=(0,b.useState)([]),[l,c]=(0,b.useState)(null);return(0,b.useEffect)((()=>((async()=>{o(await e.getSubtitleLanguages())})(),e.getEvents().addListener(Vi,(({data:e})=>{o(e)})))),[e,o]),(0,b.useEffect)((()=>{(async()=>{c(await e.getPreferredSubtitleLanguage())})()}),[e,c]),{isSupported:t.hasSubtitleSupport,availableLanguages:s,preferredLanguage:l,setPreferredLanguage:async t=>{e.setPreferredSubtitleLanguage(t),c(t),t?a.logInteraction(r.subtitlesButtonFactory().hitUiReveal()):a.logInteraction(r.subtitlesButtonFactory().hitUiHide())}}}();return n&&0!==r.length?(0,R.jsx)(Ti.b,{renderInline:e,menu:(0,R.jsx)(Pi,{onSelectLanguage:s,languages:r,activeLanguage:a}),children:(0,R.jsx)(Ai,{noBackground:t,active:null!==a,label:u.Ru.get("subtitles-picker.heading"),children:(0,R.jsx)(_i.j,{size:i})})}):null}));var zi=i(77339),Wi=i(94313),Ki=i(67275);const Yi=({isVisible:e,onClick:t,item:i,isLyricsAvailable:n,isLyricsEnabled:r,onLyricsButtonClick:a})=>{const s=fi(),o=(0,$e.f)(),l=(0,Mt.p6)({parentAbsoluteLocation:o||void 0,data:{identifier:Pt.gw.FULLSCREEN}}),c=(0,Pt.kD)({parentAbsoluteLocation:o||void 0,data:{identifier:Pt.gw.FULLSCREEN}}),u=(0,Dt.h9)({parentAbsoluteLocation:o||void 0,data:{identifier:Pt.gw.FULLSCREEN}}),d=(0,Qe.s)(),[m]=(0,Wi.S)(1e3,(e=>e.item?.uri===i?.uri)),p=(0,b.useCallback)((e=>{if(i)if(e){const e=l.likeButtonFactory({uri:i.uri}).hitLike({itemToBeLiked:i.uri});d.logInteraction(e)}else{const e=l.likeButtonFactory({uri:i.uri}).hitRemoveLike({itemNoLongerLiked:i.uri});d.logInteraction(e)}}),[i,l,d]),h=(0,b.useCallback)((e=>{if(!i)return;const t=c.speedControlButtonFactory().hitSetPlaybackSpeed({currentlyPlayedItem:i.uri,playbackSpeed:e});d.logInteraction(t)}),[i,d,c]),g=(0,b.useCallback)((e=>{if(e){const e=c.shuffleButtonFactory().hitShuffleEnable();d.logInteraction(e)}else{const e=c.shuffleButtonFactory().hitShuffleDisable();d.logInteraction(e)}}),[d,c]),f=(0,b.useCallback)((e=>{const t=c.seekBackButtonFactory().hitSeekByTime({msSeekedOffset:e});d.logInteraction(t)}),[d,c]),v=(0,b.useCallback)(((e,t)=>{switch(t){case"drag":return d.logInteraction(c.progressBarFactory().dragSeekToTime({msToSeekTo:e}));case"hit":return d.logInteraction(c.progressBarFactory().hitSeekToTime({msToSeekTo:e}));default:return(0,q.k)(t)}}),[d,c]),y=(0,b.useCallback)((e=>{const t=c.seekForwardButtonFactory().hitSeekByTime({msSeekedOffset:e});d.logInteraction(t)}),[d,c]),_=(0,b.useCallback)((e=>{if(i)if("pause"===e){const e=c.playPauseButtonFactory().hitPause({itemToBePaused:i.uri});d.logInteraction(e)}else if("resume"===e){const e=c.playPauseButtonFactory().hitResume({itemToBeResumed:i.uri});d.logInteraction(e)}}),[i,d,c]),E=(0,b.useCallback)((e=>{const t=c.repeatButtonFactory().hitRepeatEnable(),i=c.repeatButtonFactory().hitRepeatOneEnable(),n=c.repeatButtonFactory().hitRepeatDisable();switch(e){case Ki.p.REPEAT_CONTEXT:d.logInteraction(t);break;case Ki.p.REPEAT_NONE:d.logInteraction(n);break;case Ki.p.REPEAT_TRACK:d.logInteraction(i);break;default:throw(0,q.k)(e)}}),[d,c]),C=(0,b.useCallback)((()=>{if(!i)return;const e=c.previousButtonFactory().hitSkipToPrevious({itemToBeSkipped:i.uri,positionMs:m,totalContentMs:i.duration.milliseconds||0});d.logInteraction(e)}),[i,d,c,m]),x=(0,b.useCallback)((()=>{if(!i)return;const e=c.previousButtonFactory().hitSkipToPrevious({itemToBeSkipped:i.uri,positionMs:m,totalContentMs:i.duration.milliseconds||0});d.logInteraction(e)}),[i,d,c,m]),S=(0,b.useCallback)((e=>{const t=u.volumeBarFactory().hitSetVolume({newVolumePercentage:e});d.logInteraction(t)}),[d,u]),A=(0,b.useCallback)((e=>{const t=u.volumeBarFactory().dragSetVolume({newVolumePercentage:e});d.logInteraction(t)}),[d,u]),T=(0,b.useCallback)((e=>{if("muted"===e){const e=u.volumeMuteButtonFactory().hitMutePlayback();d.logInteraction(e)}else if("not_muted"===e){const e=u.volumeMuteButtonFactory().hitUnmutePlayback();d.logInteraction(e)}}),[d,u]),I=(0,b.useCallback)((()=>{const e=u.fullscreenButtonFactory().hitUiHide();d.logInteraction(e)}),[d,u]);return(0,R.jsx)(zi.s,{active:e,focusTrapOptions:{initialFocus:!1},children:(0,R.jsx)("div",{className:At()(Vt,{[Gt]:e}),onClick:t,children:(0,R.jsxs)("div",{className:zt,"":"fullscreen-mode-controls",children:[(0,R.jsx)(pi.x,{isPreview:!1,isFullscreenMode:!0,onChange:v}),(0,R.jsxs)("div",{className:Wt,children:[(0,R.jsx)("div",{className:At()(Kt,Yt),children:i&&(0,R.jsx)(mi,{item:i,onClick:p})}),(0,R.jsxs)("div",{className:At()(Kt,qt),children:[s&&(0,R.jsx)(hi.w0,{iconSize:24,onClick:h}),!s&&(0,R.jsx)(bi.w,{renderEnabled:()=>(0,R.jsx)(yi.a,{size:"medium"}),renderDisabled:()=>(0,R.jsx)(hi.uP,{iconSize:"medium",onClick:g})}),s&&(0,R.jsx)(hi.hC,{iconSize:"medium",onClick:f}),(0,R.jsx)(hi.dQ,{iconSize:"medium",onClick:C}),(0,R.jsx)(hi.xJ,{iconSize:"large",onClick:_}),(0,R.jsx)(hi.$K,{iconSize:"medium",onClick:x}),s&&(0,R.jsx)(hi.v3,{iconSize:"medium",onClick:y}),!s&&(0,R.jsx)(hi.s_,{iconSize:"medium",onClick:E})]}),(0,R.jsxs)("div",{className:At()(Kt,Zt),children:[(0,R.jsx)(Gi,{iconSize:"medium",renderInline:!0,noBackground:!0}),!s&&n&&(0,R.jsx)(li,{enabled:r,onClick:a}),(0,R.jsx)(vi.M,{onVolumeBarClick:S,onVolumeBarDrag:A,onToggleMuteClick:T}),(0,R.jsx)(Jt,{iconSize:"medium",onClick:I})]})]})]})})})};var qi=i(15742),Zi=i(8385);const $i=Spicetify.GraphQL.Definitions["queryFullscreenMode"]=new qi.l("queryFullscreenMode","query","5aa77fcd9a5b65f829d8dee4000703ff1a7ff68e813c60999c0b2dce754240e2",null);var Qi=i(72055);const Ji=()=>{const e=(0,s.NC)(Ce.WYm,{loadingValue:!1});return(0,gi.o)(Qi.A3)||e};function Xi(e){return(0,K.v)(e)?{uri:e.uri,name:e.name,creatorName:e.artists[0]?.name,coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,W.p)(e)?{uri:e.uri,name:e.name,creatorName:e.show.name,coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,z.d)(e)?{uri:e.uri,name:e.name,creatorName:e.book.name,coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,G.N)(e)?{uri:e.uri,name:e.title??"",creatorName:e.advertiser??"",coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,Y.v)(e)||void 0===e?void 0:(0,q.d)(e)}function en(e){const t=e?.context.metadata?.context_description,i=e?.context.uri||void 0,n=e?.positionAsOfTimestamp??void 0,r=e?.timestamp,a=e?.isPaused,s=e?.restrictions.canPause,o=e?.restrictions.canResume;return{contextName:t,contextUri:i,position:n,timestamp:r,isPaused:a,canPause:s,canResume:o}}const tn=e=>{const{request:t}=(0,b.useContext)(We.j),[i,n]=(0,b.useState)(void 0);return(0,b.useEffect)((()=>{let i=!0;return e&&async function(e,t){return e($i,{artistUri:t}).then((e=>{if("Artist"===e?.data?.artistUnion.__typename)return e.data.artistUnion.visuals.headerImage?.sources[0]?.url})).catch((()=>{}))}(t,e).then((e=>{i&&n(e)})),()=>{i=!1}}),[e,t]),i};var nn=i(8159);var rn=i(57444),an=i(45346),sn=i(80454),on=i(17869),ln=i(10132);const cn=b.lazy((async()=>{const{ArtistNpv:e}=await i.e(4151).then(i.bind(i,6367));return{default:e}})),un=b.memo((function(){const e="/lyrics"===(0,oe.zy)().pathname,[t,i]=(0,b.useState)(e),n=(0,D.z)(),r=(0,an.W)(),a=(0,gi.o)((e=>e),((e,t)=>(0,ln.a)(e?.restrictions,t?.restrictions)&&e?.item?.uri===t?.item?.uri&&e?.isPaused===t?.isPaused)),s=a?.item??void 0,o=a?.nextItems??[],l=a?.playbackId??void 0,c=(0,K.v)(s)?s.artists[0]?.uri:void 0,u=s?.images,d=tn(c);let m=(0,sn.z)(u?.[0]?.url);(()=>{const e=(0,g.wA)();(0,b.useEffect)((()=>{const t=()=>{Ht()||e((0,p.rF)())};return window.addEventListener("fullscreenchange",t),document.addEventListener("fullscreenchange",t),window.addEventListener("fullscreenChange",t),document.addEventListener("fullscreenChange",t),window.addEventListener("webkitfullscreenchange",t),document.addEventListener("webkitfullscreenchange",t),window.addEventListener("mozfullscreenchange",t),document.addEventListener("mozfullscreenchange",t),()=>{window.removeEventListener("fullscreenchange",t),document.removeEventListener("fullscreenchange",t),window.removeEventListener("fullscreenChange",t),document.removeEventListener("fullscreenChange",t),window.removeEventListener("mozfullscreenchange",t),document.removeEventListener("mozfullscreenchange",t),window.removeEventListener("webkitfullscreenchange",t),document.removeEventListener("webkitfullscreenchange",t)}}),[e]),(0,b.useEffect)((()=>{const e=e=>{"Escape"===e.key&&Ft()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[e])})();const h=(0,Qe.s)(),f=(0,Ot.A)({data:{identifier:"full-screen",uri:s?.uri||""}}),v=(0,Pt.kD)({parentAbsoluteLocation:f.getAbsoluteLocation(),data:{identifier:Pt.gw.FULLSCREEN}}),{position:y,contextName:_,contextUri:E,isPaused:C,canResume:x,canPause:S,timestamp:A}=en(a),{isOverlayVisible:T,showOverlay:I,hideOverlay:N}=(()=>{const[e,t]=(0,b.useState)(!1),i=(0,b.useRef)(null),n=(0,nn.YQ)((()=>{null!==i.current&&clearTimeout(i.current),i.current=setTimeout((()=>{t(!1)}),2500),t(!0)}),100,{leading:!0,trailing:!1});return(0,b.useEffect)((()=>()=>{null!==i.current&&clearTimeout(i.current)}),[]),{isOverlayVisible:e,showOverlay:n,hideOverlay:(0,b.useCallback)((()=>{t(!1),null!==i.current&&clearTimeout(i.current)}),[])}})(),w=function(e){const t=Xi(e);return(0,K.v)(e)||(0,W.p)(e)||(0,z.d)(e)||(0,G.N)(e)?{...t,duration:e.duration.milliseconds,mediaType:(i=e.mediaType,"video"===i||"mixed"===i?"video":"audio")}:(0,Y.v)(e)||void 0===e?void 0:(0,q.d)(e);var i}(s),k=Xi(o.length>0?o[0]:void 0),O=(0,Qi.A3)(a),P=(0,b.useCallback)((e=>{if(e.target===e.currentTarget)if(r({type:"click",intent:C?"play":"pause"}),C&&x){const e=v.playPauseButtonFactory().hitResume({itemToBeResumed:s?.uri||""});h.logInteraction(e),n.resume()}else if(!C&&S){const e=v.playPauseButtonFactory().hitPause({itemToBePaused:s?.uri||""});h.logInteraction(e),n.pause()}}),[S,x,C,s?.uri,h,v,r,n]),L=(0,b.useCallback)((e=>{i(e)}),[i]),{data:j,loading:M}=(0,rn.I)(w?.uri,u),U=!!j?.hasLyrics,B=j?.hasLyrics?j.providerLyricsId:void 0;m=U?j.colors.background:m;const F=(0,b.useMemo)((()=>function(e,t,i){if(e&&i&&i.hasLyrics)return{status:t?"loading":"success",content:{provider:i.provider,syncType:i.syncType,lines:i.lyrics.map((e=>({timestamp:Number(e.start),text:e.text})))}}}(t,M,j)),[t,M,j]),H=(0,ve.vh)(),V=(0,b.useCallback)(((e,t,i)=>H.send((0,kt.W)({lyrics_format:"fullscreen",track_uri:e,provider:t,provider_lyrics_id:B,sync_type:i,playback_id:l}))),[l,B,H]);return(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)("div",{onPointerMove:I,onPointerLeave:N,onFocus:I,children:(0,R.jsx)(on.r,{spec:f,children:(0,R.jsx)(cn,{currentTrack:w,position:y??0,timestamp:A??0,nextTrack:k,backgroundColor:m,backgroundImageUrl:d,contextName:_,contextUri:E,playbackIsPaused:C,contextMetadataVisible:!O||T,trackMetadataVisible:!O||T,lyrics:F,onLyricsReport:V,controlsVisible:!1,progressBarVisible:!O||T,CustomProgressBar:void 0,CustomPlaybackControls:(0,R.jsx)(Yi,{isVisible:T,onClick:P,item:s,isLyricsAvailable:U,isLyricsEnabled:t,onLyricsButtonClick:L})})})})})})),dn=b.memo((function({videoRef:e}){const t=(0,b.useContext)(Lt),i=Ji(),{setVideoPlayerUIFlag:n}=(0,ji.d)(),r=(0,g.wA)(),a=(0,g.d4)((e=>e.ui.fullscreenMode.isOpen));return(0,b.useEffect)((()=>{if(!i)return n(B.n.fullscreen,!1),r((0,p.DH)()),void Ft();const e=Ht();!a&&e&&(n(B.n.fullscreen,!1),r((0,p.DH)()),Ft())}),[n,i,a,r]),(0,R.jsxs)("div",{ref:t,children:[(0,R.jsx)("div",{ref:e}),i&&a?(0,R.jsx)(un,{}):null]})}));var mn=i(58490),pn=i(67889),hn=i(41361);const gn="I0UigpTrBFkGuoWMpQcq",fn="jxzPm9gLS9LiyU5veW3H",vn="bYPDBcU3uU79vGF1pQBg",yn="pWvyF1E7_RN2INjZfCUd",bn="E4UTzaVPMhPYyLm1z_eb",_n="ReyA3uE3K7oEz7PTTnAn",En="vSC7et_G7LUWnvTARtHq",Cn="xFb8C_XRObIFocIOPuTj";const xn=(0,g.Ng)((e=>({isOpen:e.ads.billboard?.isOpen??!1,imageLoaded:e.ads.billboard?.imageLoaded??!1,isMinimized:e.ads.billboard?.isMinimized??!1,companionSrc:e.ads.billboard?.data.companionSrc,disclaimer:e.ads.billboard?.data.disclaimer,mediaSrc:e.ads.billboard?.data.mediaSrc,clickUrl:e.ads.billboard?.data.clickUrl,isPreview:e.ads.billboard?.data.isPreview})),(e=>({hide:()=>e((0,mn.KS)()),adClick:()=>e((0,mn.Wv)()),onImageLoaded:()=>e((0,mn.E2)()),onError:()=>e((0,mn.qO)())})))((({companionSrc:e,clickUrl:t,mediaSrc:i,adClick:n,hide:r,isOpen:a,imageLoaded:s,onImageLoaded:o,onError:l,isMinimized:c,isPreview:d})=>{const m=()=>{n(),r()},p=(0,oe.Zp)(),h=(0,gi.o)((e=>e?.context.uri));return(0,b.useEffect)((()=>{a&&function(e,t,i){const n=new Image;n.addEventListener("load",t),n.addEventListener("error",i),n.src=e}(i,o,l)}),[a,i,o,l,d,h,p]),a&&s?c?(0,R.jsx)("div",{"":"billboard-minimized",className:_n,children:e&&(0,R.jsx)("a",{draggable:!1,className:En,href:t,onClick:n,children:(0,R.jsx)("img",{draggable:!1,className:Cn,alt:u.Ru.get("ad-formats.advertisement"),src:e})})}):(0,R.jsx)(pn.A,{isOpen:a,shouldCloseOnEsc:!1,onRequestClose:r,contentLabel:u.Ru.get("ad-formats.advertisement"),children:(0,R.jsxs)("div",{id:"view-billboard-ad",className:At()(gn,{ready:a}),children:[(0,R.jsx)("a",{draggable:!1,tabIndex:-1,className:fn,href:t,onClick:m,children:u.Ru.get("ad-formats.advertisement")}),(0,R.jsx)("button",{"aria-label":u.Ru.get("ad-formats.dismissAd"),className:vn,onClick:r,children:(0,R.jsx)(hn.A,{width:18,height:18,fill:"currentColor"})}),(0,R.jsx)("a",{draggable:!1,"":"billboard-image-link",className:yn,href:t,onClick:m,children:(0,R.jsx)("img",{draggable:!1,className:bn,alt:u.Ru.get("ad-formats.advertisement"),src:i})})]})}):null}));var Sn=i(4973);const An="SET_LEADERBOARD_ELEMENT",Tn="NAVIGATION_CHANGE_LEADERBOARD_AD",In="SET_LEADERBOARD_ENABLED",Nn="SET_LEADERBOARD_DISABLED",wn=()=>({type:Nn}),Rn="main-leaderboardComponent-container",kn=()=>{const e=(0,g.wA)(),t=(0,g.d4)((e=>e.ads.leaderboard.isEnabled)),i=(0,g.d4)(Sn.V0),n=(0,s.NC)(Ce.TId),r=(0,oe.zy)();(0,b.useEffect)((()=>{e({type:Tn})}),[e,r.pathname]);const a=(0,b.useCallback)((t=>{null!==t&&e({type:An,element:t})}),[e]);return!t||i&&n?null:(0,R.jsx)("div",{children:(0,R.jsx)("div",{"":"test-ref-div",className:Rn,ref:a})})};var On=i(12783),Pn=i(43178);var Ln=i(43830);const jn="L30NtFiBvBcyDh05qn_u",Dn=({onMinimizeButtonClick:e})=>(0,R.jsx)("div",{className:At()(jn),children:(0,R.jsx)(Ln.$,{"aria-label":u.Ru.get("ad-formats.dismissAd"),colorSet:"overMedia",iconOnly:Ut.b,onClick:e,size:"small"})}),Mn="kXSXn_Z7IEMg4aBcxMxv",Un="jiQC5HCfeb1xWySe1ohl",Bn="aR68x7OIyGWzTgdtxZ6f",Fn="CjNrWN36pkl9Lp6zxCxZ",Hn="s_lztNXw0tC6osoQothn",Vn="jjbJ5Q9ZsVfTztsPORcH",Gn="qzozxI4yeNGBWgbzmCa2",zn="UyHglighrJl18cZ6Rywg",Wn=({advertiser:e,isMinimized:t,onMinimizeButtonClick:i,onVideoTakeoverClick:n,refCallback:r,href:a,isVerticalVideo:o=!1})=>{const l=At()(Mn,{[Un]:o}),c=At()(Fn,{[Hn]:o}),d=(0,s.NC)(Ce.okt,{loadingValue:!1})?".VTO__modal-slot":".Root__modal-slot";return(0,R.jsx)(pn.A,{className:c,animation:{overlay:{base:Vn,beforeClose:zn,afterOpen:Gn},closeTimeoutMs:300},isOpen:!t,parentSelector:()=>document.querySelector(d),shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:u.Ru.get("ad-formats.advertisement"),children:(0,R.jsxs)("div",{className:l,children:[(0,R.jsx)("a",{"aria-label":u.Ru.get("ad-formats.video-ad-overlay.cta-button",{advertiser:e}),className:Bn,"":"new-ads-npv-video-takeover-link",href:a,onClick:n,ref:r,target:"_blank"}),(0,R.jsx)(Dn,{onMinimizeButtonClick:i})]})})};var Kn=i(15991),Yn=i(36733),qn=i(56105),Zn=i(53816);const $n="fFoN1cMJLIJo0k_vgNyw",Qn="Lk23rM5uSl5mgEXroOPH",Jn="yJ2Sz652eyijqIrRrwpJ",Xn="ZPVxrOnQOQc_5KDCNgcI",er="f14LfcDx_wvogzdXzoq9",tr="QMMTQfEw3AIHFf4dTRp3",ir="Hj1B5D7WgG4aZkU8meAp",nr="nPKDEvIoCzySBR24pZiN",rr="dqP_KBPyAygbxKtY3k3w",ar=({setOuterContainer:e,npbVideoAdRef:t})=>{const i=(0,g.wA)(),n=(0,gi.o)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri)),r=(0,G.N)(n)?n.url??void 0:void 0,a=((0,G.N)(n)?n.advertiser:void 0)||"Advertiser",o=(0,g.d4)((e=>e?.ads?.vto?.isMinimized)),l=(0,G.N)(n)&&"portrait"===n.videoOrientation,c=(0,b.useRef)(),d=(0,oe.zy)(),m=(0,Yn.w)(n),p=(0,s.NC)(Ce.GEz);(0,b.useEffect)((()=>{c.current?i((0,Kn.iB)()):c.current=!0}),[i,d.pathname]);const[h,f]=(0,b.useState)(null);return(0,b.useEffect)((()=>(i((0,Kn.MW)()),()=>{i((0,Kn.Oc)())})),[i]),(0,b.useEffect)((()=>{o?setTimeout((()=>{null!==h&&e(t.current)}),200):null!==h&&e(h)}),[e,t,o,h]),m&&p?(0,R.jsx)(Wn,{advertiser:a,href:r?(0,qn.H)(r):void 0,isMinimized:o,isVerticalVideo:l,onVideoTakeoverClick:()=>{i((0,Kn.i2)(Zn.ee.CLICKED,Zn.Wh.VIDEO_TAKEOVER,Zn.Lv.VIDEO_PLAYER))},onMinimizeButtonClick:()=>{i((0,Kn.Oc)()),i((0,Kn.i2)(Zn.ee.COLLAPSED,Zn.Wh.MINIMIZE_BUTTON,Zn.Lv.VIDEO_PLAYER))},refCallback:e=>f(e)}):(0,R.jsx)(pn.A,{className:ir,animation:{overlay:{base:tr,beforeClose:rr,afterOpen:nr},closeTimeoutMs:300},isOpen:!o,parentSelector:()=>document.querySelector(".Root__modal-slot"),shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:u.Ru.get("ad-formats.advertisement"),children:(0,R.jsxs)("div",{className:$n,children:[(0,R.jsxs)("div",{className:Jn,children:[(0,R.jsx)(On.E,{semanticColor:"textBase",variant:"bodySmallBold",className:Xn,children:u.Ru.get("ad-formats.advertisement")}),(0,R.jsx)("button",{"aria-label":u.Ru.get("ad-formats.dismissAd"),className:er,onClick:()=>{i((0,Kn.Oc)()),i((0,Kn.i2)(Zn.ee.COLLAPSED,Zn.Wh.MINIMIZE_BUTTON,Zn.Lv.VIDEO_PLAYER))},children:(0,R.jsx)(Pn.M,{semanticColor:"textBase",size:"small"})})]}),(0,R.jsx)("a",{"":"video-takeover-link",href:r?(0,qn.H)(r):void 0,onClick:()=>{i((0,Kn.i2)(Zn.ee.CLICKED,Zn.Wh.VIDEO_TAKEOVER,Zn.Lv.VIDEO_PLAYER))},ref:e=>f(e),className:Qn})]})})},sr=({setOuterContainer:e,npbVideoAdRef:t})=>(0,g.d4)((e=>e?.ads?.vto?.isHidden))?null:(0,R.jsx)(ar,{setOuterContainer:e,npbVideoAdRef:t});var or=i(8143),lr=i(95925);function cr(){const[e,t]=(0,b.useState)(!1),i=(0,b.useRef)(null),n=(0,nn.YQ)((()=>{i.current&&clearTimeout(i.current),i.current=setTimeout((()=>{t(!1)}),1500),t(!0)}),100,{maxWait:100,leading:!0}),r=(0,b.useCallback)((e=>{t(e),n.cancel()}),[n]);return(0,b.useEffect)((()=>()=>{i.current&&clearTimeout(i.current)}),[]),{isControlsVisible:e,setIsControlsVisible:r,handleKeepViewVisible:n}}var ur=i(67399),dr=i(67311),mr=i(51759),pr=i(65733),hr=i(8059),gr=i(63644),fr=i(44128);const vr="/lyrics";function yr({referrer:e,onChange:t}){const i=(0,oe.zy)(),n=(0,oe.Zp)(),r=i.pathname.startsWith(vr),{setVideoPlayerUIFlag:a}=(0,ji.d)(),s=()=>{r||(a(B.n.cinema,!1),n(vr,{state:{referrer:e}}),t?.(vr))},o=()=>{r&&(n(-1),t?.(null))};return{isActive:r,showLyrics:s,hideLyrics:o,toggleLyrics:()=>{r?o():s()}}}const br="MBzbwWcyfbqSftBtnn3g",_r=({noBackground:e,iconSize:t="small"})=>{const{setVideoPlayerUIFlag:i,videoPlayerUIFlags:n,videoPlayerMode:r}=(0,ji.d)(),a=r===B.K.cinema,{uri:o}=(0,Fi.f)(),{hideLyrics:l}=yr({referrer:"cinema-mode-toggle"}),c=(0,s.NC)(Ce.Au4),{spec:d,logger:m}=(0,Hi.r)(Li.E,{data:{uri:o??"",identifier:B.K.cinema}});if(!c||r===B.K.fullscreen)return null;return(0,R.jsx)("div",{className:At()({[br]:a}),children:(0,R.jsx)(Ai,{noBackground:e,active:a,label:a?u.Ru.get("video-player.default-view"):u.Ru.get("video-player.cinema-mode"),onClick:()=>{a?m.logInteraction(d.cinemaModeButtonFactory().hitUiHide()):m.logInteraction(d.cinemaModeButtonFactory().hitUiReveal()),l(),i(B.n.cinema,!n.cinema)},children:a?(0,R.jsx)(gr.Q,{size:t}):(0,R.jsx)(fr.C,{size:t})})})};var Er=i(66543),Cr=i(67851),xr=i(7703),Sr=i(64245),Ar=i(93766),Tr=i(22526);function Ir(){const e=(0,g.wA)(),t=(0,Sr.XB)();return{enterPipVideoMode:(0,b.useCallback)((()=>{e((0,Tr.R2)(B.K.pip))}),[e]),leavePipVideoMode:(0,b.useCallback)((()=>{t===Ar.Z.NowPlayingView&&e((0,Tr.R2)(B.K.npv))}),[e,t])}}const Nr="fuONPgUcYO2bf15HunlX",wr=({noBackground:e,iconSize:t="small",uri:i})=>{const n=(0,g.d4)(Cr.c),r=n===B.K.pip,{enterPipVideoMode:a,leavePipVideoMode:s}=Ir(),{item:o}=(0,hr.L)()??{},{isActive:l}=(0,xr.D)({item:o}),c=(0,gi.o)(Qi.A3),{spec:d,logger:m}=(0,Hi.r)(Li.E,{data:{uri:i,identifier:n}}),p=(0,Er.u)({parentAbsoluteLocation:d.pipButtonContainerFactory().getAbsoluteLocation()});if(!c)return null;let h=u.Ru.get("video-player.default-view");return r||(h=l?u.Ru.get("miniplayer.close"):u.Ru.get("miniplayer.open-in")),(0,R.jsx)("div",{className:At()({[Nr]:r}),children:(0,R.jsx)(Ai,{noBackground:e,active:r,label:h,onClick:()=>{Ht()&&Ft(),r?(s(),m.logInteraction(p.pipButtonFactory({uri:i}).hitUiHide())):(a(),p.pipButtonFactory({uri:i}).hitUiReveal())},children:(0,R.jsx)(ur.F,{size:t})})})};var Rr=i(73356);const kr="aHe1QDDI5hmYWAKf4MoR",Or="DtWKCk0YYDlZT11U1niL",Pr="RTSxo7zS2ozOeg4gnC2c",Lr="ZcIaDrsIojjWZ_Xf_6iN",jr="pLL2Ok4QckLG8GAWriCB",Dr=[{transform:"scale(1)",opacity:0},{transform:"scale(1.3)",opacity:1},{transform:"scale(1.6)",opacity:0}],Mr=[{transform:"scale(1)",opacity:1},{transform:"scale(1)",opacity:1}],Ur={duration:500,easing:"ease-out"},Br=function({visible:e,className:t,darkOverlayOnHover:i=!1,animatePlayPauseButtonOnClick:n=!0}){const{videoPlayerMode:r}=(0,ji.d)(),a=(0,g.wA)(),s=Ji(),o=Ui(),l=(0,b.useContext)(Lt),c=r===B.K.cinema,d=(0,Rr.j)(),m=(0,g.d4)((e=>e.platform.isDesktop)),{item:h}=(0,hr.L)()??{},f=h?.uri??"",{isActive:v,onClick:y,showButton:_}=(0,xr.D)({item:h}),E=o.getCapabilities().hasPipSupport,C=(0,D.z)(),x=(0,gi.o)((e=>e),((e,t)=>(0,ln.a)(e?.restrictions,t?.restrictions)&&e?.item?.uri===t?.item?.uri&&e?.isPaused===t?.isPaused)),{isPaused:S,canResume:A,canPause:T}=en(x),{spec:I,logger:N,UBIFragment:w}=(0,Hi.r)(Li.E,{data:{uri:f,identifier:B.K.npv}}),k=(0,b.useRef)(null),O=(0,b.useRef)(null),P=(0,b.useCallback)((()=>{let e=null;S&&A?(C.resume(),N.logInteraction(I.playButtonFactory().hitPlay({itemToBePlayed:f})),e=k):!S&&T&&(C.pause(),N.logInteraction(I.playButtonFactory().hitPause({itemToBePaused:f})),e=O),n&&e?.current?.animate&&e.current.animate(d?Mr:Dr,Ur)}),[T,A,S,N,C,I,f,n,d]),L=(0,b.useMemo)((()=>c?null:_?(0,R.jsx)(Ai,{label:v?u.Ru.get("miniplayer.close"):u.Ru.get("miniplayer.open-in"),onClick:y,active:v,children:(0,R.jsx)(ur.F,{size:"small"})}):m&&E?(0,R.jsx)(wr,{uri:f}):null),[v,c,m,E,y,_,f]);return(0,R.jsxs)(w,{spec:I,children:[(0,R.jsxs)("div",{className:At()(kr,t,{[jr]:e}),children:[(0,R.jsx)(Gi,{renderInline:!0}),(0,R.jsx)(_r,{}),L,s&&(0,R.jsx)(Ai,{label:u.Ru.get("npv.full-screen"),onClick:()=>{l?.current&&(Bt(l.current),a((0,p.f)()))},children:(0,R.jsx)(dr.L,{size:"small"})})]}),i&&(0,R.jsx)("div",{tabIndex:-1,className:At()(Or,{[jr]:e})}),(0,R.jsxs)("div",{className:Pr,tabIndex:-1,onClick:P,onKeyDown:()=>{},"aria-label":S?u.Ru.get("play"):u.Ru.get("pause"),role:"button",children:[(0,R.jsx)("div",{className:Lr,ref:k,children:(0,R.jsx)(mr.x,{size:"xlarge",width:48})}),(0,R.jsx)("div",{className:Lr,ref:O,children:(0,R.jsx)(pr.B,{size:"xlarge",width:48})})]})]})};function Fr(e,t){(0,b.useLayoutEffect)((()=>{t.current&&e(t.current)}),[t,e])}var Hr=i(77146);const Vr="kJKEEG391Pf_PLzwG2Vm",Gr="gVnOoWHXwLnTNK2RRIKg",zr=({cinemaModeRef:e,setVideoContainer:t})=>{const i=(0,b.useRef)(null),{nowPlayingBarRef:n}=(0,lr.JT)(),{videoPlayerUIFlags:r,setVideoPlayerUIFlag:a}=(0,Hr.d)();Fr(t,i);const{isControlsVisible:s,handleKeepViewVisible:o}=cr();return(0,b.useEffect)((()=>{const e=e=>{"Escape"===e.key&&a(B.n.cinema,!1)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[a,r.cinema]),e.current?n.current?(0,or.createPortal)((0,R.jsxs)("div",{ref:i,className:Vr,onMouseMove:o,onFocus:o,"":"video-player-cinema",children:[(0,R.jsx)(zi.s,{containerElements:[e.current,n.current],active:!0,focusTrapOptions:{allowOutsideClick:!0}}),(0,R.jsx)(Br,{visible:s,className:Gr})]}),e.current):(console.error("No ref found for nowPlayingBar!"),null):(console.error("No container found for cinema video!"),null)};var Wr=i(46915);const Kr=({setVideoContainer:e})=>{const t=(0,b.useRef)(null);Fr(e,t);const i=window.documentPictureInPicture?.window,n=i?.document.getElementById("document-pip-main-container"),r=Ui();return(0,b.useEffect)((()=>(i&&r.setWindow(i),()=>{r.setWindow(window)})),[i,r]),n?(0,or.createPortal)((0,R.jsx)("div",{ref:t,"":"video-player-document-pip",className:Wr.A.videoPlayerContainer}),n):(0,R.jsx)(R.Fragment,{})},Yr=b.memo((function({setVideoContainer:e,fullscreenModeRef:t}){const i=(0,b.useRef)(null);return Fr(e,i),t.current?(0,or.createPortal)((0,R.jsx)("div",{"":"video-player-fullscreen",className:At()("VideoFullscreenMode"),children:(0,R.jsx)("div",{className:"VideoFullscreenMode__video-container",ref:i})}),t.current):(console.error("No container found for fullscreen video!"),null)}));var qr=i(34629);const Zr="_2r290M0vbnbQGfhLbvq",$r=({setVideoContainer:e})=>{const t=(0,b.useRef)(null),i=(0,qr.v7)();Fr(e,t);const n=(0,b.useRef)(!0);(0,b.useEffect)((()=>(n.current=!0,()=>{n.current=!1})));const r=document.getElementById("VideoPlayerNpb_ReactPortal");return null===r?null:(0,or.createPortal)((0,R.jsx)("div",{ref:t,hidden:!1,className:Zr,style:{position:"relative"},onMouseDown:e=>{t.current&&i.current&&(e.stopPropagation(),e.preventDefault())},"":"video-player-npb"}),r)};var Qr=i(51306),Jr=i(21441);const Xr="H2mo30Z5kNiGZbZ9U2Nu",ea="TbZ7pNOfpFK2FmnFuQcW",ta="BRt_JFU0qTnWIGCaWWJY",ia=({visible:e})=>{const t=(0,g.wA)(),i=At()(ea,{[ta]:e});return(0,R.jsx)("div",{className:Xr,children:(0,R.jsx)("div",{className:i,children:(0,R.jsx)(Ln.$,{"aria-label":u.Ru.get("npv.full-screen"),colorSet:"overMedia",iconOnly:dr.L,onClick:e=>{e.stopPropagation(),e.preventDefault(),t((0,Kn.MW)()),t((0,Kn.i2)(Zn.ee.EXPANDED))},size:"small"})})})},na="Qhq7SHNg9UlhtkK9I6Km",ra="ZWx9Xu8F_WoC4M_KEbtW",aa=({element:e,handleKeepViewVisible:t,isControlsVisible:i,item:n,scrollNodeRef:r,setIsControlsVisible:a,setVideoContainer:s,videoContainerRef:o})=>{Fr(s,o);const l=(0,g.wA)(),c="portrait"===n.videoOrientation,u=n.url??void 0,d=At()(na,{[ra]:c});return(0,or.createPortal)((0,R.jsx)("div",{ref:o,hidden:!1,className:d,onMouseLeave:()=>{a(!1)},onMouseDown:e=>{o.current&&r.current&&(e.stopPropagation(),e.preventDefault())},onMouseMove:t,onFocus:t,"":"ads-video-player-npv",children:u?(0,R.jsx)("a",{style:{zIndex:2},href:u,onClick:()=>{l((0,Jr.q5)(Qr.c.VIDEO_PLAYER,Qr.V.AD_NPV))},"":"video-player-ad-wrapper",children:(0,R.jsx)(ia,{visible:i})}):(0,R.jsx)(ia,{visible:i})}),e)},sa="ouiL5cH1WduxtprQ0Iig",oa=({setVideoContainer:e})=>{const t=(0,b.useRef)(null),i=(0,qr.v7)(),n=(0,gi.o)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri));Fr(e,t);const r=(0,b.useRef)(!0);(0,b.useEffect)((()=>(r.current=!0,()=>{r.current=!1})));const{isControlsVisible:a,setIsControlsVisible:s,handleKeepViewVisible:o}=cr(),l=document.getElementById("VideoPlayerNpv_ReactPortal");return null===l?null:(0,G.N)(n)?(0,R.jsx)(aa,{element:l,handleKeepViewVisible:o,isControlsVisible:a,item:n,scrollNodeRef:i,setIsControlsVisible:s,setVideoContainer:e,videoContainerRef:t}):(0,or.createPortal)((0,R.jsx)("div",{ref:t,hidden:!1,className:sa,style:{position:"relative"},onMouseLeave:()=>{s(!1)},onMouseDown:e=>{t.current&&i.current&&(e.stopPropagation(),e.preventDefault())},onMouseMove:o,onFocus:o,"":"video-player-npv",children:(0,R.jsx)(Br,{visible:a,darkOverlayOnHover:!0})}),l)};const la=e=>{const t=(()=>{const[e]=(0,b.useState)((()=>{const e=document.createElement("div");return e.classList.add("VideoPlayer__container"),e}));return e})();if((0,b.useLayoutEffect)((()=>{null!==e&&null!==t&&e.insertBefore(t,e.firstChild)}),[e,t]),t&&t.firstChild instanceof HTMLVideoElement){const e=t.firstChild;return`${e.videoWidth}/${e.videoHeight}`}return"16/9"};var ca=i(14403),ua=i(28004);const da=Bi.S.PICTURE_IN_PICTURE_CHANGED;const ma=({setVideoContainer:e,videoContainerRef:t})=>(Fr(e,t),(0,R.jsx)("div",{ref:t,style:{display:"none"}})),pa=({npbVideoAdRef:e,cinemaModeRef:t,fullscreenModeRef:i})=>{const n=(0,g.wA)(),{videoPlayerMode:r}=(0,Hr.d)(),a=(0,b.useRef)(null),s=(0,b.useRef)(),[o,l]=(0,b.useState)(null),c=(0,g.d4)((e=>e.platform.isDesktop)),{isPlayingVideo:u,isPlayingAd:d,playbackId:m}=(0,gi.o)((e=>{const t=e?.item??void 0;return{isPlayingVideo:(0,Qi.A3)(e),isPlayingAd:(0,G.N)(t),playbackId:e?.playbackId}})),p=(0,g.d4)((e=>e?.ads?.vto?.isMinimized));if(la(o),(()=>{const{isPlayingVideo:e,contextUri:t}=(0,gi.o)((e=>({isPlayingVideo:(0,Qi.A3)(e),contextUri:e?.context.uri}))),{setVideoPlayerUIFlag:i}=(0,ji.d)(),n=(0,ca.v)((({connectionStatus:e})=>e===ua.zP.CONNECTED||e===ua.zP.CONNECTING));(0,b.useEffect)((()=>{const t=e&&!n;i(B.n.videoAvailable,t)}),[e,n,i,t])})(),(()=>{const e=(0,gi.o)(Qi.A3),{setVideoPlayerUIFlag:t}=(0,ji.d)();(0,b.useEffect)((()=>{const e=()=>{t(B.n.fullscreen,Ht())};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)}}),[e,t])})(),(()=>{const e=Ui(),{videoPlayerMode:t}=(0,Hr.d)(),{leavePipVideoMode:i}=Ir(),n=t===B.K.pip;(0,b.useEffect)((()=>e.getEvents().addListener(da,(({data:e})=>{!e&&n&&i()}))),[e,n,i]),(0,b.useEffect)((()=>{const t=document.pictureInPictureElement;n&&!t&&e.setPip?.(!0),!n&&t&&e.setPip?.(!1)}),[e,n])})(),function(){const e=Ui(),{videoPlayerMode:t}=(0,ji.d)(),[i,n]=(0,b.useState)(!document.hidden),[r,a]=(0,b.useState)(!1);(0,b.useEffect)((()=>{const e="visibilitychange",t=()=>{n(!document.hidden)};return document.addEventListener(e,t),()=>{document.removeEventListener(e,t)}}),[e,n]),(0,b.useEffect)((()=>{const n=!(t===B.K.pip||t===B.K.documentPip||t!==B.K.none&&i),s=e.getCapabilities().hasMinimizeBitrateSupport&&n;r!==s&&(e.setMinimizeBitrate(s),a(s))}),[e,t,i,r,a])}(),u&&d&&s.current!==m&&(n((0,Kn.MW)()),s.current=m),c&&u&&d&&r!==B.K.pip&&!p)return(0,R.jsx)(sr,{npbVideoAdRef:e,setOuterContainer:l});switch(r){case B.K.fullscreen:return(0,R.jsx)(y.s,{children:(0,R.jsx)("div",{ref:a,children:(0,R.jsx)(Yr,{fullscreenModeRef:i,setVideoContainer:l})})});case B.K.cinema:return(0,R.jsx)(y.s,{children:(0,R.jsx)("div",{ref:a,children:(0,R.jsx)(zr,{cinemaModeRef:t,setVideoContainer:l})})});case B.K.npv:return(0,R.jsx)(y.s,{children:(0,R.jsx)("div",{ref:a,children:(0,R.jsx)(oa,{setVideoContainer:l})})});case B.K.documentPip:return(0,R.jsx)(y.s,{children:(0,R.jsx)("div",{ref:a,children:(0,R.jsx)(Kr,{setVideoContainer:l})})});case B.K.nowPlayingBar:return(0,R.jsx)(y.s,{children:(0,R.jsx)("div",{ref:a,children:(0,R.jsx)($r,{setVideoContainer:l})})});case B.K.none:default:return(0,R.jsx)("div",{ref:a,children:(0,R.jsx)(ma,{videoContainerRef:a,setVideoContainer:l})})}};var ha=i(14477);const ga=({children:e})=>(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(ha.M,{children:e})});var fa=i(95079),va=i(94079);const ya="WuHfzknUICVJtLZJU_30",ba="FL2TkYu6_lxeXmfUTwx4",_a="Q63kq6vgG3LPQAi93zXP",Ea="BLcZj2U0cGry7c3uk5qQ",Ca="wCeOtCjqvDK0rflTnpuK",xa="dz7vC5O_M9gcvqxCqOnc",Sa="zqGag8YfKcWwtZEqvghN",Aa=e=>{const{allowHTML:t,isError:i,message:n,onClose:r,isNotice:a,isNotSupported:s,isCookie:o,render:l=null}=e,c=l?l():n;(0,b.useEffect)((()=>{const e=({key:e})=>{"Escape"===e&&r()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[r]);const d=(0,b.useCallback)((e=>{e.preventDefault(),window.location.reload()}),[]),m=(0,b.useMemo)((()=>({__html:n??""})),[n]);return(0,R.jsx)(fa.A,{children:(null!==n||null!==l)&&(0,R.jsx)(va.A,{classNames:"feedbackBar-animation",timeout:{enter:250,exit:200},children:(0,R.jsxs)("div",{className:At()(ya,{[ba]:i,[Ea]:a,[_a]:s,[Ca]:o}),"aria-live":"polite",children:[(0,R.jsxs)("div",{className:xa,children:[t?(0,R.jsx)("span",{dangerouslySetInnerHTML:m}):c," ",i&&(0,R.jsx)("a",{draggable:!1,className:Sa,"aria-label":u.Ru.get("error.reload"),onClick:d,children:u.Ru.get("error.reload")})]}),(0,R.jsx)(ei.H,{size:"small",iconOnly:Pn.M,onClick:r,"aria-label":"Close",semanticColor:"textBase"})]})})})};var Ta=i(74509),Ia=i(47721);const Na="dz_h98rH9nZCwfPdnKgr",wa="rAfV2jB_HMM9Xtr0Rqvn",Ra="XkXPpDRWozMF6G8_GlLQ",ka=b.memo((function(e){const{handleClick:t}=e,i=(0,g.d4)(Ia.q),n=u.Ru.get("pta.bottom-bar.title"),r=u.Ru.get("fta.bottom-bar.subtitle"),a=u.Ru.get("fta.sign-up-free");return(0,R.jsxs)("div",{className:Na,onClick:t,"":"signup-bar",children:[(0,R.jsxs)("div",{className:wa,children:[(0,R.jsx)(On.E,{as:"p",variant:"bodySmallBold",children:n}),(0,R.jsx)(On.E,{as:"p",variant:"bodyMedium",dangerouslySetInnerHTML:{__html:i?u.Ru.get("fta.bottom-bar.subtitle-two"):r}})]}),(0,R.jsx)(Ln.$,{colorSet:"invertedLight",onClick:t,className:Ra,children:i?u.Ru.get("mwp.d2p.modal.cta"):a})]})}));var Oa=i(78495),Pa=i(73662),La=i(96434);const ja=(0,b.createContext)(null),Da=()=>{const e=(0,Sr.Ev)(Pe.$S.DEVICE_PICKER_BUTTON_CLICK),{isActive:t,panelSend:i}=(0,Sr.AI)(Ar.Z.DevicePicker,Ar.Z.DevicePickerOverlay),n=(0,b.useCallback)((e=>i({type:Pe.$S.DEVICE_PICKER_BUTTON_CLICK,...!t&&{interactionId:e}})),[i,t]);return(0,b.useMemo)((()=>({togglePanel:n,isActive:t,canTogglePanel:e})),[n,t,e])},Ma=()=>{const e=(0,b.useContext)(ja),{togglePanel:t,isActive:i}=Da();if((0,s.NC)(Ce.VUN))return{isPickerOpen:i,triggerRef:{current:null},toggleDevicePicker(e){t(e)}};if(null===e)throw new Error("Trying to use 'DevicePickerTriggerContext' without 'DevicePickerTriggerContextProvider'!");return e};var Ua=i(10848);const Ba="gqYYMz8DkhaT3e44LcHQ",Fa="VX33mI2V_jRA7hRBI9_0",Ha=({remoteDeviceName:e,remoteDeviceType:t,connectionStatus:i,omitConnectionStateText:n=!1})=>{const{spec:r,logger:a}=(0,Hi.r)(Pa.s,{}),{triggerRef:s,toggleDevicePicker:o,isPickerOpen:l}=Ma(),c=(0,Ua.$A)(t,i),d=i===ua.zP.CONNECTED?u.Ru.get("web-player.connect.bar.connected-state",{device_name:e}):u.Ru.get("web-player.connect.bar.connecting-state",{device_name:e});return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(c,{size:"small",className:Fa,role:"presentation",semanticColor:"essentialBase"}),(0,R.jsx)(Oa.Y,{component:"button",onClick:()=>{const e=r.activeDeviceButtonFactory(),{interactionId:t}=a.logInteraction(l?e.hitUiHide():e.hitUiReveal()),i=l;o(t),i||(0,La.I)("DEVICE-PICKER")},ref:s,className:Ba,children:(0,R.jsx)(On.E,{variant:"bodySmallBold","aria-live":"polite",semanticColor:"textBase",children:n&&i===ua.zP.CONNECTED?e:d})})]})},Va="nQSM_BrSHJ4Cp3XSuLOF",Ga=()=>(0,R.jsxs)("svg",{width:"1",height:"16",viewBox:"0 0 1 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"separator",className:Va,children:[(0,R.jsx)("g",{id:"separator",clipPath:"url(#clip0_491_88335)",children:(0,R.jsx)("rect",{id:"Rectangle 111112858",width:"1",height:"16",rx:"0.5",fill:"var(--essential-base)"})}),(0,R.jsx)("defs",{children:(0,R.jsx)("clipPath",{id:"clip0_491_88335",children:(0,R.jsx)("rect",{width:"1",height:"16",fill:"white"})})})]});var za=i(82852),Wa=i(94723),Ka=i(65519),Ya=i(90129);var qa=i(42047);const Za="UWuPbrFbZar0lIcBFH31",$a="wFkvSGFYuw6rhfwWWYWC",Qa=()=>{const{currentSession:e}=(0,qa.D)(),t=(0,g.d4)((({session:e})=>e.user?.id)),{logJamNameClick:i}=(()=>{const{spec:e,logger:t}=(0,Hi.r)(Ya.V,{});return{logJamNameClick:(0,b.useCallback)((()=>{const i=e.jamNameFactory().hitUiNavigate({destination:(0,ne.K7)().toURI()});t.logInteraction(i)}),[t,e])}})(),{openQueue:n}=(0,za.R)(),r=(0,b.useCallback)((()=>{i(),n()}),[i,n]);if(!e?.active)return null;const a=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId)),s=(0,Ka.t)(e,t,{userFirst:!0});return(0,R.jsxs)("div",{className:Za,children:[(0,R.jsx)(Wa.g,{users:s,dropShadow:!0,size:"small"}),(0,R.jsx)(Oa.Y,{className:$a,onClick:r,semanticColor:"textBase",tabIndex:0,standalone:!0,children:(0,R.jsx)(On.E,{variant:"bodySmallBold",children:u.Ru.get("web-player.social-connect.session-info.title",{host:a?.displayName??""})})})]})};var Ja=i(63051);const Xa="main-connectBar-connectBar",es="main-connectBar-connected",ts="main-connectBar-connecting",is=function(){const{isPlayingRemotely:e,connectionStatus:t,remoteDeviceName:i,remoteDeviceType:n}=(0,ca.v)((e=>{const t=(0,Ja.V)(e);return{isPlayingRemotely:t.isPlayingRemotely,connectionStatus:t.connectionStatus,remoteDeviceName:t.remoteDevice?.name,remoteDeviceType:t.remoteDevice?.type}}),ln.a),{currentSession:r}=(0,qa.D)(),a=Boolean(r?.active),s=e&&i&&n;if(!s&&!a)return null;const o=t===ua.zP.CONNECTED||a,l=t===ua.zP.CONNECTING&&!a;return(0,R.jsxs)("div",{className:At()(Xa,{"encore-bright-accent-set":o,[es]:o,[ts]:l}),children:[a&&(0,R.jsx)(Qa,{}),a&&s&&(0,R.jsx)(Ga,{}),s&&(0,R.jsx)(Ha,{connectionStatus:t,remoteDeviceName:i,remoteDeviceType:n,omitConnectionStateText:a})]})},ns=()=>(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(is,{})}),rs=({className:e="",disabledClassName:t="",onClick:i})=>{const n=Ji(),r=(0,b.useContext)(Lt),a=(0,gi.o)((e=>e?.hasContext??!1)),s=(0,g.wA)(),o=!a,l=(0,b.useCallback)((async()=>{r?.current&&(i?.(!0),s((0,p.f)()),Bt(r.current))}),[s,r,i]),c=At()(e,{[t]:o});return n?(0,R.jsx)(ai,{onToggle:l,className:c,icon:dr.L,label:u.Ru.get("npv.full-screen"),disabled:o,testId:"fullscreen-mode-button"}):null},as=(0,b.memo)(rs);var ss=i(57262),os=i(73128),ls=i(76140);function cs(e,t,i){let n;return n=t===ua.zP.CONNECTING?e.connectingButtonFactory():t===ua.zP.CONNECTED?e.connectedButtonFactory():e.notConnectedButtonFactory(),i?n.hitUiHide():n.hitUiReveal()}var us=i(41781);const ds=(e=Da)=>{const t=(0,g.Pj)(),{isActive:i}=e(),n=(0,us.h)();return document.hasFocus()&&!i&&!(({ui:e,ads:t},i)=>e.blockUserDialog.isOpen||e.connectDevicePicker.isOpen||e.deleteFolderDialog.isOpen||e.deletePlaylistDialog.isOpen||e.fullscreenMode.isOpen||e.improvedSignupPromptDialog.isOpen||e.keyboardShortcutsHelpModal.isOpen||e.leavePlaylistDialog.isOpen||e.loginToListenDialog.isOpen||e.offlineDeviceLimitReachedDialog.isOpen||e.playbackNotSupportedErrorDialog.isOpen||e.premiumDialog.isOpen||e.signupToListenDialog.isOpen||!0===t.billboard?.isOpen&&!t.billboard.isMinimized||!1===t.vto?.isHidden&&!1===t.vto?.isMinimized||i)(t.getState(),n.current.length>0)},ms="FUc3MiMwD1AWPush1Hl4",ps="O8SOGarqcSGaeFkBF5wT",hs=({onClose:e,onMouseEnter:t,onMouseLeave:i,onClick:n,impressionCallback:r,message:a})=>(0,R.jsxs)("div",{className:ms,onMouseEnter:t,onMouseLeave:i,ref:r,onClick:n,children:[(0,R.jsx)(On.E,{id:"nudgeBody",as:"p",variant:"bodyMedium",semanticColor:"textBase",children:a}),(0,R.jsx)(ei.H,{iconOnly:Pn.M,size:"small",semanticColor:"textBase",onClick:t=>{t.stopPropagation(),e?.()},"aria-label":u.Ru.get("close"),className:ps})]});var gs=i(18086);var fs=i(30806),vs=i(40384),ys=i(75488),bs=i(2817);const _s=e=>{const t=(0,b.useRef)(),i=(0,b.useRef)(),n=(0,b.useRef)(!1),r=(0,D.z)(),a=(0,vs.e)(),{spec:s,logger:o}=(0,Hi.r)(gs.w,{}),l=(0,b.useRef)(null),c=(0,b.useCallback)((()=>{o.logInteraction(s.djVoiceUnsupportedNudgeFactory().closeButtonFactory().hitUiHide())}),[s,o]),d=(0,b.useCallback)((e=>{e&&l.current!==e&&o.logImpression(s.djVoiceUnsupportedNudgeFactory().impression()),l.current=e}),[s,o]),m=(0,b.useCallback)((()=>{const e=r.getState(),t=a.getState();return!(e=>e?.connectionStatus===ua.zP.NOT_CONNECTED)(t)&&(0,Qi.yc)(e,"spotify:playlist:37i9dQZF1EYkqdzj48dyYq")!==bs.i.NOT_ACTIVE&&(i=t?.activeDevice??void 0,!Boolean(i?.supportsDJNarration));var i}),[r,a]),p=(0,b.useCallback)((()=>{m()&&e({message:u.Ru.get("web-player.connect.nudge.dj-voice-unavailable"),onClose:c,impressionCallback:d})}),[e,m,c,d]),h=(0,b.useCallback)((e=>{e.data.action===H.Ik.PLAY&&(n.current=!0)}),[]);(0,V.p)(H.gd.ACTION,h);const g=(0,b.useCallback)((e=>{n.current&&(0,Qi.uW)(e.data)===bs.i.PLAYING&&(t.current=e.data?.context.uri,p(),t.current=void 0,n.current=!1)}),[p]);(0,V.p)(H.gd.UPDATE,g);const f=(0,b.useCallback)((e=>{const t=e.data?.activeDevice;t&&!t.isLocal&&i.current!==t.connectStateId&&p(),i.current=t?.connectStateId}),[p]);(0,ys.W)(fs.P.UPDATE,f)};var Es=i(63753);const Cs=e=>!!e?.devices.length&&e.devices.some((e=>e.isLocalNetwork&&!e.isDisabled&&(e=>{switch(e.type){case ua.bq.AUDIO_DONGLE:case ua.bq.AVR:case ua.bq.CAST_AUDIO:case ua.bq.CAST_VIDEO:case ua.bq.GAME_CONSOLE:case ua.bq.SPEAKER:case ua.bq.STB:case ua.bq.TV:return!0;default:return!1}})(e)));var xs=i(4852),Ss=i(75235);const As=new Date(0).toISOString(),Ts=["shift+alt+f10"],Is=e=>{const t=(0,b.useRef)(),i=(0,b.useRef)(!1),n=(0,b.useRef)(!1),r=(0,g.Pj)(),a=(0,D.z)(),s=(0,vs.e)(),o=(0,He.V)(),[l,c]=(0,Ss.x)("connect-nudge-triggered-at",As),d=(0,b.useRef)(null),{spec:m,logger:p}=(0,Hi.r)(gs.w,{}),h=(0,b.useCallback)((()=>{p.logInteraction(m.connectFromDevicePickerNudgeFactory().hitNoAction())}),[m,p]),f=(0,b.useCallback)((()=>{p.logInteraction(m.connectFromDevicePickerNudgeFactory().closeButtonFactory().hitUiHide())}),[m,p]),v=(0,b.useCallback)((e=>{e&&d.current!==e&&p.logImpression(m.connectFromDevicePickerNudgeFactory().impression()),d.current=e}),[m,p]);(0,xs.f)(Ts,(async()=>{const{platform:{isDeveloperMode:e}}=r.getState();if(e){const e=new Date;e.setHours(e.getHours()-8),c(e.toISOString())}}));const y=(0,b.useCallback)((()=>{const e=a.getState(),t=s.getState(),i=o.getDefaultDevice(),n=new Date(l);n.setHours(n.getHours()+8);return n<=new Date&&(e=>e?.connectionStatus===ua.zP.NOT_CONNECTED)(t)&&!(0,Qi.A3)(e)&&Cs(t)&&(e=>!e||!(e.terminalType===Es.FI.HEADPHONES||e.terminalType===Es.FI.SPEAKERS&&(e.transportType===Es.Yg.BLUETOOTH||e.transportType===Es.Yg.USB)))(i)}),[a,s,o,l]),_=(0,b.useCallback)((()=>{if(y()){e({message:u.Ru.get("web-player.connect.nudge.listen-to-speaker"),impressionCallback:v,onClick:h,onClose:f});const t=(new Date).toISOString();c(t)}}),[e,y,c,h,f,v]),E=(0,b.useCallback)((e=>{e.data.action===H.Ik.PLAY?i.current=!0:e.data.action===H.Ik.RESUME&&(n.current=!0)}),[]);(0,V.p)(H.gd.ACTION,E);const C=(0,b.useCallback)((e=>{i.current&&(0,Qi.uW)(e.data)===bs.i.PLAYING?(t.current=e.data?.context.uri,_(),t.current=void 0,i.current=!1):n.current&&!1===e.data?.isPaused&&(t.current=e.data?.context.uri,_(),t.current=void 0,n.current=!1)}),[_]);(0,V.p)(H.gd.UPDATE,C)},Ns=e=>{Is(e),_s(e)},ws=()=>{const e=(0,b.useRef)(),t=(0,b.useRef)(!1),i=(0,b.useRef)(!1),n=(0,g.wA)(),r=(0,g.d4)((e=>e.ui.connectNudge.isOpen)),a=(0,g.d4)((e=>e.ui.connectDevicePicker.isOpen)),s=(0,b.useCallback)((()=>{i.current&&(clearTimeout(e.current),i.current=!1),n((0,p.Yp)())}),[n]),o=(0,b.useCallback)((()=>{i.current=!1,t.current||s()}),[s]),l=(0,b.useCallback)((()=>{e.current=window.setTimeout(o,8e3),n((0,p.dK)()),i.current=!0}),[n,o]),c=(0,b.useCallback)((e=>{t.current=e,e||i.current||s()}),[s]);return(0,b.useEffect)((()=>{a&&s()}),[a,s]),(0,b.useMemo)((()=>({hideNudge:s,showNudge:l,setShouldKeepShowingNudge:c,isNudgeVisible:r})),[s,l,c,r])},Rs=({children:e,useNudgeTriggers:t=Ns,useToggleNudgeWithTimer:i=ws,useCanShowNudge:n=ds,disabled:r=!1})=>{const{showNudge:a,hideNudge:s,setShouldKeepShowingNudge:o,isNudgeVisible:l}=i(),[c,u]=(0,b.useState)(null),d=n();return(0,b.useEffect)((()=>{l&&!d&&s()}),[d,s,l]),t((e=>!(l||!d)&&(u(e),a(),!0))),(0,R.jsx)(os.W,{placement:"top",visible:Boolean(c?.message)&&l&&!r,overlay:c?(0,R.jsx)(hs,{onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),...c,onClose:()=>{c?.onClose?.(),s()}}):(0,R.jsx)(R.Fragment,{}),popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,padding:24,tether:!1}}]},onHide:()=>{},fadeOut:!0,useLazyMounting:!0,children:e})},ks="DMWoYmJsYdFjGQbeGH9Q",Os="wff4Xp9vQFpx18x9Bb_S",Ps="tP4heMeFAePYaWK7l2Kd",Ls="UYKUvqBDvaGU1DVMROXP",js="zXVFptGLwJ7Ss396ADNn",Ds="cK7qggtY22OBs0bw4PUh",Ms="device-picker-icon-button",Us=(0,b.forwardRef)((({isPickerOpen:e,onLogInteraction:t,onClick:i,showIndicatorTriangle:n=!1},r)=>{const{spec:a,logger:s}=(0,Hi.r)(ls.p,{}),o=(0,g.d4)((e=>e.ui.connectNudge.isOpen)),{remoteDeviceType:l,remoteDeviceIsGroup:c,connectionStatus:d}=(0,ca.v)((e=>{const t=(0,Ja.V)(e);return{remoteDeviceType:t.remoteDevice?.type,remoteDeviceIsGroup:t.remoteDevice?.isGroup,connectionStatus:t.connectionStatus}}),ln.a),m=(0,Ua.tf)(l,c),p={"encore-bright-accent-set":d===ua.zP.CONNECTED,[js]:d===ua.zP.CONNECTED,[Ls]:d===ua.zP.CONNECTING};return(0,R.jsx)(Rs,{children:(0,R.jsx)(ti.Zp,{label:u.Ru.get("playback-control.connect-picker"),disabled:e||o,children:(0,R.jsxs)("div",{className:Os,children:[n&&(0,R.jsx)("div",{className:At()(Ps,p),"":"indicator"}),(0,R.jsx)("button",{className:At()("control-button",{"control-button--active":d===ua.zP.CONNECTED},ks),onClick:n=>{const{interactionId:r}=s.logInteraction(cs(a,d,e));t?.(r),i?.(n)},ref:r,"aria-label":u.Ru.get("playback-control.connect-picker"),"aria-expanded":e,id:Ms,children:(0,R.jsx)(m,{className:At()({[Ds]:d===ua.zP.CONNECTING}),size:"small",role:"presentation"})})]})})})}));var Bs=i(36998),Fs=i(35421),Hs=i(45518),Vs=i(96475),Gs=i(91087),zs=i(95141),Ws=i(97393),Ks=i(69964),Ys=i(57290),qs=i(24944),Zs=i(5162),$s=i(949),Qs=i(73668);var Js=i(48905);const Xs="mFr6W9mwg0p_c7eJlhc_",eo="lpPBKkIGJcyWu59iOpsS",to=({deviceId:e,connectStateDeviceId:t,allowForgetDevice:i,incarnation:n})=>{const r=(0,vs.e)(),a=(0,Mi.N)(Qs.r),o=(0,Qe.s)(),{spec:l}=(0,Hi.r)($s.d,{}),c=(0,Js.t)(l),d=l.forgetDeviceButtonFactory(),m=(0,Js.t)(d),p=l.deviceIncarnationContainerFactory(),h=(0,Js.t)(p),g=(0,s.NC)(Ce.NPo);return i||n?(0,R.jsx)("span",{ref:c,className:eo,children:(0,R.jsxs)(Ii.W,{children:[i&&(0,R.jsx)(wi.D,{role:"menuitem",leadingIcon:(0,R.jsx)(qs.V,{size:"small"}),onClick:()=>{o.logInteraction(d.hitLogoutFromRemoteDevice({remoteDeviceId:t})),g?a.logout(e):r.logout(e)},elementRef:m,children:u.Ru.get("web-player.connect.context-menu.forget-device")}),n&&(0,R.jsxs)("div",{ref:h,children:[(0,R.jsx)(Ni.y,{children:u.Ru.get("web-player.connect.context-menu.incarnation-title")}),n.available.map((i=>{const{icon:s,text:l}=(e=>{switch(e){case"connect":return{icon:(0,R.jsx)(Ks.E,{size:"small"}),text:u.Ru.get("web-player.connect.context-menu.incarnation-connect")};case"cast":return{icon:(0,R.jsx)(Ys.m,{size:"small"}),text:u.Ru.get("web-player.connect.context-menu.incarnation-cast")};default:return{}}})(i);return(0,R.jsx)(wi.D,{role:"menuitemradio",leadingIcon:s,onClick:()=>{let s;switch(i){case"cast":s=p.googleCastButtonFactory();break;case"connect":s=p.spotifyConnectButtonFactory()}n.preferred!==i?(s&&o.logInteraction(s.hitChangeRemoteDeviceIncarnation({remoteDeviceId:t})),g?a.setPreferredIncarnation(e,i):r.setPreferredIncarnation(e,i)):s&&o.logInteraction(s.hitNoAction())},"aria-checked":n.preferred===i,CheckedIcon:Zs.i,children:l},i)}))]})]})}):null},io=({title:e,deviceId:t,connectStateDeviceId:i,allowForgetDevice:n,incarnation:r,className:a,onHide:s,onShow:o,spec:l})=>{const[c,d]=(0,b.useState)(!1),m=l.contextMenuButtonFactory({identifier:i}),p=(0,Qe.s)(),h=(0,Js.t)(m);return(0,R.jsx)(Ti.b,{renderInline:!0,menu:(0,R.jsx)(on.r,{spec:m,children:(0,R.jsx)(to,{deviceId:t,connectStateDeviceId:i,allowForgetDevice:n,incarnation:r})}),onShow:()=>{d(!0),o?.()},onHide:()=>{d(!1),s?.()},offset:[0,-8],children:(0,R.jsx)(Ws.e,{ref:h,size:Ws.M.xs,label:u.Ru.get("more.label.context",e),className:At()(Xs,a),onClick:e=>{e.stopPropagation(),p.logInteraction(c?m.hitUiHide():m.hitUiReveal())}})})},no=(0,b.createContext)({rowWithMenuOpenIdentifier:null,setRowWithMenuOpenIdentifier:()=>{}}),ro=({children:e})=>{const[t,i]=(0,b.useState)(null);return(0,R.jsx)(no.Provider,{value:{rowWithMenuOpenIdentifier:t,setRowWithMenuOpenIdentifier:i},children:e})},ao=e=>e instanceof Bs.BA.ContainerViewEventFactory.DeviceListEventFactory.RemoteDeviceEventFactory||e instanceof Bs.BA.ContainerViewEventFactory.DeviceListEventFactory.DisabledDeviceEventFactory||e instanceof Bs.BA.ContainerViewEventFactory.OffNetworkDeviceListEventFactory.RemoteDeviceEventFactory||e instanceof Bs.BA.ContainerViewEventFactory.OffNetworkDeviceListEventFactory.DisabledDeviceEventFactory||e instanceof Bs.BA.ContainerViewEventFactory.OnNetworkDeviceListEventFactory.RemoteDeviceEventFactory;var so=i(43396);const oo="main-devicePicker-tooltip",lo="main-devicePicker-tooltipContent",co="MZZKWxJgpZdyX3kEqgVk",uo="l6OcBOr8WqpAei2v3T50",mo="eJvD_4f5SD7yaH4Mq_nc",po="XdJAEkP3WXzUL5URB0ZX",ho="Bxb4yN4IpWCHbJDIIoAD",go="m97VJWoSNAnJwkBDsiZg",fo="jd5BgldghOe68KEXK_hS",vo="gc2T8wnuWczDDGzJ3uWY",yo="hWE9oKnGY9N3YUZrry_c",bo="_iSFa0Kl_AlpaG8l_VLJ",_o="n7lpLbjlkn69nQ1BhwZg",Eo="ZtZC7H7E6gtj5tlwNsn8",Co="main-devicePicker-section",xo="main-devicePicker-heading",So="main-devicePicker-sectionHeading",Ao="in_2k_hGN2eFVVu1sDur",To="hI_HIhbNifqISMRk6xfh",Io="main-devicePicker-header",No="BIRS4ztlrxxl4_FH24Yn",wo="mjprSb2e1tKJpqwvgFSh",Ro="ZvsBIT5pDqFAda_ilPeJ",ko="main-devicePicker-nowPlayingActiveIcon",Oo="ajXfdFS_TUChA63kTlhA",Po="XaZWrewfHM1YUmghUpMQ",Lo="main-devicePicker-headingContent",jo="vz5TaAerMmRrJGJtWIAw",Do="main-devicePicker-headingTitle",Mo="main-devicePicker-headingSubtitle",Uo="pkGZOxD6iLgSVCGTPxXn",Bo="d0PEpGug7fpNx6FALPxV",Fo="main-devicePicker-troubleshootingList",Ho="main-devicePicker-troubleshooting",Vo="main-devicePicker-troubleshootingItemIcon",Go="main-devicePicker-troubleshootingItemSubtitle",zo="qmaOpgYPMncTetZzlw3T",Wo="It1L8Ea9SuMjm2_44q5V",Ko="g4EIVDYwOM26eyJI2t_P",Yo="WkA7K654a3WXw5C6ed7g",qo="efJDqiDUHmkwgbM3zV6D",Zo=(0,b.forwardRef)((function({deviceId:e,connectStateDeviceId:t,Icon:i,TechIcon:n,title:r,subtitle:a,helpTooltip:s,canLogout:o,isDisabled:l,incarnation:c,onClick:u,spec:d},m){const{rowWithMenuOpenIdentifier:p,setRowWithMenuOpenIdentifier:h}=(0,b.useContext)(no),g=(0,Ua.HJ)(c),f=o||g,{toggleDevicePicker:v}=Ma(),y=(0,so.W)();return(0,R.jsxs)("li",{className:mo,ref:m,children:[(0,R.jsx)("button",{className:At()(wo,po,{[ho]:p===e}),onClick:()=>{l||(u&&u(),v())},"aria-disabled":l,"aria-label":a?`${r} ${a}`:r,"":"device-picker-row-flyout",children:(0,R.jsxs)("div",{className:At()(xo,Po),children:[(0,R.jsx)(i,{iconSize:32,semanticColor:l?void 0:"textBase",className:ko,"":"main-icon",role:"presentation"}),(0,R.jsxs)("div",{className:At()(Bo,f&&jo),children:[(0,R.jsx)("div",{className:Mo,children:(0,R.jsx)("div",{className:Do,children:(0,R.jsx)(zs.r,{equalGradientWidth:!0,title:r,children:(0,R.jsx)(On.E,{variant:"bodyMedium",semanticColor:l?void 0:"textBase",className:Ro,children:r})},`picker-row-title-${e}`)})}),(0,R.jsxs)("div",{className:Mo,children:[n&&(0,R.jsx)(n,{iconSize:16,semanticColor:"textSubdued",className:Uo,"":"sub-icon",role:"presentation"}),a&&(0,R.jsx)("div",{className:Do,children:(0,R.jsx)(zs.r,{equalGradientWidth:!0,title:a,children:(0,R.jsx)(On.E,{variant:"marginal",semanticColor:l?void 0:"textSubdued",className:Ro,children:a})},`picker-row-subtitle-${e}`)}),s&&(0,R.jsx)("div",{className:Yo,children:(0,R.jsx)(Gs.f,{message:s,placement:y?"right":"left",messageClassName:qo})})]})]})]})}),f&&ao(d)&&(0,R.jsx)("span",{className:go,children:(0,R.jsx)(io,{title:r,deviceId:e,connectStateDeviceId:t,allowForgetDevice:o,incarnation:g?c:void 0,onShow:()=>{h(e)},onHide:()=>{h(null)},spec:d})})]})}));var $o=i(16047),Qo=i(66060),Jo=i(24284),Xo=i(5122),el=i(71588);const tl="AWblt0YATqa_XQaPUDMc",il="sX7AwqoSzMeT9qhlEViU",nl="jIlVu16bmijzUKG6u5VW",rl="ZkuPLR9bss2N7f7thixx",al="QSZFk1XCj76mVplNmiV1",sl="O0wmxPM0kfA59paiHqR9",ol=(0,b.forwardRef)((function({deviceId:e,connectStateDeviceId:t,Icon:i,TechIcon:n,title:r,subtitle:a,canLogout:s,isDisabled:o,incarnation:l,onClick:c,spec:d},m){const p=(0,Sr._Y)(),h=(0,Ua.HJ)(l),g=s||h,{rowWithMenuOpenIdentifier:f,setRowWithMenuOpenIdentifier:v}=(0,b.useContext)(no),y=(0,nn.YQ)((()=>{o||(c?.(),p(Pe.$S.PANEL_CLOSE_CLICK))}),1e3,{leading:!0,trailing:!1}),_=(0,b.useCallback)((e=>{"Enter"===e.key&&y()}),[y]),E=(0,R.jsx)(to,{deviceId:e,connectStateDeviceId:t,allowForgetDevice:s,incarnation:h?l:void 0});return(0,R.jsx)(el.h,{menu:E,children:(0,R.jsx)(Xo.c,{onKeyDown:_,onClick:y,className:At()(rl,{[sl]:f===e}),children:(0,R.jsx)($o.v,{id:e,ref:m,"":"device-picker-row-sidepanel",media:(0,R.jsx)(i,{semanticColor:o?"textSubdued":"textBase","":"main-icon",role:"presentation"}),onClick:()=>{},onClickHint:u.Ru.get("web-player.connect.device-picker.connect-to-device"),title:(0,R.jsx)("span",{className:tl,children:(0,R.jsx)(ti.Zp,{label:r,renderInline:!0,children:(0,R.jsx)(Qo.d,{"":"list-row-title",lineClamp:1,semanticColor:o?"textSubdued":"textBase",dir:"auto",children:r})})}),subtitle:(0,R.jsxs)("div",{className:il,children:[n&&(0,R.jsx)(n,{className:nl,semanticColor:"textSubdued","":"sub-icon",role:"presentation",size:"small"}),a&&(0,R.jsx)(Jo.j,{semanticColor:"textSubdued",lineClamp:1,children:a})]}),trailing:g&&ao(d)&&(0,R.jsx)(io,{title:r,deviceId:e,connectStateDeviceId:t,allowForgetDevice:s,incarnation:h?l:void 0,spec:d,className:At()(al),onShow:()=>{v(e)},onHide:()=>{v(null)}})})})})})),ll=({position:e,deviceId:t,connectStateDeviceId:i,deviceName:n,deviceType:r,deviceModelName:a,isGroup:o,disabledReason:l,canLogout:c,spec:u})=>{const d=(0,Ua.tf)(r,o),{helpText:m,tooltip:p}=(0,Ua.uY)(l,(0,Ua.p2)(r,a)),h=u.disabledDeviceFactory({identifier:i,position:e,reason:l??"null"}),g=(0,Js.t)(h),f=(0,s.NC)(Ce.VUN)?ol:Zo;return(0,R.jsx)(f,{deviceId:t,connectStateDeviceId:i,ref:g,isDisabled:!0,Icon:d,title:n,subtitle:m,canLogout:c,spec:h,helpTooltip:p})},cl="CAST_STATE_CHANGED",ul="TOGGLE_CAST",dl="SET_CONNECTING_CAST_DEVICE_ID",ml="RESET_CONNECTING_CAST_DEVICE_ID",pl=e=>({type:cl,castState:e}),hl=({isDisabled:e=!1,spec:t})=>{const i=(0,g.wA)(),n=t.containerViewFactory().deviceListFactory().castPlaceholderFactory(),r=(0,Js.t)(n),a=(0,Ua.$A)(ua.bq.CAST_AUDIO,"disconnected"),o=(0,Qe.s)(),l=(0,s.NC)(Ce.VUN)?ol:Zo;return(0,R.jsx)(l,{deviceId:"cast-placeholder",connectStateDeviceId:"cast-placeholder",ref:r,Icon:a,title:u.Ru.get("web-player.connect.device-picker.google-cast-devices"),supportsHiFi:!1,onClick:()=>{o.logInteraction(n.hitUiReveal()),i({type:ul})},isDisabled:e,spec:n})};var gl=i(33889);const fl=({deviceId:e,connectStateDeviceId:t,deviceName:i,supportsHiFi:n,spec:r})=>{const a=(0,Qe.s)(),o=r.localDeviceFactory(),l=(0,Ua.tf)(ua.bq.COMPUTER,!1),c=(0,vs.e)(),u=(0,gl.D)(),d=(0,s.NC)(Ce.p41),m=(0,s.NC)(Ce.VUN)?ol:Zo;return(0,R.jsx)(m,{deviceId:e,connectStateDeviceId:t,Icon:l,title:i,supportsHiFi:n,onClick:()=>{const{interactionId:t,pageInstanceId:i}=a.logInteraction(o.hitPullPlaybackToLocalDevice());(d?u:c).transferPlayback(e,{interactionId:t,pageInstanceId:i})},spec:o})},vl=()=>{const[e,t]=(0,Ss.x)("connect-picker-recent-transfers",{});return{registerTransferAttempt:(0,b.useCallback)((i=>{t({...e,[i]:(new Date).getTime()})}),[e,t]),recentTransfersMap:e}},yl=({position:e,deviceId:t,connectStateDeviceId:i,deviceName:n,deviceType:r,isGroup:a,supportsHiFi:o,canLogout:l,incarnation:c,spec:d})=>{const m=(0,Qe.s)(),p=d.remoteDeviceFactory({identifier:i,position:e}),h=(0,Ua.tf)(r,a);let g,f;(0,Ua.Mp)(r)&&(g=(0,Ua.$A)(r,"disconnected"),f=u.Ru.get("web-player.connect.device-picker.google-cast"));const{registerTransferAttempt:v}=vl(),y=(0,vs.e)(),b=(0,gl.D)(),_=(0,s.NC)(Ce.p41),E=(0,Js.t)(p),C=(0,s.NC)(Ce.VUN)?ol:Zo;return(0,R.jsx)(C,{deviceId:t,connectStateDeviceId:i,ref:E,Icon:h,TechIcon:g,title:n,subtitle:f,supportsHiFi:o,canLogout:l,incarnation:c,onClick:()=>{const{interactionId:e,pageInstanceId:n}=m.logInteraction(p.hitConnectToRemoteDevice({remoteDeviceId:i}));(_?b:y).transferPlayback(t,{interactionId:e,pageInstanceId:n}),v(i)},spec:p})},bl="device-picker-section-heading",_l="device-picker-troubleshooting-list",El=()=>(0,gi.o)((e=>(e?.restrictions?.disallowTransferringPlaybackReasons?.length??0)>0)),Cl=({devices:e,areWebPlayerCastDevicesAvailable:t=!1,networkHeadingID:i="",spec:n})=>{const r=(0,F.Ek)(),a=El(),o=n.containerViewFactory().deviceListFactory(),l=(0,Js.t)(o),c=(0,s.NC)(Ce.VUN),d=(e,t)=>{const i=r?u.Ru.get("web-player.connect.device-picker.this-computer"):u.Ru.get("web-player.connect.device-picker.this-web-browser");return e.isDisabled?(0,R.jsx)(ll,{position:e.isLocal?0:t+1,deviceId:e.id,connectStateDeviceId:e.connectStateId,deviceName:e.isLocal?i:e.name,deviceType:e.isLocal?ua.bq.COMPUTER:e.type,deviceModelName:e.modelDisplayName,isGroup:e.isGroup,disabledReason:e.disabledReason,canLogout:!e.isLocalNetwork&&e.supportsLogout,spec:o},e.id):e.isLocal&&(e=>e instanceof Bs.BA.ContainerViewEventFactory.DeviceListEventFactory||e instanceof Bs.BA.ContainerViewEventFactory.OnNetworkDeviceListEventFactory)(o)?(0,R.jsx)(fl,{deviceId:e.id,connectStateDeviceId:e.connectStateId,deviceName:i,supportsHiFi:e.losslessSupport.fullySupported,spec:o},e.id):(0,R.jsx)(yl,{position:t+1,deviceId:e.id,connectStateDeviceId:e.connectStateId,deviceName:e.name,deviceType:e.type,isGroup:e.isGroup,supportsHiFi:e.losslessSupport.fullySupported,canLogout:!e.isLocalNetwork&&e.supportsLogout,incarnation:e.incarnation,spec:o},e.id)};return c?(0,R.jsxs)(Vs.$,{circular:!1,ref:l,"aria-labelledby":`${bl} ${i}`,"":`devices-list-${i}`,allowsMultipleInteractiveChildrenInItem:!0,children:[e.map(((e,t)=>d(e,t))),t&&(0,R.jsx)(hl,{isDisabled:a,spec:n})]}):(0,R.jsxs)("ul",{"aria-labelledby":`${bl} ${i}`,"":`devices-list-${i}`,ref:l,children:[e.map(((e,t)=>d(e,t))),t&&(0,R.jsx)(hl,{isDisabled:a,spec:n})]})},xl="local-network-heading",Sl="other-networks-heading",Al=({localNetworkDevices:e,otherNetworksDevices:t,spec:i})=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(On.E,{as:"h3",variant:"bodySmall",semanticColor:"textSubdued",className:Ao,id:xl,children:e.length>0?u.Ru.get("web-player.connect.device-picker.on-this-network"):u.Ru.get("web-player.connect.device-picker.no-devices-local-network")}),e.length>0&&(0,R.jsx)(Cl,{devices:e,networkHeadingID:xl,spec:i}),t.length>0&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(On.E,{as:"h3",variant:"bodySmall",semanticColor:"textSubdued",className:At()(Ao,To),id:Sl,children:u.Ru.get("web-player.connect.device-picker.on-other-networks")}),(0,R.jsx)(Cl,{devices:t,networkHeadingID:Sl,spec:i})]})]});var Tl=i(75721);const Il=({url:e,linkText:t,handleClick:i,elementRef:n})=>(0,R.jsxs)("a",{className:At()(xo,wo,zo),href:e,style:{textDecoration:"none"},target:"_blank",onClick:i,ref:n,children:[(0,R.jsx)(On.E,{as:"p",variant:"bodyMedium",semanticColor:"textBase",className:Ko,children:t}),(0,R.jsx)(Tl.H,{size:"small","":"icon-external-link",semanticColor:"textSubdued",className:Wo,role:"presentation",autoMirror:!0,"aria-hidden":"true"})]}),Nl=({url:e,linkText:t,handleClick:i,elementRef:n})=>(0,R.jsx)("a",{className:At()(rl),href:e,target:"_blank",ref:n,onClick:i,children:(0,R.jsx)($o.v,{title:t,id:t,isRedundantOnClick:!0,onClick:()=>{},"":"list-row-external-link",trailing:(0,R.jsx)(Tl.H,{size:"small","":"icon-external-link",semanticColor:"textSubdued",role:"presentation",autoMirror:!0,"aria-hidden":"true"})})}),wl=({spec:e})=>{const t=`https://www.spotify.com/connect${`?utm_campaign=connect&utm_medium=${(0,F.Ek)()?"app":"web"}&utm_source=desktop`}`,i=e.containerViewFactory().externalConnectHubLinkFactory(),n=(0,Js.t)(i),r=(0,Qe.s)(),a=(0,s.NC)(Ce.VUN)?Nl:Il;return(0,R.jsx)(a,{url:t,linkText:u.Ru.get("web-player.connect.device-picker.connect-hub-external-link"),elementRef:n,handleClick:()=>{r.logInteraction(i.hitNavigateToExternalUri({destination:t}))}})},Rl="https://support.spotify.com/article/spotify-connect/",kl=({spec:e})=>{const t=e.containerViewFactory().externalHelpLinkFactory(),i=(0,Js.t)(t),n=(0,Qe.s)(),r=(0,s.NC)(Ce.VUN)?Nl:Il;return(0,R.jsx)(r,{url:Rl,linkText:u.Ru.get("web-player.connect.device-picker.help-external-link"),elementRef:i,handleClick:()=>{n.logInteraction(t.hitNavigateToExternalUri({destination:Rl}))}})};var Ol=i(52840);const Pl=[Ol.h.en,Ol.h.enGB],Ll=()=>{const e=u.Ru.getLocaleForTranslation();return Pl.includes(e)};const jl=({devices:e,areWebPlayerCastDevicesAvailable:t,spec:i})=>{const n=(0,F.Ek)(),r=El(),a=Ll(),o=!n&&r?e.map((e=>({...e,isDisabled:!0}))):e,{recentTransfersMap:l}=vl(),c=function(e,t){const i=[],n=e.find((e=>e.isLocal));n&&i.push(n);const r=e.filter((e=>!e.isLocal)),{usedDevices:a,unusedDevices:s}=function(e,t){const i=[],n=[];for(const r of e)t[r.connectStateId]?i.push({device:r,timestamp:t[r.connectStateId]}):n.push(r);return{usedDevices:i,unusedDevices:n}}(r,t);a.sort(((e,t)=>t.timestamp-e.timestamp));for(const e of a)i.push(e.device);const o=i.concat(function(e){return e.sort(((e,t)=>e.isLocal?-1:t.isLocal?1:e.name.toLowerCase().localeCompare(t.name.toLowerCase())))}(s));return o}(o,l),u=c.filter((e=>e.isLocalNetwork)),d=c.filter((e=>!e.isLocalNetwork)),{rowWithMenuOpenIdentifier:m}=(0,b.useContext)(no),p=(0,s.NC)(Ce.VUN),h=(0,R.jsxs)("div",{className:At()(_o,p&&Eo),children:[(0,R.jsx)("div",{children:n&&d.length>0?(0,R.jsx)(Al,{localNetworkDevices:u,otherNetworksDevices:d,spec:i}):(0,R.jsx)(Cl,{devices:c,areWebPlayerCastDevicesAvailable:t,spec:i})}),(0,R.jsxs)("div",{className:At()(Oo),children:[(0,R.jsx)(kl,{spec:i}),a&&(0,R.jsx)(wl,{spec:i})]})]});return p?h:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Hs.a,{className:At()(fo,uo,{[yo]:!!m}),children:h}),(0,R.jsx)("div",{className:bo})]})},Dl=({foundDevices:e})=>{const t=e?u.Ru.get("web-player.connect.device-picker.select-another-device"):u.Ru.get("web-player.connect.device-picker.no-devices-found");return(0,R.jsx)("span",{className:So,id:bl,"":bl,children:(0,R.jsx)(On.E,{as:"h2",variant:"bodyMediumBold",semanticColor:"textBase",children:t})})};var Ml=i(44063),Ul=i(37918),Bl=i(94341),Fl=i(85212);const Hl=({title:e,subtitle:t,Icon:i})=>(0,R.jsxs)("li",{className:xo,children:[(0,R.jsx)(i,{size:"medium",semanticColor:"textSubdued",className:Vo,role:"presentation"}),(0,R.jsxs)("div",{className:Lo,children:[(0,R.jsx)(On.E,{variant:"bodyMedium",semanticColor:"textBase",children:e}),(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",className:Go,children:t})]})]});var Vl=i(7510),Gl=i(84492),zl=i(46798);const Wl=({size:e="medium",className:t})=>{const i=(0,Rr.j)(),n=(0,zl.k)(e);return(0,R.jsx)(R.Fragment,{children:i?(0,R.jsx)(Vl.A,{size:e,semanticColor:"textBrightAccent",className:t,"":"now-playing-active"}):(0,R.jsx)("img",{className:t,width:n,height:n,alt:"","aria-hidden":"true",src:(0,Gl.b)("images/device-picker-equaliser-animation.webp"),"":"animated-now-playing"})})},Kl="device-picker-header",Yl=({isLocalDevice:e,deviceName:t,deviceType:i,isGroup:n,canLogout:r,incarnation:a,isPlaying:s,deviceId:o,connectStateDeviceId:l,spec:c})=>{const d=(0,F.Ek)(),m=(0,Ua.HJ)(a),p=r||m;let h;if(s)h=(0,R.jsx)(Wl,{size:"large",className:ko});else{const e=(0,Ua.tf)(i,n);h=(0,R.jsx)(e,{size:"large",semanticColor:"textBrightAccent",className:ko,"":"device-icon",role:"presentation"})}const g=(0,R.jsx)("div",{className:Do,children:(0,R.jsx)(zs.r,{equalGradientWidth:!0,title:u.Ru.get("web-player.connect.device-picker.current-device"),children:(0,R.jsx)(On.E,{as:"h3",variant:"bodyMediumBold",semanticColor:"textBase",children:u.Ru.get("web-player.connect.device-picker.current-device")})},`picker-header-title-${t}`)});let f,v;e?f=d?u.Ru.get("web-player.connect.device-picker.this-computer"):u.Ru.get("web-player.connect.device-picker.this-web-browser"):(f=t,v=(0,Ua.$A)(i,"connected"));const y=(0,R.jsxs)("div",{className:Mo,children:[v&&(0,R.jsx)(v,{iconSize:16,semanticColor:"textBrightAccent",className:Uo,"":"tech-icon"}),(0,R.jsx)("div",{className:Do,children:(0,R.jsx)(zs.r,{equalGradientWidth:!0,title:f,children:(0,R.jsx)(On.E,{as:"p",variant:"bodyMedium",semanticColor:"textBrightAccent",children:f})},`picker-header-subtitle-${t}`)})]});return(0,R.jsxs)("div",{className:At()(xo,Io),id:Kl,"aria-labelledby":Kl,children:[h,(0,R.jsxs)("div",{className:At()(Lo,p&&jo),children:[g,y]}),p&&(0,R.jsx)(io,{title:f,deviceId:o,connectStateDeviceId:l,allowForgetDevice:r,incarnation:m?a:void 0,className:No,spec:c.containerViewFactory().headerFactory().activeDeviceFactory()})]})},ql=(0,b.forwardRef)((function({Icon:e,title:t,subtitle:i},n){return(0,R.jsx)(Xo.c,{className:rl,children:(0,R.jsx)($o.v,{id:t,ref:n,"":"device-picker-row-sidepanel",media:(0,R.jsx)(e,{semanticColor:"textSubdued"}),title:(0,R.jsx)("span",{className:tl,children:(0,R.jsx)(ti.Zp,{label:t,renderInline:!0,children:(0,R.jsx)(Qo.d,{"":"list-row-title",lineClamp:1,semanticColor:"textBase",dir:"auto",children:t})})}),subtitle:(0,R.jsx)("div",{className:il,children:(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",children:i})})})})})),Zl=({isDesktop:e,spec:t})=>{const i=Ll(),n=t.containerViewFactory().noDevicesViewFactory(),r=(0,Js.t)(n),a=(0,s.NC)(Ce.VUN),o=a?ql:Hl;return(0,R.jsxs)("div",{ref:r,className:At()(Fo,{[Eo]:a,[_o]:a}),"":_l,children:[(0,R.jsxs)("ul",{"aria-labelledby":`${Kl} ${bl}`,className:Ho,children:[(0,R.jsx)(o,{Icon:Ml.T,title:u.Ru.get("web-player.connect.device-picker.check-wifi"),subtitle:u.Ru.get("web-player.connect.device-picker.check-wifi-subtitle")}),(0,R.jsx)(o,{Icon:Ul.g,title:u.Ru.get("web-player.connect.device-picker.play-from-another"),subtitle:u.Ru.get("web-player.connect.device-picker.play-from-another-subtitle")}),e?(0,R.jsx)(o,{Icon:Bl.H,title:u.Ru.get("web-player.connect.device-picker.restart-speaker"),subtitle:u.Ru.get("web-player.connect.device-picker.restart-speaker-subtitle")}):(0,R.jsx)(o,{Icon:Fl.i,title:u.Ru.get("web-player.connect.device-picker.switch-to-app"),subtitle:u.Ru.get("web-player.connect.device-picker.switch-to-app-subtitle")})]}),(0,R.jsxs)("div",{className:At()({[uo]:!a}),"aria-describedby":_l,children:[(0,R.jsx)(kl,{spec:t}),i&&(0,R.jsx)(wl,{spec:t})]})]})},$l=({devices:e,areWebPlayerCastDevicesAvailable:t,spec:i})=>{const n=Boolean(e.find((e=>!e.isLocal))),r=e.filter((e=>!e.isActive&&e.name.length>0)),a=n||t,o=(0,F.Ek)(),l=(0,s.NC)(Ce.VUN);return(0,R.jsxs)("div",{className:At()(Co,l&&Eo),children:[(0,R.jsx)(Dl,{foundDevices:a}),a?(0,R.jsx)(ro,{children:(0,R.jsx)(jl,{devices:r,areWebPlayerCastDevicesAvailable:t,spec:i})}):(0,R.jsx)(Zl,{isDesktop:o,spec:i})]})},Ql={id:"",connectStateId:"",name:"",type:ua.bq.COMPUTER,isGroup:!1,isLocal:!0,isActive:!0,isConnecting:!1,isDisabled:!1,volume:0,losslessSupport:{fullySupported:!1,deviceSupported:!1,userEligible:!1},supportsLogout:!1,supportedMediaTypes:null},Jl=()=>{const{activeDevice:e,devices:t}=(0,ca.v)((e=>({activeDevice:e.activeDevice,devices:e.devices})));return{currentDevice:e??Ql,devices:t}};function Xl(e){return window.cast&&e!==window.cast.framework.CastState.NO_DEVICES_AVAILABLE}var ec=i(85993);const tc=({tooltipTriggerId:e})=>{const t=(0,Ja.l)(),{toggleDevicePicker:i}=Ma(),n=(0,Bs.pG)({data:{identifier:Bs.gw.FLYOUT}});(0,b.useEffect)((()=>{const e=e=>{"Escape"===e.key&&i()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[i]);const{devices:r,currentDevice:a}=Jl(),s=Xl((0,g.d4)((e=>e.playback?.castState??window.cast?.framework.CastState.NO_DEVICES_AVAILABLE))),{isPlaying:o}=(0,ec.GK)();return(0,R.jsx)(Fs.z,{className:At()(oo,t&&vo),arrowClassName:co,disableAutoFocus:!0,children:(0,R.jsxs)("div",{"aria-labelledby":e,className:lo,children:[(0,R.jsx)(Yl,{deviceId:a.id,connectStateDeviceId:a.connectStateId,isLocalDevice:a.isLocal,deviceName:a.name,deviceType:a.type,isGroup:a.isGroup,supportsHiFi:a.losslessSupport.fullySupported,canLogout:!a.isLocalNetwork&&a.supportsLogout,incarnation:a.incarnation,isPlaying:o,spec:n}),(0,R.jsx)($l,{devices:r,areWebPlayerCastDevicesAvailable:s,spec:n})]})})};var ic=i(7353);const nc=()=>{const{triggerRef:e,toggleDevicePicker:t,isPickerOpen:i}=Ma(),n=(0,b.useRef)(null),r=(0,b.useCallback)((()=>{t()}),[t]),a=[n.current,e.current].filter(ic.P);return(0,R.jsx)(os.W,{animation:!1,overlay:(0,R.jsx)(tc,{tooltipTriggerId:Ms}),visible:i,onHide:r,offset:[0,12],placement:"top",theme:"device-picker",useLazyMounting:!0,renderInline:!0,triggerTarget:a,aria:{expanded:!1},keepChildrenMounted:!0,popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,padding:10,tether:!1}}]},children:(0,R.jsx)(Us,{ref:n,isPickerOpen:i,onLogInteraction:e=>{t(e)}})})};var rc=i(55440),ac=i(48896);function sc(){const e=(0,He.V)(),t=function(){const e=(0,b.useContext)(Ge);if(null===e)throw new Error("Trying to use 'ExternalAccessoryContext' without 'ExternalAccessoryProvider'!");return e}(),[i,n]=(0,b.useState)(null),r=(0,b.useCallback)((async()=>{const i=e.getDefaultDevice();if(null===i)return void n(null);if(i.transportType!==Es.Yg.BLUETOOTH)return void n({audioDevice:i});const r=await t.lookup(i.name);n({audioDevice:i,externalAccessory:r})}),[e,t]);return(0,ac.k)(rc.B.DEVICE_CONNECTED,r),(0,b.useEffect)((()=>{r()}),[r]),i}const oc=()=>{const{remoteDeviceType:e,remoteDeviceIsGroup:t,connectionStatus:i}=(0,ca.v)((e=>{const t=(0,Ja.V)(e);return{remoteDeviceType:t.remoteDevice?.type,remoteDeviceIsGroup:t.remoteDevice?.isGroup,connectionStatus:t.connectionStatus}}),ln.a),n=sc(),{canTogglePanel:r,isActive:a,togglePanel:s}=Da(),{spec:o,logger:l}=(0,Hi.r)(ls.p,{}),c=(0,b.useCallback)((()=>{const{interactionId:e}=l.logInteraction(cs(o,i,a));s(e)}),[i,s,a,o,l]),{currentDevice:d}=Jl(),{isLocal:m}=d,p=(0,b.useMemo)((()=>(0,Ua.tf)(e,t,m?n:null)),[n,m,t,e]);return(0,R.jsx)(Rs,{children:(0,R.jsx)(ai,{isActive:a,disabled:!r,onToggle:c,label:u.Ru.get("playback-control.connect-picker"),icon:p})})};var lc=i(42454),cc=i(84997),uc=i(48697),dc=i(27268);const mc=({variant:e})=>(0,R.jsx)(On.E,{variant:e,semanticColor:"textBase",children:"Spotify"}),pc="A8ETvbaffbfWsxJDy_OW",hc="lptDLEH_2Zz7cogb3WFM",gc=({children:e})=>(0,R.jsxs)("div",{className:pc,children:[(0,R.jsx)(mc,{variant:"bodyMediumBold"}),e]}),fc=({onHide:e})=>{const t=(0,Sr._Y)();return(0,R.jsx)(gc,{children:(0,R.jsxs)("div",{className:hc,children:[(0,R.jsx)(On.E,{variant:"bodyMedium",children:u.Ru.get("web-player.puffin.upsell.enhance-headphones")}),(0,R.jsx)(ei.H,{semanticColor:"textBrightAccent",onClick:()=>{t(Pe.$S.PUFFIN_START_ACTIVATION)},condensedAll:!0,size:"small",children:u.Ru.get("web-player.puffin.upsell.enhance-headphones.confirm")}),(0,R.jsx)(ei.H,{semanticColor:"textSubdued",onClick:e,condensedAll:!0,size:"small",children:u.Ru.get("web-player.puffin.upsell.enhance-headphones.cancel")})]})})};var vc=i(92601);const yc=()=>{const{deviceFilterState:{audioDevice:e}}=(0,vc.j)();if(!e)return null;const t=e.transportType===Es.Yg.BLUETOOTH?e.name:u.Ru.get("web-player.puffin.wired-connection");return(0,R.jsx)(gc,{children:(0,R.jsx)(On.E,{variant:"bodyMedium",children:u.Ru.get("web-player.puffin.upsell.optimized-for",t)})})},bc=({hasDevice:e})=>(0,Ja.l)()?(0,R.jsx)(gc,{children:(0,R.jsx)(On.E,{variant:"bodyMedium",children:u.Ru.get("web-player.puffin.upsell.enhanced-listening")})}):e?(0,R.jsx)(gc,{children:(0,R.jsx)(On.E,{variant:"bodyMedium",children:u.Ru.get("web-player.puffin.upsell.enhanced-headphones")})}):(0,R.jsx)(gc,{children:(0,R.jsx)(On.E,{variant:"bodyMedium",children:u.Ru.get("web-player.puffin.upsell.lossless-listening")})}),_c=({state:e,hasDevice:t,onHide:i})=>{switch(e){case"detection":return(0,R.jsx)(fc,{onHide:i});case"initial":return(0,R.jsx)(bc,{hasDevice:t});case"filters_applied":return(0,R.jsx)(yc,{});default:(0,q.k)(e)}return null};var Ec=i(55615);const Cc="s9EUkl_ksGpnm59kFasZ",xc=({children:e,onVisibilityChange:t})=>{const{isPuffinPanelActive:i}=(0,Ec.c)(),[n,r]=(0,b.useState)("none"),[a,s]=(0,Ss.x)("onboarding-dismissed:puffin",{}),{deviceFilterState:o,isMaybeHeadphoneDevice:l}=(0,vc.j)(),c=(0,b.useRef)(o.audioDevice),u=(0,Ye.N)().getSavedDevices().length>0;(0,b.useEffect)((()=>{if(o.audioDevice&&c.current?.id!==o.audioDevice.id){if(c.current=o.audioDevice,i||o.audioDevice.terminalType!==Es.FI.HEADPHONES)return;a[o.audioDevice.id]&&!(a[o.audioDevice.id]<3)||o.isOnboarded?(o.currentState.externalizationEnabled||o.currentState.specificEnabled)&&r("filters_applied"):(a[o.audioDevice.id]||s({...a,[o.audioDevice.id]:0}),r("detection"))}}),[o,a,i,c,s]);const d=(0,b.useCallback)((()=>{r("none")}),[]),m=(0,b.useCallback)((()=>{if(null!==o.audioDevice){const{id:e}=o.audioDevice;s({...a,[e]:(a[e]??0)+1})}}),[o.audioDevice,a,s]);(0,b.useEffect)((()=>{if("detection"!==n){const e=setTimeout(d,5e3);return()=>clearTimeout(e)}return()=>{}}),[d,n]),(0,b.useEffect)((()=>{u||a||r("initial")}),[u,a,r]),(0,b.useEffect)((()=>{!i&&l||d()}),[d,i,s,l]);const p="none"!==n;return(0,b.useEffect)((()=>{t(p)}),[p,t]),(0,R.jsx)(uc.W,{placement:"topStart",hideCloseButton:!0,overlay:p&&(0,R.jsx)(dc.A,{role:"alertdialog",arrow:"bottomEnd",colorSet:"invertedLight",className:Cc,onClose:d,children:(0,R.jsx)(_c,{state:n,hasDevice:l,onHide:()=>{m(),d()}})}),children:e})};var Sc=i(87178);const Ac=Pe.$S.PUFFIN_BUTTON_CLICK,Tc=Pe.$S.DEVICE_PICKER_BUTTON_CLICK,Ic=()=>{const{togglePuffin:e,isPuffinPanelActive:t}=(0,Sc.c)(),{isActive:i,panelSend:n}=(0,Sr.AI)(Ar.Z.DevicePicker,Ar.Z.DevicePickerOverlay),[r,a]=(0,b.useState)(!1),o=(0,Sr.Ev)(Ac),l=(0,s.NC)(Ce.VUN),{remoteDeviceType:c,remoteDeviceisGroup:d}=(0,ca.v)((e=>{const t=(0,Ja.V)(e);return{remoteDeviceType:t.remoteDevice?.type,remoteDeviceisGroup:t.remoteDevice?.isGroup}}),ln.a),m=sc(),p=m?.audioDevice.terminalType===Es.FI.HEADPHONES,h=(()=>{const{deviceFilterState:e}=(0,vc.j)();return e.currentState.externalizationEnabled||e.currentState.specificEnabled})(),g=l&&i||t,f=h||p,{currentDevice:v}=Jl(),{isLocal:y}=v,_=(0,b.useMemo)((()=>h?lc.C:l?(0,Ua.tf)(c,d,y?m:null):cc.r),[m,h,l,d,c,y]);return(0,R.jsx)(Rs,{disabled:r,children:(0,R.jsx)(xc,{onVisibilityChange:a,children:(0,R.jsx)(ai,{isActive:g,isActiveNoIndicator:f,onToggle:l?()=>{const e=i;n(Tc),e||(0,La.I)("DEVICE-PICKER")}:e,label:l?u.Ru.get("playback-control.connect-picker"):u.Ru.get("web-player.puffin.button.enhanced-listening"),icon:_,disabled:!o,restoreFocusKey:t?Ar.Z.Puffin:Ar.Z.DevicePicker})})})};var Nc=i(74494);const wc=()=>{const e=(0,Ye.N)(),t="1"===(0,Nc.$)("is-puffin");return e.isAvailable()&&t};var Rc=i(7939);const kc=()=>{const{isAnonymous:e}=(0,g.d4)(Rc.Ht),t=wc();return e?null:(0,R.jsx)(ss.u,{property:Ce.VUN,renderNewExperience:()=>t?(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(Ic,{})}):(0,R.jsx)(oc,{}),renderOldExperience:()=>(0,R.jsxs)(R.Fragment,{children:[t&&(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(Ic,{})}),(0,R.jsx)(nc,{})]})})};var Oc=i(86171);const Pc=b.memo((function(e){const{onClick:t}=e,i=(0,oe.zy)(),n=(0,gi.o)((e=>e?.item?.uri)),r="/lyrics"===i.pathname;return(0,Oc.f)(n).hasLyrics||r?(0,R.jsx)(ai,{className:e.className,isActive:r,onToggle:t,label:u.Ru.get("web-player.lyrics.title"),testId:"lyrics-button",icon:Xt.q}):null})),Lc=({onClick:e,className:t})=>{const{isAnonymous:i}=(0,g.d4)(Rc.Ht),{toggleLyrics:n}=yr({onChange:e,referrer:"now_playing_bar"}),r=(0,gi.o)((e=>!!e?.item?.metadata?.["segment.index"]));return i||r?null:(0,R.jsx)(Pc,{onClick:n,className:t})};var jc=i(101),Dc=i(59189),Mc=i(75560),Uc=i(60674),Bc=i(13874);const Fc={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)",lyricsCinemaVisible:"sgQuNaOh5Eu6vnzh3eoh",nonDisplayedArea:"KJNUWtMTBWtQrmsas64b",Container:"F3qS5Fne4ECzEWyFeJ5S",Controls:"dS_1_x4lBrx_vX9AMg6Q",Content:"mC8gFZzy9ZRO5c61MeuO"};function Hc(){const e=(0,g.d4)(Mc.u),t=(0,g.wA)(),{setYlxSidebarState:i}=(0,Uc.$)(),{mainLandmarkRef:n,lyricsCinemaRef:r}=(0,lr.JT)(),{isActive:a,panelSend:s}=(0,Sr.AI)(Ar.Z.NowPlayingView);return{mode:e,setMode:(0,b.useCallback)((e=>{e===Bc.YU.cinema&&a?(r.current?.classList.add(Fc.lyricsCinemaVisible),n.current?.classList.add(Fc.nonDisplayedArea),i(Uc.fX.COLLAPSED),s(Pe.$S.NPV_BUTTON_CLICK)):(r.current?.classList.remove(Fc.lyricsCinemaVisible),n.current?.classList.remove(Fc.nonDisplayedArea),a||s(Pe.$S.NPV_BUTTON_CLICK)),t((0,Dc.gh)(e))}),[t,s,a,r,n,i])}}var Vc=i(6936),Gc=i.n(Vc),zc=i(89199);const Wc="Cffu0OWzcoGaMWSXoGsq",Kc="L5PLOiBhdFNjs4FEu8ln",Yc=Date.now()-6912e5,qc=b.memo((function({children:e}){const[t,i]=(0,b.useState)(!1),[n,r]=(0,Ss.x)("npv-onboarding-dismissed-time",Yc),[a,s]=(0,Ss.x)("npv-onboarding-never-show-again",!1),o=(0,b.useCallback)((()=>{zc.h.set((()=>({triggerId:null,triggerAction:null}))),r(Date.now()),s(t)}),[t,r,s]),l=(0,b.useCallback)((e=>{const t=e.currentTarget.checked;i(t)}),[]),c=Gc()(u.Ru.get("web-player.now-playing-view.onboarding.description"),{transform:{b:e=>(0,R.jsx)(On.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:e.children})}});return(0,R.jsx)(zc.U,{id:"npv-onboarding",className:Wc,options:{isCTA:!0,getTitle:()=>u.Ru.get("web-player.now-playing-view.onboarding.title"),getDescription:()=>c,primaryButtonText:()=>u.Ru.get("web-player.now-playing-view.onboarding.dismiss"),checkboxText:()=>u.Ru.get("web-player.now-playing-view.onboarding.do-not-show-again"),placement:"top-end",tippyWrapperClassName:Kc,shouldHideOnOutsideClick:()=>!1},onPrimaryButtonClick:o,onCheckboxClick:l,children:e})})),Zc=Pe.$S.NPV_BUTTON_CLICK,$c=({onClick:e})=>{const{isActive:t,panelSend:i}=(0,Sr.AI)(Ar.Z.NowPlayingView),n=(0,Sr.Ev)(Zc),{mode:r,setMode:a}=Hc(),{item:s}=(0,gi.o)((e=>({item:e?.item})),((e,t)=>e.item?.uri===t.item?.uri)),o=!s||!n;return(0,R.jsx)(qc,{children:(0,R.jsx)(ai,{isActive:t,disabled:o,onToggle:()=>{e?.(!t),i(Zc),r===Bc.YU.cinema&&a(Bc.YU.npv)},icon:jc.d,label:u.Ru.get("web-player.now-playing-view.label"),testId:"control-button-npv",restoreFocusKey:Ar.Z.NowPlayingView})})};var Qc=i(10543),Jc=i(35293),Xc=i(72953),eu=i(36921),tu=i(11898),iu=i(67196);const nu=({uri:e,to:t,children:i,onDrop:n,onNavigate:r,className:a})=>{const[s,o]=(0,b.useState)(!1),l=(0,b.useRef)(null),c=(0,oe.Zp)(),u=(0,g.wA)(),d=(0,tu.f)(),m=(0,iu.g)(),p=(0,D.z)(),h=function(e){const t=(0,ne.o_)(e),i=(0,g.d4)(Rc.F6);switch(t?.type){case ne.NQ.PLAYLIST:case ne.NQ.PLAYLIST_V2:{let e;if((0,ne.iw)(t)&&(e=t.username),i&&e===i)return[eu.Ay[ne.NQ.TRACK],eu.Ay[ne.NQ.LOCAL],eu.Ay[ne.NQ.ALBUM]];break}case ne.NQ.COLLECTION:return[eu.Ay[ne.NQ.TRACK],eu.Ay[ne.NQ.ALBUM],eu.Ay[ne.NQ.ARTIST],eu.Ay[ne.NQ.PLAYLIST],eu.Ay[ne.NQ.PLAYLIST_V2],eu.Ay[ne.NQ.SHOW]];case ne.NQ.QUEUE:return[eu.Ay[ne.NQ.TRACK],eu.Ay[ne.NQ.LOCAL],eu.Ay[ne.NQ.EPISODE]];default:return[]}return[]}(e),f=!!h.length;return(0,b.useEffect)((()=>(s?l.current=window.setTimeout((()=>{(0,ne.U_)(e)||(r?.(),c(t||(0,ne.o_)(e).toURLPath(!0)))}),1e3):!s&&l.current&&clearTimeout(l.current),()=>{l.current&&clearTimeout(l.current)})),[s,e,t,r,c]),f?(0,R.jsx)(Xc.A,{types:h,onDrop:t=>{const i=(0,ne.o_)(e),r=Array.from(t.dataTransfer.types).find((e=>h.includes(e))),a=r&&t.dataTransfer.getData(r),s=a&&a.split("\n")[0],o=(0,ne.o_)(s);if(o&&i)switch(n?.(o.toURI()),i.type){case ne.NQ.PLAYLIST:case ne.NQ.PLAYLIST_V2:u((0,Jc.io)(e,[o.toURI()]));break;case ne.NQ.COLLECTION:(0,ne._T)(o)||(0,ne.ec)(o)||(0,ne.U_)(o)?d.add({uris:[o.toURI()]}):(0,ne.tb)(o)?m.add([o.toURI()],{before:"start"}):(0,ne.WB)(o)&&d.add({uris:[o.toURI()]});break;case ne.NQ.QUEUE:p.addToQueue([{uri:o.toURI(),uid:null}])}},onDragEnter:()=>{o(!0)},onDragLeave:()=>{o(!1)},className:a,children:i}):(0,R.jsx)("div",{children:i})};function ru({style:e,active:t,disabled:i,intent:n,label:r,labelActive:a,icon:s,iconActive:o,className:l,onClick:c}){const[u,d]=(0,b.useState)(!1),m=(0,an.W)(),p=t&&a?a:r,h=t&&o?o:s;return(0,R.jsx)(ai,{style:e,className:l,isActive:t,disabled:i,onToggle:e=>{c?.(),u||e.target.blur(),d(!1),n&&m({type:"click",intent:n,targetUri:""})},onKeyDown:({key:e})=>{"enter"===e.toLowerCase()&&d(!0)},label:p,icon:h,testId:`control-button-${n}`})}var au=i(51154);const su=()=>{const{isAnonymous:e}=(0,g.d4)(Rc.Ht),{videoPlayerMode:t}=(0,ji.d)();return e||"cinema"===t?{isVisible:!1}:{isVisible:!0,isEnabled:!0}},ou=({onClick:e})=>{const{isEnabled:t,isVisible:i}=su(),n=(0,oe.zy)(),r=(0,au.J)(),a=(0,oe.Zp)(),s=(0,b.useMemo)((()=>"/queue"===n.pathname||"/history"===n.pathname),[n.pathname]),o=(0,b.useCallback)((()=>{const t=r.entries?.slice(0,r.index+1)?.reverse()?.findIndex((({pathname:e})=>"/queue"!==e&&"/history"!==e));e({mode:"main",route:null}),a(-1===t?"/":t>=0?-t:-1)}),[a,r,e]),l=(0,b.useCallback)((()=>{e({mode:"main",route:"/queue"}),a("/queue",{state:{referrer:"now_playing_bar"}})}),[e,a]),c=(0,b.useCallback)((()=>{t&&(s?o():l())}),[t,s,o,l]);return i?(0,R.jsx)(nu,{uri:"spotify:queue",children:(0,R.jsx)(ru,{intent:"queue",icon:Qc.j,label:u.Ru.get("playback-control.queue"),onClick:c,active:s,disabled:!t})}):null},lu=Pe.$S.QUEUE_BUTTON_CLICK,cu=({onClick:e})=>{const{isEnabled:t,isVisible:i}=su(),n=(0,Sr.Ev)(lu),{isActive:r}=(0,Sr.AI)(Ar.Z.Queue,Ar.Z.QueueOverlay),{toggleQueue:a}=(0,za.R)(),s=(0,b.useCallback)((()=>{t&&(e({mode:"panel",aboutToShow:!r}),a())}),[t,e,r,a]);return i?(0,R.jsx)(nu,{uri:"spotify:queue",children:(0,R.jsx)(ai,{icon:Qc.j,label:u.Ru.get("playback-control.queue"),onToggle:s,isActive:r,disabled:!t||!n,testId:"control-button-queue",restoreFocusKey:Ar.Z.Queue})}):null},uu=({onClick:e})=>(0,s.NC)(Ce.eWj)?(0,R.jsx)(cu,{onClick:e}):(0,R.jsx)(ou,{onClick:e});var du=i(99307);const mu=({onClick:e})=>{const{item:t}=(0,du.L)()??{},{isActive:i,onClick:n,showButton:r}=(0,xr.D)({item:t,onClick:e});return t&&r?(0,R.jsx)(ai,{isActive:i,onToggle:n,label:i?u.Ru.get("miniplayer.close"):u.Ru.get("miniplayer.open"),icon:ur.F,testId:"pip-toggle-button"}):null};var pu=i(48169),hu=i(2983);const gu="main-nowPlayingBar-extraControls",fu="main-nowPlayingBar-lyricsButton",vu="main-nowPlayingBar-volumeBar",yu=()=>{const e=(0,s.NC)(Ce.yux),{setVideoPlayerUIFlag:t,videoPlayerMode:i}=(0,ji.d)(),{spec:n,logger:r,UBIFragment:a}=(0,Hi.r)(Dt.h9,{data:{identifier:i===B.K.cinema?Dt.gw.CINEMA:Dt.gw.DESKTOP}}),o=(0,nn.YQ)((e=>{r.logInteraction(n.volumeBarFactory().dragSetVolume({newVolumePercentage:Math.floor(100*e)}))}),500,{leading:!1,trailing:!0}),l=(0,b.useCallback)((e=>{e&&t(B.n.cinema,!1)}),[t]);return(0,R.jsx)(a,{spec:n,children:(0,R.jsxs)("div",{className:gu,children:[(0,R.jsx)(hu.mA,{onClick:()=>{r.logInteraction(n.djJumpButtonFactory().hitRefreshContent())}}),(0,R.jsx)($c,{onClick:e=>{e?r.logInteraction(n.npvButtonFactory().hitUiReveal()):r.logInteraction(n.npvButtonFactory().hitUiHide())}}),!e&&(0,R.jsx)(Lc,{className:fu,onClick:e=>{e?r.logInteraction(n.lyricsButtonFactory().hitUiNavigate({destination:e})):r.logInteraction(n.lyricsButtonFactory().hitUiNavigateBack())}}),(0,R.jsx)(uu,{onClick:e=>{"main"===e.mode?e.route?r.logInteraction(n.queueButtonFactory().hitUiNavigate({destination:e.route})):r.logInteraction(n.queueButtonFactory().hitUiNavigateBack()):e.aboutToShow?r.logInteraction(n.queueButtonFactory().hitUiReveal()):r.logInteraction(n.queueButtonFactory().hitUiHide())}}),(0,R.jsx)(kc,{}),(0,R.jsx)(pu.M,{className:vu,onVolumeBarClick:e=>{r.logInteraction(n.volumeBarFactory().hitSetVolume({newVolumePercentage:Math.floor(100*e)}))},onToggleMuteClick:e=>{"muted"===e?r.logInteraction(n.volumeMuteButtonFactory().hitMutePlayback()):"not_muted"===e&&r.logInteraction(n.volumeMuteButtonFactory().hitUnmutePlayback())},onVolumeBarDrag:o}),(0,R.jsx)(mu,{onClick:l}),(0,R.jsx)(as,{className:"control-button",disabledClassName:"control-button--disabled",onClick:e=>{e&&r.logInteraction(n.fullscreenButtonFactory().hitUiReveal())}})]})})};var bu=i(37582),_u=i(71817);const Eu="yyrJTUPMeLS8qs1a0YJr",Cu=({logoUrl:e})=>e?(0,R.jsx)("div",{className:Eu,"":"context-ad-logo",children:(0,R.jsx)(bu.N,{loading:"eager",imgSrc:e,width:56,height:56,type:_u.c.AD})}):null;var xu=i(10642),Su=i(10354);const Au=({item:e,context:t,index:i})=>{const{logoImage:n}=(0,xu.iz)(e);return(0,R.jsx)(Su.e,{item:e,context:t,index:i,"aria-label":u.Ru.get("ad-formats.advertisement"),adEventReason:Qr.c.AD_LOGO,isVisible:!1,children:(0,R.jsx)(Cu,{logoUrl:n})})};var Tu=i(62720);const Iu=b.memo((function({uri:e,className:t,onClick:i,size:n=ci.t.xs}){const[r,a]=(0,Tu.A)(e),s=(0,an.W)(),o=(0,b.useCallback)((t=>{t.preventDefault(),s({targetUri:e,intent:r?"remove-from-library":"add-to-library",type:"click"}),i&&i(!r),a(!r)}),[s,e,r,i,a]);return(0,R.jsx)(ci.M,{className:t,size:n,onClick:o,isAdded:!!r,isAudiobook:!0,condensed:!0})}));var Nu=i(7571);const wu=({uri:e,isBook:t=!1,size:i=ci.t.xs,className:n,onClick:r})=>{const{isPreSaved:a,addPresave:s,removePresave:o}=(0,Nu.w)({uri:e,isBook:t}),l=(0,b.useCallback)((()=>{a?o():s(),r?.(!a)}),[a,r,o,s]);return(0,R.jsx)(ci.M,{className:n,size:i,onClick:l,isAdded:!!a,isAudiobook:!0,condensed:!0})};var Ru=i(44694),ku=i(65500),Ou=i(91573),Pu=i(49502),Lu=i(54015),ju=i(80243),Du=i(16337),Mu=i(36321);function Uu(e){return(0,K.v)(e)||(0,W.p)(e)}var Bu=i(14627);const Fu="main-nowPlayingWidget-nowPlaying",Hu="main-coverSlotCollapsed-navAltContainer",Vu="main-nowPlayingWidget-coverArt",Gu="main-nowPlayingWidget-trackInfo",zu="HD9s7U5E1RLSWKpXmrqx",Wu=({onClick:e})=>{const t=(0,du.L)(),{draggable:i,onDragStart:n}=(0,Bu.P)(),{isActive:r,panelSend:a}=(0,Sr.AI)(Ar.Z.NowPlayingView);if(null===t)return null;const{context:s,item:o}=t,l=Pe.$S.NPV_BUTTON_CLICK;return(0,R.jsx)(el.h,{menu:(0,R.jsx)(ju.W,{context:s,item:o}),children:(0,R.jsx)("div",{draggable:i&&Uu(o),onDragStart:e=>{n(e,{itemUris:[o.uri],dragLabelText:(0,Mu.r)(o)})},children:(0,R.jsx)(Du.R,{uri:s.uri,owner:s.metadata?.context_owner,children:(0,R.jsx)("button",{type:"button","":"cover-art-button",className:zu,"aria-label":u.Ru.get("web-player.now-playing-view.label"),onClick:()=>{a(l),e?.(r)},children:(0,R.jsx)(Lu.b,{item:o,size:56,maxSize:56,className:Vu})})})})})};var Ku=i(92808),Yu=i(31323);const qu="main-coverSlotCollapsed-container",Zu="main-coverSlotCollapsed-expandButton",$u=Pe.$S.NPV_BUTTON_CLICK,Qu=({children:e,className:t})=>{const i=(0,Sr.Ev)($u),{isActive:n}=(0,Sr.AI)(Ar.Z.NowPlayingView),r=(0,Sr._Y)(),a=(0,b.useMemo)((()=>n?{label:u.Ru.get("npb.collapseCoverArt"),Icon:Yu.r}:{label:u.Ru.get("npb.expandCoverArt"),Icon:Ku.o}),[n]);return(0,R.jsxs)("div",{"":"CoverSlotCollapsed__container",className:At()(qu,t),children:[e,(0,R.jsx)(ti.Zp,{label:a.label,children:(0,R.jsx)("button",{className:At()(Zu),disabled:!i,onClick:()=>{r($u)},"aria-label":u.Ru.get("web-player.now-playing-view.label"),"aria-pressed":n,children:(0,R.jsx)(a.Icon,{iconSize:16})})})]})};var Ju=i(55571),Xu=i(32753),ed=i(87832);var td=i(5159),id=i(10115),nd=i(471),rd=i(30270);const ad=({context:e,item:t,onLike:i})=>{const n=(0,nd.X)(),r=(0,ku.v)(t);if(n&&(0,id.N)(t))return(0,R.jsx)(td.o,{contextUri:t.metadata?.context_uri??e.uri,id:t.uid??void 0,uri:t.uri,isActive:!0});if(r)return(0,R.jsx)(Ru.g,{uri:t.uri,condensed:!1});if((0,K.v)(t))return t.isLocal?null:(0,R.jsx)(di.b,{uri:t.uri,className:"control-button control-button-heart",onClick:i});if((0,W.p)(t))return(0,R.jsx)(ui.b,{uri:t.uri,className:"control-button control-button-heart",onClick:i,condensed:!0});if((0,z.d)(t)){return"trailer"===t?.metadata?.type&&"true"===t?.metadata?.is_pre_release?(0,R.jsx)(wu,{uri:t.book.uri,isBook:!0,className:"control-button control-button-heart",onClick:i}):(0,R.jsx)(Iu,{uri:t.book.uri,className:"control-button control-button-heart",onClick:i})}return(0,G.N)(t)||(0,Y.v)(t)?null:(0,q.d)(t)},sd=({state:{item:e,context:t,index:i}})=>{!function(e){const t=(0,ed.i)(),i=(0,Xu.X)(e);(0,b.useEffect)((()=>{i&&t.say(i)}),[i,t])}(e);const{videoPlayerMode:n,setVideoPlayerUIFlag:r}=(0,ji.d)(),{spec:a,logger:o}=(0,Hi.r)(Mt.p6,{data:{identifier:n===B.K.cinema?Mt.gw.CINEMA:Mt.gw.DESKTOP}}),l=(0,Xu.P)(e),c=(0,s.NC)(Ce.WAA),u=(0,Yn.w)(e);(0,b.useEffect)((()=>{r(B.n.nowPlayingBar,c)}),[c,r]);const d=n===B.K.nowPlayingBar&&c,m=(0,rd.xF)(e.uri);return(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsxs)("div",{"":"now-playing-widget",className:Fu,role:"contentinfo","aria-label":l,children:[u?(0,R.jsx)(Au,{item:e,context:t,index:i}):(0,R.jsxs)(Qu,{className:Hu,children:[!d&&(0,R.jsx)(Wu,{onClick:t=>{t?o.logInteraction(a.coverartFactory({uri:e.uri}).hitUiReveal()):o.logInteraction(a.coverartFactory({uri:e.uri}).hitUiHide())}}),c&&(0,R.jsx)("div",{id:"VideoPlayerNpb_ReactPortal"})]}),(0,R.jsx)(Ou.d,{context:t,className:Gu,item:e,size:"xsmall",enableVideoButton:!0,onTitleClick:t=>{o.logInteraction(a.titleFactory({uri:e.uri}).hitUiNavigate({destination:t||""})),e.type===_u.c.TRACK&&m({categoryAndAction:rd.Mu.NowPlayingBar,destinationUrl:(0,ne.o_)(t)?.toURL()})},onSubtitleClick:t=>{o.logInteraction(a.subtitleFactory({uri:e.uri}).hitUiNavigate({destination:t||""}))},referrer:Pu.G.NPB}),(0,R.jsx)(Ju.a,{context:t,item:e,onClick:()=>{o.logInteraction(a.hideButtonFactory().hitRemoveRecommendation({recommendedItemUri:e.uri,contextUri:t.uri}))}}),(0,R.jsx)(on.r,{spec:a,children:(0,R.jsx)(ad,{item:e,onLike:t=>{o.logInteraction(t?a.likeButtonFactory({uri:e.uri}).hitLike({itemToBeLiked:e.uri}):a.likeButtonFactory({uri:e.uri}).hitRemoveLike({itemNoLongerLiked:e.uri}))},context:t})})]})})},od=()=>{const e=(0,du.L)();return null===e?(0,R.jsx)("div",{className:At()("now-playing")}):(0,R.jsx)(sd,{state:e})};var ld=i(6200);const cd="aguQsGoZR9wZeawKGdDh",ud="ieqOSqJb6kk3bG5XDOHk",dd=({paused:e,fromSeconds:t})=>{const[i,n]=(0,b.useState)(t);return(0,ld.$)((t=>{n((i=>e?i:i>0?i-1:(t(),i)))}),1e3),(0,R.jsxs)("div",{className:cd,children:[u.Ru.get("ad-formats.skippable_ads.skip_countdown"),(0,R.jsx)("span",{className:ud,children:i})]})};var md=i(49493);const pd=({children:e})=>{const t=(0,gi.o)((e=>e),((e,t)=>(0,ln.a)(e?.restrictions,t?.restrictions)&&e?.item?.uri===t?.item?.uri&&e?.isPaused===t?.isPaused)),i=t?.restrictions.disallowSkippingNextReasons.includes("ad_disallow"),n=t?.isPaused??!1,r=(0,md.qc)(t),a=(0,md.Tv)(t),s=(0,g.d4)((e=>r?e?.ads?.audio?.info?.skippableAdDelaySeconds:a?e?.ads?.vto?.info?.skippableAdDelaySeconds:void 0));return i&&s?(0,R.jsx)(dd,{paused:!!n,fromSeconds:s}):(0,R.jsx)(R.Fragment,{children:e})};var hd=i(33440),gd=i(27481),fd=i(6612),vd=i(17580),yd=i(59783),bd=i(19558),_d=i(84019),Ed=i(63449),Cd=i(31570);const xd="player-controls",Sd="player-controls__buttons",Ad="player-controls__left",Td="player-controls__right",Id=(0,b.memo)((function({item:e}){const t=e.isPodcastAd;return(0,R.jsxs)("div",{"":"ad-controls",className:Sd,children:[(0,R.jsxs)("div",{className:Ad,children:[t&&(0,R.jsx)(Cd.w,{}),(0,R.jsx)(fd.T,{item:e}),t?(0,R.jsx)(yd.h,{}):(0,R.jsx)(_d.d,{})]}),(0,R.jsx)(vd.x,{}),(0,R.jsxs)("div",{className:Td,children:[t?(0,R.jsx)(bd.v,{}):(0,R.jsx)(pd,{children:(0,R.jsx)(Ed.$,{})}),(0,R.jsx)(gd.t,{item:e})]})]})}));var Nd=i(39877),wd=i(76576),Rd=i(53830);const kd=(0,b.memo)((function({isPreview:e}){const t=(0,D.z)(),{videoPlayerMode:i}=(0,ji.d)(),{spec:n,logger:r}=(0,Hi.r)(Pt.kD,{data:{identifier:i===B.K.cinema?Pt.gw.CINEMA:Pt.gw.DESKTOP}}),a=(0,gi.o)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri)),s=(0,Yn.w)(a),o=fi(),l=(0,b.useCallback)(((e,t)=>{switch(t){case"drag":return r.logInteraction(n.progressBarFactory().dragSeekToTime({msToSeekTo:e}));case"hit":return r.logInteraction(n.progressBarFactory().hitSeekToTime({msToSeekTo:e}));default:return(0,q.k)(t)}}),[r,n]);return(0,R.jsxs)("div",{className:xd,"":"player-controls",dir:"ltr","aria-label":u.Ru.get("playback-control.a11y.landmark-label"),children:[s?(0,R.jsx)(Id,{item:a}):(0,R.jsxs)("div",{className:Sd,"":"general-controls",children:[(0,R.jsxs)("div",{className:Ad,children:[o&&(0,R.jsx)(Cd.w,{onClick:e=>{const i=t.getState();i?.item&&r.logInteraction(n.speedControlButtonFactory().hitSetPlaybackSpeed({currentlyPlayedItem:i.item.uri,playbackSpeed:e}))}})," ",!o&&(0,R.jsx)(bi.w,{renderEnabled:()=>(0,R.jsx)(on.r,{spec:n,children:(0,R.jsx)(yi.a,{size:"small"})}),renderDisabled:()=>(0,R.jsx)(wd.u,{onClick:e=>{r.logInteraction(e?n.shuffleButtonFactory().hitShuffleEnable():n.shuffleButtonFactory().hitShuffleDisable())}})}),o&&(0,R.jsx)(yd.h,{onClick:e=>{r.logInteraction(n.seekBackButtonFactory().hitSeekByTime({msSeekedOffset:e}))}}),(0,R.jsx)(_d.d,{onClick:()=>{const e=t.getState();e&&r.logInteraction(n.previousButtonFactory().hitSkipToPrevious({itemToBeSkipped:e.item?.uri||"",positionMs:(0,Rd.s)(e)??-1,totalContentMs:e.duration??-1}))}})]}),(0,R.jsx)(vd.x,{onClick:e=>{const i=t.getState();i?.item&&("resume"===e?r.logInteraction(n?.playPauseButtonFactory().hitResume({itemToBeResumed:i.item.uri})):"pause"===e&&r.logInteraction(n?.playPauseButtonFactory().hitPause({itemToBePaused:i.item.uri})))}}),(0,R.jsxs)("div",{className:Td,children:[(0,R.jsx)(pd,{children:(0,R.jsx)(Ed.$,{onClick:()=>{const e=t.getState();e?.item&&r.logInteraction(n.nextButtonFactory().hitSkipToNext({itemToBeSkipped:e.item.uri,positionMs:(0,Rd.s)(e)??-1,totalContentMs:e.duration??-1}))}})}),o&&(0,R.jsx)(bd.v,{onClick:e=>{r.logInteraction(n.seekForwardButtonFactory().hitSeekByTime({msSeekedOffset:e}))}}),!o&&(0,R.jsx)(Nd.s,{onClick:e=>{const t={[Ki.p.REPEAT_NONE]:n.repeatButtonFactory().hitRepeatDisable(),[Ki.p.REPEAT_TRACK]:n.repeatButtonFactory().hitRepeatOneEnable(),[Ki.p.REPEAT_CONTEXT]:n.repeatButtonFactory().hitRepeatEnable()};r.logInteraction(t[e])}})]})]}),(0,R.jsx)(hd.x,{isPreview:e,onChange:l})]})}));var Od=i(67848),Pd=i(21056),Ld=i(62733);const jd="main-nowPlayingBar-container",Dd="main-nowPlayingBar-nowPlayingBar",Md="MWD1i_CSJ5N9wRBDpZmX",Ud="k3NVrHXkbfflNdAxpT1_",Bd="m8UPWsNtWbdkvBNvqgBN",Fd="aepuRyT82biv_XmkH1eS",Hd="main-nowPlayingBar-left",Vd="main-nowPlayingBar-center",Gd="main-nowPlayingBar-right",zd=()=>{const{isAnonymous:e}=(0,g.d4)(Rc.Ht),t=(0,g.wA)(),i=(0,an.W)(),n=(0,gi.o)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.item?.uri===t?.item?.uri)),r=(0,gi.o)((e=>(0,G.N)(e?.item??void 0))),a=(0,D.z)(),s=(0,Od.U)();(0,b.useEffect)((()=>{a.setForcedShuffle(s)}),[s,a]);const o=(0,b.useCallback)((e=>{e.stopPropagation(),t((0,Ta.Ai)()),i({intent:"signup",type:"click"})}),[t,i]),l=()=>(0,R.jsx)(qr.ql.Provider,{value:"now_playing_bar",children:(0,R.jsxs)("div",{className:e?Md:Dd,children:[(0,R.jsx)("div",{className:Hd,children:(0,R.jsx)(od,{})}),(0,R.jsx)("div",{className:Vd,children:(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(kd,{isPreview:e})})}),(0,R.jsx)("div",{className:Gd,children:(0,R.jsx)(yu,{})})]})});return(0,R.jsx)(Ld.P,{surface:Pd.u.NOW_PLAYING,children:(0,R.jsx)(Ri.pZ,{value:"now-playing-bar",children:(0,R.jsxs)("footer",{className:jd,"":"now-playing-bar","data-testadtype":"ad-type-"+(r?"ad":"none"),children:[e?(0,R.jsx)(Ri.pZ,{value:"preview-bar",children:(0,R.jsx)(ka,{handleClick:o})}):null,e?(0,R.jsx)(va.A,{in:n?.hasContext??!1,timeout:200,classNames:{enter:Ud,enterActive:Bd,enterDone:Fd},children:l()}):l(),(0,R.jsx)(ns,{})]})})})};var Wd=i(43058),Kd=i(25297),Yd=i(34122),qd=i(73075),Zd=i.n(qd),$d=i(91969),Qd=function(e){return e[e.DOWN=-1]="DOWN",e[e.NONE=0]="NONE",e[e.UP=1]="UP",e}(Qd||{});const Jd=10,Xd=({cssCustomProperty:e,min:t,max:i,ranges:n=("number"==typeof t&&"number"==typeof i?[[t,i]]:[]),value:r,initialValue:a,onCSSPropertyChange:s,label:o,placement:l,elementRef:c,decreaseSizeKeyboardCombination:u,increaseSizeKeyboardCombination:d,afterResizing:m})=>{const[p,h]=(0,b.useState)(!1),g=(0,b.useRef)(s);g.current=s;const[f,v]=(0,b.useState)((()=>a??parseInt(getComputedStyle(document.documentElement).getPropertyValue(e),10))),y=(0,b.useRef)(0);y.current=f;const _=(0,so.W)(),E=(0,b.useCallback)(((e,t=Qd.NONE)=>{if(n.some((([t,i])=>t<=e&&e<=i)))return e;switch(t){case Qd.NONE:{const[t,i]=n.slice().sort((([t,i],[n,r])=>Math.min(Math.abs(t-e),Math.abs(i-e))-Math.min(Math.abs(n-e),Math.abs(r-e))))[0];return e<t?t:i}case Qd.UP:{const t=n.find((([t],i)=>(n[i-1]?.[1]??0)<e&&e<t)),i=t?.[0];return i?Math.ceil(i/Jd)*Jd:e}case Qd.DOWN:{const t=n.find((([t,i],r)=>{const a=n[r+1]?.[0]??1/0;return i<e&&e<a})),i=t?.[1];return i?Math.floor(i/Jd)*Jd:e}default:return(0,q.k)(t),e}}),[n]),C=(0,b.useCallback)((e=>{if(!c.current)return null;const t=c.current.getBoundingClientRect();return"inline-start"===l?_?e-t.left:t.right-e:"inline-end"===l?_?t.right-e:e-t.left:null}),[l,c,_]),x=(0,b.useRef)(null),S=(0,b.useCallback)((t=>{t!==x.current&&(document.documentElement.style.setProperty(e,`${t}`),x.current=t)}),[e]),A=(0,b.useCallback)(((e,t=!1)=>{if(null==e)return;const i=0!==e||p?Math.trunc(E(e)):0;S(i),v(i),t||g.current?.(i)}),[E,S,p]),T=(0,nn.YQ)(A,50,{leading:!0,maxWait:100});if((0,b.useEffect)((()=>{void 0!==r&&T(r)}),[r,T]),(0,b.useLayoutEffect)((()=>{void 0!==a&&A(a,!0)}),[a,A]),Number.isNaN(f)){const e=(n[0][1]-n[0][0])/2;console.error(`[LayoutResizer] css property value is not a number. Defaulting to ${e}`),A(e)}const I=(0,b.useCallback)((e=>{l.startsWith("inline")?T(C(e.clientX)):T(C(e.clientY))}),[l,T,C]),N=(0,b.useCallback)(((e,t)=>{m?.(e,t)}),[m]),w=(0,b.useCallback)((()=>{const e=y.current;h(!0),document.addEventListener("pointerup",(()=>{h(!1),document.removeEventListener("pointermove",I),N(e,y.current)}),{once:!0}),document.addEventListener("pointermove",I)}),[I,N]);(0,b.useEffect)((()=>(u&&Zd().bind(u,(()=>{A(E(f-Jd,-1))})),d&&Zd().bind(d,(()=>{A(E(f+Jd,1))})),()=>{u&&Zd().unbind(u),d&&Zd().unbind(d)})),[u,E,d,f,A]);const k=n[0][0],O=n[n.length-1][1];return(0,R.jsxs)(R.Fragment,{children:[p&&(0,R.jsx)("div",{className:"LayoutResizer__resize-overlay"}),(0,R.jsx)("div",{"":"LayoutResizer__resize-bar",onPointerDown:w,className:At()("LayoutResizer__resize-bar",{"LayoutResizer__resize-bar--resizing":p,"LayoutResizer__inline-start":"inline-start"===l,"LayoutResizer__inline-end":"inline-end"===l,"LayoutResizer__block-start":"block-start"===l,"LayoutResizer__block-end":"block-end"===l}),onDoubleClick:()=>{const e=n.findIndex((([e])=>e===f)),t=n.findIndex((([e,t])=>t===f));if(-1!==t){const e=n.at(t+1);e&&A(e[0])}else if(-1!==e){const t=n.at(e-1);t&&A(t[1])}},children:(0,R.jsx)($d.o,{className:"LayoutResizer__input",type:"range",min:k,max:O,onChange:function(e){if(p)return;const t=y.current;let i=parseInt(e.target.value,10);i=E(i,Math.sign(i-f)),T(i),N(t,i)},value:r??f,step:Jd,children:o})})]})};var em=i(94010),tm=i(45597);const im=({elementRef:e})=>{const{spec:t,logger:i}=(0,Hi.r)(Kd.j,{data:{identifier:"yourlibraryx"}}),n=(0,Uc.vW)(),{isGridView:r}=(0,tm.t)(),{size:a,setSize:s,minMaxRanges:o}=(0,em.y)(),l=(0,so.W)();let c="default";n===Uc.fX.COLLAPSED?c="collapsed":n===Uc.fX.EXPANDED&&(c=r?"expanded_grid":"expanded_list");const d=(0,b.useCallback)(((e,n)=>{e!==n&&i.logInteraction(t.sidebarFactory({uri:"",identifier:c}).dragUiResize({startSizePx:e,endSizePx:n}))}),[i,c,t]);return(0,R.jsx)(Xd,{elementRef:e,placement:"inline-end",label:u.Ru.get("resize.sidebar"),cssCustomProperty:"--left-sidebar-width",onCSSPropertyChange:e=>{s(e)},initialValue:a,ranges:o,decreaseSizeKeyboardCombination:l?Yd.gO.NPV_SIDEBAR_DECREASE_WIDTH:Yd.gO.YLX_SIDEBAR_DECREASE_WIDTH,increaseSizeKeyboardCombination:l?Yd.gO.NPV_SIDEBAR_INCREASE_WIDTH:Yd.gO.YLX_SIDEBAR_INCREASE_WIDTH,afterResizing:d})},nm={},rm=e=>null===e.match(/\/search\/(\w+|\W+){1,}/gi)?e:"search-result",am=({scrollNodeRef:e,children:t,scrollNodeChildRef:i})=>{const n=(0,b.useRef)(""),r=(0,oe.zy)(),a=(0,oe.wQ)(),s=(0,b.useCallback)((()=>{if(!e.current)return()=>{};const t=rm(r.pathname),i=nm[t];let n;if(i&&"POP"===a){const t=Date.now(),r=()=>{!e.current||Date.now()>t+3e3?clearInterval(n):e.current.scrollHeight>=i+e.current.offsetHeight&&(e.current.scrollTop=i,clearInterval(n))};n=setInterval(r,50),r()}else e.current.scrollTop=0;return()=>{clearInterval(n)}}),[r.pathname,a,e]);(0,b.useMemo)((()=>{if(!e.current)return;const t=rm(n.current);nm[t]=e.current.scrollTop,n.current=r.pathname}),[r.pathname,e]),(0,b.useLayoutEffect)((()=>s()),[r.pathname,s,e]);const o=(0,b.useMemo)((()=>({scrollNodeRef:e,scrollNodeChildRef:i})),[e,i]);return(0,R.jsx)(qr.bi.Provider,{value:o,children:t})};var sm=i(82708),om=i(75621);const lm={isRightSidebarVisible:!0,isNavBarVisible:!0,isNowPlayingBarVisible:!0,isTopBarVisible:!0,isMainViewExpanded:!1},cm=(e,t)=>{switch(t.type){case"resetMainView":return{...e,isRightSidebarVisible:!0,isNavBarVisible:!0,isNowPlayingBarVisible:!0,isTopBarVisible:!0,isMainViewExpanded:!1};case"collapseMainView":return{...e,isRightSidebarVisible:!1,isNavBarVisible:!1,isNowPlayingBarVisible:!1,isTopBarVisible:!1,isMainViewExpanded:!0};default:return e}},um=({children:e})=>{const[t,i]=(0,b.useReducer)(cm,lm),n=(0,b.useMemo)((()=>({...t,resetMainView:()=>i({type:"resetMainView"}),collapseMainView:()=>i({type:"collapseMainView"})})),[t,i]);return(0,R.jsx)(qr.oH.Provider,{value:n,children:e})};var dm=i(60656);const mm=e=>{const t=(0,dm.ZY)()??document;(0,b.useEffect)((()=>{if(!e)return;const i=e=>{const t=e.target;["INPUT","TEXTAREA"].includes(t.tagName)||e.preventDefault()};return t.addEventListener("contextmenu",i),()=>{t.removeEventListener("contextmenu",i)}}),[t,e])};var pm=i(9856),hm=i.n(pm);var gm=i(42750),fm=i(69011),vm=i(97813),ym=i(38710),bm=i(42330),_m=i(56909),Em=i(37929),Cm=i(93159),xm=i(51489);const Sm="YyUcY0HTiYikUOwhh29d",Am=(e,t)=>{if(!t)return null;const i=((e,t)=>{const[i=1,n=0,r=0,a=0]=e.split("."),[s=1,o=0,l=0,c=0]=t.split("."),u=1e9*Number(i)+1e6*Number(n)+1e4*Number(r)+Number(a);return 1e9*Number(s)+1e6*Number(o)+1e4*Number(l)+Number(c)-u})(e,t);return i>=2e4?"negative":i>=1e3?"warning":i>=500?"announcement":null},Tm=()=>{const e=(0,Cm.k)(),t=(0,Em.t)(),i=(0,b.useCallback)((()=>{t.prepareUpdate()}),[t]),n=(0,b.useCallback)((()=>{t.applyUpdate()}),[t]),[r,a]=(0,b.useState)(null),s=e?.version;if((0,b.useEffect)((()=>{t.getVersionInfo().then((e=>{const t=e.containerVersion.split(".");5===t.length&&t.pop(),a(t.join("."))}))}),[t]),e?.state===xm.D.UPDATE_NONE)return null;if(!r||!s)return null;const o=Am(r,s);if(!o)return null;switch(e?.state){case xm.D.UPDATE_AVAILABLE:return(0,R.jsx)(ti.Zp,{label:u.Ru.get("release-notifier.update-available",s),children:(0,R.jsx)(Ln.$,{size:"small",colorSet:o,onClick:i,className:Sm,children:s})});case xm.D.UPDATE_PROCESSING:return(0,R.jsx)(ti.Zp,{label:u.Ru.get("release-notifier.update-processing",s),children:(0,R.jsx)(Ln.$,{size:"small",colorSet:o,disabled:!0,onClick:n,className:Sm,children:s})});case xm.D.UPDATE_READY:return(0,R.jsx)(ti.Zp,{label:u.Ru.get("release-notifier.update-ready",s),children:(0,R.jsx)(Ln.$,{size:"small",colorSet:o,onClick:n,className:Sm,children:s})});default:return null}},Im=()=>{const{settings:e}=(0,_m.t0)();return(0,bm.Q)(e.values)?(0,R.jsx)(Tm,{}):null},Nm=()=>(0,R.jsx)(Im,{});var wm=i(69922),Rm=i(68637),km=i(50668);const Om="400ms",Pm="main-topBarStatusIndicator-TopBarStatusIndicatorContainer",Lm="main-actionButtons-button",jm="main-noConnection-isError",Dm="main-noConnection-isNotice",Mm="main-topBarStatusIndicator-hasTooltip",Um="main-topBarStatusIndicator-tooltipIsError",Bm="main-topBarStatusIndicator-enter",Fm="main-topBarStatusIndicator-enterActive",Hm="main-topBarStatusIndicator-exitActive",Vm="main-topBarStatusIndicator-tooltipEnter",Gm="main-topBarStatusIndicator-notMinimized",zm="main-topBarStatusIndicator-tooltipEnterActive";let Wm=function(e){return e.ERROR="ERROR",e.NOTICE="NOTICE",e}({});const Km=(0,b.memo)((function(e){const{children:t,feedbackType:i,tooltip:n,itemId:r,display:a=!0,minimized:s=!1,spec:o}=e,l=(0,b.useRef)(null),c=(0,an.W)(),u=(0,Qe.s)();return(0,R.jsx)(va.A,{in:a,timeout:parseInt(Om,10),unmountOnExit:!0,onEnter:()=>{s||l.current?.classList.add(Vm)},onEntered:()=>{s||l.current?.classList.add(zm)},onExited:()=>{s||l.current?.classList.remove(zm)},classNames:{enter:Bm,enterActive:Fm,exitActive:Hm},nodeRef:l,children:(0,R.jsx)(Ri.pZ,{value:r,children:(0,R.jsx)("div",{className:At()(Pm,{[Gm]:!s}),children:(0,R.jsx)(km.y,{offset:[-2,20],action:"toggle",trigger:"click",content:(0,R.jsx)(Fs.z,{className:At()({[Um]:i===Wm.ERROR}),children:(0,R.jsx)("div",{children:n})}),renderInline:!1,children:(0,R.jsx)("button",{className:At()(Lm,{[Mm]:n,[jm]:i===Wm.ERROR,[Dm]:i===Wm.NOTICE}),onClick:()=>{c({intent:"toggle",type:"click"}),o&&u.logInteraction(o.hitUiReveal())},ref:l,"":r,children:t})})})})})}));var Ym=i(52608),qm=i(11088),Zm=i(67855),$m=i(9326),Qm=i(46079);const Jm="P8EYxpJkrSRcmY5CFfgZ",Xm="oMR8tk4wMj9_exGQeapz",ep="qq3uDmbXwv31FKawHDIg",tp="B64o12iyKiKF4s8uuClS";function ip(e){if(null===e)return null;const t=Math.abs(Date.now()-e.getTime());if(t<1e3)return null;const{hours:i,minutes:n,seconds:r}=(0,Qm.S)(t),a=(0,qm.j)({h:i,m:n,s:r});return u.Ru.get("authorization-status.retrying",a)}const np=({retryAt:e})=>{const t=(0,Zm.v)(),[i,n]=(0,b.useState)(ip(e)),r=(0,f.Oj)();return(0,b.useEffect)((()=>{const t=window.setInterval((()=>{n(ip(e))}),500);return()=>{window.clearInterval(t)}}),[e,n]),(0,R.jsxs)("div",{className:Jm,children:[(0,R.jsx)(On.E,{as:"p",variant:"bodyMediumBold",children:u.Ru.get("authorization-status.title")}),(0,R.jsx)("span",{className:Xm,children:i??u.Ru.get("authorization-status.reconnecting")}),(0,R.jsxs)("div",{className:ep,children:[(0,R.jsx)(ei.H,{semanticColor:"textBase",buttonSize:wm.$.sm,onClick:()=>{r({type:"close"})},children:u.Ru.get("authorization-status.dismiss")}),(0,R.jsx)(Ln.$,{className:tp,buttonSize:wm.$.sm,onClick:()=>t.tryAuthorize(),children:u.Ru.get("authorization-status.retry")})]})]})},rp=({minimized:e,spec:t})=>{const i=(0,Ym.n)(),{isAuthorized:n,retryAt:r}=(0,$m.Y)();return(0,s.NC)(Ce.ueo)?(0,R.jsxs)(Km,{feedbackType:Wm.ERROR,minimized:e,display:i&&!n,spec:t,tooltip:(0,R.jsx)(np,{retryAt:r}),itemId:"authorization-status-indicator",children:[(0,R.jsx)(Rm.b,{size:"small"}),u.Ru.get("authorization-status.badge")]}):null};var ap=i(19643),sp=i(58593),op=i(90224),lp=i(38273);const cp="PYPe3hJJmzsQV6XoN3Cl",up="mqsHTSdyZwgRvD2Kylc1",dp=()=>{const e=(0,Qe.s)(),{spec:t}=(0,Hi.r)(sp.V,{}),i=(0,f.Oj)(),n=(0,g.wA)(),r=(0,b.useCallback)((()=>{i({type:"close"}),n(lp.r8.actions.open()),e.logInteraction(t.learnMoreButtonFactory().hitUiReveal())}),[n,e,i,t]);return(0,R.jsxs)(On.E,{className:cp,variant:"bodySmall",children:[u.Ru.get("topBar.dsa-indicator"),(0,R.jsx)(ei.H,{className:up,onClick:r,condensedAll:!0,size:"small",semanticColor:"textBase",children:u.Ru.get("topBar.dsa-cta")})]})},mp=({spec:e})=>{const t=(0,op.p)();return(0,R.jsx)(on.r,{spec:e,children:(0,R.jsx)(Km,{feedbackType:Wm.NOTICE,minimized:!0,display:!t,tooltip:(0,R.jsx)(dp,{}),itemId:"dsa-mode-status-indicator",spec:e,children:(0,R.jsx)(ap.p,{size:"small"})})})};var pp=i(98367);const hp=({minimized:e,spec:t})=>{const i=!(0,Ym.n)();return(0,R.jsxs)(Km,{feedbackType:Wm.NOTICE,minimized:e,display:i,spec:t,tooltip:u.Ru.get("offline.callout-disconnected"),itemId:"offline-status-indicator",children:[(0,R.jsx)(pp.P,{size:"small"}),u.Ru.get("offline.badge")]})};var gp=i(92366),fp=i(32630);const vp=({minimized:e,spec:t})=>{const{isPrivateSession:i}=(0,fp.H)();return(0,R.jsxs)(Km,{feedbackType:Wm.NOTICE,minimized:e,display:i,tooltip:u.Ru.get("private-session.badge"),spec:t,itemId:"private-session-indicator",children:[(0,R.jsx)(gp.y,{size:"small"}),u.Ru.get("private-session.badge")]})};var yp=i(63332);const bp=b.memo((function(e){const t=(0,yp.U)("(max-width: 1023px)"),i=(0,b.useMemo)((()=>e.spec?.privateSessionButtonFactory()),[e.spec]),n=(0,b.useMemo)((()=>e.spec?.offlineButtonFactory()),[e.spec]),r=(0,b.useMemo)((()=>e.spec?.authorizationButtonFactory()),[e.spec]),a=(0,b.useMemo)((()=>e.spec?.dsaModeButtonFactory()),[e.spec]);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(vp,{spec:i,minimized:t}),(0,R.jsx)(hp,{spec:n,minimized:t}),(0,R.jsx)(rp,{spec:r,minimized:t}),(0,R.jsx)(mp,{spec:a})]})}));var _p=i(80852),Ep=i(98971),Cp=i(48746),xp=i(73015),Sp=i(63198);function Ap(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 Tp=b.memo((({logger:e,spec:t})=>{const i=(0,g.wA)(),n=(0,ve.vh)(),r=(0,Sp.V)(),{enqueueSnackbar:a}=(0,xp.d)(),[s,o]=(0,b.useReducer)(Ap,{deferredPrompt:void 0,installed:!1,canBeInstalled:!1});(0,b.useEffect)((()=>{const e=()=>{o({type:"installed"}),a(u.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"};n.send(r?(0,Cp.o)(e):(0,Ep.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)}}),[i,a,n,r]);const l=(0,b.useCallback)((i=>{if(i.preventDefault(),t&&e){const i=t.installPwaButtonFactory().hitInstallApp({appName:"pwa"});e.logInteraction(i)}s.deferredPrompt&&s.deferredPrompt.prompt()}),[t,e,s.deferredPrompt]),{canBeInstalled:c,installed:d}=s;return!c||d?null:(0,R.jsx)(Ln.$,{colorSet:"overMedia",size:"small",onClick:l,iconLeading:Fl.i,children:(0,R.jsx)(On.E,{variant:"bodySmallBold",className:"ellipsis-one-line",children:u.Ru.get("pwa.download-app")})})}));var Ip=i(26969);const Np=b.memo((({shouldCalloutPWA:e,spec:t,logger:i})=>{const n=(0,b.useCallback)((()=>{if(!t||!i)return;const e=t.installAppButtonFactory().hitNavigateToExternalUri({destination:"/download"});i.logInteraction(e)}),[i,t]),[r,a]=(0,b.useState)(!1),s=(0,b.useRef)(null);if((0,Ip.w)({onResize:({width:e})=>{s.current?.scrollWidth&&e<s.current?.scrollWidth?a(!0):a(!1)},refOrElement:s}),!e){const e=(0,R.jsx)(Ln.$,{colorSet:"overMedia",size:"small",href:"/download",iconLeading:Fl.i,onClick:n,component:_p.v,children:(0,R.jsx)(On.E,{variant:"bodySmallBold",className:"ellipsis-one-line",ref:s,children:u.Ru.get("navbar.install-app")})});return r?(0,R.jsx)(ti.Zp,{label:u.Ru.get("navbar.install-app"),children:e}):e}return(0,R.jsx)(Tp,{logger:i,spec:t})}));var wp=i(17518),Rp=i(31843),kp=i(17847),Op=i(37477),Pp=i(90055);const Lp={isCTA:!1,placement:Rp.D.bottomLeft,shouldHideOnOutsideClick:({triggerAction:e})=>!e||e.type!==Pp.Gs,getTitle:({triggerAction:e})=>e?.type===Op.no.SAVE_PRERELEASE?u.Ru.get("action-trigger.log-in-or-sign-up"):u.Ru.get("action-trigger.logged-out"),getDescription:({triggerAction:e})=>{switch(e?.type){case wp.gK.ADD_TO_QUEUE:return u.Ru.get("action-trigger.logged-out-queue");case Op.$k.START_RADIO:return u.Ru.get("action-trigger.logged-out-radio");case Op.no.SAVE_TRACK:return u.Ru.get("action-trigger.log-in-like-action");case Op.no.SAVE_ALBUM:return u.Ru.get("action-trigger.save-album");case Op.no.SAVE_PRERELEASE:return u.Ru.get("web-player.prerelease.album_anonymous_presave");case Op.tf.FOLLOW_USER:return u.Ru.get("action-trigger.log-in-follow-profile");case Pp.Gs:return"track"===e?.entityType?u.Ru.get("action-trigger.logged-out-full-track"):u.Ru.get("action-trigger.logged-out-synced");default:return u.Ru.get("action-trigger.logged-out-continue")}}},jp=({children:e})=>(0,R.jsx)(Rp.y,{id:kp.d,options:Lp,children:e}),Dp=({...e})=>{const{spec:t}=(0,Hi.r)(ym.x,{}),i=(0,b.useMemo)((()=>t.upgradeButtonFactory()),[t]),n=(0,Js.t)(i);return(0,R.jsx)(Ln.$,{...e,style:{flexShrink:0},ref:n,size:"small",onClick:e.onClick,"aria-label":u.Ru.get("upgrade.tooltip.title"),title:u.Ru.get("upgrade.tooltip.title"),colorSet:"invertedLight","":"upgrade-button",children:u.Ru.get("upgrade.button")})};var Mp=i(84033),Up=i(71306),Bp=i(72973),Fp=i(85072),Hp=i(52586),Vp=i(88426),Gp=i(37574),zp=i(86205);function Wp(e,t){return t?(0,zp.r)(e):(0,Gp._)(e)}var Kp=i(21233),Yp=i(24172),qp=i(14467);const Zp=({divider:e,visible:t})=>{const i=(0,ve.vh)(),n=(0,Sp.V)(),r=(0,b.useCallback)((()=>{i.send(Wp({category:"masthead",action:"click",label:"download-link",destination_url:qp.Kw,context:window.location.href,os:(0,Kp.f)(),variant:"a"},n))}),[i,n]);return t?(0,R.jsx)(wi.D,{divider:e,role:"menuitem",href:qp.Kw,onClick:r,target:"_blank",trailingIcon:(0,R.jsx)(Yp.p,{size:"small"}),children:u.Ru.get("download.download")}):null};var $p=i(49239),Qp=i(16288);const Jp=({divider:e,ubiLogger:t,ubiSpec:i})=>{const n=(0,g.wA)(),r=(0,Qp.k)(),{url:a,isExternal:s}=r,o=(0,b.useCallback)((()=>{t.logInteraction(i.goToUpgradePlanPageRowFactory().hitNavigateToExternalUri({destination:a})),n((0,$p.d)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar",view_uri:""}))}),[t,i,a,n]);return s?(0,R.jsx)(wi.D,{divider:e,role:"menuitem",trailingIcon:(0,R.jsx)(Yp.p,{size:"small"}),onClick:o,target:"_blank",href:a,children:u.Ru.get("navbar.premium")}):(0,R.jsx)(wi.D,{divider:e,role:"menuitem",onClick:o,to:a,children:u.Ru.get("navbar.premium")})},Xp=({divider:e,visible:t})=>{const i=(0,ve.vh)(),n=(0,Sp.V)(),r=(0,b.useCallback)((()=>{i.send(Wp({category:"masthead",action:"click",label:"support-link",destination_url:qp.nw,context:window.location.href,os:(0,Kp.f)(),variant:"a"},n))}),[i,n]);return t?(0,R.jsx)(wi.D,{divider:e,role:"menuitem",href:qp.nw,onClick:r,target:"_blank",trailingIcon:(0,R.jsx)(Yp.p,{size:"small"}),children:u.Ru.get("user.support")}):null},eh="8px",th="main-userWidget-box",ih="main-userWidget-boxCondensed",nh="main-userWidget-box",rh="main-userWidget-dropDownMenu",ah="main-avatar-avatar",sh="NqzueDshzvgXEygqOGPG",oh="main-userWidget-screenReaderOnly",lh="main-userWidget-notificationDot",ch="tU7KjNh_lnoniCY_3zHQ",uh="kD6L2BtiukbMHbIwCNef",dh="main-userWidget-unableToUpdate",mh="main-userWidget-notificationIndicator",ph="FZ4y0Q61kFpjJzUjCvSa",hh="main-userWidget-setupPlan",gh="main-userWidget-hasAvatar",fh=()=>{const e=(0,g.d4)((e=>e.platform.isDesktop)),{spec:t,logger:i}=(0,Hi.r)(Vp.d,{});return(0,b.useEffect)((()=>{i.logImpression(t.impression())}),[i,t]),e?null:(0,R.jsx)("div",{className:rh,children:(0,R.jsxs)(Ii.W,{children:[(0,R.jsx)(Jp,{ubiSpec:t,ubiLogger:i}),(0,R.jsx)(Xp,{visible:!0}),(0,R.jsx)(Zp,{visible:!0})]})})};function vh(e){if(null===e)return null;const t=e["multiuserplan-member-type"],i=parseInt(e["multiuserplan-current-size"]||"1",10);switch(t){case"FAMILY_MANAGER":return{plan:"family",currentSize:i};case"DUO_MANAGER":return{plan:"duo",currentSize:i};default:return null}}var yh=i(23679);const bh=`${qp.xD}?utm_source=spotify&utm_medium=menu&utm_campaign=your_account`,_h=({divider:e,ubiLogger:t,ubiSpec:i})=>{const{openURLWithSessionTransfer:n}=(0,yh.L)();return(0,R.jsx)(wi.D,{divider:e,role:"menuitem",trailingIcon:(0,R.jsx)(Yp.p,{size:"small"}),onClick:()=>{t.logInteraction(i.goToAccountPageRowFactory().hitUiNavigate({destination:bh})),n(bh)},children:u.Ru.get("user.account")})};var Eh=i(61921),Ch=i(94939);const xh=()=>{const{settings:e}=(0,_m.t0)(),t=(0,bm.Q)(e.values),{show:i}=(0,Ch.j)();return t?(0,R.jsxs)(Eh.g,{displayText:"Debug Tools",children:[(0,R.jsx)(wi.D,{role:"menuitem",onClick:()=>i(),children:"Debug Window"}),!1,(0,R.jsx)(wi.D,{role:"menuitem",to:"/debug/locales",children:"Locales"})]}):null};var Sh=i(89734);const Ah=({divider:e,ubiLogger:t,ubiSpec:i})=>{const n=(0,g.wA)(),r=(0,b.useCallback)((()=>{t.logInteraction(i.logOutRowFactory().hitLogout()),n((0,Sh.wH)())}),[n,t,i]);return(0,R.jsx)(wi.D,{divider:e,role:"menuitem",onClick:r,"":"user-widget-dropdown-logout",children:u.Ru.get("user.log-out")})},Th=({divider:e,planAttributes:t,ubiSpec:i,ubiLogger:n})=>{const{openURLWithSessionTransfer:r}=(0,yh.L)(),a="duo"===t.plan?"https://www.spotify.com/account/duo/":"https://www.spotify.com/account/family/";return(0,R.jsx)(wi.D,{divider:e,role:"menuitem",trailingIcon:(0,R.jsx)(Yp.p,{size:"small"}),onClick:()=>{n.logInteraction(i.goToPlanManagementFactory().hitNavigateToExternalUri({destination:a})),r(a)},children:(0,R.jsxs)("span",{className:hh,children:["duo"===t.plan?u.Ru.get("user.setup-duo"):u.Ru.get("user.setup-family"),t.currentSize<=1&&(0,R.jsx)(Hp.Z,{className:lh,name:"dot-icon"})]})})},Ih=({visible:e,divider:t,ubiSpec:i,ubiLogger:n})=>{const{isPrivateSession:r,setPrivateSession:a}=(0,fp.H)(),s=(0,b.useCallback)((()=>{n.logInteraction(i.togglePrivateSessionRowFactory().hitSetSettingField()),a(!r)}),[a,r,n,i]);return e?(0,R.jsx)(wi.D,{divider:t,role:"menuitemcheckbox","aria-checked":r,onClick:s,children:u.Ru.get("user.private-session")}):null},Nh="/preferences",wh=({divider:e,ubiLogger:t,ubiSpec:i})=>(0,R.jsx)(wi.D,{divider:e,role:"menuitem",to:Nh,onClick:()=>{t.logInteraction(i.goToSettingsRowFactory().hitUiNavigate({destination:Nh}))},children:u.Ru.get("user.settings")}),Rh=({divider:e,ubiLogger:t,ubiSpec:i})=>{const n=(0,Cm.k)(),r=(0,Em.t)(),a=(0,b.useCallback)((()=>{t.logInteraction(i.updateClientRowFactory().hitUiHide()),r.applyUpdate()}),[r,t,i]);return n?.state!==xm.D.UPDATE_READY?null:(0,R.jsx)(wi.D,{divider:e,role:"menuitem",onClick:a,trailingIcon:(0,R.jsx)(Hp.Z,{className:lh}),"":"user-widget-update-available",children:u.Ru.get("user.update-client")})},kh=({divider:e})=>{const t=(0,g.wA)(),i=(0,b.useCallback)((e=>{e.preventDefault(),t((0,p.as)())}),[t]);return(0,R.jsx)(wi.D,{divider:e,role:"menuitem",trailingIcon:(0,R.jsx)(Hp.Z,{className:dh}),onClick:i,href:"",target:"_blank",children:u.Ru.get("user.unable-to-update")})};var Oh=i(56906);const Ph=({divider:e,ubiLogger:t,ubiSpec:i})=>{const n=(0,g.wA)(),r=(0,Oh.D)("loggedin_upgrade_menu"),a=(0,Qp.k)(),{url:s,isExternal:o}=a,l=(0,b.useCallback)((()=>{t.logInteraction(i.goToUpgradePlanPageRowFactory().hitNavigateToExternalUri({destination:s})),n((0,$p.d)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar",view_uri:""}))}),[n,s,t,i]);return(0,g.d4)((e=>(0,Rc.Yb)(e)))?o?(0,R.jsx)(wi.D,{divider:e,role:"menuitem",trailingIcon:(0,R.jsx)(Yp.p,{size:"small"}),onClick:l,target:"_blank",href:r(s),children:u.Ru.get("upgrade.tooltip.title")}):(0,R.jsx)(wi.D,{divider:e,role:"menuitem",onClick:l,to:r(s),children:u.Ru.get("upgrade.tooltip.title")}):null},Lh=({divider:e,ubiSpec:t,ubiLogger:i})=>{const n=(0,g.d4)((e=>e.session.user?.uri)),r=(0,D.z)();if(!n)return null;const a=(0,ne.o_)(n).toURLPath(!0);return(0,R.jsx)(wi.D,{divider:e,role:"menuitem",to:a,onClick:()=>{i.logInteraction(t.goToUserProfileRowFactory().hitUiNavigate({destination:a})),r.setReferrer("user_profile")},children:u.Ru.get("card.tag.profile")})};var jh=i(50513);const Dh="KROerAKSuwZBbse9iJT_",Mh="lgapDocKw68LlwEMOEe_",Uh="X0f9yl0vfdlQU4bX4p2Q",Bh="ELJKm9oK4ojPrEohxqWu",Fh="GRIcLOxMVgF_nrfnY4Uv",Hh="ECeOpd1vpoOavSRlnAvd",Vh="eUqphQq1C_Rpj86v0C76",Gh="q_y6r1A1e8D5uNZ_Menz",zh="jG4F9TThOut3mIchASGW",Wh="SuKZtj8PyNFy4RV6GSem",Kh="SO8ZVeRnaa3OYx4hD5WZ",Yh="FSi_NkGvBacIY9AQ3Enf",qh="RRTp4ESOekxPGhzyjzt5",Zh="KFhPNPSqzSZjHtAi0Kqz",$h="O84I6j6mdxtM8lakjPzR",Qh="WATiQKibA4mYnP3g6KaM",Jh="y77CgOUQOe6c5bjVe4GX",Xh="QeUrkqvHAbXSveKN2wCu",eg=()=>(0,R.jsx)("div",{className:At()(Uh,Bh,Fh),children:(0,R.jsx)(On.E,{semanticColor:"textSubdued",variant:"marginal",children:u.Ru.get("web-player.notification-center.empty-state")})});var tg=i(16457);const ig=({lastItemRef:e})=>(0,R.jsx)("div",{className:At()(Uh,Bh),ref:e,children:(0,R.jsx)(tg.a3,{semanticColor:"textSubdued"})});var ng=i(67464),rg=i(89942);const ag=({primaryImages:e})=>(0,R.jsx)("div",{className:zh,children:e.length>1?(0,R.jsx)("div",{className:Yh,children:e.map(((t,i)=>(0,R.jsx)("div",{className:qh,style:{zIndex:e.length-i},children:(0,R.jsx)(Fp.e,{imageClassName:Vh,placeholderClassName:Vh,label:"notificationAvatar",width:32,images:[{url:t.image_url}],userIconSize:"medium",username:t.displayName,displayName:t.displayName})},i)))}):(0,R.jsx)(Fp.e,{images:e.map((e=>({url:e.image_url}))),userIconSize:"large",label:"notificationAvatar",width:48,username:e[0]?.displayName,displayName:e[0]?.displayName})}),sg=({primaryImage:e,secondaryImage:t})=>(0,R.jsxs)("div",{className:zh,children:[(0,R.jsx)(ng.b,{className:Wh,images:[{url:e.image_url}],iconSize:"medium",size:rg.Qe.SIZE_40,type:_u.c.PLAYLIST,title:e.displayName}),(0,R.jsx)(Fp.e,{className:Kh,imageClassName:Vh,placeholderClassName:Vh,label:"notificationAvatar",width:24,images:[{url:t.image_url}],userIconSize:"small",username:t.displayName,displayName:t.displayName})]});var og=i(56386),lg=i.n(og),cg=i(64736),ug=i(22319);const dg=({title:e,timestamp:t})=>{let i=0;const n=(0,b.useRef)(null),r=(0,cg.K)({ref:n}),a=(0,b.useMemo)((()=>(0,ug.Z)(Date.parse(t)).replace(/\s+/g,"")),[t]);return(0,R.jsxs)("div",{className:Zh,children:[(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textBase",style:{"--timestamp-text":`'${a}'`},className:Qh,ref:n,children:lg()(e.text?.text,/(\$\d+)/g,((t,n)=>{const r=(0,R.jsx)(On.E,{variant:"bodySmallBold",semanticColor:"textBase",children:e.text_values[i].text},n);return i++,r}))}),r&&(0,R.jsx)(On.E,{variant:"marginal",semanticColor:"textSubdued",className:$h,children:a})]})},mg=()=>(0,R.jsx)("div",{className:Xh});let pg=function(e){return e.UNKNOWN_STATE="UNKNOWN_STATE",e.UNREAD="UNREAD",e.READ="READ",e.CLICKED="CLICKED",e[e.UNRECOGNIZED=NaN]="UNRECOGNIZED",e}({});const hg=({notification:e,markAsRead:t})=>{const{ref:i,inView:n}=(0,jh.Wx)();return(0,b.useEffect)((()=>{n&&e.state===pg.UNREAD&&t(e.notification_id)}),[n,t,e.notification_id,e.state]),(0,R.jsxs)("div",{className:Gh,ref:i,children:[(0,R.jsx)(ag,{primaryImages:e.primary_images}),(0,R.jsx)(dg,{title:e.title,timestamp:e.event_timestamp}),e.state===pg.UNREAD&&(0,R.jsx)("div",{className:Jh,children:(0,R.jsx)(mg,{})})]})},gg=({notification:e,markAsRead:t})=>{const{ref:i,inView:n}=(0,jh.Wx)();return(0,b.useEffect)((()=>{n&&e.state===pg.UNREAD&&t(e.notification_id)}),[n,t,e.notification_id,e.state]),(0,R.jsxs)("div",{className:Gh,ref:i,children:[(0,R.jsx)(sg,{primaryImage:e.primary_image,secondaryImage:e.secondary_image}),(0,R.jsx)(dg,{title:e.title,timestamp:e.event_timestamp}),e.state===pg.UNREAD&&(0,R.jsx)("div",{className:Jh,children:(0,R.jsx)(mg,{})})]})};var fg=i(40312),vg=i(38481);const yg=async(e,t)=>{const i=fg.n.getInstance();await i.build().withHost(vg.dv).withJsonContentType().withoutMarket().withMethod("POST").withBody({notification_ids:e,state:t}).withPath("/UpdateNotificationState").send()};var bg=i(86534);const _g=()=>{const{data:e,isLoading:t,fetchNextPage:i,hasNextPage:n}=(0,bg.q)({queryKey:["notifications"],queryFn:async({pageParam:e})=>await(async e=>{const t=fg.n.getInstance();return(await t.build().withHost(vg.dv).withJsonContentType().withoutMarket().withMethod("POST").withBody({check_further_unread:!0,cursor:e}).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:n,fetchNextPage:i}};var Eg=i(93966),Cg=i(65313);const xg=({notifications:e,fetchNextPage:t,hasNextPage:i})=>{const n=(0,oe.Zp)(),r=(0,f.Oj)(),{ref:a,inView:s}=(0,jh.Wx)();(0,b.useEffect)((()=>{s&&t()}),[t,s]);const o=(0,b.useCallback)((async e=>{yg([e],pg.READ)}),[]),l=(0,b.useCallback)((async e=>{yg([e],pg.CLICKED)}),[]),c=(0,b.useCallback)((e=>{const t=(0,ne.o_)(e.single_notification?.action?.uri??e.double_notification?.action?.uri).toURLPath(!0);n(t),r({type:"close"})}),[r,n]),d=(0,b.useCallback)((()=>e.map(((e,t)=>{const i=e.single_notification?.notification_id??e.double_notification?.notification_id;return(0,R.jsx)(Cg.u,{children:(0,R.jsx)(Eg.H,{role:"menuitem",className:At()(Uh,Hh),onClick:()=>{l(i),c(e)},children:(n=e,Object.prototype.hasOwnProperty.call(n,"single_notification")?(0,R.jsx)(hg,{notification:e.single_notification,markAsRead:o}):(0,R.jsx)(gg,{notification:e.double_notification,markAsRead:o}))})},t);var n}))),[l,o,c,e]);return(0,R.jsxs)("div",{className:Dh,children:[(0,R.jsx)(On.E,{variant:"bodyMediumBold",semanticColor:"textBase",className:Mh,children:u.Ru.get("web-player.notification-center.button-label")}),e.length>0?(0,R.jsxs)(R.Fragment,{children:[d(),i&&(0,R.jsx)(ig,{lastItemRef:a})]}):(0,R.jsx)(eg,{})]})},Sg=()=>{const{notifications:e,isLoading:t,hasNextPage:i,fetchNextPage:n}=_g();return t?(0,R.jsx)("div",{className:Dh,children:(0,R.jsx)(ig,{})}):(0,R.jsx)(xg,{notifications:e,hasNextPage:i,fetchNextPage:n})},Ag="sp_pfhp",Tg="pfhp",Ig=()=>{const e=(0,ft.v8)(Ag),t=(()=>{const e=new URLSearchParams(window.location.search),t=e.get(Tg);return t&&(e.delete(Tg),window.history.replaceState(null,"",`${window.location.origin}${window.location.pathname}?${e}`)),t})();return t&&t!==e?((0,ft.n0)({name:Ag,value:t,days:30}),t):e},Ng=()=>{if("undefined"==typeof window)return!1;return"2c2ccb58-8a92-4713-a1c0-8b43b3090b49"===Ig()};var wg=i(74303);const Rg=()=>{const e=(0,g.d4)((e=>e.platform.isDesktop)),{spec:t,logger:i}=(0,Hi.r)(Vp.d,{});(0,b.useEffect)((()=>{i.logImpression(t.impression())}),[i,t]);const n=(0,wg.k)(),r=vh(n.data),a=(0,s.NC)(Ce.y2l);return(0,R.jsx)("div",{"":"user-widget-menu",className:rh,children:(0,R.jsxs)(Ii.W,{children:[(0,R.jsx)(_h,{ubiSpec:t,ubiLogger:i}),r&&(0,R.jsx)(Th,{planAttributes:r,ubiSpec:t,ubiLogger:i}),(0,R.jsx)(Lh,{ubiSpec:t,ubiLogger:i}),(0,R.jsx)(Ph,{ubiSpec:t,ubiLogger:i}),(0,R.jsx)(Xp,{visible:Ng()}),(0,R.jsx)(Zp,{visible:!e&&Ng()}),(0,R.jsx)(Ih,{visible:e,ubiSpec:t,ubiLogger:i}),(0,R.jsx)(wh,{divider:"after",ubiSpec:t,ubiLogger:i}),n?.data?.["client-deprecated"]&&(0,R.jsx)(kh,{}),(0,R.jsx)(Rh,{ubiSpec:t,ubiLogger:i})," ",e&&(0,R.jsx)(xh,{}),(0,R.jsx)(Ah,{ubiSpec:t,ubiLogger:i,divider:a?"after":void 0}),a&&(0,R.jsx)(Sg,{})]})})};var kg=i(62413),Og=i(25639);const Pg=()=>{const e=(0,s.NC)(Ce.y2l),{data:t}=(0,Og.I)({queryKey:["notification-unread-status"],queryFn:async()=>await(async()=>{const e=fg.n.getInstance();return(await e.build().withHost(vg.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 Lg=i(59057);const jg=e=>{const t=(0,g.d4)((e=>e.session.user)),i=(0,Cm.k)(),n=vh((0,wg.k)().data),r=!!n&&n.currentSize<=1,a=(0,kg.A)(),o=(0,s.NC)(Ce.y2l),l=Pg(),c=o&&l;if(!t&&Ng())return(0,R.jsx)(Ti.b,{offset:[0,parseInt(eh,10)],placement:"bottom-end",menu:(0,R.jsx)(fh,{}),children:(e,t,i)=>(0,R.jsx)("button",{className:At()(th),type:"button",onClick:t,ref:i,"":"unauth-user-widget-link",children:e?(0,R.jsx)(Pn.M,{size:"small","aria-hidden":"true"}):(0,R.jsx)(Mp.d,{size:"small","aria-hidden":"true"})})});if(!t)return null;const d=t.display_name||t.id,m=t.display_name?.charAt(0).toUpperCase(),p=t?.images.length||!t.display_name,h=(0,Lg.nj)(t?.avatarBackgroundColor||0),f=()=>(0,R.jsxs)("div",{className:a?ph:mh,children:[(0,R.jsx)("span",{className:oh,children:u.Ru.get("user.update-available")}),(0,R.jsx)(Hp.Z,{className:At()(lh,{[ch]:!p,[uh]:a})})]}),v=a?"var(--background-elevated-base)":"var(--background-base)",y={backgroundColor:p?v:`#${h}`,color:Up.Ql9,lineHeight:a?"32px":"24px"},b=a?nh:At()((0,Bp.AC)("overMedia"),ih),_=p?(0,R.jsx)(Fp.e,{label:d,width:a&&t?.images.length?32:24,images:t?.images,userIconSize:"small",testID:"user-widget-avatar",transparent:!0,className:At()({[gh]:t?.images.length})}):(0,R.jsx)(On.E,{variant:"bodySmallBold","":"username-first-letter",style:y,className:a?ah:sh,children:m});return(0,R.jsx)(Ti.b,{offset:[0,parseInt(eh,10)],placement:"bottom-end",menu:(0,R.jsx)(Rg,{}),children:(t,n,a)=>(0,R.jsx)(ti.Zp,{label:d,children:(0,R.jsxs)(ei.H,{className:b,onClick:t=>{e.onClick?.(t),n(t)},style:{backgroundColor:v},ref:a,condensedAll:!0,"aria-label":d,"":"user-widget-link",semanticColor:"textBase",children:[_,(i?.state===xm.D.UPDATE_READY||r||c)&&(0,R.jsx)(f,{})]})})})};var Dg=i(34941),Mg=i(347);const Ug="main-topBar-buddyFeed",Bg="main-globalNav-buddyFeed",Fg=({onClick:e,tooltipLabel:t,ariaLabel:i,className:n,disabled:r,testId:a,children:s,restoreFocusKey:o})=>(0,kg.A)()?(0,R.jsx)(ti.Zp,{label:t,children:(0,R.jsx)(ei.H,{"aria-label":i,onClick:e,size:"small",condensedAll:!0,"":a,className:At()(Bg,n),"data-restore-focus-key":o,children:s})}):(0,R.jsx)(ti.Zp,{label:t,children:(0,R.jsx)("div",{children:(0,R.jsx)("button",{"aria-label":i,className:At()((0,Bp.AC)("overMedia"),Ug,n),onClick:e,disabled:r,"data-restore-focus-key":o,children:s})})}),Hg=Pe.$S.BUDDY_FEED_BUTTON_CLICK,Vg=()=>{const e=(0,Sr.Ev)(Hg),{isActive:t,panelSend:i}=(0,Sr.AI)(Ar.Z.BuddyFeed,Ar.Z.BuddyFeedOverlay),{isSupported:n}=(0,Re.C)().getCapabilities(),r=(0,Ym.n)(),a=(0,b.useCallback)((()=>{const e=t;i(Hg),e||(0,La.I)("BUDDY-FEED")}),[t,i]);return n?(0,R.jsx)(Fg,{tooltipLabel:r?u.Ru.get("buddy-feed.friend-activity"):u.Ru.get("offline.feedback-text"),ariaLabel:u.Ru.get("buddy-feed.friend-activity"),disabled:!e,onClick:a,testId:"friend-activity-button",restoreFocusKey:Ar.Z.BuddyFeed,children:t?(0,R.jsx)(Dg.F,{size:"small",semanticColor:"textBase"}):(0,R.jsx)(Mg.B,{size:"small"})}):null},Gg=Pe.$S.BUDDY_FEED_BUTTON_CLICK,zg=()=>{const e=(0,Sr.Ev)(Gg),{isActive:t,panelSend:i}=(0,Sr.AI)(Ar.Z.BuddyFeed,Ar.Z.BuddyFeedOverlay),{isSupported:n}=(0,ke.C)().getCapabilities(),r=(0,Ym.n)(),a=(0,b.useCallback)((()=>{const e=t;i(Gg),e||(0,La.I)("BUDDY-FEED")}),[t,i]);return n?(0,R.jsx)(Fg,{tooltipLabel:r?u.Ru.get("buddy-feed.friend-activity"):u.Ru.get("offline.feedback-text"),ariaLabel:u.Ru.get("buddy-feed.friend-activity"),disabled:!e,onClick:a,testId:"friend-activity-button",restoreFocusKey:Ar.Z.BuddyFeed,children:t?(0,R.jsx)(Dg.F,{size:"small",semanticColor:"textBase"}):(0,R.jsx)(Mg.B,{size:"small"})}):null},Wg=()=>{const e=(0,Sp.V)();return(0,s.NC)(Ce.f7J)&&!e};var Kg=i(4084),Yg=i(6802),qg=i(66978);const Zg=Spicetify.GraphQL.Definitions["queryWhatsNewFeed"]=new qi.l("queryWhatsNewFeed","query","4c3281ff1c1c0b67f56e4a77568d6b143da7cf1260266ed5d5147a5e49481493",null),$g=Spicetify.GraphQL.Definitions["whatsNewFeedNewItems"]=new qi.l("whatsNewFeedNewItems","query","4c3281ff1c1c0b67f56e4a77568d6b143da7cf1260266ed5d5147a5e49481493",null),Qg=Spicetify.GraphQL.Definitions["SetItemsStateInWhatsNewFeed"]=new qi.l("SetItemsStateInWhatsNewFeed","mutation","4c3281ff1c1c0b67f56e4a77568d6b143da7cf1260266ed5d5147a5e49481493",null);var Jg=i(22253);const Xg="agh_IHo91VhyFTnp5BzM",ef="XVC0Gr8G4SXM0a98jbqC",tf="K8ygfuFNcx2tNcNv09JH";function nf(){const{name:e}=Zg;return[e]}const rf=()=>{const e=(0,oe.Zp)(),t=(0,oe.zy)(),i=(0,au.J)(),n="/content-feed"===t.pathname,r=n,[a,s]=(0,b.useState)(!1),{request:o}=(0,b.useContext)(We.j),l=(0,pt.jE)(),{spec:c,logger:d}=(0,Hi.r)(qg.q,{});(0,b.useEffect)((()=>{let e=!1;const t=setInterval((async()=>{let t;try{t=await(0,Jg.c)(o,$g,{})}catch{return}if(t?.errors)return;const i=t?.data?.whatsNewFeedHasNewItems||!1;if(i&&!e){const e=c.notificationsBellToggleFactory().notificationsIndicatorFactory().impression();d.logImpression(e),s(!0),l.invalidateQueries({queryKey:nf()})}e=i}),144e5);return()=>{clearInterval(t)}}),[d,l,o,c]);const m=()=>(0,R.jsxs)("div",{className:Xg,"":"notification-dot",children:[(0,R.jsx)("span",{className:ef,children:u.Ru.get("new_releases")}),(0,R.jsx)(Hp.Z,{className:tf})]}),p=(0,b.useCallback)((()=>{n?(d.logInteraction(c.notificationsBellToggleFactory().hitUiNavigateBack()),i.length>1?i.goBack():e("/")):(s(!1),d.logInteraction(c.notificationsBellToggleFactory().hitUiNavigate({destination:"spotify:app:content-feed"})),e("/content-feed"))}),[n,d,c,i,e]);return(0,R.jsxs)(Fg,{tooltipLabel:u.Ru.get("web-player.whats-new-feed.button-label"),ariaLabel:u.Ru.get("web-player.whats-new-feed.button-label"),testId:"whats-new-feed-button",onClick:p,children:[r?(0,R.jsx)(Kg.c,{size:"small",semanticColor:"textBase"}):(0,R.jsx)(Yg.a,{size:"small"}),a&&(0,R.jsx)(m,{})]})};var af=i(58822),sf=i(20167),of=i(5510);const lf=(0,b.forwardRef)((({className:e},t)=>{const i=(0,an.W)(),n=(0,g.wA)(),r=Wg(),a=(0,Ym.n)(),o=(0,Sp.V)(),l=(0,kg.A)(),{spec:c,logger:d}=(0,Hi.r)(ym.x,{}),m=(0,yp.U)("(max-width: 849px)"),p=Ng()&&o&&m,h=(0,b.useCallback)((()=>{n((0,Ta.Ai)()),i({intent:"signup",type:"click"})}),[n,i]),f=(0,b.useCallback)((()=>{n((0,Ta.zL)()),i({intent:"login",type:"click"})}),[n,i]),v=(0,b.useCallback)((()=>{n((0,Ta.NM)()),i({intent:"upgrade-to-premium",type:"click"})}),[n,i]),{openURLWithSessionTransfer:y}=(0,yh.L)(),_=(0,oe.Zp)(),E=(e,t)=>{t?y(e):_(e)},C=(0,b.useMemo)((()=>c.upgradeButtonFactory()),[c]),{shouldShowUpgradeButton:x,onUpgradeClick:S}=(0,af.i)(C,d),A=(0,yp.U)("(min-width: 1024px)"),{isDesktop:T,isPWA:I,shouldCalloutPWA:N}=(0,g.d4)((e=>e.platform)),w=(0,b.useCallback)((()=>{d.logInteraction(c.profileButtonFactory().hitUiReveal())}),[d,c]),k=(0,s.NC)(Ce.t84)?Vg:zg,O=(0,Qp.k)(),P=(0,b.useMemo)((()=>{const e=new URL(O.url);return e.searchParams.set("ref","jam"),e}),[O]);return(0,R.jsxs)("div",{className:At()(e,of.A.topbarContentRight),ref:t,children:[(0,R.jsx)(bp,{spec:c}),o&&Ng()&&!m?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ei.H,{condensed:!0,onClick:()=>{v(),E(P.href,O.isExternal)},className:of.A.topNavBarLinks,children:u.Ru.get("navbar.premium")}),(0,R.jsx)(ei.H,{condensed:!0,onClick:()=>E(qp.nw),className:of.A.topNavBarLinks,children:u.Ru.get("user.support")}),(0,R.jsx)(ei.H,{condensed:!0,onClick:()=>E(qp.Kw),className:of.A.topNavBarLinks,children:u.Ru.get("download.download")}),(0,R.jsx)("div",{className:of.A.topNavBarSeparator})]}):(0,R.jsx)(R.Fragment,{}),(0,R.jsx)(Nm,{}),x&&A&&(0,R.jsx)(Dp,{onClick:S,className:of.A.UpgradeButton}),!o&&!T&&!I&&!(0,sf.g)()&&(0,R.jsx)(Np,{shouldCalloutPWA:N,logger:d,spec:c}),o&&(0,R.jsxs)("div",{className:of.A.loginButtons,children:[(0,R.jsx)(ei.H,{className:of.A.signupButton,onClick:h,"":"signup-button",children:u.Ru.get("sign_up")}),(0,R.jsx)(jp,{children:(0,R.jsx)(Ln.$,{colorSet:"invertedLight",onClick:f,"":"login-button",children:u.Ru.get("login")})})]}),(0,R.jsxs)("div",{className:At()({[of.A.globalNavBar]:l},of.A.topBarRightButtonContainer),children:[r&&a&&(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(rf,{})}),!o&&(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(k,{})})]}),(!o||p)&&(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(jg,{onClick:w})})]})}));var cf=i(73809);const uf=()=>{const e=(0,b.useRef)(null),{setElementRef:t}=(0,b.useContext)(cf.J);return(0,b.useEffect)((()=>{t&&e.current&&t(e.current)}),[t]),(0,R.jsx)("div",{"":"topbar-content-wrapper",className:of.A.topbarContentWrapper,ref:e})};var df=i(89732),mf=i(62473);const pf=(e,t)=>e[0]===t[0]&&e[1]===t[1],hf=({responsive:e,className:t})=>{const{spec:i,logger:n}=(0,Hi.r)(ym.x,{}),{isNavBarVisible:r}=(()=>{const e=(0,b.useContext)(qr.oH);if(null===e)throw new Error("Trying to use 'VisibilityContext' without 'VisibilityProvider'!");return e})(),a=(0,oe.Zp)(),[s,o]=(()=>{const[e,t]=(0,g.d4)((e=>[e.ui.history.canGoBack,e.ui.history.canGoForward]),pf);return[e,t]})(),l=(0,kg.A)(),c=(0,b.useCallback)((()=>{n.logInteraction(i.backButtonFactory().hitUiNavigateBack()),a(-1)}),[n,a,i]),d=(0,b.useCallback)((()=>{n.logInteraction(i.forwardButtonFactory().hitUiNavigateForwardInHistory()),a(1)}),[n,a,i]);return l?(0,R.jsxs)("div",{className:At()(t,of.A.globalNavBarHistoryButtonsContainer,{[of.A.fullscreenHistoryButtons]:!r}),children:[(0,R.jsx)(ti.Zp,{label:u.Ru.get("navbar.go-back"),children:(0,R.jsx)(ei.H,{size:"medium",iconOnly:df.g,condensed:!0,"":"top-bar-back-button","aria-label":u.Ru.get("navbar.go-back"),disabled:!s,onClick:c,className:of.A.globalNavBarHistoryButton})}),(0,R.jsx)(ti.Zp,{label:u.Ru.get("navbar.go-forward"),children:(0,R.jsx)(ei.H,{size:"medium",iconOnly:mf.V,condensed:!0,"":"top-bar-forward-button","aria-label":u.Ru.get("navbar.go-forward"),disabled:!o,onClick:d,className:of.A.globalNavBarHistoryButton})})]}):(0,R.jsxs)("div",{className:At()(t,of.A.historyButtons,{[of.A.fullscreenHistoryButtons]:!r}),children:[(0,R.jsx)(ti.Zp,{label:u.Ru.get("navbar.go-back"),children:(0,R.jsx)("button",{"":"top-bar-back-button","aria-label":u.Ru.get("navbar.go-back"),disabled:!s,className:`${of.A.button}`,onClick:c,children:(0,R.jsx)(df.g,{className:of.A.icon,size:"small"})})}),(0,R.jsx)(ti.Zp,{label:u.Ru.get("navbar.go-forward"),children:(0,R.jsx)("button",{"":"top-bar-forward-button","aria-label":u.Ru.get("navbar.go-forward"),disabled:!o,className:At()(of.A.button,!1===e?of.A.forward:of.A.responsiveForward),onClick:d,children:(0,R.jsx)(mf.V,{className:of.A.icon,size:"small"})})})]})};function gf(e,t=1,i=0){if(i>t)return 1;let n=(e-i)/(t-i);return Number.isNaN(n)&&(n=1),Math.min(Math.max(n,0),1)}const ff=()=>"/"===(0,oe.zy)().pathname,vf=["/","/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"];function yf(e){const{backgroundColor:t}=(0,ut.oI)();return t||e}var bf=i(32994),_f=i(42116),Ef=i(86945);const Cf={[bf.E.SMALL]:0,[bf.E.MEDIUM]:600,[bf.E.LARGE]:1024},xf=()=>{const e=(0,kg.A)(),t=yf(),i=(0,Sp.V)(),n=ff(),r=(()=>{const e=(0,kg.A)(),t=(0,oe.zy)();return!e||vf.every((e=>null===(0,ee.B6)(e,t.pathname)))})(),a=(0,b.useRef)(null),{breakpoint:s}=(0,Ef.x)(Cf,a),o=0===(0,oe.zy)().pathname.indexOf("/artist"),l=void 0!==t;return r?(0,R.jsx)(_f.o.Provider,{value:s,children:(0,R.jsxs)("header",{"":"topbar","aria-label":u.Ru.get("topBar.label"),className:At()(of.A.container,{[of.A.withBackgroundBlur]:n,[of.A.loggedOut]:i&&!o}),children:[(0,R.jsx)("div",{ref:a,className:of.A.background,style:{backgroundColor:t},children:l&&(0,R.jsx)("div",{className:of.A.overlay})}),(0,R.jsxs)("div",{className:At()(of.A.contentContainer,"contentSpacing"),children:[!e&&(0,R.jsx)(hf,{}),(0,R.jsx)(uf,{}),!e&&(0,R.jsx)(lf,{})]})]})}):null};var Sf=i(60751);const Af="T0fKO6B7LQSCE_VaSM1P",Tf={[bf.E.SMALL]:0,[bf.E.MEDIUM]:600,[bf.E.LARGE]:1024},If=(0,b.forwardRef)((({children:e},t)=>{(0,Sf.$)();const i=(0,b.useRef)(null);(0,b.useImperativeHandle)(t,(()=>i.current),[i]);const{breakpoint:n}=(0,Ef.x)(Tf,i);return(0,R.jsx)("main",{ref:i,className:Af,tabIndex:-1,children:(0,R.jsx)(_f.o.Provider,{value:n,children:e})})}));var Nf=i(76792),wf=i(77783);const Rf="Xq5xnpTOsoPxFR95BkTU",kf="N7OMJte9T4Lv7DDX16ky",Of="NJATxQbY2o4sl0BHxU3T",Pf=({children:e,className:t,...i})=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(wf.a,{panel:Ar.Z.Puffin,className:At()(kf,t),...i}),e]});let Lf=function(e){return e.Overview="overview",e.ActivationIntro="activationIntro",e.ActivationDetection="activationDetection",e.ActivationSignifiers="activationSignifiers",e.Error="error",e.ManualSelection="manualSelection",e.AirpodsSelection="airpodsSelection",e.AudioQualitySettings="audioQualitySettings",e.AudioQualityDetails="audioQualityDetails",e.DiscoverLossless="discoverLossless",e}({}),jf=function(e){return e.GetStarted="getStarted",e.OnError="onError",e.SelectManually="selectManually",e.Continue="continue",e.Close="close",e.Activate="activate",e.SetupNewDevice="setupNewDevice",e.NotFound="notFound",e.Settings="settings",e.OnboardLossless="onboardLossless",e.Details="details",e.Airpods="airpods",e}({});const Df={[Lf.Overview]:{[jf.GetStarted]:Lf.ActivationIntro,[jf.OnError]:Lf.Error,[jf.SelectManually]:Lf.ManualSelection,[jf.Settings]:Lf.AudioQualitySettings,[jf.OnboardLossless]:Lf.DiscoverLossless,[jf.Details]:Lf.AudioQualityDetails},[Lf.ActivationIntro]:{[jf.Close]:Lf.Overview,[jf.OnError]:Lf.Error,[jf.Continue]:Lf.ActivationDetection,[jf.Activate]:Lf.Overview},[Lf.ActivationDetection]:{[jf.SelectManually]:Lf.ManualSelection,[jf.Airpods]:Lf.AirpodsSelection,[jf.Close]:Lf.Overview,[jf.OnError]:Lf.Error,[jf.Continue]:Lf.ActivationSignifiers},[Lf.ActivationSignifiers]:{[jf.Close]:Lf.Overview,[jf.OnError]:Lf.Error,[jf.Activate]:Lf.Overview},[Lf.ManualSelection]:{[jf.Continue]:Lf.ActivationSignifiers,[jf.Close]:Lf.Overview,[jf.OnError]:Lf.Error,[jf.NotFound]:Lf.Error},[Lf.AirpodsSelection]:{[jf.Continue]:Lf.ActivationSignifiers,[jf.Close]:Lf.Overview,[jf.OnError]:Lf.Error,[jf.NotFound]:Lf.Error},[Lf.DiscoverLossless]:{[jf.Continue]:Lf.Overview},[Lf.AudioQualitySettings]:{},[Lf.AudioQualityDetails]:{},[Lf.Error]:{}},Mf=(0,b.createContext)({currentView:Lf.Overview,viewTransitions:Df,setCurrentView:()=>{},toPreviousView:()=>{},viewOptions:null}),Uf=({children:e})=>{const t=(0,Sr.XB)(),[i,n]=(0,b.useState)((()=>(e=>[{view:e===Ar.Z.PuffinActivation||e===Ar.Z.PuffinActivationOverlay?Lf.ActivationDetection:Lf.Overview,options:{}}])(t))),r=(0,b.useCallback)(((e,t)=>{e===Lf.Overview?n([{view:e,options:t??{}}]):n((i=>[...i,{view:e,options:t??{}}]))}),[]),a=(0,b.useCallback)((()=>{n((e=>e.slice(0,-1)))}),[]);if(0===i.length)throw new Error("Puffin view state stack should never be empty");const{view:s,options:o}=i.at(-1);return(0,R.jsx)(Mf.Provider,{value:{currentView:s,viewOptions:o,setCurrentView:r,toPreviousView:a,viewTransitions:Df},children:e})},Bf="EqLKhgGIINyN_LINFjl1",Ff="OyIY0v1_h3UWgLlxyPHL",Hf=({resetErrorBoundary:e})=>{const{toPreviousView:t,setCurrentView:i}=(0,b.useContext)(Mf);return(0,R.jsx)(Pf,{onBack:()=>{t()},children:(0,R.jsxs)("div",{className:Bf,children:[(0,R.jsx)(Rm.b,{size:"xlarge",semanticColor:"textBase"}),(0,R.jsxs)("div",{className:Ff,children:[(0,R.jsx)(On.E,{variant:"titleSmall",semanticColor:"textBase",children:"Something went wrong"}),(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",children:"We couldnt turn on your headphone tools."})]}),(0,R.jsx)(Ln.$,{colorSet:"invertedLight",size:"medium",onClick:()=>{e?.(),i(Lf.Overview)},children:"Retry"})]})})},Vf=({resetErrorBoundary:e})=>(0,R.jsx)(Hf,{resetErrorBoundary:e});var Gf=i(30575),zf=i(42875);const Wf=()=>{const e=(0,g.d4)((e=>e.platform.isDesktop)),t=(0,zf.b)(),i=(0,Es.lS)(t),{isPlayingRemotely:n,remoteDeviceName:r,isConnected:a}=(0,ca.v)((e=>{const t=(0,Ja.V)(e);return{isPlayingRemotely:t.isPlayingRemotely,remoteDeviceName:t.remoteDevice?.name,isConnected:"connected"===t.connectionStatus}}),ln.a),s=(0,b.useMemo)((()=>e?u.Ru.get("web-player.connect.device-picker.this-computer"):u.Ru.get("web-player.connect.device-picker.this-web-browser")),[e]),o=(0,b.useMemo)((()=>{if(t)return e?u.Ru.get("web-player.connect.device-picker.from-this-computer",{device_name:t.name}):u.Ru.get("web-player.connect.device-picker.from-this-web-browser",{device_name:t.name})}),[e,t]);return r&&n&&a?{deviceName:r,playingFrom:r}:i?t?.transportType===Es.Yg.BLUETOOTH?{deviceName:t.name,playingFrom:s,formattedDeviceName:o}:{deviceName:"Wired Connection",playingFrom:s}:{deviceName:s,playingFrom:s}},Kf=()=>{const{deviceName:e}=Wf();return(0,R.jsx)(On.E,{variant:"titleSmall",semanticColor:"textBase",children:e})};var Yf=i(28906),qf=i(29107),Zf=i(39867);const $f=({onClick:e})=>{const{playingFrom:t}=Wf(),i=(0,qf.t)(),[{data:n}]=(0,Zf.K)(i.quality.streamingQuality);return void 0===n?null:(0,R.jsx)($o.v,{id:"qualitySetting",variant:"naked",title:u.Ru.get("desktop.settings.streamingQuality"),leading:(0,R.jsx)(Yf.s,{size:"small"}),subtitle:t,onClick:e,padding:"0px 12px"})};var Qf=i(4977),Jf=i(76174);const Xf=({title:e,description:t,confirmButtonText:i="OK",cancelButtonText:n="Cancel",onConfirm:r,onClose:a})=>{const{setCurrentView:s}=(0,b.useContext)(Mf),o=(0,Sr._Y)(),[l,c]=(0,b.useState)(!1),u=(0,b.useRef)(!1);return{dialog:l?(0,R.jsx)(Jf.T,{onClose:()=>{c(!1),a?.()},onConfirm:()=>{r(),u.current?o(Pe.$S.PUFFIN_BUTTON_CLICK):s(Lf.Overview)},titleText:e,"aria-label":e,descriptionText:t,cancelText:n,confirmText:i}):null,triggerDialog:(e=!1)=>{u.current=e,c(!0)}}},ev=()=>{const e=(0,Ye.N)();return{setCurrentDevice:(0,b.useCallback)((t=>{e.setCurrentDevice(t)}),[e]),removeCurrentDevice:(0,b.useCallback)((()=>{e.removeCurrentDevice()}),[e])}},tv=({spec:e})=>{const t=(0,Qe.s)(),i=(0,b.useRef)(null),{removeCurrentDevice:n}=ev(),{deviceFilterState:r}=(0,vc.j)();(0,La.X)("RESET_HEADPHONES_BUTTON",i);const{triggerDialog:a,dialog:s}=Xf({title:u.Ru.get("web-player.puffin.reset-headphones.dialog.title"),description:u.Ru.get("web-player.puffin.reset-headphones.dialog.subtitle"),confirmButtonText:u.Ru.get("web-player.puffin.reset-headphones.dialog.confirm"),onConfirm:()=>{n(),(0,La.I)("SETUP_HEADPHONES_BUTTON")},onClose:()=>{(0,La.I)("RESET_HEADPHONES_BUTTON")}});return r.isOnboarded?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)($o.v,{id:"resetHeadphonesButton",ref:i,variant:"naked",title:u.Ru.get("web-player.puffin.reset-headphones.menu-item"),leading:(0,R.jsx)(Qf.x,{size:"small"}),onClick:i=>{t.logInteraction(e.resetHeadphonesButtonFactory().hitUiReveal()),i.preventDefault(),a(!1)},padding:"0px 12px"}),s]}):null};var iv=i(36902);const nv=({isPlayingRemotely:e,spec:t})=>{const i=(0,Qe.s)(),{setCurrentView:n,viewTransitions:r}=(0,b.useContext)(Mf),a=r[Lf.Overview],s=(0,iv.j)();return(0,R.jsxs)("div",{children:[s&&(0,R.jsx)(R.Fragment,{children:(0,R.jsx)($f,{onClick:()=>{i.logInteraction(t.qualitySettingsButtonFactory().hitUiReveal()),n(a.settings)}})}),!e&&(0,R.jsx)(tv,{spec:t})]})};var rv=i(49217);const av="k4f1o0jOMnxv6OS8dC7p",sv=({title:e,subtitle:t,buttonLabel:i,onClick:n,focusTransferKey:r=null})=>{const a=(0,b.useRef)(null);return(0,La.X)(r,a),(0,R.jsx)($o.v,{variant:"naked",size:"lg",id:"getStarted",className:av,title:e,subtitle:t,paddingBlockStart:"16px",paddingBlockEnd:"16px",footer:(0,R.jsx)(rv.n,{size:"small",onClick:n,ref:a,children:(0,R.jsx)(On.E,{variant:"bodySmallBold",children:i})})})};var ov=i(69644),lv=i(21953),cv=i(40937);const uv=e=>{switch(e){case cv.Yn.LOSSLESS_24:return{title:u.Ru.get("web-player.pigeon.audio-quality.lossless"),titleFull:u.Ru.get("web-player.pigeon.audio-quality.lossless-24.label"),bitrateLabel:u.Ru.get("web-player.pigeon.audio-quality.lossless-24.bitrate"),bitrateDetails:[u.Ru.get("web-player.pigeon.audio-quality.lossless-24.bitrate-details-1"),u.Ru.get("web-player.pigeon.audio-quality.lossless-24.bitrate-details-2")]};case cv.Yn.LOSSLESS:return{title:u.Ru.get("web-player.pigeon.audio-quality.lossless"),titleFull:u.Ru.get("web-player.pigeon.audio-quality.lossless-16.label"),bitrateLabel:u.Ru.get("web-player.pigeon.audio-quality.lossless-16.bitrate"),bitrateDetails:[u.Ru.get("web-player.pigeon.audio-quality.lossless-16.bitrate-details-1"),u.Ru.get("web-player.pigeon.audio-quality.lossless-16.bitrate-details-2")]};case cv.Yn.VERY_HIGH:return{title:u.Ru.get("web-player.pigeon.audio-quality.very-high.label"),bitrateLabel:u.Ru.get("web-player.pigeon.audio-quality.very-high.bitrate"),bitrateDetails:[u.Ru.get("web-player.pigeon.audio-quality.very-high.bitrate-details")]};case cv.Yn.HIGH:return{title:u.Ru.get("web-player.pigeon.audio-quality.high.label"),bitrateLabel:u.Ru.get("web-player.pigeon.audio-quality.high.bitrate"),bitrateDetails:[u.Ru.get("web-player.pigeon.audio-quality.high.bitrate-details")]};case cv.Yn.NORMAL:return{title:u.Ru.get("web-player.pigeon.audio-quality.normal.label"),bitrateLabel:u.Ru.get("web-player.pigeon.audio-quality.normal.bitrate"),bitrateDetails:[u.Ru.get("web-player.pigeon.audio-quality.normal.bitrate-details")]};case cv.Yn.LOW:return{title:u.Ru.get("web-player.pigeon.audio-quality.low.label"),bitrateLabel:u.Ru.get("web-player.pigeon.audio-quality.low.bitrate"),bitrateDetails:[u.Ru.get("web-player.pigeon.audio-quality.low.bitrate-details")]};case cv.Yn.UNKNOWN:default:return{title:u.Ru.get("web-player.pigeon.audio-quality.unknown.label"),bitrateLabel:null}}},dv="SsVVyvM7DIniTIOjJFuM",mv="dHDe0DUG4UkEeM8p5PEa",pv="T49oF8shvnsadykMrogA",hv=({quality:e,onClick:t})=>{const i=uv(e),n=[cv.Yn.VERY_HIGH,cv.Yn.HIGH,cv.Yn.NORMAL,cv.Yn.LOW];e===cv.Yn.LOSSLESS_24?n.unshift(cv.Yn.LOSSLESS_24):n.unshift(cv.Yn.LOSSLESS);const r=e===cv.Yn.UNKNOWN?"textBase":"textBrightAccent";return(0,R.jsxs)(ov.a,{as:"button",variant:"tinted",className:dv,onClick:t,children:[(0,R.jsx)($o.v,{id:"quality",size:"lg",pretitle:u.Ru.get("web-player.pigeon.overview-card.title"),titleGap:lv.v4,title:(0,R.jsx)(On.E,{variant:"titleSmall",semanticColor:r,children:i.titleFull||i.title}),paddingInlineStart:"0px",paddingInlineEnd:"0px",variant:"naked"}),(0,R.jsx)("div",{children:n.map(((t,i)=>{const n=uv(t),r=t===e,a=r?"textBrightAccent":"textSubdued";return(0,R.jsx)($o.v,{id:n.title,size:"sm",paddingInlineStart:"0px",paddingInlineEnd:"0px",media:(0,R.jsx)("div",{className:At()(mv,{[pv]:r})}),title:(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:a,children:n.title}),trailing:(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:a,children:n.bitrateLabel}),variant:"naked"},i)}))})]})},gv=()=>(0,Ss.x)("onboarding-dismissed:lossless",!1);var fv=i(31923);const vv=({spec:e})=>{const t=(0,Qe.s)(),{setCurrentView:i,viewTransitions:n}=(0,b.useContext)(Mf),r=n[Lf.Overview],a=(0,iv.j)(),s=(0,fv.A)(),[o]=gv();return a?(0,R.jsxs)(R.Fragment,{children:[!o&&(0,R.jsx)(sv,{title:u.Ru.get("web-player.pigeon.get-started.title"),subtitle:u.Ru.get("web-player.pigeon.get-started.subtitle"),buttonLabel:u.Ru.get("web-player.pigeon.get-started.button"),onClick:()=>{t.logInteraction(e.losslessOnboardingButtonFactory().hitUiReveal()),i(r.onboardLossless)}}),(0,R.jsx)(hv,{quality:s,onClick:()=>{t.logInteraction(e.audioQualityCardFactory().hitUiReveal()),i(r.details)}})]}):null},yv=({isError:e})=>e?(0,R.jsx)($o.v,{id:"filterError",variant:"tinted",paddingBlockStart:"12px",paddingBlockEnd:"12px",paddingInlineStart:"16px",paddingInlineEnd:"16px",leading:(0,R.jsx)(Rm.b,{semanticColor:"textSubdued",size:"small"}),title:u.Ru.get("web-player.puffin.error-troubleshooting")}):null;var bv=i(57735);const _v="jvVll3Ia4Nrq9Fsd78Fo",Ev="d_HhOkLKxYpYKpP2gQy7",Cv="fLp9X9keK84drMHcmOFW",xv=({currentDeviceState:e,spec:t})=>{const i=(0,Qe.s)(),n=(0,b.useCallback)((()=>{i.logInteraction(t.optimizeToggleFactory().hitUiElementToggle()),e.toggleTuneHeadphones?.()}),[e,i,t]),r=(0,b.useCallback)((()=>{i.logInteraction(t.externalizeToggleFactory().hitUiElementToggle()),e.toggleTuneStudio?.()}),[e,t,i]),a=null!==e.toggleTuneHeadphones,s=e.contentRestrictions.externalizationRestricted,o=!!e.headphoneDevice&&!s;return(0,R.jsxs)("div",{className:_v,children:[(a||e.contentRestrictions.specificRestricted)&&(0,R.jsx)($o.v,{variant:"naked",size:"md",id:"headphones",className:Ev,disabled:e.contentRestrictions.specificRestricted,title:(0,R.jsx)(Qo.d,{className:Cv,children:u.Ru.get("web-player.puffin.listening-with.filters.specific-title")}),subtitle:u.Ru.get("web-player.puffin.listening-with.filters.specific-subtitle"),trailing:(0,R.jsx)(bv.l,{id:"headphoneTunes",onSelected:n,disabled:e.contentRestrictions.specificRestricted,value:e.currentState.specificEnabled,condensed:!0})}),(0,R.jsx)($o.v,{variant:"naked",size:"md",id:"studio",className:Ev,title:(0,R.jsx)(Qo.d,{className:Cv,children:u.Ru.get("web-player.puffin.listening-with.filters.externalization-title")}),subtitle:s?u.Ru.get("web-player.puffin.listening-with.filters.externalization-unavailable"):u.Ru.get("web-player.puffin.listening-with.filters.externalization-subtitle"),disabled:!o,trailing:(0,R.jsx)(bv.l,{id:"externalization",onSelected:r,disabled:!o,value:e.currentState.externalizationEnabled,condensed:!0})})]})},Sv="bLEXMWOER6nmfeLfBRIN",Av=({spec:e})=>{const t=(0,Qe.s)(),{setCurrentView:i,viewTransitions:n}=(0,b.useContext)(Mf),r=n[Lf.Overview],{deviceFilterState:a}=(0,vc.j)(),s=a.isOnboarded;return(0,R.jsx)($o.v,{id:"listeningWith",variant:"tinted",pretitle:u.Ru.get("web-player.puffin.listening-with.model"),horizontalGap:"0px",paddingBlockStart:"12px",paddingBlockEnd:"12px",paddingInlineStart:"16px",paddingInlineEnd:"16px",className:Sv,trailing:(0,R.jsx)(rv.n,{size:"small",onClick:()=>{t.logInteraction(e.changeModelButtonFactory().hitUiReveal()),i(r.selectManually)},children:(0,R.jsx)(On.E,{variant:"bodySmallBold",children:u.Ru.get("web-player.puffin.listening-with.change-model")})}),footer:s&&(0,R.jsx)(xv,{currentDeviceState:a,spec:e}),title:(0,R.jsx)(Qo.d,{lineClamp:2,children:a.headphoneDevice?.deviceName??u.Ru.get("web-player.puffin.listening-with.placeholder-model")})})},Tv=({spec:e})=>{const{setCurrentView:t,viewTransitions:i}=(0,b.useContext)(Mf),n=i[Lf.Overview],{deviceFilterState:r,isMaybeHeadphoneDevice:a,isError:s,isLoading:o}=(0,vc.j)(),l=(0,Qe.s)(),c=r.isOnboarded,d=a&&!c,m=(0,b.useCallback)((()=>{l.logInteraction(e.setupHeadphonesButtonFactory().hitUiReveal()),r.headphoneDevice?t(n.getStarted):t(n.selectManually,{showDialogOnBack:!0})}),[l,e,r.headphoneDevice,t,n.getStarted,n.selectManually]);return a?s||o?(0,R.jsx)(yv,{isError:s}):(0,R.jsxs)(R.Fragment,{children:[c&&(0,R.jsx)(Av,{spec:e}),d&&(0,R.jsx)(sv,{title:u.Ru.get("web-player.puffin.get-started.title"),subtitle:u.Ru.get("web-player.puffin.get-started.subtitle"),buttonLabel:u.Ru.get("web-player.puffin.get-started.button"),onClick:m,focusTransferKey:"SETUP_HEADPHONES_BUTTON"})]}):null},Iv="TJAbLKl8aSWZqWk4EFkk",Nv=Pe.$S.DEVICE_PICKER_BUTTON_CLICK,wv=()=>{const e=(0,Ja.l)(),{panelSend:t}=(0,Sr.AI)(Ar.Z.DevicePicker,Ar.Z.DevicePickerOverlay),i=(0,iv.j)(),n=wc(),{spec:r,logger:a}=(0,Hi.r)(Gf.R,{}),o=!e&&n,l=(0,s.NC)(Ce.VUN),c=(0,b.useCallback)((()=>{a.logInteraction(r.backButtonFactory().hitUiReveal()),t(Nv)}),[a,t,r]);return(0,R.jsx)(Pf,{onBack:l?c:void 0,onClose:()=>{a.logInteraction(r.closeButtonFactory().hitUiHide())},children:(0,R.jsxs)("div",{className:Iv,children:[(0,R.jsx)(Kf,{}),o&&(0,R.jsx)(Tv,{spec:r}),i&&(0,R.jsx)(vv,{spec:r}),(0,R.jsx)(nv,{isPlayingRemotely:e,spec:r})]})})};var Rv=i(54963),kv=i(68566),Ov=i(34799),Pv=i(59996);let Lv=function(e){return e.INFO="INFO",e.ERROR="ERROR",e}({});function jv(e){return e.type===Lv.ERROR}function Dv(e){return e.type===Lv.INFO}var Mv=i(29159);const Uv="UPAv6TbmqM79jDLYgiad",Bv=({card:{type:e,id:t,title:i,text:n}})=>(0,R.jsx)($o.v,{id:t,className:Uv,variant:"tinted",leading:e===Lv.ERROR?(0,R.jsx)(Ov.Z,{size:"small",semanticColor:"textWarning"}):null,title:(0,R.jsx)(Qo.d,{variant:"ballad",children:i}),body:"string"==typeof n?(0,R.jsx)(Mv.y,{LinkComponent:Pv.N,source:n,splitter:/\|/g,semanticColor:"textSubdued",variant:"mesto"}):n});var Fv=i(75930),Hv=i(42425);const Vv="GdqxZ88oz8MtwHaBnwgb",Gv="Q4TWj1C8EEkH_beo9jI8",zv="slKZiyNh_zlnTSEo8VG7",Wv="ichtbB4QY2SKusRio97a",Kv="xTMuOBwhiZlpUZtnm0M6";let Yv=function(e){return e[e.PASSING=0]="PASSING",e[e.NEEDS_ATTENTION=1]="NEEDS_ATTENTION",e[e.UNKNOWN=2]="UNKNOWN",e}({});const qv=({metric:e,label:t,severity:i})=>(0,R.jsxs)("div",{className:At()(Vv,{[Wv]:i===Yv.UNKNOWN}),children:[(()=>{switch(i){case Yv.PASSING:return(0,R.jsx)(Fv.k,{size:"large",className:Gv,semanticColor:"textBase"});case Yv.NEEDS_ATTENTION:return(0,R.jsx)(Ov.Z,{size:"large",className:zv,semanticColor:"textWarning"});case Yv.UNKNOWN:return(0,R.jsx)(Hv.N,{size:"large",className:zv,semanticColor:"textBase"});default:return null}})(),(0,R.jsxs)("div",{className:Kv,children:[(0,R.jsx)(On.E,{as:"p",variant:"bodyMedium",semanticColor:"textBase",children:e}),(0,R.jsx)(On.E,{as:"p",semanticColor:"textSubdued",variant:"bodySmall",children:t})]})]});let Zv=function(e){return e.bitrateLevel="bitrateLevel",e.targetBitrateLevel="targetBitrateLevel",e.targetBitrateAvailable="targetBitrateAvailable",e.strategy="strategy",e.isLocal="isLocal",e.autoAdjust="autoAdjust",e.deviceSupported="deviceSupported",e}({}),$v=function(e){return e.Bluetooth_Degrades_Lossless="Bluetooth_Degrades_Lossless",e.Connect_Explanation="Connect_Explanation",e.Default_To_Very_High="Default_To_Very_High",e.Need_To_Redownload="Need_To_Redownload",e.Opt_Out_Of_Downgrade="Opt_Out_Of_Downgrade",e.Poor_Bandwidth_Interferes="Poor_Bandwidth_Interferes",e.Lossless_Unavailable="Lossless_Unavailable",e.Listen_Offline="Listen_Offline",e.Update_Setting="Update_Setting",e}({}),Qv=function(e){return e[e.Internet=0]="Internet",e[e.Spotify_Connect=1]="Spotify_Connect",e[e.Downloads=2]="Downloads",e}({}),Jv=function(e){return e.Good="good",e.Poor="poor",e.Unknown="unknown",e.Unavailable="unavailable",e}({});const Xv=[{criteria:{online:!0,autoAdjust:!1,trackLosslessAvailable:!0},result:$v.Opt_Out_Of_Downgrade},{criteria:{online:!0,streamingLossless:!1,targetingLossless:!0,deviceCompatible:!0,internetBandwidth:Jv.Poor,trackLosslessAvailable:!0},result:$v.Poor_Bandwidth_Interferes},{criteria:{online:!0,autoAdjust:!0,streamingLossless:!1,targetingLossless:!1,deviceCompatible:!0,internetBandwidth:Jv.Poor,trackLosslessAvailable:!0},result:$v.Default_To_Very_High},{criteria:{online:!0,streamingLossless:!1,bitrateStrategy:[cv.ZT.OFFLINED_FILE],trackLosslessAvailable:!0},result:$v.Need_To_Redownload},{criteria:{online:!0,targetingLossless:!0,trackLosslessAvailable:!1},result:$v.Lossless_Unavailable},{criteria:{online:!0,isSetStreamingQualityLessThanLossless:!0},result:$v.Update_Setting}];const ey=[{criteria:{bitrateLevel:[cv.Yn.LOSSLESS],strategy:[cv.ZT.BEST_MATCHING,cv.ZT.BACKEND_ADVISED,cv.ZT.CACHED_FILE],deviceSupported:!0,autoAdjust:!0},result:Jv.Good},{criteria:{bitrateLevel:[cv.Yn.LOW,cv.Yn.NORMAL,cv.Yn.HIGH,cv.Yn.VERY_HIGH],targetBitrateLevel:[cv.Yn.LOW,cv.Yn.NORMAL,cv.Yn.HIGH,cv.Yn.VERY_HIGH],strategy:[cv.ZT.BEST_MATCHING,cv.ZT.CACHED_FILE],deviceSupported:!0,autoAdjust:!0},result:Jv.Good},{criteria:{bitrateLevel:[cv.Yn.LOW,cv.Yn.NORMAL,cv.Yn.HIGH,cv.Yn.VERY_HIGH],targetBitrateLevel:[cv.Yn.LOSSLESS],strategy:[cv.ZT.BEST_MATCHING,cv.ZT.BACKEND_ADVISED,cv.ZT.CACHED_FILE],targetBitrateAvailable:!0,deviceSupported:!0,autoAdjust:!0},result:Jv.Poor},{criteria:{bitrateLevel:[cv.Yn.LOW,cv.Yn.NORMAL,cv.Yn.HIGH,cv.Yn.VERY_HIGH],targetBitrateLevel:[cv.Yn.LOW,cv.Yn.NORMAL,cv.Yn.HIGH,cv.Yn.VERY_HIGH],strategy:[cv.ZT.BACKEND_ADVISED],deviceSupported:!0,autoAdjust:!0},result:Jv.Poor},{criteria:{bitrateLevel:[cv.Yn.LOW,cv.Yn.NORMAL,cv.Yn.HIGH,cv.Yn.VERY_HIGH],targetBitrateLevel:[cv.Yn.LOSSLESS],targetBitrateAvailable:!1,deviceSupported:!0,autoAdjust:!0},result:Jv.Unavailable},{criteria:{autoAdjust:!1},result:Jv.Unknown},{criteria:{deviceSupported:!1},result:Jv.Unknown}],ty=[{criteria:{bitrateLevel:[cv.Yn.LOSSLESS,cv.Yn.LOSSLESS_24],deviceSupported:!0},result:!0},{criteria:{bitrateLevel:[cv.Yn.UNKNOWN,cv.Yn.LOW,cv.Yn.NORMAL,cv.Yn.HIGH,cv.Yn.VERY_HIGH],strategy:[cv.ZT.BEST_MATCHING,cv.ZT.BACKEND_ADVISED,cv.ZT.CACHED_FILE],targetBitrateLevel:[cv.Yn.LOSSLESS,cv.Yn.LOSSLESS_24],targetBitrateAvailable:!0,deviceSupported:!0},result:!0},{criteria:{bitrateLevel:[cv.Yn.UNKNOWN,cv.Yn.LOW,cv.Yn.NORMAL,cv.Yn.HIGH,cv.Yn.VERY_HIGH],strategy:[cv.ZT.OFFLINED_FILE],targetBitrateLevel:[cv.Yn.LOSSLESS,cv.Yn.LOSSLESS_24],targetBitrateAvailable:!0,deviceSupported:!0},result:!1},{criteria:{strategy:[cv.ZT.BEST_MATCHING,cv.ZT.BACKEND_ADVISED,cv.ZT.CACHED_FILE],targetBitrateAvailable:!0,deviceSupported:!0},result:!1},{criteria:{deviceSupported:!1},result:!0},{criteria:{bitrateLevel:[cv.Yn.UNKNOWN,cv.Yn.LOW,cv.Yn.NORMAL,cv.Yn.HIGH,cv.Yn.VERY_HIGH],targetBitrateLevel:[cv.Yn.LOSSLESS,cv.Yn.LOSSLESS_24],targetBitrateAvailable:!1,deviceSupported:!0},result:!0},{criteria:{targetBitrateLevel:[cv.Yn.LOSSLESS,cv.Yn.LOSSLESS_24]},result:!0}],iy=(e,t)=>{for(const[i,n]of Object.entries(t.criteria))if(i===Zv.bitrateLevel){if(!n.includes(e[Zv.bitrateLevel]))return!1}else if(i===Zv.targetBitrateLevel){if(!n.includes(e[Zv.targetBitrateLevel]))return!1}else if(i===Zv.strategy){if(!n.includes(e[Zv.strategy]))return!1}else{if(!n===e[i])return!1}return!0},ny=e=>[cv.Yn.LOSSLESS,cv.Yn.LOSSLESS_24].includes(e);var ry=i(26328);const ay={losslessStatus:cv.p4.NONE,bitrateLevel:cv.Yn.UNKNOWN,targetBitrateLevel:cv.Yn.UNKNOWN,targetBitrateAvailable:!1,strategy:cv.ZT.UNKNOWN};function sy(){const{losslessStatus:e,bitrateLevel:t,targetBitrateLevel:i,targetBitrateAvailable:n,strategy:r}=(0,gi.o)((e=>({...ay,...e?.playbackQuality??null})),ln.a),a=(0,Ja.l)(),s=(0,qf.t)(),[{data:o}]=(0,Zf.K)(s.quality.streamingQuality),[{data:l}]=(0,Zf.K)(s.quality.remoteQuality),c=(0,ca.v)((e=>e.activeDevice)),u=(0,b.useMemo)((()=>null!==c&&c.losslessSupport?c.losslessSupport:{fullySupported:!1,deviceSupported:!1,userEligible:!1}),[c]).deviceSupported,{settings:{values:d}}=(0,_m.t0)(),m=d["audio.allow_downgrade"],p=c?.isLocal||!1;let h;h=p?r===cv.ZT.CACHED_FILE||r===cv.ZT.OFFLINED_FILE?Qv.Downloads:Qv.Internet:Qv.Spotify_Connect;const g={bitrateLevel:t,targetBitrateLevel:i,targetBitrateAvailable:n,strategy:r,isLocal:p,deviceSupported:u,autoAdjust:m},f=(e=>{for(const t of ty)if(iy(e,t))return t.result;return!(!ny(e[Zv.bitrateLevel])&&!ny(e[Zv.targetBitrateLevel]))})(g),v=(e=>{for(const t of ey)if(iy(e,t))return t.result;return e[Zv.strategy]===cv.ZT.BACKEND_ADVISED?Jv.Poor:Jv.Good})(g),y=(0,Ym.n)(),_=ny(i)&&n,E=ny(t),C=ny(i),x=a?l?.streamingQuality:o,S=function({online:e,streamingLossless:t,targetingLossless:i,strategy:n,trackLosslessAvailable:r,autoAdjust:a,internetBandwidth:s,losslessCompatibleDevice:o,isLocal:l,isSetStreamingQualityLessThanLossless:c}){const u=[$v.Listen_Offline,$v.Connect_Explanation,$v.Bluetooth_Degrades_Lossless];for(const d of Xv){const{criteria:m,result:p}=d;m.online===e&&(void 0!==m.autoAdjust&&m.autoAdjust!==a||void 0!==m.streamingLossless&&m.streamingLossless!==t||void 0!==m.targetingLossless&&m.targetingLossless!==i||void 0!==m.deviceCompatible&&m.deviceCompatible!==o||void 0!==m.bitrateStrategy&&!1===l||(void 0===m.bitrateStrategy||void 0!==n&&m.bitrateStrategy.includes(n))&&(void 0!==m.internetBandwidth&&m.internetBandwidth!==s||void 0!==m.trackLosslessAvailable&&m.trackLosslessAvailable!==r||void 0!==m.isSetStreamingQualityLessThanLossless&&m.isSetStreamingQualityLessThanLossless!==c||u.push(p)))}return u}({online:y,streamingLossless:E,targetingLossless:C,strategy:r,trackLosslessAvailable:_,autoAdjust:m,internetBandwidth:v,losslessCompatibleDevice:u,isLocal:p,isSetStreamingQualityLessThanLossless:!!x&&x<ry.a1.LOSSLESS&&x>ry.a1.AUTOMATIC});return{losslessStatus:e,bitrateLevel:t,flags:S,internetBandwidth:v,playingVia:{channelIsLossless:f,channel:h},losslessCompatibleDevice:u}}const oy=()=>{const{losslessCompatibleDevice:e,playingVia:t,internetBandwidth:i}=sy();return(0,R.jsxs)("div",{children:[(0,R.jsx)(qv,{metric:u.Ru.get("web-player.pigeon.audio-quality.lossless-compatible-device"),label:e?u.Ru.get("hifi.yes"):u.Ru.get("hifi.no"),severity:e?Yv.PASSING:Yv.NEEDS_ATTENTION}),(0,R.jsx)(qv,{metric:u.Ru.get("hifi.playingVia"),label:(()=>{const{channel:e}=t;switch(e){case Qv.Downloads:return u.Ru.get("local-files.source.downloads");case Qv.Internet:return u.Ru.get("hifi.networkConnection");case Qv.Spotify_Connect:return u.Ru.get("spotify-connect");default:return""}})(),severity:t.channelIsLossless?Yv.PASSING:Yv.NEEDS_ATTENTION}),(0,R.jsx)(qv,{metric:u.Ru.get("hifi.internetBandwidth"),label:(()=>{switch(i){case Jv.Good:return u.Ru.get("hifi.good");case Jv.Poor:return u.Ru.get("hifi.poor");case Jv.Unknown:default:return u.Ru.get("hifi.unknown")}})(),severity:(()=>{switch(i){case Jv.Good:return Yv.PASSING;case Jv.Poor:return Yv.NEEDS_ATTENTION;case Jv.Unknown:default:return Yv.UNKNOWN}})()})]})},ly={[$v.Listen_Offline]:()=>({type:"info",title:u.Ru.get("web-player.pigeon.help-cards.listen-offline.title"),message:u.Ru.get("web-player.pigeon.help-cards.listen-offline.body")}),[$v.Connect_Explanation]:()=>({type:"info",title:u.Ru.get("web-player.pigeon.help-cards.connect-explanation.title"),message:(0,R.jsx)(On.E,{semanticColor:"textSubdued",children:u.Ru.get("web-player.pigeon.help-cards.connect-explanation.body",(0,R.jsx)(Ul.g,{size:"xsmall",alignmentBaseline:"baseline"}))})}),[$v.Bluetooth_Degrades_Lossless]:()=>({type:"info",title:u.Ru.get("web-player.pigeon.help-cards.bluetooth-degrades-lossless.title"),message:u.Ru.get("web-player.pigeon.help-cards.bluetooth-degrades-lossless.body")}),[$v.Opt_Out_Of_Downgrade]:()=>({type:"error",title:u.Ru.get("web-player.pigeon.help-cards.opt-out-of-downgrade.title"),message:u.Ru.get("web-player.pigeon.help-cards.opt-out-of-downgrade.body")}),[$v.Poor_Bandwidth_Interferes]:()=>({type:"error",title:u.Ru.get("web-player.pigeon.help-cards.poor-bandwidth-interferes.title"),message:u.Ru.get("web-player.pigeon.help-cards.poor-bandwidth-interferes.body")}),[$v.Default_To_Very_High]:()=>({type:"error",title:u.Ru.get("web-player.pigeon.help-cards.default-to-very-high.title"),message:u.Ru.get("web-player.pigeon.help-cards.default-to-very-high.body")}),[$v.Need_To_Redownload]:()=>({type:"error",title:u.Ru.get("web-player.pigeon.help-cards.need-to-redownload.title"),message:u.Ru.get("web-player.pigeon.help-cards.need-to-redownload.body")}),[$v.Lossless_Unavailable]:()=>({type:"error",title:u.Ru.get("web-player.pigeon.help-cards.lossless-unavailable.title"),message:u.Ru.get("web-player.pigeon.help-cards.lossless-unavailable.body")}),[$v.Update_Setting]:()=>({type:"error",title:u.Ru.get("web-player.pigeon.help-cards.update-settings.title"),message:u.Ru.get("web-player.pigeon.help-cards.update-settings.body")})},cy="BFsg6KnXzCo_ZKKekrFC",uy="OIOUgecXCtVCX_DzOsR4",dy="qcU9Wt2Ly1y44H_lC327",my=()=>{const{toPreviousView:e}=(0,b.useContext)(Mf),t=(0,fv.A)(),i=uv(t),n=(()=>{const{flags:e}=sy(),t=[];return e.forEach((e=>{if(ly[e]){const{type:i,message:n,title:r}=ly[e]();"info"===i?t.push({id:e,text:n,title:r,type:Lv.INFO}):t.push({id:e,text:n,title:r??"",type:Lv.ERROR})}})),t})(),r=n.some(jv),a=n.filter(r?jv:Dv);return(0,R.jsx)(Pf,{onBack:e,children:(0,R.jsxs)("div",{className:cy,children:[(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",children:u.Ru.get("web-player.pigeon.overview-card.title")}),(0,R.jsx)(On.E,{variant:"titleMedium",semanticColor:"textBrightAccent",children:i.titleFull||i.title}),(0,R.jsx)("div",{className:uy,children:i.bitrateDetails?.map(((e,t)=>(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textBrightAccent",children:e},`bitrate-details-${t}`)))}),(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textBrightAccent"}),(0,R.jsx)("div",{className:dy,children:(0,R.jsx)(oy,{})}),a.map((e=>(0,R.jsx)(Bv,{card:e},e.id)))]})})},py=({subtitles:e})=>(0,R.jsx)(R.Fragment,{children:e.map(((e,t)=>(0,R.jsx)(On.E,{semanticColor:"textSubdued",variant:"bodySmall",children:e},`subtitle-${t}`)))}),hy="ZExuZhVAKsqOBfFdR6Js",gy="G5KBejq8q3GSZxhHs9be",fy="WG0sT27gl2zSvisQcgHS",vy="iUbPCgoUSkOoOVEo5wnr",yy="NCUCNjFgGqpox8ttJKch",by=({title:e,isLossless:t})=>(0,R.jsxs)("div",{className:gy,children:[(0,R.jsx)(On.E,{variant:"bodyMedium",semanticColor:"textBase",children:e}),t&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(On.E,{variant:"bodyMedium",semanticColor:"textBase",children:"•"}),(0,R.jsx)(On.E,{variant:"bodyMedium",semanticColor:"textBrightAccent",children:"Highest"})]})]});var _y=i(49447);const Ey=({onClick:e,quality:t,playQuality:i,maxQuality:n})=>{const{title:r,subtitles:a}=(e=>{switch(e){case ry.a1.LOSSLESS:return{title:"Lossless",subtitles:["Up to 2117 kbps • 15.9 MB/min","24-bit/44.1kHz • FLAC"]};case ry.a1.VERY_HIGH:return{title:"Very High",subtitles:["320 kbps • 2 MB/min"]};case ry.a1.HIGH:return{title:"High",subtitles:["160 kbps • 1 MB/min"]};case ry.a1.MEDIUM:return{title:"Normal",subtitles:["96 kbps • 0.6 MB/min"]};case ry.a1.LOW:return{title:"Low data",subtitles:["24 kbps • 0.2 MB/min"]};default:return{title:null,subtitles:null}}})(t);if(null===r||null===a)return null;const s=i===t,o=t===ry.a1.LOSSLESS,l=null===n||t<=n;return(0,R.jsx)($o.v,{id:"title",variant:"naked",verticalGap:"2px","aria-disabled":!l,onClick:e,onClickHint:u.Ru.get("web-player.pigeon.quality-settings.option-hint",r),title:(0,R.jsx)(by,{title:r,isLossless:o}),subtitle:(0,R.jsx)(py,{subtitles:a}),trailing:s?(0,R.jsx)(Zs.i,{semanticColor:"textBrightAccent"}):void 0})},Cy=()=>{const{toPreviousView:e}=(0,b.useContext)(Mf),t=(0,Ja.l)(),{playingFrom:i}=Wf(),n=(0,qf.t)(),[{data:r},{mutate:a}]=(0,Zf.K)(n.quality.streamingQuality),[{data:s},{mutate:o}]=(0,Zf.K)(n.quality.autoAdjustQuality),[{data:l},{mutate:c}]=(0,Zf.K)(n.quality.remoteQuality),d=(0,_y.x)();if(void 0===d||void 0===s||void 0===r)return null;let m=r,p=a,h=null;return t&&l&&(m=l.streamingQuality,h=l.maxSupportedQuality,p=e=>c({...l,streamingQuality:e})),(0,R.jsxs)(Pf,{onBack:e,children:[(0,R.jsxs)("div",{className:yy,children:[(0,R.jsx)(On.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("web-player.pigeon.quality-settings.title")}),(0,R.jsx)(On.E,{semanticColor:"textSubdued",variant:"bodySmall",children:i})]}),(0,R.jsx)("div",{className:hy,children:d.sort(((e,t)=>e.quality-t.quality)).map(((e,t)=>(0,R.jsx)(Ey,{quality:e.quality,playQuality:m,maxQuality:h,onClick:()=>p(e.quality)},t)))}),(0,R.jsx)(On.E,{children:u.Ru.get("web-player.pigeon.quality-settings.disclaimer")}),(0,R.jsxs)("div",{className:fy,children:[(0,R.jsx)(On.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:u.Ru.get("web-player.pigeon.quality-settings.listening-preferences")}),(0,R.jsx)($o.v,{className:vy,variant:"naked",size:"sm",id:"auto-adjust-quality",horizontalGap:"0px",title:(0,R.jsx)(On.E,{variant:"bodyMedium",semanticColor:"textBase",children:u.Ru.get("web-player.pigeon.quality-settings.auto-adjust-quality")}),trailing:(0,R.jsx)(bv.l,{id:"desktop.settings.automatic-downgrade",value:s,onSelected:o,condensed:!0})}),(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",children:u.Ru.get("web-player.pigeon.quality-settings.auto-adjust-quality.subtitle-1")}),(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",children:u.Ru.get("web-player.pigeon.quality-settings.auto-adjust-quality.subtitle-2")})]})]})};var xy=i(91560),Sy=i(9611);const Ay="UxZdDYEyLTJdUVpcSnlV",Ty="KXFkGj2bdr7rfC0HRdTi",Iy="TqkE5hxy46SuLhy0G9cy",Ny="YKL9qmE1RkxVGwMWO0BA",wy="h5AweT1mqDOSIZgfCish",Ry="m9h5qSziGER706uY2RLQ",ky="roi2AXSegdwgxetjZCoR",Oy="BesfnZjOMC7EyA1hspnm",Py="SVskamipP2YH1djc_0Jk",Ly=({path:e,loop:t=!0})=>(0,R.jsx)("div",{className:Iy,children:(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(Sy.o,{loop:t,autoplay:!0,path:e,className:Ny,style:{width:"auto",height:"100%"}})})});var jy=i(57276),Dy=i(38861);const My=({imageUrl:e})=>{const t=(0,Dy.dZ)(),{max:i}=(0,Sr.Zf)();return(0,R.jsx)("div",{className:Iy,children:(0,R.jsx)(jy._,{className:wy,src:t(e,i),loading:"eager"})})},Uy=({icon:e,text:t,highlighted:i,condensed:n=!1})=>(0,R.jsxs)("div",{className:ky,children:[(0,R.jsx)(e,{size:n?"xsmall":"small",semanticColor:"textBase",className:At()({[Oy]:i})}),(0,R.jsx)(On.E,{variant:n?"marginalBold":"bodySmallBold",semanticColor:"textBase",className:At()({[Oy]:i}),children:t})]}),By={[bf.E.SMALL]:{titleVariant:"bodyMediumBold",subtitleVariant:"marginal",textGap:0,buttonGap:12},[bf.E.MEDIUM]:{titleVariant:"titleSmall",subtitleVariant:"bodySmall",textGap:4,buttonGap:24},[bf.E.LARGE]:{titleVariant:"titleMedium",subtitleVariant:"bodyMedium",textGap:8,buttonGap:32}},Fy=({title:e,subtitle:t,footer:i,lottiePath:n,isLossless:r=!1,imageUrl:a,loopAnimation:s=!0})=>{const o=(0,_f.y)(),{titleVariant:l,subtitleVariant:c,textGap:d,buttonGap:m}=(0,b.useMemo)((()=>{let e=bf.E.MEDIUM;switch(o){case bf.E.XSMALL:case bf.E.SMALL:e=bf.E.SMALL;break;case bf.E.LARGE:case bf.E.XLARGE:e=bf.E.LARGE;case bf.E.MEDIUM:}return By[e]}),[o]);return(0,R.jsxs)("div",{className:Ay,children:[n&&(0,R.jsx)(Ly,{path:n,loop:s}),a&&(0,R.jsx)(My,{imageUrl:a}),(0,R.jsxs)("div",{className:Ty,style:{"--intro-button-gap":`${m}px`,"--intro-title-gap":`${d}px`,"--sticky-bottom-margin":r?"32px":"16px"},children:[(0,R.jsxs)("div",{className:Ry,children:[(0,R.jsx)(Uy,{icon:r?xy.Q:lc.C,text:r?"Lossless":u.Ru.get("web-player.puffin.signifier-text"),highlighted:!0,condensed:o===bf.E.SMALL}),(0,R.jsx)(On.E,{variant:l,semanticColor:"textBase",children:e}),t&&(0,R.jsx)(On.E,{variant:c,semanticColor:"textSubdued",children:t})]}),(0,R.jsx)("div",{className:Py,children:i})]})]})},Hy=({variant:e,text:t,onClick:i,condensed:n=!1})=>{const r=(0,_f.y)();return"tertiary"===e?(0,R.jsx)(ei.H,{semanticColor:"textSubdued",size:r===bf.E.LARGE?"medium":"small",onClick:i,condensed:n,children:t}):(0,R.jsx)(Ln.$,{colorSet:"invertedLight",size:r===bf.E.LARGE?"medium":"small",onClick:i,children:t})},Vy="CADzxuSMrDX6zEEr7B_U",Gy="ey4ibcORBFukgwU6qSNW",zy="zNf70A9riC2cviRuh6iN",Wy=({nrSteps:e,atStep:t})=>(0,R.jsx)("div",{className:Vy,children:Array.from({length:e}).map(((e,i)=>(0,R.jsx)("div",{className:At()(Gy,{[zy]:t===i})},i)))}),Ky=[{get title(){return u.Ru.get("web-player.pigeon.introduction.step-1.title")},get subtitle(){return u.Ru.get("web-player.pigeon.introduction.step-1.subtitle")},get buttonLabel(){return u.Ru.get("web-player.pigeon.introduction.button.next")},get imageUrl(){return"spotify:image:ab671fcc00009256c4d947fba90f6244343446ee"}},{get title(){return u.Ru.get("web-player.pigeon.introduction.step-2.title")},get subtitle(){return u.Ru.get("web-player.pigeon.introduction.step-2.subtitle")},get buttonLabel(){return u.Ru.get("web-player.pigeon.introduction.button.next")},get imageUrl(){return"spotify:image:ab671fcc00005e4e6fd833f6f5c2cf4f81c1da66"}},{get title(){return u.Ru.get("web-player.pigeon.introduction.step-3.title")},get subtitle(){return u.Ru.get("web-player.pigeon.introduction.step-3.subtitle")},get buttonLabel(){return u.Ru.get("web-player.pigeon.introduction.button.next")},get imageUrl(){return"spotify:image:ab671fcc000092564a451c0c1fba3acf8fed995f"}},{get title(){return u.Ru.get("web-player.pigeon.introduction.step-4.title")},get subtitle(){return u.Ru.get("web-player.pigeon.introduction.step-4.subtitle")},get buttonLabel(){return u.Ru.get("web-player.pigeon.introduction.button.done")},get imageUrl(){return"spotify:image:ab671fcc000092562f3465b95599cdb50e47604e"}}],Yy=()=>{const[e,t]=(0,b.useState)(0),[i,n]=gv(),{setCurrentView:r,toPreviousView:a,viewTransitions:s}=(0,b.useContext)(Mf),o=s[Lf.DiscoverLossless],{title:l,subtitle:c,buttonLabel:u,imageUrl:d}=Ky[e];return(0,R.jsxs)(Pf,{titleSlot:(0,R.jsx)(mc,{variant:"bodySmallBold"}),onBack:()=>{e>0?t((e=>e-1)):a()},onClose:()=>r(o.continue),preventDefaultClose:!0,children:[(0,R.jsx)(Fy,{isLossless:!0,title:l,subtitle:c,imageUrl:d,footer:(0,R.jsx)(Hy,{variant:"primary",text:u,onClick:()=>{3===e?(n(!0),r(o.continue)):t((e=>e+1))}})}),(0,R.jsx)(Wy,{nrSteps:4,atStep:e})]})};var qy=i(1689);const Zy=()=>{const{setCurrentView:e,viewTransitions:t}=(0,b.useContext)(Mf),{deviceFilterState:i,isMaybeHeadphoneDevice:n,isLoading:r}=(0,vc.j)(),a=t[Lf.ActivationDetection];(0,b.useLayoutEffect)((()=>{i.headphoneDevice||r||!n||e(Lf.ManualSelection,{showDialogOnBack:!0})}),[i.headphoneDevice,r,n,e]);const s=(0,b.useMemo)((()=>i.headphoneDevice?.deviceName?.toLowerCase().includes("airpods")??!1),[i.headphoneDevice]);return(0,R.jsx)(Fy,{title:u.Ru.get("web-player.puffin.activation-2.title",i.headphoneDevice?.deviceName),lottiePath:(0,Gl.b)("animations/puffin-onboarding-tour-2.json"),loopAnimation:!1,footer:r||!i.headphoneDevice?(0,R.jsx)(qy.m,{}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Hy,{variant:"primary",text:u.Ru.get("web-player.puffin.activation-2.button-confirm"),onClick:()=>{e(s?a.airpods:a.continue)}}),(0,R.jsx)(Hy,{variant:"tertiary",text:u.Ru.get("web-player.puffin.activation-2.button-cancel"),onClick:()=>{e(a.selectManually)},condensed:!0})]})})};var $y=i(12419);const Qy=({onClick:e})=>{const{deviceFilterState:t}=(0,vc.j)(),{setCurrentDevice:i}=ev(),n=(0,ve.vh)(),{setCurrentView:r}=(0,b.useContext)(Mf),a=(0,b.useCallback)((async()=>{i(t.headphoneDevice);try{await t.setFilterState({specificEnabled:!!t.toggleTuneHeadphones,externalizationEnabled:!!t.toggleTuneStudio})}catch{return void r(Lf.Error)}((e,t)=>{e.send((0,$y.d)({has_tuner:!!t.toggleTuneHeadphones,filter_brand:t.headphoneDevice?.brand??null,filter_model:t.headphoneDevice?.model??null,was_predicted:!!t.predictedState,headphone_name_over_bluetooth:t.audioDevice?.transportType===Es.Yg.BLUETOOTH?t.audioDevice.name:null,external_accessory_mapping_predicted_brand:t.predictedState?.predictedBrand??null,external_accessory_mapping_predicted_model:t.predictedState?.predictedModel??null}))})(n,t),e()}),[t,n,e,i,r]);return(0,R.jsx)(Hy,{variant:"primary",text:u.Ru.get("web-player.puffin.button.done"),onClick:a})},Jy=({text:e,onClick:t})=>(0,R.jsx)(Hy,{variant:"primary",text:e,onClick:async()=>{t()}}),Xy=()=>{const{deviceFilterState:e,isLoading:t}=(0,vc.j)(),{setCurrentView:i,viewTransitions:n}=(0,b.useContext)(Mf),r=n[Lf.ActivationIntro];return(0,R.jsx)(Fy,{title:u.Ru.get("web-player.puffin.activation-1.title"),lottiePath:(0,Gl.b)("animations/puffin-onboarding-tour-1.json"),footer:t||!e.headphoneDevice?(0,R.jsx)(qy.m,{}):(0,R.jsx)(R.Fragment,{children:e.toggleTuneHeadphones?(0,R.jsx)(Jy,{text:u.Ru.get("web-player.puffin.activation-1.button"),onClick:()=>{i(r.continue)}}):(0,R.jsx)(Qy,{onClick:()=>{i(r.activate)}})})})},eb=()=>{const{setCurrentView:e,viewTransitions:t}=(0,b.useContext)(Mf),i=t[Lf.ActivationSignifiers];return(0,R.jsx)(Fy,{title:u.Ru.get("web-player.puffin.activation-3.title"),subtitle:u.Ru.get("web-player.puffin.activation-3.subtitle"),imageUrl:"spotify:image:ab671fcc00005e4ed89275c5e4eef1d432ac3fe2",footer:(0,R.jsx)(Qy,{onClick:()=>{e(i.activate)}})})},tb="FcycLYpZEbmuEClARSPP",ib="NSoA0u_DehEmTu_M20Qn",nb="fGnSEIwIPGid9ALC9ANP",rb="ZknipG1So_RdKeJ911k3",ab=({number:e,message:t})=>(0,R.jsxs)("div",{className:nb,children:[(0,R.jsx)("div",{className:rb,children:(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textBase",children:e})}),(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",children:t})]}),sb=()=>{const{setCurrentView:e}=(0,b.useContext)(Mf);return(0,R.jsxs)("div",{className:tb,children:[(0,R.jsx)(On.E,{variant:"titleSmall",semanticColor:"textBase",children:"We cant detect your headphones"}),(0,R.jsxs)("div",{className:ib,children:[(0,R.jsx)(ab,{number:1,message:"Make sure Bluetooth is turned on."}),(0,R.jsx)(ab,{number:2,message:"Make sure your headphones are connected. Try restarting them."}),(0,R.jsx)(ab,{number:3,message:"Make sure that only one set of headphones are connected."}),(0,R.jsx)(ab,{number:4,message:"Using speakers or another device? Externalize and Optimize are only available for headphones."})]}),(0,R.jsx)(ei.H,{semanticColor:"textSubdued",onClick:()=>{e(Lf.Overview)},children:"Still not working"})]})},ob=()=>{const{removeCurrentDevice:e}=ev();return Xf({title:u.Ru.get("web-player.puffin.activation-dialog.title"),description:u.Ru.get("web-player.puffin.activation-dialog.subtitle"),confirmButtonText:u.Ru.get("web-player.puffin.activation-dialog.button-cancel"),cancelButtonText:u.Ru.get("web-player.puffin.activation-dialog.button-confirm"),onConfirm:()=>{e(),(0,La.I)("SETUP_HEADPHONES_BUTTON")}})},lb=({type:e})=>{const{isMaybeHeadphoneDevice:t}=(0,vc.j)(),{triggerDialog:i,dialog:n}=ob();return(0,R.jsx)(Pf,{titleSlot:(0,R.jsx)(mc,{variant:"bodySmallBold"}),onClose:()=>i(!0),onBack:()=>i(!1),preventDefaultClose:!0,children:t?(0,R.jsxs)(R.Fragment,{children:[n,"intro"===e&&(0,R.jsx)(Xy,{}),"detection"===e&&(0,R.jsx)(Zy,{}),"signifiers"===e&&(0,R.jsx)(eb,{})]}):(0,R.jsx)(sb,{})})};var cb=i(25763),ub=i(15549);const db=({device:e,onClick:t,isAirpodDevice:i})=>{const n=i?`${e.model} (${e.releaseYear})`:e.model,r=i?u.Ru.get("web-player.puffin.manual-selection.models-list",e.modelNumbers.join(u.Ru.getSeparator())):e.brand;return(0,R.jsx)(Xo.c,{children:(0,R.jsx)($o.v,{variant:"naked",size:"md",isInteractive:!0,id:e.id,title:(0,R.jsx)(Qo.d,{onClick:()=>{t(e)},children:n}),subtitle:r,trailing:(0,R.jsx)(mf.V,{size:"small",semanticColor:"textSubdued"}),onClick:()=>{t(e)},hoverAnimationDuration:"0s"},e.id)})},mb="fjltNoIqUMIY7LfgtvCH",pb="WNi2uq00PuqJnOvv6b6a",hb="W3HfPxIGTvmPJNItOM5A",gb="T3zyYZ33nGeJfw6NgwwV",fb="fr_QT3qQxce_KdFUhktQ",vb="wMsnDxvKohBJOUguxi8p",yb="O842FkxrdjAlid2byB9c",bb="E6yKOmbA9ekxMnRhJDnA",_b="sm96uN6u5WGLjNfbT6kF",Eb="bWJ8TFqqyCV4TqeScz7D",Cb="SRl_K6g2YOd8qrpIFij7",xb=({search:e})=>(0,R.jsxs)("div",{className:bb,children:[(0,R.jsx)(On.E,{semanticColor:"textBase",variant:"titleSmall",className:_b,children:u.Ru.get("web-player.puffin.manual-selection.empty.title",(0,R.jsx)("span",{className:Eb,children:(0,R.jsx)("span",{className:Cb,children:e})}))}),(0,R.jsx)(On.E,{semanticColor:"textSubdued",variant:"bodySmall",children:u.Ru.get("web-player.puffin.manual-selection.empty.subtitle")})]}),Sb={id:"unknown_device",brand:"",model:"",deviceName:"Generic",modelNumbers:[],releaseYear:""},Ab=({devices:e,isAirpodsList:t=!1})=>{const{setCurrentView:i,viewTransitions:n}=(0,b.useContext)(Mf),r=t?n[Lf.AirpodsSelection]:n[Lf.ManualSelection],{filter:a,setFilter:s}=(0,b.useContext)(ub.g),{setCurrentDevice:o}=ev(),l=(0,b.useCallback)((e=>{o(e),i(r.continue),s("")}),[o,i,s,r.continue]),c=e.filter((({deviceName:e,brand:t,model:i,modelNumbers:n})=>[e,t,i,...n].some((e=>e.toLowerCase().includes(a.toLowerCase())))));return(0,R.jsxs)("div",{className:vb,children:[(0,R.jsx)(Vs.$,{children:c.map((e=>(0,R.jsx)(db,{device:e,onClick:l,isAirpodDevice:t},e.id)))}),0===c.length&&(0,R.jsx)(xb,{search:a}),(0,R.jsx)("div",{className:fb,children:(0,R.jsx)(rv.n,{size:"small",onClick:()=>{l(Sb)},children:u.Ru.get("web-player.puffin.manual-selection.not-found-button")})})]})},Tb=()=>{const e=(0,Ye.N)(),{data:t,isLoading:i,isError:n}=(0,Og.I)({queryKey:["puffin-devices"],queryFn:async()=>await e.getDevices(),gcTime:18e5,staleTime:6e5});return{data:t??null,loading:i,error:n}},Ib=()=>{const{toPreviousView:e}=(0,b.useContext)(Mf),{data:t}=Tb(),i=(0,b.useMemo)((()=>t?.filter((e=>"apple"===e.brand.toLowerCase()&&e.model.toLowerCase().includes("airpods")))),[t]);return(0,R.jsx)(Pf,{onBack:()=>{e()},children:(0,R.jsxs)(ub.s,{uri:"spotify:internal:bettersound",children:[(0,R.jsxs)("div",{className:pb,children:[(0,R.jsx)("div",{className:hb}),(0,R.jsxs)("div",{className:gb,children:[(0,R.jsx)(On.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:u.Ru.get("web-player.puffin.manual-selection.airpods.title")}),(0,R.jsx)(On.E,{variant:"bodySmall",children:u.Ru.get("web-player.puffin.manual-selection.airpods.subtitle")})]}),(0,R.jsx)(cb.S,{placeholder:u.Ru.get("web-player.puffin.manual-selection.airpods.search-placeholder"),alwaysExpanded:!0,fullWidth:!0,debounceFilterChangeTimeout:0})]}),i?(0,R.jsx)("div",{className:mb,children:(0,R.jsx)(Ab,{devices:i,isAirpodsList:!0})}):(0,R.jsx)("div",{className:yb,children:(0,R.jsx)(qy.m,{})})]})})},Nb=()=>{const{toPreviousView:e,viewOptions:t}=(0,b.useContext)(Mf),{data:i}=Tb(),{triggerDialog:n,dialog:r}=ob();return(0,R.jsxs)(Pf,{onBack:()=>{t?.showDialogOnBack?n():e()},titleSlot:(0,R.jsx)(mc,{variant:"bodySmallBold"}),children:[r,(0,R.jsxs)(ub.s,{uri:"spotify:internal:bettersound",children:[(0,R.jsxs)("div",{className:pb,children:[(0,R.jsx)("div",{className:hb}),(0,R.jsxs)("div",{className:gb,children:[(0,R.jsx)(On.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:u.Ru.get("web-player.puffin.manual-selection.title")}),(0,R.jsx)(On.E,{variant:"bodySmall",children:u.Ru.get("web-player.puffin.manual-selection.subtitle")})]}),(0,R.jsx)(cb.S,{placeholder:u.Ru.get("web-player.puffin.manual-selection.search-placeholder"),alwaysExpanded:!0,fullWidth:!0,debounceFilterChangeTimeout:0})]}),i?(0,R.jsx)("div",{className:mb,children:(0,R.jsx)(Ab,{devices:i})}):(0,R.jsx)("div",{className:yb,children:(0,R.jsx)(qy.m,{})})]})]})},wb=()=>{const{currentView:e}=(0,b.useContext)(Mf);switch(e){case Lf.ActivationIntro:return(0,R.jsx)(lb,{type:"intro"});case Lf.ActivationDetection:return(0,R.jsx)(lb,{type:"detection"});case Lf.ActivationSignifiers:return(0,R.jsx)(lb,{type:"signifiers"});case Lf.Error:return(0,R.jsx)(Hf,{});case Lf.ManualSelection:return(0,R.jsx)(Nb,{});case Lf.AirpodsSelection:return(0,R.jsx)(Ib,{});case Lf.Overview:return(0,R.jsx)(wv,{});case Lf.AudioQualitySettings:return(0,R.jsx)(Cy,{});case Lf.AudioQualityDetails:return(0,R.jsx)(my,{});case Lf.DiscoverLossless:return(0,R.jsx)(Yy,{});default:return(0,q.k)(e),null}},Rb=()=>{const{currentView:e}=(0,b.useContext)(Mf),t=(0,Sr._Y)(),i=(0,Sr.XB)(),n=[Ar.Z.Puffin,Ar.Z.PuffinActivation,Ar.Z.PuffinOverlay,Ar.Z.PuffinActivationOverlay].some((e=>e===i)),r=[Lf.ActivationIntro,Lf.ActivationDetection,Lf.ActivationSignifiers,Lf.DiscoverLossless,Lf.ManualSelection,Lf.AirpodsSelection].includes(e),a=[Lf.ActivationIntro,Lf.ActivationDetection,Lf.ActivationSignifiers,Lf.ManualSelection].includes(e);(0,b.useEffect)((()=>{n&&t(a?Pe.$S.PUFFIN_START_ACTIVATION:Pe.$S.PUFFIN_FINISH_ACTIVATION)}),[t,a,n]);const s=(0,b.useRef)(null),{breakpoint:o}=(0,Ef.c)({[bf.E.SMALL]:0,[bf.E.MEDIUM]:448,[bf.E.LARGE]:780},s);return(0,R.jsx)(kv.w,{className:At()({[Of]:r}),ref:s,children:(0,R.jsx)(_f.o.Provider,{value:o,children:(0,R.jsxs)("div",{className:Rf,children:[(0,R.jsx)(wb,{}),false]})})})},kb=()=>(0,R.jsx)(Rv._,{label:"Puffin",focusTransferId:"PUFFIN",children:(0,R.jsx)(y.s,{FallbackComponent:Vf,children:(0,R.jsx)(Uf,{children:(0,R.jsx)(Rb,{})})})});function Ob(e){return e.sort(((e,t)=>t.timestamp-e.timestamp))}function Pb(e,t){return t.some((t=>t.user.uri===e.user.uri))?t:Ob([...t,e])}function Lb(e,t){return t.filter((t=>t.user.uri!==e))}var jb=i(19118),Db=i(18416),Mb=i(89269);function Ub(){const e=(0,Re.C)(),t=(0,pt.jE)(),i=["friend-activity"],{subscribeToFriend:n,unSubscribeFromFriend:r}=function(e){const t=(0,Re.C)(),i=(0,b.useRef)({}),n=(0,b.useRef)(e);n.current=e;const r=(0,b.useCallback)((e=>{const r=(0,ne.o_)(e)?.username,a=t.subscribeToBuddyActivity(r,(e=>{e&&n.current(e)}));return i.current[e]=a,a}),[t]),a=(0,b.useCallback)((e=>{i.current[e]?.cancel(),delete i.current[e]}),[]);return(0,b.useEffect)((()=>{const e=i.current;return()=>{Object.values(e).forEach((e=>{e.cancel()}))}}),[]),{subscribeToFriend:r,unSubscribeFromFriend:a}}((e=>{t.setQueryData(i,((t=[])=>function(e,t){return Ob(t.map((t=>t.user.uri===e.user.uri?e:t)))}(e,t)))})),a=(0,Og.I)({queryKey:i,queryFn:()=>Mb.xA(fg.n.getInstance()).then((e=>(e.body.friends.forEach((e=>n(e.user.uri))),Ob(e.body.friends)))),staleTime:6e5,gcTime:36e5,refetchInterval:864e5,refetchOnWindowFocus:!1,refetchOnMount:"always",refetchOnReconnect:!0});return(0,Db.N)(jb.mc.OPERATION_COMPLETE,(async a=>{const s=a.data.uris;if(a.data.operation!==jb.JK.FOLLOW_USER){if(a.data.operation===jb.JK.UNFOLLOW_USER)for(const e of s)r(e),t.setQueryData(i,((t=[])=>Lb(e,t)))}else for(const r of s){const a=(await e.fetchFriendActivity([r]))[0];t.setQueryData(i,((e=[])=>Pb(a,e))),n(r)}})),a}const Bb=(0,b.lazy)((()=>Promise.all([i.e(4151),i.e(7564)]).then(i.bind(i,98228))));function Fb(){const{data:e,error:t,isLoading:i}=Ub();return!(0,Ym.n)()||i||t?null:(0,R.jsx)(Bb,{friends:e??[]})}function Hb(e){return e.sort(((e,t)=>t.timestamp-e.timestamp))}function Vb(e,t){return t.some((t=>t.user.uri===e.user.uri))?t:Hb([...t,e])}function Gb(e,t){return t.filter((t=>t.user.uri!==e))}function zb(){const e=(0,ke.C)(),t=(0,pt.jE)(),i=["friend-activity"],{subscribeToFriend:n,unSubscribeFromFriend:r}=function(e){const t=(0,ke.C)(),i=(0,b.useRef)({}),n=(0,b.useRef)(e);n.current=e;const r=(0,b.useCallback)((e=>{const r=(0,ne.o_)(e)?.username,a=t.subscribeToBuddyActivity(r,(e=>{e&&n.current(e)}));return i.current[e]=a,a}),[t]),a=(0,b.useCallback)((e=>{i.current[e]?.cancel(),delete i.current[e]}),[]);return(0,b.useEffect)((()=>{const e=i.current;return()=>{Object.values(e).forEach((e=>{e.cancel()}))}}),[]),{subscribeToFriend:r,unSubscribeFromFriend:a}}((e=>{t.setQueryData(i,((t=[])=>function(e,t){return Hb(t.map((t=>t.user.uri===e.user.uri?e:t)))}(e,t)))})),a=(0,Og.I)({queryKey:i,queryFn:()=>Mb.xA(fg.n.getInstance()).then((e=>(e.body.friends.forEach((e=>n(e.user.uri))),Hb(e.body.friends)))),staleTime:6e5,gcTime:36e5,refetchInterval:864e5,refetchOnWindowFocus:!1,refetchOnMount:"always",refetchOnReconnect:!0});return(0,Db.N)(jb.mc.OPERATION_COMPLETE,(async a=>{const s=a.data.uris;if(a.data.operation!==jb.JK.FOLLOW_USER){if(a.data.operation===jb.JK.UNFOLLOW_USER)for(const e of s)r(e),t.setQueryData(i,((t=[])=>Gb(e,t)))}else for(const r of s){const a=(await e.fetchFriendActivity([r]))[0];t.setQueryData(i,((e=[])=>Vb(a,e))),n(r)}})),a}const Wb=(0,b.lazy)((()=>Promise.all([i.e(4151),i.e(6548)]).then(i.bind(i,80648))));function Kb(){const{data:e,error:t,isLoading:i}=zb();return!(0,Ym.n)()||i||t?null:(0,R.jsx)(Wb,{friends:e??[]})}const Yb="Bjx5Gw7p3JoiF4qI6eMQ",qb=()=>{const{deviceFilterState:e,isMaybeHeadphoneDevice:t}=(0,vc.j)(),i=(0,iv.j)(),n=wc(),r=(0,fv.A)(),a=e.currentState.externalizationEnabled||e.currentState.specificEnabled,s=r===cv.Yn.LOSSLESS||r===cv.Yn.LOSSLESS_24;return(0,R.jsxs)("div",{className:Yb,children:[n&&a&&t&&(0,R.jsx)(lc.C,{size:"small",semanticColor:"textBrightAccent"}),(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textBrightAccent",children:i&&s&&"Lossless"})]})},Zb="G1CP8Uu3Gf2cihYJI6Da",$b="nNGIZKkKfoCorRv2f452",Qb="IoeexgnqTLHXvE5pct_0",Jb="XFbGPr_IwzKGEhcDpxkS",Xb="KYkSwfV1FCtD15TMChbH",e_="v7CrgRsPeGhw_wa_21pQ",t_="v_d7zRnXAkuJt1lE8tzS",i_=({onClick:e})=>{const{deviceName:t,formattedDeviceName:i}=Wf();return(0,R.jsx)("div",{className:t_,children:(0,R.jsx)(ti.Zp,{label:i??t,children:(0,R.jsx)(Jo.j,{lineClamp:1,onClick:e,children:(0,R.jsx)(On.E,{variant:"bodyMedium",semanticColor:"textBase",children:i??t})})})})},n_=({deviceType:e,isGroup:t,isLocalDevice:i,isPlaying:n})=>{const r=sc();let a;if(n)a=(0,R.jsx)(Wl,{});else{const n=(0,Ua.tf)(e,t,i?r:null);a=(0,R.jsx)(n,{semanticColor:"textBrightAccent","":"device-icon",role:"presentation"})}return(0,R.jsxs)("div",{className:Jb,children:[(0,R.jsx)("div",{className:Xb,children:a}),(0,R.jsx)(Qo.d,{variant:"celloCanon",semanticColor:"textBase",lineClamp:1,children:u.Ru.get("web-player.connect.device-picker.current-device")})]})},r_=({spec:e})=>{const{currentDevice:t}=Jl(),{id:i,connectStateId:n,isLocalNetwork:r,supportsLogout:a}=t,s=(0,so.W)(),o=!r&&a,l=o,c=wc(),u=(0,iv.j)(),{deviceName:d,formattedDeviceName:m}=Wf(),p=s?df.g:mf.V;return(0,R.jsx)("div",{className:e_,children:c||u?(0,R.jsx)(p,{"aria-label":m??d,size:"small",autoMirror:!1}):l&&(0,R.jsx)(io,{title:m??d,deviceId:i,connectStateDeviceId:n,allowForgetDevice:o,spec:e.containerViewFactory().headerFactory().activeDeviceFactory()})})};var a_=i(98406),s_=i(47158);const o_="device-picker-header",l_=({isPlaying:e,spec:t})=>{const{currentDevice:i}=Jl(),{id:n,connectStateId:r,type:a,isLocal:s,isLocalNetwork:o,isGroup:l,incarnation:c,supportsLogout:d}=i,m=wc(),p=(0,iv.j)(),{togglePuffin:h}=(0,Sc.c)(),{currentSession:g}=(0,qa.D)(),f=(0,s_.y)(),v=!g?.active&&f,y=(0,Ua.HJ)(c),b=!o&&d,_=b||y,E=(0,R.jsx)(to,{deviceId:n,connectStateDeviceId:r,allowForgetDevice:b,incarnation:y?c:void 0}),C=m||p,x=(0,R.jsx)($o.v,{className:At()($b,{[Qb]:C}),id:o_,variant:"naked",title:(0,R.jsx)(n_,{deviceType:a,isGroup:l,isLocalDevice:s,isPlaying:e}),subtitle:(0,R.jsxs)("div",{className:t_,children:[(0,R.jsx)(i_,{onClick:C?h:void 0}),C&&(0,R.jsx)(qb,{})]}),trailing:(0,R.jsx)(r_,{spec:t}),"aria-labelledby":o_,onClick:C?h:void 0,onClickHint:u.Ru.get("web-player.connect.device-picker.current-device"),body:v&&(0,R.jsx)("hr",{className:Zb}),footer:v&&(0,R.jsx)(a_.$,{})});return _?(0,R.jsx)(el.h,{menu:E,children:x}):x};var c_=i(24969);const u_=({legacyCastPlaceholder:e}={legacyCastPlaceholder:!1})=>{const t=(0,ve.vh)(),i=(0,g.d4)((e=>e.playback?.castState??window.cast?.framework.CastState.NO_DEVICES_AVAILABLE)),n=(0,ca.v)((e=>e.devices));return(0,b.useCallback)((r=>{n.forEach((e=>{t.send((0,c_.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:r,is_logging_device:e.isLocal}))})),(e?function(e){return e===window.cast?.framework.CastState.NOT_CONNECTED}(i):Xl(i))&&t.send((0,c_.f)({discovered_device_name:"Google Cast Devices Available",discovered_device_brand_display_name:"Google",interaction_id:r}))}),[n,i,t,e])};var d_=i(3877);function m_(){return(0,Mi.N)(d_.c)}const p_="vvwf9j2P69E4172N2SoA",h_="h0XG5HZ9x0lYV7JNwhoA",g_=()=>{const e=(0,Bs.pG)({data:{identifier:Bs.gw.SIDEPANEL}}),t=(0,vs.e)(),i=m_(),n=u_(),{devices:r}=Jl(),{isPlaying:a}=(0,ec.GK)(),[o]=(0,Sr.sV)(),l=(0,b.useRef)(n),c=(0,b.useRef)(o.context.devicePicker?.interactionId);l.current=n,c.current=o.context.devicePicker?.interactionId;const d=Xl((0,g.d4)((e=>e.playback?.castState??window.cast?.framework.CastState.NO_DEVICES_AVAILABLE)));(0,b.useEffect)((()=>()=>{l.current(c.current)}),[c]);const m=(0,s.NC)(Ce.q5y);return(0,b.useEffect)((()=>{m?i.startActiveDiscovery():t.getCapabilities().supportsLocalDiscovery&&t.updateListOfDevices()}),[t,i,m]),(0,R.jsx)(Rv._,{label:u.Ru.get("playback-control.connect-picker"),focusTransferId:"DEVICE-PICKER",children:(0,R.jsxs)(kv.w,{className:h_,fixedHeader:(0,R.jsx)(wf.a,{title:u.Ru.get("playback-control.connect-picker"),className:p_,panel:Ar.Z.DevicePicker}),children:[(0,R.jsx)(l_,{isPlaying:a,spec:e}),(0,R.jsx)($l,{devices:r,areWebPlayerCastDevicesAvailable:d,spec:e})]})})};var f_=i(9909),v_=i(20196),y_=i(35149);const b_=()=>(0,R.jsx)(R.Fragment,{}),__=()=>(0,R.jsx)(R.Fragment,{});var E_=i(9872);const C_="Xh1TBgSrJAYVdjRM8zFV",x_="XtrKVBpPjO52Dsuh7Sl3",S_="Ebrqn7sM1CfWaEig2gQW",A_="cA09n1bnWHC5ii99Gjpq",T_=()=>(0,R.jsx)("div",{className:(0,Bp.Ju)("invertedDark",A_),children:(0,R.jsx)(On.E,{variant:"bodySmall",children:u.Ru.get("web-player.now-playing-view.chapters.disclaimer")})});var I_=i(76104),N_=i(80913);const w_=({title:e,isActive:t,isPlaying:i,timestamp:n,onClick:r})=>{const a=(0,b.useCallback)((()=>{r(n)}),[r,n]);return(0,R.jsx)($o.v,{variant:"naked",id:e,hoverBackgroundColor:"backgroundTintedHighlight",activeBackgroundColor:"backgroundTintedBase",title:(0,R.jsxs)(On.E,{variant:"bodyMedium",semanticColor:t?"textBrightAccent":"textBase",className:"standalone-ellipsis-one-line",children:[i&&t&&(0,R.jsx)(I_.J,{animated:t})," ",e]}),subtitle:(0,N_.f)(n),onClick:a})};function R_(e,t){if(!e)return null;const i=(0,Rd.s)(e);return null===i?null:t.findIndex((e=>(e.seekStart?.milliseconds??0)<=i&&(e.seekStop?.milliseconds??1/0)>=i))}const k_=Spicetify.GraphQL.Definitions["queryNpvEpisodeChapters"]=new qi.l("queryNpvEpisodeChapters","query","367f0e93a0d219ae6f5874bcc460201db0a43467ae94f16298931a704ac62ea6",null),O_=12e5,P_=6e5;var L_=i(65303),j_=i(97513);const D_=(0,b.memo)((({chapters:e,episodeUri:t,nextOffset:i,limit:n,isPlaying:r,isMLGeneratedChapters:a})=>{const s=(0,D.z)(),{logger:o,spec:l}=(0,Hi.r)(E_.U,{}),{chapters:c,fetchNextPage:d}=(({uri:e,startOffset:t=0,pageSize:i,autoFetchOnMount:n=!0})=>{const{request:r}=(0,b.useContext)(We.j),{data:a,isLoading:s,error:o,fetchNextPage:l}=(0,bg.q)({queryKey:["npv","episode-chapters",e,{startOffset:t,limit:i}],queryFn:({pageParam:t})=>(0,Jg.c)(r,k_,function(e,t,i){return{offset:t,limit:i,uri:e}}(e,t,i)),staleTime:P_,gcTime:O_,enabled:n,initialPageParam:t,getNextPageParam:e=>{if("Episode"!==e?.data?.episodeUnionV2.__typename)return;const t=e.data.episodeUnionV2.displaySegments;return t?.displaySegments.pagingInfo.nextOffset&&t.displaySegments.pagingInfo.nextOffset>0?t.displaySegments.pagingInfo.nextOffset:void 0}}),c=(0,b.useCallback)((async()=>{await l()}),[l]);return{chapters:(0,b.useMemo)((()=>a?.pages.flatMap((e=>"Episode"===e?.data?.episodeUnionV2.__typename&&e.data.episodeUnionV2.displaySegments?.displaySegments.items?e.data.episodeUnionV2.displaySegments.displaySegments.items:[]))??[]),[a?.pages]),error:o,loading:s,fetchNextPage:c}})({uri:t,pageSize:n??10,startOffset:i??e.length,autoFetchOnMount:!1}),m=(0,b.useMemo)((()=>(c.length>0?[...e,...c]:e).filter(M_)),[e,c]),p=(e=>{const t=(0,D.z)(),[i,n]=(0,b.useState)((()=>R_(t.getState(),e)));return(0,ld.$)((()=>{const r=R_(t.getState(),e);r!==i&&n(r)}),500),i})(m),h=(0,b.useCallback)((e=>{s.seekTo(e),o.logInteraction(l.chapterRowFactory().hitSeekToTime({msToSeekTo:e})),s.getState()?.isPaused&&(s.resume(),o.logInteraction(l.chapterRowFactory().hitResume({itemToBeResumed:t})))}),[t,o,s,l]);return m.length?(0,R.jsxs)(L_.w,{className:C_,children:[(0,R.jsx)(L_.X,{children:u.Ru.get("web-player.now-playing-view.chapters")}),a&&(0,R.jsx)(T_,{}),(0,R.jsx)(j_._,{onReachBottom:d,triggerOnInitialLoad:!1,className:x_,children:(0,R.jsx)(Vs.$,{"aria-label":u.Ru.get("web-player.now-playing-view.chapters"),className:S_,children:m.map(((e,t)=>{if(!e.title||"number"!=typeof e.seekStart?.milliseconds)return null;const i=t===p;return(0,R.jsx)(Xo.c,{children:(0,R.jsx)(w_,{onClick:h,timestamp:e.seekStart.milliseconds,title:e.title,isActive:i,isPlaying:r})},e.seekStart.milliseconds)}))})})]}):null}));function M_(e){return"TalkDisplaySegment"===e.__typename}const U_=Spicetify.GraphQL.Definitions["queryNpvEpisode"]=new qi.l("queryNpvEpisode","query","87154b52f1db757e057892dbd0cff2399b67b76263f2b20ea43bb5fc456017dd",null),B_=e=>"Episode"===e?.__typename,F_=e=>"__typename"in e&&"Podcast"===e.__typename,H_=e=>!!e&&"__typename"in e&&"Episode"===e.__typename;var V_=i(68298),G_=i(69179),z_=i(58345),W_=i(19356),K_=i(13466),Y_=i(58237),q_=i(78074),Z_=i(94672);const $_="YdLiRQVNwEQzUNR44QuY",Q_="VVxt7MTKoKdOCVIWYfHn",J_="c21KEAgelRvfiGswmHy9",X_=({images:e,contentRating:t,contextTitle:i,contextUri:n,menu:r,position:a=0,title:s,type:o,uri:l,usePlayContextItem:c})=>{const d=(0,oe.Zp)(),{draggable:m,onDragStart:p}=(0,Bu.P)(),h=(0,ne.o_)(l)?.toURLPath(!0),g=n&&(0,ne.o_)(n)?.toURLPath(!0),f=(0,_f.y)(),{badges:v}=(0,Z_.b)({contentRating:t}),{isPlaying:y,togglePlay:_}=c({uri:l}),{spec:E,logger:C}=(0,Hi.r)(W_.G,{data:{uri:l,position:a}}),x=(0,b.useCallback)((e=>{if(e.stopPropagation(),e.preventDefault(),h){const e=E.hitUiNavigate({destination:h});C.logInteraction(e),d(h)}}),[C,d,E,h]),S=(0,b.useCallback)((e=>{if(e.stopPropagation(),e.preventDefault(),h){const e=E.trackContainerFactory().trackInformationFactory().nameLinkFactory().hitUiNavigate({destination:h});C.logInteraction(e),d(h)}}),[C,d,E,h]),A=(0,b.useCallback)((e=>{if(e.stopPropagation(),e.preventDefault(),g){const e=E.trackContainerFactory().trackInformationFactory().contextLinkFactory({uri:n}).hitUiNavigate({destination:g});C.logInteraction(e),d(g)}}),[n,g,C,d,E]),T=(0,b.useCallback)((e=>{e.stopPropagation();const t=E.trackContainerFactory().coverArtFactory().hitPlay({itemToBePlayed:l});C.logInteraction(t),_()}),[C,E,_,l]),I=(0,b.useMemo)((()=>(0,R.jsx)(ti.Zp,{label:s,children:(0,R.jsx)(Qo.d,{lineClamp:f===bf.E.MEDIUM?1:2,children:h?(0,R.jsx)(Pv.N,{to:h,onClick:S,children:s}):s})})),[f,S,s,h]),N=(0,b.useMemo)((()=>(0,R.jsxs)(Jo.j,{lineClamp:1,children:[v.explicit&&(0,R.jsx)(Y_.g,{}),v.nineteen&&(0,R.jsx)(q_.q,{}),o,g&&i&&(0,R.jsxs)(R.Fragment,{children:[" • ",(0,R.jsx)(ti.Zp,{label:i,children:(0,R.jsx)(Pv.N,{to:g,onClick:A,children:(0,R.jsx)(On.E,{semanticColor:"textSubdued",children:i})})})]})]})),[v.explicit,v.nineteen,i,g,A,o]);return(0,R.jsx)(el.h,{menu:r,children:(0,R.jsx)($o.v,{activeBackgroundColor:"backgroundTintedPress",className:J_,draggable:m,hoverBackgroundColor:"backgroundTintedHighlight",id:l,layout:"regular",onClick:x,onDragStart:e=>{if(e.target!==e.currentTarget)return;p(e,{itemUris:[l],dragLabelText:`${s}${i?` • ${i}`:""}`,contextUri:n})},variant:"naked",title:I,subtitle:f===bf.E.MEDIUM&&N,body:f!==bf.E.MEDIUM&&N,paddingInlineStart:lv.v4,paddingInlineEnd:lv.v4,media:(0,R.jsxs)("div",{className:$_,children:[(0,R.jsx)(K_.x,{className:Q_,isPlaying:y,isLocked:!1,onClick:T,playAriaLabel:u.Ru.get("tracklist.a11y.play",s,i)}),(0,R.jsx)(ng.b,{type:_u.c.EPISODE,title:s,shape:ng.u.ROUNDED_CORNERS,size:rg.Qe.SIZE_48,images:e})]})})})};var eE=i(42582);const tE=({episode:e,position:t})=>{const i=e.podcastV2.data,n=F_(i)?i.uri:void 0,r=F_(i)?i.name:void 0,{usePlayContextItem:a}=(0,eE.P)({uri:n??e.uri},{featureIdentifier:"episode_ai_dubbing"});return(0,R.jsx)(X_,{contentRating:e.contentRating?.label,contextTitle:r,contextUri:n,images:e.coverArt?.sources,menu:(0,R.jsx)(z_.b,{uri:e.uri}),position:t,title:e.name,type:u.Ru.get("card.tag.episode"),uri:e.uri,usePlayContextItem:a},e.uri)},iE=e=>(0,R.jsx)(On.E,{...e,as:"div",variant:"bodySmall"});var nE=i(77812);const rE="KJEbbXyTy0gbIalPPwjP",aE=e=>(0,R.jsx)(nE.B,{className:rE,...e}),sE="dmEFRgvLS6M2o8rmoX6v",oE=({description:e,episodes:t,title:i,...n})=>(0,R.jsxs)(L_.w,{...n,className:sE,children:[(0,R.jsx)(L_.X,{icon:(0,R.jsx)(G_.H,{size:"small"}),tooltipLabel:i,children:i}),(0,R.jsx)(iE,{children:e}),(0,R.jsx)(aE,{children:t.map(((e,t)=>(0,R.jsx)(tE,{episode:e,position:t},e.uri)))})]});var lE=i(26119);function cE({episode:e}){const t=(e=>e.aiDubbedEpisodes?.items?e.aiDubbedEpisodes.items.map((e=>e.data)).filter((t=>H_(t)&&t.uri!==e.uri)):[])(e),{spec:i}=(0,Hi.r)(V_.y,{});if(t.length<=0)return null;const n=(0,u.wB)(t[0]?.language?.code),r=t.length>1&&u.Ru.get("web-player.now-playing-view.dubbed-episodes.title-multiple")||n&&u.Ru.get("web-player.now-playing-view.dubbed-episodes.title-single-with-language",{language:(0,lE.kX)(n)})||u.Ru.get("web-player.now-playing-view.dubbed-episodes.title-single"),a=t.length>1?u.Ru.get("web-player.now-playing-view.dubbed-episodes.description-multiple"):u.Ru.get("web-player.now-playing-view.dubbed-episodes.description-single");return(0,R.jsx)(on.r,{spec:i.episodeListFactory(),children:(0,R.jsx)(oE,{description:a,episodes:t,title:r})})}var uE=i(46222);function dE({episode:e}){const t=(e=>B_(e)&&e.originalEpisode&&H_(e.originalEpisode?.data)?e.originalEpisode.data:void 0)(e),{spec:i}=(0,Hi.r)(uE.I,{});if(!t)return null;const n=(0,u.wB)(t.language?.code),r=n?u.Ru.get("web-player.now-playing-view.original-episode.title-with-language",{language:(0,lE.kX)(n)}):u.Ru.get("web-player.now-playing-view.original-episode.title"),a=n?u.Ru.get("web-player.now-playing-view.original-episode.description-with-language",{language:(0,lE.kX)(n)}):u.Ru.get("web-player.now-playing-view.original-episode.description");return(0,R.jsx)(on.r,{spec:i,children:(0,R.jsx)(oE,{description:a,episodes:[t],title:r})})}var mE=i(56865),pE=i(60822);const hE="YC6K2bFUeJkdE4cCvbD3",gE="vHQbygDcvOQ4Ls0W6vb1",fE="Ku9l84_lLCFE3crS1Y8B",vE="TortsxZeDfI28luc5Dac",yE="XHpZHlxCiVHe8qTVVskT",bE="lu9_R5Kw07YEWlq8eKs9",_E="RypbYIkqqlUkhxg_RwYm",EE=(0,b.memo)((function({transcriptSections:e,onTimeStampClick:t,episodeUri:i}){const{spec:n,logger:r}=(0,Hi.r)(mE.c,{data:{uri:i}}),{isPlaying:a}=(0,eE.P)({uri:i},{featureIdentifier:"episode"}),s=n.timestampLinkFactory();return(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)("div",{className:gE,children:[(0,R.jsx)("div",{className:vE,children:(0,R.jsx)(On.E,{as:"p",variant:"marginal",semanticColor:"textSubdued",children:u.Ru.get("web-player.episode.transcript.disclaimer")})}),e.map(((e,n)=>{const o=`transcript-section-${n}`;return(0,R.jsxs)("div",{className:fE,children:[(0,R.jsx)("button",{className:yE,onClick:()=>{t(e.startMs,o),r.logInteraction(a?s.hitSeekToTime({msToSeekTo:e.startMs}):s.hitPlay({itemToBePlayed:i}))},children:(0,R.jsx)(pE.k,{id:o,targetURI:(0,ne.o_)(i),fadeOut:!0,children:(0,R.jsx)(On.E,{variant:"marginalBold",semanticColor:"textSubdued",className:bE,children:(0,N_.f)(e.startMs)})})}),e.content.map(((e,t)=>(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textBase",className:_E,dir:"auto",children:e},`transcript-text-${t}`)))]},o)}))]})})}));var CE=i(73671),xE=i(90507),SE=i(55244),AE=i(76805);var TE=i(79745),IE=i(85513);const NE="_QEMUk5U16U3CQn0wvbD",wE="mbkl2P60JUhDqc9qGvp9",RE="Xh6dG3pzi2SS7v4cvZzG",kE="sOdoW26RUwggLToa7xDt",OE="B_TcBcc1BM2yLgvXbh66",PE="tRnhyUQiKOxA3z8mUD_U",LE="_shxqlkLuB52H1iCh_OQ",jE="hAwePVlxumRNpdOSpwyV";const DE=b.forwardRef((function({className:e="",segment:t,onClickPlay:i,isPlaying:n},r){const{label:a,Icon:s}=(0,b.useMemo)((()=>function(e){if("TALK"===e.type)return{Icon:CE.L,label:u.Ru.get("playlist.a11y.play",e.title)};const t=e.track.artists?.map((e=>e.name)).join(u.Ru.getSeparator())||"";return{Icon:xE.v,label:u.Ru.get("tracklist.a11y.play",e.track.name,t)}}(t)),[t]),o=(0,b.useCallback)((()=>{i()}),[i]);return(0,R.jsxs)("div",{className:At()(LE,e),children:[n?(0,R.jsx)(I_.J,{className:PE,animated:!0}):(0,R.jsx)("span",{className:PE,children:(0,R.jsx)(s,{iconSize:16,"aria-hidden":"true"})}),(0,R.jsx)(K_.x,{className:OE,iconClassName:jE,onClick:o,isPlaying:n,isLocked:!1,playAriaLabel:a,ref:r})]})})),ME=({children:e,onTriggerPlay:t,episodeUri:i,index:n})=>{const{spec:r,logger:a}=(0,Hi.r)(SE.f,{}),s=(0,an.W)(),o=(0,nn.YQ)((()=>{s({intent:"play",type:"double-click"});const e=a.logInteraction(r.segmentItemFactory({uri:i,position:n||0}).doubleHitPlay({itemToBePlayed:i}));t(e)}),IE.d,{leading:!0,trailing:!1});return(0,R.jsx)("div",{className:kE,onDoubleClick:o,children:e})},UE=({segment:e,episodeUri:t,index:i})=>{const{spec:n,logger:r}=(0,Hi.r)(SE.f,{}),{isActive:a,isPlaying:s,onClick:o}=(0,TE.L)({episodeUri:t,start:e.start,stop:e.stop}),l={uri:t},c=function(e){const t=[{url:e.track.album.image}];return{type:_u.c.TRACK,uri:e.uri,uid:null,provider:null,images:t,name:e.track.name,mediaType:"audio",duration:{milliseconds:0},album:{type:_u.c.ALBUM,uri:e.track.album.uri,name:e.track.album.name,images:t},artists:e.track.artists.map((e=>({type:_u.c.ARTIST,name:e.name,uri:e.uri})))}}(e),u=n.segmentItemFactory({uri:t,position:i||0}).playbackButtonFactory(),d=(0,b.useCallback)((()=>{o({}),a&&s?r.logInteraction(u.hitPause({itemToBePaused:t})):a&&!s?r.logInteraction(u.hitResume({itemToBeResumed:t})):r.logInteraction(u.hitPlay({itemToBePlayed:t}))}),[t,a,s,r,o,u]);return(0,R.jsxs)(ME,{onTriggerPlay:o,episodeUri:t,children:[(0,R.jsx)(DE,{segment:e,isActive:a,isPlaying:s,onClickPlay:()=>{d()}}),(0,R.jsx)(AE.d,{context:l,item:c,titleTypeVariant:"bodyMedium",subtitleTypeVariant:"bodySmall",onTitleClick:e=>{r.logInteraction(n.segmentItemFactory({uri:t,position:i||0}).albumLinkFactory({uri:l.uri}).hitUiNavigate({destination:e||""}))},onSubtitleClick:e=>{r.logInteraction(n.segmentItemFactory({uri:t,position:i||0}).artistLinkFactory({uri:e||"",position:0}).hitUiNavigate({destination:e||""}))}})]})},BE=({segment:e,episodeUri:t,index:i})=>{const{spec:n,logger:r}=(0,Hi.r)(SE.f,{}),{isActive:a,isPlaying:s,onClick:o}=(0,TE.L)({episodeUri:t,start:e.start,stop:e.stop}),l=function(e){const t=[];return{type:_u.c.UNKNOWN,uri:e.uri,uid:null,provider:null,images:t,name:e.title,mediaType:"audio",duration:{milliseconds:0},album:{type:_u.c.ALBUM,uri:e.show.uri,name:e.show.name,images:t},artists:[]}}(e),c=n.segmentItemFactory({uri:t,position:i||0}).playbackButtonFactory(),u=(0,b.useCallback)((()=>{o({}),a&&s?r.logInteraction(c.hitPause({itemToBePaused:t})):a&&!s?r.logInteraction(c.hitResume({itemToBeResumed:t})):r.logInteraction(c.hitPlay({itemToBePlayed:t}))}),[t,a,s,r,o,c]);return(0,R.jsxs)(ME,{onTriggerPlay:o,episodeUri:t,children:[(0,R.jsx)(DE,{segment:e,isActive:a,isPlaying:s,onClickPlay:()=>{u()}}),(0,R.jsx)(zs.r,{children:(0,R.jsx)(On.E,{variant:"bodyMedium",semanticColor:"textBase",children:l.name})},l.name)]})};var FE=i(39516);function HE(e){return!!(0,FE.o)().getCapabilities().isSupported&&function(e){const t=e.metadata?.["parent_episode.uri"];return!!t&&(0,ne.gH)(t)}(e)}const VE=({item:e})=>{const t=e.metadata?.["parent_episode.uri"],i=function(e){const t=(0,FE.o)();return(0,b.useCallback)((async(i,n)=>{if(!e)return[];try{return await t.getSegments(e,i,n)}catch(e){return[]}}),[e,t])}(t),[n,r]=(0,b.useState)([]),a=(0,b.useRef)(!1),s=(0,b.useRef)(0),o=(0,b.useCallback)((()=>{const e=s.current;null!==e&&(a.current||(a.current=!0,i(e,10).then((e=>{r((t=>{const i=t.concat(e);return s.current=i.length+1,i})),a.current=!1}))))}),[i]);return(0,b.useEffect)((()=>{r([])}),[e.uri]),t?(0,R.jsxs)(L_.w,{className:NE,children:[(0,R.jsx)(L_.X,{className:wE,children:u.Ru.get("music_and_talk.in_this_episode")}),(0,R.jsx)("div",{className:RE,children:(0,R.jsx)(j_._,{onReachBottom:o,triggerOnInitialLoad:!0,children:n.map(((e,i)=>"MUSIC"===e.type?(0,R.jsx)(UE,{segment:e,episodeUri:t},`${e.uri}-${i}`):(0,R.jsx)(BE,{segment:e,episodeUri:t},`${e.uri}-${i}`)))})})]}):null};var GE=i(20913),zE=i(24241),WE=i(9201),KE=i(60386);const YE=({children:e,...t})=>(0,R.jsx)(qE,{size:"small",...t,$_css:Up.ZSH,children:e});var qE=(0,KE.Ay)(rv.n).withConfig({displayName:"ButtonSecondary___StyledEncoreButtonSecondary",componentId:"sc-13xoveo-0"})((e=>({borderColor:e.$_css}))),ZE=i(97675);const $E="main-nowPlayingView-queue",QE="main-nowPlayingView-queueItem",JE="main-nowPlayingView-playNextButton",XE="main-nowPlayingView-playNextIcon",eC="main-nowPlayingView-playNext",tC="main-nowPlayingView-openQueue",iC="main-nowPlayingView-playNextButtonIcon",nC="main-nowPlayingView-queueItemEntityImage";const rC=b.forwardRef((function({className:e="",item:t,onClickPlay:i},n){const r=(0,D.z)(),{label:a,Icon:s}=(0,b.useMemo)((()=>function(e){if((0,W.p)(e))return{Icon:CE.L,label:u.Ru.get("tracklist.a11y.play",e.name,e.show.name)};if((0,z.d)(e))return{Icon:ZE.l,label:u.Ru.get("tracklist.a11y.play",e.name,e.book.name)};if((0,K.v)(e)||(0,Y.v)(e)){const t=e.artists?.map((e=>e.name)).join(u.Ru.getSeparator())||"";return{Icon:xE.v,label:u.Ru.get("tracklist.a11y.play",e.name,t)}}return{Icon:xE.v,label:u.Ru.get("play")}}(t)),[t]),o=(0,b.useCallback)((()=>(i(),r.skipToNext({uri:t.uri,uid:t.uid}))),[r,t,i]);return(0,R.jsxs)("div",{className:At()(eC,e),"":"play-next-button",children:[(0,R.jsx)("span",{className:XE,children:(0,R.jsx)(s,{size:"small","aria-hidden":"true"})}),(0,R.jsx)(K_.x,{className:JE,iconClassName:iC,onClick:o,isPlaying:!1,isLocked:!1,playAriaLabel:a,ref:n})]})}));var aC=i(10608),sC=i(95235);const oC="/search",lC="/queue",cC=b.memo((({spec:e})=>{const t=(0,Js.t)(e);return(0,R.jsxs)(L_.w,{className:$E,ref:t,children:[(0,R.jsx)(L_.X,{children:u.Ru.get("web-player.your-dj.npv.queue.title")}),(0,R.jsx)(On.E,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("web-player.your-dj.npv.queue.description")})]})})),uC=b.memo((({spec:e,logger:t})=>{const i=(0,Js.t)(e);return(0,R.jsxs)(L_.w,{className:$E,ref:i,children:[(0,R.jsx)(L_.X,{children:u.Ru.get("web-player.now-playing-view.empty-queue")}),(0,R.jsx)(Pv.N,{to:oC,children:(0,R.jsx)(YE,{onClick:()=>{const i=e.searchButtonFactory().hitUiNavigate({destination:oC});t.logInteraction(i)},children:u.Ru.get("web-player.now-playing-view.empty-queue-cta")})})]})})),dC=({isContextAd:e})=>{const{nextUp:t,queued:i}=(0,sC.w)(),n=(0,D.z)(),r=(0,oe.Zp)(),a=(0,Sr._Y)(),o=(0,s.NC)(Ce.eWj),l=(0,hr.L)(),{spec:c,logger:d}=(0,Hi.r)(GE._,{}),m=(0,Js.t)(c),p=(0,b.useCallback)((()=>{const e=c.openQueueButtonFactory().hitUiNavigate({destination:lC});d.logInteraction(e),o?a(Pe.$S.QUEUE_BUTTON_CLICK):r(lC)}),[r,a,o,c,d]),h=i[0]||t[0],{draggable:g,onDragStart:f}=(0,Bu.P)(),v=(0,b.useCallback)((e=>{e.target===e.currentTarget&&h.uri&&f(e,{itemUris:[h.uri],dragLabelText:(0,WE.r)(h)})}),[h,f]);if(l?.context?.uri&&(0,aC.HS)(l.context))return(0,R.jsx)(cC,{spec:c});if(!l||!h)return(0,R.jsx)(uC,{spec:c,logger:d});const{context:y}=l;return(0,R.jsxs)(L_.w,{className:$E,ref:m,children:[(0,R.jsx)(L_.X,{action:(0,R.jsx)(ei.H,{size:"small",condensed:!0,onClick:p,className:tC,semanticColor:"textSubdued",children:u.Ru.get("web-player.now-playing-view.open-queue")}),children:u.Ru.get("queue.next-in-queue")}),(0,R.jsx)(el.h,{menu:(0,R.jsx)(y_.W,{context:y,item:h}),children:(0,R.jsxs)("div",{className:QE,draggable:g&&Uu(h),onDragStart:v,children:[!e&&(0,R.jsx)(rC,{item:h,onClickPlay:()=>{const e=n.getState();if(!e)return;const t=c.playButtonFactory({uri:h.uri}).hitSkipToNext({itemToBeSkipped:e.item?.uri||"",positionMs:(0,Rd.s)(e)??-1,totalContentMs:e.duration??-1});d.logInteraction(t)}}),(0,R.jsx)(zE.b,{item:h,size:46,desiredLabel:"small",className:nC}),(0,R.jsx)(AE.d,{context:y,item:h,titleTypeVariant:"bodyMedium",subtitleTypeVariant:"bodySmall",onTitleClick:()=>{const e=c.titleFactory({uri:h.uri}).hitUiNavigate({destination:h.uri});d.logInteraction(e)},onSubtitleClick:()=>{const e=c.artistFactory({uri:h.uri}).hitUiNavigate({destination:h.uri});d.logInteraction(e)}})]})})]})},mC=e=>(0,Sp.V)()?null:(0,R.jsx)(dC,{...e});var pC=i(91818),hC=i(38916),gC=i(27014);const fC="_mPIDSVjofNyCLhlaXuL",vC="WbtcAaLN1SQCr16tuZXv",yC="mqlmYaGITrdEQC40rEOI",bC="KEb8GSQPHsSmLCes_O07",_C="Lkuf447h9WU9AaYHTsu7",EC="VU8VpmUxiLG5anxsH03k",CC="JO8KMTdQoJAPhSpBlaqE",xC="oKZq5I1c9_xWl3NWP1SU",SC=({coverArt:e,description:t,name:i,publisher:n,uri:r})=>{const a=(0,_f.y)(),{draggable:s,onDragStart:o}=(0,Bu.P)({itemUris:[r],dragLabelText:i}),[l,c]=(0,Tu.A)(r),d=!(0,Ym.n)(),m=(0,oe.Zp)(),{spec:p,logger:h,UBIFragment:g}=(0,Hi.r)(pC.M,{}),f=(0,b.useRef)(null),v=(0,b.useCallback)((()=>{const e=p.artworkFactory().hitUiNavigate({destination:r});h.logInteraction(e)}),[h,p,r]),y=(0,b.useCallback)((()=>{const e=p.titleFactory().hitUiNavigate({destination:r});h.logInteraction(e)}),[h,p,r]),_=(0,b.useCallback)((()=>{const e=p.podcastDescriptionFactory().hitUiNavigate({destination:r});h.logInteraction(e),m((0,ne.o_)(r).toURLPath(!0))}),[h,m,p,r]),E=(0,b.useCallback)((()=>{const e=p.followButtonFactory().hitFollow({itemToBeFollowed:r}),t=p.followButtonFactory().hitUnfollow({itemToBeUnfollowed:r});h.logInteraction(l?t:e),c(!l)}),[l,h,c,p,r]);return(0,R.jsxs)(L_.w,{className:fC,children:[(0,R.jsx)(L_.X,{children:u.Ru.get("web-player.now-playing-view.podcast-about.title")}),(0,R.jsx)("div",{children:(0,R.jsx)("button",{type:"button","":"description-button",className:vC,onClick:_,children:(0,R.jsx)(On.E,{as:"div",ref:f,variant:"bodySmall",className:yC,children:(0,R.jsx)(Mv.N,{source:t})})})}),(0,R.jsxs)("div",{className:At()(bC,{[_C]:a!==bf.E.MEDIUM}),children:[(0,R.jsx)(g,{spec:p,children:(0,R.jsx)($o.v,{contentAlign:!0,id:"aboutPodcastNPV",className:CC,media:(0,R.jsx)(el.h,{menu:(0,R.jsx)(hC.H,{uri:r}),children:(0,R.jsx)(Pv.N,{draggable:s,onDragStart:o,to:r,onClick:v,children:(0,R.jsx)(ng.b,{className:xC,type:_u.c.SHOW,title:i,images:e?.sources,size:rg.Qe.SIZE_48})})}),title:(0,R.jsx)(Qo.d,{lineClamp:1,children:(0,R.jsx)(el.h,{menu:(0,R.jsx)(hC.H,{uri:r}),children:(0,R.jsx)(Pv.N,{draggable:s,onDragStart:o,to:r,onClick:y,children:i})})}),subtitle:(0,R.jsx)(Jo.j,{lineClamp:1,variant:"mesto",children:n})})}),(0,R.jsx)(gC.W,{isFollowing:l,onClick:E,disabled:d,className:EC})]})]})};var AC=i(5780);const TC="f6_Fu_ei4TIJWR0wzvTk",IC="TLmzadNIdvV8sYzTuXRg",NC="MT9De6UrCVQ8Qo6o3ikA",wC=b.memo((()=>(0,R.jsx)("div",{className:TC,"aria-hidden":!0,children:(0,R.jsxs)("div",{className:IC,children:[(0,R.jsx)(AC.Y,{as:"div",variant:"bodyMediumBold",className:NC,charCount:8,isLoading:!0}),[20,50,25].map(((e,t)=>(0,R.jsx)(AC.Y,{as:"div",variant:"bodySmall",className:NC,charCount:e,isLoading:!0},t)))]})})));var RC=i(94676);const kC="m3pzWNRu8xGY36YIaCY1",OC=({topics:e,logTopicNavigation:t})=>!e||e.length<1?null:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(L_.X,{children:u.Ru.get("web-player.now-playing-view.discover-more")}),(0,R.jsx)(RC.N,{topics:e,onClick:t,className:kC})]});var PC=i(87055);const LC="wYBEXo9heVZe_zkteOJ6",jC="EjaYcQIBa_uJkc86qrpQ",DC="QER3MDmhErzCc5bKcklD",MC="fAKKlaCbuHm_cDfnO3UW",UC="AHOmz0JPJhoOloFpM8s2",BC="d8y50Fa8LDK2Fuc92EaA",FC="XBYrBviGypqaAfM1BWxM",HC="G4fVEUX2caQTFPB7mA89",VC="ATHbG3rw7VRat_Knu9EO",GC="LsAbtB5dQLMOgNkK6uNl",zC="nng8b1skt_Yh69A8uReL",WC=e=>{switch(e){case bf.E.SMALL:return"titleSmall";case bf.E.LARGE:return"titleMedium";case bf.E.XLARGE:return"titleLarge";default:return"titleSmall"}},KC=({readAlongSection:e,readAlongIndex:t,index:i,activeIndex:n,onActiveSectionChange:r,breakpoint:a})=>{const s=(0,b.useRef)(!0),o=(0,b.useRef)(null);return(0,b.useEffect)((()=>{i===n&&r?(s.current&&r({sectionRef:o}),s.current=!1):s.current=!0}),[n,i,r]),void 0===e.text?.sentence?.text?null:(0,R.jsx)("div",{ref:o,className:At()(MC,{[UC]:i<n},a?.toLowerCase()),children:(0,R.jsx)(On.E,{as:"p",className:jC,variant:a?WC(a):"titleSmall",children:t>0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("span",{className:HC,children:e.text.sentence.text.substring(0,t)}),(0,R.jsx)("span",{children:e.text.sentence.text.substring(t)})]}):e.text.sentence.text})})},YC=(e,t)=>{let i=0;if(0===e.length)return 0;for(let n=0;n<e.length&&!(t<e[n].startMs);n++)i+=e[n].numChars;return i},qC=e=>{const t=["transcript",{uri:e}],{data:i,isLoading:n,isError:r}=(0,Og.I)({queryKey:t,queryFn:async()=>{if(e&&(0,ne.gH)(e))return(async e=>{const t=(0,ne.o_)(e).id,i=fg.n.getInstance(),n=await i.build().withHost(vg.ao).withPath(`/episode/${encodeURIComponent(t)}`).withEndpointIdentifier("/episode/{episodeId}").withoutMarket().withoutGlobalHeaders().withQueryParameters({format:"json"}).send();if(200!==n.status)throw new Error("failed to get read-along transcript");return n.body})(e)},gcTime:18e5,staleTime:6e5});return{data:i,loading:n,error:r}},ZC=e=>{const[t,i]=(0,b.useState)(0);function n(n){const r=e.current?.querySelectorAll('button:not([disabled]), [href], input, select, textarea, a,[tabindex]:not([tabindex="-1"])');if(!r)return;r.forEach((e=>{e.setAttribute("tabindex","-1")})),r&&r[0].setAttribute("tabindex","0");let a=t;if(r&&r.length>0)switch(n.key){case"Tab":document.activeElement&&i(0);break;case"ArrowUp":0===a?(n.preventDefault(),a=r.length-1):a-=1,r[a].focus(),i(a);break;case"ArrowDown":n.preventDefault(),a===r.length-1?a=0:a+=1,r[a].focus(),i(a)}}b.useEffect((()=>{const t=e.current;return t?.addEventListener("keydown",n),()=>{t?.removeEventListener("keydown",n)}}))},$C={[bf.E.SMALL]:0,[bf.E.LARGE]:792,[bf.E.XLARGE]:1448},QC=({startMs:e,onTimestampClick:t})=>(0,R.jsx)("button",{className:BC,onClick:()=>{t(e)},children:(0,R.jsx)(On.E,{className:FC,variant:"bodyMedium",children:(0,N_.f)(e)})}),JC=({hidden:e,onClick:t})=>(0,R.jsx)("div",{className:At()(VC,{[GC]:e}),children:(0,R.jsx)(Ln.$,{colorSet:"invertedLight",size:"small",onClick:t,iconLeading:xy.Q,"aria-label":u.Ru.get("web-player.read-along-transcript.sync.button"),children:u.Ru.get("web-player.read-along-transcript.sync.button")})}),XC=({episodeURI:e,mode:t})=>{const{data:i,loading:n,error:r}=qC(e),{spec:a,logger:s}=(0,Hi.r)(PC.c,{data:{uri:e}}),o=i?.section??[],l=a.timestampLinkFactory(),[c,u]=(0,b.useState)(!0),[d,m]=(0,b.useState)(!1),p=(0,D.z)(),h=(0,gi.o)((e=>e?.isPaused??void 0)),g=(0,b.useRef)(null),f=(0,b.useRef)(!1),v=(0,b.useRef)(null),y=(0,b.useRef)(null),_=(0,b.useRef)(null);ZC(_);const{breakpoint:E}=(0,Ef.x)($C,y),{highlightedSentenceIndex:C,shouldAnimateScroll:x,readAlongIndex:S}=((e,t)=>{const i=(0,b.useRef)(0),[n]=(0,Wi.f)(100,(t=>t?.item?.uri===e));let r=t.findIndex((e=>e.text?.sentence?.text)),a=0;for(let e=0;e<t.length;e++){const i=t[e];if(n>=i.startMs&&(e===t.length-1||n<t[e+1].startMs)){r=e,i.text?.sentence&&(a=YC(i.text.sentence.highlight,n));break}}const s=Math.abs(i.current-(r??0))<=3;return i.current=r??0,{shouldAnimateScroll:s,highlightedSentenceIndex:r,readAlongIndex:a}})(e,o),A=(0,b.useCallback)((()=>{if(!y.current||!g.current)return;const e=g.current?.offsetTop-y.current?.offsetTop-24;void 0!==e&&(y.current?.scrollTo({top:e,behavior:x?"smooth":"auto"}),m(!1))}),[x]),T=(0,b.useCallback)((()=>{if(!y.current||!g.current)return;const e=g.current?.offsetTop-y.current?.offsetTop-24,t=g.current?.clientHeight;if(void 0===e)return;const i=e>=y.current.scrollTop&&e+t<=y.current.scrollTop+y.current.clientHeight;m(!i),u(i)}),[]),I=(0,b.useCallback)((t=>{p.seekTo(t).then((()=>setTimeout((()=>u(!0)),300))),h?(p.resume(),s.logInteraction(l.hitPlay({itemToBePlayed:e}))):s.logInteraction(l.hitSeekToTime({msToSeekTo:t}))}),[p,s,l,e,h]),N=(0,b.useCallback)((()=>{f.current=!0,v.current&&clearTimeout(v.current),v.current=setTimeout((()=>{f.current=!1}),500),T()}),[T]),w=(0,b.useCallback)((()=>{T(),f.current||c&&A()}),[c,T,A]);return n||r||0===o.length?null:(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)(_f.o.Provider,{value:E,children:[(0,R.jsx)("div",{className:At()(LC,{[DC]:t===Bc.aY.npv}),ref:y,onWheel:N,children:(0,R.jsx)("div",{className:zC,ref:_,children:(0,R.jsx)("div",{children:o.map(((e,t)=>e.title?(0,R.jsx)(QC,{onTimestampClick:I,startMs:e.startMs},t):(0,R.jsx)(KC,{index:t,activeIndex:C,readAlongSection:e,readAlongIndex:C===t?S:0,onActiveSectionChange:({sectionRef:e})=>{g.current=e.current,w()},breakpoint:E},t)))})})}),(0,R.jsx)(JC,{hidden:!!h||!d,onClick:()=>{s.logInteraction(a.syncButtonFactory().hitQuickScroll()),u(!0),A()}})]})})},ex=({mode:e})=>{const t=(0,gi.o)((e=>e?.item),((e,t)=>e?.uri===t?.uri));return t?.uri&&(0,ne.gH)(t.uri)?(0,R.jsx)(XC,{mode:e,episodeURI:t.uri}):null};let tx=function(e){return e.SET_TRANSCRIPT_UI_FLAG="SET_TRANSCRIPT_UI_FLAG",e}({});var ix=i(85045);const nx=e=>e.ui?.transcript?.mode??Bc.aY.none,rx=e=>e.ui?.transcript?.uiFlags??ix.aj;var ax=i(52893),sx=i(73513);const ox="_nDkCIVgkWayq3tqiIuW",lx=({episode:e})=>{const{transcriptMode:t}=(()=>{const e=(0,g.wA)(),t=(0,g.d4)(rx);return{transcriptMode:(0,g.d4)(nx),setTranscriptUIFlag:(0,b.useCallback)(((t,i)=>{e({type:tx.SET_TRANSCRIPT_UI_FLAG,key:t,value:i})}),[e]),transcriptUIFlags:t}})(),{data:i}=qC(e.uri),n=i?.colourData,r={"--transcript-color-background":n?ax.Q.fromInt(n.background).toCSS(sx.a.HEX):Up.PQ2,"--transcript-color-text":ax.Q.fromInt(n?.text??0).toCSS(sx.a.HEX),"--transcript-color-highlightText":ax.Q.fromInt(n?.highlightText??-1).toCSS(sx.a.HEX)},{spec:a}=(0,Hi.r)(PC.c,{data:{uri:e.uri}}),s=(0,Js.t)(a);return(0,R.jsxs)(L_.w,{className:ox,style:r,ref:s,children:[(0,R.jsx)(L_.X,{children:u.Ru.get("web-player.read-along-transcript.now-playing-view.read-along")}),t===Bc.aY.npv&&(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(ex,{mode:Bc.aY.npv})})]})};var cx=i(4096),ux=i(35818),dx=i(73039),mx=i(94901);const px=({item:e,spec:t})=>{const i=(0,b.useCallback)((()=>{}),[]),n=(0,gi.o)((e=>e?.isPaused??void 0)),r=(0,D.z)(),{isPlaying:a,isActive:o}=(0,ec.te)(e.uri),l=(0,s.NC)(Ce.cgF),c=(0,s.NC)(Ce.xEc),d=(0,s.NC)(Ce.h0Y),m=(0,s.NC)(Ce.r1q),p=(0,an.W)(),h=(0,cx.c)(),g=(0,ux.d)(e.uri)?.episodeOrChapter,f=HE(e),v=(0,b.useCallback)(((t,i,s,l)=>{let c="play";!a||0!==t&&i||(c="pause"),p({intent:c,targetUri:e.uri,type:"click",itemIdSuffix:t>0?"podcast-description-timestamp":"button"}),g&&h?zc.h.set((()=>({triggerId:s||"activation-trigger-mme",triggerAction:null}))):o&&!i?n?(l?.("resume"),r.resume()):(l?.("pause"),r.pause()):r.seekTo(t)}),[a,p,e.uri,g,h,o,n,r]),y=(0,b.useCallback)(((e,t)=>{v(e,!0,t)}),[v]),{loading:_,error:E,data:C}=(x={uri:e.uri,includeChapters:d,includeAIDubbedEpisodes:m,numberOfChapters:10},S={staleTime:P_,gcTime:O_},(0,Zi.I)(U_,x,S));var x,S;const[A,T]=(0,b.useState)(null),I=(0,b.useCallback)((async e=>{const t=await(0,dx.Q)(e);T(t)}),[]);if((0,b.useEffect)((()=>{g&&!(0,mx.Gr)(g)&&g.transcript&&g.transcript.length>0&&I(g.transcript[0].cdnUrl)}),[I,g]),_&&e.uri&&!E)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(wC,{}),(0,R.jsx)(wC,{})]});const N=(w=C?.episodeUnionV2,B_(w)?w:void 0);var w;const k=(e=>{return B_(e)&&(t=e.podcastV2.data,"Podcast"===t?.__typename)?e.podcastV2.data:void 0;var t})(C?.episodeUnionV2);if(!e.uri||!N||_||E)return null;const{chapters:O,nextOffset:P,limit:L}=function(e){if("DisplaySegments"===e.displaySegments?.__typename)return{chapters:e.displaySegments.displaySegments.items,nextOffset:e.displaySegments.displaySegments.pagingInfo.nextOffset,limit:e.displaySegments.displaySegments.pagingInfo.limit};return{chapters:[],nextOffset:0,limit:0}}(N),j=O.length>0,M=N.displaySegments?.chapterTags?.includes("automatically-generated")||!1;return(0,R.jsxs)(on.r,{spec:t,children:[m&&!N.originalEpisode&&(0,R.jsx)(cE,{episode:N}),m&&(0,R.jsx)(dE,{episode:N}),j&&!f&&(0,R.jsx)(D_,{chapters:O,episodeUri:e.uri,nextOffset:P,limit:L,isPlaying:a,isMLGeneratedChapters:M}),c&&k&&(0,R.jsx)(SC,{coverArt:k.coverArt||void 0,description:k.htmlDescription||"",name:k.name,publisher:k.publisher?.name,uri:k.uri}),g&&g.type===_u.c.EPISODE&&g.transcript&&g.transcript.length>0&&(l?(0,R.jsx)(lx,{episode:e}):(0,R.jsxs)(L_.w,{className:hE,children:[(0,R.jsx)(L_.X,{children:u.Ru.get("web-player.now-playing-view.transcript")}),A&&(0,R.jsx)(EE,{transcriptSections:A||[],onTimeStampClick:y,episodeUri:e.uri})]})),f&&(0,R.jsx)(VE,{item:e}),(0,R.jsx)(OC,{topics:k?.topics.items??[],logTopicNavigation:i}),(0,R.jsx)(mC,{})]})},hx=({item:e,spec:t})=>(0,Ym.n)()?(0,R.jsx)(px,{item:e,spec:t}):(0,R.jsx)(R.Fragment,{});const gx=()=>(0,R.jsx)(R.Fragment,{}),fx=Spicetify.GraphQL.Definitions["queryNpvArtist"]=new qi.l("queryNpvArtist","query","4ec4ae302c609a517cab6b8868f601cd3457c751c570ab12e988723cc036284f",null);var vx=i(69725),yx=i(97329),bx=i(24604),_x=i(80460),Ex=i(19617),Cx=i(3554),xx=i(53209);const Sx="main-nowPlayingView-aboutArtist",Ax="main-nowPlayingView-aboutArtistContent",Tx="main-nowPlayingView-aboutArtistButton",Ix="main-nowPlayingView-aboutArtistHasImage",Nx="main-nowPlayingView-aboutArtistBio",wx="main-nowPlayingView-aboutArtistTextContent",Rx="main-nowPlayingView-aboutArtistPlaceholderWrapper",kx=new Set(["spotify:artist:5UUG83KSlqPhrBssrducWV"]),Ox=({artistUri:e,artist:t,visuals:i,stats:n,externalLinks:r=[]})=>{const a=(0,g.wA)(),{gallery:o,avatarImage:l}=i,{monthlyListeners:c}=n,d=(0,ne.o_)(e).toURLPath(!0),m=(0,_x.W)({uri:e,type:"locale"})?(0,xx.hF)(d):d,{spec:h,logger:f}=(0,Hi.r)(yx.p,{}),v=(0,s.NC)(Ce.lVm,{loadingValue:!1}),y=(0,Js.t)(h,v),_=(0,oe.Zp)(),E=(0,b.useCallback)((()=>{if(t&&e){const s=h.hitUiReveal();f.logInteraction(s),a((0,p.p5)({artistUri:e,artist:t,stats:n,visuals:i,externalLinks:r})),_(m)}}),[h,f,m,a,_,e,t,n,i,r]);if(kx.has(e)||!t.biography?.text)return null;const C=[];o.items.forEach((e=>{const t=e.sources.map(Ex.m),i=(0,Cx.g)(t,{desiredLabel:"large",desiredSize:600});i&&C.push(i)}));const x=C.find((e=>(e.width||0)>=(e.height||0))),S=[];l?.sources.forEach((e=>{const t=(0,Ex.m)(e);t&&S.push(t)}));const A=x&&{backgroundImage:`linear-gradient(${Up.PUl} 0%, ${Up.MYb} 100%), url(${x.url})`},T=t.verified&&!x&&S.length>0||!t.verified&&!x;return(0,R.jsx)(L_.w,{className:Sx,ref:y,children:(0,R.jsx)("button",{type:"button","aria-label":t.name,className:At()(Tx,{[Ix]:!!A}),onClick:E,style:A,"":"npv-artist-bio-button",children:(0,R.jsxs)("div",{className:At()(Ax),children:[t.verified&&(0,R.jsx)(bx.M,{text:u.Ru.get("artist.verified")}),T&&(0,R.jsx)(Fp.e,{images:S,label:t.name,width:80,userIconSize:"large",testID:"npv-artist-bio-avatar",customPlaceholder:(0,R.jsx)("div",{className:Rx,"":"npv-artist-bio-placeholder-wrapper",children:(0,R.jsx)(vx.r,{size:"large"})})}),(0,R.jsxs)("div",{className:wx,children:[(0,R.jsx)(On.E,{as:"div",variant:"bodyMedium",children:!!c&&u.Ru.get("artist.monthly-listeners-count",c)}),(0,R.jsx)("div",{children:(0,R.jsx)(On.E,{as:"span",variant:"bodySmall",className:Nx,children:(0,R.jsx)(Mv.N,{source:t.biography.text})})})]})]})})})};var Px=i(37985);const Lx="main-nowPlayingView-aboutArtistV2",jx="main-nowPlayingView-aboutArtistV2Button",Dx="main-nowPlayingView-aboutArtistV2Title",Mx="main-nowPlayingView-aboutArtistV2HasImage",Ux="main-nowPlayingView-aboutArtistV2ImageContainer",Bx="main-nowPlayingView-aboutArtistV2Image",Fx="main-nowPlayingView-aboutArtistV2TextContent",Hx="main-nowPlayingView-aboutArtistV2Name",Vx="main-nowPlayingView-aboutArtistV2Listeners",Gx="main-nowPlayingView-aboutArtistV2ListenersCount",zx="main-nowPlayingView-aboutArtistV2FollowButton",Wx="main-nowPlayingView-aboutArtistV2Bio",Kx="main-nowPlayingView-aboutArtistV2PlaceholderWrapper",Yx="main-nowPlayingView-aboutArtistV2Avatar",qx=new Set(["spotify:artist:5UUG83KSlqPhrBssrducWV"]),Zx=({artistUri:e,artist:t,visuals:i,stats:n,externalLinks:r=[]})=>{const a=(0,g.wA)(),{gallery:o,avatarImage:l}=i,{monthlyListeners:c}=n,d=(0,ne.o_)(e).toURLPath(!0),m=(0,_x.W)({uri:e,type:"locale"})?(0,xx.hF)(d):d,[h,f]=(0,Tu.A)(e),{spec:v,logger:y}=(0,Hi.r)(yx.p,{}),_=(0,s.NC)(Ce.lVm,{loadingValue:!1}),E=(0,Js.t)(v,_),C=(0,b.useCallback)((()=>{if(t&&e){const s=v.hitUiReveal();y.logInteraction(s),a((0,p.p5)({artistUri:e,artist:t,stats:n,visuals:i,externalLinks:r}))}}),[v,y,a,e,t,n,i,r]),x=(0,b.useCallback)((t=>{t.stopPropagation();const i=v.artistNameFactory().hitUiNavigate({destination:e});y.logInteraction(i)}),[v,e,y]),S=(0,b.useCallback)((async t=>{t.preventDefault(),t.stopPropagation();const i=v.followButtonFactory().hitFollow({itemToBeFollowed:e}),n=v.followButtonFactory().hitUnfollow({itemToBeUnfollowed:e});y.logInteraction(h?n:i);try{await f(!h)}catch{}}),[e,h,y,f,v]),A=(0,b.useCallback)((e=>{if("Enter"===e.key)return S(e)}),[S]);if(qx.has(e)||!t.biography?.text)return null;const T=[];o.items.forEach((e=>{const t=e.sources.map(Ex.m),i=(0,Cx.g)(t,{desiredLabel:"large",desiredSize:600});i&&T.push(i)}));const I=T.find((e=>(e.width||0)>=(e.height||0))),N=[];l?.sources.forEach((e=>{const t=(0,Ex.m)(e);t&&N.push(t)}));const w=I&&{backgroundImage:`linear-gradient(${Up.i_N} 0%, ${Up.Par} 50%), url(${I.url})`},k=!I&&N.length>0,O=!I&&0===N.length;return(0,R.jsx)(L_.w,{className:Lx,ref:E,children:(0,R.jsxs)("button",{type:"button","aria-label":t.name,className:At()(jx),onClick:C,tabIndex:0,"":"npv-artist-bio-button",children:[(0,R.jsxs)("div",{className:At()(Ux,{[Bx]:I}),style:w,children:[(0,R.jsx)("div",{className:At()(Dx,{[Mx]:I}),children:(0,R.jsx)(L_.X,{children:u.Ru.get("web-player.now-playing-view.artist-about.title")})}),O&&(0,R.jsx)("div",{className:At()(Kx),"":"npv-artist-bio-placeholder-wrapper",children:(0,R.jsx)(vx.r,{size:"xxlarge"})}),k&&(0,R.jsx)(Fp.e,{images:N,label:t.name,width:80,userIconSize:"large",testID:"npv-artist-bio-avatar",className:Yx})]}),(0,R.jsxs)("div",{className:Fx,children:[(0,R.jsx)("div",{className:Hx,children:(0,R.jsx)(Px.N_,{to:m,onClick:x,"":"npv-artist-link",children:(0,R.jsx)(On.E,{as:"span",variant:"bodyMediumBold",dir:"auto",children:t.name})})}),(0,R.jsxs)("div",{className:Vx,children:[(0,R.jsx)(On.E,{as:"div",variant:"bodyMedium",className:Gx,children:!!c&&u.Ru.get("artist.monthly-listeners-count",c)}),(0,R.jsx)(rv.n,{as:"div",size:"small",className:zx,onClick:S,onKeyDown:A,tabIndex:0,children:h?u.Ru.get("unfollow"):u.Ru.get("follow")})]}),(0,R.jsx)(On.E,{as:"span",variant:"bodySmall",className:Wx,children:(0,R.jsx)(Mv.N,{LinkComponent:Px.N_,source:t.biography.text,onLinkClick:e=>{e.stopPropagation()}})})]})]})})};var $x=i(86726);const Qx=({artistUri:e,spec:t,logger:i})=>{const[n,r]=(0,Tu.A)(e),a=(0,b.useCallback)((async()=>{if(!t||!i)return;const a=t.hitFollow({itemToBeFollowed:e}),s=t.hitUnfollow({itemToBeUnfollowed:e});i.logInteraction(n?s:a);try{await r(!n)}catch{}}),[e,n,i,r,t]),s=n?u.Ru.get("unfollow"):u.Ru.get("follow");return(0,R.jsx)(gC.W,{isFollowing:n,onClick:a,buttonText:s})},Jx=({artistName:e,roles:t,spec:i,logger:n,linkable:r=!1})=>{const a=t[0].artistUri,s=t.map((e=>e.role)).join(u.Ru.getSeparator()),o=(0,ne.o_)(a).toURLPath(!0),l=(0,_x.W)({uri:a,type:"locale"})?(0,xx.hF)(o):o,c=(0,b.useCallback)((e=>{if(e.stopPropagation(),!i||!n)return;const t=i.artistNameFactory().hitUiNavigate({destination:a});n.logInteraction(t)}),[i,a,n]);return(0,R.jsx)($o.v,{title:r?(0,R.jsx)(Pv.N,{to:l,onClick:c,"":"artist-row-credits-link",children:(0,R.jsx)(On.E,{variant:"bodyMedium",children:e})}):(0,R.jsx)(On.E,{variant:"bodyMedium",children:e}),size:"sm",paddingInlineStart:"0",paddingInlineEnd:"0",subtitle:(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",style:{textTransform:"capitalize"},"":"artist-row-role",children:s}),"":"credits-artist-row",variant:"naked",id:a,trailing:r&&(0,R.jsx)(Qx,{artistUri:a,spec:i?.followToggleButtonFactory(),logger:n})},e)};let Xx=function(e){return e.MainArtist="main artist",e.FeaturedArtist="featured artist",e.Remixer="remixer",e.Actor="actor",e.Composer="composer",e.Orchestra="orchestra",e.Writer="writer",e.Producer="producer",e.Performer="performer",e.Lyricist="lyricist",e.Conductor="conductor",e.Author="author",e.Editor="editor",e.Arranger="arranger",e.EnsembleOrchestra="ensemble orchestra",e}({});const eS=(0,b.memo)((({data:e,limit:t})=>{const{spec:i,logger:n}=(0,Hi.r)($x.D,{}),r=e.reduce(((e,t)=>{const{artistName:i}=t,n=e.get(i)??[];return n.push(t),e.set(i,n),e}),new Map),a=Array.from(r,(([e,t],r)=>(0,R.jsx)(Jx,{artistName:e,roles:t.sort(((e,t)=>e.role.toLowerCase()===Xx.MainArtist?-1:t.role.toLowerCase()===Xx.MainArtist?1:0)),spec:i.creditsRowFactory({position:r}),logger:n,linkable:t.filter((e=>e.isArtistUriLinkable)).length>0},e))).slice(0,t);return(0,R.jsx)(R.Fragment,{children:a})})),tS="main-nowPlayingView-credits",iS="main-nowPlayingView-creditsShowAll",nS=({data:e,trackUri:t})=>{const i=(0,g.wA)(),n=(0,s.NC)(Ce.QIZ),{spec:r,logger:a}=(0,Hi.r)($x.D,{}),o=(0,b.useCallback)((()=>{a.logInteraction(r.showAllButtonFactory().hitUiReveal()),i((0,p.P0)(!0,t))}),[i,a,r,t]),l=(0,Js.t)(r,n);return 0===e.length?null:(0,R.jsxs)(L_.w,{className:tS,ref:l,children:[(0,R.jsx)(L_.X,{action:(0,R.jsx)(ei.H,{size:"small",condensed:!0,onClick:o,className:iS,semanticColor:"textSubdued",children:u.Ru.get("web-player.now-playing-view.show-all")}),children:u.Ru.get("web-player.now-playing-view.credits")}),(0,R.jsx)(eS,{data:e,limit:3})]})};var rS=i(62259),aS=i(46631);const sS="main-nowPlayingView-sectionHeaderSpacing",oS="main-nowPlayingView-lyricsTitle",lS="main-nowPlayingView-lyricsControls",cS="main-nowPlayingView-lyricsGradient",uS="main-nowPlayingView-lyricsContent",dS=()=>{const{spec:e,logger:t}=(0,Hi.r)(rS.X,{}),{setMode:i}=Hc();return(0,R.jsxs)("div",{className:lS,children:[(0,R.jsx)(Ai,{label:u.Ru.get("web-player.now-playing-view.lyrics.cinema-mode"),onClick:()=>{i(Bc.YU.cinema),t.logInteraction(e.cinemaModeButtonFactory().hitUiReveal()),t.logImpression(e.cinemaModeButtonFactory().impression())},children:(0,R.jsx)(fr.C,{size:"small"})}),(0,R.jsx)(Ai,{label:u.Ru.get("web-player.now-playing-view.close.lyrics"),onClick:()=>{i(Bc.YU.none),t.logInteraction(e.closeLyricsButtonFactory().hitUiHide())},children:(0,R.jsx)(Pn.M,{size:"small"})})]})},mS=({item:e})=>{const{spec:t,logger:i}=(0,Hi.r)(rS.X,{}),n=(0,b.useRef)(null),{mode:r,setMode:a}=Hc(),s=(0,b.useRef)(null),o=(0,b.useRef)(0),{data:l}=(0,rn.I)(e.uri,e?.images),c=(0,gi.o)((e=>e?.nextItems?.[0]),((e,t)=>e?.uri===t?.uri));(0,rn.I)(c?.uri,c?.images);const d=(0,b.useCallback)((()=>{o.current=Date.now()}),[]),m=(0,b.useCallback)((({lineRef:e,isActiveLine:t,shouldAnimateScroll:i,activeLineIndex:r,isFirstLine:a})=>{if(!n.current||!s.current)return;let l;if(e.current&&t?l=e.current?.offsetTop-s.current?.offsetTop-16:a&&r<0&&(l=0),void 0===l)return;const c=s.current?.scrollTop,u=Math.abs(c-l),d=n.current.clientHeight,m=Date.now()-o.current<2e3,p=o.current>0&&u>1*d;if(m||p)return;o.current=0;const h="visible"===document.visibilityState&&i?"smooth":"auto";s.current?.scrollTo({top:l,behavior:h})}),[]);if((0,b.useLayoutEffect)((()=>{o.current=0,s.current?.scrollTo({top:0,behavior:"auto"})}),[e.uri]),!l?.hasLyrics)return null;if(r===Bc.YU.npv){const t=l?.hasLyrics&&!l.isTimeSynced,i={"--lyrics-color-active":t?Up.ONy:l.colors.activeText,"--lyrics-color-inactive":l.colors.text,"--lyrics-color-passed":ax.Q.fromCSS(l.colors.activeText,.7).toCSS(sx.a.RGBA),"--lyrics-color-background":l.colors.background};return(0,R.jsxs)(L_.w,{className:At()(sS,cS),style:i,ref:n,children:[(0,R.jsx)(L_.X,{action:(0,R.jsx)(dS,{}),className:oS,children:u.Ru.get("web-player.lyrics.title")}),(0,R.jsxs)("div",{className:uS,ref:s,onWheel:d,onScroll:d,children:[t&&(0,R.jsx)(On.E,{as:"p",variant:"bodySmall",dir:"auto",style:{color:l.colors.text},children:u.Ru.get("web-player.lyrics.unsynced")}),(0,R.jsx)(aS.x,{trackUri:e.uri,data:l,format:"card",onActiveLineChange:m})]})]})}return(0,R.jsx)(L_.w,{className:sS,children:(0,R.jsx)(L_.X,{action:(0,R.jsx)(YE,{onClick:()=>{a(Bc.YU.npv),i.logInteraction(t.showLyricsButtonFactory().hitUiReveal()),i.logImpression(t.showLyricsButtonFactory().impression())},children:u.Ru.get("web-player.now-playing-view.show.lyrics")}),className:oS,children:u.Ru.get("web-player.lyrics.title")})})};var pS=i(2431),hS=i(62943);const gS="main-nowPlayingView-merch",fS=({artistId:e,merch:t})=>!t||t.length<1?null:(0,R.jsxs)(L_.w,{className:gS,children:[(0,R.jsx)(L_.X,{children:u.Ru.get("web-player.now-playing-view.npv-merch")}),(0,R.jsx)(pS.ArtistOffers,{items:t,artistId:e,merchVariant:hS.Ol.VARIANTA,variant:"bodyMedium"})]});var vS=i(96745),yS=i(96775),bS=i(51005);const _S="main-nowPlayingView-artistOnTour",ES="main-nowPlayingView-artistOnTourItem",CS="main-nowPlayingView-artistOnTourShowAll",xS=({artistId:e,data:t,variant:i="bodyMedium"})=>{const n=(0,bS.Dh)(e),r=(0,oe.Zp)(),{spec:a,logger:s}=(0,Hi.r)(vS.N,{data:{identifier:e,uri:n,position:0,reason:"NPV - On Tour"}}),o=(0,Js.t)(a),l={items:t.items.map((e=>({...e,artists:{items:e.artistsV2.items.flatMap((e=>"Artist"===e.data.__typename?e.data:[]))}}))),totalCount:t.totalCount};return l.items.length?(0,R.jsxs)(L_.w,{className:_S,ref:o,children:[(0,R.jsx)(L_.X,{action:l.items.length!==l.totalCount&&(0,R.jsx)(ei.H,{size:"small",condensed:!0,className:CS,onClick:()=>{(()=>{const e=a.seeAllButtonFactory({uri:n}).hitUiNavigate({destination:`${n}:concerts`});s.logInteraction(e);const t=(0,ne.o_)(`${n}:concerts`).toURLPath(!0);r(t)})()},semanticColor:"textSubdued",children:u.Ru.get("web-player.now-playing-view.show-all")}),children:u.Ru.get("web-player.now-playing-view.on-tour")}),l.items.map(((e,t)=>(0,R.jsx)("div",{className:ES,children:(0,R.jsx)(yS.I,{concert:e,index:t,spec:a,condensed:!0,elevatedDate:!0,titleVariant:i})},e.uri)))]}):null};var SS=i(26668),AS=i(9783);const TS="TIoJv8dV373UyvBWRDav",IS="xn9l3L0D_ZzL886N4J_5",NS="P8bNOGKtEtIZXnWEw61V",wS="PpQWFsG9yJRfPFiERSti",RS="chgeyo_c9jfrfuEJg5sk",kS="MLbUPrgOa58_qsGikfRG",OS="l7B1SCkbYm9oU2tO9mOW",PS="kT3XHoiG64bhNORLJv09",LS=16,jS=({relatedVideos:e,contextUri:t})=>{const i=u.Ru.get("npv.related-videos.title"),n=u.Ru.get("npv.related-videos.prev"),r=u.Ru.get("npv.related-videos.next"),{spec:a,logger:s}=(0,Hi.r)(Li.E,{data:{uri:t,identifier:B.K.npv}}),o=(0,SS.f)({data:{identifier:"related-videos",position:0,uri:t},parentAbsoluteLocation:a.getAbsoluteLocation()}),l=(0,b.useRef)(null),[c,d]=(0,b.useState)(0),[m,p]=(0,b.useState)(0),[h,g]=(0,b.useState)("auto"),f=(0,_f.y)(),v=(0,so.W)();(0,b.useLayoutEffect)((()=>{const e=l.current;e&&p(e.clientWidth)}),[]),(0,Ip.w)({onResize:e=>{p(e.width),f===bf.E.MEDIUM&&d(0)},refOrElement:l});const y=f===bf.E.MEDIUM?2:1,_=Math.ceil(e.length/y)-1,E=f===bf.E.MEDIUM?(m-LS*y)/y:85*m/100,C=y*E+LS*y,x=(0,b.useCallback)((()=>{const t=c*C;return c===_&&t>0&&2===y?e.length%2==0?t+LS*y:t-E+LS:t}),[c,E,C,_,e.length,y]),S=(0,b.useMemo)((()=>{const t=2===e.length&&2===y?E+8:E,i=x();return{pointerEvents:h,"--video-flex-basis":`${t}px`,transform:`translateX(-${i}px)`}}),[e.length,y,E,x,h]);(0,b.useEffect)((()=>{const e=l?.current,t=()=>{g("auto")};return e?.addEventListener("transitionend",t),()=>{e?.removeEventListener("transitionend",t)}}),[]);const A=(0,b.useCallback)((e=>{g("none"),d(c+e),e>0&&v||e<0&&!v?s.logInteraction(o.shelfHeaderFactory().shelfCarouselControlsFactory().shelfCarouselControlsPreviousFactory().hitUiReveal()):(e<0&&v||e>0&&!v)&&s.logInteraction(o.shelfHeaderFactory().shelfCarouselControlsFactory().shelfCarouselControlsNextFactory().hitUiReveal())}),[c,v,s,o]),T=(0,Js.t)(o);return(0,R.jsx)(L_.w,{className:TS,ref:T,children:(0,R.jsxs)(on.r,{spec:a,children:[(0,R.jsx)(L_.X,{children:i}),(0,R.jsxs)("div",{className:IS,style:{"--container-gap":"16px"},children:[0!==c&&(0,R.jsx)("button",{type:"button","aria-label":n,onClick:()=>A(-1),className:At()(NS,wS),children:v?(0,R.jsx)(mf.V,{}):(0,R.jsx)(df.g,{})}),c<_&&(0,R.jsx)("button",{type:"button","aria-label":r,onClick:()=>A(1),className:At()(NS,RS),children:v?(0,R.jsx)(df.g,{}):(0,R.jsx)(mf.V,{})}),(0,R.jsx)("ul",{ref:l,className:kS,dir:"auto",style:S,children:e.map((({trackOfVideo:e},t,i)=>{if("Track"!==e.data.__typename)return null;const{uri:n,name:r,albumOfTrack:a,artists:s,contentRating:l}=e.data;return(0,R.jsx)("li",{className:1===i.length?PS:OS,children:(0,R.jsx)(on.r,{spec:o,children:(0,R.jsx)(AS.O,{title:r,trackUri:n,artists:s.items,album:a,contentRating:l,referrerIdentifier:"now_playing_panel",index:t,hoverBackgroundColor:"backgroundTintedHighlight",contentAlign:!0,size:"sm"})})},n)}))})]})]})})},DS=({item:e,spec:t})=>{const i=(0,s.NC)(Ce.LX5),n=(0,s.NC)(Ce.IA_),{loading:r,error:a,data:o}=(l={artistUri:e.artists[0].uri,trackUri:e.uri,enableCredits:n,enableRelatedVideos:i},c={gcTime:O_,staleTime:P_},(0,Zi.I)(fx,l,c));var l,c;const u=(0,s.NC)(Ce.yux),d=HE(e),m=(0,s.NC)(Ce.Tzx)?Zx:Ox;if(r&&e.uri&&!a)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(wC,{}),(0,R.jsx)(wC,{}),(0,R.jsx)(wC,{})]});if(!e.uri||"Artist"!==o?.artistUnion.__typename||"Track"!==o?.trackUnion.__typename||r||a)return null;const{profile:p,stats:h,visuals:g,profile:{externalLinks:f}}=o.artistUnion,{credits:v}=o.trackUnion;return(0,R.jsxs)(R.Fragment,{children:[u&&(0,R.jsx)(mS,{item:e}),(0,R.jsxs)(on.r,{spec:t,children:[o.trackUnion.relatedVideos&&"RelatedVideoPage"===o.trackUnion.relatedVideos.__typename&&o.trackUnion.relatedVideos.items.length>0&&(0,R.jsx)(jS,{contextUri:e.uri,relatedVideos:o.trackUnion.relatedVideos.items}),(0,R.jsx)(m,{artistUri:o.artistUnion.uri,artist:p,stats:h,visuals:g,externalLinks:f.items}),n&&v&&(0,R.jsx)(nS,{data:v,trackUri:e.uri}),(0,R.jsx)(xS,{artistId:o.artistUnion.id,data:o.artistUnion.goods.events.concerts}),(0,R.jsx)(fS,{artistId:o.artistUnion.id,artistUri:o.artistUnion.uri,merch:o.trackUnion.merch.items}),d&&(0,R.jsx)(VE,{item:e})]})]})},MS=({item:e,spec:t})=>(0,Ym.n)()&&e.artists[0].uri?(0,R.jsx)(DS,{item:e,spec:t}):(0,R.jsx)(R.Fragment,{}),US=({item:e,spec:t})=>(0,K.v)(e)&&!e.isLocal?(0,R.jsx)(MS,{item:e,spec:t}):(0,K.v)(e)&&e.isLocal?(0,R.jsx)(gx,{}):(0,W.p)(e)?(0,R.jsx)(hx,{item:e,spec:t}):(0,z.d)(e)?(0,R.jsx)(__,{}):(0,G.N)(e)?(0,R.jsx)(b_,{}):null;var BS=i(53212),FS=i(72419);const HS="eE_GTFbVOesrDJsMsoJF",VS=()=>{const e=(0,b.useContext)(Rv.s),t=(0,BS.a)({tryAvoidGraphQLFetching:!1}),i=(0,s.NC)(Ce.yJ8)===Ce.NtL.CANVAS_PLAY_ON_HOVER;return t?.canvas&&e?(0,R.jsx)(FS.Gg,{fileId:t.canvas.fileId,canvasType:t.canvas.type,canvasUri:t.canvas.uri,playerContainerClass:"canvasVideoContainerNPV",className:HS,playbackType:i?FS.RT.LoopOnHover:FS.RT.LoopOnPlayback,allowAspectRatioFix:!0,mouseHoverRef:e}):null};var GS=i(80784),zS=i(22413);const WS="main-nowPlayingView-nowPlayingWidget",KS="T5_sYfKJ2efL3n3dFNuN",YS="main-nowPlayingView-nowPlayingGrid",qS="main-nowPlayingView-contextItemInfo",ZS="hhFdIYRyHsqlCHy7T_8A",$S="O5NOY8Xw4NH0IhBZu8tm",QS="DFvRASpHOFAoziM4w7En",JS="GcHVbLWw6KOwa2xndYQM",XS="main-nowPlayingView-coverArtContainer",eA="ylBRlfNqGnzVa4kjUQGP",tA="E08D6ucrHuPJYzzGO7HG",iA="S6W0kreMgaIXYWSEYHya",nA="hCImOEZCJwYaSy2r1Xgx",rA="hjyiWzPtKHn_5kCe9vyg",aA="main-nowPlayingView-trackInfo",sA="eEiwEPDfVRD0HKjYM_dq",oA=({item:e,spec:t})=>{const i=(0,Qe.s)(),n=(0,b.useCallback)((n=>{const r=n?t.heartButtonFactory().hitLike({itemToBeLiked:e.uri}):t.heartButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});i.logInteraction(r)}),[e.uri,i,t]),r=(0,ku.v)(e),a=(0,_f.y)();return r?(0,R.jsx)(Ru.g,{uri:e.uri,size:a===bf.E.MEDIUM?"medium":"small",className:ZS}):(0,K.v)(e)&&!e.isLocal?(0,R.jsx)(di.b,{uri:e.uri,size:a===bf.E.MEDIUM?ci.t.sm:ci.t.xs,onClick:n,className:ZS}):(0,W.p)(e)?(0,R.jsx)(ui.b,{uri:e.uri,size:a===bf.E.MEDIUM?ci.t.sm:ci.t.xs,onClick:n,className:ZS,condensed:!0}):null},lA=({context:e,item:t})=>{const{spec:i,logger:n}=(0,Hi.r)(v_.J,{}),{spec:r}=(0,Hi.r)(Mt.p6,{data:{identifier:Mt.gw.DESKTOP}}),a=(0,nd.X)(),o=(0,s.NC)(Ce.$PN),l=(0,_f.y)();return(0,R.jsxs)(R.Fragment,{children:[o===Ce.X$5.NPV_ALWAYS_VISIBLE||o===Ce.X$5.NPV_VISIBLE_ON_HOVER?(0,R.jsx)(GS.w,{className:o===Ce.X$5.NPV_VISIBLE_ON_HOVER?QS:$S,uri:t.uri,sharingInfo:null,interactionData:{intent:"share",type:"click"},condensedAll:!0,onClick:()=>{n.logInteraction(i.shareButtonFactory({uri:t.uri}).hitCopyToClipboard())},ariaLabel:(0,ne.gH)(t.uri)?u.Ru.get("context-menu.copy-episode-link"):u.Ru.get("context-menu.copy-track-link"),size:l===bf.E.MEDIUM?"medium":"small"}):null,(0,R.jsx)(zS.a,{context:e,item:t,className:At()($S,KS),onClick:()=>{n.logInteraction(r.hideButtonFactory().hitRemoveRecommendation({recommendedItemUri:t.uri,contextUri:e.uri}))}}),a&&(0,id.N)(t)?(0,R.jsx)(on.r,{spec:i,children:(0,R.jsx)("div",{className:$S,children:(0,R.jsx)(td.o,{contextUri:t.metadata?.context_uri??e.uri,id:t.uid??void 0,uri:t.uri,isActive:!0})})}):(0,R.jsx)("div",{className:$S,children:(0,R.jsx)(oA,{item:t,spec:i})})]})};var cA=i(19944),uA=i(49278),dA=i(53961);const mA="Z_lhw3kk_krs5GqxYAPn",pA=()=>{const{setVideoPlayerUIFlag:e}=(0,ji.d)(),{close:t}=(0,dA.H)(),i=(0,b.useCallback)((()=>{e(B.n.documentPip,!1),t()}),[t,e]);return(0,R.jsx)("div",{children:(0,R.jsxs)("div",{className:mA,children:[(0,R.jsx)(On.E,{variant:"bodySmall",children:u.Ru.get("web-player.now-playing-view.video.playing-in-pip")}),(0,R.jsx)(rv.n,{onClick:i,size:"small",children:u.Ru.get("web-player.now-playing-view.video.return-playback")})]})})},hA=()=>{const e=wc(),t=(0,s.NC)(Ce.VUN),{panelSend:i}=(0,Sr.AI)(Ar.Z.DevicePicker,Ar.Z.DevicePickerOverlay),n=(0,b.useCallback)((()=>{t?(i(Pe.$S.DEVICE_PICKER_BUTTON_CLICK),(0,La.I)("DEVICE-PICKER")):e&&(i(Pe.$S.PUFFIN_BUTTON_CLICK),(0,La.I)("PUFFIN"))}),[t,e,i]);return e||t?(0,R.jsx)(rv.n,{size:"small",onClick:n,children:u.Ru.get("web-player.connect.device-picker.select-another-device")}):null},gA=()=>{const{remoteDeviceName:e,connectionStatus:t}=(0,ca.v)((e=>{const t=(0,Ja.V)(e);return{remoteDeviceName:t.remoteDevice?.name,connectionStatus:t.connectionStatus}}),ln.a);let i="";return e&&t===ua.zP.CONNECTING?i=u.Ru.get("web-player.connect.bar.connecting-state",{device_name:e}):e&&t===ua.zP.CONNECTED&&(i=u.Ru.get("web-player.connect.bar.connected-state",{device_name:e})),(0,R.jsx)("div",{children:(0,R.jsxs)("div",{className:mA,children:[(0,R.jsx)(On.E,{variant:"bodySmall",children:i}),(0,R.jsx)(hA,{})]})})};var fA=i(58715),vA=i(91494),yA=i(41753);var bA=i(8144),_A=i(16951);const EA=(0,b.memo)((()=>(0,R.jsx)(fA.B,{size:"small"}))),CA=(0,b.memo)((()=>(0,R.jsx)(vA.e,{size:"small"}))),xA=({className:e})=>{const t=u.Ru.get("npv.song-videos.switch-to-video"),i=u.Ru.get("npv.song-videos.switch-to-audio"),n=u.Ru.get("page.loading"),[r,a]=(0,b.useState)(!1),o=(0,g.wA)(),l=(0,D.z)(),{signals:c,loading:d,uri:m}=(0,gi.o)((e=>({signals:e?.signals,loading:e?.isBuffering&&!e.isPaused,uri:e?.item?.uri}))),{isSongVideoDeviceRestricted:p}=(0,bA.k)(),h=(()=>{const e=(0,D.z)(),t=e=>{const t=e?.signals;return t?.includes(yA.L.SWITCH_TO_VIDEO)??!1};return async()=>{if(t(e.getState()))return!0;let i=()=>{};const n=new Promise((n=>{i=e.getEvents().addListener(H.gd.UPDATE,(e=>{t(e.data)&&n(!0)}))})),r=new Promise((e=>setTimeout((()=>e(null)),2e3))),a=await Promise.race([n,r]);return i(),a}})(),{spec:f,logger:v}=(0,Hi.r)(Li.E,{data:{uri:m??"",identifier:B.K.npv}}),y=(0,b.useCallback)((()=>{p?o(lp.ug.actions.open({onConfirm:async()=>{await h()&&l.sendSignal(yA.L.SWITCH_TO_VIDEO)}})):(r?(l.sendSignal(yA.L.SWITCH_TO_AUDIO),v.logInteraction(f.toggleAudioVideoButtonFactory({identifier:"switch_to_audio"}).hitPlay({itemToBePlayed:m??""}))):(l.sendSignal(yA.L.SWITCH_TO_VIDEO),v.logInteraction(f.toggleAudioVideoButtonFactory({identifier:"switch_to_video"}).hitPlay({itemToBePlayed:m??""}))),a((e=>!e)))}),[p,r,o,h,l,v,f,m]);(0,b.useEffect)((()=>{l.canSendSignal(yA.L.SWITCH_TO_VIDEO)?a(!1):l.canSendSignal(yA.L.SWITCH_TO_AUDIO)&&a(!0)}),[l,c]);const _=(0,Js.t)(f.toggleAudioVideoButtonFactory({identifier:r?"switch_to_audio":"switch_to_video"})),E=(0,s.NC)(Ce.KkE,{loadingValue:!1}),C=r?i:t;return E?(0,R.jsx)(b.Suspense,{fallback:!0,children:(0,R.jsxs)("div",{className:At()(_A.A.container,e),ref:_,children:[(0,R.jsxs)("div",{"aria-label":n,className:At()(_A.A.button,_A.A.loading,{[_A.A.loadingVisible]:r&&d}),"aria-hidden":!0,children:[(0,R.jsx)("div",{className:_A.A.spinner}),(0,R.jsx)(On.E,{as:"span",variant:"bodySmall",children:n})]}),(0,R.jsxs)("button",{"aria-label":C,className:At()(_A.A.button,_A.A.switch,{[_A.A.hidden]:r&&d}),onClick:y,disabled:d,children:[r?(0,R.jsx)(CA,{}):(0,R.jsx)(EA,{}),(0,R.jsx)(On.E,{as:"span",variant:"bodySmallBold",children:C})]})]})}):null},SA=(0,b.lazy)((()=>i.e(1260).then(i.bind(i,91260)))),AA=(0,b.lazy)((()=>i.e(8170).then(i.bind(i,8170))));let TA=function(e){return e[e.NONE=0]="NONE",e[e.COVER_ART=1]="COVER_ART",e[e.VIDEO_OVER_PIP_PLACEHOLDER=2]="VIDEO_OVER_PIP_PLACEHOLDER",e[e.VIDEO_OVER_CONNECT_PLACEHOLDER=3]="VIDEO_OVER_CONNECT_PLACEHOLDER",e[e.CANVAS=4]="CANVAS",e}({});const IA=()=>{const e=(0,hr.L)(),t=(0,Ja.l)(),{videoPlayerMode:i}=(0,ji.d)(),{isSongVideo:n,isSongVideoPlayingVideo:r}=(0,bA.k)(),a=(0,g.d4)((e=>e.ads?.vto)),{showCanvasInNPV:s}=(0,BS.a)({tryAvoidGraphQLFetching:!0});if(!e)return TA.NONE;const{item:o}=e;return i===B.K.documentPip||i===B.K.pip?TA.VIDEO_OVER_PIP_PLACEHOLDER:o?.type===_u.c.AD&&a?.isMinimized&&"audio"!==o?.mediaType?TA.NONE:o?.type!==_u.c.EPISODE||"video"!==o?.mediaType&&"mixed"!==o?.mediaType?n&&r?t?TA.VIDEO_OVER_CONNECT_PLACEHOLDER:TA.NONE:s?TA.CANVAS:TA.COVER_ART:t?TA.VIDEO_OVER_CONNECT_PLACEHOLDER:TA.NONE},NA=({hideContextItemInfo:e=!1})=>{const t=(0,hr.L)(),i=IA(),{draggable:n,onDragStart:r}=(0,Bu.P)(),{spec:a,logger:s}=(0,Hi.r)(v_.J,{}),{isSongVideo:o}=(0,bA.k)(),l=i===TA.CANVAS,c=i===TA.COVER_ART,u=(0,rd.xF)(t?.item.uri||""),d=(0,b.useRef)(null),m=(0,b.useRef)(null),p=(0,b.useRef)(null),h=!(0,Rr.j)(),[g,f]=(0,b.useState)(null);if(h&&l&&d.current&&p.current&&(f(p.current),setTimeout((()=>{f(null)}),600)),d.current=c,m.current=l,p.current=t,null===t)return null;const{context:v,item:y,index:_}=t,E="isPodcastAd"in y&&y.isPodcastAd&&y.metadata?.["podcast_ads.buttonMessage"]&&y.metadata?.["podcast_ads.tagline"];return(0,R.jsxs)("div",{className:At()(WS,{[JS]:h}),children:[(0,R.jsxs)("div",{className:YS,children:[(0,R.jsxs)("div",{className:At()(XS,{[rA]:l,[nA]:c}),children:[(0,R.jsx)("div",{className:eA,children:(0,R.jsx)(cA.h,{context:g?.context||v,item:g?.item||y,index:_,canSwitchVisuals:!0})}),i===TA.VIDEO_OVER_PIP_PLACEHOLDER&&(0,R.jsx)(pA,{}),i===TA.VIDEO_OVER_CONNECT_PLACEHOLDER&&(0,R.jsx)(gA,{}),(0,R.jsx)("div",{className:At()(tA,{[iA]:!l}),children:(0,R.jsx)(el.h,{menu:(0,R.jsx)(y_.W,{context:v,item:y,canSwitchVisuals:!0}),children:(0,R.jsx)("div",{draggable:n,onDragStart:e=>{r(e,{itemUris:[y.uri],dragLabelText:(0,WE.r)(y)})},children:l&&(0,R.jsx)(VS,{uri:y.uri})})})}),(0,R.jsx)(uA.F,{})]}),o&&(0,R.jsx)(xA,{className:l?sA:""}),e?null:(0,R.jsxs)("div",{className:qS,children:[(0,R.jsx)(AE.d,{className:At()(aA),context:v,item:y,titleTypeVariant:"titleSmall",subtitleTypeVariant:"bodyMedium",onTitleClick:e=>{s.logInteraction(a.titleFactory({uri:y.uri}).hitUiNavigate({destination:e||""})),y.type===_u.c.TRACK&&u({categoryAndAction:rd.Mu.NowPlayingView,destinationUrl:(0,ne.o_)(e)?.toURL()})},onSubtitleClick:e=>{s.logInteraction(a.artistFactory({uri:y.uri}).hitUiNavigate({destination:e||""}))},referrer:Pu.G.NPV}),(0,G.N)(y)?E?null:(0,R.jsx)(b.Suspense,{fallback:!0,children:(0,R.jsx)(SA,{item:y,onCtaClick:e=>{s.logInteraction(a.titleFactory({uri:y.uri}).hitUiNavigate({destination:e||""}))}})}):(0,R.jsx)(lA,{context:v,item:y})]})]}),E&&(0,R.jsx)(b.Suspense,{fallback:!0,children:(0,R.jsx)(AA,{item:y,onCtaClick:e=>{s.logInteraction(a.titleFactory({uri:y.uri}).hitUiNavigate({destination:e||""}))}})})]})};var wA=i(10044),RA=i(40223);const kA={context:null,item:null};var OA=i(38404);const PA="QjkE7lL6vDkJZovRnCjA",LA="IkRGajTjItEFQkRMeH6v",jA="f2UE9n5nZcbgZrGYTU3r",DA="nw2W4ZMdICuBo08Tzxg9",MA=(0,b.lazy)((()=>Promise.all([i.e(4151),i.e(8529)]).then(i.bind(i,68529))));function UA(e){return(0,K.v)(e)||(0,Y.v)(e)||(0,W.p)(e)||(0,z.d)(e)?e.name:(0,G.N)(e)?"":(0,q.d)(e)}const BA=b.memo((({item:e,spec:t})=>{const{ref:i,breakpoint:n}=(0,Ef.x)({[bf.E.XSMALL]:0,[bf.E.SMALL]:280,[bf.E.MEDIUM]:320});return(0,R.jsx)("div",{className:DA,"":"NPV_Panel_OpenDiv",ref:i,children:e&&(0,R.jsxs)(_f.o.Provider,{value:n,children:[(0,R.jsx)(NA,{}),(0,R.jsx)(US,{item:e,spec:t}),!(0,W.p)(e)&&(0,R.jsx)(mC,{})]})})})),FA=({context:e,item:t,spec:i,currentPanel:n})=>{const r=(0,qr.v7)();(0,b.useEffect)((()=>{r.current&&(r.current.scrollTop=0)}),[t?.uri,r]);return n===Ar.Z.NowPlayingView?(0,aC.bJ)(e,t)?(0,R.jsx)(hu.IT,{spec:i}):(0,R.jsx)(BA,{currentPanel:n,context:e,item:t,spec:i}):(0,R.jsx)("div",{"":"NPV_Panel_ClosedDiv"})},HA=({context:e,item:t,spec:i,currentPanel:n})=>(0,R.jsx)(FA,{currentPanel:n,context:e,item:t,spec:i}),VA=()=>IA()!==TA.CANVAS,GA=({item:e})=>{const t=(0,b.useRef)(null),i=(0,hr.L)(),{title:n,link:r}=(0,OA.g)(),{spec:a,logger:s}=(0,Hi.r)(v_.J,{}),o=(0,b.useCallback)((()=>{const e=a.closeButtonFactory().hitUiHide();s.logInteraction(e)}),[a,s]);(0,b.useEffect)((()=>{null!==t.current&&t.current.focus()}),[]);const l=At()(PA);return(0,R.jsx)(wf.a,{title:n,link:r,actions:i&&i.context&&(0,R.jsx)(Ti.b,{menu:(0,R.jsx)(y_.W,{context:i.context,item:e,canSwitchVisuals:!0}),children:(0,R.jsx)(Ws.e,{size:Ws.M.xs,label:u.Ru.get("more.label.context",e?UA(e):""),onClick:()=>{s.logInteraction(a.contextMenuButtonFactory().hitUiReveal())}})}),panelLinkRef:t,panel:Ar.Z.NowPlayingView,onClose:o,item:e,className:l})},zA=({item:e})=>{const t=!VA();return(0,b.useMemo)((()=>t?(0,R.jsx)(GA,{item:e}):null),[e,t])},WA=({item:e})=>{const t=(0,Yn.w)(e),i=VA();return(0,b.useMemo)((()=>!t&&i?(0,R.jsx)(GA,{item:e}):null),[e,i,t])},KA=({nodeRef:e,currentPanel:t})=>{const{context:i,item:n,index:r}=(0,hr.L)()||{context:null,item:null,index:null},{spec:a,UBIFragment:o}=(0,Hi.r)(f_.t,{data:{uri:n?n.uri:""}}),l=(0,Yn.w)(n),c=(0,Js.t)(a),d=(()=>{const{item:e}=(0,hr.L)()||kA,{isYourDJNarrator:t}=(0,RA.CV)(),i=(0,s.NC)(Ce.yon),n=(0,sn.z)(e?.images?.[0]?.url,Up.l0o,"colorDark");return t?wA.Ym:i?n:void 0})(),m={"--background-base":d,"--section-background-base":d?"var(--background-tinted-base)":"var(--background-elevated-base)"};return(0,R.jsx)(Ld.P,{surface:Pd.u.NOW_PLAYING,children:(0,R.jsx)(qr.ql.Provider,{value:"now_playing_panel",children:(0,R.jsx)(Rv._,{nodeRef:e,label:u.Ru.get("web-player.now-playing-view.label"),style:m,itemUri:n?.uri?n.uri:"","":"now-playing-view-container",className:"NowPlayingView",children:(0,R.jsx)(o,{spec:a,children:(0,R.jsx)(kv.w,{className:At()(LA,{[jA]:void 0!==d}),fixedHeader:(0,R.jsx)(WA,{item:n}),ref:c,children:l?(0,R.jsx)(MA,{item:n,context:i,index:r,currentPanel:t}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(zA,{item:n}),(0,R.jsx)(HA,{spec:a,currentPanel:t,context:i,item:n})]})})})})})})},YA="vzeIlCPBQJUaqdMZHqHE",qA="iZgGvu9g2gDlQ1ofJ7rH",ZA="FSZKuoSTDgGwCPXO_qel",$A="cPpNQwPTiEn9Zegl5Dwz",QA="p2Yw6bT_O5PW8yGv1R0X",JA="pK7G3_mtRcuFjbhJzm1s",XA="gVJxtuXo8lHAw8XLKHfQ",eT="BR3H6wavkReGa2xeSeaV",tT="vXYSi4u1nPutJ_ZkC6mq",iT=e=>{const t=(0,b.useRef)(null);return(0,R.jsx)(va.A,{in:e.isActive,nodeRef:t,timeout:{enter:e.shouldPlayAnimation?200:0,exit:e.shouldPlayAnimation?300:0},classNames:{enter:e.shouldPlayAnimation?qA:JA,enterActive:e.shouldPlayAnimation?ZA:XA,exit:e.shouldPlayAnimation?$A:eT,exitActive:e.shouldPlayAnimation?QA:XA},unmountOnExit:!0,mountOnEnter:!0,children:(0,R.jsx)("div",{className:YA,children:(0,R.jsx)("div",{className:tT,ref:t,children:e.children})})})};var nT=i(84852),rT=i(48451),aT=i(38818),sT=i(73010),oT=i(65538),lT=i(50638),cT=i(14854),uT=i(63898),dT=i(19447),mT=i(78975),pT=i(78560);const hT="PddBvUOS0_6f9B21fVGF",gT=({ariaLabel:e,onRemoveItems:t,nrItems:i,columnCount:n,children:r})=>{const a=(0,b.useRef)(null);(0,dT.g)(a);const s=(0,mT.d)(t);return(0,R.jsx)(uT.R,{firstInteractiveIsWrapper:!0,"aria-label":e,"aria-rowcount":i,"aria-colcount":n,className:hT,ref:a,onKeyDown:s,children:r})},fT=({items:e,renderRow:t,...i})=>{const n=(0,b.useCallback)(((t,i)=>e.slice(t,i+1)),[e]);return(0,R.jsx)(pT.k,{resolveItem:vT,getItems:n,nrTracks:e.length,children:(0,R.jsx)(gT,{nrItems:e.length,...i,children:e.map(t)})})};function vT(e){return{uri:e.uri,uid:e.uid??void 0,type:e.type}}function yT(e,t){return e.uid??`${e.uri}:${t}`}var bT=i(55665),_T=i(56914),ET=i(24805),CT=i(41265),xT=i(27685);const ST="VXFYm2GnsH4zc3EPikNi",AT="yvjS3DPkDIHgMUZxL972",TT="Os6nTuXambdCB8H81QRT",IT="RDIVOZoeGMohQ8MeJjUH",NT="Cj0QJuDauCo39643t0Q8",wT="evQ_5Znk6OXYHBzLCSoN",RT="nCwi6jOC9FEKO5tKAQKW",kT="DP0qcvnv6ToERKYhb9Xk",OT="yIYdkVZJzDlj1lqOmV1M",PT="kh6wYYPvgRPBhA2wj3AS",LT="qp7Sys7hJSZHLzw4K_yF",jT="fIabFr0bD1PUqwipmTjQ",DT=({title:e,type:t,images:i,onTogglePlay:n,isPlaying:r,ariaPauseLabel:a,ariaPlayLabel:s})=>{const o=(0,Dy._)(),l=t===_u.c.ARTIST||t===_u.c.USER?ng.u.CIRCLE:ng.u.ROUNDED_CORNERS;return(0,R.jsxs)("div",{className:PT,children:[(0,R.jsx)(ng.b,{fadeIn:!0,images:o(i??[],48),shape:l,size:rg.Qe.SIZE_48,iconSize:"medium",type:t,title:e,loadingMode:"eager"}),(0,R.jsx)("span",{className:At()(LT,NT),children:(0,R.jsx)(xT.R,{onClick:n,version:xT.H.transparent,isPlaying:r,ariaPauseLabel:a,ariaPlayLabel:s,condensedAll:!0})})]})};var MT=i(39710);const UT=({title:e,isActive:t,uri:i,type:n})=>{const{trackPageEnhancedEnabled:r,trackPageLinksNoLyricsEnabled:a}=(0,rd.Zo)(),s=n===_u.c.TRACK&&(r||a);return(0,R.jsx)(ti.Zp,{showDelay:ti.uF,label:e,children:(0,R.jsx)(MT.R,{enabled:s,uri:i,children:(0,R.jsx)(Qo.d,{lineClamp:1,semanticColor:t?"textBrightAccent":"textBase",dir:"auto",children:e})})})},BT=({menu:e,labelName:t})=>(0,R.jsx)(Ti.b,{menu:e,children:(0,R.jsx)(Ws.e,{className:NT,label:u.Ru.get("more.label.context",t),size:"small"})});var FT=i(91584);const HT=({queuedBy:e})=>{if(!e)return null;const t=(0,Cx.g)(e.images,{desiredSize:24});return(0,R.jsx)(ti.Zp,{label:u.Ru.get("queue.queued-by",e.name),children:(0,R.jsx)("div",{children:(0,R.jsx)(el.h,{menu:(0,R.jsx)(FT.B,{uri:e.uri}),children:(0,R.jsx)(Pv.N,{to:e.uri,children:(0,R.jsx)(Fp.e,{images:t?[t]:[],userIconSize:"small",width:24,displayName:e.name,username:e.username,label:""})})})})})},VT=({queuedBy:e,menu:t,moreButtonLabelName:i})=>(0,R.jsxs)("div",{className:IT,children:[t&&i&&(0,R.jsx)(BT,{menu:t,labelName:i}),(0,R.jsx)(HT,{queuedBy:e})]});var GT=i(68341),zT=i(9559);const WT="spotify:app:queue";var KT=i(98767);const YT=()=>(0,R.jsx)("div",{className:ST}),qT=({id:e,uid:t,uri:i,contextUri:n,index:r,dragLabel:a,type:s,title:o,subtitle:l,images:c,onDrop:u,allowedDropMimeTypes:d,menu:m,moreButtonLabelName:p,usePlayContextItem:h,section:g,queuedBy:f,ariaPauseLabel:v,ariaPlayLabel:y,onContextMenu:_})=>{const{className:E,dropPosition:C,draggable:x,...S}=function({uid:e,uri:t,index:i,dragLabel:n,allowedMimeTypes:r=[],onDrop:a,sectionId:s}){const{draggable:o,onDragStart:l}=(0,zT.R)({index:i,contextUri:WT,sectionId:s,label:n??"",isEnabled:!!n}),c=(0,GT.A)({id:e??void 0,uri:t,allowedMimeTypesByDropPosition:{[ET.Nz.BEFORE]:r,[ET.Nz.AFTER]:r},onDrop:a});return(0,b.useMemo)((()=>({...c,draggable:o,onDragStart:l})),[o,c,l])}({uid:t,uri:i,index:r,dragLabel:a,onDrop:u,allowedMimeTypes:d,sectionId:g}),{isSelected:A}=(0,b.useContext)(pT.m),{onClick:T,onContextMenu:I,onKeyDown:N}=(0,CT.q)({index:r,contextUri:n,onContextMenu:_,canRemovePlaylistItems:!1,removePlaylistItems:void 0,isTreeGrid:!0}),w=(0,Qe.s)(),{spec:k}=(0,Hi.r)(bT.i,{data:{position:r,reason:"",uri:i}}),{isActive:O,isPlaying:P,togglePlay:L,triggerPlay:j}=h({uri:i,uid:t??void 0}),D=(0,b.useCallback)((()=>{const e=(0,KT.$I)({spec:k.playbackButtonFactory(),logger:w,uri:i,isActive:O,isPlaying:P});L({loggingParams:e})}),[O,P,w,k,L,i]),M=(0,b.useCallback)((()=>{const e=w.logInteraction(k.doubleHitPlay({itemToBePlayed:i}));j({loggingParams:e})}),[w,k,j,i]),U=(0,b.useCallback)((e=>{if("Enter"===e.key&&e.target instanceof Element&&e.currentTarget.querySelector(':scope > [role="button"]')===e.target){const e=w.logInteraction(k.playbackButtonFactory().hitPlay({itemToBePlayed:i}));j({loggingParams:e})}N(e)}),[w,N,k,j,i]),B=(0,b.useCallback)((e=>{const t=e.currentTarget.querySelector('[role="button"]');t instanceof HTMLElement&&t.focus(),T(e)}),[T]),F=(0,R.jsx)(DT,{type:s,onTogglePlay:D,isPlaying:P,title:o,images:c,ariaPauseLabel:v,ariaPlayLabel:y}),H=(0,R.jsx)(VT,{queuedBy:f,menu:m,moreButtonLabelName:p}),V=A(r),G=V&&A(r-1),z=V&&A(r+1),W=(0,R.jsx)($o.v,{id:e,media:F,title:(0,R.jsx)(UT,{isActive:O,title:o,uri:i,type:s}),subtitle:l,className:At()(TT,E,{[wT]:G,[RT]:z}),variant:A(r)?"tinted":void 0,trailing:H,onDoubleClick:M,hoverAnimationDuration:"0ms",padding:lv.v4,onClick:()=>{},onContextMenu:I}),K=(0,R.jsx)(_T.W,{className:At()(E),draggable:x&&!!a,"aria-posinset":r,onKeyDown:U,...S,onClick:B,children:W});return(0,R.jsxs)(R.Fragment,{children:[C===ET.Nz.BEFORE&&(0,R.jsx)(YT,{}),K,C===ET.Nz.AFTER&&(0,R.jsx)(YT,{})]})},ZT=e=>{const t=(0,R.jsx)(qT,{...e});return e.menu?(0,R.jsx)(el.h,{menu:e.menu,children:t}):t},$T=({ad:e,index:t,...i})=>{const{uid:n,uri:r,type:a,title:s,advertiser:o,images:l}=e,c=yT(e,t),d=o??s??u.Ru.get("ad-formats.advertisement");return(0,R.jsx)(ZT,{uid:n,uri:r,id:c,index:t,type:a,title:d,images:l,subtitle:null,...i})};var QT=i(71072),JT=i(99686);const XT=({type:e})=>{const t=function(e){switch(e){case _u.c.TRACK:return u.Ru.get("web-player.queue-history.item-type.track");case _u.c.EPISODE:return u.Ru.get("web-player.queue-history.item-type.episode");case _u.c.CHAPTER:return u.Ru.get("web-player.queue-history.item-type.chapter");case _u.c.AD:case _u.c.UNKNOWN:return null;default:return(0,q.k)(e),null}}(e);return t&&(0,R.jsx)(On.E,{semanticColor:"textSubdued",variant:"bodySmall",children:t})};var eI=i(39803),tI=i(54687),iI=i(59355),nI=i(16972),rI=i(85065);const aI="iFEXaIHbvw1bGP0fFu9g",sI=({item:e,subtitle:t,tooltipText:i,showTypeLabel:n})=>{const r=(e=>{const t=(0,nI.T)(e.uri),i=(0,K.v)(e)||(0,W.p)(e)||(0,z.d)(e),n=b.Children.toArray([(0,id.N)(e)&&(0,R.jsx)(eI.R,{title:u.Ru.get("web-player.smart-shuffle.icon-hover-label"),"aria-label":u.Ru.get("web-player.smart-shuffle.icon-hover-label"),semanticColor:"textBrightAccent",size:"small"}),t===rI.kw.YES&&(0,R.jsx)(iI._,{}),i&&e.isExplicit&&!e.is19PlusOnly&&(0,R.jsx)(Y_.g,{}),i&&e.is19PlusOnly&&(0,R.jsx)(q_.q,{size:16}),(0,K.v)(e)&&(e.hasAssociatedVideo||"video"===e.mediaType)&&(0,R.jsx)(tI.l,{})]);return n.length?(0,R.jsx)("span",{className:aI,children:n}):null})(e);return(0,R.jsx)(Jo.j,{dir:"auto",children:(0,R.jsxs)(On.E,{semanticColor:"textSubdued",variant:"bodySmall",className:kT,children:[r?(0,R.jsx)("span",{className:jT,children:r}):null,(0,R.jsx)(ti.Zp,{label:i,showDelay:ti.uF,children:(0,R.jsxs)("span",{className:OT,children:[n&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(XT,{type:e.type})," •"," "]}),t]})})]})})};var oI=i(96805);function lI(e){let{uri:t}=(0,Fi.f)();return e===oI.$.NextInQueue?t="spotify:app:queue:NextInQueue":e===oI.$.NextUp&&(t="spotify:app:queue:NextUp"),t??""}const cI=({chapter:e,index:t,showTypeLabel:i,...n})=>{const{uid:r,uri:a,type:s,name:o,images:l,book:c}=e,d=yT(e,t),m=lI(n.section),p=(0,R.jsx)(JT.r,{uri:a,removeFromQueueData:{uid:r??void 0,contextUri:m}}),h=(0,R.jsx)(sI,{item:e,tooltipText:c.name,showTypeLabel:i,subtitle:(0,R.jsx)(el.h,{menu:(0,R.jsx)(QT.p,{uri:c.uri}),children:(0,R.jsx)(Pv.N,{to:c.uri,stopPropagation:!0,children:c.name})})});return(0,R.jsx)(ZT,{uid:r,uri:a,contextUri:m,id:d,index:t,type:s,title:o,subtitle:h,images:l,dragLabel:o,menu:p,moreButtonLabelName:o,ariaPauseLabel:u.Ru.get("playlist.a11y.pause",o),ariaPlayLabel:u.Ru.get("playlist.a11y.play",o),...n})},uI=({episode:e,index:t,showTypeLabel:i,...n})=>{const{uid:r,uri:a,type:s,name:o,images:l,show:c}=e,d=yT(e,t),m=lI(n.section),p=(0,R.jsx)(z_.b,{uri:a,uid:r??void 0,showUri:e.show.uri,contextUri:m,provider:e.provider}),h=(0,R.jsx)(sI,{item:e,tooltipText:c.name,showTypeLabel:i,subtitle:(0,R.jsx)(el.h,{menu:(0,R.jsx)(hC.H,{uri:c.uri}),children:(0,R.jsx)(Pv.N,{to:c.uri,stopPropagation:!0,children:c.name})})});return(0,R.jsx)(ZT,{uid:r,uri:a,contextUri:m,id:d,index:t,type:s,title:o,subtitle:h,images:l,dragLabel:o,menu:p,moreButtonLabelName:o,ariaPauseLabel:u.Ru.get("tracklist.a11y.pause",o,c.name),ariaPlayLabel:u.Ru.get("tracklist.a11y.play",o,c.name),...n})};var dI=i(17202),mI=i(49350),pI=i(48100);const hI=({track:e,index:t,showTypeLabel:i,...n})=>{const{uid:r,uri:a,type:s,name:o,album:l}=e,c=yT(e,t),d=lI(n.section),{uri:m}=(0,Fi.f)(),p=e.isLocal?(0,R.jsx)(mI.A,{uri:a,uid:r??void 0,contextUri:d}):(0,R.jsx)(pI.P,{uri:a,uid:r??void 0,albumUri:l.uri,artists:e.artists,contextUri:d,entityContextUri:m??void 0,isSmartRecommendation:(0,id.N)(e),provider:e.provider}),h=e.artists.map((({name:e})=>e)).join(u.Ru.getSeparator()),g=e.artists?(0,R.jsx)(sI,{item:e,tooltipText:h,showTypeLabel:i,subtitle:(0,R.jsx)(R.Fragment,{children:e.artists.map(((e,t)=>(0,R.jsxs)(b.Fragment,{children:[t>0&&u.Ru.getSeparator(),(0,R.jsx)(el.h,{menu:(0,R.jsx)(dI.t,{uri:e.uri}),children:(0,R.jsx)(Pv.N,{to:e.uri,stopPropagation:!0,children:e.name})})]},t)))})}):null;return(0,R.jsx)(ZT,{uid:r,uri:a,contextUri:d,id:c,index:t,type:s,title:o,images:l.images,dragLabel:o,menu:p,moreButtonLabelName:o,subtitle:g,ariaPauseLabel:u.Ru.get("tracklist.a11y.pause",o,h),ariaPlayLabel:u.Ru.get("tracklist.a11y.play",o,h),...n})};var gI=i(52820),fI=i(5800),vI=i(78737);const yI=(0,b.createContext)(null),bI=({children:e})=>{const{uri:t}=(0,vI.H)(),{spec:i,UBIFragment:n}=(0,Hi.r)(gI.i,{data:{identifier:fI.$h.NOWPLAYING_QUEUE,uri:t??""}}),r=(0,b.useMemo)((()=>i.nowPlayingSectionFactory()),[i]),a=(0,b.useMemo)((()=>i.nextInQueueSectionFactory()),[i]),s=(0,b.useMemo)((()=>i.nextFromSectionFactory()),[i]),o=(0,b.useMemo)((()=>({queueSpec:i,nowPlayingSectionSpec:r,nextInQueueSectionSpec:a,nextFromSectionSpec:s})),[i,r,a,s]);return(0,R.jsx)(yI.Provider,{value:o,children:(0,R.jsx)(n,{spec:i,children:e})})};var _I=i(879);const EI=()=>{const e=(0,b.useContext)(yI);if(!e)throw Error("useQueueUBI must be used within a QueuePanelUBIProvider!");const{queued:t}=(0,vI.H)(),i=(0,Qe.s)(),{queueSpec:n,nowPlayingSectionSpec:r,nextInQueueSectionSpec:a,nextFromSectionSpec:s}=e;return{logClearQueue:(0,b.useCallback)((()=>{const e=a.clearQueueButtonFactory().hitRemoveItemsFromQueue({numberOfItemsToRemoveFromQueue:t.length});i.logInteraction(e)}),[i,a,t.length]),logAddToQueue:(0,b.useCallback)(((e,t)=>{let n;switch(e){case oI.$.NowPlaying:n=r;break;case oI.$.NextInQueue:n=a;break;case oI.$.NextUp:n=s;break;default:return}const o=1===t.length?n.dragAddItemToQueue({itemToAddToQueue:t[0]}):n.dragAddItemsToQueue({numberOfItemsToAddToQueue:t.length});i.logInteraction(o)}),[i,s,a,r]),logSort:(0,b.useCallback)((e=>{let t;switch(e){case oI.$.NextInQueue:t=a;break;case oI.$.NextUp:t=s;break;case oI.$.NowPlaying:default:return}const n=t.dragSort();i.logInteraction(n)}),[i,s,a]),logQueuePanelTabChange:(0,b.useCallback)((e=>{if(e!==_I.p.PARTICIPANT_LIST){const t=n.queueHistoryTabFactory({identifier:e===_I.p.QUEUE?"queue":"recently_played"}).hitUiReveal();i.logInteraction(t)}}),[i,n]),logQueueContextLinkNavigate:(0,b.useCallback)((e=>{const t=s.queueContextLinkFactory().hitUiNavigate({destination:e??""});i.logInteraction(t)}),[i,s])}};var CI=i(88907);const xI=(0,b.memo)((function({item:e,...t}){const i=function(e,t){const i=(0,D.z)(),{request:n}=(0,b.useContext)(We.j),{logAddToQueue:r,logSort:a}=EI();return(0,b.useCallback)((async(s,o,l)=>{const{contextUri:c,sectionId:u,itemIds:d}=l??{},m=t===oI.$.NowPlaying,p=WT===c&&!m,h=s[eu.fl.ALBUMS]?.at(0),g=Object.values(s).flat();let f=[];if(h){const{trackUris:e}=await(0,CI.s)(h,0,n);f=e.map((e=>({uri:e,uid:null})))}else f=p&&d?.length?d.map((e=>({uri:"",uid:e}))):Object.values(s).flat().map((e=>({uri:e,uid:null})))??[];const v=p&&u===oI.$.NowPlaying;let y;y=o===ET.Nz.BEFORE?{before:{uri:e.uri,uid:e.uid??null}}:{after:{uri:e.uri,uid:e.uid??null}},p&&!v?(t&&a(t),i.reorderQueue(f,y)):(t&&r(t,g),m?i.addToQueue(f):i.insertIntoQueue(f,y))}),[e.uid,e.uri,r,a,i,n,t])}(e,t.section);switch(e.type){case _u.c.TRACK:return(0,R.jsx)(hI,{track:e,onDrop:i,...t});case _u.c.EPISODE:return(0,R.jsx)(uI,{episode:e,onDrop:i,...t});case _u.c.CHAPTER:return(0,R.jsx)(cI,{chapter:e,onDrop:i,...t});case _u.c.AD:return(0,R.jsx)($T,{ad:e,onDrop:i,...t});case _u.c.UNKNOWN:return null;default:return(0,q.k)(e),null}})),SI=(0,b.memo)((function({item:e,...t}){const{usePlayContextItem:i}=(0,eE.P)({uri:e.uri,pages:[{items:[e]}]},{featureIdentifier:"history"});return(0,R.jsx)(xI,{item:e,...t,usePlayContextItem:i})})),AI=({items:e})=>{const t=(0,b.useCallback)(((e,t)=>(0,R.jsx)(SI,{item:e,index:t},yT(e,t))),[]);return(0,R.jsx)(fT,{items:e,ariaLabel:u.Ru.get("view.recently-played"),renderRow:t,columnCount:3})};var TI=i(30377),II=i(67662);const NI=()=>{const{isLoading:e,data:t}=(0,II.a)();return e?null:t?.items.length?(0,R.jsx)(AI,{items:t.items}):(0,R.jsx)(TI.H,{})};var wI=i(72757);const RI=(e,t)=>!t?.didQueueChangeSignificantly,kI=(e,t,i)=>{RI(0,i?.current)?(0,wI.oz)({onUpdate:t=>{e.style.opacity=t.toString()}}):e.style.opacity="1"},OI=(e,t,i,n)=>{RI(0,n?.current)?(0,wI.oz)({onUpdate:t=>{e.style.opacity=(1-Number(t)).toString()},onComplete:i}):i()},PI=({hideEnteringElements:e,animateEnteringElements:t,animateExitingElements:i,animateFlippedElements:n})=>{e(),i(),n(),t()};var LI=i(8741);function jI(e){const t=(0,b.useRef)(e);return(0,b.useMemo)((()=>{const i=new Map,n=MI(t.current,i),r=MI(e,i),a=(0,LI.I)(n,r),s=a>16||a>=Math.max(DI(e),DI(t.current));return t.current=e,s}),[e])}function DI(e){return Number(!!e?.current)+(e?.queued.length??0)+(e?.nextUp.length??0)}function MI({current:e,nextUp:t=[],queued:i=[]},n){let r="";return[[e],t,i].forEach((e=>{e.forEach((e=>{e?.uid&&(n.has(e.uid)||n.set(e.uid,String.fromCharCode(65+n.size)),r+=n.get(e.uid))})),e.length&&(r+=" ")})),r}function UI(){const e=(0,Rr.j)(),t=(0,s.NC)(Ce.J9c);return!e&&t}const BI=({current:e,queued:t,nextUp:i,children:n})=>{const r=(0,b.useMemo)((()=>[e,...t,...i].filter(ic.P).map(yT).join("")),[e,i,t]),a={didQueueChangeSignificantly:jI({current:e,nextUp:i,queued:t})};return(0,R.jsx)(wI.ZI,{flipKey:r,handleEnterUpdateDelete:PI,decisionData:a,children:n})},FI=({children:e,...t})=>UI()?(0,R.jsx)(BI,{...t,children:e}):(0,R.jsx)("div",{children:e}),HI=({children:e,...t})=>UI()?(0,R.jsx)(wI.lf,{shouldFlip:RI,...t,children:e}):(0,R.jsx)(R.Fragment,{children:e}),VI=(e,t)=>{const i=(0,eE.P)({uri:e??""},{featureIdentifier:"queue"}),n=(0,b.useMemo)((()=>function(e,t){return i=>{const n=(0,D.z)(),r=t===oI.$.NowPlaying,{playbackStatus:a,isActive:s,isPlaying:o}=(0,ec.gC)((e=>r&&i.uri?(0,Qi.Ok)(e,i.uri):bs.i.NOT_ACTIVE)),l=e(i),c=(0,b.useCallback)((e=>{const{uri:t,uid:r}=i;l.triggerPlay(e,t?async()=>n.skipToNext({uri:t,uid:r??null}):void 0)}),[l,n,i]),u=(0,b.useCallback)((e=>{l.togglePlay(e,(()=>{if(s)return o?n.pause():n.resume();const{uri:e,uid:t}=i;return n.skipToNext(e?{uri:e,uid:t??null}:void 0)}))}),[l,s,i,n,o]);return{playbackStatus:a,isActive:s,isPlaying:o,triggerPlay:c,togglePlay:u}}}(i.usePlayContextItem,t)),[i.usePlayContextItem,t]);return{...i,usePlayContextItem:n}};const GI=[eu.fl.TRACKS,eu.fl.LOCAL_TRACKS,eu.fl.EPISODES,eu.fl.CHAPTERS,eu.fl.ALBUMS],zI=({uri:e,items:t,ariaLabel:i,section:n,showTypeLabel:r,decoratedQueuedByUsersByUsername:a})=>{const s=(0,D.z)(),o=(0,b.useCallback)((e=>{s.removeFromQueue(e)}),[s]),{usePlayContextItem:l}=VI(e,n),c=(0,b.useCallback)(((e,t)=>{const i=yT(e,t);return(0,R.jsx)(HI,{flipId:e.metadata?.original_uid??i,onAppear:kI,onExit:OI,translate:!0,children:(0,R.jsx)("div",{className:AT,children:(0,R.jsx)(xI,{item:e,index:t,usePlayContextItem:l,section:n,allowedDropMimeTypes:GI,showTypeLabel:r,queuedBy:a?.[e.metadata?.queued_by??""]})})},i)}),[a,n,r,l]);return(0,R.jsx)(fT,{items:t,renderRow:c,columnCount:3,ariaLabel:i,onRemoveItems:o})};var WI=i(3217);const KI="u842BXnznGeq38O3DUTQ",YI="NWVZ_rxlezZ8xTHlMg4Y",qI="Oae51evvT5DrqTupCiZ2",ZI="LFdMliaHVgrpBcqNKHU3",$I="IeeqYq0Ozrndd6STmrRk",QI="NljerwmGshDHsI7rIvWl",JI=({nrQueuedItems:e})=>{const t=(0,D.z)(),{logClearQueue:i}=EI(),[n,r]=(0,b.useState)(!1),a=(0,b.useCallback)((()=>{r(!1)}),[]),s=(0,b.useCallback)((()=>{i(),t.clearQueue(),r(!1)}),[i,t]),o=(0,b.useCallback)((()=>{r(!0)}),[]);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ei.H,{size:"small",onClick:o,className:$I,condensed:!0,children:u.Ru.get("queue.clear-queue")}),(0,R.jsx)(WI.p,{itemCount:e,isOpen:n,onClose:a,onConfirm:s})]})},XI=({queueSection:e,title:t,trailingButton:i})=>{const n=(0,b.useRef)(null),r=(0,cg.K)({ref:n});return(0,R.jsx)(HI,{flipId:`section-header-${e}`,onAppear:kI,onExit:OI,translate:!0,children:(0,R.jsxs)("div",{className:ZI,children:[(0,R.jsx)(ti.Zp,{label:t,disabled:!r,children:(0,R.jsx)(On.E,{as:"h2",variant:"bodyMediumBold",semanticColor:"textBase",className:QI,ref:n,children:t})}),i]})})};var eN=i(46353),tN=i(58717);const iN=Spicetify.GraphQL.Definitions["decorateQueuedByUsers"]=new qi.l("decorateQueuedByUsers","query","1b71b9895bad207fdac0df7ebad17c790260519f853a069ee05f20e51c08636e",null);function nN(e){const{currentSession:t}=(0,qa.D)(),i=Array.from(new Set(e.map((e=>e?.metadata?.queued_by||null)).filter(ic.P))).sort().map((e=>(0,ne.Qj)(e).toURI())),{data:n}=(r={userUris:i},a={gcTime:36e5,staleTime:18e5,enabled:!!i.length,placeholderData:tN.rX},(0,Zi.I)(iN,r,a));var r,a;const s=(0,b.useMemo)((()=>Object.fromEntries(n?.users?.map((e=>{return"User"===e.__typename?[e.username,(t=e,{type:_u.c.USER,...t,images:t.avatar?.sources??[]})]:null;var t})).filter(ic.P)??[])),[n]);return t?.active?s:{}}var rN=i(54659),aN=i(79904);const sN=()=>{const e=(0,vI.H)(),{uri:t,description:i,current:n,nextUp:r,queued:a,isEmpty:s,hasQueuedTracks:o,hasNextTracks:l}=e,{logQueueContextLinkNavigate:c}=EI(),d=nN([n,...r,...a]),m=(0,b.useMemo)((()=>new Set([n,...a,...r].filter(ic.P).map((({type:e})=>e))).size>1),[n,r,a]),{currentSession:p}=(0,qa.D)(),h=(0,s_.y)();return(0,rd.oQ)(rd.VW.QueuePanel),s?(0,R.jsx)(eN.K,{}):(0,R.jsxs)(FI,{...e,children:[(0,R.jsx)(rN.Z,{className:qI}),(0,R.jsxs)("div",{className:KI,children:[n&&t&&(0,R.jsxs)("div",{className:YI,children:[(0,R.jsx)(XI,{queueSection:oI.$.NowPlaying,title:u.Ru.get("queue.now-playing")}),(0,R.jsx)(zI,{ariaLabel:u.Ru.get("queue.now-playing"),uri:t,items:n?[n]:[],section:oI.$.NowPlaying,showTypeLabel:m,decoratedQueuedByUsersByUsername:d})]}),!p?.active&&h&&(0,R.jsx)(aN.p,{localStorageKey:"dismissStartJamButtonFromQueue"}),o&&t&&(0,R.jsxs)("div",{className:YI,children:[(0,R.jsx)(XI,{queueSection:oI.$.NextInQueue,title:u.Ru.get("queue.next-in-queue"),trailingButton:(0,R.jsx)(JI,{nrQueuedItems:a.length})}),(0,R.jsx)(zI,{ariaLabel:u.Ru.get("queue.next-in-queue"),uri:t,items:a,section:oI.$.NextInQueue,showTypeLabel:m,decoratedQueuedByUsersByUsername:d})]}),l&&t&&(0,R.jsxs)("div",{className:YI,children:[(0,R.jsx)(XI,{queueSection:oI.$.NextUp,title:i&&!(0,vI.K)(n)?(0,R.jsxs)(R.Fragment,{children:[u.Ru.get("queue.next-from")," ",(0,R.jsx)(Pv.N,{to:t,onClick:()=>{c(t)},children:i})]}):u.Ru.get("queue.next-up")},i),(0,R.jsx)(zI,{ariaLabel:u.Ru.get("queue.next-up"),uri:t,items:r,section:oI.$.NextUp,showTypeLabel:m})]})]})]})};var oN=i(21798);const lN="AjjTyUrCO3pZ365KtTXW",cN="pGtUoenc5OobLi8CscJ6",uN="cArVcLcQ85q_9QSLGYGX",dN="lDtXv1VCrs0PHHSuH5uO",mN="ukjUoaLSzKyRcwoOQw9V",pN="yQwBNeetmAr0a0OTR8t3",hN="fzB4RXxTp0rlpNQlSuu9",gN=({sessionMember:e,showRemoveButton:t,onClickMember:i,onClickRemove:n,index:r})=>{const{currentSession:a}=(0,qa.D)(),{displayName:s,images:o,username:l,uri:c}=(0,Ka.c)(e);return(0,R.jsx)(el.h,{menu:(0,R.jsx)(FT.B,{uri:c}),children:(0,R.jsx)($o.v,{id:`${r}`,variant:"naked",className:mN,title:(0,R.jsx)(Qo.d,{lineClamp:1,children:s}),media:(0,R.jsx)("div",{role:"button",onClick:i,onKeyDown:i,tabIndex:-1,children:(0,R.jsx)(Fp.e,{images:o,userIconSize:"medium",width:48,displayName:s,username:l,label:s})}),subtitle:a?.sessionOwnerId===e.id?u.Ru.get("web-player.social-connect.participant-list.host"):u.Ru.get("web-player.social-connect.participant-list.guest"),onClick:i,trailing:t&&(0,R.jsx)(rv.n,{size:"small",className:pN,onClick:n,"aria-label":u.Ru.get("web-player.social-connect.participant-list.remove-guest-accessible-label",{displayName:s}),children:u.Ru.get("web-player.social-connect.participant-list.remove-guest")})})})};var fN=i(30293),vN=i(58983);const yN=()=>{const{spec:e,logger:t,UBIFragment:i}=(0,Hi.r)(vN.I,{});return{logUserClick:(0,b.useCallback)(((i,n)=>{t.logInteraction(e.participantListFactory().participantListRowFactory({position:i}).userLinkFactory().hitUiNavigate({destination:n}))}),[t,e]),logRemoveClick:(0,b.useCallback)((i=>{t.logInteraction(e.participantListFactory().participantListRowFactory({position:i}).removeButtonFactory().hitUiReveal())}),[t,e]),UBIFragmentWithSpec:(0,b.useCallback)((t=>(0,R.jsx)(i,{spec:e,...t})),[i,e])}};var bN=i(86523),_N=i(89128);const EN=()=>{const e=(0,bN.d)(),t=(0,g.wA)(),i=(0,oe.Zp)(),n=(0,fN.Z)(),{currentSession:r,kickAllParticipants:a}=(0,qa.D)(),{setQueueView:s}=(0,oN.m)(),{logUserClick:o,logRemoveClick:l}=yN(),c=(0,b.useCallback)((()=>{r?.joinSessionShortLink&&n(r?.joinSessionShortLink)}),[n,r?.joinSessionShortLink]),d=(0,b.useCallback)(((e,i)=>{l(e),t((0,p.A9)(Bc.EL.REMOVE_PARTICIPANT,void 0,i))}),[t,l]),m=(0,b.useCallback)(((e,t)=>{const n=(0,ne.Qj)(t.username);o(e,n.toURI()),i(n.toURLPath(!0))}),[o,i]),h=(0,b.useCallback)((()=>{a(r?.sessionId)}),[r?.sessionId,a]),f=(0,_N.T4)(e);return r&&f?(0,R.jsxs)("div",{className:lN,children:[(0,R.jsx)(On.E,{variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("web-player.social-connect.participant-list.title")}),(0,R.jsxs)("div",{className:cN,children:[(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",children:u.Ru.get("web-player.social-connect.participant-list.subtitle")}),(0,R.jsx)(rv.n,{size:"small",onClick:c,className:uN,children:u.Ru.get("web-player.social-connect.invite-button")})]}),(0,R.jsx)("div",{className:dN,children:r.sessionMembers.map(((t,i)=>(0,R.jsx)(gN,{index:i,sessionMember:t,showRemoveButton:(0,_N.kt)(e,(0,ne.Qj)(t.username).toURI()),onClickRemove:()=>d(i,t),onClickMember:()=>m(i,t)},i)))}),r.isSessionOwner&&r.sessionMembers.length>1&&(0,R.jsx)(Ln.$,{colorSet:"invertedLight",size:"small",onClick:h,children:u.Ru.get("web-player.social-connect.participant-list.remove-all-guests")}),(0,R.jsx)(On.E,{variant:"marginal",semanticColor:"textSubdued",className:hN,children:u.Ru.get("web-player.social-connect.participant-list.visibility-info")})]}):(s(oN.p.QUEUE),null)};var CN=i(68361);const xN="BZj_r1yzmmragvivUCrw",SN="hpzTKCoO0rllEslIOMPo",AN="TeBVsFnI9PMHYL9ynJx9",TN="ZDR7q1cqU2yaYjemuy9Z",IN="OLB2ghxc09Kz8k_93eIu",NN=()=>{const{currentQueueView:e,setQueueView:t}=(0,_I.m)(),i=(0,CN.y)(),{logQueuePanelTabChange:n}=EI(),r=(0,b.useMemo)((()=>i?{titleSlot:e!==_I.p.PARTICIPANT_LIST?(0,R.jsx)(sT.t,{currentTab:e,onTabChange:e=>{e===(0,lT.c)(_I.p.HISTORY)?(n(_I.p.HISTORY),t(_I.p.HISTORY)):(n(_I.p.QUEUE),t(_I.p.QUEUE))},className:AN,children:(0,R.jsxs)(oT.w,{"aria-label":"",className:TN,children:[(0,R.jsx)(lT.V,{"aria-selected":e===_I.p.QUEUE,label:u.Ru.get("playback-control.queue"),value:_I.p.QUEUE}),(0,R.jsx)(lT.V,{"aria-selected":e===_I.p.HISTORY,label:u.Ru.get("view.recently-played"),value:_I.p.HISTORY})]})}):(0,R.jsx)(ei.H,{iconLeading:df.g,onClick:()=>t(_I.p.QUEUE),size:"small",condensed:!0,className:IN,children:u.Ru.get("web-player.social-connect.participant-list.back-to-queue")})}:{title:u.Ru.get("playback-control.queue")}),[i,n,t,e]);return(0,R.jsx)(Rv._,{label:u.Ru.get("playback-control.queue"),focusTransferId:"QUEUE-HISTORY-PANEL",children:(0,R.jsx)(kv.w,{fixedHeader:(0,R.jsx)(wf.a,{className:xN,panel:Ar.Z.Queue,...r}),children:(0,R.jsx)("div",{className:SN,children:e!==_I.p.PARTICIPANT_LIST?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(cT.K,{value:"queue",children:e===_I.p.QUEUE&&(0,R.jsx)(sN,{})}),(0,R.jsx)(cT.K,{value:"history",children:e===_I.p.HISTORY&&(0,R.jsx)(NI,{})})]}):(0,R.jsx)(EN,{})})})})},wN=(0,b.memo)((function(){return(0,R.jsx)(bI,{children:(0,R.jsx)(NN,{})})})),RN=(0,b.memo)((()=>{const e=(0,rT.X)(),t=(0,nT._)(),i=function(){const e=(0,b.useRef)(Ar.Z.NowPlayingView),t=(0,Sr.XB)(),i=(0,s.NC)(Ce.xId);return(0,b.useEffect)((()=>{e.current=t}),[t]),(0,b.useCallback)((n=>{const r=e.current===Ar.Z.NowPlayingView,a=t===Ar.Z.NowPlayingView,s=n.some((i=>r&&t===i||a&&e.current===i));return i&&s}),[t,i])}(),n=(0,b.useRef)(null),r=(0,s.NC)(Ce.xId),a=(0,s.NC)(Ce.t84)?Fb:Kb;return(0,R.jsxs)(y.s,{onError:e=>{(0,om.Jy)(e,"PanelSection"),t((0,aT.MQ)(Ar.Z.Disabled))},children:[r||e!==Ar.Z.NowPlayingView?null:(0,R.jsx)(KA,{currentPanel:Ar.Z.NowPlayingView}),r?(0,R.jsx)(va.A,{nodeRef:n,in:e===Ar.Z.NowPlayingView,timeout:{enter:0,exit:e===Ar.Z.Disabled?0:300},unmountOnExit:!0,mountOnEnter:!0,children:(0,R.jsx)(KA,{nodeRef:n,currentPanel:Ar.Z.NowPlayingView})}):null,e===Ar.Z.BuddyFeed?(0,R.jsx)(a,{}):null,(0,R.jsx)(iT,{isActive:e===Ar.Z.BuddyFeedOverlay,shouldPlayAnimation:i([Ar.Z.BuddyFeedOverlay]),children:(0,R.jsx)(a,{})}),e===Ar.Z.Queue?(0,R.jsx)(wN,{}):null,(0,R.jsx)(iT,{isActive:e===Ar.Z.QueueOverlay,shouldPlayAnimation:i([Ar.Z.QueueOverlay]),children:(0,R.jsx)(wN,{})}),e===Ar.Z.Puffin||e===Ar.Z.PuffinActivation?(0,R.jsx)(kb,{}):null,(0,R.jsx)(iT,{isActive:e===Ar.Z.PuffinActivationOverlay||e===Ar.Z.PuffinOverlay,shouldPlayAnimation:i([Ar.Z.PuffinActivationOverlay,Ar.Z.PuffinOverlay]),children:(0,R.jsx)(kb,{})}),e===Ar.Z.DevicePicker?(0,R.jsx)(g_,{}):null,(0,R.jsx)(iT,{isActive:e===Ar.Z.DevicePickerOverlay,shouldPlayAnimation:i([Ar.Z.DevicePickerOverlay]),children:(0,R.jsx)(g_,{})})]})}));var kN=i(84771);const ON=()=>{const{spec:e,logger:t}=(0,Hi.r)(rS.X,{}),i=(0,g.wA)(),{setMode:n}=Hc();return(0,b.useEffect)((()=>{const e=e=>{"Escape"===e.key&&n(Bc.YU.npv)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[i,n]),(0,R.jsxs)("div",{className:Fc.Controls,children:[(0,R.jsx)(kN.R,{}),(0,R.jsx)(Ai,{focus:!0,label:u.Ru.get("web-player.now-playing-view.minimize.lyrics"),onClick:()=>{n(Bc.YU.npv),t.logInteraction(e.minimizeCinemaModeButtonFactory().hitUiHide()),t.logImpression(e.minimizeCinemaModeButtonFactory().impression())},children:(0,R.jsx)(gr.Q,{size:"small"})}),(0,R.jsx)(Ai,{focus:!0,label:u.Ru.get("web-player.now-playing-view.close.lyrics"),onClick:()=>{n(Bc.YU.none),t.logInteraction(e.closeLyricsButtonFactory().hitUiHide())},children:(0,R.jsx)(Pn.M,{size:"small"})})]})};var PN=i(32375);const LN=()=>{const{mode:e,setMode:t}=Hc(),{lyricsCinemaRef:i}=(0,lr.JT)();!function(){const{pathname:e}=(0,oe.zy)(),{mode:t,setMode:i}=Hc();(0,b.useEffect)((()=>{t===Bc.YU.cinema&&i(Bc.YU.npv)}),[e])}();const{item:n}=(0,gi.o)((e=>({item:e?.item?.type})));return e!==Bc.YU.cinema?null:(n&&n===_u.c.TRACK||t(Bc.YU.npv),i.current?(0,or.createPortal)((0,R.jsxs)("div",{className:Fc.Container,children:[(0,R.jsx)(ON,{}),(0,R.jsx)(Hs.a,{className:Fc.Content,children:(0,R.jsx)(PN.A,{format:"cinema"})})]}),i.current):(console.error("No container found for cinema video!"),null))},jN=()=>(0,R.jsx)(y.s,{children:(0,R.jsx)(LN,{})});var DN=i(38461);let MN=new class{get(){return DN.t5}};new class{get(){return DN.tE}};let UN=new class{get(){return DN.wi}};const BN=[/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],FN=()=>{const[e,t]=(0,b.useState)(!1),{pathname:i}=location,n=(0,g.d4)(Ia.JJ),r=(0,Sp.V)(),[a,s]=(0,b.useState)(null),o=MN.get(),l=UN.get();return(0,b.useEffect)((()=>{var e;s((e=window.navigator.userAgent,BN.some((t=>t.test(e)))))}),[]),(0,b.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),1100);return()=>{t(!1),clearTimeout(e)}}),[i]),e&&null!==a?(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(o,{language:u.Ru.getLocaleForSmartling(),market:n.toLowerCase(),excludePlanLinks:a,children:(0,R.jsx)(l,{hideWebPlayerLink:!0,hideLegalLinks:r})})}):(0,R.jsx)(R.Fragment,{})};var HN=i(43717);const VN=Date.now()-6912e5,GN=()=>{const e=function(){const[e,t]=(0,b.useState)(!1),i=(0,Sr.XB)(),n=(0,b.useRef)(Ar.Z.Disabled);return(0,b.useEffect)((()=>{i!==Ar.Z.NowPlayingView&&n.current===Ar.Z.NowPlayingView?t(!0):t(!1),n.current=i}),[i]),e}(),t=!(0,Ym.n)(),[i,n]=(0,Ss.x)("npv-onboarding-dismissed",!1),[r]=(0,Ss.x)("npv-onboarding-dismissed-time",VN),[a]=(0,Ss.x)("npv-onboarding-never-show-again",!1),s=(Date.now()-r)/36e5<24,o=(0,b.useMemo)((()=>!a&&(!t&&((!i||!s)&&!!e))),[s,e,i,a,t]);(0,b.useEffect)((()=>{let e=null;return o&&(e=setTimeout((()=>{zc.h.set((()=>({triggerId:"npv-onboarding",triggerAction:null}))),n(!0)}),500)),()=>{null!==e&&clearTimeout(e)}}),[n,o])};var zN=i(45879);const WN="main-home-homeHeader",KN="B9yNi5FlwGJt0nMEM5HS",YN="t7wxxKMe3KK9hcr93xna",qN=()=>(0,g.d4)(Sn.t$),ZN=(0,b.memo)((function(){const e=yf(Up.l0o),t=!(0,Ym.n)(),i=qN();return(0,R.jsx)("div",{className:At()(WN,{[YN]:t,[KN]:i}),style:{backgroundColor:e}})}));var $N=i(45396),QN=i(11986);const JN="Root__top-container",XN="Root__top-container--has-notice-bar",ew=parseInt(QN.A.MINIMUM_HEADER_HEIGHT,10);function tw({children:e}){const t=(0,g.d4)((e=>e.ui.unsupportedBrowser.isOpen)),i=(0,Sr.XB)(),n=ff(),r="/home"===(0,oe.zy)().pathname,a=qN(),s=yf(),o="/lyrics"===(0,oe.zy)().pathname,l=(0,b.useRef)(-1),c=(0,b.useRef)(null),u=(0,b.useCallback)((e=>{const t=e.target.scrollTop;let i;i=n||r?((e,t)=>gf(e,t?350:80,10))(t,a):void 0===s?gf(t,zN.uC):o?0:gf(t,ew,140+zN.uC),Number(l.current).toPrecision(2)!==Number(i).toPrecision(2)&&requestAnimationFrame((()=>{c.current&&c.current.style.setProperty("--top-bar-opacity",`${Number(i).toPrecision(2)}`)})),l.current=i}),[s,n,r,o,a]);return(0,$N.g)(u,{executeOnceOnStart:!0}),(0,R.jsx)("div",{className:At()(JN,{[XN]:t}),ref:c,"data-right-sidebar-hidden":i===Ar.Z.Disabled,children:e})}const iw="Root__main-view-overlay",nw=(0,b.forwardRef)((function({children:e},t){return(0,R.jsx)("div",{ref:t,className:iw,children:e})})),rw="Root__nav-bar";function aw({children:e}){const{leftSidebarRef:t}=(0,lr.JT)();return(0,R.jsx)("div",{id:"Desktop_LeftSidebar_Id",ref:t,className:rw,children:e})}var sw=i(85223),ow=i(89101),lw=i(87711),cw=i(62412),uw=i(66086),dw=i(12243),mw=i(14294),pw=i(59706);const hw="oxXPl82EiU4cLdDbPcfg",gw=({children:e})=>{const[t,i]=(0,Ss.x)("search-callout-seen",!1),n=(0,oe.zy)(),r=(0,b.useCallback)((()=>{i(!0)}),[i]);return(0,b.useEffect)((()=>{n.pathname.startsWith("/search")&&r()}),[n,r]),(0,R.jsx)(pw.x,{title:u.Ru.get("navbar.search.callout-title"),description:u.Ru.get("navbar.search.callout-description"),id:"searchCallout",visible:!t,onHide:r,onPrimaryButtonClick:()=>{},showButtons:!1,hideOnClickOutside:!1,placement:"left-start",tippyClassName:hw,children:e})},fw=({children:e})=>(0,s.NC)(Ce.FAj)===Ce.z3X.CALLOUT?(0,R.jsx)(gw,{children:e}):(0,R.jsx)(R.Fragment,{children:e}),vw=({children:e})=>{const t=e??null;return(0,R.jsx)(b.Suspense,{fallback:t,children:(0,R.jsx)(fw,{children:e})})},yw="main-yourLibraryX-navItems",bw="Le6_wTBS83okYw756nWl",_w="BQ7wNkJFinJvGx2WCnwc",Ew="main-yourLibraryX-navItem",Cw="main-yourLibraryX-navLink",xw="QbaKKdcHNA2x3_YJvpYu",Sw="pWhMZyrpf79r8EKV7KMe",Aw="main-yourLibraryX-navLinkActive",Tw=()=>{const{spec:e,logger:t}=(0,Hi.r)(dw.P,{}),i=(0,Uc.sy)(),n=(0,oe.zy)(),r=!(0,Ym.n)(),a=(0,qr.v7)(),s=(0,cx.c)(),o=(0,Sp.V)(),l="/"===n.pathname||"/home"===n.pathname;return(0,R.jsxs)(R.Fragment,{children:[s&&o&&(0,R.jsx)("div",{className:bw,children:(0,R.jsx)(Pv.N,{to:"/",className:_w,children:(0,R.jsx)(sw.G,{height:"24"})})}),(0,R.jsxs)("ul",{className:yw,children:[(0,R.jsx)("li",{className:At()(Ew,"InvalidDropTarget"),children:(0,R.jsx)(ti.Zp,{label:i?u.Ru.get("view.web-player-home"):null,disabled:!i,placement:"right",children:(0,R.jsxs)(mw.k,{to:"/",referrer:"home",className:At()("link-subtle",Cw,{[Aw]:l}),"aria-label":u.Ru.get("view.web-player-home"),onClick:()=>{const i=e.homeButtonFactory().hitUiNavigate({destination:"spotify:app:home"});l?a.current?.scrollTo({top:0,behavior:"smooth"}):t.logInteraction(i)},children:[(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ow.H,{className:At()("home-icon",xw),"aria-hidden":"true"}),(0,R.jsx)(lw.x,{className:At()("home-active-icon",xw),"aria-hidden":"true"})]}),!i&&(0,R.jsx)(On.E,{variant:"bodyMediumBold",children:u.Ru.get("view.web-player-home")})]})})}),(0,R.jsx)("li",{className:At()(Ew,"InvalidDropTarget"),children:(0,R.jsx)(ti.Zp,{label:r?u.Ru.get("offline.feedback-text"):u.Ru.get("navbar.search"),disabled:!r&&!i,placement:i?"right":"top",children:(0,R.jsxs)(mw.k,{to:"/search",referrer:"search",className:At()("link-subtle",Cw,{[Aw]:n.pathname.startsWith("/search")||"search"===n.state?.pageId,[Sw]:r}),onClick:i=>{const a=e.searchButtonFactory().hitUiNavigate({destination:"spotify:app:search"});r&&i.preventDefault(),n.pathname.startsWith("/search")||t.logInteraction(a)},"aria-label":u.Ru.get("navbar.search"),children:[(0,R.jsx)(cw.C,{className:At()("search-icon",xw),"aria-hidden":"true"}),(0,R.jsx)(uw.g,{className:At()("search-active-icon",xw),"aria-hidden":"true"}),!i&&(0,R.jsx)(vw,{children:(0,R.jsx)(On.E,{variant:"bodyMediumBold",children:u.Ru.get("navbar.search")})})]})})})]})]})},Iw="main-yourLibraryX-entryPoints",Nw="main-yourLibraryX-library",ww=(0,b.lazy)((async()=>{const{YourLibraryX:e}=await Promise.all([i.e(4151),i.e(9395),i.e(6457)]).then(i.bind(i,39395));return{default:e}})),Rw=()=>{const e=(0,kg.A)();return(0,R.jsxs)(R.Fragment,{children:[!e&&(0,R.jsx)("div",{className:Iw,children:(0,R.jsx)(Tw,{})}),(0,R.jsx)("div",{className:At()(Iw,Nw),children:(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(ww,{})})})]})},kw="main-navBar-mainNav";function Ow(){return(0,R.jsx)("nav",{className:kw,"aria-label":u.Ru.get("sidebar.a11y.landmark-label"),children:(0,R.jsx)(Ri.pZ,{value:"nav-bar",children:(0,R.jsx)(Rw,{})})})}const Pw="Root__main-view";function Lw({children:e}){return(0,R.jsx)("div",{className:Pw,children:e})}const jw="JkjJ8UlBui5vclUi1vZF",Dw=({children:e})=>(0,R.jsx)("div",{className:jw,children:e}),Mw="Root__right-sidebar";function Uw({children:e}){const{rightSidebarRef:t}=(0,lr.JT)();return(0,R.jsx)("div",{ref:t,className:Mw,children:e})}const Bw="Root__now-playing-bar";function Fw({children:e}){const{nowPlayingBarRef:t}=(0,lr.JT)();return(0,R.jsx)("div",{ref:t,className:Bw,children:e})}const Hw=(0,b.lazy)((()=>new Promise((e=>{const t=Promise.all([i.e(4151),i.e(3667)]).then(i.bind(i,79481)).then((e=>({default:e.PiPMiniPlayer}))),n=new Promise((e=>{setTimeout(e,300)}));Promise.all([t,n]).then((t=>{e(t[0])}))})))),Vw=b.memo((()=>{const e=(0,g.d4)((e=>e.platform.isDeveloperMode));return mm(!e),null}));var Gw=i(35606),zw=i(80091);var Ww=i(91654),Kw=i(46545),Yw=i(29182);const qw="pip-mini-player",Zw={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 $w(e,t,i){!function(e,t){e.querySelector("html")?.classList.remove(...t)}(i,Object.values(Zw));const n=function(e,t){const i=["no-focus-outline"];return t===Ww.f.macOS?i.push(Zw.OS_MACOS):t===Ww.f.Windows&&i.push(Zw.OS_WINDOWS),e===fm.m.Desktop?i.push(Zw.CONTAINER_DESKTOP):e===fm.m.Web&&i.push(Zw.CONTAINER_WEB),i}(e,t);!function(e,t){t.forEach((t=>{e.querySelector("html")?.classList.add(t)}))}(i,n)}const Qw=e=>{const t=Array.from(document.getElementsByTagName("script")).filter((e=>e.src?.includes("xpui.js")))?.[0]?.src.replace(/\/[^/]+$/,"")??"";return{scripts:[`${t}/${qw}.js`,`${t}/vendor~${qw}.js`],styles:[`${t}/${qw}.css`,`${t}/vendor~${qw}.css`]}},Jw=e=>{const t=(0,ve.mv)();(0,b.useLayoutEffect)((()=>{if(!e)return;const{pipResources:i}=(0,Kw.C)("config"),{scripts:n,styles:r}=Qw();e.document.body.style.margin="0",e.document.body.style.padding="0",e.document.body.style.overflow="hidden",$w(t.container,t.operatingSystem,e.document),Yw.M.setup(e.document),n.map((t=>((e,t)=>{const i=document.createElement("script");i.setAttribute("src",e),t.document.head.appendChild(i)})(t,e))),r.map((t=>((e,t)=>{const i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href",e),t.document.body.prepend(i)})(t,e)))}),[e,t])},Xw=b.memo((()=>{const{capabilities:{isEnabled:e},isOpen:t,close:i}=(0,dA.H)(),n=(0,b.useCallback)(i,[i]),r=window.documentPictureInPicture?.window??null;var a,s;Jw(r),a=r,s=window,(0,b.useEffect)((()=>{a&&s&&["lang","dir"].forEach((e=>{const t=s.document.documentElement.getAttribute(e);null!==t&&a.document.documentElement.setAttribute(e,t)}))}),[a,s]),(0,b.useEffect)((()=>{}),[]);const o=ot();if((0,b.useEffect)((()=>{r&&o?.registerPiPWindowCallbacks(r)}),[o,r]),!e||!t||!r)return null;const l=r;return(0,or.createPortal)((0,R.jsx)(y.s,{onError:n,children:(0,R.jsxs)(dm.IF,{handle:l,children:[(0,R.jsx)(Vw,{}),(0,R.jsx)(zw.S,{children:(0,R.jsx)(b.Suspense,{fallback:(0,R.jsx)(Gw.B,{}),children:(0,R.jsx)(Hw,{})})})]})}),r.document.body)}));var eR=i(60653),tR=i(88485);class iR extends tR.V{}var nR=i(43991),rR=i(2976),aR=i(92062);const sR=640;class oR{_events=new iR;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 i=this.getPictureInPictureElement();return i===t.video||(await this.requestPictureInPicture(t,(()=>{this.close()})),this._events.emitSync("visibility_change",!0)),i??null}async updateGraphicsFromPlayerState(e,t){const i=this.getImageURLFromPlayerState(t);null!==i?await this.drawImage(e,i):this.close()}close(){this.getPictureInPictureElement()&&document.exitPictureInPicture(),this.disposeGraphics(),this._events.emitSync("visibility_change",!1)}isAllowed(e,t,i){const n=e?.hasContext??!1,r=e?.item?.type===_u.c.EPISODE&&"audio"!==e?.item.mediaType;return!!n&&(!!(i??!0)&&!r)}getCurrentState(){return this.getPictureInPictureElement()?"open":"closed"}syncWithPlayerState(e){const t=e?.hasContext??!1,i=e?.isPaused??!1,n=this.getPictureInPictureElement();!t||i?n?.pause():n?.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=sR,e.height=sR;const t=e.getContext("2d"),i=document.createElement("video");return i.srcObject=e.captureStream(),i.muted=!0,{context:t,video:i}}async drawImage({context:e,video:t},i){if(this.currentImageUrl===i)return;this.currentImageUrl=i;const n=new Image;n.crossOrigin="anonymous",n.src=(0,aR.m)({imageUriOrUrl:i,desiredMosaicSize:sR}),await n.decode(),e.drawImage(n,0,0,sR,sR),await t.play()}getImageURLFromPlayerState(e){const t=e?.item?.images??[];return(0,N_.h)(t,{desiredSize:sR})??null}async requestPictureInPicture({video:e},t){try{await e.requestPictureInPicture(),e.addEventListener("leavepictureinpicture",t,{once:!0})}catch(e){(0,nR.vV)(e)}}getPictureInPictureElement(){if(document.pictureInPictureElement)return document.pictureInPictureElement}static isSupported(){return!1}}var lR=i(39683);class cR{#e=new iR;#t=null;#i;constructor(e=!1){this.#i=e}getCapabilities(){return{isEnabled:!0,supportsVideo:!0,supportsAds:!0,supportsConnect:!0,supportsOffline:this.#i}}getEvents(){return this.#e}async open(e){if(!cR.isSupported())return null;const t=this.getDocumentPictureInPictureElement()?.window;if(t){if(t===this.#t)return this.#t;t.close()}const{width:i,height:n}=this.getInitialWindowSize(e?.item),r=await this.createWindow(i,n);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,i){return!(!(e?.hasContext??!1)&&t===ua.zP.NOT_CONNECTED)}getCurrentState(){return this.#t?"open":"closed"}syncWithPlayerState(e){}getInitialWindowSize(e){let t=300,i=300;if(e){(0,W.p)(e)&&("video"===e.mediaType||"mixed"===e.mediaType)&&(t=425,i=300)}return{width:t,height:i}}async createWindow(e,t){return await(this.getDocumentPictureInPictureElement()?.requestWindow({width:e,height:t}))}getDocumentPictureInPictureElement(){return window.documentPictureInPicture}static isSupported(){return"documentPictureInPicture"in window&&((0,lR.Ek)()||(e="chrome",t=119,hm().getParser(navigator.userAgent).satisfies({[e]:`>=${t}`})??!1));var e,t}}class uR{getCapabilities(){return{isEnabled:!1,supportsVideo:!1,supportsAds:!1,supportsConnect:!1,supportsOffline:!1}}getEvents(){return new iR}open(){return Promise.resolve(void 0)}close(){}isAllowed(e,t,i){return!1}getCurrentState(){return"closed"}syncWithPlayerState(){}}const dR=()=>{const e=(0,Ue.g)(),[t]=(0,b.useState)((()=>{if(navigator.webdriver)return new uR;if(cR.isSupported()){if(e.localConfiguration.getValue(Ce.Tb_)){return new cR(!0)}}return oR.isSupported()?new oR:new uR}));return t};var mR=i(52509);var pR=i(95114);function hR(){if(gR())try{navigator.mediaSession.setActionHandler("enterpictureinpicture",null)}catch(e){}}function gR(){return"mediaSession"in navigator}const fR=b.memo((({pipInstance:e})=>((e=>{const{connectionStatus:t,isActiveDeviceLocal:i}=(0,ca.v)((e=>({connectionStatus:e.connectionStatus,isActiveDeviceLocal:e.activeDevice?.isLocal})),ln.a),n=(0,gi.o)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.item?.uri===t?.item?.uri)),r=(0,b.useRef)(n);r.current=n;const a=(0,b.useMemo)((()=>e.isAllowed(n,t,i)),[t,i,e,n]);(0,b.useEffect)((()=>{if(gR()){try{a?navigator.mediaSession.setActionHandler("enterpictureinpicture",(t=>{e.open(r.current)})):hR()}catch(e){}return()=>{hR()}}}),[e,a])})(e),null))),vR="Root__globalNav",yR="main-globalNav-link-icon",bR="main-globalNav-navLinkActive",_R="Dp3xccI7c2f_JSJ8OHYu",ER="M4MOhDLjSPUuMog9WxIM",CR="main-globalNav-historyButtonsContainer",xR="nmAHq8nfXRtoQmKU1gaF",SR="main-globalNav-searchSection",AR="main-globalNav-searchContainer",TR="axu7kRtHOzwIb8b14FT6",IR="link-subtle",NR=({className:e})=>{const{spec:t,logger:i}=(0,Hi.r)(ym.x,{}),n=(0,oe.Zp)(),r=(0,qr.v7)(),a=(0,oe.zy)(),o="/"===a.pathname||"/home"===a.pathname,l=(0,s.NC)(Ce.ttb);return(0,R.jsx)(ti.Zp,{label:u.Ru.get("view.web-player-home"),children:(0,R.jsx)(ei.H,{iconOnly:o?lw.x:ow.H,className:At()(e,yR,IR,{[bR]:o}),"aria-label":u.Ru.get("view.web-player-home"),"":"home-button",onClick:()=>{const e=t.homeButtonFactory().hitUiNavigate({destination:"spotify:app:home"});o&&l===Ce.ufd.CONTROL?r.current?.scrollTo({top:0,behavior:"smooth"}):(i.logInteraction(e),n("/"))}})})};var wR=i(37055),RR=i(58406),kR=i(80092),OR=i(18346),PR=i(13094);const LR="main-globalNav-searchInputSection",jR="uozPfgVVoIwfTp8aGiu1",DR="main-globalNav-searchInputContainer",MR="TTmGm8qVTZIyhkzEGOqr",UR="SFAoASy0S_LZJmYZ3Fh9",BR="kJPt9Frupc8oKnAsjRJr",FR="hj_4wHxgXXHm6aI1zN9D",HR=({onSearch:e,handleSubmit:t,handleChange:i,handleKeyDown:n,handleFocus:r,handleClear:a,onLeadingIconClick:s,inputRef:o,value:l})=>{const{spec:c,logger:d}=(0,Hi.r)(ym.x,{}),m=(0,oe.Zp)(),p="/search"===(0,oe.zy)().pathname,h=-1===o.current?.tabIndex;return(0,R.jsx)("div",{className:LR,children:(0,R.jsx)(RR.E,{className:At()(DR),onClick:s,value:l,iconLeading:(0,R.jsx)(ti.Zp,{label:u.Ru.get("navbar.search"),children:h?(0,R.jsx)(ei.H,{className:MR,condensed:!0,iconOnly:cw.C,"aria-label":u.Ru.get("navbar.search"),onClick:s}):(0,R.jsx)(cw.C,{className:MR,"aria-hidden":!0,size:"xlarge"})}),iconTrailing:""!==l?(0,R.jsx)(ti.Zp,{label:u.Ru.get("search.a11y.clear-input"),children:(0,R.jsx)(ei.H,{className:BR,condensed:!0,iconOnly:Pn.M,"aria-label":u.Ru.get("search.a11y.clear-input"),onClick:a})}):(0,R.jsx)("div",{className:FR,children:(0,R.jsx)(ti.Zp,{label:u.Ru.get("browse"),children:(0,R.jsx)(ei.H,{condensedAll:!0,iconOnly:p?kR.q:OR.K,"aria-label":u.Ru.get("browse"),onClick:e=>{const t=c.browseButtonFactory().hitUiNavigate({destination:"spotify:app:search"});d.logInteraction(t),e.preventDefault(),e.stopPropagation(),m("/search",{state:{fromBrowse:!0}})},className:p?jR:""})})}),children:(0,R.jsx)("form",{onSubmit:t,role:"search",children:(0,R.jsx)(PR.Z,{"":"search-input",className:UR,type:"text",placeholder:e?u.Ru.get("search.search-for-label"):u.Ru.get("navbar.search"),value:l,ref:o,onKeyDown:n,onFocus:r,onChange:i})})})})};var VR=i(6029),GR=i(8461),zR=i(55388);const WR=b.memo((function({isSearchChipsEnabled:e=!1,onSearch:t=!0,onClick:i,onLeadingIconClick:n,inputRef:r}){const a=(0,oe.zy)(),s=(0,oe.Zp)(),o=(0,b.useRef)(null),l=r||o,c=(0,b.useRef)(null),u=(0,g.wA)(),[{category:d,query:m},p]=(0,VR.o)(),[h,f]=(0,b.useState)(m),v=!!d,y=(0,qr.v7)(),_=a.pathname.startsWith("/recent-searches"),E=v||_,{spec:C,logger:x}=(0,Hi.r)(wR.F,{}),S=(0,nn.YQ)(((t,i,n)=>{let r;if(n){const{interactionId:e}=x.logInteraction(n);r=e}e?p(t,d,!1,r):p(t,null,i,r),y.current&&(y.current.scrollTop=0)}),200),A=(0,b.useCallback)(((e=!1)=>{l.current!==document.activeElement&&(c.current=document.activeElement,l.current&&l.current.focus()),e&&l.current?.select()}),[l]);(0,zR.x)(GR.W.SHOW_SEARCH,(()=>A(!0)));const T=a.pathname.startsWith("/search"),I=a?.state?.fromBrowse||!1;(0,b.useEffect)((()=>{!E&&t&&T&&!I&&(e&&m||A())}),[m,A,a.key,t,T,E,e,I]),(0,b.useEffect)((()=>{f(T?m:"")}),[T,m]);return(0,R.jsx)(HR,{inputRef:l,onClick:i,onSearch:t,onLeadingIconClick:n,value:h,handleSubmit:e=>{e.preventDefault(),h&&x.logInteraction(C.keyStrokeSearch());const t=(0,ne.o_)(h,{parseUnknown:!0});if(t?.type===ne.NQ.AD){const e=(0,ne.cE)(t.id);if(t.id===e)return;u((0,Jr.gt)(t.id))}else t?s(t.toURLPath(!0),{state:{preventMoveFocus:!0,redirectToHome:(0,ne.cr)(t)}}):h||s("/search",{state:{preventMoveFocus:!0}});h&&y.current?.querySelector("h1, h2, h3, h4")?.focus()},handleChange:e=>{const t=e.currentTarget.value,i=C.keyStrokeChangeSearchQuery({searchQueryString:t});f(t),S(t,E,i)},handleKeyDown:e=>{if("Escape"===e.key)if(h){const e=C.hitTextClear();f(""),S("",E,e)}else l.current&&l.current.blur(),c.current instanceof HTMLElement&&c.current.focus()},handleFocus:()=>{e||!E&&t||S(h,E,null)},handleClear:()=>{l.current&&l.current.focus();const e=C.hitTextClear();f(""),S("",E,e)}})}));var KR=i(22252),YR=i(28568);const qR=e=>{if(!e.current)return!1;return e.current.offsetWidth>400},ZR=e=>!!e.current&&(e.current===document.activeElement||""!==e.current.value),$R=(e,t)=>!!e.current&&(e.current.offsetLeft<=t&&t<=e.current.offsetLeft+e.current.offsetWidth),QR=e=>e&&e<0?1+.0015*Math.abs(e):1,JR=e=>{const{spec:t,logger:i}=(0,Hi.r)(ym.x,{}),n=(0,oe.zy)(),r=(0,oe.Zp)(),a=(0,vm.m)(),o=(0,cx.c)(),l=(0,s.NC)(Ce.ttb);(0,b.useEffect)((()=>(a.setTitlebarHeight(YR.uZ),()=>{a.setTitlebarHeight(YR.Yw)})),[a]);const[c,u]=(0,b.useState)(!1),[d,m]=(0,b.useState)(!1),[p,h]=(0,b.useState)(!1),g=(0,b.useRef)(null),f=(0,b.useRef)(null),v=(0,b.useRef)(null),y=(0,b.useRef)(null),_=(0,b.useRef)(null),E=(0,b.useRef)(null),C=(0,b.useRef)(!1);(0,b.useEffect)((()=>{f.current&&(f.current.tabIndex=d&&!p?-1:0)}),[d,p]);const x=(0,b.useCallback)((({width:e})=>{e&&(E?.current&&e!==E.current&&(C.current=e>E.current),E.current=e),((e,t,i,n,r)=>{if(!i.current||!t.current||!e.current)return;const a=i.current,s=Math.max(350,Math.min(546,.5*a.offsetWidth)),o=$R(e,a.offsetWidth/2-s/2)||$R(e,a.offsetWidth/2+s/2)||$R(t,a.offsetWidth/2-s/2)||$R(t,a.offsetWidth/2+s/2);n!==o&&r(o)})(v,y,_,c,u),((e,t,i,n)=>{e.current&&(qR(e)&&!0===t&&i?n(!1):qR(e)||!1!==t||i||n(!0))})(g,C.current,d,m),((e,t,i)=>{e.current&&ZR(e)&&(t||i(!0))})(f,p,h)}),[p,d,c]);var S,A,T;(0,Ip.w)({refOrElement:_,onResize:x}),S=y,A=()=>{_.current&&x({width:null})},T={subtree:!0,childList:!0},(0,b.useEffect)((()=>{if(S.current){const e=new MutationObserver(A);return e.observe(S.current,T),()=>e.disconnect()}return()=>{}}),[S,A,T]);const I=(0,qf.t)(),[{data:N}]=(0,Zf.K)(I.viewportZoom);(0,b.useEffect)((()=>{a.setTitlebarHeight(YR.uZ+.1*(N??0))}),[N,a]);const w=(0,b.useCallback)((()=>{if(!n.pathname.startsWith("/search")){const e=t.searchInputFactory().hitUiNavigate({destination:"spotify:app:search"});i.logInteraction(e),r("/search",{state:{preventMoveFocus:!0}})}}),[t,i,n,r]),k=(0,b.useCallback)((e=>{e?.preventDefault(),e?.stopPropagation(),ZR(f)||h(!p),(d&&!p||!d)&&(f.current?.focus(),w())}),[p,d,w]),O=l===Ce.ufd.CONTROL?KR.o:WR;return(0,R.jsxs)("div",{className:At()(vR,e.className,{[TR]:c||d,searchInputCollapsed:d,forceExpandSearchInput:p}),ref:_,style:{"--zoom-adjust-coefficient":QR(N)},children:[(0,R.jsxs)("div",{className:CR,ref:v,children:[o?(0,R.jsx)(Px.N_,{to:"/",className:xR,children:(0,R.jsx)(sw.G,{height:32,condensed:!0})}):(0,R.jsx)(hf,{responsive:!1,className:IR}),l===Ce.ufd.HOME_NEXT_TO_NAVIGATION&&(0,R.jsx)(NR,{className:ER})]}),(0,R.jsx)("div",{className:SR,children:(0,R.jsxs)("div",{className:AR,ref:g,children:[l===Ce.ufd.HOME_NEXT_TO_SEARCH&&(0,R.jsx)(NR,{className:_R}),(0,R.jsx)(O,{inputRef:f,onLeadingIconClick:k,onClick:w,onSearch:!0,isSearchChipsEnabled:!0})]})}),(0,R.jsx)(lf,{className:IR,ref:y})]})};var XR=i(3394),ek=i(32620),tk=i(65881);const ik=(0,b.createContext)(null);function nk(){const e=(0,b.useContext)(ik);if(null===e)throw new Error("Trying to use 'OverturePlaybackContext' without 'OverturePlaybackProvider'!");return e}const rk="playbackContainerWatchFeed",ak=({children:e,overridePlatformId:t})=>{const[i,n]=(0,b.useState)((0,tk.Ue)({videoPlayerContainer:`.${rk}`,audioPlayerContainer:`.${rk}`},t));return(0,b.useEffect)((()=>()=>{i.stop(),i.removeAllListeners()}),[i]),(0,R.jsx)(ik.Provider,{value:i,children:e})};var sk=i(6831),ok=i(10775);const lk=b.memo((function({uri:e,className:t,onClick:i=(()=>{}),size:n=ci.t.xs,placement:r}){const a=(0,D.z)(),s=(0,an.W)(),o=(0,b.useCallback)((()=>{s({intent:"add-to-queue",type:"click"}),a.addToQueue([{uri:e,uid:null}]),i()}),[s,a,e,i]),l=u.Ru.get("contextmenu.add-to-queue");return(0,R.jsx)(ti.Zp,{label:l,placement:r,children:(0,R.jsx)(ei.H,{iconOnly:ok.V,"aria-label":l,onClick:o,"":"add-button",size:n,className:t})})}));var ck=i(28875),uk=i(90706);const dk="IQsUjbPtrVLyyA5iu3zQ",mk=({iconSize:e="small",toggleMute:t,isMuted:i,className:n,labelPlacement:r})=>i?(0,R.jsx)(ti.Zp,{label:u.Ru.get("playback-control.unmute"),placement:r,children:(0,R.jsx)(ei.H,{condensedAll:!0,onClick:t,"aria-label":u.Ru.get("playback-control.unmute"),className:n,children:(0,R.jsx)(ck.X,{size:e})})}):(0,R.jsx)(ti.Zp,{label:u.Ru.get("playback-control.mute"),placement:r,children:(0,R.jsxs)(ei.H,{condensedAll:!0,onClick:t,"aria-label":u.Ru.get("playback-control.mute"),className:n,children:[(0,R.jsx)(uk.C,{size:e}),(0,R.jsx)(I_.J,{animated:!0,white:!0,className:dk})]})}),pk="JXh51ebDftiwM49U49IA",hk="IId345zLSrSuzIWtN4Sd",gk="EMcF5GoJ2mLzcp0t365T",fk="V795GKOEZNiChr8dJcD4",vk="pGPb4TiSkhPdYEt8h2Av",yk="FWBI05WNSb4HR8goMhai",bk="BWyVJ8XXZ0jRGpFaA9iW",_k="gWworaJ45IDWOdwjrZKh",Ek=()=>{const[e,t]=(0,b.useState)(!1);return(0,b.useLayoutEffect)((()=>{setTimeout((()=>t(!0)),200)}),[]),(0,R.jsxs)("div",{className:At()(pk,{[hk]:e}),children:[(0,R.jsx)("div",{className:At()(fk,vk)}),(0,R.jsx)("div",{className:At()(fk,yk)}),(0,R.jsx)("div",{className:At()(fk,bk)}),(0,R.jsx)("div",{className:At()(fk,yk)}),(0,R.jsx)("div",{className:gk}),(0,R.jsx)("div",{className:At()(fk,_k)}),(0,R.jsx)("div",{className:At()(fk,bk)}),(0,R.jsx)("div",{className:At()(fk,vk)}),(0,R.jsx)("div",{className:At()(fk,yk)})]})};var Ck=i(68916);const xk="YHeDUF3aquXRxYmKOs1A",Sk="Ul_Er3t8veggCi1APkwp",Ak="fhmiZPVDhaOYIlNd7Myq",Tk="sJnarE2UKqyhLo0LFNqy",Ik="bPMdcQr8gSb4AgWfkolx",Nk="cjZ23zZucJkKFMIrGZa4",wk="qgczwXDFdF_gy4gRs3LN",Rk="rCxYvbE1hq2_VEMOM6M_",kk="iQnF1gu0Mg2rGsKVHIFn";const Ok=({parentEl:e,item:t})=>{const[i,n]=(0,b.useState)({shouldRender:!0,hasError:!1}),r=(0,FS.Eg)(t?.canvas?.fileId,t?.canvas?.uri)&&!i.hasError;(0,b.useEffect)((()=>{n({shouldRender:!0,hasError:!1})}),[t?.uri]);const a=(0,b.useCallback)((e=>{e&&n({shouldRender:!1,hasError:!0})}),[]);return(0,or.createPortal)((0,R.jsx)(R.Fragment,{children:r&&(0,R.jsx)(el.h,{menu:(0,R.jsx)(pI.P,{uri:t.uri}),children:(0,R.jsx)("div",{className:Sk,children:(0,R.jsx)(FS.Gg,{fileId:t.canvas?.fileId,canvasUri:t.canvas?.uri,className:Ak,playerContainerClass:"canvasContainerWatchFeed",onError:a,playbackType:FS.RT.Loop})})})}),e)},Pk=(0,b.memo)((function({item:e,itemPosition:t,isActive:i,onItemPositionInView:n,carouselEl:r,itemElByPositionRef:a}){const s=function(e){return e.canvas?.thumbnail?.sources?e.canvas.thumbnail.sources.sort(((e,t)=>(t.width??0)-(e.width??0)))[0]?.url:e.coverArt?.sources.sort(((e,t)=>(t.width??0)-(e.width??0)))[0]?.url}(e),o=null===e.canvas,[l,c]=(0,b.useState)(null),{ref:u,inView:d}=(0,jh.Wx)({threshold:o?1:.6,root:r});(0,b.useEffect)((()=>{d&&n(t)}),[d,n,t]);const m=(0,b.useCallback)((e=>{a.current.set(t,e)}),[a,t]),p=(0,Ck.S)([u,c,m]);return s?(0,R.jsx)(el.h,{menu:(0,R.jsx)(pI.P,{uri:e.uri}),children:(0,R.jsxs)("div",{ref:p,className:Tk,children:[o&&i&&(0,R.jsx)(Ek,{}),(0,R.jsx)("div",{className:At()(wk,{[Rk]:i,[Nk]:o}),style:{"--background-color":e.coverArt?.extractedColors?.colorDark.hex??Up.l0o},children:(0,R.jsx)("div",{className:Ik,children:(0,R.jsx)(jy._,{className:kk,loading:"lazy",src:s,radius:12,width:"100%"})})}),i&&l&&(0,R.jsx)(Ok,{parentEl:l,item:e})]})}):null})),Lk=({items:e,currentItemPosition:t,onItemPositionInView:i,itemElByPositionRef:n,onScroll:r,setScrollingState:a})=>{const[s,o]=(0,b.useState)(null);return(0,b.useEffect)((()=>{if((0,rR.n)())return()=>{};const e=()=>a(!0),t=()=>a(!1);return s?.addEventListener("scroll",e,{once:!0}),s?.addEventListener("scrollend",t),()=>{s?.removeEventListener("scroll",e),s?.removeEventListener("scrollend",t)}}),[s,a,t]),(0,R.jsx)(R.Fragment,{children:(0,R.jsx)("div",{className:xk,tabIndex:-1,ref:o,onScroll:r,onKeyDown:e=>{e.preventDefault()},children:e.map(((e,r)=>(0,R.jsx)(Pk,{item:e,isActive:r===t,carouselEl:s,itemPosition:r,onItemPositionInView:i,itemElByPositionRef:n},e.uri)))})})},jk="g47sxYAVvWCq_6T4Ba5L",Dk=({artistUri:e,initialLibraryState:t,spec:i})=>{const[n,r]=(0,Tu.A)(e,t),a=(0,Qe.s)(),s=(0,b.useCallback)((async()=>{let t;t=n?i.followButtonFactory().hitUnfollow({itemToBeUnfollowed:e}):i.followButtonFactory().hitFollow({itemToBeFollowed:e}),a.logInteraction(t);try{await r(!n)}catch{}}),[n,r,e,i,a]),o=n?u.Ru.get("unfollow"):u.Ru.get("follow");return(0,R.jsx)(gC.W,{className:jk,isFollowing:n,onClick:s,buttonText:o})};var Mk=i(47315);const Uk=200,Bk="ease-in-out";var Fk=function(e){return e[e.UP=-1]="UP",e[e.NONE=0]="NONE",e[e.DOWN=1]="DOWN",e}(Fk||{});const Hk=e=>{if(!e)return Fk.NONE;const{previous:t,current:i}=e;return void 0===t||void 0===i?Fk.NONE:Math.sign(i.position-t.position)},Vk=(e,t,i)=>{if(!e.animate)return void(e.style.opacity="1");const n=Hk(i);e.animate({opacity:[0,1],transform:[`translateY(${50*n}%)`,"translateY(0%)"]},{duration:Uk,easing:Bk,fill:"forwards",delay:100})},Gk=(e,t,i,n)=>{if(!e.animate)return void i();const r=Hk(n);e.animate({opacity:[1,0],transform:["translateY(0%)",`translateY(${-1*r*50}%)`]},{duration:Uk,easing:Bk,delay:100}).addEventListener("finish",i,{once:!0})},zk=e=>{e.animate?e.animate({opacity:[0,1]},{duration:Uk,easing:Bk,fill:"forwards"}):e.style.opacity="1"},Wk=(e,t,i)=>{if(!e.animate)return void i();e.animate({opacity:[1,0]},{duration:Uk,easing:Bk}).addEventListener("finish",i,{once:!0})},Kk=({hideEnteringElements:e,animateEnteringElements:t,animateExitingElements:i,animateFlippedElements:n})=>{e(),i(),n(),t()},Yk="dkbQiFBHMdijQeINl_ij",qk="aiSwqZguOk1P52s9o9xP",Zk="bl3iefJaRs18m1sL93Eh",$k="zrFS4My93WidFfSAb0u6",Qk="mENWYVW_PAl8OWp2Ut6e",Jk="dErRUxXewpEkZd52uLTh",Xk="q2y15bQqkJDcBixyP5oa",eO=({mainArtist:e,hashtags:t,sectionUri:i,spec:n,logger:r,position:a,itemUri:s})=>{const{open:o}=(0,Mk.P)(),l=(0,b.useCallback)((e=>{const t=n.hashtagButtonFactory({uri:e}).hitUiNavigate({destination:e});r.logInteraction(t),o(i,e)}),[r,o,i,n]),c=(0,b.useCallback)((()=>{const t=n.artistNameFactory().hitUiNavigate({destination:e.uri});r.logInteraction(t)}),[r,e.uri,n]);return(0,R.jsx)(wI.ZI,{flipKey:`wf-${s}-footer`,handleEnterUpdateDelete:Kk,decisionData:{position:a},children:(0,R.jsxs)("div",{className:Yk,children:[(0,R.jsx)(el.h,{renderInline:!0,menu:(0,R.jsx)(dI.t,{uri:e.uri,isInLibrary:e.saved}),children:(0,R.jsxs)("div",{className:qk,children:[(0,R.jsx)("div",{className:Jk,children:(0,R.jsx)(wI.lf,{flipId:`wf-artist-avatar-${s}`,translate:!1,opacity:!1,scale:!1,onAppear:zk,onExit:Wk,children:(0,R.jsxs)("div",{className:Jk,children:[(0,R.jsx)(Fp.e,{label:e.name,images:e.avatar?.sources||[],width:32,userIconSize:"small"})," "]})},`wf-artist-avatar-${s}`)}),(0,R.jsxs)("div",{className:Zk,children:[(0,R.jsx)(wI.lf,{flipId:"wf-artist-name",translate:!0,children:(0,R.jsx)("div",{className:Jk,children:(0,R.jsx)(wI.lf,{flipId:e.name,translate:!1,opacity:!1,scale:!1,onAppear:zk,onExit:Wk,children:(0,R.jsx)("div",{className:Jk,children:(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",children:(0,R.jsx)(Pv.N,{to:e.uri,onClick:c,children:e.name})})})},e.name)})}),e.listeners&&(0,R.jsx)(wI.lf,{flipId:"wf-listeners",translate:!0,children:(0,R.jsx)("div",{className:Jk,children:(0,R.jsx)(On.E,{variant:"bodySmall",semanticColor:"textSubdued",className:Xk,children:u.Ru.formatNumber(e.listeners,{notation:"compact",maximumFractionDigits:0})})})})]}),(0,R.jsx)(wI.lf,{flipId:"wf-follow-button",translate:!0,children:(0,R.jsx)("div",{className:Jk,children:(0,R.jsx)(Dk,{artistUri:e.uri,initialLibraryState:e.saved,spec:n})})})]})}),t.length>0&&(0,R.jsx)("div",{className:$k,children:t.map(((e,t)=>(0,R.jsx)(wI.lf,{flipId:t,translate:!0,children:(0,R.jsx)("div",{className:Jk,children:(0,R.jsx)(Nf.v,{onClick:()=>l(e.uri),children:(0,R.jsx)("span",{className:Qk,children:e.title})},t)})},t)))})]})})};var tO=i(88482),iO=i(88778),nO=i(75456),rO=i(63462),aO=i(50892);const sO="edeYmiJw2Fd9EFB2SQZo",oO="cpE_cN95GCusnLJ3Mssy",lO=()=>{const{progressMs:e,durationMs:t,animate:i}=function(){const e=nk(),t=(0,b.useRef)(Date.now()),i=(0,b.useRef)(0),[n,r]=(0,b.useState)(0),[a,s]=(0,b.useState)(3e4),[o,l]=(0,b.useState)(!1),c=(0,aO.g)();return e.on(rO.LW.PROGRESS,(e=>{const n=Date.now();n-t.current>=500&&(r(e.data.position),t.current=n,e.data.position>i.current?l(!0):l(!1),i.current=e.data.position)})),e.on(rO.LW.BEFORE_TRACK_LOAD,(()=>{r(0),l(!1)})),e.on(rO.LW.DURATION_CHANGED,(e=>{s(e.data.duration)})),e.on(rO.LW.TRACK_ENDED,(()=>{r(a)})),{progressMs:n,durationMs:a,animate:o&&"visible"===c}}();return(0,R.jsx)(nO.z,{className:At()(sO,{[oO]:i}),semanticColor:"essentialBase",value:100*e/t,dir:"ltr"})};const cO="E0LdRRiYvrkUdZCmAXqQ",uO="yJJKqce9DPVQnrFseKKU",dO="_bMlIQGXEMMBRZOVM71Z",mO="omghgDzOcUFl6oOXYNHX",pO="TaaunKIj990MWZKrBWHW",hO=({item:e,handleTitleClick:t,widthBreakpoint:i,position:n})=>{const r=function(e){return e?.coverArt?.sources.sort(((e,t)=>(e.width??0)-(t.width??0)))[0]?.url}(e),a=e.artists[0],s=e.canvas&&r;return(0,R.jsx)(wI.ZI,{flipKey:`wf-${e.uri}-itemInfo`,handleEnterUpdateDelete:Kk,decisionData:{position:n},children:(0,R.jsxs)("div",{className:cO,children:[(0,R.jsx)(el.h,{renderInline:!0,menu:(0,R.jsx)(pI.P,{uri:e.uri,albumUri:e.album?.uri,artists:e.artists}),children:(0,R.jsx)(wI.lf,{flipId:e.title,translate:!0,onAppear:Vk,onExit:Gk,children:(0,R.jsx)("div",{className:pO,children:(0,R.jsx)(On.E,{variant:i===bf.E.LARGE?"titleSmall":"titleMedium",className:uO,semanticColor:"textBase",children:(0,R.jsx)(Pv.N,{to:e.uri,onClick:t,children:e.title})})})},e.title)}),(0,R.jsx)(el.h,{renderInline:!0,menu:a?.uri?(0,R.jsx)(dI.t,{uri:a?.uri}):null,children:(0,R.jsx)(wI.lf,{flipId:`wf-artist-${a.name}`,translate:!0,children:(0,R.jsx)("div",{className:pO,children:(0,R.jsx)(On.E,{variant:"bodyMedium",children:a.name})})},`wf-artist-${a.name}`)}),(0,R.jsxs)("div",{className:mO,children:[s&&(0,R.jsx)(el.h,{renderInline:!0,menu:e.album?.uri?(0,R.jsx)(iO.h,{uri:e.album?.uri}):null,children:(0,R.jsx)(wI.lf,{flipId:`wf-coverart-${e.title}`,translate:!1,opacity:!1,scale:!1,onAppear:zk,onExit:Wk,children:(0,R.jsx)("div",{className:pO,children:(0,R.jsx)(tO._,{src:r,className:dO})})},`wf-coverart-${e.title}`)}),(0,R.jsx)(lO,{})]})]})})},gO="YKRW27BSGgfw1jw43dpT",fO="FlQup9bGmLLKYjTrsGQ0",vO=()=>(0,R.jsxs)("div",{className:xk,tabIndex:0,children:[(0,R.jsx)("div",{className:Tk,children:(0,R.jsx)("div",{className:fO})}),(0,R.jsx)("div",{className:Tk,children:(0,R.jsx)("div",{className:wk,children:(0,R.jsx)("div",{className:gO,ref:e=>{e?.scrollIntoView({block:"center",inline:"nearest"})}})})}),(0,R.jsx)("div",{className:Tk,children:(0,R.jsx)("div",{className:wk,children:(0,R.jsx)("div",{className:gO})})})]}),yO="DJxOEatMU2PHk0cCYWoX",bO="FP_XXx0FMQPJEu3WzfpM",_O="JYvxp3Y58xF59FA7Mnaf",EO="WLr9Q6nJ_Hv35r7pNEa3",CO="uwkK6FkoyBrxvGSYBbhw",xO="AkStH5UDLsXzudcPz_J_",SO="YmJS4xMTXdNQLvbP2VAt",AO="Qtx4b7Wc1c7NEX49CMeH",TO="SliTY9e8oKOiypDQdhlw",IO="OGPXh73aLJDzhfFAdPvM",NO="d9bbNw4YiAXpQpjrSgBJ",wO="ji0qx5PBc5_4aMgNLGrp",RO="BLIxyum1wPNrFibaQ9wr",kO="NazSI1w8xaruwFqTP3sS",OO="ZRarvpz5og3ifOVHzGOv",PO="RQaEu8T4LvqfvRmirqJy",LO="jskTw7aMQHNyh13AZI6R",jO="hK5DaTfJaFpo2BJuoy5k",DO=({hide:e})=>(0,R.jsxs)("div",{className:At()(EO,_O,{[CO]:e}),children:[(0,R.jsxs)("div",{className:jO,children:[(0,R.jsx)("div",{className:xO,children:(0,R.jsx)(AC.Y,{as:"div",variant:"bodySmall",charCount:8,isLoading:!0})}),(0,R.jsxs)("div",{className:cO,children:[(0,R.jsx)(AC.Y,{as:"div",variant:"titleMedium",charCount:10,isLoading:!0}),(0,R.jsx)(AC.Y,{as:"div",variant:"bodyMedium",charCount:15,isLoading:!0}),(0,R.jsx)(AC.Y,{as:"div",variant:"bodySmall",charCount:20,isLoading:!0})]}),(0,R.jsxs)("div",{className:Yk,children:[(0,R.jsx)(AC.Y,{as:"div",variant:"titleSmall",charCount:10}),(0,R.jsx)(AC.Y,{as:"div",variant:"bodySmall",charCount:15})]})]}),(0,R.jsx)("div",{className:OO,children:(0,R.jsx)(vO,{})}),(0,R.jsx)("div",{className:wO})]});var MO=i(34413),UO=i(31322),BO=i(3869),FO=i(96554);const HO="dcZW_YRCwhi9TTJMPxzX",VO="JSNVglrzXyqMjvBqTdjS",GO="HfPg2vA6Xn7iwiUnz1e9",zO="vWe6vr0rBY5E9eWjL4hm",WO="f7MX2BXkHu1edOXcPYc6",KO="GMCJTC2SwK0uAZrugIfm",YO="LN31SBNtphm5YdIegKRN",qO=({children:e})=>(0,R.jsx)("div",{className:HO,children:e}),ZO=({children:e})=>{const[t,i]=(0,Ss.x)("watch-feed.dismissed-shortcut-onboarding",!1),n=(0,so.W)();if((0,b.useEffect)((()=>{const e=e=>{"?"===e.key&&i(!t)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[t,i]),t)return(0,R.jsx)(R.Fragment,{children:e});const r=(0,R.jsxs)(dc.A,{colorSet:"announcement",popoverTitle:u.Ru.get("web-player.watch-feed.view.shortcuts.title"),children:[(0,R.jsx)(UO.Z,{variant:"ballad",className:zO,children:u.Ru.get("web-player.watch-feed.view.shortcuts.description")}),(0,R.jsxs)("div",{className:WO,children:[(0,R.jsxs)("div",{className:KO,children:[(0,R.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.previous")}),(0,R.jsx)(qO,{children:(0,R.jsx)(BO.J,{size:"small"})})]}),(0,R.jsxs)("div",{className:KO,children:[(0,R.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.next")}),(0,R.jsx)(qO,{children:(0,R.jsx)(FO.y,{size:"small"})})]}),(0,R.jsxs)("div",{className:KO,children:[(0,R.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.add-to-library")}),(0,R.jsx)(qO,{children:(0,R.jsx)(FO.y,{size:"small",className:VO})})]}),(0,R.jsxs)("div",{className:KO,children:[(0,R.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.add-to-queue")}),(0,R.jsx)(qO,{children:(0,R.jsx)(FO.y,{size:"small",className:GO})})]}),(0,R.jsxs)("div",{className:KO,children:[(0,R.jsx)("span",{children:u.Ru.get("web-player.watch-feed.view.shortcuts.mute-unmute")}),(0,R.jsx)(qO,{children:(0,R.jsx)("span",{className:YO,children:"M"})})]})]})]});return(0,R.jsx)(uc.W,{overlay:r,onHide:()=>{i(!0)},placement:n?uc.W.topLeft:uc.W.leftTop,children:e})},$O="bsYqS4l_sJOvBGGeudDj",QO="XIKBfnA7TQOV1T8LLiAS",JO="kT3dFHdVmU0vyeE71IDE",XO=({hasNext:e,hasInteracted:t,moveDown:i,isRTL:n,widthBreakpoint:r})=>{const a=u.Ru.get("web-player.watch-feed.view.next-button"),s=n?"right":"left",o=(0,b.useRef)(null);return(0,b.useLayoutEffect)((()=>{t&&o.current?.focus({preventScroll:!0})}),[t]),t?(0,R.jsx)(ti.Zp,{label:a,placement:s,children:(0,R.jsx)(ei.H,{className:$O,"aria-label":a,label:a,disabled:!e,iconOnly:Yu.r,onClick:()=>i(),ref:o,size:r===bf.E.SMALL?"small":"medium"})}):(0,R.jsx)("div",{className:QO,children:(0,R.jsx)(ZO,{children:(0,R.jsx)(Ln.$,{className:JO,disabled:!e,colorSet:"invertedLight",iconTrailing:MO.R,onClick:()=>i(),size:r===bf.E.SMALL?"small":"medium",children:u.Ru.get("web-player.watch-feed.view.next-button")})})})},eP="fCykqEza3WtgKmxjL0C1",tP=({hasPrevious:e,moveUp:t,isRTL:i,widthBreakpoint:n})=>{const r=u.Ru.get("web-player.watch-feed.view.previous-button"),a=i?"right":"left";return e?(0,R.jsx)(ti.Zp,{label:r,placement:a,children:(0,R.jsx)(ei.H,{className:eP,"aria-label":r,label:r,iconOnly:Ku.o,onClick:()=>t(),size:n===bf.E.SMALL?"small":"medium"})}):null};var iP=i(90778),nP=i(9285);const rP=({uri:e,moveUp:t,moveDown:i,toggleMute:n})=>{const r=(0,nP.i)(e),a=(0,D.z)(),s=(0,oe.Zp)(),o=(0,g.d4)((e=>e.platform.isDesktop)),[l,c]=(0,Tu.A)(r),u=(0,an.W)(),d=(0,b.useCallback)((()=>{u({targetUri:r,intent:l?"remove-from-library":"add-to-library",type:"key-press"}),c(!l)}),[l,u,r,c]),m=(0,b.useCallback)((()=>{u({intent:"add-to-queue",type:"key-press"}),a.addToQueue([{uri:e,uid:null}])}),[u,a,e]),p=(0,b.useCallback)((()=>{s(-1)}),[s]),h=(0,b.useCallback)((()=>{s(1)}),[s]);return(0,iP.Nx)(Yd.gO.GO_BACKWARDS,p,o),(0,iP.Nx)(Yd.gO.GO_FORWARDS,h,o),(0,iP.Nx)(Yd.gO.WF_ADD_TO_LIBRRY,d),(0,iP.Nx)(Yd.gO.WF_ADD_TO_QUEUE,m),(0,iP.Nx)(Yd.gO.WF_MUTE_UNMUTE,n),(0,iP.Nx)(Yd.gO.WF_GO_TO_PREVIOUS,t),(0,iP.Nx)(Yd.gO.WF_GO_TO_NEXT,i),null};var aP=i(9580);function sP({playbackContainerClass:e,onError:t=(()=>{})}){const i=nk(),[n,r]=(0,b.useState)(!1),{volume:a}=(0,aP.n)(),s=(0,aO.g)();(0,b.useEffect)((()=>{a>=0&&i.setVolume(a)}),[i,a]),(0,b.useEffect)((()=>(i.on(rO.LW.TRACK_LOADED,(()=>{const t=document.getElementsByClassName(e),i=t[0]?.querySelector("video");i&&(i.loop=!0,i.muted=!1,i.autoplay=!0)})),i.on(rO.LW.ERROR,(e=>{e.data.error&&t(e.data.error),t(new Error("PreviewPlayback error"))})),i.on(rO.LW.VOLUME_CHANGED,(({data:e})=>{r(0===e.volume)})),()=>{i.removeListener(rO.LW.TRACK_LOADED),i.removeListener(rO.LW.ERROR),i.removeListener(rO.LW.VOLUME_CHANGED)})),[t,i,e]);const o=(0,b.useCallback)((async()=>{const e=(await i.getCurrentState()).playbackState.playing;"hidden"===s&&e?i.pause():"visible"!==s||e||i.resume()}),[s,i]);(0,b.useEffect)((()=>{o()}),[o]);const l=(0,b.useCallback)((e=>{const t=function(e){const t=e?.preview;return e?.uri&&t?.url?(0,rO.a2)({uri:e.uri,format:"MP3",url:t.url}):null}(e);t&&i.playTracks([t],{paused:!1})}),[i]),c=(0,b.useCallback)((async()=>{i.setVolume(n?a||.7:0)}),[n,i,a]),u=(0,b.useCallback)((()=>i.getCurrentState()),[i]);return{playPreview:l,toggleMute:c,isMuted:n,getCurrentState:u}}var oP=i(90549);const lP=Spicetify.GraphQL.Definitions["watchFeedView"]=new qi.l("watchFeedView","query","4eb0691296f18d98a553ed288853f579f8c7c4fca66b80c0e223e47dd30e935b",null);function cP(e){if("TrackResponseWrapper"===e.content.__typename&&"Track"===e.content.data.__typename){const i=e.content.data,n=function(e=[]){return e.find((e=>!!e.fileId))||null}(i.previews?.audioPreviews?.items);return{uri:i.uri,preview:n,title:i.name,album:i.albumOfTrack,artists:(t=i.artists.items,t.map((e=>({uri:e.uri,verified:e.profile.verified||!1,name:e.profile.name,avatar:e.visuals.avatarImage,saved:e.saved,listeners:e.stats.monthlyListeners})))),canvas:i.canvas,coverArt:i.albumOfTrack?.coverArt||null,sharingInfo:i.sharingInfo,hashtags:i.discoveryFeedHashtags}}var t;return null}const uP={offset:0,previousItems:[]};function dP(e){const t=e?.extractedColors?.colorDark;if(t&&!t.isFallback)return t.hex}const mP={intent:"share",type:"click",itemIdSuffix:"watchfeed/share"},pP="playbackContainerWatchFeed";const hP=({sectionUri:e,discoveryFeedUri:t,firstItemUri:i,resumeOnClose:n})=>{const{close:r}=(0,Mk.P)(),a=(0,so.W)(),[s,o]=(0,b.useState)(!1),l=(0,pR.B2)(),c=(0,b.useRef)(!1),d=(0,b.useRef)(new Map),[m,p]=(0,b.useState)(n),[h,f]=(0,b.useState)(!1),{closeSnackbar:v}=(0,xp.d)(),{spec:y,logger:_}=(0,Hi.r)(sk.r,{data:{uri:t}}),E=(0,b.useCallback)((e=>{e&&v(),f(e)}),[v]),{content:{title:C,items:x},error:S,fetchNextPage:A,isFetching:T}=function(e){const{sectionUri:t,discoveryFeedUri:i,firstItemUri:n}=e,r=(0,g.d4)(Ia.JJ),{request:a}=(0,b.useContext)(We.j),{data:s,error:o,isFetching:l,fetchNextPage:c}=(0,bg.q)({queryKey:["watch-feed","view",t,i,n],queryFn:({pageParam:e})=>(0,Jg.c)(a,lP,{sp_t:(0,ft.v8)("sp_t")??"",country:r,discoveryFeedUri:i,uri:t,firstItemUri:e.offset?"":n??"",offset:e.offset,limit:40,previousItems:e.previousItems}),gcTime:18e5,staleTime:3e5,initialPageParam:uP,getNextPageParam:(e,t)=>{const i=t.reduce(((e,t)=>("HomeSectionCollection"===t?.data?.homeSections.__typename&&t.data.homeSections.sections.forEach((t=>{"HomeSection"===t.__typename&&"HomeWatchFeedSectionData"===t.data?.__typename&&(e.offset=t.sectionItems.pagingInfo.nextOffset??0,e.previousItems=e.previousItems.concat(t.sectionItems.items.map((e=>cP(e)?.uri??null)).filter((e=>null!==e))))})),e)),{...uP});if(0!==i.offset)return i}});return{content:(0,b.useMemo)((()=>s?.pages?s.pages.reduce(((e,t)=>{const i=t?.data?.homeSections;if("HomeSectionCollection"===i?.__typename){let t=e.title;return i.sections.forEach((i=>{"HomeSection"===i.__typename&&"HomeWatchFeedSectionData"===i.data?.__typename&&(t=i.data.title?.transformedLabel||null,i.sectionItems.items.forEach((t=>{const i=cP(t);i&&e.items.push(i)})))})),{items:e.items,title:t}}return e}),{items:[],title:null}):{items:[],title:null}),[s]),error:o,isFetching:l,fetchNextPage:c}}({sectionUri:e,discoveryFeedUri:t,firstItemUri:i}),[I,N]=(0,b.useState)(0),w=x[I]||null,[k,O]=(0,b.useState)(!w),[P,L]=(0,b.useState)(!1);(0,b.useEffect)((()=>{w?(L(!0),setTimeout((()=>{O(!1)}),400)):(L(!1),O(!0))}),[w]);const j=(0,b.useMemo)((()=>y.trackTitleFactory({uri:w?.uri})),[y,w]),D=(0,Js.t)(j);!function({sectionUri:e,discoveryFeedUri:t,firstItemUri:i,currentItemUri:n,resumeOnClose:r}){const{close:a,updateLocationState:s}=(0,Mk.P)(),o=(0,oe.zy)(),l=(0,b.useRef)();(0,b.useEffect)((()=>{l.current?o.pathname!==l.current?a({resumePlayback:r,forceClose:!0}):n&&n!==o.state?.watchFeed?.lastSeenItemUri&&s({isOpen:!0,resumeOnClose:r,firstItemUri:i||"",lastSeenItemUri:n,sectionUri:e,discoveryFeedUri:t}):l.current=o.pathname}),[a,o,r,n,i,s,e,t])}({sectionUri:e,discoveryFeedUri:t,firstItemUri:i,currentItemUri:w?.uri,resumeOnClose:m}),function(e){const t=(0,Sr.XB)(),{close:i}=(0,Mk.P)(),n=(0,b.useRef)();(0,b.useEffect)((()=>{n.current?t!==n.current&&i({resumePlayback:e}):n.current=t}),[i,e,t])}(m),function(e){const{close:t}=(0,Mk.P)();(0,b.useEffect)((()=>{const i=i=>{"Escape"===i.key&&(i.target instanceof HTMLElement&&i.target.closest(`#${oP.v}`)||t({resumePlayback:e}))};return document.addEventListener("keyup",i),()=>{document.removeEventListener("keyup",i)}}),[e,t])}(n);const M=e=>{const t=y.closeButtonFactory().hitUiHide();_.logInteraction(t),r({resumePlayback:e})},U=(0,b.useCallback)((e=>{o(!0),c.current=!0,N((t=>{const i=t+e;return i in x?(setTimeout((()=>{d.current.get(i)?.scrollIntoView({block:"center",inline:"nearest",behavior:"smooth"})})),i):t}))}),[x]),{playPreview:B,toggleMute:F,isMuted:H,getCurrentState:V}=sP({playbackContainerClass:pP}),G=(0,b.useCallback)((async()=>{const{playbackState:e}=await V(),t=y.previousButtonFactory().hitSkipToPrevious({itemToBeSkipped:x[I].uri,positionMs:e.position??-1,totalContentMs:e.duration??-1});_.logInteraction(t),U(-1)}),[U,x,_,I,y,V]);(0,b.useLayoutEffect)((()=>{N(0),d.current.get(0)?.scrollIntoView({block:"center",inline:"nearest",behavior:"instant"})}),[t]),(0,b.useLayoutEffect)((()=>{0!==I&&o(!0)}),[I]);const z=(0,b.useCallback)((async()=>{const{playbackState:e}=await V(),t=y.nextButtonFactory().hitSkipToNext({itemToBeSkipped:x[I].uri,positionMs:e.position??-1,totalContentMs:e.duration??-1});_.logInteraction(t),U(1)}),[U,x,_,I,y,V]),W=(0,nn.YQ)((0,b.useCallback)((()=>{c.current=!1}),[]),100,{leading:!1,trailing:!0}),K=(0,b.useCallback)((e=>{c.current||N(e)}),[]),Y=(0,b.useCallback)((()=>{if(H){const e=y.muteButtonFactory().hitUnmutePlayback();_.logInteraction(e)}else{const e=y.muteButtonFactory().hitMutePlayback();_.logInteraction(e)}F()}),[H,_,y,F]),q=(0,b.useCallback)((()=>{const e=y.shareButtonFactory().hitShare({entityToBeShared:w?.uri,shareId:w?.sharingInfo?.shareId||""});_.logInteraction(e)}),[w,_,y]),Z=(0,b.useCallback)((()=>{if(!w)return;const e=y.addToQueueFactory().hitAddItemToQueue({itemToAddToQueue:w?.uri});_.logInteraction(e)}),[w,_,y]),$=(0,b.useCallback)((()=>{const e=y.trackTitleFactory({uri:w.uri}).hitUiNavigate({destination:w.uri});_.logInteraction(e),p(!1)}),[w,y,_]);(0,b.useEffect)((()=>{!S&&w&&function(e,t,i){return e>=t-5&&!(t>50)&&!i}(I,x.length,T)&&A()}),[S,w,I,T,x,A]),(0,b.useEffect)((()=>{B(w)}),[w,B]),(0,b.useEffect)((()=>{N(0)}),[t]);const Q=Boolean(x[I-1]),J=Boolean(x[I+1]),X=(0,b.useRef)(null),{breakpoint:ee}=(0,Ef.x)({[bf.E.SMALL]:0,[bf.E.MEDIUM]:778,[bf.E.LARGE]:1102},X),te=(0,gi.o)((e=>(e?.restrictions?.disallowAddToQueueReasons||[]).length>0));if(S)return null;const ie=w?.artists[0],ne={backgroundColor:dP(w?.coverArt)||Up.PQ2},re=a?"right":"left";return(0,R.jsx)(zi.s,{focusTrapOptions:{allowOutsideClick:!0},children:(0,R.jsx)("div",{className:yO,onClick:()=>M(n),role:"presentation",children:(0,R.jsxs)("div",{style:ne,className:bO,onClick:e=>{e.stopPropagation()},role:"presentation",tabIndex:-1,children:[w&&(0,R.jsxs)("div",{className:_O,ref:X,children:[(0,R.jsxs)("div",{className:jO,ref:D,children:[(0,R.jsx)("div",{className:xO,children:(0,R.jsx)(On.E,{variant:ee===bf.E.LARGE?"titleSmall":"bodyMediumBold",semanticColor:"textBase",children:C})}),(0,R.jsx)(hO,{item:w,handleTitleClick:$,widthBreakpoint:ee,position:I}),(0,R.jsx)(eO,{mainArtist:ie,hashtags:w.hashtags,sectionUri:e,spec:y,logger:_,position:I,itemUri:w.uri})]}),(0,R.jsxs)("div",{className:OO,children:[(0,R.jsx)(Lk,{items:x,currentItemPosition:I,onItemPositionInView:K,itemElByPositionRef:d,onScroll:W,setScrollingState:E}),(0,R.jsx)("div",{className:At()(PO,{[LO]:h}),ref:l})]}),(0,R.jsxs)("div",{className:wO,children:[(0,R.jsxs)("div",{className:SO,children:[(0,R.jsx)("div",{className:AO,children:(0,R.jsx)(mk,{toggleMute:Y,isMuted:H,labelPlacement:re,iconSize:ee===bf.E.SMALL?"small":"medium"})}),(0,R.jsx)(ti.Zp,{label:u.Ru.get("close"),placement:"bottom",children:(0,R.jsx)(ei.H,{onClick:()=>M(n),"aria-label":u.Ru.get("close"),condensedAll:!0,children:(0,R.jsx)(Pn.M,{size:ee===bf.E.SMALL?"small":"medium"})})})]}),(0,R.jsxs)("div",{className:TO,children:[(0,R.jsx)(Ti.b,{renderInline:!0,placement:re,menu:(0,R.jsx)(pI.P,{uri:w.uri,albumUri:w.album?.uri,artists:w.artists,sharingInfo:w.sharingInfo,menuBoundary:X?.current||void 0}),children:(0,R.jsx)(Ws.e,{size:ee===bf.E.SMALL?Ws.M.sm:Ws.M.md,label:u.Ru.get("more.label.context",w.title),placement:re,className:IO})}),(0,R.jsx)(GS.w,{ariaLabel:u.Ru.get("context-menu.copy-track-link"),uri:w.uri,placement:re,interactionData:mP,sharingInfo:null,size:ee===bf.E.SMALL?"small":"medium",onClick:q}),!te&&(0,R.jsx)(lk,{uri:w.uri,size:ee===bf.E.SMALL?"small":"medium",placement:re,onClick:Z,className:NO}),(0,R.jsx)(Ru.g,{uri:w.uri,size:ee===bf.E.SMALL?ci.t.sm:ci.t.md,labelPlacement:re,menuPlacement:re,className:RO})]}),(0,R.jsxs)("div",{className:kO,children:[(0,R.jsx)(tP,{hasPrevious:Q,moveUp:G,isRTL:a,widthBreakpoint:ee}),(0,R.jsx)(XO,{hasNext:J,hasInteracted:s,moveDown:z,isRTL:a,widthBreakpoint:ee}),(0,R.jsx)("div",{className:pP}),(0,R.jsx)(rP,{moveUp:G,moveDown:z,toggleMute:F,uri:w.uri})]})]})]}),k&&(0,R.jsx)(DO,{hide:P})]})})})},gP=()=>{const{isOpen:e,sectionUri:t,discoveryFeedUri:i,firstItemUri:n,resumeOnClose:r}=(0,j.S)();return e?(0,R.jsx)(ek.u,{pageId:fI.$h.WATCHFEED,uri:i,children:(0,R.jsx)(ak,{overridePlatformId:"desktop-watch-feed",children:(0,R.jsx)(hP,{sectionUri:t,discoveryFeedUri:i,firstItemUri:n,resumeOnClose:r})})}):null},fP=({elementRef:e})=>{const{item:t}=(0,gi.o)((e=>({item:e?.item})),((e,t)=>e.item?.uri===t.item?.uri)),{spec:i,logger:n}=(0,Hi.r)(f_.t,{data:{uri:t?.uri??""}}),{min:r,max:a,size:s,setSize:o}=(0,Sr.Zf)(),l=(0,so.W)(),c=(0,b.useCallback)(((e,t)=>{e!==t&&n.logInteraction(i.npvUiResizeFactory().dragUiResize({startSizePx:e,endSizePx:t}))}),[n,i]);return(0,R.jsx)(Xd,{elementRef:e,placement:"inline-start",label:u.Ru.get("resize.sidebar"),cssCustomProperty:"--panel-width",onCSSPropertyChange:e=>{o(e)},initialValue:s,min:r,max:a,decreaseSizeKeyboardCombination:l?Yd.gO.YLX_SIDEBAR_DECREASE_WIDTH:Yd.gO.NPV_SIDEBAR_DECREASE_WIDTH,increaseSizeKeyboardCombination:l?Yd.gO.YLX_SIDEBAR_INCREASE_WIDTH:Yd.gO.NPV_SIDEBAR_INCREASE_WIDTH,afterResizing:c})},vP=({children:e})=>{const[t,i]=(0,b.useState)(!1),[n,r]=(0,b.useState)(""),a=(0,b.useRef)(null),o=(0,vs.e)(),l=m_(),c=u_(),u=(0,g.wA)(),d=(0,s.NC)(Ce.q5y),m=(0,b.useCallback)((e=>{t?(c(n),r(""),i(!1),u((0,p.np)())):(e&&r(e),d?l.startActiveDiscovery():o.getCapabilities().supportsLocalDiscovery&&o.updateListOfDevices(),i(!0),u((0,p.ae)()))}),[t,c,n,u,d,l,o]),h=(0,b.useMemo)((()=>({triggerRef:a,toggleDevicePicker:m,isPickerOpen:t})),[m,t]);return(0,R.jsx)(ja.Provider,{value:h,children:e})},yP=()=>((0,iP.qV)(),null),bP=()=>(0,j.S)().isOpen?null:(0,R.jsx)(yP,{}),_P="XOawmCGZcQx4cesyNfVO";function EP({children:e}){const t=(0,rT.X)(),{size:i}=(0,Sr.Zf)();return(0,R.jsx)("div",{style:{width:t===Ar.Z.Disabled?0:i},className:_P,children:e})}const CP=b.lazy((async()=>await Promise.all([i.e(4151),i.e(1206)]).then(i.bind(i,97079)).then((e=>({default:e.RootDialogs}))))),xP=e=>{const{accessTokenIsSet:t,onClose:i,onBrowserNotSupported:n,onCloseFullscreenMode:r,onCloseWatchFeed:a,onReachUsableState:o,isVideoSupported:l,isDesktop:c,billboardMinimized:d,isDeveloperMode:m,adsEnabled:p,children:h}=e,f=(0,vm.m)(),v=(0,F.My)(),_=v===fm.m.Desktop,E=(0,b.useRef)(null),C=(0,b.useRef)(null),x=(0,b.useRef)(null),S=(0,b.useRef)(null),A=(0,b.useRef)(null),T=(0,b.useRef)(null),I=(0,b.useRef)(null),N=(0,b.useRef)(null),w=(0,b.useRef)(null),k=(0,b.useRef)(null),O=(0,b.useRef)(null),P=(0,b.useRef)(null),L=dR(),j=(0,kg.A)(),D=(0,s.NC)(Ce.mKm),M=(0,s.NC)(Ce.rWU),U=function(e,t){return e!==fm.m.Desktop&&(e!==fm.m.PWA&&("/lyrics"!==t.pathname&&!(0,sf.g)()))}(v,(0,oe.zy)());(e=>{const t=(0,oe.Zp)();(0,b.useEffect)((()=>{const i=i=>{e&&(3===i.button?(t(-1),i.preventDefault()):4===i.button&&t(1))};return document.addEventListener("mouseup",i),()=>{document.removeEventListener("mouseup",i)}}),[e,t])})(_),mm(!m),(({onBrowserNotSupported:e,onReachUsableState:t})=>{(0,b.useEffect)((()=>{const i=hm().getParser(window.navigator.userAgent);i.satisfies({chrome:"<62"})||i.satisfies({edge:"<16"})?e(u.Ru.get("browser_upgrade_notice",i.getBrowserName())):t("home")}),[e,t])})({onBrowserNotSupported:n,onReachUsableState:o}),GN();const{handleDrop:B,handleDragStart:H,handleDragEnd:V,handleDragOver:G}=(()=>{const e=(0,b.useCallback)((e=>{e.preventDefault(),document.body.removeAttribute("data-dragging-type")}),[]),t=(0,b.useCallback)((e=>{document.body.removeAttribute("data-dragging-type")}),[]),i=(0,b.useCallback)((e=>{e.preventDefault()}),[]);return{handleDrop:e,handleDragStart:(0,b.useCallback)((e=>{e.target instanceof Element&&"true"!==e.target.getAttribute("draggable")&&(e.preventDefault(),e.stopPropagation())}),[]),handleDragEnd:t,handleDragOver:i}})();(()=>{const e=(0,pt.jE)();(0,mR.L)((()=>{e.invalidateQueries({queryKey:["useAddToPlaylistListData"]})}))})(),(()=>{const e=(0,b.useRef)(!0),t=(0,op.p)(),i=(0,pt.jE)();(0,b.useEffect)((()=>{e.current?e.current=!1:(i.invalidateQueries(),i.removeQueries({type:"inactive"}))}),[t,i])})(),(0,Sr.bF)(),(0,b.useEffect)((()=>{window&&window.history&&window.history.scrollRestoration&&(window.history.scrollRestoration="manual")}),[]),(0,b.useEffect)((()=>{f.notifyReadyStateReached()}),[f]);const z=(0,b.useMemo)((()=>[(0,R.jsx)(am,{scrollNodeRef:O,scrollNodeChildRef:P}),(0,R.jsx)(cf.X,{}),(0,R.jsx)(lr.ZC,{mainLandmarkRef:C,lyricsCinemaRef:T,leftSidebarRef:w,rightSidebarRef:k,nowPlayingBarRef:S}),(0,R.jsx)(ga,{}),(0,R.jsx)(vP,{}),(0,R.jsx)(Rt.k,{}),(0,R.jsx)(jt,{}),(0,R.jsx)(sm.$,{}),(0,R.jsx)(um,{}),(0,R.jsx)(gm.JI,{}),(0,R.jsx)(HN.Ad,{}),(0,R.jsx)(eR.n,{instance:L}),(0,R.jsx)(pR.n,{domRootRef:N}),(0,R.jsx)(XR.F,{})]),[L]),W=(0,g.d4)((e=>e.ui.unsupportedBrowser));return(0,R.jsxs)(Be,{providers:z,children:[(0,R.jsxs)("div",{"":"root",className:At()("Root",{"circular-sp-vietnamese":M,"global-nav":j,"centered-layout":D}),style:{"--panel-gap":`${zN.KV}px`},onDrop:B,onDragOver:G,onDragStart:H,onDragEnd:V,ref:E,children:[(0,R.jsx)(Aa,{message:W.isOpen?W.message:null,allowHTML:!0,onClose:i,isNotSupported:!0}),(0,R.jsxs)(tw,{children:[j&&(0,R.jsx)(JR,{}),(0,R.jsxs)(aw,{children:[(0,R.jsx)(Ow,{}),(0,R.jsx)(im,{elementRef:w})]}),(0,R.jsx)(Fw,{children:(0,R.jsx)(zd,{})}),(0,R.jsxs)(Lw,{children:[(0,R.jsx)(Ri.pZ,{value:"top-bar",children:(0,R.jsx)(xf,{})}),(0,R.jsxs)("div",{className:"main-view-container",children:[(0,R.jsx)("div",{className:"under-main-view"}),(0,R.jsxs)(Hs.a,{className:"main-view-container__scroll-node",onInstanceCreated:e=>{O.current=e.elements().viewport},children:[!j&&(0,R.jsx)("div",{className:"main-view-container__scroll-node-child-spacer"}),(0,R.jsx)("div",{ref:P,className:At()("main-view-container__scroll-node-child"),style:{minHeight:"calc(100vh - 64px - 90px - 519px)"},children:(0,R.jsx)(If,{ref:C,children:(0,R.jsxs)(y.s,{FallbackComponent:()=>(0,R.jsx)(Wd.o,{}),onError:e=>(0,om.Jy)(e,"Root"),children:[h,U&&(0,R.jsx)("div",{className:"main-view-container__mh-footer-container",children:(0,R.jsx)(FN,{})})]})})})]}),l&&(0,R.jsx)(pa,{fullscreenModeRef:I,cinemaModeRef:A,npbVideoAdRef:x})]}),(0,R.jsx)(jN,{}),t&&p&&(0,R.jsx)(kn,{}),c&&(0,R.jsx)("div",{className:At()("",{"Root__ads-container-desktop--is-hidden":!d}),children:(0,R.jsx)(xn,{})}),(0,R.jsx)("div",{className:"Root__modal-slot"})]}),(0,R.jsxs)(Uw,{children:[(0,R.jsx)(EP,{children:(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(RN,{})})}),(0,R.jsx)(fP,{elementRef:k})]}),(0,R.jsx)("div",{id:"lyrics-cinema",className:"Root__lyrics-cinema",ref:T}),(0,R.jsx)(nw,{ref:A}),(0,R.jsx)(nw,{ref:N}),(0,R.jsx)(Dw,{children:(0,R.jsx)("div",{className:"VTO__modal-slot"})})]}),(0,R.jsx)(b.Suspense,{fallback:null,children:(0,R.jsx)(CP,{isDesktop:c})}),(0,R.jsx)(y.s,{onError:e=>{a(),(0,om.Jy)(e,"WatchFeedView")},children:(0,R.jsx)(gP,{})}),(0,R.jsx)(y.s,{onError:e=>{r(),(0,om.Jy)(e,"FullscreenMode")},children:(0,R.jsx)(dn,{videoRef:I})}),(0,R.jsx)(Xw,{}),(0,R.jsx)(fR,{pipInstance:L})]}),(0,R.jsx)(wt,{}),(0,R.jsx)(bP,{})]})};var SP=i(82580);const AP="QSYXf8dYOffYgwkMd5eC",TP="wSIDh56L1NbjcQQJ5Vkj",IP="AMqcnfR0iNvTMp3AZpze",NP="SoFH2YPXp1wuOt2fe2tg",wP=({errorName:e})=>{const t={cdmerror:{logoLink:qp.S5,header:u.Ru.get("error-page.header.cdmerror"),subtext:u.Ru.get("error-page.subtext.cdmerror"),cta:{title:u.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:u.Ru.get("error-page.header.max_subscriptions_reached"),subtext:u.Ru.get("error-page.subtext.max_subscriptions_reached")},artist_videos_not_supported:{header:u.Ru.get("error-page.header.expression_not_supported"),subtext:"",cta:{title:u.Ru.get("error-page.not-found.home"),url:"https://open.spotify.com"}}}[e]||{},i=(0,s.NC)(Ce.rWU);return(0,R.jsxs)("div",{className:At()(AP,{"circular-sp-vietnamese":i}),"":"error-page",children:[t.logoLink?(0,R.jsx)(SP.A,{className:TP,customLink:t.logoLink}):(0,R.jsx)(SP.A,{className:TP,noLink:!0}),(0,R.jsxs)("div",{className:IP,children:[t.header&&(0,R.jsx)(On.E,{as:"h1",variant:"titleLarge",semanticColor:"textBase",dir:"auto",children:t.header}),t.subtext&&(0,R.jsx)(On.E,{as:"h2",variant:"bodyMedium",semanticColor:"textBase",dir:"auto",children:t.subtext})]}),t.cta&&(0,R.jsx)(Ln.$,{onClick:()=>{t?.cta?.url&&(window.location.href=t.cta.url)},className:NP,colorSet:"brightAccent",children:t.cta.title})]})},RP=wP;let kP=function(e){return e.LOGGING_CATEGORY="l2l",e.LOGGING_CATEGORY_MWP="l2l-mwp",e}({});function OP({isPremiumUser:e,locationSearch:t,navigate:i,logNavigation:n,showDialog:r}){const a=!!(s=t)&&"1"===new URLSearchParams(s).get(kP.LOGGING_CATEGORY);var s;a&&(n(a),function(e,t){if(!e)return;const i=new URLSearchParams(e);i.delete(kP.LOGGING_CATEGORY),t({search:i.toString()},{replace:!0})}(t,i),a&&!e&&r())}var PP=i(20842),LP=i(40353);const jP="sp_s2l";var DP=function(e){return e.LOGGING_CATEGORY="s2l",e.LOGGING_CATEGORY_MWP="s2l-mwp",e}(DP||{});const MP=(e,{os:t="",country:i=""})=>{const n={category:"in_app_message",action:"display",label:"download",destination_url:"open.spotify.com",os:t,country:i,context:window.location.search};return e?(0,LP.r)(n):(0,PP._)(n)};function UP({locationSearch:e,navigate:t,logDialog:i,showDialog:n}){(function(e){if(!e)return!1;const t=new URLSearchParams(e);return Boolean(t.get(DP.LOGGING_CATEGORY))})(e)&&(i(),function(e,t){if(!e)return;const i=new URLSearchParams(e);i.delete(DP.LOGGING_CATEGORY),t({search:i.toString()},{replace:!0})}(e,t),n())}function BP(){const e=(0,ft.v8)(jP);return e?JSON.parse(decodeURIComponent(e)):null}const FP=function({children:e}){const t=(0,oe.Zp)(),i=(0,oe.zy)(),n=(0,g.wA)(),r=(0,ve.mv)(),{close:a}=(0,Mk.P)(),s=(0,g.d4)((e=>e.session.accessToken)),o=(0,g.d4)((e=>e.ui.errorPage)),l=(0,vm.m)(),c=(0,g.d4)((e=>e.platform.isDesktop?e.ads.root.adsEnabled:!!e.session.productState?.ads&&1===parseInt(e.session.productState.ads,10))),u=(0,g.d4)((e=>!!e.ads.billboard&&e.ads.billboard.isMinimized)),{isDesktop:d,isDeveloperMode:m,isVideoSupported:h}=(0,g.d4)((e=>e.platform)),f=o.isError,v=o.name,y=!!s;(0,b.useEffect)((()=>{n(p.yk())}),[n]),(0,b.useEffect)((()=>{l.notifyViewLoaded(i.pathname)}),[l,i.pathname]);const _=ot();(0,b.useEffect)((()=>{_?.registerMainWindowCallbacks(document,window)}),[_]);const E=(0,Sp.V)();(0,b.useEffect)((()=>{UP({locationSearch:i.search,navigate:t,logDialog:()=>{r.getEventSender().send(MP(E,{os:(0,Kp.f)()}))},showDialog:()=>{n(p.mi())}})}),[n,i.search,t,r,E]),(0,b.useEffect)((()=>{OP({isPremiumUser:!1,locationSearch:i.search,navigate:t,logNavigation:()=>r.getEventSender().send((0,xt.Q)({category:"open",action:"pageview",label:"login",destination_url:"open.spotify.com",os:(0,Kp.f)()})),showDialog:()=>{n(p.Jp())}})}));const C=(0,b.useCallback)((e=>{l.notifyUsableStateReached(e)}),[l]),x=(0,b.useCallback)((()=>{n(p.BZ())}),[n]),S=(0,b.useCallback)((e=>{n(p.Gz(e))}),[n]),A=(0,b.useCallback)((()=>{n(p.rF())}),[n]),T=(0,b.useCallback)((()=>{a({resumePlayback:!0})}),[a]);return f?(0,R.jsx)(RP,{errorName:v}):(0,R.jsx)(xP,{billboardMinimized:u,isVideoSupported:h,onReachUsableState:C,accessTokenIsSet:y,onClose:x,onBrowserNotSupported:S,onCloseFullscreenMode:A,onCloseWatchFeed:T,isDesktop:d,isDeveloperMode:m,adsEnabled:c,children:e})};var HP=i(71259),VP=i(23956),GP=i(21866),zP=i(35657);const WP=()=>{const e=(0,oe.zy)(),{uri:t,playlistName:i}=e.state,n=VP.ui.MUSIC_SEE_ALL,{data:r,error:a,getLeavebehinds:s}=(0,GP.A)({surface:n,uri:t,playlistName:i});if((0,b.useEffect)((()=>{s()}),[]),!r?.leavebehindAds||a)return null;const o=(0,zP.iT)(r,t);return(0,R.jsx)("div",{className:"contentSpacing",children:(0,R.jsx)(HP.o,{leavebehinds:o.slice(0,zP.E9),surface:n,uri:t})})};var KP=i(92750);const YP=(0,b.lazy)((()=>i.e(8865).then(i.bind(i,45085)).then((e=>({default:e.AlbumPrerelease})))));var qP=i(32046),ZP=i(15891);const $P=e=>(0,R.jsx)(qP.e,{pageId:fI.$h.PRERELEASE,children:e}),QP=()=>{const{id:e}=(0,oe.g)();if(!e)return $P((0,R.jsx)(Ct.A,{hasError:!0,errorMessage:u.Ru.get("error.not_found.title.album")}));const t=(0,ne.js)(e);return $P((0,R.jsx)(YP,{uri:t.toString()},e))},JP=()=>(0,s.NC)(Ce.xnZ,{loadingValue:!1})?(0,R.jsx)(oe.qh,{path:"/prerelease/:id",element:(0,R.jsx)(QP,{})},"album-prerelease"):(0,R.jsx)(oe.qh,{path:"/prerelease/:id",element:(0,R.jsx)(ZP.$,{to:"/"})},"album-prerelease"),XP=()=>[(0,R.jsx)(oe.qh,{path:"/artist-videos",element:(0,R.jsx)(wP,{errorName:"artist_videos_not_supported"})},"artist-videos")];function eL(e){return`spotify:section:${e.replace(/^section/,"")}`}const tL=(0,b.lazy)((()=>Promise.all([i.e(4151),i.e(6266)]).then(i.bind(i,42074)).then((e=>({default:e.BrowsePage}))))),iL=(0,b.lazy)((()=>Promise.all([i.e(4151),i.e(6266)]).then(i.bind(i,92341)).then((e=>({default:e.BrowseSection}))))),nL=({id:e})=>{if(e.startsWith("section"))return(0,R.jsx)(iL,{uri:eL(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,R.jsx)(tL,{uri:t,id:e})},rL=e=>`spotify:cultural-moment:hub:${e}`,aL=b.lazy((()=>Promise.all([i.e(4151),i.e(3838)]).then(i.bind(i,46339)))),sL=()=>{const{id:e=""}=(0,oe.g)();return(0,R.jsx)(aL,{uri:rL(e),id:e})};var oL=i(1646),lL=i(57758),cL=i(60765),uL=i(17534),dL=i(95534);const mL=()=>{const e=(0,oe.zy)();return new URLSearchParams(e.search).get("facet")||""},pL="main-home-filterChipsContainer",hL="main-home-filterChipsSection",gL="fIvMht6B9HdROywMNJZ4",fL="mjZrvVI3CxfHJXu7y0Lg",vL="LVMjmN2CaPruPAo62RAY",yL=b.memo((({filterChips:e})=>{const t=(0,oe.Zp)(),i=mL(),{spec:n,logger:r}=(0,Hi.r)(lL.Y,{data:{identifier:"home",uri:i?`spotify:home?facet=${i}`:"spotify:home"}}),a=e.flatMap((e=>e.id&&"wrapped-chip"!==e.id?{id:e.id,getName:()=>e.label?.text??"",ubiId:e.id}:[])),s=(0,b.useCallback)((e=>{const a=n.homeSubfeedsFactory();if(e&&e!==i){const i=a.filterChipFactory({identifier:e});r.logInteraction(i.hitFilter()),t(`/home?facet=${e}`)}else{const e=a.filterChipFactory({identifier:"all"});r.logInteraction(e.hitFilter()),t("/")}}),[n,r,t,i]),o=(0,nn.YQ)(s,100,{leading:!0,trailing:!1});return(0,R.jsx)("div",{className:At()(vL,"contentSpacing"),children:(0,R.jsxs)(cL.F,{ariaLabel:u.Ru.get("home.filters"),children:[(0,R.jsx)(Nf.v,{"aria-label":u.Ru.get("search.title.all"),selectedColorSet:"invertedLight",onClick:()=>o(null),selected:""===i,children:u.Ru.get("search.title.all")},"all"),a.map((e=>(0,R.jsx)(Nf.v,{"aria-label":e.getName(),selectedColorSet:"invertedLight",onClick:()=>o(e.id),selected:Boolean(i&&i===e.id),children:e.getName()},e.id)))]})})})),bL=()=>{const e=(0,op.p)(),t=(0,s.NC)(Ce.kSk),i=yf(),n=(0,qr.v7)(),{ref:r,inView:a}=(0,jh.Wx)({initialInView:!0,threshold:[1],rootMargin:`-${zN.uC}px 100%`,root:n.current}),o=void 0!==i,l=(0,oe.zy)(),c=new URLSearchParams(l.search).get("pCountry"),u=(0,g.d4)(Ia.JJ),{data:d,loading:m,error:p}=(0,uL.W3)({timeZone:(0,dL.Ff)(),sp_t:(0,ft.v8)("sp_t")??"",country:c??u},{gcTime:dL.gO,staleTime:dL.jl});return m?(0,R.jsx)("div",{className:pL,children:(0,R.jsx)("div",{className:At()(vL,"contentSpacing"),children:(0,R.jsx)(AC.Y,{as:"h2",variant:"titleMedium",charCount:25,isLoading:!0})})}):p||!d||"HomeResponsePayload"!==d.home?.__typename?null:t&&e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{ref:r}),(0,R.jsxs)("div",{className:pL,children:[(0,R.jsx)("div",{className:At()({[fL]:!a,[gL]:o},hL),style:{backgroundColor:i}}),(0,R.jsx)(yL,{filterChips:d.home.homeChips})]})]}):null};var _L=i(311),EL=i(1019),CL=i(23342),xL=i(11521),SL=i(89070),AL=i(65551),TL=i(68046),IL=i(18232);const NL="audiobooks-chip",wL=(0,b.memo)((({itemType:e,cardCount:t})=>{const i=(0,s.NC)(Ce.k4Y);return(0,R.jsx)("section",{children:(0,R.jsx)("div",{className:At()(IL.A.home,IL.A.homepage),children:(0,R.jsxs)("div",{className:At()(IL.A.content,"contentSpacing"),children:[(0,R.jsx)(_L.y,{withTitle:!1}),"HomeFeedBaselineSectionData"===e&&i?(0,R.jsx)(TL.q,{cardCount:t}):(0,R.jsx)(TL.f,{showAll:!0,cardCount:t,withTitle:!1})]})})})})),RL=e=>t=>"HomeShortsSectionData"===t.data?.__typename||("spotify:section:0JQ5DAnM3wGh0gz1MXnu3N"===t.uri&&"podcasts-chip"===e||("spotify:section:0JQ5DAJvCyzyxqjq31tlEs"===t.uri||"spotify:section:0JQ5DAnM3wGh0gz1MXnucs"===t.uri)&&e===NL),kL=()=>{const e=mL(),t=[],i=(0,oe.zy)(),n=new URLSearchParams(i.search).get("pCountry"),r=(0,g.d4)(Ia.JJ),a=(0,s.NC)(Ce.k4Y),{data:o,fetching:l,error:c}=(0,uL.FE)({timeZone:(0,dL.Ff)(),sp_t:(0,ft.v8)("sp_t")??"",facet:e,country:n??r},{gcTime:dL.gO,staleTime:dL.jl}),{spec:d}=(0,Hi.r)(lL.Y,{data:{identifier:"home",uri:`spotify:home?facet=${e}`}}),m=o?.home;if(l){const e="HomeResponsePayload"===m?.__typename&&m?.sectionContainer.sections.items[1]?.data?.__typename||"";return(0,R.jsx)(wL,{itemType:e,cardCount:50})}if(null!==c)return(0,R.jsx)(Ct.A,{hasError:!0,errorMessage:u.Ru.get("error.generic")});if("HomeResponsePayload"!==m?.__typename)return(0,R.jsx)(Ct.A,{hasError:!0,errorMessage:u.Ru.get("error.generic")});if(0===m.sectionContainer.sections.items.length)return(0,R.jsx)(Ct.A,{hasError:!0,errorMessage:u.Ru.get("error.generic")});m.sectionContainer.sections.items.forEach((e=>{"HomeFeedBaselineSectionData"===e.data?.__typename&&t.push(e.sectionItems.items[0])}));const p=m.sectionContainer.sections.items.filter((e=>"HomeFeedBaselineSectionData"===e.data?.__typename||"HomeGenericSectionData"===e.data?.__typename)),h={...m.sectionContainer,sections:{...m.sectionContainer.sections,items:p.filter((t=>!RL(e)(t)))}},f=m.sectionContainer.sections.items.find(RL(e));return(0,R.jsx)("section",{"":"home-subfeed-page",className:At()(IL.A.home,IL.A.homepage),children:(0,R.jsxs)("div",{className:At()(IL.A.content,"contentSpacing"),children:[f&&(0,R.jsx)(AL.$,{spec:d,greeting:null,section:(0,CL.M)(f,f.data)}),a?(0,R.jsx)(SL.g,{container:h,greeting:null,spec:d}):(0,R.jsx)(on.r,{spec:d.shelvesFactory(),children:(0,R.jsx)(EL.p,{title:"",showAll:!0,index:0,id:"subfeed-cards",rowGap:lv.lT,children:t.map(xL.G)})})]})})},OL=()=>mL()?(0,R.jsx)(kL,{}):(0,R.jsx)(ZP.$,{to:"/"});var PL=i(10596),LL=i(12762),jL=i(32712);const DL=(0,b.lazy)((()=>Promise.all([i.e(4151),i.e(7660),i.e(4312)]).then(i.bind(i,83371)))),ML=(0,b.lazy)((()=>i.e(5885).then(i.bind(i,39928)))),UL=(0,b.lazy)((()=>Promise.all([i.e(4151),i.e(3569)]).then(i.bind(i,58825)))),BL=(0,b.lazy)((()=>Promise.all([i.e(4151),i.e(9319)]).then(i.bind(i,97484)))),FL=(0,b.lazy)((()=>Promise.all([i.e(4151),i.e(1621)]).then(i.bind(i,30317)))),HL=()=>{const{sectionId:e}=(0,oe.g)();return(0,R.jsx)(FL,{uri:`spotify:section:${e}`})},VL=({isDesktop:e,isPremium:t,isOffline:i})=>{const{allowSwitchingBetweenHomeAdsAndHpto:n}=xe();return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ZN,{}),e&&(n?(0,R.jsx)(ML,{}):(0,R.jsx)(DL,{})),e&&t&&i&&(0,R.jsx)(UL,{}),!i&&(0,R.jsx)(BL,{})]})},GL=({isDesktop:e,isPremium:t,isOffline:i})=>i?e&&t?(0,R.jsx)(UL,{}):(0,R.jsx)(PL.I,{showDownloadInformation:!1}):(0,R.jsx)(BL,{}),zL=({isDesktop:e,isOffline:t})=>{const i=mL()!==NL,{allowSwitchingBetweenHomeAdsAndHpto:n}=xe();return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ZN,{}),e&&i&&(n?(0,R.jsx)(ML,{}):(0,R.jsx)(DL,{})),!t&&(0,R.jsx)(bL,{}),(0,R.jsx)(oe.sv,{})]})};var WL=i(3128);const KL="/launch-miniplayer",YL=()=>{const e=(()=>{const{open:e,isOpen:t,canOpen:i}=(0,dA.H)();return(0,b.useCallback)((()=>{i&&!t&&e()}),[i,t,e])})();return(0,b.useEffect)((()=>{e()}),[e]),(0,WL.L)((t=>t.pathname===KL&&(e(),!0)),[e]),(0,R.jsx)(ZP.$,{to:"/"})};var qL=i(48604),ZL=i(74888);const $L="auth_redirect";function QL(e,t){return t?`spotify:playlist-format:${e}:${t}`:`spotify:playlist-format:${e}`}const JL={uri:null,error:null};function XL(e,t){switch(t.type){case"SUCCESS":return{...e,uri:t.uri};case"FAILURE":return{...e,error:t.error};default:throw new Error}}const ej=({isAnonymous:e,playlistFormatURI:t})=>{const i=(0,qL.m)(),[n,r]=(0,b.useReducer)(XL,JL);if((0,b.useEffect)((()=>{e&&window.location.hash!==`#${$L}`?(window.location.hash=$L,(0,ZL.PW)()):i.resolvePlaylistFormatURI(t).then((e=>r({type:"SUCCESS",uri:e}))).catch((e=>r({type:"FAILURE",error:e})))}),[i,e,t,r]),null!==n.uri){const e=(a=n.uri,(0,ne.o_)(a).id);return(0,R.jsx)(ZP.$,{to:`/playlist/${e}`})}var a;return(0,R.jsx)(Ct.A,{hasError:null!==n.error,errorMessage:u.Ru.get("error.not_found.title.playlist"),timeoutInMs:5e3})},tj=b.memo((function({isAnonymous:e}){const{title:t="",category:i}=(0,oe.g)();return(0,R.jsx)(ej,{isAnonymous:e,playlistFormatURI:QL(t,i)})}));var ij=i(5100);const nj=b.lazy((()=>i.e(1460).then(i.bind(i,16909)))),rj=b.lazy((()=>i.e(7790).then(i.bind(i,85596)))),aj=({queueView:e})=>{const{openQueue:t}=(0,za.R)();return(0,b.useLayoutEffect)((()=>{t(e)}),[]),null};var sj=i(19733);const oj=()=>{const e=(0,s.NC)(Ce.eWj,{loadingValue:!1}),{openQueue:t}=(0,sj.R)();return(0,WL.L)((i=>!!e&&("/queue"===i.pathname?(t(_I.p.QUEUE),!0):"/history"===i.pathname&&(t(_I.p.HISTORY),!0)))),e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oe.qh,{path:"/queue",element:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(aj,{queueView:_I.p.QUEUE}),(0,R.jsx)(ZP.$,{to:"/"})]})},"/queue"),(0,R.jsx)(oe.qh,{path:"/history",element:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(aj,{queueView:_I.p.HISTORY}),(0,R.jsx)(ZP.$,{to:"/"})]})},"/history")]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(oe.qh,{path:"/queue",element:(0,R.jsx)(qP.e,{navigationalRoot:LL.g.NOW_PLAYING_BAR,pageId:fI.$h.NOWPLAYING_QUEUE,children:(0,R.jsx)(rj,{})})}),(0,R.jsx)(oe.qh,{path:"/history",element:(0,R.jsx)(qP.e,{navigationalRoot:LL.g.NOW_PLAYING_BAR,pageId:fI.$h.NOWPLAYING_HISTORY,children:(0,R.jsx)(nj,{})})})]})};var lj=i(5244),cj=i(89037),uj=i(77142),dj=i(31685),mj=i(99451);const pj=({memberToBeRemoved:e,onClose:t})=>{const{logRemoveClick:i}=(0,mj.R)(),{currentSession:n,removeSessionMember:r}=(0,qa.D)(),a=e?.id??"",s=e?.displayName??"",o=n?.sessionId??"",l=(0,b.useCallback)((()=>{i(a,o),a&&(r(a),t())}),[i,a,o,r,t]),c=(0,b.useCallback)((()=>{t()}),[t]);return(0,R.jsx)(Jf.T,{isOpen:Boolean(a),titleText:u.Ru.get("web-player.social-connect.participant-list.remove-guest-dialog",{displayName:s}),"aria-label":u.Ru.get("web-player.social-connect.participant-list.remove-guest-dialog",{displayName:s}),confirmText:u.Ru.get("web-player.social-connect.participant-list.remove-guest"),cancelText:u.Ru.get("web-player.social-connect.participant-list.remove-guest-cancel"),onConfirm:l,onClose:c})};var hj=i(67707),gj=i(80851);const fj="VaoPVkde4AzxorQnp6Jp",vj="dDz8CzVKiV2128rhR543",yj="tBAiRbWhD79Gi2XqZ_AG",bj=({sessionMember:e,index:t,showRemoveButton:i,onClickRemove:n,onClickMember:r})=>{const{displayName:a,images:s,uri:o,username:l}=(0,Ka.c)(e);return(0,R.jsx)(el.h,{menu:(0,R.jsx)(FT.B,{uri:o}),children:(0,R.jsx)("span",{children:(0,R.jsxs)(gj.$,{rowIndex:t,className:fj,children:[(0,R.jsx)(hj.T,{columnIndex:0,children:(0,R.jsxs)(Pv.N,{to:o,className:yj,onClick:r,"aria-label":a,children:[(0,R.jsx)(Fp.e,{images:s,userIconSize:"medium",width:32,displayName:a,username:l,label:a}),(0,R.jsx)(On.E,{as:"p",variant:"bodyMediumBold",semanticColor:"textBase",children:a})]})}),i&&(0,R.jsx)(hj.T,{columnIndex:1,className:vj,children:(0,R.jsx)(rv.n,{size:"small",onClick:n,"aria-label":u.Ru.get("web-player.social-connect.participant-list.remove-guest-accessible-label",{displayName:a}),children:u.Ru.get("web-player.social-connect.participant-list.remove-guest")})})]})})})},_j="qAE8wMAxO5THZoNqlb0q",Ej=()=>{const e=(0,g.d4)((e=>e.session.user?.id)),{currentSession:t}=(0,qa.D)(),[i,n]=(0,b.useState)(),{logUserClick:r,logRemoveClick:a,UBIFragmentWithSpec:s}=yN(),o=(0,b.useCallback)(((e,t)=>{a(e),n(t)}),[a]),l=(0,b.useCallback)(((e,t)=>{const i=(0,ne.Qj)(t.username).toURI();r(e,i)}),[r]),c=(0,b.useCallback)((()=>{n(void 0)}),[]),d=t?.sessionMembers.find((e=>e.id===t.sessionOwnerId));if(!t||!d)return(0,R.jsx)(oe.C5,{to:"/queue"});const m=t.isSessionOwner?2:1;return(0,R.jsxs)("section",{className:"contentSpacing",children:[(0,R.jsx)(dj.Q,{children:u.Ru.get("web-player.social-connect.participant-list.title",{host:d.displayName})}),(0,R.jsx)(On.E,{as:"h1",variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("web-player.social-connect.participant-list.title")}),(0,R.jsx)(On.E,{as:"h2",variant:"bodyMediumBold",semanticColor:"textSubdued",children:u.Ru.get("web-player.social-connect.participant-list.subtitle")}),(0,R.jsx)(uj.f,{"aria-colcount":m,"aria-rowcount":t.sessionMembers.length,"aria-label":u.Ru.get("web-player.social-connect.participant-list.title"),className:_j,children:t.sessionMembers.map(((i,n)=>(0,R.jsx)(bj,{sessionMember:i,showRemoveButton:t.isSessionOwner&&i.username!==e,index:n,onClickRemove:()=>o(n,i),onClickMember:()=>l(n,i)},i.displayName)))}),(0,R.jsx)(s,{children:(0,R.jsx)(pj,{memberToBeRemoved:i,onClose:c})})]})};var Cj=i(27563),xj=i(61967),Sj=i(12804),Aj=i(61314),Tj=i(69052);const Ij=()=>{const{id:e}=(0,oe.g)(),t=(0,g.wA)(),i=(0,Aj.M)(),n=(0,Sj.C)();return(0,b.useEffect)((()=>{if(!e)return;const r=Rj(i,n,e);r&&t(r)}),[t,e,i,n]),(0,R.jsx)(ZP.$,{to:"/"})},Nj=()=>{const e=(0,Aj.M)(),t=(0,Sj.C)(),i=(0,xj.Y)(),n=(0,oe.zy)();return(0,b.useEffect)((()=>{if(t===Tj.l.PREMIUM&&e===Tj._.ENABLED){const e=(0,ne.o_)(n.pathname);i(e&&(0,ne.p3)(e)?e:void 0)}}),[i,t,n.pathname,e]),(0,R.jsx)(ZP.$,{to:"/"})},wj=()=>{const e=(0,g.wA)(),t=(0,Aj.M)(),i=(0,oe.Zp)(),n=(0,Sj.C)(),r=(0,xj.Y)();return(0,WL.L)((a=>{const s=(0,ne.o_)(a.pathname??""),o=s&&(0,ne.cr)(s)&&(l=a.pathname,!Object.values(Cj.S).includes(l));var l;if(s&&(0,ne.p3)(s))return r(s),!0;if(o){const r=Rj(t,n,s.id);return!!r&&(e(r),a.state?.redirectToHome&&i("/"),!0)}return!1}),[t,n]),[(0,R.jsx)(oe.qh,{path:Cj.S.PARTICIPANTS_PAGE,element:(0,R.jsx)(qP.e,{pageId:fI.$h.SOCIAL_LISTENING_PARTICIPANTLIST,children:(0,R.jsx)(Ej,{})})},"social-session-participant-page"),(0,R.jsx)(oe.qh,{path:"/socialsession/:id",Component:Ij},"social-session-invitation-fallback"),(0,R.jsx)(oe.qh,{path:"/jam/:contextType?/:id?/:play?",Component:Nj},"jam-creation-fallback")]};function Rj(e,t,i){return t===Tj.l.NONE?(0,p.A9)(Bc.EL.ERROR):e===Tj._.DISABLED?(0,p.A9)(Bc.EL.MOBILE_ONLY):e===Tj._.RESTRICTED?(0,p.A9)(Bc.EL.REDIRECT,i):e===Tj._.ENABLED?(0,p.A9)(Bc.EL.JOIN,i):null}var kj=i(28754),Oj=i(77925);const Pj="q5riNmaoksSuEEvQAurA",Lj=[{id:"ALBUM",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.music"),ubiId:"Music"},{id:"EPISODE",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.episodes"),ubiId:"Podcast & Shows"},{id:"WHATS_NEW_FEED_NOTIFICATION",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.notifications"),ubiId:"Merch & Events"}],jj=(0,b.memo)((function({availableFilters:e,selectedFilters:t,toggleFilterId:i,resetFilterIds:n,className:r,spec:a}){const s=u.Ru.get("web-player.whats-new-feed.filters.options"),o=(0,Qe.s)(),l=(0,b.useMemo)((()=>{const t=new Map;return(e||[]).forEach((e=>{t.set(e.id,e)})),t}),[e]),c=(0,b.useCallback)(((e,t,i)=>{let n;if(!e)return n=a.clearFiltersFactory().hitClearFilter(),void o.logInteraction(n);const r=l.get(e);if(!r)return;const s=a.filterChipFactory({identifier:r.ubiId,position:i});n=t?s.hitClearFilter():s.hitFilter(),o.logInteraction(n)}),[a,o,l]);return(0,R.jsx)("div",{className:Pj,children:(0,R.jsx)(Oj.s,{placeholderFilters:Lj,availableFilters:e,selectedFilters:t,toggleFilterId:i,onFilterClick:c,resetFilterIds:n,ariaLabel:s,className:r})})}));var Dj=i(47231);const Mj=({dateAdded:e,prefix:t})=>{let i=e.getTime()>0&&u.Ru.formatRelativeDate(e,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"});return i&&t&&(i=`${t} ${i}`),(0,R.jsx)(On.E,{variant:"bodySmall",children:i})},Uj=e=>{switch(e){case bf.E.LARGE:return rg.Qe.SIZE_112;case bf.E.MEDIUM:default:return rg.Qe.SIZE_64}};var Bj=i(96764),Fj=i(64820),Hj=i(13797);const Vj={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)",row:"SjhDNg4bQRQmIJAba47Z",actions:"eYvk_xcxVNMwCBkfY3O0",visibleAction:"TtoLzgGMAU9nkxMbixq9",playButton:"Rw7qIj58PeAz8p6dejOP",content:"K3oY37O4n1fElTqkmnd8",description:"AkSMHdbIxX7Fj7e_8APi",subtitleLink:"uzhTSuCH_4ojaqifMJRB",imageWrapper:"q82J4Wio82IYN9poOJfd",imageContainer:"D71yL9GnHIYg7PheYlz8",showImage:"KKRyrr7NUJy1VBWydHHH",largeImage:"kAYwHqwZ7agHEAGbYN3v",explicitIcon:"HjDtVqhmfzWlsvg4dliB",timeAgo:"H4ODi0SPeEXBawCgANeX",footer:"XaingSntLq8c8wEfqf81",episodeBody:"sbM0nIPBghB_k5Tb5a8y",fallbackIcon:"SCFHE5DLXwCFJz8oVFMs",dateAndTime:"FDm94lE0xkDYtA1Bk7Jc",medium:"jYce7J2dSeD3e9qvWO7N",seperator:"tDRI4dCXFmqKzB1b6K3u",seperatorAlbum:"TPNGFuTvzNVNHisumnhg"};function Gj({album:e,onLike:t,onMoreButtonClick:i,onDownloadClick:n,spec:r}){const a=(0,b.useRef)(null);ZC(a);const s=(0,_f.y)(),o=s===bf.E.LARGE,{draggable:l,onDragStart:c}=(0,Bu.P)({itemUris:[e.uri],dragLabelText:e.name});let d;e.date&&(d=(0,R.jsx)(Mj,{dateAdded:new Date(e.date.isoString)}));const[m,p]=(0,Tu.A)(e.uri),h=e.artists?.items.map((e=>e.profile.name)).join(u.Ru.getSeparator())||"",g=(0,Qe.s)(),f=(0,b.useCallback)((async()=>{try{await p(!m)}catch{}}),[m,p]),{togglePlay:v,isPlaying:y,isActive:_}=(0,eE.P)({uri:e.uri},{featureIdentifier:"whats_new_panel",referrerIdentifier:"whats_new_panel"}),E=(0,b.useCallback)((t=>{let i;t.preventDefault(),_&&!y&&(i=r.playButtonFactory().hitResume({itemToBeResumed:e.uri})),y||_||(i=r.playButtonFactory().hitPlay({itemToBePlayed:e.uri})),y&&(i=r.playButtonFactory().hitPause({itemToBePaused:e.uri})),i&&g.logInteraction(i),v()}),[v,_,y,g,r,e.uri]),C=(0,Bj.V)(e.uri),x=(0,nI.T)(e.uri),S=(0,b.useCallback)((()=>{const t=r.hitUiNavigate({destination:e.uri});g.logInteraction(t),C()}),[e.uri,r,g,C]),A=(0,b.useCallback)((i=>{const n=r.saveButtonFactory().hitLike({itemToBeLiked:e.uri}),a=r.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});g.logInteraction(i?n:a),t?.(i)}),[r,g,e.uri,t]),T=(0,b.useCallback)(((t,i)=>{let a;i===rI.NV.ADD?a=r.downloadButtonFactory().hitDownload({itemToDownload:e.uri}):i===rI.NV.REMOVE&&(a=r.downloadButtonFactory().hitUiReveal()),a&&g.logInteraction(a),n?.(t,i)}),[e.uri,g,r,n]),I=(0,b.useCallback)((e=>{i?.(e)}),[i]),N=(0,b.useCallback)((()=>{const t=r.titleFactory().hitUiNavigate({destination:e.uri});g.logInteraction(t)}),[e.uri,g,r]),w=u.Ru.get("tracklist.a11y.play",e.name,h),k=u.Ru.get("tracklist.a11y.pause",e.name,h),O=(0,R.jsx)(Qo.d,{lineClamp:1,children:(0,R.jsx)(Pv.N,{to:e.uri,onClick:N,children:e.name})}),P=e.artists?e.artists.items.map(((e,t,i)=>{return(0,R.jsxs)(b.Fragment,{children:[(0,R.jsx)(el.h,{menu:(0,R.jsx)(dI.t,{uri:e.uri}),children:(0,R.jsx)(Pv.N,{to:e.uri,className:Vj.subtitleLink,onClick:(n=e.uri,()=>{const e=r.subtitleFactory().hitUiNavigate({destination:n});g.logInteraction(e)}),children:e.profile.name})}),t<i.length-1&&u.Ru.getSeparator()]},t);var n})):"",L=(0,R.jsx)("div",{className:Vj.imageContainer,children:(0,R.jsx)(ng.b,{className:At()(Vj.showImage,{[Vj.largeImage]:o}),type:_u.c.ALBUM,size:Uj(s),title:e.name,images:e.coverArt?.sources})}),j=(0,R.jsxs)(On.E,{className:Vj.dateAndTime,children:[(0,Hj.C)(e.albumType),(0,R.jsx)("span",{className:Vj.seperatorAlbum,children:d})]}),D=o?ci.t.sm:ci.t.xs,M=(0,R.jsxs)("div",{className:Vj.footer,children:[(0,R.jsxs)("div",{className:Vj.actions,children:[(0,R.jsx)(di.b,{onClick:A,uri:e.uri,size:D,className:Vj.visibleAction}),(0,R.jsx)(Dj.f,{onClick:T,className:At()({[Vj.visibleAction]:(0,Fj.X)(x)}),uri:e.uri,isFollowing:m,onFollow:f,size:D,condensed:!0}),(0,R.jsx)(on.r,{spec:r,children:(0,R.jsx)(Ti.b,{menu:(0,R.jsx)(iO.h,{uri:e.uri}),children:(0,R.jsx)(Ws.e,{onClick:I,size:D})})})]}),(0,R.jsx)("div",{className:Vj.playButton,children:(0,R.jsx)(xT.R,{size:"small",onClick:E,isPlaying:y,ariaPlayLabel:w,ariaPauseLabel:k,version:xT.H.secondary})})]});return(0,R.jsx)(el.h,{menu:(0,R.jsx)(iO.h,{uri:e.uri}),children:(0,R.jsx)("div",{draggable:l,onDragStart:c,children:(0,R.jsx)($o.v,{size:"xxl",ref:a,className:Vj.row,media:L,title:O,subtitle:(0,R.jsx)(Jo.j,{lineClamp:1,children:P}),id:e.uri,variant:"naked",body:j,footer:M,onClick:S,hoverBackgroundColor:"backgroundHighlight",layout:o?"wide":"regular",horizontalGap:o?lv.lT:lv.CJ,verticalGap:lv.v4,paddingBlockStart:"16px",paddingBlockEnd:"16px"})})})}var zj=i(30400),Wj=i(27734),Kj=i(74627);const Yj=({className:e})=>(0,R.jsx)(Kj.v,{ariaLabel:u.Ru.get("card.a11y.explicit"),text:u.Ru.get("paid"),className:e});var qj=i(71338);const Zj={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)",episodeBody:"N3zMh5FMdbBKUvz4uDfe",progressBar:"h0YQcDKdGmWssZyuIcvq",seperator:"lMQrLkJVNqZAzT95gQnA"},$j=1e4;function Qj({episode:e,isPlaying:t,isActive:i,isFullyPlayed:n,setIsFullyPlayed:r}){let a;e.releaseDate&&(a=(0,R.jsx)(Mj,{dateAdded:new Date(e.releaseDate.isoString)}));const s=e.restrictions?.paywallContent??!1,o=(0,b.useRef)(null),[l]=(0,Wi.S)($j,(t=>t?.item?.uri===e.uri));(0,b.useEffect)((()=>{t&&(o.current=l)}),[t,l]),(0,b.useEffect)((()=>{!t&&o.current&&e.duration.totalMilliseconds<=o.current&&r(!0)}),[t,e.duration.totalMilliseconds,r]);const{badges:c}=(0,Z_.b)({contentRating:e.contentRating?.label,isPaywalled:s}),d=(0,R.jsxs)(R.Fragment,{children:[c.explicit&&(0,R.jsx)(Y_.g,{}),c.paid&&(0,R.jsx)(Yj,{}),c.nineteen&&(0,R.jsx)(q_.q,{size:16})]}),m=(0,R.jsx)(qj.j,{isPlaying:t,fullyPlayed:n,durationMs:e.duration.totalMilliseconds,resumePositionMs:o.current||e.playedState.playPositionMilliseconds,position:i?l:void 0,className:Zj.progressBar});return(0,R.jsxs)("div",{className:Zj.episodeBody,children:[d,(0,R.jsx)(On.E,{variant:"bodySmall",children:u.Ru.get("card.tag.episode")}),(0,R.jsx)("span",{className:Zj.seperator}),(0,R.jsx)(On.E,{variant:"bodySmall",children:a}),(0,R.jsx)("span",{className:Zj.seperator}),(0,R.jsx)(On.E,{variant:"bodySmall",children:m})]})}var Jj=i(79787),Xj=i(18573);const eD={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)",row:"IEDOUN3mwwZhHVziC03a",actions:"Olh4d9g46wryDMTzRRmw",visibleAction:"zyDT2CX7tvGjKxxUnO7D",playButton:"TKntS5R19vVI3J9xxwDL",content:"h0EpgyZTOC5U8KOQL4A6",description:"IoTOUob09_0_3kC8ORbu",subtitleLink:"aKVUno8YrkyvGsg7iS59",imageWrapper:"O3nnn9_DD_2DzYEa64jv",imageContainer:"iF91evq0EtvlgCxIRI_6",showImage:"VzSICihKBYcgMsSFv8SH",largeImage:"iOxe1erWkyDFY3p4NG8x",explicitIcon:"iseqhC6eLcxmoGPk6JIE",timeAgo:"kUzqUQECoj43gCthqXdD",footer:"_72TrTBKZHea2vJ2I2BJX",episodeBody:"Bqh5LKZCXF5xkKJcEx7a",fallbackIcon:"OdJvEiRzLWN66tky0bvM",dateAndTime:"Y1f7yukeZPBc6n1uu1pi",medium:"uHM5B97d0hwAYDvOOmY8",seperator:"Oe5t36YEWzbJKH5LBNYD",seperatorAlbum:"dJMAGpC7b6bMSWNEfk6r"};function tD({episode:e,podcastName:t,podcastUri:i,onLike:n,onMoreButtonClick:r,onDownloadClick:a,spec:s,featureIdentifier:o,referrerIdentifier:l,size:c="xxl"}){const d=(0,b.useRef)(null);ZC(d);const m=(0,_f.y)(),p=(0,nI.T)(e.uri),h=m===bf.E.LARGE,{draggable:g,onDragStart:f}=(0,Bu.P)({itemUris:[e.uri],dragLabelText:`${e.name} • ${t}`}),v=(0,Qe.s)(),{togglePlay:y,isPlaying:_,isActive:E}=(0,eE.P)({uri:e.uri},{featureIdentifier:o,referrerIdentifier:l}),[C,x]=(0,b.useState)(e.playedState.state===Jj._w.Completed),S=(0,Bj.V)(e.uri),A=u.Ru.get("tracklist.a11y.play",e.name,t),T=u.Ru.get("tracklist.a11y.pause",e.name,t),I=(0,b.useCallback)((()=>{const t=s.hitUiNavigate({destination:e.uri});v.logInteraction(t),S()}),[S,v,s,e.uri]),N=(0,b.useCallback)((t=>{const i=s.saveButtonFactory().hitLike({itemToBeLiked:e.uri}),r=s.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});v.logInteraction(t?i:r),n?.(t)}),[s,v,e.uri,n]),w=(0,b.useCallback)(((t,i)=>{let n;i===rI.NV.ADD?n=s.downloadButtonFactory().hitDownload({itemToDownload:e.uri}):i===rI.NV.REMOVE&&(n=s.downloadButtonFactory().hitUiReveal()),n&&v.logInteraction(n),a?.(t,i)}),[v,s,e.uri,a]),k=(0,b.useCallback)((()=>{const t=s.titleFactory().hitUiNavigate({destination:e.uri});v.logInteraction(t)}),[v,s,e.uri]),O=(0,b.useCallback)((t=>{let i;t.preventDefault(),E&&!_&&(i=s.playButtonFactory().hitResume({itemToBeResumed:e.uri})),_||E||(i=s.playButtonFactory().hitPlay({itemToBePlayed:e.uri})),_&&(i=s.playButtonFactory().hitPause({itemToBePaused:e.uri})),i&&v.logInteraction(i),y()}),[y,v,s,e.uri,_,E]),P=(0,b.useCallback)((e=>{r?.(e)}),[r]),L=(0,R.jsx)(Qo.d,{lineClamp:2,children:(0,R.jsx)(Pv.N,{to:e.uri,onClick:k,children:e.name})}),j=(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(Jo.j,{lineClamp:1,paddingBottom:h?"8px":void 0,children:(0,R.jsx)(el.h,{menu:(0,R.jsx)(hC.H,{uri:i}),children:(0,R.jsx)(Pv.N,{to:i,className:eD.subtitleLink,onClick:(D=i,()=>{const e=s.subtitleFactory().hitUiNavigate({destination:D});v.logInteraction(e)}),children:(0,R.jsx)(On.E,{as:"span",variant:"bodySmall",children:t})})})})});var D;const M=(0,R.jsx)("div",{className:eD.imageContainer,children:(0,R.jsx)(ng.b,{className:At()(eD.showImage,{[eD.largeImage]:h}),type:_u.c.EPISODE,size:Uj(m),title:e.name,images:e.coverArt?.sources})}),U=h?"medium":"small",B=(0,Xj.Wx)(e.restrictions,e.playability),F=!(B.isPaywalled&&!B.isUserSubscribed),H=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Qj,{episode:e,isPlaying:_,isActive:E,isFullyPlayed:C,setIsFullyPlayed:x}),(0,R.jsxs)("div",{className:eD.footer,children:[(0,R.jsxs)("div",{className:eD.actions,children:[(0,R.jsx)(ui.b,{onClick:N,uri:e.uri,size:U,className:eD.visibleAction,condensed:!0}),(0,R.jsx)(Wj.e,{className:At()({[eD.visibleAction]:(0,Fj.X)(p)}),onClick:w,uri:e.uri,size:U,canDownload:F,condensed:!0}),(0,R.jsx)(on.r,{spec:s,children:(0,R.jsx)(Ti.b,{menu:(0,R.jsx)(z_.b,{uri:e.uri,onMarkAsPlayed:x,isPlayed:C}),children:(0,R.jsx)(Ws.e,{onClick:P,size:U})})})]}),(0,R.jsx)("div",{className:eD.playButton,children:(0,R.jsx)(xT.R,{"aria-label":"whats-new-feed-play-button",size:"small",onClick:O,isPlaying:_,ariaPlayLabel:A,ariaPauseLabel:T,version:xT.H.secondary})})]})]}),V=(0,R.jsx)(zj.v,{lineClamp:2,paddingBottom:h?"4px":void 0,className:eD.description,children:(0,R.jsx)(On.E,{as:"span",variant:"bodySmall",children:e.description})});return(0,R.jsx)(el.h,{menu:(0,R.jsx)(z_.b,{uri:e.uri,onMarkAsPlayed:x,isPlayed:C}),children:(0,R.jsx)("div",{draggable:g,onDragStart:f,children:(0,R.jsx)($o.v,{size:c,ref:d,className:eD.row,media:M,title:L,subtitle:j,id:e.uri,variant:"naked",body:V,footer:H,onClick:I,hoverBackgroundColor:"backgroundHighlight",layout:h?"wide":"regular",horizontalGap:h?lv.lT:lv.CJ,verticalGap:lv.v4,paddingBlockStart:"16px",paddingBlockEnd:"16px"})})})}function iD({item:e,spec:t}){if("AlbumResponseWrapper"===e.content.__typename){const i=e.content.data;if("Album"===i.__typename)return(0,R.jsx)(Gj,{album:i,spec:t})}if("EpisodeOrChapterResponseWrapper"===e.content.__typename){const i=e.content.data;if("Chapter"===i.__typename)return(0,R.jsx)(R.Fragment,{});if("Episode"===i.__typename){let e="",n="";return"Podcast"===i.podcastV2.data.__typename&&(e=i.podcastV2.data.name,n=i.podcastV2.data.uri),(0,R.jsx)(tD,{episode:i,podcastName:e,podcastUri:n,spec:t,referrerIdentifier:"whats_new_panel",featureIdentifier:"whats_new_panel"})}}return(0,R.jsx)(R.Fragment,{})}const nD="PNAsPBOgLLv9EX8LZ6xL",rD="UjEEhwY497frsytmeR9u",aD="VQ0BLAewv7Aw5H3hV0YK",sD="pxV6pRWzmVb2_leuWtEG",oD="G97bWDW7Mp3aZEL19Umr",lD="p6l0_RUXhei0P7rrQaeg",cD="erd9k4EG_HWK3UzsLhht",uD="ap9brNzQxEcx9SV2FksM",dD="pVVteJIfAdehWU3vX7JR",mD="J_VZoZ53jBtkdyxrt2My",pD="VOGWdrCvz59_A_wAZv58",hD="m8V0BPcmce3GusmXkFhM",gD=b.memo((()=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(AC.Y,{as:"h3",variant:"titleSmall",className:mD,charCount:4,isLoading:!0}),(0,R.jsx)("div",{className:uD,children:[20,50,25].map(((e,t)=>(0,R.jsx)(AC.Y,{as:"div",variant:"bodySmall",className:mD,charCount:e,isLoading:!0},`${e}-${t}`)))})]})));const fD={offset:0,limit:50,onlyUnPlayedItems:!1};const vD={[Jj.tv.Album]:{id:"ALBUM",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.music"),ubiId:"Music",active:!1},[Jj.tv.Episode]:{id:"EPISODE",getName:()=>u.Ru.get("web-player.whats-new-feed.filters.episodes"),ubiId:"Podcast & Shows",active:!1}};function yD(e){switch(e){case Jj.tv.Album:return Jj.tv.Album;case Jj.tv.Episode:return Jj.tv.Episode;case Jj.tv.WhatsNewFeedNotification:return Jj.tv.WhatsNewFeedNotification;case Jj.tv.Unknown:default:return Jj.tv.Unknown}}const bD=({spec:e,items:t})=>{const[i,n]=(0,b.useState)([]),r=e=>{const t=e.state.state;if(!e.state.timestamp?.isoString&&t===Jj.GN.New)return!0;if(e.state.timestamp?.isoString){const t=new Date(e.state.timestamp.isoString).getTime();return Date.now()-t<=36e5}return!1},a=t.findIndex((e=>!r(e))),s=(0,b.useCallback)(((t,i)=>{const n=r(t)&&i<a,s=n&&0===i;return(0,R.jsxs)("div",{className:hD,children:[s&&(0,R.jsx)(On.E,{as:"h3",variant:"titleSmall",className:aD,semanticColor:"textBase",children:u.Ru.get("web-player.whats-new-feed.new-section-title")}),!n&&i===a&&(0,R.jsx)(On.E,{as:"h3",variant:"titleSmall",className:aD,semanticColor:"textBase",children:u.Ru.get("web-player.whats-new-feed.earlier-section-title")}),(0,R.jsx)("hr",{className:pD,"aria-hidden":!0}),(0,R.jsx)(iD,{item:t,spec:e.notificationItemFactory({identifier:t.id,position:i})},t.id)]},t.id)}),[a,e]),o=(0,b.useRef)(0),l=(0,b.useCallback)((()=>{const e=t.slice(o.current,o.current+10);n((t=>(o.current=o.current+10,[...t,...e])))}),[t]),{ref:c,breakpoint:d}=(0,Ef.x)({[bf.E.MEDIUM]:0,[bf.E.LARGE]:600});return(0,R.jsx)(_f.o.Provider,{value:d,children:(0,R.jsx)("div",{className:cD,role:"list",ref:c,children:(0,R.jsx)(j_._,{onReachBottom:l,triggerOnInitialLoad:!0,children:i.map(s)})})})},_D=({includedContentTypes:e,data:t,handleRetry:i,error:n,spec:r,loading:a})=>{if(a)return(0,R.jsxs)("div",{className:sD,role:"list",children:[(0,R.jsx)(gD,{}),(0,R.jsx)(gD,{})]});if(n)return(0,R.jsxs)("div",{className:oD,dir:"auto",children:[(0,R.jsx)(On.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("error.generic")}),(0,R.jsx)(On.E,{as:"p",variant:"bodyMedium",children:u.Ru.get("web-player.whats-new-feed.panel.error")}),(0,R.jsx)(rv.n,{className:lD,onClick:i,size:"small",children:(0,R.jsx)(On.E,{as:"span",variant:"bodyMediumBold",semanticColor:"textBase",children:u.Ru.get("web-player.whats-new-feed.panel.error.button")})})]});const s=t?.whatsNewFeedItems?.items;if(!s||0===s?.length){const{title:t,message:i}=function(e=[]){return e.includes(Jj.tv.Episode)?{title:u.Ru.get("web-player.whats-new-feed.panel.empty-results-podcast.title"),message:u.Ru.get("web-player.whats-new-feed.panel.empty-results-podcast.message")}:e.includes(Jj.tv.Album)?{title:u.Ru.get("web-player.whats-new-feed.panel.empty-results-music.title"),message:u.Ru.get("web-player.whats-new-feed.panel.empty-results-music.message")}:{title:u.Ru.get("web-player.whats-new-feed.panel.empty-results-all.title"),message:u.Ru.get("web-player.whats-new-feed.panel.empty-results-all.message")}}(e);return(0,R.jsx)(kj.p,{title:t,message:i,renderInline:!0})}return(0,R.jsx)(bD,{items:s,spec:r},e.join(" "))},ED=()=>{const e=(0,pt.jE)(),{spec:t,logger:i}=(0,Hi.r)(qg.q,{}),n=(0,b.useCallback)((()=>{const{name:e}=Zg;return[e]}),[]),r=(0,b.useCallback)((()=>{e.invalidateQueries({queryKey:n()})}),[e,n]);(0,b.useEffect)((()=>{i.logImpression(t.impression())}),[i,t]);const[a,s]=(0,b.useState)(vD),o=Object.values(a),l=o.filter((e=>e.active)),c=l.length>0?[]:o,d=l.map((e=>e.id)),m=(0,b.useCallback)((e=>{const t=yD(e),i={id:a[t]?.id||Jj.tv.Unknown,getName:()=>a[t]?.getName()||"",ubiId:a[t]?.ubiId||"",active:!a[t]?.active},n={...vD,...a,[i.id||"UNKNOWN"]:i};s(n)}),[a,s]),p=(0,b.useCallback)((()=>{s(vD)}),[s]),{data:h,error:g,loading:f}=(v={...fD,includedContentTypes:d.map(yD)??[]},y={gcTime:30*Zi.i},(0,Zi.I)(Zg,v,y));var v,y;const{getGraphQLLoader:_}=(0,ve.mv)(),E=_();return(0,b.useEffect)((()=>{if(!h?.whatsNewFeedItems?.items)return;const e=h?.whatsNewFeedItems?.items.filter((e=>e.state.state===Jj.GN.New)).map((e=>({id:e.id,state:Jj.GN.Seen})));e.length>0&&async function(e,t){await e(Qg,{items:t})}(E,{items:e})}),[h?.whatsNewFeedItems?.items,E]),(0,R.jsxs)("section",{className:At()(dD,"contentSpacing"),children:[(0,R.jsxs)("div",{className:nD,children:[(0,R.jsx)(On.E,{as:"h1",semanticColor:"textBase",variant:"titleMedium",className:rD,children:u.Ru.get("web-player.whats-new-feed.panel.title")}),(0,R.jsx)(On.E,{as:"p",semanticColor:"textSubdued",variant:"bodySmall",children:u.Ru.get("web-player.whats-new-feed.panel.subtitle")})]}),!g&&(0,R.jsx)(jj,{availableFilters:c,toggleFilterId:m,selectedFilters:l,resetFilterIds:p,spec:t.filterChipsFactory()}),(0,R.jsx)(_D,{includedContentTypes:d.map(yD),data:h,loading:f,error:g,spec:t,handleRetry:r})]})},CD=()=>Wg()?(0,R.jsx)(ED,{}):(0,R.jsx)(ZP.$,{to:"/"});var xD=i(38161),SD=i(2628),AD=i(95527),TD=i(33304);const ID=(0,b.lazy)((()=>i.e(1845).then(i.bind(i,3003))));var ND=i(98567);const wD=(0,b.lazy)((()=>i.e(1845).then(i.bind(i,3003))));function RD(){const e=(0,oe.zy)(),t=`/${(0,oe.g)()["*"]??""}${e.search}`,i=e.pathname+e.search;return(0,R.jsx)(oe.C5,{to:t===i?`/${e.search}`:t,replace:!0})}var kD=i(70717),OD=i(46177);const PD=b.lazy((()=>Promise.all([i.e(4151),i.e(5962)]).then(i.bind(i,96491)))),LD=b.lazy((()=>Promise.resolve().then(i.bind(i,2431)))),jD=b.lazy((()=>i.e(3890).then(i.bind(i,20341)))),DD=b.lazy((()=>Promise.all([i.e(4151),i.e(6863)]).then(i.bind(i,22022)))),MD=b.lazy((()=>Promise.all([i.e(4151),i.e(9480)]).then(i.bind(i,64617)))),UD=b.lazy((()=>Promise.all([i.e(4151),i.e(9209)]).then(i.bind(i,81788)))),BD=b.lazy((()=>Promise.all([i.e(4151),i.e(7271),i.e(8828)]).then(i.bind(i,16046)))),FD=b.lazy((()=>Promise.all([i.e(4151),i.e(6080)]).then(i.bind(i,50186)))),HD=b.lazy((()=>Promise.all([i.e(4151),i.e(4389)]).then(i.bind(i,15190)))),VD=b.lazy((()=>Promise.all([i.e(4151),i.e(5783)]).then(i.bind(i,83059)))),GD=b.lazy((()=>Promise.all([i.e(4151),i.e(5009),i.e(7125)]).then(i.bind(i,10866)))),zD=b.lazy((()=>Promise.all([i.e(4151),i.e(5009),i.e(2889)]).then(i.bind(i,35029)))),WD=b.lazy((()=>Promise.all([i.e(4151),i.e(7271),i.e(2355)]).then(i.bind(i,48)))),KD=b.lazy((()=>i.e(4496).then(i.bind(i,65204)))),YD=b.lazy((()=>Promise.resolve().then(i.bind(i,5244)))),qD=b.lazy((()=>Promise.resolve().then(i.bind(i,89037)))),ZD=b.lazy((()=>Promise.resolve().then(i.bind(i,1646)))),$D=b.lazy((()=>Promise.all([i.e(4151),i.e(1785)]).then(i.bind(i,66270)))),QD=b.lazy((()=>i.e(6505).then(i.bind(i,54478)))),JD=b.lazy((()=>Promise.all([i.e(4151),i.e(42)]).then(i.bind(i,73341)))),XD=b.lazy((()=>Promise.all([i.e(4151),i.e(42)]).then(i.bind(i,63494)))),eM=b.lazy((()=>i.e(8212).then(i.bind(i,83110)))),tM=b.lazy((()=>Promise.resolve().then(i.bind(i,5100)))),iM=b.lazy((()=>Promise.all([i.e(4151),i.e(3522)]).then(i.bind(i,84429)))),nM=b.lazy((()=>Promise.all([i.e(4151),i.e(7241)]).then(i.bind(i,17738)))),rM=b.lazy((()=>i.e(5572).then(i.bind(i,70935)))),aM=e=>{const{viewId:t=""}=(0,oe.g)();return t===lj.RECENTLY_PLAYED_VIEW_ID?(0,R.jsx)(YD,{...e,showAll:!0}):(0,R.jsx)(nL,{id:t})},sM=()=>{const e=(0,OD.o)();return(0,R.jsxs)(oe.BV,{children:[(0,R.jsx)(oe.qh,{path:"tracks",element:(0,R.jsx)(qP.e,{pageId:fI.$h.COLLECTION_SONGS,children:(0,R.jsx)(BD,{})})}),(0,R.jsx)(oe.qh,{path:"episodes",element:(0,R.jsx)(qP.e,{pageId:fI.$h.COLLECTION_PODCASTS_EPISODES,children:(0,R.jsx)(FD,{})})}),(0,R.jsx)(oe.qh,{path:"your-episodes",element:(0,R.jsx)(qP.e,{pageId:fI.$h.COLLECTION_PODCASTS_EPISODES,children:(0,R.jsx)(FD,{})})}),e.canFetchAllTracks&&(0,R.jsx)(oe.qh,{path:"local-files",element:(0,R.jsx)(qP.e,{pageId:fI.$h.LOCALFILES,children:(0,R.jsx)(HD,{})})}),(0,R.jsx)(oe.qh,{path:"/*",element:(0,R.jsx)(ZP.$,{to:"/collection/tracks"})})]})},oM=e=>{const{playlistId:t}=(0,oe.g)();return(0,b.createElement)(WD,{...e,key:t})},lM=e=>{const{artistId:t}=(0,oe.g)();return(0,b.createElement)(LD,{...e,key:t})},cM=e=>{const{albumId:t}=(0,oe.g)();return(0,b.createElement)(PD,{...e,key:t})},uM=e=>{const{showId:t}=(0,oe.g)();return(0,b.createElement)(qD,{...e,key:t})},dM=()=>{const e=(0,oe.zy)();(0,WL.k)();const t=(0,g.d4)((e=>e.features.enableShows)),{isDesktop:i,isBrowser:n}=(0,g.d4)((e=>e.platform)),{isAnonymous:r,productState:a}=(0,g.d4)(Rc.Ht),o="premium"===a?.product,l=!(0,Ym.n)();(0,SD.K)();const{allEpisodeAdsRoute:c}={allEpisodeAdsRoute:(0,R.jsx)(oe.qh,{path:(0,AD.c)(TD.ob),element:(0,R.jsx)(ID,{surface:VP.ui.PODCAST_SEE_ALL})},"all-episode-ads")},{allShowAdsRoute:u}={allShowAdsRoute:(0,R.jsx)(oe.qh,{path:(0,ND.q)(TD.yA),element:(0,R.jsx)(wD,{surface:VP.ui.PODCAST_SEE_ALL})},"all-show-ads")},d=(({isDesktop:e,isPremium:t,isOffline:i})=>{const n=(0,_x.W)({type:"locale",uri:"home"});return[(0,R.jsxs)(oe.qh,{path:"/",element:(0,R.jsx)(qP.e,{navigationalRoot:LL.g.HOME,pageId:fI.$h.HOME,entityUri:"spotify:app:home",children:(0,R.jsx)(zL,{isDesktop:e,isPremium:t,isOffline:i})}),children:[(0,R.jsx)(oe.qh,{path:"/home",element:(0,R.jsx)(OL,{})},"home-subfeed"),(0,R.jsx)(oe.qh,{index:!0,element:(0,R.jsx)(GL,{isDesktop:e,isPremium:t,isOffline:i})})]},"home"),n?jL.NW.map((n=>(0,R.jsx)(oe.qh,{path:`/${jL.CT}${n}`,element:(0,R.jsx)(qP.e,{navigationalRoot:LL.g.HOME,pageId:fI.$h.HOME,entityUri:"spotify:app:home",children:(0,R.jsx)(VL,{isDesktop:e,isPremium:t,isOffline:i})})},"home-i18n"))):null,(0,R.jsx)(oe.qh,{path:"/section/:sectionId",element:(0,R.jsx)(qP.e,{pageId:fI.$h.HOME_DRILLDOWN,children:(0,R.jsx)(HL,{})})},"home-section")]})({isDesktop:i,isPremium:o,isOffline:l}),m=(0,RA.N7)(),p=(0,R.jsx)(oe.qh,{path:KL,element:(0,R.jsx)(YL,{})},KL),h=[(0,R.jsx)(oe.qh,{path:"/cultural-moment/hub/:id",element:(0,R.jsx)(qP.e,{pageId:fI.$h.CULTURALMOMENTSHUB,children:(0,R.jsx)(sL,{})})},"cultural-moment-hub")],f=JP(),v=oj(),y=(0,R.jsx)(oe.qh,{path:"/content-feed",element:(0,R.jsx)(CD,{})}),b=(0,ij.usePremiumRoutes)(),_=wj(),E=XP(),C=(0,KP.r)(),x=(0,s.NC)(Ce.DKh),S=!(0,sf.g)(),A=(0,s.NC)(Ce.W04);return(0,R.jsxs)(oe.BV,{children:[(0,R.jsx)(oe.qh,{path:"/user/:userId/collection/your-episodes",element:(0,R.jsx)(ZP.$,{to:"/collection/episodes"})}),(0,R.jsx)(oe.qh,{path:"/user/:userId/collection/album/:albumId",element:(0,R.jsx)(ZP.$,{to:"/album/:albumId"})}),(0,R.jsx)(oe.qh,{path:"/user/:userId/collection/artist/:artistId",element:(0,R.jsx)(ZP.$,{to:"/artist/:artistId/saved"})}),(0,R.jsx)(oe.qh,{path:"/user/:userId/playlist/:playlistId",element:(0,R.jsx)(ZP.$,{to:"/playlist/:playlistId"})}),(0,R.jsx)(oe.qh,{path:"/browse/genres",element:(0,R.jsx)(ZP.$,{to:"/genre/hub-browse-grid"})}),(0,R.jsx)(oe.qh,{path:"/browse/newreleases",element:(0,R.jsx)(ZP.$,{to:"/genre/new-releases-page"})}),(0,R.jsx)(oe.qh,{path:"/browse/discover",element:(0,R.jsx)(ZP.$,{to:"/genre/discover-page"})}),(0,R.jsx)(oe.qh,{path:"/browse/charts",element:(0,R.jsx)(ZP.$,{to:"/genre/browse-charts-tab"})}),(0,R.jsx)(oe.qh,{path:"/browse/featured",element:(0,R.jsx)(ZP.$,{to:"/"})}),(0,R.jsx)(oe.qh,{path:"/browse",element:(0,R.jsx)(ZP.$,{to:"/"})}),(0,R.jsx)(oe.qh,{path:`/playlist/${xD.i}`,element:(0,R.jsx)(ZP.$,{to:"/collection/episodes"})}),kD.BG.map((e=>(0,R.jsx)(oe.qh,{path:e,element:(0,R.jsx)(ZP.$,{to:kD.yf})},e))),(0,R.jsx)(oe.qh,{path:"/internal/recs/playlist/:playlistId",element:(0,R.jsx)(ZP.$,{to:"/playlist/:playlistId"})}),(0,R.jsx)(oe.qh,{path:"/settings",element:(0,R.jsx)(ZP.$,{to:"/"})}),r?[(0,R.jsx)(oe.qh,{path:"/collection/*",element:(0,R.jsx)(ZP.$,{to:"/"})},"collection-redirect")]:[(0,R.jsx)(oe.qh,{path:"/collection",element:(0,R.jsx)(ZP.$,{to:"/collection/tracks"})},"collection-redirect")],d,m,p,h,f,E,v,y,b,_,(0,R.jsx)(oe.qh,{path:"/user/:userId/collection",element:(0,R.jsx)(ZP.$,{to:{search:e.search,pathname:"/collection/tracks"}})}),(0,R.jsx)(oe.qh,{path:"/search/*",element:(0,R.jsx)(qP.e,{navigationalRoot:LL.g.SEARCH,children:(0,R.jsx)(GD,{})})}),(0,R.jsx)(oe.qh,{path:"/recent-searches",element:(0,R.jsx)(qP.e,{navigationalRoot:LL.g.SEARCH,pageId:fI.$h.SEARCH_RECENT,children:(0,R.jsx)(zD,{})})}),(0,R.jsx)(oe.qh,{path:"/collection/*",element:(0,R.jsx)(qP.e,{children:(0,R.jsx)(sM,{})})}),(0,R.jsx)(oe.qh,{path:"/artist/:artistId/*",element:(0,R.jsx)(qP.e,{children:(0,R.jsx)(lM,{})})}),(0,R.jsx)(oe.qh,{path:"/album/:albumId/*",element:(0,R.jsx)(qP.e,{pageId:fI.$h.ALBUM,children:(0,R.jsx)(cM,{})})}),(0,R.jsx)(oe.qh,{path:"/playlist-format/:title",element:(0,R.jsx)(qP.e,{children:(0,R.jsx)(tj,{isAnonymous:r})})}),(0,R.jsx)(oe.qh,{path:"/playlist-format/:title/:category",element:(0,R.jsx)(qP.e,{children:(0,R.jsx)(tj,{isAnonymous:r})})}),(0,R.jsx)(oe.qh,{path:"/track/:trackId/*",element:(0,R.jsx)(qP.e,{pageId:fI.$h.TRACK,children:n?(0,R.jsx)(DD,{}):(0,R.jsx)(jD,{})})}),(0,R.jsx)(oe.qh,{path:"/playlist/:playlistId/see-all-ads",element:(0,R.jsx)(WP,{})}),(0,R.jsx)(oe.qh,{path:"/playlist/:playlistId/*",element:(0,R.jsx)(qP.e,{pageId:fI.$h.PLAYLIST,children:(0,R.jsx)(oM,{})})}),(0,R.jsx)(oe.qh,{path:"/user/:username/folder/:folderId",element:(0,R.jsx)(ZP.$,{to:"/"})}),(0,R.jsx)(oe.qh,{path:"/folder/:folderId/*",element:(0,R.jsx)(ZP.$,{to:"/"})}),(0,R.jsx)(oe.qh,{path:"/user/:userId/*",element:(0,R.jsx)(qP.e,{children:(0,R.jsx)(MD,{})})}),(0,R.jsx)(oe.qh,{path:"/genre/corona_news_podcasts",element:(0,R.jsx)(ZP.$,{to:"/genre/corona_news_podcasts-page"})}),(0,R.jsx)(oe.qh,{path:"/genre/:viewId",element:(0,R.jsx)(qP.e,{pageId:fI.$h.GENRE,children:(0,R.jsx)(aM,{})})}),(0,R.jsx)(oe.qh,{path:"/view/:viewId",element:(0,R.jsx)(qP.e,{pageId:fI.$h.HOME_DRILLDOWN,children:(0,R.jsx)(aM,{})})}),(0,R.jsx)(oe.qh,{path:"/concerts-page",element:(0,R.jsx)(ZP.$,{to:"/concerts"})}),(0,R.jsx)(oe.qh,{path:"/concerts/location/:location",element:(0,R.jsx)(qP.e,{pageId:fI.$h.CONCERTS,children:(0,R.jsx)(VD,{})})}),(0,R.jsx)(oe.qh,{path:"/concerts",element:(0,R.jsx)(qP.e,{pageId:fI.$h.CONCERTS,children:(0,R.jsx)(VD,{})})}),(0,R.jsx)(oe.qh,{path:"/concert/:concertId",element:(0,R.jsx)(qP.e,{pageId:fI.$h.CONCERTS_CONCERT,children:(0,R.jsx)(UD,{})})}),x&&(0,R.jsx)(oe.qh,{path:"/venue/:venueId",element:(0,R.jsx)(qP.e,{pageId:fI.$h.VENUE,children:(0,R.jsx)(nM,{})})}),S&&false,(0,R.jsx)(oe.qh,{path:"/lyrics",element:(0,R.jsx)(qP.e,{pageId:fI.$h.LYRICS,children:(0,R.jsx)(QD,{format:"fullscreen"})})}),(0,R.jsx)(oe.qh,{path:"/preferences",element:(0,R.jsx)(qP.e,{pageId:fI.$h.SETTINGS,navigationalRoot:LL.g.SETTINGS,children:(0,R.jsx)($D,{})})}),(0,R.jsx)(oe.qh,{path:"/premium",element:(0,R.jsx)(qP.e,{pageId:fI.$h.PREMIUM,entityUri:"spotify:app:premium",children:(0,R.jsx)(tM,{})})}),(0,R.jsx)(oe.qh,{path:"/radio/:entity/:id",element:(0,R.jsx)(ZP.$,{to:"/:entity/:id"})}),(0,R.jsx)(oe.qh,{path:"/station/:entity/:id",element:(0,R.jsx)(ZP.$,{to:"/:entity/:id"})}),(0,R.jsx)(oe.qh,{path:"/new/playlist",element:(0,R.jsx)(qP.e,{children:(0,R.jsx)(KD,{})})}),(0,R.jsx)(oe.qh,{path:"/blend/taste-match/:invitationId",element:(0,R.jsx)(qP.e,{pageId:fI.$h.BLEND_TASTE_MATCH,children:(0,R.jsx)(JD,{})})}),(0,R.jsx)(oe.qh,{path:"/blend/invitation",element:(0,R.jsx)(qP.e,{pageId:fI.$h.BLEND_INVITATION,children:(0,R.jsx)(XD,{})})}),(0,R.jsx)(oe.qh,{path:"/_pong",element:(0,R.jsx)(eM,{})}),(0,R.jsx)(oe.qh,{path:"/blend/invitation-page",element:(0,R.jsx)(qP.e,{pageId:fI.$h.BLEND_INVITATION,children:(0,R.jsx)(XD,{})})}),A&&(0,R.jsx)(oe.qh,{path:"/prerelease-radar",element:(0,R.jsx)(rM,{})}),(0,R.jsx)(oe.qh,{path:"/blend/ci/:playlistId",element:(0,R.jsx)(ZP.$,{to:"/playlist/:playlistId"})}),(0,R.jsx)(oe.qh,{path:"/__noul__",element:(0,R.jsx)(RD,{})}),(0,R.jsx)(oe.qh,{path:"/__noul__/*",element:(0,R.jsx)(RD,{})}),t?[(0,R.jsx)(oe.qh,{path:"/browse/podcasts",element:(0,R.jsx)(ZP.$,{to:"/genre/podcasts-web"})},"podcasts"),u,(0,R.jsx)(oe.qh,{path:TD.e2,element:(0,R.jsx)(uM,{})},TD.e2),(0,R.jsx)(oe.qh,{path:"/show/:showId/more-like-this",element:n?(0,R.jsx)(cj.ShowMoreLikeThis,{}):(0,R.jsx)(ZP.$,{to:"/"})},"more-like-this-shows"),(0,R.jsx)(oe.qh,{path:"/episode/:episodeId/more-like-this",element:C?(0,R.jsx)(oL.EpisodeMoreLikeThis,{}):(0,R.jsx)(ZP.$,{to:"/"})},"more-like-this-episodes"),c,(0,R.jsx)(oe.qh,{path:TD.Ch,element:(0,R.jsx)(ZD,{})},"episode")]:[(0,R.jsx)(oe.qh,{path:"/browse/podcasts",element:(0,R.jsx)(ZP.$,{to:"/"})},"podcasts"),(0,R.jsx)(oe.qh,{path:"/show/*",element:(0,R.jsx)(ZP.$,{to:"/"})},"show"),(0,R.jsx)(oe.qh,{path:"/episode/*",element:(0,R.jsx)(ZP.$,{to:"/"})},"episode")],jL.NW.map((e=>((e,t)=>[(0,R.jsx)(oe.qh,{path:`/${jL.CT}${t}/track/:trackId`,element:(0,R.jsx)(qP.e,{pageId:fI.$h.TRACK,children:e?(0,R.jsx)(DD,{}):(0,R.jsx)(jD,{})})},"locale_track"),(0,R.jsx)(oe.qh,{path:`/${jL.CT}${t}/artist/:artistId/*`,element:(0,R.jsx)(qP.e,{children:(0,R.jsx)(lM,{})})},"locale_artist"),(0,R.jsx)(oe.qh,{path:`/${jL.CT}${t}/album/:albumId`,element:(0,R.jsx)(qP.e,{pageId:fI.$h.ALBUM,children:(0,R.jsx)(PD,{})})},"locale_album"),(0,R.jsx)(oe.qh,{path:`/${jL.CT}${t}/premium`,element:(0,R.jsx)(qP.e,{pageId:fI.$h.PREMIUM,entityUri:"spotify:app:premium",children:(0,R.jsx)(tM,{})})},"locale_premium")])(n,e))),(0,R.jsx)(oe.qh,{path:"/debug/locales",element:(0,R.jsx)("div",{children:(0,R.jsx)(iM,{})})}),!1]})},mM=(0,b.memo)((function(){return(0,R.jsx)(FP,{children:(0,R.jsx)(b.Suspense,{fallback:(0,R.jsx)(Ct.A,{hasError:!1,errorMessage:"",loadOffline:(0,F.Ek)()}),children:(0,R.jsx)(dM,{})})})}));var pM=i(31225),hM=i(82946),gM=i(53255);const fM=({registry:e,children:t})=>{const i=(0,b.useContext)(hM.N);return null!==i&&(e=(0,gM.I)([e,i])),(0,R.jsx)(hM.N.Provider,{value:e,children:t})};var vM=i(90590);const yM=({store:e,platform:t})=>{const i=[(0,R.jsx)(dm.IF,{}),(0,R.jsx)(pM.G,{}),(0,R.jsx)(nt.GM,{}),(0,R.jsx)(h.vd,{}),(0,R.jsx)(Et,{platform:t}),(0,R.jsx)(ut.xy,{}),(0,R.jsx)(L.wI,{}),(0,R.jsx)(pe.Pj,{}),(0,R.jsx)(it.nI,{}),(0,R.jsx)(f.SF,{}),(0,R.jsx)(v.id,{}),(0,R.jsx)(vM.k7,{}),(0,R.jsx)(lt.o,{}),(0,R.jsx)(st,{}),(0,R.jsx)(Dy.yd,{})];return(0,R.jsx)(ct,{history:t.getHistory(),children:(0,R.jsx)(y.s,{onError:e=>(0,om.Jy)(e,"App"),FallbackComponent:P,children:(0,R.jsx)(g.Kq,{store:e,children:(0,R.jsx)(fM,{registry:t.getRegistry(),children:(0,R.jsxs)(tt,{platform:t,children:[(0,R.jsx)(ue,{eventSender:t.getEventSender()}),(0,R.jsxs)(Be,{providers:i,children:[(0,R.jsx)(J,{}),(0,R.jsx)(M,{}),(0,R.jsx)(mM,{})]})]})})})})})},bM={pop:"POP",push:"PUSH",replace:"REPLACE"};function _M(e,t){return{canGoBack:e>0,canGoForward:e<t.length-1}}var EM=i(15596),CM=i(17818);var xM=i(50719);const SM=e=>{window?.performance?.mark&&e&&window.performance.mark(e)},AM=(e,t,i)=>window?.performance?.measure&&window?.performance?.getEntriesByName&&e&&t&&i?(window.performance.measure(i,e,t),window.performance.getEntriesByName(i)):[],TM={version:"1.1.64.510",date:new Date(2021,6,20)};function IM(){if((0,F.My)()!==fm.m.Desktop)return!0;const e=function(){const e=window.navigator.userAgent.match(F.aS);return e?.groups?.version??null}();if(!e)return!0;const t=function(e){const t=TM.version.split(".")[2],[,i,n]=e.split(".");if("1"!==i)return new Date;const r=parseInt(t,10),a=parseInt(n,10);if(isNaN(a))return new Date;const s=a-r,o=new Date(TM.date.getTime());return o.setDate(o.getDate()+14*s),o}(e);return i=t,((new Date).getTime()-i.getTime())<0;var i}var NM=i(80553);i(83407),i(28835),i(31052),i(68413),i(78604);i(93760);i(58570),i(75343);i(93843),i(96887);i(85411),i(1696);i(77814);var wM=i(65495);wM.e;vg.I_;i(97277);new RegExp(String.raw`hm://collection/([^/]*)/[^/]*/json`);i(35743);i(5095);var RM=i(52118);i(20754),i(38389),i(13596);RM.W;var kM=i(24153);i(80521);kM.XO;i(72702),i(68353),i(71909),i(14964);var OM=i(41447);i(43433),i(55462);var PM=i(14864);var LM=i(92838);const jM="playback";let DM=null;i(35583),i(94961),i(43425),i(67403);new RegExp(String.raw`^q[0-9]+$`);i(55109);H.JW;i(96766),i(5277),i(61358);i(64642),i(47769);_u.c.UNKNOWN,_u.c.ALBUM,_u.c.ARTIST;i(43039);i(45678);i(96590);i(19303),i(61323),i(68246);i(84473);i(86324);i(39062),i(41687),i(18928);var MM=i(3631);i(83527),i(52925);var UM=i(93874);UM.w;i(10999),i(67154),i(91028);fs.a;fs.a;i(97638),i(6643),i(36406),i(63169);new qi.l("isCurated","query","e4ed1f91a2cc5415befedb85acf8671dc1a4bf3ca1a5b945a6386101a22e28a6",null);var BM=i(33627);i(25558),i(14035);BM.s;BM.s;i(69357);new qi.l("applyCurations","mutation","05b739a3a73091c213385233b9d3ed8a857c2ca29d2eebadb3d04ed12e288697",null),new qi.l("editablePlaylists","query","acb5390f2929bdcad4c6afe1c08bdbe09375f50fdb29d75244f67e9aee77ebc4",null);var FM=i(70583);i(52471),i(5103);i(45695),i(33655),i(22360),i(72645),i(19829);var HM=i(52732),VM=(i(90265),i(9111));new RegExp(String.raw`hm://collection/(collection|listenlater|show|artist)/.+/json`);VM.w;VM.w;i(4479);new qi.l("addToLibrary","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null),new qi.l("removeFromLibrary","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null),new qi.l("pinLibraryItem","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null),new qi.l("unpinLibraryItem","mutation","a3c1ff58e6a36fec5fe1e3a193dc95d9071d96b9ba53c5ba9c1494fb1ee73915",null);new qi.l("fetchLibraryAlbums","query","f6cdd87d7fc8598e4e7500fbacd4f661b0c4aea382fe28540aeb4cb7ea4d76c8",null),new qi.l("fetchLibraryArtists","query","f6cdd87d7fc8598e4e7500fbacd4f661b0c4aea382fe28540aeb4cb7ea4d76c8",null),new qi.l("fetchLibraryTracks","query","f6cdd87d7fc8598e4e7500fbacd4f661b0c4aea382fe28540aeb4cb7ea4d76c8",null),new qi.l("fetchLibraryShows","query","f6cdd87d7fc8598e4e7500fbacd4f661b0c4aea382fe28540aeb4cb7ea4d76c8",null),new qi.l("fetchLibraryAudiobooks","query","f6cdd87d7fc8598e4e7500fbacd4f661b0c4aea382fe28540aeb4cb7ea4d76c8",null),new qi.l("fetchLibraryEpisodes","query","f6cdd87d7fc8598e4e7500fbacd4f661b0c4aea382fe28540aeb4cb7ea4d76c8",null),new qi.l("libraryV3","query","e25e473b160efdd4ababa7d98aa909ce0e5ab9c49c81f6d040da077a09e34ab3",null);i(58646);i(4055),i(49669);i(70812);new Set(["Writable"]);i(54443),i(85793);i(8035),i(4323);i(84773);new qi.l("areEntitiesInLibrary","query","6ec3f767111e1f88a68058560f961161679d2cd4805ff3b8cb4b25c83ccbd6e0",null);const GM={items:[],totalLength:0,unfilteredTotalLength:0,offset:0,limit:0};new Set([_u.c.TRACK,_u.c.ALBUM,_u.c.ARTIST,_u.c.SHOW,_u.c.EPISODE,_u.c.AUDIOBOOK]);i(48168),i(58127);i(50879);var zM=i(80359),WM=i(49062);i(40523);var KM=i(25828),YM=function(e){return e.UNSPECIFIED="UNSPECIFIED",e.REQUESTED="REQUESTED",e.PENDING="PENDING",e.DOWNLOADING="DOWNLOADING",e.DOWNLOADED="DOWNLOADED",e.FAILURE="FAILURE",e}(YM||{});(0,KM.g)(YM);var qM=i(52359);i(98320),i(91815);var ZM=i(51135);i(13526),i(4868),i(88756),i(70763);new qi.l("addToPlaylist","mutation","47c69e71df79e3c80e4af7e7a9a727d82565bb20ae20dc820d6bc6f94def482d",null),new qi.l("removeFromPlaylist","mutation","47c69e71df79e3c80e4af7e7a9a727d82565bb20ae20dc820d6bc6f94def482d",null),new qi.l("moveItemsInPlaylist","mutation","47c69e71df79e3c80e4af7e7a9a727d82565bb20ae20dc820d6bc6f94def482d",null);var $M=i(66787);new RegExp(String.raw`hm://playlist/v2/playlist/(?<base62Id>.+)`);$M.N;i(92482);i(21632),i(39302),i(20633);new qi.l("fetchPlaylist","query","76849d094f1ac9870ac9dbd5731bde5dc228264574b5f5d8cbc8f5a8f2f26116",null),new qi.l("fetchPlaylistMetadata","query","76849d094f1ac9870ac9dbd5731bde5dc228264574b5f5d8cbc8f5a8f2f26116",null),new qi.l("fetchPlaylistContents","query","76849d094f1ac9870ac9dbd5731bde5dc228264574b5f5d8cbc8f5a8f2f26116",null);var QM=i(31965),JM=i(14217),XM=i(47327);i(55090),i(70672),i(49943);i(33718),i(75612),i(40814),i(27090);var eU=i(79425);new RegExp(String.raw`hm://playlist/v2/user/.+/rootlist`),new RegExp(String.raw`hm://playlist/v2/playlist/.+`);eU.D;i(39692);i(11981);new Uint8Array;i(1288);new qi.l("accountAttributes","query","4fbd57be3c6ec2157adcc5b8573ec571f61412de23bbb798d8f6a156b7d34cdf",null);i(48839),i(85386);var tU=i(9714);new qi.l("fetchEntitiesForRecentlyPlayed","query","8e4eb5eafa2837eca337dc11321ac285a01f9a056a7ac83f77a66f9998b06a73",null);tU.K5;var iU=i(66768),nU=i(26238),rU=i(57321);(0,nU.Tw)(rU.pn).addMiddleware(rU.m4).addMiddleware(iU.li).addMiddleware(rU.If).addMiddleware(rU.u0);i(19703);new qi.l("queryShowAccessInfo","query","74d14af2761a0be5676474e9bc44ff369022b63312ebe769fa85e63a840dc799",null),new qi.l("queryShowMetadataV2","query","5fb034a236a3e8301e9eca0e23def3341ed66c891ea2d4fea374c091dc4b4a6a",null),new qi.l("queryBookChapters","query","9879e364e7cee8e656be5f003ac7956b45c5cc7dea1fd3c8039e6b5b2e1f40b4",null),new qi.l("getEpisodeOrChapter","query","9697538fe993af785c10725a40bb9265a20b998ccd2383bd6f586e01303824e9",null),new qi.l("queryPodcastEpisodes","query","108deda91e2701403d95dc39bdade6741c2331be85737b804a00de22cc0acabf",null);i(99927),i(57526),i(54196);i(8811);var aU=i(32411);i(47342),i(29711),i(72665);new qi.l("centralisedStatePlayerOptions","query","e2dcfcab470854d4d1c7cb1a851438f14fe0a94d57db7f0b9dde492559d5395d",null),aU.j.OFF,PM.jb.OFF,aU.j.ON,PM.jb.ON,aU.j.SMART_SHUFFLE,PM.jb.SMART;i(6351),i(26887),i(80707),i(85192);i(91648);i(31463);new qi.l("smartShuffle","query","3384085be84fbf2f855b024f99bc06cded1c0fd71af3a8fb8abb84e9656faba2",null);var sU=i(92491);i(36174),i(59777),i(38691),i(92017),i(84369),i(67911);i(92232),i(48500),i(73781),i(66824),i(15405);i(52895),i(72531),i(23429),i(48523);new qi.l("profileAttributes","query","53bcb064f6cd18c23f752bc324a791194d20df612d8e1239c735144ab0399ced",null);function oU(e){return e.container===fm.m.Desktop}var lU=i(72537);var cU=i(6193),uU=i(3074),dU=i.n(uU);function mU(){return dU().create().hex.replace(/-/g,"").substr(0,16)}const pU=(e,t)=>{const i=e.url.searchParams.get("dlsi")??mU(),n=navigator.userAgent,r={link:e.url.toString(),entity_uri:e.uri.toURI(),source:n,deeplink_session_id:i};t.send((0,cU.N)(r))},hU=e=>e.searchParams.has("si")||"1"===e.searchParams.get("go")||"1"===e.searchParams.get("wta_deep_link"),gU=e=>hU(e);function fU(e){const t=function(e){const t="https://open.spotify.com/",i="spotify://";return e.startsWith(i)?e.replace(i,t):e.startsWith("spotify:")?(e.replaceAll(":","/"),e.replace("spotify/",t)):e}(e),i=(0,ne.o_)(t,{parseUnknown:!0});if(!i)return null;const n=function(e){try{return new URL(e).search}catch{return""}}(t),r=new URLSearchParams(n),a=new URL(i.toURL());return r.forEach(((e,t)=>{a.searchParams.set(t,e)})),{url:a,uri:i}}async function vU(e,t){const{uri:i,url:n}=t,r=n.searchParams.get("pt"),a=n.searchParams.get("prid"),s=i.toString();if(r){const t=e.resolve(QM.Ki);e.resolve(JM.O).claimPermissions(s,r),await t.resync(s)}a&&await async function(e,t,i){await e.build().withHost(vg.p1).withMethod("POST").withPath(`/shared?playlistId=${t}&sharedEntityUri=${i}`).withEndpointIdentifier("/shared").withoutMarket().withResponseType("text").send()}(fg.n.getInstance(),s,a)}var yU=i(333),bU=i(16976),_U=i(49100);const EU="SET_AUDIO_AD_INFO",CU=e=>({type:EU,info:e});var xU=i(6021);function SU(e,t){return t?{enableAudioIfNotAlreadyEnabled(){if(!t.getEnabled())return t.enable((t=>e.dispatch(CU(t))))},disableAudioIfNotAlreadyDisabled(){if(t.getEnabled())return t.disable()}}:{}}function AU(e,t,i){const n=t.getEvents();return F.Ek()&&n.addListener(LM._.VOLUME,(({data:{volume:e,isLocal:t}})=>{t&&xU.Q.logAudioVolume(e)})),t=>{const{enableAudioIfNotAlreadyEnabled:n,disableAudioIfNotAlreadyDisabled:r}=SU(t,e);return t=>async a=>{const s=t(a);switch(a.type){case Jr.QN.ADS_ENABLED:n?.();break;case Jr.QN.ADS_DISABLED:r?.();break;case Jr.QN.LOG_NOW_PLAYING_AD_CLICK:(0,md.qc)(i.getState())&&e.logClick(a.eventReason,a.eventSource)}return s}}}const TU=(e,t,i)=>n=>r=>async a=>{const s=r(a);switch(a.type){case Jr.QN.ADS_ENABLED:{const r={create:e=>{n.dispatch((0,mn.PS)(e))},canShow:()=>{const e=i.getState();return!("/"===t.location.pathname)&&!(0,Qi.A3)(e)&&!(0,md.Qv)(e)},isActive:()=>n.getState().ads.billboard.isOpen,minimize:()=>{n.dispatch((0,mn.lb)())},destroy:()=>(n.dispatch((0,mn.c3)()),Promise.resolve())};await e.enable(r);break}case Jr.QN.ADS_DISABLED:await e.disable();break;case mn.QN.MINIMIZE_BILLBOARD_AD_VIEW:if(n.getState().ads.sponsoredPlaylist.isVisible)return n.dispatch((0,mn.c3)()),Promise.resolve();e.minimize();break;case mn.QN.CLICK_BILLBOARD_AD_VIEW:e.adClick();break;case mn.QN.IMAGE_LOADED_BILLBOARD_AD_VIEW:e.onRender();break;case mn.QN.ERROR_BILLBOARD_AD_VIEW:e.onError();break;case mn.QN.FINISH_BILLBOARD_AD_VIEW:e.onFinish()}return s};var IU=i(12862),NU=i(46189),wU=i(27834);const RU=e=>t=>i=>async n=>{const r=i(n),a=t.getState();switch(n.type){case NU.QN.HPTO_CONTAINER_LOAD:e.subscribeToPreview((e=>{t.dispatch((0,NU.DZ)(e)),t.dispatch((0,NU.zi)())})),e.onRefresh((async()=>{const i=await e.fetchTemplate();t.dispatch((0,NU.bK)(i)),t.dispatch((0,NU.Yg)())}));break;case IU.R:t.dispatch((0,NU.bK)(n.template)),t.dispatch((0,NU.Yg)());break;case NU.QN.HPTO_CONTAINER_MOUNTED:{const i=await e.fetchTemplate();t.dispatch((0,NU.bK)(i)),t.dispatch((0,NU.Yg)());break}case NU.QN.FETCH_CREATIVE:if(a.ads.hpto.preview)break;if(a.ads.hpto.creativeFetchingState===wU.C.FETCHING)break;if(!a.ads.hpto.template)break;if(!a.ads.hpto.hptoContainerMounted)break;if(a.ads.root.isPremium&&a.ads.root.isHptoHidden)break;try{t.dispatch((0,NU.QL)()),await e.fetchCreative(a.ads.hpto.template).then((e=>{t.dispatch((0,NU.Q5)(e))}))}catch(e){console.error(e),t.dispatch((0,NU.Fi)())}break;case NU.t3:e.viewRendered(n.element);break;case NU.QN.HPTO_COMPONENT_NEW_AD_RENDERED:e.logViewed();break;case NU.QN.HPTO_COMPONENT_UNMOUNTED:e.viewDestroyed();break;case Jr.QN.ADS_POST_HIDE_HPTO:e.logEvent("event_collapsed");break;case NU.Q6:e.logEvent(n.event,n.context);break;case NU.$4:e.logErrorEvent(n.error);break;case NU.QN.DEBUG_FORCE_REFRESH_HPTO:{const i=await e.fetchTemplate();t.dispatch((0,NU.bK)(i)),t.dispatch((0,NU.Yg)());break}}return r};function kU(e){return t=>t=>async i=>{const n=t(i);switch(i.type){case Jr.QN.ADS_ENABLED:break;case Jr.QN.ADS_DISABLED:case Nn:e.disableLeaderboard();break;case An:e.setLeaderboardElement(i.element),e.enableLeaderboard();break;case Tn:e.onNavigationChanged()}return n}}var OU=i(29519);function PU(e){return t=>i=>async n=>{const r=i(n);switch(n.type){case Jr.QN.ADS_ENABLED:e.enable((e=>{t.dispatch((0,OU.Lc)(e))}));break;case Jr.QN.ADS_DISABLED:e.disable();break;case OU.Uy:try{const i=await e.requestSponsoredPlaylists();t.dispatch((0,OU.lj)(i))}catch(e){t.dispatch((0,OU.Ei)(e instanceof Error?e:new Error("Unknown error object")))}break;case OU.nk:try{const i=n.playlistUri,r=await e.requestSponsoredPlaylistAd(i);t.dispatch((0,OU.DD)(i,r))}catch(e){t.dispatch((0,OU.wz)(e instanceof Error?e:new Error("Unknown error object")))}break;case OU.zB:e.logEvent(n.message);break;case OU.zc:t.dispatch((0,OU.Lc)(null))}return r}}const LU=(e,t)=>{if(!(null===e?.ads?.vto?.info)&&t&&!t.isPaused){const e=document.getElementsByClassName("VideoPlayer__container")[0];if(e){const t=e.getElementsByTagName("video")[0];t&&t.play&&t.play()}}},jU=(e,t)=>{e.getState().ads.vto.isMinimized||(e.dispatch((0,Kn.Oc)()),t.logEvent(Zn.ee.COLLAPSED))};function DU(e,t,i){return i?{enableVideoTakeoverIfNotAlreadyEnabled(){if(i.getEnabled())return;const n={onCreated(){e.dispatch((0,Kn.Pu)())},onInfo(t){e.dispatch((0,Kn.gW)(t))},onFirstReady(){LU(e.getState(),t.getState())},onStarted(){},onEnded:()=>{e.dispatch((0,Kn.gW)(null)),e.dispatch((0,Kn.W_)())}};return i.enable(n)},disableVideoTakeoverIfNotAlreadyDisabled(){if(i.getEnabled())return i.disable()}}:{}}const MU=(e,t)=>i=>{const{enableVideoTakeoverIfNotAlreadyEnabled:n,disableVideoTakeoverIfNotAlreadyDisabled:r}=DU(i,t,e);return a=>async s=>{const o=a(s);switch(s.type){case Jr.QN.ADS_ENABLED:await(n?.());break;case Jr.QN.ADS_DISABLED:await(r?.());break;case Kn.QN.VTO_LOG_EVENT:e.logEvent(s.event,s.eventReason,s.eventSource),s.event===Zn.ee.CLICKED&&jU(i,e);break;case Jr.QN.LOG_NOW_PLAYING_AD_CLICK:(0,md.Tv)(t.getState())&&(e.logEvent(Zn.ee.CLICKED,s.eventReason,s.eventSource),jU(i,e));break;case Kn.QN.VTO_NAVIGATION_CHANGE:jU(i,e);break;case Kn.QN.MAXIMIZE_VIDEO_AD_VIEW:case Kn.QN.MINIMIZE_VIDEO_AD_VIEW:LU(i.getState(),t.getState())}return o}},UU="ui.hide_hpto";class BU{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=UU;return this.prefs.sub({key:t},(({entries:i})=>e({[t]:!!i[t].bool})))}async hideHpto(){const e=UU;await this.prefs.set({entries:{[e]:{bool:!0}}})}}class FU{requestPreviewAd(){return Promise.resolve({})}subscribeToAdsProductState(){return{cancel:()=>{}}}subscribeToPremiumState(){return{cancel:()=>{}}}subscribeToHpto(){return{cancel:()=>{}}}async hideHpto(){}fakeSubscribe(e,t){e(t)}}const HU={subscription:void 0};function VU(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 GU=({store:e,adManagers:t,isDesktop:i,playerAPI:n})=>({adsEnabled:r=e.getState().ads.root.adsEnabled,playerState:a=n.getState(),isPodcastContent:s=VU(a)}={})=>{r!==e.getState().ads.root.adsEnabled&&e.dispatch((r?Jr.s3:Jr.Nb)());const{enableVideoTakeoverIfNotAlreadyEnabled:o,disableVideoTakeoverIfNotAlreadyDisabled:l}=DU(e,n,t?.vto.manager),{enableAudioIfNotAlreadyEnabled:c,disableAudioIfNotAlreadyDisabled:u}=SU(e,t?.audio);return Promise.all(i&&(s||r)?[o?.(),c?.()]:[l?.(),u?.()])};var zU=i(75713),WU=i(10308);const KU=({history:e,blockedPaths:t,rootApi:i,adManagers:n,isDesktop:r,playerAPI:a})=>s=>{const{handleAdsProductState:o,activateAdsProductStateSubscription:l}=function({rootApi:e,store:t,adManagers:i,isDesktop:n,playerAPI:r,toggleAdManagers:a=GU({store:t,adManagers:i,isDesktop:n,playerAPI:r})}){async function s({playerState:e=r.getState(),isPodcastContent:t=VU(e)}={}){return await a({playerState:e,isPodcastContent:t}),function(...[{ads:i}]){return a({adsEnabled:"1"===i,playerState:e,isPodcastContent:t})}}let o=VU(r.getState());return{handleAdsProductState:s,activateAdsProductStateSubscription:async function(t){const i=VU(t);return null===t||o!==i?(o=i,HU.subscription?.cancel(),HU.subscription=e.subscribeToAdsProductState(await s({playerState:t,isPodcastContent:i}))):HU.subscription}}}({rootApi:i,store:s,adManagers:n,isDesktop:r,playerAPI:a});return a.getEvents().addListener(H.gd.UPDATE,(async({data:e})=>{await l(e)})),n=>async r=>{switch(r.type){case WU.xM:await l(null);break;case zU.O:i.fakeSubscribe(await o(),r.data)}const c=n(r),u=s.getState();if(!u.ads.root.adsEnabled)return c;const d=u.platform.isDesktop,m=d&&u.ads.billboard.isOpen,p=u.ads.sponsoredPlaylist.isVisible,h=t.includes(e.location.pathname),g=u.ads.leaderboard.isEnabled,f=(0,U.c)(u)===B.K.cinema;switch(h||(0,md.Qv)(a.getState())?(m&&s.dispatch((0,mn.ZQ)()),g&&s.dispatch(wn())):!d||g||m||p||f||s.dispatch({type:In}),r.type){case Tr.kX.SET_VIDEO_UI_FLAG:{const{key:e,value:t}=r;e===B.n.cinema&&t&&s.dispatch(wn());break}case mn.QN.SHOW_BILLBOARD_AD_VIEW:s.dispatch(wn());break;case OU.Xv:s.dispatch(wn()),s.dispatch((0,mn.ZQ)());break;case NU.QN.HPTO_PREVIEW_HOME_NAVIGATION:"/"===e.location.pathname||e.push("/");break}return c}};var YU=i(99629);let qU,ZU;const $U=({rootApi:e})=>t=>i=>async n=>{const r=i(n);switch(n.type){case WU.xM:(0,F.My)()===fm.m.Desktop&&(0,YU.zI)({_debugForceRefreshHpto:()=>t.dispatch((0,NU.BH)()),overrideSponsoredPlaylistEndpoint:()=>t.dispatch((0,OU.uU)())}),qU||(qU=e.subscribeToPremiumState((({catalogue:e})=>{const i="premium"===e;t.dispatch((0,Jr.CW)(i))}))),ZU||(ZU=e.subscribeToHpto((e=>t.dispatch((0,Jr.yx)(e["ui.hide_hpto"])))));break;case Jr.QN.ADS_POST_HIDE_HPTO:e.hideHpto();break;case zU.O:e.fakeSubscribe((async({catalogue:e})=>{const i="premium"===e;t.dispatch((0,Jr.CW)(i)),t.dispatch((0,Jr.yx)(!1))}),n.data);break;case Jr.QN.TRIGGER_PREVIEW_AD:e.requestPreviewAd(n.adUriHexId)}return r};var QU=i(62683);const JU=(e,t,i,n,r,a)=>{const s=e?new BU(xU.Q,(0,_U.dn)((0,QU.X)())):new FU,o=e?["/","/premium"]:[],{root:l=$U,sponsoredPlaylist:c=PU,orchestrator:u=KU,leaderboard:d=kU,billboard:m=TU,hpto:p=RU,audio:h=AU,videoTakeover:g=MU}=a??{};return[l({rootApi:s}),c(i.sponsoredPlaylist),u({history:t,blockedPaths:o,rootApi:s,adManagers:i,isDesktop:e,playerAPI:r}),...e?[d(i.leaderboard),m(i.billboard,t,r),p(i.hpto),h(i.audio,n,r),g(i.vto.manager,r)]:[]]},XU={info:null},eB=(e=XU,t)=>t.type===EU?{...e,info:t.info}:e,tB={isOpen:!1,imageLoaded:!1,isMinimized:!1,data:{}},iB=(e=tB,t)=>{switch(t.type){case mn.QN.SHOW_BILLBOARD_AD_VIEW:return{...e,isOpen:!0,data:t?.data};case mn.QN.HIDE_BILLBOARD_AD_VIEW:return{...e,isOpen:!1,isMinimized:!1,imageLoaded:!1};case mn.QN.IMAGE_LOADED_BILLBOARD_AD_VIEW:return{...e,imageLoaded:!0};case mn.QN.MANAGER_MINIMIZE_BILLBOARD_AD_VIEW:case mn.QN.MINIMIZE_BILLBOARD_AD_VIEW:return{...e,isMinimized:!0};default:return e}},nB={hptoEnabled:!1,template:null,creative:null,preview:null,creativeFetchingState:wU.C.NOT_FETCHING,hptoContainerMounted:!1,hptoIsStable:!0},rB=(e=nB,t)=>{switch(t.type){case Jr.QN.ADS_ENABLED:return{...e,hptoEnabled:!0};case IU.R:case NU.QN.HPTO_CONTAINER_MOUNTED:return{...e,hptoContainerMounted:!0};case NU.QN.HPTO_COMPONENT_UNMOUNTED:return{...e,preview:null,creativeFetchingState:wU.C.NOT_FETCHING,creative:t.data.clearCreative?null:e.creative};case NU.QN.HPTO_CONTAINER_UNMOUNTED:return{...e,hptoContainerMounted:!1};case NU.QN.GOT_TEMPLATE:return{...e,template:t.data};case NU.QN.SET_HPTO_PREVIEW:return{...e,hptoIsStable:!0,preview:t.data};case NU.QN.GOT_CREATIVE:return{...e,creative:t.data,creativeFetchingState:wU.C.FETCHED,hptoIsStable:!0};case NU.QN.FETCHING_CREATIVE:return{...e,creativeFetchingState:wU.C.FETCHING,creative:null};case NU.QN.CREATIVE_FETCH_FAILED:return{...e,creativeFetchingState:wU.C.FAILED,hptoIsStable:!1};default:return e}},aB={isEnabled:!1};function sB(e=aB,t){switch(t.type){case In:return{...e,isEnabled:!0};case Nn:return{...e,isEnabled:!1};default:return e}}const oB={sponsoredPlaylist:new Map,isVisible:!1,previewAd:null};function lB(e=oB,t){switch(t.type){case OU.Um:return function(e,t){return{...e,sponsoredPlaylist:e.sponsoredPlaylist.set("allSponsorships",t.sponsorships)}}(e,t);case OU.Rl:return function(e,t){return{...e,sponsoredPlaylist:e.sponsoredPlaylist.set(t.playlistUri,t.ad)}}(e,t);case OU.Xv:return{...e,isVisible:!0};case OU.zc:return{...e,isVisible:!1};case OU.Uh:return{...e,previewAd:t.previewAd};default:return e}}const cB={isMinimized:!1,isHidden:!0,info:null},uB=(e=cB,t)=>{switch(t.type){case Kn.QN.MINIMIZE_VIDEO_AD_VIEW:return{...e,isMinimized:!0};case Kn.QN.MAXIMIZE_VIDEO_AD_VIEW:return{...e,isMinimized:!1};case Kn.QN.HIDE_VIDEO_AD_VIEW:return{...e,isHidden:!0};case Kn.QN.SHOW_VIDEO_AD_VIEW:return{...e,isHidden:!1};case Kn.QN.VTO_SET_INFO:return{...e,info:t.info};default:return e}};var dB=i(30296),mB=i(55784);const pB=(0,dB.vy)({adId:null,liked:!1,disliked:!1,feedback:null},(e=>{e.addCase(mB.CJ.LIKE_AD,((e,t)=>{mB.F$.match(t)&&(e.adId=t.payload.adId,e.liked=!0,e.disliked=!1,t.payload.reason&&(e.feedback=t.payload.reason))})).addCase(mB.CJ.DISLIKE_AD,((e,t)=>{mB.NI.match(t)&&(e.adId=t.payload.adId,e.disliked=!0,e.liked=!1,t.payload.reason&&(e.feedback=t.payload.reason))})).addCase(mB.CJ.CANCEL_LIKE_AD,((e,t)=>{mB.D$.match(t)&&(e.liked=!1,e.feedback=null)})).addCase(mB.CJ.CANCEL_DISLIKE_AD,((e,t)=>{mB.vA.match(t)&&(e.disliked=!1,e.feedback=null)}))})),hB={adsEnabled:!1,isPremium:!1,isHptoHidden:!0},gB=(e=hB,t)=>{switch(t.type){case Jr.QN.ADS_ENABLED:return{...e,adsEnabled:!0};case Jr.QN.ADS_DISABLED:return{...e,adsEnabled:!1};case Jr.QN.ADS_PREMIUM:return{...e,isPremium:!!t.isPremium};case Jr.QN.ADS_HPTO_HIDDEN:return{...e,isHptoHidden:!!t.isHptoHidden};default:return e}};var fB=i(25700);const vB={env:fB.x,message:null,showPreviewTool:!1},yB=(e=vB,t)=>{switch(t.type){case fB.Q.SHOW_IN_APP_MESSAGE:return{...e,message:t.message};case fB.Q.DISMISS_IN_APP_MESSAGE:return{...e,message:null};case fB.Q.SET_IN_APP_MESSAGING_ENV:return{...e,env:t.env};case fB.Q.SHOW_PREVIEW_TOOL:return{...e,showPreviewTool:t.show};default:return e}};var bB=i(53851);const _B=e=>t=>i=>async n=>{const r=i(n);if(n.type===bB.QN.GET_AGE_RESTRICTION_MODAL)try{const i=await e.getDialog(n.uri);t.dispatch((0,bB.eK)(i))}catch{}return r},EB=e=>t=>i=>{const n=t(i);switch(i.type){case WU.xM:bt((()=>e.dispatch({type:WU.tQ})));break;case WU.tQ:(r=fg.n.getInstance(),r.build().withHost(vg.Go).withHostIdentifier("https://open.spotify.com").withPath("/logout").withoutMarket().withoutAuthorization().withEndpointIdentifier("/logout").send()).then((()=>{e.dispatch((0,Sh.oM)()),window.location.assign("/")}),((e,t=!1)=>i=>(console.error(i),e&&e(i),t?Promise.reject(i):Promise.resolve(void 0)))())}var r;return n};var CB=i(55569),xB=i.n(CB),SB=i(14115),AB=i(22614);const TB="urn:x-cast:com.spotify.chromecast.secure.v1";let IB=!1;const NB=()=>window.cast?.framework.CastContext.getInstance(),wB=e=>xB()(e),RB=(e,t)=>{e.send((0,SB.F)(t))},kB=(e,t,i)=>{const n=NB();n&&(n.setOptions({receiverApplicationId:"CC32E753",autoJoinPolicy:"page_scoped",androidReceiverCompatible:i}),e.dispatch(pl(n.getCastState())),n.addEventListener(window.cast?.framework.CastContextEventType.CAST_STATE_CHANGED,(({castState:t})=>e.dispatch(pl(t)))),n.addEventListener(window.cast?.framework.CastContextEventType.SESSION_STATE_CHANGED,(({sessionState:i,session:n})=>{if(i===window.cast?.framework.SessionState.SESSION_STARTING)RB(t,{step:"transfer_requested"});else if(i===window.cast?.framework.SessionState.SESSION_STARTED){let i=null;n?.getCastDevice()?.friendlyName&&(i=wB(n.getCastDevice().friendlyName)),e.dispatch({type:dl,deviceId:i}),RB(t,{step:"receiver_app_started"})}})))},OB=async(e,t,i,n)=>{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,i)=>{const n={tokenType:"accesstoken",blob:t.accessToken};e.sendMessage(TB,{type:"addUser",payload:n}),RB(i,{step:"message_from_sender"})})(i,JSON.parse(r.body),n)},PB=(e,t,i)=>{const n=NB().getCurrentSession();if(null===n)return;n.addMessageListener(TB,((r,a)=>{const s=JSON.parse(a);RB(i,{step:"message_from_receiver"});try{if("getInfoResponse"===s.type){const t=s.payload;OB(t.deviceID,e,n,i)}else if("addUserResponse"===s.type){const e=s.payload;t.dispatch((0,wp.VR)(e.deviceId))}else if(s.type.endsWith("Error"))throw new Error(s.payload.status)}catch(e){console.error("Failed to transfer playback to Cast device!",e)}})),((e,t)=>{const i=e.getCastDevice(),n={remoteName:i.friendlyName,deviceID:wB(i.friendlyName),deviceAPI_isGroup:i.capabilities.includes(chrome?.cast?.Capability.MULTIZONE_GROUP)};e.sendMessage(TB,{type:"getInfo",payload:n}),RB(t,{step:"message_from_sender"})})(n,i)},LB=(e,t,{deviceInfo:i})=>{if(i&&i.is_active&&(0,AB.M)(i.type)){const n=NB()?.getCastState()===window.cast?.framework.CastState.CONNECTED,r=e.getState().playback?.connectingCastDeviceId;n&&i.id===r&&(RB(t,{step:"transfer_finished"}),e.dispatch({type:ml}))}};function jB(e,t,i){return n=>r=>a=>{switch(a.type){case WU.xM:((e,t,i)=>{if(!window.cast){window.__onGCastApiAvailable=n=>{n&&!IB&&(kB(e,t,i),IB=!0)};const n=document.createElement("script");n.async=!0,n.src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",document.body.appendChild(n)}})(n,t,i);break;case ul:(()=>{const e=NB();e&&e.requestSession()})();break;case cl:((e,t,i,{castState:n})=>{n===window.cast?.framework.CastState.CONNECTED&&PB(e,t,i)})(e,n,t,a);break;case wp.gK.DEVICE_INFO_CHANGED:LB(n,t,a)}return r(a)}}var DB=i(45942);const MB=e=>t=>i=>async n=>{const r=i(n);switch(n.type){case Jc.QN.CHECK_DUPLICATE_TRACKS:{const{playlistUri:i,uris:r,position:s={after:"end"}}=n;try{const{name:n}=await e.getMetadata(i),o=await e.getContents(i);let l=[...r];if((0,ne._T)(r[0])){const e=(0,HM.lY)(fg.n.getInstance()),{trackUris:t}=await(0,CI.s)(r[0],0,e);l=t}const c=o.items.map((e=>e?.uri)),{duplicates:u,newUris:d}=(a=c,l.reduce(((e,t)=>{const i=a.includes(t);return{duplicates:i?[...e.duplicates,t]:e.duplicates,newUris:i?e.newUris:[...e.newUris,t]}}),{duplicates:[],newUris:[]}));0===u.length?e.add(i,l,s):1===l.length?t.dispatch((0,Jc.xM)({playlistName:n,playlistUri:i,uri:l[0],position:s})):t.dispatch((0,Jc.xM)({playlistName:n,playlistUri:i,uris:l,newUris:d,position:s}))}catch(t){e.add(i,r,s),window.console.error(t)}break}}var a;return r},UB=(e,t=!0)=>i=>n=>r=>{const a=n(r),{type:s}=r;if(t&&s===$p.g.LOG_INTERACTION){const{session:t}=i.getState(),{isAnonymous:n}=t,a=n?(0,Cp.o)(r.logData):(0,Ep.x)(r.logData);e.send(a)}return a},BB=()=>e=>t=>{const i=e(t);if(t.type===$p.g.LOG_INTERACTION){const{logData:e}=t;(0,le.$)(e.action_type,e.action_intent,e.item_id)}return i};var FB=i(14693),HB=i(37116),VB=i(83388);let GB=null,zB=!1;let WB,KB=[],YB=[];const qB=e=>{try{(0,VB.fE)({metric_type:FB.MetricTypes.COUNTER,what:"harmony-error",value:1,tags:{type:e}})}catch(e){}},ZB=(e,t)=>(WB=function(){if(null===DM)throw new Error("Missing `instance`. Have you called `createHarmony` yet?");return DM}(),WB.on(PM.bi.LOCAL_PLAYER_ENABLED,(()=>{const e=(()=>{try{const e=localStorage.getItem(jM);if(null===e)return null;const{volume:t}=JSON.parse(e);return t||null}catch(e){return null}})();null!==e&&WB.setVolume(e,"@local");try{SM("playback_load_end");const e=AM("playback_load_start","playback_load_end","time_to_playback_ready"),[{duration:t}={duration:void 0}]=e;t&&(0,VB.fE)({metric_type:FB.MetricTypes.TIMER,what:"playback-ready",value:FB.Time.fromMillis(t).asNanos()}).catch((()=>({})))}catch(e){}})),WB.on(PM.bi.AUTHENTICATION_ERROR,(()=>{qB(PM.bi.AUTHENTICATION_ERROR)})),WB.on(PM.bi.UNRECOVERABLE_FAILURE,(({data:t})=>{const i=t.error.message||"";if(navigator.userAgent.indexOf("Edge")>-1)e.dispatch(wp.tS()),(0,om.UD)(t.error),qB(wp.gK.CDM_ERROR);else if(t.source===PM.O4.PLAYBACK){const n=t.name||t.error?.name||t.error?.code||"unknown";e.dispatch(wp.CZ(n,t.source,i))}qB(PM.bi.UNRECOVERABLE_FAILURE)})),WB.on(PM.bi.ERROR,(({data:t})=>{if(t.error.code===PM.Hv.EME_LICENSE_REQUEST_WIDEVINE_ERROR&&e.dispatch(p.rN()),t.error.code===PM.Hv.MEDIA_DECODING_ERROR&&!zB){const i="media_decoding_error",n=t.source,r=t.error.message||"";e.dispatch(wp.CZ(i,n,r))}const i=t.name||t.error?.name||t.error?.code||"unknown";qB(i)})),WB.on(PM.bi.PLAYER_INITIALIZATION_DONE,(()=>{t.triggerActions(),e.dispatch((0,HB.H2)())})),WB.on(PM.bi.PLAYER_INITIALIZATION_FAILED,(({data:t})=>{if(!navigator.webdriver&&(qB(wp.gK.CDM_ERROR),t.error)){if(t.error.message&&t.error.message.indexOf("0x80004005")>=0)return;e.dispatch(wp.tS()),(0,om.UD)(t.error)}})),WB.on(PM.bi.MAX_SUBSCRIPTIONS_REACHED,(({data:t})=>{e.dispatch(wp.fj(t.source??"unknown")),qB(PM.bi.MAX_SUBSCRIPTIONS_REACHED)})),WB.on(PM.bi.PRODUCT_STATE_CHANGED,(()=>{})),WB.on(PM.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===KB.length)try{SM("playback_load_update"),KB=AM("playback_load_start","playback_load_update","time_to_playback_fetched");const[{duration:e}={duration:void 0}]=KB;e&&(0,VB.fE)({metric_type:FB.MetricTypes.TIMER,what:"playback-fetched",value:FB.Time.fromMillis(e).asNanos()}).catch((()=>({})))}catch(e){}!e.data.state?.paused&&YB.length})),WB.on(PM.bi.LAST_ACTIVE_DEVICE_INFO_CHANGED,(t=>{const i=t.data.deviceInfo;i&&e.dispatch(wp.rD(i))})),WB.on(PM.bi.PROGRESS,(()=>{zB=!0})),WB),$B=(e,t)=>{const i=e.getState(),{isAnonymous:n}=(0,Rc.Ht)(i);return n?null:ZB(e,t)};var QB=i(47173);const JB="STORE_SEARCH",XB="SEARCH_HISTORY_CLEAR_DATA";var eF=i(13623);const tF=()=>e=>t=>{if(t.type===XB)localStorage.removeItem(eF.C);return e(t)};var iF=i(83172);const nF=()=>e=>t=>async i=>{const n=t(i);if(i.type===iF.gK.REQUEST_SEO_EXPERIMENT_DATA)try{const t=await(r=fg.n.getInstance(),a=`/${(0,ne.o_)(i.uri).toURLPath()}`,r.build().withHost(vg.Go).withHostIdentifier("https://open.spotify.com").withPath("/seo").withQueryParameters({entityURL:a}).withoutMarket().withoutAuthorization().withEndpointIdentifier("/seo").send());e.dispatch((0,iF.Jz)(t?.body))}catch(t){e.dispatch((0,iF.jG)())}var r,a;return n},rF=e=>()=>t=>i=>{const n=t(i);if(i.type===WU.tQ)e(i);return n};function aF(e){return t=>i=>n=>{const r=i(n);switch(n.type){case WU.tQ:{e.finalFlush(),t.dispatch((0,wp.MW)()),t.dispatch({type:XB});const i=document.getElementById("session");i&&i.remove();break}}return r}}let sF=!1;const oF=(e,t)=>{const i=e.getEvents();return e=>(i.addListener(H.gd.ACTION,(i=>{const n=e.getState(),r=BP(),a=null!==r&&!1===r?.seen;sF||i.data.action!==H.Ik.PLAY||(sF=!0,a&&(sF=!0,function(e){const t=encodeURIComponent(JSON.stringify({seen:e})),i=BP();null!==i&&i.seen===e||(0,ft.n0)({name:jP,days:30,domain:".spotify.com",value:t})}(!0),t.send(MP(n.session.isAnonymous,{country:n.session.userCountry,os:(0,Kp.f)()})),e.dispatch((0,p.mi)())))})),e=>t=>e(t))},lF=()=>e=>t=>{const i=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 i};var cF=i(93561);var uF=i(91543);const dF={isOpen:!1},mF=(e=dF,t)=>{switch(t.type){case uF.QN.SHOW_ABOUT_RECS_MODAL:return{...e,isOpen:!0};case uF.QN.HIDE_ABOUT_RECS_MODAL:return{...e,isOpen:!1};default:return e}};var pF=i(54316);const hF={isOpen:!1},gF=(e=hF,t)=>{switch(t.type){case pF.QN.SHOW_ABOUT_SPOTIFY_MODAL:return{...e,isOpen:!0};case pF.QN.HIDE_ABOUT_SPOTIFY_MODAL:return{...e,isOpen:!1};default:return e}},fF={isOpen:!1,uri:"",dialog:void 0},vF=(e=fF,t)=>{switch(t.type){case bB.QN.SHOW_AGE_RESTRICTION_MODAL:return{...e,isOpen:!0,dialog:t.dialog};case bB.QN.GET_AGE_RESTRICTION_MODAL:return{...e,uri:t.uri};case bB.QN.HIDE_AGE_RESTRICTION_MODAL:return{...e,isOpen:!1};default:return e}},yF={isOpen:!1,playlistUri:void 0,uri:void 0,uris:void 0,position:void 0,playlistName:void 0,newUris:void 0},bF=(e=yF,t)=>{switch(t.type){case Jc.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 Jc.QN.HIDE_DUPLICATE_TRACKS_DIALOG:return{...e,isOpen:!1};default:return e}},_F={ads:!1},EF=(e,t)=>(t.type,e||_F);var CF=i(22807);const xF={isOpen:!1},SF=(e=xF,t)=>{switch(t.type){case CF.QN.SHOW_LICENSES_MODAL:return{...e,isOpen:!0};case CF.QN.HIDE_LICENSES_MODAL:return{...e,isOpen:!1};default:return e}},AF=e=>{const t=(0,F.My)();return{isBrowser:t===fm.m.Web,isPWA:t===fm.m.PWA,isDesktop:t===fm.m.Desktop,shouldCalloutPWA:(0,F.wD)(),isDeveloperMode:e.isDeveloperMode,isVideoSupported:e.isVideoSupported}},TF=e=>(t=AF(e),i)=>i.type===d?AF(e):t,IF={device:null,castState:"NO_DEVICES_AVAILABLE",connectingCastDeviceId:null},NF=(e,t)=>{const i=t.deviceInfo;return i&&isNaN(i.volume)&&(i.volume=0),{...e,device:i}},wF=(e,t)=>({...e,castState:t.castState}),RF=(e,t)=>({...e,connectingCastDeviceId:t.deviceId}),kF=e=>({...e,connectingCastDeviceId:null}),OF=e=>(localStorage.removeItem(jM),{...e}),PF=(()=>{const e={[wp.gK.DEVICE_INFO_CHANGED]:NF,[wp.gK.PLAYBACK_CLEAR_DATA]:OF,[cl]:wF,[dl]:RF,[ml]:kF};return(t,i)=>{let n=null;return i.type in e&&(n=e[i.type](n||t,i)),n||t||IF}})(),LF="searchHistory",jF={contexts:(()=>{const e=localStorage.getItem(LF);return e?JSON.parse(e).filter((e=>"uri"in e)):[]})()},DF=(e=jF,t)=>{switch(t.type){case JB:{const i=t.uri?((e,t,i,n)=>[{uri:e,name:t,image:i}].concat(n.filter((t=>t.uri!==e))).splice(0,4))(t.uri,t.name,t.image,e.contexts):e.contexts;try{localStorage.setItem(LF,JSON.stringify(i))}catch(e){}return{...e,contexts:i}}case XB:return localStorage.removeItem(LF),{...e,contexts:[]};default:return e}},MF={},UF=(e=MF,t)=>{switch(t.type){case iF.gK.REQUEST_SEO_EXPERIMENT_DATA:return{...e,uri:t.uri};case iF.gK.SET_SEO_EXPERIMENT_DATA:return{...e,...t.data};default:return e}},BF={isAnonymous:!0,accessToken:"",accessTokenExpirationTimestampMs:0,user:null,locale:Ol.h.en,productState:null,market:"",valid:!1,overrides:null};function FF(e=BF,t){switch(t.type){case zU.J:return{...e,user:t.data};case zU.O:return{...e,productState:t.data};case WU.ro:return{...e,accessToken:t.authData.accessToken,accessTokenExpirationTimestampMs:t.authData.accessTokenExpirationTimestampMs,isAnonymous:t.authData.isAnonymous,valid:!0};case WU.Zz:return e.user?{...e,user:{...e.user,display_name:t.name}}:e;case WU.L0:return e.user?{...e,user:{...e.user,images:t.images}}:e;case WU.Vx:return{...e,overrides:{...e.overrides,country:t.country}};case WU.dD:return{...e,overrides:{...e.overrides,locale:t.locale}};default:return e}}const HF=e=>!(e.type===HB.l_.PLAY||e.type===HB.l_.PLAYING),VF=e=>!(e.type===HB.l_.PLAY||e.type===HB.l_.USER_INVESTMENT),GF=e=>t=>i=>n=>{const r=i(n);switch(n.type){case HB.Jf:{const{storeAction:t,actionIntent:i}=n;e.storeAction((e=>((e,t)=>{const{type:i}=t;switch(i){case HB.l_.PLAY:return[t];case HB.l_.PLAYING:return[...e.filter(HF),t];case HB.l_.USER_INVESTMENT:return[...e.filter(VF),t];default:return[t]}})(e,{storeAction:t,type:i})));break}case HB.f6:{const i=e.pullAction()||null;t.dispatch({type:"PLAY_AT_FIRST_TAP_HAD_DEFERRED_ACTIONS",had:!!i&&i.length>0}),i&&i.forEach((({storeAction:e})=>{t.dispatch(e)}));break}}return r},zF=e=>{return(0,yU.HY)({playback:PF,session:FF,ui:(0,lp.JQ)(e),searchHistory:DF,features:EF,duplicateTracks:bF,ageRestriction:vF,platform:TF(e),ads:(t=e.container,(0,yU.HY)({sponsoredPlaylist:lB,leaderboard:sB,root:gB,adFeedback:pB,...t===fm.m.Desktop?{billboard:iB,hpto:rB,vto:uB,audio:eB}:{}})),inAppMessaging:yB,aboutRecs:mF,seoExperiment:UF,...e.container===fm.m.Desktop&&{aboutSpotify:gF,licenses:SF}});var t},WF=yU.Zz,KF=(e,t)=>{const{session:i,features:n}=e,{actionStoreApi:r,adManagers:a,ageRestrictionApi:s,deferredAction:o,eventSender:l,followApi:c,history:u,libraryApi:d,offlineApi:m,platform:h,playbackApi:g,playerApi:f,playlistApi:v,rootlistApi:y,serviceWorkerMessenger:b,socialConnectApi:_,transport:E}=t,C=oU(h),x=[];C?x.push((e=>()=>t=>i=>{const n=t(i);return i.type===WU.tQ&&e.finalFlush().finally(DB.r),n})(l)):(i?.isAnonymous||x.push((e=>t=>i=>n=>{const r=i(n),a=t.getState(),s=a.session;if(n.type in wp.gK){const{hasOccurred:e,isOpen:i}=t.getState().ui.playbackNotSupportedErrorDialog;if(e&&!i)return t.dispatch(p.rN()),r}switch(n.type){case WU.xM:!GB&&s.accessToken&&(GB=$B(t,e),t.getState().features&&t.getState().features.mwp&&window.addEventListener("focus",(()=>{GB&&GB._controller&&!GB._controller._state?GB=$B(t,e):GB?.getCurrentState().then((i=>{i||(GB=$B(t,e))}))})));break;case wp.gK.SET_ACTIVE_DEVICE:a.playback.device&&a.playback.device.id===n.id||GB?.transfer(n.id)}return r})(r)),x.push(EB),x.push(jB(E,l,h.enableCastConnect)));const S="boolean"!=typeof n?.isInteractionLoggerEnabled||n.isInteractionLoggerEnabled;return[(0,Op.oU)(f,d,y,c,r),(T=m,e=>(T.getEvents().addListener(WM.I.ERROR,(t=>{t.data.code===rI.O4.DEVICE_LIMIT_REACHED&&e.dispatch((0,p.j4)())})),e=>async t=>{e(t)})),(A=u.push,e=>t=>i=>{const{pathname:n,search:r,hash:a}=window.location,{dispatch:s}=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(i.type){case c:A({pathname:n,search:r,state:{},hash:se});break;case u:A({pathname:n,search:r,state:{},hash:""});break;case d:(0,ae.GP)(o)&&!l.test(a)&&s((0,p.BU)())}return t(i)}),GF(o),...x,...JU(C,u,a,g,f),rF(b),_B(s),MB(v),aF(l),lF,(0,QB.f0)(u,f,_),tF,UB(l,S),BB,oF(f,l),nF(),e=>t=>i=>{const n=window.location?new URLSearchParams(window.location.search):void 0;return n&&"1"===n.get(cF.P.YourSoundCapsule)&&e.dispatch(lp.XL.actions.open()),t(i)},bU.A];var A,T};class YF{constructor(e){this.spotifyTransport=e}async getDialog(e){const t=await((e,t)=>e.build().withMethod("GET").withHost(vg.d).withPath(`/dialog/${t}`).withEndpointIdentifier("/dialog/${uri}").withoutMarket().send())(this.spotifyTransport,e),{r:i,g:n,b:r}=this.getColorRGB(t.body.color);return{backgroundColor:`rgb(${i}, ${n}, ${r})`,providerUrl:t.body.provider_url}}getColorRGB(e){return{r:e>>>16&255,g:e>>>8&255,b:e>>>0&255}}}const qF=(e,t)=>{let i=[];return{storeAction:n=>{i=n(i),e.setItem(t,JSON.stringify(i))},pullAction:()=>{const n=e.getItem(t);if(e.removeItem(t),i=[],n)try{return JSON.parse(n)}catch(e){return null}return null}}};var ZF=i(27564);function $F(e){return(new TextEncoder).encode(e)}const QF=async function(e){const t=$F(e),i=await globalThis.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(i)).map((e=>e.toString(16).padStart(2,"0"))).join("")};class JF{static encode=$F;static hash=QF}var XF=i(47728);const eH=e=>{const t=e.pathname.split("/"),i=t.pop(),n=t.pop();if(n&&i)return(0,ne.o_)(`spotify:${n}:${i}`)?.toURI()};var tH=i(3367);const iH=[{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"}],nH=(e="")=>{const t=iH.find((({regExp:t})=>t.test(e)));return t?.pageIdentifier??"unknown"};i(6487);async function rH(e,t,i){if(null===e||null===t)return;const r=await JF.hash(e.username);var a;(0,n.PN)((e=>{(0,F.My)()===fm.m.Desktop&&e.setUser({id:r}),e.setTag("product",t.product)})),i.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:i})=>({url:e,width:t||null,height:i||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:zU.J,data:a})),i.dispatch(function(e){return{type:zU.O,data:e}}(t))}SM("playback_load_start"),(0,o.Cd)(),async function(){if(IM()){const e=.001,t=[];let i=0;0;const n="xpui_2024-07-12_1720793068427_242057a";(0,om.ig)("https://de32132fc06e4b28965ecf25332c3a25@o22381.ingest.sentry.io/114855",n,{sampleRate:e,tracesSampleRate:i},{},void 0,t)}const e=await async function(){const e=(0,F.My)();return(0,NM._)(e)}(),t=e.getRegistry(),i=e.getSession(),h=e.getHistory(),g=e.getFeatureFlags(),f=e.getSEOExperiments(),v=t.resolve(YR.ud);(0,n.PN)((t=>{Object.keys(g).forEach((e=>{t.setExtra(e,g[e])})),e.container&&t.setTag("container",e.container)})),Yw.M.setup(),(0,EM.O)(e.container,e.operatingSystem);const b=e.getEventSender();v.getEvents().addListener("message",(e=>{e.data.type===GR.W.NAVIGATION&&async function(e,t){if(!t)return;const i=fU(t);if(!i)return;const{url:n}=i;if(gU(n)){const t=e.resolve(OM.KM);pU(i,t)}await vU(e,i);const r=`${n.pathname}${n.search}`;e.resolve(OM.Fi).push(r,{referrer:"deeplink"})}(t,e.data.data)})),(0,ZF.X)()&&!g.mwp&&(window.location.href="https://www.spotify.com");const{gtmId:_,market:E,locale:C,userCountry:x}=(0,Kw.C)("config"),S=oU(e),A=e.getTransport(),T=await e.getServiceWorkerMessenger(),I=Spicetify.Platform.ReduxStore=t.resolve(CM.JD),N=t.resolve(xM.t),w=t.resolve(FM.Ho),k=t.resolve(zM.v),O=t.resolve(qM.B),L=t.resolve(ZM.H),j=t.resolve(QM.Ki),D=t.resolve(XM.Yi),M=t.resolve(sU.j),U=t.resolve(MM.T),B=function(e,t){const{platform:i}=t,n=KF(e,t);return(0,yU.y$)(zF(i),e,WF((0,yU.Tw)(...n)))}({session:i,features:g,seoExperiment:f},{platform:e,history:h,playbackApi:O,playerApi:L,rootlistApi:D,playlistApi:j,followApi:N,libraryApi:w,actionStoreApi:I,serviceWorkerMessenger:T,offlineApi:k,transport:A,eventSender:b,adManagers:e.getAdManagers(),deferredAction:qF(sessionStorage,"ANONYMOUS_DEFERRED_ACTION_KEY"),ageRestrictionApi:new YF(fg.n.getInstance()),socialConnectApi:M});A.on(c.TransportEvent.ACCESS_TOKEN,(async()=>{const e=await U.getToken({preferCached:!0});null!==e&&(fg.n.setSession(e),B.dispatch((0,Sh.a7)(e)))}));let H=!1;A.on(c.TransportEvent.RECONNECTING,(()=>{H=!0})),A.on(c.TransportEvent.RECONNECTED,(()=>{H=!1})),A.on(c.TransportEvent.AUTHENTICATION_FAILED,(async()=>{if(!H&&!S){const e=await U.getToken({preferCached:!0});null!==e&&e.isAnonymous||B.dispatch((0,Sh.wH)())}})),(0,VB.q6)("desktop-web-player",A),function(){FB.BrowserMetrics.getPageLoadTime().then((e=>{(0,VB.fE)({metric_type:FB.MetricTypes.TIMER,what:"time-to-page-load-nanoseconds",value:(0,FB.asNanoseconds)(FB.Time.fromMillis(e).asNanos()),tags:{route:nH(window.location.pathname)}})})).catch((()=>{})),FB.BrowserMetrics.getTimeToFirstPaint().then((e=>{(0,VB.fE)({metric_type:FB.MetricTypes.TIMER,what:"time-to-first-paint-nanoseconds",value:(0,FB.asNanoseconds)(FB.Time.fromMillis(e).asNanos()),tags:{route:nH(window.location.pathname)}})})).catch((()=>{})),FB.BrowserMetrics.getTimeToFirstContentfulPaint().then((e=>{(0,VB.fE)({metric_type:FB.MetricTypes.TIMER,what:"time-to-first-contentful-paint-nanoseconds",value:(0,FB.asNanoseconds)(FB.Time.fromMillis(e).asNanos()),tags:{route:nH(window.location.pathname)}})})).catch((()=>{}));const e=e=>{(0,VB.fE)(FB.BrowserMetrics.getWebVitalsMetric({...e,label:e.name},{route:nH(window.location.pathname)}))};(0,tH.lt)(e),(0,tH.IN)(e),(0,tH.fK)(e),(0,tH.rH)(e),(0,tH.zB)(e),(0,tH.Ck)(e)}(),S||(()=>{const e=new URL(window.location.href);return hU(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 i=new URL(window.location.href),n=i.searchParams.get("dlsi")||mU(),r={link:window.location.href,entity_uri:eH(i),source:window.navigator.userAgent,deeplink_session_id:n};t?e.send((0,XF.W)(r)):e.send((0,cU.N)(r))})(b,i.isAnonymous);const V=u.Ru.getLocaleForTranslation();if(B.dispatch((0,Sh.Hh)()),B.dispatch((0,m.zA)(V)),S){document.documentElement.setAttribute("lang",V)}(e=>{const t=window.matchMedia("(display-mode: standalone)");t.addEventListener?t.addEventListener("change",(t=>e(t.matches))):t.addListener((t=>e(t.matches)))})((()=>{B.dispatch({type:d})})),function(e,t){const i=[];let n=0;i.push(e.location),e.listen(((e,r)=>{r===bM.push&&(n+=1,i.splice(n),i.push(e)),r===bM.pop&&(n=i.findIndex((t=>t.key===e.key))),r===bM.replace&&i.splice(n,1,e),t(_M(n,i))})),t(_M(n,i))}(h,(e=>{B.dispatch((0,p.hp)(e))})),await rH(e.initialUser,e.initialProductState,B);const G=(0,lU.e)(!0);(0,ZL.lM)(),(0,r.H)(G).render((0,R.jsx)(s.Gu,{configuration:null,children:(0,R.jsx)(y.s,{onError:e=>(0,om.Jy)(e,"App"),FallbackComponent:P,children:(0,R.jsx)(yM,{store:B,platform:e})})})),!S&&_&&(0,l.track)({dataLayerPushInitial:!0,googleTagManagerId:_,language:C?.locale,market:E,loggedIn:!i.isAnonymous,oneTrust:"1"===((0,ft.v8)("client-web_one-trust")??"1"),userCountry:x}),(0,EM.W)(e.operatingSystem)&&B.dispatch((0,p.Kk)()),(0,o.Lj)("UI init phase is done for logged-in experience"),i.isAnonymous||b.send((0,a._)({width:window.outerWidth,height:window.outerHeight,mode:0,duration:0}),{flush:!1})}().catch((e=>{(0,om.OV)(e),console.error(e);const t=(0,lU.e)(!0);(0,r.H)(t).render((0,R.jsx)(s.Gu,{configuration:null,children:(0,R.jsx)(P,{})}))}))},98767:(e,t,i)=>{"use strict";i.d(t,{$I:()=>s,Qv:()=>a,R2:()=>r});var n=i(85065);const r=(e,t)=>{const i=e.contextMenuButtonFactory().hitUiReveal();t.logInteraction(i)},a=(e,t,i,r)=>{let a;e===n.NV.ADD?a=t.hitDownload({itemToDownload:r}):e===n.NV.REMOVE?a=t.hitRemoveDownload({itemToRemoveFromDownloads:r}):e===n.NV.NO_PERMISSION&&(a=t.hitUiReveal?.()),a&&i.logInteraction(a)},s=({isPlaying:e,isActive:t,spec:i,logger:n,uri:r})=>{let a;return a=e?i.hitPause({itemToBePaused:r}):t?i.hitResume({itemToBeResumed:r}):i.hitPlay({itemToBePlayed:r}),n.logInteraction(a)}},24189:(e,t,i)=>{"use strict";i.d(t,{Hf:()=>s,Mo:()=>a,as:()=>p,oI:()=>m,xy:()=>d});var n=i(30758),r=i(86070);const a=e=>({type:"SET_BACKGROUND_COLOR",color:e}),s=()=>({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,n.createContext)(null),u=(0,n.createContext)(null),d=({children:e})=>{const[t,i]=(0,n.useReducer)(o,l);return(0,r.jsx)(u.Provider,{value:t,children:(0,r.jsx)(c.Provider,{value:i,children:e})})};function m(){const e=(0,n.useContext)(u);if(null===e)throw new Error("Trying to use 'BackgroundColorContext' without 'BackgroundColorProvider'!");return e}function p(){const e=(0,n.useContext)(c);if(null===e)throw new Error("Trying to use 'BackgroundColorDispatchContext' without 'BackgroundColorDispatchProvider'!");return e}},87925:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s,l:()=>o});var n=i(30758),r=i(86070);const a=(0,n.createContext)(null),s=({instance:e,children:t})=>(0,r.jsx)(a.Provider,{value:e,children:t}),o=()=>{const e=(0,n.useContext)(a);if(null===e)throw new Error("useCollectionPlatformAPI must be used within a CollectionPlatformAPIProvider");return e}},97813:(e,t,i)=>{"use strict";i.d(t,{m:()=>a});var n=i(28568),r=i(60102);function a(){return(0,r.N)(n.ud)}},36118:(e,t,i)=>{"use strict";i.d(t,{G:()=>o,m:()=>s});var n=i(30758),r=i(86070);const a=(0,n.createContext)(null),s=({instance:e,children:t})=>(0,r.jsx)(a.Provider,{value:e,children:t}),o=()=>{const e=(0,n.useContext)(a);if(null===e)throw new Error("useEqualizerAPI must be used within a EqualizerProvider");return e}},419:(e,t,i)=>{"use strict";i.d(t,{Y:()=>l});var n=i(30758),r=i(61544),a=i(19118),s=i(42704),o=i(18416);const l=e=>{const t=(0,s.f)(),[i,l]=(0,n.useState)(!1);if(!(0,r.AP)(e))throw new Error(`Expected a Spotify uri in format 'spotify:user:***', got "${e}"`);const c=(0,n.useCallback)((n=>n&&!i?t.followUsers([e]):!n&&i?t.unfollowUsers([e]):Promise.resolve()),[t,i,e]);return(0,n.useEffect)((()=>{l(!1),t.isFollowing([e]).then((t=>{l(t[e]??!1)}))}),[t,e]),(0,o.N)(a.mc.OPERATION_COMPLETE,(t=>{t.data.uris.includes(e)&&!t.data.error&&(t.data.operation===a.JK.FOLLOW_USER?l(!0):t.data.operation===a.JK.UNFOLLOW_USER&&l(!1))})),[i,c]}},60653:(e,t,i)=>{"use strict";i.d(t,{Q:()=>o,n:()=>s});var n=i(30758),r=i(86070);const a=(0,n.createContext)(null),s=({children:e,instance:t})=>(0,r.jsx)(a.Provider,{value:t,children:e}),o=()=>{const e=(0,n.useContext)(a);if(null===e)throw new Error("usePictureInPictureContext() must be used within a PictureInPictureProvider");return e}},10034:(e,t,i)=>{"use strict";i.d(t,{D:()=>a,J:()=>s});var n=i(30758),r=i(86070);const a=(0,n.createContext)(null),s=({platformData:e,children:t})=>(0,r.jsx)(a.Provider,{value:e,children:t})},41944:(e,t,i)=>{"use strict";i.d(t,{P:()=>u,g:()=>d});var n=i(30758),r=i(81987),a=i(28835),s=i(19303),o=i(75235),l=i(86070);const c=(0,n.createContext)(null),u=({children:e,configuration:t})=>{const[i,n]=(0,o.x)(s.e,a.Vk.empty().toJSON()),u=a.Vk.merge(t,a.Vk.fromJSON(i));return(0,l.jsx)(c.Provider,{value:{localConfiguration:u,remoteConfiguration:t,setOverrides:e=>n(a.Vk.merge(a.Vk.fromJSON(i),e).toJSON()),clearOverrides:()=>n(a.Vk.empty().toJSON())},children:(0,l.jsx)(r.Gu,{configuration:u,children:e})})};function d(){const e=(0,n.useContext)(c);if(null===e)throw new Error("Please wrap your component in RemoteConfigProviderWithOverrides");return e}},39516:(e,t,i)=>{"use strict";i.d(t,{o:()=>a});var n=i(84473),r=i(60102);function a(){return(0,r.N)(n.g)}},75003:(e,t,i)=>{"use strict";i.d(t,{h:()=>r});var n=i(50513);function r(){const{ref:e,inView:t}=(0,n.Wx)({initialInView:!1}),{ref:i,inView:r}=(0,n.Wx)({initialInView:!1});return{titleRef:e,tracklistRef:i,displayTopBar:!t&&r}}},12811:(e,t,i)=>{"use strict";i.d(t,{$R:()=>o,Iu:()=>d,dB:()=>u,n5:()=>c,s0:()=>s,zK:()=>l});var n=i(61544),r=i(11808),a=i(71817);const s=[{url:"https://misc.scdn.co/liked-songs/liked-songs-64.png",width:64,height:64},{url:"https://misc.scdn.co/liked-songs/liked-songs-300.png",width:300,height:300},{url:"https://misc.scdn.co/liked-songs/liked-songs-640.png",width:640,height:640}];function o(e){if(!e)return null;const t=(0,n.fH)(e).toURI();return{type:a.c.LIKED_SONGS,uri:t,...l()}}function l(){return{images:s,name:r.Ru.get("sidebar.liked_songs")}}function c(e){const t=(0,n.fH)(e??void 0,"your-episodes").toURI();return{type:a.c.YOUR_EPISODES,uri:t,...u()}}function u(){return{images:[{url:"https://misc.scdn.co/your-episodes/SE-64.png",width:64,height:64},{url:"https://misc.scdn.co/your-episodes/SE-300.png",width:300,height:300},{url:"https://misc.scdn.co/your-episodes/SE-640.png",width:640,height:640}],name:r.Ru.get("sidebar.your_episodes")}}function d(){return{type:a.c.LOCAL_FILES,uri:"spotify:collection:local-files",images:[],name:r.Ru.get("local-files")}}},57402:(e,t,i)=>{"use strict";i.d(t,{MU:()=>r,NR:()=>a});var n=i(5538);n.uX;const r=n.uX,a=n.uX},31225:(e,t,i)=>{"use strict";i.d(t,{G:()=>c,_:()=>u});var n=i(30758),r=i(9856),a=i.n(r),s=i(20167);var o=i(86070);const l=(0,n.createContext)(void 0),c=({children:e,overrides:t})=>{const i=(0,n.useMemo)((()=>({supportsDragAndDrop:t?.supportsDragAndDrop??(!1!==a().getParser(window.navigator.userAgent).satisfies({"Microsoft Edge":">=17"})&&!(0,s.g)())})),[t?.supportsDragAndDrop]);return(0,o.jsx)(l.Provider,{value:i,children:e})},u=()=>{const e=(0,n.useContext)(l);if(!e)throw new Error("useUICapabilities() must be used within <UICapabilitiesProvider />");return e}},71296:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(31322);const r="rTMkDBDp47Eo12ZEQv4U";var a=i(86070);const s=({copyrights:e,courtesyLine:t})=>{const i=(e||[]).map(((e,t)=>{const i=e.text.replace(/^(\(C\)\s+)/,"").replace(/^(\(P\)\s+)/,"").replace(/^(©\s+)/,"").replace(/^(℗\s+)/,"");let r;return r="C"===e.type?"©":"P"===e.type?"℗":`(${e.type})`,(0,a.jsx)(n.Z,{as:"p",variant:"finale",dir:"auto",children:`${r} ${i}`},t)}));return t&&i.unshift((0,a.jsx)(n.Z,{as:"p",variant:"finale",dir:"auto",children:t},i.length)),(0,a.jsx)("div",{className:r,children:i})}},67464:(e,t,i)=>{"use strict";i.d(t,{b:()=>x,u:()=>C});var n=i(30758),r=i(97500),a=i.n(r),s=i(57276),o=i(89942);const l="G22LIjgkDtQEFpyBZcDo",c="x-entityImage-xsmall",u="x-entityImage-small",d="x-entityImage-medium",m="x-entityImage-large",p="x-entityImage-square",h="x-entityImage-circle",g="x-entityImage-image",f="x-entityImage-imageContainer",v="x-entityImage-imagePlaceholder",y="x-entityImage-defaultSize";var b=i(578),_=i(86070);const E=({title:e,type:t,className:i,iconSize:n})=>(0,_.jsx)("div",{"aria-label":e,className:a()(v,i),children:(0,_.jsx)(b.s,{type:t,className:a()({[y]:!n}),size:n})});let C=function(e){return e[e.ROUNDED_CORNERS=0]="ROUNDED_CORNERS",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e}({});const x=(0,n.memo)((function({loadingMode:e="lazy",fadeIn:t=!1,type:i,title:n,images:r=[],shape:v=C.SQUARE,size:y=o.Qe.SIZE_56,iconSize:b,className:x,onContextMenu:S=(()=>{}),onTouchStart:A=(()=>{}),onTouchEnd:T=(()=>{}),color:I}){const N=function(e=[]){const t=e.filter((e=>Boolean(e.width))),i=t.filter((e=>e.url&&e.width&&e.width>=o.BZ[o.Qe.SIZE_56])).sort(((e,t)=>e.width-t.width));return i.length?i:t}(r),w=N[0]?.url??r[0]?.url??"",R=N.map((({url:e,width:t})=>`${e} ${t/2}w, ${e} ${t}w`)).join(", ");return(0,_.jsx)("div",{className:a()(f,x,{[h]:v===C.CIRCLE,[p]:v===C.SQUARE,[l]:o.fn.includes(y),[c]:o.zr.includes(y),[u]:o.pM.includes(y),[d]:o.JT.includes(y),[m]:o.B4.includes(y)}),onContextMenu:S,onTouchStart:A,onTouchEnd:T,style:{width:`${o.BZ[y]}px`,height:`${o.BZ[y]}px`,"--extracted-entity-color":I},children:(0,_.jsx)(s._,{loading:e,fadeIn:t,src:w,alt:n,ariaHidden:!0,className:a()(g),srcSet:R||void 0,testid:"entity-image",children:(0,_.jsx)(E,{title:n,type:i,iconSize:b})})})}))},89942:(e,t,i)=>{"use strict";i.d(t,{B4:()=>c,BZ:()=>r,JT:()=>l,Qe:()=>n,fn:()=>a,pM:()=>o,zr:()=>s});let n=function(e){return e[e.SIZE_20=0]="SIZE_20",e[e.SIZE_24=1]="SIZE_24",e[e.SIZE_32=2]="SIZE_32",e[e.SIZE_40=3]="SIZE_40",e[e.SIZE_48=4]="SIZE_48",e[e.SIZE_56=5]="SIZE_56",e[e.SIZE_64=6]="SIZE_64",e[e.SIZE_72=7]="SIZE_72",e[e.SIZE_80=8]="SIZE_80",e[e.SIZE_88=9]="SIZE_88",e[e.SIZE_96=10]="SIZE_96",e[e.SIZE_104=11]="SIZE_104",e[e.SIZE_112=12]="SIZE_112",e[e.SIZE_120=13]="SIZE_120",e[e.SIZE_128=14]="SIZE_128",e[e.SIZE_136=15]="SIZE_136",e[e.SIZE_144=16]="SIZE_144",e[e.SIZE_152=17]="SIZE_152",e[e.SIZE_160=18]="SIZE_160",e[e.SIZE_168=19]="SIZE_168",e[e.SIZE_176=20]="SIZE_176",e[e.SIZE_184=21]="SIZE_184",e[e.SIZE_200=22]="SIZE_200",e[e.SIZE_232=23]="SIZE_232",e}({});const r={[n.SIZE_20]:20,[n.SIZE_24]:24,[n.SIZE_32]:32,[n.SIZE_40]:40,[n.SIZE_48]:48,[n.SIZE_56]:56,[n.SIZE_64]:64,[n.SIZE_72]:72,[n.SIZE_80]:80,[n.SIZE_88]:88,[n.SIZE_96]:96,[n.SIZE_104]:104,[n.SIZE_112]:112,[n.SIZE_120]:120,[n.SIZE_128]:128,[n.SIZE_136]:136,[n.SIZE_144]:144,[n.SIZE_152]:152,[n.SIZE_160]:160,[n.SIZE_168]:168,[n.SIZE_176]:176,[n.SIZE_184]:184,[n.SIZE_200]:200,[n.SIZE_232]:232},a=[n.SIZE_20,n.SIZE_24],s=[n.SIZE_32,n.SIZE_40,n.SIZE_48,n.SIZE_56,n.SIZE_64],o=[n.SIZE_72,n.SIZE_80,n.SIZE_88,n.SIZE_96,n.SIZE_104,n.SIZE_112,n.SIZE_120,n.SIZE_128],l=[n.SIZE_136,n.SIZE_144,n.SIZE_152,n.SIZE_160,n.SIZE_168,n.SIZE_176],c=[n.SIZE_184,n.SIZE_200,n.SIZE_232]},578:(e,t,i)=>{"use strict";i.d(t,{s:()=>m});var n=i(91494),r=i(78840),a=i(36315),s=i(69725),o=i(73671),l=i(90201),c=i(97675),u=i(71817),d=i(86070);function m({type:e,...t}){let i=n.e;switch(e){case"folder":case u.c.FOLDER:i=r.h;break;case"album":case u.c.ALBUM:i=a.I;break;case"artist":case u.c.ARTIST:i=s.r;break;case"show":case"episode":case u.c.SHOW:case u.c.EPISODE:i=o.L;break;case"user":case u.c.USER:i=l.v;break;case"book":case"audiobook":case u.c.AUDIOBOOK:i=c.l;break;case"playlist":case u.c.PLAYLIST:default:i=n.e}return(0,d.jsx)(i,{"aria-hidden":"true","":e,...t})}},16436:(e,t,i)=>{"use strict";i.d(t,{E:()=>d});var n=i(30758),r=i(97500),a=i.n(r),s=i(42331);const o=(e,t)=>{const{getMinimumColumnWidth:i}=e,n=((e,t)=>{const{getMinimumColumnWidth:i}=e,{gridWidth:n,columnGap:r}=t;return Math.max(1,Math.floor((n+r)/(i(t)+r)))})(e,t);return{minColumnWidth:i(t),columnCount:n}};var l=i(86762),c=i(26969),u=i(86070);const d=(0,n.memo)((0,n.forwardRef)((function(e,t){const{className:i,colGap:r,rowGap:d,render:m,onLayoutChange:p,testId:h="container",useUniformRowHeight:g=!1,rowCount:f}=e,v=(0,n.useRef)(null),y=(0,s.R)(),b=r?parseInt(r,10):0;(0,n.useImperativeHandle)(t,(()=>v.current),[v]);const[_,E]=(0,n.useState)({minColumnWidth:-1,columnCount:-1});(0,n.useEffect)((()=>{p?.(_)}),[p,_]);const C=(0,n.useCallback)((e=>{const t=o(y,{gridWidth:e,columnGap:b});E(t)}),[b,y]);(0,c.w)({refOrElement:v,observeOnly:"width",onResize:({width:e})=>{C(e)}}),(0,n.useLayoutEffect)((()=>{v.current&&C(v.current.offsetWidth)}),[C]);const x={"--min-column-width":`${_.minColumnWidth}px`},S=f&&isFinite(f);return(0,u.jsx)("div",{"":`grid-${h}`,ref:v,className:a()(l.A.gridContainer,i,{[l.A.uniformRowHeight]:g,[l.A.withFiniteRowCount]:S}),style:{...x,...S?{"--row-count":`${f}`}:{},...d?{gridRowGap:d}:{},...r?{gridColumnGap:r}:{}},children:m(_)})})))},42331:(e,t,i)=>{"use strict";i.d(t,{R:()=>l,x:()=>o});var n=i(30758),r=i(94921),a=i(86070);const s=n.createContext((0,r.s1)(r.yV.DEFAULT)),o=({children:e,config:t})=>(0,a.jsx)(s.Provider,{value:t,children:e}),l=()=>(0,n.useContext)(s)},29159:(e,t,i)=>{"use strict";i.d(t,{N:()=>h,y:()=>g});var n=i(30758),r=i(28618);const a=[[/<iframe[^>]*>/gi,"<span>"],[/<\/iframe>/gi,"</span>"],[/<script[^>]*>/gi,"<span>"],[/<\/script>/gi,"</span>"],[/srcdoc=/gi,"data-invalid="],[/onerror=/gi,"data-invalid="],[/onload=/gi,"data-invalid="],[/<form[^>]*>/gi,"<span>"],[/<\/form>/gi,"</span>"],[/<input[^>]*>/gi,"<span>"],[/<\/input>/gi,"</span>"],[/<link[^>]*>/gi,"<span>"],[/<\/link>/gi,"</span>"]];function s(e){return["http://","https://","#","/","www","spotify:"].some((t=>e.startsWith(t)))?e:""}var o=i(57276),l=i(84337);const c="upb5J45er158T713LxUy";var u=i(31322),d=i(86070);function m(e,t){return"tagName"in e&&e.tagName===t}function p(e){return"tagName"in e&&"string"==typeof e.tagName}const h=n.memo((function({source:e="",LinkComponent:t,onTimeStampClick:i,onLinkClick:u}){const h=(0,n.useMemo)((()=>function(e){const{LinkComponent:t,onTimeStampClick:i,onLinkClick:n}=e,a={replace:e=>{if(p(e)&&m(e,"a")&&t)try{return(0,d.jsx)(t,{to:s(e.attribs.href),onClick:n,children:(0,r.zd)(e.children.filter(f))})}catch(e){return null}else{if(p(e)&&m(e,"img")){const{src:t,alt:i,width:n,height:r}=e.attribs;return(0,d.jsx)(o._,{src:t,alt:i,loading:"eager",width:n,height:r,className:c})}if(p(e)&&m(e,"time")&&i)return(0,d.jsx)(l.D,{onClick:i,children:(0,r.zd)(e.children.filter(f))})}return e}};return a}({LinkComponent:t,onTimeStampClick:i,onLinkClick:u})),[t,i,u]),g=(0,n.useMemo)((()=>{return(0,r.Ay)((t=e,a.reduce(((e,t)=>{const[i,n]=t;return e.replace(i,n)}),t)),h);var t}),[e,h]);return(0,d.jsx)(d.Fragment,{children:g})})),g=n.memo((function({source:e="",paragraphClassName:t,variant:i="ballad",semanticColor:r,LinkComponent:a,onLinkClick:s,onTimeStampClick:o,splitter:l=/\n\n/g}){const c=(0,n.useMemo)((()=>e.split(l).map(((e,n)=>(0,d.jsx)(u.Z,{as:"p",className:t,variant:i,semanticColor:r,children:(0,d.jsx)(h,{source:e,LinkComponent:a,onTimeStampClick:o,onLinkClick:s})},n)))),[e,i,r,l,t,a,o,s]);return(0,d.jsx)(d.Fragment,{children:c})}));function f(e){return!(!e||"object"!=typeof e)&&((!("type"in e)||"cdata"!==e.type)&&((!("type"in e)||"root"!==e.type)&&("type"in e&&"comment"===e.type||(!(!("type"in e)||"string"!=typeof e.type||!["tag","script","style"].includes(e.type))||("type"in e&&"directive"===e.type||"type"in e&&"text"===e.type)))))}},59355:(e,t,i)=>{"use strict";i.d(t,{_:()=>s});var n=i(11808),r=i(21383),a=i(86070);const s=()=>(0,a.jsx)(r.F,{size:"small",title:n.Ru.get("download.available-offline"),semanticColor:"textBrightAccent"})},76104:(e,t,i)=>{"use strict";i.d(t,{J:()=>u});var n=i(84492),r=i(30758),a=i(60656);var s=i(73356),o=i(86070);const l={animated:"images/equaliser-animated-green.gif",static:"images/equaliser-green.svg"},c={animated:"images/equaliser-animated-white.gif",static:"images/equaliser-white.svg"},u=({className:e,animated:t=!1,white:i=!1})=>{const u=((e=!0)=>{const t=(0,a.ox)(),i=(0,a.ZY)(),[n,s]=(0,r.useState)((()=>!(!e||!i)&&i.hasFocus()));return(0,r.useEffect)((()=>{const n=()=>{s(!0)},r=()=>{s(!1)};return i&&e&&(s(i.hasFocus()),t?.addEventListener("focus",n),t?.addEventListener("blur",r)),()=>{t?.removeEventListener("focus",n),t?.removeEventListener("blur",r)}}),[i,e,t]),n})(!(0,s.j)()&&t),d=i?c:l;return(0,o.jsx)("img",{className:e,width:"14",height:"14",alt:"",src:(0,n.b)(u?d.animated:d.static)})}},58237:(e,t,i)=>{"use strict";i.d(t,{g:()=>s});var n=i(11808),r=i(74627),a=i(86070);const s=({className:e,fullText:t=!1})=>(0,a.jsx)(r.v,{ariaLabel:n.Ru.get("card.a11y.explicit"),text:t?n.Ru.get("card.a11y.explicit"):"E",className:e})},24172:(e,t,i)=>{"use strict";i.d(t,{p:()=>s});var n=i(75721),r=i(11808),a=i(86070);function s(e){return(0,a.jsx)(n.H,{"aria-label":r.Ru.get("a11y.externalLink"),...e})}},78074:(e,t,i)=>{"use strict";i.d(t,{q:()=>a});var n=i(11808),r=i(86070);const a=({size:e=32,className:t})=>(0,r.jsxs)("svg",{role:"img",width:e,height:e,viewBox:"0 0 12 12",className:t,"aria-label":n.Ru.get("age.restriction.nineeteen-badge"),children:[(0,r.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,r.jsx)("g",{transform:"scale(0.85) translate(1.1,1.1)",children:(0,r.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"})})]})},57276:(e,t,i)=>{"use strict";i.d(t,{_:()=>p});var n=i(30758),r=i(97500),a=i.n(r);const s="main-image-image",o="main-image-loading",l="main-image-loaded";var c=i(56975),u=i(86070);function d(e){if(null!==e)return e}const m=({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}),p=(0,n.memo)((function(e){const{ariaHidden:t=!1,testid:i,src:r,alt:c="",radius:p=0,className:h="",srcSet:g,draggable:f=!1,sizes:v,children:y,loading:b,width:_,height:E,fadeIn:C=!1}=e,[x,S]=(0,n.useState)("loading"),A=(0,n.useRef)(null),[T,I]=(0,n.useState)(C);return(0,n.useLayoutEffect)((()=>{C&&A.current?.complete&&I(!1)}),[C]),r&&"error"!==x?(0,u.jsx)(m,{loading:b,children:(0,u.jsx)("img",{"aria-hidden":t,draggable:f,loading:b,src:r,"":i,alt:c,className:a()(s,h,{[o]:T,[l]:"loaded"===x}),style:{borderRadius:p||void 0},srcSet:g,sizes:v,width:d(_),height:d(E),onLoad:()=>S("loaded"),onError:()=>S("error"),ref:A})}):(0,u.jsx)(u.Fragment,{children:y})}))},97513:(e,t,i)=>{"use strict";i.d(t,{_:()=>u});var n=i(30758),r=i(50513),a=i(97500),s=i.n(a);const o="eqw9lvuoZHrkWMTdyTpY",l="lb08f71wES9AQnKx6e0R";var c=i(86070);const u=n.memo((function(e){const{triggerOnInitialLoad:t=!1,onReachBottom:i,showScrollbar:a=!0,horizontalScroll:u=!1,className:d}=e,{ref:m,inView:p}=(0,r.Wx)({initialInView:t});return(0,n.useEffect)((()=>{p&&i&&i()}),[p,i]),(0,c.jsxs)("div",{className:s()({[l]:!a,[o]:u},d),"":"infinite-scroll-list",children:[e.children,(0,c.jsx)("div",{ref:m})]})}))},95302:(e,t,i)=>{"use strict";i.d(t,{pZ:()=>o});var n=i(34629),r=i(86070);const a=n.zz.Provider,s=n.zz.Consumer,o=({value:e,index:t,children:i})=>(0,r.jsx)(s,{children:n=>{let s=""===n?e:`${n}/${e}`;return"number"==typeof t&&(s=`${s}/${t}`),(0,r.jsx)(a,{value:s,children:i})}})},56975:(e,t,i)=>{"use strict";i.d(t,{b:()=>o});var n=i(30758),r=i(50513);const a="VvxVxrxVVFjUD6BNsUub";var s=i(86070);const o=(0,n.memo)((function(e){const{children:t}=e,[i,o]=(0,n.useState)(!1),{ref:l,inView:c}=(0,r.Wx)({triggerOnce:!0});return(0,n.useEffect)((()=>{c&&o(!0)}),[c]),(0,s.jsx)("div",{className:i?void 0:a,ref:l,children:i?t:null})}))},9611:(e,t,i)=>{"use strict";i.d(t,{o:()=>o});var n=i(30758),r=i(39707),a=i(86070);const s=(0,n.lazy)((async()=>{const{LottieAnimation:e}=await Promise.all([i.e(3638),i.e(7067)]).then(i.bind(i,55652));return{default:e}})),o=(0,n.memo)((function(e){const{data:t}=(0,r.U)({queryKey:["async-lottie-animation",e.path],queryFn:()=>e.path?fetch(e.path).then((e=>e.json())):null,staleTime:6e4,gcTime:6e4,retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1});return(0,a.jsx)(s,{...e,animationData:e.animationData??t,path:void 0})}))},47586:(e,t,i)=>{"use strict";i.d(t,{Q:()=>d});var n=i(30758),r=i(73356),a=i(61272),s=i(9611),o=i(46798),l=i(86070);const c=({size:e="small",animationFilePath:t,className:i,style:n,onLottieAnimationEnd:r})=>{const a=(0,o.k)(e);return(0,l.jsx)("div",{style:{position:"relative",pointerEvents:"none",width:`${a}px`,height:`${a}px`},children:(0,l.jsx)(s.o,{path:t,loop:!1,autoplay:!0,className:i,style:{display:"flex",position:"absolute",...n},onAnimationEnd:r})})};var u=i(29615);function d(e,t){const[i,s]=(0,n.useState)(e),[o,d]=(0,n.useState)(null),m=(0,r.j)(),{[i]:{Icon:p,iconProps:h}}=t;(0,n.useLayoutEffect)((()=>{s(e)}),[e]);const g=(0,n.useCallback)((e=>{if(!o)return null;const{FallbackIcon:t,...i}=o,r=(0,n.useCallback)((()=>{d(null)}),[]);return(0,l.jsx)(u.tH,{fallback:(0,l.jsx)(t,{...e}),onError:()=>d(null),children:(0,l.jsx)(n.Suspense,{fallback:(0,l.jsx)(t,{...e}),children:(0,l.jsx)(c,{...i,...e,onLottieAnimationEnd:r})})})}),[o]),f=(0,n.useCallback)((e=>(0,l.jsx)(p,{...h,...e})),[p,h]);return{Icon:o?g:f,setState:(0,a.U0)((e=>{s((i=>{const n=t[i].transitions[e];if(n&&!m){const e=t[i].Icon,r=t[i].iconProps;d({...n,FallbackIcon:t=>(0,l.jsx)(e,{...t,...r})})}else d(null);return e}))}),[m,t])}}},74627:(e,t,i)=>{"use strict";i.d(t,{v:()=>o});const n="main-tag-container";var r=i(97500),a=i.n(r),s=i(86070);const o=({text:e,ariaLabel:t=e,title:i=t,className:r})=>(0,s.jsx)("span",{"aria-label":t,className:a()(n,r),title:i,children:e})},84337:(e,t,i)=>{"use strict";i.d(t,{D:()=>l});var n=i(30758);const r="NkWIcfgnWR9AXfikmWai",a="OvmkrxKmI82x4jlgEZG0";var s=i(31322),o=i(86070);const l=n.memo((function({onClick:e,children:t}){return(0,o.jsx)("button",{"":"clickable-timestamp",className:a,onClick:()=>{const i=c(t),n=1e3*i.split(":").reverse().reduce(((e,t,i)=>e+parseInt(t,10)*Math.pow(60,i)),0);e(n)},children:(0,o.jsx)(s.Z,{className:r,variant:"ballad",children:t})})}));function c(e){let t="";return n.Children.map(e,(e=>{"string"==typeof e||"number"==typeof e?t+=e:n.isValidElement(e)&&e.props.children&&(t+=c(e.props.children))})),t}},64844:(e,t,i)=>{"use strict";i.d(t,{L:()=>m});var n=i(30758),r=i(26969);const a="main-rootlist-wrapper",s="main-rootlist-topSentinel",o="main-rootlist-bottomSentinel";var l=i(59744),c=i(86070);const u=(e,t)=>(0,c.jsx)("div",{style:{height:e}},t),d=()=>"undefined"!=typeof window&&"requestIdleCallback"in window,m=({renderRows:e,nrRows:t,rowHeight:i,scrollNodeRef:m,nrRowsOverscan:p=10,renderPlaceholder:h=u})=>{const g=(0,l.a)(),f=(0,n.useRef)(null),v=(0,n.useRef)(null),y=(0,n.useRef)(null),b=(0,n.useRef)(0),[_,E]=(0,n.useState)(d()?0:p),[C,x]=(0,n.useState)(null),[S,A]=(0,n.useState)(0),T=(0,n.useCallback)((()=>{const e=m.current;if(!e)return;const t=Math.ceil(e.offsetHeight/i)+2;A(t)}),[m,i]),I=(0,n.useCallback)((()=>{const e=m.current;if(!e)return;const t=Math.floor((e.scrollTop-b.current-1)/i);x(t)}),[i,m]);(0,n.useEffect)((()=>{d()&&window.requestIdleCallback((()=>{g()&&E(p)}))}),[g,p]),(0,n.useLayoutEffect)((()=>{const e=y.current,t=m.current;e&&t&&(b.current=e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)}),[m,y.current?.offsetTop]),(0,n.useEffect)((()=>{if(!window.IntersectionObserver)return()=>{};const e=new window.IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&I()}))}));return f.current&&e.observe(f.current),v.current&&e.observe(v.current),()=>{e.disconnect()}}),[I,C,S,t]),(0,n.useLayoutEffect)((()=>{T(),I()}),[T,I]),(0,r.w)({refOrElement:m,observeOnly:"height",onResize:T});const N=(C??0)-_,w=Math.min(null!==C?N+2*_+S-1:-1,t-1),R=Math.max(N,0),k=Math.max(w,-1),O=Math.min(S>0?t*i:0,Math.max(i*(_-2),0)),P=i*R,L=i*t,j=L-i*Math.max(t-(k+1),0);return(0,c.jsxs)("div",{ref:y,className:a,style:{height:`${L}px`,"--row-height":`${i}px`},role:"presentation",children:[(0,c.jsxs)("div",{ref:f,"":"top-sentinel",className:s,style:{height:`${P+O}px`},role:"presentation",children:[h(`calc(100% - ${O}px)`,"top-sentinel"),(0,c.jsx)("div",{style:{height:`${O}px`},role:"presentation"})]}),(0,c.jsx)("div",{style:{transform:`translateY(${P}px)`},role:"presentation",children:e(R,k)}),(0,c.jsxs)("div",{ref:v,"":"bottom-sentinel",className:o,style:{height:`calc(100% - ${j}px + ${O}px)`},role:"presentation",children:[(0,c.jsx)("div",{style:{height:`${O}px`},role:"presentation"}),h(`calc(100% - ${O}px)`,"bottom-sentinel")]})]})}},52002:(e,t,i)=>{"use strict";i.d(t,{e:()=>g});var n=i(30758),r=i(65987),a=i(95165),s=i(24359);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,i){if(!e)return void console.error("No menu element found. Canceling moving focus");if(!(0,s.fk)(e))return;const n=e.querySelector('[tabindex="0"]');t===r.O.UP&&(0,s.MS)(n,d(e,n,r.O.UP,i)),t===r.O.DOWN&&(0,s.MS)(n,d(e,n,r.O.DOWN,i)),t===r.O.RIGHT&&(0,s.MS)(n,u(n)),t===r.O.LEFT&&(0,s.MS)(n,function(e){const t=!!e.closest('ul[role="menu"] ul[role="menu"]');if(!t)return null;let i=e.closest('ul[role="menu"]')?.closest('li[role="presentation"]')?.querySelector(l)??null;if(!i){const t=e.closest('ul[role="menu"]')?.id;t&&(i=document.querySelector(`[aria-controls="${t}"]`)?.closest(l)??null)}return i}(n))}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 i=e.closest('[role="menuitem"][aria-controls]')?.getAttribute("aria-controls");i&&(t=document.querySelector(`#${i}[role="menu"]`))}const i=t?.querySelector(o);return i??null}function d(e,t,i,n){const a=t.closest('ul[role="menu"]'),s=t.closest('li[role="presentation"]');if(!a||!s)return t;let l=t;const c=n?.(e,t,i);if(c)return c;if(i===r.O.UP){const t=a.querySelectorAll(':scope > li[role="presentation"]');let i=s.previousElementSibling;for(document.activeElement===e&&(i=t[t.length-1]);i!==s&&(i||(i=t[t.length-1]),l=i.querySelector(o),!l);)i=i.previousElementSibling}else{let t=s.nextElementSibling;for(document.activeElement===e&&(t=a.querySelector("li"));t!==s&&(t||(t=a.querySelector("li")),l=t.querySelector(o),!l);)t=t.nextElementSibling;l=t.querySelector(o)}return l||t}var m=i(90547),p=i(43259),h=i(86070);const g=({getInitialFocusElement:e,onKeyDown:t,onClose:i,onFocusVerticalItem:o,...l})=>{const d=(0,n.useRef)(null);(0,p.s)(),(0,a.i)({ref:d,getFocusElement:e,onFocus:e=>{(0,s.MS)(null,e,{preventScroll:!0})}});const g=(0,n.useCallback)((e=>{var n;d.current?.contains(e.target)&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),e.stopPropagation()),"Escape"!==e.key&&"Tab"!==e.key||i?.(),"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&&(n=d.current)&&u(n.querySelector('[tabindex="0"]'))&&(e.preventDefault(),c(d.current,r.O.RIGHT)),t?.(e))}),[o,t,i]);return(0,h.jsx)(m.Q,{ref:d,onKeyDown:g,...l})}},93966:(e,t,i)=>{"use strict";i.d(t,{H:()=>s});var n=i(30758),r=i(37985),a=i(86070);const s=(0,n.forwardRef)(((e,t)=>{const i=e.as,{testid:n,...s}=e;return i?(0,a.jsx)(i,{ref:t,...s}):s.href?(0,a.jsx)("a",{ref:t,"":n,...s}):s.to?(0,a.jsx)(r.k2,{ref:t,...s}):(0,a.jsx)("button",{"":n,ref:t,...s})}))},65313:(e,t,i)=>{"use strict";i.d(t,{u:()=>s});var n=i(30758),r=i(62673),a=i(86070);const s=({children:e,...t})=>{const i=(0,n.useRef)(null);return(0,r.g)(i),(0,a.jsx)("li",{ref:i,role:"presentation",...t,children:e})}},90547:(e,t,i)=>{"use strict";i.d(t,{Q:()=>a});var n=i(30758),r=i(86070);const a=n.forwardRef((function({children:e,depth:t=0,...i},n){return(0,r.jsx)("ul",{tabIndex:-1,ref:n,role:"menu","data-depth":t,...i,children:e})}))},77339:(e,t,i)=>{"use strict";i.d(t,{s:()=>s});var n=i(40157),r=i.n(n),a=i(86070);const s=e=>(0,a.jsx)(r(),{...e})},46751:(e,t,i)=>{"use strict";i.d(t,{d:()=>c});var n=i(97500),r=i.n(n),a=i(46079),s=i(11088);const o="UyzJidwrGk3awngSGIwv";var l=i(86070);const c=({durationMs:e,className:t,displaySeconds:i})=>{const{hours:n,minutes:c,seconds:u}=(0,a.S)(e);return i=!1!==i&&!n&&u,(0,l.jsx)("span",{className:r()(o,t),children:(0,s.j)({h:n,m:c,s:i?u:0})})}},60656:(e,t,i)=>{"use strict";i.d(t,{IF:()=>c,ZY:()=>d,ox:()=>u});var n=i(30758),r=i(60386),a=i(34143),s=i(97848),o=i(86070);const l=(0,n.createContext)(null),c=({handle:e,children:t})=>{const i=(0,a.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)(s.C,{value:i,children:t})})})};function u(){const e=(0,n.useContext)(l);return"undefined"==typeof window?null:e??window}function d(){const e=u();return e?.document??null}},21596:(e,t,i)=>{"use strict";i.d(t,{A9:()=>o,UD:()=>s});var n=i(30758),r=i(86070);const a=(0,n.createContext)(null),s=({instance:e,children:t})=>(0,r.jsx)(a.Provider,{value:e,children:t}),o=()=>{const e=(0,n.useContext)(a);if(null===e)throw new Error("useRequestBuilder must be used within a RequestBuilderProvider");return e}},69463:(e,t,i)=>{"use strict";i.d(t,{P:()=>l,q:()=>c});var n=i(30758),r=i(61272),a=i(7353),s=i(86070);const o=(0,n.createContext)(null),l=({children:e,surface:t,uris:i})=>{const n=(0,r.lB)((()=>({surface:t,uris:i?.filter(a.P)??[]})),[t,i]);return(0,s.jsx)(o.Provider,{value:n,children:e})};function c(){return(0,n.useContext)(o)}},38861:(e,t,i)=>{"use strict";i.d(t,{_:()=>g,dZ:()=>h,yd:()=>p});var n=i(30758),r=i(81987),a=i(25828),s=i(62943),o=i(3554),l=i(86070);const c=(0,n.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}}},m=(0,a.g)(u);const p=({children:e})=>{const t=(0,r.NC)(s._E,{loadingValue:!1});let i=!1;const a=new globalThis.Image;a.onload=()=>{i=1===a.width},a.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=";const o=(0,n.useCallback)(((e,n)=>{if(!t)return e;const r=!0===navigator.connection?.saveData;return function(e,t,i){const[n,r,a,s,o]=e?.match(f)??[];if(m(a)){const e=function(e,t,i,{supportsWebP:n,devicePixelRatio:r=1}={}){const a=d[e]??{},{defaultGroup:s,webp:o}=a;if(t in s||t in o){let e="defaultGroup";if(n&&(e="webp"),i){const n=Object.entries(a[e]);for(const[e,t]of n)if(t>=i*r)return e;return n.at(-1)?.[0]??t}}return t}(a,s,t,i);if(e!==s){return`${r}${a}${e}${o}`}}return e}(e,n,{supportsWebP:i,isSaveDataEnabled:r,devicePixelRatio})}),[i,t]);return(0,l.jsx)(c.Provider,{value:{optimizeImage:o},children:e})};function h(){return(0,n.useContext)(c).optimizeImage}function g(){const e=h();return(0,n.useCallback)(((t,i)=>{if(t?.length){const n=t[0].url,r=e(n,i);if(r!==n)return[{url:r}]}const n=(0,o.g)(t,{desiredSize:i});return n?[n]:t}),[e])}const f=/^(https:\/\/i\.scdn\.co\/image\/|spotify:image:)([0-9a-f]{8})([0-9a-f]{8})(.*)$/},51396:(e,t,i)=>{"use strict";i.d(t,{q:()=>a});var n=i(60102),r=i(50879);const a=()=>(0,n.N)(r.m)},45418:(e,t,i)=>{"use strict";i.d(t,{a:()=>a});var n=i(60102),r=i(14217);function a(){return(0,n.N)(r.O)}},62283:(e,t,i)=>{"use strict";i.d(t,{A:()=>s,S:()=>o});var n=i(30758),r=i(86070);const a=(0,n.createContext)(null),s=({instance:e,children:t})=>(0,r.jsx)(a.Provider,{value:e,children:t}),o=()=>{const e=(0,n.useContext)(a);if(null===e)throw new Error("useSingAlongAPI must be used within a SingAlongAPIProvider");return e}},3394:(e,t,i)=>{"use strict";i.d(t,{F:()=>c,a:()=>l});var n=i(30758),r=i(86523),a=i(79163),s=i(20247),o=i(86070);const l=(0,n.createContext)(null),c=({children:e})=>{const t=(0,r.d)(),[i,c]=(0,n.useState)(t.getCurrentSession());return(0,a.J)(s.K.UPDATE,(({data:e})=>{c(e)})),(0,o.jsx)(l.Provider,{value:i,children:e})}},30052:(e,t,i)=>{"use strict";i.d(t,{a:()=>s,f:()=>o});var n=i(30758),r=i(86070);const a=(0,n.createContext)(void 0),s=({value:e,children:t})=>(0,r.jsx)(a.Provider,{value:e,children:t}),o=()=>{const e=(0,n.useContext)(a);if(void 0===e)throw new Error("useUBIEventLocation() must be used within a UBIEventLocationContextProvider");return e}},17869:(e,t,i)=>{"use strict";i.d(t,{r:()=>s});var n=i(30758),r=i(30052),a=i(86070);const s=n.memo((function({spec:e,children:t}){const i=(0,n.useMemo)((()=>e?.getAbsoluteLocation()??null),[e]);return(0,a.jsx)(r.a,{value:i,children:t})}))},90590:(e,t,i)=>{"use strict";i.d(t,{k7:()=>l,oQ:()=>c});var n=i(30758),r=i(53190),a=i(79303),s=i(86070);const o=(0,n.createContext)(void 0),l=({children:e})=>{const t=(0,a.s)(),i=(0,n.useMemo)((()=>new r.J(t)),[t]);return(0,s.jsx)(o.Provider,{value:i,children:e})},c=()=>(0,n.useContext)(o)},79303:(e,t,i)=>{"use strict";i.d(t,{V:()=>s,s:()=>o});var n=i(30758),r=i(86070);const a=(0,n.createContext)(void 0),s=({instance:e,children:t})=>(0,r.jsx)(a.Provider,{value:e,children:t}),o=()=>{const e=(0,n.useContext)(a);if(void 0===e)throw new Error("useUBILogger() must be used within a UBILoggerContextProvider");return e}},6576:(e,t,i)=>{"use strict";i.d(t,{o:()=>a});var n=i(72091),r=i(42349);const a=e=>(0,n.r)(r.F,{data:{uri:e}})},48905:(e,t,i)=>{"use strict";i.d(t,{t:()=>s});var n=i(30758),r=i(90590),a=i(61272);const s=(e,t=!0)=>{const i=(0,r.oQ)(),s=(0,n.useRef)(null),o=(0,n.useMemo)((()=>{if(t)return e?.impression()}),[t,e]);return(0,a.Ij)((()=>{if(s.current&&i&&o){return i.addToObservableEntities({impression:()=>o,element:s.current})||void 0}}),[i,o]),(0,n.useCallback)((e=>{s.current=e}),[])}},72091:(e,t,i)=>{"use strict";i.d(t,{r:()=>l});var n=i(30758),r=i(61272),a=i(30052),s=i(79303),o=i(17869);const l=(e,t)=>{const i=(0,s.s)(),l=(0,a.f)(),c=(0,r.lB)((()=>({...t,parentAbsoluteLocation:t.parentAbsoluteLocation??l})),[t,l]);return{spec:(0,n.useMemo)((()=>e(c)),[e,c]),logger:i,UBIFragment:o.r}}},71338:(e,t,i)=>{"use strict";i.d(t,{j:()=>T});var n=i(15847);const r="wIA_5Ypq0rltNPeZQpM4",a="Swi6YtNEFCCVz8l4y75v",s="pklLPOhfigdytL9bPoth",o="sb24Y8kdMZInJ8aI8dXT";var l=i(86070);function c({ariaValueText:e,max:t,current:i}){const n=t&&i?100*Math.min(1,i/t):0,c={transform:`translateX(-${100-n}%)`},u=e||`${Math.round(n)}%`;return(0,l.jsxs)("div",{className:r,role:"progressbar",tabIndex:0,"aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":t,"aria-valuetext":u,children:[(0,l.jsx)("div",{className:a}),(0,l.jsx)("div",{className:s,children:(0,l.jsx)("div",{"":"progressBarFg",className:o,style:c})})]})}const u="qfYkuLpETFW3axnfMntO",d="_q93agegdE655O5zPz6l",m="z7Yl7CIT1AB0y91f_moh",p="iLIlkUcfIq56KncGtX7u",h="nV50yZ6BR_TIuWP3l7b1",g="qLjIx_SzBEpDRA_q7kxQ";var f=i(31322),v=i(5162),y=i(11808),b=i(97500),_=i.n(b),E=i(46751),C=i(46079),x=i(11088);const S="xWm_uA0Co4SXVxaO7wlB",A=({durationMs:e,className:t,displaySeconds:i})=>{const{hours:n,minutes:r,seconds:a}=(0,C.S)(e);i=!1!==i&&!n&&a;const s=(0,x.j)({h:n,m:r,s:i?a:0});return s?(0,l.jsx)("span",{className:_()(S,t),children:y.Ru.get("time.left",s)}):null},T=e=>{const{resumePositionMs:t=0,releaseDate:i,isPlaying:r,fullyPlayed:a,durationMs:s,position:o=t,compactVariant:b=!1,className:C,progressBarClassName:x,progressStateClassName:S,releaseDateClassName:T}=e;return(0,l.jsxs)("div",{className:_()(u,C),children:[i?(0,l.jsx)(f.Z,{as:"p",variant:"mesto",className:d,children:(0,n.gD)((0,n.ad)(i))}):null,(()=>{if(a&&!r)return(0,l.jsxs)("div",{className:_()(p,S),children:[(0,l.jsx)(f.Z,{as:"p",variant:"mesto",className:m,children:y.Ru.get("episode.played")}),(0,l.jsx)(v.i,{size:"small",className:g,"aria-hidden":"true"})]});if(o>0||r){const e=Math.ceil(Math.max(s-o,0));return(0,l.jsx)("div",{className:_()(p,S),children:(0,l.jsx)(f.Z,{as:"p",variant:"mesto",className:m,children:(0,l.jsx)(A,{durationMs:e,displaySeconds:!b&&void 0})})})}return(0,l.jsx)(f.Z,{as:"p",variant:"mesto",className:_()(d,T),"":"episode-progress-not-played",children:(0,l.jsx)(E.d,{durationMs:s,displaySeconds:!b&&void 0})})})(),!a&&o>0||r?(0,l.jsx)("div",{className:_()(h,x),children:(0,l.jsx)(c,{current:o,max:s})}):null]})}},84492:(e,t,i)=>{"use strict";i.d(t,{b:()=>r});i(32941);let n;function r(e,t){let i;if(i='{"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","BUILD.bazel":"/BUILD.bazel","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/2022_wrapped_hub_tablet_banner_rtl.svg":"/images/2022_wrapped_hub_tablet_banner_rtl.svg","images/2022_wrapped_hub_tablet_banner.svg":"/images/2022_wrapped_hub_tablet_banner.svg","images/2022_wrapped_mobile_web_hub.svg":"/images/2022_wrapped_mobile_web_hub.svg","images/2022_wrapped_web_hub_banner_rtl.svg":"/images/2022_wrapped_web_hub_banner_rtl.svg","images/2022_wrapped_web_hub_banner.svg":"/images/2022_wrapped_web_hub_banner.svg","images/ac-row-placeholder.png":"/images/ac-row-placeholder.png","images/audiobooks-upsell.png":"/images/audiobooks-upsell.png","images/checkmark.png":"/images/checkmark.png","images/concert-hub-fb-card.png":"/images/concert-hub-fb-card.png","images/concert-hub-header.png":"/images/concert-hub-header.png","images/concert-hub-iphone-de.png":"/images/concert-hub-iphone-de.png","images/concert-hub-iphone-el.png":"/images/concert-hub-iphone-el.png","images/concert-hub-iphone-en.png":"/images/concert-hub-iphone-en.png","images/concert-hub-iphone-es_419.png":"/images/concert-hub-iphone-es_419.png","images/concert-hub-iphone-es.png":"/images/concert-hub-iphone-es.png","images/concert-hub-iphone-fi.png":"/images/concert-hub-iphone-fi.png","images/concert-hub-iphone-fr_CA.png":"/images/concert-hub-iphone-fr_CA.png","images/concert-hub-iphone-fr.png":"/images/concert-hub-iphone-fr.png","images/concert-hub-iphone-hu.png":"/images/concert-hub-iphone-hu.png","images/concert-hub-iphone-id.png":"/images/concert-hub-iphone-id.png","images/concert-hub-iphone-it.png":"/images/concert-hub-iphone-it.png","images/concert-hub-iphone-ja.png":"/images/concert-hub-iphone-ja.png","images/concert-hub-iphone-ms.png":"/images/concert-hub-iphone-ms.png","images/concert-hub-iphone-nl.png":"/images/concert-hub-iphone-nl.png","images/concert-hub-iphone-pl.png":"/images/concert-hub-iphone-pl.png","images/concert-hub-iphone-pt_BR.png":"/images/concert-hub-iphone-pt_BR.png","images/concert-hub-iphone-sv.png":"/images/concert-hub-iphone-sv.png","images/concert-hub-iphone-tr.png":"/images/concert-hub-iphone-tr.png","images/concert-hub-iphone-zh_TW.png":"/images/concert-hub-iphone-zh_TW.png","images/concert-hub-twitter-card.png":"/images/concert-hub-twitter-card.png","images/connect_header@1x.png":"/images/connect_header@1x.png","images/connect-to-devices-white.svg":"/images/connect-to-devices-white.svg","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/embed-legacy/copy-32_circle_grey_outline_bg.svg":"/images/embed-legacy/copy-32_circle_grey_outline_bg.svg","images/embed-legacy/embed-code-32_circle_grey_outline_bg.svg":"/images/embed-legacy/embed-code-32_circle_grey_outline_bg.svg","images/embed-legacy/fb_colour.svg":"/images/embed-legacy/fb_colour.svg","images/embed-legacy/messenger_colour.svg":"/images/embed-legacy/messenger_colour.svg","images/embed-legacy/twitter_colour.svg":"/images/embed-legacy/twitter_colour.svg","images/embed-legacy/whatsapp.svg":"/images/embed-legacy/whatsapp.svg","images/employee-podcasts-modal-art.png":"/images/employee-podcasts-modal-art.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/FC24_Spotify_PlayButton_V2_TriangleLight.svg":"/images/FC24_Spotify_PlayButton_V2_TriangleLight.svg","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-enhance-placeholder.png":"/images/feature-activation-shelf-enhance-placeholder.png","images/feature-activation-shelf-group-sessions-speaker.png":"/images/feature-activation-shelf-group-sessions-speaker.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/hifi-button-off.svg":"/images/hifi-button-off.svg","images/hifi-button-on.svg":"/images/hifi-button-on.svg","images/hifi.svg":"/images/hifi.svg","images/home-icon.svg":"/images/home-icon.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/improved-modal-bg.jpg":"/images/improved-modal-bg.jpg","images/learning-card-background.jpg":"/images/learning-card-background.jpg","images/login-background.jpg":"/images/login-background.jpg","images/login-signup-burst.svg":"/images/login-signup-burst.svg","images/logo-complete-black.svg":"/images/logo-complete-black.svg","images/logo-white-2x.png":"/images/logo-white-2x.png","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/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-image.png":"/images/og-image.png","images/og-socialsession-preview.png":"/images/og-socialsession-preview.png","images/ribbon-graphic-mobile.svg":"/images/ribbon-graphic-mobile.svg","images/ribbon-graphic-small-side.svg":"/images/ribbon-graphic-small-side.svg","images/ribbon-graphic-small-top.svg":"/images/ribbon-graphic-small-top.svg","images/ribbon-graphic.svg":"/images/ribbon-graphic.svg","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/spotifylogo.svg":"/images/spotifylogo.svg","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/Sw23-Desktop-Left.png":"/images/Sw23-Desktop-Left.png","images/Sw23-Desktop-Left.webp":"/images/Sw23-Desktop-Left.webp","images/Sw23-Desktop-Right.png":"/images/Sw23-Desktop-Right.png","images/Sw23-Desktop-Right.webp":"/images/Sw23-Desktop-Right.webp","images/Sw23-Mobile-Left.png":"/images/Sw23-Mobile-Left.png","images/Sw23-Mobile-Left.webp":"/images/Sw23-Mobile-Left.webp","images/Sw23-Mobile-Right.png":"/images/Sw23-Mobile-Right.png","images/Sw23-Mobile-Right.webp":"/images/Sw23-Mobile-Right.webp","images/top-up.png":"/images/top-up.png","images/touch-icon-114.png":"/images/touch-icon-114.png","images/touch-icon-144.png":"/images/touch-icon-144.png","images/touch-icon-57.png":"/images/touch-icon-57.png","images/touch-icon-72.png":"/images/touch-icon-72.png","images/tracklist-placeholder-compact.png":"/images/tracklist-placeholder-compact.png","images/tracklist-placeholder.png":"/images/tracklist-placeholder.png","images/ylx-artist-row-placeholder.png":"/images/ylx-artist-row-placeholder.png","images/ylx-compact-row-placeholder.png":"/images/ylx-compact-row-placeholder.png","images/ylx-row-placeholder.png":"/images/ylx-row-placeholder.png","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","videos/Sw23-Desktop-Left.mp4":"/videos/Sw23-Desktop-Left.mp4","videos/Sw23-Desktop-Left.webm":"/videos/Sw23-Desktop-Left.webm","videos/Sw23-Desktop-Right.mp4":"/videos/Sw23-Desktop-Right.mp4","videos/Sw23-Desktop-Right.webm":"/videos/Sw23-Desktop-Right.webm","videos/Sw23-Mobile-Left.mp4":"/videos/Sw23-Mobile-Left.mp4","videos/Sw23-Mobile-Left.webm":"/videos/Sw23-Mobile-Left.webm","videos/Sw23-Mobile-Right.mp4":"/videos/Sw23-Mobile-Right.mp4","videos/Sw23-Mobile-Right.webm":"/videos/Sw23-Mobile-Right.webm"}',void 0!==globalThis.__CDN_FILE_URLS__&&(i=globalThis.__CDN_FILE_URLS__),"string"!=typeof i)throw new Error("No __CDN_FILE_URLS__ property available in globalThis or process.env");if(!n)try{n=JSON.parse(i)}catch(e){throw new Error("Invalid __CDN_FILE_URLS__ value.")}if(!n[e])throw new Error(`\`${e}\` is not available in __CDN_FILE_URLS__.`);return n[e]}},52840:(e,t,i)=>{"use strict";i.d(t,{h:()=>n});let n=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}({})},11808:(e,t,i)=>{"use strict";i.d(t,{a7:()=>d,wB:()=>m,Ru:()=>h});var n=i(30758),r=i(94758),a=i.n(r),s=i(5277);let o=function(e){return e.AR="، ",e.FA="، ",e.EN=", ",e}({});var l=i(52840);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 m=e=>e&&(e=>u.includes(e))(e)?e:e?.includes("-")?m(e.split("-")[0]):void 0;function p(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 s.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:i}){var n;this._localeForTranslation=new Intl.Locale(e),this._localeForFormatting=("string"==typeof(n=t??e)&&(n=new Intl.Locale(n)),"ar"===n.baseName?new Intl.Locale(n,{numberingSystem:"latn"}):n),this._localeForURLPath=d(e),this._relativeTimeFormat=null,this._dateTimeFormats.clear(),this._pluralRules=null,this._translations=i}getLocaleForTranslation(){return this._localeForTranslation.baseName}getLocaleForFormatting(){return this._localeForFormatting.baseName}getLocaleForURLPath(){return this._localeForURLPath.baseName}getLocaleForSmartling(){const e=this._localeForTranslation.baseName;return a()[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 i=e in this._translations?this._translations[e]:e;let r="";if("string"!=typeof i){const e=t[0],n=i[this.getPluralKey(e)];void 0!==n?r=n:i.other&&(r=i.other)}else r=i;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 a={},s={};t.forEach(((e,t)=>{const i="object"!=typeof e||null===e||(0,n.isValidElement)(e)?[[t,e]]:Object.entries(e);for(const[e,t]of i)(0,n.isValidElement)(t)?s[e]=t:void 0!==t&&(a[e]=t)})),r=r.replace(p(Object.keys(a)),((e,t)=>{const i=t.slice(1,-1),n=a[i];return"number"==typeof n?this.formatNumber(n):n}));const o=Object.keys(s);return o.length?(0,n.createElement)(n.Fragment,null,r.split(p(o)).map(((e,t)=>{if(t%2){const t=e.slice(1,-1),i=s[t];return(0,n.cloneElement)(i,{key:i.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 i=t||{year:"numeric",month:"long",day:"numeric"};return this.getDateTimeFormat(i).format(e)}formatRelativeDate(e,t=null,i=new Date){const n=this.getRelativeTimeFormat(),r=e.getTime()-i.getTime(),a=Math.abs(r)<2592e6;if(null!==n&&a){const{weeks:e,days:t,hours:i,minutes:a,seconds:o}=(s=r,{seconds:Math.round(s/1e3),minutes:Math.round(s/1e3/60),hours:Math.round(s/1e3/60/60),days:Math.round(s/1e3/60/60/24),weeks:Math.round(s/1e3/60/60/24/7)});return Math.abs(t)>=7?n.format(e,"weeks"):Math.abs(i)>=24?n.format(t,"days"):Math.abs(a)>=60?n.format(i,"hours"):Math.abs(o)>=60?n.format(a,"minutes"):n.format(o,"seconds")}var s;return this.formatDate(e,t)}}},91543:(e,t,i)=>{"use strict";i.d(t,{$c:()=>r,QN:()=>n,oK:()=>a});const n={SHOW_ABOUT_RECS_MODAL:"SHOW_ABOUT_RECS_MODAL",HIDE_ABOUT_RECS_MODAL:"HIDE_ABOUT_RECS_MODAL"},r=()=>({type:n.SHOW_ABOUT_RECS_MODAL}),a=()=>({type:n.HIDE_ABOUT_RECS_MODAL})},54316:(e,t,i)=>{"use strict";i.d(t,{DP:()=>a,QN:()=>n,Uu:()=>r});const n={SHOW_ABOUT_SPOTIFY_MODAL:"SHOW_ABOUT_SPOTIFY_MODAL",HIDE_ABOUT_SPOTIFY_MODAL:"HIDE_ABOUT_SPOTIFY_MODAL"},r=()=>({type:n.SHOW_ABOUT_SPOTIFY_MODAL}),a=()=>({type:n.HIDE_ABOUT_SPOTIFY_MODAL})},53851:(e,t,i)=>{"use strict";i.d(t,{QN:()=>n,Rb:()=>s,Tf:()=>a,eK:()=>r});const n={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:n.SHOW_AGE_RESTRICTION_MODAL,dialog:e}),a=e=>({type:n.GET_AGE_RESTRICTION_MODAL,uri:e}),s=()=>({type:n.HIDE_AGE_RESTRICTION_MODAL})},74509:(e,t,i)=>{"use strict";i.d(t,{Ai:()=>s,NM:()=>r,gK:()=>n,zL:()=>a});const n={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:n.ANONYMOUS_PREMIUM_CLICK}),a=()=>({type:n.ANONYMOUS_LOGIN_CLICK}),s=()=>({type:n.ANONYMOUS_SIGNUP_CLICK})},35293:(e,t,i)=>{"use strict";i.d(t,{QN:()=>n,Qo:()=>s,io:()=>a,xM:()=>r});const n={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:n.SHOW_DUPLICATE_TRACKS_DIALOG,...e}),a=(e,t,i)=>({type:n.CHECK_DUPLICATE_TRACKS,playlistUri:e,uris:t,position:i}),s=()=>({type:n.HIDE_DUPLICATE_TRACKS_DIALOG})},22807:(e,t,i)=>{"use strict";i.d(t,{FS:()=>r,QN:()=>n,ku:()=>a});const n={SHOW_LICENSES_MODAL:"SHOW_LICENSES_MODAL",HIDE_LICENSES_MODAL:"HIDE_LICENSES_MODAL"},r=()=>({type:n.SHOW_LICENSES_MODAL}),a=()=>({type:n.HIDE_LICENSES_MODAL})},49239:(e,t,i)=>{"use strict";i.d(t,{d:()=>r,g:()=>n});const n={LOG_OPEN_ANALYTICS_EVENT:"LOG_OPEN_ANALYTICS_EVENT",LOG_INTERACTION:"LOG_INTERACTION"},r=e=>({type:n.LOG_INTERACTION,logData:e})},17518:(e,t,i)=>{"use strict";i.d(t,{tS:()=>l,MW:()=>c,rD:()=>a,fj:()=>o,CZ:()=>r,VR:()=>s,gK:()=>n});const n={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",i="")=>({type:n.PLAYBACK_ERROR,name:e,source:t,message:i}),a=e=>({type:n.DEVICE_INFO_CHANGED,deviceInfo:e}),s=e=>({type:n.SET_ACTIVE_DEVICE,id:e}),o=(e="unknown")=>({type:n.HARMONY_MAX_SUBSCRIPTIONS_REACHED,source:e}),l=()=>({type:n.CDM_ERROR,name:n.CDM_ERROR}),c=()=>({type:n.PLAYBACK_CLEAR_DATA})},83172:(e,t,i)=>{"use strict";i.d(t,{Jz:()=>a,SC:()=>r,gK:()=>n,jG:()=>s});const n={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:n.REQUEST_SEO_EXPERIMENT_DATA,uri:e}),a=e=>({type:n.SET_SEO_EXPERIMENT_DATA,data:e}),s=()=>({type:n.SET_SEO_EXPERIMENT_ERROR})},67900:(e,t,i)=>{"use strict";i.d(t,{zA:()=>l,gK:()=>s});var n=i(26119);let r=function(e){return e.RTL="rtl",e.LTR="ltr",e}({});const a=e=>{document.documentElement.setAttribute("dir",e)};let s=function(e){return e.SET_RTL_MODE="SET_RTL_MODE",e}({});const o=e=>{e===r.RTL?a(r.RTL):a(r.LTR)},l=e=>{const t=(e=>n.IB[e]?.isRTL?r.RTL:r.LTR)(e);return o(t),i=t===r.RTL,{type:s.SET_RTL_MODE,isRTL:i};var i}},90751:(e,t,i)=>{"use strict";i.d(t,{A9:()=>J,BU:()=>y,BY:()=>M,BZ:()=>b,DH:()=>P,Gz:()=>_,H2:()=>v,Ih:()=>q,Jp:()=>a,KB:()=>F,Kc:()=>ae,Kf:()=>Z,Kk:()=>O,MB:()=>H,O:()=>o,O2:()=>z,OB:()=>c,P0:()=>j,QK:()=>G,YF:()=>ne,Yk:()=>W,Yp:()=>R,_3:()=>K,_P:()=>l,aP:()=>p,ae:()=>I,as:()=>B,aw:()=>d,b0:()=>$,c$:()=>u,cQ:()=>X,cd:()=>V,dK:()=>w,e$:()=>E,eH:()=>re,eN:()=>ie,f:()=>A,ft:()=>Q,gK:()=>n,hp:()=>k,j4:()=>S,k0:()=>s,kC:()=>x,lM:()=>te,mE:()=>h,mi:()=>D,np:()=>N,p5:()=>ee,pf:()=>r,rF:()=>T,rN:()=>C,us:()=>Y,wi:()=>L,xF:()=>f,yh:()=>m,yk:()=>U,zj:()=>g});const n={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",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_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:n.COPY_LINK_SUCCESS,link:e}),a=()=>({type:n.SHOW_L2L_MODAL}),s=()=>({type:n.HIDE_L2L_MODAL}),o=e=>({type:n.OPEN_DELETE_PLAYLIST_DIALOG,uri:e}),l=()=>({type:n.CLOSE_DELETE_PLAYLIST_DIALOG}),c=(e,t)=>({type:n.OPEN_DELETE_FOLDER_DIALOG,uri:e,onDeleteCallback:t}),u=()=>({type:n.CLOSE_DELETE_FOLDER_DIALOG}),d=(e,t=!1)=>({type:n.OPEN_REMOVE_FROM_LIBRARY_DIALOG,uri:e,isPrerelease:t}),m=()=>({type:n.CLOSE_REMOVE_FROM_LIBRARY_DIALOG}),p=e=>({type:n.OPEN_LEAVE_PLAYLIST_DIALOG,playlistUri:e}),h=()=>({type:n.CLOSE_LEAVE_PLAYLIST_DIALOG}),g=(e,t)=>({type:n.OPEN_BLOCK_USER_DIALOG,uri:e,name:t}),f=()=>({type:n.CLOSE_BLOCK_USER_DIALOG}),v=(e=null)=>({type:n.OPEN_SIGNUP_PROMPT_DIALOG,uri:e}),y=()=>({type:n.CLOSE_SIGNUP_PROMPT_DIALOG}),b=()=>({type:n.HIDE_UNSUPPORTED_MESSAGE}),_=e=>({type:n.SHOW_UNSUPPORTED_MESSAGE,message:e}),E=()=>({type:n.HIDE_PLAYBACK_NOT_SUPPORTED_MODAL}),C=()=>({type:n.SHOW_PLAYBACK_NOT_SUPPORTED_MODAL}),x=()=>({type:n.HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL}),S=()=>({type:n.SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL}),A=()=>({type:n.OPEN_FULLSCREEN_MODE}),T=()=>({type:n.CLOSE_FULLSCREEN_MODE}),I=()=>({type:n.CONNECT_DEVICE_PICKER_OPENED}),N=()=>({type:n.CONNECT_DEVICE_PICKER_CLOSED}),w=()=>({type:n.SHOW_CONNECT_NUDGE}),R=()=>({type:n.HIDE_CONNECT_NUDGE}),k=e=>({type:n.UPDATE_UI_HISTORY_STATE,historyState:e}),O=()=>({type:n.ENTER_FULLSCREEN}),P=()=>({type:n.LEAVE_FULLSCREEN}),L=e=>({type:n.SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY,isOpen:e}),j=(e,t)=>({type:n.SHOW_TRACK_CREDITS,isOpen:e,trackUri:t}),D=()=>({type:n.SHOW_S2L_MODAL}),M=()=>({type:n.HIDE_S2L_MODAL}),U=()=>({type:n.INITIALISE_QUICKSILVER}),B=()=>({type:n.TRIGGER_CLICK_DEPRECATION_MESSAGE}),F=()=>({type:n.OPEN_REMOVE_DOWNLOADS_DIALOG}),H=()=>({type:n.CLOSE_REMOVE_DOWNLOADS_DIALOG}),V=()=>({type:n.OPEN_CLEAR_CACHE_DIALOG}),G=()=>({type:n.CLOSE_CLEAR_CACHE_DIALOG}),z=(e,t)=>({type:n.OPEN_RENAME_FOLDER_MODAL,name:e,handleRename:t}),W=()=>({type:n.CLOSE_RENAME_FOLDER_MODAL}),K=e=>({type:n.OPEN_BOOK_CONSUMPTION_CAP_MODAL,consumptionCapExplanation:e}),Y=()=>({type:n.CLOSE_BOOK_CONSUMPTION_CAP_MODAL}),q=(e,t,i,r)=>({type:n.OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG,uri:e,onConfirm:t,onCancel:i,remoteDeviceInfo:r}),Z=()=>({type:n.CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG}),$=e=>({type:n.OPEN_DSA_DIALOG,item:e}),Q=()=>({type:n.CLOSE_DSA_DIALOG}),J=(e,t,i)=>({type:n.OPEN_JAM_MODAL,modalType:e,joinToken:t,memberToRemove:i}),X=()=>({type:n.CLOSE_JAM_MODAL}),ee=e=>({type:n.OPEN_ARTIST_ABOUT_DIALOG,data:e}),te=()=>({type:n.CLOSE_ARTIST_ABOUT_DIALOG}),ie=()=>({type:n.OPEN_YOUR_DJ_UPSELL_MODAL}),ne=()=>({type:n.CLOSE_YOUR_DJ_UPSELL_MODAL}),re=(e,t)=>({type:n.OPEN_SHOW_RATING_MODAL,uri:e,metadata:t}),ae=()=>({type:n.CLOSE_SHOW_RATING_MODAL})},6313:(e,t,i)=>{"use strict";i.d(t,{Df:()=>l,HM:()=>h,XX:()=>g,Y:()=>c});var n=i(41978),r=i(11808),a=i(56105),s=i(2435),o=i(63135);function l(e){return"video"===e.mediaType}function c(e){return e.isPodcastAd}function u(e){return null!=e&&""!==e}function d(e){return u(e)&&"#"!==e}function m(e,...t){return t.find(e)??null}function p(...e){return m(u,...e)}function h(...e){const t=m(d,...e);return t?(0,a.H)(t):t}function g(e){const t=(0,n.d4)((e=>e.ads?.vto?.info??null)),i=(0,n.d4)((e=>e.ads?.audio?.info??null)),u=(0,s.o)((e=>e?.context),((e,t)=>e?.uri===t?.uri));if(!(0,o.N)(e))return null;const{advertiser:d,url:m,title:g}=e,f=r.Ru.get("ad-formats.advertisement"),v=r.Ru.get("ad-formats.learnMore");if(c(e)){const e=u?.metadata?.context_description||d||v;return{title:p(g,t?.advertiser,i?.buttonMessage)??f,subtitle:e,url:h(t?.clickUrl,i?.clickUrl,m),blurbUri:u?.metadata?.context_description&&e===u?.metadata.context_description&&u.uri?(0,a.H)(u.uri):void 0}}if(l(e))return{title:t?.advertiser??f,subtitle:t?.buttonMessage??v,url:h(t?.clickUrl,m)};const y=!0===i?.isFeaturedActionPlay?r.Ru.get("ad-formats.playTrack"):null;return{title:d||f,subtitle:p(i?.buttonMessage,y)??v,url:h(i?.clickUrl,m)}}},32622:(e,t,i)=>{"use strict";i.d(t,{L:()=>s});var n=i(96705),r=i(24226),a=i(39733);const s=e=>{const t=(0,r.dY)(),i=(0,a.vh)(),s=t.getInStreamAd();return{logAdFeedback:function(t){i.send((0,n.F)({ad_id:e.id,advertiser:e.advertiser,creative_id:s?.adId===e.id?s?.metadata?.creative_id:void 0,format:e.mediaType,line_item_id:s?.adId===e.id?s?.metadata?.lineitem_id:void 0,event:t}))}}}},10642:(e,t,i)=>{"use strict";i.d(t,{Mj:()=>s,iz:()=>l,q5:()=>o});var n=i(11808),r=i(6313),a=i(24226);function s(e){return(0,r.Df)(e)?"video":"audio"}function o(e){return(0,r.Y)(e)?"podcast":"music"}function l(e){const t=(0,a.dY)().getInStreamAd(),i=t?.metadata?.logoImage,s=t?.metadata?.buttonMessage,o=t?.metadata?.tagline,l=t?.clickthroughUrl,{url:c}=e,u=e.metadata?.advertiser,d=u||null,m=n.Ru.get("ad-formats.advertisement");if((0,r.Y)(e)){return{title:d,subtitle:m,url:(0,r.HM)(l,c),tagline:o,buttonMessage:s,logoImage:i}}return(0,r.Df)(e),{title:d,subtitle:m,url:(0,r.HM)(l,c),tagline:o,buttonMessage:s,logoImage:i}}},47927:(e,t,i)=>{"use strict";i.d(t,{V_:()=>o,ZY:()=>l,b6:()=>c,x0:()=>u,$L:()=>d});var n=i(23956),r=i(35657),a=i(40312),s=i(38481);i(39477);const o=e=>e.build().withHost(s.Yt).withPath("/mock/list").withEndpointIdentifier("/mock/list").withoutMarket().withoutGlobalHeaders().withoutAuthorization().send(),l=async e=>{const t=a.n.getInstance();return(await t.build().withMethod("POST").withHost(s.MW).withPath("/dsa-metadata").withEndpointIdentifier("/dsa-metadata").withBody(JSON.stringify(e)).withoutMarket().send()).body},c=(e,t,i,a,o=!1)=>{const l=o?"/leavebehinds/mock/ads":"/leavebehinds/ads";return e.build().withMethod("POST").withHost(s.I9).withPath(l).withEndpointIdentifier(l).withBody(JSON.stringify({surface:t,uri:i,playlistTitle:a,maxAds:(0,r.NI)((0,n.O$)(t))})).withoutMarket().send()},u=e=>a.n.getInstance().build().withHost(s.ip).withPath(`/sponsored/${e}`).withEndpointIdentifier("sponsored/{playlistUri}").send(),d=async()=>{const e=a.n.getInstance();return(await e.build().withHost(s.MR).withMethod("GET").send()).body}},39477:(e,t,i)=>{"use strict";i.d(t,{r:()=>a});var n=i(40312),r=i(38481);async function a(){return(await function(e,t){const i=(e||n.n.getInstance()).build();return(t?i.withHeaders(t):i).withHost(r.oD).withPath("/v2/config").withEndpointIdentifier("/v2/config").send()}()).body}},23956:(e,t,i)=>{"use strict";i.d(t,{Fh:()=>a,O$:()=>r,ui:()=>n});let n=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 n.UNKNOWN;case 1:case"PODCAST_SCROLL_NPV":return n.PODCAST_SCROLL_NPV;case 2:case"SHOW_PAGE":return n.SHOW_PAGE;case 3:case"EPISODE_PAGE":return n.EPISODE_PAGE;case 7:case"PODCAST_SEE_ALL":return n.PODCAST_SEE_ALL;case 4:case"MUSIC_NPV":return n.MUSIC_NPV;case 5:case"PLAYLIST":return n.PLAYLIST;case 6:case"MUSIC_SEE_ALL":return n.MUSIC_SEE_ALL;default:return n.UNRECOGNIZED}}function a(e){switch(e){case n.UNKNOWN:return"UNKNOWN";case n.PODCAST_SCROLL_NPV:return"PODCAST_SCROLL_NPV";case n.SHOW_PAGE:return"SHOW_PAGE";case n.EPISODE_PAGE:return"EPISODE_PAGE";case n.PODCAST_SEE_ALL:return"PODCAST_SEE_ALL";case n.MUSIC_NPV:return"MUSIC_NPV";case n.PLAYLIST:return"PLAYLIST";case n.MUSIC_SEE_ALL:return"MUSIC_SEE_ALL";case n.UNRECOGNIZED:default:return"UNRECOGNIZED"}}},95527:(e,t,i)=>{"use strict";i.d(t,{c:()=>r});var n=i(33304);function r(e){return`${(0,n.jV)(e)}/ads`}},98567:(e,t,i)=>{"use strict";i.d(t,{q:()=>r});var n=i(33304);function r(e){return`${(0,n.P8)(e)}/ads`}},58490:(e,t,i)=>{"use strict";i.d(t,{E2:()=>c,KS:()=>o,PS:()=>r,QN:()=>n,Wv:()=>l,ZQ:()=>a,c3:()=>s,lb:()=>d,qO:()=>u});const n={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:n.SHOW_BILLBOARD_AD_VIEW,data:e}),a=()=>({type:n.FINISH_BILLBOARD_AD_VIEW}),s=()=>({type:n.HIDE_BILLBOARD_AD_VIEW}),o=()=>({type:n.MINIMIZE_BILLBOARD_AD_VIEW}),l=()=>({type:n.CLICK_BILLBOARD_AD_VIEW}),c=()=>({type:n.IMAGE_LOADED_BILLBOARD_AD_VIEW}),u=()=>({type:n.ERROR_BILLBOARD_AD_VIEW}),d=()=>({type:n.MANAGER_MINIMIZE_BILLBOARD_AD_VIEW})},12862:(e,t,i)=>{"use strict";i.d(t,{R:()=>n,g:()=>r});const n="LEGACY_HPTO_CONTAINER_MOUNTED",r=({template:e})=>({type:n,template:e})},78007:(e,t,i)=>{"use strict";i.d(t,{$:()=>n});class n{parsePreview({metadata:e,display:t,requestId:i}){const{creative_id:n,gid:r}=e,a={creativeId:parseInt(n,10),gid:r,hpto:JSON.parse(t[0]&&t[0].text||"")},s=a.hpto||a;let o=null;const l=s.html&&-1!==s.html.search(/id="native-elements"/),c=!s.html&&"html"===s["banner-mode"];if(l?o=this.handleNativeEl(s):c&&(o=this.renameImageBannerField(s)),o=o||s,o.bannerMode=o["banner-mode"],!o.bannerMode)throw new TypeError("hpto data looks invalid");const u=this.createInteractiveIframe(o.html);return{...o,adPlaybackId:i,loaderFrame:u}}isPreviewServiceAd({metadata:e}){return!!e&&"true"===e.is_preview}getKeyByValue(e,t){return Object.keys(t).find((i=>t[i]===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 i="";const n=t.getElementById("native-elements"),r=this.getKeyByValue("html",e);return["data-is-spotlight","data-is-exclusive","data-is-sponsored"].some((e=>(n&&n.hasAttribute(e)&&(i=e),i))),i=i.split("-").pop()||"",delete e[r],Object.assign({},e,{version:2,badge:i,"banner-mode":"native",blurb:n&&n.getAttribute("data-blurb"),"target-uri":n&&n.getAttribute("data-uri"),playBtnUri:n&&n.getAttribute("data-track-override")})}createInteractiveIframe(e){const t=encodeURIComponent(e),i=document.createElement("iframe");return i.className="ad-iframe",i.src=`data:text/html;charset=utf-8,${t}`,i.srcdoc=e,i.scrolling="no",i.marginWidth="0",i.marginHeight="0",i}}},60430:(e,t,i)=>{"use strict";i.d(t,{Q:()=>n});const n={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"}},46189:(e,t,i)=>{"use strict";i.d(t,{$4:()=>s,$t:()=>c,BH:()=>_,DZ:()=>g,Fi:()=>v,IH:()=>u,Q5:()=>h,Q6:()=>a,QL:()=>p,QN:()=>n.Q,Yg:()=>m,Z6:()=>l,bK:()=>o,bW:()=>d,i2:()=>y,t3:()=>r,yF:()=>b,zi:()=>f});var n=i(60430);i(32493);const r="HPTO_COMPONENT_MOUNTED",a="HPTO_LOG_EVENT",s="HPTO_LOG_ERROR_EVENT",o=e=>({type:n.Q.GOT_TEMPLATE,data:e}),l=()=>({type:n.Q.HPTO_CONTAINER_MOUNTED}),c=e=>({type:r,element:e}),u=e=>({type:n.Q.HPTO_COMPONENT_UNMOUNTED,data:{clearCreative:e}}),d=()=>({type:n.Q.HPTO_COMPONENT_NEW_AD_RENDERED}),m=()=>({type:n.Q.FETCH_CREATIVE}),p=()=>({type:n.Q.FETCHING_CREATIVE}),h=e=>({type:n.Q.GOT_CREATIVE,data:e}),g=e=>({type:n.Q.SET_HPTO_PREVIEW,data:e}),f=()=>({type:n.Q.HPTO_PREVIEW_HOME_NAVIGATION}),v=()=>({type:n.Q.CREATIVE_FETCH_FAILED}),y=(e,t="")=>({type:a,event:e,context:t}),b=e=>({type:s,error:e}),_=()=>({type:n.Q.DEBUG_FORCE_REFRESH_HPTO})},32493:(e,t,i)=>{"use strict";i.d(t,{T:()=>r});var n=i(60430);const r=()=>({type:n.Q.HPTO_CONTAINER_LOAD})},4973:(e,t,i)=>{"use strict";i.d(t,{$F:()=>s,Dr:()=>l,KI:()=>d,V0:()=>u,YO:()=>m,nC:()=>h,t$:()=>p,uW:()=>c,ye:()=>g});var n=i(42551),r=i(27834);const a=[r.G.NATIVE,r.G.IMAGE,r.G.HTML],s=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,m=(0,n.Mz)((e=>e.ads.hpto?.creative||null),(e=>e.ads.hpto?.preview||null),((e,t)=>t||e)),p=(0,n.Mz)(m,c,o,((e,t,i)=>{if(!e)return!1;return!(!a.includes(e.bannerMode)||t&&i)})),h=(0,n.Mz)(c,o,((e,t)=>!e||!t)),g=(0,n.Mz)(m,(e=>!!e&&a.includes(e.bannerMode)))},29519:(e,t,i)=>{"use strict";i.d(t,{DD:()=>v,Ei:()=>p,Lc:()=>y,Rl:()=>s,Uh:()=>u,Um:()=>r,Uy:()=>n,Xv:()=>l,i2:()=>b,lj:()=>m,nk:()=>a,tb:()=>h,uP:()=>d,uU:()=>f,wz:()=>_,zB:()=>o,zV:()=>g,zc:()=>c});const n="REQUEST_SPONSORED_PLAYLISTS",r="REQUEST_SPONSORED_PLAYLISTS_SUCCESS",a="REQUEST_SPONSORED_PLAYLIST_AD",s="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:a,playlistUri:e}),m=e=>({type:r,sponsorships:e}),p=e=>({type:"REQUEST_SPONSORED_PLAYLISTS_FAILURE",error:e}),h=()=>({type:l}),g=()=>({type:c}),f=()=>({type:n}),v=(e,t)=>({type:s,playlistUri:e,ad:t}),y=e=>({type:u,previewAd:e}),b=e=>({type:o,message:e}),_=e=>({type:"REQUEST_SPONSORED_PLAYLIST_AD_FAILURE",error:e})},15991:(e,t,i)=>{"use strict";i.d(t,{MW:()=>a,Oc:()=>r,Pu:()=>o,QN:()=>n,W_:()=>s,gW:()=>c,i2:()=>l,iB:()=>u});const n={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:n.MINIMIZE_VIDEO_AD_VIEW}),a=()=>({type:n.MAXIMIZE_VIDEO_AD_VIEW}),s=()=>({type:n.HIDE_VIDEO_AD_VIEW}),o=()=>({type:n.SHOW_VIDEO_AD_VIEW}),l=(e,t,i)=>({type:n.VTO_LOG_EVENT,event:e,eventReason:t,eventSource:i}),c=e=>({type:n.VTO_SET_INFO,info:e}),u=()=>({type:n.VTO_NAVIGATION_CHANGE})},95338:(e,t,i)=>{"use strict";i.d(t,{adsCoreConnector:()=>m,lv:()=>c,settingsClient:()=>l,slotsClient:()=>s});var n=i(11928);const r=(0,i(62683).X)(),a=new n.CJ(r),s=new n.Dt(r),o=new n.Xk(r),l=new n.B3(r),c=new n.NB(r),u=new n.RI(r),d=new n.Yl(r);const m=new class{addNewSlot(e,t){return s.createSlot(n.Ym.fromPartial({slotId:e}))}clearSlot(e){return s.clearAllAds({slotId:e})}enableSlot(e){return l.updateSlotEnabled(n.S9.fromPartial({slotId:e,enabled:!0}))}async fetchAdForSlot(e){const t=(await a.getAds(n.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 s.fetchSlot({slotId:e,targetingMap:t})}getSlotSettings(e){return l.getSlotSettings({slotId:e})}increaseStreamTime(e){return d.addPlaytime({seconds:e})}overrideCountry(e){return d.requestOverride({key:"country",value:e})}putTargeting(e){return o.putTargeting(e)}subscribeToInStreamAds(e){return u.subInStream({},e)}subscribeToSlot(e,t){return s.subSlot(n.SubSlotRequest.fromPartial({slotId:e}),(e=>t(e)))}triggerSlot(e){return s.triggerSlot({slotId:e})}}},68280:(e,t,i)=>{"use strict";i.d(t,{l:()=>n});const n=(0,i(41363).h)()},50501:(e,t,i)=>{"use strict";function n(...e){return console.log("cosmos-connector: ",...e),e}i.d(t,{e:()=>n})},6021:(e,t,i)=>{"use strict";i.d(t,{Q:()=>S});var n=i(5681),r=i(68280),a=i(50501),s=i(62683);const o=new n.EW((0,s.X)()),l={"Content-Type":"application/json"};function c(e){return{...e,clickthrough:e.clickthroughUrl,trackingEvents:e.trackingEvents,metadata:{...e,creative_id:e.creativeId,lineitem_id:e.lineitemId},display:e.displayImage}}const u=Date.now(),d="https://spclient.wg.spotify.com/ads/v1/ads",m="https://spclient.wg.spotify.com/sponsoredplaylist/v1/sponsored",p="sp://ads/v1/slots",h="sp://ads/v1/settings",g=`${h}/request_header`,f="sp://ads/v1/state",v="sp://ads/v2/state",y=["audio","video","banner"];let b=d,_=m;function E(e,t){r.l.sub("sp://ads/v1/formats/"+e,(e=>{t(e)}))}function C(e){return r.l.get(`${h}/${e}`,l)}function x(e,t){return r.l.post(`${p}/${e}/${t}`,{},l)}const S={subscribeToFormat:E,getSlotConfigurations:C,subscribeToAdsProductState:function(e){return o.subValues(n.cF.fromPartial({}),(t=>{t.pairs.ads&&e({ads:t.pairs.ads})}))},subscribeToProductState:function(e,t){return o.subValues(n.cF.fromPartial({}),(i=>{i.pairs[e]&&t({[e]:i.pairs[e]})}))},getAdSlotConfig:e=>C(e).then((t=>t.settings.filter((t=>t.id===e))[0])),getAdForSlot(e,t,i){(0,a.e)("fetch ad for slot=%o, localTargeting=%o",t,e,b);const n=b!==d?b:`${b}/${t}`;return r.l.get(n,{targeting:e,pod:{},session_id:u,overrides:i||{}},{}).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 i=`sp://ads/v1/ads/${e}`;(0,a.e)("fetchAdForSlot endpoint=%o",i);return r.l.get(i,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,a.e)("Requesting preview ad, adid=%o",e),r.l.post(`sp://ads/v1/preview/${e}`,{})),overrideCountry:e=>((0,a.e)("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){y.map((t=>{E(t,(i=>{e(t,i)}))}))},subscribeToEvent:function(e,t,i,n){return r.l.sub((e=>`sp://ads/v1/events/${e}`)(e),t,i,n)},postEvent:function(e,t,i){const n=`sp://ads/v1/events/${t}/${e}`;if(i&&i.event_data){if(Object.keys(i.event_data).some((e=>"string"!=typeof i.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(n,i||{},l)},postToSlot(e,t,i){const n=`${p}/${e}/${t}`;return r.l.post(n,i||{},l)},getSlotConfiguration:(e,t)=>window.Ads&&window.Ads.adFormatOverrides.billboardShowAfterSeconds?Promise.resolve(window.Ads.adFormatOverrides.billboardShowAfterSeconds):C(e).then((i=>{let n;return i.settings.forEach((i=>{i.id===e&&(n=i[t])})),n})),configureSlot:(e,t,i)=>r.l.put(`${h}/${e}/${t}`,{value:i},l),enableSlot:e=>r.l.put(`${h}/${e}/slot_enabled`,{value:!0},l),getSponsorshipAd(e){const t=_!==m?_:`${m}/${e}`;return(0,a.e)("getSponsorshipAd",t),r.l.get(t)},subToState(e){r.l.sub(f,e)},subToAdState(e){r.l.sub(v,e)},getState:()=>r.l.get(f),getAdState:()=>r.l.get(v),getFeatureFlags:e=>r.l.post("sp://abba/v1/flags",{flags:e},l),setAdSlotEndpoint(e){b=e,(0,a.e)("setAdSlotEndpoint",e)},setAdStatePusherEndpoint:e=>((0,a.e)("setAdStatePusherEndpoint",e),r.l.put("sp://ads/v2/settings/state/ad_state_endpoint",{value:e},l)),setSponsoredUri(e){_=e,(0,a.e)("setSponsoredUri",e)},triggerSlotFetch:e=>x(e,"fetch"),triggerSlotPlay:e=>x(e,"now"),triggerSlotClear:e=>x(e,"clear"),triggerSlotClearAll:e=>x(e,"clear_all"),setRequestHeader:(e,t,i)=>r.l.put(`${g}/${e}`,{value:t,refresh_inventory:i},l),removeRequestHeader:(e,t)=>r.l.del(`${g}/${e}`,{refresh_inventory:t},l),setAdStateKey:(e,t)=>r.l.put(`${v}/${e}`,{value:t},l),setAdState:e=>r.l.put(`${v}`,e,l),loadAdPod:e=>((0,a.e)("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,a.e)("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)},getEpisodeSponsors:async(...e)=>{const t=globalThis;if("function"==typeof t.getEpisodeSponsorsOverride)return await t.getEpisodeSponsorsOverride(...e);const[i,n]=e;if(!i)throw new Error("episodeBase62Id invalid for getting episode sponsors");const a=((...[e,t])=>`https://spclient.wg.spotify.com/podcast-ap4p/${2===t?.version?"v2/episodeSponsors":"rawSponsoredSection"}/${e}${2===t?.version?"?responseFormat=json":""}`)(...e);if(2===n?.version){return(await r.l.get(a)).ads.map(c)}return await r.l.get(a)},getShowSponsors:async(...e)=>(await r.l.get(((...[e])=>`https://spclient.wg.spotify.com/podcast-ap4p/showSponsors/${e}?responseFormat=json`)(...e))).ads.map(c)}},48013:(e,t,i)=>{"use strict";i.d(t,{o:()=>r});const n="https://admocker.spotify.com";function r(e,t){return`${n}/mock/ad?test_case=${e}&session_id=${t}`}},99629:(e,t,i)=>{"use strict";i.d(t,{DB:()=>_,zI:()=>C});var n=i(73075),r=i.n(n),a=i(47927),s=i(95338),o=i(50501),l=i(6021),c=i(48013);const u="podcast_midroll_15_clickthrough",d="podcast-midroll-1",m={segments:[{slot:d,start:3e4,stop:45e3,targeting:{maxads:"1"},admockerTestCase:u}]};const p=["Loftie","HBOMax","Squarespace","Casper","Smile Direct Club","Test Advertiser #6","Test Advertiser #7"],h=async()=>p.map(((e,t)=>({clickthrough:"https://www.spotify.com/",display:"https://open.spotifycdn.com/cdn/images/logo-complete-black.573d8227.svg",metadata:{adId:`test ad id ${t}`,displayImage:"https://open.spotifycdn.com/cdn/images/logo-complete-black.573d8227.svg",clickthroughUrl:`test clickthroughUrl ${t}`,advertiser:e,lineitem_id:`test lineitem id ${t}`,lineitemId:`test lineitem id ${t}`,buttonMessage:`test button message ${t}`,creative_id:`test creative id ${t}`,creativeId:`test creative id ${t}`,featuredAction:`test featured action ${t}`,logoImage:"http://i.scdn.co/image/86a0078ff798be6840aec841e7fbd2da2acea75d",tagline:`test tagline ${t}`},trackingEvents:{clicked:["https://xpui.app.spotify.com/index.html"],viewed:["https://xpui.app.spotify.com/index.html"]}})));var g=i(40312);let f;function v(e){return s.adsCoreConnector.increaseStreamTime(e)}async function y(e,t){const n=Array.isArray(e)?e:[e],{settingsClient:r}=await Promise.resolve().then(i.bind(i,95338));await r.updateAdServerEndpoint({slotIds:n,url:t}),b()}function b(){f?._debugForceRefreshHpto?.()}const _={getMocksList:async function(){return(0,a.V_)(g.n.getInstance())},overrideCountry:function(e){return s.adsCoreConnector.overrideCountry(e)},patchTargeting:function(e,t){return l.Q.patchTargeting(e,t)},increaseStreamTime:v,getAdServerEndpoint:function(e){return l.Q.getSlotConfigurations(e).then((e=>e.settings[0].ad_server_endpoint))},overrideAdServerEndpoint:y,overrideAdSlotEndpoint:function(e){return l.Q.setAdSlotEndpoint(e)},overrideAdStatePusherEndpoint:function(e){return l.Q.setAdStatePusherEndpoint(e)},overrideSponsoredPlaylistEndpoint:function(e){l.Q.setSponsoredUri(e),f?.overrideSponsoredPlaylistEndpoint?.()},_debugForceRefreshHpto:b,manualPodLoad:function(e){return(0,o.e)("manualPodLoad(): pod=%o",e),l.Q.loadAdPod(e)},setAdServerEndpoint:async function(e,t,i){const n="ad_server_endpoint",r=await l.Q.getSlotConfigurations(e);let a="";return r?.settings?.[0]?.[n]&&(a=r.settings[0][n].replace("https://pubads.g.doubleclick.net",t)),a+=`&session_id=${i}`,l.Q.configureSlot(e,n,a)},clearSlot:function(e){return s.adsCoreConnector.clearSlot(e)},triggerSlot:async function(e){return s.adsCoreConnector.triggerSlot(e)},subToFormats:function(e){return l.Q.subscribeToAllFormats(((t,i)=>{e?e(t,i):(0,o.e)("config for slot=%o, res=%o",t,i)}))},subToState:function(e){return l.Q.subToState((t=>{e?e(t):(0,o.e)("legacy ads state updated: %o",t)}))},subToAdState:function(e){l.Q.subToAdState((t=>{e?e(t):(0,o.e)("ad state updated: %o",t)}))},getState:function(e){return l.Q.getState().then((t=>(e?e(t):(0,o.e)("legacy ads state: %o",t.state),t)))},getAdState:function(e){return l.Q.getAdState().then((t=>{e?e(t):(0,o.e)("ad state: %o",t)}))},configureSlot:function(e,t,i){return l.Q.configureSlot(e,t,i)},debug:o.e,getAdSlotConfigurations:function(e,t){l.Q.getSlotConfigurations(e).then((i=>{t?t(i):(0,o.e)("config for slot=%o, res=%o",e,i)}))},setRequestHeader:function(e,t,i){return l.Q.setRequestHeader(e,t,i)},removeRequestHeader:function(e,t){return l.Q.removeRequestHeader(e,t)},createSlotAndOverrideItsAdServerEndpoint:function(e,t){return l.Q.addNewSlot(e).then((()=>y(e,t))).catch((t=>(0,o.e)(`Problem creating and overriding ${e} slot, error=%o`,t)))},enableSlot:function(e){return l.Q.enableSlot(e)},queueVideoAd:function(){return Promise.all([s.adsCoreConnector.addNewSlot("stream","video"),s.adsCoreConnector.increaseStreamTime(1200),s.adsCoreConnector.putTargeting({targetingMap:{focus:"true",adbreak:"video,adscore"}})])},setBillboardTimeout(e){_.adFormatOverrides.billboardShowAfterSeconds=e},applyAdmockerForPodcastAd:function({podcastMetadata:e=m,sessionId:t="1",endpoint:i=(e=>(0,c.o)(e.admockerTestCase,t))}={}){return e.segments.forEach((e=>{const t="function"==typeof i?i(e):i;y(e.slot,t)})),l.Q.overridePodcastMetadata(e)},adFormatOverrides:{billboardShowAfterSeconds:null},overrideGetEpisodeSponsors:function(e=h){globalThis.getEpisodeSponsorsOverride=e}};let E=!1;function C(e){f=e,E||(r().unbind("shift+f5"),r().bind("shift+f5",(()=>{v(1200)})),E=!0,window.Ads=_)}},57893:(e,t,i)=>{"use strict";i.d(t,{P:()=>r,w:()=>a});var n=i(30758);const r=()=>e=>fetch(e,{mode:"no-cors"});function a(e){return(0,n.useMemo)((()=>e()),[e])}},36733:(e,t,i)=>{"use strict";i.d(t,{w:()=>s});var n=i(81987),r=i(19159),a=i(63135);const s=e=>{const t=(0,n.NC)(r.mPu,{loadingValue:!1});return!!e&&(0,a.N)(e)&&t&&"true"===e.metadata?.["ad.afi"]}},56105:(e,t,i)=>{"use strict";i.d(t,{H:()=>r});var n=i(61544);function r(e){const t=(0,n.o_)(e);return function(e){return null!==e}(t)?t.toURI():e}},27834:(e,t,i)=>{"use strict";i.d(t,{C:()=>n,G:()=>r});let n=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}({})},34594:(e,t,i)=>{"use strict";i.d(t,{R:()=>r,r:()=>n});const n={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(n),e=>e in n)},51306:(e,t,i)=>{"use strict";i.d(t,{V:()=>r,c:()=>n});let n=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.COVER_ART_EXPANDED="cover_art_expanded",e.COVER_ART_COLLAPSED="cover_art_collapsed",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}({})},53816:(e,t,i)=>{"use strict";i.d(t,{Lv:()=>o,Wh:()=>s,ee:()=>r,ei:()=>l});var n=i(65994);let r=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}({}),s=function(e){return e.CTA_BUTTON="cta_button",e.MINIMIZE_BUTTON="minimize_button",e.VIDEO_TAKEOVER="video_takeover",e}({}),o=function(e){return e.VIDEO_PLAYER="video_player",e}({});class l{enabled=!1;active=!1;subscriptions=[];fireImpressionOnStart=!1;constructor(e,t,i,n){this.focusState=e,this.videoTakeoverApi=t,this.inStreamApi=i,this.isNewAdsNpvEnabled=n}async enable(e){return this.enabled||(this.enabled=!0,this.listener=e,this.focusState.addFocusListener(this),this.isNewAdsNpvEnabled&&this.inStreamApi.enable(),this.subscriptions.push(this.videoTakeoverApi.subscribeToSlotType("stream",this.onAdMessage)),this.isNewAdsNpvEnabled&&this.subscriptions.push(this.inStreamApi.subscribeToInStreamAds())),null}async disable(){this.enabled&&(this.resetState(),this.enabled=!1,this.listener=void 0,this.resetSubscriptions(),this.focusState.removeAllFocusListeners(),this.isNewAdsNpvEnabled&&this.inStreamApi.disable())}logEvent(e,t,i){if(this.playbackState){const{eventData:n,extraData:r}=this.createEventData(this.playbackState);this.log(e,n,r,t,i)}}onRender(){this.logEvent(this.focusState.hasFocus()?a.FOREGROUNDED:a.BACKGROUNDED)}onFocusChanged(e){return e?this.handleApplicationGainedFocus():this.handleApplicationLostFocus()}parseInfo=e=>({id:e.id,advertiser:e.advertiser,buttonMessage:e.metadata.buttonMessage||null,clickUrl:e.click_url,companionAd:this.getPreferredCompanionAd(e)||null,skippableAdDelaySeconds:parseInt(e.metadata?.skippable_ad_delay,10)||0});isPreferred=e=>300===e.width&&250===e.height&&/^image\/(jpeg|png)$/.test(e.mime_type);getPreferredCompanionAd(e){const t=e.companion_ads||[];return t.filter(this.isPreferred).reduce(((e,t)=>t),t[t.length-1])}onAdMessage=e=>{if("video"===e.format&&this.listener)switch(e.event){case"available":break;case"play":{const t=e&&e.ad&&e.ad.metadata;this.fireImpressionOnStart=t&&"true"===t.fireImpressionOnStart,this.listener.onInfo(this.parseInfo(e.ad));break}default:throw new Error(`[VTO] Unsupported event type: ${e.event}`)}};createEventData(e){return{eventData:{volume:e.volume.toString(),duration:e.duration.toString()},extraData:{playback_position:Math.floor(1e3*e.position)}}}resetState(){this.playbackState=null}resetSubscriptions(){for(const e of this.subscriptions)e.cancel();this.subscriptions=[]}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={},i={},n,r){this.playbackState&&this.videoTakeoverApi.postEvent(this.playbackState.adId,e,{event_data:{clientReportedUserAgent:navigator.userAgent,...t},...i,...n&&{reason:n},...r&&{source:r}})}onCreated(e){this.active=!0,this.playbackState=e,this.listener&&this.listener.onCreated()}onEnded(e,t){this.active=!1,this.playbackState=e,n.mT.PLAYED_TO_END!==t||this.fireImpressionOnStart||this.logEvent(r.VIEWED),this.listener&&this.listener.onEnded(),this.playbackState=null}onStarted(e){this.playbackState=e,this.fireImpressionOnStart&&this.logEvent(r.VIEWED),this.listener&&this.listener.onStarted()}onStateUpdate(e){this.playbackState=e}onReady(){this.listener&&this.listener.onFirstReady()}getEnabled(){return this.enabled}}},55784:(e,t,i)=>{"use strict";i.d(t,{CJ:()=>r,D$:()=>s,F$:()=>a,NI:()=>o,vA:()=>l});var n=i(30296);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 a=(0,n.VP)(r.LIKE_AD),s=(0,n.VP)(r.CANCEL_LIKE_AD),o=(0,n.VP)(r.DISLIKE_AD),l=(0,n.VP)(r.CANCEL_DISLIKE_AD)},56437:(e,t,i)=>{"use strict";i.d(t,{N2:()=>s,Tt:()=>a});var n=i(42551);const r=e=>e.ads.adFeedback,a=(0,n.Mz)([e=>r(e),(e,t)=>t],((e,t)=>!(!t||e.adId!==t)&&e.liked)),s=(0,n.Mz)([e=>r(e),(e,t)=>t],((e,t)=>!(!t||e.adId!==t)&&e.disliked));(0,n.Mz)([e=>r(e),(e,t)=>t],((e,t)=>t&&e.adId===t?e.feedback:null))},68413:(e,t,i)=>{"use strict";i.d(t,{M:()=>Xe,x:()=>Je});var n={};i.r(n),i.d(n,{getAlbum:()=>ce});var r={};i.r(r),i.d(r,{getArtist:()=>ue,getArtistAlbums:()=>de});var a={};i.r(a),i.d(a,{getOnDemandPlaylists:()=>pe,getPlaylist:()=>me,getPlaylistPermissionForUser:()=>he});var s={};i.r(s),i.d(s,{getTrack:()=>fe});var o=i(39477);class l{constructor(e){this.cosmosConnector=e}postEvent(e,t,i){return this.cosmosConnector.postEvent(e,t,i)}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}}var c=i(11928),u=i(95338);const d=e=>"string"==typeof e;class m{constructor(e){this.cosmosConnector=e}async postEvent(e,t,i){const n=c.uk.fromPartial({adId:e,eventType:t,playbackPosition:"bigint"==typeof i.playback_position||"number"==typeof i.playback_position?BigInt(i.playback_position):void 0,eventReason:d(i.reason)?i.reason:void 0,eventSource:d(i.source)?i.source:void 0});return await u.lv.postEvent(n),Promise.resolve({event:"sent"})}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}}var p=i(6021),h=i(56105);class g{enabled=!1;subscriptions=[];constructor(e,t,i,n){this.audioApi=e,this.getContextAdInfo=t,this.inStreamApi=i,this.isNewAdsNpvEnabled=n}async enable(e){this.enabled=!0,this.onInfoCallback=e,this.isNewAdsNpvEnabled&&this.inStreamApi.enable(),this.subscriptions.push(this.audioApi.subscribeToSlotType("stream",this.onAdMessage)),this.isNewAdsNpvEnabled&&this.subscriptions.push(this.inStreamApi.subscribeToInStreamAds())}async disable(){this.enabled=!1,this.resetSubscriptions(),this.isNewAdsNpvEnabled&&this.inStreamApi.disable()}async logClick(e,t){if(!this.enabled)throw new Error("You have to enable the manager before calling logEvent");const i=await this.getContextAdInfo();if(null===i)return;const{positionMs:n,adId:r}=i;null!==r&&this.audioApi.postEvent(r,"clicked",null!==n?{playback_position:Math.round(n),...e&&{reason:e},...t&&{source:t}}:{})}onAdMessage=e=>{if("audio"===e.format&&"play"===e.event){const t="Play"===e.ad?.metadata?.featuredAction,i={buttonMessage:e.ad?.metadata?.buttonMessage,clickUrl:(0,h.H)(e.ad.click_url),isFeaturedActionPlay:t,skippableAdDelaySeconds:parseInt(e.ad?.metadata?.skippable_ad_delay,10)||0};this.onInfoCallback&&this.onInfoCallback(i)}};resetSubscriptions(){for(const e of this.subscriptions)e.cancel();this.subscriptions=[]}getEnabled(){return this.enabled}}function f(e,t,i,n){const r=n?new m(p.Q):new l(p.Q);return new g(r,e,t,i)}var v=i(34594);const y={[c.AdSlotEvent_AdSlotEventType.AVAILABLE]:"available",[c.AdSlotEvent_AdSlotEventType.PLAY]:"play",[c.AdSlotEvent_AdSlotEventType.DISCARD]:"discard",[c.AdSlotEvent_AdSlotEventType.UNRECOGNIZED]:"unrecognized"},b={[c.nM.UNKNOWN]:"unknown",[c.nM.AUDIO]:"audio",[c.nM.VIDEO]:"video",[c.nM.DISPLAY]:"banner",[c.nM.DUMMY]:"dummy",[c.nM.UNRECOGNIZED]:"unrecognized"},_=e=>{const t=y[e];if((e=>e===y[c.AdSlotEvent_AdSlotEventType.AVAILABLE]||e===y[c.AdSlotEvent_AdSlotEventType.PLAY]||e===y[c.AdSlotEvent_AdSlotEventType.DISCARD])(t))return t;throw new Error(`not billboard event type ${t}`)},E=e=>{const t=b[e];if((e=>e===b[c.nM.DISPLAY]||e===b[c.nM.DUMMY])(t))return t;throw new Error(`not billboard format type ${t}`)};class C{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:i}=await this.adsCoreConnector.getSlotSettings(e),n=Number(i[0][t]);if(void 0===n)throw new Error("billboard settings value undefined");return n}async patchTargeting(e,t){const i={targetingMap:{[e]:t}},{targetingMap:n}=await this.adsCoreConnector.putTargeting(i);return n}async postEvent(e,t,i){const n={adId:e,eventType:t,...i.event_data};return await u.lv.postEvent(n),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:i,format:n,ad:{adId:r,clickthroughUrl:a,metadata:s,display:o,isDummy:l,requestId:c,coverArt:[{url:u}]}}=t.adSlotEvent,{advertiser:d,title:m,creative_id:p}=s,h=E(Number(n)),g=_(i),{duration:f,url:v}=o[0],y=Number(f);return e({ad:{id:r,uri:`spotify:ad:${r}`,advertiser:d,title:m,click_url:a,duration:y,ad_type:0,test_ad:!1,skippable:!1,creative_id:p,dummy:l,ad_playback_id:c,format:h,metadata:s,companion_ad:u?{url:u}:void 0,images:v?[{url:v}]:void 0},event:g,format:h})}throw new Error("no data on BillboardEvent")}catch(e){throw new Error("error mapping billboard data")}}}(t))}async triggerSlotClearAll(e){if((0,v.R)(e))return await this.adsCoreConnector.clearSlot(e),{slotCleared:!0};throw new Error(`slot is not a reconized type ${e}`)}}class x{constructor(e){this.cosmosConnector=e}addNewSlot(e,t){return this.cosmosConnector.addNewSlot(e,t)}getSlotConfiguration(e,t){return this.cosmosConnector.getSlotConfiguration(e,t)}patchTargeting(e,t){return this.cosmosConnector.patchTargeting(e,t)}postEvent(e,t,i){return this.cosmosConnector.postEvent(e,t,i)}postToSlot(e,t){return this.cosmosConnector.postToSlot(e,t)}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}triggerSlotClearAll(e){return this.cosmosConnector.triggerSlotClearAll(e)}}class S{static listeners=[];static intervalId=null;static previousFocus=!1;static kPollTimeout=500;static reset(){S.listeners=[],S.previousFocus=!1,S.intervalId&&(clearInterval(S.intervalId),S.intervalId=null)}static maybeStartPolling(){null===S.intervalId&&(S.intervalId=setInterval(S.checkFocusState,S.kPollTimeout))}static maybeStopPolling(){S.intervalId&&0===S.listeners.length&&(clearInterval(S.intervalId),S.intervalId=null)}static addFocusListener(e){e.onFocusChanged(document.hasFocus()),S.listeners.push(e),S.maybeStartPolling()}static removeFocusListener(e){S.listeners=S.listeners.filter((t=>t!==e)),S.maybeStopPolling()}static checkFocusState=()=>{const e=document.hasFocus();e!==S.previousFocus&&(S.previousFocus=e,S.listeners.forEach((t=>{t.onFocusChanged(e)})))}}class A{constructor(){this.listeners=[]}addFocusListener(e){this.listeners.push(e),S.addFocusListener(e)}removeFocusListener(e){this.listeners=this.listeners.filter((t=>t!==e)),S.removeFocusListener(e)}removeAllFocusListeners(){this.listeners.forEach((e=>S.removeFocusListener(e))),this.listeners=[]}hasFocus(){return document.hasFocus()}}const T=!0,I=!1,N=[];function w(e,t){const i=L(t);if(-1===i)N.push({fn:t,msInactive:e,isActive:!1});else{const t=N[i];t.msInactive=e,clearTimeout(t.inactiveTimeout),t.inactiveTimeout=setTimeout(t.fn.bind(null,I),t.msInactive)}return R.bind(null,t)}function R(e){const t=L(e);return-1!==t&&(N.splice(t,1),!0)}function k(e){return e.addEventListener("mousemove",P),e.addEventListener("mouseup",P),e.addEventListener("keydown",P),e.addEventListener("scroll",P,!0),O.bind(null,e)}function O(e){e.removeEventListener("mousemove",P),e.removeEventListener("mouseup",P),e.removeEventListener("keydown",P),e.removeEventListener("scroll",P,!0)}function P(){N.forEach((e=>{e.isActive||(e.isActive=!0,e.fn(T)),clearTimeout(e.inactiveTimeout),e.inactiveTimeout=setTimeout((()=>{e.isActive=!1,e.fn(I)}),e.msInactive)}))}function L(e){let t=-1;return N.some(((i,n)=>i.fn===e&&(t=n,!0))),t}const j="billboard",D="foregrounded",M="backgrounded";class U{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=k(window),this.activitySubscription=w(18e4,this.onActivity),await this.billboardApi.addNewSlot(j,"video"),this.subscription=this.billboardApi.subscribeToSlotType(j,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()?D:M)}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(j,"now");break;case"play":break;case"discard":this.handleDiscard();break;default:throw new Error(`Unknown core event from ${j} 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(D),void this.triggerAutoMinimizeIfPossible();this.activating=!0;try{await this.billboardApi.patchTargeting("focus","true"),await this.billboardApi.postToSlot(j,"now")}catch(e){}finally{this.activating=!1}}}async handleApplicationLostFocus(){if(this.listener&&this.listener.isActive())return void this.logEvent(M);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(j,"fetch")):this.retryTimoutId=window.setTimeout((()=>{this.displayBillboard()}),5e3))};async getFocusTimeoutMs(){const e=await this.billboardApi.getSlotConfiguration(j,"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(j)}mapBillboardData(e){const t=e.ad.metadata||{},i={accountUpgrade:t.accountUpgrade,accountUpgradeTracking:t.accountUpgradeTracking,clickUrl:(0,h.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":i.companionSrc=e.ad.companion_ad&&e.ad.companion_ad.url||"",i.mediaSrc=e.ad.images&&e.ad.images[0]&&e.ad.images[0].url||"";break;case"dummy":break;default:i.isValid=!1}return i}}function B(e,t){const i=t?new C(e):new x(p.Q);return new U(i,new A)}const F=async()=>await(await Promise.resolve().then(i.bind(i,95338))).adsCoreConnector.fetchAdForSlot("hpto");var H=i(57893),V=i(64388);class G{constructor(e,t,i){this.eventSender=e,this.appStartupId=t,this.fireTrackingEvent=i}log(e,t){t.trackingEvents[e]?.urls.forEach((e=>this.fireTrackingEvent(e))),this.eventSender.send((0,V.A)({ad_id:t.adId,app_startup_id:this.appStartupId,creative_id:t.metadata.creative_id,event:`event_${e}`,event_source:"client",format:(0,c.gh)(t.format),lineitem_id:t.metadata.lineitem_id,product_name:"dummy",request_id:t.requestId,slot:"hpto"}))}}const z=(e,t)=>({logger:new G(e,t,(0,H.P)()),fetchHomeAd:F,enableLegacyHptoContainerLoader:!0});var W=i(34330),K=i(61544),Y=i(47927);const q={"discover-weekly":"666f726d61740004","release-radar":"666f726d61740000","time-machine":"666f726d6174f00d","summerjams-a":"666f726d6174f011","summerjams-b":"666f726d6174f012","summerjams-c":"666f726d6174f013","friends-weekly":"666f726d6174f119","on-repeat":"666f726d6174f152"};class Z{constructor(e,t,i,n){this.cosmosConnector=e,this.nativeHptoApi=t,this.previewParser=i,this.eventSender=n}getSlot(e){return this.cosmosConnector.fetchAdForSlot(e).then((e=>{const t=e.display?.find((e=>"text/html"===e.mime_type));if(!t)throw Error("No template");return{adPlaybackId:e.ad_playback_id,...t}}))}async logEvent(e){try{await this.eventSender.send(e)}catch(e){}}async getAlgoPlaylistInfo(e){if(!(e in q))return;const t=q[e],{sponsorships:i}=await(0,Y.$L)(),n=i.find((e=>{const i=e.spotifyUri.split(":").at(-1);return(0,K.Y8)(i)?.includes(t)}));if(n)return{uri:n.spotifyUri,playBtnUri:n.spotifyUri,uriType:K.NQ.PLAYLIST};this.eventSender.send((0,W.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)}async subscribeToPreview(e){return await this.cosmosConnector.addNewSlot("hpto","banner"),await this.cosmosConnector.enableSlot("hpto"),this.cosmosConnector.subscribeToSlot("sp://ads/v1/slots/hpto",(async t=>{if("available"===t.event&&this.previewParser.isPreviewServiceAd(t.ad)){const i=this.previewParser.parsePreview(t);e({...i})}}))}}var $=i(78007);const Q="hpto";class J{constructor(e,t,i,n){this.adsCoreConnector=e,this.nativeHptoApi=t,this.esperantoPreviewParser=i,this.eventSender=n}async getSlot(e){const t=await this.adsCoreConnector.fetchAdForSlot(e),i=t.display.find((e=>"text/html"===e.mimeType));if(!i)throw Error("No template");return{id:t.adId,adPlaybackId:t.requestId,media:i.text,"mime-type":i.mimeType,height:i.height,width:i.width,bitrate:i.bitrate,duration:i.duration}}async logEvent(e){try{await this.eventSender.send(e)}catch(e){}}subscribeToPreview(e){return this.adsCoreConnector.addNewSlot(Q),this.adsCoreConnector.enableSlot(Q),this.adsCoreConnector.subscribeToSlot(Q,(t=>{const i=t.adSlotEvent;if(i?.eventType===c.AdSlotEvent_AdSlotEventType.AVAILABLE&&this.esperantoPreviewParser.isPreviewServiceAd(i.ad)){const t=this.esperantoPreviewParser.parsePreview(i.ad);e({...t})}}))}async getAlgoPlaylistInfo(e){if(!(e in q))return;const t=q[e],{sponsorships:i}=await(0,Y.$L)(),n=i.find((e=>{const i=e.spotifyUri.split(":").at(-1);return(0,K.Y8)(i)?.includes(t)}));if(n)return{uri:n.spotifyUri,playBtnUri:n.spotifyUri,uriType:K.NQ.PLAYLIST};this.eventSender.send((0,W.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 X{constructor(e,t,i){this.spotifyTransport=e,this.endpoints=t,this.imageSelection=i}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}))):[]})}class ee{parsePreview(e){const t=e.ad,{creative_id:i,id:n,display:r}=t,a={creativeId:parseInt(i,10),gid:n,hpto:JSON.parse(r[0]&&r[0].media||"")},s=a.hpto||a;let o=null;const l=s.html&&-1!==s.html.search(/id="native-elements"/),c=!s.html&&"html"===s["banner-mode"];if(l?o=this.handleNativeEl(s):c&&(o=this.renameImageBannerField(s)),o=o||s,o.bannerMode=o["banner-mode"],!o.bannerMode)throw new TypeError("hpto data looks invalid");const u=this.createInteractiveIframe(o.html);return{...o,adPlaybackId:t.ad_playback_id,loaderFrame:u}}isPreviewServiceAd(e){return e.metadata&&"true"===e.metadata.is_preview}getKeyByValue(e,t){return Object.keys(t).find((i=>t[i]===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 i="";const n=t.getElementById("native-elements"),r=this.getKeyByValue("html",e);return["data-is-spotlight","data-is-exclusive","data-is-sponsored"].some((e=>(n&&n.hasAttribute(e)&&(i=e),i))),i=i.split("-").pop()||"",delete e[r],Object.assign({},e,{version:2,badge:i,"banner-mode":"native",blurb:n&&n.getAttribute("data-blurb"),"target-uri":n&&n.getAttribute("data-uri"),playBtnUri:n&&n.getAttribute("data-track-override")})}createInteractiveIframe(e){const t=encodeURIComponent(e),i=document.createElement("iframe");return i.className="ad-iframe",i.src=`data:text/html;charset=utf-8,${t}`,i.srcdoc=e,i.scrolling="no",i.marginWidth="0",i.marginHeight="0",i}}const te="visible_unknown",ie={root:null,rootMargin:"",thresholds:[],observe(){},disconnect(){},takeRecords:()=>[],unobserve(){}};class ne{constructor(e={threshold:[0,.5,1]}){this.currentState=te,this.intersectionObserver=ie,IntersectionObserver&&(this.intersectionObserver=new IntersectionObserver(this.onObservation,e))}onObservation=e=>{const t=e[0].intersectionRatio;let i=te;1===t?i="visible_100":t>=.5?i="visible_50":t<.5&&(i="visible_0"),i!==this.currentState&&(this.currentState=i,this.callback&&this.callback(this.currentState))};observe(e,t){this.callback=t,this.intersectionObserver.observe(e)}disconnect(){this.intersectionObserver.disconnect()}}const re="hpto";class ae{timeOfLastViewUpdate=0;refreshCallback=()=>{};visibilityState="";constructor(e,t,i,n,r){this.hptoApi=e,this.focusState=t,this.visibilityObserver=i,this.offlineObserver=n,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 i=await this.mapData(t);e(i)}))}onRefresh(e){this.refreshCallback=e}fetchTemplate(){return this.hptoApi.getSlot(re).catch((e=>{throw this.logAdEventError("template fetch from ARS failed"),e}))}fetchCreative(e){return new Promise(((t,i)=>{window.addEventListener("message",(function n(r){if("object"==typeof r.data&&"string"==typeof r.data.type){const a=r.data.type.split(":");if("ads"!==a[0]||"hpto"!==a[1])return;if("error"===a[2]||"no-ad"===a[2])i(a[2]);else if("init"===a[2]){const i={...r.data.data.data,loaderFrame:undefined,adPlaybackId:e.adPlaybackId};t(i)}else i("unsupported hpto message");window.removeEventListener("message",n)}}))})).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,W.G)({request_type:re,error_message:e});this.hptoApi.logEvent(t)}createTrackingPixelImage=(e,t)=>{const i=document.createElement("img");return i.src=e,i.alt="",i.style.display="none",i.style.height="1px",i.style.width="1px",i.classList.add("pixel",t),i};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:i,lineItemId:n,advertiserId:r,campaignId:a,adEventTrackerViewUrls:s}=this.currentAd;this.createTrackingList({trackingUrls:e,trackingUrl:t,adEventTrackerViewUrls:s,adTrackingInfo:{creativeId:i,lineItemId:n,advertiserId:r,campaignId:a}}).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 i=(0,V.A)({slot:re,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(i)}};logAdEventError=e=>{const t=(0,V.A)({slot:re,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"],i=(0,K.o_)(t)?.type,n={episodeShowUri:""},r=e.playBtnUri||t;if("native"===e.bannerMode){const e=await this.hptoApi.getAlgoPlaylistInfo(t);e&&(t=e.uri,r=e.playBtnUri,i=e.uriType),n=await this.getNativeData(t,i)}const a=e.blurb,s=(e.badge||"").toLowerCase(),o=e["background-color"],l=o&&"#"===o[0]?o:`#${o}`,c=e["background-image"],u=(0,h.H)(e["background-url"]),d=u&&u.replace(/&amp;/g,"&"),m="sponsored"===e.nativeHptoType;return{...e,...n,isSponsored:m,uri:n.episodeShowUri||t,uriType:i,badgeType:s,playBtnUri:r,backgroundColor:l,backgroundUrl:u,backgroundImage:c,clickThroughUrl:d,description:a}};maybeModifyUrl(e,t){let i=e;const n=["adeventtracker.spotify.com","adeventtrackermonitoring.spotify.com","aet.spotify.com"];try{const e=new URL(i);if(n.includes(e.host)){const n=e.searchParams;Object.keys(t).forEach((e=>{const i=t[e];n.append(e,i)})),i=e.toString()}}catch(t){const i=(0,W.G)({error_type:"malformedAdEventTrackerUrl",lineitem_id:this.currentAd?.lineItemId,error_message:`cannot parse ad event tracker url: ${e}`});this.hptoApi.logEvent(i)}return i}createTrackingList({trackingUrls:e,trackingUrl:t,adEventTrackerViewUrls:i=[],adTrackingInfo:n={}}){let r=i.map((e=>this.maybeModifyUrl(e,n)));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(/&amp;/g,"&"))}catch(t){if(t instanceof URIError&&"URI malformed"===t.message){const t=(0,W.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 i=e.split(":").pop();if(!i)return Promise.reject("error when getting native data: id not found");switch(t){case K.NQ.SHOW:return this.hptoApi.getShow(i);case K.NQ.TRACK:return this.hptoApi.getTrack(i);case K.NQ.ALBUM:return this.hptoApi.getAlbum(i);case K.NQ.PLAYLIST:case K.NQ.PLAYLIST_V2:return this.hptoApi.getPlaylist(i);case K.NQ.EPISODE:return this.hptoApi.getEpisode(i);default:return Promise.reject(`error when getting native data ${e} is not valid`)}}}class se{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}}var oe=i(40312),le=i(38481);function ce(e,t){return e.build().withHost(le.QU).withPath(`/albums/${t}`).withEndpointIdentifier("/albums/{albumId}").send()}function ue(e,t){return e.build().withHost(le.QU).withPath(`/artists/${t}`).withoutMarket().withEndpointIdentifier("/artists/{artistId}").send()}function de(e,t,i={}){return e.build().withHost(le.QU).withPath(`/artists/${t}/albums`).withQueryParameters(i).withoutMarket().withEndpointIdentifier("/artists/{artistId}/albums").send()}function me(e,t,i={additional_types:"track"}){return e.build().withHost(le.QU).withPath(`/playlists/${t}`).withQueryParameters(i).withEndpointIdentifier("/playlists/{playlistId}").send()}function pe(e){return e.build().withHost(le._1).withPath("/select-ondemand-set?format=json").withEndpointIdentifier("/select-ondemand-set").withJsonContentType().withoutMarket().send()}function he(e,t){return e.build().withHost(le.ZJ).withMethod("GET").withPath(`/playlist/${t}/capabilities`).withEndpointIdentifier("/playlist/{id}/capabilities").withoutMarket().send()}var ge=i(63849);function fe(e,t){return e.build().withHost(le.QU).withPath(`/tracks/${t}`).withEndpointIdentifier("/tracks/{trackId}").send()}var ve=i(80913);function ye(e,t,i,o){const l=new X(oe.n.getInstance(),{Album:n,Artist:r,Playlist:a,Track:s,Show:ge},ve.h);return new ae(o?new J(i,l,new $.$,e):new Z(p.Q,l,new ee,e),new A,new ne,new se({}),t)}const be={displayTimeIntervalMs:2e4,timeInViewThresholdMs:15e3};class _e{constructor(e){this.cosmosConnector=e}async addSlot(e){return await this.cosmosConnector.addNewSlot(e,"banner"),await this.cosmosConnector.enableSlot(e)}async getConfig(){try{const e=await this.cosmosConnector.getAdSlotConfig("leaderboard");return this.normalizeConfig(e)}catch(e){if(!(e instanceof Error))throw e;if("DUPLICATE_REQUEST_ERROR"!==e.name)throw e;return be}}normalizeConfig(e){if(e){const t={displayTimeIntervalMs:2e4,timeInViewThresholdMs:15e3};return Object.prototype.hasOwnProperty.call(e,"display_time_interval")&&(t.displayTimeIntervalMs=1e3*e.display_time_interval),t}return be}async getSlot(e){try{const t=await this.cosmosConnector.fetchAdForSlot(e),i=t.display.find((e=>"text/html"===e.mime_type));return{html:i?i.media:t.html,adDisplay:i}}catch(e){throw Error(`Slot Request failed ${e}`)}}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}}var Ee=i(3074),Ce=i.n(Ee),xe=i(76160);const Se="leaderboard";class Ae{fetching=!1;enabled=!1;currentAd={creativeId:null,lineitemId:null};constructor(e={},t,i,n,r,a,s){this.appStartupId=s,this.frameSrc=e.frameSrc,this.focusState=n,this.leaderboardApi=t,this.refreshDecisioner=i,this.refreshDecisioner.setRefreshDelegate(this),this.leaderboardWrapper=null,this.eventSender=r,this.history=a,this.appStartupId=s,this.offlineObserver=new se({onOnlineStatusChange:e=>this.refreshDecisioner.onlineStateChanged(e)})}enableLeaderboard(){this.enabled=!0,this.enableLeaderboardMessageHandler(),this.refreshDecisioner.onLeaderboardEnabled(),this.subscription=this.leaderboardApi.subscribeToSlotType(Se,this.onAdMessage)}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,xe.y)({ad_playback_id:this.adPlaybackId,view_uri:this.history.location.pathname,event:e}));const t=(0,V.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=Ce().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(Se).then((e=>{const t=e.html,i=e.adDisplay&&e.adDisplay.width?e.adDisplay.width:"728",n=e.adDisplay&&e.adDisplay.height?e.adDisplay.height:"90";return this.fetching=!1,this.renderLeaderboard(t,i,n)})).catch((e=>{throw this.fetching=!1,Error(`Slot Request and display failed: ${e}`)}))))}onAdMessage=e=>{if(this.isPreviewServiceAd(e.ad.metadata)){if(!e.ad.display||e.ad.display.length<1)throw new Error(`Unknown core event from ${Se} slot: ${e.event}`);const t=e.ad.display[0],i=t.media,n=t&&t.width?t.width:"728",r=t&&t.height?t.height:"90";this.renderLeaderboard(i,n,r)}};isPreviewServiceAd(e){return e&&"true"===e.is_preview}renderLeaderboard(e,t,i){const n=document.createElement("iframe");n.addEventListener("load",this.adFrameLoaded.bind(this,n)),n.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(" ")),n.setAttribute("width",t),n.setAttribute("height",i),n.setAttribute("id","leaderboard-ad-element"),n.setAttribute("src",this.frameSrc),n.setAttribute("srcdoc",e),n.setAttribute("tab-index","-1"),this.leaderboardWrapper=document.createElement("div"),this.leaderboardWrapper.setAttribute("aria-hidden","true"),this.leaderboardWrapper.appendChild(n),this.domTarget.innerHTML="",this.domTarget.appendChild(this.leaderboardWrapper)}adFrameLoaded(e,t){const i=t.composedPath&&t.composedPath()&&t.composedPath()[0].contentWindow||e.contentWindow;this.refreshDecisioner.onViewLoaded(),this.focusState.addFocusListener(this);const n=()=>{this.logLeaderboardEvent("event_unload"),this.refreshDecisioner.onViewUnloaded(),this.focusState.removeFocusListener(this),i.removeEventListener("unload",n)};i.addEventListener("unload",n)}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("event_"+(e?"foregrounded":"backgrounded"))}refreshLeaderboard(){this.fetchAndDisplayLeaderboard()}}const Te={displayTimeIntervalMs:2e4,timeInViewThresholdMs:15e3};class Ie{constructor(e){this.adsCoreConnector=e}subscribeToSlotType(e,t){return this.adsCoreConnector.subscribeToSlot(e,(e=>{const i=e.adSlotEvent;i&&t(i)}))}async addSlot(e){return await this.adsCoreConnector.addNewSlot(e,"banner"),await this.adsCoreConnector.enableSlot(e)}async getConfig(){try{const e=await this.adsCoreConnector.getSlotSettings(Se);return this.normalizeConfig(e)}catch(e){if(!(e instanceof Error))throw e;if("DUPLICATE_REQUEST_ERROR"!==e.name)throw e;return Te}}async getSlot(e){return(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()}}})(await this.adsCoreConnector.fetchAdForSlot(e))}normalizeConfig(e){const t=e?.slotSettings[0].displayTimeInterval;return{...Te,...t?{displayTimeIntervalMs:1e3*Number(t)}:null}}}class Ne{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 we(e,t,i,n,r){const a=new A,s=r?new Ie(n):new _e(p.Q);return new Ae({frameSrc:"/blank.html"},s,new Ne(a),a,e,t,i)}const Re=()=>oe.n.getInstance().build().withHost(le.ip).withPath("/sponsored").withEndpointIdentifier("/sponsored").send();class ke{constructor(e,t){this.eventSender=e,this.adsCoreConnector=t}async getSponsoredUris(){return(await Re()).body.sponsorships}async getSponsorshipAd(e){try{return(await(0,Y.x0)(e)).body}catch(e){throw this.eventSender.send((0,W.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,W.G)({request_type:"sponsored playlist",error_message:JSON.stringify({error:e})}))}return this.adsCoreConnector.subscribeToSlot(t,(i=>{const n=new DOMParser,r=i.adSlotEvent?.ad?.display[0]?.text;if(r){const i=n.parseFromString(r,"text/html"),a=JSON.parse(i.querySelector(`[data-template="${t}"]`).innerText);e({...a.sponsoredPlaylist,logoUrl:a.sponsoredPlaylist.logo})}}))}async logEvent({event:e,ad_format:t,lineitem_id:i,creative_id:n,ad_id:r}){this.eventSender.send((0,V.A)({event:e,format:t,lineitem_id:i,creative_id:n,ad_id:r,event_source:"client"}))}}class Oe{constructor(e){this.eventSender=e}async getSponsoredUris(){return(await Re()).body.sponsorships}async getSponsorshipAd(e){try{return(await Y.x0(e)).body}catch(e){throw this.eventSender.send((0,W.G)({request_type:"sponsored",error_message:JSON.stringify({err:e})})),e}}async subscribeToPreview(e){const t="sponsored-playlist";return await p.Q.addNewSlot(t).catch((e=>{this.eventSender.send((0,W.G)({request_type:"sponsored playlist",error_message:JSON.stringify({error:e})}))})),p.Q.subscribeToSlot(`sp://ads/v1/slots/${t}`,(t=>{const i=(new DOMParser).parseFromString(t.ad.display[0].media,"text/html"),n=JSON.parse(i.querySelector('[data-template="sponsored-playlist"]').innerText);e({...n.sponsoredPlaylist,logoUrl:n.sponsoredPlaylist.logo})}))}async logEvent({event:e,ad_format:t,lineitem_id:i,creative_id:n,ad_id:r}){this.eventSender.send((0,V.A)({event:e,format:t,lineitem_id:i,creative_id:n,ad_id:r,event_source:"client"}))}}class Pe{constructor(e){this.eventSender=e}async getSponsoredUris(){return(await Re()).body.sponsorships}async getSponsorshipAd(e){return(await Y.x0(e)).body}logEvent(e){return this.eventSender.send((0,V.A)({...e,format:e.ad_format}))}async subscribeToPreview(){return{cancel:()=>{}}}}class Le{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 je(e,t,i,n){let r;return r=e?n?new ke(t,i):new Oe(t):new Pe(t),new Le(r)}class De{constructor(e){this.cosmosConnector=e}patchTargeting(e,t){return this.cosmosConnector.patchTargeting(e,t)}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}postEvent(e,t,i){return this.cosmosConnector.postEvent(e,t,i)}}class Me{constructor(e,t){this.cosmosConnector=e,this.esperantoConnector=t}async patchTargeting(e,t){const{targetingMap:i}=await this.esperantoConnector.putTargeting(c.SD.fromPartial({targetingMap:{[e]:t}}));return i}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}async postEvent(e,t,i){const n=c.uk.fromPartial({adId:e,eventType:t,playbackPosition:"bigint"==typeof i.playback_position||"number"==typeof i.playback_position?BigInt(i.playback_position):void 0,eventReason:d(i.reason)?i.reason:void 0,eventSource:d(i.source)?i.source:void 0,...i});return await u.lv.postEvent(n),Promise.resolve({event:"sent"})}}class Ue{constructor(e,t){this.vastEventsTracker=e,this.vtoTracker=t}onStarted(){this.vtoTracker.onStarted(),this.vastEventsTracker.onStarted()}onResumed(){this.vastEventsTracker.onResumed()}onPaused(){this.vastEventsTracker.onPaused()}onVolumeChanged(e){this.vtoTracker.onVolumeChanged(e),this.vastEventsTracker.onVolumeChanged(e)}onPlaybackEnded(e){this.vtoTracker.onPlaybackEnded(e),this.vastEventsTracker.onPlaybackEnded(e)}onDurationChanged(e){this.vtoTracker.onDurationChanged(e),this.vastEventsTracker.onDurationChanged(e)}onPlaybackCreated(e){this.vtoTracker.onPlaybackCreated(e),this.vastEventsTracker.onPlaybackCreated(e)}onReady(){this.vtoTracker.onReady()}onSeeking(){}onSubtitleChanged(){}onVideoFormatChanged(){}}var Be=i(65994);let Fe=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 He{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 Fe.STARTED:return 1;case Fe.FIRST_QUARTILE:return 2;case Fe.MIDPOINT:return 3;case Fe.THIRD_QUARTILE:return 4;case Fe.SKIPPED:case Fe.ENDED:case Fe.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(Fe.STARTED)}onResumed(){this.isPaused&&(this.isPaused=!1,this.processEvent(Fe.RESUMED))}onPaused(){this.isPaused=!0,this.processEvent(Fe.PAUSED)}onVolumeChanged({volume:e}){this.volume=e,this.processEvent(Fe.VOLUME_CHANGE),e>0&&this.isMuted?(this.isMuted=!1,this.processEvent(Fe.UNMUTED)):0!==e||this.isMuted||(this.isMuted=!0,this.processEvent(Fe.MUTED))}onPlaybackEnded({reason:e}){switch(e){case Be.mT.REQUESTED:this.processEvent(Fe.SKIPPED);break;case Be.mT.FATAL_ERROR:case Be.mT.NETWORK_ERROR:this.processEvent(Fe.ERRORED);break;case Be.mT.PLAYED_TO_END:this.processEvent(Fe.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(Fe.FIRST_QUARTILE),e>=.5&&this.processEvent(Fe.MIDPOINT),e>=.75&&this.processEvent(Fe.THIRD_QUARTILE)}))}}class Ve{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}}function Ge(e){return Math.floor(1e3*e)}const ze=e=>(t,i)=>p.Q.postEvent(e,t,{event_data:{clientReportedUserAgent:navigator.userAgent,volume:i.volume.toString(),duration:i.duration.toString()},playback_position:Ge(i.position)}),We=e=>(t,i)=>{const n=c.uk.fromPartial({adId:e,eventType:t,playbackPosition:BigInt(Ge(i.position))});u.lv.postEvent(n)};var Ke=i(53816);function Ye(e,t,i,n){const r=n?new Me(p.Q,t):new De(p.Q),a=new Ke.ei(new A,r,e,i);return{manager:a,factories:[(s=n?We:ze,o=a,e=>"true"===e.metadata?.is_advertisement?new Ue(new He(s(e.metadata.ad_id)),new Ve(o,e.metadata.ad_id)):null)]};var s,o}class qe{constructor(e,t,i){this.focusState=t,this.setAdStateKey=e,this.focusState.addFocusListener(this),this.history=i,this.history.listen((e=>{this.setAdStateKey("view_uri",e.pathname)}))}onFocusChanged(e){this.setAdStateKey("focus",e?"true":"false")}}function Ze(e){return new qe(p.Q.setAdStateKey,new A,e)}class $e{enabled=!1;inStreamAdsSubscription=null;inStreamAd=null;constructor(e){this.adsCoreConnector=e}enable(){this.enabled||(this.enabled=!0,this.inStreamAdsSubscription=this.adsCoreConnector.subscribeToInStreamAds(this.onInStreamAdMessage.bind(this)))}disable(){this.enabled=!1,this.inStreamAd=null}subscribeToInStreamAds(){return this.inStreamAdsSubscription?this.inStreamAdsSubscription:this.adsCoreConnector.subscribeToInStreamAds(this.onInStreamAdMessage)}getInStreamAd(){return this.inStreamAd}onInStreamAdMessage(e){const{ad:t}=e;t&&(this.inStreamAd=t)}}var Qe=i(33655);const Je=(e,t,i,n,r,a,s,l,c,d,m,p)=>()=>{const h=new $e(u.adsCoreConnector);return{config:{getAdsSlotConfig:o.r},audio:f(n,h,s,m),vto:Ye(h,u.adsCoreConnector,s,p),hpto:ye(i,r,u.adsCoreConnector,a),billboard:B(u.adsCoreConnector,d),leaderboard:we(i,t,r,u.adsCoreConnector,c),sponsoredPlaylist:je(e,i,u.adsCoreConnector,l),home:z(i,r),inStreamApi:h,...e?{adStateReporter:Ze(t)}:{}}},Xe=(0,Qe.u)("AdManagers")},21441:(e,t,i)=>{"use strict";i.d(t,{CW:()=>s,Nb:()=>a,On:()=>l,QN:()=>n,gt:()=>c,q5:()=>u,s3:()=>r,yx:()=>o});const n={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:n.ADS_ENABLED}),a=()=>({type:n.ADS_DISABLED}),s=e=>({type:n.ADS_PREMIUM,isPremium:e}),o=e=>({type:n.ADS_HPTO_HIDDEN,isHptoHidden:e}),l=()=>({type:n.ADS_POST_HIDE_HPTO}),c=e=>({type:n.TRIGGER_PREVIEW_AD,adUriHexId:e}),u=(e,t)=>({type:n.LOG_NOW_PLAYING_AD_CLICK,eventReason:e,eventSource:t})},49493:(e,t,i)=>{"use strict";i.d(t,{Qv:()=>r,Tv:()=>a,qc:()=>s});var n=i(63135);const r=e=>{const t=e?.item??void 0;return(0,n.N)(t)},a=e=>{const t=e?.item??void 0;return(0,n.N)(t)&&"video"===t.mediaType},s=e=>{const t=e?.item??void 0;return(0,n.N)(t)&&"audio"===t.mediaType}},97393:(e,t,i)=>{"use strict";i.d(t,{M:()=>r,e:()=>a});var n=i(70675);const r=n.M,a=n.e},25449:(e,t,i)=>{"use strict";i.d(t,{m:()=>n});const n=(e,t,i)=>({artists:[{uri:t,name:i}],images:e.coverArt?.sources||[],name:e.name,uri:e.uri,year:e.date?.year,type:e.type,sharingInfo:e.sharingInfo})},72592:(e,t,i)=>{"use strict";i.d(t,{t:()=>a});var n=i(30758),r=i(71137);const a=(e,t)=>{const i=(0,n.useRef)(null),{registerCloseCallback:a,closeToDepth:s,isOnPathToSubmenu:o}=(0,n.useContext)(r.P),l=(0,n.useRef)(!1),c=(0,n.useCallback)((()=>{i.current&&(window.clearTimeout(i.current),i.current=null)}),[]);(0,n.useEffect)((()=>c),[c]);const u=(0,n.useCallback)(((e,i)=>{s(e),c(),t&&(a((e=>{l.current=!1,t(e)}),i),l.current=!0,t(!0))}),[s,c,a,t]),d=(0,n.useCallback)((t=>{if(!e.current)return;const n=e.current.closest('[role="menu"]');if(n){const e={x:t.clientX,y:t.clientY},r=o(e,l.current),a=parseInt(n.getAttribute("data-depth")||"0",10);!r||l.current?u(a,e):"mouseenter"===t.type&&(i.current=window.setTimeout((()=>{u(a,e)}),500))}}),[e,o,u]),m=(0,n.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:m}}},19817:(e,t,i)=>{"use strict";function n(e){return"function"==typeof e}i.d(t,{d:()=>n})},75652:(e,t,i)=>{"use strict";i.d(t,{G:()=>a});var n=i(22203),r=i(47327);const a=(e,t,i=!1,s=[],o=[],l=[])=>{for(const c of t)if((0,r.sA)(c)||(0,r.Af)(c)){const t=(0,n.u)(e,c.name),u=null!==t?[...o,t]:o;(0,r.sA)(c)&&a(e,c.items,i,s,u,[...l,c.name]),((0,r.Af)(c)||i&&(0,r.sA)(c))&&u?.length>0&&s.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 s.sort(((e,t)=>t.matchScore-e.matchScore))}},55084:(e,t,i)=>{"use strict";function n(e){return"displayTitle"in e}i.d(t,{A:()=>n})},65570:(e,t,i)=>{"use strict";function n(e){const t=new Date;return(e instanceof Date?e:new Date(e)).getTime()-t.getTime()}i.d(t,{u:()=>n})},36921:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>d,O9:()=>l,_4:()=>o,fl:()=>s,j3:()=>u});var n=i(61544),r=i(71817),a=i(25828);const s={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,a.g)(s),l={[n.NQ.TRACK]:s.TRACKS,[n.NQ.ALBUM]:s.ALBUMS,[n.NQ.ARTIST]:s.ARTISTS,[n.NQ.PLAYLIST]:s.PLAYLISTS,[n.NQ.PLAYLIST_V2]:s.PLAYLISTS_V2,[n.NQ.FOLDER]:s.FOLDERS,[n.NQ.PROFILE]:s.USERS,[n.NQ.SHOW]:s.SHOWS,[n.NQ.EPISODE]:s.EPISODES,[n.NQ.LOCAL]:s.LOCAL_TRACKS,[n.NQ.LOCAL_ALBUM]:s.LOCAL_ALBUMS,[n.NQ.LOCAL_ARTIST]:s.LOCAL_ARTISTS,[n.NQ.COLLECTION_ALBUM]:s.COLLECTION_ALBUMS,[n.NQ.COLLECTION_ARTIST]:s.COLLECTION_ARTISTS,[n.NQ.COLLECTION]:s.PSEUDO_PLAYLISTS},c={[r.c.TRACK]:s.TRACKS,[r.c.ALBUM]:s.ALBUMS,[r.c.ARTIST]:s.ARTISTS,[r.c.PLAYLIST]:s.PLAYLISTS,[r.c.PLAYLISTV2]:s.PLAYLISTS_V2,[r.c.FOLDER]:s.FOLDERS,[r.c.USER]:s.USERS,[r.c.SHOW]:s.SHOWS,[r.c.AUDIOBOOK]:s.AUDIOBOOKS,[r.c.EPISODE]:s.EPISODES,[r.c.LOCAL_FILES]:s.LOCAL_TRACKS,[r.c.LIKED_SONGS]:s.PSEUDO_PLAYLISTS,[r.c.YOUR_EPISODES]:s.PSEUDO_PLAYLISTS,[r.c.CHAPTER]:s.CHAPTERS},u=e=>e&&(e=>e in c)(e)?c[e]:void 0,d=l},24805:(e,t,i)=>{"use strict";i.d(t,{Nz:()=>o,Vp:()=>a,Vv:()=>l,wD:()=>c,xz:()=>s});var n=i(36921),r=i(25828);const a=[n.fl.TRACKS,n.fl.LOCAL_TRACKS,n.fl.ALBUMS,n.fl.ARTISTS,n.fl.PLAYLISTS,n.fl.PLAYLISTS_V2,n.fl.FOLDERS,n.fl.EPISODES,n.fl.CHAPTERS,n.fl.SHOWS,n.fl.AUDIOBOOKS,n.fl.PSEUDO_PLAYLISTS],s={[n.fl.TRACKS]:"tracks",[n.fl.ALBUMS]:"albums",[n.fl.ARTISTS]:"artists",[n.fl.PLAYLISTS]:"playlists",[n.fl.FOLDERS]:"folders",[n.fl.SHOWS]:"shows",[n.fl.EPISODES]:"episodes",[n.fl.CHAPTERS]:"chapters",[n.fl.LOCAL_TRACKS]:"local-tracks",[n.fl.AUDIOBOOKS]:"audiobooks",[n.fl.PSEUDO_PLAYLISTS]:"pseudo-playlists"};let o=function(e){return e.ON="on",e.BEFORE="before",e.AFTER="after",e}({});const l=(0,r.g)(o);function c(e){return a.includes(e)}},68341:(e,t,i)=>{"use strict";i.d(t,{A:()=>f});var n=i(30758),r=i(61272),a=i(36921),s=i(24805);function o(e,t,i,n){if(e.defaultPrevented)return null;const r=t.includes(s.Nz.BEFORE),a=t.includes(s.Nz.AFTER);let o=s.Nz.ON;if(e.currentTarget instanceof HTMLElement&&(r||a)){const{top:a,height:l,left:c,width:u,right:d}=e.currentTarget.getBoundingClientRect(),m=t.includes(s.Nz.ON);if("horizontal"===i)if(m&&r){(n?e.clientX>Math.round(d)-u/4:e.clientX<Math.round(c)+u/4)&&(o=s.Nz.BEFORE)}else{o=(n?e.clientX>Math.round(d)-u/2:e.clientX<Math.round(c)+u/2)?s.Nz.BEFORE:s.Nz.AFTER}else"vertical"===i&&(m&&r?e.clientY<Math.round(a)+l/4&&(o=s.Nz.BEFORE):o=e.clientY<Math.round(a)+l/2?s.Nz.BEFORE:s.Nz.AFTER)}return t.includes(o)?o:null}var l=i(61544);function c(e,t){return Array.from(e.dataTransfer?.types??[]).filter(a._4).filter((e=>!!(0,s.wD)(e)&&t.includes(e))).filter(s.wD)}var u=i(7353);function d(e,t,i){const n=c(e,t);if(!n.length)return function(e,t){return e.split(/[\s,;]+/g).map((e=>(0,l.o_)(e?.trim()))).filter(u.P).reduce(((e,i)=>{const n=a.Ay[i.type];return(0,s.wD)(n)&&t.includes(n)?(e[n]||=[],e[n].push(i.toURI()),e):e}),{})}(e.dataTransfer?.getData("text/plain"),t);const r=Object.fromEntries(n.map((t=>[t,e.dataTransfer?.getData(t)?.split("\n").filter(Boolean)??[]])));if(i){const{[a.fl.PLAYLISTS]:e,...t}=r,i=Array.from(new Set([...r[a.fl.PLAYLISTS_V2]??[],...(r[a.fl.PLAYLISTS]??[]).map(m)]));return{...t,...i.length?{[a.fl.PLAYLISTS_V2]:i}:null}}return r}function m(e){const t=(0,l.o_)(e);return t?.type===l.NQ.PLAYLIST?(0,l.Ps)(t.id).toURI():e}var p=i(43717),h=i(43396);const g={droppableMimeTypes:"albums artists episodes chapters folders playlists shows tracks local-tracks audiobooks pseudo-playlists",useDropTarget:"main-useDropTarget-base","useDropTarget--albums":"main-useDropTarget-album","useDropTarget--artists":"main-useDropTarget-artist","useDropTarget--episodes":"main-useDropTarget-episode","useDropTarget--chapters":"OxrHhBsQAggwnv6RmqRy","useDropTarget--folders":"main-useDropTarget-folder","useDropTarget--playlists":"main-useDropTarget-playlist","useDropTarget--shows":"main-useDropTarget-show","useDropTarget--tracks":"main-useDropTarget-track","useDropTarget--local-tracks":"main-useDropTarget-local","useDropTarget--audiobooks":"main-useDropTarget-audiobook","useDropTarget--pseudo-playlists":"main-useDropTarget-pseudoPlaylist"};function f({uri:e,id:t=e,allowedMimeTypesByDropPosition:i,onDrop:l,onLongDragOver:u,longDragOverTimeout:m=1e3,reorderDirection:f="vertical"}){const y=(0,r.lB)((()=>i),[i]),b=(0,h.W)(),_=(0,p.wK)(),E=!!t&&1===_.length&&_[0]===t,C=Object.values(y).every((e=>e.includes(a.fl.PLAYLISTS_V2)&&!e.includes(a.fl.PLAYLISTS))),[x,S]=(0,n.useState)(null),A=(0,n.useCallback)((e=>E?[]:Object.entries(y).filter((([t,i])=>c(e,i).length>0)).map((([e])=>e)).filter(s.Vv)),[E,y]),T=(0,n.useRef)(!0),I=(0,n.useRef)(null),N=(0,n.useRef)(l);N.current=l;const w=(0,n.useRef)(u);w.current=u;const R=(0,n.useCallback)((()=>{T.current=!0,S(null),I.current&&(window.clearTimeout(I.current),I.current=null)}),[]);(0,n.useEffect)((()=>R),[R]);const k=(0,n.useCallback)((e=>{const t=A(e);t.length&&(S(o(e,t,f,b)),e.dataTransfer&&!e.defaultPrevented&&(e.dataTransfer.dropEffect=t.includes(s.Nz.ON)?"copy":"move"),e.preventDefault())}),[A,b,f]),O=(0,n.useCallback)((e=>{if(A(e).length&&!e.defaultPrevented){if(T.current){T.current=!1;const t=e.currentTarget,i=()=>{document.contains(t)||(R(),document.removeEventListener("dragenter",i))};document.addEventListener("dragenter",i),document.addEventListener("dragend",(()=>{document.removeEventListener("dragenter",i),R()}),{once:!0}),w.current&&(I.current=window.setTimeout((()=>{w.current?.()}),m))}e.preventDefault()}}),[A,m,R]),P=(0,n.useCallback)((e=>{A(e).length&&(function(e){return null===e.relatedTarget&&v?!document.elementsFromPoint(e.clientX,e.clientY).includes(e.currentTarget):!e.currentTarget.contains(e.relatedTarget instanceof Node?e.relatedTarget:null)}(e)&&R(),e.preventDefault())}),[A,R]),L=(0,n.useCallback)((e=>{const t=o(e,A(e),f,b);if(!e.defaultPrevented&&t){const i=d(e,y[t]??[],C),n=function(e){return{sectionId:parseInt(e.dataTransfer.getData("text/x-spotify-section"),10)||0,contextUri:e.dataTransfer.getData("text/x-spotify-context"),itemIds:e.dataTransfer.getData(a.fl.UIDS)?.split("\n").filter(Boolean)??[]}}(e);Object.keys(i).length&&N.current&&(N.current(i,t,n),e.preventDefault())}R()}),[A,f,b,R,y,C]),j=(0,n.useMemo)((()=>`${g.useDropTarget} ${Array.from(new Set(Object.values(y).flat()))?.map((e=>g[`useDropTarget--${s.xz[e]}`]??"")).join(" ")}`),[y]);return(0,n.useMemo)((()=>({dropPosition:x,className:j,onDragEnter:O,onDragLeave:P,onDragOver:k,onDrop:L})),[j,x,O,P,k,L])}const v=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},92750:(e,t,i)=>{"use strict";i.d(t,{r:()=>d});var n=i(41978),r=i(9183),a=i(4096),s=i(15597),o=i(84738),l=i(93561),c=i(14745);const u=({treatment:e,entityId:t,experimentId:i,treatmentVariation:n})=>{if(e&&e[t]){const r=e[t].find((e=>e.experimentId===i));return r?.treatment===n}return!1},d=()=>{const e=(0,a.c)(),{episodeId:t=""}=(0,r.g)(),i=(0,r.zy)(),d=i.pathname.includes("more-like-this")?i.pathname.split("/")[2]:"",m=(0,o.oC)(l.P.EpisodeDiscovery,i),p=(0,n.d4)(s.S),h=u({treatment:p||{},entityId:t||d||"",experimentId:c.R.EPISODE_DISCOVERY,treatmentVariation:c.d.VARIANT});return!!e&&(m||h)}},47541:(e,t,i)=>{"use strict";i.d(t,{D:()=>h});var n=i(41978),r=i(20842),a=i(40353),s=i(14693),o=i(39733),l=i(63198),c=i(21233),u=i(47721),d=i(7939),m=i(95625),p=i(83388);const h=({entityType:e,componentType:t,uri:i})=>{const h=(0,l.V)(),g=(0,o.vh)(),f=(0,n.d4)(d.F6),v=(0,n.d4)(u.JJ);return()=>{(0,p.fE)({metric_type:s.MetricTypes.COUNTER,what:"dwp-ilr-component-error",value:1,tags:{entityType:e,componentType:t}});const n={category:`${e}_${t}_ilr_render_error`,label:"dwp",os:(0,c.f)(),context:i,country:f?v:"",sp_t:(0,m.v8)("sp_t")};h?g.send((0,a.r)(n)):g.send((0,r._)(n))}}},34122:(e,t,i)=>{"use strict";i.d(t,{dr:()=>v,gO:()=>f});var n=i(81987),r=i(11808),a=i(69011),s=i(89956),o=i(21233),l=i(19159);const c="macOS"===(0,o.f)(),u=(0,s.My)()===a.m.Desktop;let d=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.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.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_LIBRRY="WF_ADD_TO_LIBRRY",e.WF_ADD_TO_QUEUE="WF_ADD_TO_QUEUE",e.WF_MUTE_UNMUTE="WF_MUTE_UNMUTE",e}({});const m=c?["mod+left"]:["alt+left"],p=c?["mod+right"]:["alt+right"],h=c?"alt+left":"mod+left",g=c?"alt+right":"mod+right",f={[d.OPEN_SEARCH_MODAL]:["mod+k"],[d.OPEN_HELP]:["mod+/","?"],[d.CREATE_NEW_PLAYLIST]:[u?"mod+n":"alt+shift+p"],[d.LIKE_DISLIKE_SONG]:["alt+shift+b"],[d.LOG_OUT]:["alt+shift+f6"],[d.CREATE_NEW_FOLDER]:[u?"mod+shift+n":"mod+alt+shift+p"],[d.SELECT_ALL]:["mod+a"],[d.FILTER]:["mod+f"],[d.TOGGLE_PLAY]:["space"],[d.SEEK_BACKWARD]:[c?"mod+shift+left":"shift+left"],[d.SEEK_FORWARD]:[c?"mod+shift+right":"shift+right"],[d.SHUFFLE]:[u?"mod+s":"alt+s"],[d.REPEAT]:[u?"mod+r":"alt+r"],[d.RAISE_VOLUME]:[u?"mod+up":"alt+up"],[d.LOWER_VOLUME]:[u?"mod+down":"alt+down"],[d.SKIP_PREVIOUS]:[u?"mod+left":h],[d.SKIP_NEXT]:[u?"mod+right":g],[d.GO_TO_LIBRARY]:["alt+shift+0"],[d.GO_TO_PLAYLISTS]:["alt+shift+1"],[d.GO_TO_PODCASTS]:["alt+shift+2"],[d.GO_TO_ARTISTS]:["alt+shift+3"],[d.GO_TO_ALBUMS]:["alt+shift+4"],[d.GO_TO_AUDIOBOOKS]:["alt+shift+5"],[d.GO_TO_HOME]:["alt+shift+h"],[d.GO_TO_PREFERENCES]:["mod+,"],[d.GO_BACKWARDS]:u?["mod+alt+left","alt+left"]:m,[d.GO_FORWARDS]:u?["mod+alt+right","alt+right"]:p,[d.GO_TO_SEARCH]:[u?"mod+l":"mod+shift+l"],[d.GO_TO_NOW_PLAYING]:["alt+shift+j"],[d.GO_TO_LIKED_SONGS]:["alt+shift+s"],[d.GO_TO_MADE_FOR_YOU]:["alt+shift+m"],[d.GO_TO_NEW_RELEASES]:["alt+shift+n"],[d.GO_TO_CHARTS]:["alt+shift+c"],[d.GO_TO_QUEUE]:["alt+shift+q"],[d.OPEN_CONTEXT_MENU]:["alt+j"],[d.TOGGLE_NPV_SIDEBAR]:["alt+shift+r"],[d.TOGGLE_YLX_SIDEBAR]:["alt+shift+l"],[d.YLX_SIDEBAR_DECREASE_WIDTH]:["alt+shift+left"],[d.YLX_SIDEBAR_INCREASE_WIDTH]:["alt+shift+right"],[d.NPV_SIDEBAR_DECREASE_WIDTH]:["alt+shift+down"],[d.NPV_SIDEBAR_INCREASE_WIDTH]:["alt+shift+up"],[d.TOGGLE_DEBUG_WINDOW]:["alt+command+x"],[d.FOCUS_YLX_TEXT_FILTER]:u?["mod+alt+f"]:["shift+mod+alt+f"],[d.WF_GO_TO_PREVIOUS]:["up"],[d.WF_GO_TO_NEXT]:["down"],[d.WF_ADD_TO_LIBRRY]:["left"],[d.WF_ADD_TO_QUEUE]:["right"],[d.WF_MUTE_UNMUTE]:["m"]};function v(){const e=(0,n.NC)(l.DHV,{loadingValue:!1});return{basic:[{action:d.CREATE_NEW_PLAYLIST,get description(){return r.Ru.get("playlist.new-header")},enabled:!0},{action:d.CREATE_NEW_FOLDER,get description(){return r.Ru.get("keyboard.shortcuts.description.createNewFolder")},enabled:!0},{action:d.OPEN_CONTEXT_MENU,get description(){return r.Ru.get("keyboard.shortcuts.description.openContextMenu")},enabled:!0},{action:d.OPEN_SEARCH_MODAL,get description(){return r.Ru.get("keyboard.shortcuts.description.openSearchModal")},enabled:!0},{action:d.SELECT_ALL,get description(){return r.Ru.get("keyboard.shortcuts.description.selectAll")},enabled:u},{action:d.FILTER,get description(){return r.Ru.get("filter")},enabled:u},{action:d.FOCUS_YLX_TEXT_FILTER,get description(){return r.Ru.get("web-player.your-library-x.text-filter.generic-placeholder")},enabled:!0},{action:d.LOG_OUT,get description(){return r.Ru.get("user.log-out")},enabled:!0}],playback:[{action:d.TOGGLE_PLAY,get description(){return r.Ru.get("keyboard.shortcuts.description.togglePlay")},enabled:!0},{action:d.LIKE_DISLIKE_SONG,get description(){return r.Ru.get("keyboard.shortcuts.description.likeDislikeSong")},enabled:!0},{action:d.SHUFFLE,get description(){return r.Ru.get("keyboard.shortcuts.description.shuffle")},enabled:!0},{action:d.REPEAT,get description(){return r.Ru.get("keyboard.shortcuts.description.repeat")},enabled:!0},{action:d.SKIP_PREVIOUS,get description(){return r.Ru.get("keyboard.shortcuts.description.skipPrev")},enabled:!0},{action:d.SKIP_NEXT,get description(){return r.Ru.get("keyboard.shortcuts.description.skipNext")},enabled:!0},{action:d.SEEK_BACKWARD,get description(){return r.Ru.get("keyboard.shortcuts.description.seekBackward")},enabled:!0},{action:d.SEEK_FORWARD,get description(){return r.Ru.get("keyboard.shortcuts.description.seekForward")},enabled:!0},{action:d.RAISE_VOLUME,get description(){return r.Ru.get("keyboard.shortcuts.description.raiseVolume")},enabled:!0},{action:d.LOWER_VOLUME,get description(){return r.Ru.get("keyboard.shortcuts.description.lowerVolume")},enabled:!0}],navigation:[{action:d.GO_TO_HOME,get description(){return r.Ru.get("keyboard.shortcuts.description.home")},enabled:!0},{action:d.GO_BACKWARDS,get description(){return r.Ru.get("keyboard.shortcuts.description.goBackwards")},enabled:!0},{action:d.GO_FORWARDS,get description(){return r.Ru.get("keyboard.shortcuts.description.goForwards")},enabled:!0},{action:d.GO_TO_PREFERENCES,get description(){return r.Ru.get("keyboard.shortcuts.description.goToPreferences")},enabled:u},{action:d.GO_TO_NOW_PLAYING,get description(){return r.Ru.get("keyboard.shortcuts.description.currentlyPlaying")},enabled:!0},{action:d.GO_TO_SEARCH,get description(){return r.Ru.get("keyboard.shortcuts.description.search")},enabled:!0},{action:d.GO_TO_LIKED_SONGS,get description(){return r.Ru.get("keyboard.shortcuts.description.likedSongs")},enabled:!0},{action:d.GO_TO_QUEUE,get description(){return r.Ru.get("playback-control.queue")},enabled:!0},{action:d.GO_TO_LIBRARY,get description(){return r.Ru.get("web-player.your-library-x.your-library")},enabled:!0},{action:d.GO_TO_PLAYLISTS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourPlaylists")},enabled:!0},{action:d.GO_TO_PODCASTS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourPodcasts")},enabled:!0},{action:d.GO_TO_ARTISTS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourArtists")},enabled:!0},{action:d.GO_TO_ALBUMS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourAlbums")},enabled:!0},{action:d.GO_TO_AUDIOBOOKS,get description(){return r.Ru.get("keyboard.shortcuts.description.yourAudiobooks")},enabled:!0},{action:d.GO_TO_MADE_FOR_YOU,get description(){return r.Ru.get("keyboard.shortcuts.description.madeForYour")},enabled:!0},{action:d.GO_TO_NEW_RELEASES,get description(){return r.Ru.get("new_releases")},enabled:!0},{action:d.GO_TO_CHARTS,get description(){return r.Ru.get("keyboard.shortcuts.description.charts")},enabled:!0}],layout:[{action:d.TOGGLE_YLX_SIDEBAR,get description(){return r.Ru.get("keyboard.shortcuts.layout.toggleLeftSidebar")},enabled:!0},{action:d.YLX_SIDEBAR_DECREASE_WIDTH,get description(){return r.Ru.get("keyboard.shortcuts.layout.navigationBarDecreaseWidth")},enabled:!0},{action:d.YLX_SIDEBAR_INCREASE_WIDTH,get description(){return r.Ru.get("keyboard.shortcuts.layout.navigationBarIncreaseWidth")},enabled:!0},{action:d.TOGGLE_NPV_SIDEBAR,get description(){return r.Ru.get("keyboard.shortcuts.layout.toggleRightSidebar")},enabled:!0},{action:d.NPV_SIDEBAR_DECREASE_WIDTH,get description(){return r.Ru.get("keyboard.shortcuts.layout.rightSidebarDecreaseWidth")},enabled:!0},{action:d.NPV_SIDEBAR_INCREASE_WIDTH,get description(){return r.Ru.get("keyboard.shortcuts.layout.rightSidebarIncreaseWidth")},enabled:!0}],employee:[{action:d.TOGGLE_DEBUG_WINDOW,description:"Toggle Debug Window",enabled:e}]}}},90778:(e,t,i)=>{"use strict";i.d(t,{qV:()=>L,Nx:()=>P});var n=i(30758),r=i(73075),a=i.n(r),s=i(41978),o=i(9183),l=i(81987),c=i(61544),u=i(11808),d=i(90751),m=i(34122),p=i(94939),h=i(64245),g=i(62338),f=i(82852),v=i(82708),y=i(43396),b=i(58591),_=i(19159),E=i(89734),C=i(70717),x=i(62720),S=i(88784),A=i(99744),T=i(54164),I=i(26440),N=i(2435),w=i(42947),R=i(10132);const k=e=>(t,i=!1)=>{let n,r=!1;return(...a)=>{n=a,r||(i||e.apply(e,a),r=!0,window.setTimeout((()=>{r=!1,i&&e.apply(e,n)}),t))}},O=e=>(t,...i)=>{t.repeat||e(t,...i)};function P(e,t,i=!0){(0,n.useEffect)((()=>i?(a().bind(e,O((e=>{t(e)}))),()=>{a().unbind(e)}):()=>{}),[t,e,i])}const L=()=>{const e=(0,o.Zp)(),t=(0,s.wA)(),i=(0,s.Pj)(),r=(0,A.z)(),a=(0,S.p)(),{createPlaylist:O}=(0,b.A)(),{shuffle:L,setShuffle:j,setRepeat:D,repeat:M}=(0,T.V)(),{contextURI:U,playingURI:B,isPaused:F,canPause:H,canResume:V}=(0,N.o)((e=>({contextURI:e?.context.uri??null,playingURI:e?.item?.uri??"",isPaused:e?.isPaused,canPause:e?.restrictions.canPause,canResume:e?.restrictions.canResume})),R.a),{seekBackward:G,seekForward:z}=(0,I.p)(),W=(0,h._Y)(),K=(0,s.d4)((e=>e.platform.isDesktop)),Y=(0,y.W)(),[q,Z]=(0,x.A)(B),{createFolder:$}=(0,w.Z)(),Q=(0,v.N)(),{toggleQueue:J,openQueue:X}=(0,f.R)(),ee=(0,l.NC)(_.eWj),{show:te,hide:ie,handle:ne}=(0,p.j)(),re=!!ne,ae=(0,l.NC)(_.DHV,{loadingValue:!1}),se=(0,n.useCallback)((()=>{Q({type:"OPEN"})}),[Q]),oe=(0,n.useCallback)((()=>{t(d.wi(!i.getState().ui.keyboardShortcutsHelpModal.isOpen))}),[t,i]),le=(0,n.useCallback)((e=>{F&&V?r.resume():!F&&H&&r.pause(),e.preventDefault&&e.preventDefault()}),[H,V,F,r]),ce=(0,n.useCallback)((()=>{t((0,E.wH)())}),[t]),ue=(0,n.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)}),[]),de=(0,n.useCallback)((()=>{e(-1)}),[e]),me=(0,n.useCallback)((()=>{e(1)}),[e]),pe=(0,n.useCallback)((()=>{e("/")}),[e]);P(m.gO.OPEN_SEARCH_MODAL,se),P(m.gO.OPEN_HELP,oe),P(m.gO.TOGGLE_PLAY,le),P(m.gO.LOG_OUT,ce),P(m.gO.OPEN_CONTEXT_MENU,ue),P(m.gO.GO_BACKWARDS,de,K),P(m.gO.GO_FORWARDS,me,K),P(m.gO.GO_TO_HOME,pe);const he=(0,n.useCallback)((()=>{e("/collection/tracks")}),[e]),ge=(0,n.useCallback)((()=>{if(null!==U){const t=(0,c.o_)(U).toURLPath(!0);e(t)}}),[U,e]),fe=(0,n.useCallback)((()=>{e(C.W$)}),[e]),ve=(0,n.useCallback)((()=>{e("/search",{state:{preventMoveFocus:!0}})}),[e]),ye=(0,n.useCallback)((()=>{e(C.yf)}),[e]),be=(0,n.useCallback)((()=>{e(C.qF)}),[e]),_e=(0,n.useCallback)((()=>{ee?J():X()}),[ee,X,J]),Ee=(0,n.useCallback)((()=>{W(g.$S.NPV_BUTTON_CLICK)}),[W]),Ce=(0,n.useCallback)((()=>{Z(!q)}),[Z,q]),xe=(0,n.useCallback)((()=>{O()}),[O]),Se=(0,n.useCallback)((()=>{$(u.Ru.get("playlist.default_folder_name"),{before:"start"})}),[$]),Ae=(0,n.useCallback)((()=>{r.skipToNext()}),[r]),Te=(0,n.useCallback)((()=>{r.skipToPrevious()}),[r]),Ie=(0,n.useCallback)((()=>{k((()=>a.raiseVolume()))(100)}),[a]),Ne=(0,n.useCallback)((()=>{k((()=>a.lowerVolume()))(100)}),[a]),we=(0,n.useCallback)((()=>{k((()=>G()))(100)}),[G]),Re=(0,n.useCallback)((()=>{k((()=>z()))(100)}),[z]),ke=(0,n.useCallback)((()=>{j(!L)}),[L,j]),Oe=(0,n.useCallback)((()=>{D((M+1)%3)}),[M,D]),Pe=(0,n.useCallback)((()=>{re?ie():te()}),[ie,re,te]);P(m.gO.GO_TO_LIKED_SONGS,he),P(m.gO.GO_TO_NOW_PLAYING,ge),P(m.gO.GO_TO_CHARTS,fe),P(m.gO.GO_TO_SEARCH,ve),P(m.gO.GO_TO_MADE_FOR_YOU,ye),P(m.gO.GO_TO_NEW_RELEASES,be),P(m.gO.GO_TO_QUEUE,_e),P(Y?m.gO.TOGGLE_YLX_SIDEBAR:m.gO.TOGGLE_NPV_SIDEBAR,Ee),P(m.gO.LIKE_DISLIKE_SONG,Ce),P(m.gO.CREATE_NEW_PLAYLIST,xe,!K),P(m.gO.CREATE_NEW_FOLDER,Se,!K),P(m.gO.SKIP_NEXT,Ae,!K),P(m.gO.SKIP_PREVIOUS,Te,!K),P(m.gO.RAISE_VOLUME,Ie,!K),P(m.gO.LOWER_VOLUME,Ne,!K),P(m.gO.SEEK_BACKWARD,we,!K),P(m.gO.SEEK_FORWARD,Re,!K),P(m.gO.SHUFFLE,ke,!K),P(m.gO.REPEAT,Oe,!K),P(m.gO.TOGGLE_DEBUG_WINDOW,Pe,ae)}},71188:(e,t,i)=>{"use strict";i.d(t,{Bq:()=>N,Ey:()=>_,SL:()=>o,So:()=>T,T4:()=>x,Xt:()=>A,kj:()=>S,lU:()=>s,ly:()=>I,rP:()=>C,zq:()=>E});var n=i(11808),r=i(46288),a=i(72013);let s=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={[s.TITLE]:["title"],[s.ADDED_BY]:["added_by"],[s.ADDED_AT]:["added_at"],[s.ARTIST]:["artist_name","album_title","album_track_number"],[s.ALBUM]:["album_title","album_track_number"],[s.SHOW]:["album_title","added_at"],[s.DURATION]:["duration"]},l={[r.$.TITLE_AND_ARTIST]:a.nw.TITLE,[r.$.TITLE]:a.nw.TITLE,[r.$.ADDED_BY]:a.nw.ADDED_BY,[r.$.ADDED_AT]:a.nw.ADDED_AT,[r.$.DURATION]:a.nw.DURATION,[r.$.ARTIST]:a.nw.ARTIST,[r.$.ALBUM]:a.nw.ALBUM,[r.$.ALBUM_OR_PODCAST]:a.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_DATE]:null,[r.$.CONCERT_VENUE]:null,[r.$.TITLE_AND_AUTHOR]:a.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.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.ADDED_BY,r.$.ADDED_AT,r.$.DURATION],d=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM_OR_PODCAST,r.$.RELEASE_DATE,r.$.ADDED_AT,r.$.DURATION],m=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM_OR_PODCAST,r.$.ADDED_BY,r.$.RELEASE_DATE,r.$.ADDED_AT,r.$.DURATION],p=[r.$.INDEX,r.$.TITLE_AND_AUTHOR,r.$.ADDED_AT,r.$.DURATION],h=[r.$.INDEX,r.$.TITLE_AND_AUTHOR,r.$.ADDED_BY,r.$.ADDED_AT,r.$.DURATION],g=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.EVENT_DATE,r.$.DURATION],f=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.CONCERT_DATE,r.$.CONCERT_VENUE,r.$.DURATION],v=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.ADDED_BY,r.$.DURATION],y=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.ALBUM,r.$.DURATION],b={[r.H.NONE]:void 0,[r.H.DESC]:a.xB.DESC,[r.H.ASC]:a.xB.ASC,[r.H.SECONDARY_DESC]:a.xB.DESC,[r.H.SECONDARY_ASC]:a.xB.ASC},_=({isMixedMedia:e,hasEpisodes:t,hasSpotifyAudiobooks:i,hasDateAdded:n,isLive:a,isConcert:s,isBlend:o,nrCollaborators:l,isBooklist:b,isChart:_,isCompactMode:E=!1,showPlayCount:C=!1})=>{let x=[...c];const S=l>1;if(e){S&&x.splice(3,0,r.$.ADDED_BY);const e=x.indexOf(r.$.ALBUM);i?x.splice(e,1):x.splice(e,1,r.$.ALBUM_OR_PODCAST)}else _?(x=[...y],C&&x.splice(x.indexOf(r.$.TITLE_AND_ARTIST)+1,0,r.$.PLAYS)):t&&S?x=[...m]:t?x=[...d]:o?x=[...v]:b&&S?x=[...h]:b?x=[...p]:S?x=[...u]:a?x=[...g]:s&&(x=[...f]);if(n||x.splice(x.indexOf(r.$.ADDED_AT),1),E){const e=x.indexOf(r.$.TITLE_AND_ARTIST),t=x.indexOf(r.$.TITLE_AND_AUTHOR);-1!==e?x.splice(e,1,r.$.TITLE,r.$.ARTIST):-1!==t&&x.splice(t,1,r.$.TITLE,r.$.AUTHOR)}return x},E=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),x=e=>[r.H.DESC,r.H.SECONDARY_DESC].includes(e),S=(e,t)=>{return e===r.$.TITLE_AND_ARTIST&&(!(t.column!==r.$.TITLE_AND_ARTIST||(i=t.order,![r.H.SECONDARY_ASC,r.H.SECONDARY_DESC].includes(i)))||t.column===r.$.ARTIST);var i},A=e=>{if(e.order&&e.column)return S(e.column,e)?{field:a.nw.ARTIST,order:b[e.order]}:{field:l[e.column],order:b[e.order]}},T=(e,t)=>{const i=e===r.$.TITLE_AND_ARTIST?5:3,n=(t.order+1)%i;return t.column===e?{column:n?t.column:null,order:n}:{column:e,order:r.H.ASC}},I=e=>{if(!e)return;return`text =^# "${e}"`},N=e=>{const t=e||n.Ru.get("playlist.similar-playlist"),i=t.match(new RegExp("(.*)\\((\\d+)\\)$"));return i?`${i[1].trim()} (${r=i[2],parseInt(r,10)+1})`:`${t} (2)`;var r}},7571:(e,t,i)=>{"use strict";i.d(t,{w:()=>u});var n=i(30758),r=i(79203),a=i(11808),s=i(73015),o=i(96122),l=i(6823),c=i(72091);const u=({uri:e,isBook:t})=>{const{add:i,remove:u}=(0,l.p)("prerelease"),d=(0,o.o)("prerelease",[e]).at(0),{enqueueSnackbar:m}=(0,s.d)(),{spec:p,logger:h}=(0,c.r)(r.k,{data:{uri:e}});return{isPreSaved:d,addPresave:(0,n.useCallback)((async()=>{h.logInteraction(p.actionBarFactory().preSaveButtonFactory().hitPresave({prereleaseId:e,itemToBePresaved:e,contextUri:e})),await i(e),m(t?a.Ru.get("web-player.prerelease.audiobook_feedback_presaved"):a.Ru.get("web-player.prerelease.album_feedback_presaved"))}),[i,m,t,h,p,e]),removePresave:(0,n.useCallback)((async()=>{h.logInteraction(p.actionBarFactory().preSaveButtonFactory().hitRemovePresave({prereleaseId:e,itemToBeRemovedFromPresaved:e,contextUri:e})),await u(e)}),[h,u,p,e])}}},17847:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});const n="loginButton"},19447:(e,t,i)=>{"use strict";i.d(t,{g:()=>a});var n=i(30758),r=i(78560);function a(e){const{clearSelected:t}=(0,n.useContext)(r.m);(0,n.useEffect)((()=>{const i=i=>{!(e.current&&i.target instanceof Node)||e.current.contains(i.target)||i.target instanceof Element&&"INPUT"===i.target.tagName||t()};return window.addEventListener("click",i),()=>{window.removeEventListener("click",i)}}),[t,e])}},9559:(e,t,i)=>{"use strict";i.d(t,{R:()=>l});var n=i(30758),r=i(11808),a=i(36921),s=i(78560),o=i(14627);function l({index:e,label:t,contextUri:i,sectionId:l,isEnabled:c=!0}){const{draggable:u,onDragStart:d}=(0,o.P)(),{isSelected:m,toggleSelected:p,getSelected:h}=(0,n.useContext)(s.m),g=(0,n.useCallback)((n=>{if(!c||n.target!==n.currentTarget)return;m(e)||p(e,!1,!1);const s=h(),o=s.map((({uri:e})=>e)),u=s.map((({uid:e})=>e)).filter(Boolean),g=s.map((({type:e})=>e)).map(a.j3);d(n,{itemUris:o,itemIds:u,itemMimeTypes:g,dragLabelText:o.length>1?r.Ru.get("tracklist.drag.multiple.label",o.length):t,contextUri:i,sectionId:l})}),[c,m,e,h,d,t,i,l,p]);return(0,n.useMemo)((()=>({draggable:u,onDragStart:g})),[u,g])}},78975:(e,t,i)=>{"use strict";i.d(t,{d:()=>s});var n=i(30758),r=i(15549),a=i(78560);function s(e){const{clearSelected:t,getSelected:i}=(0,n.useContext)(a.m),{filter:s}=(0,n.useContext)(r.g),o=(0,n.useRef)(e);o.current=e;return(0,n.useCallback)((e=>{if("Escape"===e.key&&!e.repeat){if(s)return;t()}if(("Backspace"===e.key||"Delete"===e.key)&&!e.repeat){const e=i();e.length&&o.current?.(e)}}),[s,t,i])}},69915:(e,t,i)=>{"use strict";i.d(t,{w:()=>a});var n=i(30758),r=i(34892);function a(){const e=(0,n.useContext)(r._);if(!e)throw new Error("useTrackListColumns must be used within a TracklistColumnsContext!");return e.visibleColumns}},46288:(e,t,i)=>{"use strict";i.d(t,{$:()=>n,H:()=>r});let n=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_DATE="CONCERT_DATE",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}({})},9474:(e,t,i)=>{"use strict";i.d(t,{y:()=>l});var n=i(96849),r=i(6941),a=i(40009),s=i(69905),o=i(46288);const l=(e,t,i)=>{let l=s.o;return 0===e&&t===o.$.INDEX?l=r.y:1===e&&i[0].columnType===o.$.INDEX||0===e?l=a.U:e===i.length-1&&(l=n.l),l}},25390:(e,t,i)=>{"use strict";i.d(t,{aX:()=>o});var n=i(88485);let r=function(e){return e.STREAM_SIGNAL="userFraudStreamSignal",e}({});class a extends n.V{}const s=new a;function o(e,t){s.emit(r.STREAM_SIGNAL,{event:e,action:t})}},72842:(e,t,i)=>{"use strict";i.d(t,{Ai:()=>s,YR:()=>a,oe:()=>o});var n=i(65987),r=i(24359);function a(e,t,i){if(!e)return void console.error("No grid element found. Canceling moving focus");if(!(0,r.fk)(e))return;const a=e.querySelector('[tabindex="0"]'),s=i?d:u;if(t===n.O.UP){const t=s(e,a,n.O.UP);if(!t)return;(0,r.MS)(a,l(a,t))}if(t===n.O.DOWN){const t=s(e,a,n.O.DOWN);if(!t)return;(0,r.MS)(a,l(a,t))}if(t===n.O.LEFT){const t=c(a,-1);if(t)return void(0,r.MS)(a,t);const i=s(e,a,n.O.LEFT);if(!i)return;const o=i.querySelectorAll(r.nu),l=o[o.length-1];(0,r.MS)(a,l)}if(t===n.O.RIGHT){const t=c(a,1);if(t)return void(0,r.MS)(a,t);const i=s(e,a,n.O.RIGHT);if(!i)return;const o=i.querySelectorAll(r.nu)[0];(0,r.MS)(a,o)}}function s(e){const t=e.closest('[role="grid"]');if(!t)return;const i=e.querySelectorAll(r.nu)[0],n=t.querySelector('[tabindex="0"]');(0,r.MS)(n,i)}function o(e,t,i){const n=e.querySelector(`[aria-rowindex="${t}"]`);if(!n)return void e.focus({preventScroll:!0});const a=n.querySelector(`[aria-colindex="${i}"]`);if(!a)return void s(n);const o=a.querySelectorAll(r.nu)[0],l=e.querySelector('[tabindex="0"]');(0,r.MS)(l,o)}function l(e,t){const i=e.closest("[aria-colindex]"),n=Array.from(i.querySelectorAll(r.nu)).indexOf(e),a=t.querySelectorAll(r.nu);return a[n]||a[0]}function c(e,t){const i=Array.from(e.closest("[aria-colindex]").querySelectorAll(r.nu)),n=i.findIndex((t=>t===e))+t;return i[n]}function u(e,t,i){const a=t.closest("[aria-rowindex]");if(i===n.O.DOWN){const i=Array.from(e.querySelectorAll("[aria-rowindex]")),n=t.closest("[aria-colindex]").getAttribute("aria-colindex");for(let e=i.indexOf(a)+1;e<i.length;e++){const t=i[e].querySelector(`[aria-colindex="${n}"]`);if((0,r.tM)(t))return t}}if(i===n.O.UP){const i=Array.from(e.querySelectorAll("[aria-rowindex]")),n=i.indexOf(a),s=t.closest("[aria-colindex]").getAttribute("aria-colindex");for(let e=n-1;e>=0;e--){const t=i[e].querySelector(`[aria-colindex="${s}"]`);if((0,r.tM)(t))return t}}if(i===n.O.LEFT){const e=Array.from(a.querySelectorAll("[aria-colindex]")),i=t.closest("[aria-colindex]");for(let t=e.indexOf(i)-1;t>=0;t--){const i=e[t];if((0,r.tM)(i))return i}}if(i===n.O.RIGHT){const e=Array.from(a.querySelectorAll("[aria-colindex]")),i=t.closest("[aria-colindex]");for(let t=e.indexOf(i)+1;t<e.length;t++){const i=e[t];if((0,r.tM)(i))return i}}return null}function d(e,t,i){if(i===n.O.DOWN){const i=t.closest("[aria-colindex]").getAttribute("aria-colindex"),n=t.closest("[aria-rowindex]").getAttribute("aria-rowindex"),a=Array.from(t.closest('[role="grid"]').querySelectorAll("[aria-rowindex]")).map((e=>parseInt(e.getAttribute("aria-rowindex")??"0",10))),s=parseInt(n,10),o=Math.max(...a);for(let t=s+1;t<=o;t+=1){const n=t,a=e.querySelector(`[aria-colindex="${i}"][aria-rowindex="${n}"]`);if((0,r.tM)(a))return a}}if(i===n.O.UP){const i=t.closest("[aria-colindex]").getAttribute("aria-colindex"),n=t.closest("[aria-rowindex]").getAttribute("aria-rowindex");for(let t=parseInt(n,10)-1;t>=0;t-=1){const n=t,a=e.querySelector(`[aria-colindex="${i}"][aria-rowindex="${n}"]`);if((0,r.tM)(a))return a}}if(i===n.O.LEFT){const i=t.closest("[aria-colindex]"),n=parseInt(i.getAttribute("aria-rowindex"),10),a=parseInt(i.getAttribute("aria-colindex"),10),s=Array.from(e.querySelectorAll(`[aria-rowindex="${n}"]`));for(let e=a-2;e>=0;e--){const t=s[e];if((0,r.tM)(t))return t}}if(i===n.O.RIGHT){const i=t.closest("[aria-colindex]"),n=parseInt(i.getAttribute("aria-rowindex"),10),a=parseInt(i.getAttribute("aria-colindex"),10),s=Array.from(e.querySelectorAll(`[aria-rowindex="${n}"]`));for(let e=a;e<s.length;e++){const t=s[e];if((0,r.tM)(t))return t}}return null}},96434:(e,t,i)=>{"use strict";i.d(t,{I:()=>s,X:()=>o});var n=i(30758),r=i(50766);const a=(0,i(24423).y)((()=>({transferKey:null,timestamp:0}))),s=(e,t)=>{a.setState({transferKey:e,timestamp:Date.now(),focusOptions:t})},o=(e,t,i=1e3)=>{const{transferKey:s,timestamp:o,focusOptions:l}=(0,r.Pj)(a);(0,n.useLayoutEffect)((()=>{null!==e&&e===s&&o>Date.now()-i&&t.current?.focus(l)}),[l,t,s,i,o,e])}},87832:(e,t,i)=>{"use strict";i.d(t,{i:()=>a});var n=i(30758);class r{constructor(e={}){this.settings={level:e.level||"polite",parent:e.parent||document.body,idPrefix:e.idPrefix||"live-region-",delay:e.delay||0},this.currentRegion=document.createElement("span")}say(e,t=this.settings.delay){this.clearNode(),this.currentRegion=document.createElement("span"),this.currentRegion.id=this.settings.idPrefix+Math.floor(1e4*Math.random());const i="assertive"!==this.settings.level?"status":"alert";this.currentRegion.setAttribute("aria-live",this.settings.level),this.currentRegion.setAttribute("role",i),this.currentRegion.setAttribute("style","clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px"),this.settings.parent.appendChild(this.currentRegion),window.setTimeout((()=>{this.currentRegion.textContent=e}),t)}clearNode(){const e=this.settings.parent.querySelector(`[id^="${this.settings.idPrefix}"]`);e&&this.settings.parent.removeChild(e)}}const a=({delay:e,idPrefix:t,level:i,parent:a}={})=>{const s=(0,n.useMemo)((()=>new r({delay:e,idPrefix:t,level:i,parent:a})),[e,t,i,a]);return(0,n.useEffect)((()=>()=>{s.clearNode()}),[s]),s}},22210:(e,t,i)=>{"use strict";i.d(t,{R:()=>r});var n=i(30758);const r=e=>{const[t,i]=(0,n.useState)(null);(0,n.useEffect)((()=>{const t=e.current;if(!t)return()=>{};const n=({target:e})=>{e instanceof HTMLElement&&i(e)};return t.addEventListener("focusout",n),()=>{t.removeEventListener("focusout",n)}}),[e]),(0,n.useEffect)((()=>{const n=e.current;if(!t||!n)return;const r=n.contains(t),a=n.contains(document.activeElement);!r&&!a&&n.focus({preventScroll:!0}),i(null)}),[e,t])}},45879:(e,t,i)=>{"use strict";i.d(t,{KV:()=>s,ev:()=>a,fC:()=>n,uC:()=>r});const n="isPlaybackBarRemainingTimeToggled",r=64,a=416,s=8},5350:(e,t,i)=>{"use strict";i.d(t,{HK:()=>r,xt:()=>a});var n=i(15742);i(8385);const r=Spicetify.GraphQL.Definitions["getAlbum"]=new n.l("getAlbum","query","469874edcad37b7a379d4f22f0083a49ea3d6ae097916120d9bbe3e36ca79e9d",null),a=Spicetify.GraphQL.Definitions["queryAlbumTracks"]=new n.l("queryAlbumTracks","query","469874edcad37b7a379d4f22f0083a49ea3d6ae097916120d9bbe3e36ca79e9d",null)},2287:(e,t,i)=>{"use strict";i.d(t,{$:()=>A,w:()=>T});var n=i(30758),r=i(25639),a=i(69898),s=i(11808),o=i(5350),l=i(16659),c=i(71817),u=i(36485);const d=e=>({...e,uid:void 0,isSaved:!1,playcount:"0",linkedUri:e.uri}),m=e=>{switch(e){case"album":return l._.Album;case"ep":return l._.Ep;case"single":return l._.Single;case"compilation":return l._.Compilation;default:return(0,u.d)(e)}};var p=i(86495),h=i(80460),g=i(52608),f=i(32712),v=i(69916),y=i(22253),b=i(8385),_=i(11898),E=i(16972),C=i(85065);const x=(e,t,i)=>{const{name:n}=o.HK,r={uri:e,locale:t,offset:0,limit:50};return{queryKey:[n,r],queryFn:async()=>{const e=await(0,y.c)(i,o.HK,r);return"Album"===e?.data?.albumUnion.__typename?(0,p.XA)(e?.data.albumUnion):null}}},S=e=>{const t=s.Ru.getLocaleForURLPath();return(0,h.W)({type:"link",uri:e})?`${f.CT}${t}`:""},A=e=>{const t=!(0,g.n)(),i=(0,E.T)(e),a=(0,_.f)(),[s,o]=(0,n.useState)(null),{request:l}=(0,n.useContext)(v.j),u=S(e),p=x(e,u,l),{data:h,isPending:f,error:y}=(0,r.I)({...p,gcTime:15*b.i,staleTime:5e3}),A=t&&i===C.kw.YES;(0,n.useEffect)((()=>{A&&a.getAlbum(e).then((e=>o(e?(e=>{return{type:c.c.ALBUM,uri:e.uri,name:e.name,artists:(i=e.artists,i.map((e=>({type:c.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:m(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(d)};var t,i})(e):null)))}),[A,a,e]);return{loading:A?!s:f,error:y,data:A?s:h??null,canLoadOffline:A}},T=e=>{const{request:t}=(0,n.useContext)(v.j),i=(0,a.jE)(),r=S(e);return(0,n.useCallback)((()=>{const n=x(e,r,t);i.prefetchQuery(n)}),[i,t,r,e])}},27911:(e,t,i)=>{"use strict";i.d(t,{F:()=>n.F});var n=i(51736)},77860:(e,t,i)=>{"use strict";i.d(t,{t:()=>c});var n=i(30758),r=i(46288),a=i(38637),s=i(69011),o=i(89956);const l=[r.$.INDEX,r.$.TITLE_AND_ARTIST,r.$.PLAYS,r.$.DURATION],c=()=>{const{isCompactMode:e}=(0,a.a)(),t=(0,o.My)()===s.m.Web;return(0,n.useMemo)((()=>(({isWebPlayer:e,isCompactMode:t})=>{const i=[...l];return e&&i.splice(i.indexOf(r.$.PLAYS),1),t&&i.splice(i.indexOf(r.$.TITLE_AND_ARTIST),1,r.$.TITLE,r.$.ARTIST),i})({isWebPlayer:t,isCompactMode:e})),[e,t])}},16659:(e,t,i)=>{"use strict";i.d(t,{_:()=>n});let n=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}({})},86495:(e,t,i)=>{"use strict";i.d(t,{TI:()=>m,XA:()=>d});var n=i(90461),r=i(79787),a=i(71817),s=i(36485);const o=e=>(e||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),l=e=>{switch(e){case r.by.Minute:case r.by.Hour:case r.by.Day:return"day";case r.by.Month:return"month";case r.by.Year:case void 0:return"year";default:return(0,s.d)(e)}},c=e=>{if(null!==e)return{date:e.isoString,precision:l(e.precision)}},u=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===r.x7.Explicit,is19PlusOnly:e.track.contentRating?.label===r.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.associations?.associatedVideos?.totalCount||0)>0};var t},d=e=>{const t={totalCount:e.discs.totalCount,items:e.discs.items.map((e=>({type:"AlbumDisc",discNumber:e.number,nrTracks:e.tracks.totalCount})))},i=e.tracks.items.map(u),s=(0,n.ED)(i,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:(d=e.moreAlbumsByArtist,d?.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.tracks.totalCount,isPlayable:e.tracks.items.some((e=>e.track.playability.playable)),isCatalogueRestricted:e.playability.reason===r.$c.CatalogueRestricted,discs:t,copyright:e.copyright,albumType:e.type,duration:(l=e.tracks,{durationMs:l.items.length>0?l.items.reduce(((e,t)=>e+t.track.duration.totalMilliseconds),0)/l.items.length*l.totalCount:0,isEstimate:l.items.length<l.totalCount}),releases:e.releases,extractedColors:e.coverArt?.extractedColors??null,courtesyLine:e.courtesyLine??null,sharingInfo:e.sharingInfo??null,release:c(e.date),items:s};var l,d,m},m=(e,t)=>{if("Album"!==e?.albumUnion?.__typename)return{items:[],totalLength:0};const i=e.albumUnion.tracks.items.map(u);return{items:(0,n.ED)(i,t)||[],totalLength:(0,n.YD)(t)?t.totalCount+e.albumUnion.tracks.totalCount:e.albumUnion.tracks.totalCount}}},90461:(e,t,i)=>{"use strict";i.d(t,{E:()=>o,ED:()=>s,YD:()=>a});var n=i(11808),r=i(16659);const a=e=>e.totalCount>=2&&e.totalCount<=10,s=(e,t)=>{if(!a(t)||!e)return e;let i=0;return e.reduce(((e,t)=>((t.trackNumber<i||1===t.trackNumber)&&e.push({type:"AlbumDisc",discNumber:t.discNumber,nrTracks:null}),e.push(t),i=t.trackNumber,e)),[])},o=e=>{switch(e){case r._.Single:return n.Ru.get("web-player.album.premium-only-banner-single");case r._.Compilation:return n.Ru.get("web-player.album.premium-only-banner-compilation");case r._.Ep:return n.Ru.get("web-player.album.premium-only-banner-ep");default:return n.Ru.get("web-player.album.premium-only-banner-album")}}},27281:(e,t,i)=>{"use strict";i.d(t,{v:()=>l});var n=i(81987),r=i(19159),a=i(14035),s=i(95421),o=i(95339);function l(e){if(!(0,n.NC)(r.N_Z,{loadingValue:!1}))return!1;if("string"==typeof e)return(0,a.g)(e);const t=e;return(0,o.v)(t)||(0,s.p)(t)}},14874:(e,t,i)=>{"use strict";i.d(t,{A:()=>o,t:()=>s});var n=i(75930),r=i(83547),a=i(84492);let s=function(e){return e[e.UNCURATED=0]="UNCURATED",e[e.CURATED=1]="CURATED",e}({});const o={[s.CURATED]:{Icon:n.k,iconProps:{semanticColor:"textBrightAccent"},transitions:{[s.UNCURATED]:{animationFilePath:(0,a.b)("animations/plus-deselected-confetti-white.json"),style:{transform:"scale(2.448)"}}}},[s.UNCURATED]:{Icon:r.P,transitions:{[s.CURATED]:{animationFilePath:(0,a.b)("animations/plus-selected-confetti-white.json"),style:{transform:"scale(2.448)"}}}}}},44694:(e,t,i)=>{"use strict";i.d(t,{g:()=>n.g});var n=i(23520)},65500:(e,t,i)=>{"use strict";i.d(t,{v:()=>n.v});var n=i(27281)},73426:(e,t,i)=>{"use strict";i.d(t,{A:()=>b,R:()=>_});var n=i(30758),r=i(25639),a=i(69898),s=i(81987),o=i(11808),l=i(15742),c=i(8385);const u=Spicetify.GraphQL.Definitions["queryArtistOverview"]=new l.l("queryArtistOverview","query","da986392124383827dc03cbb3d66c1de81225244b6e20f8d78f9f802cc43df6e",null);var d=i(80460),m=i(19159),p=i(32712),h=i(69916),g=i(22253);const f=e=>{const t=o.Ru.getLocaleForURLPath();return(0,d.W)({type:"link",uri:e})?`${p.CT}${t}`:""},v=(e,t)=>[e,t],y=(e,t,i,n)=>async()=>(0,g.c)(n,u,{uri:e,locale:t,includePrerelease:i}),b=e=>{const t=f(e),{request:i}=(0,n.useContext)(h.j),a=(0,s.NC)(m.xnZ),{data:o,isLoading:l,isFetching:u,error:d}=(0,r.I)({queryKey:v(e,t),queryFn:y(e,t,a,i),gcTime:5*c.i,staleTime:5*c.i});return{data:o?.data??null,extensions:o?.extensions,error:d??null,loading:l,fetching:u}},_=e=>{const{request:t}=(0,n.useContext)(h.j),i=(0,s.NC)(m.xnZ),r=(0,a.jE)(),o=f(e);return(0,n.useCallback)((()=>{r.prefetchQuery({queryKey:v(e,o),queryFn:y(e,o,i,t),staleTime:5*c.i})}),[i,r,t,o,e])}},2431:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ArtistOffers:()=>zt,default:()=>lr});var n=i(30758),r=i(9183),a=i(5800),s=i(61544),o=i(21953),l=i(11808),c=i(47493),u=i(31685),d=i(83028),m=i(57734),p=i(15742),h=i(8385);const g=Spicetify.GraphQL.Definitions["queryArtistAppearsOn"]=new p.l("queryArtistAppearsOn","query","9a4bb7a20d6720fe52d7b47bc001cfa91940ddf5e7113761460b4a288d18a4c1",null);var f=i(24811),v=i(86070);const y=n.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:i,error:n,data:a}=(s={uri:t},p={gcTime:15*h.i},(0,h.I)(g,s,p));var s,p;const y="Artist"===a?.artistUnion.__typename?a.artistUnion:null;if(null===y||n||i)return(0,v.jsx)(d.A,{hasError:null!==n,errorMessage:l.Ru.get("error.request-artist-appears-on")});const b=y.profile.name,_=(0,f.Lf)(y.relatedContent.appearsOn.items);return(0,v.jsxs)("div",{className:"contentSpacing",children:[b?(0,v.jsx)(u.Q,{children:l.Ru.get("artist-page.appearson.seo.title",b)}):null,(0,v.jsx)(m.$,{title:l.Ru.get("artist.appears-on"),total:_.length,showAll:!0,fullPage:!0,rowGap:o.lT,children:_.map(((e,t)=>(0,v.jsx)(c.a,{index:t,...(0,f.UT)(e)},e.uri)))})]})}));var b=i(97500),_=i.n(b),E=i(81987),C=i(25449),x=i(12783),S=i(97684),A=i(47231),T=i(97393),I=i(39796),N=i(88778),w=i(54874),R=i(21752),k=i(32572),O=i(51271),P=i(59996),L=i(38838),j=i(76652),D=i(34892),M=i(27911),U=i(77860),B=i(38637),F=i(14627),H=i(45346),V=i(75003),G=i(21056),z=i(62733),W=i(62720),K=i(79787),Y=i(4055);const q="artist-artistDiscography-topBar",Z="artist-artistDiscography-topBarScrolled",$="artist-artistDiscography-artistName",Q="artist-artistDiscography-button",J="artist-artistDiscography-active",X="artist-artistDiscography-tracklist",ee="artist-artistDiscography-cardGrid",te="artist-artistDiscography-headerContainer",ie="artist-artistDiscography-firstAlbum",ne="artist-artistDiscography-headerImage",re="artist-artistDiscography-headerMetadata",ae="artist-artistDiscography-headerButtons",se="artist-artistDiscography-headerTitle",oe="k_Sa6fZvlbMKvnRJB6Zu";function le(e){switch(e){case K._m.Single:return l.Ru.get("single");case K._m.Ep:return l.Ru.get("ep");case K._m.Compilation:return l.Ru.get("compilation");case K._m.Album:default:return l.Ru.get("album")}}const ce=n.memo((function({album:e,artistUri:t,usePlayContextPage:i,pageIndex:r,setTopBarContent:a}){const s=(0,H.W)(),[o,c]=(0,W.A)(e.uri),{titleRef:u,tracklistRef:d,displayTopBar:m}=(0,V.h)(),{isCompactMode:p}=(0,B.a)(),h=(0,n.useCallback)((async()=>{s({targetUri:e.uri,intent:o?"unsave":"save",type:"click"});try{await c(!o)}catch{}}),[s,e.uri,o,c]),{isPlaying:g,togglePlay:f,usePlayContextItem:y}=i({pageURI:e.uri,pageIndex:r}),{draggable:b,onDragStart:E}=(0,F.P)({itemUris:e.uri?[e.uri]:[],dragLabelText:e.name}),C=(0,n.useMemo)((()=>({items:[],totalCount:0})),[]),q=(0,n.useMemo)((()=>{if(m)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(j.D,{size:"medium",onClick:()=>f(),disabled:!e.playability.playable,isPlaying:g,uri:e.uri}),(0,v.jsx)(R.X,{text:e.name,dragUri:e.uri,dragLabel:e.name})]})}),[e.name,e.playability.playable,e.uri,m,g,f]);(0,n.useEffect)((()=>{a(q)}),[a,q]);const{date:Z,precision:$}=e?.date?(0,Y.mp)(e.date):{date:void 0,precision:void 0},Q=(0,U.t)();return(0,v.jsxs)(z.P,{surface:G.u.ALBUM,uris:[e.uri],children:[(0,v.jsxs)("div",{className:_()(te,{[ie]:0===r}),children:[(0,v.jsx)(k.b,{className:ne,images:e.coverArt?.sources||[],name:e.name,placeholderType:"album",dragUri:e.uri}),(0,v.jsxs)("div",{className:re,children:[(0,v.jsx)(x.E,{variant:"titleMedium",semanticColor:"textBase",className:se,draggable:b&&!!e.uri,onDragStart:E,children:(0,v.jsx)(P.N,{to:e.uri,children:e.name})}),(0,v.jsx)("div",{ref:u}),(0,v.jsx)(O.t,{releaseDate:Z,releaseDatePrecision:$,totalItems:e.tracks.totalCount,albumType:le(e.type),isRestricted:e.playability.reason===K.$c.CatalogueRestricted,hasTracks:!0}),(0,v.jsxs)("div",{className:ae,children:[(0,v.jsx)(j.D,{onClick:()=>f(),disabled:!e.playability.playable,isPlaying:g,size:"small",uri:e.uri,version:L.H4.secondary}),(0,v.jsx)(w.e,{children:(0,v.jsx)(S.M,{isAdded:!!o,onClick:h,disabled:!1,size:S.t.sm,condensed:!0})}),(0,v.jsx)(A.f,{uri:e.uri,isFollowing:!!o,onFollow:h,size:A.M.sm,condensed:!0}),(0,v.jsx)(I.b,{menu:(0,v.jsx)(N.h,{uri:e.uri,artistUri:t,sharingInfo:e.sharingInfo}),children:(0,v.jsx)(T.e,{size:T.M.sm,label:l.Ru.get("more.label.context",e.name)})})]})]})]}),(0,v.jsx)("div",{ref:d,className:X,children:(0,v.jsx)(D.a,{columns:Q,children:(0,v.jsx)(M.F,{ariaLabel:e.name,nrTracks:e.tracks.totalCount,albumUri:e.uri,discs:C,usePlayContextItem:y,isCompactMode:p})})})]})}));var ue=i(80331);const de=n.memo((function(e){const{usePlayContextPage:t,pageIndex:i}=e,{isPlaying:n,togglePlay:r}=t({pageURI:e.uri,pageIndex:i});return(0,v.jsx)(ue.R,{index:i,showType:!0,...e,delegatePlayback:!0,isPlaying:n,onPlay:()=>r()})}));var me=i(31307),pe=i(50363),he=i(2e3),ge=i(41695),fe=i(45396);let ve=function(e){return e.GRID="grid",e.LIST="list",e}({});const ye=n.memo((function({artistName:e,artistUri:t,albumType:i,dropDownOptions:r,onTypeChange:a,displayMode:s,onDisplayModeChange:o,topBarContent:l}){const[c,u]=(0,n.useState)(!1),d=(0,n.useCallback)((e=>{const t=e.target.scrollTop;t>0&&!c?u(!0):0===t&&c&&u(!1)}),[c]);return(0,fe.g)(d,{executeOnceOnStart:!0}),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(ge.g,{children:s!==ve.GRID?l:void 0}),(0,v.jsxs)("div",{className:_()(q,{[Z]:c}),children:[(0,v.jsx)(x.E,{as:"div",variant:"titleSmall",className:$,children:(0,v.jsx)(P.N,{to:t,children:e})}),(0,v.jsx)(he.g,{options:r,onSelect:a,selected:i}),(0,v.jsx)("button",{type:"button",role:"switch","aria-checked":s===ve.LIST,"aria-label":ve.LIST,className:_()(Q,{[J]:s===ve.LIST}),onClick:()=>o(ve.LIST),children:(0,v.jsx)(me.N,{size:"small"})}),(0,v.jsx)("button",{type:"button",role:"switch","aria-checked":s===ve.GRID,"aria-label":ve.GRID,className:_()(Q,{[J]:s===ve.GRID}),onClick:()=>o(ve.GRID),children:(0,v.jsx)(pe.D,{size:"small"})})]})]})})),be=Spicetify.GraphQL.Definitions["queryArtistDiscographyAlbums"]=new p.l("queryArtistDiscographyAlbums","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),_e=Spicetify.GraphQL.Definitions["queryArtistDiscographySingles"]=new p.l("queryArtistDiscographySingles","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Ee=Spicetify.GraphQL.Definitions["queryArtistDiscographyCompilations"]=new p.l("queryArtistDiscographyCompilations","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Ce=Spicetify.GraphQL.Definitions["queryArtistDiscographyAll"]=new p.l("queryArtistDiscographyAll","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),xe=Spicetify.GraphQL.Definitions["queryArtistDiscographyOverview"]=new p.l("queryArtistDiscographyOverview","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null);var Se=i(69916);var Ae=i(62413),Te=i(19159),Ie=i(16436),Ne=i(97513),we=i(75235),Re=i(42582);const ke=(0,n.memo)((function({uri:e,name:t,dropDownOptions:i,nrAll:a,nrAlbums:o,nrSingles:l,nrCompilations:c,initialDropDownOption:u}){const[d,m]=(0,n.useState)(u),[,p]=(0,n.useState)(0),{pathname:h}=(0,r.zy)(),g=(0,r.Zp)(),[y=ve.LIST,b]=(0,we.x)("discography-page-view-mode",ve.LIST),E=(0,Ae.A)(),[x,S]=(0,n.useState)(void 0),A=(0,n.useRef)({all:{items:[],currentOffset:0,totalCount:a},[K._m.Album]:{items:[],currentOffset:0,totalCount:o},[K._m.Single]:{items:[],currentOffset:0,totalCount:l},[K._m.Compilation]:{items:[],currentOffset:0,totalCount:c}}),{requestAlbums:T,requestSingles:I,requestCompilations:N,requestAll:w}=(e=>{const{request:t}=(0,n.useContext)(Se.j);return{requestAlbums:(0,n.useCallback)((async(i,n)=>{if(!n)return[];const r=await t(be,{uri:e,offset:i,limit:n});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,f.pe)(r.data.artistUnion.discography.albums.items||[])}),[e,t]),requestSingles:(0,n.useCallback)((async(i,n)=>{if(!n)return[];const r=await t(_e,{uri:e,offset:i,limit:n});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,f.pe)(r.data.artistUnion.discography.singles.items||[])}),[e,t]),requestCompilations:(0,n.useCallback)((async(i,n)=>{if(!n)return[];const r=await t(Ee,{uri:e,offset:i,limit:n});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,f.pe)(r.data.artistUnion.discography.compilations.items||[])}),[e,t]),requestAll:(0,n.useCallback)((async(i,n)=>{if(!n)return[];const r=await t(Ce,{uri:e,offset:i,limit:n});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,f.pe)(r.data.artistUnion.discography.all.items||[])}),[e,t])}})(e),R=(0,n.useCallback)((async()=>{let e=T;d.key===K._m.Single&&(e=I),d.key===K._m.Compilation&&(e=N),"all"===d.key&&(e=w);const t=A.current[d.key].totalCount-A.current[d.key].currentOffset,i=await e(A.current[d.key].currentOffset,Math.min(50,t));i.length>0&&(A.current[d.key].items=A.current[d.key].items.concat(i),A.current[d.key].currentOffset+=i.length),p((e=>e+1))}),[d.key,T,w,N,I]),k=(0,n.useCallback)((e=>{const t=i.find((t=>t.key===e));t&&(g(h.replace(/discography.*/,`discography/${t.key.toLowerCase()}`),{replace:!0}),m(t))}),[i,g,h]),{usePlayContextPage:O}=(0,Re.P)({uri:e,pages:A.current[d.key].items.filter((e=>(0,s._T)(e.uri))).map((e=>{const t=(0,s.o_)(e.uri).id;return{uri:e.uri,url:`hm://artistplaycontext/v1/page/spotify/album/${t}/km`}})),metadata:{"disable-autoplay":"true",context_description:t}},{featureIdentifier:"artist"});return(0,v.jsxs)(Ne._,{onReachBottom:R,children:[(0,v.jsx)(ye,{artistName:t,artistUri:e,topBarContent:x,dropDownOptions:i,albumType:d,onTypeChange:k,displayMode:y,onDisplayModeChange:e=>{b(e)}}),y===ve.LIST?A.current[d.key].items.map(((t,i)=>(0,v.jsx)(ce,{album:t,artistUri:e,usePlayContextPage:O,pageIndex:i,setTopBarContent:S},t.uri))):(0,v.jsx)(Ie.E,{className:_()(ee,{[oe]:E}),render:()=>A.current[d.key].items.map(((i,n)=>(0,v.jsx)(de,{...(0,C.m)(i,e,t),usePlayContextPage:O,pageIndex:n,isRestricted:i.playability.reason===K.$c.CatalogueRestricted},i.uri)))})]})})),Oe=(0,n.memo)((function(){const{artistId:e="",albumType:t}=(0,r.g)(),i=(0,E.NC)(Te.dAx),n=(0,f.ay)(e),{loading:a,error:s,data:o}=(c={uri:n},m={gcTime:15*h.i},(0,h.I)(xe,c,m));var c,m;if(null===o||!o?.artistUnion||"Artist"!==o?.artistUnion.__typename||s||a)return(0,v.jsx)(d.A,{hasError:null!==s,errorMessage:l.Ru.get("error.request-artist-discography")});const p=o.artistUnion.profile.name,g=[];o.artistUnion.discography.all.totalCount>0&&i&&g.push({key:"all",value:l.Ru.get("artist-page-discography.all")}),o.artistUnion.discography.albums.totalCount>0&&g.push({key:K._m.Album,value:l.Ru.get("artist.albums")}),o.artistUnion.discography.singles.totalCount>0&&g.push({key:K._m.Single,value:l.Ru.get("artist.singles")}),o.artistUnion.discography.compilations.totalCount>0&&g.push({key:K._m.Compilation,value:l.Ru.get("artist.compilations")});const y=g.find((e=>!("all"!==e.key||"all"!==t||!i)||(e.key===K._m.Album&&t===K._m.Album.toLowerCase()||(e.key===K._m.Single&&t===K._m.Single.toLowerCase()||e.key===K._m.Compilation&&t===K._m.Compilation.toLowerCase()))))||g[0];return(0,v.jsxs)(v.Fragment,{children:[p?(0,v.jsx)(u.Q,{children:l.Ru.get("artist-page.discography.seo.title",p)}):null,(0,v.jsx)("section",{className:"contentSpacing",children:(0,v.jsx)(ke,{uri:n,name:p||"",dropDownOptions:g,nrAll:o.artistUnion.discography.all.totalCount,nrAlbums:o.artistUnion.discography.albums.totalCount,nrSingles:o.artistUnion.discography.singles.totalCount,nrCompilations:o.artistUnion.discography.compilations.totalCount,initialDropDownOption:y})})]})}));var Pe=i(33779);const Le=Spicetify.GraphQL.Definitions["queryArtistDiscoveredOn"]=new p.l("queryArtistDiscoveredOn","query","71c2392e4cecf6b48b9ad1311ae08838cbdabcfd189c6bf0c66c2430b8dcfdb1",null),je=n.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:i,error:n,data:a}=(s={uri:t},c={gcTime:15*h.i},(0,h.I)(Le,s,c));var s,c;if(null===a||"Artist"!==a.artistUnion.__typename||n||i)return(0,v.jsx)(d.A,{hasError:null!==n,errorMessage:l.Ru.get("error.request-artist-featuring")});const p=a.artistUnion.relatedContent.discoveredOnV2.items;return(0,v.jsxs)("div",{className:"contentSpacing",children:[(0,v.jsx)(u.Q,{children:l.Ru.get("artist-page.discovered-on")}),(0,v.jsx)(m.$,{title:l.Ru.get("artist-page.discovered-on"),total:p.length,showAll:!0,fullPage:!0,rowGap:o.lT,children:p.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const i=e.data,n="User"===i.ownerV2.data.__typename&&i.ownerV2.data.name||i.name;return(0,v.jsx)(Pe.B,{index:t,uri:i.uri,name:i.name,authorName:n,description:i.description||"",images:i.images?.items?.[0]?.sources||[]},i.uri)}))})]})})),De=Spicetify.GraphQL.Definitions["queryArtistFeaturing"]=new p.l("queryArtistFeaturing","query","20842d6d9d2d28ef945984b68cb927bb33edd00eab84a8da1667def21f1f2c54",null),Me=n.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:i,error:n,data:a}=(s={uri:t},o={gcTime:15*h.i},(0,h.I)(De,s,o));var s,o;if(null===a||"Artist"!==a?.artistUnion?.__typename||n||i)return(0,v.jsx)(d.A,{hasError:null!==n,errorMessage:l.Ru.get("error.request-artist-featuring")});const c=a.artistUnion,{name:p}=c.profile,g=c.relatedContent.featuringV2.items;return(0,v.jsxs)("div",{className:"contentSpacing",children:[p?(0,v.jsx)(u.Q,{children:l.Ru.get("artist-page.featuring.seo.title",p)}):null,(0,v.jsx)(m.$,{title:l.Ru.get("artist-page.featuring",p),total:g.length,showAll:!0,children:g.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const i=e.data,n="User"===i.ownerV2.data.__typename&&i.ownerV2.data.name||i.name;return(0,v.jsx)(Pe.B,{index:t,uri:i.uri,name:i.name,authorName:n,description:i.description||"",images:i.images?.items?.[0]?.sources||[]},i.uri)}))})]})}));var Ue=i(71306),Be=i(24305),Fe=i(13713),He=i(9783),Ve=i(57262),Ge=i(12330),ze=i(1019),We=i(85072),Ke=i(51340),Ye=i(29159),qe=i(79303),Ze=i(82864);const $e=n.memo((function(e){const{artistUri:t,name:i,bio:r,bioSource:a,images:s=[],avatarImages:o=[],worldRank:c,monthlyListeners:u,topCities:d,followers:m,externalLinks:p=[],showModal:h=!1,className:g="",spec:f}=e,[y,b]=(0,n.useState)(h),E=(0,qe.s)(),C=(0,n.useCallback)((()=>{const e=f.hitUiReveal();E.logInteraction(e),b(!0)}),[f,E]),S=(0,n.useCallback)((()=>{b(!1)}),[]),A=s.find((e=>(e.width||0)>=(e.height||0))),T=A&&{backgroundImage:`linear-gradient(${Ue.Par} 0%, ${Ue.MYb} 100%), url(${A.url})`};return(0,v.jsxs)("div",{className:g,children:[(0,v.jsx)(x.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Ze.A.heading,children:l.Ru.get("artist.about")}),(0,v.jsx)("div",{className:_()(Ze.A.artistGridContainer),children:(0,v.jsxs)("button",{type:"button","aria-label":i,className:_()(Ze.A.container,{[Ze.A.backgroundImage]:T}),onClick:C,style:T,children:[c>0?(0,v.jsxs)("div",{className:Ze.A.rank,children:[(0,v.jsxs)(x.E,{as:"div",variant:"titleSmall",children:["#",c]}),(0,v.jsx)(x.E,{as:"div",variant:"marginal",children:l.Ru.get("artist-page.world_rank")})]}):null,(0,v.jsxs)("div",{className:Ze.A.content,children:[!A&&(0,v.jsx)(We.e,{images:o,label:i,width:204,userIconSize:"xxlarge",className:Ze.A.avatar}),"number"==typeof u?(0,v.jsx)(x.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",children:l.Ru.get("artist.monthly-listeners-count",u)}):null,r?(0,v.jsx)(x.E,{as:"div",variant:"bodyMedium",className:Ze.A.bio,semanticColor:"textBase",dir:"auto",children:(0,v.jsx)(Ye.N,{source:r})}):null]})]})}),(0,v.jsx)(Ke.y,{artistUri:t,name:i,bio:r,bioSource:a,worldRank:c,images:s,topCities:d,followers:m,externalLinks:p,isOpen:y,closeModal:S,monthlyListeners:u})]})}));var Qe=i(21968),Je=i(97438),Xe=i(37712),et=i(70675),tt=i(17202),it=i(27014),nt=i(55030),rt=i(85939),at=i(471),st=i(69578),ot=i(98767),lt=i(17869),ct=i(72091);const ut=n.memo((function({uri:e,spec:t,logger:i,backgroundColor:r,name:a,sharingInfo:s}){const[o,c]=(0,W.A)(e),u=(0,H.W)(),d=(0,at.X)(),m=n.useMemo((()=>t.actionBarFactory()),[t]),{togglePlay:p,isActive:h,isPlaying:g}=(0,Re.P)({uri:e},{featureIdentifier:"artist"}),f=n.useCallback((()=>{const t=(0,ot.$I)({isPlaying:g,isActive:h,spec:m.playButtonFactory(),logger:i,uri:e});p({loggingParams:t})}),[p,h,g,e,m,i]),y=(0,nt.d$)(),{spec:b,logger:_}=(0,ct.r)(Qe.e,{data:{uri:e}});(0,n.useEffect)((()=>{y&&_.logImpression(b.impression())}),[y,_,b]);const E=(0,n.useCallback)((async()=>{u({targetUri:e,intent:o?"unsave":"save",type:"click"});const n=t.actionBarFactory().followButtonFactory().hitFollow({itemToBeFollowed:e}),r=t.actionBarFactory().followButtonFactory().hitUnfollow({itemToBeUnfollowed:e});i.logInteraction(o?r:n),!o&&y&&_.logInteraction(b.hitFollow({itemToBeFollowed:e}));try{await c(!o)}catch{}}),[u,e,o,c,t,i,y,_,b]),C=(0,st.j)();return(0,v.jsx)(Je.E,{backgroundColor:r,children:(0,v.jsxs)(Xe.S,{children:[(0,v.jsx)(j.D,{size:C,onClick:f,isPlaying:g,uri:e}),d&&(0,v.jsx)(lt.r,{spec:m,children:(0,v.jsx)(rt.Y,{entityName:a,contextUri:e,activationPlacement:"bottomEnd",size:C})}),(0,v.jsx)(w.e,{children:(0,v.jsx)(it.W,{isFollowing:o,onClick:E})}),(0,v.jsx)(I.b,{menu:(0,v.jsx)(tt.t,{uri:e,sharingInfo:s}),children:(0,v.jsx)(et.e,{label:l.Ru.get("more.label.context",a),size:C})})]})})}));var dt=i(76792),mt=i(95302),pt=i(48905),ht=i(51005);const gt="qB6S3KrJlMCx4WS4zOtl",ft="EmeHQXR87mUskYK6xEde",vt="qELskYs6YdzzafmETrAg",yt="fnphAtjtCDYY99lYBfLK",bt="hLi0oogSdDKAIC_rnfP1",_t="xN866HUyMGAaemLBKQQx",Et="cWcQITygrzZTduXuXope",Ct="BpBrwbAwIMryupCOXJzw",xt="FOgY6uo_Bj_VTV5hwaix",St="PHHrto0Qhh4dJcnnPhwu",At="dIlzffEKwokwWI5sqYJN",Tt="SMBqsyNXIMb0yeYVwPxv",It="yT49w5mDxTaLK9lL59Gd",Nt="D6IunHuzuULf_Sr88GOA",wt="b_dSllo9kearPhsw_MSp",Rt="ZkkYlSbVnEhF1urK3rKO";function kt(e){const t=e[0];return!(!t||!("releases"in t))}const Ot=({artistId:e,artistUri:t,artistName:i,discography:r,shelfIndex:a,spec:s})=>{const[o,c]=(0,n.useState)("popularReleasesAlbums"),u=(0,n.useMemo)((()=>s.discographyShelfFactory({position:a})),[s,a]),d=(0,qe.s)(),p=(0,n.useMemo)((()=>[r.popularReleasesAlbums.totalCount>0?"popularReleasesAlbums":null,r.singles.totalCount>0?"singles":null,r.albums.totalCount>0?"albums":null,r.compilations.totalCount>0?"compilations":null].filter(Boolean)),[r]),h=(0,n.useCallback)((e=>{const t=u.chipsFactory().chipFactory({identifier:e,position:p.indexOf(e)}).hitFilter();d.logInteraction(t),c(e)}),[u,p,d]),g=(0,n.useCallback)((()=>(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("div",{className:_()(gt),children:[r.popularReleasesAlbums.totalCount>0&&(0,v.jsx)(dt.v,{selected:"popularReleasesAlbums"===o,onClick:()=>h("popularReleasesAlbums"),selectedColorSet:"invertedLight",children:l.Ru.get("artist-page.popular")}),r.albums.totalCount>0&&(0,v.jsx)(dt.v,{selected:"albums"===o,onClick:()=>h("albums"),selectedColorSet:"invertedLight",children:l.Ru.get("artist.albums")}),r.singles.totalCount>0&&(0,v.jsx)(dt.v,{selected:"singles"===o,onClick:()=>h("singles"),selectedColorSet:"invertedLight",children:l.Ru.get("artist.singles")}),r.compilations.totalCount>0&&(0,v.jsx)(dt.v,{selected:"compilations"===o,onClick:()=>h("compilations"),selectedColorSet:"invertedLight",children:l.Ru.get("artist.compilations")})]})})),[r,o,h]);let f=r[o];"popularReleasesAlbums"===o&&r.latest&&(f={...r[o],items:[r.latest,...r[o].items.filter((e=>e.uri!==r.latest?.uri))]});let y="all";"albums"===o?y=K._m.Album.toLowerCase():"singles"===o?y=K._m.Single.toLowerCase():"compilations"===o&&(y=K._m.Compilation.toLowerCase());const b=`${(0,ht.Dh)(e)}:discography:${y}`,E=(0,n.useCallback)((()=>{const e=u.shelfHeaderFactory().titleFactory().hitUiNavigate({destination:b??""});d.logInteraction(e)}),[d,b,u]),x=(0,n.useCallback)((()=>{const e=u.shelfHeaderFactory().seeAllButtonFactory().hitUiNavigate({destination:b??""});d.logInteraction(e)}),[d,b,u]),S=(0,pt.t)(u),A=f.items;return(0,v.jsx)(mt.pZ,{value:"shelf/discography",children:(0,v.jsx)(m.$,{total:f.totalCount,title:l.Ru.get("artist-page.discography"),seeAllUri:b,alwaysShowSeeAll:!0,className:bt,renderSubHeader:g,onClickShelfTitle:E,onClickShelfSeeAll:x,elementRef:S,children:(kt(A)?(0,ht.Ey)(A):A).map(((e,n)=>(0,v.jsx)(mt.pZ,{value:"card",index:n,children:(0,v.jsx)(ue.R,{latest:e.uri===r.latest?.uri,showType:!0,...(0,C.m)(e,t,i),index:n,isRestricted:e.playability.reason===K.$c.CatalogueRestricted})},e.uri)))})})};var Pt=i(48446),Lt=i(75721),jt=i(53129),Dt=i(57276);const Mt="RClL7GUhUo_xqzNcsXSG",Ut="EQaztpbGtXeN7V1cjAP4",Bt="tYSzgx8hG37WjBDn364n",Ft="_4XNZPDdnyq1HHKG5Qtx",Ht="DehN40s8150pzqyBfGN_",Vt="ZiRNxR2_6cTTMHIqpwzl",Gt=({offer:e,index:t,spec:i,titleVariant:r})=>{const{name:a,uri:s,description:o,image:l,url:c}=e,u=(0,qe.s)(),d=(0,n.useMemo)((()=>i.merchCardFactory({identifier:s,uri:c||"",position:t})),[c,s,i,t]),m=(0,pt.t)(d);if(!a||!c)return null;const p=e=>{e?.stopPropagation();const t=d.hitNavigateToExternalUri({destination:c});u.logInteraction(t)};return(0,v.jsxs)("div",{className:Mt,ref:m,onClick:()=>{p(),window.open(c,"_blank")},children:[l?.sources?.[0]?.url&&(0,v.jsx)(Dt._,{src:l.sources[0].url,className:Ut,alt:a,width:"48",height:"48",loading:"lazy"}),(0,v.jsxs)("div",{className:Bt,children:[(0,v.jsx)(jt.Zp,{label:a,showDelay:jt.uF,children:(0,v.jsx)(x.E,{as:"a",href:c,target:"_blank",onClick:p,variant:r,semanticColor:"textBase",className:Ft,"":"offer-name",children:a})}),(0,v.jsx)(jt.Zp,{label:o,showDelay:jt.uF,children:(0,v.jsx)(x.E,{as:"p",variant:"bodySmall",className:Ht,children:o})})]}),(0,v.jsx)(Lt.H,{size:"small",className:Vt,"aria-hidden":"true"})]})},zt=({items:e,className:t,merchVariant:i,artistId:n="",variant:r="bodyMediumBold"})=>{const{spec:a}=(0,ct.r)(Pt.k,{data:{identifier:n,uri:(0,ht.ay)(n),position:0,reason:i}});return(0,v.jsx)("ul",{className:t,children:e.map(((e,t)=>(0,v.jsx)("li",{children:(0,v.jsx)(Gt,{offer:e,index:t,spec:a,titleVariant:r})},e.uri+t)))})};var Wt=i(13797);const Kt="vQqlnrnZi2f4zrYRQvKW",Yt="OMowV_mBy8tlBELzbuTi",qt=({prerelease:e,spec:t})=>{const i=e.coverArt[0],r=(0,Wt.C)(e.albumType),a=(0,qe.s)(),s=(0,n.useCallback)((()=>{a.logInteraction(t.albumImageFactory().hitUiNavigate({destination:e.uri}))}),[a,e.uri,t]),o=(0,n.useCallback)((()=>{a.logInteraction(t.albumNameFactory().hitUiNavigate({destination:e.uri}))}),[a,e.uri,t]);return(0,v.jsxs)("div",{className:Kt,children:[(0,v.jsx)(P.N,{to:e.uri,onClick:s,children:(0,v.jsx)(Dt._,{src:i.url,alt:e.title,width:"88",height:"88",loading:"eager",radius:4})}),(0,v.jsxs)("div",{className:Yt,children:[(0,v.jsx)(P.N,{to:e.uri,onClick:o,children:(0,v.jsx)(x.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",children:e.title})}),(0,v.jsx)(x.E,{as:"div",variant:"bodySmall",children:r})]})]})},Zt="GC3MlDrKu2PcuU6ymC1g",$t="GLAXysTPuIgv3GRPVlhS",Qt="pZag8sthfxTLjP1tsOfV",Jt="lkXpBMSmNP9w702sek8V",Xt="XlmJIRaVv7a23oYq6lwU",ei="iy5hzmfkdXQ0B2SFZAyj",ti="pJXRyroA6LuPSsKI8MrD",ii="lmvQXQeHS4JcYWGciCt3",ni=({prerelease:e,className:t,spec:i})=>(0,v.jsxs)("div",{className:t,children:[(0,v.jsx)(x.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Zt,children:l.Ru.get("web-player.artist.upcoming-release")}),(0,v.jsx)(qt,{prerelease:e,spec:i})]});var ri=i(71588),ai=i(53576),si=i(82442),oi=i(56341),li=i(74793),ci=i(59116),ui=i(55194),di=i(24604),mi=i(12669),pi=i(32994),hi=i(42116);const gi="S9KkAiRE_O9ax0Jv_D1i",fi=()=>{const e=(0,hi.y)();return(0,v.jsx)(di.M,{text:l.Ru.get("artist.verified"),className:_()({[gi]:e===pi.E.SMALL})})},vi=n.memo((function({uri:e,artist:{name:t,sharingInfo:i,verified:r,monthlyListeners:a,headerImage:{sources:s,extractedColors:o},avatarImage:{sources:c,extractedColors:u}},spec:d}){const m=(0,qe.s)(),p=(0,n.useMemo)((()=>d.topBarFactory()),[d]),h=(0,pt.t)(p),g=(0,n.useMemo)((()=>d.topBarFactory().playButtonFactory()),[d]),{togglePlay:f,isActive:y,isPlaying:b}=(0,Re.P)({uri:e},{featureIdentifier:"artist"}),_=n.useCallback((()=>{const t=(0,ot.$I)({isPlaying:b,isActive:y,spec:g,logger:m,uri:e});f({loggingParams:t})}),[f,b,y,e,g,m]),E={backgroundColor:(0,mi.z)(o?.colorRaw.hex||u?.colorRaw.hex||null)},C=s.length>0;C&&(E.backgroundImages=s);const x=(0,v.jsx)(tt.t,{uri:e,sharingInfo:i});return(0,v.jsxs)(si.z,{...E,children:[(0,v.jsxs)(ci.h,{ref:h,children:[(0,v.jsx)(j.D,{size:"medium",onClick:_,isPlaying:b,uri:e}),(0,v.jsx)(ri.h,{menu:x,children:(0,v.jsx)(R.X,{text:t,dragUri:e,dragLabel:t})})]}),C?null:(0,v.jsx)(ri.h,{menu:x,children:(0,v.jsx)(oi.K,{dragUri:e,images:(c||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),name:t,placeholderType:"artist",shape:k.u.CIRCLE})}),(0,v.jsxs)(li.Y,{children:[r&&(0,v.jsx)(fi,{}),(0,v.jsx)(ri.h,{menu:x,children:(0,v.jsx)(ui.mm,{dragUri:e,dragLabel:t,children:t})}),(0,v.jsx)(ai.Z,{children:l.Ru.get("artist.monthly-listeners-count",a)})]})]})}));var yi=i(96745);const bi="guUl5dHbF5HJRvwjBxzR",_i="Pnz4fz1OZWV19CVEQJDx",Ei="HciFabcIqzhXoDbtwR92",Ci="PNadLEAqpH87jY11pma4",xi="yWkJ7Ua3DnSTaHxG2qgv",Si="By3HGkfBq3fa6bjrhrli",Ai="ukV8NB0JGnieUOa0eri5",Ti="HGhEGu5V84RXBk6XAPQ6",Ii="kwzBRpFigKr1EP2d5qle",Ni=({artistName:e,avatarImages:t,backgroundImageUrl:i,itemImageUrl:n,itemName:r,itemType:a,itemUri:s,comment:o,handleLinkClick:l,handleArtistPickImageClick:c,onDragStart:u})=>(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("section",{className:bi,"":"artist-pick-with-background-container",draggable:!0,onDragStart:u,children:[(0,v.jsx)(Dt._,{src:i,alt:"merch",loading:"eager"}),(0,v.jsx)("div",{className:Ei}),(0,v.jsxs)("div",{children:[(0,v.jsxs)("section",{className:_()(Ii,Ai),children:[(0,v.jsx)(We.e,{images:t,label:e,width:24,userIconSize:"small",className:Ti}),(0,v.jsx)(x.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:o??"",children:o})]}),(0,v.jsxs)("section",{className:Ci,children:[(0,v.jsx)("div",{children:(0,v.jsx)(Dt._,{src:n,className:xi,alt:"",width:"76",height:"76",loading:"eager"})}),(0,v.jsxs)("div",{className:Si,children:[(0,v.jsx)(x.E,{as:"div",variant:"bodyMediumBold",children:(0,v.jsx)(P.N,{to:s,onClick:l,"":"artist-pick-link",children:r})}),(0,v.jsx)(x.E,{as:"div",variant:"bodySmall",children:a})]})]})]}),(0,v.jsx)("div",{onClick:c,className:_i})]})});var wi=i(49217),Ri=i(80852),ki=i(3554);const Oi="JJvGfNiGtduy_XoXPFT1",Pi="fYeCAFmjlgTatXRJ2v0b",Li="vJIXF1I7CfyfTyCa9JkP",ji="ZEsebSb1CaZVzuPawZEj",Di="j2wjzbkgYnFp7ey8JIp0",Mi="JNLGmI_C2cdhHFxe0oxm",Ui="O36HCbLOjWcWkAwkNXqJ",Bi="GS_6HA9xIobh5dt5VUSY",Fi="EIxjItP8eBZ1eAT7c4Aq",Hi="H3mjE6AEBDPRuHNKUpRK",Vi=n.memo((function(e){const t=(0,qe.s)(),{avatarImages:i=[],name:r,spec:a,item:s,comment:o}=e,l=s.itemV2.data,c=l.url??"",u=l.name,d=l.price,m=(0,ki.g)(l.image?.sources,{desiredWidth:640})?.url??"",p=!!o,h=(0,n.useCallback)((()=>{const e=a.artworkFactory().hitNavigateToExternalUri({destination:c});t.logInteraction(e),window.open(c,"_blank","noopener")}),[a,t,c]),g=(0,n.useCallback)((e=>{e.stopPropagation();const i=a.linkFactory().hitNavigateToExternalUri({destination:c});t.logInteraction(i),window.open(c,"_blank","noopener")}),[a,t,c]);return(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("div",{className:Oi,onClick:h,"":"artist-pick-merch-container",children:[(0,v.jsx)("img",{className:_()(Li),src:m,alt:"merch"}),(0,v.jsx)("div",{className:Pi}),(0,v.jsxs)("div",{children:[p&&(0,v.jsxs)("div",{className:_()(Hi,Bi),children:[(0,v.jsx)(We.e,{images:i,label:r,width:24,userIconSize:"small",className:Fi}),(0,v.jsx)(x.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:o,"":"merch-artist-pick-comment",children:o})]}),(0,v.jsxs)("div",{className:ji,children:[(0,v.jsx)(x.E,{as:"h1",variant:"titleSmall",className:Di,children:u}),(0,v.jsx)(x.E,{as:"p",variant:"bodySmallBold",className:Mi,children:d}),(0,v.jsx)(wi.n,{size:"small",className:Ui,onClick:g,href:c,component:Ri.v,"":"artist-pick-merch-button-link",children:"Go to item"})]})]})]})})})),Gi=["AlbumResponseWrapper","ArtistResponseWrapper","PlaylistResponseWrapper","TrackResponseWrapper","EpisodeOrChapterResponseWrapper","PreReleaseResponseWrapper","ConcertResponseWrapper","MerchResponseWrapper"];const zi=["Album","Artist","Playlist","Track","Episode","PreRelease","Concert","Merch"];function Wi(e){return t=e.itemV2,Gi.includes(t.__typename)&&zi.includes(e.itemV2.data.__typename);var t}var Ki=i(96775),Yi=i(36485);function qi(e){const t=e?.itemV2.data;switch(t.__typename){case"Album":case"Playlist":case"Track":case"Episode":case"Merch":return t.name;case"Artist":return t.profile.name;case"PreRelease":return t.preReleaseContent?.name??"";case"Concert":return t.title;default:return(0,Yi.d)(t),""}}const Zi=n.memo((function(e){const{avatarImages:t=[],artistName:i,item:a,className:o="",spec:c}=e,u=a.comment,d=a.itemV2.data.uri,m=qi(a),p=function(e){const t=e.itemV2.data;switch(t.__typename){case"Album":switch(t.type){case K._m.Album:return l.Ru.get("album");case K._m.Single:return l.Ru.get("single");case K._m.Compilation:return l.Ru.get("compilation");case K._m.Ep:return l.Ru.get("ep");default:return l.Ru.get("album")}case"Artist":return l.Ru.get("artist");case"Playlist":return l.Ru.get("playlist");case"Track":return l.Ru.get("song");case"Episode":return l.Ru.get("card.tag.episode");case"PreRelease":switch(t.preReleaseContent?.type){case"ALBUM":return l.Ru.get("web-player.artist.upcoming-release.album");case"EP":return l.Ru.get("web-player.artist.upcoming-release.ep");case"SINGLE":return l.Ru.get("web-player.artist.upcoming-release.single");default:return""}case"Merch":return l.Ru.get("web-player.merch.title");case"Concert":return"";default:return(0,Yi.d)(t),""}}(a),h=(0,qe.s)(),g=(0,r.Zp)(),{draggable:f,onDragStart:y}=(0,F.P)({itemUris:[d],dragLabelText:m}),b=(0,n.useCallback)((()=>{const e=(0,s.o_)(d).toURLPath(!0),t=c.artworkFactory().hitUiNavigate({destination:e});h.logInteraction(t),g(e)}),[d,c,h,g]),E=(0,n.useCallback)((()=>{const e=(0,s.o_)(d).toURLPath(!0),t=c.linkFactory().hitUiNavigate({destination:e});h.logInteraction(t)}),[d,c,h]),C=function(e){const t=e.itemV2.data;switch(t.__typename){case"Album":return t.coverArt;case"Artist":return t.visuals.avatarImage;case"Playlist":return t.images.items[0]??null;case"Track":return t.albumOfTrack?.coverArt??null;case"Episode":{const e=(0,ki.g)(t.coverArt?.sources,{desiredHeight:300});return e?{sources:[e]}:null}case"PreRelease":{const e=(0,ki.g)(t.preReleaseContent?.coverArt?.sources,{desiredHeight:300});return e?{sources:[e]}:null}case"Concert":case"Merch":return t.image;default:return(0,Yi.d)(t),null}}(a),S=C?.sources[0]?.url,A=!!u,T=u||l.Ru.get("acq.artist.about.attribution",{artist:i}),I=(0,yi.N)({data:{identifier:i,uri:d,position:0,reason:"Artist pick: Concert"}});const N=function(){if(function(e){return"MerchResponseWrapper"===e.itemV2.__typename&&"Merch"===e.itemV2.data.__typename&&!!e.itemV2.data.url}(a))return(0,v.jsx)(Vi,{name:i,item:a,comment:u,avatarImages:t,spec:c});if(function(e){return"ConcertResponseWrapper"===e.itemV2.__typename&&"Concert"===e.itemV2.data.__typename&&!!e.itemV2.data.venue}(a)){const e=a.itemV2.data;return(0,v.jsx)(Ki.I,{concert:{uri:e.uri,date:e.date,venue:e.venue,title:e.title},spec:I})}return a.backgroundImage?.sources[0].url?(0,v.jsx)(Ni,{avatarImages:t,artistName:i,itemName:m,itemType:p,itemUri:d,itemImageUrl:S??"",comment:T,backgroundImageUrl:a?.backgroundImage?.sources[0].url,handleArtistPickImageClick:b,handleLinkClick:E,onDragStart:y}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{onClick:b,className:Qt,onDragStart:y,draggable:f,"":"artist-pick-image-container",children:(0,v.jsx)(Dt._,{src:S,className:Jt,alt:"",width:"88",height:"88",radius:4,loading:"eager"})}),(0,v.jsxs)("div",{onDragStart:y,draggable:f,children:[(0,v.jsxs)("div",{className:_()({[Xt]:!0,[ii]:A}),children:[(0,v.jsx)(We.e,{images:t,label:i,width:24,userIconSize:"small",className:ei}),(0,v.jsx)(x.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:T,children:T})]}),(0,v.jsx)(x.E,{as:"div",variant:"bodyMediumBold",children:(0,v.jsx)(P.N,{to:d,onClick:E,"":"artist-pick-link",children:qi(a)})}),(0,v.jsx)(x.E,{as:"div",variant:"bodySmall",className:ti,children:p})]})]})}();return(0,v.jsxs)("div",{className:o,children:[(0,v.jsx)(x.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Zt,children:l.Ru.get("artist-page.artists-pick")}),(0,v.jsx)("div",{className:$t,children:N})]})})),$i=n.memo((function(e){const{item:t}=e;return Wi(t)?(0,v.jsx)(Zi,{...e,item:t}):null}));var Qi=i(64488);const Ji="unaQVpO_antcqfMwSmsh",Xi="ECjQBV2evKE5PXHKhXV_",en="W_VvjqdqWRSlMRjRPkPb",tn="pUNc2aOeOQANHrhYa1GU",nn="T_JcGdJujSuj014SZfjl",rn="RDZ61ETnag1ilfZTkVxe",an=e=>{const{uri:t,name:i,nrTracks:a,avatarImages:o=[],className:c="",spec:u}=e,d=(0,qe.s)(),m=(0,r.Zp)(),p=(0,n.useCallback)((()=>{const e=u.artistFactory().hitUiNavigate({destination:(0,s.o_)(t).toURLPath(!0)});d.logInteraction(e),m((0,s.o_)(t).toURLPath(!0))}),[u,t,d,m]),h=(0,n.useCallback)((()=>{const e=u.linkFactory().hitUiNavigate({destination:(0,s.o_)(t).toURLPath(!0)});d.logInteraction(e)}),[u,d,t]);return(0,v.jsxs)("div",{className:c,children:[(0,v.jsx)(x.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Ji,children:l.Ru.get("artist-page.saved-header")}),(0,v.jsxs)("div",{className:Xi,children:[(0,v.jsxs)("div",{onClick:p,className:tn,"":"saved-tracks-avatar",children:[(0,v.jsx)(We.e,{images:o,label:i,width:88,userIconSize:"xxlarge"}),(0,v.jsx)("div",{className:nn,children:(0,v.jsx)(Qi.F,{size:"xsmall",className:rn})})]}),(0,v.jsxs)("div",{children:[(0,v.jsx)(x.E,{as:"div",variant:"bodyMediumBold",children:(0,v.jsx)(P.N,{to:t,onClick:h,"":"saved-tracks-link",children:l.Ru.get("artist-page.saved-tracks-amount",a)})}),(0,v.jsx)(x.E,{as:"div",variant:"bodySmall",className:en,children:l.Ru.get("artist-page.saved-by-artist",i)})]})]})]})};var sn=i(73426),on=i(4594),ln=i(6362),cn=i(76119);const un=n.memo((function({concerts:e,artistId:t,total:i}){const{spec:r,logger:a}=(0,ct.r)(yi.N,{data:{identifier:t,uri:`${(0,ht.Dh)(t)}`,position:0,reason:"Artist Page - On Tour"}}),s=`${(0,ht.Dh)(t)}:concerts`,o=(0,pt.t)(r);return(0,v.jsx)(n.Suspense,{fallback:null,children:(0,v.jsxs)("div",{ref:o,children:[(0,v.jsx)(on.k,{title:l.Ru.get("concerts_on_tour"),seeAllLabel:l.Ru.get("concerts.view_all_upcoming_concerts_count",i),seeAllUri:s,onClickSeeAll:()=>{const e=r.seeAllButtonFactory({uri:s}).hitUiNavigate({destination:s});a.logInteraction(e)},hasMoreElements:!0}),(0,v.jsx)("ul",{className:cn.A.onTourShelfGrid,children:e.slice(0,9).map(((e,t)=>(0,v.jsx)("li",{children:(0,v.jsx)(ln.I,{concert:e,index:t,spec:r})},e.uri)))})]})})}));var dn=i(84512),mn=i(38008),pn=i(25326),hn=i(56376),gn=i(19617);function fn(e){return null!=e}const vn=n.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,ht.ay)(e),i=(0,E.NC)(Te.dAx),a=(0,E.NC)(Te.xnZ),s=(0,E.NC)(Te.DqB),c=(0,E.NC)(Te.LX5),{spec:m,logger:p,UBIFragment:h}=(0,ct.r)(Be.a,{data:{identifier:e,uri:t}}),g=n.useMemo((()=>m.headerFactory()),[m]),y=n.useMemo((()=>m.featuredFactory().popularTracksFactory()),[m]),b=n.useMemo((()=>m.offersFactory()),[m]),{loading:S,error:A,data:T}=(0,sn.A)(t),I=(0,pn.dB)({offset:0,limit:1,uri:t});if(null===T||null===T.artistUnion||"Artist"!==T.artistUnion?.__typename||A||S)return(0,v.jsx)(d.A,{hasError:null!==A,errorMessage:l.Ru.get("error.request-artist-failure")});const N=T?.artistUnion?.profile.name,w=T.artistUnion,R=w.relatedContent.relatedArtists.items,k=w.sharingInfo,O=w.relatedContent.featuringV2.items,P=w.discography.latest,{totalCount:L,items:j}=w.discography.popularReleasesAlbums,D=j,M=L||D.length,U=(0,ht.Ey)(w.relatedContent.appearsOn.items),B=w.discography.topTracks.items.map((e=>(0,f.fX)(e,t))),F=w.relatedContent.discoveredOnV2.items,{stats:{monthlyListeners:H,followers:V,worldRank:G,topCities:z},preRelease:W,profile:{name:Y,verified:q,pinnedItem:Z,biography:$,externalLinks:Q,playlistsV2:J},visuals:{headerImage:X,avatarImage:ee,gallery:te},goods:{events:ie,merch:ne}}=w,re=(ae=W)&&ae.releaseDate?.isoString&&ae.preReleaseContent?.name&&ae.preReleaseContent.coverArt?.sources?0===ae.preReleaseContent.coverArt.sources.length?null:{albumType:ae.preReleaseContent.type,title:ae.preReleaseContent.name,uri:ae.uri,releaseDate:new Date(ae.releaseDate.isoString),coverArt:ae.preReleaseContent.coverArt.sources}:null;var ae;const se=a&&re,oe=I?.totalLength||se||!!Z,le=(P?[P,...D]:D).filter(fn).filter(((e,t,i)=>i.map((e=>e.uri)).indexOf(e.uri)===t));const ce=X?.extractedColors?.colorRaw.hex||ee?.extractedColors?.colorRaw.hex||Ue.l0o,de="RelatedVideoPage"===w.relatedVideos.__typename?w.relatedVideos.items.filter((e=>"Track"===e.trackOfVideo.data.__typename)):[];return(0,v.jsxs)("div",{className:Nt,children:[(0,v.jsx)(u.Q,{children:(0,hn.j2)({artistName:N})}),(0,v.jsx)(vi,{uri:t,artist:{sharingInfo:k,monthlyListeners:H||0,name:Y,verified:q||!1,headerImage:X||{sources:[],extractedColors:null},avatarImage:ee||{sources:[],extractedColors:null}},spec:g}),(0,v.jsxs)("div",{className:ft,children:[(0,v.jsx)(ut,{uri:t,spec:m,logger:p,backgroundColor:ce,name:Y,sharingInfo:k}),(0,v.jsxs)("div",{className:"contentSpacing",children:[(0,v.jsx)("div",{children:(0,v.jsx)(Ie.E,{colGap:o.lT,render:({columnCount:i})=>{const n={"--column-count":i};return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:_()(yt,{[St]:i<6||!oe}),style:{...n},children:[(0,v.jsx)(x.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:wt,children:l.Ru.get("artist.popular-tracks")}),B.length?(0,v.jsx)(h,{spec:y,children:(0,v.jsx)(Ge.z,{uri:t,nrTracks:B.length,initialTracks:B})}):null]}),(0,v.jsx)(dn.c,{artistOrShow:Y,uri:t,entityType:dn.p.ARTIST}),oe&&(0,v.jsxs)("div",{className:_()(Et,{[Ct]:i<6}),style:{...n},children:[se&&W?(0,v.jsx)(ni,{prerelease:re,className:xt,spec:m.featuredFactory().upcomingReleaseFactory()}):null,I?.totalLength?(0,v.jsx)(an,{className:xt,uri:`${(0,ht.Dh)(e)}:saved`,name:Y,nrTracks:I.totalLength,avatarImages:ee?.sources,spec:m.featuredFactory().likedSongsFactory()}):null,Z?(0,v.jsx)($i,{className:xt,avatarImages:ee?.sources,artistName:Y,item:Z,spec:m.featuredFactory().pickedFactory()}):null]})]})},className:vt})}),(0,v.jsxs)(h,{spec:m,children:[(0,v.jsx)(Ve.u,{property:Te.dAx,renderOldExperience:()=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(mt.pZ,{value:"shelf/popular-releases",children:(0,v.jsx)(ze.p,{total:M+(P?1:0),title:l.Ru.get("artist-page.popular"),className:bt,index:0,id:"popular-releases",children:le.map(((e,i)=>(0,v.jsx)(mt.pZ,{value:"card",index:i,children:(0,v.jsx)(ue.R,{index:i,latest:e.uri===P?.uri,showType:!0,isRestricted:e.playability.reason===K.$c.CatalogueRestricted,...(0,C.m)(e,t,Y)})},e.uri)))})}),(0,v.jsx)(mt.pZ,{value:"shelf/albums",children:(0,v.jsx)(ze.p,{total:w.discography.albums.totalCount,title:l.Ru.get("artist.albums"),seeAllUri:`${(0,ht.Dh)(e)}:discography:${K._m.Album.toLowerCase()}`,seeAllLabel:l.Ru.get("artist-page.show-discography"),alwaysShowSeeAll:!0,className:bt,index:1,id:"albums",children:(0,ht.Ey)(w.discography.albums.items).map(((e,i)=>(0,v.jsx)(mt.pZ,{value:"card",index:i,children:(0,v.jsx)(ue.R,{index:i,latest:e.uri===P?.uri,showType:!0,isRestricted:e.playability.reason===K.$c.CatalogueRestricted,...(0,C.m)(e,t,Y)})},e.uri)))})}),(0,v.jsx)(mt.pZ,{value:"shelf/singles-and-eps",children:(0,v.jsx)(ze.p,{total:w.discography.singles.totalCount,title:l.Ru.get("artist.singles"),seeAllUri:`${(0,ht.Dh)(e)}:discography:${K._m.Single.toLowerCase()}`,seeAllLabel:l.Ru.get("artist-page.show-discography"),alwaysShowSeeAll:!0,className:bt,index:2,id:"singles-and-eps",children:(0,ht.Ey)(w.discography.singles.items).map(((e,i)=>(0,v.jsx)(mt.pZ,{value:"card",index:i,children:(0,v.jsx)(ue.R,{index:i,latest:e.uri===P?.uri,showType:!0,isRestricted:e.playability.reason===K.$c.CatalogueRestricted,...(0,C.m)(e,t,Y)})},e.uri)))})}),(0,v.jsx)(mt.pZ,{value:"shelf/compilations",children:(0,v.jsx)(ze.p,{total:w.discography.compilations.totalCount,title:l.Ru.get("artist.compilations"),seeAllUri:`${(0,ht.Dh)(e)}:discography:${K._m.Compilation.toLowerCase()}`,seeAllLabel:l.Ru.get("artist-page.show-discography"),alwaysShowSeeAll:!0,className:bt,index:3,id:"compilations",children:(0,ht.Ey)(w.discography.compilations.items).map(((e,i)=>(0,v.jsx)(mt.pZ,{value:"card",index:i,children:(0,v.jsx)(ue.R,{index:i,latest:e.uri===P?.uri,showType:!0,isRestricted:e.playability.reason===K.$c.CatalogueRestricted,...(0,C.m)(e,t,Y)})},e.uri)))})})]}),renderNewExperience:()=>(0,v.jsx)(Ot,{discography:w.discography,artistId:e,artistUri:t,artistName:Y,shelfIndex:0,spec:m})}),(0,v.jsx)(mt.pZ,{value:"shelf/featuring",children:(0,v.jsx)(ze.p,{total:O.length,title:l.Ru.get("artist-page.featuring",Y),seeAllUri:`${(0,ht.Dh)(e)}:featuring`,className:bt,index:i?1:4,id:"featuring",children:O.map(((e,t)=>{if("Playlist"===e.data.__typename){const i=e.data,n="User"===i.ownerV2.data.__typename&&i.ownerV2.data.name||i.name;return(0,v.jsx)(mt.pZ,{value:"card",index:t,children:(0,v.jsx)(Pe.B,{index:t,uri:i.uri,name:i.name,authorName:n,description:i.description||"",images:i.images?.items?.[0]?.sources||[]},i.uri)},i.uri)}return null}))})}),ie.concerts.items&&ie.concerts.items.length>0&&(0,v.jsx)(un,{artistId:e,total:ie.concerts.totalCount,concerts:ie.concerts.items}),s===Te.OlV.VARIANTB&&ne.items.length>0&&(0,v.jsx)(h,{spec:b,children:(0,v.jsx)(mn.q,{id:e,uri:(0,ht.ay)(e),merchItems:ne.items,merchVariant:s})}),(0,v.jsx)(mt.pZ,{value:"shelf/fans-also-like",children:(0,v.jsx)(ze.p,{total:R.length,title:l.Ru.get("artist-page.fansalsolike"),seeAllUri:`${(0,ht.Dh)(e)}:related`,className:bt,index:i?2:5,id:"fans-also-like",children:R.map(((e,t)=>(0,v.jsx)(mt.pZ,{value:"card",index:t,children:(0,v.jsx)(Fe.a,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]})},e.uri)))})}),(0,v.jsx)(mt.pZ,{value:"shelf/appears-on",children:(0,v.jsx)(ze.p,{total:U.length,title:l.Ru.get("artist.appears-on"),seeAllUri:`${(0,ht.Dh)(e)}:appears-on`,className:bt,index:i?3:6,id:"appears-on",children:U.map(((e,t)=>(0,v.jsx)(mt.pZ,{value:"card",index:t,children:(0,v.jsx)(ue.R,{index:t,showType:!0,...(0,f.Mz)(e)})},e.uri)))})}),J.items.length?(0,v.jsx)(mt.pZ,{value:"shelf/artist-playlists",children:(0,v.jsx)(ze.p,{total:J.totalCount,title:l.Ru.get("artist-page.artist-playlists"),seeAllUri:`${(0,ht.Dh)(e)}:playlists`,className:bt,index:i?4:7,id:"artist-playlists",children:J.items.map(((e,t)=>{if("Playlist"===e.data.__typename){const i=e.data,n="User"===i.ownerV2.data.__typename&&i.ownerV2.data.name||i.name;return(0,v.jsx)(mt.pZ,{value:"card",index:t,children:(0,v.jsx)(Pe.B,{index:t,uri:i.uri,name:i.name,authorName:n,description:i.description||"",images:i.images?.items?.[0]?.sources||[]},i.uri)},i.uri)}return null}))})}):null,(0,v.jsx)(mt.pZ,{value:"shelf/discovered-on",children:(0,v.jsx)(ze.p,{total:F.length,title:l.Ru.get("artist-page.discovered-on",Y),seeAllUri:`${(0,ht.Dh)(e)}:discovered-on`,className:bt,index:i?5:8,id:"discovered-on",children:F.map(((e,t)=>{if("Playlist"===e.data.__typename){const i=e.data,n="User"===i.ownerV2.data.__typename&&i.ownerV2.data.name||i.name;return(0,v.jsx)(mt.pZ,{value:"card",index:t,children:(0,v.jsx)(Pe.B,{index:t,uri:i.uri,name:i.name,authorName:n,description:i.description||"",images:i.images?.items?.[0]?.sources||[]},i.uri)},i.uri)}return null}))})}),c&&de.length?(0,v.jsx)(mt.pZ,{value:"shelf/related-videos",children:(0,v.jsx)(ze.p,{total:"RelatedVideoPage"===w.relatedVideos.__typename?w.relatedVideos.totalCount:0,title:l.Ru.get("music_videos"),seeAllUri:`${(0,ht.Dh)(e)}:related-videos`,className:_()(bt,_t),index:i?6:9,id:"related-videos",children:de.map(((e,t)=>{if("Track"!==e.trackOfVideo.data.__typename)return null;const{data:i}=e.trackOfVideo;return(0,v.jsx)(mt.pZ,{value:"card",index:t,children:(0,v.jsx)(He.O,{title:i.name,trackUri:i.uri,artists:i.artists.items,album:i.albumOfTrack,contentRating:i.contentRating,referrerIdentifier:"other",index:t})},e.uri)}))})}):null]}),(0,v.jsx)(Ie.E,{render:({columnCount:t})=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)($e,{className:At,artistUri:w.uri,name:Y,avatarImages:ee?.sources.map(gn.m),bio:$?.text||"",bioSource:$?.type||K.B3.Biography,images:te.items.map((e=>{const t=e.sources.map(gn.m);return(0,ki.g)(t,{desiredLabel:"large",desiredSize:600})})).filter(fn),worldRank:G||0,monthlyListeners:H,topCities:z.items||[],followers:V,externalLinks:Q?.items,spec:m.aboutFactory()}),s===Te.OlV.DEFAULT&&ne.items.length?(0,v.jsxs)("div",{className:_()(Tt,{[It]:t<4}),children:[(0,v.jsx)(x.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:wt,children:l.Ru.get("artist-page.merch")}),(0,v.jsx)(h,{spec:b,children:(0,v.jsx)(zt,{items:ne.items,artistId:e,merchVariant:s})})]}):null]}),colGap:o.lT}),s===Te.OlV.VARIANTA&&ne.items.length>0&&(0,v.jsx)(h,{spec:b,children:(0,v.jsx)("div",{className:Rt,children:(0,v.jsx)(mn.q,{id:e,uri:(0,ht.ay)(e),merchItems:ne.items,merchVariant:s})})})]})]})]})})),yn=n.memo((function(){return(0,v.jsx)(n.Suspense,{fallback:null,children:(0,v.jsx)(vn,{})})})),bn=Spicetify.GraphQL.Definitions["queryArtistPlaylists"]=new p.l("queryArtistPlaylists","query","54f7e5a5a2af05b7dc98526df376a46c6b15c05440c8dfdc8f6cecb1a807eca7",null),_n=n.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:i,error:n,data:a}=(s={uri:t},c={gcTime:15*h.i},(0,h.I)(bn,s,c));var s,c;const p="Artist"===a?.artistUnion.__typename?a.artistUnion:null;if(null===p||n||i)return(0,v.jsx)(d.A,{hasError:null!==n,errorMessage:l.Ru.get("error.request-artist-playlists")});const g=p.profile.name,{items:y}=p.profile.playlistsV2,b=(0,f.bj)(y);return(0,v.jsxs)("div",{className:"contentSpacing",children:[g?(0,v.jsx)(u.Q,{children:l.Ru.get("artist-page.artist-playlists.seo.title",g)}):null,(0,v.jsx)(m.$,{total:b.length,title:l.Ru.get("artist-page.artist-playlists"),showAll:!0,fullPage:!0,rowGap:o.lT,children:b.map(((e,t)=>(0,v.jsx)(Pe.B,{index:t,uri:e.uri,name:e.name,authorName:e.authorName||e.name,description:e.description,images:e.images},e.uri)))})]})})),En=Spicetify.GraphQL.Definitions["queryArtistRelated"]=new p.l("queryArtistRelated","query","3d031d6cb22a2aa7c8d203d49b49df731f58b1e2799cc38d9876d58771aa66f3",null),Cn=n.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:i,error:n,data:a}=(s={uri:t},c={gcTime:15*h.i},(0,h.I)(En,s,c));var s,c;const p="Artist"===a?.artistUnion.__typename?a.artistUnion:null;if(null===p||n||i)return(0,v.jsx)(d.A,{hasError:null!==n,errorMessage:l.Ru.get("error.request-related-artists")});const g=p.profile.name,y=p.relatedContent.relatedArtists.items;return(0,v.jsxs)("div",{className:"contentSpacing",children:[g?(0,v.jsx)(u.Q,{children:l.Ru.get("artist-page.fansalsolike.seo.title",g)}):null,(0,v.jsx)(m.$,{title:l.Ru.get("artist-page.fansalsolike"),total:y.length,showAll:!0,fullPage:!0,rowGap:o.lT,children:y.map(((e,t)=>(0,v.jsx)(Fe.a,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]},e.uri)))})]})})),xn=Spicetify.GraphQL.Definitions["queryArtistRelatedVideos"]=new p.l("queryArtistRelatedVideos","query","eb5bde95cd8cb2aa369d6ec868c008f7e42e5e0cc810188ecc973c6c1b0e73cd",null),Sn=n.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{loading:i,error:n,data:a}=(s={uri:t},c={gcTime:15*h.i},(0,h.I)(xn,s,c));var s,c;if(null===a||"Artist"!==a.artistUnion.__typename||"RelatedVideoPage"!==a.artistUnion.relatedVideos.__typename||n||i)return(0,v.jsx)(d.A,{hasError:null!==n,errorMessage:l.Ru.get("error.request-artist-related-videos")});const p=a.artistUnion.relatedVideos.items.filter((e=>"Track"===e.trackOfVideo.data.__typename));return(0,v.jsxs)("div",{className:"contentSpacing",children:[(0,v.jsx)(u.Q,{children:l.Ru.get("music_videos")}),(0,v.jsx)(m.$,{title:l.Ru.get("music_videos"),total:a.artistUnion.relatedVideos.totalCount,showAll:!0,fullPage:!0,rowGap:o.lT,children:p.map(((e,t)=>{if("Track"!==e.trackOfVideo.data.__typename)return null;const{data:i}=e.trackOfVideo;return(0,v.jsx)(He.O,{title:i.name,trackUri:i.uri,artists:i.artists.items,album:i.albumOfTrack,contentRating:i.contentRating,referrerIdentifier:"other",index:t},t)}))})]})}));var An=i(41978),Tn=i(46288);const In=Spicetify.GraphQL.Definitions["queryArtistMinimal"]=new p.l("queryArtistMinimal","query","53d3f76582c49ad0a05dc685955f20dc2a5f2209b192e5446e5e4e623ce23a48",null);var Nn=i(45109);const wn="VjLekolG5eyfw_9Hhjxv",Rn=[Tn.$.INDEX,Tn.$.TITLE_AND_ARTIST,Tn.$.ALBUM,Tn.$.ADDED_AT,Tn.$.DURATION],kn=({artistUri:e,collectionUri:t})=>{const i=(0,pn.dB)({offset:0,limit:1,uri:e}),{error:r,data:a}=(s={uri:e},(0,h.I)(In,s,o));var s,o;const{usePlayContextItem:c,togglePlay:u,isPlaying:m}=(0,Re.P)({uri:t},{featureIdentifier:"your_library"}),p="Artist"===a?.artistUnion.__typename?a.artistUnion:null;return i&&p&&!r?(0,v.jsxs)("div",{className:_()("contentSpacing",wn),children:[(0,v.jsxs)(ge.g,{children:[(0,v.jsx)(j.D,{size:"medium",onClick:()=>u(),isPlaying:m,uri:t}),(0,v.jsx)(R.X,{text:l.Ru.get("artist-page.liked-songs-by-artist-title",p.profile.name)})]}),i.totalLength>0&&(0,v.jsx)(n.Suspense,{fallback:(0,v.jsx)(d.A,{hasError:null!==r,errorMessage:l.Ru.get("error.request-collection-tracks-failure")}),children:(0,v.jsx)(D.a,{columns:Rn,children:(0,v.jsx)(Nn.b,{nrTracks:i.totalLength,collectionUri:t,uri:e,usePlayContextItem:c,initialItems:[]})})})]}):null},On=()=>{const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),i=(0,An.d4)((({session:e})=>e?.user?.id))||null,n=i?(0,s.g1)(i,e).toURI():null;return i&&n?(0,v.jsx)(kn,{artistUri:t,collectionUri:n}):null};var Pn=i(33634),Ln=i(38308),jn=i(80784);const Dn="EPBWBmUPyLEpl4VJflaL",Mn="JFiowuVIURESjJJznyZx",Un="P6CL1uHz_zTqst4gaAXQ",Bn="JEd1tp9FdtDLBOCRSVe0",Fn=e=>{const t=(0,qe.s)(),i=(0,n.useMemo)((()=>e.spec.promoRowFactory()),[e.spec]),r=(0,pt.t)(i);return(0,v.jsxs)("div",{className:Dn,ref:r,children:[(0,v.jsx)(x.E,{as:"h2",variant:"bodyMediumBold",className:Mn,children:l.Ru.get("concerts.find_more")}),(0,v.jsx)(P.N,{to:"/concerts",className:Un,onClick:()=>{const e=i.hitUiNavigate({destination:"spotify:app:concerts"});t.logInteraction(e)},children:(0,v.jsx)(dt.v,{as:"span",selected:!0,children:l.Ru.get("concerts.find_nearby")})}),(0,v.jsx)("img",{className:Bn,alt:"",src:"https://i.scdn.co/image/ab676d63000076a07ce4a60e6015185a1c0edf08"})]})};var Hn=i(76881),Vn=i(56232),Gn=i(7722);const zn="y9Olwg6ho6E95Rud3iLs",Wn="pT8jWX5PbLB2Z91Ngl7n",Kn="ynfZz1ilmr8Zg8BgXG_d",Yn="qRS9X9GvnMDoWj6sx0Yo",qn="RqzE7votb8N93rc_jcM1",Zn="kc6crrZKKENRmaIMtzIx",$n="azrW1gfJbgz897iDaITJ",Qn="wYMCavuacjad59alV1BF",Jn="U7meWrHbAMHqpiK5oslu",Xn=(0,n.memo)((e=>{const{concerts:t,spec:i,locationName:r}=e,a=(0,qe.s)(),s=(0,pt.t)(i),o=(0,n.useMemo)((()=>i.browseAllEventsButtonFactory({uri:"spotify:app:concerts"})),[i]),c=r?i.locationEventsFactory({identifier:r}):i.otherEventsFactory(),u=(0,pt.t)(o);return 0===t.length?(0,v.jsxs)("div",{className:Jn,children:[(0,v.jsx)(x.E,{as:"p",variant:"bodyMedium",ref:s,className:Zn,children:r?l.Ru.get("concerts.no_events_description"):l.Ru.get("concerts.no_upcoming_events")}),!r&&(0,v.jsx)(P.N,{to:"/concerts",onClick:()=>{a.logInteraction(o.hitUiNavigate({destination:"spotify:app:concerts"}))},children:(0,v.jsx)(dt.v,{selected:!0,selectedColorSet:"invertedLight",ref:u,children:l.Ru.get("concerts.browse_all_events")})})]}):(0,v.jsx)("div",{ref:s,className:$n,children:t?.map(((e,t)=>(0,v.jsx)(Hn.A,{date:e.date.isoString,title:e.venue.location?.name??"",uri:e.uri,subTitle:(0,Gn.re)(e.artistsV2.items.map((e=>{return(t=e.data)&&Object.keys(t).includes("profile")?e.data.profile.name:null;var t})).filter(Vn.se)),onClick:()=>{const i=c.eventRowFactory({position:t,uri:e.uri}).hitUiNavigate({destination:e.uri});a.logInteraction(i)}},e.uri)))})}));var er=i(25391),tr=i(16297);const ir=(0,n.memo)((e=>{const{data:t,locationName:i,onSetLocation:r}=e,a=(0,s.o_)(t?.uri),o=a?(0,s.ZA)(a.id):void 0,{spec:c}=(0,ct.r)(Pn.y,{data:{uri:a?.toURI()??"",identifier:a?.id??""}}),d=(0,qe.s)(),m=(0,pt.t)(c),p=(0,n.useMemo)((()=>c.headerFactory()),[c]),h=(0,n.useMemo)((()=>c.browseAllEventsButtonFactory({uri:"spotify:app:concerts"})),[c]),g=(0,pt.t)(h),f=t?.goods.events.concerts.items.filter((e=>e.nearUser)).filter(Vn.se)??[],y=t?.goods.events.concerts.items.filter((e=>!e.nearUser)).filter(Vn.se)??[];return(0,v.jsxs)("section",{ref:m,className:zn,children:[(0,v.jsx)(u.Q,{children:(0,tr.gq)(t?.profile.name)}),(0,v.jsxs)(si.z,{backgroundImages:t?.visuals.headerImage?.sources,children:[(0,v.jsxs)(li.Y,{children:[(0,v.jsx)(ai.Z,{children:(0,v.jsx)(x.E,{children:l.Ru.get("live_events.all_events_tab")})}),(0,v.jsx)(ui.mm,{children:t?.profile.name})]}),(0,v.jsx)(ci.h,{children:(0,v.jsx)("div",{children:(0,v.jsx)(R.X,{text:l.Ru.get("artist.concerts.artist_tour_dates",t?.profile.name)})})})]}),(0,v.jsxs)("div",{className:Wn,children:[(0,v.jsx)(Ln.K,{backgroundColor:t?.visuals.headerImage?.extractedColors?.colorDark.hex}),(0,v.jsxs)("section",{className:Yn,children:[(0,v.jsxs)("section",{className:Kn,children:[(0,v.jsx)(er.A,{handleLocationChange:e=>{e&&r(e)},locationStr:i,headerSpec:p,dialog:"preferred"}),o&&(0,v.jsx)(jn.w,{uri:o.toURI(),sharingInfo:null,interactionData:{intent:"share",type:"click"},onClick:()=>{return e=o.toURI(),void d.logInteraction(c.headerFactory().shareButtonFactory().hitShare({entityToBeShared:e,shareId:e}));var e}})]}),!t?.goods.events.concerts&&(0,v.jsxs)("div",{className:Jn,children:[(0,v.jsx)(x.E,{as:"h2",className:qn,variant:"titleMedium",semanticColor:"textBase",children:l.Ru.get("concerts.no_upcoming_events")}),(0,v.jsx)(x.E,{as:"p",variant:"bodyMedium",ref:m,className:Zn,children:l.Ru.get("artist.concerts.error.not_found")}),(0,v.jsx)(P.N,{to:"/concerts",onClick:()=>{d.logInteraction(h.hitUiNavigate({destination:"spotify:app:concerts"}))},children:(0,v.jsx)(dt.v,{selected:!0,selectedColorSet:"invertedLight",ref:g,children:l.Ru.get("concerts.browse_all_events")})})]}),!!t?.goods.events.concerts&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("section",{children:[(0,v.jsx)(x.E,{as:"h2",className:_()(qn,{[Qn]:!f}),variant:"titleMedium",semanticColor:"textBase",paddingBottom:"tighter-2",children:l.Ru.get("concerts.near_location",i)}),(0,v.jsx)(Xn,{concerts:f,spec:c})]}),(0,v.jsxs)("section",{children:[(0,v.jsx)(x.E,{as:"h2",className:_()(qn,{[Qn]:!y}),variant:"titleMedium",semanticColor:"textBase",paddingBottom:"tighter-2",children:l.Ru.get("concerts.header.other")}),(0,v.jsx)(Xn,{concerts:y,spec:c})]})]}),(0,v.jsx)("section",{children:(0,v.jsx)(Fn,{spec:c})})]})]})]})})),nr=Spicetify.GraphQL.Definitions["artistConcerts"]=new p.l("artistConcerts","query","ce78fdb28c5036de6d81bbc45571b62e2201a0c08eb068ab17dd3428396026f5",null),rr=()=>{const{artistId:e=""}=(0,r.g)(),[t,i]=(0,n.useState)(),{data:a,loading:s,invalidate:o}=(c={artistId:`spotify:artist:${e}`},(0,h.I)(nr,c,u));var c,u;if(s)return(0,v.jsx)(d.A,{hasError:!1,errorMessage:""});const m=(p=a?.artistUnion,p&&Object.keys(p).includes("uri")?a?.artistUnion:void 0);var p;return m?(0,v.jsx)(ir,{data:m,locationName:t?.location||m.goods.events.userLocation?.name||l.Ru.get("concerts.default_location"),onSetLocation:e=>{i(e),o()}}):(0,v.jsx)(d.A,{hasError:!0,errorMessage:l.Ru.get("concert.error.concert_not_found_title")})};var ar=i(32046),sr=i(15891);const or=(0,n.memo)((function(){const{artistId:e=""}=(0,r.g)(),t=(0,f.ay)(e),{search:i}=(0,r.zy)(),n=new URLSearchParams(i).get("pageUri"),o=(0,s.o_)(n)?n:null;return(0,v.jsx)(z.P,{surface:G.u.ARTIST,uris:[t],children:(0,v.jsx)("section",{"":"artist-page","data-test-uri":t,children:(0,v.jsxs)(r.BV,{children:[(0,v.jsx)(r.qh,{path:"discography",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_ALBUMS,children:(0,v.jsx)(Oe,{})})}),(0,v.jsx)(r.qh,{path:"discography/:albumType",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_ALBUMS,children:(0,v.jsx)(Oe,{})})}),(0,v.jsx)(r.qh,{path:"featuring",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_FEATURING,children:(0,v.jsx)(Me,{})})}),(0,v.jsx)(r.qh,{path:"related",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_RELATED,children:(0,v.jsx)(Cn,{})})}),(0,v.jsx)(r.qh,{path:"appears-on",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_APPEARS_ON,children:(0,v.jsx)(y,{})})}),(0,v.jsx)(r.qh,{path:"playlists",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_PLAYLISTS,children:(0,v.jsx)(_n,{})})}),(0,v.jsx)(r.qh,{path:"discovered-on",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_DISCOVERED_ON,children:(0,v.jsx)(je,{})})}),(0,v.jsx)(r.qh,{path:"saved",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_SAVED_TRACKS,children:(0,v.jsx)(On,{})})}),(0,v.jsx)(r.qh,{path:"related-videos",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_RELATED_VIDEOS,children:(0,v.jsx)(Sn,{})})}),(0,v.jsx)(r.qh,{path:"/",element:o?(0,v.jsx)(sr.$,{to:{search:i,pathname:"/artist/:artistId/discography"}}):(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST,children:(0,v.jsx)(yn,{})})}),(0,v.jsx)(r.qh,{path:"concerts",element:(0,v.jsx)(ar.e,{pageId:a.$h.ARTIST_CONCERTS,children:(0,v.jsx)(rr,{})})})]})})})}));or.displayName="ArtistPage";const lr=or},24811:(e,t,i)=>{"use strict";i.d(t,{Lf:()=>c,Mz:()=>o,UT:()=>s,ay:()=>a,bj:()=>d,fX:()=>l,pe:()=>u});var n=i(79787),r=i(7353);const a=e=>`spotify:artist:${e}`,s=e=>({artists:e.artists.items.map((e=>({uri:e.uri,name:e.profile.name}))),images:e.coverArt?.sources??[],name:e.name,uri:e.uri,sharingInfo:e.sharingInfo??null}),o=e=>({artists:e.artists?.items.map((e=>({uri:e.uri,name:e.profile?.name||""})))||[],images:e.coverArt?.sources||[],name:e.name,uri:e.uri,year:e.date?.year,type:e.type,sharingInfo:e.sharingInfo??null}),l=({track:{uri:e,name:t,playcount:i,duration:{totalMilliseconds:r},contentRating:a,artists:{items:s},albumOfTrack:o,playability:{playable:l},associations:c}},u)=>({uri:e,contextUri:u,totalMilliseconds:r,name:t,contentRating:a?.label||n.x7.None,isPlayable:l,playcount:parseInt(i||"0",10),artists:s.map((e=>({uri:e.uri,name:e.profile.name}))),imageUrl:o?.coverArt?.sources?.length?o?.coverArt.sources[0].url:"",albumUri:o?.uri||"",hasAssociatedVideo:(c?.associatedVideos?.totalCount||0)>0}),c=e=>e?e.reduce(((e,t)=>(e.push(t.releases.items[0]),e)),[]):[],u=e=>e?e.reduce(((e,t)=>(e.push(t.releases.items[0]),e)),[]):[],d=e=>e.map((e=>"Playlist"!==e.data?.__typename?null:{uri:e.data.uri,name:e.data.name,description:e.data.description??"",images:e.data.images?.items?.[0]?.sources??[],authorName:"User"===e.data.ownerV2.data.__typename?e.data.ownerV2.data.name:null})).filter(r.P)},10239:(e,t,i)=>{"use strict";i.d(t,{q:()=>o,O:()=>l});var n=i(81987),r=i(19159),a=i(85993);const s="spotify:playlist:37i9dQZF1DWXkVfVmXHa7l",o="#D4000E";function l(){const e=(0,n.NC)(r.Aem,{loadingValue:!1}),{isActive:t}=(0,a.l_)(s);return e&&t}},93760:(e,t,i)=>{"use strict";i.d(t,{h:()=>n});const n=(0,i(33655).u)("BuddyFeedLegacyAPI")},78604:(e,t,i)=>{"use strict";i.d(t,{Y:()=>n});const n=(0,i(33655).u)("BuddyFeedAPI")},72419:(e,t,i)=>{"use strict";i.d(t,{RT:()=>g,Gg:()=>_,Eg:()=>y});var n=i(30758),r=i(97500),a=i.n(r),s=i(61272),o=i(63462),l=i(61544),c=i(65881),u=i(85993),d=i(79787);const m="huMHH_FySIW5UhSrJfy8",p="bWyow5NL2GmdPjyBUAbh";var h=i(86070);let g=function(e){return e.Loop="loop",e.LoopOnHover="loopOnHover",e.LoopOnPlayback="loopOnPlayback",e}({});function f(e){return!!e&&(0,l.bp)(e)}function v(e){return!!e}function y(e,t){return f(t)&&v(e)}function b(e,t,i){if(!f(t))return null;if(!v(e))return null;const n={};return i&&(n.position=Math.trunc(8e3*Math.random())),(0,o.a2)({fileId:e,uri:t,mediaType:"video",format:"MANIFEST_ID",options:n})}const _=({canvasUri:e,fileId:t,canvasType:i,playerContainerClass:r,children:l,className:f,playbackType:v=g.LoopOnHover,onError:y=(()=>{}),mouseHoverRef:_=null,allowAspectRatioFix:E=!1,onLoaded:C=(()=>{})})=>{const x=(0,n.useRef)(null),S=(0,n.useMemo)((()=>(0,c.Ue)({videoPlayerContainer:`.${r}`,audioPlayerContainer:`.${r}`,disallowRobustnessValues:[o.ci.EMPTY]})),[r]);(0,n.useEffect)((()=>()=>{S.stop(),S.removeAllListeners()}),[S]);const[A,T]=(0,n.useState)(!1),[I,N]=(0,n.useState)(!1),{isPlaying:w}=(0,u.GK)();(0,s.Ij)((()=>{const n=b(t,e,i===d.PJ.VideoLoopingRandom);return n?(S.playTracks([n],{paused:v===g.LoopOnHover||v===g.LoopOnPlayback&&!w,muted:!0,loop:!0}),S.on(o.LW.TRACK_LOADED,(()=>{const e=document.getElementsByClassName(r),t=e[0]?.querySelector("video");if(t&&x.current){if(x.current.appendChild(t),E){const e=t.videoWidth/t.videoHeight;e<16/8.9&&e>16/9.1&&N(!0)}t.autoplay=v===g.LoopOnPlayback&&w||v===g.Loop}T(!0),C()})),S.on(o.LW.ERROR,(e=>{e.data.error&&y(e.data.error),y(new Error("CanvasPlayer error"))})),()=>{T(!1),S.stop(),S.removeAllListeners()}):()=>{}}),[t,e]);const R=(0,n.useRef)(null),k=(0,n.useCallback)((()=>{R.current&&clearTimeout(R.current),A&&S.resume()}),[A,S]),O=(0,n.useCallback)((()=>{R.current&&clearTimeout(R.current),R.current=setTimeout((()=>{A&&S.pause()}),300)}),[A,S]);return(0,n.useEffect)((()=>{const e=_?.current;return e&&v===g.LoopOnHover?(e.addEventListener("mouseenter",k),e.addEventListener("mouseleave",O),()=>{e.removeEventListener("mouseenter",k),e.removeEventListener("mouseleave",O)}):()=>{}}),[v,k,O,w,_]),(0,n.useEffect)((()=>{v===g.LoopOnPlayback&&A&&(w?S.resume():S.pause())}),[w,A,S,v]),(0,h.jsx)("div",{className:a()(r,f,m,{[p]:I}),ref:x,children:l})}},53212:(e,t,i)=>{"use strict";i.d(t,{a:()=>_});var n=i(30758),r=i(25639),a=i(81987),s=i(61544),o=i(15742);i(8385);const l=Spicetify.GraphQL.Definitions["canvas"]=new o.l("canvas","query","1b1e1915481c99f4349af88268c6b49a2b601cf0db7bca8749b5dd75088486fc",null);var c=i(8059),u=i(18024),d=i(19159),m=i(73356),p=i(69916),h=i(22253),g=i(39683),f=i(2435),v=i(71817),y=i(10132);const b=({avoidGraphQlFetching:e=!1})=>{const t=(0,g.Ek)(),i=(0,c.L)(),a=(0,f.o)((e=>e?.item?.type===v.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"]}:null),y.a),o=!t&&!e,u=((e,t)=>{const{request:i}=(0,n.useContext)(p.j),{name:a,sha256Hash:o}=l,c={uri:e},u=(0,s.o_)(e)?.type===v.c.TRACK,{data:d,isLoading:m,error:g}=(0,r.I)({enabled:t&&u,queryKey:[a,c,o],gcTime:36e5,staleTime:6e5,queryFn:()=>new Promise(((e,t)=>{(0,h.c)(i,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}))).catch(t)})),meta:{persist:!0}});return{data:d,isLoading:m,error:g}})(i?.item?.uri??"",o),d=a||u?.data;return d?{canvas:d,loading:!a&&!!u?.isLoading,error:a?null:u?.error}:null},_=({tryAvoidGraphQLFetching:e=!1})=>{const t=(0,a.NC)(d.yJ8),i=(0,m.j)(),n=(0,u.g)(),r=t!==d.NtL.CONTROL,s=e&&!i&&!n,o=b({avoidGraphQlFetching:!r||s});if(s)return{canvas:null,loading:!1,error:null,showCanvasInNPV:!1,showCanvasToggleInContextMenu:!1};const l=Boolean(o?.canvas?.fileId),c=r&&l,p=!i&&n&&r&&l;return{canvas:o?.canvas||null,loading:Boolean(o?.loading),error:o?.error,showCanvasInNPV:p,showCanvasToggleInContextMenu:c}}},56232:(e,t,i)=>{"use strict";i.d(t,{$V:()=>n,Bw:()=>l,dR:()=>s,eO:()=>o,se:()=>a,w1:()=>c,ys:()=>r});const n=e=>"data"in e&&Object.keys(e.data).length>0,r=e=>"concerts"in(e??{}),a=e=>null!=e,s=e=>"__typename"in e&&"AllEvents"===e.__typename,o=e=>"__typename"in e,l=e=>!!e&&"sections"in e,c=e=>"__typename"in e},96775:(e,t,i)=>{"use strict";i.d(t,{I:()=>n.I});var n=i(6362)},32912:(e,t,i)=>{"use strict";i.d(t,{Fn:()=>d,MW:()=>m,PR:()=>f,Py:()=>c,VJ:()=>u,Vi:()=>v,WB:()=>p,WZ:()=>h,Y:()=>o,l4:()=>s,m7:()=>g,tX:()=>b,tj:()=>l});var n=i(12058),r=i(11808),a=i(56232);const s=e=>new Date(e.substring(0,16)),o=e=>r.Ru.formatDate(e,{weekday:"short",month:"short",day:"numeric"}),l=e=>r.Ru.formatDate(e,{month:"short"}),c=e=>r.Ru.formatDate(e,{day:"numeric"}),u=e=>r.Ru.formatDate(e,{weekday:"short"}),d=e=>r.Ru.formatDate(e,{month:"short",day:"numeric"}),m=e=>r.Ru.formatDate(e,{weekday:"short",hour:"numeric",minute:"numeric"}),p=e=>r.Ru.formatDate(e,{hour:"numeric",minute:"numeric"}),h=(e,t)=>{if(e.toDateString()===t.toDateString())return o(e);if(e.getMonth()===t.getMonth()){return`${r.Ru.formatDate(e,{day:"numeric",month:"short"})}${r.Ru.formatDate(t,{day:"numeric"})}`}return`${r.Ru.formatDate(e,{day:"numeric",month:"short"})}${r.Ru.formatDate(t,{day:"numeric",month:"short"})}`},g=e=>{if(!e)return!1;const t=new Date(e);return new Date>t},f=e=>{if(!e)return!1;const t=new Date(e);return new Date<t},v=e=>{const[t]=e,i=e[e.length-1];return(0,a.$V)(t)&&(0,a.$V)(i)?{startDate:s(t.data.startDateIsoString),endDate:s(i.data.startDateIsoString)}:{startDate:new Date,endDate:new Date}},y={month:"short",day:"numeric"},b=e=>{if((0,n.r)(e.from,e.to))return r.Ru.formatDate(e.from,y);return`${r.Ru.formatDate(e.from,y)} - ${r.Ru.formatDate(e.to,y)}`}},7722:(e,t,i)=>{"use strict";i.d(t,{Ac:()=>s,a9:()=>o,i3:()=>u,im:()=>c,re:()=>l,tI:()=>r});var n=i(11808);const r=(e,t,i)=>!!e&&(t||!i.length),a=e=>e.artists.map((e=>e.name)),s=e=>1===e.length?n.Ru.get("concert.header.upcoming_concert_title_1",...e):2===e.length?n.Ru.get("concert.header.upcoming_concert_title_2",...e):3===e.length?n.Ru.get("concert.header.upcoming_concert_title_3",...e):4===e.length?n.Ru.get("concert.header.upcoming_concert_title_4",...e):e.length>4?n.Ru.get("concert.header.upcoming_concert_title_more",...e):"",o=e=>{const t=a(e);return r(e.title,e.festival,t)?e.title:s(t)},l=e=>1===e.length?n.Ru.get("concert.header.entity_title_1",...e):2===e.length?n.Ru.get("concert.header.entity_title_2",...e):3===e.length?n.Ru.get("concert.header.entity_title_3",...e):4===e.length?n.Ru.get("concert.header.entity_title_4",...e):e.length>4?n.Ru.get("concert.header.entity_title_more",...e):"",c=({name:e,city:t,region:i,country:r})=>[e,t,i,r].filter((e=>!!e&&"unknown"!==e.toLowerCase())).join(n.Ru.getSeparator()),u=e=>{if(!e.artists||0===e.artists.items.length)return e.title;if(e.festival)return e.title;const t=e.artists.items.map((e=>e.profile.name));return l(t)}},22614:(e,t,i)=>{"use strict";i.d(t,{M:()=>n.Mp,t:()=>n.tf});var n=i(10848)},10848:(e,t,i)=>{"use strict";i.d(t,{$A:()=>S,HJ:()=>T,Mp:()=>C,p2:()=>I,tf:()=>x,uY:()=>A});var n=i(57266),r=i(84997),a=i(7143),s=i(8337),o=i(11118),l=i(39840),c=i(3052),u=i(1134),d=i(59008),m=i(68031),p=i(84350),h=i(99040),g=i(75886),f=i(57290),v=i(69964),y=i(11808),b=i(63753),_=i(28004),E=i(22360);function C(e){return e===_.bq.CAST_AUDIO||e===_.bq.CAST_VIDEO}function x(e,t,i){let g=n.U;const f=t?"multispeaker":e;if(function(e){return e?.audioDevice?.transportType===b.Yg.BLUETOOTH}(i))switch(i?.externalAccessory?.type){case E.G.HEADPHONES:return r.r;case E.G.SPEAKER:return a.r;case E.G.UNKNOWN:if(i?.audioDevice?.terminalType===b.FI.HEADPHONES)return r.r;if(i?.audioDevice?.terminalType===b.FI.SPEAKERS)return a.r}switch(f){case _.bq.COMPUTER:case _.bq.CHROMEBOOK:g=s.t;break;case _.bq.TABLET:g=o.$;break;case _.bq.SMARTPHONE:g=l.q;break;case _.bq.SPEAKER:case _.bq.CAST_AUDIO:case _.bq.AUDIO_DONGLE:case _.bq.HomeThing:g=a.r;break;case _.bq.TV:case _.bq.STB:case _.bq.CAST_VIDEO:g=c.I;break;case _.bq.AVR:g=u._;break;case _.bq.GAME_CONSOLE:g=d.q;break;case _.bq.SMARTWATCH:g=m.D;break;case _.bq.CarThing:case _.bq.AUTOMOBILE:g=p.Q;break;case"multispeaker":g=h.a}return g}function S(e,t="disconnected"){return C(e)?"connected"===t?g.I:f.m:v.E}function A(e,t){let i;switch(e){case _.bU.PREMIUM_REQUIRED:i=y.Ru.get("web-player.connect.device-picker.get-premium");break;case _.bU.NOT_INSTALLED:i=y.Ru.get("web-player.connect.device-picker.install-spotify");break;case _.bU.UNSUPPORTED_URI:i=y.Ru.get("web-player.connect.device-picker.unsupported-uri");break;case _.bU.INCOMPATIBLE:i=y.Ru.get("web-player.connect.device-picker.update-device");break;case _.bU.NOT_AUTHORIZED:i=t?y.Ru.get("web-player.connect.device-picker.playstation-unauthorized"):y.Ru.get("web-player.connect.device-picker.device-unavailable");break;case _.bU.UNAVAILABLE:i=y.Ru.get("web-player.connect.device-picker.device-unavailable");break;case _.bU.AD_PLAYING:i=y.Ru.get("web-player.connect.device-picker.ad-playing");break;case _.bU.NARRATION:i=y.Ru.get("web-player.connect.device-picker.tts-playing");break;case _.bU.WAKING_UP:i=y.Ru.get("web-player.connect.device-picker.wakingup-device");break;case _.bU.TIMED_OUT_WAKEUP:i=y.Ru.get("web-player.connect.device-picker.wakeup-timeout");break;case _.bU.UNKNOWN:default:i=y.Ru.get("web-player.connect.device-picker.restart-device")}return{helpText:i,tooltip:undefined}}function T(e){return void 0!==e&&2===e.available.length&&e.available.includes("cast")&&e.available.includes("connect")}function I(e,t){return e===_.bq.GAME_CONSOLE&&("ps5"===t||"ps4"===t)}},94939:(e,t,i)=>{"use strict";i.d(t,{j:()=>u});var n=i(30758),r=i(35790);function a(e){return e instanceof Node&&"STYLE"===e.nodeName}function s(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:i},size:{width:n,height:r}}=e;return`left=${t},top=${i},width=${n},height=${r}`}(e));if(null!==t){i=window.document,(n=t.document).head.querySelectorAll("style, link[rel=stylesheet]").forEach((e=>{n.head.removeChild(e)})),Array.from(i.styleSheets).forEach((e=>{if(e.href){const t=i.createElement("link");t.rel="stylesheet",t.href=e.href,n.head.appendChild(t)}else try{if(e.cssRules){const t=n.createElement("style");Array.from(e.cssRules).forEach((e=>{t.appendChild(n.createTextNode(e.cssText))})),n.head.appendChild(t)}}catch(t){console.warn("Failed to read `styleSheet.cssRules` - possibly a CORS issue?!",e)}})),function(e,t){const i=e.createElement("base");i.setAttribute("href",t),e.head.appendChild(i)}(t.document,`${window.location.protocol}//${window.location.hostname}/`);let r=null;r=new MutationObserver((e=>{for(const i of e)i.addedNodes.forEach((e=>{(s(e)||a(e))&&t.document.head.appendChild(e.cloneNode(!0))})),i.removedNodes.forEach((e=>{if(s(e))t.document.head.querySelector(o(e))?.remove();else if(a(e)){const i=e.textContent;Array.from(t.document.head.querySelectorAll(o(e))).find((({textContent:e})=>e===i))?.remove()}}))})),r.observe(window.document.head,{childList:!0}),t.addEventListener("pagehide",(()=>{null!==r&&(r.disconnect(),r=null),e.onClose?.(t)}))}var i,n;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:i}=function(e){const[t,i]=(0,r.vB)(),a=(0,n.useRef)(e),s=t.map.get(e.name)??null;a.current=e;const o=(0,n.useCallback)((()=>{null!==s&&(s.close(),i((0,r.Mj)(a.current.name)))}),[i,s]),c=(0,n.useCallback)((()=>{if(null!==s)return;const e=l({...a.current,onClose:e=>{a.current.onClose?.(e),i((0,r.Mj)(a.current.name))}});null!==e&&i((0,r.qS)(a.current.name,e))}),[i,s]);return(0,n.useEffect)((()=>(window.addEventListener("pagehide",o),()=>{window.removeEventListener("pagehide",o)})),[o]),{handle:s,open:c,close:o}}(c);return{handle:e,show:t,hide:i}}},3469:(e,t,i)=>{"use strict";i.d(t,{V:()=>o});var n=i(30758),r=i(41978),a=i(90751),s=i(11926);function o(){const e=(0,s.B)(),t=(0,r.wA)();return(0,n.useCallback)(((i,n)=>new Promise((r=>t((0,a.Ih)(i,(()=>e.removeDownload(i,n).then((()=>r(!0)))),(()=>r(!1)),n))))),[t,e])}},1646:(e,t,i)=>{"use strict";i.r(t),i.d(t,{EpisodeMoreLikeThis:()=>Di,default:()=>ji});var n=i(30758),r=i(37985),a=i(9183),s=i(43759),o=i(5800),l=i(61544),c=i(11808),u=i(31685),d=i(89199),m=i(92750),p=i(97500),h=i.n(p),g=i(82097),f=i(15742),v=i(8385);const y=Spicetify.GraphQL.Definitions["internalLinkRecommenderEpisode"]=new f.l("internalLinkRecommenderEpisode","query","28b3555816ad49290799e6697f0077e8f351d753b46cc2e6a195e1c72e47e7f2",null);var b=i(47541),_=i(41978),E=i(53851),C=i(60822),x=i(71588),S=i(58345),A=i(83716),T=i(34136),I=i(50415),N=i(14627),w=i(63198),R=i(39249),k=i(58237),O=i(78074),P=i(95302),L=i(42116),j=i(42582),D=i(94313),M=i(79787),U=i(94672),B=i(86070);const F=e=>`activation-trigger-mme-${e}`,H=n.memo((function({index:e=-1,audio:t,contentInformation:i,coverArt:r,contentRatingLabel:a,description:s,mediaTypes:o,isoString:c,name:u,playable:m,playedState:p,podcastSubscription:h,sharingInfo:g,showName:f,showTrailer:v,showTypes:y,showUri:b,status:H,totalMilliseconds:V,type:G,uri:z}){const W=p.playPositionMilliseconds,K=(0,n.useRef)(null),[Y,q]=(0,n.useState)(p.state===M._w.Completed),{draggable:Z,onDragStart:$}=(0,N.P)(),Q=(0,w.V)(),J=(0,L.y)(),X=(0,_.wA)(),{isActive:ee,isPlaying:te,togglePlay:ie}=(0,j.P)({uri:z},{featureIdentifier:"episode"}),[ne]=(0,D.S)(1e4,(e=>e?.item?.uri===z));(0,n.useEffect)((()=>{te&&(K.current=ne)}),[te,ne]),(0,n.useEffect)((()=>{!te&&K.current&&V<=K.current&&q(!0)}),[te,V]);const re=(0,n.useCallback)((e=>{e||(K.current=0),q(e)}),[]),ae={uri:b,name:f,trailer:v,showTypes:y},se=(0,R.C)({audio:t,name:u,uri:z,mediaTypes:o,coverArt:{sources:r}},ae),oe=(0,n.useCallback)((()=>{G!==M.I_.Episode?Q?se():ie():d.h.set((()=>({triggerId:F(z),triggerAction:null})))}),[G,Q,z,se,ie]),le=h?.isPaywalled??!1,ce=h?.isUserSubscribed??!1,ue=le&&!ce,de=le&&Q,{badges:me}=(0,U.b)({contentRating:a,isPaywalled:le}),pe=(0,n.useCallback)((()=>X((0,E.Tf)(b))),[b,X]),he=(0,n.useCallback)((e=>{let t=e;return(ue||de)&&(t=(0,B.jsx)(T.f,{enabled:!0,showUri:b,children:t})),!m&&me.nineteen&&(t=(0,B.jsx)("div",{onClick:e=>{e.stopPropagation(),pe()},children:e})),t=(0,B.jsx)(C.k,{id:F(z),targetURI:(0,l.o_)(z),children:t}),t}),[ue,de,m,me.nineteen,z,b,pe]);return(0,B.jsx)(P.pZ,{value:"row",index:e,children:(0,B.jsx)(x.h,{menu:(0,B.jsx)(S.b,{uri:z,showUri:b,sharingInfo:g,isPlayed:Y,onMarkAsPlayed:re}),children:(0,B.jsx)(A.k,{requestId:void 0,index:e,uri:z,size:J,images:r||[],name:u,showName:f,description:s,isPlayable:m||ue,fullyPlayed:Y,durationMs:V,releaseDate:c||"",resumePositionMs:K.current??W,draggable:Z,handleDragStart:e=>{if(e.target!==e.currentTarget)return;$(e,{itemUris:[z],dragLabelText:`${u} • ${f}`,contextUri:b})},handlePlaybackClick:oe,isCurrentlyPlaying:ee,isPaywalled:le,isUserSubscribed:ce,isPlaying:te,position:te?ne:void 0,episodeSharingInfo:g,onMarkAsPlayed:re,contentInformation:i,showUri:b,mediaTypes:o??void 0,badges:(0,B.jsxs)(B.Fragment,{children:[me.explicit&&(0,B.jsx)(k.g,{}),me.paid&&(0,B.jsx)(I.K,{}),me.nineteen&&(0,B.jsx)(O.q,{size:16})]}),playButtonWrapper:he,status:H})})})}));var V=i(71817);var G=i(4594),z=i(18573),W=i(14745);const K="GgMHVmfXNzteIydSWMIA",Y="GcupflQsYyy0IMOsCeD1",q="h6KkL9VhU8t6zFv7XQXc",Z="A4FqrLbXeENogU0IRaPn",$="YCYs0Gv5B5ctDN0f5Zby",Q=({uri:e,isFullPage:t=!1})=>{const{data:i}=(n={uri:e,seoExperimentId:W.R.EPISODE_DISCOVERY},(0,v.I)(y,n,r));var n,r;const a=i?.seoRecommendedEpisode.totalCount,s=i?.seoRecommendedEpisode.items,o=function(e){return(e||[]).filter((e=>(e=>{return t=e,"NotFound"!==t?.__typename&&"GenericError"!==t?.__typename&&"RestrictedContent"!==t?.__typename&&"Episode"===e.__typename;var t})(e.data)))}(s),u=t?o:o.slice(0,5);if(0===a)return null;const d=(0,l.o_)(e)?.id,m=`spotify:app:episode:${d}:more-like-this`;return(0,B.jsxs)("section",{className:h()(K,{[Y]:!t}),"":"episode-list",children:[(0,B.jsx)("header",{className:q,children:(0,B.jsx)(G.k,{title:c.Ru.get("internal-link-recommender.more-episodes-like-this"),hasMoreElements:!t,seeAllUri:m})}),u.map((({data:e},t)=>{const i=(e=>{return t=e,"NotFound"!==t?.__typename&&"GenericError"!==t?.__typename&&"RestrictedContent"!==t?.__typename&&"Podcast"===e.__typename;var t})(e.podcastV2.data)?e.podcastV2.data:null;return i?e&&(0,B.jsxs)("div",{className:$,children:[(0,B.jsx)("hr",{className:Z,"aria-hidden":!0}),(0,B.jsx)(H,{index:t,audio:e.audio,contentInformation:e.contentInformation,contentRatingLabel:e.contentRating?.label,coverArt:e.coverArt?e.coverArt.sources:void 0,description:e.description,isoString:e.releaseDate?.isoString,mediaTypes:e.mediaTypes,name:e.name,playable:e.playability.playable,playedState:e.playedState,podcastSubscription:(0,z.Wx)(e.restrictions,e.playability),sharingInfo:e.sharingInfo,showTrailer:(n=i.trailerV2?.data,n&&(e=>{return t=e,"NotFound"!==t?.__typename&&"GenericError"!==t?.__typename&&"RestrictedContent"!==t?.__typename&&"Episode"===e.__typename;var t})(n)?{type:V.c.EPISODE,uri:n.uri,name:n.name,coverArt:n.coverArt?.sources||[],audio:n.audio,audioPreview:n.audioPreview,sharingInfo:n.sharingInfo,duration:{milliseconds:n.duration.totalMilliseconds},contentRating:n.contentRating,mediaTypes:n.mediaTypes}:null),showName:i.name,showTypes:i.showTypes,showUri:i.uri,totalMilliseconds:e.duration.totalMilliseconds,type:e.type,uri:e.uri},`${e.uri}/${t}`)]},`${t}${e.uri}`):null;var n}))]})},J=e=>{const t=(0,b.D)({entityType:V.c.EPISODE,componentType:"list",uri:e.uri});return(0,B.jsx)(g.s,{onError:t,children:(0,B.jsx)(Q,{...e})})};var X=i(83028),ee=i(84512),te=i(21968),ie=i(97438),ne=i(37712),re=i(27734),ae=i(70675),se=i(68244),oe=i(39796),le=i(44694),ce=i(65500),ue=i(55030),de=i(27685),me=i(4096);const pe="activation-trigger-mme",he=({episodeUri:e,showUri:t,isLocked:i,isPlaying:n,isPlayDisabled:r,playButtonPlayLabel:a,playButtonPauseLabel:s,onClick:o,size:c="large"})=>{const u=(0,me.c)();if((0,w.V)())return(0,B.jsx)(de.R,{size:c,onClick:o,isPlaying:n,disabled:r,locked:i,ariaPlayLabel:a,ariaPauseLabel:s});const d=(0,B.jsx)(T.f,{showUri:t,enabled:i,renderInline:!1,children:(0,B.jsx)(de.R,{size:c,onClick:o,isPlaying:n,disabled:r,locked:i,ariaPlayLabel:a,ariaPauseLabel:s})});return u?(0,B.jsx)(C.k,{id:pe,targetURI:(0,l.o_)(e),fadeOut:!0,children:d}):d};function ge(e){return e?.replace(/T.*/,"")||""}var fe=i(69578),ve=i(98767),ye=i(70583),be=i(2435),_e=i(79303),Ee=i(72091),Ce=i(71338);const xe="KY_tGmIGPqs9GPaaPqL1",Se="ZDeijYE6qPzPqT9vG_2w",Ae="qEoBuparvnBwiHsPzwEj",Te="azmMKgbEFsGjSUnw2Knc",Ie="oDljdc6tgUKxTeQMyh0D",Ne="JflKazLAHawVzYxv1pXc",we="aTeXTpJi_WmakpodeGxX",Re="kZWs1d_TjX2JQgmtx90y",ke="JCSifKpPc54eqcTYBj5Q",Oe="FlK1APGRiu5DTwm_0kix",Pe="ahQLeD18bYXcFRWkL_vg",Le="l6peddfW1BiAnd1a_mF3",je="Xkg0O12dNVwomjL8dzm4",De="OexEjZt7Kf7pFUW701v8",Me="jAY3diSzPfk19oswf8_y",Ue="F3BJWbXwGSqNOwZHInLz",Be="YjVCpFaOT3LCR64t8jTN",Fe="Q7HlO_WHb9N8aK8bgOjG",He="xTENSk0_RmQ8qEeEuhnE",Ve=({episode:e,onPlayEpisode:t,isPlaying:i,isActive:r,isFullyPlayed:a,setIsFullyPlayed:s,backgroundColor:o,isLocked:l,spec:u})=>{const{uri:d,playedState:m,contentRating:p,playability:h}=e,g=(0,_e.s)(),f=(0,_.wA)(),[v]=(0,D.S)(1e4,(e=>e?.item?.uri===d)),y=(0,be.o)((e=>e?.duration)),{badges:b}=(0,U.b)({contentRating:p?.label}),C=(0,n.useCallback)((e=>{!h.playable&&b.nineteen&&(e.stopPropagation(),f((0,E.Tf)(d||"")))}),[d,h.playable,b.nineteen,f]),x=(0,n.useCallback)((()=>{const e=u.contextMenuButtonFactory().hitUiReveal();g.logInteraction(e)}),[g,u]),A=(0,n.useCallback)(((e,t)=>{(0,ve.Qv)(t,u.downloadButtonFactory(),g,d)}),[g,u,d]),T=(0,ue.d$)(),{spec:I,logger:N}=(0,Ee.r)(te.e,{data:{uri:d}});(0,n.useEffect)((()=>{T&&N.logImpression(I.impression())}),[T,N,I]);const w=(0,n.useCallback)((e=>{const t=u.saveButtonFactory();g.logInteraction(e?t.hitLike({itemToBeLiked:d}):t.hitRemoveLike({itemNoLongerLiked:d})),e&&T&&N.logInteraction(I.hitAddToPlaylist({itemToBeAdded:d,playlist:ye.Xn}))}),[g,u,d,T,N,I]),R=!l&&!e.playability.playable,k=c.Ru.get("tracklist.a11y.play",e.name,e.podcast?.name),P=c.Ru.get("tracklist.a11y.pause",e.name,e.podcast?.name),L=e.podcast?.uri,j=(0,fe.j)(),M=(0,ce.v)(e.uri),F=!l;return(0,B.jsxs)(ie.E,{backgroundColor:o,children:[(0,B.jsxs)(ne.S,{children:[b.nineteen&&(0,B.jsx)(O.q,{className:Ne,size:16}),(0,B.jsx)(Ce.j,{fullyPlayed:a,durationMs:r&&y?y:e.duration.milliseconds,releaseDate:ge(e.releaseDate?.isoString),resumePositionMs:m.playPositionMilliseconds,isPlaying:i,position:r&&v||void 0})]}),(0,B.jsxs)(ne.S,{children:[(0,B.jsx)("div",{onClick:C,children:(0,B.jsx)(he,{episodeUri:e.uri,showUri:L,isLocked:l,onClick:()=>{t(m.playPositionMilliseconds)},isPlaying:i,isPlayDisabled:R,playButtonPlayLabel:k,playButtonPauseLabel:P,size:j})}),(0,B.jsx)(re.e,{uri:e.uri,onClick:A,size:j,canDownload:F,condensed:!0}),M?(0,B.jsx)(le.g,{uri:e.uri,size:j}):(0,B.jsx)(se.b,{uri:e.uri,size:j,onClick:w,condensed:!0}),(0,B.jsx)(oe.b,{onShow:x,menu:(0,B.jsx)(S.b,{uri:e.uri,sharingInfo:e.sharingInfo,showUri:L,contextUri:e.uri,isPlayed:a,onMarkAsPlayed:s}),children:(0,B.jsx)(ae.e,{label:c.Ru.get("more.label.context",e.name),size:j})})]})]})};var Ge=i(49217),ze=i(71259),We=i(39402),Ke=i(23956),Ye=i(21866),qe=i(95527),Ze=i(35657),$e=i(8059),Qe=i(6292);const Je=Ke.ui.EPISODE_PAGE,Xe=({leavebehinds:e,uri:t,seeAllPath:i})=>{const r=(0,n.useMemo)((()=>e.slice(0,Ze.un)),[e]);return(0,B.jsx)(ze.o,{leavebehinds:r,surface:Je,uri:t,seeAllButton:e.length>Ze.un?(0,B.jsx)(We.J,{leavebehinds:e,surface:Je,uri:t,pathname:i,state:{uri:t}}):null})};function et(e){const t=(0,$e.L)(),i=(0,l.o_)(e.uri)?.id,r=(0,qe.c)(i),{data:a,error:s,getLeavebehinds:o}=(0,Ye.A)({surface:Je,uri:e.uri}),c=(u=t?.item.type,(0,Qe.Z)(u)===V.c.AD&&u===V.c.EPISODE);var u;(0,n.useEffect)((()=>{o()}),[o]),(0,n.useEffect)((()=>{c&&o()}),[c]);const d=(0,n.useMemo)((()=>a?(0,Ze.iT)(a,e.uri):[]),[a?.requestId]);return d.length<1||s?null:(0,B.jsx)(Xe,{uri:e.uri,leavebehinds:d,seeAllPath:r})}var tt=i(80852),it=i(12783),nt=i(81987),rt=i(34071),at=i(43830),st=i(19159);const ot=({cardHeaderText:e,cardBodyText:t,buttonText:i,buttonTarget:n})=>(0,nt.NC)(st._Nj)?(0,B.jsxs)("div",{className:ke,children:[(0,B.jsxs)("div",{className:Oe,children:[(0,B.jsx)(it.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:e}),(0,B.jsx)(it.E,{semanticColor:"textBase",children:t})]}),(0,B.jsx)(at.$,{size:"small",colorSet:"invertedLight",href:(0,l.o_)(n).toURLPath(!0),component:tt.v,children:i})]}):null,lt=({areHTMLDescriptionsEnabled:e,contentInformation:t,description:i,hasDescription:r,htmlDescription:a,onExpanded:s,onTimeStampClick:o,playability:l,showHeader:u=!0,spec:d})=>{const m=(0,_e.s)(),p=(r||t)&&u,h=(0,n.useCallback)((e=>{const t=d.readMoreButtonFactory();m.logInteraction(e?t.hitUiReveal():t.hitUiHide()),s?.()}),[d,m,s]),g=(0,nt.NC)(st.ZK8,{loadingValue:!1});return(0,B.jsxs)(B.Fragment,{children:[p&&(0,B.jsx)(it.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Te,children:c.Ru.get("episode.description-title")}),t&&(0,B.jsx)(ot,{cardHeaderText:t.cardHeaderText,cardBodyText:t.cardBodyText,buttonText:t.buttonText,buttonTarget:t.buttonTarget}),r&&(0,B.jsx)(rt.N,{className:Ae,onTimeStampClick:o,maxLines:4,onExpanded:h,content:(i||"").trim(),htmlContent:e&&a?a:void 0,enableTimestamps:l.playable,enableAutomaticLinkification:g&&e&&!!a})]})};var ct=i(50513),ut=i(4944),dt=i(52660),mt=i(45395),pt=i(45879),ht=i(34629),gt=function(e){return e.DESCRIPTION="description",e.TRANSCRIPT="transcript",e}(gt||{});const ft=n.memo((function({transcriptSections:e,descriptionContent:t,transcriptContent:i,spec:r}){const a=(0,_e.s)(),[s,o]=(0,n.useState)(gt.DESCRIPTION),l=(0,ht.v7)(),{ref:u,inView:d}=(0,ct.Wx)({threshold:[1],root:l.current,rootMargin:`-${pt.uC+1}px 100000px 0px 100000px`}),m=(0,n.useRef)(null),p=(0,n.useCallback)((e=>{m.current=e,u(e)}),[u]);return(0,n.useEffect)((()=>{const e=m.current?.parentElement?.offsetTop,t=l?.current;if(!e||!t)return;const i=e-pt.uC;t.scrollTop>i&&t.scrollTo({top:i})}),[l,s]),(0,B.jsx)(ut.j,{list:(0,B.jsxs)(dt.L,{className:h()(Be,{[Fe]:!d}),ref:p,children:[(0,B.jsx)(mt.Y,{label:c.Ru.get("web-player.episode.description"),sentenceCase:!0,active:s===gt.DESCRIPTION,onClick:()=>{const e=r.tabsFactory().descriptionTabButtonFactory().hitUiReveal();a.logInteraction(e),o(gt.DESCRIPTION)},className:h()(He,{[Pe]:s===gt.DESCRIPTION})}),(0,B.jsx)(mt.Y,{label:c.Ru.get("web-player.episode.transcript"),sentenceCase:!0,disabled:null===e,active:s===gt.TRANSCRIPT,onClick:()=>{const e=r.tabsFactory().transcriptTabButtonFactory().hitUiReveal();a.logInteraction(e),o(gt.TRANSCRIPT)},className:h()(He,{[Pe]:s===gt.TRANSCRIPT})})]}),children:null===e||s===gt.DESCRIPTION?t:i})}));var vt=i(56865),yt=i(80913);const bt=(0,n.memo)((function({transcriptSections:e,onTimeStampClick:t,episodeUri:i}){const{spec:n,logger:r}=(0,Ee.r)(vt.c,{data:{uri:i}}),{isPlaying:a}=(0,j.P)({uri:i},{featureIdentifier:"episode"}),s=n.timestampLinkFactory();return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{className:je,children:(0,B.jsx)(it.E,{variant:"bodySmall",semanticColor:"textBase",children:c.Ru.get("web-player.episode.transcript.disclaimer")})}),e.map(((e,n)=>{const o=`transcript-section-${n}`;return(0,B.jsxs)("div",{className:Le,children:[(0,B.jsx)("button",{className:De,onClick:()=>{t(e.startMs,o),r.logInteraction(a?s.hitSeekToTime({msToSeekTo:e.startMs}):s.hitPlay({itemToBePlayed:i}))},children:(0,B.jsx)(C.k,{id:o,targetURI:(0,l.o_)(i),fadeOut:!0,children:(0,B.jsx)(it.E,{variant:"marginalBold",semanticColor:"textSubdued",className:Me,children:(0,yt.f)(e.startMs)})})}),e.content.map(((e,t)=>(0,B.jsx)(it.E,{variant:"bodySmall",semanticColor:"textBase",className:Ue,dir:"auto",children:e},`transcript-text-${t}`)))]},o)}))]})}));var _t=i(89661),Et=i(94500),Ct=i(55665),xt=i(84401),St=i(71801),At=i(84075),Tt=i(41609),It=i(84537),Nt=i(96849),wt=i(40009),Rt=i(69905),kt=i(92421),Ot=i(81783),Pt=i(8159),Lt=i(80851),jt=i(78560),Dt=i(45346),Mt=i(85513),Ut=i(76748);const Bt=({children:e,index:t,ariaRowIndex:i,onTriggerPlay:r,isActive:a,uri:s,spec:o})=>{const l=(0,_e.s)(),{pushPopSelected:c,toggleSelected:u,isSelected:d}=(0,n.useContext)(jt.m),m=(0,n.useRef)(null),p=(0,Dt.W)(),g=(0,Pt.YQ)((e=>{p({intent:"play",type:"double-click"});const t=l.logInteraction(o.doubleHitPlay({itemToBePlayed:s}));r(e,t)}),Mt.d,{leading:!0,trailing:!1}),f=(0,n.useCallback)((e=>{u(t,e.shiftKey,e.ctrlKey||e.metaKey)}),[u,t]),v=(0,n.useCallback)((e=>{if(!m.current?.contains(e.target))return;const i="ArrowUp"===e.key?-1:1;["ArrowUp","ArrowDown"].includes(e.key)&&(e.shiftKey?c(t,i):u(t+i,!1,!1))}),[c,u,t]),y=d(t),b=y&&d(t-1),_=y&&d(t+1);return(0,B.jsx)(Lt.$,{rowIndex:i,"aria-selected":y,children:(0,B.jsx)("div",{"":"tracklist-row",className:h()(Ut.A.trackListRow,Ut.A.trackListRowGrid,{[Ut.A.active]:a,[Ut.A.selected]:y,[Ut.A.isPreviousRowSelected]:b,[Ut.A.isNextRowSelected]:_}),onDoubleClick:g,onClick:f,onKeyDown:v,ref:m,children:e})})};var Ft=i(79745);const Ht=({uri:e,title:t="",index:i,subtitle:r="",showName:a="",showUri:s="",duration:o=0,start:l,stop:u})=>{const{isActive:d,isPlaying:m,onClick:p}=(0,Ft.L)({episodeUri:e,start:l,stop:u}),h=(0,n.useCallback)(((e,t)=>{p(t)}),[p]),{spec:g}=(0,Ee.r)(Ct.i,{data:{position:i,reason:"",uri:e}});return(0,B.jsx)(P.pZ,{value:"row",index:i,children:(0,B.jsxs)(Bt,{index:i,ariaRowIndex:i+1,onTriggerPlay:h,isActive:d,spec:g,uri:e,children:[(0,B.jsxs)(wt.U,{ariaColIndex:0,children:[(0,B.jsx)(Tt.$,{uri:e,playAriaLabel:c.Ru.get("tracklist.a11y.play",r,a),onClick:h,isPlaying:m,isActive:d,spec:g,children:(0,B.jsx)(It.a,{children:(0,B.jsx)(Et.M,{className:Ut.A.talkIcon,"aria-hidden":!0})})}),(0,B.jsxs)(At.l,{children:[(0,B.jsx)(Ot.p,{titleText:t,children:t}),(0,B.jsx)(kt.p,{children:r})]})]}),(0,B.jsx)(Rt.o,{ariaColIndex:1,children:(0,B.jsx)(xt.g,{uri:s,name:a,spec:g,children:(0,B.jsx)("span",{dir:"auto",children:a})})}),(0,B.jsx)(Nt.l,{ariaColIndex:2,children:(0,B.jsx)(St.P,{duration:o,className:Ut.A.talkSegmentDuration})})]})})};var Vt=i(45546),Gt=i(46288),zt=i(64981),Wt=i(48100),Kt=i(15739),Yt=i(72445),qt=i(98912),Zt=i(12274);const $t="HRApv65revEcL42QzRjJ",Qt="HbJqPqSmOY5H3lLnQVzD",Jt="DBcCnhHVt7coNqp3wMB4",Xt=({episodeUri:e,index:t,duration:i,start:r,stop:a,name:s,uri:o,artists:l,album:u,playable:d})=>{const{isActive:m,isPlaying:p,onClick:h}=(0,Ft.L)({episodeUri:e,start:r,stop:a}),g=(0,n.useCallback)(((e,t)=>{h(t)}),[h]),{spec:f}=(0,Ee.r)(Ct.i,{data:{position:t,reason:"",uri:o}});return(0,B.jsx)(P.pZ,{value:"row",index:t,children:(0,B.jsx)(zt.t,{trigger:"right-click",action:"open",menu:(0,B.jsx)(Wt.P,{uri:o}),children:(0,B.jsxs)(qt.w,{uri:o,index:t,ariaRowIndex:t+1,dragMetadata:{name:s,createdBy:l?.[0].name??""},onTriggerPlay:g,isActive:m,isPlayable:d,spec:f,children:[(0,B.jsxs)(wt.U,{ariaColIndex:0,children:[(0,B.jsx)(Tt.$,{uri:o,playAriaLabel:c.Ru.get("tracklist.a11y.play",s,l?.[0].name),onClick:g,isPlaying:p,isActive:m,spec:f,children:(0,B.jsx)(It.a,{children:(0,B.jsx)("img",{className:Qt,src:u.image,alt:u.name})})}),(0,B.jsxs)(At.l,{children:[(0,B.jsx)(Ot.p,{titleText:s,children:s}),(0,B.jsx)(kt.p,{children:(0,B.jsx)(Kt.l,{artists:l,spec:f})})]})]}),(0,B.jsx)(Rt.o,{ariaColIndex:1,children:(0,B.jsx)(xt.g,{uri:u.uri,name:u.name,spec:f,children:u.name})}),(0,B.jsxs)(Nt.l,{ariaColIndex:2,children:[(0,B.jsx)(Zt.d,{uri:o,spec:f}),(0,B.jsx)(St.P,{duration:i}),(0,B.jsx)(Yt.Y,{spec:f,menu:(0,B.jsx)(Wt.P,{uri:o,artists:l}),label:c.Ru.get("more.label.track",s,l?.[0].name)})]})]})})})};var ei=i(39516),ti=i(36485);function ii(e,t,i){return e.reduce(((e,n,r)=>((r>0||t>0)&&e.push({type:"SPACER",id:`spacer-${e.length}`}),"MUSIC"===n.type?e.push(function(e,t,i){return{type:"MUSIC",index:t,uri:i.uri,episodeUri:e,start:i.start,stop:i.stop,duration:i.duration,name:i.track.name,artists:i.track.artists,album:i.track.album,playable:i.track.playable}}(i,r,n)):"TALK"===n.type&&e.push(function(e,t,i){return{type:"TALK",index:t,uri:e,title:i.title,subtitle:i.subtitle,start:i.start,stop:i.stop,duration:i.duration,showUri:i.show.uri,showName:i.show.name}}(i,r,n)),e)),[])}const ni=({uri:e,segmentCount:t})=>{const i=(0,ei.o)(),r=(0,n.useCallback)((async(n,r)=>{const a=Math.ceil(n/2);try{return{items:ii(await i.getSegments(e,a,r),a,e),totalLength:2*t-1}}catch(e){return{items:[],totalLength:0}}}),[t,i,e]),a=(0,n.useCallback)((t=>{switch(t.type){case"SPACER":return(0,B.jsx)("div",{className:Jt},t.id);case"MUSIC":return(0,B.jsx)(Xt,{...t},`${e}-${t.index}`);case"TALK":return(0,B.jsx)(Ht,{...t},`${e}-${t.index}`);default:return(0,ti.d)(t)}}),[e]),s=(0,n.useCallback)((e=>({uri:"MUSIC"===e.type?e.uri:""})),[]),o=c.Ru.get("music_and_talk.in_this_episode");return(0,B.jsxs)("div",{children:[(0,B.jsx)(it.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:$t,children:o}),(0,B.jsx)(Vt.S4,{ariaLabel:o,hasHeaderRow:!0,rowPlaceholder:_t.qq,columns:[Gt.$.TITLE_AND_ARTIST,Gt.$.ALBUM_OR_SHOW,Gt.$.DURATION],renderRow:a,fetchTracks:r,resolveItem:s,limit:50,nrTracks:2*t-1,testID:"music-and-talk-tracklist"})]})};var ri=i(73039),ai=i(17869);const si=({areHTMLDescriptionsEnabled:e,contentInformation:t,description:i,hasDescription:r,hasMusicAndTalkSegements:a,htmlDescription:s,onExpanded:o,onDescriptionTimestampClick:l,onTranscriptTimestampClick:u,playability:d,segmentCount:m,showUrl:p,transcript:h,uri:g,spec:f})=>{const v=(0,_e.s)(),y=(0,n.useMemo)((()=>f.descriptionSectionFactory()),[f]),b=(0,n.useMemo)((()=>y.trackListFactory()),[y]),[_,E]=(0,n.useState)(null),C=(0,n.useCallback)((async e=>{const t=await(0,ri.Q)(e);E(t)}),[]);(0,n.useEffect)((()=>{h&&h.length>0&&C(h[0].cdnUrl)}),[C,h]);const x=n=>(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(lt,{hasDescription:r,contentInformation:t,onTimeStampClick:l,onExpanded:o,description:i,areHTMLDescriptionsEnabled:e,htmlDescription:s,playability:d,showHeader:n,spec:y}),a&&(0,B.jsx)(ai.r,{spec:b,children:(0,B.jsx)(ni,{segmentCount:m,uri:g})}),p&&(0,B.jsx)(Ge.n,{size:"small",className:Ie,href:p,component:tt.v,onClick:()=>{v.logInteraction(y.allEpisodesLinkFactory().hitUiNavigate({destination:p}))},children:c.Ru.get("episode.see_all_episodes")}),(0,B.jsx)(et,{uri:g})]}),S=h&&h?.length>0&&d.playable;return(0,B.jsx)(B.Fragment,{children:S?(0,B.jsx)(ft,{transcriptSections:_,descriptionContent:x(!1),transcriptContent:(0,B.jsx)(bt,{transcriptSections:_||[],onTimeStampClick:u,episodeUri:g}),spec:f}):x(!0)})};var oi=i(82442),li=i(64572),ci=i(74793),ui=i(59116),di=i(21752),mi=i(32572),pi=i(79056),hi=i(67325),gi=i(55194),fi=i(59996),vi=i(82455),yi=i(67464),bi=i(89942),_i=i(32994);const Ei=({coverArt:e,name:t})=>{const i=(0,L.y)(),n=i===_i.E.SMALL||i===_i.E.XSMALL;return(0,B.jsx)(yi.b,{images:e,type:V.c.EPISODE,shape:yi.u.ROUNDED_CORNERS,title:t,size:n?bi.Qe.SIZE_20:bi.Qe.SIZE_24,className:we})};const Ci=({episode:e,isFullyPlayed:t,setIsFullyPlayed:i,backgroundColor:r,spec:a})=>{const{uri:s,name:o,sharingInfo:u,playedState:d,episodeType:m,releaseDate:p,coverArt:h}=e,g=(0,_e.s)(),f=function(e,t,i,n,r){const a=t===M.I_.Episode;return(0,vi.hD)(e,n,i,r)?(0,B.jsx)(vi.Ih,{isMusicAndTalk:a}):a?c.Ru.get("type.showEpisode"):c.Ru.get("type.podcastEpisode")}(s,m||M.I_.Unknown,d.playPositionMilliseconds,ge(p?.isoString),d.state===M._w.Completed),v=e.podcast?.uri,y=function(e){const t=(0,l.o_)(e);return`/show/${(0,l.cE)(t?.id||"")}`}(v),b=(0,n.useCallback)((()=>{g.logInteraction(a.podcastLinkFactory().hitUiNavigate({destination:y}))}),[g,y,a]),_=e.podcast?.coverArt,E=!!(_&&_.length===h.length&&h.every(((e,t)=>e.url===_[t].url))),C=(0,B.jsx)(S.b,{uri:s,sharingInfo:u,showUri:v,contextUri:s,isPlayed:t,onMarkAsPlayed:i});return(0,B.jsxs)(oi.z,{backgroundColor:r,children:[(0,B.jsx)(ui.h,{children:(0,B.jsx)(x.h,{menu:C,children:(0,B.jsx)(di.X,{text:o,dragUri:s,dragLabel:o})})}),!E&&(0,B.jsx)(li.X,{children:(0,B.jsx)(x.h,{menu:C,children:(0,B.jsx)(mi.b,{loading:"eager",name:o,images:h,placeholderType:"episode",shape:mi.u.SQUARE})})}),(0,B.jsxs)(ci.Y,{children:[(0,B.jsx)(pi.B,{children:f}),(0,B.jsx)(x.h,{menu:C,children:(0,B.jsx)(gi.mm,{dragUri:s,dragLabel:o,scaleAtMinWidth:gi.tw,className:Se,children:(0,B.jsx)("span",{"":"episodeTitle",children:o})})}),(0,B.jsx)(x.h,{menu:C,children:(0,B.jsxs)(fi.N,{to:y,onClick:b,className:Re,children:[E&&(0,B.jsx)(Ei,{name:o,coverArt:h}),(0,B.jsx)(hi.g,{children:(0,B.jsx)("span",{"":"showTitle",children:e.podcast?.name})})]})})]})]})};var xi=i(15891),Si=i(32620),Ai=i(83172),Ti=i(15597);var Ii=i(52608),Ni=i(73751),wi=i(99744),Ri=i(85993),ki=i(35818),Oi=i(94901),Pi=i(56376);const Li=({episode:e})=>{const{uri:t,episodeType:i,description:a,htmlDescription:o,podcastSubscription:c,segmentsCount:p,podcast:h,contentInformation:g,playedState:f,coverArt:v}=e,{spec:y,logger:b}=(0,Ee.r)(s.g,{data:{uri:t}}),E=(0,Ii.n)(),C=(0,n.useMemo)((()=>y.headerFactory()),[y]),x=(0,n.useMemo)((()=>y.actionBarFactory()),[y]),[S,A]=(0,n.useState)(f.state===M._w.Completed),T=(0,wi.z)(),I=(0,Dt.W)(),N=void 0!==p&&p>0,k=(0,w.V)(),{triggerPlay:O,togglePlay:P,isActive:L}=(0,j.P)({uri:t,...E?{}:{pages:[{items:[{type:V.c.EPISODE,uri:t,uid:null,provider:null}]}]}},{featureIdentifier:"episode"}),{isActive:D,isPlaying:U}=(0,Ri.te)(t),F=v[0].url,H=(0,Ni.H)(F||null),G=(0,be.o)((e=>e?.isPaused??void 0)),z=(0,me.c)(),W=c.isPaywalled&&!c.isUserSubscribed,K=D||L,Y=e?{name:e.name,uri:e.uri,mediaTypes:e.mediaTypes,audio:{items:e.audio.items.map((e=>({url:e.url})))}}:null,q=h?{name:h.name,uri:h.uri,trailer:h.trailer,showTypes:h.showTypes}:null,Z=(0,R.C)(Y,q),$=(0,n.useCallback)(((e,n,r,a)=>{const s=()=>{G?(a?.("resume"),T.resume()):(a?.("pause"),T.pause())};if(W)return;let o="play";if(!U||0!==e&&n||(o="pause"),I({intent:o,targetUri:t,type:"click",itemIdSuffix:e>0?"podcast-description-timestamp":"button"}),i===M.I_.Episode&&z)d.h.set((()=>({triggerId:r||pe,triggerAction:null})));else if(L&&!n)k?s():P({loggingParams:a?.()});else if(D&&!n)s();else{const t=a?.("play");k?Z({seekTo:e,loggingParams:t}):O({seekTo:e,loggingParams:t})}}),[W,U,I,t,i,z,D,L,k,G,T,P,Z,O]),Q=(0,n.useCallback)((e=>{$(e,!1,void 0,(e=>{const i=y.actionBarFactory().playButtonFactory();let n;return n="pause"===e||U?i.hitPause({itemToBePaused:t}):"resume"===e||K?i.hitResume({itemToBeResumed:t}):i.hitPlay({itemToBePlayed:t}),b.logInteraction(n)}))}),[$,K,U,b,y,t]),X=(0,n.useCallback)((e=>{$(e,!0,void 0,(()=>b.logInteraction(y.descriptionSectionFactory().timestampLinkFactory().hitPlay({itemToBePlayed:t}))))}),[$,b,y,t]),te=(0,n.useCallback)(((e,t)=>{$(e,!0,t)}),[$]),ie=(0,n.useCallback)((()=>{I({intent:"expand-description",type:"click"})}),[I]),[ne,re]=(0,r.ok)();(0,n.useEffect)((()=>{if(e&&!K&&ne.has("t")){const t=ne.get("t")||"0",i=1e3*parseInt(t,10);i<=e.duration.milliseconds&&(ne.delete("t"),re(ne,{replace:!0}),$(i,!0))}}),[e,$,K,ne,re]);const ae=!!a||!!o,se=e.podcast?.uri,oe=(0,l.o_)(se)?.toURLPath(!0),le=(0,m.r)();return(e=>{const t=(0,_.wA)(),i=(0,me.c)(),r=(0,_.d4)(Ti.u);(0,n.useEffect)((()=>{i&&e!==r&&t((0,Ai.SC)(e))}),[e,r,t,i])})(t),(0,B.jsxs)("section",{"":"episode",className:xe,children:[(0,B.jsx)(u.Q,{children:(0,Pi.L$)({episodeOrChapterName:e.name,showOrAudiobookName:e.podcast?.name??"",type:"Podcast"})}),(0,B.jsx)(ee.c,{artistOrShow:e.podcast?.name,title:e.name,uri:t,entityType:ee.p.EPISODE}),(0,B.jsx)(Ci,{episode:e,isFullyPlayed:S,setIsFullyPlayed:A,backgroundColor:H,spec:C}),(0,B.jsx)(Ve,{episode:e,onPlayEpisode:Q,isPlaying:U,isActive:K,isFullyPlayed:S,setIsFullyPlayed:A,backgroundColor:H,isLocked:W,spec:x}),(0,B.jsxs)("div",{className:"contentSpacing",children:[(0,B.jsx)(si,{transcript:e.transcript,hasDescription:ae,contentInformation:g,onDescriptionTimestampClick:X,onTranscriptTimestampClick:te,onExpanded:ie,description:e.description,areHTMLDescriptionsEnabled:!0,htmlDescription:e.htmlDescription,playability:e.playability,hasMusicAndTalkSegements:N,segmentCount:p,uri:e.uri,showUrl:oe,spec:y}),le&&(0,B.jsx)(J,{uri:t})]})]})},ji=n.memo((function(){const{episodeId:e=""}=(0,a.g)(),t=(0,l.iM)(e).toURI(),i=(0,ki.d)(t);return i?.isError||!i?.episodeOrChapter?(0,B.jsx)(X.A,{hasError:i?.isError||!1,errorMessage:c.Ru.get("error.not_found.title.podcast")}):(0,Oi.Gr)(i.episodeOrChapter)?(0,B.jsx)(xi.$,{to:(0,l.o_)(i.episodeOrChapter.book?.uri).toURLPath(!0)}):(0,B.jsx)(n.Suspense,{fallback:null,children:(0,B.jsx)(Si.u,{pageId:o.$h.PODCAST_EPISODE,uri:t,children:(0,B.jsx)(Li,{episode:i.episodeOrChapter})})})})),Di=n.memo((function(){const{episodeId:e=""}=(0,a.g)(),t=(e=>`spotify:episode:${e}`)(e);return(0,B.jsxs)("div",{className:"contentSpacing",children:[(0,B.jsx)(u.Q,{children:c.Ru.get("internal-link-recommender.more-episodes-like-this")}),(0,B.jsx)(J,{uri:t,isFullPage:!0})]})}))},75296:(e,t,i)=>{"use strict";i.d(t,{X:()=>a.X,K:()=>r});var n=i(9183);function r(e){const{search:t}=(0,n.zy)();return new URLSearchParams(t).get("feature-activation")===e}var a=i(99109)},99109:(e,t,i)=>{"use strict";i.d(t,{X:()=>n});let n=function(e){return e.SmartShuffle="smart-shuffle",e.GroupSessions="group-sessions",e.Blend="blend",e.CollaborativePlaylists="collaborative-playlists",e.Dj="dj",e.VeryHighQualityAudio="very-high-quality-audio",e.LiveEvents="live-events",e}({})},62413:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(81987),r=i(19159);const a=()=>{const e=(0,n.NC)(r.ttb);return e===r.ufd.HOME_NEXT_TO_NAVIGATION||e===r.ufd.HOME_NEXT_TO_SEARCH}},17534:(e,t,i)=>{"use strict";i.d(t,{B8:()=>c,FE:()=>d,U3:()=>l,W3:()=>u});var n=i(15742),r=i(8385);const a=Spicetify.GraphQL.Definitions["home"]=new n.l("home","query","57387f1ed8b24037d22a086fe8dcd9623ce38a21bf397ef934a064d722b4cc5f",null),s=Spicetify.GraphQL.Definitions["homeFeedChips"]=new n.l("homeFeedChips","query","57387f1ed8b24037d22a086fe8dcd9623ce38a21bf397ef934a064d722b4cc5f",null),o=Spicetify.GraphQL.Definitions["homeSubfeed"]=new n.l("homeSubfeed","query","57387f1ed8b24037d22a086fe8dcd9623ce38a21bf397ef934a064d722b4cc5f",null),l=Spicetify.GraphQL.Definitions["homeSection"]=new n.l("homeSection","query","57387f1ed8b24037d22a086fe8dcd9623ce38a21bf397ef934a064d722b4cc5f",null),c=(e,t)=>(0,r.I)(a,e,t),u=(e,t)=>(0,r.I)(s,e,t),d=(e,t)=>(0,r.I)(o,e,t)},5492:(e,t,i)=>{"use strict";i.d(t,{Uk:()=>d,b1:()=>p,f0:()=>u,o8:()=>c,yr:()=>h});var n=i(61544),r=i(12811),a=i(52471),s=i(79787),o=i(36485);function l(e){return{url:e.url,width:e.width,height:e.height}}function c(e){if("Episode"===e.__typename){const t=e.podcastV2.data;return"Podcast"!==t.__typename?[]:t.coverArt?.sources.map(l)??[]}return[]}function u(e){switch(e.__typename){case"Artist":return e.visuals.avatarImage?.sources.map(l)??[];case"Album":case"Audiobook":case"Podcast":case"Episode":case"Chapter":return e.coverArt?.sources.map(l)??[];case"Track":return e.albumOfTrack?.coverArt?.sources.map(l)??[];case"Playlist":return e.images.items[0]?.sources.map(l)??[];case"User":return e.avatar?.sources.map(l)??[];case"GenericError":case"NotFound":case"RestrictedContent":case"DiscoveryFeed":return[];default:return(0,o.k)(e),[]}}function d(e){switch(e.__typename){case"Artist":return(0,a.m)(e.visuals.avatarImage?.extractedColors);case"Album":case"Audiobook":case"Podcast":case"Episode":case"Chapter":return(0,a.m)(e.coverArt?.extractedColors);case"Track":return(0,a.m)(e.albumOfTrack?.coverArt?.extractedColors);case"Playlist":return(0,a.m)(e.images.items[0]?.extractedColors);case"User":return(0,a.m)(e.avatar?.extractedColors);case"GenericError":case"NotFound":case"RestrictedContent":case"DiscoveryFeed":return;default:return void(0,o.k)(e)}}function m(e){return{uri:e??"",name:"",images:[],error:!0}}function p(e){const t=function(e){if("UnknownType"===e.content.__typename){const t=(0,n.o_)(e.uri);if((0,n.Z0)(e.uri)||t?.id===n.NQ.COLLECTION)return e.uri.endsWith("your-episodes")?(0,r.n5)(t?.username):e.uri.endsWith("local-files")?(0,r.Iu)():(0,r.$R)(t?.username)}return null}(e);return null!==t?t:function(e){if(null===e||"UnknownType"===e.content.__typename||"PromotionResponseWrapper"===e.content.__typename||"ConcertV2ResponseWrapper"===e.content.__typename)return m(e?.uri??null);const t=e.content.data;if(!t)return m(e?.uri??null);switch(t.__typename){case"Artist":return{uri:e.uri,name:t.profile.name??"",images:u(t)};case"Album":case"Audiobook":case"Podcast":case"Track":case"User":return{uri:e.uri,name:t.name??"",images:u(t)};case"Playlist":return{uri:e.uri,name:t.name??"",images:u(t),formatListAttributes:t.attributes??[]};case"Episode":return{uri:e.uri,name:t.name??"",images:u(t),release_date:t.releaseDate?.isoString,resume_point:{resume_position_ms:t.playedState.playPositionMilliseconds,fully_played:t.playedState.state===s._w.Completed},podcast:"Podcast"===t.podcastV2.data.__typename?{uri:t.podcastV2.data.uri,name:t.podcastV2.data.name,images:u(t.podcastV2.data)}:void 0,duration_ms:t.duration.totalMilliseconds};case"Chapter":return"Audiobook"===t.audiobookV2.data.__typename?{uri:t.audiobookV2.data.uri,name:t.audiobookV2.data.name??"",images:u(t.audiobookV2.data)}:{uri:e.uri,name:t.name??"",images:u(t)};case"GenericError":case"NotFound":case"RestrictedContent":case"DiscoveryFeed":return m(e.uri);default:return(0,o.k)(t),m(e?.uri??null)}}(e)}function h(e){return function(e){if(!e||"UnknownTypeWrapper"===e.__typename)return m(e?._uri??null);if("GenreResponseWrapper"===e.__typename||"ConcertResponseWrapper"===e.__typename||"MerchResponseWrapper"===e.__typename||"PreReleaseResponseWrapper"===e.__typename)return m(null);const t=e?.data;switch(t.__typename){case"Artist":return{uri:t.uri,name:t.profile.name??"",images:u(t)};case"Album":case"Audiobook":case"Podcast":case"Track":case"User":return{uri:t.uri,name:t.name??"",images:u(t)};case"Playlist":return{uri:t.uri,name:t.name??"",images:u(t),formatListAttributes:t.attributes??[]};case"Episode":return{uri:t.uri,name:t.name??"",images:u(t),release_date:t.releaseDate?.isoString,resume_point:{resume_position_ms:t.playedState.playPositionMilliseconds,fully_played:t.playedState.state===s._w.Completed},podcast:"Podcast"===t.podcastV2.data.__typename?{uri:t.podcastV2.data.uri,name:t.podcastV2.data.name,images:u(t.podcastV2.data)}:void 0,duration_ms:t.duration.totalMilliseconds};case"Chapter":return"Audiobook"===t.audiobookV2.data.__typename?{uri:t.audiobookV2.data.uri,name:t.audiobookV2.data.name??"",images:u(t.audiobookV2.data)}:{uri:t.uri,name:t.name??"",images:u(t)};case"GenericError":case"NotFound":case"RestrictedContent":return m(null);default:return(0,o.k)(t),m(null)}}(e)}},23342:(e,t,i)=>{"use strict";function n(e,t){return{...e,data:t}}i.d(t,{M:()=>n})},95534:(e,t,i)=>{"use strict";function n(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone??""}i.d(t,{Ff:()=>n,gO:()=>r,jl:()=>a});const r=18e5,a=3e5},94010:(e,t,i)=>{"use strict";i.d(t,{y:()=>u});var n=i(30758),r=i(45879),a=i(75208),s=i(60674),o=i(25650),l=i(75235),c=i(36485);a.sQ.MIN,a.sQ.MAX;const u=()=>{const{ylxSidebarState:e,setYlxSidebarState:t,canCollapse:i,canExpand:u}=(0,s.$)(),[d,m]=(0,l.x)("ylx-default-state-nav-bar-width",Math.max(a.ZU.DEFAULT_MIN,Math.min(Math.round(.23*innerWidth),a.ZU.DEFAULT_MAX))),[p,h]=(0,l.x)("ylx-expanded-state-nav-bar-width",Math.max(a.ZU.EXPANDED_MIN,Math.min(Math.round(.55*innerWidth),a.ZU.EXPANDED_MAX)));let g;switch(e){case s.fX.COLLAPSED:g=a.ZU.COLLAPSED;break;case s.fX.DEFAULT:g=d;break;case s.fX.EXPANDED:g=p;break;case null:g=d;break;default:(0,c.k)(e),g=d}const f=(0,n.useCallback)((e=>{e<a.ZU.DEFAULT_MIN?t(s.fX.COLLAPSED):a.ZU.DEFAULT_MIN<=e&&e<=a.ZU.DEFAULT_MAX?(t(s.fX.DEFAULT),m(e)):a.ZU.EXPANDED_MIN<=e&&e<=a.ZU.EXPANDED_MAX?(t(s.fX.EXPANDED),h(e)):console.warn("`LeftSidebar.setSize` call out of bounds")}),[t,m,h]),v=(0,o.H)()-r.ev-3*r.KV,y=(0,n.useMemo)((()=>[...i?[[a.ZU.COLLAPSED,a.ZU.COLLAPSED]]:[],[a.ZU.DEFAULT_MIN,a.ZU.DEFAULT_MAX],...u?[[a.ZU.EXPANDED_MIN,a.ZU.EXPANDED_MAX]]:[]].map((([e,t])=>[e,Math.min(t,v)]))),[i,u,v]);let b,_;switch(e){case s.fX.COLLAPSED:b=_=a.ZU.COLLAPSED;break;case s.fX.DEFAULT:b=a.ZU.DEFAULT_MIN,_=a.ZU.DEFAULT_MAX;break;case s.fX.EXPANDED:b=a.ZU.EXPANDED_MIN,_=a.ZU.EXPANDED_MAX;break;case null:b=0,_=0;break;default:b=0,_=0,(0,c.k)(e)}return{size:g,setSize:f,minMaxRanges:y,minWidth:b,maxWidth:_,ylxCollapsedStateNavbarWidth:a.ZU.COLLAPSED,ylxDefaultStateNavbarWidth:d,ylxExpandedStateNavbarWidth:p}}},75208:(e,t,i)=>{"use strict";i.d(t,{ZU:()=>n,sQ:()=>r,x9:()=>a});let n=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}({}),r=function(e){return e[e.MIN=120]="MIN",e[e.DEFAULT=232]="DEFAULT",e[e.MAX=384]="MAX",e}({});const a="createPlaylist"},68679:(e,t,i)=>{"use strict";i.d(t,{ZU:()=>n.ZU,x9:()=>n.x9});var n=i(75208)},23361:(e,t,i)=>{"use strict";i.d(t,{y:()=>n.y});var n=i(94010)},73516:(e,t,i)=>{"use strict";i.d(t,{c:()=>o});var n=i(71188),r=i(28275),a=i(72013);const s={[a.nw.ADDED_AT]:r.Sw.ADDED_AT,[a.nw.ADDED_BY]:null,[a.nw.ALBUM]:r.Sw.ALBUM_NAME,[a.nw.ARTIST]:r.Sw.ARTIST_NAME,[a.nw.DURATION]:null,[a.nw.TITLE]:r.Sw.NAME,[a.nw.SHOW_NAME]:null,[a.nw.PUBLISH_DATE]:null},o=e=>{const t=(0,n.Xt)(e);if(!t)return;const i=s[t.field],r=t.order;return i&&r?{field:i,order:r}:void 0}},88146:(e,t,i)=>{"use strict";i.d(t,{o:()=>f});var n=i(11808),r=i(98584),a=i(2977),s=i(80227),o=i(42674),l=i(41978),c=i(12811),u=i(7939),d=i(25326),m=i(49943);var p=i(42582),h=i(86070);const g=({metadata:e,index:t,variant:i})=>{const{isPlaying:o,togglePlay:l}=(0,p.P)({uri:e.uri},{featureIdentifier:"your_library"}),{name:c,images:u}=e;return(0,h.jsx)(r.Z,{variant:i,index:t,delegatePlayback:!0,delegateLogging:!0,isPlaying:o,featureIdentifier:"your_library",onPlay:(e,t)=>l({loggingParams:t}),headerText:c,uri:e.uri,renderCardImage:()=>(0,h.jsx)(a.M,{images:u}),renderSubHeaderContent:()=>(0,h.jsx)(s.c,{children:n.Ru.get("tracklist-header.songs-counter",e.totalLength)})})},f=({index:e,variant:t})=>{const i=function(){const e=(0,d.dB)({offset:0,limit:1}),{user:t}=(0,l.d4)(u.Ht);if(null===e||null===t)return null;const i=(0,c.$R)(t.id);return i?{uri:i.uri,name:i.name,images:i.images,totalLength:e?.totalLength,unfilteredTotalLength:e.unfilteredTotalLength,owner:(0,m.w)(t)}:null}();return i?(0,h.jsx)(g,{metadata:i,index:e,variant:t}):(0,h.jsx)(o.u,{cardImage:(0,h.jsx)(a.M,{images:c.s0}),isLoading:!0,variant:t})}},60791:(e,t,i)=>{"use strict";i.d(t,{H:()=>r,k:()=>n});const n=18e5,r=6e5},57444:(e,t,i)=>{"use strict";i.d(t,{I:()=>y});var n=i(25639),r=i(81987),a=i(61544),s=i(60791),o=i(86171),l=i(98535),c=i(780),u=i(52276),d=i(52893),m=i(73513);function p(e,t,i){const{startTimeMs:n,words:r}=e,a=i[t+1];return{start:n||0,end:a&&a.startTimeMs?a.startTimeMs:1/0,text:r}}function h(e){return d.Q.fromInt(e).toCSS(m.a.RGB)}var g=i(80913),f=i(62943);const v={hasLyrics:!1},y=(e,t)=>{const i=(0,g.h)(t||void 0,{desiredLabel:"large",desiredSize:600})??t?.[0]?.url??"",d=(0,l.X)(),m=(0,r.NC)(f.Tc,{loadingValue:f.LZ.CONTROL}),y={[f.LZ.CONTROL]:void 0,[f.LZ.SYSTEM_LANGUAGE]:navigator.language,[f.LZ.ALL_LANGUAGES]:"all"}[m],b=["lyrics",{uri:e,image:i,vocalRemoval:d}],{hasLyrics:_,isLoading:E}=(0,o.f)(e),{data:C,isLoading:x,isError:S}=(0,n.I)({queryKey:b,queryFn:async()=>{if(!e||!i||!(0,a.U_)(e))return v;const t=await async function(e,t,i,n){try{const s=await(0,c.S)(e,t,i,n);return{hasLyrics:!0,isTimeSynced:(a=s.lyrics.syncType,"LINE_SYNCED"===a||"SYLLABLE_SYNCED"===a),syncType:s.lyrics.syncType,lyrics:s.lyrics.lines.map(p),colors:(r=s.colors,{text:h(r.text),activeText:h(r.highlightText),background:h(r.background)}),provider:s.lyrics.provider,providerDisplayName:s.lyrics.providerDisplayName,providerLyricsId:s.lyrics.providerLyricsId,hasVocalRemoval:s.hasVocalRemoval??!1,showUpsell:s.lyrics.showUpsell??!1,alternatives:s.lyrics.alternatives}}catch(e){if(e instanceof u.O&&404===e.status)return{hasLyrics:!1};throw e}var r,a}(e,i,d,y);return t},gcTime:s.k,staleTime:s.H,enabled:_}),A=E||x;let T=null;return A||(T=_?C??null:v),{data:T,loading:A,error:S}}},86171:(e,t,i)=>{"use strict";i.d(t,{f:()=>u});var n=i(25639),r=i(58717),a=i(81987),s=i(61544),o=i(60791),l=i(780),c=i(19159);const u=e=>{const t=!!e&&(0,s.U_)(e),i=(0,a.NC)(c.s6w)&&t,{data:u,isLoading:d}=(0,n.I)({queryKey:["useLyricsAvailability",e],queryFn:async()=>!!e&&await(0,l.z)(e),gcTime:o.k,staleTime:o.H,enabled:i,placeholderData:r.rX});return{isLoading:d,hasLyrics:!!i&&(u??!1)}}},98535:(e,t,i)=>{"use strict";i.d(t,{X:()=>s});var n=i(81987),r=i(19159),a=i(62283);const s=()=>{const e=(0,a.S)(),{isSupported:t}=e.getCapabilities();return(0,n.NC)(r.OBX,{loadingValue:!1})&&t}},59189:(e,t,i)=>{"use strict";i.d(t,{Bg:()=>n,gL:()=>a,gh:()=>r});let n=function(e){return e.SET_LYRICS_MODE="SET_LYRICS_MODE",e.SET_LYRICS_TRANSLATION_LANGUAGE="SET_LYRICS_ALTERNATIVE_LANGUAGE",e}({});const r=e=>({type:n.SET_LYRICS_MODE,mode:e}),a=e=>({type:n.SET_LYRICS_TRANSLATION_LANGUAGE,language:e})},75560:(e,t,i)=>{"use strict";i.d(t,{s:()=>r,u:()=>n});const n=e=>e.ui.lyrics.mode,r=e=>e.ui.lyrics.translationLanguage},780:(e,t,i)=>{"use strict";i.d(t,{S:()=>s,z:()=>o});var n=i(61544),r=i(40312),a=i(38481);const s=async(e,t,i,s)=>{const o=(0,n.o_)(e).id,l=r.n.getInstance(),c={format:"json",vocalRemoval:i};s&&(c.clientLanguage=s);return(await l.build().withHost(a.Hj).withPath(`/track/${encodeURIComponent(o)}/image/${encodeURIComponent(t)}`).withQueryParameters(c).withEndpointIdentifier("/track/{trackId}").send()).body},o=async e=>{const t=(0,n.Y8)((0,n.o_)(e)?.id);if(!t)return!1;const i=r.n.getInstance(),s=await i.build().withHost(a.XE).withPath(`/track/${encodeURIComponent(t)}`).withEndpointIdentifier("/track/{trackId}").send();return s.body?.has_lyrics||!1}},32046:(e,t,i)=>{"use strict";i.d(t,{e:()=>d});var n=i(9183),r=i(39191),a=i(80801),s=i(30758),o=i(49141);var l=i(84844),c=i(86070);const u=({children:e,navigationalRoot:t,pageId:i,entityUri:u})=>{const d=(0,r.H)(),m=t??d,p=(0,n.zy)();return function({pageId:e,navigationalRoot:t,entityUri:i}){const n=(0,r.u)(),a=(0,o.S)().isOpen;(0,s.useEffect)((()=>{n&&e&&!a&&n.reportPageView({pageId:e,navigationalRoot:t,entityUri:i})}),[e,n,t,i,a])}({pageId:i,navigationalRoot:m,entityUri:(0,l.y)(u??p.pathname)}),(0,c.jsx)(a.z,{value:m,children:e})};function d({children:e,pageId:t,navigationalRoot:i,entityUri:n}){return(0,c.jsx)(u,{navigationalRoot:i,pageId:t,entityUri:n,children:e})}},15891:(e,t,i)=>{"use strict";i.d(t,{$:()=>l});var n=i(9183),r=i(35736),a=i(79303),s=i(84844);var o=i(86070);const l=({to:e,state:t})=>{const i=(0,n.g)(),l=function(){const e=(0,n.zy)(),t=(0,a.s)(),i=e.state?.interactionId;return i??t.getInteractionId((0,s.y)(e.pathname))}();return"string"==typeof e?(0,o.jsx)(n.C5,{to:(0,r.tW)(e,i),state:{...t,interactionId:l},replace:!0}):(0,o.jsx)(n.C5,{to:{...e,pathname:(0,r.tW)(e.pathname,i)},state:{...t,interactionId:l},replace:!0})}},36321:(e,t,i)=>{"use strict";i.d(t,{r:()=>u});var n=i(11808),r=i(63135),a=i(82101),s=i(95421),o=i(95339),l=i(46159),c=i(36485);function u(e){if((0,o.v)(e)||(0,l.v)(e)){let t=e.name;const i=e.artists.map((e=>e.name)).join(n.Ru.getSeparator());return i&&(t=`${t} • ${i} `),t}return(0,s.p)(e)?`${e.name} • ${e.show.name}`:(0,a.d)(e)||(0,r.N)(e)?(console.error(e.uri,"is not draggable"),""):(0,c.d)(e)}},32753:(e,t,i)=>{"use strict";i.d(t,{P:()=>d,X:()=>u});var n=i(11808),r=i(63135),a=i(82101),s=i(95421),o=i(95339),l=i(46159),c=i(36485);function u(e){return(0,o.v)(e)?n.Ru.get("playback-control.now-playing-label",e.name,e.artists.map((({name:e})=>e)).join(n.Ru.getSeparator())):(0,s.p)(e)?n.Ru.get("playback-control.now-playing-label",e.name,e.show.name):(0,a.d)(e)?n.Ru.get("playback-control.now-playing-label",e.name,e.book.name):(0,r.N)(e)?n.Ru.get("ad-formats.advertisement"):(0,l.v)(e)?void 0:(0,c.d)(e)}function d(e){let t=u(e);return t||(t=n.Ru.get("queue.now-playing")),t}},9829:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});const n=e=>{const t=e?.metadata?.["dislike-endpoint"]??null;return{dislikeEndpoint:t,shouldShowFeedbackControls:"1"===e?.metadata?.["dislike-feedback-available"]&&null!==t}}},99307:(e,t,i)=>{"use strict";i.d(t,{L:()=>s});var n=i(2435),r=i(10132);function a(e,t){return null===e||null===t?e===t:e.context.uri===t.context.uri&&e.item?.uri===t.item?.uri&&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 s(){const e=(0,n.o)((e=>e),a);if(null===e)return null;const{context:t,item:i,index:r}=e;return null===i?null:{context:t,item:i,index:r}}},24241:(e,t,i)=>{"use strict";i.d(t,{b:()=>n.b});var n=i(54015)},76805:(e,t,i)=>{"use strict";i.d(t,{d:()=>n.d});var n=i(91573)},35149:(e,t,i)=>{"use strict";i.d(t,{W:()=>n.W});var n=i(80243)},10354:(e,t,i)=>{"use strict";i.d(t,{e:()=>_});var n=i(30758),r=i(61544),a=i(56105),s=i(59996),o=i(32753),l=i(10608),c=i(70583),u=i(48168),d=i(63135),m=i(82101),p=i(95421),h=i(95339),g=i(46159),f=i(36485),v=i(86070);const y=(0,n.lazy)((()=>i.e(3224).then(i.bind(i,43224))));function b(e,t,i){let n=(0,a.H)(e.uri);if((0,l.c0)(n))return null;const s=(0,r.U_)(n),o=n===u.bV,d="queue"===t.provider;(s||d||o)&&((0,h.v)(t)?n=t.album.uri:((0,p.p)(t)||(0,m.d)(t))&&(n=t.uri),o&&(n=c.E3));const g=(0,r.o_)(n);if(null===g)return null;if((0,h.v)(t)||(0,p.p)(t)||(0,m.d)(t)){return{to:g.toURLPath(!0),search:(f={uid:t.uid,uri:t.uri,page:i?.pageIndex??null,pageUri:i?.pageURI??null,index:i?.itemIndex??null,highlight:s?t.uri:null},Object.keys(f).filter((e=>null!==f[e])).map((e=>`${e}=${encodeURIComponent(f[e])}`)).join("&"))}}var f;return{to:g.toURLPath(!0)}}const _=({context:e,index:t,item:i,isVisible:r,children:a,className:l,referrer:c,onClick:u,adEventReason:_})=>{const E=(0,o.P)(i),C=i.type,x=r?void 0:-1;if((0,h.v)(i)||(0,p.p)(i)||(0,m.d)(i)){const n=b(e,i,t);return n?(0,v.jsx)(s.N,{className:l,referrer:c,"":"context-link","data-context-item-type":C,style:{border:"none"},to:n.to,search:n.search,"aria-label":E,tabIndex:x,onClick:u,children:a}):(0,v.jsx)(v.Fragment,{children:a})}return(0,d.N)(i)?(0,v.jsx)(n.Suspense,{fallback:(0,v.jsx)(v.Fragment,{children:a}),children:(0,v.jsx)(y,{item:i,"aria-label":E,tabIndex:x,adEventReason:_,children:a})}):(0,g.v)(i)?(0,v.jsx)(v.Fragment,{children:a}):(0,f.d)(i)}},22413:(e,t,i)=>{"use strict";i.d(t,{a:()=>n.a});var n=i(55571)},48701:(e,t,i)=>{"use strict";i.d(t,{x:()=>n.x});var n=i(33440)},90405:(e,t,i)=>{"use strict";i.d(t,{$K:()=>c.$,dQ:()=>l.d,hC:()=>a.h,s_:()=>r.s,uP:()=>o.u,v3:()=>s.v,w0:()=>u.w,xJ:()=>n.x});var n=i(17580),r=i(39877),a=i(59783),s=i(19558),o=i(76576),l=i(84019),c=i(63449),u=i(31570)},87485:(e,t,i)=>{"use strict";i.d(t,{M:()=>n.M,V:()=>n.V});var n=i(48169)},9201:(e,t,i)=>{"use strict";i.d(t,{r:()=>n.r});var n=i(36321)},8059:(e,t,i)=>{"use strict";i.d(t,{L:()=>n.L});var n=i(99307)},67503:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a,D:()=>s});var n=i(30758),r=i(86070);const a=(0,n.createContext)({online:!0});const s=({children:e,initialStatus:t})=>{const[i,s]=(0,n.useState)((()=>t??globalThis.navigator.onLine));(0,n.useEffect)((()=>{const e=()=>{s(!0)},t=()=>{s(!1)};return window.addEventListener("online",e),window.addEventListener("offline",t),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}),[]);const o=(0,n.useMemo)((()=>({online:i})),[i]);return(0,r.jsx)(a.Provider,{value:o,children:e})}},84852:(e,t,i)=>{"use strict";i.d(t,{_:()=>l});var n=i(30758);const r=e=>(0,n.useCallback)((()=>{const t=document.querySelector(`[data-restore-focus-key="${e}"]`);t instanceof HTMLElement&&t.focus()}),[e]);var a=i(93766),s=i(48451),o=i(34891);function l(){const e=(0,s.X)(),[,,t]=(0,o.s)(),i=function(){const[,e]=(0,o.s)();return e.send}(),l=r(e);return(0,n.useCallback)((n=>{const r=t.transition(e,n).value===a.Z.Disabled;i(n),r&&l()}),[t,e,i,l])}},62338:(e,t,i)=>{"use strict";i.d(t,{$S:()=>r.$S,MQ:()=>n.MQ,pF:()=>n.pF});var n=i(38818),r=i(22865)},64245:(e,t,i)=>{"use strict";i.d(t,{Ev:()=>C,XB:()=>_.X,_Y:()=>p._,Zf:()=>m,AI:()=>x,sV:()=>E.s,bF:()=>b});var n=i(81987),r=i(45879),a=i(23361);const s=280,o=420,l="panel-width";var c=i(25650),u=i(19159),d=i(75235);function m(){const[e,t]=(0,d.x)(l,Math.max(s,Math.min(Math.round(.23*innerWidth),o))),i=(0,n.NC)(u.Wfl,{loadingValue:!1}),{minWidth:m}=(0,a.y)(),p=(0,c.H)();let h=o;if(i){const e=p-m-r.ev-4*r.KV;h=Math.min(Math.max(0,e),h)}return{size:Math.max(e,s),setSize:t,min:s,max:h}}var p=i(84852),h=i(30758),g=i(22865),f=i(72814),v=i(99744),y=i(19936);const b=()=>{const e=(0,p._)(),t=(0,v.z)(),i=(0,h.useRef)(null),n=(0,h.useRef)(null);(0,y.p)(f.gd.UPDATE,(({data:t})=>{const r=t?.item?.uri??null;i.current!==r&&(i.current=r,e({type:g.$S.PLAYBACK_AUTOPLAY,playerState:t})),t?.context?.uri!==n.current&&(n.current=t?.context?.uri??null,e({type:g.$S.PLAYBACK_AUTOPLAY_CONTEXT_CHANGED}))})),(0,y.p)(f.gd.ACTION,(({data:i})=>{i.action===f.Ik.PLAY&&e({type:g.$S.PLAY_CLICK,action:i,playerState:t.getState()})}))};var _=i(48451),E=i(34891);function C(e){const[t,i,n]=(0,E.s)(),[r,a]=(0,h.useState)(!0),s=(0,h.useCallback)((t=>{const i=n.transition(t,e);a(i.changed??!0)}),[n,e]);return(0,h.useEffect)((()=>{const e=i.subscribe(s);return()=>e.unsubscribe()}),[i]),r}function x(e,t){const[i]=(0,E.s)(),n=(0,p._)();return{isActive:t?i.value===e||i.value===t:i.value===e,panelSend:n,context:i.context}}},93766:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});let n=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}({})},22865:(e,t,i)=>{"use strict";i.d(t,{$S:()=>u,BV:()=>d});var n=i(97191),r=i(93766),a=i(95421),s=i(87220),o=i(71817),l=i(36485);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,i,d,m){const{isAutoToggleNPVEnabled:p,isQueueOnRightPanelEnabled:h,isDevicePickerSidePanelEnabled:g,isOverlaySidebarAnimationsEnabled:f}=d;function v(t){const i=e.getState()?.context;switch(t){case r.Z.BuddyFeed:case r.Z.BuddyFeedOverlay:return!m;case r.Z.NowPlayingView:return!m&&(0,s.O)(i);case r.Z.PuffinActivation:case r.Z.PuffinActivationOverlay:case r.Z.Puffin:case r.Z.PuffinOverlay:return!m;case r.Z.Queue:case r.Z.QueueOverlay:return h;case r.Z.DevicePicker:case r.Z.DevicePickerOverlay:return g;case r.Z.Disabled:return!0;default:return(0,l.d)(t),!1}}function y(e){const t=e&&(0,a.p)(e)&&("video"===e.mediaType||"mixed"===e.mediaType);return Boolean(t)}function b(e,t){const i=t.playerState?.item;return y(i)}function _(e){return e.playerState?.item?.type===o.c.AD}function E(e,t){return _(t)}function C(t){return e.getState()?.item?.type!==o.c.AD}const x=new Set(["buddy_feed"]),S=new Set([...x,"queue","history"]);function A(e,t){const i=t.playerState?.item;return!!y(i)||(function(e){h?S.has(e.action.origin.featureIdentifier):x.has(e.action.origin.featureIdentifier)}(t),!1)}function T(e){return e.type===u.PLAYBACK_AUTOPLAY&&!_(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 N(e){return T(e)||function(e){return"xstate.init"!==e.type&&I.has(e.type)}(e)}function w(e){return function(i,n){m||t.setItem(c,e),N(n)&&(i.preAdsPanelState=e)}}function R(e){return function(t,i){return!(!T(i)||e!==t.preAdsPanelState)}}const k=(0,n.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)&&v(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:b},{target:r.Z.NowPlayingView,cond:E}],[u.PLAYBACK_AUTOPLAY_CONTEXT_CHANGED]:{target:r.Z.NowPlayingView,cond:()=>p},[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:A}]}},[r.Z.NowPlayingView]:{entry:[w(r.Z.NowPlayingView)],on:{[u.NPV_BUTTON_CLICK]:{target:r.Z.Disabled,cond:C},[u.PANEL_CLOSE_CLICK]:{target:r.Z.Disabled,cond:C},[u.PUFFIN_BUTTON_CLICK]:{target:f?r.Z.PuffinOverlay:r.Z.Puffin,cond:C},[u.PUFFIN_START_ACTIVATION]:{target:f?r.Z.PuffinActivationOverlay:r.Z.PuffinActivation},[u.BUDDY_FEED_BUTTON_CLICK]:{target:f?r.Z.BuddyFeedOverlay:r.Z.BuddyFeed,cond:C},[u.QUEUE_BUTTON_CLICK]:{target:f?r.Z.QueueOverlay:r.Z.Queue,cond:C},[u.JAM_CONNECT_BAR_CLICK]:{target:f?r.Z.QueueOverlay:r.Z.Queue,cond:C},[u.DEVICE_PICKER_BUTTON_CLICK]:{target:f?r.Z.DevicePickerOverlay:r.Z.DevicePicker,cond:C},[u.PLAYBACK_AUTOPLAY]:[{target:f?r.Z.BuddyFeedOverlay:r.Z.BuddyFeed,cond:R(r.Z.BuddyFeed)},{target:r.Z.Disabled,cond:R(r.Z.Disabled)},{target:f?r.Z.DevicePickerOverlay:r.Z.DevicePicker,cond:R(r.Z.DevicePicker)},{target:r.Z.Disabled,cond:function(e,t){if(t.type===u.PLAYBACK_AUTOPLAY){const e=t.playerState?.context;if(!(0,s.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:b},{target:r.Z.NowPlayingView,cond:E}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:A}]}},[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:b},{target:r.Z.NowPlayingView,cond:E}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:A}]}},[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:b},{target:r.Z.NowPlayingView,cond:E}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:A}]}},[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:b},{target:r.Z.NowPlayingView,cond:E}],[u.PLAY_CLICK]:[{target:r.Z.NowPlayingView,cond:A}]}},[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:b},{target:r.Z.NowPlayingView,cond:E}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:A}}},[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:b},{target:r.Z.NowPlayingView,cond:E}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:A}}},[r.Z.DevicePicker]:{entry:[w(r.Z.DevicePicker),(0,n.kp)({devicePicker:(e,t)=>t.type===u.DEVICE_PICKER_BUTTON_CLICK&&t.interactionId?{interactionId:t.interactionId}:null})],exit:[(0,n.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:b},{target:r.Z.NowPlayingView,cond:E}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:A}}},[r.Z.DevicePickerOverlay]:{entry:[w(r.Z.DevicePickerOverlay),(0,n.kp)({devicePicker:(e,t)=>t.type===u.DEVICE_PICKER_BUTTON_CLICK&&t.interactionId?{interactionId:t.interactionId}:null})],exit:[(0,n.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:b},{target:r.Z.NowPlayingView,cond:E}],[u.PLAY_CLICK]:{target:r.Z.NowPlayingView,cond:A}}},[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:E}]}},[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:E}]}}}});for(const e of Object.values(k.config.states))e.on=Object.entries(e.on||{}).reduce(((e={},[t,i])=>{const n=Array.isArray(i)?i:[i];return e[t]=Object.values(n).map((e=>{const t="string"==typeof e?{target:e}:e,i="function"==typeof t.cond?t.cond:()=>!0;return t.cond=(e,n)=>{const r=i;return v(t.target)&&r(e,n)},t})),e}),{});return k}},10507:(e,t,i)=>{"use strict";i.d(t,{J:()=>s});var n=i(30758),r=i(30531),a=i(45418);const s=({uri:e,permissionLevel:t})=>{const i=(0,a.a)(),{onCopyLink:s}=(0,r.L)({uri:e,interactionData:{intent:"share",type:"click"}});return{onCopyLink:(0,n.useCallback)((async()=>{const n=await i.getPermissionGrant(e,t),r=new URLSearchParams;return n.token&&r.set("pt",n.token),s(r)}),[e,t,i,s])}}},4143:(e,t,i)=>{"use strict";i.d(t,{$:()=>o});var n=i(30758),r=i(81987),a=i(71188),s=i(19159);const o=(e,t)=>{const i=(0,r.NC)(s.G6N);return(0,n.useMemo)((()=>({metadataOptions:{decorateFormatListData:!0,withSync:!0,hydrateCollaboratorsWithMembers:i},contentsOptions:{offset:0,limit:25,sort:(0,a.Xt)(e),filter:t}})),[i,e,t])}},68398:(e,t,i)=>{"use strict";i.d(t,{J:()=>n.J});var n=i(10507)},5100:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>dt,usePremiumRoutes:()=>Ct,useSessionStorage:()=>xt});var n=i(30758),r=i(50513),a=i(70454),s=i(11808),o=i(83028),l=i(12783),c=i(23938),u=i(5162),d=i(33999),m=i(48905),p=i(72091);const h="t_HhrMRQykkfPlBj5Bqg",g="rPZpSQivkcUpuKUQ5hQR",f="Nz9dhLHeQc78xXXo5hvO",v="nSzy4mYX_IKfAZBIAH1o",y="Mn0mjlP624SdPXlf0XD9",b="BkzyB9IfZLLrRaOv6hs8";var _=i(86070);const E=({data:e})=>{const{spec:t}=(0,p.r)(a.Z,{data:{identifier:"benefitsEducation",reason:`${e.campaignId}:${e.userEligibility}`}}),i=(0,n.useMemo)((()=>t.educationListContainerFactory()),[t]),r=(0,m.t)(i);return(0,_.jsx)("div",{className:h,ref:r,"":"benefit-education-list",children:(0,_.jsxs)("div",{className:g,children:[(0,_.jsx)(l.E,{className:f,as:"h2",size:24,variant:"titleSmall",color:"var(--spice-text)",semanticColor:"textBase",children:e.header}),(0,_.jsx)("div",{className:y,children:(0,_.jsx)(c.b,{as:"ul",listStyleReset:!1,className:b,"aria-label":"premium-benefits",children:e.benefits.map(((e,t)=>(0,_.jsxs)("div",{className:v,children:[(0,_.jsx)(u.i,{}),(0,_.jsx)(d.K,{"":"premium-benefit-item",className:v,color:"var(--spice-text)",condensed:!0,style:{marginLeft:"4px"},children:e},t)]},t)))})})]})})};var C=i(97500),x=i.n(C),S=i(54555),A=i(75930),T=i(31322),I=i(85223);const N="hpcwgABmQsxArg6CHmwL",w="NiPwJn5g6wyg__gXXQLT",R=()=>(0,_.jsxs)("div",{className:N,children:[(0,_.jsx)(T.Z,{className:w,semanticColor:"textBase",variant:"balladBold",children:"Premium"}),(0,_.jsx)(I.G,{height:"24px",condensed:!0,semanticColor:"textBase"})]}),k="Cd1FDj9Rc0qIjN_tp7X1",O="SzqsgkOe1qmgXDHysfCq",P="pY8CBZh9OXtJgDOFUbxN",L="mdN0LAS0jJsu8omAuHEA",j="Dsan_DkzDFvoatncFM1d",D="_1oI8WowXCA7XxN26B_uM",M="Tsde0ahv9SWmrVQZiUjg",U="vfwvxoZzAqqywq61ZbPT",B="dXilYFJ25GVUny5tyRi3",F="L5BFjkg4z0IOpYeVwtkZ",H="IEjSVoB2p4KMxvDxFNMr",V="tybZ2Wyz6nkkgBFBcqzw",G="oaLgU5wxEC9uoejIfHel",z="uETtHkEVMnAvijF28fnf",W="S8eI0WpcfpToa5Gvdwoj",K="IAKbjrKVegAYqDE15Wr8",Y="PREMIUM_TIER",q=(0,n.memo)((()=>(0,_.jsx)(R,{}))),Z=({tiers:e,benefitLabel:t})=>(0,_.jsx)("thead",{className:M,children:(0,_.jsxs)("tr",{children:[(0,_.jsx)("th",{className:x()(H,V),children:t}),e.map(((e,t)=>{const i=e.id===Y?(0,_.jsx)("div",{className:x()(L,e.id===Y?D:j),children:e.id===Y&&(0,_.jsx)("div",{className:F,children:(0,_.jsx)(q,{})})}):(0,_.jsx)("div",{className:x()(L,e.id===Y?D:j),dangerouslySetInnerHTML:{__html:e.name}});return(0,_.jsx)("th",{className:H,children:i},t)}))]})}),$=({benefit:e,index:t,tierBenefit:i})=>{const[r,a]=(0,n.useState)(!1);return(0,_.jsxs)("tr",{className:U,style:{"--animationDelay":100*t+"ms"},onMouseOver:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),children:[(0,_.jsxs)("td",{className:x()(G),children:[(0,_.jsx)("span",{tabIndex:0,role:"tooltip",children:e.name}),(0,_.jsx)("div",{className:x()(K,{[O]:r}),children:r&&(0,_.jsx)(S.m,{colorSet:"invertedLight",dangerouslySetInnerHTML:{__html:e?.explanation}})})]}),i.map((e=>(0,_.jsx)("td",{className:z,children:(0,_.jsx)("div",{className:x()(W,{[B]:e.id===Y}),children:e.isBenefitPresent?(0,_.jsx)(A.k,{className:P,size:"large"}):"—"})},e.id)))]})},Q=({tableData:e,spec:t})=>{const{ref:i,inView:a}=(0,r.Wx)({triggerOnce:!0}),s=(0,n.useCallback)((t=>e.comparison.find((e=>e.benefitId===t))),[e.comparison]),o=(0,n.useMemo)((()=>t?.comparisonTableFactory()),[t]),l=(0,m.t)(o);return(0,_.jsx)("div",{className:x()(k,{[O]:a}),ref:i,"":"comparison-table",children:(0,_.jsxs)("table",{ref:l,children:[(0,_.jsx)(Z,{tiers:e.tier,benefitLabel:e.benefitLabelText}),(0,_.jsx)("tbody",{children:e.benefit.map(((e,t)=>{const i=s(e.benefitId);return i?(0,_.jsx)($,{index:t,benefit:e,tierBenefit:i.tierBenefit},e.name):null}))})]})})};var J=i(967),X=i(43830),ee=i(49217),te=i(20455),ie=i(56175);const ne=(e,t)=>{const i=new URL(e);return i.searchParams.set("ref",t),i.toString()},re=e=>ne(e,"desktop_app_native_pdp");var ae=i(23679);const se="Gu5dPC6H3JLIutCvB2z_",oe="fdX405sq8Q1nFlEC9x0e",le="oFrTU99CFAivZDoYIehj",ce="eSQahsR_fNEO7f9YY2gh",ue="uhiFjUXjo84p6X7gz0hu",de="LVupwO4wvJkgmBd0lBjx",me="Gvwcl9dk5DOWt72tB3Vv",pe="gTxsEwDpaubk8J6F7suV",he="GJtyFY_rr6HKawuGm6ud",ge=({data:e,refToStorefront:t,locale:i,useLatestTweakit:r})=>{const s=re(e.cta[0].link),{spec:o,logger:c}=(0,p.r)(a.Z,{data:{identifier:"hero",reason:`${e.campaignId}:${e.offerTypeId}`}}),u=(0,n.useMemo)((()=>o.heroContainerFactory({identifier:"hero",reason:`${e.campaignId}:${e.userEligibility}`})),[o,e.campaignId,e.userEligibility]),d=(0,m.t)(u),{openURLWithSessionTransfer:h}=(0,ae.L)(),g=(0,n.useCallback)((t=>{h(s,"_blank"),t.preventDefault(),c.logInteraction(u.heroCheckoutButtonFactory({reason:`${e.campaignId}:${e.offerTypeId}`}).hitNavigateToExternalUri({destination:s}))}),[u,c,h,e.campaignId,e.offerTypeId,s]),f=(0,n.useCallback)((e=>{setTimeout((()=>{t.current&&t?.current.scrollIntoView({behavior:"smooth",block:"start"})}),500),e.preventDefault(),c.logInteraction(u.heroViewPlansButtonFactory().hitQuickScroll())}),[u,c,t]),v=e.showCountdownTimer?((e,t,i)=>{const n=new Date;n.setHours(0,0,0,0);const r=new Date(e);r.setHours(0,0,0,0);const a=r.getTime()-n.getTime(),s=Math.round(a/864e5);return 0===s?t.offerEndsToday:1===s?t.offerEndsTomorrow:new ie.Ay(t.offerEndsInXDays,i).format({0:s})})(e.offerEndDate,e.countdownTimer,i):"",y={margin:e.showCountdownTimer?"16px 0 24px":"24px 0"};return(0,_.jsx)("div",{className:x()(se,{[he]:r}),ref:d,style:{"--background-image-url":`url(${e.backgroundDesktop.url})`,"--theme-color":e.themeHexColor},children:(0,_.jsx)("div",{className:oe,children:(0,_.jsxs)("div",{className:le,"":"premium-hero",children:[(0,_.jsx)(l.E,{as:"h1",variant:"titleMedium",color:"var(--spice-text)",semanticColor:"textBase",style:{paddingBottom:"8px",fontSize:r?"48px":"32px"},children:(0,_.jsx)("span",{dangerouslySetInnerHTML:{__html:e.header}})}),(0,_.jsx)(l.E,{as:"p",variant:"marginal",color:"var(--spice-text)",semanticColor:"textBase",style:{fontSize:r?"24px":"18px"},children:e.subheader&&e.subheader.map(((e,t)=>(0,_.jsx)("span",{dangerouslySetInnerHTML:{__html:`${e}&nbsp;`}},t)))}),e.showCountdownTimer&&v&&(0,_.jsx)("div",{className:me,children:(0,_.jsxs)("div",{className:pe,children:[(0,_.jsx)(J.z,{size:"small",semanticColor:"textAnnouncement"}),(0,_.jsx)(l.E,{as:"p",variant:"bodySmall",color:"var(--spice-text)",semanticColor:"textBase",children:v})]})}),(0,_.jsxs)("div",{className:ue,style:y,children:[(0,_.jsx)(X.$,{colorSet:"invertedLight",className:de,onClick:g,"aria-label":e.cta[0].accessibilityText,children:e.cta[0].text}),(0,_.jsx)(ee.n,{style:{borderColor:"white"},className:de,onClick:f,"aria-label":e.cta[1].accessibilityText,children:e.cta[1].text})]}),(0,_.jsx)(l.E,{as:"p",variant:"marginal",color:"var(--spice-text)",semanticColor:"textBase",onClick:te.k,onKeyDown:te.k,children:(0,_.jsx)("span",{className:ce,"":"hero-terms-link",dangerouslySetInnerHTML:{__html:e?.legalDisclaimer}})})]})})})},fe="D4IPcSaP_aw1kTzBFmts",ve="UZnaIbk7HeCMnM47oVX8",ye="cfaF1MarYjXXEVrUqcyw",be="A747Ht40xUR4hVc5y3nM",_e="WAqRKrOJRFZWIIUpu2gQ",Ee="hHfwjHBV1PCImQaPWNH6",Ce="sWRyHyVg69dDodEMFlbS",xe=({data:e})=>{const t=e.paymentIcons?[...e.paymentIcons]:[];let i,n=[],r=[];const a=e.additionalPaymentMethodsLabel;t.length>5?(n=t.slice(0,4),r=t.slice(n.length,t.length),i=a.replace("{0}",r.length.toString())):n=t||[];const s={"grid-template-columns":`repeat(${r.length<4?r.length:4}, 1fr)`};return(0,_.jsxs)("div",{className:fe,"":"payment-icons",children:[(0,_.jsx)("ul",{className:ve,children:n.map((({url:e,label:t},i)=>(0,_.jsx)("li",{className:ye,children:(0,_.jsx)("div",{role:"img",className:be,style:{backgroundImage:`url(${e})`},"aria-label":t})},`icon-${i}`)))}),r.length>0&&(0,_.jsx)("div",{className:_e,children:(0,_.jsxs)("div",{className:Ce,tabIndex:0,children:[(0,_.jsx)("span",{children:i}),(0,_.jsx)("ul",{className:Ee,style:s,children:r.map((({url:e,label:t},i)=>(0,_.jsx)("li",{className:ye,children:(0,_.jsx)("div",{role:"img",className:be,style:{backgroundImage:`url(${e})`},"aria-label":t})},`icon-${i}`)))})]})})]})},Se="mhc6hFEWbMgtklj338kj",Ae="z6VAlMqaVg7J6oVde_PC",Te="fGlxTBS_az1VSDF_JNZj",Ie=({testid:e,data:t})=>(0,_.jsx)("div",{className:Se,"":e,children:(0,_.jsxs)("div",{className:Ae,children:[(0,_.jsx)(l.E,{as:"h1",variant:"titleMedium",color:"var(--spice-text)",semanticColor:"textBase",children:t.headline}),(0,_.jsx)(l.E,{as:"p",variant:"marginal",color:"var(--spice-text)",size:18,semanticColor:"textBase",style:{fontSize:"18px"},className:Te,children:t.text})]})});var Ne=i(41978),we=i(71306),Re=i(27844),ke=i(72973),Oe=i(79303);const Pe="ESjbOIOvjhCXWqPUuiZt",Le="eQY43pDGc3LhbExUrDtj",je="CxK9MKBKmtH_YjEC9fNo",De="tfpGIPCxEkP6rluWFTzT",Me="w92DKQuLYpcrnO8kaEVd",Ue="GtuNtAimrtglxgjNwzR1",Be="DIqvj_Xf91jsfoIdGX65",Fe="yKstAHtOxSSH18_7g67E",He="m9c_rcjsn5oTIhIin4Qz",Ve="LtjDRL21jc7aL3AGXUD_",Ge="mANjYkmyc8VXfqfmgyEO",ze="ld8oiOrKE00Qom62WsG3",We="ecDLzzYeaEoOZ1zJDWS1",Ke="q1lO7Evj8ava1CSbczX0",Ye={premium:we.NCc,premiumDuo:we.$s6,premiumFamily:we.tJI,premiumMini:we.Ggi,premiumStudent:we.ymm},qe=({text:e})=>(0,_.jsx)("div",{className:He,children:e}),Ze=(0,n.memo)((()=>(0,_.jsx)(R,{}))),$e=({benefits:e})=>(0,_.jsx)("ul",{className:ze,children:e.map((e=>(0,_.jsx)("li",{children:e},e)))}),Qe=({options:e})=>(0,_.jsx)("ul",{className:Me,children:e.map((e=>(0,_.jsx)("li",{children:(0,_.jsx)(l.E,{as:"p",variant:"bodyMediumBold",children:e})},e)))}),Je=({primaryPriceDescription:e,secondaryPriceDescription:t})=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(l.E,{as:"p",className:Ue,variant:"bodyMediumBold",children:e}),(0,_.jsx)(l.E,{as:"p",className:Be,variant:"bodySmallBold",children:t})]}),Xe=({planName:e,primaryPriceDescription:t,secondaryPriceDescription:i,prepaidOptionsDescription:n})=>(0,_.jsxs)("div",{className:Ge,children:[(0,_.jsx)(Ze,{}),(0,_.jsx)(l.E,{as:"h3",variant:"titleMedium",className:De,children:e}),n?(0,_.jsx)(Qe,{options:n}):(0,_.jsx)(Je,{primaryPriceDescription:t,secondaryPriceDescription:i}),(0,_.jsx)(Re.d,{className:Fe})]}),et=({children:e,data:t,cardIndex:i,spec:r,noPills:a,noBadges:s})=>{const o=(0,Oe.s)(),l=(c=t.encoreColorSetName,Ye[c]||Ye.premium);var c;const u=re(t.checkoutUrl),d=(0,n.useMemo)((()=>(e=>{const{planId:t,prepaidSection:i}=e;return"PREMIUM_MINI"===t?i?.prepaidOption.map((e=>e.priceDescription)):void 0})(t)),[t]),{openURLWithSessionTransfer:p}=(0,ae.L)(),h=r?.planCardFactory({identifier:t.planId,reason:`${t.offerTypeId}`,position:i}),g=(0,m.t)(h),f=(0,n.useCallback)((()=>{h&&o.logInteraction(h.planCardButtonFactory({position:0}).hitNavigateToExternalUri({destination:u})),p(u)}),[p,o,u,h]);return(0,_.jsxs)("div",{"":"plan-card",ref:g,style:{"--theme-color":l},className:je,children:[!s&&t.description&&(0,_.jsx)(qe,{text:t.description}),s||!t.description&&!a&&(0,_.jsx)("span",{className:Ve}),(0,_.jsx)(Xe,{planName:t.shortPlanName,primaryPriceDescription:t.primaryPriceDescription,secondaryPriceDescription:t.secondaryPriceDescription,prepaidOptionsDescription:d}),(0,_.jsx)($e,{benefits:t.benefit}),(0,_.jsx)(X.$,{onClick:f,fullWidth:!0,UNSAFE_colorSet:(0,ke.mA)(l),className:We,"aria-label":t.checkoutAccessibilityText,children:t.checkoutUrlText}),e]})};var tt=i(47721);const it=(0,n.forwardRef)((({text:e,onClick:t,onKeyDown:i,role:n},r)=>(0,_.jsx)("div",{ref:r,className:Ke,dangerouslySetInnerHTML:{__html:e},onClick:t,onKeyDown:i,role:n}))),nt=(0,n.forwardRef)((({data:e,spec:t},i)=>{const r=(0,n.useMemo)((()=>t?.storefrontContainerFactory({identifier:"Storefront"})),[t]),a=(0,m.t)(r),s="CA"===(0,Ne.d4)(tt.JJ),o=(0,n.useRef)([]),l=e=>t=>{o.current[e]=t};(0,n.useEffect)((()=>{(()=>{let e=0;o.current.forEach((t=>{t&&t.offsetHeight>e&&(e=t.offsetHeight)})),o.current.forEach((t=>{t&&(t.style.height=`${e}px`)}))})()}),[e?.planCard]);let c=!0;return e?.planCard.forEach((e=>{e.description&&(c=!1)})),(0,_.jsx)("div",{ref:a,className:Pe,"":"storefront",children:(0,_.jsx)("div",{className:Le,ref:i,children:e?.planCard?.map(((e,t)=>(0,_.jsx)(et,{data:e,cardIndex:t,spec:r,noPills:c,noBadges:s,children:(0,_.jsx)(it,{ref:l(t),text:e.legalDisclaimer,onClick:te.k,onKeyDown:te.k,role:"link"})},e.planId)))})})}));var rt=i(52840),at=i(7939);var st=i(25639),ot=i(40312);const lt=`${i(38481).Zc}/premium-marketing`,ct=(e,t,i)=>{const{data:n,isLoading:r,isError:a}=(0,st.I)({queryKey:["premium-page"],queryFn:async()=>{const n=await(async(e,t,i)=>{const n=ot.n.getInstance(),r=await n.build().withHost(lt).withMethod("GET").withoutMarket().withPath("/marketingPage").withQueryParameters(((e,t,i)=>{const n={locale:e,automatedPaymentIcons:!0};return t&&(n.userEligibility=t),i&&(n.dateTimeOverride=i),n})(e,t,i)).withJsonContentType().withEndpointIdentifier("/marketingPage").send();return r.body})(e,t,i);return n.marketingPage},gcTime:18e5,staleTime:6e5});return{data:n??null,loading:r,error:a}},ut="M3AKQVe3nkvUMc5RgBTW",dt=()=>{const e=function(){const e=(0,Ne.d4)(at.Ht);return e?.locale??""??rt.h.en}(),t=sessionStorage.getItem("eligibility")||"",i=sessionStorage.getItem("datetime")||"",l=decodeURIComponent(i),{loading:c,data:u}=ct(e,t,l),d=(0,n.useRef)(null);let m="premium_page:native_pdp";m="premium_page:desktop_app_native_pdp";const{spec:h,logger:g}=(0,p.r)(a.Z,{data:{identifier:m,reason:`${u?.campaignId}:${u?.userEligibility}`}}),{ref:f,inView:v}=(0,r.Wx)({fallbackInView:!0,triggerOnce:!0});return(0,n.useEffect)((()=>{v&&g.logImpression(h.impression())}),[v,g,h]),!c&&u?(0,_.jsxs)("div",{ref:f,className:ut,"":"premium-page",children:[(0,_.jsx)(ge,{data:{campaignId:u.campaignId,userEligibility:u.userEligibility,...u.hero},refToStorefront:d,locale:e,useLatestTweakit:!1}),(0,_.jsx)(Ie,{testid:"benefit-education-header",data:{headline:u.benefitEducation.header,text:u.benefitEducation.subheader}}),u.storefront.paymentIcon&&(0,_.jsx)(xe,{data:{paymentIcons:u.storefront.paymentIcon,additionalPaymentMethodsLabel:u.storefront.additionalPaymentMethodsLabel}}),(0,_.jsx)(E,{data:{header:u.benefitEducation.benefitListHeader,benefits:u.benefitEducation.benefit,userEligibility:u.userEligibility,campaignId:u.campaignId}}),(0,_.jsx)("div",{ref:d,children:(0,_.jsx)(nt,{data:u.storefront,spec:h})}),(0,_.jsx)(Ie,{testid:"comparison-table-header",data:{headline:u.comparisonTable.header,text:u.comparisonTable.subheader}}),(0,_.jsx)(Q,{tableData:u.comparisonTable,spec:h})]}):(0,_.jsx)(o.A,{hasError:!1,errorMessage:s.Ru.get("error.not_found.title.page")})};var mt=i(9183),pt=i(5800),ht=i(32046),gt=i(15891),ft=i(12762),vt=i(5538),yt=i(71817),bt=i(53209),_t=i(39554);const Et=()=>(0,te.X)()?(0,_.jsx)(ht.e,{navigationalRoot:ft.g.EXPLORE_PREMIUM,pageId:pt.$h.PREMIUM,entityUri:"spotify:app:premium",children:(0,_.jsx)(dt,{})}):(0,_.jsx)(gt.$,{to:"/"}),Ct=()=>{const e=s.Ru.getLocaleForURLPath(),t=(0,Ne.d4)(vt.MU),i=(0,Ne.d4)(vt.NR),n=(0,_t.p)({localeFeatureFlag:t,entityFeatureFlag:i,urlLocale:e,entity:yt.c.PREMIUM,type:"link"})?(0,bt.hF)("/premium"):"/premium";return(0,_.jsx)(mt.qh,{path:n,element:(0,_.jsx)(Et,{})})};function xt(e){const[t,i]=(0,n.useState)("");return(0,n.useEffect)((()=>{sessionStorage.setItem(e,t)}),[e,t]),{value:t,setValue:i,clearStoredKeyValue:()=>{sessionStorage.removeItem(e)},clearSessionStorage:()=>{sessionStorage.clear()}}}},20455:(e,t,i)=>{"use strict";i.d(t,{X:()=>s,k:()=>o});var n=i(81987),r=i(19159),a=i(23679);const s=()=>{const e=(0,n.NC)(r.uyM),t=(0,n.NC)(r.pj7),i=(0,n.NC)(r.wIO);return e||t||i},o=e=>{const{openURLWithSessionTransfer:t}=(0,a.L)();e.target instanceof HTMLAnchorElement&&e instanceof KeyboardEvent&&(t(e.target.href,"_blank"),e.preventDefault())}},92601:(e,t,i)=>{"use strict";i.d(t,{j:()=>m});var n=i(30758),r=i(69898),a=i(25639),s=i(63753),o=i(63051),l=i(77527),c=i(91815),u=i(55101);const d={headphoneDevice:null,audioDevice:null,predictedState:null,isOnboarded:!1,currentState:{externalizationEnabled:!1,specificEnabled:!1},contentRestrictions:{specificRestricted:!1,externalizationRestricted:!1},toggleTuneHeadphones:null,toggleTuneStudio:null,setFilterState:()=>Promise.resolve()},m=()=>{const e=(0,l.N)(),t=(0,r.jE)(),i=(0,o.l)(),m=(0,n.useMemo)((()=>["puffin-current-device"]),[]),{data:p,isLoading:h,isError:g}=(0,a.I)({queryKey:m,queryFn:async()=>await e.getFilterState(),gcTime:5e3,staleTime:5e3});var f;return f=()=>t.invalidateQueries({queryKey:m}),(0,u.G)(c.n.UPDATE,f),{deviceFilterState:!i&&p||d,isMaybeHeadphoneDevice:(0,s.lS)(p?.audioDevice),isLoading:h,isError:g}}},55615:(e,t,i)=>{"use strict";i.d(t,{c:()=>l});var n=i(30758),r=i(96434),a=i(64245),s=i(62338),o=i(93766);const l=()=>{const{panelSend:e,isActive:t}=(0,a.AI)(o.Z.Puffin,o.Z.PuffinOverlay);return{togglePuffin:(0,n.useCallback)((()=>{const i=t;e(s.$S.PUFFIN_BUTTON_CLICK),i||(0,r.I)("PUFFIN")}),[t,e]),isPuffinPanelActive:t}}},87178:(e,t,i)=>{"use strict";i.d(t,{c:()=>n.c});var n=i(55615)},96805:(e,t,i)=>{"use strict";i.d(t,{$:()=>n});let n=function(e){return e[e.NowPlaying=0]="NowPlaying",e[e.NextInQueue=1]="NextInQueue",e[e.NextUp=2]="NextUp",e}({})},78737:(e,t,i)=>{"use strict";i.d(t,{H:()=>s,K:()=>a});var n=i(95235),r=i(50486);function a(e){return"autoplay"===e?.provider}function s(){const{uri:e,description:t}=(0,r.f)(),{current:i,nextUp:s,queued:o}=(0,n.w)(),l=s.filter((e=>a(e)?e:"autoplay"!==e.provider)),c=!!o?.length,u=!!l?.length;return{uri:e,description:t,current:i,nextUp:l,queued:o,isEmpty:!1===(i||c||u),hasQueuedTracks:c,hasNextTracks:u}}},879:(e,t,i)=>{"use strict";i.d(t,{m:()=>a,p:()=>r});var n=i(75235);let r=function(e){return e.QUEUE="queue",e.HISTORY="history",e.PARTICIPANT_LIST="participant_list",e}({});const a=()=>{const[e,t]=(0,n.x)("queue-view",r.QUEUE);return{currentQueueView:e,setQueueView:t}}},19733:(e,t,i)=>{"use strict";i.d(t,{R:()=>h});var n=i(30758),r=i(9183),a=i(81987),s=i(96434),o=i(64245),l=i(62338),c=i(93766),u=i(879),d=i(68361),m=i(19159);const p=l.$S.QUEUE_BUTTON_CLICK,h=()=>{const e=(0,a.NC)(m.eWj),t=(0,d.y)(),i=(0,r.Zp)(),{isActive:h,panelSend:g}=(0,o.AI)(c.Z.Queue,c.Z.QueueOverlay),{setQueueView:f}=(0,u.m)(),v=(0,n.useCallback)(((n=u.p.QUEUE)=>{if(e){if(n===u.p.HISTORY&&!t)return;h||(g(l.$S.QUEUE_BUTTON_CLICK),f(n))}else i("/queue")}),[t,e,h,i,g,f]);return{toggleQueue:(0,n.useCallback)((()=>{if(e){const e=h;g(p),e||(0,s.I)("QUEUE-HISTORY-PANEL")}else v()}),[e,h,v,g]),openQueue:v}}},21798:(e,t,i)=>{"use strict";i.d(t,{m:()=>n.m,p:()=>n.p});var n=i(879)},82852:(e,t,i)=>{"use strict";i.d(t,{R:()=>n.R});var n=i(19733)},85045:(e,t,i)=>{"use strict";i.d(t,{aj:()=>r,d2:()=>a});var n=i(13874);const r={fullscreen:!1,cinema:!1,npv:!1,transcriptAvailable:!1},a=(e={uiFlags:r,mode:n.aY.none},t)=>{const{key:i,value:a}=t,s={...e.uiFlags,[i]:a};return{...e,mode:(o=s,o.fullscreen?n.aY.fullscreen:o.cinema?n.aY.cinema:n.aY.npv),uiFlags:s};var o}},5244:(e,t,i)=>{"use strict";i.r(t),i.d(t,{RECENTLY_PLAYED_VIEW_ID:()=>w,RecentlyPlayed:()=>O,default:()=>P});var n=i(97500),r=i.n(n),a=i(21953),s=i(81987),o=i(11808),l=i(47493),c=i(13713),u=i(12805),d=i(98584),m=i(33779),p=i(98105),h=i(48511),g=i(1019),f=i(88146),v=i(39615),y=i(19159),b=i(42331),_=i(94921),E=i(70812),C=i(30758),x=i(9714),S=i(60102);function A(e=!0){const t=(0,S.N)(x.X6),[i,n]=(0,C.useState)((()=>t.getContexts()));return(0,C.useEffect)((()=>{if(!e)return;return t.getEvents().addListener(x.m5.UPDATE,(({data:e})=>{n(e)}))}),[t,e]),i}var T=i(36485);const I="wu4hGzXkWRNdY0UX1MJa";var N=i(86070);const w="recently-played",R=(e,t,i)=>{const n=e.uri;switch(e.type){case x.d2.LIKED_SONGS:return(0,N.jsx)(f.o,{index:t,variant:i},n);case x.d2.YOUR_EPISODES:return(0,N.jsx)(v.e,{index:t,variant:i},n);case x.d2.ALBUM:return(0,N.jsx)(l.a,{index:t,name:e.name,uri:e.uri,images:e.images,artists:e.artists,sharingInfo:null,variant:i},n);case x.d2.ARTIST:return(0,N.jsx)(c.a,{index:t,name:e.name,uri:e.uri,images:e.images,variant:i},n);case x.d2.PLAYLIST:return(0,N.jsx)(m.B,{index:t,name:e.name,uri:e.uri,images:e.images,description:e.description,authorName:e.owner.displayName,isPlayable:!(0,E.p)(e.attributes),variant:i},n);case x.d2.SHOW:return(0,N.jsx)(p.o,{index:t,name:e.name,uri:e.uri,images:e.images,publisher:e.publisher,sharingInfo:null,variant:i},n);case x.d2.AUDIOBOOK:return(0,N.jsx)(u.M,{index:t,name:e.name,uri:e.uri,images:e.images,authorName:e.authors?.[0]??"",signifierText:e.signifierText,variant:i},n);case x.d2.TRACK:return(0,N.jsx)(h.w,{index:t,name:e.name,uri:e.uri,images:e.images,is19PlusOnly:e.isMOGEFRestricted,artists:e.artists,album:null,isExplicit:e.isExplicit,sharingInfo:null,variant:i},n);default:return(0,T.k)(e),null}},k=({title:e,index:t,contexts:i})=>(0,s.NC)(y.WAq)?(0,N.jsx)(b.x,{config:(0,_.s1)(_.yV.HOME_HIGH_DENSITY),children:(0,N.jsx)(g.p,{id:"recently-played",index:t,total:i.length,seeAllUri:`/genre/${w}`,pageId:"home",title:e,children:i.map(((e,t)=>R(e,t,d._.Compact)))})}):(0,N.jsx)(g.p,{id:"recently-played",index:t,total:i.length,seeAllUri:`/genre/${w}`,pageId:"home",title:e,children:i.map(((e,t)=>R(e,t,d._.Default)))}),O=({title:e,showAll:t=!1,index:i=0})=>{const n=e??o.Ru.get("view.recently-played"),s=A(!0);return null===s?null:t?(0,N.jsx)("section",{className:r()("contentSpacing",I),children:(0,N.jsx)(g.p,{pageId:"recently-played",title:n,showAll:!0,index:0,id:"recently-played",rowGap:a.lT,fullPage:!0,children:s.map(((e,t)=>R(e,t,d._.Default)))})}):(0,N.jsx)(k,{title:n,index:i,contexts:s})},P=O},82708:(e,t,i)=>{"use strict";i.d(t,{$:()=>n.$y,N:()=>n.Nf});var n=i(13191)},76056:(e,t,i)=>{"use strict";i.d(t,{TC:()=>r,j7:()=>a,ud:()=>s});var n=i(11808);const r=["artists","albums","episodes","genres","playlists","podcasts","audiobooks","tracks","users","topResults","podcastAndEpisodes"],a={artists:()=>n.Ru.get("search.title.artists"),albums:()=>n.Ru.get("search.title.albums"),playlists:()=>n.Ru.get("search.title.playlists"),podcasts:()=>n.Ru.get("search.title.shows"),episodes:()=>n.Ru.get("search.title.episodes"),audiobooks:()=>n.Ru.get("search.title.audiobooks"),users:()=>n.Ru.get("search.title.profiles"),genres:()=>n.Ru.get("search.title.genres-and-moods"),tracks:()=>n.Ru.get("search.title.tracks"),podcastAndEpisodes:()=>n.Ru.get("search.title.podcast-and-shows"),topResults:()=>n.Ru.get("search.row.top-results")},s=["artists","albums","playlists","podcasts","episodes","audiobooks","users","genres"]},13623:(e,t,i)=>{"use strict";i.d(t,{C:()=>a,k:()=>s});var n=i(30758),r=i(75235);const a="fusionSearchHistory",s=()=>{const[e,t]=(0,r.x)(a,[]),i=(0,n.useCallback)((e=>{t(function(e){const t={},i=[];for(let n=0;n<e.length;n++)e[n].uri in t||(i.push(e[n]),t[e[n].uri]=!0);return i.splice(50),i}(e))}),[t]);return{searchHistory:e,setSearchHistory:i,clearSearchHistory:i=>{let n=[];i&&(n=e.filter((e=>e.uri!==i))),t(n)}}}},6029:(e,t,i)=>{"use strict";i.d(t,{o:()=>o});var n=i(30758),r=i(9183),a=i(76056);const s=e=>a.TC.find((t=>t===e));function o(){const e=(0,r.Zp)(),t=(0,r.RQ)("/search/:query"),i=(0,r.RQ)("/search/:query/:category"),a=(0,n.useCallback)((function(t,i,n,r){const a=r?{interactionId:r,preventMoveFocus:!0}:{preventMoveFocus:!0},s=["/search"];t&&(s.push(encodeURIComponent(t)),i&&s.push(i));const o=s.join("/");e(o,n?{state:a}:{state:a,replace:!0})}),[e]);return[{query:function(e){try{return decodeURIComponent(e)}catch{return e}}(t?.params.query??i?.params?.query??""),category:s(i?.params.category)},a]}},8031:(e,t,i)=>{"use strict";i.d(t,{G:()=>l});var n=i(12783),r=i(11808),a=i(57262),s=i(19159),o=i(86070);const l=()=>(0,o.jsx)(a.u,{property:s.vQo,renderNewExperience:()=>(0,o.jsxs)(o.Fragment,{children:[" • ",(0,o.jsx)(n.E,{variant:"bodySmall",semanticColor:"textBase",dir:"auto",as:"span",children:r.Ru.get("search.lyrics-match")})]})})},58570:(e,t,i)=>{"use strict";i.d(t,{$:()=>n});const n=(0,i(33655).u)("SettingsAPI")},26328:(e,t,i)=>{"use strict";i.d(t,{KR:()=>n,Qi:()=>s,WZ:()=>r,a1:()=>a});let n=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}({}),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.VERY_HIGH=4]="VERY_HIGH",e[e.LOSSLESS=5]="LOSSLESS",e}({}),s=function(e){return e[e.STANDARD=0]="STANDARD",e[e.VERY_HIGH=1]="VERY_HIGH",e[e.LOSSLESS=2]="LOSSLESS",e}({})},75343:(e,t,i)=>{"use strict";i.d(t,{N:()=>r});var n=i(65495);class r extends n.e{}},29107:(e,t,i)=>{"use strict";i.d(t,{t:()=>r});var n=i(35738);function r(){return(0,n.j4)()}},49447:(e,t,i)=>{"use strict";i.d(t,{x:()=>a});var n=i(25639),r=i(29107);function a(){const e=(0,r.t)();return(0,n.I)({queryKey:["settings-formats"],queryFn:()=>e.quality.getFormats(),gcTime:36e5,staleTime:6e5}).data}},39867:(e,t,i)=>{"use strict";i.d(t,{K:()=>u});var n=i(30758),r=i(69898),a=i(25639),s=i(24563),o=i(65495);class l extends o.e{}var c=i(75343);function u(e){const t=(0,n.useMemo)((()=>["useSettingsValue",e.key]),[e.key]),i=(0,r.jE)(),o=(0,a.I)({queryKey:t,queryFn:async()=>await e.getValue(),gcTime:36e5,staleTime:6e5,retry:(e,t)=>t instanceof l&&e<3}),u=(0,s.n)({mutationFn:async t=>{if(!("setValue"in e))throw new Error("valueApi does not have a setValue method");await e.setValue(t)},onMutate:async e=>{await i.cancelQueries({queryKey:t});const n=i.getQueryData(t);return i.setQueryData(t,e),{prevState:n,newState:e}},retry:(e,t)=>t instanceof l&&e<3,onError:(n,r,a)=>{n instanceof c.N||console.error(`Error setting ${e.key}`,n),i.setQueryData(t,a?.prevState)}});return(0,n.useEffect)((()=>e.subValue((e=>{i.setQueryData(t,e)}))),[i,t,e]),"setValue"in e?[o,u]:[o]}},1032:(e,t,i)=>{"use strict";i.d(t,{Ax:()=>o,FB:()=>r,dt:()=>s,rj:()=>a,zf:()=>l});var n=i(26328);function r(e){if(void 0===e)return null;const t=Number(e);return t>=n.a1.AUTOMATIC&&t<=n.a1.LOSSLESS?t:null}function a(e){if(void 0===e)return null;const t=parseInt(e,10);return t>=n.Qi.STANDARD&&t<=n.Qi.LOSSLESS?t:null}function s(e){if(void 0===e)return null;const t=Number(e);return t>=n.KR.QUIET&&t<=n.KR.LOUD?t:null}function o(e){return e?"1":"0"}function l(e){return"1"===e}},18024:(e,t,i)=>{"use strict";i.d(t,{J:()=>r,g:()=>a});var n=i(75235);const r=()=>(0,n.x)("canvasVideosEnabled",!0),a=()=>{const[e]=r();return e}},86800:(e,t,i)=>{"use strict";i.d(t,{E:()=>a,N:()=>r});var n=i(75235);const r=()=>(0,n.x)("toggleNowPlayingView",!0),a=()=>{const[e]=r();return e}},56909:(e,t,i)=>{"use strict";i.d(t,{t0:()=>f});var n=i(30758),r=i(49100),a=i(5681);let 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.VeryHigh=4]="VeryHigh",e[e.Hifi=5]="Hifi",e[e.Unknown=6]="Unknown",e}({});var o=i(77773),l=i(62683);function c(){return new a.EW((0,l.X)())}var u=i(32630);const d=[{enumKey:"quiet",enumValue:0},{enumKey:"normal",enumValue:1},{enumKey:"loud",enumValue:2}],m=[{enumKey:"minimized",enumValue:"minimized"},{enumKey:"normal",enumValue:"normal"},{enumKey:"off",enumValue:"off"}],p=e=>{switch(e){case 0:return s.Automatic;case 1:return s.Low;case 2:return s.Medium;case 3:return s.High;case 4:return s.VeryHigh;case 5:return s.Hifi;default:return s.Unknown}},h=["filter-explicit-content","publish-playlist","publish-activity","public-toplist","autoplay","dsa-mode-enabled","dsa-mode-available"],g=["incognito-enabled"],f=()=>{const e=(0,n.useRef)((0,r.dn)((0,l.X)())),{isPrivateSession:t,setPrivateSession:i}=(0,u.H)(),[s,f]=(0,n.useState)({formats:[],values:{"incognito-enabled":t},autoStart:m,loudness:d}),v=e=>"string"==typeof e?{string:e}:"boolean"==typeof e?{bool:e}:{number:BigInt(e)},y=e=>Object.fromEntries(Object.entries(e.entries).map((([e,{string:t,bool:i,number:n}])=>[e,t??i??Number(n)]))),b=(0,n.useCallback)((async(t,n)=>{h.includes(t)?await c().putValues(a.n3.fromPartial({pairs:{[t]:n}})):g.includes(t)?i(Boolean(n)):await e.current.set({entries:{[t]:v(n)}})}),[i]);return(0,n.useEffect)((()=>{f((e=>({...e,values:{...e.values,"incognito-enabled":t}})))}),[t]),(0,n.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)})));f((e=>({...e,formats:t})))}));const t=c().subValues(a.cF.fromPartial({}),(e=>{f((t=>({...t,values:{...t.values,...e.pairs}})))})),i=e.current.subAll({},(e=>{f((t=>({...t,values:{...t.values,...y(e)}})))}));return()=>{i.cancel(),t.cancel()}}),[]),{settings:s,setValue:b}}},42330:(e,t,i)=>{"use strict";function n(e){return"1"===e.employee}i.d(t,{Q:()=>n})},89037:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ShowMoreLikeThis:()=>Yn,default:()=>Wn});var n=i(30758),r=i(9183),a=i(81987),s=i(93932),o=i(5800),l=i(61544),c=i(11808),u=i(31685),d=i(83028),m=i(97500),p=i.n(m),h=i(41978),g=i(12783),f=i(12321),v=i(55159),y=i(90751),b=i(97393),_=i(39796),E=i(99686),C=i(94676),x=i(31322),S=i(38838),A=i(27685),T=i(67464),I=i(89942),N=i(58237),w=i(78074),R=i(74627),k=i(46751),O=i(71817),P=i(94672);const L="Bns6t3CfzQaCA4DLRzPQ",j="zGFcpmwFVhJxRDXUXoXA",D="_FLyhB96W9W0msGYNWUl",M="Si5iVyGLDY7mGWH_U2wA",U="HLBtD6mJyIB9EeOzDtXE",B="DRO0ur1WXqpK9BelywtE",F="vtlBEOtYFwv1cxC32ccc",H="Pq_DZj9ECxwTsK8pBxe0",V="bu7LVUNyDPF_FcrKMv74",G="bYP2npsc_CeChpMGcr6g",z="Ux7aVnDYlwojS4AmkSLg";var W=i(86070);let K=function(e){return e.SMALL="small",e.LARGE="large",e}({});const Y=({images:e,title:t,contentRating:i,duration:n,moreButton:r,onClick:a,onContextMenu:s,onTouchStart:o,onTouchEnd:l,isPlaying:c,isActive:u,size:d,className:m,label:h,isPlayable:g=!0})=>{const f=d===K.LARGE?"medium":"small",{badges:v}=(0,P.b)({contentRating:i});return(0,W.jsxs)("div",{"":"trailer-component",className:p()(L,m,{[j]:u}),onContextMenu:s,onTouchStart:o,onTouchEnd:l,children:[(0,W.jsxs)("div",{className:M,children:[(0,W.jsxs)("div",{className:H,children:[(0,W.jsx)(T.b,{type:O.c.EPISODE,title:t,className:p()(F,{[z]:d===K.SMALL,[G]:d===K.LARGE}),size:I.Qe.SIZE_56,images:e,shape:T.u.ROUNDED_CORNERS}),(0,W.jsx)("div",{className:V,children:(0,W.jsx)(A.R,{"":"trailer-play-button",version:S.H4.transparent,size:f,isPlaying:c,onClick:a,disabled:!g})})]}),(0,W.jsxs)("div",{children:[(0,W.jsx)("div",{className:U,children:(0,W.jsx)(x.Z,{dir:"auto",className:D,variant:"balladBold",children:t})}),(0,W.jsxs)("div",{className:B,children:[(0,W.jsx)(R.v,{text:h}),v.explicit&&(0,W.jsx)(N.g,{}),v.nineteen&&(0,W.jsx)(w.q,{}),(0,W.jsx)(x.Z,{dir:"auto",variant:"mesto",children:(0,W.jsx)(k.d,{durationMs:n})})]})]})]}),r]})};var q=i(34071),Z=i(45346),$=i(79303);const Q=({htmlDescription:e,narrators:t,spec:i,isPreRelease:r})=>{const a=(0,Z.W)(),s=(0,$.s)(),o=(0,n.useCallback)((e=>{a({intent:"expand-description",type:"click"});const t=i.seeMoreButtonFactory();s.logInteraction(e?t.hitUiReveal():t.hitUiHide())}),[s,a,i]);return(0,W.jsxs)(W.Fragment,{children:[t.length?(0,W.jsx)(g.E,{as:"p",variant:"bodyMedium",children:c.Ru.get("web-player.audiobooks.narratedByX",t.join(c.Ru.getSeparator()))}):null,e&&(0,W.jsx)(q.N,{maxLines:4,content:e,htmlContent:e,onExpanded:o,isOpen:r||null})]})};var J=i(21968),X=i(97438),ee=i(37712),te=i(97684),ie=i(18326),ne=i(70675),re=i(71072),ae=i(54874),se=i(42708),oe=i(94901),le=i(71338);const ce="myIGgR3zdb9nFuJ1pXYl",ue="e74TmRHu_W1yZHspTBmR",de="rrcjfInomKt1lXRDRdR8",me="Wj9mxFJDtPdiMcUtS1te",pe="SCwESjClY3m_9JlV2L7S",he="Yoa_yG2jhELT4w9wJpHf",ge="xsw253oiwmIAafVfjl1J",fe="JPqnsg5dgBTzsEoClLmD",ve="bhuRgaz03VXMf0mOG3Q2",ye="GP_qgmZlmL0CJ9r22AD9",be="bilV2VquzmEnhV4d97Tc",_e="caqddwmUJf4ix6GI84NX",Ee=({explicit:e,durationMs:t,publishDate:i,preReleaseEndDateTime:n,isPreRelease:r,uri:a,isPlaying:s})=>{const o=(0,se.p)(a);let l;return r&&n?l=c.Ru.get("web-player.prerelease.releases_on",{date:c.Ru.formatDate(n)}):!r&&i&&(l=c.Ru.formatDate(i)),(0,W.jsxs)("div",{className:ve,children:[e&&(0,W.jsx)(N.g,{className:_e}),(0,W.jsxs)("div",{className:ye,children:[l&&(0,W.jsx)(g.E,{variant:"bodySmall",className:be,children:l}),t?(0,W.jsxs)(W.Fragment,{children:[o?.playPositionMilliseconds?(0,W.jsx)(g.E,{variant:"bodySmall",className:be,children:(0,W.jsx)(k.d,{durationMs:t})}):null,(0,W.jsx)(le.j,{isPlaying:s,fullyPlayed:o?.state===oe.H7.Completed,durationMs:t,position:o?.playPositionMilliseconds})]}):null]})]})};var Ce=i(43830),xe=i(13786);const Se=(0,n.createContext)(null),Ae=({children:e,isPreRelease:t})=>{const[i,r]=(0,n.useState)(!t),a=(0,n.useMemo)((()=>({isPreRelease:t,isCountdownFinished:i,setCountdownFinished:()=>r(!0)})),[t,i,r]);return(0,W.jsx)(Se.Provider,{value:a,children:e})};function Te(){const e=(0,n.useContext)(Se);if(null===e)throw new Error("Trying to use 'PreRealeaseCountdownContext' without 'PreRealeaseCountdownProvider'!");return e}var Ie=i(48215);const Ne="nz8Wc80RAtdAb3yU9FxM",we=({uri:e})=>{const{isCountdownFinished:t}=Te(),{invalidateCache:i}=(0,Ie.W)(e);return(0,W.jsx)("div",{className:Ne,children:t?(0,W.jsx)(Ce.$,{onClick:i,children:c.Ru.get("web-player.audiobooks.goToAudiobook")}):(0,W.jsx)(xe.v,{uri:e,isBook:!0})})};var Re=i(76652),ke=i(8159),Oe=i(73015),Pe=i(63198),Le=i(99927);const je="NQAShVY0o7RQ2bCTDSkw";function De({uri:e,price:t,size:i,spec:n,logger:r,onPlayback:a}){const{enqueueSnackbar:s}=(0,Oe.d)(),o=(0,Pe.V)(),l=0===t?.finalPrice?.amount,u=l?n.getButtonFactory({uri:e}):n.buyButtonFactory({uri:e}),d=(0,ke.YQ)((async()=>{if(r.logInteraction(u.hitShowPaywall({paywalledItem:e})),o)a();else{try{t?.finalPrice?await(0,Le.S)({show_uri:e,currency:t.finalPrice.currency,price:t.finalPrice.amount}):s(c.Ru.get("error.generic"))}catch(e){s(c.Ru.get("error.generic"))}a()}}),2e3,{leading:!0,trailing:!1});return(0,W.jsx)(Ce.$,{size:i,className:je,style:{flexShrink:0},onClick:d,children:l?c.Ru.get("web-player.audiobooks.buyFree"):c.Ru.get("web-player.audiobooks.buy")})}const Me=({uri:e,isLocked:t,price:i,isPlaying:n,isConsumptionCapped:r,onPlayback:a,logger:s,spec:o,size:l="large"})=>t&&!r?(0,W.jsx)(De,{size:l,uri:e,price:i,logger:s,spec:o,onPlayback:a}):(0,W.jsx)(Re.D,{size:l,isPlaying:n,uri:e,onClick:a});var Ue=i(55030),Be=i(69578),Fe=i(52608),He=i(62720),Ve=i(85065),Ge=i(72091);const ze="8px",We=n.memo((function({backgroundColor:e,uri:t,name:i,isPlaying:r,togglePlay:a,isLocked:s,consumptionCapExplanation:o,price:l,spec:u,isExplicit:d,publishDate:m,preReleaseEndDateTime:p,duration:g}){const[f,v]=(0,He.A)(t),b=!(0,Fe.n)(),{isPreRelease:E}=Te(),C=(0,h.wA)(),x=(0,Z.W)(),S=(0,$.s)(),A=(0,Ue.d$)(),{spec:T,logger:I}=(0,Ge.r)(J.e,{data:{uri:t}});(0,n.useEffect)((()=>{A&&I.logImpression(T.impression())}),[A,I,T]);const N=(0,n.useCallback)((()=>{x({targetUri:t,intent:f?"unsave":"save",type:"click"});const e=u.saveToLibraryButtonFactory();f?S.logInteraction(e.hitUnfollow({itemToBeUnfollowed:t})):(S.logInteraction(e.hitFollow({itemToBeFollowed:t})),A&&I.logInteraction(T.hitFollow({itemToBeFollowed:t}))),v(!f)}),[x,t,f,u,v,S,A,I,T]),w=(0,n.useCallback)(((e,i)=>{const n=u.downloadButtonFactory();o?C((0,y._3)(o)):i===Ve.NV.ADD?S.logInteraction(n.hitDownload({itemToDownload:t})):i===Ve.NV.REMOVE?S.logInteraction(n.hitRemoveDownload({itemToRemoveFromDownloads:t})):i===Ve.NV.NO_PERMISSION&&S.logInteraction(n.hitUiReveal())}),[o,C,S,u,t]),R=(0,n.useCallback)((()=>{const e=u.contextButtonFactory().hitUiReveal();S.logInteraction(e)}),[S,u]),k=(0,Be.j)(),O=!!o,P=!s&&!O;return(0,W.jsxs)(X.E,{backgroundColor:e,style:{"--action-bar-padding-bottom":ze},children:[(0,W.jsx)(ee.S,{testId:"book-action-bar-metadata",children:(0,W.jsx)(Ee,{explicit:d,publishDate:m,preReleaseEndDateTime:p,durationMs:g,isPreRelease:E,uri:t,isPlaying:r})}),(0,W.jsxs)(ee.S,{children:[E&&(0,W.jsx)(we,{uri:t}),!E&&(0,W.jsx)(Me,{uri:t,isLocked:s,isConsumptionCapped:O,price:l,isPlaying:r,onPlayback:a,logger:S,spec:u,size:k}),!E&&(0,W.jsx)(ae.e,{children:(0,W.jsx)(te.M,{isAdded:f,onClick:N,disabled:b,size:k,isAudiobook:!0,condensed:!0})},"follow-button"),(0,W.jsx)(ie.I,{uri:t,onClick:w,size:k,canDownload:P}),(0,W.jsx)(_.b,{menu:(0,W.jsx)(re.p,{uri:t,isPreRelease:E}),children:(0,W.jsx)(ne.e,{label:c.Ru.get("more.label.context",i),onClick:R,size:k})})]})]})}));var Ke=i(71588),Ye=i(64350),qe=i(36921),Ze=i(82442),$e=i(56341),Qe=i(74793),Je=i(59116),Xe=i(21752),et=i(51271),tt=i(79056),it=i(67325),nt=i(55194),rt=i(32994),at=i(42116);const st=n.memo((function({coverArt:e,name:t,authorName:i,uri:n,backgroundColor:r,isPlaying:a,togglePlay:s,isLocked:o,price:l,isConsumptionCapped:u,logger:d,spec:m,preReleaseEndDateTime:p}){const h=(0,at.y)(),g=h===rt.E.SMALL||h===rt.E.XSMALL,{isPreRelease:f,setCountdownFinished:v}=Te(),y=f&&g,b=(0,W.jsx)(re.p,{uri:n});return(0,W.jsxs)(Ze.z,{backgroundColor:r,size:f?Ze.K.XLARGE:Ze.K.DEFAULT,children:[(0,W.jsxs)(Je.h,{children:[f&&(0,W.jsx)(we,{uri:n}),!f&&(0,W.jsx)(Me,{uri:n,isLocked:o,price:l,isPlaying:a,isConsumptionCapped:u,onPlayback:s,logger:d,spec:m,size:"medium"}),(0,W.jsx)(Ke.h,{menu:b,children:(0,W.jsx)(Xe.X,{text:t,dragUri:n,dragLabel:t})})]}),!y&&(0,W.jsx)(Ke.h,{menu:b,children:(0,W.jsx)($e.K,{images:e,name:t,dragUri:n,dragMimeType:qe.fl.AUDIOBOOKS,shape:T.u.SQUARE})}),(0,W.jsxs)(Qe.Y,{children:[(0,W.jsx)(tt.B,{children:c.Ru.get("web-player.audiobooks.audiobook")}),(0,W.jsx)(Ke.h,{menu:b,children:(0,W.jsx)(nt.mm,{canEdit:!1,onClick:()=>{},scaleAtMinWidth:nt.tw,dragUri:n,dragMimeType:qe.fl.AUDIOBOOKS,dragLabel:t,children:t})}),f?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(et.t,{isPreRelease:!0,author:i}),p&&(0,W.jsx)(Ye.G,{targetDate:p,images:y?e:[],imageTitle:t,onComplete:v})]}):(0,W.jsx)(it.g,{children:i})]})]})})),ot="pwjwUMaZVoJ0wBcQlIDf",lt=n.memo((({price:e})=>e.finalPrice&&e.finalListPrice?0===e.finalPrice.amount&&0===e.finalListPrice.amount?(0,W.jsxs)("div",{className:ot,children:[(0,W.jsx)(g.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:c.Ru.get("audiobook.freePriceDescription")}),(0,W.jsx)(g.E,{variant:"bodySmall",children:c.Ru.get("audiobook.freePriceExplanation")})]}):(0,W.jsxs)("div",{className:ot,children:[(0,W.jsx)(g.E,{variant:"titleSmall",semanticColor:"textBase",children:e.finalPrice.formattedPrice}),e.finalPrice.amount<e.finalListPrice.amount&&(0,W.jsx)(g.E,{variant:"bodyMedium",semanticColor:"textSubdued",children:c.Ru.get("web-player.audiobooks.retailPrice",(0,W.jsx)("span",{style:{textDecoration:"line-through"},children:e.finalListPrice.formattedPrice}))})]}):null));var ct=i(94313);var ut=i(98767),dt=i(19159);const mt="zh_eG8LWfdbVLacLrMEF",pt="qABKHTHkEdmK0fa7KmIv",ht="FgvV0kPK4h_EmOhrpT2d",gt="oiFRsQXb5nSBVhMVOLLG",ft="jzZ2lXuiIoAWDd7iOmJI",vt="Hv2cy05G19OhWRK4OHPv",yt="NzouBpMYjqaK9b0f9dUk",bt="FlMjXsCakgb_O4r1A5sA",_t=n.memo((function({name:e,duration:t,uri:i,bookName:r,usePlayContextItem:s,isChapterLocked:o,isPlayable:l,resumePositionMs:u,isFullyPlayed:d,isExplicit:m,is19PlusOnly:f,spec:v,index:C,consumptionCapExplanation:x}){const S=(0,n.useRef)(u),{isPlaying:T,togglePlay:I,isActive:R}=s({uri:i}),k=(0,$.s)(),O=(0,Pe.V)(),P=(0,h.wA)(),L=(0,a.NC)(dt.HEU,{loadingValue:!1}),{position:j,isFullyPlayed:D}=((e,t,i,r)=>{const a=(0,n.useRef)(null),[s,o]=(0,n.useState)(r),[l]=(0,ct.S)(1e4,(t=>t?.item?.uri===e));return(0,n.useEffect)((()=>{i&&(a.current=l)}),[i,l]),(0,n.useEffect)((()=>{!i&&a.current&&t.milliseconds<=a.current+1e4&&o(!0)}),[i,t.milliseconds]),{position:i?l:null,isFullyPlayed:s}})(i,t,T,d);null!==j&&(S.current=j);const M=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault()}),[]),U=(0,Z.W)(),B=(0,n.useCallback)((e=>{if(M(e),x&&!O&&L)return void P((0,y._3)(x));const t=v.chapterBlockFactory({position:C,uri:i}).playButtonFactory();if(o)U({type:"click",intent:"audiobook-gated-entry-point",itemIdSuffix:"target-chapter"}),k.logInteraction(t.hitShowPaywall({paywalledItem:i}));else{const e=(0,ut.$I)({isPlaying:T,isActive:R,spec:t,logger:k,uri:i});I({loggingParams:e})}}),[x,P,C,L,R,O,o,T,k,U,v,M,I,i]),F=(0,n.useCallback)((()=>{const e=v.chapterBlockFactory({position:C,uri:i}).secondaryHitUiReveal();k.logInteraction(e)}),[C,k,v,i]),H=(0,n.useCallback)((e=>{M(e);const t=v.chapterBlockFactory({position:C,uri:i}).contextMenuFactory().hitUiReveal();k.logInteraction(t)}),[C,k,v,M,i]),V=(0,n.useMemo)((()=>!(o||x)),[x,o]),G=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("hr",{className:ht,"aria-hidden":!0}),(0,W.jsxs)("div",{className:mt,onDoubleClick:e=>{U({targetUri:i,intent:"play",type:"double-click"}),B(e)},children:[(0,W.jsx)(g.E,{as:"h2",variant:"bodyMediumBold",className:p()(vt,{[pt]:R}),semanticColor:"textBase",children:e}),(0,W.jsxs)("div",{className:yt,children:[(0,W.jsx)(A.R,{size:"small",version:A.H.secondary,onClick:B,isPlaying:T,ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,r),ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,r),locked:o&&!x,disabled:!l&&!(o||x)}),m&&(0,W.jsx)(N.g,{fullText:!0}),f&&(0,W.jsx)(w.q,{size:16}),(0,W.jsx)("div",{className:bt,children:(0,W.jsx)(le.j,{isPlaying:T,fullyPlayed:D,durationMs:t.milliseconds,resumePositionMs:S.current,position:j??void 0})})]}),V?(0,W.jsx)(_.b,{menu:(0,W.jsx)(E.r,{uri:i}),children:(0,W.jsx)(b.e,{className:ft,size:b.M.sm,label:c.Ru.get("more.label.context",e),onClick:H,condensedAll:!0})}):null]})]});return V?(0,W.jsx)(Ke.h,{menu:(0,W.jsx)(E.r,{uri:i}),onShow:F,children:(0,W.jsx)("div",{className:gt,children:G})}):(0,W.jsx)("div",{className:gt,children:G})}));var Et=i(66060),Ct=i(16047),xt=i(2435),St=i(53830);const At="XzRW0BrBLoXKWET5f8m4",Tt="ooqITYCPJKua4e5yv8_9",It="zN8lTnSnAUSRAMPb7XYV",Nt="llVyicNXe8z0QAnoRur1",wt="fCrjgF2UgDUWjtqWls4Q",Rt="CLnKy_BRVtIluLfBWy5t",kt="RZa0qnXymlZCoGOdE03d",Ot="RFXE57hUzWvvK4_7GX13",Pt="ALQqkJiR2lZOSYvhHesh",Lt="BQwrI2BbKK4n451iu2QC",jt="VYLq_YaQVNISHPQOu2af",Dt=n.memo((function({name:e,duration:t,uri:i,bookName:r,usePlayContextItem:s,isChapterLocked:o,isPlayable:l,resumePositionMs:u,isFullyPlayed:d,isExplicit:m,is19PlusOnly:f,spec:v,index:C,consumptionCapExplanation:x}){const S=(0,n.useRef)(u),{isPlaying:T,togglePlay:I,isActive:R}=s({uri:i}),O=(0,$.s)(),P=(0,Pe.V)(),L=(0,h.wA)(),j=(0,a.NC)(dt.HEU,{loadingValue:!1}),D=(0,xt.o)((e=>{if(e?.item?.uri===i){const t=(0,St.s)(e)??0;return S.current=t,t}return 0})),M=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault()}),[]),U=(0,Z.W)(),B=(0,n.useCallback)((e=>{if(M(e),x&&!P&&j)return void L((0,y._3)(x));const t=v.chapterBlockFactory({position:C,uri:i}).playButtonFactory();if(o)U({type:"click",intent:"audiobook-gated-entry-point",itemIdSuffix:"target-chapter"}),O.logInteraction(t.hitShowPaywall({paywalledItem:i}));else{const e=(0,ut.$I)({isPlaying:T,isActive:R,spec:t,logger:O,uri:i});I({loggingParams:e})}}),[x,L,C,j,R,P,o,T,O,U,v,M,I,i]),F=(0,n.useCallback)((()=>{const e=v.chapterBlockFactory({position:C,uri:i}).secondaryHitUiReveal();O.logInteraction(e)}),[C,O,v,i]),H=(0,n.useCallback)((e=>{M(e);const t=v.chapterBlockFactory({position:C,uri:i}).contextMenuFactory().hitUiReveal();O.logInteraction(t)}),[C,O,v,M,i]),V=!(o||x),G=(0,W.jsx)(Et.d,{className:p()({[Tt]:R}),children:e}),z=(0,W.jsxs)("div",{className:Rt,children:[m&&(0,W.jsx)(N.g,{fullText:!0}),f&&(0,W.jsx)(w.q,{size:16}),(0,W.jsxs)("div",{className:kt,children:[S.current?(0,W.jsx)(g.E,{variant:"bodySmall",className:jt,children:(0,W.jsx)(k.d,{durationMs:t.milliseconds})}):null,(0,W.jsx)(le.j,{isPlaying:T,fullyPlayed:d,durationMs:t.milliseconds,resumePositionMs:S.current,position:T?D:void 0})]})]}),K=(0,W.jsxs)("div",{className:Pt,children:[(0,W.jsx)("div",{className:Lt,children:V?(0,W.jsx)(_.b,{menu:(0,W.jsx)(E.r,{uri:i}),children:(0,W.jsx)(b.e,{className:wt,size:b.M.xs,label:c.Ru.get("more.label.context",e),onClick:H})}):null}),(0,W.jsx)("div",{className:Ot,children:(0,W.jsx)(A.R,{size:"small",version:A.H.secondary,onClick:B,isPlaying:T,ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,r),ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,r),locked:o&&!x,disabled:!l&&!(o||x)})})]}),Y=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)("hr",{className:It,"aria-hidden":!0}),(0,W.jsx)(Ct.v,{id:`chapter-${C}`,title:G,body:z,footer:K,onDoubleClick:e=>{U({targetUri:i,intent:"play",type:"double-click"}),B(e)},className:At})]});return V?(0,W.jsx)(Ke.h,{menu:(0,W.jsx)(E.r,{uri:i}),onShow:F,children:(0,W.jsx)("div",{className:Nt,children:Y})}):(0,W.jsx)("div",{className:Nt,children:Y})}));var Mt=i(97513),Ut=i(99008);const Bt=({bookUri:e,bookName:t,sampleUri:i,isFinishedUnlockingJourney:r,usePlayContextItem:s,spec:o,consumptionCapExplanation:l})=>{const c=function(e,t){const i=(0,Ut.T)();return(0,n.useCallback)((async(n,r)=>i.getBookContents(e,{offset:n,limit:r,doRefreshSubscription:t})),[t,i,e])}(e,r),u=(0,n.useRef)(!1),d=(0,n.useRef)(0),m=(0,a.NC)(dt.cKd,{loadingValue:!1}),[p,h]=(0,n.useState)([]),g=(0,n.useCallback)((e=>e?.uri===i),[i]),f=(0,n.useCallback)((e=>(e=>null!==e)(e)&&!g(e)),[g]),v=(0,n.useCallback)((()=>{c&&(u.current||null===d.current||(u.current=!0,c(d.current,50).then((e=>{u.current=!1,d.current=e.nextOffset,e.items.length>0&&h((t=>t.concat(e.items.filter(f))))}))))}),[c,f]);return(0,n.useEffect)((()=>{d.current=0,h([])}),[e]),(0,W.jsx)("ul",{children:(0,W.jsx)(Mt._,{onReachBottom:v,triggerOnInitialLoad:!0,children:p.map(((e,i)=>{const{name:n,duration:r,uri:a,playability:{playable:c},playedState:{playPositionMilliseconds:u,state:d},isExplicit:p,is19PlusOnly:h}=e,g=function(e){return!e.playability?.playable&&(e.playability?.reason===oe.Uk.PaymentRequired||e.playability?.reason===oe.Uk.Anonymous)}(e);return m?(0,W.jsx)(Dt,{name:n,duration:r,uri:a,bookName:t,usePlayContextItem:s,isPlayable:c,isChapterLocked:g,consumptionCapExplanation:l,resumePositionMs:u,isFullyPlayed:d===oe._w.Completed,isExplicit:p,is19PlusOnly:h,spec:o,index:i},a):(0,W.jsx)(_t,{name:n,duration:r,uri:a,bookName:t,usePlayContextItem:s,isPlayable:c,isChapterLocked:g,consumptionCapExplanation:l,resumePositionMs:u,isFullyPlayed:d===oe._w.Completed,isExplicit:p,is19PlusOnly:h,spec:o,index:i},a)}))})})};var Ft=i(84512),Ht=i(73751),Vt=i(71296),Gt=i(46007),zt=i(70932);const Wt="_yl4tOZxcpoUt28k6B8I",Kt="lcJflizNrSwDM9yPNk6h",Yt="ret7iHkCxcJvsZU14oPY",qt=({rating:e,className:t,onClick:i})=>{if(!e)return null;const n=Boolean(e.rating?.rating);return(0,W.jsxs)("button",{className:p()(Wt,t),onClick:i,children:[(0,W.jsx)(x.Z,{dir:"auto",variant:"mestoBold",children:e.averageRating?.showAverage?c.Ru.formatNumber(e.averageRating.average,{maximumFractionDigits:1}):c.Ru.get("web-player.audiobooks.noRating")}),n?(0,W.jsx)(Gt.j,{iconSize:16,className:p()(Kt)}):(0,W.jsx)(zt.a,{iconSize:16,className:p()(Kt)}),e.averageRating?.showAverage&&(0,W.jsxs)(x.Z,{variant:"mesto",className:p()(Yt),children:["(",c.Ru.formatNumberCompact(Number(e.averageRating.totalRatings)),")"]})]})};var Zt=i(6292),$t=i(42582),Qt=i(67275),Jt=i(56376);const Xt={shuffle:!1,repeat:Qt.p.REPEAT_NONE},ei=n.memo((function({metadata:e}){const{uri:t,coverArt:i,name:s,htmlDescriptionPlain:l,authorName:d,sample:m,narrators:x,rating:S,isExplicit:A,duration:T,copyrights:I,publishDate:N,price:w,isLocked:R,consumptionCapExplanation:k,signifierText:P,resumeEpisodeLink:L,topics:j,isPreRelease:D,preReleaseEndDateTime:M}=e,{search:U}=(0,r.zy)(),B=!!new URLSearchParams(U).get("isUnlockingAudiobook"),F=!(!(0,Zt.Z)(B)||B),H=(0,Pe.V)(),V=(0,Ht.H)(i[0]?.url),G=(0,h.wA)(),z=(0,Z.W)(),q=(0,a.NC)(dt.HEU,{loadingValue:!1}),{spec:$,logger:J}=(0,Ge.r)(f.U,{data:{uri:t,identifier:o.$h.PODCAST_SHOW_AUDIOBOOK}}),{spec:X,logger:ee}=(0,Ge.r)(f.U,{data:{uri:t,identifier:o.$h.RATINGS_AND_REVIEWS_RATINGS_AUDIOBOOK}}),{spec:te,logger:ie}=(0,Ge.r)(v.Y,{data:{uri:t,identifier:o.$h.PODCAST_SHOW_AUDIOBOOK}}),ne=(0,n.useMemo)((()=>$.actionBarFactory()),[$]),re=(0,n.useMemo)((()=>X.aboutSectionFactory()),[X]),ae=(0,n.useMemo)((()=>$.chapterListFactory()),[$]);(0,n.useEffect)((()=>{z({type:"view",intent:"audiobook"})}),[z]),(0,n.useEffect)((()=>{R&&ie.logImpression(te.impression())}),[te,ie,R]);const{isPlaying:se,togglePlay:oe,usePlayContextItem:le,isActive:ve,triggerPlay:ye}=(0,$t.P)({uri:t},{featureIdentifier:"audiobook"},Xt),{togglePlay:be,isPlaying:_e,isActive:Ee}=(0,$t.P)({uri:m?.uri??"",pages:[{items:[{uri:m?.uri??"",uid:m?.uri??"",type:O.c.CHAPTER,provider:null,metadata:D?{is_pre_release:"true",type:"trailer"}:void 0}]}]},{featureIdentifier:"audiobook"},Xt),Ce=se&&!_e,xe=ve&&!Ee,Se=(0,n.useCallback)((async()=>{const e=$.actionBarFactory().playButtonFactory();if(k&&!H&&q)return J.logInteraction(e.hitShowPaywall({paywalledItem:t})),void G((0,y._3)(k));if(!R||H)if(H)oe();else{const i=(0,ut.$I)({isPlaying:Ce,isActive:xe,spec:e,logger:J,uri:t});xe?oe({loggingParams:i}):ye({skipTo:L?{uri:L}:void 0,loggingParams:i})}}),[$,k,H,q,R,J,t,G,oe,Ce,xe,ye,L]),Te=(0,n.useCallback)((()=>{m?.uri&&(z({targetUri:m.uri,intent:_e?"play":"pause",type:"click"}),be())}),[_e,z,be,m?.uri]),Ie=(0,n.useCallback)((()=>{const i=re.ratingButtonFactory().hitUiReveal();ee.logInteraction(i),G((0,y.eH)(t,e))}),[re,G,e,ee,t]),Ne=(0,at.y)(),we=R&&!k&&w;return(0,W.jsx)("section",{className:ce,children:(0,W.jsxs)(Ae,{isPreRelease:D,children:[(0,W.jsx)(u.Q,{children:(0,Jt.hV)({showOrAudiobookName:s,type:"Audiobook"})}),(0,W.jsx)(Ft.c,{artistOrShow:d,title:s,uri:t,entityType:Ft.p.AUDIOBOOK}),(0,W.jsx)(st,{name:s,authorName:d,uri:t,coverArt:i,backgroundColor:V,togglePlay:Se,isPlaying:Ce,isLocked:R,isConsumptionCapped:!!k,price:w,logger:J,spec:$.actionBarFactory(),preReleaseEndDateTime:M}),(0,W.jsx)(We,{name:s,backgroundColor:V,uri:t,togglePlay:Se,isPlaying:Ce,isLocked:R,consumptionCapExplanation:k,isExplicit:A,duration:T,publishDate:N,preReleaseEndDateTime:M,price:w,spec:ne}),(0,W.jsxs)("div",{className:p()(ue,"contentSpacing",{[de]:Ne===rt.E.LARGE}),children:[(0,W.jsxs)("div",{className:me,children:[(0,W.jsxs)("div",{className:fe,children:[P&&(0,W.jsx)(g.E,{variant:"bodyMedium",as:"p",semanticColor:"textBrightAccent",children:P}),!P&&we&&(0,W.jsx)(lt,{price:w})]}),(0,W.jsx)(Q,{htmlDescription:l,narrators:x,spec:re,isPreRelease:D??!1})]}),(0,W.jsxs)("div",{className:pe,children:[m?.isPlayable&&(0,W.jsx)(Y,{label:c.Ru.get("audiobook.page.sample"),images:m.coverArt,title:m.name,duration:m.duration.milliseconds,moreButton:R?null:(0,W.jsx)(_.b,{menu:(0,W.jsx)(E.r,{uri:m.uri}),children:(0,W.jsx)(b.e,{})}),onClick:Te,isPlaying:_e,isActive:Ee,size:K.LARGE,contentRating:m.contentRating?.label,isPlayable:m.isPlayable}),!D&&(0,W.jsx)("div",{className:he,children:(0,W.jsx)(qt,{rating:S,onClick:Ie})}),j.length>0&&(0,W.jsx)(C.N,{topics:j})]}),(0,W.jsxs)("div",{className:ge,children:[!D&&(0,W.jsx)(Bt,{bookUri:t,bookName:s,sampleUri:m?.uri,isFinishedUnlockingJourney:F,usePlayContextItem:le,spec:ae,consumptionCapExplanation:k},`${t}-${R}-${!!k}`),(0,W.jsx)(Vt.Z,{copyrights:I})]})]})]})})}));var ti=i(15891),ii=i(38916),ni=i(27014);const ri=({uri:e,name:t,backgroundColor:i,spec:r})=>{const a=(0,$.s)(),s=(0,Z.W)(),o=!(0,Fe.n)(),[l,u]=(0,He.A)(e),d=(0,Ue.d$)(),{spec:m,logger:p}=(0,Ge.r)(J.e,{data:{uri:e}});(0,n.useEffect)((()=>{d&&p.logImpression(m.impression())}),[d,p,m]);const h=(0,n.useCallback)((()=>{s({targetUri:e,intent:l?"unsave":"save",type:"click"});const t=r.followButtonFactory();a.logInteraction(l?t.hitUnfollow({itemToBeUnfollowed:e}):t.hitFollow({itemToBeFollowed:e})),!l&&d&&p.logInteraction(m.hitFollow({itemToBeFollowed:e})),u(!l)}),[s,e,l,r,a,u,d,p,m]),g=(0,n.useCallback)((()=>{a.logInteraction(r.contextButtonFactory().hitUiReveal())}),[a,r]),f=(0,Be.j)();return(0,W.jsx)(X.E,{backgroundColor:i,children:(0,W.jsxs)(ee.S,{children:[(0,W.jsx)(ae.e,{children:(0,W.jsx)(ni.W,{isFollowing:l,onClick:h,disabled:o})},"follow-button"),(0,W.jsx)(_.b,{menu:(0,W.jsx)(ii.H,{uri:e}),onShow:g,children:(0,W.jsx)(ne.e,{label:c.Ru.get("more.label.context",t),size:f})})]})})};var ai=i(60386),si=i(83681),oi=i(69644),li=i(55773),ci=i(23956),ui=i(98567),di=i(35657),mi=i(59996),pi=i(39733);const hi="BknvXMyUnN3fQCz8mvLI",gi="slMInsl3HL9_02zHT22R",fi="40px",vi=({leavebehinds:e})=>{let t;return 1===e.length&&(t=(0,W.jsx)(g.E,{variant:"bodySmallBold",semanticColor:"textBase",children:e[0].advertiser})),2===e.length&&(t=c.Ru.get("podcast-ads.recent_ads_just_two",(0,W.jsx)(g.E,{variant:"bodySmallBold",semanticColor:"textBase",children:e[0].advertiser}),(0,W.jsx)(g.E,{variant:"bodySmallBold",semanticColor:"textBase",children:e[1].advertiser}))),e.length>2&&(t=c.Ru.get("podcast-ads.recent_ads_more_than_two",(0,W.jsx)(g.E,{variant:"bodySmallBold",semanticColor:"textBase",children:e[0].advertiser}),(0,W.jsx)(g.E,{variant:"bodySmallBold",semanticColor:"textBase",children:e[1].advertiser}))),(0,W.jsxs)(g.E,{variant:"bodySmall",semanticColor:"textSubdued","":"show-leavebehinds-text",children:[c.Ru.get("podcast-ads.recent_ads_from"),t]})},yi=({leavebehinds:e,uri:t,surface:i})=>{const r=(0,pi.vh)();if((0,n.useEffect)((()=>{t&&e.length>0&&r.send((0,li.x)({leavebehind_request_id:e[0].requestId,event:"event_viewed",event_reason:`viewed_on_${(0,ci.Fh)(i).toLowerCase()}`,surface:(0,ci.Fh)(i),uri:t}))}),[r,e,t,i]),0===e.length)return null;const a=(0,l.o_)(t)?.id,s=1===e.length?e[0].clickthroughUrl:(0,ui.q)(a),o=di.Qd,u=e.length>o,d=e.length-(o-1),m=e.slice(0,u?o-1:o);return(0,W.jsx)(mi.N,{to:s,pathname:e.length>1?s:void 0,state:{uri:t},className:gi,onClick:()=>r.send((0,li.x)({leavebehind_request_id:e[0].requestId,event:"event_clicked",event_reason:"cta_see_all",surface:(0,ci.Fh)(i),uri:t})),"":"show-leavebehinds-container",children:(0,W.jsx)(Ct.v,{layout:"wide",variant:"tinted",size:"xl",id:"show-leavebehinds",title:(0,W.jsxs)("div",{className:hi,"":"show-leavebehinds-logos-container",children:[m.map((e=>(0,W.jsx)(si.C,{"":"show-leavebehind-image",src:e.displayImage.src,alt:e.displayImage.alt,imageHeight:fi,imageWidth:fi},e.adId))),u?(0,W.jsx)(bi,{"":"show-leavebehinds-more-count-indicator",variant:"tinted",minBlockSize:fi,borderRadius:"4px",padding:"6px",children:(0,W.jsx)(g.E,{variant:"bodyMedium","":"show-leavebehinds-more-count-indicator-text",children:c.Ru.get("podcast-ads.show_more_indicator",d)})}):null]}),body:(0,W.jsx)(vi,{leavebehinds:e})})})};var bi=(0,ai.Ay)(oi.a).withConfig({displayName:"LeavebehindsPreview___StyledBox",componentId:"sc-qakd80-0"})({backgroundColor:"#121212",width:"40px",display:"flex",alignItems:"center",justifyContent:"center"}),_i=i(21866);const Ei=ci.ui.SHOW_PAGE;function Ci({uri:e}){const{data:t,error:i,getLeavebehinds:r}=(0,_i.A)({surface:Ei,uri:e});(0,n.useEffect)((()=>{r()}),[r]);const a=(0,n.useMemo)((()=>t?(0,di.iT)(t,e):[]),[t?.requestId]);return i||t?.leavebehindAds&&t?.leavebehindAds?.length<1?null:(0,W.jsx)(yi,{leavebehinds:a,uri:e,surface:Ei})}var xi=i(58345),Si=i(98105),Ai=i(82097),Ti=i(15742),Ii=i(8385);const Ni=Spicetify.GraphQL.Definitions["internalLinkRecommenderShow"]=new Ti.l("internalLinkRecommenderShow","query","6c369ff272a666b31fef1629c169925a1bd80f372195396c82304142cacd89e8",null),wi=(e,t)=>(0,Ii.I)(Ni,e,t);var Ri=i(47541);const ki=e=>{return t=e,"NotFound"!==t?.__typename&&"GenericError"!==t?.__typename&&"Podcast"===e.__typename;var t};var Oi=i(57734),Pi=i(8035);const Li=({className:e,title:t,uri:i})=>{const{data:n}=wi({uri:i}),r=n?.seoRecommendedPodcast.totalCount,a=n?.seoRecommendedPodcast.items,s=function(e){return(e||[]).filter((e=>ki(e.data)))}(a);if(0===r)return null;const o=(0,l.o_)(i)?.id;return(0,W.jsx)(Oi.$,{className:e,title:t,seeAllLabel:c.Ru.get("shelf.see-all"),total:r,alwaysShowSeeAll:!0,seeAllUri:`spotify:app:show:${o}:more-like-this`,children:s?.map((({data:e},t)=>(0,W.jsx)(Si.o,{uri:e.uri,name:e.name,images:e.coverArt?.sources||[],publisher:e.publisher?.name??"",sharingInfo:null,mediaType:(0,Pi.w)(e.mediaType),index:t},e.uri)))})},ji=e=>{const t=(0,Ri.D)({entityType:O.c.SHOW,componentType:"shelf",uri:e.uri});return(0,W.jsx)(Ai.s,{onError:t,children:(0,W.jsx)(Li,{...e})})};var Di=i(95244),Mi=i(76792),Ui=i(62473),Bi=i(15691);const Fi=(0,n.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a ShowFilterProvider")},sortState:[]}),Hi=n.memo((function({uri:e,children:t}){return(0,W.jsx)(Bi.E,{uri:e,defaultState:[],sortContext:Fi,localStorageKey:"showFilterParams-v2",children:t})}));var Vi=i(19703);const Gi={field:Vi.WY.PUBLISH_DATE,order:Vi.AX.DESC},zi={field:Vi.WY.PUBLISH_DATE,order:Vi.AX.ASC},Wi=zi,Ki={episodic:Gi,sequential:zi,recent:Gi};function Yi(){return new Map([[Gi,{key:"newest-to-oldest",value:c.Ru.get("shows.sort.newest-to-oldest")}],[zi,{key:"oldest-to-newest",value:c.Ru.get("shows.sort.oldest-to-newest")}]])}function qi(e){return Ki[e]}const Zi=(0,n.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a ShowSortProvider")},sortState:qi("recent")}),$i=e=>{const t=Yi();return Array.from(t.keys()).some((({field:t})=>t===e?.field))},Qi=n.memo((function({uri:e,children:t,defaultSortParam:i}){return(0,W.jsx)(Bi.E,{uri:e,defaultState:i,sortContext:Zi,localStorageKey:"showSortParam",validator:$i,children:t})}));var Ji=i(4096),Xi=i(95302),en=i(61272);const tn="ysJC093hc_2ixGCy40_s",nn="mJP3Bamg3hN7S0p7XKfN",rn="clPqCj1L_KSfoVuTuP6x",an="vqQmhCMZq7eUtTV7YYOQ",sn={totalCount:0,nextOffset:0,items:[]},on=n.memo((function({showMetadata:e,usePlayContextItem:t}){const{sortState:i}=(0,n.useContext)(Zi),{sortState:r}=(0,n.useContext)(Fi),a=function(e,t,i){const n=(0,Ut.T)(),{canSort:r}=n.capabilities,a=(0,en.U0)((async(r,a)=>n.getContents(e,{offset:r,limit:a,sort:t,filters:i})),[n,e,t,i]),s=(0,en.U0)((async(t,i)=>n.getContents(e,{offset:t,limit:i})),[n,e]);return r?a:s}(e.uri,i,r),[s,o]=(0,n.useState)(sn),l=(0,n.useRef)(!1),u=(0,n.useRef)(0),d=(0,Ji.c)(),m=d?6:50,p=d&&null!==u.current,h=(0,n.useCallback)(((e=!1)=>{if(!a)return;const t=u.current;null!==t&&!l.current&&m>0&&(l.current=!0,a(t,m).then((i=>{o((n=>{const r=e?[]:[...n.items];return r.splice(t,i.items.length,...i.items),u.current=i.nextOffset,{...i,items:r}})),l.current=!1})))}),[a,m]);return(0,n.useEffect)((()=>{o(sn)}),[e.uri]),(0,n.useEffect)((()=>{u.current=0,h(!0)}),[h]),(0,W.jsxs)(Xi.pZ,{value:"track-list",children:[(0,W.jsx)(Mt._,{onReachBottom:d?void 0:h,triggerOnInitialLoad:!0,children:s.items.map(((i,n)=>i&&(0,W.jsxs)("div",{className:nn,children:[(0,W.jsx)("hr",{className:tn,"aria-hidden":!0}),(0,W.jsx)(Di.q,{index:n,episode:i,showMetadata:e,usePlayContextItem:t},`${i.uri}/${n}`)]},`${n}${i.uri}`)))}),p&&(0,W.jsx)("div",{className:rn,children:(0,W.jsxs)(Mi.v,{onClick:()=>{h()},className:an,children:[(0,W.jsx)(g.E,{variant:"bodySmallBold",children:c.Ru.get("internal-link-recommender.load-more-episodes")}),(0,W.jsx)(Ui.V,{size:"xsmall"})]})})]})}));var ln=i(2e3);const cn={field:Vi.K$.ISPLAYED,operator:Vi.uj.EQUALS,value:!1},un={field:Vi.K$.STARTEDPLAYING,operator:Vi.uj.GREATER_THAN,value:0};const dn="all-episodes",mn=({onFilter:e})=>{const{sortState:t,setSortState:i}=(0,n.useContext)(Fi),r=new Map([[cn,{key:"is-played",value:c.Ru.get("shows.filter.unplayed")}],[un,{key:"started-playing",value:c.Ru.get("shows.filter.in-progress")}]]),a=Array.from(r.values());a.unshift({key:dn,value:c.Ru.get("mwp.podcast.all.episodes")});const s=Array.from(r.keys()),o=(0,n.useCallback)((t=>{if(t===dn)i([]);else{const e=s.find((e=>r.get(e)?.key===t));e&&i([e])}e()}),[e,i,s,r]);if(!r.size||!s)return null;let l=a[0];const u=Array.from(r.entries()).filter((e=>t?.some((t=>t.field===e[0].field&&t.operator===e[0].operator))));return u.length>0&&(l=u[0][1]),(0,W.jsx)(ln.g,{options:a,onSelect:e=>o(e),selected:l,variant:"bodyMediumBold",semanticColor:"textBase",heading:c.Ru.get("drop_down.filter_by")})},pn=({onSort:e})=>{const{sortState:t,setSortState:i}=(0,n.useContext)(Zi),r=Yi(),a=Array.from(r.values()),s=Array.from(r.keys()),o=(0,n.useCallback)((t=>{const n=s.find((e=>r.get(e)?.key===t));n&&i(n),e()}),[s,e,r,i]);if(!r.size||!t)return null;const l=Array.from(r.keys()).find((e=>e.field===t.field&&e.order===t.order));if(!l)return null;const u=r.get(l);return u?(0,W.jsx)(ln.g,{options:a,onSelect:e=>o(e),selected:u,heading:c.Ru.get("drop_down.sort_by")}):null},hn="bOAvdKi0zqyA_S6ThcvF",gn="jVWq1orbpiIK34UFHkFb",fn="GMHh7OED_Nijo4zzSfrb",vn="sNEwCEh44Lapg36PnVFw",yn="OMG3QMzpwer8oWsiJpzs",bn="r0yVSge7A1iSTNfudfyV",_n="yP6EeRtQJeqKq10IsMxn",En="MIaGJ1KyQ3JLblOjWL19",Cn="p8WHC1qBUrwrBwzp_vYY",xn="Uzyuaxpkm_Gwb6jOGbva",Sn="TSNj_F4gGzCuxrzx6n98",An="E4HX0M3aD0MY5dUCKSCb",Tn="CbSqM7wDwoLFnyIo1iKL",In="c0h80mSMc3PkNlHX0DYs",Nn="SGGetEMTKgQk1aJvG4k9",wn="ne3ntrWAoMrE6_4A23Mf",Rn=({spec:e})=>{const t=(0,$.s)(),{canSort:i,canFilter:r}=(0,Ut.T)().capabilities,a=(0,n.useCallback)((()=>{t.logInteraction(e.episodeListFactory().filterButtonFactory().hitFilter())}),[t,e]),s=(0,n.useCallback)((()=>{t.logInteraction(e.episodeListFactory().sortButtonFactory().hitSort())}),[t,e]);return(0,W.jsxs)("div",{className:_n,children:[r&&(0,W.jsx)("div",{className:Cn,children:(0,W.jsx)(mn,{onFilter:a})}),!r&&(0,W.jsx)(g.E,{as:"h3",variant:"titleSmall",semanticColor:"textBase",className:xn,children:c.Ru.get("mwp.podcast.all.episodes")}),i&&(0,W.jsx)("div",{className:En,children:(0,W.jsx)(pn,{onSort:s})})]})};var kn=i(39249),On=i(86945),Pn=i(94961),Ln=i(17869);const jn=e=>{switch(e){case oe.t5.TRAILER:return c.Ru.get("podcasts.next-episode.trailer");case oe.t5.UP_NEXT:return c.Ru.get("podcasts.next-episode.up-next");case oe.t5.CONTINUE_LISTENING:return c.Ru.get("podcasts.next-episode.continue-listening");case oe.t5.FIRST_PUBLISHED:return c.Ru.get("podcasts.next-episode.first-published");case oe.t5.LATEST_PUBLISHED:return c.Ru.get("podcasts.next-episode.latest-published");default:return}},Dn=({breakpoint:e,metadata:t,spec:i})=>{const{uri:r,trailer:a,topics:o,description:l,htmlDescription:u,rating:d}=t,m=(0,$.s)(),{spec:f,logger:v}=(0,Ge.r)(s.R,{data:{uri:r}}),E=(0,n.useMemo)((()=>f.aboutSectionFactory()),[f]),x=(0,n.useMemo)((()=>i.episodeListFactory()),[i]),S=(0,h.wA)(),A=(0,Z.W)(),T=(0,Pe.V)(),{sortState:I}=(0,n.useContext)(Fi),N=(0,Ut.T)(),w=(0,Ji.c)(),{usePlayContextItem:R}=(0,$t.P)({uri:r,metadata:{[Pn.W.SORTING_CRITERIA]:N.getPlayerSort(Wi),[Pn.W.FILTERING_PREDICATE]:N.getPlayerFilter(I)}},{featureIdentifier:"show"}),{isActive:k,isPlaying:O,togglePlay:P}=R({uri:a?.uri||""}),L=(0,n.useCallback)((e=>{A({intent:"expand-description",type:"click"});const t=i.aboutSectionFactory().seeMoreButtonFactory(),n=e?t.hitUiReveal():t.hitUiHide();m.logInteraction(n)}),[m,A,i]),j=(0,n.useCallback)(((e,t)=>{const n=i.aboutSectionFactory().topicFactory(t).hitUiNavigate({destination:t.uri});m.logInteraction(n)}),[m,i]),D=a?{name:a.name,uri:a.uri,audio:{items:a.audio.items.map((e=>({url:e.url})))}}:null,M=(0,Di.B)(t),U=(0,kn.C)(D,M),B=(0,n.useCallback)((()=>{a?.uri&&(T?U():(A({targetUri:a.uri,intent:O?"play":"pause",type:"click"}),P()))}),[U,T,O,A,P,a?.uri]),{ref:F,breakpoint:H}=(0,On.x)({[rt.E.MEDIUM]:0,[rt.E.LARGE]:600}),V=o.length>0,G=l||u,z=G||V;return(0,W.jsxs)("div",{className:p()(gn,"contentSpacing",{[fn]:e===rt.E.LARGE}),ref:F,children:[(0,W.jsxs)("div",{className:vn,children:[z&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(g.E,{as:"h3",variant:"titleSmall",semanticColor:"textBase",className:xn,children:c.Ru.get("artist.about")}),G&&(0,W.jsx)(q.N,{maxLines:4,content:(l||"").trim(),onExpanded:L,htmlContent:u||void 0}),a&&(0,W.jsx)(Ke.h,{menu:(0,W.jsx)(xi.b,{uri:a.uri,showUri:r,sharingInfo:a.sharingInfo}),children:(0,W.jsx)(Y,{label:c.Ru.get("track-trailer"),className:Sn,images:a.coverArt,title:a.name,duration:a.duration.milliseconds,moreButton:(0,W.jsx)(_.b,{menu:(0,W.jsx)(xi.b,{uri:a.uri,sharingInfo:a.sharingInfo,showUri:r}),children:(0,W.jsx)(b.e,{})}),onClick:B,isPlaying:O,isActive:k,size:K.LARGE,contentRating:a.contentRating?.label})}),(0,W.jsxs)("div",{className:Tn,children:[d&&(0,W.jsx)("div",{className:In,children:(0,W.jsx)(qt,{rating:d,onClick:()=>{const e=E.ratingButtonFactory().hitUiReveal();v.logInteraction(e),S((0,y.eH)(r,t))}})}),V&&(0,W.jsx)(C.N,{topics:o,className:Nn,onClick:j})]})]}),(0,W.jsx)(Ci,{uri:r})]}),(0,W.jsx)(at.o.Provider,{value:H,children:(0,W.jsxs)("div",{className:p()(yn,{[bn]:w}),"":"show-all-episode-list",children:[t.nextBestEpisode&&(0,W.jsx)(Di.q,{showMetadata:t,episode:t.nextBestEpisode.data,usePlayContextItem:R,status:jn(t.nextBestEpisode.type),variant:"next-best-episode"}),(0,W.jsx)(Rn,{spec:i}),(0,W.jsx)(Ln.r,{spec:x,children:(0,W.jsx)(on,{showMetadata:t,usePlayContextItem:R})})]})}),(0,W.jsx)(Vt.Z,{copyrights:[]}),w&&(0,W.jsx)(ji,{title:c.Ru.get("internal-link-recommender.more-podcasts-like-this"),uri:r,className:wn})]})},Mn=n.memo(Dn);var Un=i(64572),Bn=i(32572);const Fn=({reason:e})=>{const t=(0,a.NC)(dt.C2),i=function(e){switch(e){case"OTP":return c.Ru.get("podcasts.subscriber-indicator.otp");case"SUBSCRIPTION":return c.Ru.get("podcasts.subscriber-indicator.subscription");default:return""}}(e);return t&&i?(0,W.jsx)(g.E,{className:An,children:i}):null};const Hn=({metadata:e,backgroundColor:t})=>{const{uri:i,coverArt:n,name:r,podcastType:a,publisherName:s,gatedContentAccessReason:o}=e,l=(0,W.jsx)(ii.H,{uri:i});return(0,W.jsxs)(Ze.z,{backgroundColor:t,children:[(0,W.jsx)(Je.h,{children:(0,W.jsx)(Ke.h,{menu:l,children:(0,W.jsx)(Xe.X,{text:r,dragUri:i,dragLabel:r})})}),(0,W.jsx)(Un.X,{children:(0,W.jsx)(Ke.h,{menu:l,children:(0,W.jsx)(Bn.b,{loading:"eager",name:r,images:n,placeholderType:"show",shape:Bn.u.SQUARE})})}),(0,W.jsxs)(Qe.Y,{children:[(0,W.jsxs)(tt.B,{children:["SHOW"===a?c.Ru.get("type.show"):c.Ru.get("type.podcast"),o&&(0,W.jsx)(Fn,{reason:o})]}),(0,W.jsx)(Ke.h,{menu:l,children:(0,W.jsx)(nt.mm,{dragUri:i,dragLabel:r,scaleAtMinWidth:nt.tw,children:(0,W.jsx)("span",{"":"show-title",children:r})})}),(0,W.jsx)(it.g,{children:s})]})]})};var Vn=i(32620),Gn=i(86065);const zn=({metadata:e,showId:t})=>{const{coverArt:i,name:r,uri:a}=e,{spec:o}=(0,Ge.r)(s.R,{data:{uri:a}}),l=(0,n.useMemo)((()=>o.actionBarFactory()),[o]),c=(0,Ht.H)(i[0]?.url||null),d=(0,at.y)();return(0,W.jsxs)("section",{className:hn,children:[(0,W.jsx)(u.Q,{children:(0,Jt.hV)({showOrAudiobookName:r,type:"Podcast"})}),(0,W.jsx)(Ft.c,{artistOrShow:r,uri:a,entityType:Ft.p.PODCAST}),(0,W.jsx)(Hn,{metadata:e,backgroundColor:c}),(0,W.jsx)(ri,{uri:a,name:r,backgroundColor:c,spec:l}),(0,W.jsx)(Mn,{breakpoint:d,metadata:e,showId:t,spec:o})]})},Wn=(0,n.memo)((function(){const{showId:e=""}=(0,r.g)(),t=`spotify:show:${e}`,{data:i,error:s,redirectUri:u}=(0,Ie.W)(t),m=(0,a.NC)(dt.Jl4);if(u){const e=(0,l.cA)(u);return(0,W.jsx)(ti.$,{to:e.toURLPath(!0)})}const p=i&&(0,oe.Go)(i);return!i||s||p&&i?.isPreRelease&&!m?s instanceof Gn.W?(0,W.jsx)(d.A,{hasError:!0,errorMessage:c.Ru.get("error-page.not-available-in-region.title")}):(0,W.jsx)(d.A,{hasError:!!s,errorMessage:c.Ru.get("error.not_found.title.page")}):p?(0,W.jsx)(n.Suspense,{fallback:null,children:(0,W.jsx)(Vn.u,{pageId:o.$h.PODCAST_SHOW_AUDIOBOOK,uri:t,children:(0,W.jsx)(ei,{metadata:i},`${!!i.consumptionCapExplanation}`)})}):(0,W.jsx)(n.Suspense,{fallback:null,children:(0,W.jsx)(Vn.u,{pageId:o.$h.PODCAST,uri:t,children:(0,W.jsx)(Hi,{uri:i.uri,children:(0,W.jsx)(Qi,{uri:i.uri,defaultSortParam:qi(i.consumptionOrder),children:(0,W.jsx)(zn,{showId:e,metadata:i})})})})})}));var Kn=i(21953);const Yn=n.memo((function(){const{showId:e=""}=(0,r.g)(),t=(e=>`spotify:show:${e}`)(e),{data:i}=wi({uri:t}),a=i?.seoRecommendedPodcast.totalCount,s=i?.seoRecommendedPodcast.items;return(0,W.jsxs)("div",{className:"contentSpacing",children:[(0,W.jsx)(u.Q,{children:c.Ru.get("internal-link-recommender.more-podcasts-like-this")}),(0,W.jsx)(Oi.$,{title:c.Ru.get("internal-link-recommender.more-podcasts-like-this"),total:a,showAll:!0,fullPage:!0,rowGap:Kn.lT,children:s?.map(((e,t)=>{if(!ki(e.data))return(0,W.jsx)(n.Fragment,{},t);const i=e.data;return(0,W.jsx)(Si.o,{uri:i.uri,name:i.name,images:i.coverArt?.sources||[],publisher:i.publisher?.name??"",sharingInfo:null,mediaType:(0,Pi.w)(i.mediaType),index:t},i.uri)}))})]})}))},65796:(e,t,i)=>{"use strict";i.d(t,{b:()=>l,Z:()=>c});var n=i(30758),r=i(75296),a=i(78487),s=i(33016),o=i(32411);const l={playlistActionBar:"playlist-action-bar"},c=(e,t,i,c)=>{const{seen:u,setSeen:d}=(0,s.i)(),[m,p]=(0,n.useState)(!u),[h,g]=(0,n.useState)(!1),{toggleActivationVisible:f}=(0,a.R)(),v=(0,r.K)(r.X.SmartShuffle),y=m&&!!e?.includes(o.j.SMART_SHUFFLE)&&!f&&i;return(0,n.useLayoutEffect)((()=>{y&&d(!0),v&&t===l.playlistActionBar&&c===o.j.OFF&&g(!0)}),[y,d,v,t,g,c]),[y,p,h,g]}},59490:(e,t,i)=>{"use strict";i.d(t,{XR:()=>s});var n=i(81987),r=i(62943);let a=function(e){return e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e}({});const s=(e=!1)=>((e=!1)=>(0,n.NC)(r.uy,e?void 0:{loadingValue:!1})?a.ENABLED:a.DISABLED)(e)===a.ENABLED},61943:(e,t,i)=>{"use strict";i.d(t,{t:()=>y});var n=i(30758),r=i(11808),a=i(22911),s=i(19316),o=i(36011),l=i(95273),c=i(73879),u=i(71359),d=i(86070);var m=i(73015),p=i(52608),h=i(99744),g=i(85993),f=i(50486),v=i(48604);const y=({uri:e,uid:t=e,contextUri:i,onAddRecommendation:y,onRemoveRecommendation:b,onUndo:_})=>{const E=(0,v.m)(),C=(0,h.z)(),{enqueueSnackbar:x,closeSnackbar:S}=(0,m.d)(),A=(0,n.useRef)(),[T,I]=(0,n.useState)(!1),N=(0,n.useRef)(),w=!(0,p.n)(),{isActive:R}=(0,g.te)(e),{description:k}=(0,f.f)(),O=function(e){const{enqueueCustomSnackbar:t}=(0,u.i)();return(0,n.useCallback)((()=>t((0,d.jsx)(a.O,{children:(0,d.jsx)(l.P,{center:(0,d.jsx)(o.z,{children:r.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback")}),trailing:(0,d.jsx)(s.M,{ctaText:r.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback-undo"),onCtaClick:e})})}),{autoHideDuration:c.r,preventDuplicate:!1,identifier:r.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback")})),[t,e])}((0,n.useCallback)((()=>{clearTimeout(A.current),x(r.Ru.get("web-player.smart-shuffle.removed-from-recommendations-feedback-undone")),I(!1),_?.()}),[x,_])),P=(0,n.useCallback)((async()=>{T||(R&&C.skipToNext(),w?x(r.Ru.get("web-player.smart-shuffle.offline-remove-recommendation-feedback")):(I(!0),N.current=O(),A.current=setTimeout((async()=>{try{await E.sendSignal(i,"minus",t)}catch(e){S(N.current),x(r.Ru.get("error-dialog.generic.header"))}I(!1)}),3e3),b?.()))}),[S,i,O,x,R,w,b,C,E,t,T]);return{addRecommendation:(0,n.useCallback)((async()=>{if(T)return;if(w)return void x(r.Ru.get("web-player.smart-shuffle.offline-add-recommendation-feedback"));I(!0);let e=k?r.Ru.get("web-player.smart-shuffle.add-to-playlist-feedback",k):r.Ru.get("web-player.smart-shuffle.add-to-playlist-feedback-fallback");try{await E.sendSignal(i,"plus",t)}catch(t){e=r.Ru.get("error-dialog.generic.header")}x(e),I(!1),y?.()}),[i,k,x,w,y,E,t,T]),removeRecommendation:P}}},33016:(e,t,i)=>{"use strict";i.d(t,{i:()=>r});var n=i(75235);const r=()=>{const[e,t]=(0,n.x)("smart-shuffle-seen",!1);return{seen:e,setSeen:t}}},18013:(e,t,i)=>{"use strict";i.d(t,{a:()=>u});var n=i(56013),r=i(55160),a=i(38404),s=i(54164),o=i(2435),l=i(87220),c=i(86070);const u=({size:e,withSnackbar:t})=>{const i=(0,o.o)((e=>e?.context),((e,t)=>e?.uri===t?.uri)),{title:u}=(0,a.g)(!0),{canToggleShuffle:d}=(0,s.V)();return(0,l.O)(i)?(0,c.jsx)(r.Y,{size:e,contextUri:i.uri,entityName:u??"",isActive:!0,activationPlacement:"top",offsetDotDistance:!1,withPadding:!0,disabled:!d,withActivation:!1,withSnackbar:t}):(0,c.jsx)(r.u,{size:e,shuffleModeConfig:{icon:n.p},shuffleIsOn:!1,disabled:!0,withPadding:!0})}},85939:(e,t,i)=>{"use strict";i.d(t,{Y:()=>n.Y});var n=i(55160)},5159:(e,t,i)=>{"use strict";i.d(t,{o:()=>A});var n=i(30758),r=i(97500),a=i.n(r),s=i(30171),o=i(34489),l=i(83547),c=i(67973),u=i(61544),d=i(11808),m=i(53129),p=i(61943),h=i(32994),g=i(42116),f=i(50486),v=i(42299),y=i(79303),b=i(72091);const _="VcqCvLW71lZT4kqnCgt0";var E=i(86070);const C=({contextUri:e="",uri:t,id:i=t,className:r,canAdd:u})=>{const{description:v}=(0,f.f)(),C=(0,y.s)(),{spec:x}=(0,b.r)(c.A,{data:{uri:e}}),S=(0,n.useCallback)((()=>{C.logInteraction(x.undoButtonFactory({uri:t}).hitUiHide())}),[C,x,t]),A=(0,n.useCallback)((()=>{C.logInteraction(x.removeRecommendationButtonFactory({uri:t}).hitRemoveRecommendation({recommendedItemUri:t,contextUri:e}))}),[e,C,x,t]),T=(0,n.useCallback)((()=>{C.logInteraction(x.addRecommendationButtonFactory({uri:t}).hitAddToPlaylist({playlist:e,itemToBeAdded:t}))}),[e,C,x,t]),{removeRecommendation:I,addRecommendation:N}=(0,p.t)({uri:t,uid:i,contextUri:e,onUndo:S,onRemoveRecommendation:A,onAddRecommendation:T}),w=(0,n.useCallback)((()=>v?d.Ru.get("web-player.smart-shuffle.add-to-playlist-button",v):d.Ru.get("web-player.smart-shuffle.add-to-playlist-button-fallback")),[v]),R=(0,g.y)();return(0,E.jsxs)("div",{className:a()(_,r),children:[(0,E.jsx)(m.Zp,{label:d.Ru.get("web-player.smart-shuffle.removed-from-recommendations-button"),children:(0,E.jsx)(s.H,{onClick:I,iconOnly:o.P,size:R===h.E.MEDIUM?"medium":"small","aria-label":d.Ru.get("web-player.smart-shuffle.removed-from-recommendations-button"),condensedAll:!0})}),u&&(0,E.jsx)(m.Zp,{label:w(),children:(0,E.jsx)(s.H,{onClick:N,iconOnly:l.P,size:R===h.E.MEDIUM?"medium":"small","aria-label":w(),condensedAll:!0})})]})},x=e=>{const t=(0,v.J)(e.contextUri);return(0,E.jsx)(C,{...e,canAdd:t?.canAdd??!1})},S=e=>(0,E.jsx)(C,{...e,canAdd:!0}),A=e=>e.contextUri&&(0,u.tb)(e.contextUri)?(0,E.jsx)(x,{...e,contextUri:e.contextUri}):e.contextUri&&(0,u.Z0)(e.contextUri)?(0,E.jsx)(S,{...e,contextUri:e.contextUri}):(0,E.jsx)(C,{...e,canAdd:!1})},93843:(e,t,i)=>{"use strict";i.d(t,{$:()=>l});var n=i(61544),r=i(70825),a=i(72814),s=i(32411);const o="tap";function l(e,t,i,l){const u=e.getEvents();u.addListener(a.gd.ACTION,(async d=>{if(d.data.action!==a.Ik.PLAY)return;if(m=d.data.context.uri,!(0,n.tb)(m)&&!(0,r.Z0)(m))return;var m;const p=d.data;if(!(await i.getContextualShuffleMode(p.context.uri)===s.j.SMART_SHUFFLE))return;const h=await async function(e,t){const{context:i,options:{skipTo:r}}=t;if(!r?.uid&&!r?.uri)return null;const{uid:s,uri:o}=r;let l=null;const u=await Promise.race([new Promise((t=>{l=e=>{e.data?.context.uri&&(0,n.B2)(e.data?.context.uri,i.uri)&&(s&&e.data?.item?.uid===s||o&&e.data?.item?.uri===o)&&t(e.data)},e.addListener(a.gd.UPDATE,l)})),new Promise((e=>setTimeout(e,c,null)))]);l&&e.removeListener(a.gd.UPDATE,l);return u}(u,p);if(!h?.item?.uid)return;const{lensUri:g}=await l.getEligibility(p.context.uri);try{await t.sendSignal(g,o,h.item.uid),await e.refreshCurrentContext()}catch(e){}}))}const c=5e3},96887:(e,t,i)=>{"use strict";i.d(t,{m:()=>s});var n=i(47342),r=i(32411);const a="reset";function s(e,t,i,s,o){e.getEvents().addListener(n.S.UPDATE_COMPLETE,(async({data:{contextURI:e,shuffleMode:n}})=>{if(n!==r.j.SMART_SHUFFLE||!o.getState()?.activeDevice?.isLocal)return;const{lensUri:l}=await t.getEligibility(e);try{await s.sendSignal(l,a),await i.refreshCurrentContext()}catch(e){}}))}},10115:(e,t,i)=>{"use strict";i.d(t,{N:()=>n});const n=e=>"enhanced_recommendation"===e?.metadata?.provider&&"queue"!==e?.provider},471:(e,t,i)=>{"use strict";i.d(t,{X:()=>n.XR});var n=i(59490)},73879:(e,t,i)=>{"use strict";i.d(t,{r:()=>n});const n=7e3},70105:(e,t,i)=>{"use strict";function n({prefix:e="id"}={}){return`${e}-${`${(new Date).getTime()}${Math.random()}`}`}i.d(t,{g:()=>n})},71359:(e,t,i)=>{"use strict";i.d(t,{i:()=>s});var n=i(30758),r=i(93240),a=i(70105);function s(){const{enqueueSnackbar:e,closeSnackbar:t}=(0,r.dh)();return{enqueueCustomSnackbar:(0,n.useCallback)(((t,i)=>{const n=function(e){return"keyPrefix"in e}(i);if(n){const{keyPrefix:n,...r}=i,s=(0,a.g)({prefix:n});return e(s,{variant:"headless",children:t,key:s,...r})}const{identifier:r,...s}=i;return e(r,{variant:"headless",children:t,...s})}),[e]),closeSnackbar:t}}},41781:(e,t,i)=>{"use strict";i.d(t,{h:()=>a});var n=i(30758),r=i(95114);function a(){return(0,n.useContext)(r.J2)}},73015:(e,t,i)=>{"use strict";i.d(t,{d:()=>s});var n=i(30758),r=i(93240),a=i(70105);function s(){const{enqueueSnackbar:e,closeSnackbar:t}=(0,r.dh)();return{enqueueSnackbar:(0,n.useCallback)(((t,i)=>{if(!i)return e(t,{variant:"default"});if(function(e){return"keyPrefix"in e}(i)){const{keyPrefix:n,...r}=i;return e(t,{variant:"default",key:(0,a.g)({prefix:n}),...r})}return e(t,{variant:"default",...i})}),[e]),closeSnackbar:t}}},65519:(e,t,i)=>{"use strict";i.d(t,{c:()=>a,t:()=>s});var n=i(61544);const r=e=>({url:e}),a=e=>{const t=[];return e.largeImageUrl?t.push(r(e.largeImageUrl)):e.imageUrl&&t.push(r(e.imageUrl)),{displayName:e.displayName,images:t,username:e.username,uri:(0,n.Qj)(e.username).toURI()}},s=(e,t,i)=>{const n=[],r=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId));r&&n.push(r);const s=e.isSessionOwner?void 0:e?.sessionMembers.find((({username:e})=>e===t));s&&(i?.userFirst?n.unshift(s):n.push(s));const o=e.sessionMembers.filter((({username:i,id:n})=>n!==e.sessionOwnerId&&i!==t));return[...n,...o].map(a)}},27563:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n={PARTICIPANTS_PAGE:"/socialsession/participant-list"}},77607:(e,t,i)=>{"use strict";i.d(t,{y:()=>s});var n=i(12804),r=i(86523),a=i(69052);const s=()=>{const e=(0,r.d)(),t=(0,n.C)();return e.getEnabled()===a._.ENABLED&&t===a.l.PREMIUM}},61967:(e,t,i)=>{"use strict";i.d(t,{Y:()=>S});var n=i(30758),r=i(72224),a=i(61544),s=i(39733),o=i(82852),l=i(30293),c=i(30015),u=i(50518),d=i(15742);i(8385);const m=Spicetify.GraphQL.Definitions["getAlbumNameAndTracks"]=new d.l("getAlbumNameAndTracks","query","5a0d4729518c17325756a3a9fdab0db7feeaf9f913e790de28bc53240b808d85",null),p=200;const h=Spicetify.GraphQL.Definitions["getArtistNameAndTracks"]=new d.l("getArtistNameAndTracks","query","0adaf1a1a8a94c7ed095639c4d9456d2b1cfac16ac511d5dd2b01b6dd89f748a",null),g=200;const f=200;const v=2e3;async function y(e,t,i,n=v){const r=(0,a.o_)(i);if(!r)throw new Error(`Could not parse uri: ${i}`);const s=function(e,t,i,n){switch(e){case"album":return function(e,t){return async(i,n=p)=>{const r=await t(m,{uri:e,offset:i,limit:n});if("Album"===r?.data?.albumUnion?.__typename){const{name:t,tracks:i}=r.data.albumUnion;return{name:t,trackUris:i.items.map((e=>e.track.uri)),nextOffset:i.pagingInfo.nextOffset,contextUri:e}}throw new Error(`Error while requesting ${e} content`)}}(t,i);case"artist":return function(e,t){return async(i,n=g)=>{const r=await t(h,{uri:e,offset:i,limit:n});if("Artist"===r?.data?.artistUnion?.__typename){const t=r.data.artistUnion.profile.name,i=r.data.artistUnion.discography.topTracks;return{name:t,trackUris:i.items.map((e=>e.track.uri)),nextOffset:i.pagingInfo.nextOffset,contextUri:e}}throw new Error(`Error while requesting ${e} content`)}}(t,i);case"playlist":case"playlist-v2":return function(e,t){return async(i,n=f)=>{const r=await t.getPlaylist(e,{},{offset:i,limit:n}),{totalLength:a}=r.contents,s=i+r.contents.items.length,o=s<a?i+s:null;return{name:r.metadata.name,trackUris:r.contents.items.map((e=>e?.uri)).filter((e=>!!e)),nextOffset:o,contextUri:e}}}(t,n);default:throw new Error(`Can not fetch tracks for context type ${e}`)}}(r.type,i,e,t);return async function(e,t){return async function i(n){const{name:r,trackUris:a,nextOffset:s}=await e(n,t);if(0===a.length)throw new Error(`fetcher [${e.name}] returned empty uri list`);if(null!==s&&s<t){if(s<=n)throw new Error("nextOffset must be higher than offset");return{name:r,trackUris:[...a,...(await i(s)).trackUris]}}return{name:r,trackUris:a}}(0)}(s,n)}var b=i(69916),_=i(99744),E=i(48604),C=i(42047);const x=200;function S(){const{createSession:e}=(0,C.D)(),t=(0,l.Z)(),{openQueue:i}=(0,o.R)(),d=(0,s.vh)(),m=(0,c.c)(),p=function(){const e=(0,_.z)(),t=(0,E.m)(),{request:i}=(0,n.useContext)(b.j);return(0,n.useCallback)((async(n,r)=>{if(r)e.play({uri:n.toURI()},{featureIdentifier:"jam",referrerIdentifier:"deeplink"});else{const r=await y(i,t,n.toURI(),x);e.addToQueue(r.trackUris.map((e=>({uri:e,uid:null}))))}}),[e,t,i])}();return(0,n.useCallback)((async n=>{const s=await e();if(!s)throw new Error("Failed to create Jam");if(d.send((0,r.q)({session_id:s.sessionId,device_type:m.deviceType,tech_type:m.techType,session_uri:s.joinSessionUri,session_type:u.dF.REMOTE})),s.joinSessionShortLink&&t(s.joinSessionShortLink),n?.contextType&&n.id){const e=(0,a.o_)(`spotify:${n.contextType}:${n.id}`,[a.NQ.ALBUM,a.NQ.ARTIST,a.NQ.PLAYLIST_V2]);e&&p(e,n.play)}i()}),[e,d,m.deviceType,m.techType,i,t,p])}},30015:(e,t,i)=>{"use strict";i.d(t,{c:()=>d});var n=i(50518),r=i(63753),a=i(42875),s=i(14403),o=i(28004);const l={techType:n.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]:n.PJ.BLUETOOTH,[r.Yg.BUILT_IN]:n.PJ.WIRED,[r.Yg.DISPLAY_DEVICE]:n.PJ.DISPLAY_DEVICE,[r.Yg.UNKNOWN]:n.PJ.UNKNOWN,[r.Yg.USB]:n.PJ.WIRED,[r.Yg.VIRTUAL]:n.PJ.VIRTUAL};function d(){const e=(0,s.v)((e=>e.activeDevice),((e,t)=>e?.id===t?.id)),t=(0,a.b)();if(e&&!e.isLocal){return{techType:e.type===o.bq.CAST_VIDEO||e.type===o.bq.CAST_AUDIO?n.PJ.CAST:n.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}},12804:(e,t,i)=>{"use strict";i.d(t,{C:()=>a});var n=i(30758),r=i(86523);function a(){const e=(0,r.d)(),[t,i]=(0,n.useState)(e.getJamExperience());return function(e){const t=(0,r.d)();(0,n.useEffect)((()=>t.addJamExperienceListener(e)),[e,t])}((0,n.useCallback)((e=>i(e)),[])),t}},99451:(e,t,i)=>{"use strict";i.d(t,{R:()=>s});var n=i(30758),r=i(71434),a=i(72091);const s=()=>{const{spec:e,logger:t}=(0,a.r)(r.T,{});return{logRemoveClick:(0,n.useCallback)(((i,n)=>{t.logInteraction(e.buttonRowFactory().removeButtonFactory().hitRemoveParticipant({participantId:i,sessionId:n}))}),[t,e])}}},80561:(e,t,i)=>{"use strict";i.d(t,{_:()=>v});var n=i(41978),r=i(91903),a=i(61544),s=i(11808),o=i(90751),l=i(83542),c=i(77607),u=i(61967),d=i(13874),m=i(42582),p=i(42047),h=i(79303),g=i(86070);const f=({contextUri:e,uri:t,spec:i})=>{const c=(0,h.s)(),{currentSession:f}=(0,p.D)(),v=e&&!(0,a.Th)(e),y=v?e:t,{triggerPlay:b,isActive:_}=(0,m.P)({uri:y},{featureIdentifier:"group_session_context_menu"}),E=(0,n.wA)(),C=(0,u.Y)();return f?.active?null:(0,g.jsx)(l.D,{role:"menuitem",onClick:async()=>{const e=i.createJamButtonFactory().hitUiNavigate({destination:t});e&&c.logInteraction(e);try{await C(),_||b({...v&&{skipTo:{uri:t}}})}catch(e){E((0,o.A9)(d.EL.ERROR))}},leadingIcon:(0,g.jsx)(r.V,{semanticColor:"textSubdued",size:"small"}),children:s.Ru.get("web-player.social-connect.menu-action.title")})},v=e=>(0,c.y)()?(0,g.jsx)(f,{...e}):null},79904:(e,t,i)=>{"use strict";i.d(t,{p:()=>f});var n=i(30758),r=i(12783),a=i(30171),s=i(43178),o=i(11808),l=i(73015),c=i(98406),u=i(75235);const d="pIxPdfuNasUDLbEDmuK_",m="T5TwrUTf23N311rgrEAc",p="BTwQUS5iBiiOBgdda2Zi",h="lu2OTpzgQ6hv6AYWXMNQ";var g=i(86070);const f=({localStorageKey:e,onDismiss:t})=>{const[i,f]=(0,u.x)(e,!1),{enqueueSnackbar:v}=(0,l.d)(),y=(0,n.useCallback)((()=>{f(!0),t&&t(),v(o.Ru.get("web-player.social-connect.promotion.how-to-start-a-jam-reminder"),{autoHideDuration:5e3})}),[v,t,f]);return i?(0,g.jsx)(g.Fragment,{}):(0,g.jsxs)("div",{className:d,children:[(0,g.jsxs)("div",{className:m,children:[(0,g.jsx)(r.E,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",children:o.Ru.get("web-player.social-connect.invitation-modal.subtitle")}),(0,g.jsx)(a.H,{iconOnly:s.M,className:p,"aria-label":o.Ru.get("close"),onClick:y,size:"small"})]}),(0,g.jsx)("div",{className:h,children:(0,g.jsx)(c.$,{})})]})}},47158:(e,t,i)=>{"use strict";i.d(t,{y:()=>n.y});var n=i(77607)},50518:(e,t,i)=>{"use strict";i.d(t,{JO:()=>s,Mm:()=>n,PJ:()=>a,dF:()=>r});let n=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}({}),a=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}({}),s=function(e){return e.DEEPLINKING="deeplinking",e}({})},9285:(e,t,i)=>{"use strict";i.d(t,{i:()=>r});var n=i(8059);const r=e=>{const t=(0,n.L)(),i=t?.item?.metadata?.["save_track.uri"],r=t?.item?.uri;return i&&r===e?i:e}},8144:(e,t,i)=>{"use strict";i.d(t,{k:()=>u});var n=i(30758),r=i(81987),a=i(19159),s=i(63051),o=i(2435),l=i(41753);const c=(e,t)=>!(!Array.isArray(e)||!Array.isArray(t))&&(e===t||e.length===t.length&&e.every((e=>t.includes(e)))),u=()=>{const e=(0,o.o)((e=>e?.signals),c),t=(0,r.NC)(a.J1t,{loadingValue:!1}),i=(0,s.l)(),u=(0,o.o)((e=>{const t=e?.restrictions.disallowSignals[l.L.SWITCH_TO_VIDEO]?.includes("not_supported_by_device")??!1,i=!e?.restrictions.disallowSignals[l.L.SWITCH_TO_VIDEO]?.includes("no_associated_track");return t&&i}))&&i,d=Boolean(e?.includes(l.L.SWITCH_TO_VIDEO)),m=Boolean(e?.includes(l.L.SWITCH_TO_AUDIO)),p=m||d||!!t&&u,h=m;return(0,n.useMemo)((()=>({isSongVideo:p,isSongVideoPlayingVideo:h,isSongVideoDeviceRestricted:u})),[p,h,u])}},30270:(e,t,i)=>{"use strict";i.d(t,{VW:()=>h,rt:()=>T,Mu:()=>v,xF:()=>y,oQ:()=>g,E6:()=>I,Zo:()=>C});var n=i(30758),r=i(41978),a=i(37574),s=i(81987),o=i(39733),l=i(4096),c=i(21233),u=i(19159),d=i(47721),m=i(7939),p=i(95625);let h=function(e){return e.QueuePage="queue_page_exposures",e.QueuePanel="queue_panel_exposures",e}({});const g=e=>{const t=(0,r.d4)(d.JJ),i=(0,o.vh)(),h=(0,l.c)(),g=(0,r.d4)(m.oo),f=(0,s.NC)(u.tqn);(0,n.useEffect)((()=>{const n={category:e,action:e,variant:f,context:g,label:"dwp",os:(0,c.f)(),country:t,sp_t:(0,p.v8)("sp_t")};h&&i.send((0,a._)(n))}),[e,t,i,h,g,f])};var f=i(20842);let v=function(e){return e.NowPlayingBar="now_playing_bar_track_title_click",e.NowPlayingView="now_playing_view_track_title_click",e}({});const y=e=>{const t=(0,o.vh)(),i=(0,r.d4)(d.JJ),a=(0,r.d4)(m.oo),h=(0,l.c)(),g=(0,s.NC)(u.tqn);return(0,n.useCallback)((async({categoryAndAction:n,destinationUrl:r})=>{const s={category:n,action:n,variant:g,label:"dwp",os:(0,c.f)(),destination_url:r,context:JSON.stringify({uri:e,product:a}),country:i,sp_t:(0,p.v8)("sp_t")};h&&t.send((0,f._)(s))}),[g,e,a,i,h,t])};var b=i(9183),_=i(84738),E=i(93561);const C=()=>{const e=(0,l.c)(),t=(0,b.zy)(),i=(0,s.NC)(u.tqn);if(!e)return{trackPageEnhancedEnabled:!1,trackPageLinksNoLyricsEnabled:!1,trackPageNoLyricsEnabled:!1};const n=(0,_.oC)(E.P.TrackPageEnhanced,t),r=(0,_.oC)(E.P.TrackPageLinksNoLyrics,t),a=(0,_.oC)(E.P.TrackPageNoLyrics,t),o=i===u.dHy.ENHANCED,c=i===u.dHy.LINKS_NO_LYRICS,d=i===u.dHy.NO_LYRICS;return{trackPageEnhancedEnabled:!a&&!r&&(n||o),trackPageLinksNoLyricsEnabled:!n&&!a&&(r||c),trackPageNoLyricsEnabled:!n&&!r&&(a||d)}};var x=i(8159),S=i(40353),A=i(63198);let T=function(e){return e.HasLyrics="has-lyrics",e.NoLyrics="no-lyrics",e.Ineligible="ineligible",e}({});const I=e=>{const t=(0,r.d4)(d.JJ),i=(0,A.V)(),n=(0,o.vh)(),h=(0,l.c)(),g=(0,r.d4)(m.oo),f=(0,s.NC)(u.tqn);return(0,x.YQ)((()=>{const r={category:"track_page_exposures",action:"track_page_exposures",context:JSON.stringify({exposure:e,product:g}),variant:f,label:"dwp",os:(0,c.f)(),country:t,sp_t:(0,p.v8)("sp_t")};h&&(i?n.send((0,S.r)(r)):n.send((0,a._)(r)))}),1500)}},66108:(e,t,i)=>{"use strict";i.d(t,{g:()=>n});let n=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}({})},39191:(e,t,i)=>{"use strict";i.d(t,{H:()=>o,u:()=>s});var n=i(30758),r=i(80801),a=i(12203);const s=()=>(0,n.useContext)(a.U),o=()=>(0,n.useContext)(r.N)},12762:(e,t,i)=>{"use strict";i.d(t,{g:()=>n.g});var n=i(66108)},32620:(e,t,i)=>{"use strict";i.d(t,{u:()=>s});var n=i(30758),r=i(39191),a=i(86070);const s=({pageId:e,uri:t,children:i})=>{const s=(0,r.u)(),o=(0,r.H)();return(0,n.useEffect)((()=>{s?.reportPageView({pageId:e,navigationalRoot:o??void 0,entityUri:t})}),[e,o,s,t]),(0,a.jsx)(a.Fragment,{children:i})}},77146:(e,t,i)=>{"use strict";i.d(t,{d:()=>o});var n=i(30758),r=i(41978),a=i(23431),s=i(22526);const o=()=>{const e=(0,r.wA)(),t=(0,r.d4)(a.C);return{videoPlayerMode:(0,r.d4)(a.c),setVideoPlayerUIFlag:(0,n.useCallback)(((t,i)=>{e((0,s.Kp)(t,i))}),[e]),videoPlayerUIFlags:t}}},19287:(e,t,i)=>{"use strict";i.d(t,{d:()=>n.d});var n=i(77146)},23431:(e,t,i)=>{"use strict";i.d(t,{C:()=>n.C,c:()=>n.c});var n=i(67851)},91947:(e,t,i)=>{"use strict";i.d(t,{K:()=>r,n:()=>n});let n=function(e){return e.videoAvailable="videoAvailable",e.fullscreen="fullscreen",e.cinema="cinema",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.pip="pip",e.documentPip="documentPip",e.fullscreen="fullscreen",e.nowPlayingBar="nowPlayingBar",e}({})},22526:(e,t,i)=>{"use strict";i.d(t,{Kp:()=>a,R2:()=>r,kX:()=>n});let n=function(e){return e.SET_VIDEO_MODE="SET_VIDEO_MODE",e.SET_VIDEO_UI_FLAG="SET_VIDEO_UI_FLAG",e}({});const r=e=>({type:n.SET_VIDEO_MODE,mode:e}),a=(e,t)=>({type:n.SET_VIDEO_UI_FLAG,key:e,value:t})},66698:(e,t,i)=>{"use strict";i.d(t,{F3:()=>s,sN:()=>a});var n=i(91947),r=i(22526);const a={fullscreen:!1,cinema:!1,npv:!1,pip:!1,videoAvailable:!1,documentPip:!1,nowPlayingBar:!1},s=(e={isSubtitlesEnabled:!1,uiFlags:a,mode:n.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:a}=t,s={...e.uiFlags,[r]:a};return{...e,mode:(i=s,i.videoAvailable?i.fullscreen?n.K.fullscreen:i.cinema?n.K.cinema:i.pip?n.K.pip:i.documentPip?n.K.documentPip:i.npv?n.K.npv:i.nowPlayingBar?n.K.nowPlayingBar:n.K.none:n.K.none),uiFlags:s}}default:return e}var i}},67851:(e,t,i)=>{"use strict";i.d(t,{C:()=>s,c:()=>a});var n=i(91947),r=i(66698);const a=e=>e.ui?.videoPlayer?.mode??n.K.none,s=e=>e.ui?.videoPlayer?.uiFlags??r.sN},46990:(e,t,i)=>{"use strict";i.d(t,{a:()=>s});var n=i(60870),r=i(82447),a=i(75235);const s=()=>{const[e,t]=(0,a.x)("view-mode",r.I.LIST);let i=e;return n.p.includes(i)||(i=r.I.LIST),{viewMode:i,isCompactMode:i===r.I.COMPACT,setViewMode:t}}},38637:(e,t,i)=>{"use strict";i.d(t,{a:()=>n.a});var n=i(46990)},82447:(e,t,i)=>{"use strict";i.d(t,{I:()=>n});let n=function(e){return e.LIST="list",e.COMPACT="compact",e}({})},47315:(e,t,i)=>{"use strict";i.d(t,{P:()=>l});var n=i(30758),r=i(9183),a=i(14403),s=i(28004),o=i(99744);function l(){const e=(0,o.z)(),t=(0,a.v)((({connectionStatus:e})=>e===s.zP.NOT_CONNECTED)),i=function(){const e=(0,r.zy)(),t=(0,r.Zp)();return i=>{const n="object"==typeof e.state?e.state:{};t(e.pathname,{replace:!0,state:{...n,watchFeed:{...n?.watchFeed,...i}}})}}();return{open:(0,n.useCallback)(((n,r,a="")=>{const s=e.getState();let o=!1;s?.item&&!s?.isPaused&&t&&(e.pause(),o=!0),i({isOpen:!0,firstItemUri:a,sectionUri:n,discoveryFeedUri:r,resumeOnClose:o})}),[t,e,i]),close:(0,n.useCallback)((({resumePlayback:n,forceClose:r=!1})=>{const a=e.getState();a?.isPaused&&t&&n&&e.resume(),r||i({isOpen:!1,firstItemUri:null,sectionUri:null,discoveryFeedUri:null,resumeOnClose:!1})}),[t,e,i]),updateLocationState:i}}},49141:(e,t,i)=>{"use strict";i.d(t,{S:()=>r});var n=i(9183);function r(){const e=(0,n.zy)(),t=(0,n.wQ)();if(!e.state?.watchFeed)return{isOpen:!1,sectionUri:null,discoveryFeedUri:null,firstItemUri:null,lastSeenItemUri:null,resumeOnClose:!1};const i=e.state?.watchFeed;return"POP"===t?{...i,firstItemUri:e.state?.watchFeed?.lastSeenItemUri}:i}},10044:(e,t,i)=>{"use strict";i.d(t,{Mz:()=>a,N6:()=>r,Ym:()=>s,wn:()=>n});const n="37i9dQZF1EYkqdzj48dyYq",r=`spotify:playlist:${n}`,a=["37i9dQZF1EYkqdzj8OSOas","37i9dQZF1EYkqdzjdvy3mw","37i9dQZF1EYkqdzjicdiyA","37i9dQZF1EYkqdzjmSSxKE","37i9dQZF1EYkqdzjrzxMWI"],s="#0A59B8"},10608:(e,t,i)=>{"use strict";i.d(t,{HS:()=>a,bJ:()=>s,c0:()=>r});var n=i(10044);const r=e=>e===n.N6||n.Mz.map((e=>`spotify:playlist:${e}`)).includes(e),a=e=>r(e?.uri||"")||"your_dj"===e?.metadata?.lexicon_set_type,s=(e,t)=>a(e)&&"true"===t?.metadata?.is_narration},54565:(e,t,i)=>{"use strict";i.d(t,{N:()=>c,_:()=>u});var n=i(25639),r=i(58717),a=i(10044),s=i(42582),o=i(48604);const l=["useYourDJContextMetadata"],c=()=>{const e=(0,o.m)(),{data:t,error:i}=(0,n.I)({queryKey:l,queryFn:()=>e.getMetadata(a.N6,{decorateFormatListData:!0}),gcTime:36e5,placeholderData:r.rX});return{metadata:t,error:i}},u=e=>{const{featureIdentifier:t="unknown",referrerIdentifier:i}=e||{},{metadata:n,error:r}=c();return{context:(0,s.P)({uri:a.N6,url:n?.formatListData?.attributes.lexicon_context_url},{featureIdentifier:t,referrerIdentifier:i}),metadata:n,error:r}}},77227:(e,t,i)=>{"use strict";i.d(t,{F:()=>u});var n=i(30758),r=i(81987),a=i(78519),s=i(10044),o=i(19159),l=i(62720),c=i(75235);const u=()=>{const e=(0,r.NC)(o.jif,{loadingValue:!1}),[t,i]=(0,l.A)(s.N6,!1),[u,d]=(0,c.x)(a.r,!1),[m,p]=(0,c.x)("dj.addedToLibraryOnce",!1),h=(0,n.useCallback)((()=>{m||t||e&&(d(!0),p(!0),i(!0))}),[m,t,i,p,e,d]),g=(0,n.useCallback)((()=>{i(!0)}),[i]),f=(0,n.useCallback)((()=>{i(!1)}),[i]);return{isDJInLibrary:t,setDJAddedToLibraryOnceLocalStorage:p,maybeAddDJToLibrary:h,addDJToLibrary:g,removeDJFromLibrary:f}}},46597:(e,t,i)=>{"use strict";i.d(t,{I:()=>a});var n=i(63301),r=i(2435);const a=()=>{const{isYourDJContext:e,isYourDJNarrator:t}=(0,n.C)(),i=(0,r.o)((e=>e?.isPaused));return void 0===i?{isPlaying:!1,isNarrating:!1}:{isPlaying:e&&!i,isNarrating:t&&!i}}},63301:(e,t,i)=>{"use strict";i.d(t,{C:()=>a});var n=i(10608),r=i(2435);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));return e?{isYourDJContext:(0,n.HS)(e.context),isYourDJNarrator:(0,n.bJ)(e.context,e.item)}:{isYourDJContext:!1,isYourDJNarrator:!1}}},2983:(e,t,i)=>{"use strict";i.d(t,{gb:()=>h.g,fW:()=>Ye,ed:()=>W,aU:()=>ae,mA:()=>Ne,IT:()=>ce,tW:()=>Fe,cW:()=>we.c});var n=i(97500),r=i.n(n),a=i(4594),s=i(30758),o=i(12783),l=i(98632),c=i(11808),u=i(97393),d=i(39796),m=i(71588),p=i(27685),h=i(35219),g=i(50513);const f=e=>e/2-e/2*22*2/169,v=e=>22*e/169,y=[{name:"rear",color:"#1E95D7",loudnessAnimation:{multiplier:.1},idleAnimation:null},{name:"middle",color:"#1ED7BC",loudnessAnimation:{multiplier:.4},idleAnimation:{xScale:.95,yScale:1.05,clockwise:!1,beginTime:1800,duration:3600}},{name:"fore",color:"#19E68C",loudnessAnimation:{multiplier:1},idleAnimation:{xScale:1.05,yScale:.95,clockwise:!0,beginTime:0,duration:2*Math.PI/3*1e3}}];var b=i(86070);const _=({animateSource:e,repeatCount:t="indefinite"})=>(0,b.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,b.jsx)(b.Fragment,{children:(0,b.jsxs)("defs",{children:[(0,b.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,b.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,b.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,b.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,b.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,b.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,b.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"2s",from:"0",to:"1",xlinkHref:`#${e}_time_group`})]})}),(0,b.jsxs)("g",{id:"_R_G",children:[(0,b.jsxs)("g",{id:"_R_G_L_2_G",transform:" translate(150, 150) translate(0, 0)",children:[(0,b.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,b.jsx)("path",{id:`${e}_R_G_L_2_G_D_1_P_0`,stroke:"#1e95d7",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,b.jsxs)("g",{id:"_R_G_L_1_G",transform:" translate(150, 150) translate(0, 0)",children:[(0,b.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,b.jsx)("path",{id:`${e}_R_G_L_1_G_D_1_P_0`,stroke:"#1ed7bc",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,b.jsxs)("g",{id:"_R_G_L_0_G",transform:" translate(150, 150) translate(0, 0)",children:[(0,b.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,b.jsx)("path",{id:`${e}_R_G_L_0_G_D_1_P_0`,stroke:"#19e68c",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,b.jsx)("g",{id:`#${e}_time_group`})]});var E=i(34629),C=i(73356),x=i(26969);class S{constructor(e,t){this.x=e,this.y=t}static fromRadiusAndAngle(e,t){return new S(e*Math.cos(t),e*Math.sin(t))}static sum(e,t){return new S(e.x+t.x,e.y+t.y)}static mul(e,t){return new S(e*t.x,e*t.y)}controlPoint(e,t){return S.sum(this,S.fromRadiusAndAngle(e,t))}}var A=i(78230);const T=18.5/169;function I(e,t,i,n){const r=new S(e.x,e.y);if(n){const e=t/2*T*n.xScale,a=t/2*T*n.yScale,s=(i-n.beginTime)/n.duration,o=(n.clockwise?1:-1)*s*2*Math.PI;r.x+=e*Math.cos(o),r.y+=a*Math.sin(o)}const a=new Path2D;return a.arc(r.x,r.y,t,0,2*Math.PI),a}const N=({forceAlwaysInView:e})=>{const t=(0,s.useRef)(null),i=(0,s.useRef)(null),n=(0,s.useRef)(0),r=(0,s.useRef)(0),a=(0,E.v7)(),{ref:o,inView:l}=(0,g.Wx)({root:a.current,initialInView:!1}),c=(0,s.useCallback)((()=>{const e=performance.now();n.current=n.current||e;const i=e-n.current,r=t.current?.getContext("2d");if(t.current&&r){const e=t.current.width/window.devicePixelRatio;r.clearRect(0,0,t.current.width,t.current.height),function(e,t,i){const n=new S(t/2,t/2),r=f(t),a=v(r);e.lineWidth=a;for(const{color:t,idleAnimation:a}of y)e.strokeStyle=t,e.stroke(I(n,r,i,a))}(r,e,i)}}),[]),u=(0,s.useCallback)((()=>{t.current&&(r.current=requestAnimationFrame((()=>{c(),u()})))}),[c]),d=(0,s.useCallback)((()=>{if(!t.current?.parentElement)return;const{offsetWidth:e,offsetHeight:i}=t.current.parentElement,n=Math.min(e,i),r=window.devicePixelRatio||1,a=n*r;t.current.width=a,t.current.height=a,t.current.style.width=`${n}px`,t.current.style.height=`${n}px`;const s=t.current.getContext("2d");s?.scale(r,r)}),[]);(0,x.w)({onResize:(0,A.s)(d)(200),refOrElement:i});const m=(0,s.useCallback)((()=>(d(),(l||e)&&u(),()=>{cancelAnimationFrame(r.current)})),[d,u,l,e]);return(0,s.useEffect)((()=>()=>{cancelAnimationFrame(r.current)}),[]),(0,b.jsx)("div",{ref:i,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:(0,b.jsx)("canvas",{style:{width:"100%",height:"100%"},ref:e=>{o(e),t.current=e,m()}})})},w=e=>(0,C.j)()?(0,b.jsx)(_,{animateSource:!1}):(0,b.jsx)(N,{...e});var R=i(54565),k=i(77227),O=i(48905),P=i(72091);const L="rcvAUAKIXXHhbgYIALd6",j="diX3qTISyTDEx7TNJrxf",D="hcZhIWbB_uHEr2Zu61Mz",M="mWMNdMyzjQTUamoKvI3n",U="LT_9lqpf7DbYVqytlXKg",B="OrAzTU2IM8kYjcoNVliq",F="UDj7VTgRt15O8xLzVGE0",H="syVH7w1vO4Cq92dzuz2o",V="G6jC6RfEbQSTpAmpKIdq",G=({uri:e,title:t,description:i,forceAlwaysInView:n})=>{const{maybeAddDJToLibrary:a}=(0,k.F)(),{context:g}=(0,R._)({featureIdentifier:"your_dj_home_card",referrerIdentifier:"home"}),{togglePlay:f,isActive:v,isPlaying:y}=g,_=(0,b.jsx)(h.g,{}),{spec:E,logger:C}=(0,P.r)(l.y,{data:{uri:e,position:0,reason:""}}),x=(0,s.useCallback)((()=>{let t;v?t=y?E.cardPlayButtonFactory().hitPause({itemToBePaused:e}):E.cardPlayButtonFactory().hitResume({itemToBeResumed:e}):(t=E.cardPlayButtonFactory().hitPlay({itemToBePlayed:e}),a());const i=C.logInteraction(t);f({loggingParams:i})}),[f,v,y,C,E,e,a]),S=(0,s.useCallback)((e=>{"Enter"===e.code&&f()}),[f]),A=(0,O.t)(E);return(0,b.jsx)(m.h,{menu:_,children:(0,b.jsx)("div",{className:r()(L),children:(0,b.jsxs)("div",{className:j,onClick:x,onKeyDown:S,tabIndex:0,role:"button",ref:A,children:[(0,b.jsx)("div",{className:D,children:(0,b.jsx)("div",{className:M,children:(0,b.jsx)(w,{forceAlwaysInView:n})})}),(0,b.jsxs)("div",{className:U,children:[(0,b.jsxs)("div",{className:B,children:[(0,b.jsx)(o.E,{variant:"titleLarge",semanticColor:"textBase",children:t}),(0,b.jsx)("span",{className:H,children:"BETA"})]}),(0,b.jsx)(o.E,{variant:"bodySmall",className:F,children:i}),(0,b.jsxs)("div",{className:V,onClick:e=>{e.stopPropagation()},children:[(0,b.jsx)(p.R,{onClick:x,version:p.H.secondary,isPlaying:y,size:"medium"}),(0,b.jsx)(d.b,{menu:_,children:(0,b.jsx)(u.e,{size:u.M.xs,label:c.Ru.get("more.label.context",t)})})]})]})]})})})},z="PcYHHxROltpxrNbcsztg",W=({uri:e,shelfTitle:t,title:i,description:n})=>(0,b.jsxs)("section",{className:r()(z,"FixedShelf"),children:[(0,b.jsx)(a.k,{title:t}),(0,b.jsx)(G,{uri:e,title:i,description:n})]});var K=i(76805),Y=i(8059),q=i(19510),Z=i(99744);function $(e,t,i){return(1-e)*t+e*i}const Q=e=>e-Math.PI,J=Math.PI/2,X=e=>e+J,ee=.67,te=4/3*Math.PI;function ie(e,t,i,n,r,a,s,o=1,l=1){const c=S.sum(e,S.fromRadiusAndAngle((1-o*l*ee)*a,t)),u=X(t)-o*(4*Math.PI/9),d=i.controlPoint(s,X(te)),m=c.controlPoint(s,Q(u)),p=c.controlPoint(s,u),h=n.controlPoint(s,Q(X(r))),g=new Path2D;return g.moveTo(i.x,i.y),g.bezierCurveTo(d.x,d.y,m.x,m.y,c.x,c.y),g.bezierCurveTo(p.x,p.y,h.x,h.y,n.x,n.y),g.arc(e.x,e.y,a,r,te,!1),g}function ne(e,t,i){const n=new S(t/2,t/2),r=f(t),a=v(r),s=te+2*Math.PI/2,o=$(.5,te,s),l=S.sum(n,S.fromRadiusAndAngle(r,te)),c=S.sum(n,S.fromRadiusAndAngle(r,s)),u=r*(d=4,4/3*Math.tan(Math.PI/(2*d)));var d;e.lineWidth=a;for(const{loudnessAnimation:t,color:a}of y){e.strokeStyle=a;const d=ie(n,o,l,c,s,r,u,i,t?.multiplier||0);e.stroke(d)}}const re=()=>{const e=(0,s.useRef)(null),t=(0,s.useRef)(null),i=(0,Z.z)(),n=(0,s.useRef)(0),r=(0,s.useRef)(0),a=(0,s.useRef)(0),o=(0,s.useRef)(0),l=(0,s.useRef)(0),c=(0,s.useRef)(0),u=(0,s.useRef)(0),d=(0,s.useRef)(-1),m=(0,s.useRef)(!1),p=(0,s.useRef)(0),h=(0,s.useCallback)((()=>{const t=performance.now(),s=i.getState()||{isPaused:!0};n.current=n.current||t;const p=t-n.current;s.isPaused?(r.current=r.current||p,a.current=p-r.current):(o.current+=a.current,a.current=0,r.current=0);const h=p-a.current-o.current,g=1-Math.max(0,Math.min(1,(u.current-p)/80)),f=$(g,l.current,c.current);if(m.current||d.current!==f){const t=e.current?.getContext("2d");if(e.current&&t){d.current=f,m.current=!1;const i=e.current.width/window.devicePixelRatio;t.clearRect(0,0,e.current.width,e.current.height),ne(t,i,d.current)}}if(1===g){if(l.current=c.current,s.isPaused)c.current=0;else{const e=(0,q.Gq)(s.playbackId,h);c.current=e??0}u.current=p+80}}),[i]),g=(0,s.useCallback)((()=>{e.current&&(p.current=requestAnimationFrame((()=>{h(),g()})))}),[h]),f=(0,s.useCallback)((()=>{if(!e.current)return;const{offsetWidth:t,offsetHeight:i}=e.current.parentElement,n=Math.min(t,i),r=window.devicePixelRatio||1,a=n*r;e.current.style.width=`${n}px`,e.current.style.height=`${n}px`,e.current.width=a,e.current.height=a;const s=e.current.getContext("2d");s?.scale(r,r),m.current=!0}),[]);(0,x.w)({onResize:(0,A.s)(f)(200),refOrElement:t});const v=(0,s.useCallback)((()=>{f(),g()}),[f,g]);return(0,s.useEffect)((()=>()=>{cancelAnimationFrame(p.current)}),[]),(0,b.jsx)("div",{ref:t,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:(0,b.jsx)("canvas",{ref:t=>{e.current=t,m.current=!0,v()}})})},ae=()=>(0,C.j)()?(0,b.jsx)(_,{animateSource:!1}):(0,b.jsx)(re,{});var se=i(17869);const oe="kYswrotiABgUDQYygUSl",le="Yx4LX57uEtpnvgzbxoAC",ce=({spec:e})=>{const t=(0,Y.L)()||{item:null,context:null},{item:i,context:n}=t;return(0,b.jsx)(se.r,{spec:e,children:(0,b.jsxs)("div",{className:oe,children:[(0,b.jsx)("div",{className:le,children:(0,b.jsx)(ae,{})}),n&&i?(0,b.jsx)(K.d,{context:n,item:i,titleTypeVariant:"titleSmall",subtitleTypeVariant:"bodyMedium"}):null]})})};var ue=i(87126),de=i(53129),me=i(59706),pe=i(10608),he=i(2435),ge=i(41753);function fe(){const e=(0,Z.z)();return(0,he.o)((t=>{if(t?.signals?.find((e=>e===ge.L.JUMP)))return{available:!0,callback:()=>{e.sendSignal(ge.L.JUMP)}};if(t?.context&&t?.item&&(0,pe.HS)(t?.context)&&!(0,pe.bJ)(t?.context,t?.item)){const i=t?.nextItems.find((e=>e.metadata?.jump_track))??t?.nextItems.find((e=>e.metadata?.["narration.intro.ssml"]||e.metadata?.["narration.jump.ssml"]));if(i)return{available:!0,callback:()=>{e.skipTo(i)}}}return{available:!1,callback:()=>{}}}))}var ve=i(46597),ye=i(75235),be=i(72814),_e=i(19936);const Ee="yourdj.tiredofset.tooltipshown",Ce={status:"inactive",skippedCount:0},xe=({children:e,onTooltipShown:t,api:i})=>{const[n,r]=(0,s.useState)(!1),a=(0,s.useCallback)((()=>{r(!1)}),[]);(0,s.useImperativeHandle)(i,(()=>({visible:n,hide:()=>{a()}})));const[o,l]=(0,ye.x)(Ee,!1),u=(0,s.useCallback)((e=>{o||(t?.(e),l(!0),r(!0))}),[o,t,l]);return((e,t,i)=>{const n=(0,s.useRef)("inactive"),{isPlaying:r}=(0,ve.I)(),{available:a}=fe();(0,s.useEffect)((()=>{r&&a?"inactive"===n.current&&(n.current="dj_active"):(n.current="inactive",i())}),[r,a,i]),(0,s.useEffect)((()=>{const i=()=>{"dj_active_then_blurred"===n.current&&(n.current="executed",a(),setTimeout((()=>{t("blur_then_focus")}),1e3))},r=()=>{"dj_active"===n.current&&(n.current="dj_active_then_blurred")};function a(){e||(window.removeEventListener("focus",i),window.removeEventListener("blur",r))}return e||(window.addEventListener("focus",i),window.addEventListener("blur",r)),a}),[r,t,e])})(o,u,a),((e,t,i)=>{const n=(0,s.useRef)(Ce),{isPlaying:r}=(0,ve.I)(),{available:a}=fe();(0,s.useEffect)((()=>{r&&a?"inactive"===n.current.status&&(n.current.status="dj_active"):(n.current=Ce,i())}),[r,a,i]),(0,_e.p)(be.gd.ACTION,(i=>{e||i.data.action===be.Ik.SKIP_TO_NEXT&&("dj_active"!==n.current.status&&"dj_active_then_skipped"!==n.current.status||(n.current.skippedCount+=1,2===n.current.skippedCount&&(n.current.status="executed",t("multiple_skips"))))}))})(o,u,a),(0,b.jsx)(me.x,{title:c.Ru.get("web-player.your-dj.jumpbutton.tooltip.title"),description:c.Ru.get("web-player.your-dj.jumpbutton.tooltip.desc"),visible:n,id:Ee,showButtons:!1,hideOnClickOutside:!1,onSecondaryButtonClick:r.bind(null,!1),children:e})},Se="M2CC9pnZH5pjRK1DWgLd",Ae="lzFeyvDl_N0F6bGKxl26",Te="_odkH8ibNDtYDkMjKUhT";let Ie=function(e){return e[e.xs=16]="xs",e[e.sm=24]="sm",e[e.md=32]="md",e}({});const Ne=({onClick:e})=>{const t=(0,s.useRef)(null),{available:i,callback:n}=fe(),a=(0,s.useCallback)((()=>{n(),t.current?.hide(),e?.()}),[e,n]);return i?(0,b.jsx)(xe,{api:t,children:(0,b.jsx)(de.Zp,{label:c.Ru.get("web-player.your-dj.jumpbutton.tooltip.hover"),children:(0,b.jsx)("button",{className:r()(Se),onClick:a,children:(0,b.jsx)("div",{className:r()(Ae),children:(0,b.jsx)(ue.E,{iconSize:Ie.xs,className:r()(Te)})})})})}):null};var we=i(78519),Re=i(41978),ke=i(9183),Oe=i(81987),Pe=i(90751),Le=i(76174),je=i(45346),De=i(16288),Me=i(19159),Ue=i(70717),Be=i(23679);const Fe=()=>{const e=(0,Oe.NC)(Me.wq9,{loadingValue:!1}),t=((0,Oe.NC)(Me.LDS,{loadingValue:!1}),(0,je.W)()),i=(0,Re.wA)(),n=(0,ke.Zp)(),{openURLWithSessionTransfer:r}=(0,Be.L)(),a=(0,s.useCallback)((()=>{i((0,Pe.YF)())}),[i]),o=(0,De.k)(),l=(0,s.useMemo)((()=>{const e=new URL(o.url);return e.searchParams.set("ref","jam"),e}),[o.url]),u=(0,s.useCallback)((()=>{t({intent:"upgrade-to-premium",type:"click"}),!1===o.isExternal?n("/premium?ref=jam"):r(l.href)}),[n,t,r,o.isExternal,l]);return e?(0,b.jsx)(Le.T,{onClose:a,onConfirm:()=>{u(),a()},"aria-label":c.Ru.get("web-player.your-dj.upsell.premium.title"),titleText:c.Ru.get("web-player.your-dj.upsell.premium.title"),descriptionText:c.Ru.get("web-player.your-dj.upsell.premium.description"),confirmText:c.Ru.get("web-player.your-dj.upsell.premium.yes"),confirmLabel:"confirmLabel",cancelText:c.Ru.get("web-player.your-dj.upsell.premium.no")}):(0,b.jsx)(Le.T,{onClose:a,onConfirm:()=>{n(Ue.yf),a()},"aria-label":c.Ru.get("web-player.your-dj.upsell.notavailable.title"),titleText:c.Ru.get("web-player.your-dj.upsell.notavailable.title"),descriptionText:c.Ru.get("web-player.your-dj.upsell.notavailable.description"),confirmText:c.Ru.get("web-player.your-dj.upsell.notavailable.gotolink"),confirmLabel:"confirmLabel",cancelText:c.Ru.get("web-player.your-dj.upsell.notavailable.notnow")})};var He=i(43830),Ve=i(10044),Ge=i(40223);const ze="YimlNzI7J6qlgfRRvjXV",We="q5CwEeVbq3wRt0e6nBOo",Ke="aLH5DNwdd7ag9mqexICS",Ye=()=>{const{isDJInLibrary:e,maybeAddDJToLibrary:t,addDJToLibrary:i,removeDJFromLibrary:n}=(0,k.F)(),{context:r,metadata:a}=(0,R._)(),s=(0,Ge.CV)(),o=(0,Ge.Ir)(),l=(0,Re.wA)();return(0,b.jsxs)("div",{className:ze,children:[(0,b.jsx)("h1",{children:"DJ Debug Window"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Library"}),(0,b.jsxs)("h3",{children:["In Library: ",(0,b.jsx)("code",{children:e.toString()})]}),(0,b.jsx)(He.$,{size:"small",className:We,onClick:()=>{t()},children:"Maybe add DJ to Library"}),(0,b.jsx)(He.$,{size:"small",className:We,onClick:()=>{i()},children:"Add DJ to Library (forced)"}),(0,b.jsx)(He.$,{size:"small",className:We,onClick:()=>{n()},children:"Remove DJ from Library (forced)"}),(0,b.jsx)(He.$,{size:"small",className:We,onClick:()=>{l((0,Pe.eN)())},children:"Trigger Upsell"})]}),(0,b.jsx)("hr",{}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Playback"}),(0,b.jsx)(He.$,{size:"small",className:We,onClick:()=>{r.togglePlay()},children:"Toggle Play"})]}),(0,b.jsx)("hr",{}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Loudness-animated DJ Jellyfish"}),(0,b.jsx)("div",{className:Ke,children:(0,b.jsx)(ae,{})})]}),(0,b.jsx)("hr",{}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Home Card"}),(0,b.jsx)(G,{uri:Ve.N6,title:a?.name||"",description:a?.description||"",forceAlwaysInView:!0})]}),(0,b.jsx)("hr",{}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{children:"Now Playing State"}),(0,b.jsx)("pre",{children:JSON.stringify({...s,...o},null,2)}),(0,b.jsx)("br",{}),(0,b.jsx)("h2",{children:"Metadata"}),(0,b.jsx)("pre",{children:JSON.stringify(a,null,23)})]}),(0,b.jsx)("hr",{})]})}},40223:(e,t,i)=>{"use strict";i.d(t,{b8:()=>C,_E:()=>c._,NO:()=>c.N,_x:()=>y,FJ:()=>_.F,Ir:()=>b.I,N7:()=>g,CV:()=>x.C});var n=i(30758),r=i(41978),a=i(9183),s=i(90751),o=i(15891),l=i(10044),c=i(54565),u=i(3128),d=i(86070);const m=`/playlist/${l.wn}`,p=()=>{const{metadata:e,error:t,context:i}=(0,c._)(),{triggerPlay:a,isPlaying:o}=i,l=(0,r.wA)();return{isLoading:!e&&!t,callback:(0,n.useCallback)((()=>{e?o||a():l((0,s.eN)())}),[o,a,l,e])}},h=()=>{const{isLoading:e,callback:t}=p();return(0,n.useEffect)((()=>{e||t()}),[e,t]),e?null:(0,d.jsx)(o.$,{to:"/"})},g=()=>{const{isLoading:e,callback:t}=p();return(0,u.L)((i=>i.pathname===m&&(e||t(),!0)),[e,t]),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(a.qh,{path:m,element:(0,d.jsx)(h,{})},m)})};var f=i(81987),v=i(19159);const y=()=>(0,f.NC)(v.p5T,{loadingValue:!1});var b=i(46597),_=i(77227),E=i(23342);function C(){const e=y();return function(t,i){if(!e)return!1;const n=(0,E.M)(t,i).sectionItems.items[0];return"PlaylistResponseWrapper"===n.content.__typename&&"Playlist"===n.content.data.__typename}}var x=i(63301)},19510:(e,t,i)=>{"use strict";i.d(t,{Gq:()=>l,nC:()=>o});var n=i(87960),r=i(62683);const a=new Map;let s=null;const o=()=>s||(s=new n.B((0,r.X)()),s.subLoudness({},(e=>{a.has(e.playbackId)||(a.clear(),a.set(e.playbackId,[]));const t=a.get(e.playbackId),i=Math.min(1,Math.max(0,e.loudness[0]/80));t[Math.floor(Number(e.position/BigInt(40)))]=i})),s),l=(e,t)=>{const i=Math.floor(t/40);{const t=e?a.get(e):null;if(!t||i>=t.length)return;return t[i]}}},38161:(e,t,i)=>{"use strict";i.d(t,{H:()=>r,i:()=>n});const n="37i9dQZF1FgnTBfUlzkeKt",r=`spotify:playlist:${n}`},36269:(e,t,i)=>{"use strict";i.d(t,{u:()=>m});var n=i(41978),r=i(81987),a=i(61544),s=i(11808),o=i(38161),l=i(19159),c=i(7939),u=i(25326),d=i(49943);function m(){const e=(0,u.vr)({offset:0,limit:1}),{user:t}=(0,n.d4)(c.Ht),i=(0,r.NC)(l.ucV,{loadingValue:!1});if(null===e||!t?.id)return null;return{uri:i?o.H:(0,a.fH)(t.id,"your-episodes").toURI(),name:s.Ru.get("sidebar.your_episodes"),images:[],totalLength:e?.totalLength,owner:(0,d.w)(t)}}},39615:(e,t,i)=>{"use strict";i.d(t,{e:()=>h});var n=i(11808),r=i(98584),a=i(2977),s=i(80227),o=i(42674),l=i(79803),c=i(36269),u=i(42582),d=i(99837),m=i(86070);const p=({metadata:e,index:t,variant:i})=>{const{isPlaying:o,togglePlay:c}=(0,u.P)({uri:e.uri},{featureIdentifier:"your_library"}),{name:p,images:h}=e;return(0,m.jsx)(r.Z,{variant:i,index:t,delegatePlayback:!0,delegateLogging:!0,isPlaying:o,featureIdentifier:"your_library",onPlay:(e,t)=>c({loggingParams:t}),headerText:p,uri:e.uri,renderCardImage:()=>(0,m.jsx)(a.M,{images:h,FallbackComponent:l.b}),renderSubHeaderContent:()=>(0,m.jsx)(s.c,{children:n.Ru.get("tracklist-header.episodes-counter",e.totalLength)}),className:d.A.yourEpisodesCard})},h=({index:e,variant:t})=>{const i=(0,c.u)();return i?(0,m.jsx)(p,{metadata:i,index:e,variant:t}):(0,m.jsx)(o.u,{cardImage:(0,m.jsx)(a.M,{FallbackComponent:l.b}),isLoading:!0,variant:t})}},45597:(e,t,i)=>{"use strict";i.d(t,{X:()=>o,t:()=>l});var n=i(81987),r=i(34171),a=i(19159),s=i(75235);let o=function(e){return e[e.LIST=0]="LIST",e[e.GRID=1]="GRID",e}({});const l=()=>{const e=(0,r.vW)(),t=(0,n.NC)(a.AEN),[i,l]=(0,s.x)("items-view",o.LIST);return{itemsView:i,setItemsView:l,isGridView:i===o.GRID&&(t||e===r.fX.EXPANDED)&&e!==r.fX.COLLAPSED}}},34171:(e,t,i)=>{"use strict";i.d(t,{$:()=>p,fX:()=>c,sy:()=>m,vW:()=>d});var n=i(30758),r=i(45879),a=i(68679),s=i(63198),o=i(63332),l=i(75235);let c=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.COLLAPSED=1]="COLLAPSED",e[e.EXPANDED=2]="EXPANDED",e}({});function u(){return(0,l.x)("ylx-sidebar-state",c.DEFAULT)}function d(){return u()[0]}function m(){return u()[0]===c.COLLAPSED}function p(){const e=(0,s.V)(),[t,i]=u(),l=(0,n.useRef)(c.DEFAULT);(0,n.useEffect)((()=>{t!==c.COLLAPSED&&(l.current=t)}),[t]);const d=!e,m=(0,o.U)(`(min-width: ${a.ZU.EXPANDED_MIN+3*r.KV+r.ev}px)`)&&!e,p=(0,n.useCallback)((e=>{e===c.COLLAPSED&&!d||e===c.EXPANDED&&!m||i(e)}),[i,d,m]);return{ylxSidebarState:t,setYlxSidebarState:p,isCollapsed:t===c.COLLAPSED,isExpanded:t===c.EXPANDED,canCollapse:d,canExpand:m,lastUncollapsedYlxSidebarState:l.current}}},60674:(e,t,i)=>{"use strict";i.d(t,{$:()=>n.$,fX:()=>n.fX,sy:()=>n.sy,vW:()=>n.vW});var n=i(34171)},69578:(e,t,i)=>{"use strict";i.d(t,{j:()=>a});var n=i(32994),r=i(42116);const a=()=>{const e=(0,r.y)();return e===n.E.SMALL||e===n.E.XSMALL?"medium":"large"}},25650:(e,t,i)=>{"use strict";i.d(t,{H:()=>r});var n=i(30758);function r(){const[e,t]=(0,n.useState)(document.body.clientWidth);return(0,n.useLayoutEffect)((()=>{const e=()=>{t(document.body.clientWidth)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),document.body.clientWidth}},38404:(e,t,i)=>{"use strict";i.d(t,{g:()=>p});var n=i(41978),r=i(61544),a=i(11808),s=i(10608),o=i(12811),l=i(7939),c=i(48168),u=i(2435),d=i(63135);const m=e=>(0,r.o_)(e)?.toURLPath(!0)??"",p=e=>{const{user:t}=(0,n.d4)(l.Ht),{item:i,context:r}=(0,u.o)((e=>({item:e?.item,context:e?.context})),((e,t)=>e.item?.uri===t.item?.uri));if(!i||!r)return{title:null,link:null};const p=(0,o.Iu)();if(r.uri===p.uri||r.uri===c.bV)return{title:p.name,link:m(c.bV)};if((0,d.N)(i)&&!e)return{title:a.Ru.get("ad-formats.advertisement"),link:null};if("queue"===i.provider&&!e)return{title:a.Ru.get("playback-control.queue"),link:m("spotify:app:queue")};const h=(0,o.$R)(t?.id);if(r.uri===h?.uri)return{title:h?.name,link:m(h?.uri)};const g=(0,o.n5)(t?.id);return r.uri===g?.uri?{title:g?.name,link:m(g?.uri)}:(0,s.HS)(r)?{title:[i.metadata?.station_title,i.metadata?.station_subtitle].filter(Boolean).join(" • "),link:null}:{title:r.metadata?.context_description??i?.name??"",link:m(r.uri)??m(i.uri)??""}}},50892:(e,t,i)=>{"use strict";i.d(t,{g:()=>r});var n=i(30758);function r(){const[e,t]=(0,n.useState)(document.visibilityState);return(0,n.useEffect)((()=>{const e=()=>t(document.visibilityState);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)}),[]),e}},53044:(e,t,i)=>{"use strict";i.d(t,{B:()=>n,P:()=>a});const n={SMALL:192,BIG:232},r={small:{width:64,height:64},standard:{width:300,height:300},large:{width:640,height:640},xlarge:{width:1280,height:1280}};function a(e){const t=function(e=[]){const t=e.map(s),i=t.filter((e=>e.width>=n.SMALL&&e.url)).sort(((e,t)=>e.width-t.width));return i.length?i:t}(e),[i]=t,r=i?.url||null;if(!r)return[];return[r,t.filter((({url:e,width:t})=>e&&t)).map((({url:e,width:t})=>`${e} ${t/2}w, ${e} ${t}w`)).join(", "),`(min-width: 1280px) ${n.BIG}px, ${n.SMALL}px`]}function s(e){if(!e.label)return e;const{width:t,height:i}=r[e.label];return{url:e.url,width:t,height:i}}},3128:(e,t,i)=>{"use strict";i.d(t,{L:()=>o,k:()=>s});var n=i(30758),r=i(51154);const a=new Map,s=()=>{const e=(0,r.J)(),t=(0,n.useRef)("");(0,n.useEffect)((()=>e.block(((e,i)=>{let n=!1;for(const[t]of a)t(e,i)&&(n=!0);const r=e.pathname+e.search+e.hash;if("PUSH"===i&&t.current===r&&(n=!0),n)return!1;t.current=r}))),[e])},o=(e,t=[])=>{(0,n.useEffect)((()=>(a.set(e,!0),()=>{a.delete(e)})),[...t,e])}},51154:(e,t,i)=>{"use strict";i.d(t,{J:()=>r});var n=i(39733);const r=()=>{const e=(0,n.mv)();if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e.getHistory()}},80460:(e,t,i)=>{"use strict";i.d(t,{W:()=>n});const n=i(63574).W},45346:(e,t,i)=>{"use strict";i.d(t,{W:()=>c});var n=i(30758),r=i(41978),a=i(9183),s=i(49239),o=i(34629);const l=(e,t)=>i=>{const{intent:n,type:r,targetUri:a,itemIdSuffix:s,pathNameOverride:o}=i,l=s?`${t}/${s}`:t,c=o||e;return{page:c.split(/\//).filter((e=>""!==e)).shift(),view_uri:c,action_intent:n,action_type:r,target_uri:a,item_id:l}};function c(){const e=(0,n.useContext)(o.zz),t=(0,r.wA)(),{pathname:i}=(0,a.zy)();return(0,n.useCallback)((n=>{const r=l(i,e);t((0,s.d)(r(n)))}),[t,i,e])}},6200:(e,t,i)=>{"use strict";i.d(t,{$:()=>r});var n=i(30758);const r=(e,t)=>{const i=(0,n.useRef)(e);(0,n.useEffect)((()=>{i.current=e}),[e]),(0,n.useEffect)((()=>{let e;function n(){e&&clearInterval(e)}if(null!==t)return e=setInterval((function(){i.current(n)}),t),n}),[t])}},63198:(e,t,i)=>{"use strict";i.d(t,{V:()=>a});var n=i(41978),r=i(7939);const a=()=>{const e=(0,n.d4)(r.Ht);return e?.isAnonymous??!1}},4096:(e,t,i)=>{"use strict";i.d(t,{c:()=>r});var n=i(41978);const r=()=>(0,n.d4)((e=>e.platform?.isBrowser))},90224:(e,t,i)=>{"use strict";i.d(t,{p:()=>r});var n=i(74494);const r=()=>"1"!==(0,n.$)("dsa-mode-enabled")},67848:(e,t,i)=>{"use strict";i.d(t,{U:()=>o});var n=i(41978),r=i(81987),a=i(19159),s=i(7939);const o=()=>{const e=(0,r.NC)(a.poS,{loadingValue:!1}),t=(0,n.d4)(s.Yb);return e&&t}},36902:(e,t,i)=>{"use strict";i.d(t,{j:()=>r});var n=i(74494);const r=()=>"1"===(0,n.$)("is-pigeon")},48200:(e,t,i)=>{"use strict";i.d(t,{g:()=>s});var n=i(52608),r=i(16972),a=i(85065);function s(e,t=!0,i=!1,s=!1){const o=(0,r.T)(e),l=(0,n.n)(),c=o===a.kw.YES;return t&&(l||c||i)&&!s}},43396:(e,t,i)=>{"use strict";i.d(t,{W:()=>r});var n=i(41978);function r(){return(0,n.d4)((e=>e.ui?.textDirection?.isRTL))}},50244:(e,t,i)=>{"use strict";i.d(t,{y:()=>r});var n=i(30758);function r(e,t="-100% 0px 0px 0px",i=0,r){const[a,s]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{if(!window.IntersectionObserver)return()=>{};const n=new window.IntersectionObserver((e=>{e.forEach((e=>{s(!e.isIntersecting)}))}),{root:e.current,rootMargin:t,threshold:i});return r?.current?n.observe(r.current):e.current?.firstElementChild&&n.observe(e.current.firstElementChild),()=>{n.disconnect()}}),[r,t,e,i]),a&&!!e.current?.scrollTop}},80368:(e,t,i)=>{"use strict";i.d(t,{l:()=>a});var n=i(41978),r=i(7939);const a=()=>(0,n.d4)(r.Yb)},96764:(e,t,i)=>{"use strict";i.d(t,{V:()=>s});var n=i(30758),r=i(9183),a=i(61544);function s(e){const t=(0,a.o_)(e);let i="";return t&&(i=t.toURLPath(!0)),function(e){const t=(0,r.Zp)();return(0,n.useCallback)((()=>{""!==e&&t(e)}),[e,t])}(i)}},26876:(e,t,i)=>{"use strict";i.d(t,{J:()=>l});var n=i(41978),r=i(61544),a=i(52608),s=i(7939),o=i(62720);const l=e=>{const[t]=(0,o.A)(e),i=(0,a.n)(),l=(0,n.d4)(s.F6);return!i&&t?(0,r.Uu)(l,(0,r.o_)(e)?.id).toURI():e}},52608:(e,t,i)=>{"use strict";i.d(t,{n:()=>a});var n=i(30758),r=i(67503);const a=()=>{const e=(0,n.useContext)(r.Z);if(null===e)throw new Error("Trying to use 'OfflineContext' without 'OfflineStatusProvider'!");return e.online}},39249:(e,t,i)=>{"use strict";i.d(t,{C:()=>g});var n=i(30758),r=i(81987),a=i(45346),s=i(19159);const o=e=>e<=64?"small":e>640?"xlarge":e>300?"large":"standard";function l(e,t){return e.filter((e=>e.label?e.label===t:e.width?o(e.width)===t:!!e.height&&o(e.height)===t))[0]}var c=i(43039);var u=i(94901);function d(e){const t=l(e,"standard"),i=l(e,"large"),n=l(e,"small"),r=l(e,"xlarge");return{image_url:t?.url,image_height:t?.height?.toString(),image_width:t?.width?.toString(),image_url_large:i?.url,image_height_large:i?.height?.toString(),image_width_large:i?.width?.toString(),image_url_small:n?.url,image_height_small:n?.height?.toString(),image_width_small:n?.width?.toString(),image_url_xlarge:r?.url,image_height_xlarge:r?.height?.toString(),image_width_xlarge:r?.width?.toString()}}var m=i(99744),p=i(85993),h=i(71817);function g(e,t){const i=(0,a.W)(),o=(0,m.z)(),{isPlaying:l,isActive:g}=(0,p.te)(e?.uri||""),{isActive:f}=(0,p.l_)(t?.uri||""),v=(0,r.NC)(s.pZ0);return(0,n.useCallback)((n=>{if(!t||!e)return;const r=function(e,t,i=!1){const n=(e.coverArt?.sources||[]).sort(((e,t)=>(t.width||0)-(e.width||0))),r=(0,c.QH)(e,t),a=(0,c.gf)(t)||r,s=e.mediaTypes&&e.mediaTypes.includes(u.Cx.Video)?"video":"audio";return{uri:e.uri,title:e.name,subtitle:t.name,type:"episode",album_uri:t.uri,album_title:t.name,artist_uri:t.uri,artist_name:t.name,...d(n),media_type:i?s:"audio",isTrailer:r,anonymousPlaybackAllowed:a}}(e,t,v);f&&!l&&g&&!n?o.resume():f&&l&&!n?(i({type:"click",intent:"pause",targetUri:e.uri}),o.pause()):(i({type:"click",intent:"play",targetUri:e.uri}),o.play({uri:t.uri,pages:[{items:[{type:h.c.EPISODE,uri:e.uri,uid:null,metadata:r,provider:null}]}]},{referrerIdentifier:o.getReferrer(),featureIdentifier:"episode"},n))}),[t,e,v,f,l,g,o,i])}},16288:(e,t,i)=>{"use strict";i.d(t,{k:()=>l});var n=i(41978),r=i(81987),a=i(19159),s=i(47721),o=i(14467);const l=e=>{const t=(0,n.d4)(s.q);if((0,r.NC)(a.ZXG)===a.ztB.WEBPLAYERPDP&&!t){return{url:new URL("/premium",document.location.origin).toString(),isExternal:!1}}return{url:e?o.M0:o.BW,isExternal:!0}}},58822:(e,t,i)=>{"use strict";i.d(t,{i:()=>_});var n=i(30758),r=i(41978),a=i(9183),s=i(81987),o=i(11808),l=i(49239),c=i(20455),u=i(63198),d=i(80368),m=i(16288),p=i(56906),h=i(19159),g=i(5538),f=i(23679),v=i(71817),y=i(53209),b=i(39554);const _=(e,t)=>{const i=(0,r.wA)(),_=(0,a.Zp)(),E=(()=>{const e=(0,u.V)(),t=(0,d.l)(),i=(0,s.NC)(h.d5A),n=!!(0,a.RQ)({path:"/search",end:!1}),r=!!(0,a.RQ)({path:"/collection",end:!1}),o=!!(0,a.RQ)({path:"/collection/tracks"});return!(i||e||r&&!o||n)&&t})(),{openURLWithSessionTransfer:C}=(0,f.L)(),x=(0,p.D)("loggedin_upgrade_button"),S=o.Ru.getLocaleForURLPath(),A=(0,r.d4)(g.MU),T=(0,r.d4)(g.NR),I=(0,b.p)({localeFeatureFlag:A,entityFeatureFlag:T,urlLocale:S,entity:v.c.PREMIUM,type:"link"})?(0,y.hF)("/premium"):"/premium",N=(0,n.useCallback)((()=>{t.logInteraction(e.hitUiNavigate({destination:"spotify:app:premium"})),_(I)}),[I,t,_,e]),w=(0,m.k)(!0),{url:R,isExternal:k}=w,O=(0,n.useCallback)((()=>{t.logInteraction(e.hitNavigateToExternalUri({destination:x(R)})),!1===k?_("/premium"):C(R,"_blank"),i((0,l.d)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar",view_uri:""}))}),[t,e,x,R,k,i,_,C]),P=(0,c.X)();return{shouldShowUpgradeButton:E,onUpgradeClick:P?N:O,type:P?"internal":"external"}}},57920:(e,t,i)=>{"use strict";i.d(t,{h:()=>r});var n=i(30758);function r(e){return(0,n.useCallback)((t=>{null!==t&&void 0!==t.getAnimations&&t.getAnimations({subtree:!0}).filter((t=>t instanceof CSSAnimation&&t.animationName===e&&"running"===t.playState)).forEach((e=>e.startTime=0))}),[e])}},56906:(e,t,i)=>{"use strict";i.d(t,{D:()=>a});var n=i(30758),r=i(41978);function a(e){const{isDesktop:t,isBrowser:i}=(0,r.d4)((e=>e.platform));return(0,n.useCallback)((n=>{const r=new URL(n);return t?r.searchParams.set("ref",`desktop_${e}`):i&&r.searchParams.set("ref",`web_${e}`),r.toString()}),[t,i,e])}},2628:(e,t,i)=>{"use strict";i.d(t,{K:()=>s,m:()=>o});var n=i(30758),r=i(9183),a=i(99744);const s=()=>{const e=(0,r.zy)(),t=(0,a.z)();e.state?.referrer?t.setReferrer(e.state?.referrer):e.state={...e.state,referrer:t.getReferrer()}},o=e=>{const t=(0,a.z)(),i=(0,r.zy)();(0,n.useEffect)((()=>{t.setReferrer(e),i.state={..."object"==typeof i.state?i.state:{},referrer:e}}),[i,t,e])}},74404:(e,t,i)=>{"use strict";i.d(t,{$h:()=>u,Su:()=>s,V$:()=>a,ab:()=>d,rI:()=>r,vx:()=>o,yR:()=>c,yv:()=>l});var n=i(25700);function r(){return{type:n.Q.TRIGGER_APP_START_IN_APP_MESSAGE}}function a(){return{type:n.Q.TRIGGER_CONTEXT_START_IN_APP_MESSAGE}}function s(){return{type:n.Q.TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE}}function o(e){return{type:n.Q.SHOW_IN_APP_MESSAGE,message:e}}function l(){return{type:n.Q.DISMISS_IN_APP_MESSAGE}}function c(e,t){return{type:n.Q.PREVIEW_IN_APP_MESSAGE,creativeId:e,appUri:t}}function u(e){return{type:n.Q.SET_IN_APP_MESSAGING_ENV,env:e}}function d(e){return{type:n.Q.SHOW_PREVIEW_TOOL,show:e}}},25700:(e,t,i)=>{"use strict";i.d(t,{Q:()=>r,x:()=>n});const n="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_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE:"TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE"}},15596:(e,t,i)=>{"use strict";i.d(t,{O:()=>l,W:()=>c});var n=i(69011),r=i(91654),a=i(15443),s=i(2976);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 i;i=Object.values(o),document.documentElement.classList.remove(...i);const l=[];(0,a.k)()?l.push(o.BROWSER_EDGE):(0,s.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===n.m.Desktop?l.push(o.CONTAINER_DESKTOP):e===n.m.PWA?l.push(o.CONTAINER_PWA):e===n.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}},17818:(e,t,i)=>{"use strict";i.d(t,{Hv:()=>o,IA:()=>r,JD:()=>l,YZ:()=>s,j8:()=>a});var n=i(33655);const r="player.play",a="library.add",s="rootlist.add",o="follow.user",l=(0,n.u)("ActionStoreAPI")},45311:(e,t,i)=>{"use strict";i.d(t,{s:()=>n});const n=e=>"spotify:artist:0LyfQWJT6nXafLPZqxe9Of"!==e.uri},12669:(e,t,i)=>{"use strict";i.d(t,{f:()=>o,z:()=>s});var n=i(30758),r=i(71306),a=i(24189);function s(e,t=r.l0o){const i=(0,a.as)();return(0,n.useEffect)((()=>(e&&i((0,a.Mo)(e)),()=>{i((0,a.Hf)())})),[e,i]),e||t}const o=({color:e,fallbackColor:t})=>(s(e,t),null)},73751:(e,t,i)=>{"use strict";i.d(t,{H:()=>o});var n=i(30758),r=i(71306),a=i(24189),s=i(80454);function o(e=null,t=r.l0o){const{backgroundColor:i}=(0,a.oI)(),o=(0,a.as)(),l=(0,s.z)(e);return(0,n.useEffect)((()=>(o((0,a.Mo)(l)),()=>{o((0,a.Hf)())})),[l,o]),i||t}},85411:(e,t,i)=>{"use strict";i.d(t,{_:()=>n});const n=(0,i(33655).u)("ClipboardAPI")},42224:(e,t,i)=>{"use strict";i.d(t,{_:()=>a});var n=i(85411),r=i(60102);function a(){return(0,r.N)(n._)}},77814:(e,t,i)=>{"use strict";i.d(t,{ar:()=>o,jW:()=>c,r0:()=>l,tV:()=>s});var n=i(33655),r=i(88485);const a=["artist","artistban","ban","collection","enhanced","ignoreinrecs","listenlater","show","ylpin","prerelease","tags"];function s(e){return a.includes(e)}let o=function(e){return e.ADDED="added",e.REMOVED="removed",e}({});class l extends r.V{}const c=(0,n.u)("CollectionPlatformAPI")},96122:(e,t,i)=>{"use strict";i.d(t,{o:()=>s});var n=i(30758),r=i(61272),a=i(87925);function s(e,t){const i=(0,a.l)(),[s,o]=(0,n.useState)([]);return(0,r.Ij)((()=>{o((e=>e.length?[]:e));return i.subscribeContains(e,t,o)}),[e,t]),s}},6823:(e,t,i)=>{"use strict";i.d(t,{p:()=>a});var n=i(30758),r=i(87925);function a(e){const t=(0,r.l)();return{get:(0,n.useCallback)((()=>t.get(e)),[t,e]),subscribe:(0,n.useCallback)((function(i){return t.subscribe(e,i)}),[t,e]),add:(0,n.useCallback)(((...i)=>t.add(e,i)),[t,e]),remove:(0,n.useCallback)(((...i)=>t.remove(e,i)),[t,e]),contains:(0,n.useCallback)(((...i)=>t.contains(e,i)),[t,e])}}},8461:(e,t,i)=>{"use strict";i.d(t,{W:()=>n});let n=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}({})},28568:(e,t,i)=>{"use strict";i.d(t,{Yw:()=>s,uZ:()=>o,ud:()=>l});var n=i(91654),r=i(21233),a=i(33655);const s=(0,r.D)()===n.f.macOS?42:40,o=64,l=(0,a.u)("ControlMessageAPI")},35743:(e,t,i)=>{"use strict";i.d(t,{M:()=>r});var n=i(88485);class r extends n.V{}},55388:(e,t,i)=>{"use strict";i.d(t,{x:()=>a});var n=i(30758),r=i(97813);function a(e,t){const i=(0,r.m)(),a=(0,n.useRef)(t);(0,n.useEffect)((()=>{a.current=t})),(0,n.useEffect)((()=>i.getEvents().addListener("message",(({data:{type:t,data:i}})=>{t===e&&a.current(i)}))),[e,i])}},5095:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});const n=(0,i(33655).u)("EqualizerAPI")},52118:(e,t,i)=>{"use strict";i.d(t,{W:()=>s});var n=i(20754),r=i(38389),a=i(13596);class s{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(n.h,t),t.filters.forEach((e=>{this.setFilterGain(e.key,e.gain)}))}getPreset(){const e=this.localStorageAPI.getItem(n.h);return e instanceof Error?r.fG.flat:e}subscribeToPresetChange(e){return this.localStorageAPI.getEvents().addListener(a.r.UPDATE,(t=>{if(t.data.key===n.h){const i=t.data.value;e(i)}}))}}},20754:(e,t,i)=>{"use strict";i.d(t,{D:()=>n,h:()=>r});const n="audio.equalizer.enabled",r="audio.equalizer.saved_preset"},38389:(e,t,i)=>{"use strict";i.d(t,{Zs:()=>r,fG:()=>o,zP:()=>l});var n=i(11808);const r=12,a=[{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}],s={flat:{gains:[0,0,0,0,0,0],get displayName(){return n.Ru.get("equalizer.preset.flat")}},acoustic:{gains:[4.9,3.95,2.15,1.75,3.5,2.15],get displayName(){return n.Ru.get("equalizer.preset.acoustic")}},bassBooster:{gains:[4.25,3.5,1.25,0,0,0],get displayName(){return n.Ru.get("equalizer.preset.bassBooster")}},bassReducer:{gains:[-4.25,-3.5,-1.25,0,0,0],get displayName(){return n.Ru.get("equalizer.preset.bassReducer")}},classical:{gains:[3.75,3,-1.5,-1.5,0,3.75],get displayName(){return n.Ru.get("equalizer.preset.classical")}},dance:{gains:[6.55,4.99,1.92,3.65,5.15,0],get displayName(){return n.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 n.Ru.get("equalizer.preset.deep")}},electronic:{gains:[3.8,1.2,-2.15,2.25,.85,4.8],get displayName(){return n.Ru.get("equalizer.preset.electronic")}},hiphop:{gains:[4.25,1.5,-1,-1,1.5,3],get displayName(){return n.Ru.get("equalizer.preset.hiphop")}},jazz:{gains:[3,1.5,-1.5,-1.5,0,3.75],get displayName(){return n.Ru.get("equalizer.preset.jazz")}},latin:{gains:[3,0,-1.5,-1.5,-1.5,4.5],get displayName(){return n.Ru.get("equalizer.preset.latin")}},loudness:{gains:[4,0,-2,0,-1,1],get displayName(){return n.Ru.get("equalizer.preset.loudness")}},lounge:{gains:[-1.5,-.5,4,2.5,0,1],get displayName(){return n.Ru.get("equalizer.preset.lounge")}},piano:{gains:[2,0,3,1.5,3.5,3.5],get displayName(){return n.Ru.get("equalizer.preset.piano")}},pop:{gains:[-1,0,4,4,2,-1.5],get displayName(){return n.Ru.get("equalizer.preset.pop")}},rnb:{gains:[6.92,5.65,-2.19,-1.5,2.32,3.75],get displayName(){return n.Ru.get("equalizer.preset.rnb")}},rock:{gains:[4,3,-.5,-1,.5,4.5],get displayName(){return n.Ru.get("equalizer.preset.rock")}},smallSpeakers:{gains:[4.25,3.5,1.25,0,-1.25,-4.25],get displayName(){return n.Ru.get("equalizer.preset.smallSpeakers")}},spokenWord:{gains:[-.47,0,3.46,4.61,4.84,0],get displayName(){return n.Ru.get("equalizer.preset.spokenWord")}},trebleBooster:{gains:[0,0,0,1.25,2.5,5.5],get displayName(){return n.Ru.get("equalizer.preset.trebleBooster")}},trebleReducer:{gains:[0,0,0,-1.25,-2.5,-5.5],get displayName(){return n.Ru.get("equalizer.preset.trebleReducer")}},vocalBooster:{gains:[-3,-3,3.75,3.75,3,-1.5],get displayName(){return n.Ru.get("equalizer.preset.vocalBooster")}}},o=Object.entries(s).reduce(((e,[t,i])=>({...e,[t]:{filters:a.map(((e,t)=>Object.freeze({...e,gain:i.gains[t]}))),key:t,get displayName(){return i.displayName}}})),{});function l(e){return{key:"custom",displayName:n.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})))}}},16059:(e,t,i)=>{"use strict";i.d(t,{L:()=>r});const n=JSON.parse('{"0":0,"1":33,"2":33,"3":33,"4":33,"5":33,"6":33,"7":33,"8":0,"9":0,"10":0,"11":33,"12":33,"13":0,"14":33,"15":33,"16":33,"17":33,"18":33,"19":33,"20":33,"21":33,"22":33,"23":33,"24":33,"25":33,"26":33,"27":33,"28":33,"29":0,"30":33,"31":33,"32":0,"33":25,"34":42,"35":55,"36":55,"37":100,"38":63,"39":27,"40":25,"41":25,"42":35,"43":60,"44":27,"45":38,"46":27,"47":33,"48":55,"49":55,"50":55,"51":55,"52":55,"53":55,"54":55,"55":55,"56":55,"57":55,"58":27,"59":27,"60":60,"61":60,"62":60,"63":55,"64":80,"65":64,"66":68,"67":72,"68":70,"69":61,"70":57,"71":75,"72":72,"73":25,"74":51,"75":66,"76":55,"77":87,"78":72,"79":76,"80":64,"81":76,"82":68,"83":64,"84":57,"85":72,"86":61,"87":92,"88":61,"89":64,"90":61,"91":25,"92":33,"93":25,"94":60,"95":50,"96":22,"97":53,"98":59,"99":53,"100":59,"101":53,"102":29,"103":57,"104":55,"105":22,"106":22,"107":51,"108":22,"109":85,"110":55,"111":57,"112":59,"113":59,"114":33,"115":50,"116":31,"117":55,"118":50,"119":75,"120":51,"121":50,"122":48,"123":33,"124":22,"125":33,"126":60,"127":0,"128":55,"129":40,"130":44,"131":50,"132":95,"133":50,"134":50,"135":50,"136":50,"137":50,"138":50,"139":50,"140":50,"141":50,"142":50,"143":50,"144":50,"145":50,"146":50,"147":50,"148":50,"149":50,"150":50,"151":50,"152":50,"153":50,"154":50,"155":50,"156":50,"157":50,"158":50,"159":50,"160":27,"161":25,"162":55,"163":55,"164":55,"165":55,"166":22,"167":55,"168":22,"169":80,"170":37,"171":46,"172":60,"173":0,"174":80,"175":22,"176":40,"177":60,"178":33,"179":33,"180":22,"181":55,"182":60,"183":27,"184":22,"185":33,"186":38,"187":46,"188":83,"189":83,"190":83,"191":55,"192":64,"193":64,"194":64,"195":64,"196":64,"197":64,"198":92,"199":72,"200":61,"201":61,"202":61,"203":61,"204":25,"205":25,"206":25,"207":25,"208":70,"209":72,"210":76,"211":76,"212":76,"213":76,"214":76,"215":60,"216":76,"217":72,"218":72,"219":72,"220":72,"221":64,"222":64,"223":55,"224":53,"225":53,"226":53,"227":53,"228":53,"229":53,"230":87,"231":53,"232":53,"233":53,"234":53,"235":53,"236":22,"237":22,"238":22,"239":22,"240":57,"241":55,"242":57,"243":57,"244":57,"245":57,"246":57,"247":60,"248":57,"249":55,"250":55,"251":55,"252":55,"253":50,"254":59,"255":50,"256":64,"257":53,"258":64,"259":53,"260":64,"261":53,"262":72,"263":53,"264":72,"265":53,"266":72,"267":53,"268":72,"269":53,"270":70,"271":59,"272":70,"273":59,"274":61,"275":53,"276":61,"277":53,"278":61,"279":53,"280":61,"281":53,"282":61,"283":53,"284":75,"285":57,"286":75,"287":57,"288":75,"289":57,"290":75,"291":57,"292":72,"293":55,"294":72,"295":56,"296":25,"297":22,"298":25,"299":22,"300":25,"301":22,"302":25,"303":22,"304":25,"305":22,"306":77,"307":43,"308":51,"309":22,"310":66,"311":51,"312":51,"313":55,"314":22,"315":55,"316":22,"317":55,"318":30,"319":55,"320":34,"321":55,"322":22,"323":72,"324":55,"325":72,"326":55,"327":72,"328":55,"329":66,"330":72,"331":55,"332":76,"333":57,"334":76,"335":57,"336":76,"337":57,"338":107,"339":89,"340":68,"341":33,"342":68,"343":33,"344":68,"345":33,"346":64,"347":50,"348":64,"349":50,"350":64,"351":50,"352":64,"353":50,"354":57,"355":31,"356":57,"357":31,"358":57,"359":31,"360":72,"361":55,"362":72,"363":55,"364":72,"365":55,"366":72,"367":55,"368":72,"369":55,"370":72,"371":55,"372":92,"373":75,"374":64,"375":50,"376":64,"377":61,"378":48,"379":61,"380":48,"381":61,"382":48,"383":27,"384":55,"385":75,"386":66,"387":55,"388":65,"389":55,"390":72,"391":72,"392":50,"393":72,"394":80,"395":66,"396":55,"397":56,"398":66,"399":74,"400":53,"401":61,"402":55,"403":77,"404":62,"405":88,"406":22,"407":34,"408":66,"409":50,"410":34,"411":55,"412":89,"413":72,"414":55,"415":77,"416":88,"417":67,"418":80,"419":64,"420":75,"421":55,"422":63,"423":66,"424":50,"425":57,"426":38,"427":27,"428":61,"429":27,"430":61,"431":86,"432":69,"433":75,"434":72,"435":77,"436":50,"437":61,"438":48,"439":54,"440":54,"441":50,"442":54,"443":56,"444":55,"445":45,"446":48,"447":55,"448":26,"449":43,"450":56,"451":27,"452":123,"453":109,"454":98,"455":98,"456":70,"457":37,"458":111,"459":86,"460":70,"461":66,"462":55,"463":27,"464":27,"465":77,"466":55,"467":72,"468":55,"469":72,"470":55,"471":72,"472":55,"473":72,"474":55,"475":72,"476":55,"477":55,"478":66,"479":55,"480":66,"481":55,"482":100,"483":88,"484":79,"485":59,"486":77,"487":55,"488":66,"489":50,"490":77,"491":55,"492":77,"493":55,"494":53,"495":48,"496":22,"497":122,"498":112,"499":99,"500":77,"501":55,"502":103,"503":66,"504":72,"505":55,"506":64,"507":53,"508":92,"509":87,"510":76,"511":57,"512":66,"513":55,"514":66,"515":55,"516":66,"517":55,"518":66,"519":55,"520":27,"521":22,"522":27,"523":22,"524":77,"525":55,"526":77,"527":55,"528":72,"529":33,"530":72,"531":33,"532":72,"533":55,"534":72,"535":55,"536":64,"537":50,"538":57,"539":31,"540":66,"541":66,"542":72,"543":55,"544":72,"545":68,"546":60,"547":56,"548":61,"549":50,"550":66,"551":55,"552":66,"553":55,"554":77,"555":55,"556":77,"557":55,"558":77,"559":55,"560":77,"561":55,"562":66,"563":50,"564":34,"565":68,"566":36,"567":22,"568":93,"569":90,"570":66,"571":72,"572":50,"573":55,"574":61,"575":50,"576":50,"577":55,"578":55,"579":72,"580":84,"581":66,"582":66,"583":55,"584":54,"585":22,"586":86,"587":61,"588":78,"589":39,"590":77,"591":61,"880":41,"881":33,"882":58,"883":46,"884":22,"885":22,"886":72,"887":58,"888":50,"889":50,"890":15,"891":50,"892":50,"893":50,"894":27,"895":33,"896":50,"897":50,"898":50,"899":50,"900":24,"901":33,"902":65,"903":27,"904":75,"905":86,"906":39,"907":50,"908":86,"909":50,"910":84,"911":86,"912":23,"913":64,"914":68,"915":55,"916":64,"917":61,"918":61,"919":72,"920":76,"921":25,"922":66,"923":61,"924":87,"925":72,"926":57,"927":76,"928":71,"929":64,"930":50,"931":61,"932":57,"933":64,"934":77,"935":61,"936":82,"937":74,"938":25,"939":64,"940":58,"941":48,"942":55,"943":23,"944":52,"945":58,"946":56,"947":46,"948":55,"949":48,"950":43,"951":55,"952":53,"953":23,"954":51,"955":51,"956":55,"957":48,"958":42,"959":57,"960":62,"961":57,"962":51,"963":56,"964":45,"965":52,"966":71,"967":44,"968":66,"969":71,"970":23,"971":52,"972":57,"973":52,"974":71,"975":56,"976":57,"977":54,"978":77,"979":95,"980":77,"981":56,"982":78,"983":60,"984":77,"985":55,"986":72,"987":50,"988":61,"989":40,"990":62,"991":52,"992":75,"993":57,"994":89,"995":83,"996":67,"997":55,"998":67,"999":50,"1000":66,"1001":66,"1002":60,"1003":59,"1004":73,"1005":55,"1006":46,"1007":40,"1008":60,"1009":57,"1010":50,"1011":20,"1012":77,"1013":50,"1014":50,"1015":66,"1016":55,"1017":72,"1018":83,"1019":73,"1020":70,"1021":72,"1022":72,"1023":72,"1024":61,"1025":61,"1026":75,"1027":55,"1028":71,"1029":64,"1030":25,"1031":25,"1032":51,"1033":110,"1034":112,"1035":75,"1036":66,"1037":73,"1038":61,"1039":71,"1040":64,"1041":67,"1042":68,"1043":55,"1044":72,"1045":61,"1046":101,"1047":65,"1048":73,"1049":73,"1050":66,"1051":70,"1052":87,"1053":72,"1054":76,"1055":71,"1056":64,"1057":72,"1058":57,"1059":61,"1060":86,"1061":61,"1062":72,"1063":65,"1064":101,"1065":103,"1066":77,"1067":87,"1068":65,"1069":71,"1070":102,"1071":67,"1072":53,"1073":57,"1074":54,"1075":42,"1076":58,"1077":53,"1078":78,"1079":50,"1080":56,"1081":56,"1082":52,"1083":56,"1084":68,"1085":56,"1086":57,"1087":55,"1088":59,"1089":53,"1090":46,"1091":50,"1092":80,"1093":51,"1094":56,"1095":52,"1096":76,"1097":83,"1098":61,"1099":70,"1100":53,"1101":53,"1102":77,"1103":53,"1104":53,"1105":53,"1106":56,"1107":42,"1108":53,"1109":50,"1110":22,"1111":24,"1112":22,"1113":87,"1114":87,"1115":56,"1116":52,"1117":56,"1118":50,"1119":55,"1120":133,"1121":62,"1122":73,"1123":58,"1124":101,"1125":73,"1126":66,"1127":50,"1128":95,"1129":72,"1130":93,"1131":72,"1132":104,"1133":73,"1134":60,"1135":45,"1136":83,"1137":72,"1138":76,"1139":57,"1140":66,"1141":53,"1142":66,"1143":58,"1144":127,"1145":105,"1146":83,"1147":61,"1148":119,"1149":85,"1150":133,"1151":62,"1152":72,"1153":50,"1154":50,"1155":0,"1156":0,"1157":0,"1158":0,"1159":0,"1160":0,"1161":0,"1162":71,"1163":55,"1164":73,"1165":56,"1166":66,"1167":55,"1168":55,"1169":42,"1170":61,"1171":47,"1172":67,"1173":54,"1174":102,"1175":79,"1176":65,"1177":50,"1178":68,"1179":54,"1180":67,"1181":55,"1182":58,"1183":43,"1184":79,"1185":61,"1186":73,"1187":58,"1188":101,"1189":76,"1190":113,"1191":87,"1192":75,"1193":52,"1194":72,"1195":53,"1196":62,"1197":50,"1198":64,"1199":50,"1200":64,"1201":50,"1202":62,"1203":52,"1204":93,"1205":71,"1206":67,"1207":54,"1208":65,"1209":52,"1210":66,"1211":55,"1212":91,"1213":69,"1214":91,"1215":69,"1216":25,"1217":101,"1218":78,"1219":66,"1220":55,"1221":65,"1222":58,"1223":73,"1224":56,"1225":72,"1226":55,"1227":66,"1228":52,"1229":83,"1230":68,"1231":27,"1232":64,"1233":53,"1234":64,"1235":53,"1236":92,"1237":87,"1238":61,"1239":53,"1240":74,"1241":54,"1242":75,"1243":55,"1244":101,"1245":78,"1246":65,"1247":50,"1248":54,"1249":50,"1250":73,"1251":56,"1252":73,"1253":56,"1254":76,"1255":57,"1256":76,"1257":57,"1258":79,"1259":56,"1260":73,"1261":50,"1262":61,"1263":50,"1264":61,"1265":50,"1266":61,"1267":50,"1268":65,"1269":52,"1270":60,"1271":43,"1272":87,"1273":70,"1274":54,"1275":36,"1276":66,"1277":50,"1278":67,"1279":50,"1328":50,"1329":83,"1330":69,"1331":75,"1332":76,"1333":69,"1334":67,"1335":62,"1336":69,"1337":81,"1338":76,"1339":70,"1340":41,"1341":81,"1342":71,"1343":70,"1344":57,"1345":64,"1346":76,"1347":68,"1348":80,"1349":62,"1350":62,"1351":65,"1352":72,"1353":63,"1354":79,"1355":64,"1356":80,"1357":72,"1358":78,"1359":57,"1360":67,"1361":66,"1362":59,"1363":80,"1364":61,"1365":77,"1366":69,"1367":50,"1368":50,"1369":21,"1370":21,"1371":21,"1372":29,"1373":21,"1374":44,"1375":41,"1376":50,"1377":92,"1378":59,"1379":63,"1380":64,"1381":59,"1382":60,"1383":47,"1384":59,"1385":66,"1386":60,"1387":59,"1388":26,"1389":92,"1390":58,"1391":59,"1392":56,"1393":59,"1394":59,"1395":57,"1396":60,"1397":26,"1398":59,"1399":41,"1400":59,"1401":34,"1402":92,"1403":51,"1404":61,"1405":59,"1406":59,"1407":93,"1408":59,"1409":59,"1410":32,"1411":93,"1412":59,"1413":58,"1414":64,"1415":63,"1416":50,"1417":25,"1418":44,"1419":50,"1420":50,"1421":81,"1422":81,"1423":73,"1424":50,"1425":0,"1426":0,"1427":0,"1428":0,"1429":0,"1430":0,"1431":0,"1432":0,"1433":0,"1434":0,"1435":0,"1436":0,"1437":0,"1438":0,"1439":0,"1440":0,"1441":0,"1442":0,"1443":0,"1444":0,"1445":0,"1446":0,"1447":0,"1448":0,"1449":0,"1450":0,"1451":0,"1452":0,"1453":0,"1454":0,"1455":0,"1456":0,"1457":0,"1458":0,"1459":0,"1460":0,"1461":0,"1462":0,"1463":0,"1464":0,"1465":0,"1466":0,"1467":0,"1468":0,"1469":0,"1470":38,"1471":0,"1472":27,"1473":0,"1474":0,"1475":27,"1476":0,"1477":0,"1478":35,"1479":0,"1480":50,"1481":50,"1482":50,"1483":50,"1484":50,"1485":50,"1486":50,"1487":50,"1488":56,"1489":54,"1490":39,"1491":50,"1492":60,"1493":24,"1494":38,"1495":59,"1496":58,"1497":24,"1498":50,"1499":46,"1500":46,"1501":59,"1502":60,"1503":24,"1504":35,"1505":57,"1506":52,"1507":56,"1508":54,"1509":46,"1510":47,"1511":55,"1512":50,"1513":69,"1514":64,"1515":50,"1516":50,"1517":50,"1518":50,"1519":50,"1520":49,"1521":49,"1522":49,"1523":23,"1524":41,"1525":50,"1526":50,"1527":50,"1528":50,"1529":50,"1530":50,"1531":50,"1532":50,"1533":50,"1534":50,"1535":50,"1536":74,"1537":130,"1538":75,"1539":81,"1540":265,"1541":112,"1542":64,"1543":64,"1544":77,"1545":52,"1546":52,"1547":26,"1548":31,"1549":23,"1550":65,"1551":54,"1552":0,"1553":0,"1554":0,"1555":0,"1556":0,"1557":0,"1558":0,"1559":0,"1560":0,"1561":0,"1562":0,"1563":31,"1564":0,"1565":50,"1566":28,"1567":35,"1568":80,"1569":41,"1570":20,"1571":20,"1572":43,"1573":20,"1574":63,"1575":22,"1576":71,"1577":37,"1578":71,"1579":71,"1580":52,"1581":52,"1582":52,"1583":33,"1584":33,"1585":48,"1586":48,"1587":82,"1588":82,"1589":109,"1590":109,"1591":58,"1592":58,"1593":45,"1594":45,"1595":70,"1596":70,"1597":66,"1598":66,"1599":66,"1600":20,"1601":78,"1602":58,"1603":60,"1604":50,"1605":33,"1606":52,"1607":37,"1608":43,"1609":63,"1610":58,"1611":0,"1612":0,"1613":0,"1614":0,"1615":0,"1616":0,"1617":0,"1618":0,"1619":0,"1620":0,"1621":0,"1622":0,"1623":0,"1624":0,"1625":0,"1626":0,"1627":0,"1628":0,"1629":0,"1630":0,"1631":0,"1632":52,"1633":52,"1634":52,"1635":52,"1636":52,"1637":52,"1638":52,"1639":52,"1640":52,"1641":52,"1642":52,"1643":31,"1644":31,"1645":52,"1646":71,"1647":58,"1648":0,"1649":22,"1650":20,"1651":20,"1652":0,"1653":20,"1654":43,"1655":43,"1656":63,"1657":71,"1658":71,"1659":71,"1660":71,"1661":71,"1662":71,"1663":71,"1664":71,"1665":52,"1666":52,"1667":52,"1668":52,"1669":52,"1670":52,"1671":52,"1672":33,"1673":33,"1674":33,"1675":33,"1676":33,"1677":33,"1678":33,"1679":33,"1680":33,"1681":48,"1682":48,"1683":48,"1684":48,"1685":48,"1686":48,"1687":48,"1688":48,"1689":48,"1690":82,"1691":82,"1692":82,"1693":109,"1694":109,"1695":58,"1696":45,"1697":78,"1698":78,"1699":78,"1700":78,"1701":78,"1702":78,"1703":58,"1704":58,"1705":93,"1706":115,"1707":93,"1708":60,"1709":60,"1710":60,"1711":93,"1712":93,"1713":93,"1714":93,"1715":93,"1716":93,"1717":50,"1718":50,"1719":50,"1720":50,"1721":52,"1722":52,"1723":52,"1724":52,"1725":52,"1726":39,"1727":52,"1728":37,"1729":28,"1730":38,"1731":38,"1732":43,"1733":43,"1734":43,"1735":43,"1736":43,"1737":43,"1738":43,"1739":43,"1740":63,"1741":58,"1742":63,"1743":43,"1744":63,"1745":58,"1746":81,"1747":81,"1748":20,"1749":28,"1750":0,"1751":0,"1752":0,"1753":0,"1754":0,"1755":0,"1756":0,"1757":112,"1758":108,"1759":0,"1760":0,"1761":0,"1762":0,"1763":0,"1764":0,"1765":19,"1766":37,"1767":0,"1768":0,"1769":60,"1770":0,"1771":0,"1772":0,"1773":0,"1774":33,"1775":48,"1776":52,"1777":52,"1778":52,"1779":52,"1780":52,"1781":52,"1782":52,"1783":52,"1784":52,"1785":52,"1786":82,"1787":109,"1788":45,"1789":41,"1790":33,"1791":45,"2304":66,"2305":0,"2306":0,"2307":92,"2308":72,"2309":72,"2310":99,"2311":53,"2312":53,"2313":47,"2314":67,"2315":82,"2316":71,"2317":54,"2318":54,"2319":54,"2320":54,"2321":99,"2322":99,"2323":99,"2324":99,"2325":77,"2326":79,"2327":55,"2328":63,"2329":62,"2330":64,"2331":67,"2332":74,"2333":77,"2334":70,"2335":50,"2336":57,"2337":54,"2338":52,"2339":75,"2340":55,"2341":64,"2342":52,"2343":63,"2344":51,"2345":51,"2346":56,"2347":79,"2348":56,"2349":58,"2350":57,"2351":60,"2352":40,"2353":40,"2354":71,"2355":73,"2356":73,"2357":54,"2358":71,"2359":57,"2360":68,"2361":50,"2362":0,"2363":0,"2364":0,"2365":49,"2366":0,"2367":0,"2368":0,"2369":0,"2370":0,"2371":0,"2372":0,"2373":0,"2374":0,"2375":0,"2376":0,"2377":0,"2378":0,"2379":0,"2380":0,"2381":0,"2382":0,"2383":0,"2384":122,"2385":0,"2386":0,"2387":0,"2388":0,"2389":0,"2390":0,"2391":0,"2392":77,"2393":79,"2394":55,"2395":74,"2396":54,"2397":52,"2398":79,"2399":60,"2400":82,"2401":71,"2402":0,"2403":0,"2404":47,"2405":74,"2406":46,"2407":48,"2408":49,"2409":48,"2410":50,"2411":54,"2412":52,"2413":65,"2414":48,"2415":47,"2416":49,"2417":31,"2418":72,"2419":72,"2420":99,"2421":99,"2422":72,"2423":72,"2424":51,"2425":74,"2426":60,"2427":55,"2428":72,"2429":45,"2430":55,"2431":56,"8192":50,"8193":100,"8194":27,"8195":83,"8196":33,"8197":27,"8198":16,"8199":55,"8200":27,"8201":4,"8202":1,"8203":0,"8204":0,"8205":0,"8206":0,"8207":0,"8208":38,"8209":33,"8210":33,"8211":50,"8212":100,"8213":100,"8214":43,"8215":33,"8216":27,"8217":27,"8218":27,"8219":22,"8220":42,"8221":42,"8222":42,"8223":33,"8224":55,"8225":55,"8226":35,"8227":35,"8228":32,"8229":66,"8230":100,"8231":32,"8232":27,"8233":27,"8234":0,"8235":0,"8236":0,"8237":0,"8238":0,"8239":13,"8240":114,"8241":137,"8242":33,"8243":52,"8244":67,"8245":33,"8246":52,"8247":67,"8248":33,"8249":25,"8250":25,"8251":58,"8252":55,"8253":55,"8254":33,"8255":97,"8256":97,"8257":61,"8258":81,"8259":33,"8260":16,"8261":27,"8262":27,"8263":111,"8264":83,"8265":83,"8266":62,"8267":53,"8268":53,"8269":53,"8270":38,"8271":27,"8272":97,"8273":38,"8274":88,"8275":87,"8276":97,"8277":68,"8278":58,"8279":85,"8280":58,"8281":58,"8282":27,"8283":58,"8284":68,"8285":27,"8286":27,"8287":27,"8288":0,"8289":0,"8290":0,"8291":0,"8292":0,"8293":0,"8294":0,"8295":0,"8296":0,"8297":0,"8298":0,"8299":0,"8300":0,"8301":0,"8302":0,"8303":0}');function r(e,t,i=400,r=1.1){return Math.max(e.split("").reduce(((e,a)=>{const s=String(a.charCodeAt(0));let o=50;s in n&&(o=n[s]);return e+t*(o/100)*r*(25e-5*i+.9)}),0),0)}},24153:(e,t,i)=>{"use strict";i.d(t,{XO:()=>o,_7:()=>s,tv:()=>a});var n=i(33655),r=i(88485);let a=function(e){return e.CONNECTION_STATE_CHANGE="connection_state_change",e}({});const s=(0,n.u)("FacebookAPI");class o extends r.V{}},50719:(e,t,i)=>{"use strict";i.d(t,{t:()=>n});const n=(0,i(33655).u)("FollowAPI")},19118:(e,t,i)=>{"use strict";i.d(t,{JK:()=>r,mc:()=>a,tG:()=>s});var n=i(88485);let r=function(e){return e.FOLLOW_USER="follow_user",e.UNFOLLOW_USER="unfollow_user",e.IS_FOLLOWING_USER="is_following_user",e}({}),a=function(e){return e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class s extends n.V{emitOperationSync(e,t){return this.emitSync(a.OPERATION,{operation:e,uris:t}).defaultPrevented}emitOperationComplete(e,t,i=null){this.emit(a.OPERATION_COMPLETE,{operation:e,uris:t,error:i})}}},72702:(e,t,i)=>{"use strict";i.d(t,{T:()=>m});var n=i(61544),r=i(15742);i(8385);const a=Spicetify.GraphQL.Definitions["isFollowingUsers"]=new r.l("isFollowingUsers","query","c00e0cb6c7766e7230fc256cf4fe07aec63b53d1160a323940fce7b664e95596",null),s=Spicetify.GraphQL.Definitions["followUsers"]=new r.l("followUsers","mutation","c00e0cb6c7766e7230fc256cf4fe07aec63b53d1160a323940fce7b664e95596",null),o=Spicetify.GraphQL.Definitions["unfollowUsers"]=new r.l("unfollowUsers","mutation","c00e0cb6c7766e7230fc256cf4fe07aec63b53d1160a323940fce7b664e95596",null);var l=i(43697);var c=i(19118),u=i(5277);const d=Symbol();class m{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={},i=[];if(this._validateURIs(e),e.forEach((e=>{const n=this._cache.get(e);void 0!==n?t[e]=n:i.push(e)})),i.length>0){const e=await this.executeOperation(c.JK.IS_FOLLOWING_USER,i,(()=>async function(e,t){const i=[];if(t.length>0){const n=await e(a,{uris:t});n?.data?.users?.forEach((e=>{"User"===e.__typename?i.push({uri:e.uri,isFollowing:e.following}):"NotFound"===e.__typename&&i.push({uri:e.uri,isFollowing:!1})}))}return i}(this._loader,i)));e!==d?e.forEach((e=>{this._cache.set(e.uri,e.isFollowing),t[e.uri]=e.isFollowing})):i.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 i=[];if(t.length>0){const r=await e(s,{usernames:t.map((e=>(0,l.v)(e)))});r?.data?.followUsers.responses.forEach((e=>{if("FollowUserResult"===e.__typename&&e.result){const t=(0,n.Qj)(e.username).toURI();i.push({uri:t,isFollowing:!0})}}))}return i}(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 i=[];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,n.Qj)(e.username).toURI();i.push({uri:t,isFollowing:!1})}}))}return i}(this._loader,e)));t!==d&&t.forEach((e=>{this._cache.set(e.uri,e.isFollowing)}))}async executeOperation(e,t,i){if(this._events.emitOperationSync(e,t))return d;try{const n=await i();return this._events.emitOperationComplete(e,t),n}catch(i){throw this._events.emitOperationComplete(e,t,i instanceof Error?i:new Error("Unknown error object")),i}}_validateURIs(e){e.forEach((e=>{if(!(0,n.AP)(e))throw new Error(`Expected a profile URI, but got ${e}!`)}))}}},42704:(e,t,i)=>{"use strict";i.d(t,{f:()=>a});var n=i(50719),r=i(60102);const a=()=>(0,r.N)(n.t)},18416:(e,t,i)=>{"use strict";i.d(t,{N:()=>a});var n=i(30758),r=i(42704);const a=(e,t)=>{const i=(0,r.f)();(0,n.useEffect)((()=>i.getEvents().addListener(e,t)),[e,i,t])}},4852:(e,t,i)=>{"use strict";i.d(t,{f:()=>o});var n=i(30758),r=i(73075),a=i.n(r);const s=new Map;function o(e,t){const i=function(e){const t=s.get(e.toString());if(t)return t;const i=[];return a().bind(e,(()=>i.forEach((e=>e())))),s.set(e.toString(),i),i}(e);(0,n.useEffect)((()=>(i.push(t),()=>{i.splice(i.indexOf(t),1)})),[i,t])}},53961:(e,t,i)=>{"use strict";i.d(t,{H:()=>h});var n=i(30758),r=i(19287),a=i(91947),s=i(52608),o=i(60653);var l=i(63051),c=i(14403),u=i(2435),d=i(63135),m=i(95421),p=i(10132);const h=()=>{const e=(0,o.Q)(),t=(0,l.l)(),i=(0,s.n)(),{connectionStatus:h,isActiveDeviceLocal:g}=(0,c.v)((e=>({connectionStatus:e.connectionStatus,isActiveDeviceLocal:e.activeDevice?.isLocal})),p.a),f=(0,u.o)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.isPaused===t?.isPaused&&e?.item?.uri===t?.item?.uri)),v=e.getCapabilities(),[y,b]=(0,n.useState)((()=>"open"===e.getCurrentState())),{setVideoPlayerUIFlag:_}=(0,r.d)();((e,t)=>{const i=(0,o.Q)(),r=(0,n.useRef)(t);r.current=t,(0,n.useEffect)((()=>{const t=i.getEvents(),n=r.current;return t.addListener(e,n)}),[i,e])})("visibility_change",(({data:e})=>{!1===e&&_(a.n.documentPip,e),b(e)})),(0,n.useEffect)((()=>{y&&e.syncWithPlayerState(f)}),[e,y,f]),(0,n.useEffect)((()=>{!e.isAllowed(f,h,g)&&y&&e.close()}),[e,h,g,y,f]);const E=f?.item,C=E&&(0,m.p)(E)&&("video"===E.mediaType||"mixed"===E.mediaType),x=E&&(0,d.N)(E),S=!C||v.supportsVideo,A=!x||v.supportsAds,T=!t||v.supportsConnect,I=i||v.supportsOffline,N=v.isEnabled&&S&&A&&T&&I,w=(0,n.useCallback)((async()=>{await e.open(f)}),[e,f]),R=(0,n.useCallback)((()=>{e.close()}),[e]);return{capabilities:v,isOpen:y,open:w,close:R,canOpen:N}}},7703:(e,t,i)=>{"use strict";i.d(t,{D:()=>u});var n=i(30758),r=i(94794);var a=i(19287),s=i(91947),o=i(45346),l=i(53961),c=i(72091);const u=({item:e,onClick:t})=>{const i=(0,o.W)(),{capabilities:{isEnabled:u},isOpen:d,close:m,open:p,canOpen:h}=(0,l.H)(),{videoPlayerMode:g}=(0,a.d)(),{spec:f,logger:v}=(0,c.r)(r.h9,{data:{identifier:g===s.K.cinema?r.gw.CINEMA:r.gw.DESKTOP}}),y=(0,n.useCallback)((()=>{let n;u&&(d?(m(),e?.uri&&v.logInteraction(f.pipButtonFactory({uri:e.uri}).hitUiHide()),n="close-picture-in-picture"):(p(),e?.uri&&(({spec:e,logger:t,uri:i})=>{const n=window.documentPictureInPicture;if(!n)return;const r=a=>{setTimeout((()=>{const n=a.window?.innerWidth,r=a.window?.innerHeight;if(!n||!r)return;const s=e.pipButtonFactory({uri:i}).hitUiOpenWindow({widthPx:n,heightPx:r});t.logInteraction(s)}),100),n.removeEventListener("enter",r)};n.addEventListener("enter",r)})({spec:f,logger:v,uri:e.uri}),n="show-picture-in-picture"),t?.(!d,e?.uri),i({type:"click",intent:n,targetUri:e?.uri,itemIdSuffix:"picture-in-picture-toggle"}))}),[m,u,d,e?.uri,v,t,i,p,f]);return{showButton:h,isActive:d,onClick:y}}},68353:(e,t,i)=>{"use strict";i.d(t,{K:()=>l});var n=i(68413),r=i(69011),a=i(19159),s=i(63135),o=i(53830);function l({container:e,history:t,eventSender:i,appStartupId:l,playerAPI:c,resolver:u}){const d=u.getValue(a.PnP),m=u.getValue(a.mPu),p=u.getValue(a.k7D),h=u.getValue(a.C7K),g=u.getValue(a.umO),f=u.getValue(a.bhM),v=u.getValue(a.mnc);return(0,n.x)(e===r.m.Desktop,t,i,(async()=>{const e=c.getState(),t=e?.item??void 0;return null!==e&&(0,s.N)(t)?{positionMs:(0,o.s)(e),adId:t.id}:null}),l,d,m,p,g,h,f,v)()}},71909:(e,t,i)=>{"use strict";i.d(t,{K:()=>a});var n=i(40312),r=i(84640);function a(e,t,i,a){(0,r.N)(e),n.n.setLocale(t.locale),n.n.setMarket(t.market),n.n.setSession(t),n.n.setGlobalRequestHeaders([["App-Platform",a],["Spotify-App-Version",i]])}},41447:(e,t,i)=>{"use strict";i.d(t,{Fi:()=>a,KM:()=>r,sD:()=>s});var n=i(33655);const r=(0,n.u)("EventSender"),a=(0,n.u)("History"),s=(0,n.u)("Transport")},80553:(e,t,i)=>{"use strict";i.d(t,{_:()=>um,N:()=>om});var n=i(46588),r=i(83407),a=i(75751),s=i(77773),o=i(49100),l=i(5681),c=i(87172),u=i(60205),d=i(28835),m=i(50822),p=i(31052),h=i(52840),g=i(11808),f=i(6021),v=i(68413),y=i(78604),b=i(61544);let _=function(e){return e.FACEBOOK="FACEBOOK",e}({});class E{constructor(e,t,i){this.presenceView=e,this.presence2=t,this.facebook=i}getCapabilities(){return{isSupported:!0}}connectToFacebook(){return this.facebook.connectToFacebook()}subscribeToFacebookConnectionState(e){return this.facebook.subscribeToFacebookConnectionState(e)}subscribeToBuddyActivity(e,t){return this.presence2.subscribeToBuddyActivity(e,(async()=>{const i=await this.presenceView.getBuddyActivity(e);i&&t(i)}))}async fetchFacebookFriends(){const e=await this.facebook.getFacebookFriends();return(e.body?.results||[]).filter((e=>e.indexes.includes(_.FACEBOOK))).map((({title:e,uri:t,image:i,following:n})=>({title:e,uri:t,image:i,following:n})))}async fetchFriendActivity(e){const t=(0,b.o_)(e[0]).username,i=await this.presenceView.getBuddyActivity(t);return i?[i]:[]}}var C=i(89269);class x{constructor(e,t){this.cosmos=e,this.builder=t}connectToFacebook(){return this.cosmos.post("sp://facebook/v1/connection",{enable:!0})}subscribeToFacebookConnectionState(e){return this.cosmos.sub("sp://facebook/v1/connection",(t=>{e(t)}))}getFacebookFriends(){return(0,C.KY)(this.builder)}}class S{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,C.GG)(this.builder,e,t):Promise.resolve(),onCancel:t=>t?(0,C.Np)(this.builder,e,t):Promise.resolve()})}}class A{constructor(e){this.builder=e}async getBuddyActivity(e){try{return(await(0,C.Yf)(this.builder,e)).body}catch(e){return null}}getBuddyFeed(){return(0,C.xA)(this.builder)}}var T=i(93760);class I{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 i=await this.getBuddyActivity(e);t(i.body)}catch(e){}return{status:200,status_text:"Ok"}},onSubscribe:t=>t?(0,C.GG)(this._builder,e,t):Promise.resolve(),onCancel:t=>t?(0,C.Np)(this._builder,e,t):Promise.resolve()})}getBuddyActivity(e){return(0,C.Yf)(this._builder,e)}getBuddyFeed(){return(0,C.xA)(this._builder)}getFacebookFriends(){return(0,C.KY)(this._builder)}}class N{constructor(e,t){this.cosmos=e,this.buddyFetchApi=t}getCapabilities(){return{isSupported:!0}}connectToFacebook(){return this.cosmos.post("sp://facebook/v1/connection",{enable:!0})}subscribeToFacebookConnectionState(e){return this.cosmos.sub("sp://facebook/v1/connection",(t=>{e(t)}))}subscribeToBuddyActivity(e,t){return this.buddyFetchApi.subscribeToBuddyActivity(e,t)}async fetchFacebookFriends(){const e=await this.buddyFetchApi.getFacebookFriends();return(e.body?.results||[]).filter((e=>e.indexes.includes(_.FACEBOOK))).map((({title:e,uri:t,image:i,following:n})=>({title:e,uri:t,image:i,following:n})))}async fetchFriendActivity(e){const t=(0,b.o_)(e[0]).username,i=await this.buddyFetchApi.getBuddyActivity(t);return i.body?[i.body]:[]}}var w=i(58570);class R{value=null;subs=new Set;subscription=null;constructor(e,t,i){this.prefsApi=e,this.identifier=t,this.deserializeValue=i,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 k=i(65495);class O extends k.e{}class P extends R{static identifier="app.player.autoplay";static deserialize=e=>{if(void 0===e.bool)throw new O(`Could not deserialize ${P.identifier} from ${JSON.stringify(e)}`);return e.bool};constructor(e){super(e,P.identifier,P.deserialize)}}class L{value=null;subs=new Set;subscription=null;constructor(e,t,i){this.productStateApi=e,this.identifier=t,this.deserialize=i,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 j extends L{constructor(e,t,i,n){super(e,t,n),this.productStateApi=e,this.identifier=t,this.serialize=i,this.setValue=this.setValue.bind(this)}async setValue(e){await this.productStateApi.setValues({[this.identifier]:this.serialize(e)}),this.value=e}}var D=i(1032);class M extends j{static identifier="autoplay";static serialize=D.Ax;static deserialize=e=>void 0===e||(0,D.zf)(e);key="autoplay";constructor(e,t){super(e,M.identifier,M.serialize,M.deserialize),this.autoPlaySupported=new P(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 U extends R{constructor(e,t,i,n){super(e,t,n),this.prefsApi=e,this.identifier=t,this.serializeValue=i,this.setValue=this.setValue.bind(this)}async setValue(e){await this.prefsApi.set({entries:{[this.identifier]:this.serializeValue(e)}}),this.value=e}}class B extends U{static identifier="language";static serialize=e=>({string:e});static deserialize=e=>{if(void 0===e?.string)throw new O(`Could not deserialize ${B.identifier} from ${JSON.stringify(e)}`);return e.string};key="language";constructor(e){super(e,B.identifier,B.serialize,B.deserialize)}}class F extends U{static identifier="audio.allow_downgrade";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new O(`Could not deserialize ${F.identifier} from ${JSON.stringify(e)}`);return e.bool};key="quality.autoAdjustQuality";constructor(e){super(e,F.identifier,F.serialize,F.deserialize)}}class H extends U{static identifier="audio.sync_bitrate_enumeration";static serialize=e=>({number:BigInt(e)});static deserialize=e=>{const t=(0,D.FB)(e.number);if(null===t)throw new O(`Could not deserialize ${H.identifier} from ${JSON.stringify(e)}`);return t};key="quality.downloadAudioQuality";constructor(e,t){super(e,H.identifier,H.serialize,H.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 V=i(26328);class G extends L{static identifier="audio-quality";static deserialize=e=>{const t=(0,D.rj)(e);if(null===t)throw new O(`Could not deserialize ${G.identifier} from ${JSON.stringify(e)}`);return t};key="quality.maxSupportedQuality";constructor(e){super(e,G.identifier,G.deserialize),this.clampAudioQuality=this.clampAudioQuality.bind(this)}async clampAudioQuality(e){this.value??=await this.getValue();const t=this.value===V.Qi.LOSSLESS&&e>V.a1.AUTOMATIC&&e<=V.a1.LOSSLESS,i=this.value===V.Qi.VERY_HIGH&&e<=V.a1.VERY_HIGH,n=this.value===V.Qi.STANDARD&&e<=V.a1.HIGH;return t||i||n?e:V.a1.HIGH}}class z extends U{static identifier="audio.normalize_v2";static serialize=e=>({bool:e});static deserialize=e=>{if(void 0===e.bool)throw new O(`Could not deserialize ${z.identifier} from ${JSON.stringify(e)}`);return e.bool};key="quality.normalizeVolume";constructor(e){super(e,z.identifier,z.serialize,z.deserialize)}}const W=e=>e.find((e=>e.isActive))?.localIdentifier??null;class K{callbacks=new Set;stateSubscription=null;static deserialize=e=>{const t=(0,D.FB)(e);if(null===t)throw new O(`Could not deserialize ${JSON.stringify(e)}`);return t};getActiveDeviceId(){return new Promise((e=>{const t=this.connectService.state(a.d1.fromPartial({}),(({devices:i})=>{t.cancel(),e(W(i))}))}))}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 i=await this.connectService.getDeviceSettings(a.zF.fromPartial({deviceId:t}));return{streamingQuality:K.deserialize(i.deviceSettings?.streamQuality),maxSupportedQuality:K.deserialize(i.deviceSettings?.capabilities?.maxSupportedStreamQuality)}}subValue(e){return 0===this.callbacks.size&&(this.stateSubscription=this.connectService.state(a.d1.fromPartial({}),(({devices:e})=>{e&&e.length>0&&this.callbacks.size>0&&this.getValue(W(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(a.MG.fromPartial({deviceId:t,value:e}))}}class Y extends U{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,D.FB)(e.number);if(null===t)throw new O(`Could not deserialize ${JSON.stringify(e)}`);return t};key="quality.streamingQuality";constructor(e,t){super(e,Y.identifierNonMetered,Y.serialize,Y.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),i=Y.serialize(t);await this.prefsApi.set({entries:{[Y.identifierNonMetered]:i,[Y.identifierMetered]:i}}),this.value=e}}class q extends U{static identifier="audio.loudness.environment";static serialize=e=>({number:BigInt(e)});static deserialize=e=>{const t=(0,D.dt)(e.number);if(null===t)throw new O(`Could not deserialize ${q.identifier} from ${JSON.stringify(e)}`);return t};key="quality.volumeLevel";constructor(e){super(e,q.identifier,q.serialize,q.deserialize)}}class Z{constructor(e,t,i,n){this.playbackService=i,this.maxSupportedQuality=new G(t),this.streamingQuality=new Y(e,this.maxSupportedQuality),this.downloadAudioQuality=new H(e,this.maxSupportedQuality),this.normalizeVolume=new z(e),this.autoAdjustQuality=new F(e),this.volumeLevel=new q(e),this.remoteQuality=new K(n)}async getFormats(){return(await this.playbackService.getFormats({})).formats.filter((e=>e.supported)).map((e=>{const t=(0,D.FB)(e.enumValue);if(!t)throw new O(`Could not deserialize formats from ${JSON.stringify(e)}`);return{supported:e.supported,quality:t}}))}}class $ extends R{static identifier="app.browser.zoom-level";static deserialize=e=>{if(void 0===e?.number)throw new O(`Could not deserialize ${$.identifier} from ${JSON.stringify(e)}`);return Number(e.number)};key="app.browser.zoom-level";constructor(e){super(e,$.identifier,$.deserialize)}}class Q{constructor(e,t,i,n){this.language=new B(e),this.quality=new Z(e,t,i,n),this.autoPlay=new M(t,e),this.viewportZoom=new $(e)}}var J=i(93843),X=i(96887),ee=i(19510),te=i(17818);class ie{cleanActions(){}triggerActions(){}storeAction(){}}var ne=i(85411);class re{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 ae=i(77814),se=i(44305);const oe={artist:se.XU.FOLLOWED_ARTISTS,artistban:se.XU.BANNED_ARTISTS,ban:se.XU.BAN,collection:se.XU.COLLECTION,enhanced:se.XU.ENHANCED,ignoreinrecs:se.XU.IGNOREINRECS,listenlater:se.XU.LISTENLATER,show:se.XU.SHOW,ylpin:se.XU.PINNED_YOUR_LIBRARY,prerelease:se.XU.PRERELEASE,tags:se.XU.TAGS};class le{events=new ae.r0;constructor(e){this._service=e}getEvents(){return this.events}async get(e){return(await this._service.get(se.XI.fromPartial({set:oe[e]}))).items}subscribe(e,t){return this._service.streamGet(se.XI.fromPartial({set:oe[e]}),(({items:e})=>{t(e)})).cancel}async add(e,t){await this._service.add(se.XI.fromPartial({set:oe[e],items:t})),this.events.emit(ae.ar.ADDED,{set:e,uris:t,source:"client"})}async remove(e,t){await this._service.remove(se.XI.fromPartial({set:oe[e],items:t})),this.events.emit(ae.ar.REMOVED,{set:e,uris:t,source:"client"})}async contains(e,t){const i=await this._service.contains(se.XI.fromPartial({set:oe[e],items:t}));return i.contains?i.contains.found:new Array(t.length).fill(!1)}subscribeContains(e,t,i){return this._service.streamContains(se.XI.fromPartial({set:oe[e],items:t}),(({contains:e})=>{i(e?e.found:new Array(t.length).fill(!1))})).cancel}}var ce=i(28568),ue=i(35743);class de 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=[])}}class me{constructor(e){this._cosmos=e}async enableMenuItem(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"update_menu_state",[e]:!0})}async disableMenuItem(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"update_menu_state",[e]:!1})}async setTitlebarHeight(e){await this._cosmos.post("sp://messages/v1/container/control",{type:"update_titlebar",height:e})}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 de(e,["sp://messages/v1/container/control","sp://desktop/v1/navigation"])}(this._cosmos)}}var pe=i(52118),he=i(38389);const ge=2**31-1,fe=e=>BigInt(Math.round(e/he.Zs*ge));class ve extends pe.W{constructor(e,t){super(t),this.prefs=e}subscribeToEnabledState(e){return this.prefs.sub({key:"audio.equalizer_v2"},(t=>{const i=!!t.entries["audio.equalizer_v2"].bool;e(i)})).cancel}setEnabledState(e){this.prefs.set({entries:{"audio.equalizer_v2":{bool:e}}})}async setFilterGain(e,t){await this.prefs.set({entries:{[e]:{number:fe(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<this.filters.length;t++){const i=e[t],n=this.filters[t],r=i.entries[n.key].number;r&&(this.filters[t].gain=Number(r)/ge*he.Zs)}return this.filters}isSupported(){return!0}}var ye=i(5095),be=i(24153);const _e="sp://facebook/v1/connection";class Ee extends be.XO{_numListeners=0;_subscription=null;constructor(e){super(),this._cosmos=e,this.onAddListener(be.tv.CONNECTION_STATE_CHANGE,(()=>{this._numListeners++,null===this._subscription&&(this._subscription=this._cosmos.sub(_e,(e=>{this.emit(be.tv.CONNECTION_STATE_CHANGE,e)})))})),this.onRemoveListener(be.tv.CONNECTION_STATE_CHANGE,(()=>{this._numListeners--,null!==this._subscription&&0===this._numListeners&&(this._subscription.cancel(),this._subscription=null)}))}connect(e){return this._cosmos.put(_e,e)}disconnect(){return this._cosmos.del(_e)}}var Ce=i(72702),xe=i(50719),Se=i(68353),Ae=i(71909),Te=i(41447),Ie=i(43433);const Ne=(e,t)=>{const i=e.event_sender_context_information;return[(0,Ie.QI)({version_code:i.client_version_int,version_string:i.client_version_string}),(0,Ie.ks)(t),(0,Ie.xB)(i.installation_id),(0,Ie.es)({device_id:i.device_id,device_manufacturer:i.device_manufacturer,device_model:i.device_model,os_version:i.os_version,platform_type:i.platform_type})]},we=(e,t,{clientId:i,ownerProvider:n,storagePrefix:r,useInMemoryStorage:a,useOptimizedESS2NA:s})=>(0,Ie.kE)({transport:t,suppressPersist:false,context:Ne(e,i),storage:a?{adapter:new Ie.ty,flushStrategy:{kind:Ie.aN.IMMEDIATE}}:void 0,storagePrefix:r,ownerProvider:n,useOptimizedESS2NA:s});async function Re(e){return{remote_config_client_id:"desktop-ui",...await e.get("sp://desktop/v1/platform")}}async function ke(e){try{const t=await e.get("sp://remote-config-overrides/v1/values");return d.Vk.fromJSON(t["desktop-ui"]||{})}catch(e){return console.warn(e),d.Vk.builder().build()}}const Oe=/Spotify\/(?<version>.+)\s/;var Pe=i(46227);const Le=i(57321).HZ.addMiddleware(Pe.F);var je=i(51489);const De={"Master Build":"(master)","Release Build":"(release)","PR Build":"(pull request)","Local Build":"(local development)"};class Me{constructor(e){this._cosmos=e}async getVersionInfo(){const e=await this._cosmos.get("sp://desktop/v1/version"),t=De[e.buildType]||"Spotify (unknown)";return{containerVersion:e.version,containerBuildType:t,containerPlatform:e.platform,uiVersion:"xpui_2024-07-12_1720793068427_242057a",cefVersion:e.cefVersion,cefRuntime:e.cefRuntime,buildSystem:"b"===e.buildSystemID?"Build System: Bazel":"Build System: CMake"}}subscribe(e){return this._cosmos.sub("sp://desktop/v1/upgrade/status",(t=>{void 0!==t.pending?e({state:je.D.UPDATE_AVAILABLE,version:t.pending.version}):void 0!==t.downloading?e({state:je.D.UPDATE_PROCESSING,version:t.downloading.version}):void 0!==t.prepared?e({state:je.D.UPDATE_READY,version:t.prepared.version}):e({state:je.D.UPDATE_NONE,version:null})}))}async prepareUpdate(){await this._cosmos.post("sp://desktop/v1/upgrade/download")}async applyUpdate(){await this._cosmos.post("sp://desktop/v1/restart")}}var Ue=i(21233),Be=i(66147),Fe=i(61358),He=i(71817);async function Ve(e,t,i){const n=i.tracks.filter((e=>!!e.uri)).slice(1).map((e=>function(e){return(0,b.U_)(e.uri)||(0,b.Pk)(e.uri)?{type:He.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:He.c.ALBUM,uri:e.metadata.album_uri??"",name:e.metadata.album_title,images:[{url:e.metadata.image_url}]},artists:[{type:He.c.ARTIST,uri:e.metadata.artist_uri??"",name:e.metadata.artist_name??""}],mediaType:"audio",provider:null,uid:null}:(0,b.gH)(e.uri)?{type:He.c.EPISODE,uri:e.uri,name:e.metadata.title,duration:{milliseconds:parseInt(e.metadata.duration,10)},images:[{url:e.metadata.image_url}],show:{type:He.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,Fe.Lc)(e,t,n)}catch(e){console.error(e)}return{items:n.map((e=>t.get(e.uri)??e))}}var Ge=i(20021),ze=i(78230);class We extends Ge.I{_subscriptions={[Ge.X.UPDATE]:null};constructor(e,t,i){super(),this._loader=t,this._cache=i,this._player=new Be.GD(e)}startListening(){null===this._subscriptions[Ge.X.UPDATE]&&(this._subscriptions[Ge.X.UPDATE]=this._player.getPlayHistory({},(0,ze.s)((async e=>{this.emit(Ge.X.UPDATE,await Ve(this._loader,this._cache,e))}))(100,true)))}stopListening(){const e=this._subscriptions[Ge.X.UPDATE];null!==e&&(e.cancel(),this._subscriptions[Ge.X.UPDATE]=null)}}var Ke=i(5277);class Ye{_cache=new Ke.GG(36e5,3e5);constructor(e,t){this._loader=t,this._player=new Be.GD(e),this._events=new We(e,this._loader,this._cache)}async getContents(){const e=await new Promise((e=>{const t=this._player.getPlayHistory({},(i=>{e(i),t.cancel()}))}));return Ve(this._loader,this._cache,e)}getEvents(){return this._events}getCapabilities(){return{isSupported:!0}}}var qe=i(45678);class Ze{constructor(e){this._scrobble=e}subscribeToPrivateSession(e){const t=this._scrobble.subIncognitoMode(m.lX.fromPartial({}),(t=>{e(t.incognitoMode)}));return()=>{t.cancel()}}async setPrivateSession(e){await this._scrobble.putIncognitoMode(m.Yz.fromPartial({incognitoMode:e}))}getCapabilities(){return{isSupported:!0}}}var $e=i(96590),Qe=i(19303),Je=i(68246);class Xe{constructor(e,t){this._productState=e,this._playlistAPI=t}async getReportURL(e,t){const i=(await this._productState.getValues(l.kM.fromPartial({}))).pairs["ugc-abuse-report-url"],n=new URL(i.replace("{uri}",e));return n.searchParams.append("platform","desktop"),n.searchParams.append("version","1.2.42.290.g242057a2"),t&&n.searchParams.append("playback_timestamp",""+t/1e3),n.href}isURIReportable(e){return(0,Je.X)(e)}canReportPlaylist(e,t){return(0,Je.v)(this._playlistAPI,e,t)}}var et=i(61323),tt=i(51210),it=i(36485);function nt(e){return!!e?.uri}async function rt(e,t){const i=await e.getDisplaySegments(function(e){return tt.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(!i||!i.success||!i.episodeSegments)return[];const n=i.episodeSegments.find((e=>e.episodeUri===t));return n?.segments.map((e=>{switch(e.type){case tt.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 tt.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 tt.MI.UPSELL:case tt.MI.UNKNOWN:case tt.MI.UNRECOGNIZED:return null;default:return(0,it.k)(e.type),null}})).filter(nt)||[]}class at{constructor(e){this._client=new tt.di(e)}getCapabilities(){return{isSupported:!0}}async getSegments(e,t,i){return(await rt(this._client,e)).splice(t,i)}async getArtists(){return await async function(){return[]}()}}var st=i(84473),ot=i(36867),lt=i(85403),ct=i(90477),ut=i(31249);class dt{incognito=!1;constructor(e){this.scrobble=e,this.scrobble.subIncognitoMode(m.lX.fromPartial({}),(e=>{this.incognito=e.incognitoMode}))}isIncognito(){return this.incognito}}class mt{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 pt=i(65662);const ht=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 gt=i(84686).hp;function ft({type:e,name:t},i){if(Array.isArray(e)){const n=i[t];if(null===n)return;i[t]={};const r=e.filter((e=>"null"!==e))[0];"object"==typeof r?(i[t]={[r.type]:n},ft(r,i[t])):i[t][r]="bytes"===r?gt.from(n):n}else"bytes"===e&&(i[t]=gt.from(i[t]))}function vt(e,t){const i=t.message_name,n=t.message_version,r=Object.assign({},t);if(n!==e.schema_version)throw new Error(`Invalid message version: received Message with message_version ${n} but the Schema requires version ${e.schema_version}`);return{message:i,version:n,fields:e.fields.map((e=>{const t=r[e.name];return void 0===t?e.default:(ft(e,r),t)})).slice(2)}}var yt=i(43991),bt=i(41363);const _t=(0,bt.h)();const Et={schema:ht,create:function({name:e,schema_version:t},i){const n={message_name:e,version:t};_t.post("",n).then((e=>{e.sequence_number?e.sequence_id?i(null,e.sequence_number,e.sequence_id):i(new Error("pendingLog: sequence_id not present"),null):i(new Error("pendingLog: sequence_number not present"),null)})).catch((e=>{(0,yt.vV)("create error",e,n),i(e,null)}))}.bind(null,ht),update:function(e,t,i,n){const r=function(e,t){const i=vt(e,Object.assign({},{message_name:e.name,message_version:e.schema_version},t));return i.fields=i.fields.map((e=>"string"==typeof e?e:null===e?"":JSON.stringify(e))),i}(e,i);r.sequence_number=t,_t.post("",r).then((()=>{n(null)})).catch((e=>{(0,yt.vV)("update error",e,r),n(e)}))}.bind(null,ht),send:function({name:e},t){const i={sequence_number:t,message_name:e};_t.post("",i).catch((e=>{(0,yt.vV)("send error",e,i)}))}.bind(null,ht)};var Ct=i(62943);const xt="video.subtitles";class St{_hasSubtitleSupport=!1;_hasMinimizeBitrateSupport=!1;_hasPipSupport=!1;_events=new pt.p;_subtitleLanguages=[];_pictureInPictureState=!1;_videoCoordinator=null;_offlineCoordinator=null;constructor(e,t,i,n,r,a,s,o,l,c,u,d,m){this._cosmos=e,this._showService=t,this._productStateService=i,this._scrobbleService=n,this._playbackService=r,this._pendingEventsService=a,this._prefsClient=s,this._resolver=o,this._eventSender=l,this._factories=c,this._esperantoTransport=u,this._failPlaybackOnStreamingReportingError=d,this._shouldEnableStreamReportingTracker=m,this.initialize()}async initialize(){ot.Mw.installAll(),this._hasSubtitleSupport=this._resolver.getValue(Ct.H_),this._hasMinimizeBitrateSupport=this._resolver.getValue(Ct.CN),this._hasPipSupport=this._resolver.getValue(Ct.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(Ct.vq),t=this._resolver.getValue(Ct.H_),i=this._resolver.getValue(Ct.Wm),n=this._resolver.getValue(Ct.jY),r=this._resolver.getValue(Ct.d8),a=this._resolver.getValue(Ct.tF),s=this._resolver.getValue(Ct.vr),o=this._resolver.getValue(Ct.kA),l=this._resolver.getValue(Ct.yf),c=this._resolver.getValue(Ct.Vi),u=this._resolver.getValue(Ct.cc),d=this._resolver.getValue(Ct.S3);return{containerElementClass:"VideoPlayer__container",streaming:{rebufferingGoal:r,autoplayVideoOnLoad:l},adaptiveBitrate:{initialLowBitrate:c,surfaceBasedResolutionCap:u,maxBitrate:0===d?void 0:d},drm:{vmpEnabled:s},subtitles:{enabled:t},offline:{enabled:e,targetBitrate:i},retry:{attempts:a},minimizeBitrate:{bufferMargin:o},experimental:{filterNegativeDuration:this._resolver.getValue(Ct.iL),autoSeekToBufferedStartPositionOnLoad:this._resolver.getValue(Ct.zu),showDebugOverlay:this._resolver.getValue(Ct.QP)},analytics:{mux:{enabled:n,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(Ct.Yw)},i=this._resolver.getValue(Ct.o4),n=this._resolver.getValue(Ct.gW),r=this._resolver.getValue(Ct.jO),a=this.getAccessToken.bind(this),s=this._productStateService,o=this._scrobbleService,c=this._playbackService,u=this._pendingEventsService,d={factories:[()=>this,...this._factories]},p=this._resolver.getValue(Ct.Sd),h=this._resolver.getValue(Ct.XV),g=this._resolver.getValue(Ct.Br),f=await this.getProductState(),v={ads:t,playerConfiguration:e,boomboxAudioSync:p,cosmos:this._cosmos,eventSenderProvider:()=>Promise.resolve(this._eventSender),endVideoLogger:Et,getToken:a,playerDependencies:d,productState:f,productStateService:s,widevineVersionSupported:i,scrobbleService:o,playbackService:c,pendingEventsService:u,playerPool:{enabled:h,size:g},logging:{usePendingStorage:n},experimental:{seekToAd:r}},y=new lt.N(v),b=[];if(this._shouldEnableStreamReportingTracker){const e=(0,ct.d)(this._esperantoTransport,function(e){const t=new mt(new l.EW(e)),i=new dt(new m.aA(e));return{streamingRules:()=>t.streamingRules(),isIncognito:()=>i.isIncognito()}}(this._esperantoTransport),this._eventSender,y,this._failPlaybackOnStreamingReportingError);b.push(e)}return await y.initialize(b),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},i=new ut.Y(t);return i.initialize(),i}onManifestLoaded({availableSubtitles:e}){const t=e.map((e=>e.languageTag));this.setSubtitleLanguages(t)}onPictureInPictureChanged({pictureInPicture:e}){this._pictureInPictureState=e,this._events.emit(pt.S.PICTURE_IN_PICTURE_CHANGED,e)}getPictureInPictureState(){return this._pictureInPictureState}setSubtitleLanguages(e){this._subtitleLanguages=e,this._events.emit(pt.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:xt}),t=e[xt]?.string;return t&&t.length>0?t:null}catch(e){return null}}async setPreferredSubtitleLanguage(e){await this._prefsClient.set({entries:{[xt]:{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?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 At=i(47439),Tt=i(19159),It=i(40312),Nt=i(86324),wt=i(63753),Rt=i(33598),kt=i(55440);const Ot=e=>{switch(e){case Rt.FI.TERMINAL_TYPE_DISPLAY_DEVICE:return wt.FI.DISPLAY_DEVICE;case Rt.FI.TERMINAL_TYPE_HEADPHONES:return wt.FI.HEADPHONES;case Rt.FI.TERMINAL_TYPE_SPEAKERS:return wt.FI.SPEAKERS;case Rt.FI.TERMINAL_TYPE_UNKNOWN:case Rt.FI.TERMINAL_TYPE_UNSPECIFIED:case Rt.FI.UNRECOGNIZED:default:return wt.FI.UNKNOWN}},Pt=e=>{switch(e){case Rt.Yg.TRANSPORT_TYPE_BLUETOOTH:return wt.Yg.BLUETOOTH;case Rt.Yg.TRANSPORT_TYPE_BUILT_IN:return wt.Yg.BUILT_IN;case Rt.Yg.TRANSPORT_TYPE_DISPLAY_DEVICE:return wt.Yg.DISPLAY_DEVICE;case Rt.Yg.TRANSPORT_TYPE_USB:return wt.Yg.USB;case Rt.Yg.TRANSPORT_TYPE_VIRTUAL:return wt.Yg.VIRTUAL;case Rt.Yg.TRANSPORT_TYPE_UNKNOWN:case Rt.Yg.TRANSPORT_TYPE_UNSPECIFIED:case Rt.Yg.UNRECOGNIZED:default:return wt.Yg.UNKNOWN}};class Lt{devices=[];constructor(e){this._audioObserver=e,this._events=new kt.e,this._audioObserver.getAudioOutputDevices({},(async e=>{this.devices=e.devices.map((e=>(e=>({id:e.id,name:e.name,fullName:e.fullName,terminalType:Ot(e.terminalType),transportType:Pt(e.transportType),isDefaultDevice:e.isDefaultDevice}))(e))),this._events.emit(kt.B.DEVICE_CONNECTED,{})}))}getDefaultDevice(){return this.devices.find((e=>e.isDefaultDevice))||null}getDevices(){return this.devices}getEvents(){return this._events}}var jt=i(39062),Dt=i(41687),Mt=i(45942),Ut=i(18928),Bt=i(74987),Ft=i(44511),Ht=i(15405),Vt=i(33655);const Gt="isTokenUnavailable",zt={baseTime:200,ceiling:9e5,curve:"exponential",jitter:!0},Wt=(0,Vt.u)("AuthorizationPlugin");class Kt{name="desktop-lifecycle-plugin";_authCounter=new Ft.p(zt);_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,i=t.options?.metadata?.noRequestTransform;if(i)return;if(this._transport.isAuthenticated())return;this._authAttempts>0&&(t.options?.authorize&&(t.context[Gt]=!0),t.options=(0,Ht.K)(t.options,{authorize:!1}))}onBeforeSendRequest(e){if(e.data.context[Gt])throw new Error("Token is currently unavailable.")}attach(e,t){this._transport=e,e.addListener(Bt.TransportEvent.CONNECTED,this.onConnected),e.addListener(Bt.TransportEvent.DISCONNECTED,this.onDisconnected),e.addListener(Bt.TransportEvent.AUTHENTICATED,this.onAuthenticated),e.addListener(Bt.TransportEvent.AUTHENTICATION_FAILED,this.onAuthenticationFailed),t.addListener(Bt.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest),t.addListener(Bt.PluginEvent.TRANSPORT_BEFORE_SEND_REQUEST,this.onBeforeSendRequest)}detach(e,t){this._transport=null,e.removeListener(Bt.TransportEvent.CONNECTED,this.onConnected),e.removeListener(Bt.TransportEvent.DISCONNECTED,this.onDisconnected),e.removeListener(Bt.TransportEvent.AUTHENTICATED,this.onAuthenticated),e.removeListener(Bt.TransportEvent.AUTHENTICATION_FAILED,this.onAuthenticationFailed),t.removeListener(Bt.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest),t.removeListener(Bt.PluginEvent.TRANSPORT_BEFORE_SEND_REQUEST,this.onBeforeSendRequest)}}var Yt=i(83527),qt=i(52925),Zt=i(3631);class $t{_state=qt.h;constructor(e,t,i,n){this._cosmos=e,this._tokenProvider=t,this._authorizationPlugin=i,this._events=n,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,Zt.H)(e),token:e,retryAttempt:null,retryAt:null},this._events.emit(Yt.m.UPDATE,this._state)}onAuthenticationFailed(e,t){this._state={isAuthorized:!1,token:null,retryAttempt:e,retryAt:t},this._events.emit(Yt.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 Qt=i(93874);class Jt extends Qt.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 Xt=i(10999),ei=i(73668),ti=i(3877),ii=i(67154),ni=i(30806),ri=i(28004);function ai(e){switch(e){case"computer":return ri.bq.COMPUTER;case"tablet":return ri.bq.TABLET;case"smartphone":return ri.bq.SMARTPHONE;case"speaker":return ri.bq.SPEAKER;case"tv":return ri.bq.TV;case"avr":return ri.bq.AVR;case"stb":return ri.bq.STB;case"audio_dongle":return ri.bq.AUDIO_DONGLE;case"game_console":return ri.bq.GAME_CONSOLE;case"cast_video":return ri.bq.CAST_VIDEO;case"cast_audio":return ri.bq.CAST_AUDIO;case"automobile":return ri.bq.AUTOMOBILE;case"smartwatch":return ri.bq.SMARTWATCH;case"chromebook":return ri.bq.CHROMEBOOK;case"carthing":return ri.bq.CarThing;case"homething":return ri.bq.HomeThing;default:return ri.bq.UNKNOWN}}function si(e){switch(e){case"incompatible":return ri.bU.INCOMPATIBLE;case"unavailable":return ri.bU.UNAVAILABLE;case"premium_required":return ri.bU.PREMIUM_REQUIRED;case"not_installed":return ri.bU.NOT_INSTALLED;case"unsupported_uri":return ri.bU.UNSUPPORTED_URI;case"not_authorized":return ri.bU.NOT_AUTHORIZED;case"ad_playing":return ri.bU.AD_PLAYING;case"narration":return ri.bU.NARRATION;case"waking_up":return ri.bU.WAKING_UP;case"timed_out_wakeup":return ri.bU.TIMED_OUT_WAKEUP;default:return}}function oi(e){switch(e){case"connecting":return ri.gX.CONNECTING;case"logged_in":return ri.gX.LOGGED_IN;case"not_logged_in":return ri.gX.NOT_LOGGED_IN;case"sleeping":return ri.gX.SLEEPING;case"not_loaded":return ri.gX.NOT_LOADED;case"unknown":return ri.gX.UNKNOWN;default:return si(e)}}const li=65535;function ci(e){switch(e){case a.Gb.CAST:return"cast";case a.Gb.CONNECT:return"connect";default:return"unrecognized"}}function ui(e){const t=[];let i;for(const n of e){const e=ci(n.loginType);(0,ri.Ts)(e)&&(t.push(e),n.preferred&&(i=e))}return{preferred:i,available:t}}function di(e){const{localIdentifier:t,connectStateIdentifier:i,name:n,type:r,isGroup:a,isSelf:s,isActive:o,isBeingActivated:l,isDisabled:c,volume:u,hifi:d,brandDisplayName:m,modelDisplayName:p,license:h,state:g,isLocal:f,isZeroconf:v,isWebapp:y,supportsLogout:b,incarnations:_,supportsDj:E,supportedMediaTypes:C}=e;return{id:t,connectStateId:i,name:n??"",type:ai(r),isGroup:a,isLocal:s,isActive:o,isConnecting:l,isDisabled:c,disabledReason:si(g),volume:u/li,losslessSupport:{fullySupported:!!d?.fullySupported,deviceSupported:!!d?.deviceSupported,userEligible:!!d?.userEligible},brandDisplayName:m,modelDisplayName:p,license:h,currentState:oi(g),isLocalNetwork:f,isZeroconf:v,isWebApp:y,supportsLogout:(S=s,A=b,T=m,I=p,!S&&("spotify"!==T||"web_player"!==I&&"mobile_web_player"!==I)&&A),incarnation:_?ui(_):void 0,supportsDJNarration:E,supportedMediaTypes:(x=C,x?x.reduce(((e,t)=>{const[i,n]=t.split("/");switch(i){case"audio":e.add(ri.Bd.Audio);break;case"video":e.add(ri.Bd.Video);break;case"mixed":e.add(ri.Bd.Mixed)}return e}),new Set):null)};var x,S,A,T,I}function mi(e,t){return t?ri.zP.CONNECTING:e&&!e.isLocal?ri.zP.CONNECTED:ri.zP.NOT_CONNECTED}function pi(e){return{success:e.status===a.nW.OK}}class hi extends ni.a{constructor(e){super(),this.connectServiceClient=e,this.connectServiceClient.state(a.d1.fromPartial({includeLocalDevice:!0,showOfflineDevicesInCore:!0,showOfflineAmazonDevicesAsOnline:!0}),(({devices:e})=>{e&&e.length>0&&this.emit(ni.P.UPDATE,function(e){let t;t=e?e.map(di):[];let i=t.find((e=>e.isActive));if(!i){const e=t.findIndex((e=>e.isLocal));-1!==e&&(i={...t[e],isActive:!0},t[e]=i)}const n=t.find((e=>e.isConnecting&&!e.isActive));return{connectionStatus:mi(i,n),activeDevice:i??null,connectingDevice:n??null,devices:t}}(e))}))}}class gi{state=null;constructor(e,t){this.connectServiceClient=e,this.useNewEndpoint=t,this.events=new hi(this.connectServiceClient),this.events.addListener(ni.P.UPDATE,(({data:e})=>{this.state=e})),this.initiateLocalDiscovery()}getCapabilities(){return{supportsLocalDiscovery:!0}}getState(){return this.state}getEvents(){return this.events}async initiateLocalDiscovery(){this.useNewEndpoint?await this.connectServiceClient.performDiscovery({}):await this.connectServiceClient.startDiscovery({})}async updateListOfDevices(){this.useNewEndpoint?await Promise.all([this.connectServiceClient.performDiscovery({}),this.connectServiceClient.refreshCluster({}),this.connectServiceClient.wakeSleepingClusterDevices({})]):await this.connectServiceClient.forceDiscover({})}createLoggingParams(e){return {interactionIds:null,pageInstanceIds:null};return a.OU.fromPartial({interactionIds:[e.interactionId],pageInstanceIds:e.pageInstanceId?[e.pageInstanceId]:void 0})}async pullToLocal(e){await this.connectServiceClient.pull(a.B9.fromPartial({loggingParams:this.createLoggingParams(e)}))}async transferToRemote(e,t){await this.connectServiceClient.transfer(a.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 pi(await this.connectServiceClient.logout(a.yE.fromPartial({connectDeviceIdentifier:e})))}mapIncarnationToLoginType=e=>"cast"===e?a.Gb.CAST:"connect"===e?a.Gb.CONNECT:a.Gb.UNRECOGNIZED;async setPreferredIncarnation(e,t){this.checkDeviceId(e);const i=this.mapIncarnationToLoginType(t);return pi(await this.connectServiceClient.setPreferredZeroconf(a.B0.fromPartial({deviceId:e.replace("cluster_",""),preferredLoginType:i})))}}class fi{constructor(e){this.connectServiceClient=e}checkDeviceId=e=>{if(0===e.length)throw new Error("missing device id")};async logout(e){this.checkDeviceId(e);return pi(await this.connectServiceClient.logout(a.yE.fromPartial({connectDeviceIdentifier:e})))}mapIncarnationToLoginType=e=>"cast"===e?a.Gb.CAST:"connect"===e?a.Gb.CONNECT:a.Gb.UNRECOGNIZED;async setPreferredIncarnation(e,t){this.checkDeviceId(e);const i=this.mapIncarnationToLoginType(t);return pi(await this.connectServiceClient.setPreferredZeroconf(a.B0.fromPartial({deviceId:e.replace("cluster_",""),preferredLoginType:i})))}}class vi{constructor(e,t){this.connectServiceClient=e,this.useNewEndpoint=t}async startActiveDiscovery(){this.useNewEndpoint?await Promise.all([this.connectServiceClient.performDiscovery({}),this.connectServiceClient.refreshCluster({}),this.connectServiceClient.wakeSleepingClusterDevices({})]):await this.connectServiceClient.forceDiscover({})}}class yi{constructor(e){this.connectServiceClient=e}async pullToLocalDevice(e){await this.connectServiceClient.pull(a.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(a.f6.fromPartial({connectDeviceIdentifier:e,loggingParams:this.createLoggingParams(t)}))}createLoggingParams(e){return {interactionIds:null,pageInstanceIds:null};return a.OU.fromPartial({interactionIds:[e.interactionId],pageInstanceIds:e.pageInstanceId?[e.pageInstanceId]:void 0})}}var bi=i(35583),_i=i(97638),Ei=i(18889);const Ci="sp://internal/v1/latest_messages";function xi(e){i.g.window.getCosmosMessages||(i.g.window.getCosmosMessages=()=>async function(e){return await e.get(Ci)??[]}(e))}var Si=i(6643),Ai=i(92759),Ti=i(36406),Ii=i(33627);class Ni extends Ii.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 wi=i(69357);var Ri=i(63169),ki=i(21364);function Oi(e){const t=(0,b.o_)(e);if(t?.type===b.NQ.FOLDER)return BigInt(ki.A.fromString(t.id,!0,16).toString(10))}function Pi(e){return{likedSongs:e?.includeLikedSongs?{label:g.Ru.get("shared.library.entity-row.liked-songs.title"),image:"https://misc.scdn.co/liked-songs/liked-songs-300.png",includeEmpty:!1}:void 0,yourEpisodes:e?.includeYourEpisodes?{label:g.Ru.get("shared.library.entity-row.your-episodes.title"),image:"https://misc.spotifycdn.com/your-episodes/SE-300.png",includeEmpty:!1}:void 0,localFiles:e?.includeLocalFiles?{image:"",label:g.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 Li=i(54443),ji=i(85793),Di=i(70583);let Mi=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.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});var Ui=i(24848),Bi=i.n(Ui);const Fi={isPaywalled:!1,isUserSubscribed:!1,userExplanation:0},Hi={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={...Fi};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.isPaywalled=i.bool();break;case 2:r.isUserSubscribed=i.bool();break;case 3:r.userExplanation=i.int32();break;default:i.skipType(7&e)}}return r},fromPartial(e){const t={...Fi};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}};Bi().util.Long!==ki.A&&(Bi().util.Long=ki.A,Bi().configure());var Vi=i(76108);const Gi={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={seconds:"0",nanos:0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.seconds=i.int64().toString();continue;case 2:if(16!==e)break;r.nanos=i.int32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({seconds:zi(e.seconds)?globalThis.String(e.seconds):"0",nanos:zi(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=>Gi.fromPartial(e??{}),fromPartial(e){const t={seconds:"0",nanos:0};return t.seconds=e.seconds??"0",t.nanos=e.nanos??0,t}};function zi(e){return null!=e}Bi().util.Long!==ki.A&&(Bi().util.Long=ki.A,Bi().configure());const Wi={encode:(e,t=Bi().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),void 0!==e.credits&&Ki.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&&Gi.encode(function(e){const t=Math.trunc(e.getTime()/1e3).toString(),i=e.getTime()%1e3*1e6;return{seconds:t,nanos:i}}(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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={uri:"",credits:void 0,edition:"",duration_ms:"0",publish_date:void 0,main_title:"",subtitle:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=i.string();continue;case 2:if(18!==e)break;r.credits=Ki.decode(i,i.uint32());continue;case 3:if(26!==e)break;r.edition=i.string();continue;case 4:if(32!==e)break;r.duration_ms=i.int64().toString();continue;case 5:if(42!==e)break;r.publish_date=$i(Gi.decode(i,i.uint32()));continue;case 6:if(50!==e)break;r.main_title=i.string();continue;case 7:if(58!==e)break;r.subtitle=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({uri:Ji(e.uri)?String(e.uri):"",credits:Ji(e.credits)?Ki.fromJSON(e.credits):void 0,edition:Ji(e.edition)?String(e.edition):"",duration_ms:Ji(e.duration_ms)?String(e.duration_ms):"0",publish_date:Ji(e.publish_date)?Qi(e.publish_date):void 0,main_title:Ji(e.main_title)?String(e.main_title):"",subtitle:Ji(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?Ki.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=>Wi.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?Ki.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 Ki={encode(e,t=Bi().Writer.create()){for(const i of e.publishers)Yi.encode(i,t.uint32(18).fork()).ldelim();for(const i of e.authors)qi.encode(i,t.uint32(26).fork()).ldelim();for(const i of e.narrators)Zi.encode(i,t.uint32(34).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={publishers:[],authors:[],narrators:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 2:if(18!==e)break;r.publishers.push(Yi.decode(i,i.uint32()));continue;case 3:if(26!==e)break;r.authors.push(qi.decode(i,i.uint32()));continue;case 4:if(34!==e)break;r.narrators.push(Zi.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({publishers:Array.isArray(e?.publishers)?e.publishers.map((e=>Yi.fromJSON(e))):[],authors:Array.isArray(e?.authors)?e.authors.map((e=>qi.fromJSON(e))):[],narrators:Array.isArray(e?.narrators)?e.narrators.map((e=>Zi.fromJSON(e))):[]}),toJSON(e){const t={};return e.publishers?t.publishers=e.publishers.map((e=>e?Yi.toJSON(e):void 0)):t.publishers=[],e.authors?t.authors=e.authors.map((e=>e?qi.toJSON(e):void 0)):t.authors=[],e.narrators?t.narrators=e.narrators.map((e=>e?Zi.toJSON(e):void 0)):t.narrators=[],t},create:e=>Ki.fromPartial(e??{}),fromPartial(e){const t={publishers:[],authors:[],narrators:[]};return t.publishers=e.publishers?.map((e=>Yi.fromPartial(e)))||[],t.authors=e.authors?.map((e=>qi.fromPartial(e)))||[],t.narrators=e.narrators?.map((e=>Zi.fromPartial(e)))||[],t}};const Yi={encode:(e,t=Bi().Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={name:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 2:if(18!==e)break;r.name=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({name:Ji(e.name)?String(e.name):""}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),t},create:e=>Yi.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const qi={encode:(e,t=Bi().Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={name:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 2:if(18!==e)break;r.name=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({name:Ji(e.name)?String(e.name):""}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),t},create:e=>qi.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const Zi={encode:(e,t=Bi().Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={name:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 2:if(18!==e)break;r.name=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({name:Ji(e.name)?String(e.name):""}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),t},create:e=>Zi.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};function $i(e){let t=1e3*(Number(e.seconds)||0);return t+=(e.nanos||0)/1e6,new Date(t)}function Qi(e){return e instanceof Date?e:"string"==typeof e?new Date(e):$i(Gi.fromJSON(e))}function Ji(e){return null!=e}Bi().util.Long!==ki.A&&(Bi().util.Long=ki.A,Bi().configure());const Xi={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={cardHeaderText:"",cardBodyText:"",buttonText:"",buttonTarget:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.cardHeaderText=i.string();break;case 2:r.cardBodyText=i.string();break;case 3:r.buttonText=i.string();break;case 4:r.buttonTarget=i.string();break;default:i.skipType(7&e)}}return r},fromJSON:e=>({cardHeaderText:en(e.cardHeaderText)?String(e.cardHeaderText):"",cardBodyText:en(e.cardBodyText)?String(e.cardBodyText):"",buttonText:en(e.buttonText)?String(e.buttonText):"",buttonTarget:en(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 en(e){return null!=e}Bi().util.Long!==ki.A&&(Bi().util.Long=ki.A,Bi().configure());const tn={},nn={encode(e,t=Bi().Writer.create()){for(const i of e.topics)an.encode(i,t.uint32(10).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={...tn};for(r.topics=[];i.pos<n;){const e=i.uint32();if(e>>>3==1)r.topics.push(an.decode(i,i.uint32()));else i.skipType(7&e)}return r},fromJSON(e){const t={...tn};if(t.topics=[],void 0!==e.topics&&null!==e.topics)for(const i of e.topics)t.topics.push(an.fromJSON(i));return t},toJSON(e){const t={};return e.topics?t.topics=e.topics.map((e=>e?an.toJSON(e):void 0)):t.topics=[],t},fromPartial(e){const t={...tn};if(t.topics=[],void 0!==e.topics&&null!==e.topics)for(const i of e.topics)t.topics.push(an.fromPartial(i));return t}},rn={uri:"",title:""},an={encode:(e,t=Bi().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.title&&t.uint32(18).string(e.title),t),decode(e,t){const i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={...rn};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.uri=i.string();break;case 2:r.title=i.string();break;default:i.skipType(7&e)}}return r},fromJSON(e){const t={...rn};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={...rn};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}},sn={htmlDescription:""},on={encode:(e,t=Bi().Writer.create())=>(void 0!==e.header&&cn.encode(e.header,t.uint32(10).fork()).ldelim(),""!==e.htmlDescription&&t.uint32(18).string(e.htmlDescription),t),decode(e,t){const i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={...sn};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.header=cn.decode(i,i.uint32());break;case 2:r.htmlDescription=i.string();break;default:i.skipType(7&e)}}return r},fromJSON(e){const t={...sn};return void 0!==e.header&&null!==e.header?t.header=cn.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?cn.toJSON(e.header):void 0),void 0!==e.htmlDescription&&(t.htmlDescription=e.htmlDescription),t},fromPartial(e){const t={...sn};return void 0!==e.header&&null!==e.header?t.header=cn.fromPartial(e.header):t.header=void 0,void 0!==e.htmlDescription&&null!==e.htmlDescription?t.htmlDescription=e.htmlDescription:t.htmlDescription="",t}},ln={},cn={encode:(e,t=Bi().Writer.create())=>t,decode(e,t){const i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={...ln};for(;i.pos<n;){const e=i.uint32();i.skipType(7&e)}return r},fromJSON:e=>({...ln}),toJSON:e=>({}),fromPartial:e=>({...ln})};Bi().util.Long!==ki.A&&(Bi().util.Long=ki.A,Bi().configure());let un=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 dn={episodeUri:"",canUpsell:!1,albumMosaicUri:"",artists:"",durationMs:0},mn={encode(e,t=Bi().Writer.create()){""!==e.episodeUri&&t.uint32(10).string(e.episodeUri);for(const i of e.playbackSegments)hn.encode(i,t.uint32(18).fork()).ldelim();for(const i of e.embeddedSegments)fn.encode(i,t.uint32(26).fork()).ldelim();!0===e.canUpsell&&t.uint32(32).bool(e.canUpsell),""!==e.albumMosaicUri&&t.uint32(42).string(e.albumMosaicUri);for(const i of e.artists)t.uint32(50).string(i);return 0!==e.durationMs&&t.uint32(56).int32(e.durationMs),t},decode(e,t){const i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={...dn};for(r.playbackSegments=[],r.embeddedSegments=[],r.artists=[];i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.episodeUri=i.string();break;case 2:r.playbackSegments.push(hn.decode(i,i.uint32()));break;case 3:r.embeddedSegments.push(fn.decode(i,i.uint32()));break;case 4:r.canUpsell=i.bool();break;case 5:r.albumMosaicUri=i.string();break;case 6:r.artists.push(i.string());break;case 7:r.durationMs=i.int32();break;default:i.skipType(7&e)}}return r},fromJSON(e){const t={...dn};return t.episodeUri=void 0!==e.episodeUri&&null!==e.episodeUri?String(e.episodeUri):"",t.playbackSegments=(e.playbackSegments??[]).map((e=>hn.fromJSON(e))),t.embeddedSegments=(e.embeddedSegments??[]).map((e=>fn.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?hn.toJSON(e):void 0)):t.playbackSegments=[],e.embeddedSegments?t.embeddedSegments=e.embeddedSegments.map((e=>e?fn.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={...dn};return t.episodeUri=e.episodeUri??"",t.playbackSegments=(e.playbackSegments??[]).map((e=>hn.fromPartial(e))),t.embeddedSegments=(e.embeddedSegments??[]).map((e=>fn.fromPartial(e))),t.canUpsell=e.canUpsell??!1,t.albumMosaicUri=e.albumMosaicUri??"",t.artists=(e.artists??[]).map((e=>e)),t.durationMs=e.durationMs??0,t}},pn={uri:"",startMs:0,stopMs:0,durationMs:0,type:0,title:"",subtitle:"",imageUrl:"",actionUrl:"",isAbridged:!1},hn={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={...pn};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.uri=i.string();break;case 2:r.startMs=i.int32();break;case 3:r.stopMs=i.int32();break;case 4:r.durationMs=i.int32();break;case 5:r.type=i.int32();break;case 6:r.title=i.string();break;case 7:r.subtitle=i.string();break;case 8:r.imageUrl=i.string();break;case 9:r.actionUrl=i.string();break;case 10:r.isAbridged=i.bool();break;default:i.skipType(7&e)}}return r},fromJSON(e){const t={...pn};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 un.UNKNOWN;case 1:case"TALK":return un.TALK;case 2:case"MUSIC":return un.MUSIC;case 3:case"UPSELL":return un.UPSELL;default:return un.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 un.UNKNOWN:return"UNKNOWN";case un.TALK:return"TALK";case un.MUSIC:return"MUSIC";case un.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={...pn};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}},gn={uri:"",absoluteStartMs:0,absoluteStopMs:0},fn={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={...gn};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.uri=i.string();break;case 2:r.absoluteStartMs=i.int32();break;case 3:r.absoluteStopMs=i.int32();break;default:i.skipType(7&e)}}return r},fromJSON(e){const t={...gn};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={...gn};return t.uri=e.uri??"",t.absoluteStartMs=e.absoluteStartMs??0,t.absoluteStopMs=e.absoluteStopMs??0,t}};Bi().util.Long!==ki.A&&(Bi().util.Long=ki.A,Bi().configure());const vn={encode(e,t=Bi().Writer.create()){""!==e.episodeUri&&t.uint32(10).string(e.episodeUri);for(const i of e.transcripts)yn.encode(i,t.uint32(18).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={episodeUri:"",transcripts:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.episodeUri=i.string();break;case 2:r.transcripts.push(yn.decode(i,i.uint32()));break;default:i.skipType(7&e)}}return r},fromJSON:e=>({episodeUri:bn(e.episodeUri)?String(e.episodeUri):"",transcripts:Array.isArray(e?.transcripts)?e.transcripts.map((e=>yn.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.episodeUri&&(t.episodeUri=e.episodeUri),e.transcripts?t.transcripts=e.transcripts.map((e=>e?yn.toJSON(e):void 0)):t.transcripts=[],t},fromPartial(e){const t={episodeUri:"",transcripts:[]};return t.episodeUri=e.episodeUri??"",t.transcripts=e.transcripts?.map((e=>yn.fromPartial(e)))||[],t}};const yn={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:new(Bi().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={uri:"",language:"",curated:!1,cdnUrl:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.uri=i.string();break;case 2:r.language=i.string();break;case 3:r.curated=i.bool();break;case 4:r.cdnUrl=i.string();break;default:i.skipType(7&e)}}return r},fromJSON:e=>({uri:bn(e.uri)?String(e.uri):"",language:bn(e.language)?String(e.language):"",curated:!!bn(e.curated)&&Boolean(e.curated),cdnUrl:bn(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 bn(e){return null!=e}Bi().util.Long!==ki.A&&(Bi().util.Long=ki.A,Bi().configure());const _n={encode:(e,t=Ui.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&&Gi.encode(xn(e.ratedAt),t.uint32(34).fork()).ldelim(),t),decode(e,t){const i=e instanceof Ui.Reader?e:new Ui.Reader(e);let n=void 0===t?i.len:i.pos+t;const r={userId:"",showUri:"",rating:0,ratedAt:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.userId=i.string();break;case 2:r.showUri=i.string();break;case 3:r.rating=i.int32();break;case 4:r.ratedAt=Sn(Gi.decode(i,i.uint32()));break;default:i.skipType(7&e)}}return r},fromJSON:e=>({userId:Tn(e.userId)?String(e.userId):"",showUri:Tn(e.showUri)?String(e.showUri):"",rating:Tn(e.rating)?Number(e.rating):0,ratedAt:Tn(e.ratedAt)?An(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 En={encode:(e,t=Ui.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 i=e instanceof Ui.Reader?e:new Ui.Reader(e);let n=void 0===t?i.len:i.pos+t;const r={average:0,totalRatings:"0",showAverage:!1};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.average=i.double();break;case 2:r.totalRatings=i.int64().toString();break;case 3:r.showAverage=i.bool();break;default:i.skipType(7&e)}}return r},fromJSON:e=>({average:Tn(e.average)?Number(e.average):0,totalRatings:Tn(e.totalRatings)?String(e.totalRatings):"0",showAverage:!!Tn(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 Cn={encode:(e,t=Ui.Writer.create())=>(void 0!==e.averageRating&&En.encode(e.averageRating,t.uint32(10).fork()).ldelim(),void 0!==e.rating&&_n.encode(e.rating,t.uint32(18).fork()).ldelim(),!0===e.canRate&&t.uint32(24).bool(e.canRate),t),decode(e,t){const i=e instanceof Ui.Reader?e:new Ui.Reader(e);let n=void 0===t?i.len:i.pos+t;const r={averageRating:void 0,rating:void 0,canRate:!1};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.averageRating=En.decode(i,i.uint32());break;case 2:r.rating=_n.decode(i,i.uint32());break;case 3:r.canRate=i.bool();break;default:i.skipType(7&e)}}return r},fromJSON:e=>({averageRating:Tn(e.averageRating)?En.fromJSON(e.averageRating):void 0,rating:Tn(e.rating)?_n.fromJSON(e.rating):void 0,canRate:!!Tn(e.canRate)&&Boolean(e.canRate)}),toJSON(e){const t={};return void 0!==e.averageRating&&(t.averageRating=e.averageRating?En.toJSON(e.averageRating):void 0),void 0!==e.rating&&(t.rating=e.rating?_n.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?En.fromPartial(e.averageRating):void 0,t.rating=void 0!==e.rating&&null!==e.rating?_n.fromPartial(e.rating):void 0,t.canRate=e.canRate??!1,t}};function xn(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function Sn(e){let t=1e3*Number(e.seconds);return t+=e.nanos/1e6,new Date(t)}function An(e){return e instanceof Date?e:"string"==typeof e?new Date(e):Sn(Gi.fromJSON(e))}function Tn(e){return null!=e}Ui.util.Long!==ki.A&&(Ui.util.Long=ki.A,Ui.configure());let In=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 Nn(e){switch(e){case 0:case"COPYRIGHT_TYPE_UNSPECIFIED":return In.COPYRIGHT_TYPE_UNSPECIFIED;case 1:case"COPYRIGHT_TYPE_P":return In.COPYRIGHT_TYPE_P;case 2:case"COPYRIGHT_TYPE_C":return In.COPYRIGHT_TYPE_C;default:return In.UNRECOGNIZED}}const wn={encode(e,t=Bi().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 i of e.agents)Pn.encode(i,t.uint32(34).fork()).ldelim();for(const i of e.covers)On.encode(i,t.uint32(42).fork()).ldelim();void 0!==e.explicit&&t.uint32(48).bool(e.explicit);for(const i of e.copyright)Rn.encode(i,t.uint32(58).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={uri:"",type:void 0,name:"",agents:[],covers:[],explicit:void 0,copyright:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=i.string();continue;case 2:if(18!==e)break;r.type=i.string();continue;case 3:if(26!==e)break;r.name=i.string();continue;case 4:if(34!==e)break;r.agents.push(Pn.decode(i,i.uint32()));continue;case 5:if(42!==e)break;r.covers.push(On.decode(i,i.uint32()));continue;case 6:if(48!==e)break;r.explicit=i.bool();continue;case 7:if(58!==e)break;r.copyright.push(Rn.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({uri:Dn(e.uri)?globalThis.String(e.uri):"",type:Dn(e.type)?globalThis.String(e.type):void 0,name:Dn(e.name)?globalThis.String(e.name):"",agents:globalThis.Array.isArray(e?.agents)?e.agents.map((e=>Pn.fromJSON(e))):[],covers:globalThis.Array.isArray(e?.covers)?e.covers.map((e=>On.fromJSON(e))):[],explicit:Dn(e.explicit)?globalThis.Boolean(e.explicit):void 0,copyright:globalThis.Array.isArray(e?.copyright)?e.copyright.map((e=>Rn.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=>Pn.toJSON(e)))),e.covers?.length&&(t.covers=e.covers.map((e=>On.toJSON(e)))),void 0!==e.explicit&&(t.explicit=e.explicit),e.copyright?.length&&(t.copyright=e.copyright.map((e=>Rn.toJSON(e)))),t},create:e=>wn.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=>Pn.fromPartial(e)))||[],t.covers=e.covers?.map((e=>On.fromPartial(e)))||[],t.explicit=e.explicit??void 0,t.copyright=e.copyright?.map((e=>Rn.fromPartial(e)))||[],t}};const Rn={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={type:void 0,text:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.type=i.int32();continue;case 2:if(18!==e)break;r.text=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({type:Dn(e.type)?Nn(e.type):void 0,text:Dn(e.text)?globalThis.String(e.text):void 0}),toJSON(e){const t={};return void 0!==e.type&&(t.type=function(e){switch(e){case In.COPYRIGHT_TYPE_UNSPECIFIED:return"COPYRIGHT_TYPE_UNSPECIFIED";case In.COPYRIGHT_TYPE_P:return"COPYRIGHT_TYPE_P";case In.COPYRIGHT_TYPE_C:return"COPYRIGHT_TYPE_C";case In.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),void 0!==e.text&&(t.text=e.text),t},create:e=>Rn.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 kn={encode:(e,t=Bi().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),void 0!==e.releaseTime&&Gi.encode(function(e){const t=Math.trunc(e.getTime()/1e3).toString(),i=e.getTime()%1e3*1e6;return{seconds:t,nanos:i}}(e.releaseTime),t.uint32(18).fork()).ldelim(),void 0!==e.entity&&wn.encode(e.entity,t.uint32(26).fork()).ldelim(),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={uri:"",releaseTime:void 0,entity:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=i.string();continue;case 2:if(18!==e)break;r.releaseTime=Ln(Gi.decode(i,i.uint32()));continue;case 3:if(26!==e)break;r.entity=wn.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({uri:Dn(e.uri)?globalThis.String(e.uri):"",releaseTime:Dn(e.releaseTime)?jn(e.releaseTime):void 0,entity:Dn(e.entity)?wn.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=wn.toJSON(e.entity)),t},create:e=>kn.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?wn.fromPartial(e.entity):void 0,t}};const On={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={uri:"",size:"",width:void 0,height:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=i.string();continue;case 2:if(18!==e)break;r.size=i.string();continue;case 3:if(24!==e)break;r.width=i.sint32();continue;case 4:if(32!==e)break;r.height=i.sint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({uri:Dn(e.uri)?globalThis.String(e.uri):"",size:Dn(e.size)?globalThis.String(e.size):"",width:Dn(e.width)?globalThis.Number(e.width):void 0,height:Dn(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=>On.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 Pn={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={uri:void 0,name:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=i.string();continue;case 2:if(18!==e)break;r.name=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({uri:Dn(e.uri)?globalThis.String(e.uri):void 0,name:Dn(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=>Pn.fromPartial(e??{}),fromPartial(e){const t={uri:void 0,name:""};return t.uri=e.uri??void 0,t.name=e.name??"",t}};function Ln(e){let t=1e3*(globalThis.Number(e.seconds)||0);return t+=(e.nanos||0)/1e6,new globalThis.Date(t)}function jn(e){return e instanceof globalThis.Date?e:"string"==typeof e?new globalThis.Date(e):Ln(Gi.fromJSON(e))}function Dn(e){return null!=e}var Mn=i(23483);const Un={encode:(e,t=Bi().Writer.create())=>(!0===e.enabled&&t.uint32(8).bool(e.enabled),""!==e.uri&&t.uint32(18).string(e.uri),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={enabled:!1,uri:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.enabled=i.bool();continue;case 2:if(18!==e)break;r.uri=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Un.fromPartial(e??{}),fromPartial(e){const t={enabled:!1,uri:""};return t.enabled=e.enabled??!1,t.uri=e.uri??"",t}};const Bn={encode:(e,t=Bi().Writer.create())=>(""!==e.language&&t.uint32(10).string(e.language),""!==e.value&&t.uint32(18).string(e.value),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={language:"",value:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.language=i.string();continue;case 2:if(18!==e)break;r.value=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Bn.fromPartial(e??{}),fromPartial(e){const t={language:"",value:""};return t.language=e.language??"",t.value=e.value??"",t}};function Fn(){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 Hn={encode(e,t=Bi().Writer.create()){0!==e.gid.length&&t.uint32(10).bytes(e.gid),""!==e.name&&t.uint32(18).string(e.name);for(const i of e.localizedName)Bn.encode(i,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&&Zn.encode(e.coverImage,t.uint32(554).fork()).ldelim();for(const i of e.episode)Gn.encode(i,t.uint32(562).fork()).ldelim();for(const i of e.copyright)$n.encode(i,t.uint32(570).fork()).ldelim();for(const i of e.restriction)Qn.encode(i,t.uint32(578).fork()).ldelim();for(const i of e.keyword)t.uint32(586).string(i);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 i of e.salePeriod)tr.encode(i,t.uint32(618).fork()).ldelim();for(const i of e.availability)Jn.encode(i,t.uint32(626).fork()).ldelim();""!==e.countryOfOrigin&&t.uint32(634).string(e.countryOfOrigin);for(const i of e.categories)Xn.encode(i,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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=Fn();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.gid=i.bytes();continue;case 2:if(18!==e)break;r.name=i.string();continue;case 29:if(234!==e)break;r.localizedName.push(Bn.decode(i,i.uint32()));continue;case 64:if(514!==e)break;r.description=i.string();continue;case 65:if(520!==e)break;r.deprecatedPopularity=i.sint32();continue;case 66:if(530!==e)break;r.publisher=i.string();continue;case 67:if(538!==e)break;r.language=i.string();continue;case 68:if(544!==e)break;r.explicit=i.bool();continue;case 69:if(554!==e)break;r.coverImage=Zn.decode(i,i.uint32());continue;case 70:if(562!==e)break;r.episode.push(Gn.decode(i,i.uint32()));continue;case 71:if(570!==e)break;r.copyright.push($n.decode(i,i.uint32()));continue;case 72:if(578!==e)break;r.restriction.push(Qn.decode(i,i.uint32()));continue;case 73:if(586!==e)break;r.keyword.push(i.string());continue;case 74:if(592!==e)break;r.mediaType=i.int32();continue;case 75:if(600!==e)break;r.consumptionOrder=i.int32();continue;case 76:if(608!==e)break;r.interpretRestrictionUsingGeoip=i.bool();continue;case 77:if(618!==e)break;r.salePeriod.push(tr.decode(i,i.uint32()));continue;case 78:if(626!==e)break;r.availability.push(Jn.decode(i,i.uint32()));continue;case 79:if(634!==e)break;r.countryOfOrigin=i.string();continue;case 80:if(642!==e)break;r.categories.push(Xn.decode(i,i.uint32()));continue;case 81:if(648!==e)break;r.passthrough=i.int32();continue;case 82:if(656!==e)break;r.employeeOnly=i.bool();continue;case 83:if(666!==e)break;r.trailerUri=i.string();continue;case 89:if(712!==e)break;r.isAudiobook=i.bool();continue;case 90:if(720!==e)break;r.isCreatorChannel=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Hn.fromPartial(e??{}),fromPartial(e){const t=Fn();return t.gid=e.gid??new Uint8Array,t.name=e.name??"",t.localizedName=e.localizedName?.map((e=>Bn.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?Zn.fromPartial(e.coverImage):void 0,t.episode=e.episode?.map((e=>Gn.fromPartial(e)))||[],t.copyright=e.copyright?.map((e=>$n.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>Qn.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=>tr.fromPartial(e)))||[],t.availability=e.availability?.map((e=>Jn.fromPartial(e)))||[],t.countryOfOrigin=e.countryOfOrigin??"",t.categories=e.categories?.map((e=>Xn.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 Vn(){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 Gn={encode(e,t=Bi().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 i of e.audio)nr.encode(i,t.uint32(98).fork()).ldelim();for(const i of e.localizedName)Bn.encode(i,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&&Kn.encode(e.publishTime,t.uint32(530).fork()).ldelim(),0!==e.deprecatedPopularity&&t.uint32(536).sint32(e.deprecatedPopularity),void 0!==e.coverImage&&Zn.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&&Hn.encode(e.show,t.uint32(570).fork()).ldelim();for(const i of e.video)ar.encode(i,t.uint32(578).fork()).ldelim();for(const i of e.videoPreview)ar.encode(i,t.uint32(586).fork()).ldelim();for(const i of e.audioPreview)nr.encode(i,t.uint32(594).fork()).ldelim();for(const i of e.restriction)Qn.encode(i,t.uint32(602).fork()).ldelim();void 0!==e.freezeFrame&&Zn.encode(e.freezeFrame,t.uint32(610).fork()).ldelim();for(const i of e.keyword)t.uint32(618).string(i);!0===e.interpretRestrictionUsingGeoip&&t.uint32(624).bool(e.interpretRestrictionUsingGeoip),!0===e.suppressMonetization&&t.uint32(632).bool(e.suppressMonetization);for(const i of e.salePeriod)tr.encode(i,t.uint32(642).fork()).ldelim();!0===e.allowBackgroundPlayback&&t.uint32(648).bool(e.allowBackgroundPlayback);for(const i of e.availability)Jn.encode(i,t.uint32(658).fork()).ldelim();return""!==e.externalUrl&&t.uint32(666).string(e.externalUrl),void 0!==e.originalAudio&&Wn.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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=Vn();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.gid=i.bytes();continue;case 2:if(18!==e)break;r.name=i.string();continue;case 7:if(56!==e)break;r.duration=i.sint32();continue;case 12:if(98!==e)break;r.audio.push(nr.decode(i,i.uint32()));continue;case 23:if(186!==e)break;r.localizedName.push(Bn.decode(i,i.uint32()));continue;case 64:if(514!==e)break;r.description=i.string();continue;case 65:if(520!==e)break;r.number=i.sint32();continue;case 66:if(530!==e)break;r.publishTime=Kn.decode(i,i.uint32());continue;case 67:if(536!==e)break;r.deprecatedPopularity=i.sint32();continue;case 68:if(546!==e)break;r.coverImage=Zn.decode(i,i.uint32());continue;case 69:if(554!==e)break;r.language=i.string();continue;case 70:if(560!==e)break;r.explicit=i.bool();continue;case 71:if(570!==e)break;r.show=Hn.decode(i,i.uint32());continue;case 72:if(578!==e)break;r.video.push(ar.decode(i,i.uint32()));continue;case 73:if(586!==e)break;r.videoPreview.push(ar.decode(i,i.uint32()));continue;case 74:if(594!==e)break;r.audioPreview.push(nr.decode(i,i.uint32()));continue;case 75:if(602!==e)break;r.restriction.push(Qn.decode(i,i.uint32()));continue;case 76:if(610!==e)break;r.freezeFrame=Zn.decode(i,i.uint32());continue;case 77:if(618!==e)break;r.keyword.push(i.string());continue;case 78:if(624!==e)break;r.interpretRestrictionUsingGeoip=i.bool();continue;case 79:if(632!==e)break;r.suppressMonetization=i.bool();continue;case 80:if(642!==e)break;r.salePeriod.push(tr.decode(i,i.uint32()));continue;case 81:if(648!==e)break;r.allowBackgroundPlayback=i.bool();continue;case 82:if(658!==e)break;r.availability.push(Jn.decode(i,i.uint32()));continue;case 83:if(666!==e)break;r.externalUrl=i.string();continue;case 84:if(674!==e)break;r.originalAudio=Wn.decode(i,i.uint32());continue;case 85:if(680!==e)break;r.employeeOnly=i.bool();continue;case 86:if(690!==e)break;r.rssGuid=i.string();continue;case 87:if(696!==e)break;r.type=i.int32();continue;case 88:if(704!==e)break;r.seasonNumber=i.int32();continue;case 89:if(712!==e)break;r.episodeNumber=i.int32();continue;case 96:if(768!==e)break;r.isAudiobookChapter=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Gn.fromPartial(e??{}),fromPartial(e){const t=Vn();return t.gid=e.gid??new Uint8Array,t.name=e.name??"",t.duration=e.duration??0,t.audio=e.audio?.map((e=>nr.fromPartial(e)))||[],t.localizedName=e.localizedName?.map((e=>Bn.fromPartial(e)))||[],t.description=e.description??"",t.number=e.number??0,t.publishTime=void 0!==e.publishTime&&null!==e.publishTime?Kn.fromPartial(e.publishTime):void 0,t.deprecatedPopularity=e.deprecatedPopularity??0,t.coverImage=void 0!==e.coverImage&&null!==e.coverImage?Zn.fromPartial(e.coverImage):void 0,t.language=e.language??"",t.explicit=e.explicit??!1,t.show=void 0!==e.show&&null!==e.show?Hn.fromPartial(e.show):void 0,t.video=e.video?.map((e=>ar.fromPartial(e)))||[],t.videoPreview=e.videoPreview?.map((e=>ar.fromPartial(e)))||[],t.audioPreview=e.audioPreview?.map((e=>nr.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>Qn.fromPartial(e)))||[],t.freezeFrame=void 0!==e.freezeFrame&&null!==e.freezeFrame?Zn.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=>tr.fromPartial(e)))||[],t.allowBackgroundPlayback=e.allowBackgroundPlayback??!1,t.availability=e.availability?.map((e=>Jn.fromPartial(e)))||[],t.externalUrl=e.externalUrl??"",t.originalAudio=void 0!==e.originalAudio&&null!==e.originalAudio?Wn.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 zn(){return{uuid:new Uint8Array}}const Wn={encode:(e,t=Bi().Writer.create())=>(0!==e.uuid.length&&t.uint32(10).bytes(e.uuid),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=zn();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uuid=i.bytes();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Wn.fromPartial(e??{}),fromPartial(e){const t=zn();return t.uuid=e.uuid??new Uint8Array,t}};const Kn={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={year:0,month:0,day:0,hour:0,minute:0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.year=i.sint32();continue;case 2:if(16!==e)break;r.month=i.sint32();continue;case 3:if(24!==e)break;r.day=i.sint32();continue;case 4:if(32!==e)break;r.hour=i.sint32();continue;case 5:if(40!==e)break;r.minute=i.sint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Kn.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 Yn(){return{fileId:new Uint8Array,size:0,width:0,height:0}}const qn={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=Yn();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=i.bytes();continue;case 2:if(16!==e)break;r.size=i.int32();continue;case 3:if(24!==e)break;r.width=i.sint32();continue;case 4:if(32!==e)break;r.height=i.sint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>qn.fromPartial(e??{}),fromPartial(e){const t=Yn();return t.fileId=e.fileId??new Uint8Array,t.size=e.size??0,t.width=e.width??0,t.height=e.height??0,t}};const Zn={encode(e,t=Bi().Writer.create()){for(const i of e.image)qn.encode(i,t.uint32(10).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={image:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.image.push(qn.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Zn.fromPartial(e??{}),fromPartial(e){const t={image:[]};return t.image=e.image?.map((e=>qn.fromPartial(e)))||[],t}};const $n={encode:(e,t=Bi().Writer.create())=>(0!==e.type&&t.uint32(8).int32(e.type),""!==e.text&&t.uint32(18).string(e.text),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={type:0,text:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.type=i.int32();continue;case 2:if(18!==e)break;r.text=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>$n.fromPartial(e??{}),fromPartial(e){const t={type:0,text:""};return t.type=e.type??0,t.text=e.text??"",t}};const Qn={encode(e,t=Bi().Writer.create()){t.uint32(10).fork();for(const i of e.catalogue)t.int32(i);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 i of e.catalogueStr)t.uint32(42).string(i);return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={catalogue:[],countriesAllowed:void 0,countriesForbidden:void 0,type:0,catalogueStr:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8===e){r.catalogue.push(i.int32());continue}if(10===e){const e=i.uint32()+i.pos;for(;i.pos<e;)r.catalogue.push(i.int32());continue}break;case 2:if(18!==e)break;r.countriesAllowed=i.string();continue;case 3:if(26!==e)break;r.countriesForbidden=i.string();continue;case 4:if(32!==e)break;r.type=i.int32();continue;case 5:if(42!==e)break;r.catalogueStr.push(i.string());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Qn.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 Jn={encode(e,t=Bi().Writer.create()){for(const i of e.catalogueStr)t.uint32(10).string(i);return void 0!==e.start&&Kn.encode(e.start,t.uint32(18).fork()).ldelim(),t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={catalogueStr:[],start:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.catalogueStr.push(i.string());continue;case 2:if(18!==e)break;r.start=Kn.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Jn.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?Kn.fromPartial(e.start):void 0,t}};const Xn={encode(e,t=Bi().Writer.create()){""!==e.name&&t.uint32(10).string(e.name);for(const i of e.subcategories)er.encode(i,t.uint32(18).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={name:"",subcategories:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.name=i.string();continue;case 2:if(18!==e)break;r.subcategories.push(er.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Xn.fromPartial(e??{}),fromPartial(e){const t={name:"",subcategories:[]};return t.name=e.name??"",t.subcategories=e.subcategories?.map((e=>er.fromPartial(e)))||[],t}};const er={encode:(e,t=Bi().Writer.create())=>(""!==e.name&&t.uint32(10).string(e.name),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={name:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.name=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>er.fromPartial(e??{}),fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const tr={encode(e,t=Bi().Writer.create()){for(const i of e.restriction)Qn.encode(i,t.uint32(10).fork()).ldelim();return void 0!==e.start&&Kn.encode(e.start,t.uint32(18).fork()).ldelim(),void 0!==e.end&&Kn.encode(e.end,t.uint32(26).fork()).ldelim(),t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={restriction:[],start:void 0,end:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.restriction.push(Qn.decode(i,i.uint32()));continue;case 2:if(18!==e)break;r.start=Kn.decode(i,i.uint32());continue;case 3:if(26!==e)break;r.end=Kn.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>tr.fromPartial(e??{}),fromPartial(e){const t={restriction:[],start:void 0,end:void 0};return t.restriction=e.restriction?.map((e=>Qn.fromPartial(e)))||[],t.start=void 0!==e.start&&null!==e.start?Kn.fromPartial(e.start):void 0,t.end=void 0!==e.end&&null!==e.end?Kn.fromPartial(e.end):void 0,t}};function ir(){return{fileId:new Uint8Array,format:0}}const nr={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=ir();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=i.bytes();continue;case 2:if(16!==e)break;r.format=i.int32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>nr.fromPartial(e??{}),fromPartial(e){const t=ir();return t.fileId=e.fileId??new Uint8Array,t.format=e.format??0,t}};function rr(){return{fileId:new Uint8Array}}const ar={encode:(e,t=Bi().Writer.create())=>(0!==e.fileId.length&&t.uint32(10).bytes(e.fileId),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=rr();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=i.bytes();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>ar.fromPartial(e??{}),fromPartial(e){const t=rr();return t.fileId=e.fileId??new Uint8Array,t}};Bi().util.Long!==ki.A&&(Bi().util.Long=ki.A,Bi().configure());let sr=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 or={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={isPlayable:!1,reason:0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.isPlayable=i.bool();continue;case 2:if(16!==e)break;r.reason=i.int32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>or.fromPartial(e??{}),fromPartial(e){const t={isPlayable:!1,reason:0};return t.isPlayable=e.isPlayable??!1,t.reason=e.reason??0,t}};const lr={encode(e,t=Bi().Writer.create()){for(const i of e.coverImages)ur.encode(i,t.uint32(10).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={coverImages:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.coverImages.push(ur.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>lr.fromPartial(e??{}),fromPartial(e){const t={coverImages:[]};return t.coverImages=e.coverImages?.map((e=>ur.fromPartial(e)))||[],t}};function cr(){return{fileId:new Uint8Array,size:0,width:0,height:0}}const ur={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=cr();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=i.bytes();continue;case 2:if(16!==e)break;r.size=i.int32();continue;case 3:if(24!==e)break;r.width=i.int32();continue;case 4:if(32!==e)break;r.height=i.int32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>ur.fromPartial(e??{}),fromPartial(e){const t=cr();return t.fileId=e.fileId??new Uint8Array,t.size=e.size??0,t.width=e.width??0,t.height=e.height??0,t}};const dr={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={id:"",contextualName:"",depth:0,parentId:"",destinationUri:"",shortName:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.id=i.string();continue;case 2:if(18!==e)break;r.contextualName=i.string();continue;case 3:if(24!==e)break;r.depth=i.int32();continue;case 4:if(34!==e)break;r.parentId=i.string();continue;case 5:if(42!==e)break;r.destinationUri=i.string();continue;case 6:if(50!==e)break;r.shortName=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>dr.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 mr={encode(e,t=Bi().Writer.create()){for(const i of e.genres)dr.encode(i,t.uint32(10).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={genres:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.genres.push(dr.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>mr.fromPartial(e??{}),fromPartial(e){const t={genres:[]};return t.genres=e.genres?.map((e=>dr.fromPartial(e)))||[],t}};const pr={encode:(e,t=Bi().Writer.create())=>(""!==e.sameBookUri&&t.uint32(10).string(e.sameBookUri),0!==e.action&&t.uint32(16).int32(e.action),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={sameBookUri:"",action:0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.sameBookUri=i.string();continue;case 2:if(16!==e)break;r.action=i.int32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>pr.fromPartial(e??{}),fromPartial(e){const t={sameBookUri:"",action:0};return t.sameBookUri=e.sameBookUri??"",t.action=e.action??0,t}};i(28360);let hr=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 gr(e){switch(e){case 0:case"DEFAULT":return hr.DEFAULT;case 1:case"SMALL":return hr.SMALL;case 2:case"LARGE":return hr.LARGE;case 3:case"XLARGE":return hr.XLARGE;case 4:case"XXLARGE":return hr.XXLARGE;default:return hr.UNRECOGNIZED}}const fr={encode(e,t=Bi().Writer.create()){for(const i of e.videoAssociation)vr.encode(i,t.uint32(10).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={videoAssociation:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.videoAssociation.push(vr.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({videoAssociation:globalThis.Array.isArray(e?.videoAssociation)?e.videoAssociation.map((e=>vr.fromJSON(e))):[]}),toJSON(e){const t={};return e.videoAssociation?.length&&(t.videoAssociation=e.videoAssociation.map((e=>vr.toJSON(e)))),t},create:e=>fr.fromPartial(e??{}),fromPartial(e){const t={videoAssociation:[]};return t.videoAssociation=e.videoAssociation?.map((e=>vr.fromPartial(e)))||[],t}};const vr={encode:(e,t=Bi().Writer.create())=>(""!==e.trackUri&&t.uint32(10).string(e.trackUri),void 0!==e.images&&yr.encode(e.images,t.uint32(18).fork()).ldelim(),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={trackUri:"",images:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.trackUri=i.string();continue;case 2:if(18!==e)break;r.images=yr.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({trackUri:Er(e.trackUri)?globalThis.String(e.trackUri):"",images:Er(e.images)?yr.fromJSON(e.images):void 0}),toJSON(e){const t={};return""!==e.trackUri&&(t.trackUri=e.trackUri),void 0!==e.images&&(t.images=yr.toJSON(e.images)),t},create:e=>vr.fromPartial(e??{}),fromPartial(e){const t={trackUri:"",images:void 0};return t.trackUri=e.trackUri??"",t.images=void 0!==e.images&&null!==e.images?yr.fromPartial(e.images):void 0,t}};const yr={encode(e,t=Bi().Writer.create()){for(const i of e.image)br.encode(i,t.uint32(10).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={image:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.image.push(br.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({image:globalThis.Array.isArray(e?.image)?e.image.map((e=>br.fromJSON(e))):[]}),toJSON(e){const t={};return e.image?.length&&(t.image=e.image.map((e=>br.toJSON(e)))),t},create:e=>yr.fromPartial(e??{}),fromPartial(e){const t={image:[]};return t.image=e.image?.map((e=>br.fromPartial(e)))||[],t}};const br={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={fileId:void 0,size:void 0,width:void 0,height:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=i.bytes();continue;case 2:if(16!==e)break;r.size=i.int32();continue;case 3:if(24!==e)break;r.width=i.sint32();continue;case 4:if(32!==e)break;r.height=i.sint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({fileId:Er(e.fileId)?_r(e.fileId):void 0,size:Er(e.size)?gr(e.size):void 0,width:Er(e.width)?globalThis.Number(e.width):void 0,height:Er(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 hr.DEFAULT:return"DEFAULT";case hr.SMALL:return"SMALL";case hr.LARGE:return"LARGE";case hr.XLARGE:return"XLARGE";case hr.XXLARGE:return"XXLARGE";case hr.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=>br.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 _r(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),i=new Uint8Array(t.length);for(let e=0;e<t.length;++e)i[e]=t.charCodeAt(e);return i}}function Er(e){return null!=e}let Cr=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 xr(e){switch(e){case 0:case"DANCEABILITY_UNKNOWN":return Cr.DANCEABILITY_UNKNOWN;case 1:case"DANCEABILITY_VERY_LOW":return Cr.DANCEABILITY_VERY_LOW;case 2:case"DANCEABILITY_LOW":return Cr.DANCEABILITY_LOW;case 3:case"DANCEABILITY_MEDIUM":return Cr.DANCEABILITY_MEDIUM;case 4:case"DANCEABILITY_HIGH":return Cr.DANCEABILITY_HIGH;case 5:case"DANCEABILITY_VERY_HIGH":return Cr.DANCEABILITY_VERY_HIGH;default:return Cr.UNRECOGNIZED}}let Sr=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 Ar(e){switch(e){case 0:case"MODE_UNKNOWN":return Sr.MODE_UNKNOWN;case 1:case"MODE_MINOR":return Sr.MODE_MINOR;case 2:case"MODE_MAJOR":return Sr.MODE_MAJOR;default:return Sr.UNRECOGNIZED}}const Tr={encode(e,t=Bi().Writer.create()){for(const i of e.tags)Ir.encode(i,t.uint32(10).fork()).ldelim();return 0!==e.bpm&&t.uint32(16).int32(e.bpm),void 0!==e.key&&Nr.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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={tags:[],bpm:0,key:void 0,danceability:0,preventPreviewBar:!1};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.tags.push(Ir.decode(i,i.uint32()));continue;case 2:if(16!==e)break;r.bpm=i.int32();continue;case 3:if(26!==e)break;r.key=Nr.decode(i,i.uint32());continue;case 4:if(32!==e)break;r.danceability=i.int32();continue;case 5:if(40!==e)break;r.preventPreviewBar=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({tags:globalThis.Array.isArray(e?.tags)?e.tags.map((e=>Ir.fromJSON(e))):[],bpm:wr(e.bpm)?globalThis.Number(e.bpm):0,key:wr(e.key)?Nr.fromJSON(e.key):void 0,danceability:wr(e.danceability)?xr(e.danceability):0,preventPreviewBar:!!wr(e.preventPreviewBar)&&globalThis.Boolean(e.preventPreviewBar)}),toJSON(e){const t={};return e.tags?.length&&(t.tags=e.tags.map((e=>Ir.toJSON(e)))),0!==e.bpm&&(t.bpm=Math.round(e.bpm)),void 0!==e.key&&(t.key=Nr.toJSON(e.key)),0!==e.danceability&&(t.danceability=function(e){switch(e){case Cr.DANCEABILITY_UNKNOWN:return"DANCEABILITY_UNKNOWN";case Cr.DANCEABILITY_VERY_LOW:return"DANCEABILITY_VERY_LOW";case Cr.DANCEABILITY_LOW:return"DANCEABILITY_LOW";case Cr.DANCEABILITY_MEDIUM:return"DANCEABILITY_MEDIUM";case Cr.DANCEABILITY_HIGH:return"DANCEABILITY_HIGH";case Cr.DANCEABILITY_VERY_HIGH:return"DANCEABILITY_VERY_HIGH";case Cr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.danceability)),!1!==e.preventPreviewBar&&(t.preventPreviewBar=e.preventPreviewBar),t},create:e=>Tr.fromPartial(e??{}),fromPartial(e){const t={tags:[],bpm:0,key:void 0,danceability:0,preventPreviewBar:!1};return t.tags=e.tags?.map((e=>Ir.fromPartial(e)))||[],t.bpm=e.bpm??0,t.key=void 0!==e.key&&null!==e.key?Nr.fromPartial(e.key):void 0,t.danceability=e.danceability??0,t.preventPreviewBar=e.preventPreviewBar??!1,t}};const Ir={encode:(e,t=Bi().Writer.create())=>(""!==e.conceptUri&&t.uint32(10).string(e.conceptUri),0!==e.weight&&t.uint32(21).float(e.weight),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={conceptUri:"",weight:0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.conceptUri=i.string();continue;case 2:if(21!==e)break;r.weight=i.float();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({conceptUri:wr(e.conceptUri)?globalThis.String(e.conceptUri):"",weight:wr(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=>Ir.fromPartial(e??{}),fromPartial(e){const t={conceptUri:"",weight:0};return t.conceptUri=e.conceptUri??"",t.weight=e.weight??0,t}};const Nr={encode:(e,t=Bi().Writer.create())=>(""!==e.key&&t.uint32(10).string(e.key),0!==e.mode&&t.uint32(16).int32(e.mode),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={key:"",mode:0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.key=i.string();continue;case 2:if(16!==e)break;r.mode=i.int32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({key:wr(e.key)?globalThis.String(e.key):"",mode:wr(e.mode)?Ar(e.mode):0}),toJSON(e){const t={};return""!==e.key&&(t.key=e.key),0!==e.mode&&(t.mode=function(e){switch(e){case Sr.MODE_UNKNOWN:return"MODE_UNKNOWN";case Sr.MODE_MINOR:return"MODE_MINOR";case Sr.MODE_MAJOR:return"MODE_MAJOR";case Sr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.mode)),t},create:e=>Nr.fromPartial(e??{}),fromPartial(e){const t={key:"",mode:0};return t.key=e.key??"",t.mode=e.mode??0,t}};function wr(e){return null!=e}const Rr={encode(e,t=Bi().Writer.create()){""!==e.translatedLibraryName&&t.uint32(10).string(e.translatedLibraryName),""!==e.imageUri&&t.uint32(26).string(e.imageUri);for(const i of e.conceptClass)Or.encode(i,t.uint32(34).fork()).ldelim();return void 0!==e.libraryClass&&Or.encode(e.libraryClass,t.uint32(42).fork()).ldelim(),Object.entries(e.translationMap).forEach((([e,i])=>{kr.encode({key:e,value:i},t.uint32(50).fork()).ldelim()})),t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={translatedLibraryName:"",imageUri:"",conceptClass:[],libraryClass:void 0,translationMap:{}};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.translatedLibraryName=i.string();continue;case 3:if(26!==e)break;r.imageUri=i.string();continue;case 4:if(34!==e)break;r.conceptClass.push(Or.decode(i,i.uint32()));continue;case 5:if(42!==e)break;r.libraryClass=Or.decode(i,i.uint32());continue;case 6:if(50!==e)break;const t=kr.decode(i,i.uint32());void 0!==t.value&&(r.translationMap[t.key]=t.value);continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON(e){return{translatedLibraryName:Pr(e.translatedLibraryName)?globalThis.String(e.translatedLibraryName):"",imageUri:Pr(e.imageUri)?globalThis.String(e.imageUri):"",conceptClass:globalThis.Array.isArray(e?.conceptClass)?e.conceptClass.map((e=>Or.fromJSON(e))):[],libraryClass:Pr(e.libraryClass)?Or.fromJSON(e.libraryClass):void 0,translationMap:(t=e.translationMap,"object"==typeof t&&null!==t?Object.entries(e.translationMap).reduce(((e,[t,i])=>(e[t]=String(i),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=>Or.toJSON(e)))),void 0!==e.libraryClass&&(t.libraryClass=Or.toJSON(e.libraryClass)),e.translationMap){const i=Object.entries(e.translationMap);i.length>0&&(t.translationMap={},i.forEach((([e,i])=>{t.translationMap[e]=i})))}return t},create:e=>Rr.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=>Or.fromPartial(e)))||[],t.libraryClass=void 0!==e.libraryClass&&null!==e.libraryClass?Or.fromPartial(e.libraryClass):void 0,t.translationMap=Object.entries(e.translationMap??{}).reduce(((e,[t,i])=>(void 0!==i&&(e[t]=globalThis.String(i)),e)),{}),t}};const kr={encode:(e,t=Bi().Writer.create())=>(""!==e.key&&t.uint32(10).string(e.key),""!==e.value&&t.uint32(18).string(e.value),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={key:"",value:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.key=i.string();continue;case 2:if(18!==e)break;r.value=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({key:Pr(e.key)?globalThis.String(e.key):"",value:Pr(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=>kr.fromPartial(e??{}),fromPartial(e){const t={key:"",value:""};return t.key=e.key??"",t.value=e.value??"",t}};const Or={encode:(e,t=Bi().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.translatedName&&t.uint32(18).string(e.translatedName),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={uri:"",translatedName:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uri=i.string();continue;case 2:if(18!==e)break;r.translatedName=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({uri:Pr(e.uri)?globalThis.String(e.uri):"",translatedName:Pr(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=>Or.fromPartial(e??{}),fromPartial(e){const t={uri:"",translatedName:""};return t.uri=e.uri??"",t.translatedName=e.translatedName??"",t}};function Pr(e){return null!=e}i(98263);let Lr=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 jr(e){switch(e){case 1:case"ALBUM":return Lr.ALBUM;case 2:case"SINGLE":return Lr.SINGLE;case 3:case"COMPILATION":return Lr.COMPILATION;case 4:case"EP":return Lr.EP;case 5:case"AUDIOBOOK":return Lr.AUDIOBOOK;case 6:case"PODCAST":return Lr.PODCAST;default:return Lr.UNRECOGNIZED}}let Dr=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 Mr(e){switch(e){case 0:case"ARTIST_ROLE_UNKNOWN":return Dr.ARTIST_ROLE_UNKNOWN;case 1:case"ARTIST_ROLE_MAIN_ARTIST":return Dr.ARTIST_ROLE_MAIN_ARTIST;case 2:case"ARTIST_ROLE_FEATURED_ARTIST":return Dr.ARTIST_ROLE_FEATURED_ARTIST;case 3:case"ARTIST_ROLE_REMIXER":return Dr.ARTIST_ROLE_REMIXER;case 4:case"ARTIST_ROLE_ACTOR":return Dr.ARTIST_ROLE_ACTOR;case 5:case"ARTIST_ROLE_COMPOSER":return Dr.ARTIST_ROLE_COMPOSER;case 6:case"ARTIST_ROLE_CONDUCTOR":return Dr.ARTIST_ROLE_CONDUCTOR;case 7:case"ARTIST_ROLE_ORCHESTRA":return Dr.ARTIST_ROLE_ORCHESTRA;default:return Dr.UNRECOGNIZED}}let Ur=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 Br(e){switch(e){case 0:case"DEFAULT":return Ur.DEFAULT;case 1:case"SMALL":return Ur.SMALL;case 2:case"LARGE":return Ur.LARGE;case 3:case"XLARGE":return Ur.XLARGE;case 4:case"XXLARGE":return Ur.XXLARGE;default:return Ur.UNRECOGNIZED}}let Fr=function(e){return e[e.P=0]="P",e[e.C=1]="C",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function Hr(e){switch(e){case 0:case"P":return Fr.P;case 1:case"C":return Fr.C;default:return Fr.UNRECOGNIZED}}let Vr=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 Gr=function(e){return e[e.STREAMING=0]="STREAMING",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function zr(e){switch(e){case 0:case"STREAMING":return Gr.STREAMING;default:return Gr.UNRECOGNIZED}}let Wr=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 Kr(e){switch(e){case 0:case"OGG_VORBIS_96":return Wr.OGG_VORBIS_96;case 1:case"OGG_VORBIS_160":return Wr.OGG_VORBIS_160;case 2:case"OGG_VORBIS_320":return Wr.OGG_VORBIS_320;case 3:case"MP3_256":return Wr.MP3_256;case 4:case"MP3_320":return Wr.MP3_320;case 5:case"MP3_160":return Wr.MP3_160;case 6:case"MP3_96":return Wr.MP3_96;case 7:case"MP3_160_ENC":return Wr.MP3_160_ENC;case 8:case"AAC_24":return Wr.AAC_24;case 9:case"AAC_48":return Wr.AAC_48;case 10:case"MP4_128":return Wr.MP4_128;case 11:case"MP4_256":return Wr.MP4_256;case 12:case"MP4_128_DUAL":return Wr.MP4_128_DUAL;case 13:case"MP4_256_DUAL":return Wr.MP4_256_DUAL;case 14:case"MP4_128_CBCS":return Wr.MP4_128_CBCS;case 15:case"MP4_256_CBCS":return Wr.MP4_256_CBCS;case 16:case"FLAC_FLAC":return Wr.FLAC_FLAC;case 17:case"MP4_FLAC":return Wr.MP4_FLAC;case 18:case"XHE_AAC_24":return Wr.XHE_AAC_24;case 19:case"XHE_AAC_16":return Wr.XHE_AAC_16;case 20:case"XHE_AAC_12":return Wr.XHE_AAC_12;case 21:case"HE_AAC_64":return Wr.HE_AAC_64;case 22:case"FLAC_FLAC_24BIT":return Wr.FLAC_FLAC_24BIT;case 23:case"MP4_FLAC_24BIT":return Wr.MP4_FLAC_24BIT;default:return Wr.UNRECOGNIZED}}let Yr=function(e){return e[e.TOTAL=0]="TOTAL",e[e.COVERARTCP=1]="COVERARTCP",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function qr(e){switch(e){case 0:case"TOTAL":return Yr.TOTAL;case 1:case"COVERARTCP":return Yr.COVERARTCP;default:return Yr.UNRECOGNIZED}}const Zr={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={language:"",value:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.language=i.string();continue;case 2:if(18!==e)break;r.value=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({language:Ua(e.language)?globalThis.String(e.language):"",value:Ua(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=>Zr.fromPartial(e??{}),fromPartial(e){const t={language:"",value:""};return t.language=e.language??"",t.value=e.value??"",t}};function $r(){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 Qr={encode(e,t=Bi().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 i of e.topTrack)ua.encode(i,t.uint32(34).fork()).ldelim();for(const i of e.albumGroup)pa.encode(i,t.uint32(42).fork()).ldelim();for(const i of e.singleGroup)pa.encode(i,t.uint32(50).fork()).ldelim();for(const i of e.compilationGroup)pa.encode(i,t.uint32(58).fork()).ldelim();for(const i of e.appearsOnGroup)pa.encode(i,t.uint32(66).fork()).ldelim();for(const i of e.genre)t.uint32(74).string(i);for(const i of e.externalId)Sa.encode(i,t.uint32(82).fork()).ldelim();for(const i of e.portrait)fa.encode(i,t.uint32(90).fork()).ldelim();for(const i of e.biography)ya.encode(i,t.uint32(98).fork()).ldelim();for(const i of e.activityPeriod)ma.encode(i,t.uint32(106).fork()).ldelim();for(const i of e.restriction)Ea.encode(i,t.uint32(114).fork()).ldelim();for(const i of e.related)Qr.encode(i,t.uint32(122).fork()).ldelim();void 0!==e.isPortraitAlbumCover&&!1!==e.isPortraitAlbumCover&&t.uint32(128).bool(e.isPortraitAlbumCover),void 0!==e.portraitGroup&&va.encode(e.portraitGroup,t.uint32(138).fork()).ldelim();for(const i of e.salePeriod)xa.encode(i,t.uint32(146).fork()).ldelim();for(const i of e.localizedName)Zr.encode(i,t.uint32(154).fork()).ldelim();for(const i of e.availability)Ca.encode(i,t.uint32(162).fork()).ldelim();void 0!==e.indexVersion&&"0"!==e.indexVersion&&t.uint32(168).int64(e.indexVersion);for(const i of e.compressedTopTrack)da.encode(i,t.uint32(178).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=$r();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.gid=i.bytes();continue;case 2:if(18!==e)break;r.name=i.string();continue;case 3:if(24!==e)break;r.popularity=i.sint32();continue;case 4:if(34!==e)break;r.topTrack.push(ua.decode(i,i.uint32()));continue;case 5:if(42!==e)break;r.albumGroup.push(pa.decode(i,i.uint32()));continue;case 6:if(50!==e)break;r.singleGroup.push(pa.decode(i,i.uint32()));continue;case 7:if(58!==e)break;r.compilationGroup.push(pa.decode(i,i.uint32()));continue;case 8:if(66!==e)break;r.appearsOnGroup.push(pa.decode(i,i.uint32()));continue;case 9:if(74!==e)break;r.genre.push(i.string());continue;case 10:if(82!==e)break;r.externalId.push(Sa.decode(i,i.uint32()));continue;case 11:if(90!==e)break;r.portrait.push(fa.decode(i,i.uint32()));continue;case 12:if(98!==e)break;r.biography.push(ya.decode(i,i.uint32()));continue;case 13:if(106!==e)break;r.activityPeriod.push(ma.decode(i,i.uint32()));continue;case 14:if(114!==e)break;r.restriction.push(Ea.decode(i,i.uint32()));continue;case 15:if(122!==e)break;r.related.push(Qr.decode(i,i.uint32()));continue;case 16:if(128!==e)break;r.isPortraitAlbumCover=i.bool();continue;case 17:if(138!==e)break;r.portraitGroup=va.decode(i,i.uint32());continue;case 18:if(146!==e)break;r.salePeriod.push(xa.decode(i,i.uint32()));continue;case 19:if(154!==e)break;r.localizedName.push(Zr.decode(i,i.uint32()));continue;case 20:if(162!==e)break;r.availability.push(Ca.decode(i,i.uint32()));continue;case 21:if(168!==e)break;r.indexVersion=Ma(i.int64());continue;case 22:if(178!==e)break;r.compressedTopTrack.push(da.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({gid:Ua(e.gid)?ja(e.gid):new Uint8Array(0),name:Ua(e.name)?globalThis.String(e.name):"",popularity:Ua(e.popularity)?globalThis.Number(e.popularity):0,topTrack:globalThis.Array.isArray(e?.topTrack)?e.topTrack.map((e=>ua.fromJSON(e))):[],albumGroup:globalThis.Array.isArray(e?.albumGroup)?e.albumGroup.map((e=>pa.fromJSON(e))):[],singleGroup:globalThis.Array.isArray(e?.singleGroup)?e.singleGroup.map((e=>pa.fromJSON(e))):[],compilationGroup:globalThis.Array.isArray(e?.compilationGroup)?e.compilationGroup.map((e=>pa.fromJSON(e))):[],appearsOnGroup:globalThis.Array.isArray(e?.appearsOnGroup)?e.appearsOnGroup.map((e=>pa.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=>Sa.fromJSON(e))):[],portrait:globalThis.Array.isArray(e?.portrait)?e.portrait.map((e=>fa.fromJSON(e))):[],biography:globalThis.Array.isArray(e?.biography)?e.biography.map((e=>ya.fromJSON(e))):[],activityPeriod:globalThis.Array.isArray(e?.activityPeriod)?e.activityPeriod.map((e=>ma.fromJSON(e))):[],restriction:globalThis.Array.isArray(e?.restriction)?e.restriction.map((e=>Ea.fromJSON(e))):[],related:globalThis.Array.isArray(e?.related)?e.related.map((e=>Qr.fromJSON(e))):[],isPortraitAlbumCover:!!Ua(e.isPortraitAlbumCover)&&globalThis.Boolean(e.isPortraitAlbumCover),portraitGroup:Ua(e.portraitGroup)?va.fromJSON(e.portraitGroup):void 0,salePeriod:globalThis.Array.isArray(e?.salePeriod)?e.salePeriod.map((e=>xa.fromJSON(e))):[],localizedName:globalThis.Array.isArray(e?.localizedName)?e.localizedName.map((e=>Zr.fromJSON(e))):[],availability:globalThis.Array.isArray(e?.availability)?e.availability.map((e=>Ca.fromJSON(e))):[],indexVersion:Ua(e.indexVersion)?globalThis.String(e.indexVersion):"0",compressedTopTrack:globalThis.Array.isArray(e?.compressedTopTrack)?e.compressedTopTrack.map((e=>da.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.gid&&0!==e.gid.length&&(t.gid=Da(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=>ua.toJSON(e)))),e.albumGroup?.length&&(t.albumGroup=e.albumGroup.map((e=>pa.toJSON(e)))),e.singleGroup?.length&&(t.singleGroup=e.singleGroup.map((e=>pa.toJSON(e)))),e.compilationGroup?.length&&(t.compilationGroup=e.compilationGroup.map((e=>pa.toJSON(e)))),e.appearsOnGroup?.length&&(t.appearsOnGroup=e.appearsOnGroup.map((e=>pa.toJSON(e)))),e.genre?.length&&(t.genre=e.genre),e.externalId?.length&&(t.externalId=e.externalId.map((e=>Sa.toJSON(e)))),e.portrait?.length&&(t.portrait=e.portrait.map((e=>fa.toJSON(e)))),e.biography?.length&&(t.biography=e.biography.map((e=>ya.toJSON(e)))),e.activityPeriod?.length&&(t.activityPeriod=e.activityPeriod.map((e=>ma.toJSON(e)))),e.restriction?.length&&(t.restriction=e.restriction.map((e=>Ea.toJSON(e)))),e.related?.length&&(t.related=e.related.map((e=>Qr.toJSON(e)))),void 0!==e.isPortraitAlbumCover&&!1!==e.isPortraitAlbumCover&&(t.isPortraitAlbumCover=e.isPortraitAlbumCover),void 0!==e.portraitGroup&&(t.portraitGroup=va.toJSON(e.portraitGroup)),e.salePeriod?.length&&(t.salePeriod=e.salePeriod.map((e=>xa.toJSON(e)))),e.localizedName?.length&&(t.localizedName=e.localizedName.map((e=>Zr.toJSON(e)))),e.availability?.length&&(t.availability=e.availability.map((e=>Ca.toJSON(e)))),void 0!==e.indexVersion&&"0"!==e.indexVersion&&(t.indexVersion=e.indexVersion),e.compressedTopTrack?.length&&(t.compressedTopTrack=e.compressedTopTrack.map((e=>da.toJSON(e)))),t},create:e=>Qr.fromPartial(e??{}),fromPartial(e){const t=$r();return t.gid=e.gid??new Uint8Array(0),t.name=e.name??"",t.popularity=e.popularity??0,t.topTrack=e.topTrack?.map((e=>ua.fromPartial(e)))||[],t.albumGroup=e.albumGroup?.map((e=>pa.fromPartial(e)))||[],t.singleGroup=e.singleGroup?.map((e=>pa.fromPartial(e)))||[],t.compilationGroup=e.compilationGroup?.map((e=>pa.fromPartial(e)))||[],t.appearsOnGroup=e.appearsOnGroup?.map((e=>pa.fromPartial(e)))||[],t.genre=e.genre?.map((e=>e))||[],t.externalId=e.externalId?.map((e=>Sa.fromPartial(e)))||[],t.portrait=e.portrait?.map((e=>fa.fromPartial(e)))||[],t.biography=e.biography?.map((e=>ya.fromPartial(e)))||[],t.activityPeriod=e.activityPeriod?.map((e=>ma.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>Ea.fromPartial(e)))||[],t.related=e.related?.map((e=>Qr.fromPartial(e)))||[],t.isPortraitAlbumCover=e.isPortraitAlbumCover??!1,t.portraitGroup=void 0!==e.portraitGroup&&null!==e.portraitGroup?va.fromPartial(e.portraitGroup):void 0,t.salePeriod=e.salePeriod?.map((e=>xa.fromPartial(e)))||[],t.localizedName=e.localizedName?.map((e=>Zr.fromPartial(e)))||[],t.availability=e.availability?.map((e=>Ca.fromPartial(e)))||[],t.indexVersion=e.indexVersion??"0",t.compressedTopTrack=e.compressedTopTrack?.map((e=>da.fromPartial(e)))||[],t}};function Jr(){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 Xr={encode(e,t=Bi().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 i of e.artist)Qr.encode(i,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&&ha.encode(e.date,t.uint32(50).fork()).ldelim(),void 0!==e.popularity&&0!==e.popularity&&t.uint32(56).sint32(e.popularity);for(const i of e.genre)t.uint32(66).string(i);for(const i of e.cover)fa.encode(i,t.uint32(74).fork()).ldelim();for(const i of e.externalId)Sa.encode(i,t.uint32(82).fork()).ldelim();for(const i of e.disc)ba.encode(i,t.uint32(90).fork()).ldelim();for(const i of e.review)t.uint32(98).string(i);for(const i of e.copyright)_a.encode(i,t.uint32(106).fork()).ldelim();for(const i of e.restriction)Ea.encode(i,t.uint32(114).fork()).ldelim();for(const i of e.related)Xr.encode(i,t.uint32(122).fork()).ldelim();for(const i of e.salePeriod)xa.encode(i,t.uint32(130).fork()).ldelim();void 0!==e.coverGroup&&va.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 i of e.visibilityBlock)Ra.encode(i,t.uint32(170).fork()).ldelim();void 0!==e.earliestLiveTimestamp&&"0"!==e.earliestLiveTimestamp&&t.uint32(176).int64(e.earliestLiveTimestamp);for(const i of e.availability)Ca.encode(i,t.uint32(186).fork()).ldelim();for(const i of e.windowedTrack)na.encode(i,t.uint32(194).fork()).ldelim();void 0!==e.licensor&&oa.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 i of e.localizedName)Zr.encode(i,t.uint32(234).fork()).ldelim();void 0!==e.indexVersion&&"0"!==e.indexVersion&&t.uint32(240).int64(e.indexVersion);for(const i of e.segmentBlockGid)t.uint32(250).bytes(i);void 0!==e.courtesyLine&&""!==e.courtesyLine&&t.uint32(258).string(e.courtesyLine);for(const i of e.title)ta.encode(i,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 i of e.artistWithRole)aa.encode(i,t.uint32(290).fork()).ldelim();void 0!==e.prereleaseConfig&&Oa.encode(e.prereleaseConfig,t.uint32(298).fork()).ldelim();for(const i of e.labelId)Aa.encode(i,t.uint32(306).fork()).ldelim();void 0!==e.implementationDetails&&ea.encode(e.implementationDetails,t.uint32(314).fork()).ldelim();for(const i of e.releaseAdmin)La.encode(i,t.uint32(322).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=Jr();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.gid=i.bytes();continue;case 2:if(18!==e)break;r.name=i.string();continue;case 3:if(26!==e)break;r.artist.push(Qr.decode(i,i.uint32()));continue;case 4:if(32!==e)break;r.type=i.int32();continue;case 5:if(42!==e)break;r.label=i.string();continue;case 6:if(50!==e)break;r.date=ha.decode(i,i.uint32());continue;case 7:if(56!==e)break;r.popularity=i.sint32();continue;case 8:if(66!==e)break;r.genre.push(i.string());continue;case 9:if(74!==e)break;r.cover.push(fa.decode(i,i.uint32()));continue;case 10:if(82!==e)break;r.externalId.push(Sa.decode(i,i.uint32()));continue;case 11:if(90!==e)break;r.disc.push(ba.decode(i,i.uint32()));continue;case 12:if(98!==e)break;r.review.push(i.string());continue;case 13:if(106!==e)break;r.copyright.push(_a.decode(i,i.uint32()));continue;case 14:if(114!==e)break;r.restriction.push(Ea.decode(i,i.uint32()));continue;case 15:if(122!==e)break;r.related.push(Xr.decode(i,i.uint32()));continue;case 16:if(130!==e)break;r.salePeriod.push(xa.decode(i,i.uint32()));continue;case 17:if(138!==e)break;r.coverGroup=va.decode(i,i.uint32());continue;case 18:if(146!==e)break;r.originalTitle=i.string();continue;case 19:if(154!==e)break;r.versionTitle=i.string();continue;case 20:if(162!==e)break;r.typeStr=i.string();continue;case 21:if(170!==e)break;r.visibilityBlock.push(Ra.decode(i,i.uint32()));continue;case 22:if(176!==e)break;r.earliestLiveTimestamp=Ma(i.int64());continue;case 23:if(186!==e)break;r.availability.push(Ca.decode(i,i.uint32()));continue;case 24:if(194!==e)break;r.windowedTrack.push(na.decode(i,i.uint32()));continue;case 25:if(202!==e)break;r.licensor=oa.decode(i,i.uint32());continue;case 26:if(208!==e)break;r.version=Ma(i.int64());continue;case 27:if(218!==e)break;r.feedGid=i.string();continue;case 28:if(226!==e)break;r.deliveryId=i.string();continue;case 29:if(234!==e)break;r.localizedName.push(Zr.decode(i,i.uint32()));continue;case 30:if(240!==e)break;r.indexVersion=Ma(i.int64());continue;case 31:if(250!==e)break;r.segmentBlockGid.push(i.bytes());continue;case 32:if(258!==e)break;r.courtesyLine=i.string();continue;case 33:if(266!==e)break;r.title.push(ta.decode(i,i.uint32()));continue;case 34:if(272!==e)break;r.isMetadataHidden=i.bool();continue;case 35:if(282!==e)break;r.canonicalUri=i.string();continue;case 36:if(290!==e)break;r.artistWithRole.push(aa.decode(i,i.uint32()));continue;case 37:if(298!==e)break;r.prereleaseConfig=Oa.decode(i,i.uint32());continue;case 38:if(306!==e)break;r.labelId.push(Aa.decode(i,i.uint32()));continue;case 39:if(314!==e)break;r.implementationDetails=ea.decode(i,i.uint32());continue;case 40:if(322!==e)break;r.releaseAdmin.push(La.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({gid:Ua(e.gid)?ja(e.gid):new Uint8Array(0),name:Ua(e.name)?globalThis.String(e.name):"",artist:globalThis.Array.isArray(e?.artist)?e.artist.map((e=>Qr.fromJSON(e))):[],type:Ua(e.type)?jr(e.type):1,label:Ua(e.label)?globalThis.String(e.label):"",date:Ua(e.date)?ha.fromJSON(e.date):void 0,popularity:Ua(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=>fa.fromJSON(e))):[],externalId:globalThis.Array.isArray(e?.externalId)?e.externalId.map((e=>Sa.fromJSON(e))):[],disc:globalThis.Array.isArray(e?.disc)?e.disc.map((e=>ba.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=>_a.fromJSON(e))):[],restriction:globalThis.Array.isArray(e?.restriction)?e.restriction.map((e=>Ea.fromJSON(e))):[],related:globalThis.Array.isArray(e?.related)?e.related.map((e=>Xr.fromJSON(e))):[],salePeriod:globalThis.Array.isArray(e?.salePeriod)?e.salePeriod.map((e=>xa.fromJSON(e))):[],coverGroup:Ua(e.coverGroup)?va.fromJSON(e.coverGroup):void 0,originalTitle:Ua(e.originalTitle)?globalThis.String(e.originalTitle):"",versionTitle:Ua(e.versionTitle)?globalThis.String(e.versionTitle):"",typeStr:Ua(e.typeStr)?globalThis.String(e.typeStr):"",visibilityBlock:globalThis.Array.isArray(e?.visibilityBlock)?e.visibilityBlock.map((e=>Ra.fromJSON(e))):[],earliestLiveTimestamp:Ua(e.earliestLiveTimestamp)?globalThis.String(e.earliestLiveTimestamp):"0",availability:globalThis.Array.isArray(e?.availability)?e.availability.map((e=>Ca.fromJSON(e))):[],windowedTrack:globalThis.Array.isArray(e?.windowedTrack)?e.windowedTrack.map((e=>na.fromJSON(e))):[],licensor:Ua(e.licensor)?oa.fromJSON(e.licensor):void 0,version:Ua(e.version)?globalThis.String(e.version):"0",feedGid:Ua(e.feedGid)?globalThis.String(e.feedGid):"",deliveryId:Ua(e.deliveryId)?globalThis.String(e.deliveryId):"",localizedName:globalThis.Array.isArray(e?.localizedName)?e.localizedName.map((e=>Zr.fromJSON(e))):[],indexVersion:Ua(e.indexVersion)?globalThis.String(e.indexVersion):"0",segmentBlockGid:globalThis.Array.isArray(e?.segmentBlockGid)?e.segmentBlockGid.map((e=>ja(e))):[],courtesyLine:Ua(e.courtesyLine)?globalThis.String(e.courtesyLine):"",title:globalThis.Array.isArray(e?.title)?e.title.map((e=>ta.fromJSON(e))):[],isMetadataHidden:!!Ua(e.isMetadataHidden)&&globalThis.Boolean(e.isMetadataHidden),canonicalUri:Ua(e.canonicalUri)?globalThis.String(e.canonicalUri):"",artistWithRole:globalThis.Array.isArray(e?.artistWithRole)?e.artistWithRole.map((e=>aa.fromJSON(e))):[],prereleaseConfig:Ua(e.prereleaseConfig)?Oa.fromJSON(e.prereleaseConfig):void 0,labelId:globalThis.Array.isArray(e?.labelId)?e.labelId.map((e=>Aa.fromJSON(e))):[],implementationDetails:Ua(e.implementationDetails)?ea.fromJSON(e.implementationDetails):void 0,releaseAdmin:globalThis.Array.isArray(e?.releaseAdmin)?e.releaseAdmin.map((e=>La.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.gid&&0!==e.gid.length&&(t.gid=Da(e.gid)),void 0!==e.name&&""!==e.name&&(t.name=e.name),e.artist?.length&&(t.artist=e.artist.map((e=>Qr.toJSON(e)))),void 0!==e.type&&1!==e.type&&(t.type=function(e){switch(e){case Lr.ALBUM:return"ALBUM";case Lr.SINGLE:return"SINGLE";case Lr.COMPILATION:return"COMPILATION";case Lr.EP:return"EP";case Lr.AUDIOBOOK:return"AUDIOBOOK";case Lr.PODCAST:return"PODCAST";case Lr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),void 0!==e.label&&""!==e.label&&(t.label=e.label),void 0!==e.date&&(t.date=ha.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=>fa.toJSON(e)))),e.externalId?.length&&(t.externalId=e.externalId.map((e=>Sa.toJSON(e)))),e.disc?.length&&(t.disc=e.disc.map((e=>ba.toJSON(e)))),e.review?.length&&(t.review=e.review),e.copyright?.length&&(t.copyright=e.copyright.map((e=>_a.toJSON(e)))),e.restriction?.length&&(t.restriction=e.restriction.map((e=>Ea.toJSON(e)))),e.related?.length&&(t.related=e.related.map((e=>Xr.toJSON(e)))),e.salePeriod?.length&&(t.salePeriod=e.salePeriod.map((e=>xa.toJSON(e)))),void 0!==e.coverGroup&&(t.coverGroup=va.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=>Ra.toJSON(e)))),void 0!==e.earliestLiveTimestamp&&"0"!==e.earliestLiveTimestamp&&(t.earliestLiveTimestamp=e.earliestLiveTimestamp),e.availability?.length&&(t.availability=e.availability.map((e=>Ca.toJSON(e)))),e.windowedTrack?.length&&(t.windowedTrack=e.windowedTrack.map((e=>na.toJSON(e)))),void 0!==e.licensor&&(t.licensor=oa.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=>Zr.toJSON(e)))),void 0!==e.indexVersion&&"0"!==e.indexVersion&&(t.indexVersion=e.indexVersion),e.segmentBlockGid?.length&&(t.segmentBlockGid=e.segmentBlockGid.map((e=>Da(e)))),void 0!==e.courtesyLine&&""!==e.courtesyLine&&(t.courtesyLine=e.courtesyLine),e.title?.length&&(t.title=e.title.map((e=>ta.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=>aa.toJSON(e)))),void 0!==e.prereleaseConfig&&(t.prereleaseConfig=Oa.toJSON(e.prereleaseConfig)),e.labelId?.length&&(t.labelId=e.labelId.map((e=>Aa.toJSON(e)))),void 0!==e.implementationDetails&&(t.implementationDetails=ea.toJSON(e.implementationDetails)),e.releaseAdmin?.length&&(t.releaseAdmin=e.releaseAdmin.map((e=>La.toJSON(e)))),t},create:e=>Xr.fromPartial(e??{}),fromPartial(e){const t=Jr();return t.gid=e.gid??new Uint8Array(0),t.name=e.name??"",t.artist=e.artist?.map((e=>Qr.fromPartial(e)))||[],t.type=e.type??1,t.label=e.label??"",t.date=void 0!==e.date&&null!==e.date?ha.fromPartial(e.date):void 0,t.popularity=e.popularity??0,t.genre=e.genre?.map((e=>e))||[],t.cover=e.cover?.map((e=>fa.fromPartial(e)))||[],t.externalId=e.externalId?.map((e=>Sa.fromPartial(e)))||[],t.disc=e.disc?.map((e=>ba.fromPartial(e)))||[],t.review=e.review?.map((e=>e))||[],t.copyright=e.copyright?.map((e=>_a.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>Ea.fromPartial(e)))||[],t.related=e.related?.map((e=>Xr.fromPartial(e)))||[],t.salePeriod=e.salePeriod?.map((e=>xa.fromPartial(e)))||[],t.coverGroup=void 0!==e.coverGroup&&null!==e.coverGroup?va.fromPartial(e.coverGroup):void 0,t.originalTitle=e.originalTitle??"",t.versionTitle=e.versionTitle??"",t.typeStr=e.typeStr??"",t.visibilityBlock=e.visibilityBlock?.map((e=>Ra.fromPartial(e)))||[],t.earliestLiveTimestamp=e.earliestLiveTimestamp??"0",t.availability=e.availability?.map((e=>Ca.fromPartial(e)))||[],t.windowedTrack=e.windowedTrack?.map((e=>na.fromPartial(e)))||[],t.licensor=void 0!==e.licensor&&null!==e.licensor?oa.fromPartial(e.licensor):void 0,t.version=e.version??"0",t.feedGid=e.feedGid??"",t.deliveryId=e.deliveryId??"",t.localizedName=e.localizedName?.map((e=>Zr.fromPartial(e)))||[],t.indexVersion=e.indexVersion??"0",t.segmentBlockGid=e.segmentBlockGid?.map((e=>e))||[],t.courtesyLine=e.courtesyLine??"",t.title=e.title?.map((e=>ta.fromPartial(e)))||[],t.isMetadataHidden=e.isMetadataHidden??!1,t.canonicalUri=e.canonicalUri??"",t.artistWithRole=e.artistWithRole?.map((e=>aa.fromPartial(e)))||[],t.prereleaseConfig=void 0!==e.prereleaseConfig&&null!==e.prereleaseConfig?Oa.fromPartial(e.prereleaseConfig):void 0,t.labelId=e.labelId?.map((e=>Aa.fromPartial(e)))||[],t.implementationDetails=void 0!==e.implementationDetails&&null!==e.implementationDetails?ea.fromPartial(e.implementationDetails):void 0,t.releaseAdmin=e.releaseAdmin?.map((e=>La.fromPartial(e)))||[],t}};const ea={encode:(e,t=Bi().Writer.create())=>(void 0!==e.mediaType&&""!==e.mediaType&&t.uint32(10).string(e.mediaType),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={mediaType:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.mediaType=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({mediaType:Ua(e.mediaType)?globalThis.String(e.mediaType):""}),toJSON(e){const t={};return void 0!==e.mediaType&&""!==e.mediaType&&(t.mediaType=e.mediaType),t},create:e=>ea.fromPartial(e??{}),fromPartial(e){const t={mediaType:""};return t.mediaType=e.mediaType??"",t}};const ta={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={language:"",isDefault:!1,displayText:"",title:"",subtitle:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.language=i.string();continue;case 2:if(16!==e)break;r.isDefault=i.bool();continue;case 3:if(26!==e)break;r.displayText=i.string();continue;case 4:if(34!==e)break;r.title=i.string();continue;case 5:if(42!==e)break;r.subtitle=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({language:Ua(e.language)?globalThis.String(e.language):"",isDefault:!!Ua(e.isDefault)&&globalThis.Boolean(e.isDefault),displayText:Ua(e.displayText)?globalThis.String(e.displayText):"",title:Ua(e.title)?globalThis.String(e.title):"",subtitle:Ua(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=>ta.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 ia(){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 na={encode(e,t=Bi().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&&Xr.encode(e.album,t.uint32(26).fork()).ldelim();for(const i of e.artist)Qr.encode(i,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 i of e.externalId)Sa.encode(i,t.uint32(82).fork()).ldelim();for(const i of e.restriction)Ea.encode(i,t.uint32(90).fork()).ldelim();for(const i of e.file)Ia.encode(i,t.uint32(98).fork()).ldelim();for(const i of e.alternative)na.encode(i,t.uint32(106).fork()).ldelim();for(const i of e.salePeriod)xa.encode(i,t.uint32(114).fork()).ldelim();for(const i of e.preview)Ia.encode(i,t.uint32(122).fork()).ldelim();for(const i of e.tags)t.uint32(130).string(i);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 i of e.availability)Ca.encode(i,t.uint32(154).fork()).ldelim();for(const i of e.lyricsCountry)t.uint32(162).string(i);void 0!==e.licensor&&oa.encode(e.licensor,t.uint32(170).fork()).ldelim();for(const i of e.languageOfPerformance)t.uint32(178).string(i);for(const i of e.localizedName)Zr.encode(i,t.uint32(186).fork()).ldelim();void 0!==e.originalAudio&&ca.encode(e.originalAudio,t.uint32(194).fork()).ldelim();for(const i of e.contentRating)ka.encode(i,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 i of e.segmentBlockGid)t.uint32(250).bytes(i);for(const i of e.artistWithRole)aa.encode(i,t.uint32(258).fork()).ldelim();for(const i of e.title)ta.encode(i,t.uint32(266).fork()).ldelim();void 0!==e.isMetadataHidden&&!1!==e.isMetadataHidden&&t.uint32(272).bool(e.isMetadataHidden);for(const i of e.visibilityBlock)Ra.encode(i,t.uint32(282).fork()).ldelim();void 0!==e.canonicalUri&&""!==e.canonicalUri&&t.uint32(290).string(e.canonicalUri),void 0!==e.prereleaseConfig&&Pa.encode(e.prereleaseConfig,t.uint32(298).fork()).ldelim();for(const i of e.originalVideo)wa.encode(i,t.uint32(306).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=ia();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.gid=i.bytes();continue;case 2:if(18!==e)break;r.name=i.string();continue;case 3:if(26!==e)break;r.album=Xr.decode(i,i.uint32());continue;case 4:if(34!==e)break;r.artist.push(Qr.decode(i,i.uint32()));continue;case 5:if(40!==e)break;r.number=i.sint32();continue;case 6:if(48!==e)break;r.discNumber=i.sint32();continue;case 7:if(56!==e)break;r.duration=i.sint32();continue;case 8:if(64!==e)break;r.popularity=i.sint32();continue;case 9:if(72!==e)break;r.explicit=i.bool();continue;case 10:if(82!==e)break;r.externalId.push(Sa.decode(i,i.uint32()));continue;case 11:if(90!==e)break;r.restriction.push(Ea.decode(i,i.uint32()));continue;case 12:if(98!==e)break;r.file.push(Ia.decode(i,i.uint32()));continue;case 13:if(106!==e)break;r.alternative.push(na.decode(i,i.uint32()));continue;case 14:if(114!==e)break;r.salePeriod.push(xa.decode(i,i.uint32()));continue;case 15:if(122!==e)break;r.preview.push(Ia.decode(i,i.uint32()));continue;case 16:if(130!==e)break;r.tags.push(i.string());continue;case 17:if(136!==e)break;r.earliestLiveTimestamp=Ma(i.int64());continue;case 18:if(144!==e)break;r.hasLyrics=i.bool();continue;case 19:if(154!==e)break;r.availability.push(Ca.decode(i,i.uint32()));continue;case 20:if(162!==e)break;r.lyricsCountry.push(i.string());continue;case 21:if(170!==e)break;r.licensor=oa.decode(i,i.uint32());continue;case 22:if(178!==e)break;r.languageOfPerformance.push(i.string());continue;case 23:if(186!==e)break;r.localizedName.push(Zr.decode(i,i.uint32()));continue;case 24:if(194!==e)break;r.originalAudio=ca.decode(i,i.uint32());continue;case 25:if(202!==e)break;r.contentRating.push(ka.decode(i,i.uint32()));continue;case 26:if(208!==e)break;r.indexVersion=Ma(i.int64());continue;case 27:if(218!==e)break;r.originalTitle=i.string();continue;case 28:if(226!==e)break;r.versionTitle=i.string();continue;case 31:if(250!==e)break;r.segmentBlockGid.push(i.bytes());continue;case 32:if(258!==e)break;r.artistWithRole.push(aa.decode(i,i.uint32()));continue;case 33:if(266!==e)break;r.title.push(ta.decode(i,i.uint32()));continue;case 34:if(272!==e)break;r.isMetadataHidden=i.bool();continue;case 35:if(282!==e)break;r.visibilityBlock.push(Ra.decode(i,i.uint32()));continue;case 36:if(290!==e)break;r.canonicalUri=i.string();continue;case 37:if(298!==e)break;r.prereleaseConfig=Pa.decode(i,i.uint32());continue;case 38:if(306!==e)break;r.originalVideo.push(wa.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({gid:Ua(e.gid)?ja(e.gid):new Uint8Array(0),name:Ua(e.name)?globalThis.String(e.name):"",album:Ua(e.album)?Xr.fromJSON(e.album):void 0,artist:globalThis.Array.isArray(e?.artist)?e.artist.map((e=>Qr.fromJSON(e))):[],number:Ua(e.number)?globalThis.Number(e.number):0,discNumber:Ua(e.discNumber)?globalThis.Number(e.discNumber):0,duration:Ua(e.duration)?globalThis.Number(e.duration):0,popularity:Ua(e.popularity)?globalThis.Number(e.popularity):0,explicit:!!Ua(e.explicit)&&globalThis.Boolean(e.explicit),externalId:globalThis.Array.isArray(e?.externalId)?e.externalId.map((e=>Sa.fromJSON(e))):[],restriction:globalThis.Array.isArray(e?.restriction)?e.restriction.map((e=>Ea.fromJSON(e))):[],file:globalThis.Array.isArray(e?.file)?e.file.map((e=>Ia.fromJSON(e))):[],alternative:globalThis.Array.isArray(e?.alternative)?e.alternative.map((e=>na.fromJSON(e))):[],salePeriod:globalThis.Array.isArray(e?.salePeriod)?e.salePeriod.map((e=>xa.fromJSON(e))):[],preview:globalThis.Array.isArray(e?.preview)?e.preview.map((e=>Ia.fromJSON(e))):[],tags:globalThis.Array.isArray(e?.tags)?e.tags.map((e=>globalThis.String(e))):[],earliestLiveTimestamp:Ua(e.earliestLiveTimestamp)?globalThis.String(e.earliestLiveTimestamp):"0",hasLyrics:!!Ua(e.hasLyrics)&&globalThis.Boolean(e.hasLyrics),availability:globalThis.Array.isArray(e?.availability)?e.availability.map((e=>Ca.fromJSON(e))):[],lyricsCountry:globalThis.Array.isArray(e?.lyricsCountry)?e.lyricsCountry.map((e=>globalThis.String(e))):[],licensor:Ua(e.licensor)?oa.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=>Zr.fromJSON(e))):[],originalAudio:Ua(e.originalAudio)?ca.fromJSON(e.originalAudio):void 0,contentRating:globalThis.Array.isArray(e?.contentRating)?e.contentRating.map((e=>ka.fromJSON(e))):[],indexVersion:Ua(e.indexVersion)?globalThis.String(e.indexVersion):"0",originalTitle:Ua(e.originalTitle)?globalThis.String(e.originalTitle):"",versionTitle:Ua(e.versionTitle)?globalThis.String(e.versionTitle):"",segmentBlockGid:globalThis.Array.isArray(e?.segmentBlockGid)?e.segmentBlockGid.map((e=>ja(e))):[],artistWithRole:globalThis.Array.isArray(e?.artistWithRole)?e.artistWithRole.map((e=>aa.fromJSON(e))):[],title:globalThis.Array.isArray(e?.title)?e.title.map((e=>ta.fromJSON(e))):[],isMetadataHidden:!!Ua(e.isMetadataHidden)&&globalThis.Boolean(e.isMetadataHidden),visibilityBlock:globalThis.Array.isArray(e?.visibilityBlock)?e.visibilityBlock.map((e=>Ra.fromJSON(e))):[],canonicalUri:Ua(e.canonicalUri)?globalThis.String(e.canonicalUri):"",prereleaseConfig:Ua(e.prereleaseConfig)?Pa.fromJSON(e.prereleaseConfig):void 0,originalVideo:globalThis.Array.isArray(e?.originalVideo)?e.originalVideo.map((e=>wa.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.gid&&0!==e.gid.length&&(t.gid=Da(e.gid)),void 0!==e.name&&""!==e.name&&(t.name=e.name),void 0!==e.album&&(t.album=Xr.toJSON(e.album)),e.artist?.length&&(t.artist=e.artist.map((e=>Qr.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=>Sa.toJSON(e)))),e.restriction?.length&&(t.restriction=e.restriction.map((e=>Ea.toJSON(e)))),e.file?.length&&(t.file=e.file.map((e=>Ia.toJSON(e)))),e.alternative?.length&&(t.alternative=e.alternative.map((e=>na.toJSON(e)))),e.salePeriod?.length&&(t.salePeriod=e.salePeriod.map((e=>xa.toJSON(e)))),e.preview?.length&&(t.preview=e.preview.map((e=>Ia.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=>Ca.toJSON(e)))),e.lyricsCountry?.length&&(t.lyricsCountry=e.lyricsCountry),void 0!==e.licensor&&(t.licensor=oa.toJSON(e.licensor)),e.languageOfPerformance?.length&&(t.languageOfPerformance=e.languageOfPerformance),e.localizedName?.length&&(t.localizedName=e.localizedName.map((e=>Zr.toJSON(e)))),void 0!==e.originalAudio&&(t.originalAudio=ca.toJSON(e.originalAudio)),e.contentRating?.length&&(t.contentRating=e.contentRating.map((e=>ka.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=>Da(e)))),e.artistWithRole?.length&&(t.artistWithRole=e.artistWithRole.map((e=>aa.toJSON(e)))),e.title?.length&&(t.title=e.title.map((e=>ta.toJSON(e)))),void 0!==e.isMetadataHidden&&!1!==e.isMetadataHidden&&(t.isMetadataHidden=e.isMetadataHidden),e.visibilityBlock?.length&&(t.visibilityBlock=e.visibilityBlock.map((e=>Ra.toJSON(e)))),void 0!==e.canonicalUri&&""!==e.canonicalUri&&(t.canonicalUri=e.canonicalUri),void 0!==e.prereleaseConfig&&(t.prereleaseConfig=Pa.toJSON(e.prereleaseConfig)),e.originalVideo?.length&&(t.originalVideo=e.originalVideo.map((e=>wa.toJSON(e)))),t},create:e=>na.fromPartial(e??{}),fromPartial(e){const t=ia();return t.gid=e.gid??new Uint8Array(0),t.name=e.name??"",t.album=void 0!==e.album&&null!==e.album?Xr.fromPartial(e.album):void 0,t.artist=e.artist?.map((e=>Qr.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=>Sa.fromPartial(e)))||[],t.restriction=e.restriction?.map((e=>Ea.fromPartial(e)))||[],t.file=e.file?.map((e=>Ia.fromPartial(e)))||[],t.alternative=e.alternative?.map((e=>na.fromPartial(e)))||[],t.salePeriod=e.salePeriod?.map((e=>xa.fromPartial(e)))||[],t.preview=e.preview?.map((e=>Ia.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=>Ca.fromPartial(e)))||[],t.lyricsCountry=e.lyricsCountry?.map((e=>e))||[],t.licensor=void 0!==e.licensor&&null!==e.licensor?oa.fromPartial(e.licensor):void 0,t.languageOfPerformance=e.languageOfPerformance?.map((e=>e))||[],t.localizedName=e.localizedName?.map((e=>Zr.fromPartial(e)))||[],t.originalAudio=void 0!==e.originalAudio&&null!==e.originalAudio?ca.fromPartial(e.originalAudio):void 0,t.contentRating=e.contentRating?.map((e=>ka.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=>aa.fromPartial(e)))||[],t.title=e.title?.map((e=>ta.fromPartial(e)))||[],t.isMetadataHidden=e.isMetadataHidden??!1,t.visibilityBlock=e.visibilityBlock?.map((e=>Ra.fromPartial(e)))||[],t.canonicalUri=e.canonicalUri??"",t.prereleaseConfig=void 0!==e.prereleaseConfig&&null!==e.prereleaseConfig?Pa.fromPartial(e.prereleaseConfig):void 0,t.originalVideo=e.originalVideo?.map((e=>wa.fromPartial(e)))||[],t}};function ra(){return{artistGid:new Uint8Array(0),artistName:"",role:0,localizedName:[]}}const aa={encode(e,t=Bi().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 i of e.localizedName)Zr.encode(i,t.uint32(34).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=ra();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.artistGid=i.bytes();continue;case 2:if(18!==e)break;r.artistName=i.string();continue;case 3:if(24!==e)break;r.role=i.int32();continue;case 4:if(34!==e)break;r.localizedName.push(Zr.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({artistGid:Ua(e.artistGid)?ja(e.artistGid):new Uint8Array(0),artistName:Ua(e.artistName)?globalThis.String(e.artistName):"",role:Ua(e.role)?Mr(e.role):0,localizedName:globalThis.Array.isArray(e?.localizedName)?e.localizedName.map((e=>Zr.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.artistGid&&0!==e.artistGid.length&&(t.artistGid=Da(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 Dr.ARTIST_ROLE_UNKNOWN:return"ARTIST_ROLE_UNKNOWN";case Dr.ARTIST_ROLE_MAIN_ARTIST:return"ARTIST_ROLE_MAIN_ARTIST";case Dr.ARTIST_ROLE_FEATURED_ARTIST:return"ARTIST_ROLE_FEATURED_ARTIST";case Dr.ARTIST_ROLE_REMIXER:return"ARTIST_ROLE_REMIXER";case Dr.ARTIST_ROLE_ACTOR:return"ARTIST_ROLE_ACTOR";case Dr.ARTIST_ROLE_COMPOSER:return"ARTIST_ROLE_COMPOSER";case Dr.ARTIST_ROLE_CONDUCTOR:return"ARTIST_ROLE_CONDUCTOR";case Dr.ARTIST_ROLE_ORCHESTRA:return"ARTIST_ROLE_ORCHESTRA";case Dr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.role)),e.localizedName?.length&&(t.localizedName=e.localizedName.map((e=>Zr.toJSON(e)))),t},create:e=>aa.fromPartial(e??{}),fromPartial(e){const t=ra();return t.artistGid=e.artistGid??new Uint8Array(0),t.artistName=e.artistName??"",t.role=e.role??0,t.localizedName=e.localizedName?.map((e=>Zr.fromPartial(e)))||[],t}};function sa(){return{uuid:new Uint8Array(0)}}const oa={encode:(e,t=Bi().Writer.create())=>(void 0!==e.uuid&&0!==e.uuid.length&&t.uint32(10).bytes(e.uuid),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=sa();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uuid=i.bytes();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({uuid:Ua(e.uuid)?ja(e.uuid):new Uint8Array(0)}),toJSON(e){const t={};return void 0!==e.uuid&&0!==e.uuid.length&&(t.uuid=Da(e.uuid)),t},create:e=>oa.fromPartial(e??{}),fromPartial(e){const t=sa();return t.uuid=e.uuid??new Uint8Array(0),t}};function la(){return{uuid:new Uint8Array(0)}}const ca={encode:(e,t=Bi().Writer.create())=>(void 0!==e.uuid&&0!==e.uuid.length&&t.uint32(10).bytes(e.uuid),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=la();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.uuid=i.bytes();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({uuid:Ua(e.uuid)?ja(e.uuid):new Uint8Array(0)}),toJSON(e){const t={};return void 0!==e.uuid&&0!==e.uuid.length&&(t.uuid=Da(e.uuid)),t},create:e=>ca.fromPartial(e??{}),fromPartial(e){const t=la();return t.uuid=e.uuid??new Uint8Array(0),t}};const ua={encode(e,t=Bi().Writer.create()){void 0!==e.country&&""!==e.country&&t.uint32(10).string(e.country);for(const i of e.track)na.encode(i,t.uint32(18).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={country:"",track:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.country=i.string();continue;case 2:if(18!==e)break;r.track.push(na.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({country:Ua(e.country)?globalThis.String(e.country):"",track:globalThis.Array.isArray(e?.track)?e.track.map((e=>na.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=>na.toJSON(e)))),t},create:e=>ua.fromPartial(e??{}),fromPartial(e){const t={country:"",track:[]};return t.country=e.country??"",t.track=e.track?.map((e=>na.fromPartial(e)))||[],t}};const da={encode(e,t=Bi().Writer.create()){for(const i of e.country)t.uint32(10).string(i);for(const i of e.track)na.encode(i,t.uint32(18).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={country:[],track:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.country.push(i.string());continue;case 2:if(18!==e)break;r.track.push(na.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.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=>na.fromJSON(e))):[]}),toJSON(e){const t={};return e.country?.length&&(t.country=e.country),e.track?.length&&(t.track=e.track.map((e=>na.toJSON(e)))),t},create:e=>da.fromPartial(e??{}),fromPartial(e){const t={country:[],track:[]};return t.country=e.country?.map((e=>e))||[],t.track=e.track?.map((e=>na.fromPartial(e)))||[],t}};const ma={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={startYear:0,endYear:0,decade:0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.startYear=i.sint32();continue;case 2:if(16!==e)break;r.endYear=i.sint32();continue;case 3:if(24!==e)break;r.decade=i.sint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({startYear:Ua(e.startYear)?globalThis.Number(e.startYear):0,endYear:Ua(e.endYear)?globalThis.Number(e.endYear):0,decade:Ua(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=>ma.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 pa={encode(e,t=Bi().Writer.create()){for(const i of e.album)Xr.encode(i,t.uint32(10).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={album:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.album.push(Xr.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({album:globalThis.Array.isArray(e?.album)?e.album.map((e=>Xr.fromJSON(e))):[]}),toJSON(e){const t={};return e.album?.length&&(t.album=e.album.map((e=>Xr.toJSON(e)))),t},create:e=>pa.fromPartial(e??{}),fromPartial(e){const t={album:[]};return t.album=e.album?.map((e=>Xr.fromPartial(e)))||[],t}};const ha={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={year:0,month:0,day:0,hour:0,minute:0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.year=i.sint32();continue;case 2:if(16!==e)break;r.month=i.sint32();continue;case 3:if(24!==e)break;r.day=i.sint32();continue;case 4:if(32!==e)break;r.hour=i.sint32();continue;case 5:if(40!==e)break;r.minute=i.sint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({year:Ua(e.year)?globalThis.Number(e.year):0,month:Ua(e.month)?globalThis.Number(e.month):0,day:Ua(e.day)?globalThis.Number(e.day):0,hour:Ua(e.hour)?globalThis.Number(e.hour):0,minute:Ua(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=>ha.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 ga(){return{fileId:new Uint8Array(0),size:0,width:0,height:0}}const fa={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=ga();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=i.bytes();continue;case 2:if(16!==e)break;r.size=i.int32();continue;case 3:if(24!==e)break;r.width=i.sint32();continue;case 4:if(32!==e)break;r.height=i.sint32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({fileId:Ua(e.fileId)?ja(e.fileId):new Uint8Array(0),size:Ua(e.size)?Br(e.size):0,width:Ua(e.width)?globalThis.Number(e.width):0,height:Ua(e.height)?globalThis.Number(e.height):0}),toJSON(e){const t={};return void 0!==e.fileId&&0!==e.fileId.length&&(t.fileId=Da(e.fileId)),void 0!==e.size&&0!==e.size&&(t.size=function(e){switch(e){case Ur.DEFAULT:return"DEFAULT";case Ur.SMALL:return"SMALL";case Ur.LARGE:return"LARGE";case Ur.XLARGE:return"XLARGE";case Ur.XXLARGE:return"XXLARGE";case Ur.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=>fa.fromPartial(e??{}),fromPartial(e){const t=ga();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 va={encode(e,t=Bi().Writer.create()){for(const i of e.image)fa.encode(i,t.uint32(10).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={image:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.image.push(fa.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({image:globalThis.Array.isArray(e?.image)?e.image.map((e=>fa.fromJSON(e))):[]}),toJSON(e){const t={};return e.image?.length&&(t.image=e.image.map((e=>fa.toJSON(e)))),t},create:e=>va.fromPartial(e??{}),fromPartial(e){const t={image:[]};return t.image=e.image?.map((e=>fa.fromPartial(e)))||[],t}};const ya={encode(e,t=Bi().Writer.create()){void 0!==e.text&&""!==e.text&&t.uint32(10).string(e.text);for(const i of e.portrait)fa.encode(i,t.uint32(18).fork()).ldelim();for(const i of e.portraitGroup)va.encode(i,t.uint32(26).fork()).ldelim();for(const i of e.localizedText)Zr.encode(i,t.uint32(34).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={text:"",portrait:[],portraitGroup:[],localizedText:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.text=i.string();continue;case 2:if(18!==e)break;r.portrait.push(fa.decode(i,i.uint32()));continue;case 3:if(26!==e)break;r.portraitGroup.push(va.decode(i,i.uint32()));continue;case 4:if(34!==e)break;r.localizedText.push(Zr.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({text:Ua(e.text)?globalThis.String(e.text):"",portrait:globalThis.Array.isArray(e?.portrait)?e.portrait.map((e=>fa.fromJSON(e))):[],portraitGroup:globalThis.Array.isArray(e?.portraitGroup)?e.portraitGroup.map((e=>va.fromJSON(e))):[],localizedText:globalThis.Array.isArray(e?.localizedText)?e.localizedText.map((e=>Zr.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=>fa.toJSON(e)))),e.portraitGroup?.length&&(t.portraitGroup=e.portraitGroup.map((e=>va.toJSON(e)))),e.localizedText?.length&&(t.localizedText=e.localizedText.map((e=>Zr.toJSON(e)))),t},create:e=>ya.fromPartial(e??{}),fromPartial(e){const t={text:"",portrait:[],portraitGroup:[],localizedText:[]};return t.text=e.text??"",t.portrait=e.portrait?.map((e=>fa.fromPartial(e)))||[],t.portraitGroup=e.portraitGroup?.map((e=>va.fromPartial(e)))||[],t.localizedText=e.localizedText?.map((e=>Zr.fromPartial(e)))||[],t}};const ba={encode(e,t=Bi().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 i of e.track)na.encode(i,t.uint32(26).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={number:0,name:"",track:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.number=i.sint32();continue;case 2:if(18!==e)break;r.name=i.string();continue;case 3:if(26!==e)break;r.track.push(na.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({number:Ua(e.number)?globalThis.Number(e.number):0,name:Ua(e.name)?globalThis.String(e.name):"",track:globalThis.Array.isArray(e?.track)?e.track.map((e=>na.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=>na.toJSON(e)))),t},create:e=>ba.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=>na.fromPartial(e)))||[],t}};const _a={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={type:0,text:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.type=i.int32();continue;case 2:if(18!==e)break;r.text=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({type:Ua(e.type)?Hr(e.type):0,text:Ua(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 Fr.P:return"P";case Fr.C:return"C";case Fr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),void 0!==e.text&&""!==e.text&&(t.text=e.text),t},create:e=>_a.fromPartial(e??{}),fromPartial(e){const t={type:0,text:""};return t.type=e.type??0,t.text=e.text??"",t}};const Ea={encode(e,t=Bi().Writer.create()){t.uint32(10).fork();for(const i of e.catalogue)t.int32(i);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 i of e.catalogueStr)t.uint32(42).string(i);return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={catalogue:[],countriesAllowed:void 0,countriesForbidden:void 0,type:0,catalogueStr:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8===e){r.catalogue.push(i.int32());continue}if(10===e){const e=i.uint32()+i.pos;for(;i.pos<e;)r.catalogue.push(i.int32());continue}break;case 2:if(18!==e)break;r.countriesAllowed=i.string();continue;case 3:if(26!==e)break;r.countriesForbidden=i.string();continue;case 4:if(32!==e)break;r.type=i.int32();continue;case 5:if(42!==e)break;r.catalogueStr.push(i.string());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({catalogue:globalThis.Array.isArray(e?.catalogue)?e.catalogue.map((e=>function(e){switch(e){case 0:case"AD":return Vr.AD;case 1:case"SUBSCRIPTION":return Vr.SUBSCRIPTION;case 2:case"CATALOGUE_ALL":return Vr.CATALOGUE_ALL;case 3:case"SHUFFLE":return Vr.SHUFFLE;case 4:case"COMMERCIAL":return Vr.COMMERCIAL;default:return Vr.UNRECOGNIZED}}(e))):[],countriesAllowed:Ua(e.countriesAllowed)?globalThis.String(e.countriesAllowed):void 0,countriesForbidden:Ua(e.countriesForbidden)?globalThis.String(e.countriesForbidden):void 0,type:Ua(e.type)?zr(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 Vr.AD:return"AD";case Vr.SUBSCRIPTION:return"SUBSCRIPTION";case Vr.CATALOGUE_ALL:return"CATALOGUE_ALL";case Vr.SHUFFLE:return"SHUFFLE";case Vr.COMMERCIAL:return"COMMERCIAL";case Vr.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 Gr.STREAMING:return"STREAMING";case Gr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),e.catalogueStr?.length&&(t.catalogueStr=e.catalogueStr),t},create:e=>Ea.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 Ca={encode(e,t=Bi().Writer.create()){for(const i of e.catalogueStr)t.uint32(10).string(i);return void 0!==e.start&&ha.encode(e.start,t.uint32(18).fork()).ldelim(),t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={catalogueStr:[],start:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.catalogueStr.push(i.string());continue;case 2:if(18!==e)break;r.start=ha.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({catalogueStr:globalThis.Array.isArray(e?.catalogueStr)?e.catalogueStr.map((e=>globalThis.String(e))):[],start:Ua(e.start)?ha.fromJSON(e.start):void 0}),toJSON(e){const t={};return e.catalogueStr?.length&&(t.catalogueStr=e.catalogueStr),void 0!==e.start&&(t.start=ha.toJSON(e.start)),t},create:e=>Ca.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?ha.fromPartial(e.start):void 0,t}};const xa={encode(e,t=Bi().Writer.create()){for(const i of e.restriction)Ea.encode(i,t.uint32(10).fork()).ldelim();return void 0!==e.start&&ha.encode(e.start,t.uint32(18).fork()).ldelim(),void 0!==e.end&&ha.encode(e.end,t.uint32(26).fork()).ldelim(),t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={restriction:[],start:void 0,end:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.restriction.push(Ea.decode(i,i.uint32()));continue;case 2:if(18!==e)break;r.start=ha.decode(i,i.uint32());continue;case 3:if(26!==e)break;r.end=ha.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({restriction:globalThis.Array.isArray(e?.restriction)?e.restriction.map((e=>Ea.fromJSON(e))):[],start:Ua(e.start)?ha.fromJSON(e.start):void 0,end:Ua(e.end)?ha.fromJSON(e.end):void 0}),toJSON(e){const t={};return e.restriction?.length&&(t.restriction=e.restriction.map((e=>Ea.toJSON(e)))),void 0!==e.start&&(t.start=ha.toJSON(e.start)),void 0!==e.end&&(t.end=ha.toJSON(e.end)),t},create:e=>xa.fromPartial(e??{}),fromPartial(e){const t={restriction:[],start:void 0,end:void 0};return t.restriction=e.restriction?.map((e=>Ea.fromPartial(e)))||[],t.start=void 0!==e.start&&null!==e.start?ha.fromPartial(e.start):void 0,t.end=void 0!==e.end&&null!==e.end?ha.fromPartial(e.end):void 0,t}};const Sa={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={type:"",id:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.type=i.string();continue;case 2:if(18!==e)break;r.id=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({type:Ua(e.type)?globalThis.String(e.type):"",id:Ua(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=>Sa.fromPartial(e??{}),fromPartial(e){const t={type:"",id:""};return t.type=e.type??"",t.id=e.id??"",t}};const Aa={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={type:"",value:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.type=i.string();continue;case 2:if(18!==e)break;r.value=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({type:Ua(e.type)?globalThis.String(e.type):"",value:Ua(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=>Aa.fromPartial(e??{}),fromPartial(e){const t={type:"",value:""};return t.type=e.type??"",t.value=e.value??"",t}};function Ta(){return{fileId:new Uint8Array(0),format:0}}const Ia={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=Ta();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.fileId=i.bytes();continue;case 2:if(16!==e)break;r.format=i.int32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({fileId:Ua(e.fileId)?ja(e.fileId):new Uint8Array(0),format:Ua(e.format)?Kr(e.format):0}),toJSON(e){const t={};return void 0!==e.fileId&&0!==e.fileId.length&&(t.fileId=Da(e.fileId)),void 0!==e.format&&0!==e.format&&(t.format=function(e){switch(e){case Wr.OGG_VORBIS_96:return"OGG_VORBIS_96";case Wr.OGG_VORBIS_160:return"OGG_VORBIS_160";case Wr.OGG_VORBIS_320:return"OGG_VORBIS_320";case Wr.MP3_256:return"MP3_256";case Wr.MP3_320:return"MP3_320";case Wr.MP3_160:return"MP3_160";case Wr.MP3_96:return"MP3_96";case Wr.MP3_160_ENC:return"MP3_160_ENC";case Wr.AAC_24:return"AAC_24";case Wr.AAC_48:return"AAC_48";case Wr.MP4_128:return"MP4_128";case Wr.MP4_256:return"MP4_256";case Wr.MP4_128_DUAL:return"MP4_128_DUAL";case Wr.MP4_256_DUAL:return"MP4_256_DUAL";case Wr.MP4_128_CBCS:return"MP4_128_CBCS";case Wr.MP4_256_CBCS:return"MP4_256_CBCS";case Wr.FLAC_FLAC:return"FLAC_FLAC";case Wr.MP4_FLAC:return"MP4_FLAC";case Wr.XHE_AAC_24:return"XHE_AAC_24";case Wr.XHE_AAC_16:return"XHE_AAC_16";case Wr.XHE_AAC_12:return"XHE_AAC_12";case Wr.HE_AAC_64:return"HE_AAC_64";case Wr.FLAC_FLAC_24BIT:return"FLAC_FLAC_24BIT";case Wr.MP4_FLAC_24BIT:return"MP4_FLAC_24BIT";case Wr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.format)),t},create:e=>Ia.fromPartial(e??{}),fromPartial(e){const t=Ta();return t.fileId=e.fileId??new Uint8Array(0),t.format=e.format??0,t}};function Na(){return{gid:new Uint8Array(0)}}const wa={encode:(e,t=Bi().Writer.create())=>(void 0!==e.gid&&0!==e.gid.length&&t.uint32(10).bytes(e.gid),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r=Na();for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.gid=i.bytes();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({gid:Ua(e.gid)?ja(e.gid):new Uint8Array(0)}),toJSON(e){const t={};return void 0!==e.gid&&0!==e.gid.length&&(t.gid=Da(e.gid)),t},create:e=>wa.fromPartial(e??{}),fromPartial(e){const t=Na();return t.gid=e.gid??new Uint8Array(0),t}};const Ra={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={countries:"",type:0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.countries=i.string();continue;case 2:if(16!==e)break;r.type=i.int32();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({countries:Ua(e.countries)?globalThis.String(e.countries):"",type:Ua(e.type)?qr(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 Yr.TOTAL:return"TOTAL";case Yr.COVERARTCP:return"COVERARTCP";case Yr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.type)),t},create:e=>Ra.fromPartial(e??{}),fromPartial(e){const t={countries:"",type:0};return t.countries=e.countries??"",t.type=e.type??0,t}};const ka={encode(e,t=Bi().Writer.create()){void 0!==e.country&&""!==e.country&&t.uint32(10).string(e.country);for(const i of e.tag)t.uint32(18).string(i);return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={country:"",tag:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.country=i.string();continue;case 2:if(18!==e)break;r.tag.push(i.string());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({country:Ua(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=>ka.fromPartial(e??{}),fromPartial(e){const t={country:"",tag:[]};return t.country=e.country??"",t.tag=e.tag?.map((e=>e))||[],t}};const Oa={encode:(e,t=Bi().Writer.create())=>(void 0!==e.earliestRevealDate&&ha.encode(e.earliestRevealDate,t.uint32(10).fork()).ldelim(),void 0!==e.earliestCoverartRevealDate&&ha.encode(e.earliestCoverartRevealDate,t.uint32(18).fork()).ldelim(),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={earliestRevealDate:void 0,earliestCoverartRevealDate:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.earliestRevealDate=ha.decode(i,i.uint32());continue;case 2:if(18!==e)break;r.earliestCoverartRevealDate=ha.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({earliestRevealDate:Ua(e.earliestRevealDate)?ha.fromJSON(e.earliestRevealDate):void 0,earliestCoverartRevealDate:Ua(e.earliestCoverartRevealDate)?ha.fromJSON(e.earliestCoverartRevealDate):void 0}),toJSON(e){const t={};return void 0!==e.earliestRevealDate&&(t.earliestRevealDate=ha.toJSON(e.earliestRevealDate)),void 0!==e.earliestCoverartRevealDate&&(t.earliestCoverartRevealDate=ha.toJSON(e.earliestCoverartRevealDate)),t},create:e=>Oa.fromPartial(e??{}),fromPartial(e){const t={earliestRevealDate:void 0,earliestCoverartRevealDate:void 0};return t.earliestRevealDate=void 0!==e.earliestRevealDate&&null!==e.earliestRevealDate?ha.fromPartial(e.earliestRevealDate):void 0,t.earliestCoverartRevealDate=void 0!==e.earliestCoverartRevealDate&&null!==e.earliestCoverartRevealDate?ha.fromPartial(e.earliestCoverartRevealDate):void 0,t}};const Pa={encode:(e,t=Bi().Writer.create())=>(void 0!==e.earliestRevealDate&&ha.encode(e.earliestRevealDate,t.uint32(10).fork()).ldelim(),t),decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={earliestRevealDate:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.earliestRevealDate=ha.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({earliestRevealDate:Ua(e.earliestRevealDate)?ha.fromJSON(e.earliestRevealDate):void 0}),toJSON(e){const t={};return void 0!==e.earliestRevealDate&&(t.earliestRevealDate=ha.toJSON(e.earliestRevealDate)),t},create:e=>Pa.fromPartial(e??{}),fromPartial(e){const t={earliestRevealDate:void 0};return t.earliestRevealDate=void 0!==e.earliestRevealDate&&null!==e.earliestRevealDate?ha.fromPartial(e.earliestRevealDate):void 0,t}};const La={encode(e,t=Bi().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 i of e.systemDescription)t.uint32(26).string(i);return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={releaseAdminId:"",personnelDescription:"",systemDescription:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.releaseAdminId=i.string();continue;case 2:if(18!==e)break;r.personnelDescription=i.string();continue;case 3:if(26!==e)break;r.systemDescription.push(i.string());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},fromJSON:e=>({releaseAdminId:Ua(e.releaseAdminId)?globalThis.String(e.releaseAdminId):"",personnelDescription:Ua(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=>La.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 ja(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),i=new Uint8Array(t.length);for(let e=0;e<t.length;++e)i[e]=t.charCodeAt(e);return i}}function Da(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(""))}}function Ma(e){return e.toString()}function Ua(e){return null!=e}Bi().util.Long!==ki.A&&(Bi().util.Long=ki.A,Bi().configure());const Ba={encode(e,t=Bi().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 i of e.loudness)t.int32(i);return t.ldelim(),t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={startMs:0,periodMs:0,loudness:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.startMs=i.int32();continue;case 2:if(16!==e)break;r.periodMs=i.int32();continue;case 3:if(24===e){r.loudness.push(i.int32());continue}if(26===e){const e=i.uint32()+i.pos;for(;i.pos<e;)r.loudness.push(i.int32());continue}}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Ba.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}};const Fa={encode(e,t=Bi().Writer.create()){for(const i of e.cuepoints)Ha.encode(i,t.uint32(10).fork()).ldelim();return t},decode(e,t){const i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={cuepoints:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;r.cuepoints.push(Ha.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Fa.fromPartial(e??{}),fromPartial(e){const t={cuepoints:[]};return t.cuepoints=e.cuepoints?.map((e=>Ha.fromPartial(e)))||[],t}};const Ha={encode:(e,t=Bi().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 i=e instanceof Bi().Reader?e:Bi().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const r={positionMs:0,bpm:0,type:0,best:!1};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;r.positionMs=i.int32();continue;case 2:if(16!==e)break;r.bpm=i.int32();continue;case 3:if(24!==e)break;r.type=i.int32();continue;case 4:if(32!==e)break;r.best=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return r},create:e=>Ha.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}};function Va(e){const t={};return e.forEach((e=>{switch(e.extensionKind){case Mi.PODCAST_SUBSCRIPTIONS:t.podcastSubscription=Hi.decode(e.data);break;case Mi.SHOW_ACCESS:t.showAccess=Vi.Cb.decode(e.data);break;case Mi.SHOW_V4:t.showV4=Hn.decode(e.data);break;case Mi.PLAYABILITY:t.playability=or.decode(e.data);break;case Mi.COVER_IMAGE:t.coverImage=lr.decode(e.data);break;case Mi.AUDIOBOOK_GENRE:t.audiobookGenres=mr.decode(e.data);break;case Mi.AUDIOBOOK_SPECIFICS:t.audiobookSpecifics=Wi.decode(e.data);break;case Mi.PODCAST_TOPICS:t.podcastTopics=nn.decode(e.data);break;case Mi.PODCAST_SEGMENTS:t.podcastSegments=mn.decode(e.data);break;case Mi.HTML_DESCRIPTION:t.htmlDescription=on.decode(e.data);break;case Mi.PODCAST_RATING:t.rating=Cn.decode(e.data);break;case Mi.CONTENT_WARNING:t.contentInformation=Xi.decode(e.data);break;case Mi.EPISODE_TRANSCRIPTS:t.transcripts=vn.decode(e.data);break;case Mi.AUDIOBOOK_PRICE:t.audiobookPrice=Mn.ZC.decode(e.data);break;case Mi.SMART_SHUFFLE:t.smartShuffle=Un.decode(e.data);break;case Mi.AUDIOBOOK_RELATIONS:t.audiobookRelation=pr.decode(e.data);break;case Mi.VIDEO_ASSOCIATIONS:t.videoAssociations=fr.decode(e.data);break;case Mi.PRERELEASE:t.prerelease=kn.decode(e.data);break;case Mi.PLAYLIST_TUNER:t.playlistTuner=Tr.decode(e.data);break;case Mi.CONCEPT:t.concept=Rr.decode(e.data);break;case Mi.TRACK_V4:t.track=na.decode(e.data);break;case Mi.LIST_TUNER_AUDIO_ANALYSIS:t.listTunerAudioAnalysis=Ba.decode(e.data);break;case Mi.LIST_TUNER_CUEPOINTS:t.listTunerCuepoints=Fa.decode(e.data)}})),t}var Ga=i(56709),za=i(86076),Wa=i(3986),Ka=i(83140);function Ya(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 qa(e){return e.some((e=>e.folder?qa(e.folder.entity):e.playlist?.isLoading||e.playlist?.numberOfItemsPerLinkType.some((e=>e.numItems>0))))}function Za(e){return void 0!==e&&e>0?function(e){return new Date(1e3*e)}(e).toISOString():null}function $a(e){return Za(e?Number(e):void 0)}function Qa(e){return{milliseconds:1e3*e}}function Ja(e,t){return e?t===e?null:$a(e):null}function Xa(e){return e?[{url:e,width:300,height:300}]:[]}function es(e){const t=e.entityInfo?.pinnable;switch(t){case Ai.ID.YES:return Di.oT.YES;case Ai.ID.NO_IN_FOLDER:return Di.oT.NO_IN_FOLDER;case Ai.ID.UNRECOGNIZED:default:return Di.oT.NO}}function ts(e){return{type:He.c.ARTIST,uri:e.link,name:e.name}}function is(e){return{type:He.c.ALBUM,name:e.entityInfo?.name??"",artists:e.album?.artistName?[{type:He.c.ARTIST,name:e.album?.artistName,uri:e.album?.artistUri??""}]:[],images:Xa(e.entityInfo?.imageUri),uri:e.entityInfo?.uri??"",pinned:e.entityInfo?.pinned??!1,addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:es(e),isPremiumOnly:e.album?.isPremiumOnly??!1}}function ns(e){return{name:e.entityInfo?.name??"",images:Xa(e.entityInfo?.imageUri),uri:e.entityInfo?.uri??"",pinned:e.entityInfo?.pinned??!1,addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:es(e)}}function rs(e){if(!function(e){return!!e.prerelease}(e))throw new Error("Invalid collection Esperanto prerelease response!");return e.prerelease.type===Ai.O4.ALBUM?function(e){return{...ns(e),type:He.c.PRE_RELEASE_ALBUM,artists:e.prerelease.artistName?[{type:He.c.ARTIST,name:e.prerelease.artistName,uri:e.prerelease.artistUri??""}]:[]}}(e):function(e){return{...ns(e),type:He.c.PRE_RELEASE_BOOK,authorName:e.prerelease.artistName??""}}(e)}function as(e){return{type:He.c.ARTIST,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",images:Xa(e.entityInfo?.imageUri),pinned:e.entityInfo?.pinned??!1,addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:es(e)}}function ss(e){return{type:He.c.SHOW,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",publisher:e.show?.creatorName??"",images:Xa(e.entityInfo?.imageUri)}}function os(e,t){let i=ji.M.Unknown;return i=t.isPlayed?ji.M.Completed:t.timeLeft<e.length?ji.M.InProgress:ji.M.NotStarted,{timeLeft:Qa(t.timeLeft),state:i}}function ls(e,t){let i={};e.extension&&(i=Va(e.extension));const n=e.show;return{type:He.c.EPISODE,uri:e.link,name:e.name,description:e.description,duration:Qa(e.length),playedState:os(e,t),images:Ya(e.covers),isExplicit:e.isExplicit,languages:[e.language],release:{date:new Date(1e3*Number(e.publishDate)).toISOString(),precision:"day"},podcastSubscription:{isPaywalled:i.podcastSubscription?.isPaywalled??!1,isUserSubscribed:i.podcastSubscription?.isUserSubscribed??!1},show:{type:He.c.SHOW,uri:n.link,name:n.name,publisher:n.publisher,images:Ya(n.covers),mediaType:Li.Q.UNKNOWN},isPlayable:t.isPlayable,is19PlusOnly:e.is19PlusOnly}}function cs(e){if(void 0===e.episodeMetadata||void 0===e.episodePlayedState)throw new Error("Invalid listen-later cosmos response!");return{...ls(e.episodeMetadata,e.episodePlayedState)}}function us(e){return{type:He.c.ARTIST,uri:e.link,name:e.name}}function ds(e){const t=e.albumMetadata?.artists.at(0);return{type:He.c.ALBUM,uri:e.albumMetadata?.link??"",name:e.albumMetadata?.name??"",artist:t&&ts(t),images:Ya(e.albumMetadata?.covers)}}function ms(e,t,i){return{type:He.c.TRACK,uri:e.link,name:e.name,duration:Qa(e.length),album:ds(i),artists:e.artist.map(us),discNumber:e.discNumber,trackNumber:e.trackNumber,isExplicit:e.isExplicit,isPlayable:t.isPlayable,isLocal:e.isLocal,is19PlusOnly:e.is19PlusOnly}}function ps(e){if(void 0===e.track||void 0===e.track?.trackMetadata||void 0===e.track?.trackPlayState)throw new Error("Invalid collection esperanto tracks response!");return function(e){if(void 0===e||void 0===e.trackMetadata)throw new Error("Invalid track data");const t=Va(e.trackMetadata.extension);return{type:He.c.TRACK,uri:e.trackMetadata.link,name:e.trackMetadata.name,duration:Qa(e.trackMetadata.length),album:e.album?ds(e.album):null,artists:e.trackMetadata.artist.map(us),discNumber:e.trackMetadata.discNumber,trackNumber:e.trackMetadata.trackNumber,isExplicit:e.trackMetadata.isExplicit,isPlayable:e.trackMetadata.playable,isLocal:e.trackMetadata.isLocal,is19PlusOnly:e.trackMetadata.is19PlusOnly,addedAt:Za(e.addTime),hasAssociatedVideo:(t.videoAssociations?.videoAssociation?.length||0)>0}}(e.track)}function hs(e){return{type:He.c.AUDIOBOOK,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",authorName:e.book?.authorName??"",images:Xa(e.entityInfo?.imageUri),isLocked:e.book?.access===Ai.p2.LOCKED,pinned:e.entityInfo?.pinned??!1,addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:es(e)}}function gs(e,t){return e.length>=(t?.offset??0)+(t?.limit??0)}function fs(e,t,i,n,r){if(e.error?.includes("filter only available"))throw new Di.c_(e.error.match(/^(.*) filter only available/)?.at(1)??e.error);if(e.error?.includes("order only available"))throw new Di.IU(e.error.match(/^(.*) order only available/)?.at(1)??e.error);if(e.error&&404===e.statusCode&&t?.folderUri)throw new Di.db(e.error);const a=t?.folderUri?Ai.jO.PLAYLIST:void 0,s=(0,Wa.FD)(n??[]).map(Wa.sW),o=a??(0,Ga.IP)(s.at(0)?.id);r&&e.header?.tagInfo&&s.unshift({id:r,name:e.header?.tagInfo?.tagName});const l=(0,za.ss)((0,Ga.CA)(t?.sortOrder),o),c=o===Ai.jO.PLAYLIST&&l.id===Ai.oR.CUSTOM.toString(),u=!!t?.textFilter;let d,m=e.header?.totalCount??0;if(i){const i=function(e,t,i,n){let r=0;const a=[],s=new Set(n?.expandedFolders??[]),o=e.slice(0),l=Array.from({length:o.length},(()=>0));let c;for(;c=o.shift();){const e=l.shift()??0,u=vs(c,t,e,i);if(a.push(u),e>0&&r++,gs(a,n))break;if(c.folder&&c.entityInfo?.uri&&s.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:a.slice(n?.offset??0,(n?.offset??0)+(n?.limit??0)),numExpandedFolderItemsInChunk:r}}(e.entity,c,u,t);d=i.items,m+=i.numExpandedFolderItemsInChunk}else d=function(e,t,i){return e.map((e=>vs(e,t,void 0,i)))}(e.entity,c,u);return{primaryFilter:(0,Wa.qZ)(o)??void 0,passedFilterIds:t?.filters??[],availableFilters:(0,Wa.FD)(e.header?.availableFilters?.filter??[]).map(Wa.sW),selectedFilters:t?.folderUri?(0,Wa.Wu)(s):s,availableSortOrders:(0,za.fG)(o),selectedSortOrder:l,limit:t?.limit??e.header?.totalCount??0,offset:t?.offset??0,items:d,unfilteredTotalLength:e.header?.totalCount??0,totalLength:m,hasUnfilteredItems:!!e.header?.totalCount||!!t?.filters?.length||!!t?.textFilter,hasTextFilter:u,reorderAllowed:c,passedFolderUri:t?.folderUri,openedFolderName:e.header?.folderName,parentFolderUri:e.header?.parentFolderUri,tagPlaylist:e.header?.tagInfo?.tagPlaylistInfo?(p=e.header.tagInfo.tagPlaylistInfo,{type:He.c.PLAYLIST,uri:p.uri,name:p.name,images:[{url:p.imageUri}],isLoading:p.isLoading,isBooklist:!1,isCurated:p.isCurated,description:p.description}):void 0,openedFolderIsPlayable:!!e.header?.folderName&&qa(e.entity)};var p}function vs(e,t,i,n){return e.playlist?function(e,t,i){return{type:He.c.PLAYLIST,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:es(e),images:Xa(e.entityInfo?.imageUri),owner:{type:He.c.USER,name:e.playlist?.creatorName??"",uri:e.playlist?.creatorUri??"",id:"",username:"",images:[]},isOwnedBySelf:e.playlist?.ownedBySelf,isLoading:e.playlist?.isLoading,folderDepth:i,canAddTo:e.playlist?.canAdd,canReorder:t,addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),isBooklist:!!e.playlist?.numberOfItemsPerLinkType.find((({linkType:e})=>e===Ka.JaG.SHOW))?.numItems,isEmpty:!e.playlist?.numberOfItemsPerLinkType.some((e=>e.numItems>0))}}(e,t,i):e.album?is(e):e.prerelease?rs(e):e.artist?as(e):e.show?function(e){return{type:He.c.SHOW,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,publisher:e.show?.creatorName??"",images:Xa(e.entityInfo?.imageUri),addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:es(e)}}(e):e.book?hs(e):e.folder?function(e,t,i,n=!1){return{type:He.c.FOLDER,uri:e.entityInfo?.uri??"",rowId:e.folder?.rowId??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:es(e),numberOfFolders:e.folder?.numberOfFolders??0,numberOfPlaylists:e.folder?.numberOfPlaylists??0,folderDepth:i,canReorder:t,isFlattened:n,addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),isEmpty:!qa(e.folder?.entity??[])}}(e,t,i,n):e.likedSongs?function(e){return{type:He.c.LIKED_SONGS,uri:Di.BP,name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:es(e),images:Xa(e.entityInfo?.imageUri),numberOfSongs:e.likedSongs?.numberOfSongs??0,addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):e.yourEpisodes?function(e){return{type:He.c.YOUR_EPISODES,uri:e.entityInfo?.uri??Di.Xn,name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:es(e),images:Xa(e.entityInfo?.imageUri),numberOfDownloadedEpisodes:e.yourEpisodes?.numberOfDownloadedEpisodes??0,addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):e.localFiles?function(e){return{type:He.c.LOCAL_FILES,uri:"spotify:local-files",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:es(e),images:Xa(e.entityInfo?.imageUri),numberOfFiles:e.localFiles?.numberOfFiles??0,addedAt:$a(e.entityInfo?.addTime),lastPlayedAt:Ja(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):null}function ys(e){switch(e){case"album":default:return"album";case"single":return"single";case"compilation":return"compilation";case"ep":return"ep"}}function bs(e){if(!e.album)return null;if(!e.album.albumMetadata)return null;const t=e.album;return{type:He.c.ALBUM,uri:e.album.albumMetadata.link,name:e.album.albumMetadata.name,artists:e.album.albumMetadata.artists.map(ts).filter((e=>e.name)),images:Ya(e.album.albumMetadata.covers),albumType:ys(e.album.albumType),year:e.album.albumMetadata.year,copyrights:(i=e.album.albumMetadata.copyright,i.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{...ms(e.trackMetadata,e.trackPlayState,t),addedAt:Za(e.addTime)}}(e,t)))};var i}function _s(e,t){return{items:e.entity.map((e=>{const t=e.entityInfo?.hasCuratedItems??!1;return e.playlist?Es(e,He.c.PLAYLIST,t):e.likedSongs?Es(e,He.c.LIKED_SONGS,t):e.yourEpisodes?Es(e,He.c.YOUR_EPISODES,t):e.folder?function(e){return{type:He.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 Es(e,t,i){let n,r,a;return t===He.c.PLAYLIST?(n=e.playlist?.numberOfItemsPerLinkType.find((({linkType:e})=>4===e))?.numItems??void 0,r=e.playlist?.numberOfItemsPerLinkType.find((({linkType:e})=>63===e))?.numItems??void 0,a=e.playlist?.numberOfItemsPerLinkType.find((({linkType:e})=>62===e))?.numItems??void 0):t===He.c.LIKED_SONGS?n=e.likedSongs?.numberOfSongs??void 0:t===He.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:Xa(e.entityInfo?.imageUri),hasCuratedItems:i??!1,isLoading:e.playlist?.isLoading,fromFolder:e.playlist?.fromFolder?{name:e.playlist.fromFolder.name}:void 0,trackCount:n,episodeCount:r,bookCount:a}}function Cs(e){switch(e){case Si.F.ONLY_CURATED:return Ai.iO.ONLY_CURATED;case Si.F.ONLY_UNCURATED:return Ai.iO.ONLY_NOT_CURATED;case Si.F.NONE:case void 0:return Ai.iO.GROUP_BY;default:return(0,it.k)(e),Ai.iO.GROUP_BY}}class xs{cache=new Ke.GG(6e5,864e5);constructor(e,t,i){this._your_library=e,this._libraryAPI=t,this._playlistAPI=i,this.events=new Ni(e,this.cache)}getCapabilities(){return{canSort:!0,canFilterOnCurationState:!0}}getEvents(){return this.events}async getCurationContexts(e){const{curatedItemUri:t,offset:i=0,limit:n,textFilter:r="",folderUri:a,sortOrder:s,curationStateFilter:o,flatten:l=!!r}=e;return _s(await this._your_library.all(Ai.WT.fromPartial({header:{length:n,skip:i,textFilter:r,sortOrder:{sortOrder:s?Number(s):Ai.oR.RELEVANCE},filters:{filter:[Ai.jO.PLAYLIST,Ai.jO.WRITABLE]},curatedItems:{filter:Cs(o),items:[t]},totalCount:!0,allPlaylists:l,folderId:a?Oi(a):void 0,numLinkTypesInPlaylists:!0},pseudoPlaylistConfig:Pi({includeYourEpisodes:(0,b.gH)(t),includeLikedSongs:(0,b.U_)(t)||(0,b.Pk)(t)})})),e)}getAvailableSortOrders(){return[Ai.oR.RELEVANCE,Ai.oR.RECENTLY_ADDED,Ai.oR.NAME,Ai.oR.RECENTLY_PLAYED_OR_ADDED].map((e=>(0,za.ss)(e)))}async curateItems(e,t,i){if(this.events.emitOperationSync(Ti.jy.CURATE_ITEMS,e,t,i))return null;const n=[],r=[];for(const i of t){let t;t=(0,b.Z0)(i)?this._libraryAPI.add({uris:[e],silent:!0}):(0,b.tb)(i)?this._playlistAPI.add(i,[e],{after:"end"},!0):Promise.reject(`Unsupported uri: "${i}"`),n.push(t)}for(const t of i){let i;i=(0,b.Z0)(t)?this._libraryAPI.remove({uris:[e],silent:!0}):(0,b.tb)(t)?this._playlistAPI.remove(t,[{uri:e,uid:""}],!0):Promise.reject(`Unsupported uri: "${t}"`),r.push(i)}n.length&&!this.isCuratedSync(e)&&(this.events.emitUpdateCuratedItems([e],!0),Promise.any(n).catch((async()=>{this.isCurated(e).then((t=>{this.events.emitUpdateCuratedItems([e],t)}))})));const a=await Promise.allSettled(n),s=await Promise.allSettled(r),o=t.filter(((e,t)=>"fulfilled"===a.at(t)?.status)),l=t.filter(((e,t)=>"rejected"===a.at(t)?.status)),c=i.filter(((e,t)=>"fulfilled"===s.at(t)?.status)),u=i.filter(((e,t)=>"rejected"===s.at(t)?.status));if((o.length||c.length)&&this.events.emitOperationComplete(Ti.jy.CURATE_ITEMS,e,o,c),l.length||u.length){const n=function({curatedItemUri:e,addedCurationContextUris:t,removedCurationContextUris:i,settledAddCurationContextPromises:n,settledRemoveCurationContextPromises:r}){for(const i of[...n])if("rejected"===i.status){const r=t.at(n.indexOf(i));return new wi.e(`Failed curating "${e}" into "${r}"`,{cause:i.reason})}for(const t of[...r])if("rejected"===t.status){const n=i.at(r.indexOf(t));return new wi.e(`Failed uncurating "${e}" from "${n}"`,{cause:t.reason})}return new wi.e(e)}({curatedItemUri:e,addedCurationContextUris:t,removedCurationContextUris:i,settledAddCurationContextPromises:a,settledRemoveCurationContextPromises:s});throw this.events.emitOperationComplete(Ti.jy.CURATE_ITEMS,e,l,u,n),n}return!!o.length||(await this.isCurated(e))?.[0]}getDefaultCurationContextUri=Ri.o;async curateDefault(e){const t=this.getDefaultCurationContextUri(e);if(this.events.emitOperationSync(Ti.jy.CURATE_ITEMS,e,[t],[]))return;let i=!1;try{this.isCuratedSync(e)||(i=!0,this.events.emitUpdateCuratedItems([e],!0)),await this._libraryAPI.add({uris:[e],silent:!0}),this.events.emitOperationComplete(Ti.jy.CURATE_ITEMS,e,[t],[])}catch(n){i&&this.isCurated(e).then((t=>{this.events.emitUpdateCuratedItems([e],t)}));const r=new wi.e(`Failed curating "${e}" into default context`,{cause:n});throw this.events.emitOperationComplete(Ti.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 Ss=i(45695),As=i(28050);class Ts{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=i(8352),Ns=i(22360),ws=i(72645),Rs=i(19829),ks=i(52732),Os=i(90265),Ps=i(25558),Ls=i(9111),js=i(82124),Ds=i(31202);function Ms(e){switch(e){case Ps.Ir.ALBUMS:return Ai.jO.ALBUM;case Ps.Ir.ARTISTS:return Ai.jO.ARTIST;case Ps.Ir.SHOWS:return Ai.jO.SHOW;case Ps.Ir.BOOKS:return Ai.jO.BOOK;default:throw Error("Invalid library filter!")}}class Us extends Ls.w{_cancellables={[Ps.Ir.ALBUMS]:null,[Ps.Ir.ARTISTS]:null,[Ps.Ir.SHOWS]:null,[Ps.Ir.TRACKS]:null,[Ps.Ir.EPISODES]:null,[Ps.Ir.BOOKS]:null};_containsCancellable=null;constructor(e,t,i,n){super(n),this._your_library=e,this._collection=t,this._listen_later=i}subscribeToUpdates(){for(const e of Object.values(Ps.Ir))if(e===Ps.Ir.EPISODES){let t;this._cancellables[e]=this._listen_later.streamEpisodes(js.Fn.fromPartial({updateThrottling:100}),(i=>{t!==i.unfilteredLength&&(this.emit(Ps.UV.UPDATE,{list:e}),t=i.unfilteredLength)}))}else if(e===Ps.Ir.TRACKS){let t;this._cancellables[e]=this._collection.streamTrackListMetadata(Ds.oT.fromPartial({updateThrottling:100}),(i=>{t!==i.metadata?.unfilteredLength&&(this.emit(Ps.UV.UPDATE,{list:e}),t=i.metadata?.unfilteredLength)}))}else{const t=Ms(e);this._cancellables[e]=this._your_library.streamAll(Ai.WT.fromPartial({updateThrottling:100,header:{allPlaylists:!1,totalCount:!0,filters:{filter:[t]}}}),(()=>{this.emit(Ps.UV.UPDATE,{list:e})}))}}unsubscribeFromUpdates(){for(const e of Object.values(Ps.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(Ds.Rs.fromPartial({uri:t}),(e=>this.emitUpdateItems(t,e.found)))}}function Bs(e){const t=e.map((e=>(0,b.o_)(e))),i=t.map((e=>null!==e?e.type:null)).reduce(((e,t)=>e===t?e:null));if(null===i)throw new Error("Given URIs need to be of the same type!");return{type:i,ids:t.map((e=>e.id))}}var Fs=i(80274),Hs=i(4479),Vs=i(7353),Gs=i(38481);const zs={offset:0},Ws={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:[js.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 Ks(e,t){return"end"===e.after?{}:e.after?.uri?{afterUri:(0,Hs.c)(e.after.uri,t)}:"start"===e.before?{first:!0}:e.before?.uri?{beforeUri:(0,Hs.c)(e.before.uri,t)}:{}}const Ys=e=>e.startsWith("spotify:concept:"),qs=e=>!Ys(e);class Zs{_cache=new Map;constructor(e,t,i,n,r){this._your_library=e,this._collection=t,this._listen_later=i,this._builder=n,this._currentUsername=r,this._events=new Us(this._your_library,this._collection,this._listen_later,this._cache)}getCapabilities(){return{canSort:!0,canFilter:!0,canSortTracksAndEpisodes:!0,canFilterTracksAndEpisodes:!0,canModifyOffline:!0,canGetTracksByArtistOrAlbum:!0,canMarkEpisodesAsDone:!0,canFetchAllItems:!0,canPin:!0,canTextFilterContentsInRealtime:!0}}async getAlbums(e=zs){const{sort:t,filter:i,offset:n,limit:r}=e;if(void 0!==n&&"number"!=typeof n)throw new Error("Invalid offset! Expected a number.");return function(e,t){if(void 0===e.entity)throw new Error("Invalid collection Esperanto artists response!");return{items:e.entity.map(is),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(Ai.WT.fromPartial({header:{totalCount:!0,skip:n,length:r,filters:{filter:[Ai.jO.ALBUM]},textFilter:(0,Wa.WQ)((0,Fs.HI)(i)),sortOrder:{sortOrder:(0,za.fC)(t)},includePrereleases:!0}})),n)}async getArtists(e=zs){const{sort:t,filter:i,offset:n,limit:r}=e;if(void 0!==n&&"number"!=typeof n)throw new Error("Invalid offset! Expected a number.");return function(e,t){if(void 0===e.entity)throw new Error("Invalid collection Esperanto artist response!");return{items:e.entity.map(as),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(Ai.WT.fromPartial({header:{totalCount:!0,skip:n,length:r,filters:{filter:[Ai.jO.ARTIST]},textFilter:(0,Wa.WQ)((0,Fs.HI)(i)),sortOrder:{sortOrder:(0,za.Lf)(t)}}})),n)}async getTracks(e=zs){const{sort:t,filters:i,offset:n,limit:r,uri:a}=e;if(void 0!==n&&"number"!=typeof n)throw new Error("Invalid offset! Expected a number.");const s=(0,b.o_)(a),o=s&&(0,b.cE)(s.id)||void 0,l=Ds.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:[js.UH.VIDEO_ASSOCIATIONS]},albumPolicy:{decorated:!0,albumPolicy:{link:!0,name:!0,covers:!0}},artistPolicy:{name:!0,link:!0}},addTime:!0,start:n,length:r,filter:(0,Wa.Bf)(i?.map(Fs.HI).map((e=>e??null)).filter(Vs.P)??[]),sort:t?(0,za.c6)(t):"",id:o});let c;return c=(0,b.o_)(a)?.type===b.NQ.ARTIST?await this._collection.getArtistTrackList(l):(0,b.o_)(a)?.type===b.NQ.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(ps),offset:t||0,limit:e.item.length,totalLength:e.unrangedLength,unfilteredTotalLength:e.unfilteredLength}}(c,n)}async _isTagsInfoSynced(){return await new Promise((e=>{let t=null;const i=this._collection.streamTagsInfo({},(n=>{n.isSynced&&(i.cancel(),t&&clearTimeout(t),e(!0))}));t=setTimeout((()=>{e(!1),i.cancel()}),5e3)}))}async getTracksFilterTags(){if(await this._isTagsInfoSynced()){const e=this._builder.build(),t=await e.withHost(Gs.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 getShows(e=zs){const{sort:t,filter:i,offset:n,limit:r}=e;if(void 0!==n&&"number"!=typeof n)throw new Error("Invalid offset! Expected a number.");return function(e,t){if(void 0===e.entity)throw new Error("Invalid collection cosmos shows response!");return{items:e.entity.map(ss),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(Ai.WT.fromPartial({header:{totalCount:!0,skip:n,length:r,filters:{filter:[Ai.jO.SHOW]},textFilter:(0,Wa.WQ)((0,Fs.HI)(i)),sortOrder:{sortOrder:(0,za.rC)(t)}}})),n)}async getEpisodes(e=zs){const{sort:t,filter:i,offset:n,limit:r}=e;if(void 0!==n&&"number"!=typeof n)throw new Error("Invalid offset! Expected a number.");return function(e,t){return{items:(e.episode||[]).map(cs),offset:t||0,limit:(e.episode||[]).length,totalLength:e.unrangedLength,unfilteredTotalLength:e.unfilteredLength}}(await this._listen_later.episodes(js.Fn.fromPartial({...Ws,sort:(0,za.wh)(t),filter:(0,Wa.Bf)([(0,Fs.HI)(i)??null].filter(Vs.P)),start:n,length:r})),n)}async getBooks(e=zs){const{filter:t,sort:i,offset:n,limit:r}=e;if(void 0!==n&&"number"!=typeof n)throw new Error("Invalid offset! Expected a number.");return function(e,t){if(void 0===e.entity)throw new Error("Invalid your library esperanto response!");return{items:e.entity.map(hs),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(Ai.WT.fromPartial({header:{totalCount:!0,skip:n,length:r,filters:{filter:[Ai.jO.BOOK]},textFilter:(0,Wa.WQ)((0,Fs.HI)(t)),sortOrder:{sortOrder:(0,za._e)(i)},includePrereleases:!0}})),n)}getEvents(){return this._events}async add({uris:e,silent:t}){if(!this._events.emitOperationSync(Ps.tS.ADD,e,t))try{this._events.emitUpdateItems(e,!0),await async function(e,t,i){const{type:n}=Bs(i);n===b.NQ.EPISODE?await t.add({uris:i}):await e.add({uri:i})}(this._collection,this._listen_later,e),this._events.emitOperationComplete(Ps.tS.ADD,e,null,t)}catch(i){throw this._events.emitUpdateItems(e,!1),this._events.emitOperationComplete(Ps.tS.ADD,e,i instanceof Error?i:new Error("Unknown error object"),t),i}}async remove({uris:e,silent:t}){if(!this._events.emitOperationSync(Ps.tS.REMOVE,e,t))try{this._events.emitUpdateItems(e,!1),await async function(e,t,i){const{type:n}=Bs(i);n===b.NQ.EPISODE?await t.remove({uris:i}):await e.remove({uri:i})}(this._collection,this._listen_later,e),this._events.emitOperationComplete(Ps.tS.REMOVE,e,null,t)}catch(i){throw this._events.emitUpdateItems(e,!0),this._events.emitOperationComplete(Ps.tS.REMOVE,e,i instanceof Error?i:new Error("Unknown error object"),t),i}}async contains(...e){const t=await async function(e,t){return(await e.contains(Ds.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 i=await this._your_library.pin(Ai.Xb.fromPartial({uri:(0,Hs.c)(e,this._currentUsername),...t&&Ks(t,this._currentUsername)}));i.status===Ai.Fy.PINNED?this._events.emitUpdatePin(e,!0):i.status===Ai.Fy.NOT_PINNED&&i.hasMaximumPinnedItems&&this._events.emitUpdatePinErrorTooManyPins(e,i.maximumPinnedItems)}async unpin(e){await this._your_library.unPin(Ai.Xb.fromPartial({uri:(0,Hs.c)(e,this._currentUsername)})),this._events.emitUpdatePin(e,!1)}async getContents(e){let t=e?.itemToCheckCurationFor,i=e?.textFilter;const n=i?(0,b.o_)(i):null;let r=Ai.iO.GROUP_BY;!n||n.type!==b.NQ.TRACK&&n.type!==b.NQ.EPISODE&&n.type!==b.NQ.LOCAL_TRACK&&n.type!==b.NQ.SHOW||(t||(r=Ai.iO.ONLY_CURATED,t=[]),t.push(n.toURI()),i="");const a=t&&Ai.ZP.fromPartial({items:t,filter:r}),s=e?.filters?.find(Ys),o=e?.filters?.filter(qs).map(Ga.qF),l=o&&(0,Wa.FD)(o).at(0),c=!!l,u=l===Ai.jO.PLAYLIST,d=l===Ai.jO.DOWNLOADED,m=!!e?.expandedFolders?.length&&!!!e?.textFilter&&!s&&(!c||u||d);let p=e?.offset,h=e?.limit;m&&(p=0,h=(e?.offset??0)+(e?.limit??0));const g=(0,za.ss)((0,Ga.CA)(e?.sortOrder),l);return fs(await this._your_library.all(Ai.WT.fromPartial({header:{length:h,skip:p,textFilter:i,sortOrder:{sortOrder:(0,Ga.CA)(g.id)},filters:{filter:o},totalCount:!0,allPlaylists:!!e?.textFilter||!!s||e?.flattenTree,entitiesInFolders:!0,folderId:e?.folderUri?Oi(e.folderUri):void 0,numLinkTypesInPlaylists:!0,curatedItems:a,tagFilter:s?Ai.Jk.fromPartial({tagUri:s}):void 0,includePrereleases:!0},pseudoPlaylistConfig:Pi(e)})),e,m,o,s)}getContentsPrimaryFilterId(e){return(0,Wa.i_)(e)?.toString()??null}getFilterLabel(e){const t=(0,Ga.IP)(e);return void 0!==t?Ai.jO[t]?.toLowerCase():e}getSortOrderLabel(e){const t=(0,Ga.CA)(e);return void 0!==t?Ai.oR[t]?.toLowerCase():e}getStaticallyKnownFilters(){return{playlist:{filterId:Ai.jO.PLAYLIST.toString(),sortOrderIds:{customSort:Ai.oR.CUSTOM.toString()}}}}async getAlbum(e){return bs(await this._collection.getAlbumView(Ds.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 $s=i(48168);function Qs(e){return{type:He.c.ARTIST,uri:e.link,name:e.name}}function Js(e){const t=e.metadata;return{type:He.c.TRACK,uid:e.rowId,addedAt:(a=e.addTime,new Date(1e3*a)),uri:t.link,name:t.name,album:(n=t.album,{type:He.c.ALBUM,uri:n.link,name:n.name,artist:n.artist&&Qs(n.artist),images:(r=n.covers?.standardLink,r?[{url:r,label:"standard"}]:[])}),artists:t.artist.map(Qs),discNumber:t.discNumber,trackNumber:t.trackNumber,duration:(i=1e3*t.length,{milliseconds:i}),isExplicit:!1,isLocal:t.isLocal,isPlayable:t.playable,is19PlusOnly:!1};var i,n,r,a}var Xs=i(95166),eo=i(72013),to=i(13596),io=i(58127);const no="showLocalFiles";function ro(e){switch(e){case Xs.de.UNKNOWN:return $s.kW.UNKNOWN;case Xs.de.ITUNES:return $s.kW.ITUNES;case Xs.de.DOWNLOADS:return $s.kW.DOWNLOADS;case Xs.de.MY_MUSIC:return $s.kW.MY_MUSIC;case Xs.de.WINDOWS_MUSIC_LIBRARY:return $s.kW.WINDOWS_MUSIC_LIBRARY;case Xs.de.ANDROID_MEDIA_STORE:case Xs.de.UNRECOGNIZED:case Xs.de.IOS_DOCUMENTS:return $s.kW.UNRECOGNIZED;default:return(0,it.k)(e),$s.kW.UNRECOGNIZED}}function ao(e){switch(e){case $s.kW.UNKNOWN:return Xs.de.UNKNOWN;case $s.kW.ITUNES:return Xs.de.ITUNES;case $s.kW.DOWNLOADS:return Xs.de.DOWNLOADS;case $s.kW.MY_MUSIC:return Xs.de.MY_MUSIC;case $s.kW.WINDOWS_MUSIC_LIBRARY:return Xs.de.WINDOWS_MUSIC_LIBRARY;case $s.kW.UNRECOGNIZED:return Xs.de.UNRECOGNIZED;default:return(0,it.k)(e),Xs.de.UNRECOGNIZED}}const so=e=>{const t=e?.order===eo.xB.DESC?1:0;switch(e?.field){case eo.nw.TITLE:return Xs.rj.NAME_ASC+t;case eo.nw.ADDED_AT:return Xs.rj.ADD_TIME_ASC+t;case eo.nw.ALBUM:return Xs.rj.ALBUM_NAME_ASC+t;case eo.nw.ARTIST:return Xs.rj.ARTIST_NAME_ASC+t;case eo.nw.DURATION:return Xs.rj.LENGTH_ASC+t;default:return Xs.rj.NO_SORT}};function oo(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,it.d)(e)}}const lo=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 co{_totalLength=0;constructor(e,t,i){this._cosmos=t,this._localStorageAPI=i,this._client=new Xs._w(e),this._events=new io.Q,this._subscribeToTracksUpdates()}getCapabilities(){return{canSort:!0,canFilter:!0,canFetchAllTracks:!0}}getEvents(){return this._events}getIsEnabled(){const e=this._localStorageAPI.getItem(no);return!(e instanceof Error)&&e}setIsEnabled(e){this._localStorageAPI.setItem(no,e),this._emitUpdate()}subscribeIsEnabled(e){return this._localStorageAPI.getEvents().addListener(to.r.UPDATE,(t=>{t.data.key===no&&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:ro(e.id)}))),folders:e.folders}}async addFolder(e){oo((await this._client.addFolder({path:e.path})).result)}async removeFolder(e){oo((await this._client.removeFolder({path:e.path})).result)}async mutateDefaultSource(e){oo((await this._client.mutateDefaultSource({id:ao(e.id),enabled:e.enabled})).result)}async getTracks(e,t){const i=await this._client.getTracks({query:{sortBy:so(e),textFilter:t??"",range:void 0,minLength:0,removeDuplicateLinks:!1},policy:lo});return void 0!==i.data?i.data.item.map(Js):[]}_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(io.T.UPDATE,{isEnabled:this.getIsEnabled(),totalLength:this._totalLength})}}var uo=i(90126),mo=i(41286),po=i(50879),ho=i(95547),go=i(1275),fo=i(85065),vo=i(49062),yo=i(17835),bo=i(5928);function _o(e,t){t=t.split(":").map((e=>encodeURIComponent(e))).join(":");const i=(0,b.o_)(t,{parseUnknown:!0});if(null===i)throw new Error(`URI "${t}" is invalid!`);switch(i.type){case b.NQ.TRACK:case b.NQ.LOCAL:case b.NQ.EPISODE:case b.NQ.SHOW:case b.NQ.PLAYLIST:case b.NQ.PLAYLIST_V2:case b.NQ.COLLECTION:case b.NQ.COLLECTION_ALBUM:case b.NQ.COLLECTION_ARTIST:return t;case b.NQ.ALBUM:return(0,b.Uu)(e,i.id).toURI();case b.NQ.ARTIST:return(0,b.g1)(e,i.id).toURI();default:return console.warn(`URI "${t}" is can not be downloaded!`),null}}function Eo(e){const t=(0,b.o_)(e);if(null===t)throw new Error(`URI "${e}" is invalid!`);switch(t.type){case b.NQ.ALBUM:case b.NQ.ARTIST:case b.NQ.TRACK:case b.NQ.LOCAL:case b.NQ.EPISODE:case b.NQ.SHOW:case b.NQ.PLAYLIST:case b.NQ.PLAYLIST_V2:case b.NQ.COLLECTION:return e;case b.NQ.COLLECTION_ALBUM:return(0,b.Q0)(t.id).toURI();case b.NQ.COLLECTION_ARTIST:return(0,b.IT)(t.id).toURI();default:return console.warn(`URI "${e}" is can not be downloaded!`),null}}function Co(e=!1,t=!1){return(i,n=!0)=>(0,b.gH)(i)||(0,b.WB)(i)?n?fo.vs.YES:fo.vs.NO_PERMISSION_HIDE:e?fo.vs.YES:t?fo.vs.NO_PERMISSION_HIDE:fo.vs.NO_PERMISSION}let xo=function(e){return e[e.CONTEXT=0]="CONTEXT",e[e.ITEM=1]="ITEM",e[e.UNRECOGNIZED=2]="UNRECOGNIZED",e}({});function So(e){const t=(0,b.o_)(e);if(null===t)return xo.UNRECOGNIZED;switch(t.type){case b.NQ.ALBUM:case b.NQ.ARTIST:case b.NQ.SHOW:case b.NQ.PLAYLIST:case b.NQ.PLAYLIST_V2:case b.NQ.COLLECTION:case b.NQ.COLLECTION_ALBUM:case b.NQ.COLLECTION_ARTIST:return xo.CONTEXT;case b.NQ.TRACK:case b.NQ.EPISODE:return xo.ITEM;default:return xo.UNRECOGNIZED}}var Ao=function(e){return e.ONLINE="online",e.OFFLINE="offline",e.FORCED_OFFLINE="forced_offline",e.RECONNECTING="reconnecting",e}(Ao||{});function To(e){switch(e.connection.status){case Ao.ONLINE:return fo.uJ.ONLINE;case Ao.OFFLINE:return fo.uJ.OFFLINE;case Ao.FORCED_OFFLINE:return fo.uJ.FORCED_OFFLINE;case Ao.RECONNECTING:return fo.uJ.RECONNECTING;default:return fo.uJ.OFFLINE}}function Io(e){const t=e?Number(e.totalTracks):0,i=e?Number(e.downloadedTracks):0;return{syncing:e?.downloading??!1,percentage:e?.percentComplete??0,totalItems:t,currentItem:Math.min(i+1,t)}}function No(e){switch(e){case ho.zZ.SUCCESS:return fo.O4.SUCCESS;case ho.zZ.GENERIC:return fo.O4.GENERIC;case ho.zZ.DISK_FULL:return fo.O4.DISK_FULL;case ho.zZ.EXPIRED:return fo.O4.EXPIRED;case ho.zZ.TOO_MANY_TRACKS:return fo.O4.TOO_MANY_TRACKS;case ho.zZ.NOT_ALLOWED:return fo.O4.NOT_ALLOWED;case ho.zZ.CONNECTION_DISABLED:return fo.O4.CONNECTION_DISABLED;case ho.zZ.DEVICE_LIMIT_REACHED:return fo.O4.DEVICE_LIMIT_REACHED;case ho.zZ.UNRECOGNIZED:default:return fo.O4.UNRECOGNIZED}}function wo(e){let t=[];return(0,yo.X)((i=>{t.forEach((e=>e.cancel())),t=[],(0,bo.F)(Array.from(i.keys()),(i=>t.push(e(i))),100)}),100)}class Ro extends vo.p{constructor(e,t,i,n,r){super(),this._username=e,this._cosmos=t,this._offline=i,this._productState=n,this._cache=r,this.setupConnectivityEvents(),this.setupErrorEvents(),this.setupCapabilitiesEvents(),this.setupTotalProgressEvents(),this.setupContextProgressEvents(),this.setupContextAndItemAvailabilityEvents()}setupConnectivityEvents(){let e=0,t=null;this.onAddListener(vo.I.UPDATE_CONNECTIVITY,(()=>{1==++e&&(t=this._cosmos.sub("sp://connectivity-manager/v1/connection",(e=>this.emit(vo.I.UPDATE_CONNECTIVITY,{connectivity:To(e)}))))})),this.onRemoveListener(vo.I.UPDATE_CONNECTIVITY,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupErrorEvents(){let e=0,t=null;this.onAddListener(vo.I.ERROR,(()=>{1==++e&&(t=this._offline.subscribeError({},(({code:e})=>this.emit(vo.I.ERROR,{code:No(e)}))))})),this.onRemoveListener(vo.I.ERROR,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupCapabilitiesEvents(){let e=0,t=null;this.onAddListener(vo.I.UPDATE_CAPABILITIES,(()=>{1==++e&&(t=this._productState.subValues({},(({pairs:e})=>{e.offline&&this.emit(vo.I.UPDATE_CAPABILITIES,{capabilites:{canDownload:Co("1"===e.offline,"1"===e["streaming-only-premium"])}})})))})),this.onRemoveListener(vo.I.UPDATE_CAPABILITIES,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupTotalProgressEvents(){let e=0,t=null;this.onAddListener(vo.I.UPDATE_TOTAL_PROGRESS,(()=>{1==++e&&(t=this._offline.subscribeTotalProgress({},(({progress:e})=>this.emit(vo.I.UPDATE_TOTAL_PROGRESS,{progress:Io(e)}))))})),this.onRemoveListener(vo.I.UPDATE_TOTAL_PROGRESS,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupContextProgressEvents(){const e=e=>{const t=Eo(e.uri);null!==t&&this.emit(vo.I.UPDATE_CONTEXT_PROGRESS,{uri:t,progress:Io(e.progress)})},t=wo((t=>this._offline.subscribeContextsProgress({uris:t},(({progresses:t})=>t.forEach((t=>e(t)))))));this.onAddListener(vo.I.UPDATE_CONTEXT_PROGRESS,(e=>{const i=_o(this._username,e.data.options.uri);null!==i&&t.subscribe(i)})),this.onRemoveListener(vo.I.UPDATE_CONTEXT_PROGRESS,(e=>{const i=_o(this._username,e.data.options.uri);null!==i&&t.unsubscribe(i)}))}setupContextAndItemAvailabilityEvents(){const e=e=>{const t=Eo(e.uri);if(null===t)return;const i=function(e){switch(e.state){case ho.W1.DOWNLOADED:return fo.kw.YES;case ho.W1.DOWNLOADING:return fo.kw.DOWNLOADING;case ho.W1.WAITING:case ho.W1.REQUESTED:return fo.kw.WAITING;case ho.W1.NOT_DOWNLOADED:case ho.W1.ERROR:case ho.W1.UNRECOGNIZED:default:return fo.kw.NO}}(e);this._cache.set(t,i),this.emit(vo.I.UPDATE_AVAILABILITY,{uri:t,availability:i})},t=wo((t=>this._offline.subscribeContexts({uris:t},(({contexts:t})=>t.forEach((t=>{void 0!==t.context&&e(t.context)})))))),i=e=>{const t=Eo(e.uri);if(null===t)return;const i=function(e){switch(e.state){case ho.C8.DOWNLOADED:return fo.kw.YES;case ho.C8.DOWNLOADING:return fo.kw.DOWNLOADING;case ho.C8.WAITING_FOR_REDOWNLOAD:case ho.C8.WAITING:case ho.C8.WAITING_LIMIT_EXCEEDED:return fo.kw.WAITING;case ho.C8.NOT_DOWNLOADED:case ho.C8.ERROR:case ho.C8.DOWNLOADED_EXPIRED:case ho.C8.UNRECOGNIZED:default:return fo.kw.NO}}(e);this._cache.set(t,i),this.emit(vo.I.UPDATE_AVAILABILITY,{uri:t,availability:i})},n=wo((e=>this._offline.subscribeItems({uris:e},(({items:e})=>e.forEach((e=>i(e)))))));this.onAddListener(vo.I.UPDATE_AVAILABILITY,(e=>{const i=_o(this._username,e.data.options.uri);if(null===i)return;const r=So(i);r===xo.CONTEXT?t.subscribe(i):r===xo.ITEM&&n.subscribe(i)})),this.onRemoveListener(vo.I.UPDATE_AVAILABILITY,(e=>{const i=_o(this._username,e.data.options.uri);if(null===i)return;const r=So(i);r===xo.CONTEXT?t.unsubscribe(i):r===xo.ITEM&&n.unsubscribe(i)}))}}var ko=i(40523);const Oo=(0,i(25828).g)(ho.W1);function Po(e){if(Oo(e))switch(e){case ho.W1.UNRECOGNIZED:return fo.kw.NO;case ho.W1.REQUESTED:case ho.W1.WAITING:return fo.kw.WAITING;case ho.W1.DOWNLOADING:return fo.kw.DOWNLOADING;case ho.W1.DOWNLOADED:return fo.kw.YES;case ho.W1.ERROR:case ho.W1.NOT_DOWNLOADED:return fo.kw.NO;default:return(0,it.k)(e),fo.kw.NO}return fo.kw.NO}function Lo(e){const t=e.entityInfo;if(void 0===t)return null;const i=(0,b.o_)(t.uri);if(null===i)return null;switch(i.type){case b.NQ.ARTIST:case b.NQ.COLLECTION_ARTIST:return function(e){return{type:He.c.ARTIST,uri:Eo(e.uri)??"",name:e.name,images:[{url:e.imageUri,label:"standard"}]}}(t);case b.NQ.ALBUM:case b.NQ.COLLECTION_ALBUM:return function(e,t){return{type:He.c.ALBUM,uri:Eo(e.uri)??"",name:e.name,artists:[{type:He.c.ARTIST,uri:t?.artistUri??"",name:t?.artistName??""}],images:[{url:e.imageUri,label:"standard"}]}}(t,e.album);case b.NQ.SHOW:return function(e,t){return{type:He.c.SHOW,uri:e.uri,name:e.name,publisher:t?.creatorName??"",images:[{url:e.imageUri,label:"standard"}]}}(t,e.show);case b.NQ.PLAYLIST:case b.NQ.PLAYLIST_V2:return function(e,t){return{type:He.c.PLAYLIST,uri:e.uri,name:e.name,creatorName:t?.creatorName??"",images:[{url:e.imageUri,label:"standard"}]}}(t,e.playlist);case b.NQ.COLLECTION:return function(e){return{type:e.uri.endsWith("your-episodes")?He.c.YOUR_EPISODES:He.c.LIKED_SONGS,uri:e.uri}}(t);default:return null}}class jo{_cache=new Map;constructor(e,t,i,n,r,a){this._username=e,this._storage=i,this._offline=n,this._yourLibrary=r,this._productState=a,this._events=new Ro(this._username,t,this._offline,this._productState,this._cache),this._events.addListener(vo.I.UPDATE_CAPABILITIES,(e=>this._canDownload=e.data.capabilites.canDownload)),this._canDownload=Co()}getCapabilities(){return{canDownload:(e,t)=>this._canDownload(e,t),canRemoteDownload:!0}}getEvents(){return this._events}async getDownloads(){return(await this._yourLibrary.all(Ai.WT.fromPartial({header:{allPlaylists:!0,filters:{filter:[Ai.jO.DOWNLOADED]},length:1e3}}))).entity.map(Lo).filter(Vs.P)}getAvailabilitySync(e){return this._cache.get(e)??fo.kw.NO}async getContextForDevices(e){const t=await new Promise((t=>{const i=this._offline.subscribeDevicesWithContext(ho.U9.fromPartial({uri:e}),(e=>{t(e),i.cancel()}))}));return t.deviceWithContext.filter((e=>!!e.device&&e.isSupported&&!!e.device.capabilities?.remoteDownloadsEnabled)).map((({device:e,context:t})=>{const{deviceId:i,cacheId:n,isLocal:r,name:a,type:s,lastSeenAt:o,platform:l}=e;return{deviceId:i,cacheId:n,deviceType:s,clientPlatform:l,isLocal:r,name:a,type:(0,ko.I)(s),lastSeenAtMs:o?.getTime()??0,contextDownloadAvailability:Po(t?.state),contextDownloadPercentage:t?.percentComplete??0}}))}async addDownload(e,t){const i=_o(this._username,e);null!==i&&await this._offline.addDownload(ho.WN.fromPartial({uri:i,device:t}))}async removeDownload(e,t){const i=_o(this._username,e);null!==i&&await this._offline.removeDownload(ho.WN.fromPartial({uri:i,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 Do=i(80359),Mo=i(92838);class Uo{_info=null;getCapabilities(){return{canChangeVolume:!0,canGetPlaybackInfo:!0,canGetFiles:!0,puffinEnabled:!0}}_isLocal=!1;_isAvailable=!1;_volume=-1;constructor(e,t,i){this._playbackService=e,this._storageService=t,this._connectServiceClient=i,this._events=new Mo.T,this._playbackService.subPlaybackInfo({},(async e=>{this._info=e,this._events.emit(Mo._.INFO,e)})),this._playbackService.subVolume({},(({volume:e})=>{this._volume=e,this.emitVolume()})),this._connectServiceClient&&this._connectServiceClient.state(a.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:s.Sf.USER,volume:e,connectLoggingParams:void 0})}async raiseVolume(){this._playbackService.raiseVolume({source:s.Sf.USER,connectLoggingParams:void 0})}async lowerVolume(){this._playbackService.lowerVolume({source:s.Sf.USER,connectLoggingParams:void 0})}async getPlaybackInfo(){return this._info}async getFiles(e){const t=await this._playbackService.getFiles({uri:e});if(t.status!==s.e6.GETFILES_OK)throw new Error(`Failed to get files for URI '${e}'. Error code: ${t.status}`);const i=await Promise.all(t.files.map((({fileId:e})=>this._storageService.getFileRanges({fileId:e,realm:go.Mx.STREAM}))));return t.files.map(((e,t)=>({...e,byteSize:i[t].byteSizeKnown?Number(i[t].byteSize):-1,byteRanges:i[t].ranges.map((e=>({fromByte:Number(e.fromByte),toByte:Number(e.toByte)})))})))}getVolumeInternal(){return this._isAvailable?this._volume:-1}emitVolume(){this._events.emit(Mo._.VOLUME,{volume:this.getVolumeInternal(),isLocal:this._isLocal})}}var Bo=i(52359),Fo=i(91493),Ho=i(91815),Vo=i(72814);const Go={specificRestricted:!1,externalizationRestricted:!1};var zo=i(98320);class Wo{constructor(e){this._localStorageAPI=e}setDevices(e){this._localStorageAPI.setItem(zo.M4,e)}getDevices(){const e=this._localStorageAPI.getItem(zo.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 i=this.getDevices();this.setDevices({...i,[e]:t})}updateDevice(e,t){if(!e)return;const i=this.getDevices();i?.[e]&&this.setDevices({...i,[e]:{...i[e],...t}})}removeDevice(e){if(!e)return;const t=this.getDevices();if(t){const{[e]:i,...n}=t;this.setDevices(n)}}}class Ko{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 Yo=e=>e?.filterFiles.map((e=>e.id))??[],qo=`${Gs.I_}/better-sound-filters/v1`;class Zo{_devicesCache=new Map;_deviceFiltersCache=new Map;_filterBytesCache=new Map;_inflightGetDevicesCache=new Ke.od;_inflightGetFiltersCache=new Ke.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 i=await t.arrayBuffer();if(!(i.byteLength>0))throw new Error(`CDN returned null for filter ${e.id}!`);{const t=new Uint8Array(i);this._filterBytesCache.set(e.id,t)}}}async getFilterBytesForDevice(e){const t=e.specificEnabled?.filterFiles||[],i=e.specificDisabled?.filterFiles||[],n=e.externalizationEnabled?.filterFiles||[],r=e.externalizationDisabled?.filterFiles||[],a=t.concat(i,n,r);await Promise.all(a.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(qo).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 i=this._deviceFiltersCache.get(e);if(i)return i;const n=(await this.getDevices()).get(e)??{brand:"",model:""},r=(await this._inflightGetFiltersCache.create(`getFiltersForDevice:${n.brand}:${n.model}`,(()=>this._builder.build().withoutMarket().withJsonContentType().withHost(qo).withPath(`/map-device-to-filters/?brand=${encodeURIComponent(n.brand)}&model=${encodeURIComponent(n.model)}&format=${t.version}`).send()))).body;await this.getFilterBytesForDevice(r);const a=r;return this._deviceFiltersCache.set(e,a),a}async getFilterDataForDevice(e,t,i,n){const r=await this.getFiltersForDevice(e,n);if(!r)throw new Error(`No filters exist for device ${e}`);const a=Yo(t?r.specificEnabled:r.specificDisabled);return{filterData:Yo(i?r.externalizationEnabled:r.externalizationDisabled).concat(a||[]).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 $o={specificEnabled:!1,externalizationEnabled:!1};class Qo{getCurrentAudioDeviceId(){return this._audioOutputDevicesApi.getDefaultDevice()?.id??null}constructor(e,t,i){this._audioOutputDevicesApi=e,this._devicePersister=t,this._externalAccessoryAPI=i}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):$o}setCurrentDevice(e,t=null){const i=this.getCurrentAudioDeviceId();if(null===e)return this._devicePersister.updateDevice(i,{headphoneDevice:void 0}),$o;const n=this._devicePersister.getDevice(i);return n?(this._devicePersister.updateDevice(i,{headphoneDevice:e}),null!==n.filterState?n.filterState:$o):(this._devicePersister.addDevice(i,{headphoneDevice:e,filterState:null,predictedState:t}),$o)}async predictDevice(e,t){const i=Array.from(t.values());let n=i.find((t=>t.deviceName.toLowerCase().includes(e.name.toLowerCase()))),r=null;if(!n&&e.transportType===wt.Yg.BLUETOOTH){const t=await this._externalAccessoryAPI.lookup(e.name);t.type===Ns.G.HEADPHONES&&t.brand&&t.model&&(n=i.find((e=>e.deviceName.toLowerCase().includes(t.model.toLowerCase())&&e.brand.toLowerCase().includes(t.brand.toLowerCase()))),r={predictedBrand:t.brand,predictedModel:t.model})}return{maybeDevice:n,predictedState:r}}}function Jo(e,t){return{specificEnabled:e.specificEnabled&&!t.specificRestricted,externalizationEnabled:e.externalizationEnabled&&!t.externalizationRestricted}}var Xo=i(58009);const el=e=>{const t=e?.item?.type,i=e?.item?.mediaType;switch(t){case He.c.CHAPTER:return"audiobook";case He.c.EPISODE:return"audio"===i?"audio_podcast":"unknown";case He.c.TRACK:return"track";default:return"unknown"}};class tl{async _initializeCurrentDevice(e){if(!e)return void this.setCurrentDevice(null);const t=this._devicePersister.getDevice(e?.id);if(t)return void this.setCurrentDevice(t.headphoneDevice);if(e.terminalType!==wt.FI.HEADPHONES&&e.transportType!==wt.Yg.BLUETOOTH)return void this.setCurrentDevice(null);const i=await this.getDevices(),{maybeDevice:n,predictedState:r}=await this._playbackFiltersDeviceService.predictDevice(e,i);this.setCurrentDevice(n??null,r)}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)}async setFilters(e){const t=this._playbackFiltersDeviceService.getCurrentDeviceState(),{specificEnabled:i,externalizationEnabled:n}=Jo(e,this._contentRestrictions);if(this._shouldOverrideNormalization&&(t?await this._puffin.enterProcessingEnvironment({}):await this._puffin.leaveProcessingEnvironment({})),!t||!i&&!n){try{await this._puffin.disableProcessing({})}finally{this._events.emit(Ho.n.UPDATE,{})}return}const r=t?.headphoneDevice.id,{filterData:a,deviceFilters:s}=await this._playbackFiltersService.getFilterDataForDevice(r,i,n,await this._puffin.libraryVersion({}));try{await this._puffin.filter(Fo.cj.fromPartial({filters:a,isO:i,isV:n}))}finally{((e,t,i,n)=>{const r=t.getState();e.send((0,Xo.v)({specific_enabled:i.specificEnabled,externalization_enabled:i.externalizationEnabled,specific_filter_id:i.specificEnabled?n.specificEnabled?.id:n.specificDisabled?.id,content_type:el(r),content_uri:r?.item?.uri,specific_enabled_revision:n.specificEnabled?.revision,format:n.externalizationEnabled?.format}))})(this._eventSender,this.__playerAPI,e,s),this._events.emit(Ho.n.UPDATE,{})}}async _currentDeviceFilterState(){const e=this._playbackFiltersDeviceService.getCurrentDeviceState(),t=(e?.headphoneDevice??null)?.id;return function(e,t,i,n,r){const a=e?.filterState??{specificEnabled:!1,externalizationEnabled:!1},s=e?.headphoneDevice??null,o=((e,t)=>({canTuneHeadphones:!(!e||!e.specificEnabled||t.specificRestricted)&&e.specificEnabled.filterFiles.length>0,canTuneStudio:!(!e||!e.externalizationEnabled||t.externalizationRestricted)&&e.externalizationEnabled.filterFiles.length>0}))(t,i);return{headphoneDevice:s,audioDevice:n.getDefaultDevice(),predictedState:e?.predictedState??null,isOnboarded:null!==e&&null!==e.filterState,currentState:Jo(a,i),contentRestrictions:i,toggleTuneHeadphones:e&&o.canTuneHeadphones?()=>r({specificEnabled:!a.specificEnabled,externalizationEnabled:a.externalizationEnabled}):null,toggleTuneStudio:e&&o.canTuneStudio?()=>r({specificEnabled:a.specificEnabled,externalizationEnabled:!a.externalizationEnabled}):null,setFilterState:e=>r(e)}}(e,t?await this._playbackFiltersService.getFiltersForDevice(t,await this._puffin.libraryVersion({})):null,this._contentRestrictions,this._audioOutputDevicesAPI,this.updateCurrentDeviceState.bind(this))}constructor(e,t,i,n,r,a,s){this._builder=e,this._puffin=t,this._localStorageAPI=i,this.__eventSender=n,this.__playerAPI=r,this._audioOutputDevicesAPI=a,this._externalAccessoryAPI=s,this._events=new Ho.G,this._contentRestrictions=Go,this._eventSender=this.__eventSender,this._playerAPI=this.__playerAPI,this._devicePersister=new Wo(this._localStorageAPI),this._playbackFiltersService=new Zo(e),this._playbackFiltersDeviceService=new Qo(this._audioOutputDevicesAPI,this._devicePersister,this._externalAccessoryAPI);const o=this._localStorageAPI.getItem(zo.UT);this._shouldOverrideNormalization=o instanceof Error||!o,this._puffin.subscribeToErrors({},(e=>console.error("Puffin service error!",e))),this._audioOutputDevicesAPI.getEvents().addListener(kt.B.DEVICE_CONNECTED,(async()=>{const e=this._audioOutputDevicesAPI.getDefaultDevice();await this._initializeCurrentDevice(e)})),((e,t)=>{let i={...Go};e.getEvents().addListener(Vo.gd.UPDATE,(({data:e})=>{const n=e?.item?.type,r=e?.item?.mediaType,a={...i};switch(n){case He.c.CHAPTER:case He.c.EPISODE:a.specificRestricted="video"===r||"mixed"===r,a.externalizationRestricted=!0;break;case He.c.TRACK:a.specificRestricted=!1,a.externalizationRestricted=!1;break;case He.c.UNKNOWN:break;default:a.specificRestricted=!0,a.externalizationRestricted=!0}i.specificRestricted===a.specificRestricted&&i.externalizationRestricted===a.externalizationRestricted||t(a),i=a}))})(this._playerAPI,(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){const i=this._playbackFiltersDeviceService.setCurrentDevice(e,t??null);return this.setFilters(i)}getSavedDevices(){const e=this._devicePersister.getDevices();return null===e?[]:Object.values(e).filter((e=>null!==e.filterState))}async removeCurrentDevice(){await this.setCurrentDevice(null);const e=this._audioOutputDevicesAPI.getDefaultDevice(),t=e?.id??null;this._devicePersister.removeDevice(t),this._initializeCurrentDevice(e),this._events.emit(Ho.n.UPDATE,{})}getFiltersEvents(){return this._events}isNormalizationOverriden(){return this._shouldOverrideNormalization}disableNormalizationOverride(){this._localStorageAPI.setItem(zo.UT,!0),this._shouldOverrideNormalization=!1,this._events.emit(Ho.n.NORMALIZATION_OVERRIDE_DISABLED,{})}isAvailable(){return!0}}var il=i(67275);var nl=i(94961);function rl(e){return Be.xd.fromPartial({uid:e.uid??"",uri:e.uri,metadata:e.metadata??{}})}function al({uri:e,url:t,nextPageUrl:i,items:n,metadata:r}){if(void 0!==t)return Be.hn.fromPartial({pageUrl:t,nextPageUrl:i,metadata:{...r,page_uri:e},isLoading:!0});if(void 0!==n)return Be.hn.fromPartial({tracks:n.map(rl),nextPageUrl:i,metadata:r,isLoading:!1});throw new Error("Invalid 'ContextPage' provided! Either 'url' or 'items' needs to be set.")}function sl(e){return Be.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 ol({uri:e,url:t,pages:i,metadata:n,restrictions:r}){return void 0!==i?Be.ob.fromPartial({uri:e,url:t,pages:i.map(al),metadata:n,restrictions:sl(r),isLoading:!1}):Be.ob.fromPartial({uri:e,url:t??`context://${e}`,metadata:n,isLoading:!0,restrictions:sl(r)})}function ll(e){return Be.xi.fromPartial({featureIdentifier:e.featureIdentifier??"",featureVersion:e.featureVersion??"",referrerIdentifier:e.referrerIdentifier??"",viewUri:e.viewURI??"",externalReferrer:e.externalReferrer??""})}function cl(e,{shuffle:t,repeat:i}){const n=Be.Vk.fromPartial({});return void 0!==t?n.shufflingContext={value:t}:(0,b.WB)(e.uri)&&(n.shufflingContext={value:!1}),void 0!==i?(n.repeatingContext={value:i!==il.p.REPEAT_NONE},n.repeatingTrack={value:i===il.p.REPEAT_TRACK}):(0,b.WB)(e.uri)&&(n.repeatingContext={value:!1},n.repeatingTrack={value:!1}),n}function ul(e,t){return Be.YH.fromPartial({skipTo:void 0!==t.skipTo?(i=t.skipTo,{pageUrl:i.pageURL??"",pageIndex:void 0!==i.pageIndex?{value:BigInt(i.pageIndex)}:void 0,trackUid:i.uid??"",trackUri:i.uri??"",trackIndex:void 0!==i.index?{value:BigInt(i.index)}:void 0}):void 0,seekTo:void 0!==t.seekTo?{value:BigInt(t.seekTo)}:void 0,playerOptionsOverride:cl(e,t)});var i}function dl({uri:e,url:t,nextPageUrl:i,items:n,metadata:r}){if(void 0!==t)return Ds.hn.fromPartial({pageUrl:t,nextPageUrl:i,metadata:{...r,page_uri:e},isLoading:!0});if(void 0!==n)return Ds.hn.fromPartial({tracks:n.map(rl),nextPageUrl:i,metadata:r,isLoading:!1});throw new Error("Invalid 'ContextPage' provided! Either 'url' or 'items' needs to be set.")}function ml({uri:e,url:t,pages:i,metadata:n,restrictions:r}){return void 0!==i?Ds.ob.fromPartial({uri:e,url:t,pages:i.map(dl),metadata:n,restrictions:sl(r),isLoading:!1}):Ds.ob.fromPartial({uri:e,url:t??`context://${e}`,metadata:n,isLoading:!0})}function pl(e){if(e)return"string"==typeof e?e.trim():e.value.trim()}const hl=(e=[])=>e.map((e=>{switch(e){case eo.YB.AVAILABLE_OFFLINE:return Ka.l98.AVAILABLE_OFFLINE;case eo.YB.IN_PROGRESS:return Ka.l98.IN_PROGRESS;case eo.YB.UNPLAYED:return Ka.l98.UNPLAYED;case eo.YB.ARTIST_NOT_BANNED:return Ka.l98.ARTIST_NOT_BANNED;case eo.YB.AVAILABLE:return Ka.l98.AVAILABLE;case eo.YB.NOT_BANNED:return Ka.l98.NOT_BANNED;case eo.YB.NOT_EPISODE:return Ka.l98.NOT_EPISODE;case eo.YB.NOT_EXPLICIT:return Ka.l98.NOT_EXPLICIT;case eo.YB.NOT_FULLY_PLAYED:return Ka.l98.NOT_FULLY_PLAYED;default:return(0,it.k)(e),Ka.l98.UNRECOGNIZED}}));function gl(e){if(void 0===e)return Ka.RHQ.NO_SORT;const{field:t,order:i}=e;switch(t){case eo.nw.TITLE:return i===eo.xB.DESC?Ka.RHQ.NAME_DESC:Ka.RHQ.NAME_ASC;case eo.nw.ADDED_AT:return i===eo.xB.DESC?Ka.RHQ.ADD_TIME_DESC:Ka.RHQ.ADD_TIME_ASC;case eo.nw.ADDED_BY:return i===eo.xB.DESC?Ka.RHQ.ADDED_BY_DESC:Ka.RHQ.ADDED_BY_ASC;case eo.nw.ALBUM:return i===eo.xB.DESC?Ka.RHQ.ALBUM_NAME_DESC:Ka.RHQ.ALBUM_NAME_ASC;case eo.nw.ARTIST:return i===eo.xB.DESC?Ka.RHQ.ARTIST_NAME_DESC:Ka.RHQ.ARTIST_NAME_ASC;case eo.nw.DURATION:return i===eo.xB.DESC?Ka.RHQ.DURATION_DESC:Ka.RHQ.DURATION_ASC;case eo.nw.SHOW_NAME:return i===eo.xB.DESC?Ka.RHQ.SHOW_NAME_DESC:Ka.RHQ.SHOW_NAME_ASC;case eo.nw.PUBLISH_DATE:return i===eo.xB.DESC?Ka.RHQ.PUBLISH_DATE_DESC:Ka.RHQ.PUBLISH_DATE_ASC;default:return(0,it.k)(t),Ka.RHQ.NO_SORT}}function fl(e){const t=hl(e?.filterPredicates);return e?.includeRecommendations||t.push(Ka.l98.NOT_RECOMMENDATION),Ka.bpJ.fromPartial({supportedPlaceholderTypes:[Ka.JaG.SHOW],textFilter:pl(e?.filter),sortBy:gl(e?.sort),showUnavailable:!0,range:void 0!==e?.offset||void 0!==e?.limit?{start:e?.offset,length:e?.limit}:void 0,boolPredicates:t})}function vl(e){if(e.error!==Be.wM.OK)throw new Error(`Command failed with code '${e.error}' and reasons '${e.reasons}'`);return{}}function yl(e){return Be.OU.fromPartial({commandInitiatedTime:{value:BigInt(Date.now())},interactionIds:e?.interactionId?[e.interactionId]:void 0,pageInstanceIds:e?.pageInstanceId?[e.pageInstanceId]:void 0})}async function bl(e,t,i,n,r,a){var s,o;t&&await(s=i.maybeResync(n.uri),o=750,Promise.race([s,new Promise((e=>setTimeout(e,o)))]));const l=Ka.wQe.fromPartial({playlistQuery:fl(n.playlistQueryOptions),context:ol(n),preparePlayOptions:ul(n,a),playOrigin:ll(r),loggingParams:yl(a.loggingParams)});return await e.play(l)}async function _l(e,t,i,n){return e.setQueue(Be.LC.fromPartial({nextTracks:t,prevTracks:i,queueRevision:BigInt(n),loggingParams:yl()}))}function El(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 Cl(e){return{milliseconds:(t=e,i=-1,t?parseInt(t,10):i)};var t,i}function xl(e){return"true"===e?.toLowerCase()}const Sl=9;function Al(e,t){if(void 0===e)return[];const i="artist_uri",n="artist_name",r=[{type:t,uri:e[i]??"",name:e[n]??""}];for(let a=1;a<=Sl;++a){const s=`${i}:${a}`,o=`${n}:${a}`;if(!e[s]||!e[o])break;r.push({type:t,uri:e[s]??"",name:e[o]??""})}return r}function Tl(e){return{type:He.c.ALBUM,uri:e.album_uri??"",name:e.album_title??"",images:El(e)}}function Il(e){return{type:He.c.SHOW,uri:e.album_uri??"",name:e.album_title??"",images:El(e)}}function Nl(e){return{type:He.c.ALBUM,uri:e.album_uri??"",name:e.album_title??"",images:El(e)}}function wl(e){return{type:He.c.AUDIOBOOK,uri:e.album_uri??"",name:e.album_title??"",images:El(e)}}function Rl(e,t){return(0,b.U_)(t.uri)||(0,b.Pk)(t.uri)?function(e,t){const i=t.metadata;return{type:He.c.TRACK,uri:t.uri,uid:t.uid,name:i.title??"",mediaType:i["media.type"]??"audio",duration:Cl(i.duration),album:Tl(i),artists:Al(i,He.c.ARTIST),isLocal:xl(i.is_local),isExplicit:xl(i.is_explicit),is19PlusOnly:xl(i.is_19_plus),hasAssociatedVideo:!!i.video_association,provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.album.images}}}(e,t):(0,b.gH)(t.uri)?function(e){return"true"===e.metadata.is_audiobook_chapter}(t)?function(e,t){const i=t.metadata;return{type:He.c.CHAPTER,uri:t.uri,uid:t.uid,name:i.title??"",mediaType:i["media.type"]??"audio",duration:Cl(i.duration),book:wl(i),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,isExplicit:xl(i.is_explicit),is19PlusOnly:xl(i.is_19_plus),get images(){return this.book.images}}}(e,t):function(e,t){const i=t.metadata;return{type:He.c.EPISODE,uri:t.uri,uid:t.uid,name:i.title??"",mediaType:i["media.type"]??"audio",duration:Cl(i.duration),show:Il(i),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,isExplicit:xl(i.is_explicit),is19PlusOnly:xl(i.is_19_plus),get images(){return this.show.images}}}(e,t):(0,b.AI)(t.uri)?function(e,t){const i=t.metadata,n=xl(i.is_podcast_advertisement),r=i.artist_name??null;return{type:He.c.AD,uri:t.uri,uid:t.uid,title:i.title??null,advertiser:n?r:i.advertiser??null,url:i.click_url??null,id:i.ad_id??null,mediaType:i["media.type"]??"audio",duration:Cl(i.duration),images:El(i),videoOrientation:i["ad.video_orientation"],isPodcastAd:n,isSkippableAd:xl(i["ad.is_skippable"]),isTestAd:xl(i["ad.is_test"]),provider:e.provider.length>0?e.provider:null,metadata:t.metadata}}(e,t):function(e,t){const i=t.metadata;return{type:He.c.UNKNOWN,uri:t.uri,uid:t.uid??null,name:i.title??"",mediaType:i["media.type"]??"audio",duration:Cl(i.duration),album:Nl(i),artists:Al(i,He.c.ARTIST),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.album.images}}}(e,t)}var kl=i(43425),Ol=i(67403);const Pl={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 Ll(e=[]){return e.map((e=>kl.D.includes(e)?e:"unknown"))}function jl(e){const t={};for(const i in e)(0,Ol.F)(i)&&(t[i]=Ll(e[i].reasons));return t}function Dl(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?.length??0),disallowPausingReasons:Ll(e.disallowPausingReasons),disallowResumingReasons:Ll(e.disallowResumingReasons),disallowSeekingReasons:Ll(e.disallowSeekingReasons),disallowSkippingPreviousReasons:Ll(e.disallowSkippingPrevReasons),disallowSkippingNextReasons:Ll(e.disallowSkippingNextReasons),disallowTogglingRepeatContextReasons:Ll(e.disallowTogglingRepeatContextReasons),disallowTogglingRepeatTrackReasons:Ll(e.disallowTogglingRepeatTrackReasons),disallowTogglingShuffleReasons:Ll(e.disallowTogglingShuffleReasons),disallowTransferringPlaybackReasons:Ll(e.disallowTransferringPlaybackReasons),disallowAddToQueueReasons:Ll(e.disallowAddToQueueReasons),disallowSetQueueReasons:Ll(e.disallowSetQueueReasons),disallowSettingPlaybackSpeedReasons:Ll(e.disallowSettingPlaybackSpeedReasons),disallowSignals:jl(e.disallowSignals)}}var Ml=i(40937);const Ul={bitrateLevel:Ml.Yn.UNKNOWN,strategy:Ml.ZT.UNKNOWN,targetBitrateLevel:Ml.Yn.UNKNOWN,targetBitrateAvailable:!1,losslessStatus:Ml.p4.NONE};function Bl(e){const t=e=>{switch(e){case Be.$E.LOW:return Ml.Yn.LOW;case Be.$E.NORMAL:return Ml.Yn.NORMAL;case Be.$E.HIGH:return Ml.Yn.HIGH;case Be.$E.VERY_HIGH:return Ml.Yn.VERY_HIGH;case Be.$E.HIFI:return Ml.Yn.LOSSLESS;case Be.$E.HIFI24:return Ml.Yn.LOSSLESS_24;default:return Ml.Yn.UNKNOWN}};return{bitrateLevel:t(e.bitrateLevel),strategy:(()=>{switch(e.strategy){case Be.Mc.BEST_MATCHING:return Ml.ZT.BEST_MATCHING;case Be.Mc.BACKEND_ADVISED:return Ml.ZT.BACKEND_ADVISED;case Be.Mc.OFFLINED_FILE:return Ml.ZT.OFFLINED_FILE;case Be.Mc.CACHED_FILE:return Ml.ZT.CACHED_FILE;case Be.Mc.LOCAL_FILE:return Ml.ZT.LOCAL_FILE;default:return Ml.ZT.UNKNOWN}})(),targetBitrateLevel:t(e.targetBitrateLevel),targetBitrateAvailable:e.targetBitrateAvailable,losslessStatus:(()=>{switch(e.hifiStatus){case Be.o_.UNRECOGNIZED:case Be.o_.NONE:default:return Ml.p4.NONE;case Be.o_.OFF:return Ml.p4.OFF;case Be.o_.ON:return Ml.p4.ON}})()}}var Fl=i(97277);var Hl=i(55109);function Vl(e){return new Hl.q3(function(e){switch(e){case Be.tE.SUCCESS:return Hl.Z9.SUCCESS;case Be.tE.PLAYBACK_STUCK:return Hl.Z9.PLAYBACK_STUCK;case Be.tE.PLAYBACK_ERROR:return Hl.Z9.PLAYBACK_ERROR;case Be.tE.LICENSE_CHANGE:return Hl.Z9.LICENSE_CHANGE;case Be.tE.PLAY_RESTRICTED:return Hl.Z9.PLAY_RESTRICTED;case Be.tE.STOP_RESTRICTED:return Hl.Z9.STOP_RESTRICTED;case Be.tE.UPDATE_RESTRICTED:return Hl.Z9.UPDATE_RESTRICTED;case Be.tE.PAUSE_RESTRICTED:return Hl.Z9.PAUSE_RESTRICTED;case Be.tE.RESUME_RESTRICTED:return Hl.Z9.RESUME_RESTRICTED;case Be.tE.SKIP_TO_PREV_RESTRICTED:return Hl.Z9.SKIP_TO_PREV_RESTRICTED;case Be.tE.SKIP_TO_NEXT_RESTRICTED:return Hl.Z9.SKIP_TO_NEXT_RESTRICTED;case Be.tE.SKIP_TO_NON_EXISTENT_TRACK:return Hl.Z9.SKIP_TO_NON_EXISTENT_TRACK;case Be.tE.SEEK_TO_RESTRICTED:return Hl.Z9.SEEK_TO_RESTRICTED;case Be.tE.TOGGLE_REPEAT_CONTEXT_RESTRICTED:return Hl.Z9.TOGGLE_REPEAT_CONTEXT_RESTRICTED;case Be.tE.TOGGLE_REPEAT_TRACK_RESTRICTED:return Hl.Z9.TOGGLE_REPEAT_TRACK_RESTRICTED;case Be.tE.SET_OPTIONS_RESTRICTED:return Hl.Z9.SET_OPTIONS_RESTRICTED;case Be.tE.TOGGLE_SHUFFLE_RESTRICTED:return Hl.Z9.TOGGLE_SHUFFLE_RESTRICTED;case Be.tE.SET_QUEUE_RESTRICTED:return Hl.Z9.SET_QUEUE_RESTRICTED;case Be.tE.INTERRUPT_PLAYBACK_RESTRICTED:return Hl.Z9.INTERRUPT_PLAYBACK_RESTRICTED;case Be.tE.ONE_TRACK_UNPLAYABLE:return Hl.Z9.ONE_TRACK_UNPLAYABLE;case Be.tE.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED:return Hl.Z9.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED;case Be.tE.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED:return Hl.Z9.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED;case Be.tE.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED:return Hl.Z9.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED;case Be.tE.QUEUE_REVISION_MISMATCH:return Hl.Z9.QUEUE_REVISION_MISMATCH;case Be.tE.VIDEO_PLAYBACK_ERROR:return Hl.Z9.VIDEO_PLAYBACK_ERROR;case Be.tE.VIDEO_GEOGRAPHICALLY_RESTRICTED:return Hl.Z9.VIDEO_GEORESTRICTED;case Be.tE.VIDEO_UNSUPPORTED_PLATFORM_VERSION:return Hl.Z9.VIDEO_UNSUPPORTED_PLATFORM_VERSION;case Be.tE.VIDEO_UNSUPPORTED_CLIENT_VERSION:return Hl.Z9.VIDEO_UNSUPPORTED_CLIENT_VERSION;case Be.tE.VIDEO_UNSUPPORTED_KEY_SYSTEM:return Hl.Z9.VIDEO_UNSUPPORTED_KEY_SYSTEM;case Be.tE.VIDEO_MANIFEST_DELETED:return Hl.Z9.VIDEO_MANIFEST_DELETED;case Be.tE.VIDEO_COUNTRY_RESTRICTED:return Hl.Z9.VIDEO_COUNTRY_RESTRICTED;case Be.tE.VIDEO_UNAVAILABLE:return Hl.Z9.VIDEO_UNAVAILABLE;case Be.tE.VIDEO_CATALOGUE_RESTRICTED:return Hl.Z9.VIDEO_CATALOGUE_RESTRICTED;case Be.tE.INVALID:return Hl.Z9.INVALID;case Be.tE.TIMEOUT:return Hl.Z9.TIMEOUT;case Be.tE.PLAYBACK_REPORTING_ERROR:return Hl.Z9.PLAYBACK_REPORTING_ERROR;case Be.tE.AUDIOBOOK_NOT_PLAYABLE:return Hl.Z9.AUDIOBOOK_NOT_PLAYABLE;case Be.tE.UNKNOWN:return Hl.Z9.UNKNOWN;case Be.tE.UNRECOGNIZED:default:return Hl.Z9.UNRECOGNIZED}}(e.code),e.data.reasons?e.data.reasons.split(","):[])}let Gl=!1;class zl extends Vo.JW{constructor(e,t){super(),this._client=e;let i=null,n=null;this._client.getState(Be.T1.fromPartial({prevTracksCap:{value:BigInt(0)},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?Dl(e.restrictions):Pl,previousItems:[],nextItems:[],playbackQuality:void 0!==e.playbackQuality?Bl(e.playbackQuality):Ul,playbackId:e.playbackId.length>0?(0,Fl.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=il.p.REPEAT_TRACK:e.options.repeatingContext?t.repeat=il.p.REPEAT_CONTEXT:t.repeat=il.p.REPEAT_NONE,t.smartShuffle=e.options.shufflingContext&&"RECOMMENDATION"===e.options.modes.context_enhancement),void 0!==e.track&&void 0!==e.track.contextTrack&&(t.item=Rl(e.track,e.track.contextTrack)),e.prevTracks.forEach((e=>{e.contextTrack&&t.previousItems.push(Rl(e,e.contextTrack))})),e.nextTracks.forEach((e=>{e.contextTrack&&t.nextItems.push(Rl(e,e.contextTrack))})),t}(e);e.timestamp===BigInt(0)?null===n&&(n=setTimeout((()=>{this.emit(Vo.gd.UPDATE,t)}),500)):(null!==n&&(clearTimeout(n),n=null),this.emit(Vo.gd.UPDATE,t),null!==i&&function(e,t){const i=e.contextUri===t.contextUri,n=e.sessionId===t.sessionId,r=(a=e.playbackId,s=t.playbackId,a.byteLength===s.byteLength&&a.every(((e,t)=>e===s[t])));var a,s;const o=t.isPaused,l=t.positionAsOfTimestamp?.value===BigInt(0);return i&&n?(o||(Gl=!0),!r&&Gl&&o&&l):(Gl=!1,!1)}(i,e)&&this.emit(Vo.gd.CONTEXT_WRAPAROUND,{contextURI:e.contextUri,previousItemURI:i.track?.contextTrack?.uri??null}),i=e)})),this._client.getError(Be.mc.fromPartial({}),(e=>{this.emit(Vo.gd.ERROR,Vl(e))}))}}var Wl=i(96766);class Kl{_queue=null;timeoutId=null;constructor(e,t,i,n){this._client=e,this._events=t,this.getRepeatMode=i,this._shouldRenderSecondRepeatedContextItemsIteration=n,this._client.getQueue(Be.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,Wl.RU)([],this.getRepeatMode(),this._shouldRenderSecondRepeatedContextItemsIteration)}convertQueueState(e,t){const i=e?.track&&e.track.contextTrack?Rl(e.track,e.track.contextTrack):null,n=this._queue?.nextTracks?.filter((e=>e.contextTrack)).map((e=>Rl(e,e.contextTrack)))??[],r=i?[i,...n]:n;return(0,Wl.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 Be.zz.fromPartial({...e,contextTrack:Be.xd.fromPartial({...e.contextTrack,metadata:{...e.contextTrack?.metadata,is_queued:"true"}}),provider:"queue"})}createQueueItem(e,t){return Be.zz.fromPartial({contextTrack:Be.xd.fromPartial({uri:e.uri,metadata:{is_queued:t.toString()}}),provider:t?"queue":"context"})}async addToQueue(e){if(null!==this._queue)if(1===e.length)await async function(e,{uid:t,uri:i}){return e.addToQueue(Be.jx.fromPartial({track:{uid:t??void 0,uri:i},loggingParams:yl()}))}(this._client,e[0]);else{const t=e.map((e=>this.createQueueItem(e,!0))),i=[...this._queue?.nextTracks||[]],n=i.map((e=>e.provider)).lastIndexOf("queue");i.splice(n+1,0,...t),await _l(this._client,i,this._queue.prevTracks,this._queue.queueRevision.toString())}}async removeFromQueue(e){null!==this._queue&&await _l(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 _l(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 i=[...this._queue?.nextTracks||[]];await _l(this._client,(0,Wl.jl)(e,i,t,this.isSameItem,this.isQueued,this.markAsQueued),this._queue.prevTracks,this._queue.queueRevision.toString())}async insertIntoQueue(e,t){if(null===this._queue)return;const i=[...this._queue?.nextTracks||[]];await _l(this._client,(0,Wl.Ry)(e,i,t,this.isSameItem,this.isQueued,this.createQueueItem),this._queue.prevTracks,this._queue.queueRevision.toString())}getQueue(){return this._queueState}getInternalQueue(){return this._queue}}const Yl=e=>(0,b.WB)(e);var ql=i(64642);var Zl=i(47769);function $l(e){return`context://${e}`}class Ql{_state=null;forcedShuffle=!1;constructor(e,t,i,n,r,a,s,o,l,c,u,d,m){this._prefs=e,this._contextPlayer=t,this._collection=i,this._playlistServiceClient=n,this._playlistPlayServiceClient=r,this._contextualShuffle=a,this._smartShuffleEligibility=s,this._defaultFeatureVersion=o,this._isLegacySmartShuffleEnabled=l,this._isResyncBeforePlayPlaylistEnabled=c,this._playlistResyncerAPI=u,this._shouldRenderSecondRepeatedContextItemsIteration=d,this._podcastPlaybackSpeedEndpoint=m,this._events=new zl(this._contextPlayer,50),this._queue=new Kl(this._contextPlayer,this._events,(()=>this._state?.repeat??il.p.REPEAT_NONE),this._shouldRenderSecondRepeatedContextItemsIteration),this._events.addListener(Vo.gd.UPDATE,(({data:e})=>{this._state=e,this.forcedShuffle&&e&&!1===e.shuffle&&e.restrictions.canToggleShuffle&&!Yl(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,i={}){const n={...i},r={...e};if("your_library"===t.featureIdentifier&&i.skipTo?.index){const e=Math.floor(i.skipTo.index/150),t={index:i.skipTo.index-150*e,pageIndex:e};n.skipTo={...n.skipTo,...t}}if(this.forcedShuffle&&!Yl(r.uri))n.shuffle=!0;else if(this._isLegacySmartShuffleEnabled){const e=(0,b.o_)(r.uri)?.type===b.NQ.COLLECTION;let t=r.uri;const i=await(this._contextualShuffle?.getContextualShuffleMode(r.uri))??bi.j.OFF;i===bi.j.SMART_SHUFFLE&&e&&(({lensUri:t}=await this._smartShuffleEligibility.getEligibility(r.uri)),r.url=$l((0,Zl.f0)(t,!0))),n.shuffle=(0,ql.C)(i),((e,t,i)=>{(0,b.tb)(e)?i.requestLenses(Ka.K02.fromPartial({uri:e,lenses:[{identifier:"enhance",active:t}]})):Promise.resolve(null)})(t,i===bi.j.SMART_SHUFFLE,this._playlistServiceClient)}if(this._events.emitPlaySync(r,t,n))return;this.setDefaultFeatureVersion(t);const a=(0,b.tb)(r.uri),s=(0,b.Z0)(r.uri)&&!r.uri.endsWith("your-episodes")||(0,b.KB)(r.uri)||(0,b.eW)(r.uri),o=!!r.url;s&&!o?await async function(e,t,i,n){const r=Ds.o$.fromPartial({sort:t.metadata?.[nl.W.LIST_UTIL_SORT],filter:t.metadata?.[nl.W.LIST_UTIL_FILTER],context:ml(t),preparePlayOptions:ul(t,n),playOrigin:ll(i),loggingParams:yl(n.loggingParams)}),a=(0,b.o_)(t.uri);return a?.type===b.NQ.COLLECTION_ARTIST?(r.id=a.id,await e.playArtist(r)):a?.type===b.NQ.COLLECTION_ALBUM?(r.id=a.id,await e.playAlbum(r)):await e.playTracks(r)}(this._collection,r,t,n):a&&!o?await bl(this._playlistPlayServiceClient,this._isResyncBeforePlayPlaylistEnabled,this._playlistResyncerAPI,r,t,n):await async function(e,t,i,n){return e.play(Be.kN.fromPartial({preparePlayRequest:Be.fQ.fromPartial({context:ol(t),playOrigin:ll(i),options:ul(t,n)}),loggingParams:yl(n.loggingParams)})).then(vl)}(this._contextPlayer,r,t,n)}async pause(){this._events.emitPauseSync()||await async function(e){return e.pause(Be.Uq.fromPartial({loggingParams:yl()})).then(vl)}(this._contextPlayer)}async resume(){this._events.emitResumeSync()||await async function(e){return e.resume(Be.dR.fromPartial({loggingParams:yl()})).then(vl)}(this._contextPlayer)}async skipToNext(e){this._events.emitSkipToNextSync()||await async function(e,t,i){const n={};return void 0!==i&&t&&(n.track=t.nextTracks.find((e=>(!i.uid||e.contextTrack?.uid===i.uid)&&e.contextTrack?.uri===i.uri))?.contextTrack),e.skipNext(Be.od.fromPartial({...n,loggingParams:yl()})).then(vl)}(this._contextPlayer,this._queue.getInternalQueue(),e)}async skipTo(e){this._events.emitSkipToNextSync()||await async function(e,t){const i={track:t};return e.skipNext(Be.od.fromPartial({...i,loggingParams:yl()})).then(vl)}(this._contextPlayer,rl(e))}async skipToPrevious(){this._events.emitSkipToPreviousSync()||await async function(e){return e.skipPrev(Be.iy.fromPartial({allowSeeking:!0,loggingParams:yl()})).then(vl)}(this._contextPlayer)}async seekTo(e){await async function(e,t,i=null){return e.seekTo(Be.vn.fromPartial({position:BigInt(Math.floor(t)),relative:Be.w8.BEGINNING,options:{onlyForPlaybackId:i??void 0},loggingParams:yl()})).then(vl)}(this._contextPlayer,e,this._state?.playbackId?(0,Fl.xJ)(this._state.playbackId):null)}async seekBy(e){await async function(e,t,i=null){return e.seekTo(Be.vn.fromPartial({position:BigInt(Math.floor(t)),relative:Be.w8.CURRENT,options:{onlyForPlaybackId:i??void 0},loggingParams:yl()})).then(vl)}(this._contextPlayer,e,this._state?.playbackId?(0,Fl.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(Be.Zb.fromPartial({shufflingContext:t,loggingParams:yl()})).then(vl)}(this._contextPlayer,this.forcedShuffle||e)}async setRepeat(e){await async function(e,t){let i=!1,n=!1;switch(t){case il.p.REPEAT_NONE:i=!1,n=!1;break;case il.p.REPEAT_CONTEXT:i=!0,n=!1;break;case il.p.REPEAT_TRACK:i=!0,n=!0}return e.setOptions(Be.y4.fromPartial({repeatingTrack:{value:n},repeatingContext:{value:i},loggingParams:yl()})).then(vl)}(this._contextPlayer,e)}async setSpeed(e){this._podcastPlaybackSpeedEndpoint!==Ct._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(Be.y4.fromPartial({playbackSpeed:t,loggingParams:yl()})).then(vl)}(this._contextPlayer,e)}async canPlayEncryptedContent(){return!0}async refreshCurrentContext(){}async updateContext(e,t,i){t&&async function(e,t,i,n){const{playlistQueryOptions:r,...a}=i;e.updateContext(Be.eM.fromPartial({sessionId:t,context:a,loggingParams:yl(n?.loggingParams)})).then(vl)}(this._contextPlayer,e,t,i)}async sendSignal(e){await async function(e,t,i){return e.signal(Be.gU.fromPartial({signalId:t,options:i,loggingParams:yl()}))}(this._contextPlayer,e)}canSendSignal(e){const t=this._state?.signals;return!!t&&(!(t.length<=0)&&t.includes(e))}async addToQueue(e){if(!this._events.emitQueueActionSync(Vo.UC.ADD))try{await this._queue.addToQueue(e),this._events.emitQueueActionComplete(Vo.UC.ADD)}catch(e){throw this._events.emitQueueActionComplete(Vo.UC.ADD,e instanceof Error?e:new Error("Unknown error object")),e}}async removeFromQueue(e){if(!this._events.emitQueueActionSync(Vo.UC.REMOVE))try{await this._queue.removeFromQueue(e),this._events.emitQueueActionComplete(Vo.UC.REMOVE)}catch(e){throw this._events.emitQueueActionComplete(Vo.UC.REMOVE,e instanceof Error?e:new Error("Unknown error object")),e}}async clearQueue(){if(!this._events.emitQueueActionSync(Vo.UC.CLEAR))try{await this._queue.clearQueue(),this._events.emitQueueActionComplete(Vo.UC.CLEAR)}catch(e){throw this._events.emitQueueActionComplete(Vo.UC.CLEAR,e instanceof Error?e:new Error("Unknown error object")),e}}async reorderQueue(e,t){if(!this._events.emitQueueActionSync(Vo.UC.REORDER))try{await this._queue.reorderQueue(e,t),this._events.emitQueueActionComplete(Vo.UC.REORDER)}catch(e){throw this._events.emitQueueActionComplete(Vo.UC.REORDER,e instanceof Error?e:new Error("Unknown error object")),e}}async insertIntoQueue(e,t){if(!this._events.emitQueueActionSync(Vo.UC.INSERT))try{await this._queue.insertIntoQueue(e,t),this._events.emitQueueActionComplete(Vo.UC.INSERT)}catch(e){throw this._events.emitQueueActionComplete(Vo.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=>rl(e)));await async function(e,t,i){await e.playAsNextInQueue(Be.bf.fromPartial({tracks:t,options:i,loggingParams:yl()}))}(this._contextPlayer,t)}}var Jl=i(51135);var Xl=i(13526),ec=i(4868),tc=i(88756),ic=i(70763),nc=i(21632),rc=i(14964),ac=i(66787);class sc extends ac.N{_subscriptions=new Map;constructor(e){super(),this._dataClient=e}onBatchChanged(e){this._subscriptions.forEach(((t,i)=>{e.has(i)||(t.cancel(),this._subscriptions.delete(i))})),e.forEach(((e,t)=>{this._subscriptions.has(t)||this._dataClient.subscribe({uri:t,query:Ka.bpJ.fromPartial({range:{start:0,length:0},updateThrottlingMs:100,showUnavailable:!0}),policy:{playlist:Ka.fu_.fromPartial({name:!0,description:!0,picture:!0}),item:void 0,track:void 0,episode:void 0}},(()=>{this.emit(rc.Lj.UPDATE,{uri:t})}))}))}}function oc(e){return Object.prototype.hasOwnProperty.call(e,"uid")}function lc(e){const{before:t,after:i}=e;return"start"===t?{before:"start"}:void 0!==t?{before:oc(t)?t.uid:t.uri}:"end"===i?{after:"end"}:void 0!==i?{after:oc(i)?i.uid:i.uri}:{}}const cc=Ka.gop.fromPartial({username:!0,link:!0,name:!0,image:!0,thumbnail:!0,color:!0}),uc=Ka.fu_.fromPartial({link:!0,name:!0,loaded:!0,totalLength:!0,duration:!0,description:!0,picture:!0,playable:!0,canReportAnnotationAbuse:!0,followers:!0,ownedBySelf:!0,published:!0,formatListType:!0,formatListAttributes:!0,containsSpotifyTracks:!0,containsTracks:!0,containsEpisodes:!0,owner:cc,madeFor:cc,allows:{insert:!0,remove:!0},numberOfEpisodes:!0,numberOfTracks:!0,collaboratingUsers:{count:!0,limit:5,collaborator:{user:cc,numberOfItems:!0,numberOfTracks:!0,numberOfEpisodes:!0,isOwner:!0}},basePermission:!0,userCapabilities:!0,extension:[],lenses:!0,lengthIgnoringTextFilter:!0,numberOfItemsPerLinkType:!0,unrangedLength:!0}),dc=Ka.fu_.fromPartial({unrangedLength:!0}),mc=Ka.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:[Ka.UHM.VIDEO_ASSOCIATIONS]}),pc=Ka.ycN.fromPartial({link:!0,name:!0,covers:!0}),hc=Ka.Sdk.fromPartial({link:!0,name:!0}),gc=Ka.oUG.fromPartial({track:mc,rowId:!0,addTime:!0,formatListAttributes:!0,addedBy:cc,album:{album:pc,artist:hc},artist:hc}),fc=Ka.q$c.fromPartial({link:!0,length:!0,name:!0,number:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,publishDate:!0,extension:[Ka.UHM.PODCAST_SUBSCRIPTIONS],is19PlusOnly:!0,isBookChapter:!0,isPodcastShort:!0,covers:!0,description:!0}),vc=Ka.QVI.fromPartial({link:!0,name:!0,covers:!0,isMusicAndTalk:!0,extension:[],isBook:!0}),yc=Ka.C4N.fromPartial({episode:fc,rowId:!0,addTime:!0,formatListAttributes:!0,addedBy:cc,show:vc,signals:!0,isRecommendation:!0,playedState:{playable:!0,timeLeft:!0}}),bc=Ka.MTo.fromPartial({uri:!0,collectionState:!0,extensionPolicy:[{linkType:Ka.JaG.SHOW,extension:Ka.UHM.SHOW_ACCESS},{linkType:Ka.JaG.SHOW,extension:Ka.UHM.COVER_IMAGE},{linkType:Ka.JaG.SHOW,extension:Ka.UHM.AUDIOBOOK_SPECIFICS},{linkType:Ka.JaG.SHOW,extension:Ka.UHM.PLAYABILITY},{linkType:Ka.JaG.SHOW,extension:Ka.UHM.SHOW_V4},{linkType:Ka.JaG.SHOW,extension:Ka.UHM.HTML_DESCRIPTION},{linkType:Ka.JaG.SHOW,extension:Ka.UHM.PODCAST_RATING},{linkType:Ka.JaG.SHOW,extension:Ka.UHM.AUDIOBOOK_GENRE}]}),_c=Ka.NYH.fromPartial({addTime:!0,folder:{rowId:!0,link:!0,name:!0,rows:!0}}),Ec=Ka.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}}),Cc=Ka.q5f.fromPartial({folder:{folder:{rows:!0}},playlist:{playlist:{ownedBySelf:!0}}}),xc=Ka.q5f.fromPartial({folder:_c,playlist:Ec});var Sc=i(92482);function Ac(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 Tc(e){return e?{type:He.c.USER,uri:e.link,username:e.username,displayName:e.displayName,images:Ac(e)}:null}function Ic(e){return e?new Date(1e3*e):null}function Nc(e){return e.reduce(((e,t)=>(e[t.key]=t.value,e)),{})}function wc(e){return{milliseconds:e}}function Rc(e){return{isOwner:e.isOwner,tracksAdded:e.numberOfItems,user:e.user&&Tc(e.user)}}function kc(e){return{isOwner:e.isOwner,tracksAdded:e.numTracks,user:e.user&&Tc(e.user)}}function Oc(e,t){return t&&t.basePermissionLevel!==Ka.e6Z.CONTRIBUTOR?{count:t?.numTotalMembers||0,items:(t?.members||[]).map(kc)}:{count:e?.count||0,items:(e?.collaborator||[]).map(Rc)}}function Pc(e){return!e||!Sc.E.includes(e)}function Lc(e,t,i,n=[]){return{type:He.c.PLAYLIST,uri:e.link,name:e.name,description:e.description,images:Ac(e.pictures),madeFor:Tc(e.madeFor),owner:Tc(e.owner),totalLength:t?.unrangedLength??e.totalLength,unfilteredTotalLength:e.lengthIgnoringTextFilter,totalLikes:t?.numFollowers??null,duration:t?.duration?(c=t.duration,{milliseconds:1e3*Number(c),isEstimate:!1}):null,isLoaded:e.isLoaded,isOwnedBySelf:e.ownedBySelf,isPublished:e.published,hasEpisodes:t?.containsEpisodes??null,hasSpotifyTracks:t?.containsSpotifyTracks??null,hasSpotifyAudiobooks:!!t?.numberOfItemsPerLinkType?.find((({linkType:e})=>e===Ka.JaG.SHOW))?.numItems,canAdd:e.allows?.canInsert??!1,canRemove:e.allows?.canRemove??!1,canPlay:t?.playable??null,formatListData:(o=e.formatListType,l=e.formatListAttributes,o?{type:o,attributes:Nc(l)}:null),canReportAnnotationAbuse:e.canReportAnnotationAbuse,hasDateAdded:Pc(e.formatListType),permissions:(r=t?.userCapabilities,a=t?.collaborators,s=t?.basePermission,r||a||s?{canView:!!r?.canView,canAdministratePermissions:r?.canAdministratePermissions||!1,canCancelMembership:r?.canCancelMembership||!1,isPrivate:s?.permissionLevel===Ka.e6Z.BLOCKED}:null),collaborators:Oc(t?.collaborators,i),appliedLenses:n};var r,a,s,o,l,c}function jc(e){return{type:He.c.ARTIST,uri:e.link,name:e.name}}function Dc(e){return{type:He.c.ARTIST,uri:e.link,name:e.name}}function Mc(e){return e?{type:He.c.ALBUM,uri:e.link,name:e.name,artist:e.artist&&Dc(e.artist),images:Ac(e.covers)}:null}function Uc(e,t){const i=Va(e.extension);return{type:He.c.TRACK,uri:e.link,name:e.name,album:Mc(e.album),artists:e.artist.map(jc),discNumber:e.discNumber,trackNumber:e.trackNumber,duration:wc(1e3*e.length),isExplicit:e.isExplicit,isLocal:e.isLocal,isPlayable:t.isPlayable,is19PlusOnly:e.is19PlusOnly,hasAssociatedVideo:(i.videoAssociations?.videoAssociation?.length||0)>0}}function Bc(e,t){return{type:He.c.SHOW,uri:e.link,name:e.name,publisher:e.publisher,images:Ac(e.covers),mediaType:t}}function Fc(e){return{isPaywalled:e.podcastSubscription?.isPaywalled??!1,isUserSubscribed:e.podcastSubscription?.isUserSubscribed??!1}}function Hc(e,t){let i=ji.M.Unknown;return i=t.isPlayed?ji.M.Completed:t.timeLeft<e.length?ji.M.InProgress:ji.M.NotStarted,{timeLeft:wc(1e3*t.timeLeft),state:i}}function Vc(e,t){const i=Va(e.extension);return{type:He.c.EPISODE,uri:e.link,name:e.name,description:e.description,duration:wc(1e3*e.length),playedState:Hc(e,t),images:Ac(e.covers),isExplicit:e.isExplicit,isPlayable:t.isPlayable,languages:[e.language],release:(n=e.publishDate,{date:Ic(Number(n)).toISOString(),precision:"day"}),show:Bc(e.show,e.mediaTypeEnum),podcastSubscription:Fc(i),is19PlusOnly:e.is19PlusOnly};var n}var Gc=i(79787),zc=i(94901),Wc=i(41546);function Kc(e){return{isPaywalled:e.podcastSubscription?.isPaywalled??!1,isUserSubscribed:e.podcastSubscription?.isUserSubscribed??!1}}function Yc(e){return e?.audiobookSpecifics?.credits?.narrators.map((e=>e.name))??[]}function qc(e){return e.is19PlusOnly?{label:Gc.x7.NineteenPlus}:e.isExplicit?{label:Gc.x7.Explicit}:{label:Gc.x7.Unknown}}function Zc(e){return void 0===e?[]:function(...e){return e.filter((({url:e})=>e)).map((({url:e,width:t,height:i})=>({url:e,width:t,height:i})))}({url:e.standardLink,width:300,height:300},{url:e.smallLink,width:64,height:64},{url:e.largeLink,width:640,height:640})}function $c(e,t){const i=e.length-t.timeLeft;return{playPositionMilliseconds:1e3*i,playPosition:i,state:t.isPlayed?Gc._w.Completed:Gc._w.NotStarted}}function Qc(e){if(!e.publishDate)return null;const t=1e3*Number(e.publishDate);return{isoString:new Date(t).toISOString()}}function Jc(e){return e.mediaTypeEnum===Ka.Cix.VODCAST||e.mediaTypeEnum===Ka.Cix.VIDEO?[zc.Cx.Audio,zc.Cx.Video]:e.mediaTypeEnum===Ka.Cix.AUDIO?[zc.Cx.Audio]:[]}function Xc(e,t){if(!e||!t)throw new Error("Error while constructing chapter metadata");const i=Va(e.extension);return{type:He.c.CHAPTER,uri:e.link,name:e.name,duration:{milliseconds:1e3*e.length},description:e.description,coverArt:Zc(e.covers)??[],audio:{items:[]},audioPreview:null,htmlDescription:i.htmlDescription?.htmlDescription||"",sharingInfo:null,contentRating:qc(e),playedState:$c(e,t),book:tu(e.show),playability:eu(t,i),isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly}}function eu(e,t){const i=!!t?.podcastSubscription?.isPaywalled;return{playable:i?!!t?.podcastSubscription?.isUserSubscribed:e.isPlayable,reason:i?zc.Uk.PaymentRequired:zc.Uk.Unknown}}function tu(e){return e?{uri:e.link,name:e.name,coverArt:Zc(e.covers)??[],trailer:null}:null}function iu(e,t){if(!e||!t)throw new Error("Error while constructing episode");const i=Va(e.extension);return{type:He.c.EPISODE,uri:e.link,name:e.name,description:e.description,htmlDescription:i.htmlDescription?.htmlDescription||"",episodeType:Gc.I_.Unknown,coverArt:Zc(e.covers)??[],playedState:$c(e,t),mediaTypes:Jc(e),audio:{items:[]},audioPreview:null,sharingInfo:null,segmentsCount:i.podcastSegments?.playbackSegments.length||0,podcast:(n=e.show,n?{uri:n.link,name:n.name,coverArt:Zc(n.covers)??[],trailer:null,showTypes:[]}:null),podcastSubscription:Kc(i),releaseDate:Qc(e),playability:eu(t),contentRating:qc(e),duration:{milliseconds:1e3*e.length},contentInformation:i.contentInformation||null,transcript:i.transcripts?.transcripts||null};var n}const nu=e=>{switch(e){case c.j8.TRAILER:return zc.t5.TRAILER;case c.j8.CONTINUE_LISTENING:return zc.t5.CONTINUE_LISTENING;case c.j8.LATEST_PUBLISHED:return zc.t5.LATEST_PUBLISHED;case c.j8.UP_NEXT:return zc.t5.UP_NEXT;case c.j8.FIRST_PUBLISHED:return zc.t5.FIRST_PUBLISHED;default:return zc.t5.UNKNOWN}};function ru(e){if(e?.item)return{type:nu(e.label),data:iu(e.item.episodeMetadata,e.item.episodePlayState)}}function au(e){const t=e.auxiliarySections?.trailerSection?.item,i=t?function(e){const t=e.episodeMetadata,i=e.episodePlayState;if(!t||!i)throw new Error("Error while constructing trailer");return{type:He.c.EPISODE,uri:t.link,name:t.name,coverArt:Zc(t.covers)??[],audio:{items:[]},audioPreview:null,sharingInfo:null,duration:{milliseconds:1e3*t.length},contentRating:qc(t),mediaTypes:Jc(t)}}(t):null,n=e.header?.showMetadata;if(!n)throw new Error("Error while constructing podcast metadata");const r=Va(n.extension),a=(0,Wc.E)(r.showAccess?.unlockedBy);return{type:He.c.SHOW,uri:n.link,name:n.name,description:n.description||"",htmlDescription:r.htmlDescription?.htmlDescription||"",coverArt:Zc(n.covers)??[],trailer:i,topics:r.podcastTopics?.topics||[],podcastType:(o=n,o.isMusicAndTalk?"SHOW":"PODCAST"),showTypes:[],publisherName:n.publisher,consumptionOrder:(s=n.consumptionOrder,"sequential"===s?"sequential":"episodic"===s?"episodic":"recent"),nextBestEpisode:ru(e.auxiliarySections?.nextBestEpisodeSection),gatedContentAccessReason:a,isLocked:null===a,rating:r?.rating};var s,o}function su(e,t){return{text:e,type:t}}function ou(e){const t=!1===e?.isUserMemberOfAtLeastOneGroup,i=e?.unlockedBy?.includes(Vi.UG.ABP);return t&&!i}function lu(e){return e.map((e=>({uri:e.destinationUri,title:e.contextualName})))}function cu(e){const t=e.auxiliarySections?.trailerSection?.item,i=t?function(e){const t=e.episodeMetadata,i=e.episodePlayState;if(!t||!i)throw new Error("Error while constructing sample");return{type:He.c.CHAPTER,uri:t.link,name:t.name,coverArt:Zc(t.covers)??[],audio:{items:[]},audioPreview:null,sharingInfo:null,duration:{milliseconds:1e3*t.length},contentRating:qc(t),isPlayable:e.episodePlayState?.isPlayable??!1}}(t):null,n=e.header?.showMetadata;if(!n)throw new Error("Error while constructing book metadata");const r=Va(n.extension),a=Yc(r);return{isPreRelease:!1,type:He.c.AUDIOBOOK,uri:n.link,name:n.name,coverArt:Zc(n.covers)??[],authorName:n.publisher,narrators:a,sample:i,htmlDescriptionPlain:r.htmlDescription?.htmlDescription,rating:r?.rating,isExplicit:n.isExplicit,duration:Number(r.audiobookSpecifics?.duration_ms),copyrights:(s=r.audiobookSpecifics?.credits?.publishers?.map((e=>e.name))??[],o=n.copyright,[...s.map((e=>su(e,"P"))),...o.map((e=>su(e,"C")))]),publishDate:r.audiobookSpecifics?.publish_date,price:r?.audiobookPrice,isLocked:ou(r?.showAccess),consumptionCapExplanation:r.showAccess?.consumptionCapped,signifierText:r.showAccess?.signifier?.text,resumeEpisodeLink:e.header?.showPlayState?.resumeEpisodeLink,topics:r.audiobookGenres?lu(r.audiobookGenres.genres):[]};var s,o}function uu(e){return e?.prerelease?.entity?.copyright.map((e=>{let t;switch(e.type){case In.COPYRIGHT_TYPE_P:t="P";break;case In.COPYRIGHT_TYPE_C:t="C";break;default:t=null}return{text:e.text??"",type:t}})).filter((e=>!!e.type&&!!e.text))??[]}function du(e,t){const i=Va(t);return{type:He.c.AUDIOBOOK,images:i.coverImage?.coverImages.map((e=>({url:`https://i.scdn.co/image/${(0,Fl.U5)(e.fileId)}`,width:e.width,height:e.height})))??[],name:i.audiobookSpecifics?.main_title||"",uri:e,durationMs:Number(i.audiobookSpecifics?.duration_ms)||0,authorName:i.audiobookSpecifics?.credits?.authors?.map((e=>e.name)).join(g.Ru.getSeparator())||"",isLocked:ou(i.showAccess),isExplicit:i.showV4?.explicit,isOutOfMarket:!1===i.playability?.isPlayable&&i.playability?.reason===sr.PLAYABILITY_VERDICT_COUNTRY_RESTRICTED,consumptionCapExplanation:i.showAccess?.consumptionCapped,description:i.htmlDescription?.htmlDescription,signifierText:i.showAccess?.signifier?.text,rating:{average:i.rating?.averageRating?.average,showAverage:!!i.rating?.averageRating?.showAverage},topics:i.audiobookGenres?.genres?.map((e=>({uri:e.destinationUri,title:e.contextualName})))??[]}}function mu(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:(i=e.addTime,Ic(i)?.toISOString()??null),addedBy:Tc(e.addedBy),formatListAttributes:Nc(e.formatListAttributes)};var i;return void 0!==e.trackMetadata&&void 0!==e.trackPlayState?{...t,...Uc(e.trackMetadata,e.trackPlayState)}:void 0!==e.episodeMetadata&&void 0!==e.episodePlayState?{...t,...Vc(e.episodeMetadata,e.episodePlayState)}:void 0===e.trackMetadata&&void 0===e.episodeMetadata&&void 0!==e.extension?{...t,...du(e.uri,e.extension)}:null}(e))),offset:t||0,limit:e.item.length,totalLength:e.unrangedLength}}function pu(e){return e.some((e=>e.uid.length>0))?{rows:e.map((e=>e.uid))}:{uris:e.map((e=>e.uri))}}function hu(e){const t=e?.statusCode??0;if(t<200||t>299)throw new Error(e?.reason??"Unknown error!")}class gu{constructor(e,t,i,n,r,a){this._playlistDataClient=e,this._playlistServiceClient=t,this._smartShuffleEligibilityAPI=i,this._builder=n,this._isAudiobookCurationEnabled=r,this._resyncAPI=a,this._events=new sc(e)}getCapabilities(){return{canSort:!0,canFilter:!0,canModifyOffline:!0,canMoveMultipleItems:!0,canFetchAllTracks:!0,canDecorateAddedBy:!0,hasUidsGeneratedFromIndicies:!1,canAddAudiobooks:this._isAudiobookCurationEnabled}}getEvents(){return this._events}async getPlaylist(e,t,i){t?.withSync&&this.resync(e);const n=!i||0!==i.limit,r=this._playlistDataClient.get({uri:e,query:fl(i),policy:Ka.gXE.fromPartial({playlist:uc,track:n?gc:void 0,episode:n?yc:void 0,item:n?bc:void 0})});let a=Promise.resolve(null);t?.hydrateCollaboratorsWithMembers&&(a=this._playlistServiceClient.getMembers(Ka.zOt.fromPartial({uri:e})));const[s,o]=await Promise.all([r,a]);if(403===s.status?.statusCode)return function(e){return{metadata:{type:He.c.PLAYLIST,uri:e,name:"",description:"",images:[],madeFor:null,owner:{type:He.c.USER,uri:"",username:"",displayName:"",images:[]},totalLength:0,unfilteredTotalLength:0,totalLikes:null,duration:null,isLoaded:!1,isOwnedBySelf:!1,isPublished:!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 l=s.data,c=s.data?.playlist?.playlistMetadata,u=o?.response,d=s.data?.playlist?.lenses?.appliedLenses.map((e=>e.name));if(!l||!c)throw new Error("Invalid playlist or members response!");return function(e,t,i,n){return{metadata:Lc(e,t,i,n),contents:mu(t)}}(c,l,u,d)}async getContents(e,t){return mu((await this._playlistDataClient.get({uri:e,query:fl(t),policy:Ka.gXE.fromPartial({playlist:dc,track:gc,episode:yc,item:bc})})).data)}async getMetadata(e,t){return(await this.getPlaylist(e,t,{offset:0,limit:0})).metadata}async resync(e){await this._resyncAPI.resync(e)}async add(e,t,i,n){if(!this._events.emitAddSync(e,t,n))try{hu((await this._playlistServiceClient.modify(Ka.oVT.fromPartial({uri:e,request:Ka.Eas.fromPartial({operation:"add",uris:t,...lc(i)})}))).status),this._events.emitAddComplete(e,null,t,n)}catch(i){throw this._events.emitAddComplete(e,(0,nc.z)(i),t,n),i}}async move(e,t,i){if(!this._events.emitMoveSync(e,t))try{hu((await this._playlistServiceClient.modify(Ka.oVT.fromPartial({uri:e,request:Ka.Eas.fromPartial({operation:"move",rows:t.map((e=>e.uid)),...lc(i)})}))).status),this._events.emitMoveComplete(e,null,t)}catch(i){throw this._events.emitMoveComplete(e,(0,nc.z)(i),t),i}}async remove(e,t){if(!this._events.emitRemoveSync(e,t))try{hu((await this._playlistServiceClient.modify(Ka.oVT.fromPartial({uri:e,request:Ka.Eas.fromPartial({operation:"remove",...pu(t)})}))).status),this._events.emitRemoveComplete(e,null,t)}catch(i){throw this._events.emitRemoveComplete(e,(0,nc.z)(i),t),i}}async uploadImage(e){return(0,ic.V)(this._builder,e)}async setAttributes(e,t){hu((await this._playlistServiceClient.modify(Ka.oVT.fromPartial({uri:e,request:{operation:"set",attributes:t}}))).status)}async clearAttributes(e,t){hu((await this._playlistServiceClient.modify(Ka.oVT.fromPartial({uri:e,request:{operation:"clear",attributesToClear:t}}))).status)}async updateDetails(e,t){if(this._events.emitUpdateSync(e,t))return;const i={},n=[];if("name"in t){if(!t.name)throw Error("Can not set empty playlist name!");i.name=t.name}"description"in t&&(void 0===t.description||""===t.description?n.push(2):i.description=t.description);let r=null;if(t.imageUploadToken){const i=(0,b.o_)(e).id;r=await(0,tc.H)(this._builder,i,t.imageUploadToken)}null!==r?i.picture=(0,Fl.U5)(r):null===t.imageUploadToken&&n.push(3);try{Object.keys(i).length>0&&await this.setAttributes(e,i),n.length>0&&await this.clearAttributes(e,n),this._events.emitUpdateComplete(e,null,t)}catch(i){throw this._events.emitUpdateComplete(e,(0,nc.z)(i),t),i}}async _getLensedPlaylistUri(e){if((0,b.Z0)(e)){const{lensUri:t}=await this._smartShuffleEligibilityAPI.getEligibility(e);return t}return e}async requestLenses(e,t,i){await this._playlistServiceClient.requestLenses(Ka.K02.fromPartial({uri:e,lenses:[{identifier:t,active:i}]}))}async sendSignal(e,t,i){if(this._events.emitSendSignalSync(e,t,i))return;const n=await this._getLensedPlaylistUri(e);try{hu((i?await this._playlistServiceClient.signalItem(Ka.$zj.fromPartial({itemUri:n,itemId:i,signal:{identifier:t}})):await this._playlistServiceClient.signal(Ka.Kue.fromPartial({listUri:n,signal:{identifier:t}}))).status),this._events.emitSendSignalComplete(e,t,i)}catch(n){this._events.emitSendSignalComplete(e,t,i,(0,nc.z)(n))}}async resolvePlaylistFormatURI(e){return(0,ec._)(this._builder,e)}async getRecommendedTracks(e,t,i){return await(0,Xl.u)(this._builder,e,t,i)}async getRecommendedBookUris(e,t,i){return await(0,Xl.w)(this._builder,e,t,i)}}var fu=i(70672),vu=i(55090);function yu(e=Ka.e6Z.UNKNOWN){switch(e){case Ka.e6Z.UNKNOWN:return"UNKNOWN";case Ka.e6Z.BLOCKED:return"BLOCKED";case Ka.e6Z.CONTRIBUTOR:return"CONTRIBUTOR";case Ka.e6Z.VIEWER:return"VIEWER";case Ka.e6Z.UNRECOGNIZED:return"UNKNOWN";default:return(0,it.d)(e),"UNKNOWN"}}function bu(e){switch(e){case"UNKNOWN":return Ka.e6Z.UNKNOWN;case"BLOCKED":return Ka.e6Z.BLOCKED;case"CONTRIBUTOR":return Ka.e6Z.CONTRIBUTOR;case"VIEWER":return Ka.e6Z.VIEWER;default:return(0,it.d)(e),Ka.e6Z.UNKNOWN}}function _u(e){return{canView:e?.canView??!1,canAdministratePermissions:e?.canAdministratePermissions??!1,canEditMetadata:e?.canEditMetadata??!1,canEditItems:e?.canEditItems??!1,canCancelMembership:e?.canCancelMembership??!1}}function Eu(e){return{isFollowed:e.followState===Ka.$NQ.CAN_BE_UNFOLLOWED,isOwner:e.isOwner,permissionLevel:yu(e.permissionLevel),user:e.user&&Tc(e.user),songsAdded:e.numTracks}}function Cu(e=[]){return e.map(Eu)}class xu{constructor(e,t){this._client=e,this._builder=t,this._events=new fu.KD}getCapabilities(){return{}}getEvents(){return this._events}async getPermissionGrant(e,t){const i={operation:fu.mA.GET_PERMISSION_GRANT,uri:e};this._events.emitOperationSync(i);try{const n=await(0,vu.S1)(this._builder,e,t);return this._events.emitOperationComplete(i),n}catch(e){throw this._events.emitOperationComplete(i,(0,nc.z)(e)),e}}async claimPermissions(e,t){const i={operation:fu.mA.CLAIM_PERMISSION,uri:e,token:t};this._events.emitOperationSync(i);try{const n=await(0,vu.f5)(this._builder,e,t);return this._events.emitOperationComplete(i),n}catch(e){throw this._events.emitOperationComplete(i,(0,nc.z)(e)),e}}async getMembers(e){const t=(await this._client.getMembers({uri:e,limit:void 0})).response;return{basePermissionLevel:yu(t?.basePermissionLevel),capabilities:_u(t?.capabilities),members:Cu(t?.members)}}subscribeToMembers(e,t){return this._client.subscribeToMembers({uri:e,limit:void 0},(e=>{const i=e.response,n={basePermissionLevel:yu(i?.basePermissionLevel),capabilities:_u(i?.capabilities),members:Cu(i?.members)};t(null,n)})).cancel}async removeMember(e,t){const i={operation:fu.mA.REMOVE_MEMBER,uri:e,username:t};this._events.emitOperationSync(i);try{await this._client.setMemberPermission({playlistUri:e,username:t,permissionLevel:Ka.e6Z.UNKNOWN,timeoutMs:1e3}),this._events.emitOperationComplete(i)}catch(e){throw this._events.emitOperationComplete(i,e),e}}async setMemberPermission(e,t,i){const n={operation:fu.mA.SET_MEMBER_PERMISSION,uri:e,permissionLevel:i};this._events.emitOperationSync(n);try{await this._client.setMemberPermission({playlistUri:e,username:t,permissionLevel:bu(i),timeoutMs:1e3}),this._events.emitOperationComplete(n)}catch(e){throw this._events.emitOperationComplete(n,(0,nc.z)(e)),e}}async setBasePermission(e,t){const i={operation:fu.mA.SET_BASE_PERMISSION,uri:e,permissionLevel:t};this._events.emitOperationSync(i);try{await this._client.setBasePermission({uri:e,request:{permissionLevel:bu(t),timeoutMs:1e3}}),this._events.emitOperationComplete(i)}catch(e){throw this._events.emitOperationComplete(i,(0,nc.z)(e)),e}}}class Su{constructor(e){this._playlistServiceClient=e,this.lastSync=new Map}async resync(e){await this._playlistServiceClient.resync(Ka.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 Au=i(47327),Tu=i(90509),Iu=i(33718),Nu=i(11981),wu=i(40814),Ru=i(79425);class ku extends Ru.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(wu.tD.UPDATE,null),this.onContainsItems(this._aggregator.getBatch())}async onContainsItems(e){if(e.size>0){const t=Array.from(e.keys()),i=await this._contains(t);this.emitUpdateItems(t,i)}}}function Ou(e){return"notFound"===e.loadState}function Pu(e){return"forbidden"===e.loadState}function Lu(e){const t=e.playlistMetadata;return Ou(t)||Pu(t)?function(e,t){return{type:"placeholder",uri:t.link,addedAt:Ic(e.addTime),isNotFound:Ou(t),isForbidden:Pu(t)}}(e,t):{addedAt:Ic(e.addTime),...Lc(t)}}function ju(e,t){const i=e.folderMetadata,n=(e.item??[]).map((e=>function(e,t){if(e.folder)return ju(e.folder,t);if(e.playlist)return Lu(e.playlist);throw new Error("Invalid playlist cosmos response!")}(e,t)));return n.forEach(t),{type:"folder",addedAt:Ic(e.addTime),items:n,name:i.name,uri:i.link}}function Du(e){if(void 0===e)return Ka.xAU.NO_SORT;const{field:t,order:i}=e;switch(t){case Au.nw.NAME:return i===Au.xB.DESC?Ka.xAU.NAME_DESC:Ka.xAU.NAME_ASC;case Au.nw.ADDED_AT:return i===Au.xB.DESC?Ka.xAU.ADD_TIME_DESC:Ka.xAU.ADD_TIME_ASC;case Au.nw.RECENTLY_PLAYED:return i===Au.xB.DESC?Ka.xAU.RECENTLY_PLAYED_RANK_DESC:Ka.xAU.RECENTLY_PLAYED_RANK_ASC;case Au.nw.RELEVANCE:return i===Au.xB.DESC?Ka.xAU.FRECENCY_SCORE_DESC:Ka.xAU.FRECENCY_SCORE_ASC;case Au.nw.AVAILABLE_OFFLINE:return i===Au.xB.DESC?Ka.xAU.OFFLINE_STATE_DESC:Ka.xAU.OFFLINE_STATE_ASC;default:return(0,it.k)(t),Ka.xAU.NO_SORT}}class Mu{_cache=null;_decorationCache=new Ke.fq(3e5);constructor(e,t,i,n){var r,a;this._rootlistDataClient=e,this._rootlistModificationClient=t,this._playlistDataClient=i,this._builder=n,this._events=(r=this._rootlistDataClient,a=this.contains.bind(this),new ku(r,a))}getCapabilities(){return{canSort:!0,canFilter:!0,canModifyOffline:!0}}async getMetadata(){const e=await this._rootlistDataClient.get({policy:Cc});return hu(e.status),function(e){const t=[...e.item];let i=0,n=0;for(;t.length>0;){const e=t[0];e.folder?t.push(...e.folder.item):(!0===e.playlist?.playlistMetadata?.ownedBySelf&&i++,n++),t.shift()}return{ownedPlaylistCount:i,playlistCount:n}}(e.data?.root)}async getContents(e){const t=await this._rootlistDataClient.get({query:{folderUri:e?.folderUri,sortBy:Du(e?.sort),textFilter:(0,Tu.QG)(e?.filter),range:void 0!==e?.offset||void 0!==e?.limit?{start:e?.offset,length:e?.limit}:void 0,flattenTree:e?.flatten},policy:xc});hu(t.status);const i=new Set,n={...ju(t.data?.root,(e=>{(0,Au.Af)(e)&&i.add(e.uri)})),totalItemCount:t.data?.unrangedLength};return this._cache=i,e?.decorateImagesAndOwner&&await(0,Nu.k)(this._builder,this._decorationCache,(0,Iu.sh)(n)),n}getEvents(){return this._events}onUpdateItems(e,t){if(null!==this._cache){const i=this._cache;e.forEach((e=>t?i.add(e):i.delete(e)))}this._events.emitUpdateItems(e,t)}async applyModification(e){const t=await this._rootlistModificationClient.modify(Ka.C5T.fromPartial({request:e}));if(hu(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:Ka.EtD.CREATE_ITEM_KIND_FOLDER,...lc(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,i){if(this._events.emitCreatePlaylistSync(e,t,i))return null;try{const n=await this.applyModification({operation:"create",createItemKind:Ka.EtD.CREATE_ITEM_KIND_PLAYLIST,...lc(t),name:e});return this._events.emitCreatePlaylistComplete(e,t,n.uri,null,i),n.uri}catch(n){return this._events.emitCreatePlaylistComplete(e,t,null,(0,nc.z)(n),i),null}}async add(e,t){if(!this._events.emitAddSync(e,t))try{this.onUpdateItems(e,!0),await this.applyModification({operation:"add",uris:e,...lc(t)}),this._events.emitAddComplete(e,t)}catch(i){this.onUpdateItems(e,!1),this._events.emitAddComplete(e,t,(0,nc.z)(i))}}async move(e,t,i){if(!this._events.emitMoveSync(e,t))try{await this.applyModification({operation:"move",rows:[e.uri],...lc(t)}),this._events.emitMoveComplete(e,t,null,i)}catch(i){this._events.emitMoveComplete(e,t,(0,nc.z)(i))}}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(i){this.onUpdateItems(t,!0),this._events.emitRemoveComplete(e,(0,nc.z)(i))}}async contains(e){const t=await this._rootlistDataClient.contains({items:e});return hu(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 hu(t.status),t.data?.playlist?.playlistMetadata?.published??!1}async setPublishedState(e,t){await this.applyModification({operation:"set",attributes:{publishedState:t?Ka.Kpc.PUBLISHED_STATE_PUBLISHED:Ka.Kpc.PUBLISHED_STATE_NOT_PUBLISHED},rows:[e]})}}var Uu=i(31965),Bu=i(14217);const Fu=(0,Vt.u)("PlaylistResyncAPI");class Hu{_subs=new Set;_inFlightCache=new Ke.od;constructor(e,t=new Ke.fq(36e5)){this.productStateApi=e,this.cache=t,this.productStateApi.subValues(l.kM.fromPartial({}),(async e=>{const t=this.mapKeys(e.pairs),i=this.cache.get("productState");let n;i?(n={...i,...t},this.cache.set("productState",n)):n=await this.getValues();for(const e of this._subs)try{e(n)}catch(t){console.error("Error in `ProductState` sub:",{sub:e,error:t})}}))}mapKeys({country_code:e,type:t,...i}){const n={...i};return void 0!==e&&(n.country=e),void 0!==t&&(n.product=t),n}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({})))),i=this.mapKeys(t.pairs);return this.cache.set("productState",i),i}subValues(e){return this._subs.add(e),()=>{this._subs.delete(e)}}async setValues(e){await this.productStateApi.putValues(l.n3.fromPartial({pairs:e}))}}var Vu=i(1288),Gu=i(78543),zu=i(85386);function Wu(e,t){const i=new Gu.BM(e);return new zu.j((e=>function(e,t){return e.addOnNewConnectionID({},(({id:e})=>t(e)))}(i,e)),((e,t,n)=>function(e,t,i,n){const r=e=>n({ident:e.Ident?.Ident??"",timestamp:Date.now(),attributes:e.Attributes,payloads:e.Payloads});return i?e.addOnPushedMessageForIdentFilter({Prefix:t},r):e.addOnPushedMessageForIdent({Ident:t},r)}(i,e,t,n)),t)}var Ku=i(48839),Yu=i(9714),qu=i(99030);const Zu=qu.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:{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 $u(e){return e?[{url:e,label:"standard"}]:[]}class Qu extends Yu.K5{_contexts=null;_cancellable=null;constructor(e,t){super(),this._client=new qu.oW(e),this._events=t}getEvents(){return this._events}getContexts(){return null===this._cancellable&&(this._cancellable=this._client.stream(Zu,(e=>{this._contexts=function(e){const t=new Set;return e.context.map((e=>{if(e.artist){const t=e.artist.artistMetadata;return{type:Yu.d2.ARTIST,uri:t?.link??"",name:t?.name??"",images:$u(t?.portraits?.standardLink),timestampMs:e.artist.addTime}}if(e.album){const t=e.album.albumMetadata,i=new Set;return{type:Yu.d2.ALBUM,uri:t?.link??"",name:t?.name??"",images:$u(t?.covers?.standardLink),artists:t?.artists.map((e=>({uri:e.link,name:e.name}))).filter((e=>!i.has(e.uri)&&i.add(e.uri)))??[],timestampMs:e.album.addTime}}if(e.show){const t=e.show.showMetadata,i=Va(t?.extension??[]);if(void 0!==i.audiobookSpecifics){const n=i.audiobookSpecifics,r=i.showAccess?.signifier?.text;return{type:Yu.d2.AUDIOBOOK,uri:t?.link??"",name:t?.name??"",images:$u(t?.covers?.standardLink),authors:n.credits?.authors.map((e=>e.name))??[],timestampMs:e.show.addTime,signifierText:r}}return{type:Yu.d2.SHOW,uri:t?.link??"",name:t?.name??"",images:$u(t?.covers?.standardLink),publisher:t?.publisher??"",timestampMs:e.show.addTime}}if(e.playlist){const t=e.playlist.playlistMetadata;return{type:Yu.d2.PLAYLIST,uri:t?.link??"",name:t?.name??"",description:t?.description??"",images:$u(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:Yu.d2.TRACK,uri:t?.link??"",name:t?.name??"",images:$u(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,i=Va(t?.extension??[]);if(void 0!==i.audiobookSpecifics){const n=i.audiobookSpecifics;return{type:Yu.d2.AUDIOBOOK,uri:t?.link??"",name:t?.name??"",images:$u(t?.covers?.standardLink),authors:n.credits?.authors.map((e=>e.name))??[],timestampMs:e.episode.addTime}}return{type:Yu.d2.SHOW,uri:t?.link??"",name:t?.name??"",images:$u(t?.covers?.standardLink),publisher:t?.publisher??"",timestampMs:e.episode.addTime}}return e.collectionTracks&&(0,b.Z0)(e.collectionTracks.link)?e.collectionTracks.link.endsWith("your-episodes")?{type:Yu.d2.YOUR_EPISODES,uri:e.collectionTracks.link??"",timestampMs:e.collectionTracks.addTime}:{type:Yu.d2.LIKED_SONGS,uri:e.collectionTracks.link??"",timestampMs:e.collectionTracks.addTime}:null})).filter(Vs.P).sort(((e,t)=>t.timestampMs-e.timestampMs)).filter((e=>!t.has(e.uri)&&t.add(e.uri)))}(e),this._events.emit(Yu.m5.UPDATE,this._contexts)}))),this._contexts}}var Ju=i(75621),Xu=i(19703);const ed={field:Xu.K$.AVAILABLE,operator:Xu.uj.EQUALS,value:!0};var td=function(e){return e.TITLE="TITLE",e}(td||{});const id={[Xu.K$.AVAILABLE]:Xu.K$.AVAILABLE,[Xu.K$.NAME]:td.TITLE,[Xu.K$.TEXT]:Xu.K$.TEXT,[Xu.K$.ISPLAYED]:Xu.K$.ISPLAYED,[Xu.K$.STARTEDPLAYING]:Xu.K$.STARTEDPLAYING},nd={[Xu.K$.AVAILABLE]:["available"],[Xu.K$.TEXT]:["text"],[Xu.K$.NAME]:["name"],[Xu.K$.ISPLAYED]:["isPlayed"],[Xu.K$.STARTEDPLAYING]:["progress"],[td.TITLE]:["title"]},rd={[Xu.uj.CONTAINS]:"contains",[Xu.uj.EQUALS]:"eq",[Xu.uj.NOT_EQUALS]:"!=",[Xu.uj.GREATER_THAN]:">"};function ad(e){return e.map((e=>{const{field:t,operator:i,value:n}=e;return`${nd[t]} ${rd[i]} ${encodeURIComponent(n)}`})).join(",")}var sd=function(e){return e.ADDED_AT="ADDED_AT",e.DURATION="DURATION",e.TITLE="TITLE",e}(sd||{});const od={[Xu.WY.PUBLISH_DATE]:sd.ADDED_AT},ld={[Xu.WY.PUBLISH_DATE]:["number","publishDate","name"],[sd.ADDED_AT]:["added_at"],[sd.DURATION]:["duration"],[sd.TITLE]:["title"]};var cd=i(14142),ud=i(99927),dd=i(57526);class md extends dd.r{_subscriptions=new Map;constructor(e){super(),this._show_client=e,this.onAddListener(dd.K.UPDATE_ACCESS_INFO,(e=>{const{uri:t}=e.data.options;t&&this._aggregator.subscribe(t)})),this.onRemoveListener(dd.K.UPDATE_ACCESS_INFO,(e=>{const{uri:t}=e.data.options;t&&this._aggregator.unsubscribe(t)})),this.onAddListener(dd.K.UPDATE_RESUME_EPISODE_LINK,(e=>{const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(dd.K.UPDATE_RESUME_EPISODE_LINK,(e=>{const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)})),this._aggregator=(0,yo.X)((e=>{this._subscriptions.forEach(((t,i)=>{e.has(i)||(t.cancel(),this._subscriptions.delete(i))})),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 i=e.response?.show.find((e=>e.link===t));if(!i)return;Va(i.showMetadata?.extension).showAccess&&this.emit(dd.K.UPDATE_ACCESS_INFO,{uri:t}),i.showPlayState?.resumeEpisodeLink&&i.showMetadata?.isBook&&this.emit(dd.K.UPDATE_RESUME_EPISODE_LINK,{uri:t,resumeEpisodeLink:i.showPlayState?.resumeEpisodeLink})})))}))}))}}var pd=i(86065),hd=i(54196),gd=i(28891);const fd=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:[c.UH.PODCAST_SUBSCRIPTIONS,c.UH.CONTENT_WARNING]},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}),vd=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:[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,138]},showPlayedStatePolicy:{resumeEpisodeLink:!0}}),yd=Ka.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:[c.UH.SHOW_ACCESS,c.UH.PODCAST_SEGMENTS,c.UH.PODCAST_SUBSCRIPTIONS,c.UH.HTML_DESCRIPTION,c.UH.CONTENT_WARNING,c.UH.EPISODE_TRANSCRIPTS]}),bd=c.pt.fromPartial({episodeCollectionPolicy:{isNew:!0},episodePlayedStatePolicy:{playable:!0,timeLeft:!0,isPlayed:!0},episodePolicy:yd}),_d=c.pt.fromPartial({showPolicy:{showPolicy:{link:!0,name:!0,publisher:!0,covers:!0}},episodePolicy:yd,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 Ed{capabilities={canSort:!0,canFilter:!0,canGetDefaultSort:!0,canGetShowPlayedState:!0};constructor(e,t,i){this.remote_configuration=t,this._builder=i,this._podcast_paywalls_client=new cd.lb(e),this._show_service_client=new c.Gy(e),this._events=new md(this._show_service_client),this._metadata_service_client=new gd.sp(e)}async getMetadata(e){const t=(0,b.o_)(e).id,i=await this._show_service_client.getShow(c.bU.fromPartial({showId:t,range:{start:0,limit:1},headerPolicy:vd,listPolicy:bd,sectionsPolicy:{trailerSection:!0,nextBestEpisode:!0},includeExtensionsOnError:!0}));if(void 0===i.response||i.status?.code!==c.D7.SUCCESS){if(i.response?.header?.showMetadata?.extension){const e=Va(i.response.header.showMetadata.extension);if(function(e){return e.audiobookSpecifics&&e.prerelease?.releaseTime&&e.prerelease?.releaseTime>new Date||!1}(e))return function(e){if(!e?.prerelease)throw new Error("Error while constructing prerelease metadata");return{isPreRelease:!0,type:He.c.AUDIOBOOK,uri:e.prerelease.uri,name:e.prerelease.entity?.name??"",coverArt:e.prerelease.entity?.covers.map((e=>({...e,url:e.uri})))??[],authorName:e.prerelease.entity?.agents.map((e=>e.name)).join(", "),narrators:Yc(e),sample:null,htmlDescriptionPlain:e.htmlDescription?.htmlDescription,rating:null,isExplicit:e.prerelease.entity?.explicit??!1,duration:Number(e.audiobookSpecifics?.duration_ms),copyrights:uu(e),publishDate:e.prerelease.releaseTime,preReleaseEndDateTime:e.prerelease.releaseTime,price:e?.audiobookPrice,isLocked:ou(e?.showAccess),consumptionCapExplanation:e.showAccess?.consumptionCapped,signifierText:e.showAccess?.signifier?.text,topics:e.audiobookGenres?lu(e.audiobookGenres.genres):[]}}(e);if(!e.playability?.isPlayable&&e.playability?.reason===sr.PLAYABILITY_VERDICT_COUNTRY_RESTRICTED)throw new pd.W("Requested audiobook is out of market",{cause:i.status?.reason,redirectUri:e.audiobookRelation?.sameBookUri})}throw new Error("Error while getting show metadata")}return function(e){const t=e.header?.showMetadata;if(t?.isBook)return cu(e);if(!t)throw new Error("Error while constructing metadata");return au(e)}(i.response)}async getAccessInfo(e){const t=await this._show_service_client.getDecorate(c.NC.fromPartial({item:[e],showPolicy:{showPolicy:{extension:[c.UH.SHOW_ACCESS]}}}));if(void 0===t.response)throw new Error("decorate request error");return function(e){let t={};const i=e.show.map((e=>e.showMetadata?.extension)).filter((e=>null!==e));for(const e of i)if(e&&(t=Va(e),t.showAccess))break;return{prompt:t?.showAccess?.prompt,upsellLink:t?.showAccess?.upsellLink,basic:t?.showAccess?.basic,multiPass:t?.showAccess?.multiPass&&{title:t?.showAccess?.multiPass?.title,body:t?.showAccess?.multiPass?.soaDescription,soaPartners:t?.showAccess?.multiPass?.soaPartner},consumptionCapped:t?.showAccess?.consumptionCapped}}(t.response)}async getBookContents(e,t){t.doRefreshSubscription&&await this._podcast_paywalls_client.putShowSubscription(cd.D$.fromPartial({showUri:e}));const i=(0,b.o_)(e).id,n=await this._show_service_client.getShow(c.bU.fromPartial({showId:i,range:{start:t.offset,limit:t.limit},listPolicy:fd}));if(void 0===n.response||n.status?.code!==c.D7.SUCCESS)throw new Error("Error while getting show metadata");return function(e,t,i){if(!e.item)throw new Error("Invalid show cosmos response!");const n="number"==typeof t&&"number"==typeof i?t+i:0;return{nextOffset:e.unrangedLength<n?null:n,totalCount:e.unrangedLength,items:e.item.map((e=>Xc(e.episodeMetadata,e.episodePlayState)))}}(n.response,t.offset,t.limit)}async getContents(e,t){const i=(0,b.o_)(e).id,n=function(e){if(e?.field===Xu.WY.PUBLISH_DATE&&e.order===Xu.AX.ASC)return c.xB.PUBLISH_DATE_ASC;if(e?.field===Xu.WY.PUBLISH_DATE&&e.order===Xu.AX.DESC)return c.xB.PUBLISH_DATE_DESC;return c.xB.CONSUMPTION_ORDER_ASC}(t.sort),r=function(e=[]){return e=e||[],ad([...e,ed])}(t.filters),a=await this._show_service_client.getShow(c.bU.fromPartial({showId:i,sortOrder:n,filter:r,listPolicy:fd,range:{start:t.offset,limit:t.limit}}));if(void 0===a.response||a.status?.code!==c.D7.SUCCESS)throw new Error(`Error while getting show metadata: ${a.status?.reason}`);return function(e,t,i){if(!e.item)throw new Error("Invalid show cosmos response!");const n="number"==typeof t&&"number"==typeof i?t+i:0;return{nextOffset:e.unrangedLength<n?null:n,totalCount:e.unrangedLength,items:e.item.map((e=>iu(e.episodeMetadata,e.episodePlayState)))}}(a.response,t.offset,t.limit)}async getEpisodeOrChapter(e){const t=await this._show_service_client.getDecorate(c.NC.fromPartial({item:[e],episodePolicy:_d}));if(void 0===t.response)throw new Error("decorate request error");return function(e){const t=e.episode?.[0];if(!t||!t.episodeMetadata)throw new Error("Error while constructing episode");if(t.episodeMetadata.isBookChapter)return Xc(t.episodeMetadata,t.episodePlayState);if(!t.episodeMetadata)throw new Error("Error while constructing episode");return iu(t.episodeMetadata,t.episodePlayState)}(t.response)}async checkoutBook(e){return await(0,ud.S)(e)}getPlayerSort(e){return e?function(e){const{field:t,order:i}=e;return ld[t].map((e=>i?`${e} ${i}`:e))}(function(e){return{field:od[e.field],order:e.order}}(e)).join(", "):""}getPlayerFilter(e=[]){return ad(function(e){return(e=e||[]).map((e=>{const t=id[e.field],i=function(e){return"string"==typeof e.value?`"${e.value}"`:e.value}(e);return{...e,field:t,value:i}}))}(e))}getEvents(){return this._events}async getShowPlayedState(e){const t=await this._show_service_client.getShow(c.bU.fromPartial({showId:(0,b.o_)(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 i=Number(t.playedTime);let n;switch(t.label){case 0:n=zc.H7.Unknown;break;case 1:n=zc.H7.NotStarted;break;case 2:n=zc.H7.InProgress;break;case 3:n=zc.H7.Completed;break;default:n=zc.H7.Unrecogniced}return{playPositionMilliseconds:1e3*i,state:n}}(t):null}async updateUserRating(e,t){const i=await(0,hd.p)(this._builder,e,t);return await this._metadata_service_client.expire(gd.vq.fromPartial({extensionKind:c.UH.PODCAST_RATING,entityUri:[e]})),this._events.emit(dd.K.UPDATE_RATING,{uri:e}),i}async invalidateShowMetadataCaches(e){await this._metadata_service_client.expire(gd.vq.fromPartial({extensionKind:c.UH.PLAYABILITY,entityUri:[e]}))}}var Cd=i(32411),xd=i(47342),Sd=i(29711),Ad=i(85192),Td=i(51864),Id=i(72055),Nd=i(72665);class wd{_isDsaEnabled=!1;constructor(e,t,i,n,r,a){this._playbackSettingsClient=e,this._contextPlayer=t,this._player=i,this._smartShuffleEligibility=n,this._productStateApi=r,this._pubSubAPI=a,this._events=new xd.L,(0,Sd.w)(this._productStateApi,(e=>{this._isDsaEnabled=e})),(0,Nd.Q)(this._pubSubAPI,((e,t)=>{this._events.emitUpdateShuffleModeSync(e,t)}))}getEvents(){return this._events}async getAvailableShuffleModes(e){const t=this._player.getState();return(0,Ad.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))),!0)}async getShuffle(e){if(this._isContextUriActive(e)){const e=this._player.getState();return e?.shuffle&&e.smartShuffle?Cd.j.SMART_SHUFFLE:e?.shuffle?Cd.j.ON:Cd.j.OFF}const{shuffle:t,contextEnhancement:i}=await this._playbackSettingsClient.getShuffleState({value:e});return t&&i===Td.W.RECOMMENDATION?Cd.j.SMART_SHUFFLE:t?Cd.j.ON:Cd.j.OFF}async setShuffle(e,t){if(t===Cd.j.SMART_SHUFFLE&&this._isDsaEnabled)throw new Error("Trying to set smart shuffle when dsa is enabled");this._events.emitUpdateShuffleModeSync(e,t),this._isContextUriActive(e)?await async function(e,t){return e.setOptions(t).then(vl)}(this._contextPlayer,Be.y4.fromPartial({shufflingContext:{value:t!==Cd.j.OFF},modes:{context_enhancement:t===Cd.j.SMART_SHUFFLE?"RECOMMENDATION":"NONE"}})):await this._playbackSettingsClient.setShuffleState({id:e,shuffleOn:t!==Cd.j.OFF,contextEnhancement:t===Cd.j.SMART_SHUFFLE?Td.W.RECOMMENDATION:Td.W.NOT_ENHANCED}),this._events.emitUpdateShuffleModeCompleteSync(e,t)}_isContextUriActive(e){const t=this._player.getState();return!!t?.context&&(0,Id.b8)(e,t.context.uri)}}var Rd=i(6351);class kd extends k.e{}const Od="enhance";async function Pd({playlistDataServiceClient:e,playlistServiceClient:t,uri:i,isActive:n,timeout:r=5e3}){return await t.requestLenses(Ka.K02.fromPartial({uri:i,lenses:[{identifier:Od,active:n}]})),new Promise(((a,s)=>{let o=null;const{cancel:l}=e.subscribe(Ka.qrL.fromPartial({uri:i,query:{range:{start:0,length:0}},policy:{playlist:{lenses:!0}}}),(e=>{!!e.data?.playlist?.lenses?.appliedLenses.find((e=>e.name===Od))===n&&(l(),null!==o&&clearTimeout(o),a())}));r&&(o=setTimeout((()=>{l(),n&&t.requestLenses(Ka.K02.fromPartial({uri:i,lenses:[{identifier:Od,active:!1}]})),s(new kd(`${n?"Enabling":"Disabling"} Smart Shuffle failed after ${r}ms.`))}),r))}))}var Ld=i(26887),jd=i(80707);class Dd{_isDsaEnabled=!1;constructor(e,t,i,n,r,a,s,o,l){if(this._player=e,this._playlistServiceClient=t,this._playlistDataServiceClient=i,this._contextualShuffle=n,this._smartShuffleEligibility=r,this._productStateApi=a,this._history=s,this.isSmartShuffleEnabled=o,this.isNewShuffleModeOrderEnabled=l,this._events=new xd.L,(0,Sd.w)(this._productStateApi,(e=>{this._isDsaEnabled=e})),this.isSmartShuffleEnabled){new Ld.F(this._contextualShuffle,this._events,this._syncShuffle.bind(this)).observe()}else{const e=e=>{const t=(0,b.o_)(e);t?.type===b.NQ.PLAYLIST_V2&&Pd({playlistDataServiceClient:this._playlistDataServiceClient,playlistServiceClient:this._playlistServiceClient,uri:t.toURI(),isActive:!1})};this._player.getEvents().addListener(Vo.gd.ACTION,(t=>{t.data.action===Vo.Ik.PLAY&&e(t.data.context.uri)})),this._history.listen((async t=>{e(t.pathname)}))}}async _syncShuffle(e,t){let i=this._player.getState();const n=i?.context.uri,r=(0,b.o_)(e)?.type===b.NQ.COLLECTION,a=t===Cd.j.SMART_SHUFFLE;let s=e;r&&(s=(await this._smartShuffleEligibility.getEligibility(e)).lensUri),await Pd({playlistDataServiceClient:this._playlistDataServiceClient,playlistServiceClient:this._playlistServiceClient,uri:s,isActive:a}),i?.context&&(0,Id.b8)(e,n)&&(await this._player.setShuffle((0,Rd.C)(t)),i=this._player.getState(),r?this._player.updateContext(null,{uri:e,url:$l((0,Zl.f0)(a?s:e,a)),metadata:{...i?.context.metadata,enhanced_context:a?"true":void 0}}):i&&this._player.updateContext(null,{...i.context,metadata:{...i.context.metadata,enhanced_context:a?"true":void 0}}))}getEvents(){return this._events}async getAvailableShuffleModes(e){const t=this._player.getState();return(0,Ad.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(),i=t?.context.uri;let n=await this._contextualShuffle.getContextualShuffleMode(e);return(0,Id.b8)(e,i)&&(n=(0,jd.l)(t)??n),n===Cd.j.SMART_SHUFFLE&&this._isDsaEnabled?Cd.j.ON:n}async setShuffle(e,t){if(this._events.emitUpdateShuffleModeSync(e,t),t===Cd.j.SMART_SHUFFLE&&this._isDsaEnabled)throw new Error("Trying to set smart shuffle when dsa is enabled");await this._contextualShuffle.setContextualShuffleMode(e,t)}}var Md=i(8811),Ud=i(45786),Bd=i(91648);class Fd{constructor(e){this.karaokeServiceClient=new Ud.Pm(e)}getCapabilities(){return{isSupported:!0}}async setVocalVolume(e){await this.karaokeServiceClient.postVocalVolume({volume:e})}async setStatus(e){await this.karaokeServiceClient.postStatus({status:e===Bd.nW.ENABLED?Ud.Fr.ENABLED:Ud.Fr.DISABLED})}async getStatus(){const{status:e}=await this.karaokeServiceClient.getStatus({});return e===Ud.Fr.ENABLED?Bd.nW.ENABLED:Bd.nW.DISABLED}}class Hd{constructor(e){this._metadataServiceClient=e}async getEligibility(e){const t=(await this._metadataServiceClient.fetch(gd.Rr.fromPartial({extensionQuery:[{extensionKind:gd.UH.SMART_SHUFFLE,entityUri:[e]}]}))).extension.at(0),i=t?.extensionKind,n=t?.entityExtension.at(0)?.extensionData?.value,r=void 0===i||void 0===n?null:Va([{extensionKind:i,data:n}]),a=r?.smartShuffle??null;return{canSmartShuffle:a?.enabled??!1,lensUri:a?.uri||e}}}var Vd=i(31463),Gd=i(36174),zd=i(59777),Wd=i(38691),Kd=i(92017),Yd=i(84369),qd=i(67911),Zd=i(69052);class $d{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"],i="1"===e["social-session"],n=t!==this.isJamFreeEnabled||i!==this.isJamPremiumEnabled;this.isJamFreeEnabled=t,this.isJamPremiumEnabled=i,n&&this.listeners.forEach((e=>e(this.getJamExperience())))}))}getJamExperience(){return this.isJamPremiumEnabled?Zd.l.PREMIUM:this.isJamFreeEnabled?Zd.l.FREE:Zd.l.NONE}addListener(e){return this.listeners.add(e),()=>this.listeners.delete(e)}}var Qd=i(92491),Jd=i(92232),Xd=i(66824),em=i(73781);var tm=i(52895),im=i(72531),nm=i(23429);class rm{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 i={name:t,images:[]};try{const{profiles:n}=await e.get("sp://core-profile/v1/profiles",{usernames:[t]});return n.length>0?n[0]:i}catch(e){return i}}(this._cosmos,e);return{type:He.c.USER,uri:(0,b.Qj)(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 am=i(48523);function sm(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 om(e){return await fetch(`i18n/${e}.json`).then((e=>e.json()))}async function lm(e){const t=await async function(e){const t="language";try{const i=await e.get({key:t});return i.entries[t]?.string??h.h.en}catch{return h.h.en}}((0,o.dn)(e));try{const e=await om(t);return{localeForTranslation:t,localeForFormatting:navigator.language,translations:e}}catch(e){const i=h.h.en;(0,n.ZQ)({message:`Attempt to use desired locale '${t}' failed. Using fallback '${i}'.`}),(0,Ju.UD)(e);try{return{localeForTranslation:i,localeForFormatting:i,translations:await om(i)}}catch(e){throw(0,Ju.Lu)(e),new Error(`Error when getting fallback translation: ${e}`)}}}function cm(e){return e.registerValue(Ei.t,(0,bt.h)()).registerValue(Is.VI,(0,Is.n1)()).registerFactory(Zt.T,(e=>new Jt(e.resolve(Ei.t)))).registerFactory(am.L,(e=>function(e){return new rm(e)}(e.resolve(Ei.t)))).registerFactory(Vu.c,(e=>new Hu(new l.EW(e.resolve(Is.VI))))).registerFactory(Wt,(e=>new Kt)).registerFactory(Te.sD,(e=>function(e,t){const i=(0,Xd.F)(Bt.createBaseTransport,(0,em.M)(),e);return i.addPlugin(Jd.kJ,{WebSocket}),i.addPlugin((()=>t)),i.connect(),i}(e.resolve(Zt.T),e.resolve(Wt)))).registerFactory(Ut.X,(e=>function(e,t,i){return new $t(e,t,i,new Yt.x)}(e.resolve(Ei.t),e.resolve(Zt.T),e.resolve(Wt))))}async function um(e){navigator.serviceWorker&&navigator.serviceWorker.getRegistrations().then((e=>e.forEach((e=>e.unregister()))));const t="65b708073fc0480ea92a077233ca87bd",i=function(){const e=window.navigator.userAgent.match(Oe);return e?.groups?.version||"unknown"}(),n=(0,Ss.I)();cm(n);const[h,b,_,C,R,k,O]=await async function(e){const t=e.resolve(Zt.T),i=e.resolve(Ei.t),n=e.resolve(Is.VI),r=e.resolve(am.L),a=e.resolve(Vu.c),[s,o,l,c,u,d,m]=await Promise.all([Re(i),t.getToken(),(0,Mt.k)(n),ke(i),lm(n),r.getUser(),a.getValues()]);return[s,u,sm(o,u.localeForTranslation),l,c,d,m]}(n);g.Ru.initialize(b),(0,Ae.K)(n.resolve(Te.sD),_,i,h.app_platform),xi(n.resolve(Ei.t));const P=k?.username||null,L=P??"anonymous";n.registerFactory(Te.KM,(e=>we(h,e.resolve(Te.sD),{clientId:t,ownerProvider:()=>P,storagePrefix:`${t}-desktop-ui`,useInMemoryStorage:!1,useOptimizedESS2NA:!1})));const j=new Le({timeout:1e4,clientId:h.remote_config_client_id,transport:n.resolve(Te.sD),eventSender:n.resolve(Te.KM),version:i,sp_t_cookie:h.event_sender_context_information?.installation_id}),D=await j.resolve({username:P}),M=d.Vk.merge(D,R);n.registerFactory(po.m,(e=>new po.P(L)));const U=(0,Qe.s)(n.resolve(po.m)),B=d.Vk.merge(D,R,U);n.registerValue(Nt.z,It.n.getInstance()),n.registerFactory(ks.zk,(e=>(0,ks.lY)(e.resolve(Nt.z)))),n.registerFactory(Rs.o,(e=>(0,Rs.q)(e.resolve(ks.zk)))),n.registerFactory(Te.Fi,(e=>{if(P&&h.is_developer_mode){const t=e.resolve(po.m),i="lastVisitedLocation",n=t.getItem(i);let a;return a=n instanceof uo.m||n instanceof mo.Y?(0,r.sC)({initialEntries:void 0}):(0,r.sC)({initialEntries:[encodeURI(n)]}),a.listen((e=>{t.setItem(i,e.pathname)})),a}return(0,r.sC)()})),n.registerFactory(nm.p,(e=>new im.J(e.resolve(Nt.z)))),n.registerFactory(bi.I,(e=>new _i.C(e.resolve(Os.$)))),n.registerFactory(Os.$,(e=>new Os.E(L))),n.registerFactory(je.P,(e=>new Me(e.resolve(Ei.t)))),n.registerFactory(Ku.b,(e=>Wu(e.resolve(Is.VI),h.is_developer_mode))),n.registerFactory(Fu,(e=>{return t=e.resolve(Is.VI),new Su(new Ka.to1(t));var t})),n.registerFactory(Xt.U,(e=>{const t=B.getValue(Tt.OcM);return new gi(new a.Pc(e.resolve(Is.VI)),t)})),n.registerFactory(ti.c,(e=>{const t=B.getValue(Tt.OcM);return new vi(new a.Pc(e.resolve(Is.VI)),t)})),n.registerFactory(ii.x,(e=>new yi(new a.Pc(e.resolve(Is.VI))))),n.registerFactory(ei.r,(e=>new fi(new a.Pc(e.resolve(Is.VI))))),n.registerFactory(ti.c,(e=>{const t=B.getValue(Tt.OcM);return new vi(new a.Pc(e.resolve(Is.VI)),t)})),n.registerFactory(Jl.H,(e=>{const t=B.getValue(Ct.uy),i=B.getValue(Ct.gl),n=B.getValue(Ct.vU),r=!1===B.getValue(Tt.eWj),a=B.getValue(Ct.hd);return function(e,t,i,n,r,a,s,l,c){return new Ql((0,o.dn)(e),new Be.GD(e),new Ds.ve(e),new Ka.to1(e),new Ka.hb0(e),t,i,n,r,a,s,l,c)}(e.resolve(Is.VI),e.resolve(bi.I),e.resolve(Vd.z),"xpui_2024-07-12_1720793068427_242057a",t&&!i,n,e.resolve(Fu),r,a)})),n.registerFactory(Vd.z,(e=>{return t=e.resolve(Is.VI),new Hd(new gd.sp(t));var t})),n.registerFactory(Md.X,(e=>{const t=B.getValue(Ct.uy),i=B.getValue(Ct.tR);return B.getValue(Ct.gl)?(n=e.resolve(Jl.H),r=e.resolve(Vd.z),a=e.resolve(Vu.c),s=e.resolve(Is.VI),o=e.resolve(Ku.b),new wd(new Td.S(s),new Be.GD(s),n,r,a,o)):function(e,t,i,n,r,a,s,o){return new Dd(e,new Ka.to1(r),new Ka.hm7(r),t,i,n,a,s,o)}(e.resolve(Jl.H),e.resolve(bi.I),e.resolve(Vd.z),e.resolve(Vu.c),e.resolve(Is.VI),e.resolve(Te.Fi),t,i);var n,r,a,s,o})),n.registerFactory(Qd.j,(e=>function(e,t,i,n,r,a,s){switch(e){case Zd._.ENABLED:return new Gd.o(new Kd.U(r,a),new Yd.x(n),s,new $d(t,i),e);case Zd._.RESTRICTED:return new Gd.o(new qd.D(r),new Wd.G,s,new $d(t,i),e);case Zd._.DISABLED:default:return new Gd.o(new zd.o,new Wd.G,s,new $d(t,i),e)}}(B.getValue(Tt.iUp),O,e.resolve(Vu.c),e.resolve(Ku.b),e.resolve(Te.sD),e.resolve(Nt.z),e.resolve(nm.p)))),n.registerFactory(Bo.B,(e=>function(e,t){const i=new s.NI(e),n=(0,go.k7)(e);return new Uo(i,n,t)}(e.resolve(Is.VI),new a.Pc(e.resolve(Is.VI))))),n.registerFactory(wt.iY,(e=>{return t=e.resolve(Is.VI),new Lt(new Rt.Ag(t));var t})),n.registerFactory(Ns.P,(e=>(0,ws.W)(e.resolve(Nt.z)))),n.registerFactory(zo.Ak,(e=>function(e,t,i,n,r,a,s,o){if("1"!==o["is-puffin"])return new Ko;const l=new Fo.zW(e);return new tl(t,l,i,n,r,a,s)}(e.resolve(Is.VI),e.resolve(Nt.z),e.resolve(po.m),e.resolve(Te.KM),e.resolve(Jl.H),e.resolve(wt.iY),e.resolve(Ns.P),O))),n.registerFactory(Do.v,(e=>function(e,t,i){const n=new go.LN(i),r=new ho.rM(i),a=new Ai.HG(i),s=new l.EW(i);return new jo(e,t,n,r,a,s)}(P??"anonymous",e.resolve(Ei.t),e.resolve(Is.VI)))),n.registerFactory(Di.Ho,(e=>{return t=e.resolve(Is.VI),i=P,n=e.resolve(Nt.z),new Zs(new Ai.HG(t),new Ds.ve(t),new js.Ww(t),n,i);var t,i,n})),n.registerFactory(Au.Yi,(e=>{return t=e.resolve(Is.VI),i=e.resolve(Nt.z),new Mu(new Ka.Bl$(t),new Ka.ZxE(t),new Ka.hm7(t),i);var t,i})),n.registerFactory(Uu.Ki,(e=>{const t=B.getValue(Ct.Mc);return function(e,t,i,n,r){return new gu(new Ka.hm7(e),new Ka.to1(e),t,i,n,r)}(e.resolve(Is.VI),e.resolve(Vd.z),e.resolve(Nt.z),t,e.resolve(Fu))})),n.registerFactory(Bu.O,(e=>{return t=e.resolve(Is.VI),i=e.resolve(Nt.z),new xu(new Ka.to1(t),i);var t,i})),n.registerFactory(Si.p,(e=>{return t=e.resolve(Is.VI),i=e.resolve(Di.Ho),n=e.resolve(Uu.Ki),new xs(new Ai.HG(t),i,n);var t,i,n})),n.registerFactory(Xu.fZ,(e=>new Ed(e.resolve(Is.VI),B,e.resolve(Nt.z)))),n.registerFactory(jt.Z,(e=>new Dt.r(e.resolve(Jl.H),e.resolve(Xu.fZ),e.resolve(Ku.b)))),n.registerFactory(et.u,(e=>new Xe(new l.EW(e.resolve(Is.VI)),e.resolve(Uu.Ki)))),n.registerFactory($s.sl,(e=>new co(e.resolve(Is.VI),e.resolve(Ei.t),e.resolve(po.m)))),n.registerFactory(qe.W,(e=>new Ye(e.resolve(Is.VI),e.resolve(Rs.o)))),n.registerFactory(ce.ud,(e=>new me(e.resolve(Ei.t)))),n.registerFactory(ne._,(e=>new re(e.resolve(Ei.t)))),n.registerFactory(be._7,(e=>new Ee(e.resolve(Ei.t)))),n.registerFactory(xe.t,(e=>new Ce.T(e.resolve(ks.zk)))),n.registerFactory($e.H,(e=>new Ze(new m.aA(e.resolve(Is.VI))))),n.registerFactory(st.g,(e=>new at(e.resolve(Is.VI)))),n.registerFactory(Yu.X6,(e=>new Qu(e.resolve(Is.VI),new Yu.hr))),n.registerFactory(te.JD,(()=>new ie)),n.registerFactory(Bd.qh,(e=>new Fd(e.resolve(Is.VI)))),n.registerFactory(ae.jW,(e=>{return t=e.resolve(Is.VI),new le(new se.MI(t));var t})),n.registerFactory(ye.u,(e=>new ve((0,o.dn)(e.resolve(Is.VI)),e.resolve(po.m)))),n.registerFactory(y.Y,(e=>new E(new A(e.resolve(Nt.z)),new S(e.resolve(Ku.b),e.resolve(Nt.z)),new x(e.resolve(Ei.t),e.resolve(Nt.z))))),n.registerFactory(T.h,(e=>new N(e.resolve(Ei.t),new I(e.resolve(Ku.b),e.resolve(Nt.z))))),n.registerFactory(w.$,(e=>new Q((0,o.dn)(e.resolve(Is.VI)),e.resolve(Vu.c),new s.NI(e.resolve(Is.VI)),new a.Pc(e.resolve(Is.VI)))));{const t=(await f.Q.getAdState()).app_startup_id.value;n.registerFactory(v.M,(i=>(0,Se.K)({container:e,history:i.resolve(Te.Fi),eventSender:i.resolve(Te.KM),playerAPI:i.resolve(Jl.H),appStartupId:t,resolver:B}))),n.registerFactory(At.n,(e=>{const t=e.resolve(Is.VI),i=e.resolve(v.M),n=B.getValue(Ct.kr),r=B.getValue(Ct.NL);return new St(e.resolve(Ei.t),new c.Gy(t),new l.EW(t),new m.aA(t),new s.NI(t),new u._X(t),(0,o.dn)(t),B,e.resolve(Te.KM),i.vto.factories,t,r,n)}))}var F,H;B.getValue(Ct.rW)&&document.documentElement.classList.add("circular-sp-vietnamese"),F=n.resolve(Is.VI),H="xpui",new Ts(new As.NH(F),H);const V=new tm.T(p.vR.getUBILogger({eventSender:n.resolve(Te.KM),disableAutoBackgroundMonitoring:!0,authenticationProvider:{isAuthenticated:()=>null!==k},contextualProviders:{playContextUriProvider:{getPlayContextUri:()=>n.resolve(Jl.H).getState()?.context.uri??null},playbackIdProvider:{getPlaybackId:()=>n.resolve(Jl.H).getState()?.playbackId??null}}}));n.resolve(ce.ud).setTitlebarHeight(ce.Yw);B.getValue(Tt.p5T)&&(0,ee.nC)();return B.getValue(Ct.uy)&&((0,J.$)(n.resolve(Jl.H),n.resolve(Uu.Ki),n.resolve(bi.I),n.resolve(Vd.z)),(0,X.m)(n.resolve(Md.X),n.resolve(Vd.z),n.resolve(Jl.H),n.resolve(Uu.Ki),n.resolve(Xt.U))),Spicetify._platform={version:i,container:e,operatingSystem:(0,Ue.D)(),isDeveloperMode:h.is_developer_mode,isVideoSupported:!0,enableCastConnect:!1,initialUser:k,initialProductState:O,username:L,getServiceWorkerMessenger:async()=>()=>new Promise((()=>{})),getRegistry:()=>n,getSession:()=>_,getTransport:()=>n.resolve(Te.sD),getEventSender:()=>n.resolve(Te.KM),getTranslations:()=>b.translations,getFeatureFlags:()=>C,getHistory:()=>n.resolve(Te.Fi),getAdManagers:()=>n.resolve(v.M),getRemoteConfiguration:()=>M,getRemoteConfigurationWithLocalOverrides:()=>B,getGraphQLLoader:()=>n.resolve(ks.zk),getPlatformData:()=>h,getSEOExperiments:()=>({}),getSingAlongAPI:()=>n.resolve(Bd.qh),getUBILogger:()=>V,getCollectionPlatformAPI:()=>n.resolve(ae.jW),getEqualizerAPI:()=>n.resolve(ye.u),getBuddyFeedAPI:()=>n.resolve(y.Y),getBuddyFeedLegacyAPI:()=>n.resolve(T.h),getSettingsAPI:()=>n.resolve(w.$),getRequestBuilder:()=>n.resolve(Nt.z),getAudioOutputDevicesAPI:()=>n.resolve(wt.iY),getPlaybackFiltersAPI:()=>n.resolve(zo.Ak),getUrlDispenserServiceClient:()=>n.resolve(nm.p),getExternalAccessoryAPI:()=>n.resolve(Ns.P)}}},69011:(e,t,i)=>{"use strict";i.d(t,{m:()=>n});let n=function(e){return e.Web="Web",e.PWA="PWA",e.Desktop="Desktop",e}({})},91654:(e,t,i)=>{"use strict";i.d(t,{f:()=>n});let n=function(e){return e.macOS="macOS",e.Windows="Windows",e.Linux="Linux",e.ChromeOS="ChromeOS",e.Other="Other",e}({})},51489:(e,t,i)=>{"use strict";i.d(t,{D:()=>r,P:()=>a});var n=i(33655);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 a=(0,n.u)("UpdateAPI")},37929:(e,t,i)=>{"use strict";i.d(t,{t:()=>a});var n=i(51489),r=i(60102);function a(){return(0,r.N)(n.P)}},93159:(e,t,i)=>{"use strict";i.d(t,{k:()=>a});var n=i(30758),r=i(37929);function a(){const e=(0,r.t)(),[t,i]=(0,n.useState)(null);return(0,n.useEffect)((()=>{const{cancel:t}=e.subscribe(i);return t}),[e,i]),t}},89956:(e,t,i)=>{"use strict";i.d(t,{Ek:()=>c,My:()=>o,aS:()=>s,wD:()=>l});var n=i(69011),r=i(91654),a=i(21233);const s=/Spotify\/(?<version>.+)\s/;function o(){if(!!window.navigator.userAgent.match(s))return n.m.Desktop;const e="serviceWorker"in window.navigator,t=window.matchMedia("(display-mode: standalone)").matches,i="Windows"in window;return e&&(t||i)?n.m.PWA:n.m.Web}function l(){const e="serviceWorker"in window.navigator,t=-1!==window.location.search.indexOf("pwa=1"),i=(0,a.D)()===r.f.ChromeOS;return e&&(i||t)}function c(){return o()===n.m.Desktop}},21233:(e,t,i)=>{"use strict";i.d(t,{D:()=>s,f:()=>o});var n=i(9856),r=i.n(n),a=i(91654);function s(){const e=r().parse(window.navigator.userAgent).os.name;return"macOS"===e?a.f.macOS:"Windows"===e?a.f.Windows:"Linux"===e?a.f.Linux:"Chrome OS"===e?a.f.ChromeOS:a.f.Other}function o(){return r().getParser(window.navigator.userAgent).getOSName()||"not_applicable"}},45678:(e,t,i)=>{"use strict";i.d(t,{W:()=>n});const n=(0,i(33655).u)("PlayHistoryAPI")},20021:(e,t,i)=>{"use strict";i.d(t,{I:()=>a,X:()=>r});var n=i(88485);let r=function(e){return e.UPDATE="update",e}({});class a extends n.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()}}},68361:(e,t,i)=>{"use strict";i.d(t,{y:()=>r});var n=i(72199);function r(){return(0,n.q)().getCapabilities().isSupported}},72199:(e,t,i)=>{"use strict";i.d(t,{q:()=>a});var n=i(45678),r=i(60102);function a(){return(0,r.N)(n.W)}},67662:(e,t,i)=>{"use strict";i.d(t,{a:()=>c});var n=i(69898),r=i(25639),a=i(20021),s=i(72199),o=i(30758);const l=["play-history-contents"];function c(){const e=(0,s.q)(),t=(0,n.jE)();return function(e,t){const i=(0,s.q)();(0,o.useEffect)((()=>i.getEvents().addListener(e,t)),[e,t,i])}(a.X.UPDATE,(e=>t.setQueryData(l,e.data))),(0,r.I)({queryKey:l,queryFn:()=>e.getContents(),gcTime:3e5,staleTime:0})}},58591:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(30758),r=i(9183),a=i(61544),s=i(11808),o=i(71188),l=i(12762),c=i(88907),u=i(69916),d=i(48604),m=i(27774),p=i(7353);function h(){const e=(0,r.Zp)(),t=(0,d.m)(),i=(0,m._)(),{request:h}=(0,n.useContext)(u.j),g=(0,n.useCallback)((async(e,n)=>{const{name:r,trackUris:a}=await(0,c.s)(e,0,h),s=await i.createPlaylist(r,n,!0);return s&&await t.add(s,a,{before:"start"}),s}),[t,i,h]),f=(0,n.useCallback)((async(e,n)=>{const r=await(0,c.P)(e[0],h),a=await i.createPlaylist(r,n,!0);return a&&await t.add(a,e,{before:"start"}),a}),[t,i,h]),v=(0,n.useCallback)((async(e,n)=>{const r=await t.getMetadata(e),a=await t.getContents(e,{offset:0,limit:r.totalLength}),s=(0,o.Bq)(r.name),l=await i.createPlaylist(s,n,!0);return l&&await t.add(l,a.items.map((e=>e?.uri??null)).filter(p.P),{before:"start"}),l}),[t,i]);return{createPlaylist:(0,n.useCallback)((async(t,n)=>{const{ownedPlaylistCount:r}=await i.getMetadata(),o=s.Ru.get("playlist.new-default-name",r+1),c=await i.createPlaylist(o,n??{before:"start"}),u=(0,a.o_)(c);return u&&e(`/playlist/${u.id}`,{state:{referrer:"your_library",navigationalRoot:l.g.CREATE_PLAYLIST,interactionId:t}}),c}),[i,e]),createPlaylistFromAlbum:g,createPlaylistFromTracks:f,createPlaylistFromPlaylist:v}}},88907:(e,t,i)=>{"use strict";i.d(t,{s:()=>d,P:()=>u});var n=i(61544),r=i(11808),a=i(15742);i(8385);const s=Spicetify.GraphQL.Definitions["getAlbumNameAndTracks"]=new a.l("getAlbumNameAndTracks","query","5a0d4729518c17325756a3a9fdab0db7feeaf9f913e790de28bc53240b808d85",null),o=Spicetify.GraphQL.Definitions["getEpisodeName"]=new a.l("getEpisodeName","query","508f9db2e7dc340c338950dc67a6045ee1406703646f23b760986fa689c239b1",null),l=Spicetify.GraphQL.Definitions["getPodcastOrBookName"]=new a.l("getPodcastOrBookName","query","631676b4cf1eb7c93d1133e3f1f17e5bfe8d6a5e2fb9560148bac61f1531f267",null),c=Spicetify.GraphQL.Definitions["getTrackName"]=new a.l("getTrackName","query","3dee761788854e8dd9239e13ce0d712da031fb8c2036f096a1c765062b410660",null);async function u(e,t){const i=r.Ru.get("playlist.default_playlist_name");try{if((0,n.gH)(e)){const i=await t(o,{uri:e});if("Episode"===i?.data?.episodeUnionV2?.__typename)return i.data.episodeUnionV2.name}if((0,n.U_)(e)){const i=await t(c,{uri:e});if("Track"===i?.data?.trackUnion?.__typename)return i.data.trackUnion.name}if((0,n.WB)(e)){const i=await t(l,{uri:e});if("Podcast"===i?.data?.podcastUnionV2?.__typename||"Audiobook"===i?.data?.podcastUnionV2?.__typename)return i.data.podcastUnionV2.name}return i}catch{return i}}async function d(e,t,i){const n=await i(s,{uri:e,offset:t,limit:200});if("Album"===n?.data?.albumUnion?.__typename){const{name:r,tracks:a}=n.data.albumUnion,s=a.items.map((e=>e.track.uri));if(a.pagingInfo.nextOffset){if(a.pagingInfo.nextOffset<=t||0===s.length)throw new Error(`Error while requesting ${e} content, unexpected nextOffset`);const n=await d(e,a.pagingInfo.nextOffset,i);return{name:r,trackUris:s.concat(n.trackUris)}}return{name:r,trackUris:s}}throw new Error(`Error while requesting ${e} content`)}},96590:(e,t,i)=>{"use strict";i.d(t,{H:()=>n});const n=(0,i(33655).u)("PrivateSessionAPI")},32630:(e,t,i)=>{"use strict";i.d(t,{H:()=>o});var n=i(30758),r=i(96590),a=i(60102);var s=i(59744);function o(){const e=(0,a.N)(r.H),[t,i]=(0,n.useState)(!1),o=(0,s.a)();(0,n.useEffect)((()=>{const t=e.subscribeToPrivateSession((e=>{o()&&i(e)}));return()=>{t()}}),[e,o]);return{isPrivateSession:t,setPrivateSession:(0,n.useCallback)((t=>{e.setPrivateSession(t)}),[e])}}},22203:(e,t,i)=>{"use strict";i.d(t,{u:()=>b});const n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"}),r=/\p{White_Space}/u,a=/\p{P}/u,s=/\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&&a.test(e)}function u(e){return null!==e&&s.test(e)}class d{constructor(e,t,i){if(t<0||i<0||t+i>e.length)throw new RangeError;this.data=e,this.offset=t,this.length=i,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 i=this.offset+e,n=t-e;return new d(this.data,i,n)}nextCodePoint(){return this.position===this.length?null:this.data[this.offset+this.position++]}}function m(e){let t;do{t=e.nextCodePoint()}while(null!==t&&o(t)||c(t));return t}function p(e,t){let i=m(e),r=m(t);if(null===r)return{offset:0,length:0};const a=e.offset+e.position-1;let s=e.offset+e.position;for(;;){if(null===i&&null===r)return{offset:a,length:s-a};if(null===r)return{offset:a,length:s-a};if(null===i)return null;if(0!==n.compare(i,r))return null;s=e.offset+e.position,i=m(e),r=m(t)}}function h(e,t){let i,n,r;do{n=e.position,i=e.nextCodePoint()}while(null!==i&&o(i));if(t?.segmentQuotedStrings&&function(e){return null!==e&&('"'===e||"'"===e)}(i)){const t=i;n=e.position;do{r=e.position,i=e.nextCodePoint()}while(null!==i&&i!==t);return null===i&&n===r?null:e.slice(n,r)}do{if(r=e.position,t?.segmentCJKUnifieIdeographs&&u(i))break;i=e.nextCodePoint()}while(null!==i&&!l(i));return null===i&&n===r?null:e.slice(n,r)}function g(e){return h(e,{segmentQuotedStrings:!0,segmentCJKUnifieIdeographs:!1})}function f(e){return h(e,{segmentQuotedStrings:!1,segmentCJKUnifieIdeographs:!0})}function v(e,t){const i=[];for(let n=f(e);null!==n;n=f(e)){let r=p(n,t.slice());null===r?(r=p(e.slice(n.offset),t.slice()),null===r||i.push(r)):i.push(r)}return i}function y(e,t){return e.offset===t.offset&&e.length===t.length}function b(e,...t){const i=d.from(e),n=[];for(let e=g(i);null!==e;e=g(i)){const i=[];for(let n=0;n<t.length;++n){const r=t[n],a=v(d.from(r),e);for(const e of a)i.push({text:r,range:e})}if(0===i.length)return null;n.push(...i.filter(((e,t,i)=>e.range.length>0&&i.findIndex((t=>y(e.range,t.range)))===t)))}return n.length>0?n:null}},13506:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a,k:()=>s});var n=i(46352);const r="react-query";function a(){return{persistClient:async e=>{await(0,n.hZ)(r,e)},restoreClient:async()=>await(0,n.Jt)(r),removeClient:async()=>{await(0,n.yH)(r)}}}function s(){return(0,n.yH)(r)}},19303:(e,t,i)=>{"use strict";i.d(t,{e:()=>r,s:()=>a});var n=i(28835);const r="remote-config-overrides";function a(e){const t=e.getItem(r);if(t instanceof Error)return n.Vk.empty();try{return n.Vk.fromJSON(t)}catch(e){return n.Vk.empty()}}},61323:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});const n=(0,i(33655).u)("ReportAPI")},68246:(e,t,i)=>{"use strict";i.d(t,{X:()=>a,v:()=>s});var n=i(61544),r=i(43991);const a=e=>(0,n.tb)(e)||(0,n.ec)(e)||(0,n.gH)(e)||(0,n.AP)(e)||(0,n.WB)(e),s=(e,t,i,n)=>e.getMetadata(t).then((e=>{const t="chart"===e.formatListData?.type;return!(!n&&!e.canReportAnnotationAbuse||t||i===e.owner.uri)})).catch((e=>((0,r.vV)(e),!1)))},84473:(e,t,i)=>{"use strict";i.d(t,{g:()=>n});const n=(0,i(33655).u)("SegmentsAPI")},79745:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(30758),r=i(42582),a=i(2435),s=i(53830);function o({episodeUri:e,start:t,stop:i}){const{togglePlay:o,triggerPlay:l,isPlaying:c,isActive:u}=(0,r.P)({uri:e},{featureIdentifier:"episode"}),d=(0,a.o)((e=>(0,s.s)(e)??0)),m=u&&function(e,t,i){return i>=e&&i<t}(t,i,d),p=c&&m;return{onClick:(0,n.useCallback)((e=>{m?o({seekTo:t,loggingParams:e}):l({seekTo:t,loggingParams:e})}),[m,t,o,l]),isPlaying:p,isActive:m}}},30531:(e,t,i)=>{"use strict";i.d(t,{L:()=>C});var n=i(30758),r=i(41978),a=i(9183),s=i(3074),o=i.n(s),l=i(85808),c=i(81987),u=i(61544),d=i(11808),m=i(90751),p=i(39733),h=i(73015),g=i(63574),f=i(45346),v=i(19159),y=i(14467),b=i(32712),_=i(68524),E=i(1696);const C=({sharingInfo:e,uri:t,interactionData:i})=>{const s=(0,f.W)(),C=(0,r.wA)(),{pathname:x}=(0,a.zy)(),S=(0,g.W)({type:"link",uri:t}),{enqueueSnackbar:A}=(0,h.d)(),T=d.Ru.getLocaleForURLPath(),I=(0,_.E)(),N=(0,c.NC)(v.vnr),w=(0,p.vh)(),R=(0,n.useCallback)((i=>{let n=e;n?.shareUrl||(n=((e,t,i)=>{const n=(0,u.o_)(e)?.toURL(),r=o().create().hex.replace(/-/g,"").substr(0,16),a=(0,u.cA)(e).toURL(`${y.iG}${b.CT}${i}/`);return{shareUrl:t&&n?`${a}?si=${r}`:`${n}?si=${r}`,shareId:r}})(t,S,T));const r=n?.shareUrl||"";let a=r;if(i){const e=new URL(r);i.forEach(((t,i)=>e.searchParams.set(i,t))),a=e.toString()}return{shareUrl:a,shareId:n?.shareId}}),[e,S,t,T]),k=(0,n.useCallback)((async e=>{let i=[{key:"app_destination",value:"copy-link"}];e&&(i=i.concat(Array.from(e).map((([e,t])=>({key:e,value:t})))));const{shareable_url:n,share_id:r}=await I.getShortUrl(t,{customData:i});return{shareUrl:n,shareId:r}}),[t,I]);return{onCopyLink:(0,n.useCallback)((async e=>{const n=N&&!S;let r=R(e);try{n&&(r=await k(e))}catch(e){console.error(e)}const{shareUrl:a,shareId:o}=r;if(s(i),(0,E.l)(a),C((0,m.pf)(a)),A(d.Ru.get("feedback.link-copied")),o){const e=(0,u.o_)(x);w.send((0,l.c)({share_id:o,entity_uri:t,destination_id:"copy-link",source_page:e?.type||"",source_page_uri:e?.toURI()||""}))}}),[N,S,k,R,s,i,C,A,x,w,t])}}},47439:(e,t,i)=>{"use strict";i.d(t,{n:()=>n});const n=(0,i(33655).u)("VideoAPI")},65662:(e,t,i)=>{"use strict";i.d(t,{S:()=>r,p:()=>a});var n=i(88485);let r=function(e){return e.SUBTITLE_LANGUAGES_CHANGED="subtitle_languages_changed",e.PICTURE_IN_PICTURE_CHANGED="picture_in_picture_changed",e}({});class a extends n.V{}},37477:(e,t,i)=>{"use strict";i.d(t,{$k:()=>T,no:()=>I,oU:()=>j,tf:()=>N});var n=i(61544),r=i(74509),a=i(17518),s=i(90751),o=i(54874),l=i(89199),c=i(17847),u=i(68679),d=i(17818),m=i(19118),p=i(90055),h=i(7939),g=i(10308),f=i(14467),v=i(37116),y=i(25558),b=i(72814),_=i(95421),E=i(2817),C=i(72055),x=i(40814),S=i(71817),A=i(74888);const T={START_RADIO:"START_RADIO"},I={SAVE_TRACK:"SAVE_TRACK",SAVE_EPISODE:"SAVE_EPISODE",SAVE_ALBUM:"SAVE_ALBUM",SAVE_PRERELEASE:"SAVE_PRERELEASE"},N={FOLLOW_USER:"FOLLOW_USER"},w=/(^PLAY_.+|QUEUE_UPDATE)/i,R={...{[p.Gs]:p.Gs},...a.gK},k=()=>{const e={...R};return delete e.DEVICE_INFO_CHANGED,delete e.PLAYBACK_CLEAR_DATA,delete e.QUEUE_UPDATE,e},O=(e,t)=>{"KR"!==(0,h.Ht)(e.getState()).market&&e.dispatch((0,s.H2)(t))},P=(e,t)=>{if(k()[t.type]){if((e=>e.type!==p.Gs&&!![a.gK.PLAYBACK_ERROR].includes(e.type))(t))return!1;const[i,n]=(e=>{const t=k();switch(e.type){case t.FOLLOW_PLAYLIST:return[!0,{triggerId:o.D,triggerAction:e}];case t.CREATE_PLAYLIST:return[!0,{triggerId:u.x9,triggerAction:e}];case t.ADD_TO_QUEUE:case p.Gs:return[!0,{triggerId:c.d,triggerAction:e}];default:return[!1,null]}})(t),r=w.test(t.type);if(e.dispatch((0,v.$W)(t,r?v.l_.PLAY:v.l_.USER_INVESTMENT)),i)l.h.set((e=>({...e,...n})));else{const i=t.uri||t.contextURI;if(O(e,i),t.type===g.xM)return!1}return!0}return!1};function L(e,t){if(e===y.tS.ADD){if((0,n.U_)(t))return[!0,{triggerId:c.d,triggerAction:{type:I.SAVE_TRACK}}];if((0,n.gH)(t))return[!0,{triggerId:c.d,triggerAction:{type:I.SAVE_EPISODE}}]}return e===b.Ik.PLAY&&(0,n.Cf)(t)?[!0,{triggerId:c.d,triggerAction:{type:T.START_RADIO}}]:e===x.ut.ADD||e===x.ut.CREATE_PLAYLIST?[!0,{triggerId:u.x9,triggerAction:{type:null}}]:e===m.JK.FOLLOW_USER?[!0,{triggerId:c.d,triggerAction:{type:N.FOLLOW_USER}}]:[!1,null]}const j=(e,t,i,a,s)=>o=>{const c=e.getEvents(),u=t.getEvents(),v=i.getEvents(),T=a.getEvents();return c.addListener(b.gd.ACTION,(e=>{((e,t,i)=>{const n=t.getState(),{isAnonymous:r}=(0,h.Ht)(n);if(!r)return!1;switch(e.action){case b.Ik.PLAY:{const{context:n,options:r}=e,s=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}(n);if(s?.type===S.c.EPISODE&&(a=s,void 0===a.metadata?.anonymousPlaybackAllowed||a.metadata.anonymousPlaybackAllowed))return!1;const o=r?.skipTo?.uri??n.uri;i.storeAction(d.IA,e);const[c,u]=L(b.Ik.PLAY,o);return c?(l.h.set((e=>({...e,...u}))),!0):(O(t,o),!0)}case b.Ik.SKIP_TO_NEXT:case b.Ik.SKIP_TO_PREVIOUS:return O(t,null),!0;default:return!1}var a})(e.data,o,s)&&e.preventDefault()})),u.addListener(y.UV.OPERATION,(e=>{((e,t,i)=>{const n=t.getState(),{isAnonymous:r}=(0,h.Ht)(n);if(!r)return!1;if(e.operation===y.tS.ADD){const[n]=e.uris;i.storeAction(d.j8,e);const[r,a]=L(y.tS.ADD,n);return r?(l.h.set((e=>({...e,...a}))),!0):(O(t,n),!0)}return!1})(e.data,o,s)&&e.preventDefault()})),v.addListener(x.tD.OPERATION,(e=>{((e,t,i)=>{const n=t.getState(),{isAnonymous:r}=(0,h.Ht)(n);if(!r)return!1;switch(e.operation){case x.ut.ADD:{const[n]=e.uris;i.storeAction(d.YZ,e);const[r,a]=L(x.ut.ADD,n);return r?(l.h.set((e=>({...e,...a}))),!0):(O(t,n),!0)}case x.ut.CREATE_PLAYLIST:{const[e,i]=L(x.ut.CREATE_PLAYLIST,"");return e?(l.h.set((e=>({...e,...i}))),!0):(O(t,null),!0)}default:return!1}})(e.data,o,s)&&e.preventDefault()})),T.addListener(m.mc.OPERATION,(e=>{((e,t,i)=>{const n=t.getState(),{isAnonymous:r}=(0,h.Ht)(n);if(!r)return!1;if(e.operation===m.JK.FOLLOW_USER){const[n]=e.uris;i.storeAction(d.Hv,e);const[r,a]=L(m.JK.FOLLOW_USER,n);return r?(l.h.set((e=>({...e,...a}))),!0):(O(t,n),!0)}return!1})(e.data,o,s)&&e.preventDefault()})),t=>i=>{const a=o.getState(),{isAnonymous:l}=(0,h.Ht)(a),c=new URL(location.href).searchParams.has("signupPrompt");if(l){if(!P(o,i)){switch(i.type){case r.gK.ANONYMOUS_LOGIN_CLICK:{const t=e.getState();if(function(e){return(0,C.uW)(e)===E.i.PLAYING&&(0,_.p)(e?.item??void 0)}(t)){const i=function(e,t){if(!e?.item)return null;const i={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}]}]},n={referrerIdentifier:t.getReferrer(),featureIdentifier:"unknown"},r={seekTo:e.positionAsOfTimestamp??void 0};return{action:b.Ik.PLAY,context:i,origin:n,options:r}}(t,e);i&&s.storeAction(d.IA,i)}setTimeout(A.PW,500);break}case r.gK.ANONYMOUS_SIGNUP_CLICK:setTimeout(A.ie,500);break;case r.gK.ANONYMOUS_PREMIUM_CLICK:setTimeout((()=>{window.location.assign(f.BW)}),500);break;case g.xM:c&&O(o,(0,n.o_)(location.pathname)?.toURI()||""),(0,p.cU)(e,".main-view-container .os-viewport-native-scrollbars-invisible",(0,p.pL)(o),(0,p.ox)(o))}t(i)}}else t(i)}}},90055:(e,t,i)=>{"use strict";i.d(t,{Gs:()=>a,cU:()=>c,ox:()=>l,pL:()=>o});var n=i(72814),r=i(53830);const a="ANONYMOUS_PLAYBACK_HOOK",s=(e,t)=>{const i=t?.item?.type;e.dispatch((e=>({type:a,entityType:e}))(i))},o=e=>t=>{s(e,t)},l=e=>(t,i,n)=>{const a=e.getState(),s=a?.ui?.modal,o=((e,t,i,n)=>{const a=((0,r.s)(i)??0)>1e4,s=document.hasFocus();return!e&&a&&s&&n&&"now-playing-view"!==t})(t,s,i,n);return o},c=(e,t,i,r)=>{let a=!1,s=Date.now(),o=document.querySelector(t);const l=e.getEvents(),c=()=>{s=Date.now()},u=()=>{o||(o=document.querySelector(t),o&&o.addEventListener("scroll",c))},d=l.addListener(n.gd.UPDATE,(({data:e})=>{u();const t=Date.now()-s>1e3;r(a,e,t)&&(a=!0,i(e),d(),o&&o.removeEventListener("scroll",c))}));u()}},47173:(e,t,i)=>{"use strict";i.d(t,{m0:()=>E,kp:()=>N,f0:()=>w});var n=i(9926),r=i(61544),a=i(11808),s=i(90751),o=i(58490),l=i(49493),c=i(74404),u=i(72814);var d=i(25700),m=i(7939),p=i(10308),h=i(90126),g=i(41286),f=i(50879),v=i(69052),y=i(84640);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 _(e){return(0,l.Tv)(e)}const E="web-modal",C={pattern:"app:start",type:"CLIENT_EVENT"},x={pattern:"app:deprecation:start",type:"CLIENT_EVENT"},S={pattern:"app:deprecation:click",type:"CLIENT_EVENT"},A={pattern:"context:start",type:"CLIENT_EVENT"},T={pattern:"jammable:context:start",type:"CLIENT_EVENT"};let I=null;function N(){return I}const w=(e,t,i)=>l=>N=>w=>{const R=N(w),k=l.getState(),{dispatch:O}=l,{isAnonymous:P}=(0,m.Ht)(k),L=t.getState(),j=t.getEvents();let D=!1,M="";function U(e){e&&O((0,c.vx)(e))}function B(e,t){const i=new f.P("quicksilver_message");let n=t;if(t)return i.setItem(e,t),t;const r=i.getItem(e);return r instanceof h.m||r instanceof g.Y||(n=r),n}if(P)return R;switch(w.type){case s.gK.INITIALISE_QUICKSILVER:!function(e){I=(0,n.ns)((0,y.V)().toPublic(),{actions:["DISMISS","URL","EXTERNAL_URL"],app:{platform:"WebPlayer",clientId:"65b708073fc0480ea92a077233ca87bd"},enableLogs:!1,formats:[E],locale:a.Ru.getLocaleForTranslation(),env:d.x,triggerTypes:["URI","CLIENT_EVENT"]}),I.start(),I.on(n.qY.CONNECTED,(()=>{e((0,c.rI)())}))}(O),j.addListener(u.gd.ACTION,(e=>{D||e.data.action!==u.Ik.PLAY||(D=!0,O((0,c.V$)())),function(e,t){if(e.data.action!==u.Ik.PLAY)return;const i=(0,r.o_)(e.data.context.uri);i&&((0,r.tb)(i)||(0,r._T)(i)||(0,r.ec)(i))&&t((0,c.Su)())}(e,O)}));break;case s.gK.TRIGGER_CLICK_DEPRECATION_MESSAGE:I&&!_(L)&&(M=b(e.location.pathname),I.requestMessage({appUri:M,trigger:S}).then((e=>B(x.pattern,e))).then(U));break;case d.Q.TRIGGER_APP_START_IN_APP_MESSAGE:I&&!_(L)&&(I.requestMessage({appUri:"spotify:home",trigger:C}).then(U),k.session.productState?.["client-deprecated"]&&I.requestMessage({appUri:"spotify:home",trigger:x}).then((e=>B(x.pattern,e))).then(U));break;case d.Q.TRIGGER_CONTEXT_START_IN_APP_MESSAGE:I&&!_(L)&&I.requestMessage({appUri:"spotify:home",trigger:A}).then(U);break;case d.Q.TRIGGER_JAMMABLE_CONTEXT_START_IN_APP_MESSAGE:if(i.getEnabled()===v._.ENABLED&&i.getJamExperience()!==v.l.NONE&&I&&!_(L)){const t=(0,r.o_)(e.location.pathname)?.toURI()??"spotify:home";I.requestMessage({appUri:t,trigger:T}).then(U)}break;case s.gK.UPDATE_UI_HISTORY_STATE:M=b(e.location.pathname),I&&!_(L)&&M&&I.requestMessage({appUri:M,trigger:{pattern:M,type:"URI"}}).then(U);break;case o.QN.SHOW_BILLBOARD_AD_VIEW:O((0,c.yv)());break;case d.Q.PREVIEW_IN_APP_MESSAGE:I&&w.creativeId&&I.previewMessage({appUri:w.appUri||"spotify:home",creativeId:w.creativeId}).then(U);break;case d.Q.SET_IN_APP_MESSAGING_ENV:I&&I.setEnv(w.env);break;case p.tQ:I&&I.stop()}return R}},72537:(e,t,i)=>{"use strict";function n(e=!1){let t=document.getElementById("main");return!t&&e&&(t=document.createElement("div"),t.id="main",document.body.appendChild(t)),t}i.d(t,{e:()=>n})},38273:(e,t,i)=>{"use strict";i.d(t,{JQ:()=>ee,cI:()=>W,r8:()=>Y,bL:()=>Z,UU:()=>K,ug:()=>X,XL:()=>q});var n=i(30296),r=i(333),a=i(17518),s=i(67900),o=i(90751),l=i(59189),c=i(13874);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=i(85045),m=i(66698),p=i(19159),h=i(75713);const g=(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}},f=(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}},v=(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}},y=e=>{const t=e?.getRemoteConfigurationWithLocalOverrides?.().getValue(p.rkp);return(e={isOpen:!1},i)=>{if(t)return{isOpen:!1};switch(i.type){case h.J:{const{product:t,country:n,policies:r}=i.data;return"premium"===t&&!r?.opt_in_trial_premium_only_market||"KR"!==n?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}}},b=(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}},_=(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}},E=(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}},C=(e={isOpen:!1},t)=>{switch(t.type){case o.gK.OPEN_REVERT_CHANGES_TUNA_DIALOG:return{...e,isOpen:!0,uri:t.uri,callback:t.callback};case o.gK.CLOSE_REVERT_CHANGES_TUNA_DIALOG:return{...e,isOpen:!1};default:return e}},x=(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}},S=(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}},A=(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}},T=(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}},I=(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}},w=(e={isError:!1,name:""},t)=>{switch(t.type){case a.gK.CDM_ERROR:return{...e,isError:!0,name:"cdmerror"};case a.gK.HARMONY_MAX_SUBSCRIPTIONS_REACHED:return{...e,isError:!0,name:"max_subscriptions_reached"};default:return e}},R=(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}},k=(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}},O=(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}},P=(e={isRTL:!1},t)=>t.type===s.gK.SET_RTL_MODE?{...e,isRTL:t.isRTL}:e,L=(e={canGoBack:!1,canGoForward:!1},t)=>t.type===o.gK.UPDATE_UI_HISTORY_STATE?t.historyState:e,j=(e={isOpen:!1},t)=>t.type===o.gK.SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY?{...e,isOpen:t.isOpen}:e,D=(e={isOpen:!1,trackUri:""},t)=>t.type===o.gK.SHOW_TRACK_CREDITS?{...e,isOpen:t.isOpen,trackUri:t.trackUri}:e,M=(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}},U=(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}},B=(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}},F=(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}},V=(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}},G=(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}},z=(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};case o.gK.CLOSE_JAM_MODAL:return{...e,isOpen:!1,modalType:void 0,joinToken:void 0,memberToRemove:void 0};default:return e}},W=(0,n.Z0)({name:"smartShuffle",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),K=(0,n.Z0)({name:"turnOffPersonalizedRecommendationsModal",initialState:{isOpen:!1,onConfirm:()=>{}},reducers:{open:(e,t)=>{e.isOpen=!0,e.onConfirm=t.payload.onConfirm},close:e=>{e.isOpen=!1}}}),Y=(0,n.Z0)({name:"learnMorePersonalizedRecommendationsModalSlice",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),q=(0,n.Z0)({name:"yourSoundCapsuleModalSlice",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),Z=(0,n.Z0)({name:"personalizedRecommendationsError",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),$=(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}},Q=(0,n.Z0)({name:"editRefinersModal",initialState:{isOpen:!1},reducers:{open:e=>{e.isOpen=!0},close:e=>{e.isOpen=!1}}}),J=(0,n.Z0)({name:"tunaModal",initialState:{isOpen:!1,uri:""},reducers:{open:(e,t)=>{e.isOpen=!0,e.uri=t.payload.uri},close:e=>{e.isOpen=!1}}}),X=(0,n.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}}}),ee=e=>(0,r.HY)({premiumDialog:y(e),loginToListenDialog:b,signupToListenDialog:_,deletePlaylistDialog:E,deleteFolderDialog:S,removeFromLibraryDialog:A,leavePlaylistDialog:T,blockUserDialog:I,improvedSignupPromptDialog:N,unsupportedBrowser:g,offlineDeviceLimitReachedDialog:f,playbackNotSupportedErrorDialog:v,errorPage:w,fullscreenMode:R,connectDevicePicker:k,connectNudge:O,videoPlayer:m.F3,textDirection:P,history:L,keyboardShortcutsHelpModal:j,trackCreditsModal:D,removeDownloadsDialog:U,clearCacheDialog:B,renameFolderModal:F,artistAboutDialog:M,yourDJUpsellDialog:H,lyrics:u,removeDownloadConfirmationDialog:V,bookConsumptionCapModal:G,dsaDialog:x,jamModalState:z,introducingSmartShuffleModal:W.reducer,turnOffPersonalizedRecommendationsModal:K.reducer,learnMorePersonalizedRecommendationsModal:Y.reducer,transcript:d.d2,personalizedRecommendationsErrorModal:Z.reducer,showRatingModalState:$,editRefinersModal:Q.reducer,tunaModal:J.reducer,revertChangesTunaDialog:C,yourSoundCapsuleModal:q.reducer,videoNotSupportedModal:X.reducer})},19159:(e,t,i)=>{"use strict";i.d(t,{$GE:()=>F,$PN:()=>Qt,AEN:()=>a.AE,ATM:()=>tt,Aem:()=>$,Au4:()=>P,BYw:()=>yt,Be8:()=>Q,C2:()=>W,C7K:()=>bt,CXJ:()=>a.CX,DGB:()=>it,DHV:()=>U,DKh:()=>Ht,DqB:()=>a.Dq,FAj:()=>g,FQE:()=>He,G6N:()=>y,GEz:()=>ce,H8e:()=>ft,HEU:()=>fe,HYy:()=>vt,HbK:()=>T,IA_:()=>w,IZ_:()=>ti,IqJ:()=>a.Iq,J1t:()=>si,J9c:()=>Pe,JKv:()=>pe,JSO:()=>Be,JhO:()=>he,Jl4:()=>te,KkE:()=>ze,KvH:()=>Ct,LDS:()=>De,LX5:()=>Ye,Lh5:()=>xt,Lkd:()=>Le,Ln9:()=>ct,McC:()=>a.Mc,NAP:()=>f,NPo:()=>Se,N_Z:()=>ye,NtL:()=>St,O14:()=>a.O1,OBX:()=>p,OcM:()=>Te,OlV:()=>a.Ol,PnP:()=>ne,QIZ:()=>Ut,QMQ:()=>dt,Qdk:()=>me,Rww:()=>z,SAn:()=>ut,SeK:()=>oe,SqX:()=>c,StW:()=>v,TId:()=>Fe,Tb_:()=>k,Tzx:()=>Ne,UPi:()=>a.UP,USK:()=>pt,UrL:()=>H,VUN:()=>Ae,W04:()=>ii,WAA:()=>a.WA,WAq:()=>kt,WJ1:()=>ge,WYm:()=>ht,WdJ:()=>o,Wfl:()=>J,X$5:()=>$t,YSK:()=>Ze,YVK:()=>a.YV,Y_Z:()=>et,Z85:()=>ai,ZK8:()=>We,ZXG:()=>di,ZoB:()=>Wt,_Nj:()=>E,_SF:()=>Qe,_p8:()=>ie,a4n:()=>O,b2:()=>Gt,b3k:()=>Tt,bFi:()=>h,bOR:()=>Me,bYw:()=>Ue,bhM:()=>ae,c3z:()=>S,cKd:()=>be,cLA:()=>ot,cOL:()=>Ve,cgF:()=>ke,d5A:()=>Z,dAx:()=>_,dHy:()=>wt,e6f:()=>d,eWj:()=>Oe,es$:()=>jt,f7J:()=>B,fZ_:()=>Jt,g3o:()=>u,gLA:()=>de,h0Y:()=>Je,hWV:()=>Ot,htx:()=>Nt,iUp:()=>_e,ijb:()=>Re,jif:()=>Ie,k4Y:()=>Xt,k6b:()=>Lt,k7D:()=>re,kSk:()=>qe,kvg:()=>$e,lDH:()=>gt,lFB:()=>ri,lVm:()=>Vt,m18:()=>Bt,mA2:()=>a.mA,mKm:()=>Ft,mPu:()=>le,mnc:()=>se,oFY:()=>Yt,okt:()=>ue,p0m:()=>l,p41:()=>Ce,p5T:()=>G,pCm:()=>M,pZ0:()=>lt,pj7:()=>Y,poS:()=>a.po,q4i:()=>Pt,q5y:()=>xe,qht:()=>j,r1q:()=>Xe,rVs:()=>C,rWU:()=>a.rW,rkp:()=>Kt,s6w:()=>ni,sZb:()=>Dt,skl:()=>_t,t1l:()=>Ee,t84:()=>li,tqn:()=>Rt,tsC:()=>V,ttb:()=>rt,ucV:()=>ei,ueo:()=>b,ufd:()=>nt,umO:()=>Et,uyM:()=>K,vQ3:()=>ve,vQo:()=>x,vnr:()=>It,wEf:()=>st,wIO:()=>q,wMq:()=>Zt,wXB:()=>qt,wl5:()=>zt,wq9:()=>je,xEc:()=>Ke,xId:()=>I,x_7:()=>a.x_,xkq:()=>at,xnZ:()=>ee,y2l:()=>mt,y4c:()=>D,yJ8:()=>At,yOO:()=>A,yon:()=>R,yt8:()=>L,yux:()=>N,z3X:()=>s,z53:()=>X,zJD:()=>m,ztB:()=>ui});var n=i(28835),r=i(69052),a=i(62943);let s=function(e){return e.DEFAULT="DEFAULT",e.CALLOUT="CALLOUT",e.ONHOME="ONHOME",e}({}),o=function(e){return e.DISABLED="DISABLED",e.HELMET="HELMET",e.HELMET_AND_SOUND="HELMET_AND_SOUND",e.FELIX="FELIX",e}({});const l=(0,n.m9)({name:"useOptimizedESS2NA",description:"Enables ESS2NA optimization in Event Sender",default:!1}),c=(0,n.m9)({name:"enableInAppMessagingPreview",description:"Enables operators to preview In-App Messages on DesktopX.",default:!1}),u=(0,n.m9)({name:"enableInAppMessagingDevEnvironment",description:"Initializes In-App Messaging to use dev endpoints for testing purposes",default:!1}),d=(0,n.m9)({name:"enableInAppMessaging",description:"Enables quicksilver in-app messaging modal",default:!0}),m=(0,n.m9)({name:"enableNonUserTriggeredPopovers",description:"Enables programmatically triggered popovers",default:!0}),p=(0,n.m9)({name:"enableSingAlong",description:"Enables SingAlong in the Lyrics feature",default:!1}),h=(0,n.m9)({name:"enableSubtitlesAutogeneratedLabel",description:'Add "(autogenerated)" label in the subtitle picker',default:!1}),g=(0,n.BL)({name:"searchVisibilityTest",description:"Test to improve search visibility",values:s,default:s.DEFAULT}),f=(0,n.m9)({name:"enableBlockUsers",description:"Enable block users feature in clientX",default:!1}),v=((0,n.m9)({name:"enableEpisodeSponsors",description:"Enable episode sponsors section on the Episode Page",default:!1}),(0,n.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,n.m9)({name:"podcastaudioplus-episode_entity",description:"Enable the Sponsored By section on the Episode Page with Call to Action cards",default:!1}),(0,n.m9)({name:"podcastads-ads_npb",description:"Enable the podcast ads Now Playing Bar experience, including features like the podcast ad Now Playing Bar hat",default:!1}),(0,n.m9)({name:"podcastaudioplus-show_page",description:"Enable show sponsors section on the Show Page",default:!1}),(0,n.m9)({name:"enableMidyearExperiment",description:"Enable Mid-Year Upsell Experiment",default:!1})),y=(0,n.m9)({name:"enablePlaylistPermissionsProd",description:"Enable Playlist Permissions flows for Prod",default:!1}),b=((0,n.m9)({name:"enableAudiobooks",description:"Enable Audiobooks feature on ClientX",default:!1}),(0,n.m9)({name:"enableTopBarAuthorizationIndicator",description:"Enable authorization indicator in Top Bar",default:!1})),_=(0,n.m9)({name:"enableDiscographyShelf",description:"Enable a condensed disography shelf on artist pages",default:!1}),E=(0,n.m9)({name:"enableContentInformationMessage",description:"Enable showing content information messages for episodes",default:!1}),C=(0,n.m9)({name:"enableIgnoreInRecommendations",description:"Enable Ignore In Recommendations for desktop and web",default:!1}),x=(0,n.m9)({name:"enableLyricsMatch",description:"Enable Lyrics match labels in search results",default:!1}),S=(0,n.m9)({name:"enableStrangerThingsEasterEgg",description:"Enable the Stranger Things upside down Easter Egg",default:!1}),A=(0,n.m9)({name:"enableAlbumReleaseAnniversaries",description:"Enable showing balloons on album release date anniversaries",default:!1}),T=(0,n.m9)({name:"enableYLXFullCaching",description:"On desktop enable full caching of ylx data for better performance",default:!1}),I=(0,n.m9)({name:"enableOverlaySidebarAnimations",description:"Enable entry and exit animations for the overlay panels (queue, device picker, buddy feed...) in the side bar",default:!1}),N=(0,n.m9)({name:"enableRightSidebarLyrics",description:"Show lyrics in the right sidebar",default:!1}),w=(0,n.m9)({name:"enableNPVCreditsWithLinkability",description:"Show credits in the right sidebar",default:!1}),R=(0,n.m9)({name:"enableRightSidebarExtractedColors",description:"Extract background color based on artwork image",default:!1}),k=(0,n.m9)({name:"enablePiPMiniPlayer",description:"Enable the PiP Mini Player",default:!1}),O=(0,n.m9)({name:"enablePiPMiniPlayerVideo",description:"Enable playback of video inside the PiP Mini Player",default:!1}),P=(0,n.m9)({name:"enableCinemaMode",description:"Enable cinema mode",default:!0}),L=(0,n.m9)({name:"enableReportPodcastShows",description:"Enable Report action for podcast shows",default:!1}),j=(0,n.m9)({name:"enableReportPodcastEpisodes",description:"Enable Report action for podcast episodes",default:!1}),D=(0,n.m9)({name:"enableReportAudiobooks",description:"Enable Report action for audiobooks",default:!1}),M=(0,n.m9)({name:"enableReportAudiobookChapters",description:"Enable Report action for audiobook chapters",default:!1}),U=(0,n.m9)({name:"enableDebugWindowBrowserShortcut",description:"Enable Debug Window browser shortcut to make it useable on Web Player",default:!1}),B=(0,n.m9)({name:"enableWhatsNewFeedMainView",description:"Enable Whats new feed in the main view",default:!1}),F=(0,n.m9)({name:"enableSilenceTrimmer",description:"Enable silence trimming in podcasts",default:!1}),H=(0,n.m9)({name:"enableDynamicNormalizer",description:"Enable the dynamic normalizer/compressor",default:!1}),V=(0,n.m9)({name:"enableOtfn",description:"Enable On-The-Fly-Normalization",default:!1}),G=(0,n.m9)({name:"enableYourDJ",description:'Enables the "Your DJ" feature',default:!1}),z=(0,n.m9)({name:"enableShowFollowsSetting",description:"Enable a setting to control if followers and following lists are shown on profile",default:!1}),W=(0,n.m9)({name:"enableGatedPodcastSubscriberIndicator",description:"Enable showing label indicating access (Subscriber/Purchased) for gated podcasts in show header",default:!1}),K=(0,n.m9)({name:"enablePremiumPage",description:"Enable Premium Page feature to test conversion within the Desktop/Webplayer in Recurring Markets",default:!1}),Y=(0,n.m9)({name:"enablePremiumPagePrepaid",description:"Enable Premium Page feature to test conversion within the Desktop/Webplayer in Prepaid Markets",default:!1}),q=(0,n.m9)({name:"enablePremiumPageKorea",description:"Rollout Premium Page feature for Korea in the Desktop/Webplayer",default:!1}),Z=(0,n.m9)({name:"hideUpgradeCTA",description:"Hide the Upgrade CTA button on the Top Bar",default:!1}),$=(0,n.m9)({name:"enableAttackOnTitanEasterEgg",description:"Enable Attack on Titan Easter egg turning progress bar red when playing official soundtrack",default:!1}),Q=(0,n.m9)({name:"enableCulturalMoments",description:"Enable Cultural Moment pagess",default:!1}),J=(0,n.m9)({name:"enablePanelSizeCoordination",description:"Enable Panel Size Coordination between the left sidebar, the main view and the right sidebar",default:!1}),X=(0,n.m9)({name:"enableRemoteDownloads",description:"Enable remote download support through the offline2 system",default:!1}),ee=(0,n.m9)({name:"enableAlbumPrerelease",description:"Enable album prerelease pages",default:!1}),te=(0,n.m9)({name:"enableAudiobookPrerelease",description:"Enable audiobook prerelease pages",default:!1}),ie=(0,n.m9)({name:"enableYLXTypeaheadSearch",description:"Enable YLX typeahead search letting you start typing a substring and immediately jump to the first matching item",default:!1}),ne=((0,n.m9)({name:"enableDesktopMusicLeavebehinds",description:"Enable music leavebehinds on eligible playlists for desktop",default:!1}),(0,n.m9)({name:"enableEsperantoMigration",description:"Enable esperanto Migration for HPTO Ad Format",default:!1})),re=(0,n.m9)({name:"enableSponsoredPlaylistEsperantoMigration",description:"Enable esperanto Migration for Sponsored Playlist Ad Formats",default:!1}),ae=(0,n.m9)({name:"enableAudioAdsEsperantoMigration",description:"Enable esperanto Migration for Audio Ads Format",default:!1}),se=(0,n.m9)({name:"enableVideoAdsEsperantoMigration",description:"Enable esperanto Migration for Video Ads Format",default:!1}),oe=(0,n.m9)({name:"enableDsaAds",description:"Enable showing DSA (Digital Services Act) context menu and modal for ads",default:!1}),le=(0,n.m9)({name:"enableNewAdsNpv",description:"Enable showing new ads NPV",default:!1}),ce=(0,n.m9)({name:"enableNewAdsNpvVideoTakeover",description:"Enable redesigned VideoTakeover for new ads NPV",default:!1}),ue=(0,n.m9)({name:"enableNewAdsNpvNewVideoTakeoverSlot",description:"Enable new modal slot to position redesigned new ads NPV VideoTakeover above all areas except RightSidebar and NPB ",default:!1}),de=(0,n.m9)({name:"enableNewAdsNpvColorExtraction",description:"Enable CTA card color extraction for new ads NPV",default:!1}),me=(0,n.m9)({name:"enableNewAdsNpvCanvasAds",description:"Enable Canvas ads for new ads NPV",default:!1}),pe=((0,n.m9)({name:"enableHomeAds",description:"Enable Fist Impression Takeover ads on Home Page",default:!1}),(0,n.BL)({name:"enableMandalorianEasterEgg",description:"Enable the Mandalorian easter-egg",values:o,default:o.DISABLED})),he=(0,n.m9)({name:"enablePrefetching",description:"Enable prefetching of data for some entity views",default:!1}),ge=(0,n.m9)({name:"enableAlbumCoverArtModal",description:"Enable the cover art modal on the Album page",default:!1}),fe=(0,n.m9)({name:"enableABP",description:"Enable ABP",default:!1}),ve=(0,n.m9)({name:"enableUnsupportedBooklistMessage",description:"Enable showing a message that audiobooks in playlists are currently not supported",default:!1}),ye=(0,n.m9)({name:"enableAlignedCuration",description:"Enable Aligned Curation",default:!1}),be=(0,n.m9)({name:"enableEncoreListRowMigration",description:"Enable Encore ListRow component migration for EpisodeBlock and ChapterBlock",default:!1}),_e=((0,n.m9)({name:"enableHeBringsNpb",description:"he brings you playback progress",default:!1}),(0,n.BL)({name:"enableSocialConnectOnDesktop",description:"Enable the Social Connect API that powers group listening sessions for Desktop",values:r._,default:r._.DISABLED})),Ee=(0,n.BL)({name:"enableSocialConnectOnDesktopWebPlayer",description:"Enable the Social Connect API that powers group listening sessions for Desktop Web Player",values:r._,default:r._.DISABLED}),Ce=(0,n.m9)({name:"enableConnectTransferAPI",description:"Enable the ConnectTransferAPI responsible for transferring and pulling playback",default:!1}),xe=(0,n.m9)({name:"enableConnectDiscoveryAPI",description:"Enable the ConnectDiscoveryAPI responsible for device discovery",default:!1}),Se=(0,n.m9)({name:"enableConnectDeviceManagementAPI",description:"Enable the ConnectDeviceManagementAPI responsible for managing device-related actions",default:!1}),Ae=(0,n.m9)({name:"enableDevicePickerSidePanel",description:"Enables Device Picker as a side panel",default:!1}),Te=(0,n.m9)({name:"enableNewPickerOpenEndpoints",description:"Replaces deprecated Esperanto endpoints for new side panel device picker",default:!1}),Ie=(0,n.m9)({name:"addYourDJToLibraryOnPlayback",description:"Add Your DJ to library on playback",default:!1}),Ne=(0,n.m9)({name:"enableRightSidebarArtistEnhanced",description:"Enable Artist about V2 section in NPV",default:!1});let we=function(e){return e.DEFAULT="DEFAULT",e.CONTROL="CONTROL",e.VARIANT="VARIANT",e}({});const Re=(0,n.BL)({name:"enableInternalTrackSearch",description:"Enable internal track search on desktop UI",values:we,default:we.DEFAULT}),ke=(0,n.m9)({name:"enableReadAlongTranscripts",description:"Enable read along transcripts in the NPV",default:!1}),Oe=(0,n.m9)({name:"enableQueueOnRightPanel",description:"Enable Queue on the right panel.",default:!1}),Pe=(0,n.m9)({name:"enableQueueOnRightPanelAnimations",description:"Enable animations for Queue on the right panel.",default:!1}),Le=(0,n.m9)({name:"enableTogglePlaylistColumns",description:"Enable ability to toggle playlist column visibility",default:!1}),je=(0,n.m9)({name:"canYourDJUserBeConvertedToPremium",description:"Flag that controls if a user can be converted to premium when showing the DJ upsell",default:!1}),De=(0,n.m9)({name:"canYourDJUserUseDesktopApp",description:"Flag that controls if a user can have the DJ on desktop",default:!1}),Me=(0,n.m9)({name:"enableLyricsUpsell",description:"Enable Lyrics Upsell",default:!1});let Ue=function(e){return e.CONTROL="CONTROL",e.TRUNCATED_LYRICS="TRUNCATED_LYRICS",e.EMPTY_LYRICS="EMPTY_LYRICS",e}({});const Be=(0,n.BL)({name:"forceLyricsUpsell",description:"Force Lyrics Upsell for testing",values:Ue,default:Ue.CONTROL}),Fe=(0,n.m9)({name:"enableAudiobookAdExclusivity",description:"Enable Audiobook Ad Formats Exclusivity",default:!1}),He=(0,n.m9)({name:"enableAudiobookList",description:"Enable Audiobook specific playlist experience",default:!1}),Ve=(0,n.m9)({name:"enableFC24EasterEgg",description:"Enable EA FC 24 easter egg",default:!1});let Ge=function(e){return e.CONTROL="CONTROL",e.UPSELL_SIMPLE="UPSELL_SIMPLE",e.UPSELL_POPOVER="UPSELL_POPOVER",e}({});(0,n.BL)({name:"musicVideosPremiumUpsell",description:"Testing Premium upsell for Free users on music videos",values:Ge,default:Ge.CONTROL});const ze=(0,n.m9)({name:"enableNPVideosV2",description:"Enable NPV 2.0 Video experience for testing",default:!1}),We=(0,n.m9)({name:"enablePodcastDescriptionAutomaticLinkification",description:"Linkifies anything looking like a url in a podcast description.",default:!1}),Ke=(0,n.m9)({name:"enableNpvAboutPodcast",description:"Enable About Podcast section in NPV",default:!1}),Ye=(0,n.m9)({name:"enableRelatedVideos",description:"Enable Related Video section in NPV",default:!1}),qe=(0,n.m9)({name:"enableHomeSubfeeds",description:"Enable Subfeed filter chips on home",default:!1}),Ze=(0,n.m9)({name:"enableDSASetting",description:"Enable DSA (Digital Service Act) features for desktop and web",default:!1}),$e=(0,n.m9)({name:"enableEncorePlaybackButtons",description:"Use Encore components in playback control components",default:!1}),Qe=(0,n.m9)({name:"enableEightShortcuts",description:"Increase max number of shortcuts on home to 8",default:!1}),Je=(0,n.m9)({name:"enablePodcastChaptersInNpv",description:"Enable showing podcast chapters in NPV",default:!1}),Xe=(0,n.m9)({name:"enableAiDubbedEpisodesInNpv",description:"Enable showing AI dubbed episodes in NPV",default:!1}),et=(0,n.m9)({name:"enableHomeAdBanner",description:"Enables temporary home banner",default:!1}),tt=(0,n.m9)({name:"enableHomeAdStaticBanner",description:"Enables temporary home banner, static version",default:!1}),it=((0,n.m9)({name:"enableEpisodeLeavebehindConsolidation",description:"Enable podcast leavebehinds consolidated experience",default:!1}),(0,n.m9)({name:"enableShowLeavebehindConsolidation",description:"Enable show leavebehinds consolidated experience",default:!1}),(0,n.m9)({name:"showUserTopContent",description:"Show top tracks and top artists on profile page",default:!0}));(0,n.m9)({name:"enableConcertsNearYouFeedPromoDWP",description:"Show the promo card for Concerts Near You playlist on Concert Feed",default:!1});let nt=function(e){return e.CONTROL="control",e.HOME_NEXT_TO_NAVIGATION="home-next-to-navigation",e.HOME_NEXT_TO_SEARCH="home-next-to-search",e}({});const rt=(0,n.BL)({name:"enableGlobalNavBar",description:"Show global nav bar with home button, search input and user avatar",default:nt.CONTROL,values:nt}),at=(0,n.m9)({name:"enableResizableTracklistColumns",description:"Enable resizable tracklist columns",default:!1}),st=(0,n.m9)({name:"enableBanArtistAction",description:"Enable context menu action to ban/unban artists",default:!1}),ot=(0,n.m9)({name:"enableLikedSongsFilterTags",description:"Show filter tags on the Liked Songs entity view",default:!1}),lt=(0,n.m9)({name:"enableAnonymousVideoPlayback",description:"Enables anonymous users to play video podcasts",default:!1}),ct=(0,n.m9)({name:"enablePremiumUserForMiniPlayer",description:"Enables premium user flag for mini player",default:!1}),ut=(0,n.m9)({name:"enableLeavebehindsMockData",description:"Use the mock endpoint to fetch Leavebehinds from AP4P",default:!1}),dt=(0,n.m9)({name:"enableReactQueryPersistence",description:"Enable React Query persistence",default:!1}),mt=(0,n.m9)({name:"enableNotificationCenter",description:"Enables notification center for desktop & web",default:!1}),pt=(0,n.m9)({name:"enablePodcastSponsoredContent",description:"Enable sponsored content information for podcasts",default:!1}),ht=(0,n.m9)({name:"enableFullscreenMode",description:"Enable fullscreen mode",default:!1}),gt=(0,n.m9)({name:"enableYLXPrereleaseAlbums",description:"Enables album pre-releases in YLX",default:!1}),ft=(0,n.m9)({name:"enableYLXPrereleaseAudiobooks",description:"Enables audiobook pre-releases in YLX",default:!1}),vt=(0,n.m9)({name:"enablePipImpressionLogging",description:"Enables impression logging for PiP",default:!1}),yt=((0,n.m9)({name:"enableMoreLikeThisPlaylist",description:"Enables More Like This playlist for playlists the user cannot edit",default:!1}),(0,n.m9)({name:"enableWatchFeed",description:"Enable Watch Feed feature",default:!1})),bt=((0,n.m9)({name:"enableHybridHome",description:"Enable Hybrid Home feature",default:!1}),(0,n.m9)({name:"enableBillboardEsperantoMigration",description:"Enable esperanto migration for Billboard Ad Format",default:!1})),_t=(0,n.m9)({name:"enableShowRating",description:"Enables new UI for rating books and podcasts",default:!1}),Et=(0,n.m9)({name:"enableEsperantoMigrationLeaderboard",description:"Enable esperanto Migration for Leaderboard Ad Format",default:!1}),Ct=(0,n.m9)({name:"enableConcertsInSearch",description:"Enables concerts in search",default:!1}),xt=(0,n.m9)({name:"enableLocalConcertsInSearch",description:"Enables local concert recommendations in search",default:!1});let St=function(e){return e.CONTROL="control",e.CANVAS_PLAY_LOOP="canvas-play-loop",e.CANVAS_PLAY_ON_HOVER="canvas-play-on-hover",e}({});const At=(0,n.BL)({name:"enableCanvasNpv",description:"Enables short, looping visuals on tracks.",default:St.CONTROL,values:St}),Tt=(0,n.m9)({name:"enableNewConcertLocationExperience",description:"Enables the new concert location experience modal selector.",default:!1}),It=(0,n.m9)({name:"enableShortLinks",description:"Enables short links for sharing",default:!1}),Nt=(0,n.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});let wt=function(e){return e.DEFAULT="default",e.CONTROL="control",e.ENHANCED="enhanced",e.LINKS_NO_LYRICS="links-no-lyrics",e.NO_LYRICS="no-lyrics",e}({});const Rt=(0,n.BL)({name:"enableTrackPageVisibilityDwp",description:"Make track entity page more accessible with internal links to track pages and a new lyrics preview component",values:wt,default:wt.DEFAULT}),kt=((0,n.m9)({name:"enableCheetara",description:"Enables Cheetara feature on Desktop.",default:!1}),(0,n.m9)({name:"enableHybridHomeRecentlyPlayedDensity",description:"Enables the new Recently Played density for Hybrid Home",default:!1})),Ot=(0,n.m9)({name:"enableHybridHomeLowDensity",description:"Enables the new low density (grid) for Hybrid Home",default:!1}),Pt=(0,n.m9)({name:"enableHybridHomeFeedBaseline",description:"Enables the new Feed Baseline for Hybrid Home",default:!1}),Lt=(0,n.m9)({name:"enableSpotlight",description:"Enables the Spotlight component on home",default:!1}),jt=(0,n.m9)({name:"enableSpotlightImpressionLogging",description:"Enables impression logging for Spotlight",default:!1}),Dt=(0,n.m9)({name:"enablePromotions",description:"Enables promotions on home",default:!1});let Mt=function(e){return e.Default="default",e.Control="control",e.Shelf="shelf",e.ShelfV2="shelf-v2",e.List="list",e}({});(0,n.BL)({name:"enableEpisodeDiscoveryDwp",description:"Enables similar episode recommendations on episode entity pages",values:Mt,default:Mt.Default});const Ut=(0,n.m9)({name:"enableNpvCreditsImpressions",description:"Enable impressions for credits in the Now Playing View for desktop and web",default:!1}),Bt=(0,n.HW)({name:"foregroundSessionDebounceTime",description:"Debounce time in milliseconds for foreground session tracking.",default:0,lower:0,upper:6e4}),Ft=(0,n.m9)({name:"enableCenteredLayout",description:"Enable centered layout",default:!1}),Ht=((0,n.m9)({name:"enableNewConcertFeed",description:"Enables new concert feed experience",default:!1}),(0,n.m9)({name:"enableVenuePages",description:"Enables venus pages",default:!1})),Vt=(0,n.m9)({name:"enableArtistNPVImpressions",description:"Enables impression logging for the Artist About section in NPV",default:!1}),Gt=(0,n.m9)({name:"enableVideoAutoplayHome",description:"Enables video autoplay on home",default:!1}),zt=(0,n.m9)({name:"enableVideoAutoplayNPV",description:"Enables video autoplay in NPV",default:!1}),Wt=(0,n.m9)({name:"enableVideoAutoplayAlways",description:"Enables video autoplay in all the surfaces. Has priority over the other flags",default:!1}),Kt=(0,n.m9)({name:"disablePremiumOnlyModal",description:"Disable the Premium Only Modal",default:!1}),Yt=(0,n.m9)({name:"enableYourSoundCapsuleModal",description:"Enables showing a modal on desktop to users who have clicked on a Your Sound Capsule share link",default:!1}),qt=(0,n.m9)({name:"enableTuna",description:"Enables Tuna feature",default:!1}),Zt=((0,n.m9)({name:"enableYscUpgradeEligible",description:"Determines if a user is in a country where Your Sound Capsule is available",default:!1}),(0,n.m9)({name:"enableScrollDrivenAnimations",description:"Enables scroll driven animations for cards and shelved",default:!1}));let $t=function(e){return e.NPV_HIDDEN="NPV_HIDDEN",e.NPV_ALWAYS_VISIBLE="NPV_ALWAYS_VISIBLE",e.NPV_VISIBLE_ON_HOVER="NPV_VISIBLE_ON_HOVER",e}({});const Qt=(0,n.BL)({name:"shareButtonPositioning",description:"Share button positioning in NPV",values:$t,default:$t.NPV_HIDDEN}),Jt=(0,n.m9)({name:"enableSharingButtonOnMiniPlayer",description:"Enables sharing button on MiniPlayer (this also moves the (+) icon close to the title)",default:!1}),Xt=(0,n.m9)({name:"enableHomeSubfeedFeedBaseline",description:"Enables 1D cards in subfeed pages",default:!1}),ei=(0,n.m9)({name:"enableYourEpisodesListPlatform",description:"Enables Your Episodes on list platform",default:!1}),ti=(0,n.m9)({name:"enableLikedSongsListPlatform",description:"Enables Liked Songs on list platform",default:!1}),ii=(0,n.m9)({name:"enablePrereleaseRadar",description:"Show a curated list of upcoming albums to a user",default:!1}),ni=(0,n.m9)({name:"enableLyrics",description:"Feature flag that controls the availability of the lyrics feature",default:!0}),ri=(0,n.m9)({name:"enableAlignedCurationSavedIn",description:"Enables the Saved In section in Aligned Curation",default:!1}),ai=(0,n.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}),si=(0,n.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 oi=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}({});(0,n.BL)({name:"enableChartsMVPUserTestDWP1",description:"Enable Charts MVP User Test 1 on unauth dwp home page",values:oi,default:oi.DEFAULT});const li=(0,n.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 ci=function(e){return e.Default="default",e.Control="control",e.Enabled="enabled",e}({});(0,n.BL)({name:"enableBrotliCompressionViaCDN",description:"Enable Brotli compression via Fastly CDN",values:ci,default:ci.Default});let ui=function(e){return e.CONTROL="CONTROL",e.WEBPLAYERPDP="WEBPLAYERPDP",e}({});const di=(0,n.BL)({name:"ugoTestOrganicPointsIntoWebPlayerPDP",description:"Testing Organic Entry points into PDP",values:ui,default:ui.CONTROL});let mi=function(e){return e.Default="default",e.Control="control",e.Enabled="enabled",e}({});(0,n.BL)({name:"enableLyricsReturnsHoldbackDWP",description:"Enable holdback group for lyrics returns",values:mi,default:mi.Default});let pi=function(e){return e.Default="default",e.Control="control",e.Enabled="enabled",e}({});(0,n.BL)({name:"enableLyricsReturnsTreatmentDWP",description:"Enable treatment group for lyrics returns",values:pi,default:pi.Default})},33304:(e,t,i)=>{"use strict";i.d(t,{Ch:()=>c,P8:()=>a,e2:()=>s,jV:()=>l,ob:()=>o,yA:()=>r});const n=e=>`:${e}`,r=n("showId"),a=e=>`/show/${e}`,s=a(r),o=n("episodeId"),l=e=>`/episode/${e}`,c=l(o)},47721:(e,t,i)=>{"use strict";i.d(t,{JJ:()=>n,mo:()=>a,q:()=>r});const n=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"===n(e),a=e=>"RU"===n(e)},5538:(e,t,i)=>{"use strict";i.d(t,{MU:()=>s,NR:()=>o,uX:()=>a});var n=i(42551);const r=e=>e.features,a=(0,n.Mz)(r,(e=>e?.enableShows||!1)),s=(0,n.Mz)(r,(e=>e?.enableI18nLocales||!1)),o=(0,n.Mz)(r,(e=>e?.isI18nAdditionalPagesEnabled||!1))},15597:(e,t,i)=>{"use strict";i.d(t,{S:()=>o,u:()=>s});var n=i(42551),r=i(71817);const a=e=>e.seoExperiment,s=(0,n.Mz)(a,(e=>e?.uri)),o=(0,n.Mz)(a,(e=>e?.[r.c.EPISODE]))},7939:(e,t,i)=>{"use strict";i.d(t,{Bi:()=>c,F6:()=>l,Ht:()=>n,Mn:()=>o,Yb:()=>s,mB:()=>r,oo:()=>a});const n=e=>e.session,r=e=>e.session?.user||void 0,a=e=>e.session?.productState?.catalogue,s=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"]},84577:(e,t,i)=>{"use strict";i.d(t,{GP:()=>n,fl:()=>r,ml:()=>a});const n=e=>e.ui.improvedSignupPromptDialog.isOpen,r=e=>e.ui.yourSoundCapsuleModal.isOpen,a=e=>e.ui.videoNotSupportedModal.isOpen},75713:(e,t,i)=>{"use strict";i.d(t,{J:()=>n,O:()=>r});const n="REQUEST_ME_SUCCESS",r="REQUEST_PRODUCT_STATE_SUCCESS"},89734:(e,t,i)=>{"use strict";i.d(t,{Hh:()=>r,IE:()=>l,Rv:()=>u,ZQ:()=>c,a7:()=>o,oM:()=>s,wH:()=>a,zf:()=>d});var n=i(10308);function r(){return{type:n.xM}}function a(){return{type:n.tQ}}function s(){return{type:n.l3}}function o(e){return{type:n.ro,authData:e}}function l(e){return{type:n.Zz,name:e}}function c(e){return{type:n.L0,images:e}}function u(e){return{type:n.Vx,country:e}}function d(e){return{type:n.dD,locale:e}}},10308:(e,t,i)=>{"use strict";i.d(t,{L0:()=>a,Vx:()=>c,Zz:()=>r,dD:()=>u,l3:()=>l,ro:()=>n,tQ:()=>o,xM:()=>s});const n="ACCESS_TOKEN_UPDATE_SUCCESS",r="UPDATE_DISPLAY_NAME_SUCCESS",a="PROFILE_IMAGES_UPDATE_SUCCESS",s="LOAD",o="LOGOUT_REQUEST",l="LOGOUT_SUCCESS",c="SET_COUNTRY_OVERRIDE",u="SET_LOCALE_OVERRIDE"},13874:(e,t,i)=>{"use strict";i.d(t,{EL:()=>a,YU:()=>n,aY:()=>r});let n=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}({}),a=function(e){return e.INVITE="invite",e.JOIN="join",e.REDIRECT="redirect",e.LEAVE_SESSION="leaveSession",e.END_SESSION="endSession",e.SESSION_ENDED="sessionEnded",e.REMOVE_PARTICIPANT="remove_participant",e.ERROR="error",e.MOBILE_ONLY="mobileOnly",e}({})},65495:(e,t,i)=>{"use strict";i.d(t,{e:()=>n});class n 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)}}},94921:(e,t,i)=>{"use strict";i.d(t,{Pm:()=>l,s1:()=>d,yV:()=>r});var n=i(86762);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 a=Number(n.A.screenLg.replace("px",""))||1200,s=Number(n.A.homeRegularDensityMinWidth.replace("px",""))||210,o=Number(n.A.homeRegularDensityMinWidthSmallScreens.replace("px",""))||160,l=Number(n.A.homeFeedBaselineMinWidth.replace("px",""))||380,c=(e,t)=>{const{gridWidth:i,columnGap:n}=e,r=Math.max(1,Math.ceil((i+n)/(t+n)));return Math.ceil((r*t-(r-1)*n)/(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<a?o:s}),[r.HOME_HIGH_DENSITY]:()=>({getMinimumColumnWidth:({gridWidth:e})=>e<a?120:150}),[r.HOME_LOW_DENSITY]:()=>({getMinimumColumnWidth:()=>370,getMaxRowCount:()=>2}),[r.WATCH_FEED]:()=>({getMinimumColumnWidth:e=>c(e,210)}),[r.MUSIC_VIDEOS]:()=>({getMinimumColumnWidth:e=>c(e,250)}),[r.HOME_FEED_BASELINE]:()=>({getMaxRowCount:()=>5,getMinimumColumnWidth:()=>l})},d=(e,t)=>u[e](t)},22552:(e,t,i)=>{"use strict";i.d(t,{Q:()=>n.Q});var n=i(47586)},88321:(e,t,i)=>{"use strict";i.d(t,{E:()=>o});var n=i(30758);const r=(e,t=0,i={items:[],invalid:!0,id:0})=>({fetchedId:e.fetchedId,items:Array.from({length:e.totalLength}).map(((n,r)=>{const a=i.invalid?void 0:i.items[r]?.value;return{value:r-t in e.items?e.items[r-t]:a,index:r}})),invalid:!1,id:i.id}),a=e=>e.filter((e=>null!==e.value)),s=e=>{e.invalid=!0,e.id++};function o({initialItems:e,nrItems:t,fetch:i,limit:o=0,cacheAllOnInvalidation:l=!1,cacheAllLimit:c=t}){const u=(0,n.useRef)(!1),d=(0,n.useRef)(r({totalLength:t,items:e??[]})),m=(0,n.useRef)(!0),[,p]=(0,n.useState)(0);(0,n.useMemo)((()=>{m.current||s(d.current)}),[i,t]),(0,n.useMemo)((()=>{0===e?.length||m.current||s(d.current)}),[e]);const h=(0,n.useCallback)((async(n,a=o,s=!0,l=!1)=>{if(u.current&&!l&&!d.current.invalid)return;const c=d.current.id;if(i){const e=d.current.invalid;d.current.invalid=!1,u.current=!0;const t=await i(n,a);if(u.current=!1,c!==d.current.id)return;if(0===t.items.length&&0!==t.totalLength&&t.totalLength===d.current.items.length)return;d.current=r(t,n,{...d.current,invalid:e}),t.onCacheSuccess?.(),s&&p((e=>e+1))}else d.current=r({totalLength:t,items:e??[]}),s&&setTimeout((()=>p((e=>e+1))),0)}),[i,e,o,t]),g=(0,n.useCallback)(((e,t,i)=>{const n=a(d.current.items).slice(e,t+1),r=n.filter((e=>d.current.invalid||void 0===e.value)),s=r.at(0)?.index??(d.current.invalid?e:void 0),l=r.at(-1)?.index??(d.current.invalid?t:void 0);return void 0===s||void 0===l||i?.cachedOnly||h(l===t?s:s===e?Math.max(l-o+1,0):s),n.map((e=>e.value))}),[h,o]),f=(0,n.useCallback)(((e,t)=>{const i=a(d.current.items),n=!d.current.invalid&&void 0!==i.at(e)?.value,r=!d.current.invalid&&void 0!==i.at(e+1)?.value;return n||t?.cachedOnly||h(r?Math.max(e-o+1,0):e),i.at(e)?.value}),[h,o]),v=(0,n.useRef)(!1),y=(0,n.useRef)(!1),b=(0,n.useCallback)((async(e=!1)=>{y.current||(v.current?y.current=!0:(v.current=!0,await h(0,c,e,!0),y.current&&await h(0,c,e,!0),y.current=!1,v.current=!1))}),[c,h]);(0,n.useEffect)((()=>{let e;return l&&(e=setTimeout(b,1e3)),()=>{clearTimeout(e)}}),[b,l]);const _=(0,n.useCallback)((()=>{l?b(!0):(s(d.current),p((e=>e+1)))}),[b,l]);m.current=!1;const E=d.current.invalid?t>0:a(d.current.items).some((e=>!!e.value)),C=d.current.invalid?t:a(d.current.items).length;return{fetchedId:d.current.fetchedId,getItems:g,getItem:f,invalidateCache:_,hasItems:E,nrValidItems:C,cacheAll:b}}},65987:(e,t,i)=>{"use strict";i.d(t,{I:()=>n,O:()=>r});const n=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}({})},95165:(e,t,i)=>{"use strict";i.d(t,{i:()=>r});var n=i(30758);const r=({ref:e,getFocusElement:t,onFocus:i,preventScroll:r,deps:a=[]})=>{const s=(0,n.useRef)(t),o=(0,n.useRef)(i);s.current=t,o.current=i;const l=(0,n.useRef)(null);(0,n.useEffect)((()=>{l.current=document.activeElement;const t=s.current?.(e.current)??e.current;i?o.current?.(t):t?.focus({preventScroll:r})}),a)}},62673:(e,t,i)=>{"use strict";i.d(t,{g:()=>a});var n=i(30758),r=i(24359);const a=(e,t=!1)=>{const i=(0,n.useCallback)((()=>{if(!e.current)return;Array.from(e.current.querySelectorAll(r.ru)).forEach((e=>e.setAttribute("tabindex","-1")))}),[e]);(0,n.useEffect)(i),(0,n.useEffect)((()=>{let n=null;return t&&(n=new MutationObserver(i),n.observe(e.current,{childList:!0,subtree:!0})),()=>n?.disconnect()}),[t,e,i])}},43259:(e,t,i)=>{"use strict";i.d(t,{s:()=>r});var n=i(30758);const r=({onRestoreFocus:e,deps:t=[]}={})=>{const i=(0,n.useRef)(null);(0,n.useRef)(e).current=e,(0,n.useEffect)((()=>(i.current=document.activeElement,()=>{e?e?.(i.current):i.current?.focus({preventScroll:!0})})),t)}},24359:(e,t,i)=>{"use strict";i.d(t,{MS:()=>s,fk:()=>a,nu:()=>n,ru:()=>r,tM:()=>o});const n=["a[href]:not([data-skip-in-keyboard-nav])","button:not([data-skip-in-keyboard-nav])",'[role="button"]:not([data-skip-in-keyboard-nav])','[role="progressbar"]:not([data-skip-in-keyboard-nav])'].join(", "),r=['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 a(e){const t=e.querySelector(n),i=e.querySelector('[tabindex="0"]')||t;return!!i&&(i.setAttribute("tabindex","0"),i.setAttribute("data-roving-interactive","1"),!0)}function s(e,t,{preventScroll:i}={preventScroll:!1}){t&&(e&&(e.removeAttribute("data-roving-interactive"),e.tabIndex=-1),t.tabIndex=0,t.setAttribute("data-roving-interactive","1"),t.focus({preventScroll:i}))}function o(e){return!!e&&!!e.querySelector(n)}},11088:(e,t,i)=>{"use strict";i.d(t,{j:()=>r});var n=i(11808);function r({h:e,m:t,s:i},r=" "){return[e?n.Ru.get("time.hours.short",e):"",t?n.Ru.get("time.minutes.short",t):"",i?n.Ru.get("time.seconds.short",i):""].filter((e=>""!==e)).join(r)}},70717:(e,t,i)=>{"use strict";i.d(t,{BG:()=>n,W$:()=>s,qF:()=>a,yf:()=>r});const n=["/daily-mix-hub","/made-for-you","/genre/made-for-x-hub","/genre/made-for-x-hub-blend"],r="/genre/0JQ5DAt0tbjZptfcdMSKl3",a="/genre/0JQ5DAqbMKFz6FAsUtgAab",s="/genre/0JQ5DAudkNjCgYMM0TZXDr"},14467:(e,t,i)=>{"use strict";i.d(t,{$K:()=>g,BW:()=>l,Bl:()=>d,Kw:()=>m,M0:()=>h,S5:()=>a,Vd:()=>p,iG:()=>n,k$:()=>s,nw:()=>u,vE:()=>o,xD:()=>r,zd:()=>c});const n="https://open.spotify.com/",r="https://www.spotify.com/account/overview/",a="https://www.spotify.com/logout",s="https://www.spotify.com/account/privacy/",o="https://www.spotify.com/account/profile/",l="https://www.spotify.com/premium/",c="https://www.spotify.com/us/purchase/panel/",u="https://support.spotify.com/",d="https://www.spotify.com/legal/cookies-policy/",m="https://spotify.com/download",p="https://support.spotify.com/ru-ru/contact-spotify-legal-form/",h="https://spotify.com/premium/?utm_source=app&utm_medium=desktop&utm_campaign=upgrade",g="/__noul__"},32712:(e,t,i)=>{"use strict";i.d(t,{CT:()=>a,IH:()=>m,IU:()=>s,NW:()=>l,Xn:()=>c,Xq:()=>d,_h:()=>o,eA:()=>p,r0:()=>u});var n=i(52840),r=i(71817);const a="intl-",s=(new RegExp(`${`/${a}`}([a-zA-Z0-9-]+)`),[]),o=[n.h.id,n.h.de,"pt",n.h.ja,n.h.fr,n.h.ar,n.h.es,n.h.tr,n.h.it],l=[...o,...s],c=n.h.en,u=[],d=[],m=[],p=[r.c.ALBUM,r.c.ARTIST,r.c.TRACK,r.c.PREMIUM],[h]=(s.length>0?s[0]:o[0],n.h.hu,o);s.length||n.h.ca,n.h.zhCN,n.h.es419,n.h.es},85513:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});const n=300},34629:(e,t,i)=>{"use strict";i.d(t,{bi:()=>s,oH:()=>l,ql:()=>a,v7:()=>o,zz:()=>r});var n=i(30758);const r=(0,n.createContext)(""),a=(0,n.createContext)(null),s=(0,n.createContext)({scrollNodeRef:{current:null},scrollNodeChildRef:{current:null}}),o=()=>{const e=(0,n.useContext)(s);if(null===e)throw new Error("Trying to use 'ScrollNodeContext' without 'ScrollNodeContext.Provider'!");return e.scrollNodeRef},l=(0,n.createContext)({isRightSidebarVisible:!0,isNavBarVisible:!0,isNowPlayingBarVisible:!0,isTopBarVisible:!0,isMainViewExpanded:!1,resetMainView:()=>{},collapseMainView:()=>{}})},16297:(e,t,i)=>{"use strict";i.d(t,{gq:()=>a,K9:()=>r,zV:()=>s});var n=i(11808);const r=(e,t,i)=>e?n.Ru.get("concert.entity_metadata.title",e,t,i):"",a=e=>{if(!e)return"";return`${e} Tickets - ${(new Date).getFullYear()} Concert Tour Dates | Spotify`},s=e=>`Concert Tickets & Tour Dates for you${e?` in ${e}`:""} | Spotify`},32994:(e,t,i)=>{"use strict";i.d(t,{E:()=>n});let n=function(e){return e.XSMALL="XSMALL",e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e.XLARGE="XLARGE",e}({})},42116:(e,t,i)=>{"use strict";i.d(t,{o:()=>r,y:()=>a});var n=i(30758);const r=(0,n.createContext)(void 0),a=()=>(0,n.useContext)(r)},86945:(e,t,i)=>{"use strict";i.d(t,{c:()=>o,x:()=>s});var n=i(30758),r=i(26969);function a(e,t,i){const[a,s]=(0,n.useState)(),o=Object.entries(e).sort(((e,t)=>t[1]-e[1]));return{ref:(0,r.w)({refOrElement:i,observeOnly:t,observeOnMount:!0,onResize:({[t]:e})=>{if(void 0===e)return;const i=o.find((([,t])=>e>=t)),n=i&&i[0];n&&n!==a&&s(n)}}),breakpoint:a}}function s(e,t){return a(e,"width",t)}function o(e,t){return a(e,"height",t)}},65876:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(30758);function r(e){const t=(0,n.useRef)(e);return(0,n.useLayoutEffect)((()=>{t.current=e})),(0,n.useCallback)(((...e)=>t.current(...e)),[])}},81996:(e,t,i)=>{"use strict";i.d(t,{N:()=>r});var n=i(30758);function r(e){const t=(0,n.useRef)(null);return(0,n.useEffect)((()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)})),t}},45396:(e,t,i)=>{"use strict";i.d(t,{g:()=>a});var n=i(30758),r=i(34629);function a(e,{executeOnceOnStart:t=!1,disabled:i=!1}={}){const{scrollNodeRef:a}=(0,n.useContext)(r.bi);(0,n.useEffect)((()=>{const n=a.current;if(!i&&n)return n.addEventListener("scroll",e),t&&n.dispatchEvent(new Event("scroll")),()=>n.removeEventListener("scroll",e)}),[a,e,t,i])}},63332:(e,t,i)=>{"use strict";i.d(t,{U:()=>a});var n=i(30758),r=i(49515);const a=e=>{const t=(0,n.useMemo)((()=>(0,r.c)()?null:window.matchMedia(e)),[e]),[i,a]=(0,n.useState)((()=>!t||t.matches));return(0,n.useEffect)((()=>{if(!t||!t.addEventListener)return()=>{};const e=e=>{a(e.matches)};return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}),[t]),i}},68916:(e,t,i)=>{"use strict";i.d(t,{S:()=>r});var n=i(30758);function r(e){return(0,n.useMemo)((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}),e)}},73356:(e,t,i)=>{"use strict";i.d(t,{j:()=>r});var n=i(63332);const r=()=>(0,n.U)("(prefers-reduced-motion: reduce)")},6292:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var n=i(30758);function r(e){const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current=e}),[e]),t.current}},31252:(e,t,i)=>{"use strict";i.d(t,{s:()=>o});var n=i(30758),r=i(8159),a=i(60656);const s={throttleTime:100,leading:!0};function o(e,t=s){const i=(0,a.ox)(),{throttleTime:o,...l}=t,c=(0,r.YQ)(e,o,l);(0,n.useEffect)((()=>(i?.addEventListener("resize",c),()=>{i?.removeEventListener("resize",c),c.cancel()})),[c,i])}},26969:(e,t,i)=>{"use strict";i.d(t,{w:()=>l});var n=i(30758),r=i(49515);function a(e){return!(0,r.c)()&&e instanceof HTMLElement}let s;const o={subscribersByElement:new WeakMap,get resizeObserver(){return s||(s=new ResizeObserver((e=>{Array.isArray(e)&&e.forEach((t=>{const i={width:Math.round(t.contentRect.width),height:Math.round(t.contentRect.height)};(o.subscribersByElement.get(t.target)??new Set).forEach((n=>{n(i,t,e)}))}))}))),s}};function l({onResize:e,refOrElement:t,observeOnly:i,observeOnMount:r=!1}){const s=(0,n.useRef)(e);s.current=e;const l=(0,n.useRef)(i);l.current=i;const c=(0,n.useRef)({width:-1,height:-1}),u=(0,n.useCallback)(((e,t,i)=>{if(!s.current)return;const n=c.current.width!==e.width,r=c.current.height!==e.height;("width"===l.current&&n||"height"===l.current&&r||!l.current&&(n||r))&&s.current(e,t,i),c.current.width=e.width,c.current.height=e.height}),[]),d=function({refOrElement:e,subscriber:t}){let i=null;const r=(0,n.useRef)(null),s=(0,n.useRef)(null),o=(0,n.useRef)(null),l=(0,n.useRef)(),c=(0,n.useRef)(t);c.current=t;const u=(0,n.useCallback)((()=>{let t=null;s.current?t=s.current:r.current?t=r.current:a(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,n.useCallback)((e=>{s.current=e,u()}),[u]);return e&&!a(e)&&(i=e),(0,n.useLayoutEffect)((()=>{i&&(r.current=i.current),u()}),[i,i?.current,u]),(0,n.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}},59744:(e,t,i)=>{"use strict";i.d(t,{a:()=>r});var n=i(30758);function r(){const e=(0,n.useRef)(!1);return(0,n.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),(0,n.useCallback)((()=>e.current),[])}},75621:(e,t,i)=>{"use strict";i.d(t,{Jy:()=>u,Lu:()=>c,OV:()=>d,UD:()=>l,ig:()=>m});var n=i(46588),r=i(31999),a=i(8700),s=i(46545);const o=["open.spotifycdn.com","xpui.app.spotify.com"],l=e=>{(0,n.Cp)(e),console.error(e)},c=e=>{(0,n.v4)((t=>{t.setTag("FatalError","true"),l(e)}))},u=(e,t)=>{(0,n.v4)((i=>{i.setTag("ErrorBoundary",t),c(e)}))},d=e=>{(0,n.v4)((t=>{t.setTag("TopLevelError","true"),c(e)}))},m=(e,t,i={},l={},c,u=[])=>{try{(0,r.Ts)({dsn:e,allowUrls:o,sampleRate:.1,tracesSampleRate:0,environment:"production",release:t,...i,integrations:[new a.T,...u],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/]}),(0,n.PN)((e=>{const t=(0,s.C)("config").correlationId;t&&e.setUser({id:t}),Object.keys(l).forEach((t=>{e.setExtra(t,l[t])})),""!==document.referrer&&e.setExtra("referrer",document.referrer),c&&e.setTag("container",c)}))}catch(e){console.error(e)}}},80913:(e,t,i)=>{"use strict";i.d(t,{f:()=>o,h:()=>s});var n=i(46079),r=i(3554),a=i(49515);const s=(e=[],{desiredSize:t=300,desiredLabel:i=""}={})=>{0===t&&(t=300);const n=!(0,a.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*n,desiredLabel:i})?.url},o=e=>{if(-1===e||Number.isNaN(e))return"-:--";const{hours:t,minutes:i,seconds:r}=(0,n.S)(e);return`${t>0?`${t}:`:""}${t>0&&i<10?`0${i}`:i}:${r<10?`0${r}`:r}`}},17835:(e,t,i)=>{"use strict";i.d(t,{X:()=>s});class n extends Map{}class r{_batch=new n;_additions=new n;_deletions=new n;_timeoutId=null;constructor(e,t,i,n,r=0){this._onBatch=e,this._onAdd=t,this._onRemove=i,this._onUpdate=n,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 a extends r{}function s(e,t=0){return new a(e,((e,t)=>{const i=e.get(t);void 0!==i?e.set(t,i+1):e.set(t,1)}),((e,t)=>{const i=e.get(t);void 0!==i&&(i-1==0?e.delete(t):e.set(t,i-1))}),((e,t,i)=>{i.forEach(((t,i)=>{const n=e.get(i)||0;n-t<=0?e.delete(i):e.set(i,n-t)})),i.clear(),t.forEach(((t,i)=>{const n=e.get(i)||0;e.set(i,n+t)})),t.clear()}),t)}},5928:(e,t,i)=>{"use strict";async function n(e,t,i=50){const n=[];for(let r=0;r<e.length;r+=i)n.push(t(e.slice(r,r+i)));return Promise.all(n)}i.d(t,{F:()=>n})},43039:(e,t,i)=>{"use strict";i.d(t,{gf:()=>o,QH:()=>l,Nu:()=>c});var n=i(40312),r=i(38481);const a=async(e,t,i)=>(i??="com.widevine.alpha",(await e.build().withMethod("GET").withHost(r.FN).withPath(`/unauth/episode/${t}/${i}`).withEndpointIdentifier("/unauth/episode/{episodeId}/{keysystem}").send()).body);var s=i(61544);function o(e){return 0===e.showTypes?.length}function l(e,t){return e.uri===t.trailer?.uri}async function c(e,t,i){const r=(0,s.o_)(e.uri),o=await a(n.n.getInstance(),r?.id,t);if("video"===i)return{format:"MANIFEST_ID",mediaType:i,noManifest:!1,fileId:o.video?.[0].manifestId};const l="ALLOWED"===o.passthrough?o.passthroughUrl?.split(".").pop()?.split("?")[0]?.toUpperCase():o.format?.replace(/_(128|256)/,""),c="NONE"!==o.passthrough,u=c&&o.passthroughUrl;return{format:l,mediaType:i??"audio",noManifest:c,url:u?o.passthroughUrl:o.url[0],fileId:u?"":o.fileId}}},40312:(e,t,i)=>{"use strict";i.d(t,{n:()=>E});var n=i(14693),r=i(83388),a=i(52276),s=i(86324);function o(e){return`${e.method}::${e.host}${e.path}::${JSON.stringify(e.queryParameters)}`}function l(e,t,i){try{(0,r.fE)({metric_type:n.MetricTypes.COUNTER,what:"request-rate",value:1,tags:{endpoint:e,statusCode:t,isFatal:i}}).catch((()=>({})))}catch(e){}}class c extends s.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=o(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=i=>{t=o(e);let s="unknown",c=!1;if(null!==e.endpointIdentifier&&(c=!0,s=`${e.method} ${e.hostIdentifier||"unknown-host"}::${e.endpointIdentifier}`),this.pendingRequests.delete(t),i)throw c&&l(s,JSON.stringify(i.status||0),JSON.stringify(0===(e.endpointIdentifier||"").indexOf("/me"))),a.O.fromResponse(i,e.method);if(c){l(s,"200","false");const t=Date.now()-(e.startTimestamp||0);!function(e,t,i){try{(0,r.fE)({metric_type:n.MetricTypes.TIMER,what:"request-duration",value:i,tags:{endpoint:e,statusCode:t}}).catch((()=>({})))}catch(e){}}(s,"200",n.Time.fromMillis(t).asNanos())}},e}}var u=i(67581),d=i(56324),m=i(72817),p=i.n(m),h=i(59208),g=i.n(h);const f=p()(d.fetch);async function v(e,t,i=1e4){const n=new(g()),r=n.signal,s=setTimeout((()=>n.abort()),i),o=function(e){return e&&void 0!==e.retries&&e.retries>0?f:d.fetch}(t);return o(e,{...t,signal:r}).then((e=>(clearTimeout(s),e))).catch((n=>{if("AbortError"===n.name)throw new a.J({timeout:i,url:e,method:t?.method??"get"});throw clearTimeout(s),n}))}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(),i=n.Timer.start(),s=await v(`${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":b(this.responseType),...this._headers}},1e4);if((0,r.fE)({metric_type:n.MetricTypes.TIMER,what:"isomorphic-request-time",value:i.end().nanoseconds,tags:this._endpointIdentifier?{endpoint:this._endpointIdentifier}:{}}),!s.ok)throw a.O.fromResponse(s,this.method||"GET");return{body:"text"===this.responseType?await s.text():await s.json(),status:s.status}}}function b(e){return"text"===e?"text/plain":"application/json"}let _=null;class E{static setSession(e){if(!e)return;const{accessToken:t}=e,i=this.getInstance();i.accessToken=t,t||i.resetPendingRequests()}static setLocale(e){this.getInstance().locale=e}static setGlobalRequestHeaders(e){this.getInstance().globalRequestHeaders=e}static setMarket(e){this.getInstance().market=e}static resetInstance(){_=null}static getInstance(e={}){return _||(_=this.createNew(e)),_}static createNew(e){const{Constructor:t=c,fromServer:i=!1}=e;return new t(i?y:u.H)}}},38481:(e,t,i)=>{"use strict";i.d(t,{CC:()=>Y,D8:()=>M,DY:()=>q,Dk:()=>C,EN:()=>k,FN:()=>w,Go:()=>c,Hj:()=>A,I9:()=>H,I_:()=>r,J8:()=>v,L1:()=>R,LG:()=>U,LW:()=>E,MR:()=>p,MW:()=>V,Og:()=>_,Q6:()=>x,QU:()=>u,RQ:()=>j,SX:()=>K,Ty:()=>I,XE:()=>T,Yt:()=>Z,ZJ:()=>P,Zc:()=>o,_1:()=>O,ao:()=>F,d:()=>y,dv:()=>z,eX:()=>h,i6:()=>S,ip:()=>m,mm:()=>N,mz:()=>g,o1:()=>G,oD:()=>f,p1:()=>B,qE:()=>d,sG:()=>W,t2:()=>L,tc:()=>b,us:()=>D});const{WEB_API_URL:n,SPCLIENT_WG_URL:r,PARTNER_API_ENDPOINT:a,ACCOUNTS_HOST:s,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=`${n}/v1`,d=`${r}/recently-played/v3`,m=`${r}/sponsoredplaylist/v1`,p=`${r}/sponsoredplaylist/v1/sponsored`,h=`${r}/playlist/v2`,g=`${r}/inspiredby-mix/v2`,f=`${r}/ads`,v=`${a}/pathfinder/v1`,y=`${r}/age-verification/v1`,b=`${r}/concerts`,_=`${r}/collection`,E=`${r}/presence-view`,C=`${r}/presence2`,x=`${r}/find-friends`,S=`${r}/track-credits-view`,A=`${r}/color-lyrics/v2`,T=`${r}/metadata/4`,I=`${r}/user-profile-view/v3`,N=`${r}/campaigns-service/v1`,w=`${r}/soundfinder/v1`,R=`${r}/`,k=`${r}/socialgraph/v2`,O=`${r}/ondemand-selector/v2`,P=`${r}/playlist-permission/v1`,L=`${r}/blend-invitation`,j=`${r}/spotify.audiobookcashier.v1.AudiobookCashier`,D=`${r}/profile-privacy`,M=`${r}/user-verification-service/v0`,U=`${r}/cultural-moment/v1`,B=`${r}/algotorial-sharing-service/v1`,F=`${r}/transcript-read-along/v2`,H=`${r}/podcast-ap4p`,V=`${r}/ad-dsa-metadata-lookup`,G=`${r}/content-filter/v1`,z=`${r}/gander/v1`,W=`${r}/playlistextender`,K=`${r}/assisted-curation/v1/recommendations/curation/uri`,Y=`${r}/ratings/v1`,q="https://pre-release-radar.spotify.net/pre-release-radar-service/v1",Z="https://admocker.spotify.com"},89269:(e,t,i)=>{"use strict";i.d(t,{GG:()=>o,KY:()=>s,Np:()=>l,Yf:()=>a,xA:()=>r});var n=i(38481);const r=e=>e.build().withHost(n.LW).withMethod("GET").withoutMarket().withPath("/v1/buddylist").withJsonContentType().withEndpointIdentifier("/v1/buddylist").send(),a=(e,t)=>e.build().withHost(n.LW).withMethod("GET").withoutMarket().withPath(`/v1/user/${encodeURIComponent(t)}`).withJsonContentType().withEndpointIdentifier("/v1/user").send(),s=e=>e.build().withHost(n.Q6).withMethod("POST").withoutMarket().withPath("/v1/friends").withJsonContentType().withEndpointIdentifier("/v1/friends").send(),o=(e,t,i)=>e.build().withHost(n.Dk).withMethod("POST").withoutMarket().withJsonContentType().withPath(`/sub/user/${encodeURIComponent(t)}/connection_id/${i}`).withEndpointIdentifier("POST:/sub/user/:username/connection_id/:connection_id").send(),l=(e,t,i)=>e.build().withHost(n.Dk).withMethod("DELETE").withoutMarket().withPath(`/sub/user/${encodeURIComponent(t)}/connection_id/${i}`).withEndpointIdentifier("DELETE:/sub/user/:username/connection_id/:connection_id").send()},32045:(e,t,i)=>{"use strict";i.d(t,{Jr:()=>a,aw:()=>s,kr:()=>o,m9:()=>r,oF:()=>l});var n=i(38481);const r=(e,t)=>e.build().withMethod("POST").withHost(n.tc).withPath(`/v2/concerts/saved/${t}`).withEndpointIdentifier("/concerts/saved/{concertId}").withoutMarket().send(),a=(e,t)=>e.build().withMethod("DELETE").withHost(n.tc).withPath(`/v2/concerts/saved/${t}`).withEndpointIdentifier("/concerts/saved/{concertId}").withoutMarket().send(),s=(e,t,i)=>e.build().withMethod("POST").withHost(n.Og).withPath("/v2/contains").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withBody(JSON.stringify({username:t,set:"concerts",items:[{uri:i}]})).send();function o(e,t){return e.build().withHost(n.tc).withPath("/v1/location/suggest").withQueryParameters({q:t}).withEndpointIdentifier("/concerts/location/suggest").send()}function l(e){return e.build().withHost(n.tc).withPath("/v3/concerts/saved").withEndpointIdentifier("/v3/concerts/saved").send()}},37637:(e,t,i)=>{"use strict";i.d(t,{I:()=>c});var n=i(30758),r=i(40312),a=i(38481);var s=i(99744),o=i(48604),l=i(85993);const c=({uri:e,setFeedbackPath:t,removeFeedbackPath:i,contextUri:c})=>{const u=(0,s.z)(),d=(0,o.m)(),{isPlaying:m}=(0,l.te)(e),p=(0,n.useCallback)((()=>{c&&d.resync(c)}),[c,d]);return{setDislikeFeedback:(0,n.useCallback)((async()=>{t&&(await((e,t,i)=>{const n=t.replace("<reason>","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("<track-uri>",i);return e.build().withMethod("POST").withHost(a.L1).withPath(n).withEndpointIdentifier("/<feature>/feedback/").send()})(r.n.getInstance(),t,e),p(),m&&u.skipToNext())}),[t,e,p,m,u]),removeDislikeFeedback:(0,n.useCallback)((async()=>{i&&(await((e,t,i)=>{const n=t.replace("<reason>","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("<track-uri>",i);return e.build().withMethod("DELETE").withHost(a.L1).withPath(n).withEndpointIdentifier("/<feature>/feedback/").send()})(r.n.getInstance(),i,e),p())}),[i,p,e])}}},63849:(e,t,i)=>{"use strict";i.r(t),i.d(t,{createCheckoutSession:()=>s,getEpisode:()=>a,getShow:()=>r});var n=i(38481);function r(e,t,i){return e.build().withHost(n.QU).withPath(`/shows/${t}`).withQueryParameters({market:i}).withEndpointIdentifier("shows/{showId}").send()}function a(e,t,i){return e.build().withHost(n.QU).withPath(`/episodes/${t}`).withQueryParameters({market:i}).withEndpointIdentifier("episodes/{episodeId}").send()}function s(e,t){const i="undefined"!=typeof window&&window.navigator&&window.navigator.platform||"";let r=null;return-1!==i.indexOf("Mac")?r="OSX":-1!==i.indexOf("Win")?r="Win32":-1!==i.indexOf("Linux")&&(r="Linux"),e.build().withMethod("POST").withHost(n.RQ).withPath("/CheckoutBook").withoutMarket().withBody(JSON.stringify(t)).withEndpointIdentifier("show/{showId}").withHeaders([{key:"App-Platform",value:r??"Browser"}]).send()}},46361:(e,t,i)=>{"use strict";i.d(t,{rn:()=>S,SR:()=>b,mH:()=>y,zP:()=>x,Eo:()=>E,E$:()=>_,sL:()=>C,kp:()=>T,gN:()=>I,kV:()=>A});var n=i(43697),r=i(38481);const a={fromJSON:e=>({uri:p(e.uri)?String(e.uri):"",name:p(e.name)?String(e.name):"",image_url:p(e.image_url)?String(e.image_url):"",followers_count:p(e.followers_count)?Number(e.followers_count):0,following_count:p(e.following_count)?Number(e.following_count):0,is_following:!!p(e.is_following)&&Boolean(e.is_following),recently_played_artists:Array.isArray(e?.recently_played_artists)?e.recently_played_artists.map((e=>l.fromJSON(e))):[],public_playlists:Array.isArray(e?.public_playlists)?e.public_playlists.map((e=>u.fromJSON(e))):[],total_public_playlists_count:p(e.total_public_playlists_count)?Number(e.total_public_playlists_count):0,is_current_user:!!p(e.is_current_user)&&Boolean(e.is_current_user),is_verified:!!p(e.is_verified)&&Boolean(e.is_verified),edit_profile_disabled:!!p(e.edit_profile_disabled)&&Boolean(e.edit_profile_disabled),report_abuse_disabled:!!p(e.report_abuse_disabled)&&Boolean(e.report_abuse_disabled),has_spotify_name:!!p(e.has_spotify_name)&&Boolean(e.has_spotify_name),has_spotify_image:!!p(e.has_spotify_image)&&Boolean(e.has_spotify_image),color:p(e.color)?Number(e.color):0,is_dismissed:!!p(e.is_dismissed)&&Boolean(e.is_dismissed),allow_follows:!!p(e.allow_follows)&&Boolean(e.allow_follows),show_follows:!!p(e.show_follows)&&Boolean(e.show_follows),pronouns:p(e.pronouns)?String(e.pronouns):"",location:p(e.location)?String(e.location):"",bio:p(e.bio)?String(e.bio):"",blends:Array.isArray(e?.blends)?e.blends.map((e=>u.fromJSON(e))):[],top_artists:p(e.top_artists)?s.fromJSON(e.top_artists):void 0,edit_name_disabled:!!p(e.edit_name_disabled)&&Boolean(e.edit_name_disabled),edit_image_disabled:!!p(e.edit_image_disabled)&&Boolean(e.edit_image_disabled),edit_bio_disabled:!!p(e.edit_bio_disabled)&&Boolean(e.edit_bio_disabled)}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.name&&(t.name=e.name),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.followers_count&&(t.followers_count=Math.round(e.followers_count)),void 0!==e.following_count&&(t.following_count=Math.round(e.following_count)),void 0!==e.is_following&&(t.is_following=e.is_following),e.recently_played_artists?t.recently_played_artists=e.recently_played_artists.map((e=>e?l.toJSON(e):void 0)):t.recently_played_artists=[],e.public_playlists?t.public_playlists=e.public_playlists.map((e=>e?u.toJSON(e):void 0)):t.public_playlists=[],void 0!==e.total_public_playlists_count&&(t.total_public_playlists_count=Math.round(e.total_public_playlists_count)),void 0!==e.is_current_user&&(t.is_current_user=e.is_current_user),void 0!==e.is_verified&&(t.is_verified=e.is_verified),void 0!==e.edit_profile_disabled&&(t.edit_profile_disabled=e.edit_profile_disabled),void 0!==e.report_abuse_disabled&&(t.report_abuse_disabled=e.report_abuse_disabled),void 0!==e.has_spotify_name&&(t.has_spotify_name=e.has_spotify_name),void 0!==e.has_spotify_image&&(t.has_spotify_image=e.has_spotify_image),void 0!==e.color&&(t.color=Math.round(e.color)),void 0!==e.is_dismissed&&(t.is_dismissed=e.is_dismissed),void 0!==e.allow_follows&&(t.allow_follows=e.allow_follows),void 0!==e.show_follows&&(t.show_follows=e.show_follows),void 0!==e.pronouns&&(t.pronouns=e.pronouns),void 0!==e.location&&(t.location=e.location),void 0!==e.bio&&(t.bio=e.bio),e.blends?t.blends=e.blends.map((e=>e?u.toJSON(e):void 0)):t.blends=[],void 0!==e.top_artists&&(t.top_artists=e.top_artists?s.toJSON(e.top_artists):void 0),void 0!==e.edit_name_disabled&&(t.edit_name_disabled=e.edit_name_disabled),void 0!==e.edit_image_disabled&&(t.edit_image_disabled=e.edit_image_disabled),void 0!==e.edit_bio_disabled&&(t.edit_bio_disabled=e.edit_bio_disabled),t},create:e=>a.fromPartial(e??{}),fromPartial(e){const t={uri:"",name:"",image_url:"",followers_count:0,following_count:0,is_following:!1,recently_played_artists:[],public_playlists:[],total_public_playlists_count:0,is_current_user:!1,is_verified:!1,edit_profile_disabled:!1,report_abuse_disabled:!1,has_spotify_name:!1,has_spotify_image:!1,color:0,is_dismissed:!1,allow_follows:!1,show_follows:!1,pronouns:"",location:"",bio:"",blends:[],top_artists:void 0,edit_name_disabled:!1,edit_image_disabled:!1,edit_bio_disabled:!1};return t.uri=e.uri??"",t.name=e.name??"",t.image_url=e.image_url??"",t.followers_count=e.followers_count??0,t.following_count=e.following_count??0,t.is_following=e.is_following??!1,t.recently_played_artists=e.recently_played_artists?.map((e=>l.fromPartial(e)))||[],t.public_playlists=e.public_playlists?.map((e=>u.fromPartial(e)))||[],t.total_public_playlists_count=e.total_public_playlists_count??0,t.is_current_user=e.is_current_user??!1,t.is_verified=e.is_verified??!1,t.edit_profile_disabled=e.edit_profile_disabled??!1,t.report_abuse_disabled=e.report_abuse_disabled??!1,t.has_spotify_name=e.has_spotify_name??!1,t.has_spotify_image=e.has_spotify_image??!1,t.color=e.color??0,t.is_dismissed=e.is_dismissed??!1,t.allow_follows=e.allow_follows??!1,t.show_follows=e.show_follows??!1,t.pronouns=e.pronouns??"",t.location=e.location??"",t.bio=e.bio??"",t.blends=e.blends?.map((e=>u.fromPartial(e)))||[],t.top_artists=void 0!==e.top_artists&&null!==e.top_artists?s.fromPartial(e.top_artists):void 0,t.edit_name_disabled=e.edit_name_disabled??!1,t.edit_image_disabled=e.edit_image_disabled??!1,t.edit_bio_disabled=e.edit_bio_disabled??!1,t}};const s={fromJSON:e=>({title:p(e.title)?String(e.title):"",subtitle:p(e.subtitle)?String(e.subtitle):"",image_url:p(e.image_url)?String(e.image_url):"",top_artists_page_uri:p(e.top_artists_page_uri)?String(e.top_artists_page_uri):""}),toJSON(e){const t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.subtitle&&(t.subtitle=e.subtitle),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.top_artists_page_uri&&(t.top_artists_page_uri=e.top_artists_page_uri),t},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={title:"",subtitle:"",image_url:"",top_artists_page_uri:""};return t.title=e.title??"",t.subtitle=e.subtitle??"",t.image_url=e.image_url??"",t.top_artists_page_uri=e.top_artists_page_uri??"",t}};const o={fromJSON:e=>({artists:Array.isArray(e?.artists)?e.artists.map((e=>l.fromJSON(e))):[]}),toJSON(e){const t={};return e.artists?t.artists=e.artists.map((e=>e?l.toJSON(e):void 0)):t.artists=[],t},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={artists:[]};return t.artists=e.artists?.map((e=>l.fromPartial(e)))||[],t}};const l={fromJSON:e=>({uri:p(e.uri)?String(e.uri):"",name:p(e.name)?String(e.name):"",image_url:p(e.image_url)?String(e.image_url):"",followers_count:p(e.followers_count)?Number(e.followers_count):0,is_following:!!p(e.is_following)&&Boolean(e.is_following)}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.name&&(t.name=e.name),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.followers_count&&(t.followers_count=Math.round(e.followers_count)),void 0!==e.is_following&&(t.is_following=e.is_following),t},create:e=>l.fromPartial(e??{}),fromPartial(e){const t={uri:"",name:"",image_url:"",followers_count:0,is_following:!1};return t.uri=e.uri??"",t.name=e.name??"",t.image_url=e.image_url??"",t.followers_count=e.followers_count??0,t.is_following=e.is_following??!1,t}};const c={fromJSON:e=>({public_playlists:Array.isArray(e?.public_playlists)?e.public_playlists.map((e=>u.fromJSON(e))):[],total_public_playlists_count:p(e.total_public_playlists_count)?Number(e.total_public_playlists_count):0}),toJSON(e){const t={};return e.public_playlists?t.public_playlists=e.public_playlists.map((e=>e?u.toJSON(e):void 0)):t.public_playlists=[],void 0!==e.total_public_playlists_count&&(t.total_public_playlists_count=Math.round(e.total_public_playlists_count)),t},create:e=>c.fromPartial(e??{}),fromPartial(e){const t={public_playlists:[],total_public_playlists_count:0};return t.public_playlists=e.public_playlists?.map((e=>u.fromPartial(e)))||[],t.total_public_playlists_count=e.total_public_playlists_count??0,t}};const u={fromJSON:e=>({uri:p(e.uri)?String(e.uri):"",name:p(e.name)?String(e.name):"",image_url:p(e.image_url)?String(e.image_url):"",followers_count:p(e.followers_count)?Number(e.followers_count):0,owner_name:p(e.owner_name)?String(e.owner_name):"",owner_uri:p(e.owner_uri)?String(e.owner_uri):"",is_following:!!p(e.is_following)&&Boolean(e.is_following)}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.name&&(t.name=e.name),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.followers_count&&(t.followers_count=Math.round(e.followers_count)),void 0!==e.owner_name&&(t.owner_name=e.owner_name),void 0!==e.owner_uri&&(t.owner_uri=e.owner_uri),void 0!==e.is_following&&(t.is_following=e.is_following),t},create:e=>u.fromPartial(e??{}),fromPartial(e){const t={uri:"",name:"",image_url:"",followers_count:0,owner_name:"",owner_uri:"",is_following:!1};return t.uri=e.uri??"",t.name=e.name??"",t.image_url=e.image_url??"",t.followers_count=e.followers_count??0,t.owner_name=e.owner_name??"",t.owner_uri=e.owner_uri??"",t.is_following=e.is_following??!1,t}};const d={fromJSON:e=>({profiles:Array.isArray(e?.profiles)?e.profiles.map((e=>m.fromJSON(e))):[]}),toJSON(e){const t={};return e.profiles?t.profiles=e.profiles.map((e=>e?m.toJSON(e):void 0)):t.profiles=[],t},create:e=>d.fromPartial(e??{}),fromPartial(e){const t={profiles:[]};return t.profiles=e.profiles?.map((e=>m.fromPartial(e)))||[],t}};const m={fromJSON:e=>({uri:p(e.uri)?String(e.uri):"",name:p(e.name)?String(e.name):"",image_url:p(e.image_url)?String(e.image_url):"",followers_count:p(e.followers_count)?Number(e.followers_count):0,following_count:p(e.following_count)?Number(e.following_count):0,is_followed:!!p(e.is_followed)&&Boolean(e.is_followed),is_following:!!p(e.is_following)&&Boolean(e.is_following),is_dismissed:!!p(e.is_dismissed)&&Boolean(e.is_dismissed),is_verified:!!p(e.is_verified)&&Boolean(e.is_verified),color:p(e.color)?Number(e.color):0,allow_follows:!!p(e.allow_follows)&&Boolean(e.allow_follows)}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),void 0!==e.name&&(t.name=e.name),void 0!==e.image_url&&(t.image_url=e.image_url),void 0!==e.followers_count&&(t.followers_count=Math.round(e.followers_count)),void 0!==e.following_count&&(t.following_count=Math.round(e.following_count)),void 0!==e.is_followed&&(t.is_followed=e.is_followed),void 0!==e.is_following&&(t.is_following=e.is_following),void 0!==e.is_dismissed&&(t.is_dismissed=e.is_dismissed),void 0!==e.is_verified&&(t.is_verified=e.is_verified),void 0!==e.color&&(t.color=Math.round(e.color)),void 0!==e.allow_follows&&(t.allow_follows=e.allow_follows),t},create:e=>m.fromPartial(e??{}),fromPartial(e){const t={uri:"",name:"",image_url:"",followers_count:0,following_count:0,is_followed:!1,is_following:!1,is_dismissed:!1,is_verified:!1,color:0,allow_follows:!1};return t.uri=e.uri??"",t.name=e.name??"",t.image_url=e.image_url??"",t.followers_count=e.followers_count??0,t.following_count=e.following_count??0,t.is_followed=e.is_followed??!1,t.is_following=e.is_following??!1,t.is_dismissed=e.is_dismissed??!1,t.is_verified=e.is_verified??!1,t.color=e.color??0,t.allow_follows=e.allow_follows??!1,t}};function p(e){return null!=e}var h=i(24848),g=i.n(h);const f={encode:(e,t=g().Writer.create())=>(!0===e.showFollows&&t.uint32(8).bool(e.showFollows),t),decode(e,t){const i=e instanceof g().Reader?e:new(g().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={showFollows:!1};for(;i.pos<n;){const e=i.uint32();if(e>>>3==1)r.showFollows=i.bool();else i.skipType(7&e)}return r},fromPartial(e){const t={showFollows:!1};return t.showFollows=e.showFollows??!1,t}};const v={encode:(e,t=g().Writer.create())=>(""!==e.username&&t.uint32(10).string(e.username),!0===e.showFollows&&t.uint32(16).bool(e.showFollows),t),decode(e,t){const i=e instanceof g().Reader?e:new(g().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={username:"",showFollows:!1};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.username=i.string();break;case 2:r.showFollows=i.bool();break;default:i.skipType(7&e)}}return r},fromPartial(e){const t={username:"",showFollows:!1};return t.username=e.username??"",t.showFollows=e.showFollows??!1,t}};const y=async(e,t)=>{const i=await e.build().withMethod("GET").withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,n.v)(t))}/following`).withEndpointIdentifier("/profile/{username}/following").send();return d.fromJSON(i.body)},b=async(e,t)=>{const i=await e.build().withMethod("GET").withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,n.v)(t))}/followers`).withEndpointIdentifier("/profile/{username}/followers").send();return d.fromJSON(i.body)},_=async(e,{uri:t,playlists:i=0,artists:s=0,episodes:o=0})=>{const l=await e.build().withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,n.v)(t))}`).withEndpointIdentifier("/profile/{username}").withQueryParameters({playlist_limit:i,artist_limit:s,episode_limit:o}).send();return a.fromJSON(l.body)},E=async(e,{uri:t,offset:i=0,limit:a=200})=>{const s=await e.build().withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,n.v)(t))}/playlists`).withEndpointIdentifier("/profile/{username}/playlists").withQueryParameters({offset:i,limit:a}).send();return c.fromJSON(s.body)},C=async(e,{uri:t,limit:i=10})=>{const a=await e.build().withMethod("GET").withHost(r.Ty).withPath(`/profile/${encodeURIComponent((0,n.v)(t))}/artists`).withEndpointIdentifier("/profile/{username}/artists").withQueryParameters({limit:i}).send();return o.fromJSON(a.body)},x=(e,{currentUserUri:t,uri:i})=>e.build().withMethod("GET").withHost(r.EN).withPath("/is_dismissed").withEndpointIdentifier("/is_dismissed").withQueryParameters({source_uri:t,target_uri:i,format:"json"}).send(),S=(e,{currentUserUri:t,uri:i})=>e.build().withMethod("POST").withHost(r.EN).withPath("/dismissed").withEndpointIdentifier("/dismissed").withQueryParameters({source_uri:t,target_uri:i,format:"json"}).send(),A=(e,{currentUserUri:t,uri:i})=>e.build().withMethod("DELETE").withHost(r.EN).withPath("/dismissed").withEndpointIdentifier("/dismissed").withQueryParameters({source_uri:t,target_uri:i,format:"json"}).send(),T=async(e,{uri:t})=>e.build().withHost(r.us).withMethod("GET").withoutMarket().withResponseType("arraybuffer").withPath(`/show-follows/${encodeURIComponent((0,n.v)(t))}`).withEndpointIdentifier("/show-follows/{username}").send().then((e=>f.decode(new Uint8Array(e.body)))),I=async(e,{uri:t,showFollows:i})=>{const a=v.encode(v.fromPartial({username:(0,n.v)(t),showFollows:i}));await e.build().withHost(r.us).withMethod("POST").withoutMarket().withBody(a.finish()).withPath("/show-follows").withEndpointIdentifier("/show-follows").send()}},52276:(e,t,i)=>{"use strict";i.d(t,{J:()=>r,O:()=>n});class n extends Error{static fromResponse(e,t){return new n({message:e.statusText,url:e.url,method:t,status:e.status,response:e})}constructor(e){const{message:t,url:i,method:n,status:r,response:a}=e;super(t),this.name="HttpResponseError",this.requestUrl=i,this.requestMethod=n,this.status=r,this.response=a}}class r extends n{constructor(e){const{timeout:t,url:i,method:n}=e;super({message:`${n.toUpperCase()} ${i} timed out (${t}ms)`,url:i,method:n,status:503}),this.name="HttpRequestTimeoutError",this.timeout=t}}},56991:(e,t,i)=>{"use strict";i.d(t,{$:()=>r,D:()=>a});const n=()=>"undefined"==typeof window||void 0===window.gtag||void 0===window.google_tag_manager,r=(e,t,i)=>{n()||window.gtag("event",t,{event_category:e,event_label:i})},a=e=>{n()||window.gtag("pageview",{pathname:e})}},79973:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var n=i(25639),r=i(61272),a=i(21596);let s=0;const o=new WeakMap,l=function(e,t,i){const l=(0,a.A9)(),c=o.has(e)?o.get(e):o.set(e,++s).get(e),u=(0,r.lB)((()=>["useEndpoint",e.name,c,t]),[e.name,c,t]),{isLoading:d,error:m,data:p}=(0,n.I)({...i,queryKey:u,queryFn:()=>e(l,...t||[])});return{data:p??null,error:m,loading:d,queryKey:u}}},86324:(e,t,i)=>{"use strict";i.d(t,{z:()=>o,t:()=>l});var n=i(33655);let r;class a{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}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,i])=>{e.addHeader(t,i)}));for(let t=0;t<this._headers.length;t++){const i=this._headers[t];e.addHeader(i.key,i.value)}this.jsonContentType&&e.addHeader("Content-Type","application/json;charset=UTF-8"),this.body&&e.withPostData(this.body);try{this.onBeforeSend(e)}catch(e){return Promise.reject(e)}return this._startTimestamp=Date.now(),e.send().then((e=>(this.onAfterSend(),e))).catch((e=>{throw this.onAfterSend(e),e}))}}var s=i(67581);const o=(0,n.u)("RequestBuilder");class l{constructor(e){this._accessToken=null,this._market="",this._locale="",this._globalRequestHeaders=[],this._RequestImplementation=e||s.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(){a.setRequestImplementation(this._RequestImplementation);const e=new a;return e.accessToken=this._accessToken,e.market=this.market,e.locale=this.locale,e.globalRequestHeaders=this.globalRequestHeaders,e}}},67581:(e,t,i)=>{"use strict";i.d(t,{H:()=>r});var n=i(84640);class r{constructor(e,t,i){return this.method=e,this.url=t,this.postData=null,this.queryParameters=void 0,this.responseType="json",this._headers={},this._authorize=i,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,n.V)(),t=new URLSearchParams(this.queryParameters).toString(),i=`${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(i,r).then((e=>e)).catch((e=>{throw e}))}}},63753:(e,t,i)=>{"use strict";i.d(t,{FI:()=>r,Yg:()=>a,iY:()=>s,lS:()=>o});var n=i(33655);let r=function(e){return e.UNKNOWN="unknown",e.SPEAKERS="speakers",e.HEADPHONES="headphones",e.DISPLAY_DEVICE="display_device",e}({}),a=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}({});const s=(0,n.u)("AudioOutputDevicesAPI"),o=e=>e?.terminalType===r.HEADPHONES||e?.transportType===a.UNKNOWN||e?.transportType===a.USB||e?.transportType===a.VIRTUAL},55440:(e,t,i)=>{"use strict";i.d(t,{B:()=>r,e:()=>a});var n=i(88485);let r=function(e){return e.DEVICE_CONNECTED="deviceConnected",e}({});class a extends n.V{}},142:(e,t,i)=>{"use strict";i.d(t,{V:()=>a,c:()=>r});var n=i(30758);const r=(0,n.createContext)(null);function a(){const e=(0,n.useContext)(r);if(null===e)throw new Error("Trying to use 'AudioOutputDevicesContext' without 'AudioOutputDevicesProvided'!");return e}},48896:(e,t,i)=>{"use strict";i.d(t,{k:()=>a});var n=i(30758),r=i(142);function a(e,t){const i=(0,n.useRef)(t),a=(0,r.V)();i.current=t,(0,n.useEffect)((()=>a.getEvents().addListener(e,(e=>{i.current(e)}))),[e,a])}},42875:(e,t,i)=>{"use strict";i.d(t,{b:()=>o});var n=i(30758),r=i(142),a=i(48896),s=i(55440);const o=()=>{const e=(0,r.V)(),[t,i]=(0,n.useState)((()=>e.getDefaultDevice()));return(0,a.k)(s.B.DEVICE_CONNECTED,(()=>{i(e.getDefaultDevice())})),t}},39062:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});const n=(0,i(33655).u)("AudiobookCappingAPI")},41687:(e,t,i)=>{"use strict";i.d(t,{r:()=>s});var n=i(61544),r=i(72814),a=i(57526);class s{currentPlayerState=null;requestInFlight=!1;constructor(e,t,i){this._playerApi=e,this._showApi=t,this._pubSubApi=i;const s=this._playerApi.getEvents(),o=this._showApi.getEvents();s.addListener(r.gd.UPDATE,(({data:e})=>{this.currentPlayerState=e})),s.addListener(r.gd.ERROR,(async()=>{if(this.requestInFlight)return;const e=this.currentPlayerState?.context.uri;if(!e)return;if(!(0,n.WB)(e))return;this.requestInFlight=!0;const t=await this._showApi.getAccessInfo(e).catch((e=>{throw e})).finally((()=>{this.requestInFlight=!1})),i=t?.consumptionCapped;i&&o.emitSync(a.K.UPDATE_ACCESS_INFO,{consumptionCapExplanation:i})})),this._pubSubApi.subscribe({ident:"hm://show-access/user-capped",onMessage:()=>o.emitSync(a.K.UPDATE_ACCESS_INFO,{})}),this._pubSubApi.subscribe({ident:"hm://show-access/user-quota-changed",onMessage:()=>o.emitSync(a.K.UPDATE_ACCESS_INFO,{})})}}},18928:(e,t,i)=>{"use strict";i.d(t,{X:()=>n});const n=(0,i(33655).u)("AuthorizationAPI")},83527:(e,t,i)=>{"use strict";i.d(t,{m:()=>r,x:()=>a});var n=i(88485);let r=function(e){return e.UPDATE="update",e}({});class a extends n.V{}},52925:(e,t,i)=>{"use strict";i.d(t,{h:()=>n});const n={isAuthorized:!1,token:null,retryAttempt:null,retryAt:null}},3631:(e,t,i)=>{"use strict";i.d(t,{H:()=>r,T:()=>n});const n=(0,i(33655).u)("TokenProvider");function r(e){return Date.now()>=e.accessTokenExpirationTimestampMs}},93874:(e,t,i)=>{"use strict";i.d(t,{w:()=>n});class n{_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)}}},45942:(e,t,i)=>{"use strict";i.d(t,{k:()=>s,r:()=>a});var n=i(5681);const r=(0,i(41363).h)();async function a(){await r.post("sp://desktop/v1/logout")}async function s(e){const t=new n.EW(e);return{enableShows:await t.getValues(n.kM.fromPartial({})).then((e=>"1"===e.pairs["shows-collection"]))}}},67855:(e,t,i)=>{"use strict";i.d(t,{v:()=>a});var n=i(18928),r=i(60102);function a(){return(0,r.N)(n.X)}},9326:(e,t,i)=>{"use strict";i.d(t,{Y:()=>s});var n=i(30758),r=i(83527),a=i(67855);function s(){const e=(0,a.v)(),[t,i]=(0,n.useState)(e.getState());return(0,n.useEffect)((()=>e.getEvents().addListener(r.m.UPDATE,(e=>{i(e.data)}))),[e]),t}},23679:(e,t,i)=>{"use strict";i.d(t,{L:()=>a});var n=i(30758),r=i(67855);function a(){const e=(0,r.v)(),{canGetSessionTransferURL:t}=e.getCapabilities();return{openURL:(0,n.useCallback)(((e,t="_blank")=>{window.open(e,t)}),[]),openURLWithSessionTransfer:(0,n.useCallback)((async(i,n="_blank")=>{if(t){const t=await e.getSessionTransferURL(i);window.open(t,n)}else window.open(i,n)}),[e,t]),useGetURLWithSessionTransfer:i=>{const[r,a]=(0,n.useState)(i);return(0,n.useEffect)((()=>{t&&async function(){const t=await e.getSessionTransferURL(i);a(t)}()}),[i]),r}}}},5277:(e,t,i)=>{"use strict";i.d(t,{GG:()=>a,fq:()=>r,od:()=>s});const n=864e5;class r{_cache=new Map;constructor(e=null){if(this._ttl=e,null!==e&&(e<1||e>n))throw new Error("TTL should be between 1 (1 ms) and 86400000 (1 day).")}isExpired(e){return null!==e.expiry&&e.expiry<Date.now()}getExpiry(){return null!==this._ttl?Date.now()+this._ttl:null}entries(){return this._cache.entries()}has(e){return void 0!==this.get(e)}peek(e){const t=this._cache.get(e);return t?.value}get(e){const t=this._cache.get(e);if(void 0!==t){if(!this.isExpired(t))return t.value;this._cache.delete(e)}}set(e,t){this._cache.set(e,{value:t,expiry:this.getExpiry()})}create(e,t){const i=this.get(e);if(void 0===i){const i=t();return this.set(e,i),i}return i}delete(e){this._cache.delete(e)}clear(){this._cache.clear()}cleanup(){this._cache.forEach(((e,t)=>{this.isExpired(e)&&this._cache.delete(t)}))}}class a extends r{constructor(e,t){super(e),setInterval(this.cleanup.bind(this),t)}}class s extends r{constructor(){super(null)}deleteOnSettle(e,t){return t.then((()=>this.delete(e)),(()=>this.delete(e))),t}create(e,t){const i=super.create(e,t);return this.deleteOnSettle(e,i)}set(e,t){super.set(e,this.deleteOnSettle(e,t))}}},34471:(e,t,i)=>{"use strict";i.d(t,{extractColors:()=>m});var n=i(52893);const r="https://local-image.spotify.com";let a=function(e){return e[e.ARRAY_BUFFER=0]="ARRAY_BUFFER",e[e.IMAGE_BITMAP=1]="IMAGE_BITMAP",e}({});var s=i(87879),o=i.n(s);var l=i(96711);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)<n}function n(t){return t.toString(16).padStart(2,"0")}function s(t){return`${parseFloat((100*t).toFixed(1))}%`}function o(t){t=t.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,(function(t,r,n,s){return r+r+n+n+s+s}));const r=/^#?(?<r>[a-f\\d]{2})(?<g>[a-f\\d]{2})(?<b>[a-f\\d]{2})(?<a>[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,f=a;c=r(u,0)?0:r(f,o)?60*(0+(i-e)/u):r(f,i)?60*(2+(e-o)/u):60*(4+(o-i)/u),c%=360,c<0&&(c+=360);const g=0===l||1===l?0:(f-l)/Math.min(l,1-l);return{h:Math.round(c),s:g,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}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(n<r&&this.compare(n,o)<=0&&(o=n),s<r&&this.compare(s,o)<0&&(o=s),o===t)break;this.swap(o,t),t=o}}size(){return this._data.length}push(t){this._data.push(t),this.bubbleUp(this._data.length-1)}pop(){if(0===this._data.length)return null;this.swap(0,this._data.length-1);const t=this._data.pop();return this.bubbleDown(0),t}clone(){return new l(this._comparator,[...this._data])}*popAll(){for(;this._data.length>0;)yield this.pop()}}const f=31;function g(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 m({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return t*f*f+r*f+n-(s*f*f+o*f+i)}function b({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return r*f*f+t*f+n-(o*f*f+s*f+i)}function d({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return n*f*f+r*f+t-(i*f*f+o*f+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;t<this._swatches.length;t++){const{color:r,population:n}=this._swatches[t];this._population+=n,0===t?(this._spanR.clampTo(r.rgb.r),this._spanG.clampTo(r.rgb.g),this._spanB.clampTo(r.rgb.b)):(this._spanR.extendTo(r.rgb.r),this._spanG.extendTo(r.rgb.g),this._spanB.extendTo(r.rgb.b))}}findSplitPoint(){const t=this.getLongestDimensionComparator();this._swatches.sort(((r,n)=>t(r.color,n.color)));const r=Math.floor(this._population/2);for(let t=0,n=0;t<this._swatches.length;t++)if(n+=this._swatches[t].population,n>=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?m:r>=t&&r>=n?b: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;t<r.length;t++){const n=r[t];if(0===n)continue;const i=g(t);(void 0===this._options.filter||this._options.filter(i))&&(s++,o+=i.hsv.s,this._swatches.push(c.fromColor(i,n)))}return this._swatches.length>this._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()<t;){const t=this.queue.pop();if(null===t||!t.canSplit())return;this.queue.push(t.split()),this.queue.push(t)}}}function v(t,r){return t.reduce(((t,n)=>null!==t&&r(t)>r(n)?t:n),null)}const x=30,S=80,R=2,A=.0016,B=.3,$=.1,I=45,G=.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<s&&(s=t)}return n=T(n-r),s=T(s-r),{hue1:Math.min(n,s),hue2:Math.max(n,s)}}(t);let s=0;return r>=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>G||o<C?t.filter((t=>{return t.population/r>H||(n=t.color.hsv.h,o=s,i=I,Math.min(Math.abs(o-n),360-Math.abs(o-n))<i);var n,o,i})):t}function P({color:{hsv:t},population:r},n,s){return(n?1:function(t){const r=function(t,r,n){const s=(n-r)/2+r-r,o=t-r,i=(s-Math.abs(s-o))/s;return Math.max(0,Math.min(i,1))}(t,x,S);return-1*Math.abs(r*R)}(t.h))+r/s+t.s*t.v}function z(t,r,n,s){const o=s/n;if(o<$)return null;const i=t.filter((t=>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;t<n.length;t+=s)yield n[t]}(s,2e4),i=M.fromPixels(o,{maxColors:16,filter:Z}),{visRefSwatch:e,visRefDarkSwatch:a,visRefLightSwatch:h}=function(t,r,n,s,o=O){const i=new Set,e=v(t,(t=>t.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++,i=new Promise(((e,i)=>{c.addEventListener("message",(i=>{const[r,a]=i.data;r===t&&e({colorRaw:n.Q.parse(a.colorRawJson),colorDark:n.Q.parse(a.colorDarkJson),colorLight:n.Q.parse(a.colorLightJson)})})),c.addEventListener("error",i)}));return c.postMessage([t,e],[e.data]),await i}async function m(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:"),i=0===e.indexOf("spotify:mosaic:"),n=0===e.indexOf("spotify:localfileimage:");return t||i||n}(e)?t.src=`${r}?uri=${encodeURIComponent(e)}`:t.src=e,await t.decode(),t}(e)}catch(e){return Promise.resolve(l.A)}const i=t.naturalWidth,n=t.naturalHeight;if("createImageBitmap"in window&&"OffscreenCanvas"in window){const e=await window.createImageBitmap(t);return await async function(e){return await d({source:a.IMAGE_BITMAP,data:e})}(e)}const s=document.createElement("canvas"),o=s.getContext("2d");return s.width=i,s.height=n,o.drawImage(t,0,0,i,n),await async function(e){return await d({source:a.ARRAY_BUFFER,data:e.data.buffer})}(o.getImageData(0,0,i,n))}},60833:(e,t,i)=>{"use strict";i.d(t,{h:()=>A,L:()=>C});var n=i(61544),r=i(71306),a=i(30758),s=i(15742);i(8385);const o=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForAlbumEntity"]=new s.l("fetchExtractedColorAndImageForAlbumEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),l=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForArtistEntity"]=new s.l("fetchExtractedColorAndImageForArtistEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),c=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForEpisodeEntity"]=new s.l("fetchExtractedColorAndImageForEpisodeEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),u=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForPlaylistEntity"]=new s.l("fetchExtractedColorAndImageForPlaylistEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),d=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForPodcastEntity"]=new s.l("fetchExtractedColorAndImageForPodcastEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),m=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForTrackEntity"]=new s.l("fetchExtractedColorAndImageForTrackEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),p=Spicetify.GraphQL.Definitions["fetchExtractedColorForAlbumEntity"]=new s.l("fetchExtractedColorForAlbumEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),h=Spicetify.GraphQL.Definitions["fetchExtractedColorForArtistEntity"]=new s.l("fetchExtractedColorForArtistEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),g=Spicetify.GraphQL.Definitions["fetchExtractedColorForEpisodeEntity"]=new s.l("fetchExtractedColorForEpisodeEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),f=Spicetify.GraphQL.Definitions["fetchExtractedColorForPlaylistEntity"]=new s.l("fetchExtractedColorForPlaylistEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),v=Spicetify.GraphQL.Definitions["fetchExtractedColorForPodcastEntity"]=new s.l("fetchExtractedColorForPodcastEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null),y=Spicetify.GraphQL.Definitions["fetchExtractedColorForTrackEntity"]=new s.l("fetchExtractedColorForTrackEntity","query","b721a99c1e892af374bd23b88f402945d7b410470b7535fe1dede8fd0515670a",null);var b=i(69916),_=i(3554);const E={artist:h,album:p,episode:g,playlist:f,"playlist-v2":f,show:v,track:y};function C(e,t=r.l0o){const{request:i}=(0,a.useContext)(b.j),[s,o]=(0,a.useState)(t);return(0,a.useEffect)((()=>{(async()=>{const t=(0,n.o_)(e);if(!t)return;const r=E[t.type];if(!r)return void console.error(`The entity (${e}) you're trying to use it not supported for this query`);const a=await i(r,{uri:t.toURI()}),{albumUnion:s,artistUnion:l,episodeUnionV2:c,playlistV2:u,podcastUnionV2:d,trackUnion:m}=a?.data||{};T(s)?o(x(s.coverArt)):I(l)?o(x(l.visuals?.avatarImage)):N(c)?o(x(c.coverArt)):w(u)?o(x(u.images?.items?.[0])):R(d)?o(x(d?.coverArt)):k(m)&&o(x(m.albumOfTrack?.coverArt))})()}),[e,i]),s}function x(e){return e?.extractedColors?.colorDark.hex}const S={artist:l,album:o,episode:c,playlist:u,"playlist-v2":u,show:d,track:m};function A(e,t=r.l0o,i){const{request:s}=(0,a.useContext)(b.j),[o,l]=(0,a.useState)(t),[c,u]=(0,a.useState)(i),d=(0,a.useCallback)((e=>{const{url:t}=(0,_.g)(e?.sources)||{},i=x(e);t&&u(t),i&&l(i)}),[u]);return(0,a.useEffect)((()=>{(async()=>{const t=(0,n.o_)(e);if(!t)return;const i=S[t.type];if(!i)return void console.error(`The entity (${e}) you're trying to use it not supported for this query`);const r=await s(i,{uri:t.toURI()}),{albumUnion:a,artistUnion:o,episodeUnionV2:l,playlistV2:c,podcastUnionV2:u,trackUnion:m}=r?.data||{};T(a)?d(a.coverArt):I(o)?d(o.visuals.avatarImage):N(l)?d(l.coverArt):w(c)?d(c.images?.items?.[0]):R(u)||function(e){if(!e||0===Object.keys(e).length)return!1;return"Audiobook"===e.__typename}(u)?d(u.coverArt):k(m)&&d(m.albumOfTrack?.coverArt)})()}),[e,s,d]),[c,o]}function T(e){return!!e}function I(e){return!!e}function N(e){return!(!e||0===Object.keys(e).length)&&"Episode"===e.__typename}function w(e){return!!e}function R(e){return!(!e||0===Object.keys(e).length)&&"Podcast"===e.__typename}function k(e){return!!e}},92433:(e,t,i)=>{"use strict";i.d(t,{j:()=>s,n:()=>o});var n=i(52893),r=i(15742);i(8385);const a=Spicetify.GraphQL.Definitions["fetchExtractedColors"]=new r.l("fetchExtractedColors","query","86bdf61bb598ee07dc85d6c3456d9c88eb94f33178509ddc9b33fc9710aa9e9c",null);function s(e){return n.Q.fromHex(e)}async function o(e,t){Array.isArray(t)||(t=[t]);const i=await e(a,{uris:t}),{extractedColors:n}=i?.data||{};if(!n)throw new Error("Failed to fetch multiple extracted colors!");return n.map((e=>"ExtractedColors"!==e.__typename?null:{colorRaw:s(e.colorRaw.hex),colorDark:s(e.colorDark.hex),colorLight:s(e.colorLight.hex),isFallback:e.colorRaw.isFallback&&e.colorDark.isFallback&&e.colorLight.isFallback}))}},76306:(e,t,i)=>{"use strict";i.d(t,{j:()=>l});var n=i(92433),r=i(5277),a=i(49515),s=i(96711);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,n.n)(e,t),l=await function(e,t){const n=t.map((async(t,n)=>{if(t&&!t.isFallback)return t;if(""===e[n])return s.A;if(!(0,a.c)()){const{extractColors:t}=await Promise.resolve().then(i.bind(i,34471));return t(e[n])}return s.A}));return Promise.all(n)}(t,r);return l.forEach(((e,i)=>{o.set(t[i],Promise.resolve(e))})),l}catch{if(!(0,a.c)()){const{extractColors:e}=await Promise.resolve().then(i.bind(i,34471));return Promise.all(t.map((t=>{const i=e(t);return o.set(t,i),i})))}return Promise.resolve([s.A])}}},96711:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(71306),r=i(92433);const a={colorRaw:(0,r.j)(n.l0o),colorDark:(0,r.j)(n.l0o),colorLight:(0,r.j)(n.l0o)}},80454:(e,t,i)=>{"use strict";i.d(t,{r:()=>c,z:()=>u});var n=i(30758),r=i(71306),a=i(73513),s=i(76306),o=i(69916),l=i(25639);function c(e=null){const{request:t}=(0,n.useContext)(o.j),{data:i}=(0,l.I)({queryKey:["extracted-color",e],queryFn:()=>e?(0,s.j)(t,e).then((([{colorDark:e,colorLight:t,colorRaw:i}])=>({colorDark:e.toCSS(a.a.HEX),colorLight:t.toCSS(a.a.HEX),colorRaw:i.toCSS(a.a.HEX)}))):null,gcTime:864e5,staleTime:216e5,enabled:!!e});return i??void 0}function u(e=null,t=r.l0o,i="colorRaw"){return c(e)?.[i]??t}},52893:(e,t,i)=>{"use strict";i.d(t,{Q:()=>c});var n=i(73513),r=i(59057);function a(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,n){return t+t+i+i+n+n}));const t=/^#?(?<r>[a-f\d]{2})(?<g>[a-f\d]{2})(?<b>[a-f\d]{2})(?<a>[a-f\d]{2})?$/i.exec(e),i=t?.groups?.r,n=t?.groups?.g,r=t?.groups?.b,a=t?.groups?.a;if(void 0===i||void 0===n||void 0===r)throw new Error(`Invalid hex color code "${e}"`);return{r:i,g:n,b:r,a}}function s(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function o({rgb:{r:e,g:t,b:i}}){return.2126*s(e/255)+.7152*s(t/255)+.0722*s(i/255)}function l(e,t){const i=o(e),n=o(t);return(Math.max(i,n)+.05)/(Math.min(i,n)+.05)}class c{constructor(e,t,i,n=1){this.rgb=e,this.hsl=t,this.hsv=i,this.a=n}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 i=function({r:e,g:t,b:i}){const n=e/255,a=t/255,s=i/255,o=Math.max(n,a,s),l=Math.min(n,a,s),c=o-l;let u;const d=(o+l)/2,m=o;u=(0,r.vn)(c,0)?0:(0,r.vn)(m,n)?60*(0+(a-s)/c):(0,r.vn)(m,a)?60*(2+(s-n)/c):60*(4+(n-a)/c),u%=360,u<0&&(u+=360);const p=0===d||1===d?0:(m-d)/Math.min(d,1-d);return{h:Math.round(u),s:p,l:d}}(e),n=function({r:e,g:t,b:i}){const n=e/255,a=t/255,s=i/255,o=Math.max(n,a,s),l=o-Math.min(n,a,s);let c;const u=o;c=(0,r.vn)(l,0)?0:(0,r.vn)(u,n)?60*(0+(a-s)/l):(0,r.vn)(u,a)?60*(2+(s-n)/l):60*(4+(n-a)/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,i,n,t)}static fromHex(e,t){const i=function(e){const{r:t,g:i,b:n}=a(e);return{r:parseInt(t,16),g:parseInt(i,16),b:parseInt(n,16)}}(e),n=function(e){const{a:t}=a(e);if(!t)return 1;const i=parseInt(t,16)/255;return(0,r.LI)(i,0,2)}(e);return c.fromRGB(i,t??n)}static fromHSV(e,t){const i=function({h:e,s:t,v:i}){const n=i*t,r=e/60,a=n*(1-Math.abs(r%2-1));let s;s=r>=0&&r<=1?[n,a,0]:r>1&&r<=2?[a,n,0]:r>2&&r<=3?[0,n,a]:r>3&&r<=4?[0,a,n]:r>4&&r<=5?[a,0,n]:r>5&&r<=6?[n,0,a]:[0,0,0];const o=i-n;return{r:Math.round(255*(s[0]+o)),g:Math.round(255*(s[1]+o)),b:Math.round(255*(s[2]+o))}}(e);return c.fromRGB(i,t)}static fromHSL(e,t){const i=function({h:e,s:t,l:i}){const n=(1-Math.abs(2*i-1))*t,r=e/60,a=n*(1-Math.abs(r%2-1));let s;s=r>=0&&r<=1?[n,a,0]:r>1&&r<=2?[a,n,0]:r>2&&r<=3?[0,n,a]:r>3&&r<=4?[0,a,n]:r>4&&r<=5?[a,0,n]:r>5&&r<=6?[n,0,a]:[0,0,0];const o=i-n/2;return{r:Math.round(255*(s[0]+o)),g:Math.round(255*(s[1]+o)),b:Math.round(255*(s[2]+o))}}(e);return c.fromRGB(i,t)}static fromInt(e,t){const i=function(e){return{r:e>>16&255,g:e>>8&255,b:255&e}}(e);return c.fromRGB(i,t)}static fromCSS(e,t){const i=function(e,t){const i=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(i){const[e,n,r,a]=i.slice(1),s=t??parseFloat(a);return{rgb:{r:parseInt(e,10),g:parseInt(n,10),b:parseInt(r,10)},rgbAlpha:Number.isNaN(s)?void 0:s}}return null}(e,t);if(i){const{rgb:e,rgbAlpha:t}=i;return c.fromRGB(e,t)}const n=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(n)return c.fromHex(n,t);const r=function(e,t){const i=e.match(/^hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*(?:\.\d+)?))?\)$/);if(i){const[e,n,r,a]=i.slice(1),s=t??parseFloat(a);return{hsl:{h:parseInt(e,10),s:parseInt(n,10)/100,l:parseInt(r,10)/100},hslAlpha:Number.isNaN(s)?void 0:s}}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 n.a.HEX:return t=this,`#${(0,r.nj)(t.rgb.r)}${(0,r.nj)(t.rgb.g)}${(0,r.nj)(t.rgb.b)}`;case n.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 n.a.RGB:return function(e){return`rgb(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b})`}(this);case n.a.RGBA:return function(e){return`rgba(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b}, ${e.a})`}(this);case n.a.HSL:return function(e){const{h:t,s:i,l:n}=e.hsl;return`hsl(${t}, ${(0,r.wF)(i)}, ${(0,r.wF)(n)})`}(this);case n.a.HSLA:return function(e){const{h:t,s:i,l:n}=e.hsl;return`hsla(${t}, ${(0,r.wF)(i)}, ${(0,r.wF)(n)}, ${e.a})`}(this);default:throw new Error("Invalid or unsupported CSSColorFormat!")}var t}contrastAdjust(e,t=4.5){let i=c.BLACK;if("light"===e&&(i=c.WHITE),i!==c.BLACK&&i!==c.WHITE)throw new Error("Only supports contrast calculation between black and white.");let n=l(this,i);if(n>=t)return this;let r=this.hsv.v,a=i===c.WHITE?-.02:.02,s=Number.MAX_VALUE,o=null;for(let e=0;e<100&&s>.07&&r>=0&&r<=1;e++){r=Math.min(r+a,1),o=c.fromHSV({h:this.hsv.h,s:this.hsl.s,v:r}),n=l(o,c.WHITE);const e=Math.round(10*Math.abs(n-t))/10;e>s&&(a*=-.5),s=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:i,hsv:n,a:r}=JSON.parse(e);return new c(t,i,n,r)}}},52471:(e,t,i)=>{"use strict";function n(e){if(!e?.colorDark.isFallback)return e?.colorDark.hex}i.d(t,{m:()=>n})},59057:(e,t,i)=>{"use strict";function n(e,t,i=1e-6){return Math.abs(e-t)<i}function r(e){return e.toString(16).padStart(2,"0")}function a(e){return`${parseFloat((100*e).toFixed(1))}%`}function s(e,t,i){const n=e.toLocaleString("en",{useGrouping:!1,minimumFractionDigits:t,maximumFractionDigits:i});return Number(n)}i.d(t,{LI:()=>s,nj:()=>r,vn:()=>n,wF:()=>a})},73513:(e,t,i)=>{"use strict";i.d(t,{a:()=>n});let n=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}({})},10999:(e,t,i)=>{"use strict";i.d(t,{U:()=>n});const n=(0,i(33655).u)("ConnectAPI")},73668:(e,t,i)=>{"use strict";i.d(t,{r:()=>n});const n=(0,i(33655).u)("ConnectDeviceManagementAPI")},3877:(e,t,i)=>{"use strict";i.d(t,{c:()=>n});const n=(0,i(33655).u)("ConnectDiscoveryAPI")},30806:(e,t,i)=>{"use strict";i.d(t,{P:()=>r,a:()=>a});var n=i(88485);let r=function(e){return e.UPDATE="update",e}({});class a extends n.V{}},67154:(e,t,i)=>{"use strict";i.d(t,{x:()=>n});const n=(0,i(33655).u)("ConnectTransferAPI")},40384:(e,t,i)=>{"use strict";i.d(t,{e:()=>a});var n=i(10999),r=i(60102);function a(){return(0,r.N)(n.U)}},75488:(e,t,i)=>{"use strict";i.d(t,{W:()=>a});var n=i(30758),r=i(40384);function a(e,t){const i=(0,n.useRef)(t),a=(0,r.e)();i.current=t,(0,n.useEffect)((()=>a.getEvents().addListener(e,(e=>{i.current(e)}))),[e,a])}},63051:(e,t,i)=>{"use strict";i.d(t,{V:()=>a,l:()=>s});var n=i(28004),r=i(14403);const a=e=>{let t,i=!1;return e.connectionStatus===n.zP.CONNECTING?(i=!0,t=e.connectingDevice):e.connectionStatus===n.zP.CONNECTED&&(i=!0,t=e.activeDevice),{isPlayingRemotely:i,connectionStatus:e.connectionStatus,remoteDevice:t}},s=()=>(0,r.v)((e=>a(e).isPlayingRemotely))},14403:(e,t,i)=>{"use strict";i.d(t,{v:()=>c});var n=i(30758),r=i(30806),a=i(28004),s=i(40384),o=i(75488);const l={connectionStatus:a.zP.NOT_CONNECTED,activeDevice:null,connectingDevice:null,devices:[]};function c(e,t=((e,t)=>e===t)){const i=(0,s.e)(),[a,c]=(0,n.useState)((()=>{const t=i.getState()??l;return e(t)}));return(0,o.W)(r.P.UPDATE,(i=>{const n=i.data??l,r=e(n);t(a,r)||c(r)})),a}},33889:(e,t,i)=>{"use strict";i.d(t,{D:()=>a});var n=i(67154),r=i(60102);function a(){return(0,r.N)(n.x)}},28004:(e,t,i)=>{"use strict";i.d(t,{Bd:()=>o,Ts:()=>c,bU:()=>s,bq:()=>r,gX:()=>a,zP:()=>n});let n=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}({}),a=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}({}),s=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}({}),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)))}},43991:(e,t,i)=>{"use strict";i.d(t,{vV:()=>r});const n=!1;function r(...e){a((()=>{console.error(...e)}))}function a(e){n&&e()}},35583:(e,t,i)=>{"use strict";i.d(t,{I:()=>a,j:()=>r});var n=i(33655);let r=function(e){return e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.SMART_SHUFFLE=2]="SMART_SHUFFLE",e}({});const a=(0,n.u)("ContextualShuffleAPI")},97638:(e,t,i)=>{"use strict";i.d(t,{C:()=>o});var n=i(51458),r=i(35583);const a={[n.b.OFF]:r.j.OFF,[n.b.LOCAL]:r.j.ON,[n.b.SMART]:r.j.SMART_SHUFFLE},s={[r.j.OFF]:n.b.OFF,[r.j.ON]:n.b.LOCAL,[r.j.SMART_SHUFFLE]:n.b.SMART};class o{constructor(e){this._indexedDbAPI=e}async getContextualShuffleMode(e){const t=await this._indexedDbAPI.getItem("shuffle-state",e);return t instanceof Error?r.j.OFF:a[t]}async setContextualShuffleMode(e,t){const i=s[t];if(i===n.b.OFF){const t=await this._indexedDbAPI.deleteItem("shuffle-state",e);if(t instanceof Error)throw t}else{const t=await this._indexedDbAPI.setItem("shuffle-state",e,i);if(t instanceof Error)throw t}}getEvents(){return this._indexedDbAPI.getEvents()}}},95625:(e,t,i)=>{"use strict";i.d(t,{n0:()=>s,v8:()=>o});class n{createCookie(e,t=document){const{name:i,value:n,days:r,domain:a,secure:s=!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=`${i}=${n}${l}; path=/`;a&&a.length&&(c+=`;domain=${a}`),n&&(!0===s&&(c+=";secure"),c+=`;samesite=${o}`),t.cookie=c}readCookie(e,t=document){try{const i=t.cookie;return i.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,i){this.createCookie({name:e,value:"",days:-1,domain:i},t)}}let r=null;const a=()=>(r||(r=new n),r);function s(e,t=document){a().createCookie(e,t)}function o(e,t=document){return a().readCookie(e,t)}},18889:(e,t,i)=>{"use strict";i.d(t,{$:()=>s,t:()=>a});var n=i(33655),r=i(9356);const a=(0,n.u)("Cosmos");class s{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,i){return this.resolve(r.I.GET,e,t,i).then((e=>e.body))}post(e,t=null,i){return this.resolve(r.I.POST,e,t,i).then((e=>e.body))}put(e,t,i){return this.resolve(r.I.PUT,e,t,i).then((e=>e.body))}del(e,t,i){return this.resolve(r.I.DELETE,e,t,i).then((e=>e.body))}patch(e,t,i){return this.resolve(r.I.PATCH,e,t,i).then((e=>e.body))}sub(e,t,i=(e=>{console.error(e)}),n=null,a={}){const s=this.requestFactory(r.I.SUB,e,a,n);return this.resolver.resolve(s,(e=>t(e.body)),i)}postSub(e,t=null,i,n=(e=>{console.error(e)})){const a=this.requestFactory(r.I.SUB,e,{},t);return this.resolver.resolve(a,(e=>i(e.body)),n)}request(e,t,i=null,n){return this.resolve(e,t,i,n)}resolve(e,t,i=null,n={}){return new Promise(((r,a)=>{const s=this.requestFactory(e,t,n,i);this.resolver.resolve(s,r,a)}))}}},41363:(e,t,i)=>{"use strict";i.d(t,{h:()=>u});var n=i(18889),r=i(9356),a=i(70509);class s{constructor(e,t,i){this.status=e,this.headers=(0,a.T)(t),this.body=this.parseBody(i)}static isSuccessStatus(e){return e>=200&&e<=299}static parse(e){const t=JSON.parse(e),i=this.isSuccessStatus(t.status)&&t.body?t.body:"";return new s(t.status,t.headers||{},i)}parseBody(e){return""!==e?JSON.parse(e):{}}}var o=i(91771),l=i.n(o);class c{constructor(e,t){this.send=e,this.cancel=t}resolve(e,t,i){const n=this.send({request:e.stringify(),persistent:e.method===r.I.SUB,onSuccess:n=>this.onSuccess(e,n,t,i),onFailure:(t,n)=>this.onFailure(e,t,n,i)});return{cancel:()=>{this.cancel(n)}}}onSuccess(e,t,i,n){try{const r=s.parse(t);if(s.isSuccessStatus(r.status))i(r);else{n(l()(r.status,`${e.method} request to ${e.uri} failed with status code ${r.status}`))}}catch(t){const i=t instanceof Error?t.message:"(unknown error object)";n(new Error(`${e.method} request to ${e.uri} failed with exception '${i}'`))}}onFailure(e,t,i,n){n(new Error(`${e.method} request to ${e.uri} request failed with error code ${t} (${i})`))}}function u(){const e=function(){const e=i.g.window||{};return new c(e.sendCosmosRequest,e.cancelCosmosRequest)}(),t=(...e)=>new r.K(...e);return new n.$(e,t)}},9356:(e,t,i)=>{"use strict";i.d(t,{I:()=>r,K:()=>a});var n=i(70509);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 a{constructor(e,t,i,r){this.uri=t,this.headers=(0,n.T)(i),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 a(t.method,t.uri,t.headers,t.body)}}},70509:(e,t,i)=>{"use strict";function n(e){return Object.keys(e).reduce(((t,i)=>(t[i.toLowerCase()]=e[i],t)),{})}i.d(t,{T:()=>n})},6643:(e,t,i)=>{"use strict";i.d(t,{F:()=>r,p:()=>a});var n=i(33655);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 a=(0,n.u)("CurationAPI")},69357:(e,t,i)=>{"use strict";i.d(t,{e:()=>r});var n=i(65495);class r extends n.e{}},63169:(e,t,i)=>{"use strict";i.d(t,{o:()=>a});var n=i(61544),r=i(70583);function a(e){switch((0,n.o_)(e)?.type){case n.NQ.TRACK:case n.NQ.LOCAL_TRACK:return r.BP;case n.NQ.EPISODE:return r.Xn;default:return r.gv}}},36406:(e,t,i)=>{"use strict";i.d(t,{FR:()=>s,jy:()=>r,oq:()=>a});var n=i(88485);let r=function(e){return e.CURATE_ITEMS="curate_items",e}({}),a=function(e){return e.UPDATE_CURATED_ITEM="update_curated_item",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class s extends n.V{}},33627:(e,t,i)=>{"use strict";i.d(t,{s:()=>a});var n=i(17835),r=i(36406);class a extends r.FR{constructor(e){super(),this.cache=e,this.aggregator=(0,n.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,i)=>{this.cache.set(e,t[i]),this.emit(r.oq.UPDATE_CURATED_ITEM,{uri:e,isCurated:t[i]})})):e.forEach((e=>{this.cache.set(e,t),this.emit(r.oq.UPDATE_CURATED_ITEM,{uri:e,isCurated:t})}))}emitOperationSync(e,t,i,n){return this.emitSync(r.oq.OPERATION,{operation:e,curatedItemUri:t,addedCurationContextUris:i,removedCurationContextUris:n}).defaultPrevented}emitOperationComplete(e,t,i,n,a=null){this.emit(r.oq.OPERATION_COMPLETE,{operation:e,curatedItemUri:t,addedCurationContextUris:i,removedCurationContextUris:n,error:a})}}},14035:(e,t,i)=>{"use strict";i.d(t,{g:()=>r});var n=i(61544);function r(e){const t=(0,n.o_)(e);return t?.type===n.NQ.TRACK||t?.type===n.NQ.LOCAL_TRACK||t?.type===n.NQ.EPISODE}},87128:(e,t,i)=>{"use strict";i.d(t,{x:()=>a});var n=i(6643),r=i(60102);function a(){return(0,r.N)(n.p)}},86954:(e,t,i)=>{"use strict";i.d(t,{K:()=>n});let n=function(e){return e.STAR_WARS="star_wars",e.MANDALORIAN="mandalorian",e.FC_24="fc_24",e}({})},21056:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});let n=function(e){return e.ALBUM="album",e.ARTIST="artist",e.TRACK="track",e.PLAYLIST="playlist",e.NOW_PLAYING="now_playing",e}({})},62733:(e,t,i)=>{"use strict";i.d(t,{P:()=>n.P});var n=i(69463)},98097:(e,t,i)=>{"use strict";i.d(t,{K:()=>n.K});var n=i(86954)},50562:(e,t,i)=>{"use strict";i.d(t,{h:()=>d});var n=i(69463),r=i(61544),a=i(86954);const s={[a.K.STAR_WARS]:[(0,r.cA)("spotify:playlist:37i9dQZF1DXaUaRhCgtpCo"),(0,r.cA)("spotify:playlist:69BOXIItwwyxTgdz6flzvU"),(0,r.cA)("spotify:playlist:37i9dQZF1DWUgUvAPAFxdh")],[a.K.MANDALORIAN]:[(0,r.cA)("spotify:album:4xFmHg5dYvaqmn9ZNQpjWL"),(0,r.cA)("spotify:album:4AOyNiCYswORQsTLxyGYQ4"),(0,r.cA)("spotify:album:5r9JMvwLPm2HNY5WgBZ8Q7"),(0,r.cA)("spotify:album:43PIYGro37xm0Y8iXMP5Pc"),(0,r.cA)("spotify:album:249DL9DzLAZRyxkpOa5w5w"),(0,r.cA)("spotify:album:71GgO9VtkVN2grqmpZo4Y2"),(0,r.cA)("spotify:album:4PMsqnolvUGyj1ZRxE1aki"),(0,r.cA)("spotify:album:4UbdaOH1jy1l9EG9vLFCle"),(0,r.cA)("spotify:album:2NxNzw1ohPc2Hhjaq2j3tW"),(0,r.cA)("spotify:album:4xUXCZfINYIV1DdZKomeVx"),(0,r.cA)("spotify:album:2JtB7K4gMmfC7Ow9Y4pz4b"),(0,r.cA)("spotify:album:3wuE2JeCx2Vmvk7b1c9fnI"),(0,r.cA)("spotify:playlist:37i9dQZF1DWTEvftu9yFoF")],[a.K.FC_24]:[(0,r.cA)("spotify:playlist:37i9dQZF1DX3rXtgePifMs")]};function o(e,t){if(null===t)return null;for(const[i,n]of e)if(n.some((e=>(0,r.B2)(t,e))))return i;return null}function l(e){const t=Object.entries(s),i=Array.isArray(e)?e:[e];for(const e of i){const i=o(t,e);if(null!==i)return i}return null}var c=i(2435),u=i(95339);function d(){const e=(0,n.q)(),t=(0,c.o)((e=>e?.context.uri??null)),i=(0,c.o)((e=>{const t=e?.item??void 0;return(0,u.v)(t)?t.album.uri:null}));if(null===e)return{surface:null,isViewingVariant:null,isPlayingVariant:null};const{surface:r,uris:a}=e;return{surface:r,isViewingVariant:l(a),isPlayingVariant:l([t,i])}}},21451:(e,t,i)=>{"use strict";i.d(t,{KY:()=>o,cX:()=>a,mb:()=>c,rw:()=>l});var n=i(27564),r=i(46545);const a=(e,t,i)=>(i&&e.searchParams.set("t",i.toString()),t&&(e.searchParams.has("utm_source")||e.searchParams.set("utm_source",t)),e.searchParams.has("utm_medium")||e.searchParams.set("utm_medium",(0,n.X)()?"mobile":"desktop"),e);function s(e,t=!0){const i=new URL("undefined"!=typeof location&&location.href?location.href:"https://open.spotify.com");let n=null;if(e){const r=e.toURL();n=new URL(r),t&&i.searchParams.forEach(((e,t)=>{n.searchParams.set(t,e)}))}else n=i,t||(n.search="");n.searchParams.delete("nd"),n.searchParams.delete("fallback"),n.searchParams.set("go","1");const a=(0,r.C)("config");return"string"==typeof a?.correlationId&&n.searchParams.append("sp_cid",a.correlationId),n}function o(e,t){const i=s(e,t);return i.searchParams.set("fallback","getapp"),i}function l(e,t){const i=s(e,t);return i.searchParams.set("fallback","download"),i}function c(){return new URL(`https://www.spotify.com/download${window.location.search}`)}},37116:(e,t,i)=>{"use strict";i.d(t,{$W:()=>s,H2:()=>o,Jf:()=>n,f6:()=>r,l_:()=>a});const n="STORE_DEFERRED_ACTION",r="PULL_DEFERRED_ACTION";let a=function(e){return e.PLAY="play",e.PLAYING="playing",e.USER_INVESTMENT="user-investment",e}({});const s=(e,t)=>({type:n,storeAction:e,actionIntent:t}),o=()=>({type:r})},45695:(e,t,i)=>{"use strict";i.d(t,{I:()=>n.I});var n=i(53255)},82946:(e,t,i)=>{"use strict";i.d(t,{N:()=>n});const n=(0,i(30758).createContext)(null)},60102:(e,t,i)=>{"use strict";i.d(t,{N:()=>a});var n=i(30758),r=i(82946);function a(e){return function(){const e=(0,n.useContext)(r.N);if(null===e)throw new Error("Trying to use 'RegistryContext' without 'RegistryProvider'!");return e}().resolve(e)}},53255:(e,t,i)=>{"use strict";i.d(t,{I:()=>u});let n=function(e){return e[e.ROOT=0]="ROOT",e[e.DEPENDENCY=1]="DEPENDENCY",e[e.INSTANCE=2]="INSTANCE",e}({});Error;class r{addChild(){return this}getParent(){return null}getChildren(){return[]}getType(){return n.ROOT}getId(){return"<root>"}getLabel(){return"<root>"}toDigraph(){return"digraph {}"}}var a=i(33655);class s extends Error{}class o{constructor(e){this._resolve=e}resolve(e){return l(e,this.resolveImpl(e))}resolveNoThrow(e){return this.resolveImpl(e)}resolveImpl(e){return this._resolve(e)}}function l(e,t){if(null===t)throw new s(`No registration was found for token '${(0,a.o)(e)}'!`);return t}class c{_map=new Map;_tree=function(){return new r}();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){return this._tree.addChild({type:n.DEPENDENCY,id:(0,a.o)(e)}),this._map.set(e,t),this}resolve(e){return l(e,this.resolveImpl(this._tree,e))}resolveNoThrow(e){return this.resolveImpl(this._tree,e)}resolveImpl(e,t){e=e.addChild({type:n.DEPENDENCY,id:(0,a.o)(t)});const i=this._map.get(t);if(void 0===i){for(const e of this._parents){const i=e.resolveNoThrow(t);if(null!==i)return i}return null}if(function(e){return void 0!==e.instance}(i))return i.instance;const r=new o((t=>this.resolveImpl(e,t)));const s=i.factory(r),l=function(e){return null===e?"null":"object"==typeof e?e.constructor.name:typeof e}(s);return e.addChild({type:n.INSTANCE,id:`${l}_instance`,label:l}),i.instance=s}getDependencyTree(){return this._tree}}function u(e=[]){return new c(e)}},33655:(e,t,i)=>{"use strict";function n(e){return Symbol.for(e)}function r(e){return e.description??e.toString()}i.d(t,{o:()=>r,u:()=>n})},88485:(e,t,i)=>{"use strict";i.d(t,{V:()=>r});var n=i(80521);class r{constructor(e=new n.bk){this._emitter=e,this._emitter=e||new n.bk}createEvent(e,t){return this._emitter.createEvent(e,t)}addListener(e,t,i){this._emitter.addListener(e,t,i);return()=>{this.removeListener(e,t,i)}}removeListener(e,t,i){return this._emitter.removeListener(e,t,i),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)}}},62683:(e,t,i)=>{"use strict";i.d(t,{X:()=>r});var n=i(8352);function r(){return(0,n.n1)()}},8352:(e,t,i)=>{"use strict";i.d(t,{VI:()=>o,n1:()=>c});var n=i(33655);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 a(e){const t=new TextEncoder,i=t.encode(e.service),n=t.encode(e.method),a=e.payload,s=new Uint8Array(4+i.byteLength+4+n.byteLength+4+a.byteLength),o=new r(s);return o.write(i),o.write(n),o.write(a),s.buffer}class s extends Error{constructor(){super("aborted")}}const o=(0,n.u)("EsperantoTransport");class l{constructor(e,t){this._onSend=e,this._onCancel=t}callSingle(e,{signal:t}={}){let i;return new Promise(((n,r)=>{const a=this.call(e,!1,n,r);t?.addEventListener("abort",i=()=>{a.cancel(),r(new s)})})).finally((()=>t?.removeEventListener("abort",i)))}callStream(e,t){return this.call(e,!0,t,(e=>{throw e}))}call(e,t,i,n){const r=this._onSend({request:a(e),persistent:t,onSuccess:t=>{t instanceof ArrayBuffer?i(new Uint8Array(t)):n(new Error(`${e.service}.${e.method} failed with invalid payload!`))},onFailure:(t,i)=>{n(new Error(`${e.service}.${e.method} failed with code: ${i}`))}}),s=this._onCancel;return{cancel(){s(r)}}}}function c(){const e=i.g.window||{};return new l(e.executeEsperantoCall,e.cancelEsperantoCall)}},22360:(e,t,i)=>{"use strict";i.d(t,{G:()=>r,P:()=>a});var n=i(33655);let r=function(e){return e.UNKNOWN="unknown",e.CAR="car",e.HEADPHONES="headphones",e.SPEAKER="speaker",e.WEARABLE="wearable",e}({});const a=(0,n.u)("ExternalAccessoryAPI")},72645:(e,t,i)=>{"use strict";i.d(t,{W:()=>g});var n=i(38481),r=i(5277),a=i(22360);let s=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 s.unknown;case 1:case"car":return s.car;case 2:case"headphones":return s.headphones;case 3:case"speaker":return s.speaker;case 4:case"wearable":return s.wearable;case 5:case"other":return s.other;default:return s.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 s.unknown:return"unknown";case s.car:return"car";case s.headphones:return"headphones";case s.speaker:return"speaker";case s.wearable:return"wearable";case s.other:return"other";case s.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 m=`${n.I_}/external-accessory-mapping-serving/v1`;function p(e){switch(e){case s.car:return a.G.CAR;case s.headphones:return a.G.HEADPHONES;case s.speaker:return a.G.SPEAKER;case s.wearable:return a.G.WEARABLE;case s.UNRECOGNIZED:case s.unknown:default:return a.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(m).withPath(`/lookup/${e}`).send(),{category:i,company:n,model:r,displayName:a}=u.fromJSON(t.body);return{type:p(i),brand:n,model:r,displayName:a}}}function g(e){return new h(e)}},19829:(e,t,i)=>{"use strict";i.d(t,{o:()=>n,q:()=>a});const n=(0,i(33655).u)("GraphQLBatchedLoader"),r=50;function a(e,t=r){return async(i,n,r,a)=>{const s=[],o=Math.max(...r.map((e=>n[e]?.length??0)));for(let l=0;l<o;l+=t){const o={...n};r.forEach((e=>{o[e]=o[e]?.slice(l,l+t)})),void 0!==a?s.push(e(i,o,a)):s.push(e(i,o))}return(await Promise.all(s)).map((e=>{if(null===e||void 0!==e.errors||null===e.data)throw new Error("GraphQL batched query failed!");return e.data}))}}},69916:(e,t,i)=>{"use strict";i.d(t,{j:()=>n});const n=(0,i(30758).createContext)({request:()=>{throw new Error("GraphQL Context not initialized with Request object")}})},15742:(e,t,i)=>{"use strict";i.d(t,{l:()=>n});class n{constructor(e,t,i,n){this.name=e,this.operation=t,this.sha256Hash=i,this.value=n}}},52732:(e,t,i)=>{"use strict";i.d(t,{lY:()=>o,zk:()=>s});var n=i(33655),r=i(38481),a=i(52276);const s=(0,n.u)("GraphQLLoader");function o(e){return async(t,i,n={},s=[])=>{const{operation:o}=t;if("subscription"===o)throw new Error("GraphQL subscriptions are not supported!");const u=await async function(e,t,i,n={},s=[]){const{operation:o}=t;try{let a;return a="mutation"===o?await async function(e,t,i,n){const{name:a}=t;return e.build().withHost(r.J8).withMethod("POST").withoutMarket().withPath("/query").withJsonContentType().withBody({variables:i,operationName:a,extensions:l(t)}).withQueryParameters({...n}).withEndpointIdentifier(`/query/${a}`).send()}(e,t,i,n):await async function(e,t,i,n,a){const{name:s}=t;return e.build().withHost(r.J8).withMethod("GET").withoutMarket().withPath("/query").withJsonContentType().withQueryParameters({operationName:s,variables:JSON.stringify(i),extensions:JSON.stringify(l(t)),...n}).withHeaders(a).withEndpointIdentifier(`/query/${s}`).send()}(e,t,i,n,s),a.body?.errors?.some((e=>"PersistedQueryNotFound"===e.message))?c(e,t,i,n):a}catch(r){const s=405;if(r instanceof a.O&&r.status===s)return c(e,t,i,n);throw r}}(e,t,i,n,s);return u.body}}function l(e){return{persistedQuery:{version:1,sha256Hash:e.sha256Hash}}}async function c(e,t,i,n){const{name:a,value:s}=t;if(null===s)throw new Error(`Fallback query for "${a}" is not available!`);return e.build().withHost(r.J8).withMethod("POST").withoutMarket().withPath("/query").withJsonContentType().withBody({operationName:a,variables:i,query:s,extensions:l(t)}).withQueryParameters({...n}).withEndpointIdentifier(`/query/${a}`).send()}},22253:(e,t,i)=>{"use strict";async function n(e,t,i){try{const n=await e(t,i);return n?.errors?Promise.reject(n?.errors):n}catch(e){return e instanceof Error?Promise.reject([{message:e.message}]):Promise.reject(null)}}i.d(t,{c:()=>n})},8385:(e,t,i)=>{"use strict";i.d(t,{I:()=>c,i:()=>l});var n=i(30758),r=i(69898),a=i(25639),s=i(69916),o=i(22253);const l=6e4;function c(e,t,i){const l=(0,r.jE)(),{request:c}=(0,n.useContext)(s.j),{name:u,operation:d,sha256Hash:m}=e,p="query"===d,h=p&&i?.gcTime?i?.gcTime:0,g=p&&i?.staleTime?i?.staleTime:0,f=(0,n.useRef)([u,t,m]);f.current=[u,t,m];const{data:v,isLoading:y,isFetching:b,error:_}=(0,a.I)({queryKey:f.current,queryFn:()=>(0,o.c)(c,e,t),...i,gcTime:h,staleTime:g,meta:{persist:!0}}),E=(0,n.useCallback)((()=>l.invalidateQueries({queryKey:f.current,exact:!0})),[l]);return{data:v?.data??null,extensions:v?.extensions,error:_??null,loading:y,fetching:b,invalidate:E}}},90265:(e,t,i)=>{"use strict";i.d(t,{$:()=>b,E:()=>_});var n=i(83844),r=i(33655),a=i(65495);class s extends a.e{constructor(e,t){super(e,t)}}i(28360);class o extends a.e{constructor(e,t){super(e,t)}}class l extends a.e{constructor(e,t){super(e,t)}}class c extends a.e{constructor(e,t){super(e,t)}}class u extends a.e{constructor(e,t){super(e,t)}}class d extends a.e{constructor(e,t){super(e,t)}}class m extends a.e{constructor(e,t){super(e,t)}}class p extends a.e{}const h={0:e=>{const t=e;return t.createObjectStore("shuffle-state"),t}};var g=i(934);function f(e){e instanceof Error&&!(e instanceof s)&&console.error(e,"cause:",e.cause)}class v{constructor(e){this.name=e}close(){}dispatchEvent(){return!1}addEventListener(){}removeEventListener(){}postMessage(){}onmessage(){}onmessageerror(){}}class y extends(window.BroadcastChannel??v){postMessage(e){super.postMessage(e)}addEventListener(e,t,i){super.addEventListener(e,t,i)}}const b=(0,r.u)("IndexedDbAPI");class _{constructor(e){this.name=`${e}:client-web`,this.version=1,this._events=new g.H,this._channel=new y(this.name),this._channel.addEventListener("message",(e=>{const{type:t,payload:i}=e.data;if(t===g.w.UPDATE){const{storeName:e,key:t,value:n}=i;this._events.emit(g.w.UPDATE,{storeName:e,key:t,value:n})}else if(t===g.w.DELETE){const{storeName:e,key:t}=i;this._events.emit(g.w.DELETE,{storeName:e,key:t})}}))}getEvents(){return this._events}async openDb(){const e=(0,n.P2)(this.name,this.version,{upgrade(e,t,i){!function(e,t,i){if(!i)throw new p(`Version change triggered for version ${t} but there is no new version to migrate to.`);let n=t;for(;n<i;){const t=h[n];if(!t)throw new p(`No migration from version ${n} to ${n+1}.`);t(e),n++}}(e,t,i)},blocking(){window.location.reload()}}).catch((t=this.version,e=>{if(e instanceof DOMException)switch(e.name){case"ConstraintError":return new l(`ConstraintError while opening database version "${t}"`,{cause:e});case"VersionError":return new u(e.message,{cause:e});case"AbortError":return new o(`AbortError while opening database version "${t}"`,{cause:e})}return new c(`Error opening database version "${t}"`,{cause:e})}));var t;return f(e),e}async getItem(e,t){const i=await this.openDb();if(i instanceof Error)return i;const n=await i.get(e,t).then((i=>void 0===i?new s(`Key "${t}" not found in store "${e}". DB version: "${this.version}"`,{cause:void 0}):i)).catch(((e,t,i)=>n=>{if(n instanceof DOMException)switch(n.name){case"NotFoundError":return new s(`Key "${i}" not found in store "${t}". DB version: "${e}"`,{cause:n});case"InvalidStateError":return new m(`InvalidStateError when reading key "${i}" from store "${t}". DB version: "${e}"`,{cause:n})}return new c(`Error reading key "${i}" from store "${t}". DB version: "${e}"`,{cause:n})})(this.version,e,t));return f(n),n}async setItem(e,t,i){const n=await this.openDb();if(n instanceof Error)return n;const r=await n.put(e,i,t).catch(((e,t)=>i=>{if(i instanceof DOMException)switch(i.name){case"QuotaExceededError":return new d(`Quota exceeded when writing to object store "${t}". DB version: "${e}"`,{cause:i});case"AbortError":return new o(`Abort occured when writing to object store "${t}". DB version: "${e}"`,{cause:i})}return new c(`Error writing to "${t}". DB version: "${e}"`,{cause:i})})(this.version,e));return f(r),r instanceof Error||(this._channel.postMessage({type:g.w.UPDATE,payload:{storeName:e,key:t,value:i}}),this._events.emit(g.w.UPDATE,{storeName:e,key:t,value:i})),r}async deleteItem(e,t){const i=await this.openDb();if(i instanceof Error)return i;const n=i.delete(e,t).catch(((e,t,i)=>n=>{if(n instanceof DOMException)switch(n.name){case"NotFoundError":return new s(`Key "${i}" not found in store "${t}". DB version: "${e}"`,{cause:n});case"InvalidStateError":return new m(`InvalidStateError when deleting key "${i}" from store "${t}". DB version: "${e}"`,{cause:n})}return new c(`Error deleting key "${i}" from store "${t}". DB version: "${e}"`,{cause:n})})(this.version,e,t));return f(n),n instanceof Error||(this._channel.postMessage({type:g.w.DELETE,payload:{storeName:e,key:t}}),this._events.emit(g.w.DELETE,{storeName:e,key:t})),n}}},934:(e,t,i)=>{"use strict";i.d(t,{H:()=>a,w:()=>r});var n=i(88485);let r=function(e){return e.UPDATE="update",e.DELETE="delete",e}({});class a extends n.V{}},51458:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});let n=function(e){return e.OFF="OFF",e.LOCAL="LOCAL",e.SMART="SMART",e}({})},70583:(e,t,i)=>{"use strict";i.d(t,{BP:()=>a,E3:()=>o,Ho:()=>m,IU:()=>u,Xn:()=>s,c_:()=>c,db:()=>d,gv:()=>r,oT:()=>l});var n=i(33655);const r="spotify:collection",a="spotify:collection:tracks",s="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 m=(0,n.u)("LibraryAPI")},25558:(e,t,i)=>{"use strict";i.d(t,{Ir:()=>r,UV:()=>s,b7:()=>l,tS:()=>a,uL:()=>o});var n=i(88485);let r=function(e){return e.ALBUMS="albums",e.ARTISTS="artists",e.SHOWS="shows",e.TRACKS="tracks",e.EPISODES="episodes",e.BOOKS="books",e}({}),a=function(e){return e.ADD="add",e.REMOVE="remove",e}({}),s=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 n.V{}},80274:(e,t,i)=>{"use strict";i.d(t,{HI:()=>a,Hh:()=>n,tl:()=>r});let n=function(e){return e.TEXT="TEXT",e.TAGS="TAGS",e}({}),r=function(e){return e.CONTAINS="CONTAINS",e}({});function a(e){if(e)return"string"==typeof e&&e.startsWith("tags contains")?{field:n.TAGS,operator:r.CONTAINS,value:e.slice(14)}:"string"==typeof e?{field:n.TEXT,operator:r.CONTAINS,value:e.trim()}:e}},28275:(e,t,i)=>{"use strict";i.d(t,{Ev:()=>c,Sw:()=>r,WW:()=>s,af:()=>o,ci:()=>l,uY:()=>a,xB:()=>n});let n=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}({}),a=function(e){return e.NAME="NAME",e.ARTIST_NAME="ARTIST_NAME",e.ADDED_AT="ADDED_AT",e}({}),s=function(e){return e.NAME="NAME",e.ADDED_AT="ADDED_AT",e}({}),o=function(e){return e.NAME="NAME",e.ADDED_AT="ADDED_AT",e}({}),l=function(e){return e.NAME="NAME",e.SHOW_NAME="SHOW_NAME",e.ADDED_AT="ADDED_AT",e}({}),c=function(e){return e.NAME="NAME",e.ADDED_AT="ADDED_AT",e}({})},9111:(e,t,i)=>{"use strict";i.d(t,{w:()=>a});var n=i(17835),r=i(25558);class a extends r.b7{_numListeners=0;constructor(e){super(),this._cache=e,this._aggregator=(0,n.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,i)=>{this._cache.set(e,t[i]),this.emit(r.UV.UPDATE_ITEM,{uri:e,isInLibrary:t[i]})})):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,i){return this.emitSync(r.UV.OPERATION,{operation:e,uris:t,silent:i}).defaultPrevented}emitOperationComplete(e,t,i=null,n){this.emit(r.UV.OPERATION_COMPLETE,{operation:e,uris:t,error:i,silent:n})}}},4479:(e,t,i)=>{"use strict";i.d(t,{c:()=>a});var n=i(61544),r=i(70583);function a(e,t){if(t){if(e===r.BP)return(0,n.fH)(t).toURI();if(e===r.Xn)return(0,n.fH)(t,"your-episodes").toURI()}return e===r.E3?"spotify:local-files":e}},3986:(e,t,i)=>{"use strict";i.d(t,{Bf:()=>f,FD:()=>E,Pz:()=>y,WQ:()=>v,Wu:()=>C,i_:()=>S,qZ:()=>x,sW:()=>b});var n=i(94961),r=i(80274),a=i(70583),s=i(92759),o=i(36485),l=i(11808),c=i(71817),u=i(56709);const d={[r.Hh.TEXT]:"text",[r.Hh.TAGS]:"tags"},m={[r.tl.CONTAINS]:"contains"};function p(e){return e.map((e=>{const{field:t,operator:i,value:n}=e;if(t!==r.Hh.TEXT&&t!==r.Hh.TAGS||i!==r.tl.CONTAINS)throw new Error("Invalid filter params!");return`${d[t]} ${m[i]} ${encodeURIComponent(n)}`})).join(",")}const h={[r.Hh.TEXT]:"text",[r.Hh.TAGS]:"tags"},g={[r.tl.CONTAINS]:"=^#"};function f(e){return p(e)}function v(e){return e?.value??""}function y(e,t){if(void 0===t||0===t.length)return;const i=function(e){return e.map((e=>{const{field:t,operator:i,value:n}=e;if(t!==r.Hh.TEXT&&t!==r.Hh.TAGS||i!==r.tl.CONTAINS)throw new Error("Invalid filter params!");return`${h[t]} ${g[i]} "${n}"`})).join(",")}(t),a=p(t);e.url=`context://${e.uri}?filter=${encodeURIComponent(a)}`,e.metadata=e.metadata??{},e.metadata[n.W.FILTERING_PREDICATE]=i,e.metadata[n.W.LIST_UTIL_FILTER]=a}function b(e){const t=e?.toString()??"";switch(e){case s.jO.ALBUM:return{id:t,name:l.Ru.get("shared.library.filter.album")};case s.jO.ARTIST:return{id:t,name:l.Ru.get("shared.library.filter.artist")};case s.jO.PLAYLIST:return{id:t,name:l.Ru.get("shared.library.filter.playlist")};case s.jO.SHOW:return{id:t,name:l.Ru.get("search.title.shows")};case s.jO.BOOK:return{id:t,name:l.Ru.get("shared.library.filter.book")};case s.jO.DOWNLOADED:return{id:t,name:l.Ru.get("shared.library.filter.downloaded")};case s.jO.BY_YOU:return{id:t,name:l.Ru.get("shared.library.filter.by-you")};case s.jO.BY_SPOTIFY:return{id:t,name:l.Ru.get("shared.library.filter.by-spotify")};case s.jO.UNPLAYED:return{id:t,name:l.Ru.get("shared.library.filter.unplayed")};case s.jO.IN_PROGRESS:return{id:t,name:l.Ru.get("shared.library.filter.in-progress")};case s.jO.EVENT:case s.jO.WRITABLE:case s.jO.UNRECOGNIZED:return{id:t,name:s.jO[e]};default:throw(0,o.k)(e),new a.c_(`${e}`)}}const _={[s.jO.PLAYLIST]:0,[s.jO.SHOW]:1,[s.jO.BOOK]:2,[s.jO.ALBUM]:3,[s.jO.ARTIST]:4,[s.jO.BY_YOU]:5,[s.jO.BY_SPOTIFY]:6,[s.jO.IN_PROGRESS]:7,[s.jO.UNPLAYED]:8,[s.jO.DOWNLOADED]:9,[s.jO.WRITABLE]:-1,[s.jO.UNRECOGNIZED]:-1,[s.jO.EVENT]:-1};function E(e){return e.filter((e=>-1!==_[e])).sort(((e,t)=>_[e]-_[t]))}function C(e){return e.filter((({id:e})=>![s.jO.PLAYLIST].includes((0,u.qF)(e))))}function x(e){switch(e){case s.jO.ALBUM:return c.c.ALBUM;case s.jO.ARTIST:return c.c.ARTIST;case s.jO.PLAYLIST:return c.c.PLAYLIST;case s.jO.SHOW:return c.c.SHOW;case s.jO.BOOK:return c.c.AUDIOBOOK;case s.jO.DOWNLOADED:return"downloaded";default:return null}}function S(e){switch(e){case c.c.ALBUM:return s.jO.ALBUM;case c.c.ARTIST:return s.jO.ARTIST;case c.c.PLAYLIST:return s.jO.PLAYLIST;case c.c.SHOW:return s.jO.SHOW;case c.c.AUDIOBOOK:return s.jO.BOOK;case"downloaded":return s.jO.DOWNLOADED;default:return null}}},86076:(e,t,i)=>{"use strict";i.d(t,{Lf:()=>c,_e:()=>v,c6:()=>d,fC:()=>l,fG:()=>_,qq:()=>p,rC:()=>h,ss:()=>b,wh:()=>f});var n=i(94961),r=i(28275),a=i(92759),s=i(36485),o=i(11808);function l(e){if(void 0===e)return;const{field:t}=e;if(t===r.uY.NAME)return a.oR.NAME;if(t===r.uY.ARTIST_NAME)return a.oR.CREATOR;if(t===r.uY.ADDED_AT)return a.oR.RECENTLY_ADDED;throw new Error("Invalid album sort params!")}function c(e){if(void 0===e)return;const{field:t}=e;if(t===r.af.NAME)return a.oR.NAME;if(t===r.af.ADDED_AT)return a.oR.RECENTLY_ADDED;throw new Error("Invalid artist sort params!")}var u=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}(u||{});function d({field:e,order:t}){switch(e){case r.Sw.NAME:return t===r.xB.ASC?u.TRACK_NAME_ASC:u.TRACK_NAME_DESC;case r.Sw.ARTIST_NAME:return t===r.xB.ASC?u.TRACK_ARTIST_NAME_ASC:u.TRACK_ARTIST_NAME_DESC;case r.Sw.ALBUM_NAME:return t===r.xB.ASC?u.TRACK_ALBUM_NAME_ASC:u.TRACK_ALBUM_NAME_DESC;case r.Sw.ADDED_AT:return t===r.xB.ASC?u.TRACK_ADDED_AT_ASC:u.TRACK_ADDED_AT_DESC;default:throw new Error("Invalid track sort params!")}}var m=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}(m||{});function p(e,t){void 0!==t&&(e.metadata=e.metadata??{},e.metadata[n.W.SORTING_CRITERIA]=function({field:e,order:t}){switch(e){case r.Sw.NAME:return t===r.xB.ASC?m.TRACK_NAME_ASC:m.TRACK_NAME_DESC;case r.Sw.ARTIST_NAME:return t===r.xB.ASC?m.TRACK_ARTIST_NAME_ASC:m.TRACK_ARTIST_NAME_DESC;case r.Sw.ALBUM_NAME:return t===r.xB.ASC?m.TRACK_ALBUM_NAME_ASC:m.TRACK_ALBUM_NAME_DESC;case r.Sw.ADDED_AT:return t===r.xB.ASC?m.TRACK_ADDED_AT_ASC:m.TRACK_ADDED_AT_DESC;default:throw new Error("Invalid track sort params!")}}(t),e.metadata[n.W.LIST_UTIL_SORT]=d(t))}function h(e){if(void 0===e)return;const{field:t}=e;if(t===r.WW.NAME)return a.oR.NAME;if(t===r.WW.ADDED_AT)return a.oR.RECENTLY_ADDED;throw new Error("Invalid show sort params!")}var g=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}(g||{});function f(e){return void 0===e?"":function({field:e,order:t}){if(e===r.ci.NAME&&t===r.xB.ASC)return g.EPISODE_NAME_ASC;if(e===r.ci.NAME&&t===r.xB.DESC)return g.EPISODE_NAME_DESC;if(e===r.ci.ADDED_AT&&t===r.xB.ASC)return g.EPISODE_ADDED_AT_ASC;if(e===r.ci.ADDED_AT&&t===r.xB.DESC)return g.EPISODE_ADDED_AT_DESC;if(e===r.ci.SHOW_NAME&&t===r.xB.ASC)return g.SHOW_NAME_ASC;if(e===r.ci.SHOW_NAME&&t===r.xB.DESC)return g.SHOW_NAME_DESC;throw new Error("Invalid episode sort params!")}(e)}function v(e){if(void 0!==e){if(e===r.Ev.NAME)return a.oR.NAME;if(e===r.Ev.ADDED_AT)return a.oR.RECENTLY_ADDED;throw new Error("Invalid book sort params!")}}function y(e){return _(e)?.[0]}function b(e,t){const i=e?.toString()??"";switch(e){case a.oR.CREATOR:return{id:i,name:t===a.jO.BOOK?o.Ru.get("shared.library.sort-by.author"):o.Ru.get("shared.library.sort-by.creator")};case a.oR.CUSTOM:return{id:i,name:o.Ru.get("shared.library.sort-by.custom")};case a.oR.NAME:return{id:i,name:o.Ru.get("shared.library.sort-by.name")};case a.oR.RECENTLY_ADDED:return{id:i,name:o.Ru.get("shared.library.sort-by.recently-added")};case a.oR.RECENTLY_PLAYED_OR_ADDED:return{id:i,name:o.Ru.get("shared.library.sort-by.recently-played-or-added")};case a.oR.RECENTLY_UPDATED:return{id:i,name:o.Ru.get("shared.library.sort-by.recently-updated")};case a.oR.RELEVANCE:return{id:i,name:o.Ru.get("shared.library.sort-by.relevance")};case a.oR.UNRECOGNIZED:case a.oR.EVENT_START_TIME:case void 0:return y(t);default:return(0,s.k)(e),y(t)}}function _(e){let t=[];switch(e){case a.jO.ALBUM:case a.jO.DOWNLOADED:case a.jO.WRITABLE:case a.jO.BY_YOU:case a.jO.BY_SPOTIFY:case a.jO.UNPLAYED:case a.jO.EVENT:case a.jO.IN_PROGRESS:case a.jO.UNRECOGNIZED:case a.jO.BOOK:t=[a.oR.RECENTLY_PLAYED_OR_ADDED,a.oR.RECENTLY_ADDED,a.oR.NAME,a.oR.CREATOR];break;case a.jO.SHOW:t=[a.oR.RECENTLY_PLAYED_OR_ADDED,a.oR.RECENTLY_ADDED,a.oR.NAME,a.oR.CREATOR,a.oR.RECENTLY_UPDATED];break;case a.jO.PLAYLIST:t=[a.oR.RECENTLY_PLAYED_OR_ADDED,a.oR.RECENTLY_ADDED,a.oR.NAME,a.oR.CREATOR,a.oR.CUSTOM];break;case a.jO.ARTIST:t=[a.oR.RECENTLY_PLAYED_OR_ADDED,a.oR.RECENTLY_ADDED,a.oR.NAME];break;case void 0:t=[a.oR.RECENTLY_PLAYED_OR_ADDED,a.oR.RECENTLY_ADDED,a.oR.NAME,a.oR.CREATOR];break;default:(0,s.k)(e)}return t.map((t=>b(t,e)))}},56709:(e,t,i)=>{"use strict";function n(e){return Number(e)}function r(e){return e?n(e):void 0}function a(e){return e?function(e){return Number(e)}(e):void 0}i.d(t,{CA:()=>a,IP:()=>r,qF:()=>n})},11898:(e,t,i)=>{"use strict";i.d(t,{f:()=>a});var n=i(70583),r=i(60102);function a(){return(0,r.N)(n.Ho)}},25326:(e,t,i)=>{"use strict";i.d(t,{dB:()=>d,vr:()=>m});var n=i(30758),r=i(25558),a=i(11898),s=i(88602),o=i(61272),l=i(80521);const c=r.UV.UPDATE;function u(e,t){const i=(0,a.f)(),[r,o]=(0,n.useState)(null),u=(0,n.useCallback)((async n=>{e===n.data.list&&o(await t(i))}),[i,e,t]);return(0,n.useEffect)((()=>{u(new l.Vk(c,{list:e}))}),[u,e]),(0,s.l)(c,u),r}function d(e){return u(r.Ir.TRACKS,(0,o.U0)((t=>t.getTracks(e)),[e]))}function m(e){return u(r.Ir.EPISODES,(0,o.U0)((t=>t.getEpisodes(e)),[e]))}},88602:(e,t,i)=>{"use strict";i.d(t,{l:()=>a});var n=i(30758),r=i(11898);function a(e,t){const i=(0,r.f)(),a=(0,n.useRef)(t);(0,n.useLayoutEffect)((()=>{a.current=t})),(0,n.useEffect)((()=>i.getEvents().addListener(e,(e=>a.current(e)))),[e,i])}},62720:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(30758),r=i(11898),a=i(27774),s=i(61544),o=i(25558),l=i(40814);function c(e,t){const i=(0,r.f)(),c=(0,a._)();(0,n.useEffect)((()=>function(e,t,i,n){const r=(0,s.o_)(i)?.type;switch(r){case s.NQ.ALBUM:case s.NQ.ARTIST:case s.NQ.SHOW:case s.NQ.TRACK:case s.NQ.LOCAL_TRACK:case s.NQ.EPISODE:return e.getEvents().addListener(o.UV.UPDATE_ITEM,(e=>{e.data.uri===i&&n(e.data.isInLibrary)}),{uri:i});case s.NQ.PLAYLIST:case s.NQ.PLAYLIST_V2:return t.getEvents().addListener(l.tD.UPDATE_ITEM,(e=>{e.data.uri===i&&n(e.data.isInRootlist)}),{uri:i});default:return()=>{}}}(i,c,e,t)),[i,c,e,t])}function u(e,t=!1){const i=(0,r.f)(),o=(0,a._)(),l=(0,n.useCallback)((()=>function(e,t,i){const n=(0,s.o_)(i)?.type;switch(n){case s.NQ.ALBUM:case s.NQ.ARTIST:case s.NQ.SHOW:case s.NQ.TRACK:case s.NQ.LOCAL_TRACK:case s.NQ.EPISODE:return e.containsSync(i);case s.NQ.PLAYLIST:case s.NQ.PLAYLIST_V2:return t.containsSync(i)}}(i,o,e)||t),[t,i,o,e]),[u,d]=(0,n.useState)(l);(0,n.useEffect)((()=>{d(l)}),[l]);const m=(0,n.useCallback)((async t=>{await async function(e,t,i,n){const r=(0,s.o_)(i)?.type;switch(r){case s.NQ.ALBUM:case s.NQ.ARTIST:case s.NQ.SHOW:case s.NQ.EPISODE:case s.NQ.LOCAL_TRACK:case s.NQ.TRACK:n?e.add({uris:[i]}):e.remove({uris:[i]});break;case s.NQ.PLAYLIST:case s.NQ.PLAYLIST_V2:n?t.add([i],{before:"start"}):t.remove([{uri:i}])}}(i,o,e,t)}),[e,i,o]);return c(e,d),[u,m]}},48168:(e,t,i)=>{"use strict";i.d(t,{bV:()=>r,kW:()=>a,sl:()=>s});var n=i(33655);const r="spotify:internal:local-files";let a=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 s=(0,n.u)("LocalFilesAPI")},58127:(e,t,i)=>{"use strict";i.d(t,{Q:()=>a,T:()=>r});var n=i(88485);let r=function(e){return e.UPDATE="update",e}({});class a extends n.V{}},45235:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(48168),r=i(60102);function a(){return(0,r.N)(n.sl)}},46177:(e,t,i)=>{"use strict";i.d(t,{o:()=>r});var n=i(45235);function r(){return(0,n.A)().getCapabilities()}},50879:(e,t,i)=>{"use strict";i.d(t,{m:()=>d,P:()=>m});var n=i(33655),r=i(75621),a=i(13596),s=i(65495);class o extends s.e{}var l=i(90126);class c extends s.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=i(41286);const d=(0,n.u)("LocalStorageAPI");class m{items={};max_retries=3;auto_cleanup=!1;constructor(e,t){this.namespace=e,this._events=new a.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 i=JSON.parse(t);return this.items[e]=i,i}catch(i){return console.error(`Failed to parse value ${t} for key ${e}`),new u.Y(t)}}listenToStorageEvents(){window.addEventListener("storage",(e=>{const{key:t,newValue:i,oldValue:n}=e;if(null!==t&&null!==i&&t.startsWith(this.namespace)&&i!==n){const e=this.parseLocalStorageValue(t,i);this.items[t]=e,this._events.emit(a.r.UPDATE,{key:t.replace(`${this.namespace}:`,""),value:e})}}))}getEvents(){return this._events}getItem(e){const t=this.createNamespacedKey(e),i=this.items[t];if(t in this.items)return i;const n=window.localStorage.getItem(t);return null===n?new l.m(e):this.parseLocalStorageValue(t,n)}setItem(e,t){this.setItemInternal(e,t,this.max_retries)}setItemInternal(e,t,i){if(0===i)return void(0,r.UD)(new Error("LocalStorage retried too many times"));const n=this.createNamespacedKey(e),s=JSON.stringify(t),l=window.localStorage.getItem(n);if(l!==s){this.items[n]=t;try{window.localStorage.setItem(n,s)}catch(n){if(console.error("LocalStorage quota exceeded (no space left)"),(0,r.UD)(new c),this.auto_cleanup)return this.toggleItemsTypeAndCleanup(),this.setItemInternal(e,t,i-1)}try{this._events.emitSync(a.r.UPDATE,{key:e,value:t})}catch(t){const i=new o(`Failed to emit UPDATE event for key: ${e}`,{cause:t});console.error(i,`value: ${l}`),(0,r.UD)(i)}}}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]}}},13596:(e,t,i)=>{"use strict";i.d(t,{G:()=>a,r:()=>r});var n=i(88485);let r=function(e){return e.UPDATE="update",e}({});class a extends n.V{}},90126:(e,t,i)=>{"use strict";i.d(t,{m:()=>n});class n extends Error{constructor(e){super(`"${e}" not found in local storage.`),Object.setPrototypeOf(this,n.prototype)}}},41286:(e,t,i)=>{"use strict";i.d(t,{Y:()=>n});class n extends Error{constructor(e){super(`Failed to JSON.parse value "${e}"`),Object.setPrototypeOf(this,n.prototype)}}},75235:(e,t,i)=>{"use strict";i.d(t,{x:()=>o});var n=i(30758),r=i(61272),a=i(51396),s=i(13596);const o=(e,t)=>{const i=(0,a.q)(),o=(0,n.useRef)(i.getItem(e)),[l,c]=(0,n.useState)(o.current instanceof Error?t:o.current),u=(0,n.useCallback)((t=>{o.current=t,i.setItem(e,t)}),[e,i]);return(0,r.Ij)((()=>{o.current instanceof Error&&u(t)}),[t,u]),(0,n.useEffect)((()=>{const t=i.getEvents(),n=i.getItem(e);return n instanceof Error||c(n),t.addListener(s.r.UPDATE,(t=>{t.data.key===e&&(o.current=t.data.value,c(t.data.value))}))}),[e,i]),[l,u]}},76108:(e,t,i)=>{"use strict";i.d(t,{Cb:()=>o,UG:()=>s});var n=i(24848),r=i.n(n),a=i(23483);let s=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&&m.encode(e.upsellLink,t.uint32(34).fork()).ldelim(),void 0!==e.engagement&&p.encode(e.engagement,t.uint32(50).fork()).ldelim(),void 0!==e.multiPass&&v.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&&g.encode(e.freeCheckout,t.uint32(98).fork()).ldelim(),void 0!==e.consumptionCapped&&f.encode(e.consumptionCapped,t.uint32(106).fork()).ldelim(),void 0!==e.prompt&&b.encode(e.prompt,t.uint32(42).fork()).ldelim(),!1!==e.isUserMemberOfAtLeastOneGroup&&t.uint32(64).bool(e.isUserMemberOfAtLeastOneGroup),t.uint32(82).fork();for(const i of e.unlockedBy)t.int32(i);t.ldelim(),t.uint32(114).fork();for(const i of e.unlockingMethods)t.int32(i);return t.ldelim(),void 0!==e.signifier&&l.encode(e.signifier,t.uint32(122).fork()).ldelim(),t},decode(e,t){const i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={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(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.none=d.decode(i,i.uint32());continue;case 2:if(18!==e)break;a.legacy=u.decode(i,i.uint32());continue;case 3:if(26!==e)break;a.basic=c.decode(i,i.uint32());continue;case 4:if(34!==e)break;a.upsellLink=m.decode(i,i.uint32());continue;case 6:if(50!==e)break;a.engagement=p.decode(i,i.uint32());continue;case 9:if(74!==e)break;a.multiPass=v.decode(i,i.uint32());continue;case 11:if(90!==e)break;a.checkoutOnWebOverlay=h.decode(i,i.uint32());continue;case 12:if(98!==e)break;a.freeCheckout=g.decode(i,i.uint32());continue;case 13:if(106!==e)break;a.consumptionCapped=f.decode(i,i.uint32());continue;case 5:if(42!==e)break;a.prompt=b.decode(i,i.uint32());continue;case 8:if(64!==e)break;a.isUserMemberOfAtLeastOneGroup=i.bool();continue;case 10:if(80===e){a.unlockedBy.push(i.int32());continue}if(82===e){const e=i.uint32()+i.pos;for(;i.pos<e;)a.unlockedBy.push(i.int32());continue}break;case 14:if(112===e){a.unlockingMethods.push(i.int32());continue}if(114===e){const e=i.uint32()+i.pos;for(;i.pos<e;)a.unlockingMethods.push(i.int32());continue}break;case 15:if(122!==e)break;a.signifier=l.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>o.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?m.fromPartial(e.upsellLink):void 0,t.engagement=void 0!==e.engagement&&null!==e.engagement?p.fromPartial(e.engagement):void 0,t.multiPass=void 0!==e.multiPass&&null!==e.multiPass?v.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?g.fromPartial(e.freeCheckout):void 0,t.consumptionCapped=void 0!==e.consumptionCapped&&null!==e.consumptionCapped?f.fromPartial(e.consumptionCapped):void 0,t.prompt=void 0!==e.prompt&&null!==e.prompt?b.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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={text:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.text=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={title:"",body:"",cta:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.title=i.string();continue;case 2:if(18!==e)break;a.body=i.string();continue;case 3:if(26!==e)break;a.cta=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={};for(;i.pos<n;){const e=i.uint32();if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>u.fromPartial(e??{}),fromPartial:e=>({})};const d={encode:(e,t=r().Writer.create())=>t,decode(e,t){const i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={};for(;i.pos<n;){const e=i.uint32();if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>d.fromPartial(e??{}),fromPartial:e=>({})};const m={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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={title:"",body:"",cta:"",url:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.title=i.string();continue;case 2:if(18!==e)break;a.body=i.string();continue;case 3:if(26!==e)break;a.cta=i.string();continue;case 4:if(34!==e)break;a.url=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>m.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 p={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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={header:"",title:"",body:"",cta:"",dismiss:"",actionType:"",bodySecondary:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.header=i.string();continue;case 2:if(18!==e)break;a.title=i.string();continue;case 3:if(26!==e)break;a.body=i.string();continue;case 4:if(34!==e)break;a.cta=i.string();continue;case 5:if(42!==e)break;a.dismiss=i.string();continue;case 6:if(50!==e)break;a.actionType=i.string();continue;case 7:if(58!==e)break;a.bodySecondary=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>p.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&&a.ZC.encode(e.price,t.uint32(42).fork()).ldelim(),!1!==e.isPriceDisplayed&&t.uint32(48).bool(e.isPriceDisplayed),t),decode(e,t){const i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const s={cta:"",snackbarSuccess:"",snackbarError:"",snackbarFulfilmentComplete:"",price:void 0,isPriceDisplayed:!1};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;s.cta=i.string();continue;case 2:if(18!==e)break;s.snackbarSuccess=i.string();continue;case 3:if(26!==e)break;s.snackbarError=i.string();continue;case 4:if(34!==e)break;s.snackbarFulfilmentComplete=i.string();continue;case 5:if(42!==e)break;s.price=a.ZC.decode(i,i.uint32());continue;case 6:if(48!==e)break;s.isPriceDisplayed=i.bool();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return s},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?a.ZC.fromPartial(e.price):void 0,t.isPriceDisplayed=e.isPriceDisplayed??!1,t}};const g={encode:(e,t=r().Writer.create())=>(""!==e.snackbarAwaitingFulfilment&&t.uint32(10).string(e.snackbarAwaitingFulfilment),t),decode(e,t){const i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={snackbarAwaitingFulfilment:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.snackbarAwaitingFulfilment=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>g.fromPartial(e??{}),fromPartial(e){const t={snackbarAwaitingFulfilment:""};return t.snackbarAwaitingFulfilment=e.snackbarAwaitingFulfilment??"",t}};const f={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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={title:"",body:"",cta:"",ctaUrl:void 0,dismiss:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.title=i.string();continue;case 2:if(18!==e)break;a.body=i.string();continue;case 3:if(26!==e)break;a.cta=i.string();continue;case 4:if(34!==e)break;a.ctaUrl=i.string();continue;case 5:if(42!==e)break;a.dismiss=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>f.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 v={encode(e,t=r().Writer.create()){""!==e.title&&t.uint32(10).string(e.title),""!==e.soaDescription&&t.uint32(18).string(e.soaDescription);for(const i of e.soaPartner)y.encode(i,t.uint32(26).fork()).ldelim();return t},decode(e,t){const i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={title:"",soaDescription:"",soaPartner:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.title=i.string();continue;case 2:if(18!==e)break;a.soaDescription=i.string();continue;case 3:if(26!==e)break;a.soaPartner.push(y.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>v.fromPartial(e??{}),fromPartial(e){const t={title:"",soaDescription:"",soaPartner:[]};return t.title=e.title??"",t.soaDescription=e.soaDescription??"",t.soaPartner=e.soaPartner?.map((e=>y.fromPartial(e)))||[],t}};const y={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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={displayName:"",linkUrl:"",logoUrl:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.displayName=i.string();continue;case 2:if(18!==e)break;a.linkUrl=i.string();continue;case 3:if(26!==e)break;a.logoUrl=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>y.fromPartial(e??{}),fromPartial(e){const t={displayName:"",linkUrl:"",logoUrl:""};return t.displayName=e.displayName??"",t.linkUrl=e.linkUrl??"",t.logoUrl=e.logoUrl??"",t}};const b={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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={title:"",body:"",cta:"",url:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.title=i.string();continue;case 2:if(18!==e)break;a.body=i.string();continue;case 3:if(26!==e)break;a.cta=i.string();continue;case 4:if(34!==e)break;a.url=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>b.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}}},23483:(e,t,i)=>{"use strict";i.d(t,{ZC:()=>s});var n=i(24848),r=i.n(n);const a={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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={amount:0,currency:"",formattedPrice:""};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(9!==e)break;a.amount=i.double();continue;case 2:if(18!==e)break;a.currency=i.string();continue;case 3:if(26!==e)break;a.formattedPrice=i.string();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},create:e=>a.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 s={encode:(e,t=r().Writer.create())=>(void 0!==e.finalPrice&&a.encode(e.finalPrice,t.uint32(10).fork()).ldelim(),void 0!==e.finalListPrice&&a.encode(e.finalListPrice,t.uint32(18).fork()).ldelim(),t),decode(e,t){const i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const s={finalPrice:void 0,finalListPrice:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;s.finalPrice=a.decode(i,i.uint32());continue;case 2:if(18!==e)break;s.finalListPrice=a.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return s},create:e=>s.fromPartial(e??{}),fromPartial(e){const t={finalPrice:void 0,finalListPrice:void 0};return t.finalPrice=void 0!==e.finalPrice&&null!==e.finalPrice?a.fromPartial(e.finalPrice):void 0,t.finalListPrice=void 0!==e.finalListPrice&&null!==e.finalListPrice?a.fromPartial(e.finalListPrice):void 0,t}}},80359:(e,t,i)=>{"use strict";i.d(t,{v:()=>n});const n=(0,i(33655).u)("OfflineAPI")},49062:(e,t,i)=>{"use strict";i.d(t,{I:()=>r,p:()=>a});var n=i(88485);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 a extends n.V{}},40523:(e,t,i)=>{"use strict";i.d(t,{I:()=>l});var n=i(25828),r=i(36485),a=i(28004),s=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}(s||{});const o=(0,n.g)(s);function l(e){if(o(e))switch(e){case s.Unknown:return a.bq.UNKNOWN;case s.Computer:return a.bq.COMPUTER;case s.Tablet:return a.bq.TABLET;case s.Smartphone:return a.bq.SMARTPHONE;case s.Speaker:return a.bq.SPEAKER;case s.TV:return a.bq.TV;case s.AVR:return a.bq.AVR;case s.STB:return a.bq.STB;case s.AudioDongle:return a.bq.AUDIO_DONGLE;case s.GameConsole:return a.bq.GAME_CONSOLE;case s.CastVideo:return a.bq.CAST_VIDEO;case s.CastAudio:return a.bq.CAST_AUDIO;case s.Automobile:return a.bq.AUTOMOBILE;case s.Smartwatch:return a.bq.SMARTWATCH;case s.Chromebook:return a.bq.CHROMEBOOK;case s.UnknownSpotifyHardware:return a.bq.UNKNOWN;case s.CarThing:return a.bq.CarThing;case s.HomeThing:return a.bq.HomeThing;default:return(0,r.k)(e),a.bq.UNKNOWN}return a.bq.UNKNOWN}},64820:(e,t,i)=>{"use strict";i.d(t,{X:()=>r});var n=i(85065);function r(e){return[n.kw.YES,n.kw.DOWNLOADING,n.kw.WAITING].includes(e)}},16972:(e,t,i)=>{"use strict";i.d(t,{T:()=>o});var n=i(30758),r=i(49062),a=i(95742),s=i(11926);function o(e){const t=(0,s.B)(),[i,o]=(0,n.useState)(t.getAvailabilitySync(e)),l=r.I.UPDATE_AVAILABILITY,c=(0,n.useCallback)((t=>{t.data.uri===e&&o(t.data.availability)}),[e]);return(0,a.b)(l,c,{uri:e}),i}},58302:(e,t,i)=>{"use strict";i.d(t,{$:()=>l});var n=i(30758),r=i(11926),a=i(16972),s=i(49062),o=i(95742);function l(e,t=!0){const i=(0,r.B)(),l=function(e,t=!0){const i=(0,r.B)(),[a,l]=(0,n.useState)(i.getCapabilities().canDownload(e,t)),c=s.I.UPDATE_CAPABILITIES,u=(0,n.useCallback)((i=>l(i.data.capabilites.canDownload(e,t))),[e,t]);return(0,o.b)(c,u),a}(e,t);return{capability:l,availability:(0,a.T)(e),addDownload:(0,n.useCallback)((()=>i.addDownload(e)),[i,e]),removeDownload:(0,n.useCallback)((()=>i.removeDownload(e)),[i,e])}}},24679:(e,t,i)=>{"use strict";i.d(t,{e:()=>s});var n=i(30758),r=i(49062),a=i(95742);function s(e){const[t,i]=(0,n.useState)({syncing:!1,percentage:0,totalItems:0,currentItem:0}),s=r.I.UPDATE_CONTEXT_PROGRESS,o=(0,n.useCallback)((t=>{t.data.uri===e&&i(t.data.progress)}),[e]);return(0,a.b)(s,o,{uri:e}),t}},11926:(e,t,i)=>{"use strict";i.d(t,{B:()=>a});var n=i(80359),r=i(60102);function a(){return(0,r.N)(n.v)}},95742:(e,t,i)=>{"use strict";i.d(t,{b:()=>s});var n=i(30758),r=i(11926),a=i(61272);function s(e,t,i){const s=(0,r.B)(),o=(0,a.lB)((()=>i),[i]);(0,n.useEffect)((()=>s.getEvents().addListener(e,t,o)),[e,t,o,s])}},85065:(e,t,i)=>{"use strict";i.d(t,{NV:()=>s,O4:()=>o,kw:()=>a,uJ:()=>n,vs:()=>r});let n=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}({}),a=function(e){return e.NO="no",e.YES="yes",e.DOWNLOADING="downloading",e.WAITING="waiting",e}({}),s=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}({})},46545:(e,t,i)=>{"use strict";i.d(t,{C:()=>n,x:()=>r});i(28360);function n(e,t={}){try{const i=document.getElementById(e);return i?JSON.parse(i.innerHTML):t}catch{return t}}function r(e,t={}){try{const n=document.getElementById(e);return n?JSON.parse((i=n.innerHTML,decodeURIComponent(Array.prototype.map.call(atob(i),(function(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`})).join("")))):t}catch{return t}var i}},39683:(e,t,i)=>{"use strict";i.d(t,{Ek:()=>a});i(70966);var n=i(65835);const r=/Spotify\/(?<version>.+)\s/;function a(){return function(){if(window.navigator.userAgent.match(r))return n.m.Desktop;const e="serviceWorker"in window.navigator,t=window.matchMedia("(display-mode: standalone)").matches,i="Windows"in window;return e&&(t||i)?n.m.PWA:n.m.Web}()===n.m.Desktop}},70966:(e,t,i)=>{"use strict";i.d(t,{D:()=>s,f:()=>o});var n=i(9856),r=i.n(n),a=i(65835);function s(){const e=r().parse(window.navigator.userAgent).os.name;return"macOS"===e?a.f.macOS:"Windows"===e?a.f.Windows:"Linux"===e?a.f.Linux:"Chrome OS"===e?a.f.ChromeOS:a.f.Other}function o(){return r().getParser(window.navigator.userAgent).getOSName()||"not_applicable"}},15443:(e,t,i)=>{"use strict";i.d(t,{k:()=>a});var n=i(9856),r=i.n(n);function a(){return"Microsoft Edge"===r().parse(window.navigator.userAgent).browser.name}},27564:(e,t,i)=>{"use strict";i.d(t,{X:()=>r});const n=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<=n}},20167:(e,t,i)=>{"use strict";function n(e=window.navigator.userAgent){return e.includes("OculusBrowser")}i.d(t,{g:()=>n})},2976:(e,t,i)=>{"use strict";i.d(t,{n:()=>a});var n=i(9856),r=i.n(n);function a(){return"Safari"===r().parse(window.navigator.userAgent).browser.name}},65835:(e,t,i)=>{"use strict";i.d(t,{f:()=>r,m:()=>n});let n=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}({})},98320:(e,t,i)=>{"use strict";i.d(t,{Ak:()=>s,M4:()=>r,UT:()=>a});var n=i(33655);const r="audio.saved-devices",a="audio.disable-normalization-override",s=(0,n.u)("PlaybackFiltersAPI")},91815:(e,t,i)=>{"use strict";i.d(t,{G:()=>a,n:()=>r});var n=i(88485);let r=function(e){return e.UPDATE="update",e.NORMALIZATION_OVERRIDE_DISABLED="normalizationOverrideDisabled",e}({});class a extends n.V{}},77527:(e,t,i)=>{"use strict";i.d(t,{M:()=>r,N:()=>a});var n=i(30758);const r=(0,n.createContext)(null);function a(){const e=(0,n.useContext)(r);if(null===e)throw new Error("Trying to use 'PlaybackFiltersContext' without 'PlaybackFiltersProvider'!");return e}},55101:(e,t,i)=>{"use strict";i.d(t,{G:()=>a});var n=i(30758),r=i(77527);function a(e,t){const i=(0,n.useRef)(t),a=(0,r.N)();i.current=t,(0,n.useEffect)((()=>{const t=a.getFiltersEvents();return t?.addListener(e,(e=>{i.current(e)}))}),[e,a])}},52359:(e,t,i)=>{"use strict";i.d(t,{B:()=>n});const n=(0,i(33655).u)("PlaybackAPI")},92838:(e,t,i)=>{"use strict";i.d(t,{T:()=>a,_:()=>r});var n=i(88485);let r=function(e){return e.VOLUME="volume",e.INFO="info",e}({});class a extends n.V{}},88784:(e,t,i)=>{"use strict";i.d(t,{p:()=>a});var n=i(52359),r=i(60102);function a(){return(0,r.N)(n.B)}},64592:(e,t,i)=>{"use strict";i.d(t,{F:()=>a});var n=i(30758),r=i(88784);function a(e,t){const i=(0,n.useRef)(t),a=(0,r.p)();i.current=t,(0,n.useEffect)((()=>a.getEvents().addListener(e,(e=>{i.current(e)}))),[e,a])}},9580:(e,t,i)=>{"use strict";i.d(t,{n:()=>o});var n=i(30758),r=i(92838),a=i(88784),s=i(64592);function o(){const e=(0,a.p)(),[t,i]=(0,n.useState)(-1);(0,n.useEffect)((()=>{let t=!0;return(async()=>{const n=await e.getVolume();t&&i(n)})(),()=>{t=!1}}),[e]),(0,s.F)(r._.VOLUME,(e=>i(e.data.volume)));return{volume:t,setVolume:(0,n.useCallback)((t=>{i(t),e.setVolume(t)}),[e]),raiseVolume:(0,n.useCallback)((()=>e.raiseVolume()),[e]),lowerVolume:(0,n.useCallback)((()=>e.lowerVolume()),[e])}}},61358:(e,t,i)=>{"use strict";i.d(t,{Lc:()=>m});var n=i(61544),r=i(79787),a=i(71817),s=i(36485),o=i(15742);i(8385);const l=Spicetify.GraphQL.Definitions["decorateContextEpisodesOrChapters"]=new o.l("decorateContextEpisodesOrChapters","query","8b8d939c5d6da65a3f1b9fbaa96106b27fd6ff1ae7205846d9de3ffbee3298ee",null),c=Spicetify.GraphQL.Definitions["decorateContextTracks"]=new o.l("decorateContextTracks","query","8b8d939c5d6da65a3f1b9fbaa96106b27fd6ff1ae7205846d9de3ffbee3298ee",null);var u=i(19617);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 m(e,t,i){const o=Array.from(new Set(i.map((e=>e.uri)).filter((e=>!t.has(e))))),m=o.filter((e=>(0,n.U_)(e))),p=o.filter((e=>(0,n.gH)(e))),[h,g]=await Promise.all([m.length>0?e(c,{uris:m},["uris"]):Promise.resolve([]),p.length>0?e(l,{uris:p},["uris"]):Promise.resolve([])]);return[...h.reduce(((e,t)=>e.concat(t.tracks??[])),[]),...g.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:a.c.TRACK,uri:e.uri,name:e.name,mediaType:"audio",duration:{milliseconds:e.duration.totalMilliseconds},album:{type:a.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:a.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.associations?.associatedVideos?.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:a.c.EPISODE,uri:e.uri,name:e.name??"",mediaType:d(e.mediaTypes),duration:{milliseconds:e.duration.totalMilliseconds},show:{type:a.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:a.c.CHAPTER,uri:e.uri,name:e.name??"",mediaType:d(e.mediaTypes),duration:{milliseconds:e.duration.totalMilliseconds},book:{type:a.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,s.k)(e),null))).forEach((e=>{null!==e&&t.set(e.uri,e)})),i.map((e=>({...e,...t.get(e.uri),uid:e.uid,provider:e.provider})))}},51135:(e,t,i)=>{"use strict";i.d(t,{H:()=>n});const n=(0,i(33655).u)("PlayerAPI");Error},55109:(e,t,i)=>{"use strict";i.d(t,{K7:()=>a,Z9:()=>r,bt:()=>l,q3:()=>o});let n=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}({}),a=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 s extends Error{constructor(e,t,i,n=void 0){super(s.getMessage(t,i,n)),this.type=e,this.code=t,this.reasons=i,this.cause=n}static getMessage(e,t,i=void 0){return t.length>0?`Code '${e}' with reasons '${t.join(", ")}'`:void 0!==i?`Code '${e}' with cause '${i.name}: ${i.message}'`:`Code '${e}'`}}class o extends s{constructor(e,t,i=void 0){super(n.TRANSIENT,e,t,i)}}class l extends s{constructor(e,t,i=void 0){super(n.PERSISTENT,e,t,i)}}},72814:(e,t,i)=>{"use strict";i.d(t,{Ik:()=>a,JW:()=>o,UC:()=>s,gd:()=>r});var n=i(88485);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}({}),a=function(e){return e.PLAY="play",e.PAUSE="pause",e.RESUME="resume",e.SKIP_TO_NEXT="skipToNext",e.SKIP_TO_PREVIOUS="skipToPrevious",e}({}),s=function(e){return e.ADD="add",e.REMOVE="remove",e.CLEAR="clear",e.INSERT="insert",e.REORDER="reorder",e}({});class o extends n.V{emitPlaySync(e,t,i){const{defaultPrevented:n}=this.emitSync(r.ACTION,{action:a.PLAY,context:e,origin:t,options:i});return n}emitPauseSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:a.PAUSE});return e}emitResumeSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:a.RESUME});return e}emitSkipToNextSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:a.SKIP_TO_NEXT});return e}emitSkipToPreviousSync(){const{defaultPrevented:e}=this.emitSync(r.ACTION,{action:a.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)}}},65881:(e,t,i)=>{"use strict";i.d(t,{F7:()=>a,Ue:()=>o,ds:()=>s});var n=i(63462),r=i(84640);function a(e){return`Partner spotify ${e}`}function s(e,t){return(0,n.Wq)({transport:e,...t})}function o(e,t){return s((0,r.V)(),{platform_identifier:t||a("desktop"),config:e,autoActivateElement:!0})}},42582:(e,t,i)=>{"use strict";i.d(t,{P:()=>d});var n=i(30758),r=i(36485),a=i(99744),s=i(2817),o=i(85993);function l(e,t,i,n,a,o){switch(t){case s.i.NOT_ACTIVE:o?o():e.play(i,n,a);break;case s.i.PLAYING:e.pause();break;case s.i.PAUSED:e.resume();break;default:(0,r.d)(t)}}function c(e,t,i,r,a,s){const c=(0,n.useRef)(s);c.current=s;const{playbackStatus:u,isActive:d,isPlaying:m}=(0,o.t6)({contextURI:t.current.uri,...r.current,...s}),p=(0,n.useCallback)(((n,s)=>{s?s():e.play(t.current,i.current,{...a.current,...n,skipTo:{...r.current,...c.current}})}),[e,t,i,a,r]),h=(0,n.useCallback)(((n,s)=>{l(e,u,t.current,i.current,{...a.current,...n,skipTo:{...r.current,...c.current}},s)}),[e,u,t,i,a,r]);return{playbackStatus:u,isActive:d,isPlaying:m,triggerPlay:p,togglePlay:h}}function u(e,t,i,r,a){const[s,u]=function(e,t,i){return e.getCapabilities().canPlayMultipleContextPages||void 0===i.pageURI?[t,i]:[{current:{uri:i.pageURI,metadata:t.current.metadata}},{pageURI:i.pageURI,pageIndex:0}]}(e,t,a),d=(0,n.useRef)(u);d.current=u;const{playbackStatus:m,isActive:p,isPlaying:h}=(0,o.ke)({contextURI:s.current.uri,pageIndex:u.pageIndex,pageURI:u.pageURI}),g=(0,n.useMemo)((()=>c.bind(null,e,s,i,d,r)),[e,s,i,r]),f=(0,n.useCallback)(((t,n)=>{n?n():e.play(s.current,i.current,{...r.current,...t,skipTo:d.current})}),[e,s,i,r]),v=(0,n.useCallback)(((t,n)=>{l(e,m,s.current,i.current,{...r.current,...t,skipTo:d.current},n)}),[e,m,s,i,r]);return{playbackStatus:m,isActive:p,isPlaying:h,triggerPlay:f,togglePlay:v,usePlayContextItem:g}}function d(e,t,i){const r=(0,a.z)(),s={...t,referrerIdentifier:t.referrerIdentifier??r.getReferrer()},d=(0,n.useRef)(e),m=(0,n.useRef)(s),p=(0,n.useRef)(i);d.current=e,m.current=s,p.current=i;const{playbackStatus:h,isActive:g,isPlaying:f}=(0,o.l_)(e.uri),v=(0,n.useMemo)((()=>u.bind(null,r,d,m,p)),[r]),y=(0,n.useMemo)((()=>c.bind(null,r,d,m,{current:null},p)),[r]),b=(0,n.useCallback)(((e,t)=>{r.play(t??d.current,m.current,{...p.current,...e})}),[r]),_=(0,n.useCallback)(((e,t)=>{l(r,h,t??d.current,m.current,{...p.current,...e})}),[r,h]);return{playbackStatus:h,isActive:g,isPlaying:f,triggerPlay:b,togglePlay:_,usePlayContextPage:v,usePlayContextItem:y}}},99744:(e,t,i)=>{"use strict";i.d(t,{z:()=>a});var n=i(51135),r=i(60102);function a(){return(0,r.N)(n.H)}},31923:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(40937),r=i(2435);const a=()=>(0,r.o)((e=>e?.playbackQuality.bitrateLevel??n.Yn.UNKNOWN))},54164:(e,t,i)=>{"use strict";i.d(t,{V:()=>u});var n=i(67275),r=i(99744),a=i(2435),s=i(10132),o=i(81987),l=i(62943);const c=(e,t)=>e===l._9.ESPERANTO?t?.speedEsperanto??0:t?.speed??0;function u(){const e=(0,r.z)(),t=(0,o.NC)(l.hd);return{...(0,a.o)((e=>({shuffle:e?.shuffle??!1,repeat:e?.repeat??n.p.REPEAT_NONE,speed:c(t,e),canToggleShuffle:e?.restrictions.canToggleShuffle??!1,canToggleRepeatContext:e?.restrictions.canToggleRepeatContext??!1,canToggleRepeatTrack:e?.restrictions.canToggleRepeatTrack??!1})),s.a),canChangeSpeed:e.getCapabilities().canChangeSpeed,setShuffle:e.setShuffle.bind(e),setRepeat:e.setRepeat.bind(e),setSpeed:e.setSpeed.bind(e)}}},19936:(e,t,i)=>{"use strict";i.d(t,{p:()=>s});var n=i(30758),r=i(99744),a=i(59744);function s(e,t){const i=(0,n.useRef)(t),s=(0,r.z)(),o=(0,a.a)();(0,n.useLayoutEffect)((()=>{i.current=t})),(0,n.useEffect)((()=>s.getEvents().addListener(e,(e=>{o()&&i.current(e)}))),[e,o,s])}},94313:(e,t,i)=>{"use strict";i.d(t,{S:()=>c,f:()=>u});var n=i(30758),r=i(53830),a=i(2435),s=i(60656);const o=()=>!0;function l(e,t=o,i){const r=(0,s.ox)(),l=(0,a.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,n.useState)((()=>null===l||t(l)?i(l)??0:0)),[d,m]=(0,n.useState)(!1),[p,h]=(0,n.useState)(null),g=(0,n.useCallback)((()=>{m(!0),setTimeout((()=>m(!1)),Math.floor(1e3/60))}),[]),f=(0,n.useCallback)((e=>{h(e),g()}),[g]),v=(0,n.useRef)(t);return v.current=t,(0,n.useEffect)((()=>{(null===l||v.current(l))&&(u(i(l)??0),l?.isPaused?m(!0):g())}),[l,i,g]),(0,n.useEffect)((()=>{l?.isPaused||l?.isBuffering||(h(null),g())}),[l?.timestamp,l?.isPaused,l?.isBuffering,g]),(0,n.useEffect)((()=>{let t=!0;if(null===l||!l.hasContext||l.isPaused||!v.current(l))return()=>{};u(i(l)??0),m(!0);const n=r?.setInterval((()=>{if(t){const e=i(l);u(e??0),m(!1)}}),e);return()=>{t=!1,null!==n&&r?.clearInterval(n)}}),[r,l,e,i]),[p??c,f,d]}function c(e,t=o){return l(e,t,r.s)}function u(e,t=o){return l(e,t,r.F)}},85993:(e,t,i)=>{"use strict";i.d(t,{GK:()=>d,gC:()=>s,ke:()=>l,l_:()=>o,t6:()=>u,te:()=>c});var n=i(2817),r=i(72055),a=i(2435);function s(e){const t=(0,a.o)(e);return{playbackStatus:t,isActive:t!==n.i.NOT_ACTIVE,isPlaying:t===n.i.PLAYING}}function o(e){return s((t=>(0,r.yc)(t,e)))}function l(e){return s((t=>(0,r.dt)(t,e)))}function c(e){return s((t=>(0,r.Ok)(t,e)))}function u(e){return s((t=>(0,r.cA)(t,e)))}function d(){return s((e=>(0,r.uW)(e)))}},95235:(e,t,i)=>{"use strict";i.d(t,{w:()=>o});var n=i(30758),r=i(72814),a=i(99744),s=i(19936);function o(){const e=(0,a.z)(),[t,i]=(0,n.useState)(e.getQueue());return(0,s.p)(r.gd.QUEUE_UPDATE,(e=>i(e.data))),t}},26440:(e,t,i)=>{"use strict";i.d(t,{p:()=>c});var n=i(30758),r=i(71817),a=i(99744),s=i(2435);const o=5e3,l=15e3;function c(){const e=(0,a.z)(),t=function(e){return e===r.c.TRACK?o:e===r.c.EPISODE?l:0}((0,s.o)((e=>e?.item?.type)));return{seekBackward:(0,n.useCallback)((()=>(0!==t&&e.seekBackward(t),t)),[e,t]),seekForward:(0,n.useCallback)((()=>(0!==t&&e.seekForward(t),t)),[e,t]),seekOffsetMs:t}}},2435:(e,t,i)=>{"use strict";i.d(t,{o:()=>o});var n=i(30758),r=i(72814),a=i(99744),s=i(19936);function o(e,t=((e,t)=>e===t)){const i=(0,a.z)().getState(),[o,l]=(0,n.useState)(e(i));return(0,s.p)(r.gd.UPDATE,(i=>{const n=e(i.data);t(o,n)||l(n)})),o}},50486:(e,t,i)=>{"use strict";i.d(t,{f:()=>c});var n=i(94961),r=i(2435),a=i(10132),s=i(61544),o=i(11808);function l(e){if(e?.metadata?.[n.W.CONTEXT_DESCRIPTION])return e.metadata[n.W.CONTEXT_DESCRIPTION];const t=(0,s.o_)(e?.uri);if(t?.type===s.NQ.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)})),a.a)}},94961:(e,t,i)=>{"use strict";i.d(t,{I:()=>r,W:()=>n});let n=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}({})},41753:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});let n=function(e){return e.SWITCH_TO_VIDEO="switch-to-video",e.SWITCH_TO_AUDIO="switch-to-audio",e.JUMP="jump",e}({})},40937:(e,t,i)=>{"use strict";i.d(t,{Yn:()=>n,ZT:()=>r,p4:()=>a});let n=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}({}),a=function(e){return e[e.NONE=0]="NONE",e[e.OFF=1]="OFF",e[e.ON=2]="ON",e}({})},2817:(e,t,i)=>{"use strict";i.d(t,{i:()=>n});let n=function(e){return e[e.NOT_ACTIVE=0]="NOT_ACTIVE",e[e.PLAYING=1]="PLAYING",e[e.PAUSED=2]="PAUSED",e}({})},67275:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});let n=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}({})},43425:(e,t,i)=>{"use strict";i.d(t,{D:()=>n});const n=["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"]},63135:(e,t,i)=>{"use strict";i.d(t,{N:()=>r});var n=i(71817);function r(e){return e?.type===n.c.AD}},82101:(e,t,i)=>{"use strict";i.d(t,{d:()=>r});var n=i(71817);function r(e){return e?.type===n.c.CHAPTER}},95421:(e,t,i)=>{"use strict";i.d(t,{p:()=>r});var n=i(71817);function r(e){return e?.type===n.c.EPISODE}},67403:(e,t,i)=>{"use strict";i.d(t,{F:()=>r});var n=i(41753);const r=(0,i(25828).g)(n.L)},95339:(e,t,i)=>{"use strict";i.d(t,{v:()=>r});var n=i(71817);function r(e){return e?.type===n.c.TRACK}},46159:(e,t,i)=>{"use strict";i.d(t,{v:()=>r});var n=i(71817);function r(e){return e?.type===n.c.UNKNOWN}},53830:(e,t,i)=>{"use strict";function n(e,t){if(null===e||null===t||null===e.duration)return null;const{timestamp:i,duration:n,speed:r,hasContext:a,isPaused:s,isBuffering:o}=e;if(!a||s||o)return t;const l=(Date.now()-i)*(r??0);return Math.min(t+l,n)}function r(e){return n(e,e?.positionAsOfTimestamp??null)}function a(e){const t=parseInt(e?.item?.metadata?.["segment.position_as_of_timestamp"]??"",10),i=e?.positionAsOfTimestamp??null;return n(e,isNaN(t)?i:t)}i.d(t,{F:()=>a,s:()=>r})},64642:(e,t,i)=>{"use strict";i.d(t,{C:()=>a});var n=i(36485),r=i(35583);const a=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,n.k)(e),!1}}},87220:(e,t,i)=>{"use strict";function n(e){const t=e?.uri;return Boolean(t)&&""!==t&&"invalid_context_uri"!==t}i.d(t,{O:()=>n})},72055:(e,t,i)=>{"use strict";i.d(t,{A3:()=>_,Ok:()=>y,Q3:()=>E,b8:()=>m,cA:()=>b,dt:()=>v,uW:()=>g,yc:()=>f});var n=i(61544),r=i(94961),a=i(63135),s=i(95421),o=i(95339),l=i(2817),c=i(40937),u=i(71817),d=i(36485);function m(e,t){const i=(0,n.o_)(e,{parseUnknown:!0}),r=(0,n.o_)(t,{parseUnknown:!0});return!(!i||!r)&&((0,n.B2)(i,r)??!1)}function p(e){return"queue"===e?.provider}function h(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 f(e,t){return null===e?l.i.NOT_ACTIVE:(!p(e.item)&&(i=e.item,"autoplay"!==i?.provider)||h(e.item,t??null))&&(m(e.context.uri,t??null)||m(e.index?.pageURI??null,t??null)||m(e.item?.uri??null,e.context.uri??null)&&h(e.item,t??null))?g(e):l.i.NOT_ACTIVE;var i}function v(e,{contextURI:t,pageIndex:i,pageURI:n}){if(null===e)return l.i.NOT_ACTIVE;if(p(e.item)&&!h(e.item,n??null))return l.i.NOT_ACTIVE;if(m(e.context.uri,t??null)){if(r=e.index.pageIndex??null,a=i??null,null!==r&&null!==a&&r===a)return g(e);if(m(e.index.pageURI??null,n??null))return g(e)}var r,a;return m(e.context.uri,n??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 b(e,t){if(null===e)return l.i.NOT_ACTIVE;let i=function(e,t){if(!p(e.item))return l.i.NOT_ACTIVE;const{item:i}=e;if(m(i.uri,t.uri??null)){if(h(i,t.contextURI??null))return g(e);if(h(i,t.pageURI??null))return g(e)}return l.i.NOT_ACTIVE}(e,t);return i!==l.i.NOT_ACTIVE?i:(i=f(e,t.contextURI),i===l.i.NOT_ACTIVE&&(i=f(e,t.pageURI),i===l.i.NOT_ACTIVE)?l.i.NOT_ACTIVE:void 0!==t.uid?e.item?.uid===t.uid?i: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?i:l.i.NOT_ACTIVE:void 0!==t.index&&e.index.itemIndex===t.index?i:l.i.NOT_ACTIVE)}function _(e){const t=e?.item??void 0;if((0,o.v)(t)||(0,s.p)(t)||(0,a.N)(t)){return("video"===t.mediaType||"mixed"===t.mediaType)&&e?.playbackQuality.strategy!==c.ZT.OFFLINED_FILE}return!1}function E(e){return"true"===String(e?.context.metadata?.is_audiobook)}},96766:(e,t,i)=>{"use strict";i.d(t,{RU:()=>o,Ry:()=>s,jl:()=>a});var n=i(67275),r=i(71817);function a(e,t,i,n,r,a){const s=t.find((e=>n(i.after||i.before,e)));if(!s)return t;const o=[];e.forEach((e=>{const i=t.find((t=>n(e,t)));i&&o.push(i)}));const l=t.filter((e=>!o.includes(e))),c=o.map((e=>r(s)?a(e):e)),u=s?l.indexOf(s):0;return i.after?l.splice(u+1,0,...c):l.splice(u,0,...c),l}function s(e,t,i,n,r,a){const s=t.find((e=>n(i.after||i.before,e)));if(!s)return t;const o=e.map((e=>a(e,r(s)))),l=t.indexOf(s);return i.after?t.splice(l+1,0,...o):t.splice(l,0,...o),t}function o(e,t,i){if(0===e.length)return{current:null,queued:[],nextUp:[]};const a=t===n.p.REPEAT_CONTEXT&&i?2:1,s=[];let o=0;const l=e[0];for(let t=1;t<e.length;t++){const{type:i,uri:n,metadata:{hidden:l,availability_restrictions:c}={}}=e[t],u="spotify:delimiter"===n||"spotify:meta:delimiter"===n;if(u&&++o>=a)break;const d=n.startsWith("spotify:meta:"),m=i!==r.c.UNKNOWN&&c;d||u||"true"===l||m||s.push(e[t])}const c=s.findIndex((({provider:e})=>"queue"!==e));return{current:l,queued:-1===c?s:s.slice(0,c),nextUp:-1===c?[]:s.slice(c)}}},47769:(e,t,i)=>{"use strict";i.d(t,{f0:()=>a});const n="enhance",r="spotify-apply-lenses";function a(e,t){const i=new URL(e),a=new Set(i.searchParams.get(r)?.split(","));return t?a.add(n):a.delete(n),a.size?i.searchParams.set(r,[...a].join(",")):i.searchParams.delete(r),i.toString()}},72013:(e,t,i)=>{"use strict";i.d(t,{YB:()=>a,nw:()=>r,xB:()=>n});let n=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}({}),a=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}({})},31965:(e,t,i)=>{"use strict";i.d(t,{Jy:()=>a,Ki:()=>l,pW:()=>o,xp:()=>s});var n=i(33655),r=i(71817);function a(e){return e.type===r.c.TRACK}function s(e){return e.type===r.c.EPISODE}function o(e){return e.type===r.c.AUDIOBOOK}const l=(0,n.u)("PlaylistAPI")},14964:(e,t,i)=>{"use strict";i.d(t,{Lj:()=>a,Y0:()=>s,sP:()=>r});var n=i(88485);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}({}),a=function(e){return e.UPDATE="update",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class s extends n.V{}},14217:(e,t,i)=>{"use strict";i.d(t,{O:()=>n});const n=(0,i(33655).u)("PlaylistPermissionsAPI")},70672:(e,t,i)=>{"use strict";i.d(t,{GV:()=>a,KD:()=>s,mA:()=>r});var n=i(88485);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}({}),a=function(e){return e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class s extends n.V{emitOperationSync(e){return this.emitSync(a.OPERATION,e).defaultPrevented}emitOperationComplete(e,t=null){this.emit(a.OPERATION_COMPLETE,{...e,error:t})}}},47327:(e,t,i)=>{"use strict";i.d(t,{Af:()=>a,Yi:()=>l,nw:()=>s,sA:()=>r,xB:()=>o});var n=i(33655);i(90509);function r(e){return"folder"===e.type}function a(e){return"playlist"===e.type}let s=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,n.u)("RootlistAPI")},40814:(e,t,i)=>{"use strict";i.d(t,{OO:()=>s,tD:()=>a,ut:()=>r});var n=i(88485);let r=function(e){return e.ADD="add",e.MOVE="move",e.REMOVE="remove",e.CREATE_PLAYLIST="create_playlist",e}({}),a=function(e){return e.UPDATE="update",e.UPDATE_ITEM="update_item",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class s extends n.V{}},90509:(e,t,i)=>{"use strict";i.d(t,{QG:()=>n});function n(e){if(e)return"string"==typeof e?e.trim():e.value.trim()}},75612:(e,t,i)=>{"use strict";i.d(t,{a:()=>l});var n=i(39302),r=i(39692),a=i(97277);function s(e){return t=e,Object.prototype.hasOwnProperty.call(t,"uid")?{itemId:(0,a.xJ)(e.uid)}:{};var t}function o(e){const{before:t,after:i}=e;return"start"===t?{addFirst:!0}:void 0!==t?{addBeforeItem:{uri:(0,r.DY)(t.uri),attributes:s(t)}}:"end"===i?{addLast:!0}:void 0!==i?{addAfterItem:{uri:(0,r.DY)(i.uri),attributes:s(i)}}:{}}class l{_ops=[];_needsBaseRevision=!1;add(e,t,i=Date.now()){return this._ops.push({kind:n.H1.ADD,add:{...o(t),items:e.map((e=>({uri:e,attributes:{timestamp:i.toString()}})))}}),this}addByIndex(e,t,i,r=Date.now()){var a,s;return this._needsBaseRevision=!0,this._ops.push({kind:n.H1.ADD,add:{...(a=e,s=t,0===a?{addFirst:!0}:a>=s?{addLast:!0}:{fromIndex:a}),items:i.map((e=>({uri:e,attributes:{timestamp:r.toString()}})))}}),this}removeByIndex(e,t=1){return this._needsBaseRevision=!0,this._ops.push({kind:n.H1.REM,rem:{fromIndex:e,length:t}}),this}remove(e){return this._ops.push({kind:n.H1.REM,rem:{itemsAsKey:!0,items:e.map((e=>({uri:e.uri})))}}),this}move(e,t){return this._ops.push({kind:n.H1.MOV,mov:{items:e.map((e=>({uri:e.uri,attributes:s(e)}))),...o(t)}}),this}moveByIndex(e,t,i=1){return this._needsBaseRevision=!0,this._ops.push({kind:n.H1.MOV,mov:{fromIndex:e,toIndex:t,length:i}}),this}updateListAttributes(e){return this._ops.push({kind:n.H1.UPDATE_LIST_ATTRIBUTES,updateListAttributes:e}),this}updateItemAttributes(e){return this._ops.push({kind:n.H1.UPDATE_ITEM_ATTRIBUTES,updateItemAttributes:e}),this}buildDelta(){return{ops:this._ops,info:{source:{client:n.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:[]}}}},66787:(e,t,i)=>{"use strict";i.d(t,{N:()=>a});var n=i(17835),r=i(14964);class a extends r.Y0{constructor(){super(),this._aggregator=(0,n.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,i){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.ADD,uri:e,items:t,silent:i}).defaultPrevented}emitMoveSync(e,t){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.MOVE,uri:e,items:t}).defaultPrevented}emitRemoveSync(e,t,i){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.REMOVE,uri:e,items:t,silent:i}).defaultPrevented}emitUpdateSync(e,t){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.UPDATE,uri:e,details:t}).defaultPrevented}emitSendSignalSync(e,t,i){return this.emitSync(r.Lj.OPERATION,{operation:r.sP.SIGNAL,uri:e,itemId:i,signalIdentifier:t}).defaultPrevented}emitAddComplete(e,t=null,i=[],n){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.ADD,uri:e,uris:i,error:t,silent:n})}emitMoveComplete(e,t=null,i=[]){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.MOVE,uri:e,items:i,error:t})}emitRemoveComplete(e,t=null,i=[],n){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.REMOVE,uri:e,items:i,error:t,silent:n})}emitUpdateComplete(e,t=null,i={}){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.UPDATE,uri:e,details:i,error:t})}emitSendSignalComplete(e,t,i,n=null){this.emit(r.Lj.OPERATION_COMPLETE,{operation:r.sP.SIGNAL,uri:e,itemId:i,signalIdentifier:t,error:n})}}},55090:(e,t,i)=>{"use strict";i.d(t,{N4:()=>l,S1:()=>s,f5:()=>o});var n=i(38481),r=i(21632);const a=6048e5;async function s(e,t,i,s=a){const o=(0,r.m)(t);return(await e.build().withHost(n.ZJ).withMethod("POST").withPath(`/playlist/${o}/permission-grant`).withEndpointIdentifier("/playlist/{id}/permission-grant").withJsonContentType().withBody({permission:{permissionLevel:i},ttlMs:s}).withoutMarket().send()).body}async function o(e,t,i){const a=(0,r.m)(t);return(await e.build().withHost(n.ZJ).withMethod("POST").withPath(`/playlist/${a}/permission-grant/token/${i}/claim`).withEndpointIdentifier("/playlist/{id}/permission-grant/token/{token}/claim").withJsonContentType().withoutMarket().send()).body}async function l(e,t){const i=(0,r.m)(t);return(await e.build().withHost(n.ZJ).withMethod("GET").withPath(`/playlist/${i}/permission/base`).withEndpointIdentifier("/playlist/{id}/permission/base").withoutMarket().send()).body}},79425:(e,t,i)=>{"use strict";i.d(t,{D:()=>a});var n=i(40814),r=i(17835);class a extends n.OO{_numListeners=0;constructor(){super(),this._aggregator=(0,r.X)(this.onContainsItems.bind(this)),this.onAddListener(n.tD.UPDATE,(()=>{1==++this._numListeners&&this.subscribeToUpdates()})),this.onRemoveListener(n.tD.UPDATE,(()=>{0==--this._numListeners&&this.unsubscribeFromUpdates()})),this.onAddListener(n.tD.UPDATE_ITEM,(e=>{1==++this._numListeners&&this.subscribeToUpdates();const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(n.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,i)=>{this.emit(n.tD.UPDATE_ITEM,{uri:e,isInRootlist:Array.isArray(t)?t[i]:t})}))}emitCreatePlaylistSync(e,t,i){return this.emitSync(n.tD.OPERATION,{operation:n.ut.CREATE_PLAYLIST,name:e,position:t,silent:i}).defaultPrevented}emitAddSync(e,t,i){return this.emitSync(n.tD.OPERATION,{operation:n.ut.ADD,uris:e,position:t,silent:i}).defaultPrevented}emitMoveSync(e,t,i=!1){return this.emitSync(n.tD.OPERATION,{operation:n.ut.MOVE,item:e,position:t,showAddConfirmation:i}).defaultPrevented}emitRemoveSync(e){return this.emitSync(n.tD.OPERATION,{operation:n.ut.REMOVE,items:e}).defaultPrevented}emitCreatePlaylistComplete(e,t,i=null,r=null,a){this.emit(n.tD.OPERATION_COMPLETE,{operation:n.ut.CREATE_PLAYLIST,name:e,position:t,uri:i,error:r,silent:a})}emitAddComplete(e,t,i=null,r){this.emit(n.tD.OPERATION_COMPLETE,{operation:n.ut.ADD,uris:e,position:t,error:i,silent:r})}emitMoveComplete(e,t,i=null,r=!1){this.emit(n.tD.OPERATION_COMPLETE,{operation:n.ut.MOVE,item:e,position:t,error:i,showAddConfirmation:r})}emitRemoveComplete(e,t=null){this.emit(n.tD.OPERATION_COMPLETE,{operation:n.ut.REMOVE,items:e,error:t})}}},33718:(e,t,i)=>{"use strict";i.d(t,{IJ:()=>_,N7:()=>S,q1:()=>A,dG:()=>x,sh:()=>C,jH:()=>v,W3:()=>f});var n=i(61544),r=i(47327),a=i(7353),s=i(71817),o=i(97277);function l(e){return e?new Date(parseInt(e,10)):null}function c(e){return{type:s.c.USER,uri:(0,n.Qj)(e).toURI(),username:e,displayName:null,images:[]}}function u(e,t){if(void 0!==e)return e.map((e=>e.url??null)).filter(a.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,i){const n=i.attributes;return{type:"folder",uri:e,name:t,addedAt:l(n?.timestamp),items:[]}}function m(e,t,i){const n=t.attributes,r=i.attributes;if(!(t.uri&&i.ownerUsername&&n&&r))return function(e){const t=e.attributes;return{type:"placeholder",uri:e.uri??"",addedAt:l(t?.timestamp),isNotFound:!0,isForbidden:!1}}(t);const a=c(i.ownerUsername),o=function(e){return void 0===e?null:c(e)}(r.formatAttributes?.find((e=>"madeFor.username"===e.key))?.value),d=e===a.username,m=n.public??!1,p=d,h=d;return{type:s.c.PLAYLIST,addedAt:l(n.timestamp),uri:t.uri,name:r.name??"",description:r.description??"",totalLength:i.length??0,unfilteredTotalLength:i.length??0,totalLikes:null,duration:null,images:u(r.pictureSize,r.picture),owner:a,madeFor:o,isLoaded:!0,isOwnedBySelf:d,isPublished:m,hasEpisodes:null,hasSpotifyTracks:null,hasSpotifyAudiobooks:null,canAdd:p,canRemove:h,canPlay:null,formatListData:null,canReportAnnotationAbuse:!1,hasDateAdded:!0,permissions:null,collaborators:null}}var p=i(39692);function h(e){const t=e;return"folder"===t.type&&void 0!==t.hash&&void 0!==t.rawItemCount}function g(e,t){const i=e.contents?.items?.[t];return void 0===i?null:(0,n.o_)(i.uri,{parseUnknown:!0})}function f(e,t){const i=g(e,t);return null!==i&&(i.type===n.NQ.UNKNOWN&&"start-group"===i.args?.[0]&&3===i.args.length)}function v(e,t){const i=g(e,t);return null!==i&&(i.type===n.NQ.UNKNOWN&&"end-group"===i.args?.[0]&&2===i.args.length)}function y(e,t){return{type:"folder",uri:e,name:"<root>",addedAt:new Date(0),items:[],hash:"0000000000000000",rawItemCount:0,...t}}function b(e,t,i,n){return{...d((0,p.p0)(e,t,i),i,n),hash:t,rawItemCount:1}}class _{stack=[];seen=[];constructor(e){this.username=e;const t=(0,p.p0)(e,"0000000000000000","<root>");this.root=y(t)}build(e){const t=e.contents,i=t?.items||[],r=t?.metaItems||[];for(let e=0;e<i.length;++e){this.increaseRawItemCount();const t=i[e],a=r[e],s=(0,n.o_)(t.uri,{parseUnknown:!0});if(s)switch(s.type){case n.NQ.PLAYLIST:case n.NQ.PLAYLIST_V2:{const e=m(this.username,t,a);this.onPlaylist(e);break}case n.NQ.UNKNOWN:if("start-group"===s.args?.[0]&&3===s.args?.length){const e=s.args[1],i=(0,n.d7)(s.args[2]);this.hasSeen(e)||this.onStartGroup(b(this.username,e,i,t))}else if("end-group"===s.args?.[0]&&2===s.args?.length){const e=s.args[1];this.onEndGroup(e)}}}return this.root}peek(){return this.stack.length>0?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;e<this.stack.length;++e)this.stack[e].rawItemCount++}}function E(e,t){const i=[];t(e)&&i.push(e);const n=[e];for(;n.length>0;){const e=n.pop();for(const r of e.items)h(r)&&n.push(r),t(r)&&i.push(r)}return i}function C(e){return E(e,(e=>(0,r.Af)(e)))}function x(e){return y(e.uri,{items:C(e)})}function S(e,t){const i=(0,n.o_)(t),r=E(e,(e=>(0,p.B2)(i,(0,n.o_)(e.uri))));return r.length>0?r[0]:null}function A(e,t){const i=(0,n.o_)(t);return E(e,(e=>(0,p.B2)(i,(0,n.o_)(e.uri)))).at(0)??null}},11981:(e,t,i)=>{"use strict";i.d(t,{k:()=>c});var n=i(52732),r=i(15742);i(8385);const a=Spicetify.GraphQL.Definitions["decoratePlaylists"]=new r.l("decoratePlaylists","query","896382ce80ad65a99a7acef04886629b57f9673bdef3ed3d1c90cdc17237612b",null);var s=i(5928);const o=50;const l=e=>null===e.owner.displayName||0===e.images.length;async function c(e,t,i){try{for(let e=0;e<i.length;++e){const n=i[e];if(t.has(n.uri)){const{images:e,owner:i}=t.get(n.uri);n.owner=i,n.images=e}}const r=i.filter(l).filter((e=>!t.has(e.uri))),c=await async function(e,t){const i=(0,n.lY)(e);return{playlistsV2:(await(0,s.F)(t,(async e=>{const t=await i(a,{uris:e}),{errors:n,data:r}=t||{};if(!r?.playlistsV2)throw n&&n.length>0?new Error(`GraphQL error: ${n[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<r.length;++e){const i=r[e],n=u[e];if("Playlist"===n.__typename){const{uri:e,images:r,ownerV2:a}=n;a&&"User"===a.data.__typename&&(i.owner.displayName=a.data.name),i.images=r.items?.[0]?.sources.map((({url:e,width:t,height:i})=>({url:e,width:t||void 0,height:i||void 0}))),t.set(e,{owner:i.owner,images:i.images})}}}catch(e){window.console.error(e)}}},39692:(e,t,i)=>{"use strict";i.d(t,{B2:()=>u,BU:()=>c,DY:()=>g,Yu:()=>a,_U:()=>l,nK:()=>p,p0:()=>o});var n=i(61544),r=i(97277);function a(e){const t=new Uint8Array(e);return globalThis.crypto.getRandomValues(t),(0,r.U5)(t)}function s(e){const t=e.replace(/\s+/g," ");return encodeURIComponent(t).replace(/%20/g,"+")}function o(e,t,i){return`${(0,n.TR)(e,t).toURI()}:${s(i)}`}function l(e){const t=(0,n.o_)(e,{parseUnknown:!0});return null!==t&&t.type===n.NQ.UNKNOWN&&void 0!==t.args&&"start-group"===t.args[0]&&t.args.length>=2&&t.args.length<=3}function c(e){const t=(0,n.o_)(e,{parseUnknown:!0});return null!==t&&t.type===n.NQ.UNKNOWN&&void 0!==t.args&&"end-group"===t.args[0]&&2===t.args.length}function u(e,t){const i=(0,n.o_)(e,{parseUnknown:!0}),r=(0,n.o_)(t,{parseUnknown:!0});return null!==i&&null!==r&&(i.type===n.NQ.FOLDER&&r.type===n.NQ.FOLDER?i.id===r.id:l(i)&&l(r)||c(i)&&c(r)?i.args[0]===r.args[0]:i.type===n.NQ.FOLDER&&l(r)?i.id===r.args[1]:l(i)&&r.type===n.NQ.FOLDER?i.args[1]===r.id:(0,n.B2)(i,r))}function d(e,t){return void 0!==t?`spotify:start-group:${e}:${s(t)}`:`spotify:start-group:${e}`}function m(e){return`spotify:end-group:${e}`}function p(e={}){const{name:t,folderUri:i,hash:n=(i?h(i):a(8))}=e;return[d(n,t),m(n)]}function h(e){const t=(0,n.o_)(e);if(null===t||t.type!==n.NQ.FOLDER)throw new Error("Failed to parse folder URI!");return t.id}function g(e){try{return d(h(e))}catch{return e}}},92482:(e,t,i)=>{"use strict";i.d(t,{E:()=>n});const n=["daily-mix","my-mix","car-mix","personalized-podcasts","daylist"]},13526:(e,t,i)=>{"use strict";i.d(t,{u:()=>a,w:()=>s});var n=i(61544),r=i(38481);const a=async(e,t,i,a)=>{const s=await e.build().withMethod("POST").withHost(r.sG).withPath("/extendp/").withEndpointIdentifier("/extendp/").withJsonContentType().withBody({playlistURI:t,trackSkipIDs:i||[],numResults:a||10}).withoutMarket().send();return s.body?s.body.recommendedTracks.map((e=>{const{id:t,album:{id:i},artists:r}=e,a=(0,n.tR)(t).toURI(),s=(0,n.Q0)(i).toURI(),o=r.map((({id:e,name:t})=>({id:e,name:t,uri:(0,n.IT)(e).toURI()})));return{...e,uri:a,album:{...e.album,uri:s},artists:o,isMOGEFRestricted:!!e.contentRating?.find((e=>"KR"===e.country&&e.tag.includes("MOGEF-19+")))}})):[]},s=async(e,t,i,n)=>{try{return(await e.build().withMethod("POST").withHost(r.SX).withJsonContentType().withBody({curation_uri:t,suggested_audiobooks:{},skipItemUris:i,limit:n}).withoutMarket().send()).body.uris}catch(e){return[]}}},4868:(e,t,i)=>{"use strict";i.d(t,{_:()=>r});var n=i(38481);async function r(e,t){const i=await e.build().withHost(n.eX).withMethod("GET").withPath(`/resolve-uri/${encodeURIComponent(t)}`).withEndpointIdentifier("/resolve-uri/{uri}").withoutMarket().send(),{resolvedPlaylists:r}=i.body;if(r.length>0)return r[0].uri;throw new Error("Error resolving playlist format URI!")}},88756:(e,t,i)=>{"use strict";i.d(t,{H:()=>c,k:()=>l});var n=i(39302),r=i(61544),a=i(75612),s=i(38481),o=i(97277);async function l(e,t,i){let l=null;const u=(0,r.o_)(t).id;i.imageUploadToken&&(l=await c(e,u,i.imageUploadToken));const d={},m=[];if(null!==l?d.picture=l:null===i.imageUploadToken&&m.push(n.Dr.LIST_PICTURE),"name"in i){if(!i.name)throw Error("Can not set empty playlist name!");d.name=i.name}if("description"in i&&(d.description=i.description),0===Object.keys(d).length&&0===m.length)return null;const p=(new a.a).updateListAttributes({newAttributes:{values:d,noValue:m}}).buildListChanges(),h=n.Qm.toJSON(p),g=await e.build().withMethod("POST").withHost(s.eX).withPath(`/playlist/${u}/changes`).withEndpointIdentifier("/playlist/{id}/changes").withoutMarket().withJsonContentType().withBody(h).send();return(0,o.tX)(g.body.revision)}async function c(e,t,i){const n=await e.build().withEndpointIdentifier("playlist/${id}/register-image").withHost(s.eX).withMethod("POST").withPath(`/playlist/${t}/register-image`).withJsonContentType().withBody({uploadToken:i}).withoutMarket().send();if(!n.body)throw new Error("No image id from registration!");return(0,o.tX)(n.body.picture)}},70763:(e,t,i)=>{"use strict";i.d(t,{V:()=>r});const n="https://image-upload.spotify.com/v4";async function r(e,t){const i=await e.build().withEndpointIdentifier("image-upload/v4/playlist").withHost(n).withMethod("POST").withPath("/playlist").withBody(t).withoutGlobalHeaders().withHeaders([{key:"Content-Type",value:"image/jpeg"}]).withoutMarket().send();if(!i.body)throw new Error("No upload token recieved");return i.body.uploadToken}},21632:(e,t,i)=>{"use strict";i.d(t,{m:()=>r,z:()=>a});var n=i(61544);function r(e){const t=(0,n.o_)(e);return t?t.id:""}function a(e){return e instanceof Error?e:new Error("Unknown error!")}},75224:(e,t,i)=>{"use strict";i.d(t,{W:()=>f,r:()=>v});var n=i(30758),r=i(48604),a=i(16323),s=i(69898),o=i(25639),l=i(58717),c=i(61272),u=i(10590),d=i(45418),m=i(7353),p=i(96131);const h=(e,t,i)=>["usePlaylist",e,t,i],g=(e,t,i,n,r)=>()=>e.getPlaylist(t,{...n,withSync:i},r),f=(e,t,i)=>{const f=(0,r.m)(),v=(0,s.jE)(),y=(0,n.useRef)(t?.withSync),b=(0,c.U0)((()=>h(e,t,i)),[e,t,i]),{data:_,isLoading:E,isError:C}=(0,o.I)({queryKey:b(),queryFn:(...n)=>g(f,e,y.current,t,i)(...n),gcTime:36e5,staleTime:5e3,placeholderData:l.rX}),x=(0,n.useCallback)((()=>{y.current=!1,v.invalidateQueries({queryKey:b()})}),[v,b]);return(0,u.V)({callback:x,uri:e}),(0,a.H)(e,x),((e,t,i=!1)=>{const r=(0,d.a)(),a=(0,n.useRef)(null),s=(0,n.useRef)(t);(0,n.useLayoutEffect)((()=>{s.current=t})),(0,n.useEffect)((()=>i?r.subscribeToMembers(e,((e,t)=>{const i=a.current,n=new Set(t?.members?.map((e=>e.user?.uri??null)).filter(m.P)??[]);i&&!(0,p.j)(i,n)&&s.current(),a.current=n})):()=>{}),[e,r,i])})(e,x,t?.hydrateCollaboratorsWithMembers),{data:_??null,isLoading:E,isError:C}},v=(e,t,i)=>{const a=(0,r.m)(),o=(0,s.jE)();return(0,n.useCallback)((()=>{const n=h(e,t,i),r=g(a,e,!1,t,i);o.prefetchQuery({queryKey:n,queryFn:r})}),[a,i,t,o,e])}},48604:(e,t,i)=>{"use strict";i.d(t,{m:()=>a});var n=i(60102),r=i(31965);function a(){return(0,n.N)(r.Ki)}},32660:(e,t,i)=>{"use strict";i.d(t,{e:()=>s});var n=i(30758),r=i(48604),a=i(61272);function s(...e){const[t,i,s]=e,o=(0,n.useRef)(i),l=(0,a.lB)((()=>s),[s]),c=(0,r.m)();o.current=i,(0,n.useEffect)((()=>c.getEvents().addListener(t,(e=>o.current(e)),l)),[c,t,l])}},42299:(e,t,i)=>{"use strict";i.d(t,{J:()=>u});var n=i(30758),r=i(48604),a=i(16323),s=i(69898),o=i(25639),l=i(58717),c=i(61272);const u=(e,t)=>{const i=(0,r.m)(),u=(0,s.jE)(),d=(0,n.useRef)(t?.withSync),m=(0,c.U0)((()=>["usePlaylistMetadata",e,t]),[t,e]),{data:p}=(0,o.I)({queryKey:m(),queryFn:()=>i.getMetadata(e,{...t,withSync:d.current}),gcTime:36e5,placeholderData:l.rX}),h=(0,n.useCallback)((()=>{d.current=!1,u.invalidateQueries({queryKey:m()})}),[u,m]);return(0,a.H)(e,h),p??null}},82129:(e,t,i)=>{"use strict";i.d(t,{x:()=>s});var n=i(30758),r=i(48604),a=i(45418);function s(e){const t=(0,r.m)(),i=(0,a.a)();return{addItems:(0,n.useCallback)(((i,n)=>t.add(e,i,n)),[e,t]),moveItems:(0,n.useCallback)(((i,n)=>t.move(e,i,n)),[e,t]),removeItems:(0,n.useCallback)((i=>t.remove(e,i)),[e,t]),updateDetails:(0,n.useCallback)((i=>t.updateDetails(e,i)),[e,t]),uploadImage:(0,n.useCallback)((e=>t.uploadImage(e)),[t]),setPrivateState:(0,n.useCallback)((t=>i.setBasePermission(e,t?"BLOCKED":"VIEWER")),[i,e]),removeMember:(0,n.useCallback)((t=>i.removeMember(e,t)),[i,e])}}},49993:(e,t,i)=>{"use strict";i.d(t,{v:()=>s});var n=i(30758),r=i(27774),a=i(52509);function s(e){const t=(0,r._)(),[i,s]=(0,n.useState)(void 0),o=(0,n.useCallback)((()=>{t.getPublishedState(e).then(s)}),[t,e]);return(0,n.useEffect)(o,[o]),(0,a.L)(o),i}},16323:(e,t,i)=>{"use strict";i.d(t,{H:()=>a});var n=i(14964),r=i(32660);function a(e,t){(0,r.e)(n.Lj.UPDATE,(i=>{i.data.uri===e&&t(i)}),{uri:e})}},67196:(e,t,i)=>{"use strict";i.d(t,{g:()=>r});var n=i(27774);function r(){return(0,n._)()}},27774:(e,t,i)=>{"use strict";i.d(t,{_:()=>a});var n=i(60102),r=i(47327);function a(){return(0,n.N)(r.Yi)}},73482:(e,t,i)=>{"use strict";i.d(t,{u:()=>o});var n=i(27774),r=i(52509),a=i(69898),s=i(25639);function o(e){const t=(0,n._)(),i=(0,a.jE)(),o=["rootlist-contents",e];return(0,r.L)((()=>i.invalidateQueries({queryKey:o},{cancelRefetch:!0}))),(0,s.I)({queryKey:o,queryFn:()=>t.getContents(e),gcTime:864e5,staleTime:0}).data}},42947:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(30758),r=i(27774);function a(){const e=(0,r._)();return{createFolder:(0,n.useCallback)(((t,i)=>e.createFolder(t,i)),[e]),createPlaylist:(0,n.useCallback)(((t,i)=>e.createPlaylist(t,i)),[e]),moveFolder:(0,n.useCallback)(((t,i)=>e.moveFolder(t,i)),[e]),removeFolder:(0,n.useCallback)((t=>e.removeFolder(t)),[e]),renameFolder:(0,n.useCallback)(((t,i)=>e.renameFolder(t,i)),[e]),addPlaylists:(0,n.useCallback)(((t,i)=>e.add(t,i)),[e]),movePlaylists:(0,n.useCallback)(((t,i)=>e.move(t,i)),[e]),removePlaylists:(0,n.useCallback)((t=>e.remove(t)),[e]),containsPlaylists:(0,n.useCallback)((t=>e.contains(t)),[e]),setPublishedState:(0,n.useCallback)(((t,i)=>e.setPublishedState(t,i)),[e])}}},52509:(e,t,i)=>{"use strict";i.d(t,{L:()=>o,b:()=>l});var n=i(30758),r=i(40814),a=i(27774),s=i(61272);function o(e){const t=(0,a._)();(0,n.useEffect)((()=>t.getEvents().addListener(r.tD.UPDATE,e)),[e,t])}function l(...e){const[t,i,r]=e,o=(0,n.useRef)(i),l=(0,s.lB)((()=>r),[r]),c=(0,a._)();o.current=i,(0,n.useEffect)((()=>c.getEvents().addListener(t,(e=>o.current(e)),l)),[c,t,l])}},70812:(e,t,i)=>{"use strict";function n(e){return!!e&&(Array.isArray(e)?e.some((e=>"is-editorial-booklist"===e.key&&"true"===e.value)):"true"===e["is-editorial-booklist"])}i.d(t,{p:()=>n})},49943:(e,t,i)=>{"use strict";i.d(t,{w:()=>a});var n=i(71817);function r(e){return{url:e.url,width:e.width||void 0,height:e.height||void 0}}function a(e){return{type:n.c.USER,uri:e.uri,username:e.id,displayName:e?.display_name||null,images:e?.images?.map(r)||[]}}},1288:(e,t,i)=>{"use strict";i.d(t,{c:()=>n});const n=(0,i(33655).u)("ProductStateAPI")},74303:(e,t,i)=>{"use strict";i.d(t,{k:()=>a});var n=i(30758),r=i(27931);function a(){const e=(0,r.g)(),[t,i]=(0,n.useState)(!0),[a,s]=(0,n.useState)({}),[o,l]=(0,n.useState)(null);return(0,n.useEffect)((()=>{let t=!0;return e.getValues().then((e=>{t&&s(e)})).catch((e=>{t&&l(e)})).finally((()=>{t&&i(!1)})),()=>{t=!1}}),[e]),{isLoading:t,data:a,error:o}}},27931:(e,t,i)=>{"use strict";i.d(t,{g:()=>a});var n=i(60102),r=i(1288);function a(){return(0,n.N)(r.c)}},74494:(e,t,i)=>{"use strict";i.d(t,{$:()=>o});var n=i(69898),r=i(25639),a=i(27931),s=i(30758);const o=e=>{const t=(0,a.g)(),i=(0,n.jE)(),{data:o}=(0,r.I)({queryKey:["useProductStateValue",e],queryFn:async()=>await t.getValues(),select:t=>t[e],gcTime:0});return(0,s.useEffect)((()=>t.subValues((()=>{i.invalidateQueries({queryKey:["useProductStateValue",e]})}))),[e,t,i]),o}},48839:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});const n=(0,i(33655).u)("PubSubAPI")},4614:(e,t,i)=>{"use strict";i.d(t,{D:()=>a,K:()=>r});var n=i(88485);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 a extends n.V{}},85386:(e,t,i)=>{"use strict";i.d(t,{j:()=>a});var n=i(4614);const r="hm://";class a{static NEXT_SUBSCRIPTION_ID=0;_subscriptions=new Map;_messages=[];constructor(e,t,i){this._subscribeToConnectionId=e,this._subscribeToMessages=t,this._isDeveloperMode=i,this._events=new n.D,this._connectionId=new Promise((e=>{this._subscribeToConnectionId((t=>{this.onConnectionId(t),e(t),this._events.emit(n.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(n.K.CANCEL,{ident:t.ident,isPrefix:t.isPrefix??!1})}catch(e){this._events.emit(n.K.ERROR,new Error("Error while trying to cancel!",{cause:e}))}this._subscriptions.delete(e)}async createSubscription(e,t,i){if(i.aborted)return;const r=a.NEXT_SUBSCRIPTION_ID++,{ident:s,isPrefix:o,onMessage:l}=e;this._subscriptions.set(r,{...e,connectionId:t});const c=this._subscribeToMessages(s,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 i=new Map;return e.forEach((e=>{const n=t(e);i.has(n)||i.set(n,e)})),Array.from(i.values())}(this._messages,(e=>`${e.timestamp}-${e.ident}`)))),this._events.emit(n.K.MESSAGE,e)}));i.addEventListener("abort",(()=>{this.cancelSubscription(r),c.cancel()}),{once:!0});try{await(e.onSubscribe?.(t)),this._events.emit(n.K.SUBSCRIBE,{ident:s,isPrefix:o??!1})}catch(e){this._events.emit(n.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(n.K.ERROR,new Error("Error while trying to cancel!",{cause:e}))}try{const i=e.connectionId;await(e.onSubscribe?.(t)),e.connectionId=t,this._events.emit(n.K.REFRESH,{ident:e.ident,isPrefix:e.isPrefix??!1,oldConnectionId:i,newConnectionId:t})}catch(e){this._events.emit(n.K.ERROR,new Error("Error while trying to subscribe!",{cause:e}))}}subscribe(e){const t=new AbortController,i=t.signal;return this._connectionId.then((t=>this.createSubscription(e,t,i))),{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}}},84738:(e,t,i)=>{"use strict";i.d(t,{oC:()=>n});const n=(e,t)=>{const i=t?new URLSearchParams(t.search):void 0;return"1"===i?.get(e)}},9714:(e,t,i)=>{"use strict";i.d(t,{K5:()=>l,X6:()=>o,d2:()=>a,hr:()=>c,m5:()=>s});var n=i(33655),r=i(88485);let a=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}({}),s=function(e){return e.UPDATE="update",e}({});const o=(0,n.u)("RecentlyPlayedAPI");class l{}class c extends r.V{}},83388:(e,t,i)=>{"use strict";i.d(t,{fE:()=>l,q6:()=>o});var n=i(14693),r=i(19117);let a;function s({isAnonymous:e,transport:t,tokenProvider:i}){const{DEBUG_SEMANTIC_METRICS:a}={};if("1"===a)return[new n.ConsoleReporter];if(!t&&!i)throw new Error("[SemanticMetricsHelper] An instance of either transport or tokenProvider is required!");let s={environment:"undefined"!=typeof window?"browser":"nodejs"};return e||(s={...s,getToken:async e=>{if(i){const t=await(0,r.C)(i);e(await t())}else t&&e(t.getLastToken())}}),[(0,n.createUniversalReporter)(s),..."2"===a?[new n.ConsoleReporter]:[]]}function o(e,t,i=!1){const{sendMetric:r}=(0,n.createSemanticMetrics)({key:e,dev:!"production"?.startsWith("prod")&&!0,reporter:s({transport:t,isAnonymous:i})});a=r}async function l(e){if(!a)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"),a(e)}},19703:(e,t,i)=>{"use strict";i.d(t,{AX:()=>a,K$:()=>s,WY:()=>r,fZ:()=>l,uj:()=>o});var n=i(33655);let r=function(e){return e.PUBLISH_DATE="PUBLISH_DATE",e}({}),a=function(e){return e.ASC="ASC",e.DESC="DESC",e}({}),s=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,n.u)("ShowAPI")},57526:(e,t,i)=>{"use strict";i.d(t,{K:()=>r,r:()=>a});var n=i(88485);let r=function(e){return e.UPDATE_ACCESS_INFO="update_access_info",e.UPDATE_RESUME_EPISODE_LINK="update_resume_episode_link",e.UPDATE_RATING="update_rating",e}({});class a extends n.V{}},99927:(e,t,i)=>{"use strict";i.d(t,{S:()=>a});var n=i(63849),r=i(86324);async function a(e){const{body:t}=await n.createCheckoutSession(new r.t,e),{redirectToUrl:i}=t;if(!new URL(i).hostname.endsWith(".spotify.com"))throw new Error("Unknown URL host");window.location.assign(i)}},86065:(e,t,i)=>{"use strict";i.d(t,{W:()=>r});var n=i(65495);class r extends n.e{constructor(e,t){super(e,t),this.redirectUri=t.redirectUri}}},41546:(e,t,i)=>{"use strict";i.d(t,{E:()=>a,q:()=>s});var n=i(76108),r=i(79787);function a(e){return void 0===e||0===e.length?null:e.some((e=>[n.UG.OAP_OTP,n.UG.AUDIOBOOK_DIRECT_SALES].includes(e)))?"OTP":e.some((e=>[n.UG.OAP_LINKING,n.UG.ANCHOR_PAYWALL].includes(e)))?"SUBSCRIPTION":"OTHER"}function s(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}},10590:(e,t,i)=>{"use strict";i.d(t,{V:()=>s});var n=i(30758),r=i(57526),a=i(99008);function s({callback:e,uri:t}){const i=(0,a.T)();(0,n.useEffect)((()=>i.getEvents().addListener(r.K.UPDATE_ACCESS_INFO,(i=>{i.data.uri!==t&&void 0!==i.data.uri||e(i)}))),[i,t,e])}},35818:(e,t,i)=>{"use strict";i.d(t,{d:()=>s});var n=i(25639),r=i(99008);const a=3e5;function s(e){const t=(0,r.T)(),{data:i,isError:s}=(0,n.I)({queryKey:["useEpisodeOrChapter",e],queryFn:()=>t.getEpisodeOrChapter(e),gcTime:a,retry:(e,t)=>!t});return i||s?{isError:s,episodeOrChapter:i}:null}},99008:(e,t,i)=>{"use strict";i.d(t,{T:()=>a});var n=i(19703),r=i(60102);function a(){return(0,r.N)(n.fZ)}},48215:(e,t,i)=>{"use strict";i.d(t,{W:()=>m});var n=i(69898),r=i(25639),a=i(99008),s=i(94901),o=i(10590),l=i(30758),c=i(86065),u=i(57526);const d=3e5;function m(e){const t=(0,a.T)(),i=(0,n.jE)(),m=(0,l.useCallback)((()=>["useShowMetadata",e]),[e]),{data:p,error:h}=(0,r.I)({queryKey:m(),queryFn:()=>t.getMetadata(e),gcTime:d,refetchOnWindowFocus:!1,retry:(e,t)=>!(t.message===s.Xz.RestrictedContent||t instanceof c.W)&&e<3}),g=(0,l.useCallback)((()=>{p&&i.invalidateQueries({queryKey:m()})}),[p,m,i]);(0,o.V)({callback:g,uri:e}),function({callback:e,uri:t}){const i=(0,a.T)();(0,l.useEffect)((()=>i.getEvents().addListener(u.K.UPDATE_RATING,(i=>{i.data.uri!==t&&void 0!==i.data.uri||e(i)}))),[i,t,e])}({callback:g,uri:e}),(0,l.useEffect)((()=>t.getEvents().addListener(u.K.UPDATE_RESUME_EPISODE_LINK,(e=>{i.setQueryData(m(),(t=>t?{...t,resumeEpisodeLink:e.data.resumeEpisodeLink,invalidateCache:g}:t))}),{uri:e})),[m,g,i,t,e]);const f=(0,l.useCallback)((async()=>{await t.invalidateShowMetadataCaches(e),g()}),[g,t,e]);return h?{data:null,error:h,redirectUri:h instanceof c.W?h.redirectUri:void 0,invalidateCache:f}:{data:p??null,invalidateCache:f}}},42708:(e,t,i)=>{"use strict";i.d(t,{p:()=>c});var n=i(69898),r=i(25639),a=i(99008),s=i(2435),o=i(30758),l=i(94313);const c=e=>{const t=(0,a.T)(),i=(0,n.jE)(),c=(0,o.useRef)(null),u=(0,o.useRef)(0),d=(0,s.o)((t=>t?.context.uri===e?t?.item?.uri??null:null)),[m]=(0,l.S)(1e4,(e=>e?.item?.uri===d)),{data:p}=(0,r.I)({queryKey:["useShowPlayedState",e],queryFn:async()=>{const i=t.getShowPlayedState(e);return u.current=m,i},refetchOnWindowFocus:!1});return(0,o.useEffect)((()=>{c.current&&d!==c.current&&i.invalidateQueries({queryKey:["useShowPlayedState",e]}),c.current=d}),[d,i,e]),(0,o.useMemo)((()=>p&&t.capabilities.canGetShowPlayedState?{state:p.state,playPositionMilliseconds:p.playPositionMilliseconds+m-u.current}:null),[p,t,m])}},73039:(e,t,i)=>{"use strict";i.d(t,{Q:()=>h});var n=i(21364),r=i(24848),a=i.n(r);let s=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.PLAINTEXT_CONTENT=1]="PLAINTEXT_CONTENT",e[e.MUSIC_TRACK=2]="MUSIC_TRACK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function o(e){switch(e){case 0:case"UNKNOWN":return s.UNKNOWN;case 1:case"PLAINTEXT_CONTENT":return s.PLAINTEXT_CONTENT;case 2:case"MUSIC_TRACK":return s.MUSIC_TRACK;default:return s.UNRECOGNIZED}}const l={encode(e,t=a().Writer.create()){""!==e.version&&t.uint32(10).string(e.version),""!==e.episodeUri&&t.uint32(18).string(e.episodeUri),""!==e.publishedAt&&t.uint32(26).string(e.publishedAt);for(const i of e.sections)c.encode(i,t.uint32(34).fork()).ldelim();return""!==e.language&&t.uint32(42).string(e.language),!0===e.curated&&t.uint32(48).bool(e.curated),t},decode(e,t){const i=e instanceof a().Reader?e:new(a().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={version:"",episodeUri:"",publishedAt:"",sections:[],language:"",curated:!1};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.version=i.string();break;case 2:r.episodeUri=i.string();break;case 3:r.publishedAt=i.string();break;case 4:r.sections.push(c.decode(i,i.uint32()));break;case 5:r.language=i.string();break;case 6:r.curated=i.bool();break;default:i.skipType(7&e)}}return r},fromJSON:e=>({version:m(e.version)?String(e.version):"",episodeUri:m(e.episodeUri)?String(e.episodeUri):"",publishedAt:m(e.publishedAt)?String(e.publishedAt):"",sections:Array.isArray(e?.sections)?e.sections.map((e=>c.fromJSON(e))):[],language:m(e.language)?String(e.language):"",curated:!!m(e.curated)&&Boolean(e.curated)}),toJSON(e){const t={};return void 0!==e.version&&(t.version=e.version),void 0!==e.episodeUri&&(t.episodeUri=e.episodeUri),void 0!==e.publishedAt&&(t.publishedAt=e.publishedAt),e.sections?t.sections=e.sections.map((e=>e?c.toJSON(e):void 0)):t.sections=[],void 0!==e.language&&(t.language=e.language),void 0!==e.curated&&(t.curated=e.curated),t},fromPartial(e){const t={version:"",episodeUri:"",publishedAt:"",sections:[],language:"",curated:!1};return t.version=e.version??"",t.episodeUri=e.episodeUri??"",t.publishedAt=e.publishedAt??"",t.sections=e.sections?.map((e=>c.fromPartial(e)))||[],t.language=e.language??"",t.curated=e.curated??!1,t}};const c={encode:(e,t=a().Writer.create())=>(0!==e.type&&t.uint32(8).int32(e.type),0!==e.startMs&&t.uint32(16).int32(e.startMs),void 0!==e.plaintextContent&&u.encode(e.plaintextContent,t.uint32(26).fork()).ldelim(),void 0!==e.musicTrack&&d.encode(e.musicTrack,t.uint32(50).fork()).ldelim(),""!==e.title&&t.uint32(34).string(e.title),void 0!==e.fallback&&u.encode(e.fallback,t.uint32(42).fork()).ldelim(),t),decode(e,t){const i=e instanceof a().Reader?e:new(a().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={type:0,startMs:0,plaintextContent:void 0,musicTrack:void 0,title:"",fallback:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:r.type=i.int32();break;case 2:r.startMs=i.int32();break;case 3:r.plaintextContent=u.decode(i,i.uint32());break;case 6:r.musicTrack=d.decode(i,i.uint32());break;case 4:r.title=i.string();break;case 5:r.fallback=u.decode(i,i.uint32());break;default:i.skipType(7&e)}}return r},fromJSON:e=>({type:m(e.type)?o(e.type):0,startMs:m(e.startMs)?Number(e.startMs):0,plaintextContent:m(e.plaintextContent)?u.fromJSON(e.plaintextContent):void 0,musicTrack:m(e.musicTrack)?d.fromJSON(e.musicTrack):void 0,title:m(e.title)?String(e.title):"",fallback:m(e.fallback)?u.fromJSON(e.fallback):void 0}),toJSON(e){const t={};return void 0!==e.type&&(t.type=function(e){switch(e){case s.UNKNOWN:return"UNKNOWN";case s.PLAINTEXT_CONTENT:return"PLAINTEXT_CONTENT";case s.MUSIC_TRACK:return"MUSIC_TRACK";default:return"UNKNOWN"}}(e.type)),void 0!==e.startMs&&(t.startMs=Math.round(e.startMs)),void 0!==e.plaintextContent&&(t.plaintextContent=e.plaintextContent?u.toJSON(e.plaintextContent):void 0),void 0!==e.musicTrack&&(t.musicTrack=e.musicTrack?d.toJSON(e.musicTrack):void 0),void 0!==e.title&&(t.title=e.title),void 0!==e.fallback&&(t.fallback=e.fallback?u.toJSON(e.fallback):void 0),t},fromPartial(e){const t={type:0,startMs:0,plaintextContent:void 0,musicTrack:void 0,title:"",fallback:void 0};return t.type=e.type??0,t.startMs=e.startMs??0,t.plaintextContent=void 0!==e.plaintextContent&&null!==e.plaintextContent?u.fromPartial(e.plaintextContent):void 0,t.musicTrack=void 0!==e.musicTrack&&null!==e.musicTrack?d.fromPartial(e.musicTrack):void 0,t.title=e.title??"",t.fallback=void 0!==e.fallback&&null!==e.fallback?u.fromPartial(e.fallback):void 0,t}};const u={encode(e,t=a().Writer.create()){for(const i of e.plaintext)t.uint32(10).string(i);return t},decode(e,t){const i=e instanceof a().Reader?e:new(a().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={plaintext:[]};for(;i.pos<n;){const e=i.uint32();if(e>>>3==1)r.plaintext.push(i.string());else i.skipType(7&e)}return r},fromJSON:e=>({plaintext:Array.isArray(e?.plaintext)?e.plaintext.map((e=>String(e))):[]}),toJSON(e){const t={};return e.plaintext?t.plaintext=e.plaintext.map((e=>e)):t.plaintext=[],t},fromPartial(e){const t={plaintext:[]};return t.plaintext=e.plaintext?.map((e=>e))||[],t}};const d={encode:(e,t=a().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),t),decode(e,t){const i=e instanceof a().Reader?e:new(a().Reader)(e);let n=void 0===t?i.len:i.pos+t;const r={uri:""};for(;i.pos<n;){const e=i.uint32();if(e>>>3==1)r.uri=i.string();else i.skipType(7&e)}return r},fromJSON:e=>({uri:m(e.uri)?String(e.uri):""}),toJSON(e){const t={};return void 0!==e.uri&&(t.uri=e.uri),t},fromPartial(e){const t={uri:""};return t.uri=e.uri??"",t}};function m(e){return null!=e}function p(e){return e.type===s.MUSIC_TRACK?{type:"track",startMs:e.startMs,content:e.fallback?.plaintext||[],trackUri:e.musicTrack?.uri}:{type:"text",startMs:e.startMs,content:e.plaintextContent?.plaintext||[]}}async function h(e){try{const t=await fetch(e,{});if(t.ok&&t.body){const e=await t.arrayBuffer(),i=l.decode(new Uint8Array(e));return i.sections.map(p)}return null}catch(e){return null}}a().util.Long!==n.A&&(a().util.Long=n.A,a().configure())},94901:(e,t,i)=>{"use strict";i.d(t,{Cx:()=>a,Go:()=>d,Gr:()=>m,H7:()=>o,Uk:()=>l,Xz:()=>c,_w:()=>s,t5:()=>u,x7:()=>r});var n=i(71817);let r=function(e){return e.Explicit="EXPLICIT",e.NineteenPlus="NINETEEN_PLUS",e.None="NONE",e.Unknown="UNKNOWN",e}({}),a=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),s=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===n.c.AUDIOBOOK}function m(e){return e.type===n.c.CHAPTER}},54196:(e,t,i)=>{"use strict";i.d(t,{p:()=>r});var n=i(38481);const r=async(e,t,i)=>{const r=e.build();try{const e=await r.withMethod("POST").withHost(n.CC).withPath(`/rating/show/${t}`).withBody({rating:i}).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})}}},58646:(e,t,i)=>{"use strict";i.d(t,{el:()=>d,Ar:()=>m,S:()=>g,_v:()=>_,Wt:()=>u,pE:()=>S,e$:()=>C});var n=i(11808),r=i(79787),a=i(71817),s=i(94901);const o="recent";var l=i(41546),c=i(18573);function u(e){return{totalCount:e.totalCount,nextOffset:e.pagingInfo.nextOffset,items:e.items.map((e=>"Episode"!==e.entity.data.__typename?null:g(e.entity.data)))}}function d(e,t){return{totalCount:e.totalCount,nextOffset:e.pagingInfo.nextOffset,items:e.items.map((e=>"Chapter"===e.entity.data.__typename?f(e.entity.data,t):null))}}function m(e,t){return"Chapter"===e.__typename?f(e,t):g(e)}function p(e){switch(e){case r.$c.AgeRestricted:return s.Uk.AgeRestricted;case r.$c.CatalogueRestricted:return s.Uk.CatalogueRestricted;case r.$c.CountryRestricted:return s.Uk.CountryRestricted;case r.$c.Explicit:return s.Uk.Explicit;case r.$c.PaymentRequired:return s.Uk.PaymentRequired;case r.$c.Playable:return s.Uk.Playable;case r.$c.Unavailable:default:return s.Uk.Unavailable}}function h(e,t=!1){return{playable:!t&&e.playable,reason:t?s.Uk.Anonymous:p(e.reason)}}function g(e){const t="Podcast"!==(i=e.podcastV2).data.__typename?null:{uri:i.data.uri,name:i.data.name,coverArt:i.data.coverArt?.sources||[],trailer:(n=i.data.trailerV2,("Episode"===n?.data.__typename?{uri:n.data.uri}:null)||null),showTypes:(i.data.showTypes||[]).filter(v)};var i,n;const r=(0,c.Wx)(e?.restrictions,e.playability);return{type:a.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:(s=e.releaseDate,s?{isoString:s.isoString}:null),playedState:e.playedState,playability:h(e.playability),audioPreview:e.audioPreview,sharingInfo:e.sharingInfo,duration:{milliseconds:e.duration.totalMilliseconds},contentRating:e.contentRating,segmentsCount:0,podcastSubscription:r,contentInformation:e.contentInformation,transcript:e.transcripts?.items||null};var s}function f(e,t){return{type:a.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:h(e.playability,t),book:E(e.audiobookV2),isExplicit:e.contentRating?.label===r.x7.Explicit,is19PlusOnly:e.contentRating?.label===r.x7.NineteenPlus}}function v(e){return!!e}function y(e){return Boolean(e)}function b(e){const t=e.nextBestEpisodes.items.sort(((e,t)=>t.score-e.score)),i=t[0]?.item.data;if("Episode"!==i?.__typename)return;let n;const a="Episode"===e.trailerV2?.data.__typename?e.trailerV2.data.uri:null;return n=i.uri===a?s.t5.TRAILER:i.playedState.state===r._w.InProgress?s.t5.CONTINUE_LISTENING:s.t5.UP_NEXT,{type:n,data:g(i)}}function _(e){const t="Episode"===e.trailerV2?.data.__typename?(i=e.trailerV2.data,{type:a.c.EPISODE,uri:i.uri,name:i.name,coverArt:i.coverArt?.sources||[],audio:i.audio,audioPreview:i.audioPreview,sharingInfo:i.sharingInfo,duration:{milliseconds:i.duration.totalMilliseconds},contentRating:i.contentRating,mediaTypes:i.mediaTypes}):null;var i;const n=(0,l.q)(e?.accessInfo?.unlockedBy);return{type:a.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(v),publisherName:e.publisher?.name||"",consumptionOrder:o,nextBestEpisode:b(e),gatedContentAccessReason:n,isLocked:null===n,rating:e.rating}}function E(e){if("Audiobook"!==e.data.__typename)return null;const t=e.data;return{uri:t.uri,name:t.name,coverArt:t.coverArt?.sources||[],trailer:(i=t,"Chapter"===i.trailerV2?.data.__typename?{uri:i.trailerV2.data.uri}:null)};var i}function C(e){const t=!1===e?.isUserMemberOfAtLeastOneGroup,i=e?.unlockedBy?.includes(r.UG.Abp);return t&&!i}function x(e){return"ConsumptionCappedAccessExplanation"===e?.accessInfo?.accessExplanation?.__typename?{title:e.accessInfo.accessExplanation.title||"",body:e.accessInfo.accessExplanation.body||"",cta:e.accessInfo.accessExplanation.actionText||"",ctaUrl:e.accessInfo.accessExplanation.ctaUrl??void 0,dismiss:e.accessInfo.accessExplanation.dismiss??void 0}:null}function S(e,t){return"Audiobook"===e.__typename?function(e,t){return{type:a.c.AUDIOBOOK,uri:e.uri,name:e.name,coverArt:e.coverArt?.sources??[],narrators:e.narrators?.map((e=>e?.name)).filter(y)??[],sample:"Chapter"===e.trailerV2?.data.__typename?(c=e.trailerV2.data,{type:a.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(n.Ru.getSeparator())??"",rating:e.rating,isExplicit:e.contentRating?.label===r.x7.Explicit,duration:e.duration?.totalMilliseconds??0,copyrights:e.publisher?(i=e.publisher.name,s=e.copyrights,[(o=i,l="P",{text:o,type:l}),...s.items]):[],publishDate:e.publishDate?new Date(e.publishDate.isoString):null,price:e.price,isLocked:!!t||C(e.accessInfo),consumptionCapExplanation:x(e),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};var i,s,o,l,c}(e,t):_(e)}},8811:(e,t,i)=>{"use strict";i.d(t,{X:()=>n});const n=(0,i(33655).u)("ShuffleAPI")},26887:(e,t,i)=>{"use strict";i.d(t,{F:()=>o});var n=i(934),r=i(32411),a=i(51458);const s={[a.b.OFF]:r.j.OFF,[a.b.LOCAL]:r.j.ON,[a.b.SMART]:r.j.SMART_SHUFFLE};class o{sessionShuffleStates=new Map;constructor(e,t,i){this._contextualShuffle=e,this._events=t,this._syncShuffle=i}_update=(e,t)=>{this.sessionShuffleStates.get(e)!==t&&(this.sessionShuffleStates.set(e,t),this._syncShuffle(e,t).then((()=>{this._events.emitUpdateShuffleModeCompleteSync(e,t)}),(()=>this._events.emitUpdateShuffleModeErrorSync(e,t))))};observe=()=>{this._contextualShuffle.getEvents().addListener(n.w.UPDATE,(e=>{if("shuffle-state"===e.data.storeName){const t=s[e.data.value];this._update(e.data.key,t)}})),this._contextualShuffle.getEvents().addListener(n.w.DELETE,(e=>{"shuffle-state"===e.data.storeName&&this._update(e.data.key,r.j.OFF)}))}}},47342:(e,t,i)=>{"use strict";i.d(t,{L:()=>a,S:()=>r});var n=i(88485);let r=function(e){return e.UPDATE="update",e.UPDATE_COMPLETE="update_complete",e.UPDATE_ERROR="update_error",e}({});class a extends n.V{emitUpdateShuffleModeSync(e,t){const{defaultPrevented:i}=this.emitSync(r.UPDATE,{shuffleMode:t,contextURI:e});return i}emitUpdateShuffleModeCompleteSync(e,t){const{defaultPrevented:i}=this.emitSync(r.UPDATE_COMPLETE,{shuffleMode:t,contextURI:e});return i}emitUpdateShuffleModeErrorSync(e,t){const{defaultPrevented:i}=this.emitSync(r.UPDATE_ERROR,{shuffleMode:t,contextURI:e});return i}}},29711:(e,t,i)=>{"use strict";i.d(t,{w:()=>n});const n=(e,t)=>{const i=()=>{e.getValues().then((e=>{t("1"===e["dsa-mode-enabled"])}))};i(),e.subValues(i)}},85192:(e,t,i)=>{"use strict";i.d(t,{B:()=>a});var n=i(72055),r=i(32411);async function a(e,t,i,a,s){const o=!(0,n.b8)(e,t)||i,l=o&&await a(e);return(s?[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))}},72665:(e,t,i)=>{"use strict";i.d(t,{Q:()=>d});var n=i(24848),r=i.n(n);let a=function(e){return e[e.NOT_ENHANCED=0]="NOT_ENHANCED",e[e.RECOMMENDATION=1]="RECOMMENDATION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({}),s=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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={stringValue:void 0,boolValue:void 0,intValue:void 0,floatValue:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(10!==e)break;a.stringValue=i.string();continue;case 2:if(16!==e)break;a.boolValue=i.bool();continue;case 3:if(24!==e)break;a.intValue=i.int32();continue;case 4:if(37!==e)break;a.floatValue=i.float();continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},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 i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={id:0,value:void 0};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 1:if(8!==e)break;a.id=i.int32();continue;case 2:if(18!==e)break;a.value=o.decode(i,i.uint32());continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},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 i of e.changedFields)l.encode(i,t.uint32(26).fork()).ldelim();return t},decode(e,t){const i=e instanceof r().Reader?e:r().Reader.create(e);let n=void 0===t?i.len:i.pos+t;const a={contentId:"",changedFields:[]};for(;i.pos<n;){const e=i.uint32();switch(e>>>3){case 2:if(18!==e)break;a.contentId=i.string();continue;case 3:if(26!==e)break;a.changedFields.push(l.decode(i,i.uint32()));continue}if(4==(7&e)||0===e)break;i.skipType(7&e)}return a},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=i(32411);function d(e,t){return e.subscribe({ident:"playback-settings/content-settings-update",isPrefix:!0,onMessage:e=>{const i=c.decode(e.payloads[0]),{contentId:n,changedFields:r}=i,o=r.find((({id:e})=>e===s.SHUFFLE))?.value?.boolValue,l=r.find((({id:e})=>e===s.CONTEXT_ENHANCEMENT))?.value?.intValue;let d;l===a.RECOMMENDATION?d=u.j.SMART_SHUFFLE:!0===o?d=u.j.ON:!1===o&&(d=u.j.OFF),void 0!==d&&t(n,d)}})}},32411:(e,t,i)=>{"use strict";i.d(t,{j:()=>n});let n=function(e){return e[e.OFF=0]="OFF",e[e.ON=1]="ON",e[e.SMART_SHUFFLE=2]="SMART_SHUFFLE",e}({})},6351:(e,t,i)=>{"use strict";i.d(t,{C:()=>a});var n=i(36485),r=i(32411);const a=e=>{switch(e){case r.j.OFF:return!1;case r.j.ON:case r.j.SMART_SHUFFLE:return!0;default:return(0,n.k)(e),!1}}},80707:(e,t,i)=>{"use strict";i.d(t,{l:()=>r});var n=i(32411);function r(e){return"true"===e?.context.metadata?.enhanced_context?n.j.SMART_SHUFFLE:!0===e?.shuffle?n.j.ON:!1===e?.shuffle?n.j.OFF:void 0}},91648:(e,t,i)=>{"use strict";i.d(t,{Y9:()=>r,nW:()=>a,qh:()=>s});var n=i(33655);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}({}),a=function(e){return e.ENABLED="enabled",e.DISABLED="disabled",e}({});const s=(0,n.u)("SingAlongAPI")},31463:(e,t,i)=>{"use strict";i.d(t,{z:()=>n});const n=(0,i(33655).u)("SmartShuffleEligibilityAPI")},92491:(e,t,i)=>{"use strict";i.d(t,{j:()=>n});const n=(0,i(33655).u)("SocialConnectAPI")},36174:(e,t,i)=>{"use strict";i.d(t,{o:()=>p});var n=i(20247),r=i(10808),a=i(75621);function s(e,t,i){return t.filter((t=>!function(e,t,i){return e.find((e=>e[t]===i))??null}(e,i,t[i])))}var o=i(5277),l=i(11808),c=i(14914);function u(e){const{id:t,username:i,display_name:n,image_url:r,large_image_url:a}=e;return{id:t,username:i,displayName:n,imageUrl:r,largeImageUrl:a}}function d(e,t){const{timestamp:i,session_id:n,join_session_token:r,session_owner_id:a,session_members:s,join_session_uri:o,is_session_owner:l,active:c,queue_only_mode:d,participantVolumeControl:m}=e;return{timestamp:i,sessionId:n,isSessionOwner:l,joinSessionToken:r??"",joinSessionShortLink:t,sessionOwnerId:a??"",sessionMembers:s?.map(u)??[],joinSessionUri:o??"",queueOnlyMode:d,participantVolumeControl:m??"UNAVAILABLE",active:c??!1}}var m=i(36485);class p{_fetchCurrentSessionInFlightCache=new o.od;constructor(e,t,i,a,s){this.socialConnectServiceClient=e,this.serviceEvents=t,this.urlDispenserServiceClient=i,this.socialConnectProductState=a,this.socialConnectConfig=s,this.socialConnectServiceClient=e,this.currentSession=null,this.events=new n.z,this.shortLinkCache=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=await this.getShortInviteLink(e.session.join_session_token,e.session.join_session_uri),i=d(e.session,t);if(this.isSessionNewer(i))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(i,e.reason),this.setCurrentSession(i);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:this.setCurrentSession(i);break;default:(0,m.d)(e.reason)}}handleSessionMessage({data:e}){this.events.emit(n.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.shortLinkCache.clear(),this.setCurrentSession(null)}emitSessionEnded(e){const t=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId))?.displayName??null;this.events.emit(n.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 i=t===c.YM.USER_JOINED?s(this.currentSession.sessionMembers,e.sessionMembers,"id"):s(e.sessionMembers,this.currentSession.sessionMembers,"id");if(i.length<1)return;const r=Array.from(i,(e=>e.displayName)),a=t===c.YM.USER_JOINED?n.K.JOINED:n.K.LEFT;this.events.emit(a,{sessionId:this.currentSession.sessionId,isSessionOwner:this.currentSession.isSessionOwner,users:r})}setCurrentSession(e){this.currentSession=e,this.events.emit(n.K.UPDATE,e)}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));return(e.session_id!==this.currentSession?.sessionId||this.isSessionNewer(t))&&this.setCurrentSession(t),t}async fetchCurrentSession(){try{const e=await this._fetchCurrentSessionInFlightCache.create("fetchCurrentSession",(()=>this.socialConnectServiceClient.fetchCurrentSession()));return this.handleSessionResponse(e)}catch(e){return(0,a.UD)(e),null}}async createSession(){try{const e=await this.socialConnectServiceClient.createSession();return this.handleSessionResponse(e)}catch(e){return(0,a.UD)(e),null}}async leaveSession(){let e=!1;if(this.currentSession)try{e=await this.socialConnectServiceClient.leaveSession(this.currentSession.sessionId)}catch(e){(0,a.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,a.UD)(e)}finally{this.cleanupSession()}return e}async joinSession(e,t,i,n){const r=await this.socialConnectServiceClient.joinSession(e,t,i,n);return this.handleSessionResponse(r)}async getSessionInfo(e){const t=await this.socialConnectServiceClient.getSessionInfo(e);return t?d(t,null):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,a.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,a.UD)(e),null}return null}async getShortInviteLink(e,t){if(!e||!t)return null;const i=this.shortLinkCache.get(e);if(i)return i;try{const i={utm_campaign:null,utm_term:null,utm_medium:"share-link",utm_content:null,utm_source:"share-options-sheet"},r=[{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}`},s=await this.urlDispenserServiceClient.getShortUrl(t,{utmParameters:i,customData:r,linkPreview:a}),o={shareableUrl:(n=s).shareable_url,shareId:n.share_id,spotifyUri:n.spotify_uri};return this.shortLinkCache.set(e,o),o}catch(e){return(0,a.UD)(e),null}var n}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)}}},84369:(e,t,i)=>{"use strict";i.d(t,{x:()=>s});var n=i(97277),r=i(10808),a=i(14914);class s extends r.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,n.dI)(e));(0,a.HP)(t)&&this.emit(r.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,n.dI)(e));(0,a.Vl)(t)&&this.emit(r.n.SESSION_MESSAGE,t)}))}}},59777:(e,t,i)=>{"use strict";i.d(t,{o:()=>n});class n{async fetchCurrentSession(){return null}async createSession(){return null}async leaveSession(e){return!1}async deleteSession(e){return!1}async joinSession(e,t,i,n){return null}async getSessionInfo(){return null}async removeSessionMember(){return null}async kickAllParticipants(){return null}async setParticipantVolumeControl(){return null}onConnected(){}async setQueueOnlyMode(){return null}}},38691:(e,t,i)=>{"use strict";i.d(t,{G:()=>r});var n=i(10808);class r extends n.M{subscribeToUpdates(){}unsubscribeToUpdates(){}subscribeToMessages(){}unsubscribeToMessages(){}}},20247:(e,t,i)=>{"use strict";i.d(t,{K:()=>r,z:()=>a});var n=i(88485);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 a extends n.V{}},10808:(e,t,i)=>{"use strict";i.d(t,{M:()=>a,n:()=>r});var n=i(88485);let r=function(e){return e.SESSION_UPDATE="SESSION_UPDATE",e.SESSION_MESSAGE="SESSION_MESSAGE",e}({});class a extends n.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()}))}}},61314:(e,t,i)=>{"use strict";i.d(t,{M:()=>r});var n=i(86523);function r(){return(0,n.d)().getEnabled()}},42047:(e,t,i)=>{"use strict";i.d(t,{D:()=>o});var n=i(30758),r=i(86523),a=i(3394),s=i(14403);const o=()=>{const e=(0,r.d)(),t=(0,n.useContext)(a.a),i=(0,s.v)((e=>{const t=e.activeDevice??e.devices.find((e=>e.isLocal));if(t)return t.connectStateId}));return{currentSession:t,createSession:(0,n.useCallback)((()=>e.createSession()),[e]),leaveSession:(0,n.useCallback)((()=>e.leaveSession()),[e]),deleteSession:(0,n.useCallback)((()=>e.deleteSession()),[e]),joinSession:(0,n.useCallback)(((t,n,r)=>e.joinSession(t,n,r,i)),[i,e]),refreshCurrentSession:(0,n.useCallback)((()=>e.fetchCurrentSession()),[e]),getSessionInfo:(0,n.useCallback)((t=>e.getSessionInfo(t)),[e]),removeSessionMember:(0,n.useCallback)((t=>e.removeSessionMember(t)),[e]),kickAllParticipants:(0,n.useCallback)((t=>e.kickAllParticipants(t)),[e]),setQueueOnlyMode:(0,n.useCallback)((t=>e.setQueueOnlyMode(t)),[e]),setParticipantVolumeControl:(0,n.useCallback)((t=>e.setParticipantVolumeControl(t)),[e])}}},86523:(e,t,i)=>{"use strict";i.d(t,{d:()=>a});var n=i(92491),r=i(60102);function a(){return(0,r.N)(n.j)}},79163:(e,t,i)=>{"use strict";i.d(t,{J:()=>a});var n=i(30758),r=i(86523);function a(e,t){const i=(0,n.useRef)(t),a=(0,r.d)();i.current=t,(0,n.useEffect)((()=>a.getEvents().addListener(e,(e=>{i.current(e)}))),[a,e])}},67911:(e,t,i)=>{"use strict";i.d(t,{D:()=>r});var n=i(74987);class r{constructor(e){this.transport=e}onConnected(e){this.transport.on(n.TransportEvent.CONNECTED,e),this.transport.on(n.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}}},69052:(e,t,i)=>{"use strict";i.d(t,{_:()=>n,l:()=>r});let n=function(e){return e.DISABLED="DISABLED",e.RESTRICTED="RESTRICTED",e.ENABLED="ENABLED",e}({}),r=function(e){return e.NONE="NONE",e.UNKNOWN="UNKNOWN",e.FREE="FREE",e.PREMIUM="PREMIUM",e}({})},14914:(e,t,i)=>{"use strict";i.d(t,{HP:()=>r,RG:()=>a,Vl:()=>s,YM:()=>n});let n=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}({});function r(e){return"object"==typeof e&&null!==e&&"session"in e&&"reason"in e&&"string"==typeof e.reason&&e.reason in n}let a=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 s(e){return"object"==typeof e&&null!==e&&"userMessage"in e&&"string"==typeof e.userMessage&&e.userMessage in a}},89128:(e,t,i)=>{"use strict";i.d(t,{Bj:()=>r,T4:()=>a,kt:()=>s});var n=i(61544);function r(e,t){if(!t)return null;const i=(0,n.o_)(t);if(!i||!(0,n.AP)(i))return null;const r=(0,n.XI)(i.username);return e.find((e=>e.username===r))??null}function a(e){const t=e.getCurrentSession(),i=t?.sessionOwnerId;return i?t.sessionMembers.find((e=>e.id===i))??null:null}function s(e,t){if(!t||!function(e){return e.getCurrentSession()?.isSessionOwner??!1}(e))return!1;const i=e.getCurrentSession(),n=r(i?.sessionMembers??[],t),s=a(e);return!!n&&n?.username!==s?.username}},92017:(e,t,i)=>{"use strict";i.d(t,{U:()=>s});var n=i(74987),r=i(52276);const a="@webgate/social-connect";class s{constructor(e,t){this._transport=e,this._requestBuilder=t}onConnected(e){this._transport.on(n.TransportEvent.CONNECTED,e),this._transport.on(n.TransportEvent.RECONNECTED,e)}async fetchCurrentSession(){try{const{body:e}=await this._requestBuilder.build().withHost(`${a}/v2/sessions/current`).withJsonContentType().withoutMarket().send();return e}catch(e){if(e instanceof r.O&&404===e.status)return null;throw e}}async createSession(){const{body:e}=await this._requestBuilder.build().withHost(`${a}/v2/sessions/current_or_new?activate=true`).withJsonContentType().withoutMarket().send();return e}async leaveSession(e){try{return await this._requestBuilder.build().withMethod("POST").withHost(`${a}/v3/sessions/${e}/leave`).withJsonContentType().withoutMarket().send(),!0}catch(e){if(e instanceof r.O&&404===e.status)return!0;throw e}}async deleteSession(e){try{return await this._requestBuilder.build().withMethod("DELETE").withHost(`${a}/v3/sessions/${e}`).withJsonContentType().withoutMarket().send(),!0}catch(e){if(e instanceof r.O&&404===e.status)return!0;throw e}}async joinSession(e,t,i,n){const r=new URLSearchParams;r.set("playback_control","REMOTE"===i?"listen_and_control":"control"),r.set("join_type",t),n&&r.set("local_device_id",n);const{body:s}=await this._requestBuilder.build().withMethod("POST").withHost(`${a}/v2/sessions/join/${e}?${r.toString()}`).withJsonContentType().withoutMarket().send();return s}async getSessionInfo(e){try{const{body:t}=await this._requestBuilder.build().withHost(`${a}/v2/sessions/info/${e}`).withJsonContentType().withoutMarket().send();return t}catch(e){if(e instanceof r.O&&404===e.status)return null;throw e}}async removeSessionMember(e,t){const{body:i}=await this._requestBuilder.build().withMethod("POST").withHost(`${a}/v3/sessions/${e}/member/${t}/kick`).withJsonContentType().withoutMarket().send();return i}async kickAllParticipants(e){const{body:t}=await this._requestBuilder.build().withMethod("POST").withHost(`${a}/v3/sessions/${e}/participant/all/kick`).withJsonContentType().withoutMarket().send();return t}async setQueueOnlyMode(e){const{body:t}=await this._requestBuilder.build().withMethod("PUT").withHost(`${a}/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(`${a}/v2/sessions/current/volume_control/${e?"ENABLED":"DISABLED"}`).withJsonContentType().withoutMarket().send();return t}}},56376:(e,t,i)=>{"use strict";i.d(t,{L$:()=>l,Q2:()=>c,hV:()=>o,j2:()=>s,pr:()=>d,qc:()=>a,rO:()=>u});var n=i(79787),r=i(13797);const a=({albumArtists:e,albumName:t,albumType:i,shouldLocalize:a,i18n:s})=>{if(!i||!t||!e)return"";const o=i!==n._m.Ep?(e=>e.charAt(0).toUpperCase()+e.toLowerCase().slice(1))(i):i,l=(0,r.C)(i),c=`${t} - ${o} by ${e} | Spotify`,u=s.get("i18n.meta.album.title",t,l,e);return a?u:c},s=({artistName:e})=>e?`${e} | Spotify`:"",o=({showOrAudiobookName:e,type:t})=>e?`${e} | ${t} on Spotify`:"",l=({episodeOrChapterName:e,showOrAudiobookName:t,type:i})=>e&&t?`${e} - ${t} | ${i} on Spotify`:"",c=({playlistName:e,userName:t,isSpotifyOwned:i=!1})=>{if(!e||!t)return"";return`${e}${i?"":` - playlist by ${t}`} | ${i?"Spotify Playlist":"Spotify"}`},u=({i18n:e,trackArtistsList:t,trackName:i,shouldLocalize:n,disabled:r=!1})=>{if(!t||!i)return"";let a=`${i} - song and lyrics by ${t} | Spotify`,s=e.get("i18n.meta.track-lyrics.title",i,t);return r&&(a=`${i} - song by ${t} | Spotify`,s=e.get("i18n.meta.track.title",i,t)),n?s:a},d=({i18n:e,shouldLocalize:t})=>{const i=e.get("i18n.meta.home.title");return t?i:"Spotify - Web Player: Music for everyone"}},84640:(e,t,i)=>{"use strict";i.d(t,{N:()=>r,V:()=>a});let n=null;function r(e){n=e}function a(){if(null===n)throw new Error("Missing `instance`. Have you called `setTransportInstance` yet?");return n}},19117:(e,t,i)=>{"use strict";function n(e){return async()=>{const t=await e.getToken();if(null===t)throw new Error("Token is currently unavailable.");const{accessToken:i,accessTokenExpirationTimestampMs:n}=t;return[i,Math.floor(((n||0)-Date.now())/1e3)]}}i.d(t,{C:()=>n})},66824:(e,t,i)=>{"use strict";i.d(t,{F:()=>a});var n=i(19117);const r={disconnectBeforeUnload:!0,reconnectionRetries:3,requestMode:"fetch"};function a(e,t,i,a={}){return e({providers:{endpoints:t,token:(0,n.C)(i)},...r,...a})}},73781:(e,t,i)=>{"use strict";i.d(t,{M:()=>l});var n=i(23301);const r="https://apresolve.spotify.com/",a="https://api.spotify.com/";var s=function(e){return e.DEALER="dealer",e.WEBGATE="spclient",e}(s||{});const o=3e3;function l({timeout:e=o}={}){const t=function(e){const t=`${r}?type=${s.DEALER}&type=${s.WEBGATE}`;return async()=>{const i=new AbortController,n=setTimeout((()=>i.abort()),e);let r;try{const e=await fetch(t,{signal:i.signal});clearTimeout(n),r=await e.json()}catch(t){if(i.signal.aborted)throw new Error(`x-resolve request timed out after ${e} ms`);throw t}if(!Array.isArray(r[s.DEALER])||!Array.isArray(r[s.WEBGATE])||0===r[s.DEALER].length||0===r[s.WEBGATE].length)throw new Error("x-resolve responded with incomplete results");const o=r[s.DEALER][0],l=r[s.WEBGATE][0];return{dealer:`wss://${o.replace(/:443$/,"")}`,webgate:`https://${l.replace(/:443$/,"")}`,webapi:a}}}(e),i=(0,n.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 i(e)}}}},15405:(e,t,i)=>{"use strict";function n(e,t={}){return void 0===e?t:{...e,...t}}i.d(t,{K:()=>n})},52895:(e,t,i)=>{"use strict";i.d(t,{T:()=>r});var n=i(84844);class r{constructor(e){this.ubiLogger=e}logInteraction(e){return {interactionId:null,pageInstanceId:null};const t=this.ubiLogger.logInteraction.bind(this.ubiLogger),i=this.ubiLogger.getPageInstanceId()??void 0;if("ui_navigate"!==e.actionName){return{interactionId:t(e),pageInstanceId:i}}const n=this.formatUiNavigateEvent(e),r=t(n);return this.interaction={id:r,event:n},{interactionId:r,pageInstanceId:i}}logImpression(e){return;return this.ubiLogger.logImpression(e)}logClientLostFocus(){this.ubiLogger.logClientLostFocus()}logClientGainedFocus(){this.ubiLogger.logClientGainedFocus()}logNavigation(e){return;this.ubiLogger.logNavigationStart(e),this.ubiLogger.logNavigationEnd({pageId:e.pageId,entityUri:e.entityUri}),this.interaction=void 0}getInteractionId(e){if(!this.interaction)return;const{event:t,id:i}=this.interaction,n=t.actionParameterNames?.findIndex((e=>"destination"===e));if(void 0===n||-1===n)return;const r=t.actionParameterValues?.[n];if(r&&r===e)return i}formatUiNavigateEvent=e=>{const t=e.actionParameterNames?.findIndex((e=>"destination"===e));return void 0===t||-1===t?e:{...e,actionParameterValues:e.actionParameterValues?.map(((e,i)=>i!==t?e:(0,n.y)(e)??""))}}}},84844:(e,t,i)=>{"use strict";i.d(t,{y:()=>a});var n=i(61544);const r=new Set([n.NQ.ALBUM,n.NQ.ARTIST,n.NQ.PLAYLIST,n.NQ.PLAYLIST_V2,n.NQ.TRACK,n.NQ.EPISODE,n.NQ.SHOW,n.NQ.LOCAL_TRACK,n.NQ.PRERELEASE]),a=e=>{const t=(0,n.o_)(e);if(!t)return;if((0,n.Th)(t))return r.has(t.id)?t.toString().replace(":app:",":"):t.toString();if(r.has(t.type))return t.toString();const i=t.args||t.query&&[t.query]||t.category&&[t.category]||void 0,a=(0,n.bX)(t.type,i);return a?.toString()??void 0}},72531:(e,t,i)=>{"use strict";i.d(t,{J:()=>n.J});var n=i(23429)},68524:(e,t,i)=>{"use strict";i.d(t,{E:()=>a,J:()=>r});var n=i(30758);const r=(0,n.createContext)(null);function a(){const e=(0,n.useContext)(r);if(null===e)throw new Error("Trying to use 'UrlDispenserServiceContext' without 'UrlDispenserServiceProvider'!");return e}},23429:(e,t,i)=>{"use strict";i.d(t,{J:()=>a,p:()=>r});var n=i(33655);const r=(0,n.u)("UrlDispenserServiceClient");class a{constructor(e){this._builder=e}async getShortUrl(e,{utmParameters:t,customData:i,linkPreview:n}){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:i,link_preview:n,utm_parameters:t}).send();if(201===r.status)return r.body;throw new Error(`Failed to get short link for uri ${e}`)}}},48523:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});const n=(0,i(33655).u)("UserAPI")},43697:(e,t,i)=>{"use strict";i.d(t,{v:()=>r});var n=i(61544);function r(e){const t=(0,n.o_)(e);if(null===t||void 0===t.username)throw new Error("Invalid URI or URI does not contain username!");return t.username}},26119:(e,t,i)=>{"use strict";i.d(t,{IB:()=>s,J2:()=>l,Np:()=>c,kX:()=>u});var n=i(11808),r=i(36485),a=i(52840);const s={[a.h.en]:{displayName:"English",displayNameEn:"English"},[a.h.af]:{displayName:"Afrikaans",displayNameEn:"Afrikaans"},[a.h.am]:{displayName:"አማርኛ",displayNameEn:"Amharic"},[a.h.ar]:{displayName:"العَرَبِيَّة",displayNameEn:"Arabic",isRTL:!0},[a.h.arEG]:{displayName:"عربي مصري",displayNameEn:"Arabic (Egypt)",isRTL:!0},[a.h.arMA]:{displayName:"العَرَبِيَّة مغربي",displayNameEn:"Arabic (Morocco)",isRTL:!0},[a.h.arSA]:{displayName:"العربية السعودية",displayNameEn:"Arabic (Saudi Arabia)",isRTL:!0},[a.h.az]:{displayName:"Azərbaycanca",displayNameEn:"Azerbaijani"},[a.h.bg]:{displayName:"Български",displayNameEn:"Bulgarian"},[a.h.bho]:{displayName:"भोजपुरी",displayNameEn:"Bhojpuri"},[a.h.bn]:{displayName:"বাংলা",displayNameEn:"Bengali"},[a.h.bs]:{displayName:"Bosanski",displayNameEn:"Bosnian"},[a.h.ca]:{displayName:"Català",displayNameEn:"Catalan"},[a.h.cs]:{displayName:"Čeština",displayNameEn:"Czech"},[a.h.da]:{displayName:"Dansk",displayNameEn:"Danish"},[a.h.de]:{displayName:"Deutsch",displayNameEn:"German"},[a.h.el]:{displayName:"Eλληνικά",displayNameEn:"Greek"},[a.h.enGB]:{displayName:"English",displayNameEn:"United Kingdom"},[a.h.es]:{displayName:"Español de España",displayNameEn:"European Spanish"},[a.h.esAR]:{displayName:"Español (Argentina)",displayNameEn:"Spanish (Argentina)"},[a.h.esMX]:{displayName:"Español (México)",displayNameEn:"Spanish (Mexico)"},[a.h.es419]:{displayName:"Español de Latinoamérica",displayNameEn:"Latin American Spanish"},[a.h.et]:{displayName:"Eesti",displayNameEn:"Estonian"},[a.h.eu]:{displayName:"Euskara",displayNameEn:"Basque"},[a.h.fa]:{displayName:"فارسی",displayNameEn:"Persian",isRTL:!0},[a.h.fi]:{displayName:"Suomeksi",displayNameEn:"Finnish"},[a.h.fil]:{displayName:"Filipino",displayNameEn:"Filipino"},[a.h.fr]:{displayName:"Français",displayNameEn:"French"},[a.h.frCA]:{displayName:"Français Canadien",displayNameEn:"Canadian French"},[a.h.gl]:{displayName:"Galego",displayNameEn:"Galician"},[a.h.gu]:{displayName:"ગુજરાતી",displayNameEn:"Gujarati"},[a.h.he]:{displayName:"עברית",displayNameEn:"Hebrew",isRTL:!0},[a.h.hi]:{displayName:"हिन्दी",displayNameEn:"Hindi"},[a.h.hr]:{displayName:"Hrvatski",displayNameEn:"Croatian"},[a.h.hu]:{displayName:"Magyar",displayNameEn:"Hungarian"},[a.h.id]:{displayName:"Bahasa Indonesia",displayNameEn:"Indonesian"},[a.h.is]:{displayName:"Íslenska",displayNameEn:"Icelandic"},[a.h.it]:{displayName:"Italiano",displayNameEn:"Italian"},[a.h.ja]:{displayName:"日本語",displayNameEn:"Japanese"},[a.h.kn]:{displayName:"ಕನ್ನಡ",displayNameEn:"Kannada"},[a.h.ko]:{displayName:"한국어",displayNameEn:"Korean"},[a.h.lt]:{displayName:"Lietuvių",displayNameEn:"Lithuanian"},[a.h.lv]:{displayName:"Latviešu",displayNameEn:"Latvian"},[a.h.mk]:{displayName:"Македонски",displayNameEn:"Macedonian"},[a.h.ml]:{displayName:"മലയാളം",displayNameEn:"Malayalam"},[a.h.mr]:{displayName:"मराठी",displayNameEn:"Marathi"},[a.h.ms]:{displayName:"Melayu",displayNameEn:"Malay"},[a.h.nb]:{displayName:"Norsk",displayNameEn:"Norwegian"},[a.h.ne]:{displayName:"नेपाली",displayNameEn:"Nepali"},[a.h.nl]:{displayName:"Nederlands",displayNameEn:"Dutch"},[a.h.or]:{displayName:"ଓଡ଼ିଆ",displayNameEn:"Odia"},[a.h.paIN]:{displayName:"ਪੰਜਾਬੀ",displayNameEn:"Punjabi"},[a.h.paPK]:{displayName:"پنجابی",displayNameEn:"Punjabi (Naskh)",isRTL:!0},[a.h.pl]:{displayName:"Polski",displayNameEn:"Polish"},[a.h.ptBR]:{displayName:"Português do Brasil",displayNameEn:"Brazilian Portuguese"},[a.h.ptPT]:{displayName:"Português",displayNameEn:"European Portuguese"},[a.h.ro]:{displayName:"Română",displayNameEn:"Romanian"},[a.h.ru]:{displayName:"Русский",displayNameEn:"Russian"},[a.h.sk]:{displayName:"Slovenčina",displayNameEn:"Slovak"},[a.h.sl]:{displayName:"Slovenski",displayNameEn:"Slovenian"},[a.h.sr]:{displayName:"Srpski",displayNameEn:"Serbian"},[a.h.sv]:{displayName:"Svenska",displayNameEn:"Swedish"},[a.h.sw]:{displayName:"Kiswahili",displayNameEn:"Swahili"},[a.h.ta]:{displayName:"தமிழ்",displayNameEn:"Tamil"},[a.h.te]:{displayName:"తెలుగు",displayNameEn:"Telugu"},[a.h.th]:{displayName:"ภาษาไทย",displayNameEn:"Thai"},[a.h.tr]:{displayName:"Türkçe",displayNameEn:"Turkish"},[a.h.uk]:{displayName:"Українська",displayNameEn:"Ukrainian"},[a.h.ur]:{displayName:"اردو",displayNameEn:"Urdu",isRTL:!0},[a.h.vi]:{displayName:"Tiếng Việt",displayNameEn:"Vietnamese"},[a.h.zhCN]:{displayName:"简体中文",displayNameEn:"Simplified Chinese"},[a.h.zhHK]:{displayName:"繁體中文 (香港)",displayNameEn:"Chinese (Traditional) Hong Kong"},[a.h.zhTW]:{displayName:"中文",displayNameEn:"Traditional Chinese"},[a.h.zu]:{displayName:"IsiZulu",displayNameEn:"Zulu"}},o=[a.h.en,a.h.af,a.h.am,a.h.ar,a.h.arEG,a.h.arMA,a.h.arSA,a.h.az,a.h.bg,a.h.bho,a.h.bn,a.h.bs,a.h.ca,a.h.cs,a.h.da,a.h.de,a.h.el,a.h.enGB,a.h.es,a.h.es419,a.h.esAR,a.h.esMX,a.h.et,a.h.eu,a.h.fa,a.h.fi,a.h.fil,a.h.fr,a.h.frCA,a.h.gl,a.h.gu,a.h.he,a.h.hi,a.h.hr,a.h.hu,a.h.id,a.h.is,a.h.it,a.h.ja,a.h.kn,a.h.ko,a.h.lt,a.h.lv,a.h.mk,a.h.ml,a.h.mr,a.h.ms,a.h.nb,a.h.ne,a.h.nl,a.h.or,a.h.paIN,a.h.paPK,a.h.pl,a.h.ptBR,a.h.ptPT,a.h.ro,a.h.ru,a.h.sk,a.h.sl,a.h.sr,a.h.sv,a.h.sw,a.h.ta,a.h.te,a.h.th,a.h.tr,a.h.uk,a.h.ur,a.h.vi,a.h.zhCN,a.h.zhHK,a.h.zhTW,a.h.zu],l=[...o],c=[...o],u=e=>{switch(e){case a.h.en:return n.Ru.get("locale.en");case a.h.af:return n.Ru.get("locale.af");case a.h.am:return n.Ru.get("locale.am");case a.h.ar:return n.Ru.get("locale.ar");case a.h.arEG:return n.Ru.get("locale.ar-EG");case a.h.arMA:return n.Ru.get("locale.ar-MA");case a.h.arSA:return n.Ru.get("locale.ar-SA");case a.h.az:return n.Ru.get("locale.az");case a.h.bg:return n.Ru.get("locale.bg");case a.h.bho:return n.Ru.get("locale.bho");case a.h.bn:return n.Ru.get("locale.bn");case a.h.bs:return n.Ru.get("locale.bs");case a.h.ca:return n.Ru.get("locale.ca");case a.h.cs:return n.Ru.get("locale.cs");case a.h.da:return n.Ru.get("locale.da");case a.h.de:return n.Ru.get("locale.de");case a.h.el:return n.Ru.get("locale.el");case a.h.enGB:return n.Ru.get("locale.en-GB");case a.h.es:return n.Ru.get("locale.es");case a.h.es419:return n.Ru.get("locale.es-419");case a.h.esAR:return n.Ru.get("locale.es-AR");case a.h.esMX:return n.Ru.get("locale.es-MX");case a.h.et:return n.Ru.get("locale.et");case a.h.eu:return n.Ru.get("locale.eu");case a.h.fa:return n.Ru.get("locale.fa");case a.h.fi:return n.Ru.get("locale.fi");case a.h.fil:return n.Ru.get("locale.fil");case a.h.fr:return n.Ru.get("locale.fr");case a.h.frCA:return n.Ru.get("locale.fr-CA");case a.h.gl:return n.Ru.get("locale.gl");case a.h.gu:return n.Ru.get("locale.gu");case a.h.he:return n.Ru.get("locale.he");case a.h.hi:return n.Ru.get("locale.hi");case a.h.hr:return n.Ru.get("locale.hr");case a.h.hu:return n.Ru.get("locale.hu");case a.h.id:return n.Ru.get("locale.id");case a.h.is:return n.Ru.get("locale.is");case a.h.it:return n.Ru.get("locale.it");case a.h.ja:return n.Ru.get("locale.ja");case a.h.kn:return n.Ru.get("locale.kn");case a.h.ko:return n.Ru.get("locale.ko");case a.h.lt:return n.Ru.get("locale.lt");case a.h.lv:return n.Ru.get("locale.lv");case a.h.mk:return n.Ru.get("locale.mk");case a.h.ml:return n.Ru.get("locale.ml");case a.h.mr:return n.Ru.get("locale.mr");case a.h.ms:return n.Ru.get("locale.ms");case a.h.nb:return n.Ru.get("locale.nb");case a.h.ne:return n.Ru.get("locale.ne");case a.h.nl:return n.Ru.get("locale.nl");case a.h.or:return n.Ru.get("locale.or");case a.h.paIN:return n.Ru.get("locale.pa-IN");case a.h.paPK:return n.Ru.get("locale.pa-PK");case a.h.pl:return n.Ru.get("locale.pl");case a.h.ptBR:return n.Ru.get("locale.pt-BR");case a.h.ptPT:return n.Ru.get("locale.pt-PT");case a.h.ro:return n.Ru.get("locale.ro");case a.h.ru:return n.Ru.get("locale.ru");case a.h.sk:return n.Ru.get("locale.sk");case a.h.sl:return n.Ru.get("locale.sl");case a.h.sr:return n.Ru.get("locale.sr");case a.h.sv:return n.Ru.get("locale.sv");case a.h.sw:return n.Ru.get("locale.sw");case a.h.ta:return n.Ru.get("locale.ta");case a.h.te:return n.Ru.get("locale.te");case a.h.th:return n.Ru.get("locale.th");case a.h.tr:return n.Ru.get("locale.tr");case a.h.uk:return n.Ru.get("locale.uk");case a.h.ur:return n.Ru.get("locale.ur");case a.h.vi:return n.Ru.get("locale.vi");case a.h.zhCN:return n.Ru.get("locale.zh-CN");case a.h.zhHK:return n.Ru.get("locale.zh-HK");case a.h.zhTW:return n.Ru.get("locale.zh-TW");case a.h.zu:return n.Ru.get("locale.zu");default:return(0,r.d)(e)}}},79787:(e,t,i)=>{"use strict";i.d(t,{$c:()=>_,B3:()=>s,Cx:()=>p,EK:()=>v,GN:()=>N,I2:()=>c,I8:()=>d,I_:()=>g,Ll:()=>C,Nm:()=>r,PJ:()=>o,UG:()=>T,Yu:()=>f,_m:()=>a,_w:()=>h,by:()=>m,cf:()=>A,j3:()=>x,nz:()=>E,pb:()=>l,r7:()=>S,tC:()=>y,to:()=>b,tv:()=>I,x7:()=>u,xE:()=>n});let n=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}({}),a=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}({}),s=function(e){return e.Autobiography="AUTOBIOGRAPHY",e.Biography="BIOGRAPHY",e}({}),o=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}({}),l=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}({}),c=function(e){return e.EventPage="EVENT_PAGE",e.TicketPage="TICKET_PAGE",e.Unknown="UNKNOWN",e}({}),u=function(e){return e.Explicit="EXPLICIT",e.NineteenPlus="NINETEEN_PLUS",e.None="NONE",e.Unknown="UNKNOWN",e}({}),d=function(e){return e.Curate="CURATE",e.Uncurate="UNCURATE",e}({}),m=function(e){return e.Day="DAY",e.Hour="HOUR",e.Minute="MINUTE",e.Month="MONTH",e.Year="YEAR",e}({}),p=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),h=function(e){return e.Completed="COMPLETED",e.InProgress="IN_PROGRESS",e.NotStarted="NOT_STARTED",e}({}),g=function(e){return e.Episode="EPISODE",e.PodcastEpisode="PODCAST_EPISODE",e.Unknown="UNKNOWN",e}({}),f=function(e){return e.Events="EVENTS",e.LikedSongs="LIKED_SONGS",e.Prereleases="PRERELEASES",e.YourEpisodes="YOUR_EPISODES",e.YourEpisodesV2="YOUR_EPISODES_V2",e}({}),v=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}({}),y=function(e){return e.Description="DESCRIPTION",e.Guest="GUEST",e.Host="HOST",e.Lyrics="LYRICS",e.Name="NAME",e.UnknownField="UNKNOWN_FIELD",e}({}),b=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}({}),_=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}({}),E=function(e){return e.AfterUid="AFTER_UID",e.BeforeUid="BEFORE_UID",e.BottomOfPlaylist="BOTTOM_OF_PLAYLIST",e.TopOfPlaylist="TOP_OF_PLAYLIST",e}({}),C=function(e){return e.Audio="AUDIO",e.Mixed="MIXED",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),x=function(e){return e.AddToLibrary="ADD_TO_LIBRARY",e.Navigate="NAVIGATE",e.NotInterested="NOT_INTERESTED",e.Play="PLAY",e.Share="SHARE",e}({}),S=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}({}),A=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}({}),T=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}({}),I=function(e){return e.Album="ALBUM",e.Episode="EPISODE",e.Unknown="UNKNOWN",e.WhatsNewFeedNotification="WHATS_NEW_FEED_NOTIFICATION",e}({}),N=function(e){return e.Hidden="HIDDEN",e.New="NEW",e.Seen="SEEN",e.Unknown="UNKNOWN",e}({})},49669:(e,t,i)=>{"use strict";i.d(t,{K:()=>r,a:()=>a});var n=i(71817);function r(e){return e.items.map((({uri:e,profile:{name:t}})=>({type:n.c.ARTIST,uri:e,name:t})))}function a(e){return e?e.items.map((({data:e})=>"Artist"===e.__typename?{type:n.c.ARTIST,uri:e.uri,name:e.profile.name}:null)).filter((e=>!!e)):[]}},4323:(e,t,i)=>{"use strict";i.d(t,{V:()=>r,r:()=>a});var n=i(79787);function r(e){return e?.label===n.x7.Explicit}function a(e){return e?.label===n.x7.NineteenPlus}},4055:(e,t,i)=>{"use strict";i.d(t,{Cg:()=>s,JO:()=>a,mp:()=>l});var n=i(79787),r=i(36485);function a(e,t=null){if(null===e){return(t??new Date(0)).toISOString()}return e.isoString}function s(e){return null===e?null:a(e)}function o(e){const t=e?.precision;switch(t){case n.by.Minute:case n.by.Hour:case n.by.Day:return"day";case n.by.Month:return"month";case n.by.Year:case void 0:return"year";default:return(0,r.d)(t)}}function l(e,t=null){return{date:a(e,t),precision:o(e)}}},18573:(e,t,i)=>{"use strict";i.d(t,{Wx:()=>c,fS:()=>d,jM:()=>l});var n=i(79787),r=i(71817),a=i(85793),s=i(19617),o=i(8035);function l(e){return{type:r.c.SHOW,uri:e.uri,name:e.name,publisher:e.publisher?.name??"",images:(0,s.r)(e.coverArt),mediaType:(0,o.w)(e.mediaType)}}function c(e,t){const i=e?.paywallContent??!1,r=t.reason;return{isPaywalled:i,isUserSubscribed:i&&r!==n.$c.PaymentRequired}}function u(e,t){return{milliseconds:e.totalMilliseconds-t.playPositionMilliseconds}}function d(e,t){let i=a.M.Unknown;switch(t.state){case n._w.NotStarted:i=a.M.NotStarted;break;case n._w.InProgress:i=a.M.InProgress;break;case n._w.Completed:i=a.M.Completed}return{timeLeft:u(e,t),state:i}}},5103:(e,t,i)=>{"use strict";function n(e,t,i){if(null!==e&&e.__typename!==t)throw new Error(i||`${e} is not a "${t}"`)}function r(e,t){try{!function(e){if(null===e)throw new Error(`${e} is \`null\``)}(e);const i=t.split(".");let n=e;for(;i.length;){n=n[i.shift()]}return function(e){if(e.message)throw new Error(`${e} is a \`PathfinderError\``)}(n),n}catch{throw new Error(`Could not get "${t}"!`)}}function a(e,t,i){try{return r(e,t)}catch{return i}}i.d(t,{Jt:()=>r,j:()=>n,no:()=>a})},19617:(e,t,i)=>{"use strict";function n(e){return null!==e?e.sources.map(r):[]}function r(e){return{url:e.url,width:e.width,height:e.height}}i.d(t,{m:()=>r,r:()=>n})},8035:(e,t,i)=>{"use strict";i.d(t,{S:()=>o,w:()=>s});var n=i(79787),r=i(54443),a=i(36485);function s(e){switch(e){case n.Ll.Audio:return r.Q.AUDIO;case n.Ll.Video:return r.Q.VIDEO;case n.Ll.Mixed:return r.Q.MIXED;case n.Ll.Unknown:return r.Q.UNKNOWN;default:return(0,a.d)(e)}}function o(e){return null!==e?[e.code]:[]}},84773:(e,t,i)=>{"use strict";i.d(t,{S:()=>a,h:()=>o});var n=i(71817),r=i(19617);function a(e){return e.items.map((({uri:e,profile:{name:t}})=>({type:n.c.ARTIST,uri:e,name:t})))}function s({items:e}){if(0===e.length)return{type:n.c.ARTIST,uri:"",name:""};const{uri:t,profile:{name:i}}=e[0];return{type:n.c.ARTIST,uri:t,name:i}}function o(e){return{type:n.c.ALBUM,uri:e.uri,name:e.name,images:(0,r.r)(e.coverArt),artist:s(e.artists)}}},62943:(e,t,i)=>{"use strict";i.d(t,{AE:()=>W,AM:()=>F,Br:()=>T,CN:()=>b,CX:()=>j,Cf:()=>G,Cn:()=>I,Dq:()=>U,H_:()=>p,Iq:()=>V,LZ:()=>Z,Mc:()=>ee,NL:()=>P,O1:()=>ne,Ol:()=>s,QP:()=>k,Ri:()=>M,S3:()=>S,Sd:()=>d,Tc:()=>$,UP:()=>te,V1:()=>X,Vi:()=>C,WA:()=>Q,Wm:()=>m,XV:()=>A,YV:()=>r,Yw:()=>f,_9:()=>ce,_E:()=>K,cc:()=>x,d8:()=>v,gW:()=>N,gl:()=>oe,hU:()=>D,hd:()=>ue,iL:()=>H,ic:()=>le,jO:()=>w,jY:()=>h,kA:()=>_,kr:()=>O,mA:()=>J,o4:()=>u,oH:()=>se,po:()=>B,rW:()=>re,t1:()=>L,tF:()=>y,tR:()=>ae,uy:()=>Y,vU:()=>q,vq:()=>c,vr:()=>g,x_:()=>z,yf:()=>E,zu:()=>R});var n=i(28835);let r=function(e){return e.DISABLED="DISABLED",e.TWO_USER="TWO_USER",e.MULTI_USER="MULTI_USER",e}({}),a=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT="variant",e}({}),s=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,n.m9)({name:"exampleOfSharedPropertyThatDoesNotExist",description:"Example of enabling a propoerty that is shared between Desktop, Mobile and Embed",default:!1});const c=(0,n.m9)({name:"enableOfflineVideoDev",description:"Enables Spotify videos to be offlined on DesktopX. Used during feature development",default:!1}),u=(0,n.m9)({name:"betamaxWidevineVersionSupported",description:"true if the version of widevine used is still supported.",default:!0}),d=(0,n.m9)({name:"betamaxBoomboxAudioSync",description:"true if video/audio sync is enabled (experimental).",default:!1}),m=(0,n.HW)({name:"betamaxOfflineTargetBitrate",description:"targetBitrate to use when offlining. The closest to this bitrate to this is used.",default:12e5,lower:1e3,upper:1e9}),p=(0,n.m9)({name:"enableBetamaxSdkSubtitlesDesktopX",description:"Enables subtitles setting and rendering subtitles on the betamax SDK on DesktopX",default:!0}),h=(0,n.m9)({name:"enableBetamaxSdkMuxDesktopXDev",description:"Enables MUX library for development on Desktop X",default:!1}),g=((0,n.m9)({name:"enableVideoOnVideoSaiDev",description:"Enables video-on-video SAI on videos Desktop X. Used during feature development",default:!0}),(0,n.m9)({name:"enableBetamaxSdkVmp",description:"Enables client-side widevine VMP (verified media path) on betamax SDK.",default:!0})),f=(0,n.m9)({name:"enableBetamaxSdkVideoOnVideoSai",description:"Enables video-on-video SAI on videos Desktop X",default:!1}),v=(0,n.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}),y=(0,n.HW)({name:"betamaxSdkRetryAttempts",description:"The number of times to retry on network",default:2,upper:100,lower:1}),b=(0,n.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}),_=(0,n.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}),E=(0,n.m9)({name:"betamaxVideoAutoplay",description:"Enables an alternative method for video autoplay to address Mux metrics",default:!1}),C=(0,n.m9)({name:"enableBetamaxSdkInitialLowBitrateV2",description:"Optimize startup time by choosing the lowest quality for the first segment",default:!0}),x=(0,n.m9)({name:"enableBetamaxSdkSurfaceBasedResolutionCapV2",description:"Enables surface-based resolution cap for adaptive video on betamax SDK",default:!0}),S=(0,n.HW)({name:"betamaxSdkMaxBitrate",description:"Sets the max bitrate cap for adaptive video on betamax SDK (0=disabled)",default:0,upper:1e8,lower:0}),A=(0,n.m9)({name:"enableBetamaxSdkPlayerPool",description:"Enables player pool for betamax SDK",default:!1}),T=(0,n.HW)({name:"betamaxSdkPlayerPoolSize",description:"Sets the player pool size, should it be enabled",default:20,upper:100,lower:0}),I=(0,n.m9)({name:"enableVideoPip",description:"Enables desktop picture-in-picture surface using betamax SDK.",default:!1}),N=(0,n.m9)({name:"betamaxUsePendingStorage",description:"true if pending storage is used to generate BetamaxPlaybackSession messages, false if using only the normal event sender.",default:!0}),w=(0,n.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,n.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}),k=(0,n.m9)({name:"enableVideoDebugOverlay",description:"Show debug overlay on video player with information about the current video",default:!1}),O=(0,n.m9)({name:"enableStreamReportingTracker3",description:"Enables use of the StreamReporting module for video playback",default:!0}),P=(0,n.m9)({name:"enableStreamReportingTrackerStopVideoPlaybackOnError",description:"The StreamReportingTracker module stop video playback when an error in reporting occurs",default:!1}),L=(0,n.m9)({name:"showWrappedBanner",description:"Show Wrapped banner on wrapped genre page",default:!1}),j=(0,n.BL)({name:"enableBlendInvitation",description:"Enable users to join Blends through client-web",values:r,default:r.DISABLED}),D=(0,n.m9)({name:"enableSubtitlesUsingHarmony",description:"Enable subtitles using Harmony",default:!1}),M=((0,n.m9)({name:"enableUriLinks",description:"Enable the `uri_link` type in Web API /views",default:!1}),(0,n.BL)({name:"enableI18nRoutes",description:"Enable internationalized routes for all locales in EXPERIMENTAL_INTERNATIONALIZED_LOCALES.",values:a,default:a.DEFAULT}),(0,n.m9)({name:"enableCastConnect",description:"Enable Google's new Cast Connect feature for Android TV from Web Player's Cast Sender implementation",default:!1})),U=((0,n.m9)({name:"enableNewEpisodes",description:"Enable the new episodes view",default:!1}),(0,n.BL)({name:"merchVariantExperiment",description:"Merch shelf re-ordering experiment on Artist Profile Page(A/B/C test)",values:s,default:s.DEFAULT})),B=((0,n.BL)({name:"OnTourVariantExperiment",description:"On Tour shelf re-ordering experiment on Artist Page(A/B/C test)",values:o,default:o.DEFAULT}),(0,n.m9)({name:"enableMerchOnAlbum",description:"Enable merch shelf view on album page",default:!1}),(0,n.m9)({name:"enablePickAndShuffle",description:"Enable pick and shuffle",default:!1})),F=((0,n.m9)({name:"enableNewTicketingSection",description:"Enable New Ticketing section on Concert Event Pages",default:!1}),(0,n.m9)({name:"enableEqualizer",description:"Enable audio equalizer for Desktop and Web Player",default:!1})),H=(0,n.m9)({name:"betamaxFilterNegativeDuration",description:"Remove updates to esperanto for duration that is negative",default:!0}),V=(0,n.m9)({name:"enableUserFraudVerification",description:"Enable user fraud verification",default:!1}),G=((0,n.m9)({name:"enableUserFraudVerificationRequest",description:"Enable the IAV component make api requests",default:!0}),(0,n.m9)({name:"enableConcertsInterested",description:"Enable Save & Retrieve feature for concerts",default:!1}),(0,n.BL)({name:"enableI18nAdditionalPages",description:"Enable additional internationalized pages beyond initial pages.",values:l,default:l.DEFAULT}),(0,n.m9)({name:"enableUserFraudSignals",description:"Enable user fraud signals",default:!1}),(0,n.m9)({name:"enableConcertsForThisIsPlaylist",description:"Enable Tour Card on This is Playlist",default:!1}),(0,n.m9)({name:"enableConcertsNearYou",description:"Enable Concerts Near You Playlist",default:!1})),z=(0,n.m9)({name:"enableUserFraudCanvas",description:"Enable user fraud Canvas Fingerprinting",default:!1}),W=((0,n.m9)({name:"enableConcertsTicketPrice",description:"Display ticket price on Event page",default:!1}),(0,n.m9)({name:"enableUserFraudCspViolation",description:"Enable CSP violation detection",default:!0}),(0,n.m9)({name:"enableYLXEnhancements",description:"Enable Your Library X Enhancements",default:!1})),K=(0,n.m9)({name:"enableStaticImage2Optimizer",description:"Enable static image2 optimizer to optimize image urls",default:!1}),Y=(0,n.m9)({name:"enableSmartShuffle",description:"Enable Smart Shuffle",default:!1}),q=((0,n.m9)({name:"enableInteractionLogger",description:"Enables the old interaction logger",default:!0}),(0,n.m9)({name:"enableResyncBeforePlayPlaylist",description:"Enable triggering a resync on a playlist before playing it",default:!0}));(0,n.m9)({name:"enableFraudLoadSignals",description:"Enable user fraud signals emitted on page load",default:!0});let Z=function(e){return e.CONTROL="CONTROL",e.SYSTEM_LANGUAGE="SYSTEM_LANGUAGE",e.ALL_LANGUAGES="ALL_LANGUAGES",e}({});const $=(0,n.BL)({name:"enableLyricsTranslations",description:"Enable Lyrics Translations",values:Z,default:Z.CONTROL}),Q=(0,n.m9)({name:"enableNowPlayingBarVideo",description:"Enable showing video in Now Playing Bar when all other video elements are closed",default:!1}),J=(0,n.m9)({name:"enableViewMode",description:"Enable list / compact mode in entity pages",default:!1}),X=(0,n.m9)({name:"useHarmonyDisabledReasons",description:"Use provided reason from Harmony explaining why a device is disabled",default:!1}),ee=((0,n.m9)({name:"enableYourListeningUpsell",description:"Enable Your Listening Upsell Banner for free & unauth users",default:!1}),(0,n.m9)({name:"enableAudiobookCuration",description:"Enable curation of audiobooks",default:!1})),te=(0,n.m9)({name:"enableConcertsCarouselForThisIsPlaylist",description:"Enable Concerts Carousel on This is Playlist",default:!1});let ie=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT_A="variant-a",e.VARIANT_B="variant-b",e}({});(0,n.BL)({name:"enableILRShow",description:"Enable internal link recommender component for show pages",values:ie,default:ie.DEFAULT}),(0,n.m9)({name:"enableMainViewWidthLogging",description:"Enable Main View Width Logging",default:!1});const ne=(0,n.m9)({name:"enablePlaybackBarAnimation",description:"Enable the animation of the playback bar",default:!1}),re=(0,n.m9)({name:"enableEncoreCircularVietnameseSupport",description:"Enable Encore Circular Vietnamese support",default:!1}),ae=(0,n.m9)({name:"enableNewShuffleModeOrder",description:"Enable new Shuffle Mode order where Smart Shuffle comes before normal Shuffle",default:!1}),se=(0,n.m9)({name:"enableDeeplinkSaveForLaterIntent",description:"Enable the deeplink intent to save an entity in user's library",default:!1}),oe=(0,n.m9)({name:"enableCentralisedSmartShuffle",description:"Enable centralised Smart Shuffle",default:!1}),le=(0,n.m9)({name:"southKoreaNftTrackLyricsCompliance",description:"South Korea New Free Tier compliance updates for track page lyrics",default:!1});let ce=function(e){return e.DEFAULT="cosmos",e.ESPERANTO="esperanto",e}({});const ue=(0,n.BL)({name:"enablePodcastSpeedControlEndpoint",description:"Feature flag that selects podcast speed controls endpoints esperanto or cosmos.",values:ce,default:ce.DEFAULT})},88923:(e,t,i)=>{"use strict";i.d(t,{s:()=>n});const n={ALBUM:"ALBUM",AUDIOBOOK:"AUDIOBOOK",EP:"EP",COMPILATION:"COMPILATION",PODCAST:"PODCAST",SINGLE:"SINGLE",UNKNOWN:"UNKNOWN"}},71817:(e,t,i)=>{"use strict";i.d(t,{c:()=>n});let n=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}({})},85793:(e,t,i)=>{"use strict";i.d(t,{C:()=>n,M:()=>r});let n=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}({})},54443:(e,t,i)=>{"use strict";i.d(t,{Q:()=>n});let n=function(e){return e[e.UNKNOWN=-1]="UNKNOWN",e[e.MIXED=0]="MIXED",e[e.AUDIO=1]="AUDIO",e[e.VIDEO=2]="VIDEO",e}({})},93561:(e,t,i)=>{"use strict";i.d(t,{P:()=>n});let n=function(e){return e.I18nSEO="i18nSEO",e.I18nAdditionalPages="i18nap",e.PlaylistInternalTrackLinks="pitl",e.TrackPageEnhanced="tpe",e.TrackPageLinksNoLyrics="tplnl",e.TrackPageNoLyrics="tpnl",e.EpisodeDiscovery="ed",e.YourSoundCapsule="ysc",e.SSRHome="ssrh",e.ChartsMVPVariantA="cmvpv-a",e.ChartsMVPVariantB="cmvpv-b",e.ChartsMVPVariantC="cmvpv-c",e.SSRMasthead="ssrm",e}({})},7353:(e,t,i)=>{"use strict";function n(e){return null!==e}i.d(t,{P:()=>n})},25828:(e,t,i)=>{"use strict";i.d(t,{g:()=>n});const n=e=>t=>Object.values(e).includes(t)},36485:(e,t,i)=>{"use strict";function n(e,t){throw new Error(t??`Unexpectedly hit unreachable code! Unhandled discriminated union member: ${JSON.stringify(e)}`)}function r(e,t){try{n(e,t)}catch(e){console.error(e)}}i.d(t,{d:()=>n,k:()=>r})},74888:(e,t,i)=>{"use strict";i.d(t,{PW:()=>d,ie:()=>m,lM:()=>p});var n=i(14467);let r=()=>{window.location.reload()},a=e=>{window.location.assign(e)},s=()=>window.location.origin,o=()=>window.location.href;const l={reload(){r()},assign(e){a(e)},get origin(){return s()},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=`${n.$K}${e.pathname}`,e.toString()}return l.href},u=(e,t)=>{var i;t&&(e+=`&${i=t,Object.keys(i).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(i[e]).replace(/%7C/g,"|")}`)).join("&")}`),l.assign(e)},d=e=>{const t=`https://accounts.spotify.com/login?continue=${encodeURIComponent(c())}`;u(t,e)},m=()=>{const e=`https://www.spotify.com/signup?forward_url=${encodeURIComponent(c())}`;u(e)},p=()=>{window.addEventListener("storage",(e=>{"login_success"===e.key&&(window.focus(),window.localStorage.removeItem("login_success"),l.reload())}))}},97277:(e,t,i)=>{"use strict";i.d(t,{U5:()=>s,dI:()=>r,sH:()=>a,tX:()=>l,xJ:()=>o});var n=i(24848);function r(e){return(new TextDecoder).decode(e)}function a(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);const t=new Uint8Array(e.length);for(let i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}function s(e){return Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")}function o(e){if(e.length%2!=0)throw new Error("Invalid encoding!");const t=e.length/2,i=new Array(t);for(let n=0,r=0;n<t;++n,r+=2){const t=parseInt(e.charAt(r),16),a=parseInt(e.charAt(r+1),16);if(Number.isNaN(t)||Number.isNaN(a))throw new Error("Invalid encoding!");i[n]=t<<4|a}return Uint8Array.from(i)}function l(e){const t=new Uint8Array(n.util.base64.length(e));return n.util.base64.decode(e,t,0),t}},10132:(e,t,i)=>{"use strict";function n(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;const i=e?Object.keys(e):[],n=t?Object.keys(t):[];return i.length===n.length&&i.every((i=>Object.prototype.hasOwnProperty.call(t,i)&&e[i]===t[i]))}i.d(t,{a:()=>n})},15847:(e,t,i)=>{"use strict";i.d(t,{ad:()=>r,gD:()=>l,rh:()=>a,s7:()=>o});var n=i(11808);const r=e=>new Date(e),a=(e,t,i,n)=>{const r=6e4*e.getTimezoneOffset(),a=i??{year:"numeric",month:"long",day:"numeric",weekday:"long"};return new Date(e.valueOf()+r).toLocaleDateString(t,o(a,n))},s=["year","month","weekday","day","hour","minute","second"];function o(e,t){if(void 0===t)return e;const i={...e},n=s.indexOf(t);if(-1!==n)for(let e=n+1;e<s.length;e++)delete i[s[e]];return i}const l=(e,t=n.Ru)=>(e=>{const t=new Date;return e.getUTCDate()===t.getUTCDate()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCFullYear()===t.getUTCFullYear()})(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"})},46079:(e,t,i)=>{"use strict";function n(e){const t=Math.floor(e/1e3),i=Math.floor(t/60),n=Math.floor(i/60),r=60*n,a=i-r;return{hours:n,minutes:a,seconds:t-60*r-60*a}}i.d(t,{S:()=>n})},22319:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var n=i(11808);const r=e=>{if(!Number.isInteger(e))return"";const t=Date.now()-Number(e),i=Math.round(t/1e3/60),r=Math.round(t/1e3/60/60),a=Math.round(t/1e3/60/60/24),s=Math.round(t/1e3/60/60/24/7);return a>=7?n.Ru.get("time.weeks.short",s):r>=24?n.Ru.get("time.days.short",a):i>=60?n.Ru.get("time.hours.short",r):i>0?n.Ru.get("time.minutes.short",i):n.Ru.get("time.now")}},51005:(e,t,i)=>{"use strict";function n(e){return e?e.reduce(((e,t)=>(t.releases.items[0]&&e.push(t.releases.items[0]),e)),[]):[]}i.d(t,{Dh:()=>r,Ey:()=>n,ay:()=>a});const r=e=>`spotify:app:artist:${e}`,a=e=>`spotify:artist:${e}`},13797:(e,t,i)=>{"use strict";i.d(t,{C:()=>a});var n=i(11808),r=i(88923);function a(e){switch(e){case r.s.SINGLE:return n.Ru.get("single");case r.s.EP:return n.Ru.get("ep");case r.s.COMPILATION:return n.Ru.get("compilation");case r.s.ALBUM:default:return n.Ru.get("album")}}},1696:(e,t,i)=>{"use strict";async function n(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 i="";i="string"==typeof e?e:await e;const n=document.createElement("textarea");return n.value=i,n.setAttribute("readonly",""),n.style.position="absolute",n.style.left="-9999px",t.appendChild(n),n.select(),document.execCommand("copy"),t.removeChild(n),Promise.resolve()}i.d(t,{l:()=>n})},49515:(e,t,i)=>{"use strict";i.d(t,{c:()=>n});const n=()=>"undefined"==typeof window},14745:(e,t,i)=>{"use strict";i.d(t,{R:()=>n,d:()=>r});let n=function(e){return e.TEST="test",e.EPISODE_DISCOVERY="episode-ilr",e.PLAYLIST_ITL="playlist-mwp-itl-and-ssr",e}({}),r=function(e){return e.CONTROL="0",e.VARIANT="1",e}({})},78230:(e,t,i)=>{"use strict";i.d(t,{s:()=>n});const n=e=>(t,i=!1)=>{let n;return(...r)=>{i?i=!1:(clearTimeout(n),n=setTimeout((()=>{e.apply(e,r)}),t))}}},3554:(e,t,i)=>{"use strict";i.d(t,{g:()=>n});const n=(e,{desiredSize:t=Number.MAX_SAFE_INTEGER,desiredHeight:i=t,desiredWidth:n=t,desiredLabel:r=""}={})=>{if(!e||e.length<=0)return;if(r){const[t]=e.filter((e=>e.label===r));if(t)return t}if(1===e.length)return e[0];const[a]=e.map((e=>{const t=[(e.width||0)*(e.height||0),i*n];return{ratio:Math.max(...t)/Math.min(...t),image:e}})).sort(((e,t)=>e.ratio-t.ratio));return a.image}},94672:(e,t,i)=>{"use strict";i.d(t,{b:()=>a});var n=i(79787),r=i(85065);const a=({downloadAvailability:e,isExplicit:t,isMOGEFRestricted:i,contentRating:a,isPaywalled:s,isEnhanced:o,hasAssociatedVideo:l})=>{let c=0;const u={download:!1,explicit:!1,nineteen:!1,paid:!1,enhanced:!1,hasAssociatedVideo:!1};return e===r.kw.YES&&(u.download=!0,c++),(t&&!i||a===n.x7.Explicit)&&(u.explicit=!0,c++),(i||a===n.x7.NineteenPlus)&&(u.nineteen=!0,c++),s&&(u.paid=!0,c++),o&&(u.enhanced=!0,c++),l&&(u.hasAssociatedVideo=!0,c++),{badges:u,hasBadges:c>0}}},46798:(e,t,i)=>{"use strict";i.d(t,{k:()=>n});const n=e=>({xsmall:12,small:16,medium:24,large:32,xlarge:48,xxlarge:64}[e])},29182:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});const n={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)}}},53209:(e,t,i)=>{"use strict";i.d(t,{CW:()=>l,hF:()=>o,ll:()=>s});var n=i(11808),r=i(32712),a=i(71817);const s=(e,t=!0)=>{const i=t?"/":"";if(!e)return"";const n=e.split("/");return n[1].includes(r.CT)?`${i}${n.slice(2).join("/")}`:e},o=(e,t)=>{const i=t||n.Ru.getLocaleForURLPath();if(!e)return"";const a=e.split("/")[1];if(!i||i===r.Xn||a.includes(r.CT))return e;const s="/"===e?"":e;return`/${r.CT}${i}${s}`},l=e=>{if(!e)return a.c.HOME;const t=e.split("/");return t[1].includes(r.CT)?t[2]||a.c.HOME:t[1]||a.c.HOME}},39554:(e,t,i)=>{"use strict";i.d(t,{p:()=>u,vf:()=>d});var n=i(32712),r=i(71817);const a=[r.c.CONCERT,r.c.CONCERTS],s=(e,t)=>void 0!==t&&e.some((e=>e===t)),o=(e,t,i)=>{const r=i&&a.some((e=>e===i)),o=r?n.r0:n.IU,l=r?n.Xq:n._h,c=s(o,e)&&t,u=s(l,e);return c||u},l=(e,t)=>{if(void 0===e)return!1;const i=""===e;return t.some((t=>t===e))||i},c=(e,t)=>{if(void 0===e)return!1;const i=l(e,n.IH)&&t,r=l(e,n.eA);return i||r},u=({localeFeatureFlag:e,entityFeatureFlag:t,urlLocale:i,entity:n,type:r})=>{switch(r){case"locale":return o(i,e,n);case"route":return c(n,t);case"link":return o(i,e,n)&&c(n,t);default:return!1}},d=e=>["/",...n.NW.map((e=>`/${n.CT}${e}`))].includes(e)},92062:(e,t,i)=>{"use strict";i.d(t,{m:()=>n});const n=({imageUriOrUrl:e="",desiredMosaicSize:t=300}={})=>{if(!e)return"";if(e.startsWith("spotify:")){const[,i,...n]=e.split(":");if("image"===i)return`https://i.scdn.co/image/${n[0]}`;if("mosaic"===i)return`https://mosaic.scdn.co/${t}/${n.join("")}`}return e}},3080:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={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)",ActionBar:"main-actionBar-ActionBar",ActionBarRow:"main-actionBar-ActionBarRow"}},94757:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={container:"main-downloadClient-actionContainer"}},58794:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={card:"main-card-card",cardLink:"main-card-cardLink",type:"main-card-type",dividerAfter:"cCBLuxOGqZvSAQWNkDXw",cardTitle:"main-card-cardTitle",cardTitleWrapper:"Gi6Lr1whYBA2jutvHvjQ",newEpisodeIndicator:"main-card-newEpisodeIndicator",draggable:"main-card-draggable",imageContainer:"main-card-imageContainer",imageContainerOld:"main-card-imageContainerOld",imageContainerSkeleton:"main-card-imageContainerSkeleton",cardMetadata:"main-card-cardMetadata",DownloadStatusIndicator:"main-card-DownloadStatusIndicator",PlayButtonContainer:"main-card-PlayButtonContainer",PlayButtonContainerVisible:"main-card-PlayButtonContainerVisible",cardContainer:"main-card-cardContainer",scrollAnimation:"gXnwcpIMiR3cC2KCGf6R"}},50699:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={imageWrapper:"GOcsybnoHYyJGQGDRuwj",image:"yMQTWVwLJ5bV8VGiaqU3",headerImage:"w1vw8BvQZy1p9nKwpfVf",imagePlaceholder:"IUWOW7ZOUwEs57jTIQRP",circular:"MxmW8QkHqHWtuhO589PV",hero:"CByZAgiDBSO7504EXktW"}},80720:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={menu:"main-contextMenu-menu",menuHeading:"ig17e2GN63Tgv3JeRoJF",menuItemButton:"main-contextMenu-menuItemButton",disabled:"egE6UQjF_UUoCzvMxREj",menuItemStatic:"BmRbu742cR31_QlTDob1",subMenuIcon:"klmTmoDHY2lTsLzlA2qX",subMenuLeading:"lQEXaOyKiOHRJAkTf1EF",menuItem:"main-contextMenu-menuItem",dividerBefore:"vvMORUKtQKpQcpQ992bR",dividerAfter:"Vz3pFUXmll6fKB5Fc4nd",menuItemLabel:"htqz7Vb8mLJvGKTi1vrs",loadingContainer:"eof5OA2Ldhob6LU1jNoF"}},51757:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={addToPlaylistTitle:"main-contextMenu-addToPlaylistTitle",addToPlaylistSubtitle:"main-contextMenu-addToPlaylistSubtitle"}},64693:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={filterPlaylistSearch:"main-contextMenu-filterPlaylistSearch"}},76986:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={menu:"main-contextMenu-menu",menuHeading:"main-contextMenu-menuHeading",menuItemButton:"main-contextMenu-menuItemButton",disabled:"main-contextMenu-disabled",menuItemStatic:"main-contextMenu-menuItemStatic",subMenuIcon:"main-contextMenu-subMenuIcon",subMenuLeading:"main-contextMenu-subMenuLeading",menuItem:"main-contextMenu-menuItem",dividerBefore:"main-contextMenu-dividerBefore",dividerAfter:"main-contextMenu-dividerAfter",menuItemLabel:"main-contextMenu-menuItemLabel",loadingContainer:"main-contextMenu-loadingContainer",filterInputContainer:"main-contextMenu-filterInputContainer",expanded:"main-contextMenu-expanded",expandButton:"main-contextMenu-expandButton",filterInput:"main-contextMenu-filterInput",filterInputFullWidth:"main-contextMenu-filterInputFullWidth",overlay:"main-contextMenu-overlay",expandRight:"main-contextMenu-expandRight",searchIconContainer:"main-contextMenu-searchIconContainer",searchIcon:"main-contextMenu-searchIcon",clearButton:"main-contextMenu-clearButton",filterPlaylistSearchContainer:"main-contextMenu-filterPlaylistSearchContainer",trigger:"main-contextMenu-trigger"}},11986:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={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:"main-entityHeader-container",nonWrapped:"main-entityHeader-nonWrapped",largeHeader:"main-entityHeader-largeHeader",xlargeHeader:"bvoBefUu_0EKwyW6ZOsg",withBackgroundImage:"main-entityHeader-withBackgroundImage",smallHeader:"main-entityHeader-smallHeader",contentWrapper:"iWTIFTzhRZT0rCD0_gOK",backgroundColor:"main-entityHeader-backgroundColor",background:"main-entityHeader-background",overlay:"main-entityHeader-overlay",headerText:"main-entityHeader-headerText",topbarTitle:"main-entityHeader-topbarTitle",topbarContent:"main-entityHeader-topbarContent",topbarContentFadeIn:"main-entityHeader-topbarContentFadeIn",title:"main-entityHeader-title",titleInner:"main-entityHeader-titleInner",titleButton:"main-entityHeader-titleButton",pretitle:"main-entityHeader-pretitle",imageContainer:"main-entityHeader-imageContainer",imageContainerNew:"main-entityHeader-imageContainerNew",imageContainerClickable:"main-entityHeader-imageContainerClickable",theyFollowUs:"main-entityHeader-theyFollowUs",image:"main-entityHeader-image",shadow:"main-entityHeader-shadow",imagePlaceholder:"main-entityHeader-imagePlaceholder",roundedCorners:"main-entityHeader-roundedCorners",circle:"main-entityHeader-circle",detailsText:"main-entityHeader-detailsText",uppercase:"main-entityHeader-uppercase",metaData:"main-entityHeader-metaData",creatorWrapper:"main-entityHeader-creatorWrapper",piled:"main-entityHeader-piled",creatorButton:"main-entityHeader-creatorButton",metaDataText:"main-entityHeader-metaDataText",metaDataAuthor:"main-entityHeader-metaDataAuthor",metaDataRestrictedIcon:"DSEHZeKjMCdxtF6jGujN",newEntriesIndicator:"main-entityHeader-newEntriesIndicator",divider:"main-entityHeader-divider",smallMadeForIcon:"main-entityHeader-smallMadeForIcon",subtitle:"main-entityHeader-subtitle",subtitleButton:"main-entityHeader-subtitleButton",gradient:"main-entityHeader-gradient"}},6111:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={episodeBlock:"T9iBYqbERZHdwDl0U2tC",isActive:"DS4BYgmEO7Wy5RutUt60",title:"N2Fkohxhgu1_QAWUDc4O",selected:"DaxWgzoBoBnOEj43bZAA",actions:"hGbRiYkIjjy4sJvor0A2",visibleAction:"OgaF7O4ER8AvZfFd6JdJ",metadata:"bdGDIiYj50H66Hx5uevz",imageContainer:"kiT5NMttSzIDbtqBKc1J",showImage:"TG1hsDPHeO5QUf4EQasO",largeImage:"_NdByrVnM0OS7aK_GfRn",videoLabel:"afJf_mGi7ghd5WYQwPLb",badges:"UpgTvLnGW6GFjAUfaPXH",footer:"kxVuYXZ4sVWn6XuJgFhX",showDetailsWithProgress:"UvdRnanMNuY384mjTf2l",contentInformationBanner:"fmu47VumZ84IoKgMK1yU",nextBestEpisode:"dUScIGoP9fWn5IVsztB7"}},33956:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={shortcuts:"view-homeShortcutsGrid-shortcuts",title:"view-homeShortcutsGrid-title",grid:"view-homeShortcutsGrid-grid",gridOf4Columns:"view-homeShortcutsGrid-gridOf4Columns",shortcutLink:"view-homeShortcutsGrid-shortcutLink",shortcut:"view-homeShortcutsGrid-shortcut",draggable:"view-homeShortcutsGrid-draggable",imageContainer:"view-homeShortcutsGrid-imageContainer",imageWrapper:"view-homeShortcutsGrid-imageWrapper",image:"view-homeShortcutsGrid-image",main:"view-homeShortcutsGrid-main",skeletonShortcut:"eisrx2dEtE9CrVWQxu_z",content:"view-homeShortcutsGrid-nameWrapper",nameContainer:"view-homeShortcutsGrid-name",name:"view-homeShortcutsGrid-name",shortcutNewEpisodeIndicator:"view-homeShortcutsGrid-shortcutNewEpisodeIndicator",episodeExtraContent:"view-homeShortcutsGrid-episodeExtraContent",iconDownloaded:"view-homeShortcutsGrid-iconDownloaded",episodeProgressBar:"view-homeShortcutsGrid-episodeProgressBar",trailingIndicator:"view-homeShortcutsGrid-trailingIndicator",PlayButtonContainer:"view-homeShortcutsGrid-PlayButtonContainer",PlayButtonContainerVisible:"view-homeShortcutsGrid-PlayButtonContainerVisible",playButton:"view-homeShortcutsGrid-playButton",equaliser:"view-homeShortcutsGrid-equaliser"}},66632:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={shelf:"main-shelf-shelf",header:"main-shelf-header",fullPage:"yGNmd_gHDqy6we9VwoNj",subHeader:"main-shelf-subHeader",topRow:"main-shelf-topRow",sideSpacer:"j8owGOBRuFHRQf2whbdI",scrollAnimation:"cjUMnKYsZHCnWBfn9xcf",titleWrapper:"main-shelf-titleWrapper",titleText:"UH8GEa3KvWxeIQodYeos",title:"main-shelf-title",seeAll:"main-shelf-seeAll",shelfGrid:"main-shelf-shelfGrid",singleRow:"deJGxfMNXUc8uApEGgoQ",withEncoreCards:"MKCgGhu_c8l6hsVuee46",skeletonShelf:"main-shelf-skeletonShelf"}},5510:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={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:"main-topBar-container",withBackgroundBlur:"main-topBar-withBackgroundBlur",background:"main-topBar-background",contentContainer:"hV9v6y_uYwdAsoiOHpzk",indicators:"main-actionButtons",overlay:"main-topBar-overlay",loggedOut:"main-topBar-loggedOut",fullscreenHistoryButtons:"main-topBar-fullscreenHistoryButtons",globalNavBarHistoryButtonsContainer:"main-globalNav-historyButtons",globalNavBarHistoryButton:"main-globalNav-icon",historyButtons:"main-topBar-historyButtons",icon:"main-topBar-icon",button:"main-topBar-button",forward:"main-topBar-forward",responsiveForward:"main-topBar-responsiveForward",topbarContentWrapper:"main-topBar-topbarContentWrapper",topbarContent:"main-topBar-topbarContent",topNavBarLinks:"main-topBar-topNavBarLinks",topNavBarSeparator:"main-topBar-topNavBarSeparator",topbarContentRight:"main-topBar-topbarContentRight",topBarRightButtonContainer:"main-actionButtons",expand:"QTj1mCVVUuiwy6mQ0shv",globalNavBar:"LedDBMWCxYhMD20KtPJo",shrink:"MEbEPFcmpW1uJC9VI7He",loginButtons:"main-topBar-loginButtons",signupButton:"main-topBar-signupButton",UpgradeButton:"main-topBar-UpgradeButton",contentArea:"main-topBar-contentArea"}},76748:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={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)",TRACKLIST_HEADER_HEIGHT:"36px",MINMIMUM_COLUMN_WIDTH:"120px",trackList:"main-trackList-trackList",trackListCompactMode:"main-trackList-trackListCompactMode",indexable:"main-trackList-indexable",trackListRowGrid:"main-trackList-trackListRowGrid",rowSectionVariable:"main-trackList-rowSectionVariable",rowSectionStart:"main-trackList-rowSectionStart",rowSectionEnd:"main-trackList-rowSectionEnd",rowFeedback:"ShIWVpkzx2OXiZd_ZLBG",queuePanelTracklist:"nMl3YzolLHtRl3ke__NI",isRecommendedTrackListRow:"main-trackList-isRecommendedTrackListRow",chartTrackList:"UqzBuREVmvcEOZYWEGCM",rowChartStatus:"main-trackList-icon",concertTrackList:"inI9bKU9cOLscnVsSVEV",trackListHeader:"main-trackList-trackListHeader",trackListHeaderRow:"main-trackList-trackListHeaderRow",trackListHeaderStuck:"main-trackList-trackListHeaderStuck",trackListRow:"main-trackList-trackListRow",isPreviousRowSelected:"QG4EBrO5IfDeT2JjN9ZQ",isNextRowSelected:"Y5tI0kOsmxcdcipn3RVA",dropTargetBefore:"B8Vman5wYvaxDg4pc1OU",dropTargetAfter:"PQJowUUOfMLl0BzbnRCi",rowHeartButton:"main-trackList-rowHeartButton",curationButton:"main-trackList-curationButton",rowFeedbackButton:"h2UiWIoFN5fXUDD8pzfk",rowMoreButton:"main-trackList-rowMoreButton",disabled:"tH1iuxCV8NexP4pzEBa4",rowPlayPauseButton:"main-trackList-rowImagePlayButton",rowSubTitle:"UudGCx16EmBkuFPllvss",text:"W676nknusnBt8sz19YVV",number:"main-trackList-number",icon:"JqSFL4jZMK1MYKDI8G4R",playingIcon:"main-trackList-playingIcon",selected:"main-trackList-selected",rowMarker:"main-trackList-rowMarker",active:"main-trackList-active",rowTitle:"main-trackList-rowTitle",rowSectionIndex:"main-trackList-rowSectionIndex",showDisabledAsEnabled:"uOmRewhkzJocvvWeWWcF",playsHeader:"main-trackList-playsHeader",column:"main-trackList-column",sortable:"main-trackList-sortable",arrow:"OQc9_giz7hbNqHLZODIx",durationHeader:"main-trackList-durationHeader",actionsHeader:"SLiV_gdSoRxpqv9dgYbw",rowMainContent:"main-trackList-rowMainContent",rowCompactMode:"main-trackList-rowCompactMode",rowMainContentCompact:"main-trackList-rowMainContentCompact",facepile:"t4hXvJdn4nsT3Ub3k5IX",rowBadges:"main-trackList-rowBadges",rowDuration:"main-trackList-rowDuration",nineteen:"Ivj0vCd2s5rj3jsFoYHO",enhanced:"_jJo_XO5bEM6orhffUTw",rowMarkerChartStatus:"main-trackList-rowMarkerChartStatus",statusChangeDown:"main-trackList-statusChangeDown",statusChangeUp:"main-trackList-statusChangeUp",statusChangeNew:"V5ugN_Skngj14FpjqF41",rowImageWithPlay:"main-trackList-rowImageWithPlay",rowImagePlayPauseButton:"main-trackList-rowImagePlayPauseButton",rowPlayCount:"main-trackList-rowPlayCount",ownedBySelf:"main-trackList-ownedBySelf",rowImage:"main-trackList-rowImage",rowImageVideo:"DpagSkj9rm01H_aKy_Dw",rowImageFallback:"main-trackList-rowImageFallback",rowPlayPauseIcon:"main-trackList-rowPlayPauseIcon",placeholder:"T7WHRub8pynnWPXERh8e",placeholderIndex:"teK8wl2D50LT1eQXuxn_",placeholderStart:"jIkZ2Rh9EgRcaDgFo59w",placeholderStartWithCoverImage:"eClbBuaiGMZaigA4bp4e",placeholderEnd:"mfcu2ThWztZhPLI4BmQ7",placeholderVariable:"zhE9ZlvEhcGV1bDmBswy",discTitle:"EWbk59j3MnuB295CqiFg",discRow:"KAmWjX7nGmYCEtoR0EU2",addedBy:"HNrWEnhz87x0iBSI5PCH",facepileAvatar:"CaDisXZP6FboPwLkSkZ4",delayedVisibility:"knVQBhgo7WtejzqNn9SX",eventDate:"FI1uq8ux_Y_ZTzjibtKP",eventVenue:"nmaSdzB7DjwyT2i5C5Ec",eventTicketIcon:"zs8AulJGrH8lvWJ2qUrg",talkIcon:"z412ZWZNa5d7T1QcdK7m",talkSegmentDuration:"_tkrsP9r4Fxm3pP9GaZq",notificationDot:"main-trackList-statusChangeNew",resizeHandle:"I7SbihsVaE4CAUqLMa45",columnResizing:"x15L1JFSJDsSz7tzE69K"}},67550:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={TRACKLIST_HEADER_HEIGHT:"36px",MINMIMUM_COLUMN_WIDTH:"120px"}},82864:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={artistOverviewContent:"XtGI24gayCCOR69pcBao",artistOverviewContainer:"AK5MS4kVmpVJSnAPzApZ",popularTracks:"ih3vZ4qqibfclKQ2r3U8",artistShelfSpacer:"vsqOYUmRYepQ7AgGzPDk",artistShelfRelatedVideos:"Uv9uqBNRy4qsyhPSa7lY",artistSides:"YyjwPfOAdb6z73PerGUF",artistSidesBlock:"pAvBQUDkfvkyO47Kw71y",sideBlock:"PPoC4pYtYLuuzjV0RaQF",popularTracksBlock:"V168frZQBWaJ1OdnyyKO",about:"MZkAAYmEs5kAOXrbrBQQ",events:"IR0gsJCJYP1TqjMi6wUt",merch:"hGJN08YEbxIJ2HaEcHee",merchSmall:"GNdKACg7GTgIv75LT6Gv",overview:"FwIG_h9mHxGOTDxFRnWT",heading:"anPfvyDzeqR3CKW4gHUP",merchShelfContent:"ZpAXOWy3RgYX8ywKZZOI",container:"jW4eWdr_LUeOXwPpKhWG",content:"BPDHTIIFueJMvtDPZttw",backgroundImage:"DRXonbAbVN5Vg9anDL1X",bio:"xbKOOJ_NjLijBvdpAudQ",artistGridContainer:"M0yriEHOsE9ET707IXzC",image:"PwMuGFUCeHPjbHDy8M1T",columnContainer:"y_GaLKy76zj71zPYkLrs",bioContainer:"TV2j1oIRIkKH_6D1xP82",statsContainer:"T_AmQPlZ6wvE819I7A0D",stats:"zQy0G59IX5G4Cc9AtWRT",postedBy:"OyLgnahIHw63684ABRBF",postedByAvatar:"KguYS3oppxDrMNpTUJcB",avatar:"O9QEyBUMktZGNPifQqvY",modal:"JnpOnFaQfrRIA2fYe88A",scrollbars:"cacyLqtJhjhr95qRC_R7",close:"pSxFsY9Fgcj5f8Gf05mh",modalBase:"tsFfFt7SCIoA14JawrRf",modalAfterOpen:"_VADS4mdajCt5Yuf6KjW",modalBeforeClose:"TrS5BnDIiLtqz1i1QBVV",rank:"tLjX9htIKD_OCmEX01UN",cityBlock:"NPv26QCDgdnwsPOlYJmQ"}},76119:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={item:"artist-artistOnTour-item",condensed:"artist-artistOnTour-condensed",date:"artist-artistOnTour-date",elevated:"artist-artistOnTour-elevated",dateMonth:"artist-artistOnTour-dateMonth",dateDay:"artist-artistOnTour-dateDay",info:"artist-artistOnTour-info",title:"artist-artistOnTour-title",time:"artist-artistOnTour-time",timeAndVenue:"artist-artistOnTour-timeAndVenue",seeAll:"main-seeAll-link",timeAndVenueText:"artist-artistOnTour-timeAndVenueText",onTourShelfGrid:"artist-artistOnTour-onTourShelfGrid",metadata:"artist-artistOnTour-metadata",location:"artist-artistOnTour-location",eventName:"artist-artistOnTour-eventName"}},18232:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={screenLg:"1200px",homeRegularDensityMinWidth:"210px",homeRegularDensityMinWidthSmallScreens:"160px",homeFeedBaselineMinWidth:"380px",homeFeedBaselineMaxWidth:"480px",gridContainer:"RZx_OqNy7q8x0IvpD_Mk",withFiniteRowCount:"y_fd1cvMf1YLrmQWy13w",uniformRowHeight:"ehUH65XCNmFU5EOfSSSC",home:"UqLpBiryzmdVyUucfSTQ",homepage:"DXJIVl0qgWOfcIK6Mc5Y",content:"Le0q6vXGEvilJEjOqgF9"}},25504:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={albumMerch:"V1660uk_uXXZAMEmV4D4",shelfSpace:"RbnoPhjDDAtbxN8gAiif"}},72556:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={container:"main-trackInfo-container",pretitle:"F1aSUwAFI4YvWoalYJrv",ellipsis:"hKghsAg9t6lgWNvCb_1l",title:"main-trackInfo-name",subtitle:"main-trackInfo-artists",subtitleWithGap:"r6Psl2_K_0vpdX6vFLQd",qualityLabel:"Eu2KnQixAss5VI1CR4Fb",badges:"main-trackInfo-enhanced",xsmallBadges:"main-trackInfo-xsmallBadges"}},81436:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={offline:"tpweADmlLll_vhLLKgu2",emptyStateContainer:"e9Wimf8ZtOrZpvPbfWtg",icon:"zCM7ss2KtS5tWRItxyls",info:"lG5QlwmK6exKdfikWw2A"}},12025:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={emptyContainer:"BP2Fv3OX_ZYbjdA4lovg",titleContainer:"Olk6uKV_CIIVtWRrdRJc"}},16951:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={container:"dcSY8Zom_VXgK71Lbym_",button:"nnFPIbw3IAGJZGqI4NqD",switch:"wyd6QhFOJ2Z05gOCbsiE",loading:"lKGbdh7pkRv2AcabYSy6",loadingVisible:"a5FAjheOpWkqsE2by0mD",hidden:"RxYeristNjK4Ih8_s058",spinner:"Rkf_Pdsq1f6cGK9QHcWK",label:"O709C5asJqCetOmfheHV",npbSwitchButtonContainer:"ZCq05NqW5PjXZXaY4XEK"}},46915:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={videoPlayerContainer:"ngkFeIGFyNUaxRspbs5H"}},99837:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={coverContainer:"aaasJtK_0Z_ggHet0u6v",yourEpisodesCard:"Iy8zwWQVG_ylQT9GRLhR",coverIcon:"o5KDMPy9Ed_fP0aQ63vd"}},16833:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={entityImage:"GSgVaqJa8VEp5mKoIN0b",pulse:"jf7uliBDj0R3ZjKTPEg_",link:"oaKRK4WllExdXORQIlFZ",subtitleText:"NVHSG1CguVgjg5bJ64_Z",subtitle:"iKNK2nAjtbavMKjPPJtJ",titleLink:"UZYGjsTEkEen6hFQe194",icon:"cSWBDsMjkH62GXIXo6mQ",subtitleLeadingWrapper:"Gxl7UDkumVYX3WtQEnb8"}},6487:()=>{},86762:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={screenLg:"1200px",homeRegularDensityMinWidth:"210px",homeRegularDensityMinWidthSmallScreens:"160px",homeFeedBaselineMinWidth:"380px",homeFeedBaselineMaxWidth:"480px",gridContainer:"main-gridContainer-gridContainer",withFiniteRowCount:"fJTotRs7ANTq1nrBwlqA",uniformRowHeight:"main-gridContainer-uniformRowHeight"}},28333:()=>{},15644:()=>{},32941:e=>{e.exports={convertPathToURL:function(e,t){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`${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 i=o[e]={id:e,loaded:!1,exports:{}};return s[e].call(i.exports,i,i.exports,l),i.loaded=!0,i.exports}l.m=s,l.amdO={},e=[],l.O=(t,i,n,r)=>{if(!i){var a=1/0;for(u=0;u<e.length;u++){for(var[i,n,r]=e[u],s=!0,o=0;o<i.length;o++)(!1&r||a>=r)&&Object.keys(l.O).every((e=>l.O[e](i[o])))?i.splice(o--,1):(s=!1,r<a&&(a=r));if(s){e.splice(u--,1);var c=n();void 0!==c&&(t=c)}}return t}r=r||0;for(var u=e.length;u>0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[i,n,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},i=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var r=Object.create(null);l.r(r);var a={};t=t||[null,i({}),i([]),i(i)];for(var s=2&n&&e;"object"==typeof s&&!~t.indexOf(s);s=i(s))Object.getOwnPropertyNames(s).forEach((t=>a[t]=()=>e[t]));return a.default=()=>e,l.d(r,a),r},l.d=(e,t)=>{for(var i in t)l.o(t,i)&&!l.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},l.f={},l.e=e=>Promise.all(Object.keys(l.f).reduce(((t,i)=>(l.f[i](e,t),t)),[])),l.u=e=>(({42:"xpui-routes-blend",599:"home-ad-card",983:"xpui-debug-window-contents",1206:"xpui-root-dialogs",1460:"xpui-routes-play-history-page",1621:"home-v2-section",1785:"xpui-desktop-routes-settings",1845:"xpui-routes-all-show-ads",2355:"xpui-routes-playlist",2391:"xpui-routes-desktop-settings",2889:"xpui-routes-recent-searches",3417:"xpui-feature-activation",3522:"debug-locales",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",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",5572:"xpui-routes-prerelease-radar",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",8212:"xpui-routes-health-check",8493:"xpui-desktop-modals",8828:"xpui-routes-collection-songs",8865:"xpui-routes-album-prerelease",9209:"xpui-routes-concert",9319:"home-v2",9480:"xpui-routes-profile",9718:"playlist-leavebehinds"}[e]||e)+".js"),l.miniCssF=e=>(({42:"xpui-routes-blend",599:"home-ad-card",983:"xpui-debug-window-contents",1206:"xpui-root-dialogs",1460:"xpui-routes-play-history-page",1785:"xpui-desktop-routes-settings",2355:"xpui-routes-playlist",2391:"xpui-routes-desktop-settings",2889:"xpui-routes-recent-searches",3417:"xpui-feature-activation",3522:"debug-locales",3569:"xpui-routes-offline-browse",3667:"xpui-pip-mini-player",3838:"xpui-routes-cultural-moment-hub",4312:"home-hpto",4389:"xpui-routes-collection-local-files",4574:"your-sound-capsule-modal",4789:"concerts-on-tour-playlist-card",5572:"xpui-routes-prerelease-radar",5783:"xpui-routes-collection-concerts",5962:"xpui-routes-album",6080:"xpui-routes-collection-episodes",6266:"browse-v2",6457:"xpui-routes-your-library-x",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",8493:"xpui-desktop-modals",8828:"xpui-routes-collection-songs",8865:"xpui-routes-album-prerelease",9209:"xpui-routes-concert",9319:"home-v2",9480:"xpui-routes-profile"}[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),n={},r="client-web:",l.l=(e,t,i,a)=>{if(n[e])n[e].push(t);else{var s,o;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+i){s=d;break}}s||(o=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,l.nc&&s.setAttribute("nonce",l.nc),s.setAttribute("data-webpack",r+i),s.src=e),n[e]=[t];var m=(t,i)=>{s.onerror=s.onload=null,clearTimeout(p);var r=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((e=>e(i))),t)return t(i)},p=setTimeout(m.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=m.bind(null,s.onerror),s.onload=m.bind(null,s.onload),o&&document.head.appendChild(s)}},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,i)=>{var n=l.miniCssF(e),r=l.p+n;if(((e,t)=>{for(var i=document.getElementsByTagName("link"),n=0;n<i.length;n++){var r=(s=i[n]).getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(r===e||r===t))return s}var a=document.getElementsByTagName("style");for(n=0;n<a.length;n++){var s;if((r=(s=a[n]).getAttribute("data-href"))===e||r===t)return s}})(n,r))return t();((e,t,i,n,r)=>{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",l.nc&&(a.nonce=l.nc),a.onerror=a.onload=i=>{if(a.onerror=a.onload=null,"load"===i.type)n();else{var s=i&&i.type,o=i&&i.target&&i.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+o+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=s,l.request=o,a.parentNode&&a.parentNode.removeChild(a),r(l)}},a.href=t,i?i.parentNode.insertBefore(a,i.nextSibling):document.head.appendChild(a)})(e,r,null,t,i)})),t={9441:0};l.f.miniCss=(i,n)=>{t[i]?n.push(t[i]):0!==t[i]&&{42:1,599:1,983:1,1206:1,1260:1,1460:1,1785:1,2355:1,2391:1,2889:1,3417:1,3522:1,3569:1,3667:1,3838:1,4312:1,4374:1,4389:1,4574:1,4789:1,5572:1,5783:1,5962:1,6080:1,6266:1,6457:1,6548:1,6755:1,6863:1,7125:1,7241:1,7564:1,7599:1,7790:1,8170:1,8493:1,8529:1,8828:1,8865:1,9209:1,9319:1,9480:1,9668:1}[i]&&n.push(t[i]=e(i).then((()=>{t[i]=0}),(e=>{throw delete t[i],e})))},l.F.miniCss=e=>{if(!(l.o(t,e)&&void 0!==t[e]||/^(3(63[28]|(|1)55|224|711|890|934)|6(41|505|665)|7(067|170|271|660)|(184|588|939)5|1621|2687|4496|5009|8212|9718)$/.test(e))){t[e]=null;var i=document.createElement("link");l.nc&&i.setAttribute("nonce",l.nc),i.rel="prefetch",i.as="style",i.href=l.p+l.miniCssF(e),document.head.appendChild(i)}}}})(),(()=>{var e={9441:0};l.f.j=(t,i)=>{var n=l.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else if(6457!=t){var r=new Promise(((i,r)=>n=e[t]=[i,r]));i.push(n[2]=r);var a=l.p+l.u(t),s=new Error;l.l(a,(i=>{if(l.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=i&&("load"===i.type?"missing":i.type),a=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",s.name="ChunkLoadError",s.type=r,s.request=a,n[1](s)}}),"chunk-"+t,t)}else e[t]=0},l.F.j=t=>{if((!l.o(e,t)||void 0===e[t])&&6457!=t){e[t]=null;var i=document.createElement("link");l.nc&&i.setAttribute("nonce",l.nc),i.rel="prefetch",i.as="script",i.href=l.p+l.u(t),document.head.appendChild(i)}},l.O.j=t=>0===e[t];var t=(t,i)=>{var n,r,[a,s,o]=i,c=0;if(a.some((t=>0!==e[t]))){for(n in s)l.o(s,n)&&(l.m[n]=s[n]);if(o)var u=o(l)}for(t&&t(i);c<a.length;c++)r=a[c],l.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return l.O(u)},i=("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),l.nc=void 0,a={7170:[4151,599,6665]},l.f.prefetch=(e,t)=>Promise.all(t).then((()=>{var t=a[e];Array.isArray(t)&&t.map(l.E)})),l.O(0,[9441],(()=>{[4151,5009,7125,7660,4312,5885,3569].map(l.E)}),5);var c=l.O(void 0,[4151],(()=>l(84288)));c=l.O(c)})();
//# sourceMappingURL=xpui.js.map