(()=>{var e,t,n,i,a,s={31042: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}`}}},91546:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});n(31042);function i(e,t){let n,i;if(n='{"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/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-green.svg":"/images/equaliser-green.svg","images/error-page-logo.svg":"/images/error-page-logo.svg","images/favicon.ico":"/images/favicon.ico","images/favicon.png":"/images/favicon.png","images/favicon16.png":"/images/favicon16.png","images/favicon32.png":"/images/favicon32.png","images/feature-activation-shelf-audio-quality.png":"/images/feature-activation-shelf-audio-quality.png","images/feature-activation-shelf-enhance-placeholder.png":"/images/feature-activation-shelf-enhance-placeholder.png","images/feature-activation-shelf-group-sessions.png":"/images/feature-activation-shelf-group-sessions.png","images/focused_stroy_play.png":"/images/focused_stroy_play.png","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/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/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/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/station-header-wave.svg":"/images/station-header-wave.svg","images/station-wave.svg":"/images/station-wave.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/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.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"}',void 0!==globalThis.__CDN_FILE_URLS__&&(n=globalThis.__CDN_FILE_URLS__),"string"!=typeof n)throw new Error("No __CDN_FILE_URLS__ property available in globalThis or process.env");try{i=JSON.parse(n)}catch(e){throw new Error("Invalid __CDN_FILE_URLS__ value.")}if(!i[e])throw new Error(`\`${e}\` is not available in __CDN_FILE_URLS__.`);return i[e]}},83171: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"}},3802:(e,t,n)=>{"use strict";n.d(t,{go:()=>r,ag:()=>m});var i=n(59496),a=n(83171),s=n.n(a);let r=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}({});var o=function(e){return e.AR="، ",e.FA="، ",e.EN=", ",e}(o||{}),l=function(e){return e.ZERO="zero",e.ONE="one",e.TWO="two",e.FEW="few",e.MANY="many",e.OTHER="other",e}(l||{});let d={};const c=e=>"ar"===e?"ar-u-nu-latn":e;function u(e){const t=`(?:${e.join("|")})`;return new RegExp(String.raw`(\{${t}\}|%${t}%)`,"g")}const m=new class{_relativeTimeFormat=null;_dateTimeFormats=new Map;constructor(){this._dictionary={},Spicetify.Locale=this,this._locale=r.en,this._urlLocale=r.en}getDateTimeFormat(e){const t=JSON.stringify(Object.keys(e).sort().map((t=>({[t]:e[t]}))));let n=this._dateTimeFormats.get(t);return void 0===n&&(n=new Intl.DateTimeFormat(c(this._locale),e),this._dateTimeFormats.set(t,n)),n}getRelativeTimeFormat(){return null===this._relativeTimeFormat&&(this._relativeTimeFormat=void 0===Intl.RelativeTimeFormat?null:new Intl.RelativeTimeFormat(this._locale)),this._relativeTimeFormat}getDictionary(){return this._dictionary}setDictionary(e){this._dictionary=e}setLocale(e){this._locale=e,this._dateTimeFormats.clear(),this._relativeTimeFormat=null}setUrlLocale(e){this._urlLocale=e}getLocale(){return this._locale}getUrlLocale(){return this._urlLocale}getSmartlingLocale(){const e=this._locale;return s()[e]||e}toLocaleLowerCase(e){return e?.toLocaleLowerCase(this._locale)}toLocaleUpperCase(e){return e?.toLocaleUpperCase(this._locale)}get(e,...t){const n=e in this._dictionary?this._dictionary[e]:e;let a="";if("string"!=typeof n){const e=t[0],i=((e,t)=>{try{return(d[e]||(d[e]=new Intl.PluralRules(e))).select(t)}catch{return l.OTHER}})(this._locale,parseInt(e,10)),s=n[i];void 0!==s?a=s:n.other&&(a=n.other)}else a=n;if(/%\d%/.test(a)){if(!["desktop.login.DefaultErrorMessage","desktop.login.ErrorProxyAuthRequired","desktop.login.MissingUserInfoMessage","desktop.login.RegionMismatchMessage","desktop.login.ClientUpdateFail","desktop.login.FbUserNotFoundSignUp","desktop-auth.error"].includes(e))throw new Error("i18n: The placeholder format %0% is legacy and is only allowed for existing strings.")}const s={},r={};t.forEach(((e,t)=>{const n="object"!=typeof e||null===e||(0,i.isValidElement)(e)?[[t,e]]:Object.entries(e);for(const[e,t]of n)(0,i.isValidElement)(t)?r[e]=t:void 0!==t&&(s[e]=t)})),a=a.replace(u(Object.keys(s)),((e,t)=>{const n=t.slice(1,-1),i=s[n];return"number"==typeof i?this.formatNumber(i):i}));const o=Object.keys(r);return o.length?(0,i.createElement)(i.Fragment,null,a.split(u(o)).map(((e,t)=>{if(t%2){const t=e.slice(1,-1),n=r[t];return(0,i.cloneElement)(n,{key:n.key??t})}return e})).filter((e=>""!==e))):a}getSeparator(){switch(this._locale){case r.ar:return o.AR;case r.fa:return o.FA;default:return o.EN}}formatNumber(e,t){return e.toLocaleString(c(this._locale),t)}formatNumberCompact(e){return this.formatNumber(e,{notation:"compact",maximumFractionDigits:1})}formatDate(e,t=null){const n=t||{year:"numeric",month:"long",day:"numeric"};return this.getDateTimeFormat(n).format(e)}formatRelativeDate(e,t=null){const n=new Date(Date.now());e=new Date(e);const i=this.getRelativeTimeFormat(),a=e.getTime()-n.getTime(),s=Math.abs(a)<2592e6;if(null!==i&&s){const{weeks:e,days:t,hours:n,minutes:s,seconds:o}=(r=a,{seconds:Math.round(r/1e3),minutes:Math.round(r/1e3/60),hours:Math.round(r/1e3/60/60),days:Math.round(r/1e3/60/60/24),weeks:Math.round(r/1e3/60/60/24/7)});return Math.abs(t)>=7?i.format(e,"weeks"):Math.abs(n)>=24?i.format(t,"days"):Math.abs(s)>=60?i.format(n,"hours"):Math.abs(o)>=60?i.format(s,"minutes"):i.format(o,"seconds")}var r;return this.formatDate(e,t)}__resetForTests(){this._dictionary={},Spicetify.Locale=this,this._locale=r.en,d={}}}},62884:e=>{e.exports={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"}},81926:(e,t,n)=>{"use strict";n.d(t,{Hp:()=>i,oT:()=>s,q$:()=>a});const i={SHOW_ABOUT_RECS_MODAL:"SHOW_ABOUT_RECS_MODAL",HIDE_ABOUT_RECS_MODAL:"HIDE_ABOUT_RECS_MODAL"},a=()=>({type:i.SHOW_ABOUT_RECS_MODAL}),s=()=>({type:i.HIDE_ABOUT_RECS_MODAL})},68896:(e,t,n)=>{"use strict";n.d(t,{GV:()=>a,Hp:()=>i,se:()=>s});const i={SHOW_ABOUT_SPOTIFY_MODAL:"SHOW_ABOUT_SPOTIFY_MODAL",HIDE_ABOUT_SPOTIFY_MODAL:"HIDE_ABOUT_SPOTIFY_MODAL"},a=()=>({type:i.SHOW_ABOUT_SPOTIFY_MODAL}),s=()=>({type:i.HIDE_ABOUT_SPOTIFY_MODAL})},23451:(e,t,n)=>{"use strict";n.d(t,{Hp:()=>i,QN:()=>r,RM:()=>s,vQ:()=>a});const i={GET_AGE_RESTRICTION_MODAL:"GET_AGE_RESTRICTION_MODAL",SHOW_AGE_RESTRICTION_MODAL:"SHOW_AGE_RESTRICTION_MODAL",HIDE_AGE_RESTRICTION_MODAL:"HIDE_AGE_RESTRICTION_MODAL"},a=e=>({type:i.SHOW_AGE_RESTRICTION_MODAL,dialog:e}),s=e=>({type:i.GET_AGE_RESTRICTION_MODAL,uri:e}),r=()=>({type:i.HIDE_AGE_RESTRICTION_MODAL})},95634:(e,t,n)=>{"use strict";n.d(t,{BH:()=>s,G1:()=>a,sX:()=>r,types:()=>i,xO:()=>o});const i={ANONYMOUS_COLLECTION_NAVIGATION:"ANONYMOUS_COLLECTION_NAVIGATION",ANONYMOUS_LIKED_SONGS_NAVIGATION:"ANONYMOUS_LIKED_SONGS_NAVIGATION",ANONYMOUS_LOGIN_CLICK:"ANONYMOUS_LOGIN_CLICK",ANONYMOUS_SIGNUP_CLICK:"ANONYMOUS_SIGNUP_CLICK",ANONYMOUS_PREMIUM_CLICK:"ANONYMOUS_PREMIUM_CLICK",ANONYMOUS_DECLINE_SIGNUP:"ANONYMOUS_DECLINE_SIGNUP"},a=e=>({type:i.ANONYMOUS_COLLECTION_NAVIGATION,pathname:e}),s=e=>({type:i.ANONYMOUS_LIKED_SONGS_NAVIGATION,pathname:e}),r=()=>({type:i.ANONYMOUS_LOGIN_CLICK}),o=()=>({type:i.ANONYMOUS_SIGNUP_CLICK})},92403:(e,t,n)=>{"use strict";n.d(t,{Hp:()=>i,Ke:()=>a,jV:()=>s,o8:()=>r});const i={SHOW_DUPLICATE_TRACKS_DIALOG:"SHOW_DUPLICATE_TRACKS_DIALOG",HIDE_DUPLICATE_TRACKS_DIALOG:"HIDE_DUPLICATE_TRACKS_DIALOG",CHECK_DUPLICATE_TRACKS:"CHECK_DUPLICATE_TRACKS"},a=e=>({type:i.SHOW_DUPLICATE_TRACKS_DIALOG,...e}),s=(e,t,n)=>({type:i.CHECK_DUPLICATE_TRACKS,playlistUri:e,uris:t,position:n}),r=()=>({type:i.HIDE_DUPLICATE_TRACKS_DIALOG})},6664:(e,t,n)=>{"use strict";n.d(t,{EJ:()=>N,EQ:()=>m,Gh:()=>a,Jf:()=>p,MK:()=>_,Mn:()=>l,Oh:()=>v,Rm:()=>u,SS:()=>S,TB:()=>h,X3:()=>s,Xe:()=>k,aW:()=>b,c4:()=>d,kK:()=>y,nY:()=>i,pu:()=>f,rp:()=>g,sO:()=>E,vx:()=>o,xh:()=>r,zn:()=>c});let i=function(e){return e.ERROR="ERROR",e.NOTICE="NOTICE",e}({});const a="SHOW_FEEDBACK_BUBBLE",s="CLOSE_FEEDBACK_BUBBLE",r="SHOW_BLOCKED_USER",o="SHOW_UNBLOCKED_USER",l="SHOW_BLOCK_TRACK_FEEDBACK",d="SHOW_BLOCK_ARTIST_FEEDBACK",c="SHOW_BLOCK_TRACK_IN_RADIO_STATION",u="SHOW_SAVED_EPISODE",m="SHOW_REMOVED_EPISODE",p="SHOW_PUBLISHED_PLAYLIST",g="SHOW_UNPUBLISHED_PLAYLIST";function h(e,t){return{type:a,message:e,feedbackType:t}}function k(){return{type:s}}function v(e){return{type:l,playlistName:e}}function f(){return{type:c}}function y(){return{type:u}}function S(){return{type:m}}function b(){return{type:r}}function _(){return{type:o}}function N(){return{type:p}}function E(){return{type:g}}},71017:(e,t,n)=>{"use strict";n.d(t,{Hp:()=>i,qd:()=>a,xh:()=>s});const i={SHOW_LICENSES_MODAL:"SHOW_LICENSES_MODAL",HIDE_LICENSES_MODAL:"HIDE_LICENSES_MODAL"},a=()=>({type:i.SHOW_LICENSES_MODAL}),s=()=>({type:i.HIDE_LICENSES_MODAL})},8511:(e,t,n)=>{"use strict";n.d(t,{V:()=>i,_:()=>a});const i={LOG_OPEN_ANALYTICS_EVENT:"LOG_OPEN_ANALYTICS_EVENT",LOG_INTERACTION:"LOG_INTERACTION"},a=e=>({type:i.LOG_INTERACTION,logData:e})},57314:(e,t,n)=>{"use strict";n.d(t,{J_:()=>l,Nk:()=>d,$P:()=>s,lY:()=>o,cJ:()=>a,Tu:()=>r,V5:()=>i,e2:()=>c});const i={DEVICE_INFO_CHANGED:"DEVICE_INFO_CHANGED",SET_ACTIVE_DEVICE:"SET_ACTIVE_DEVICE",PLAYBACK_ERROR:"PLAYBACK_ERROR",HARMONY_MAX_SUBSCRIPTIONS_REACHED:"HARMONY_MAX_SUBSCRIPTIONS_REACHED",CDM_ERROR:"CDM_ERROR",PLAYBACK_CLEAR_DATA:"PLAYBACK_CLEAR_DATA",QUEUE_UPDATE:"QUEUE_UPDATE",ADD_TO_QUEUE_SUCCESS:"ADD_TO_QUEUE_SUCCESS",ADD_TO_QUEUE_ERROR:"ADD_TO_QUEUE_ERROR",DISCONNECT_HARMONY:"DISCONNECT_HARMONY",UNABLE_TO_PLAY_TRACK:"UNABLE_TO_PLAY_TRACK"},a=(e="unknown",t="unknown",n="")=>({type:i.PLAYBACK_ERROR,name:e,source:t,message:n}),s=e=>({type:i.DEVICE_INFO_CHANGED,deviceInfo:e}),r=e=>({type:i.SET_ACTIVE_DEVICE,id:e}),o=(e="unknown")=>({type:i.HARMONY_MAX_SUBSCRIPTIONS_REACHED,source:e}),l=()=>({type:i.CDM_ERROR,name:i.CDM_ERROR}),d=()=>({type:i.PLAYBACK_CLEAR_DATA}),c=()=>({type:i.UNABLE_TO_PLAY_TRACK})},43499:(e,t,n)=>{"use strict";n.d(t,{V5:()=>i,oT:()=>a,xH:()=>s});const i={PWA_INSTALL_COMPLETED:"PWA_INSTALL_COMPLETED",PWA_DISPLAY_MODE_CHANGED:"PWA_DISPLAY_MODE_CHANGED"},a=()=>({type:i.PWA_INSTALL_COMPLETED}),s=()=>({type:i.PWA_DISPLAY_MODE_CHANGED})},85483:(e,t,n)=>{"use strict";n.d(t,{$1:()=>N,$B:()=>T,$Y:()=>B,Ap:()=>W,D8:()=>j,EW:()=>w,F1:()=>m,HC:()=>k,HU:()=>s,IA:()=>P,IF:()=>p,Id:()=>S,Io:()=>A,L9:()=>M,OC:()=>x,Oy:()=>U,PL:()=>b,Pd:()=>F,Q2:()=>d,S3:()=>Y,Sl:()=>V,TH:()=>K,UX:()=>z,Vr:()=>h,Xo:()=>R,YU:()=>u,bW:()=>I,cq:()=>c,ct:()=>G,dC:()=>a,dE:()=>f,fW:()=>L,hx:()=>H,jv:()=>_,lJ:()=>v,lW:()=>y,mB:()=>q,me:()=>l,mm:()=>g,n0:()=>Z,oH:()=>C,p:()=>E,pW:()=>r,p_:()=>o,rM:()=>D,rV:()=>Q,types:()=>i,x0:()=>O});const i={COPY_LINK_SUCCESS:"COPY_LINK_SUCCESS",OPEN_DELETE_PLAYLIST_DIALOG:"OPEN_DELETE_PLAYLIST_DIALOG",CLOSE_DELETE_PLAYLIST_DIALOG:"CLOSE_DELETE_PLAYLIST_DIALOG",OPEN_DELETE_FOLDER_DIALOG:"OPEN_DELETE_FOLDER_DIALOG",CLOSE_DELETE_FOLDER_DIALOG:"CLOSE_DELETE_FOLDER_DIALOG",OPEN_REMOVE_FROM_LIBRARY_DIALOG:"OPEN_REMOVE_FROM_LIBRARY_DIALOG",CLOSE_REMOVE_FROM_LIBRARY_DIALOG:"CLOSE_REMOVE_FROM_LIBRARY_DIALOG",OPEN_BLOCK_USER_DIALOG:"OPEN_BLOCK_USER_DIALOG",CLOSE_BLOCK_USER_DIALOG:"CLOSE_BLOCK_USER_DIALOG",OPEN_SIGNUP_PROMPT_DIALOG:"OPEN_SIGNUP_PROMPT_DIALOG",CLOSE_SIGNUP_PROMPT_DIALOG:"CLOSE_SIGNUP_PROMPT_DIALOG",OPEN_LEAVE_PLAYLIST_DIALOG:"OPEN_LEAVE_PLAYLIST_DIALOG",CLOSE_LEAVE_PLAYLIST_DIALOG:"CLOSE_LEAVE_PLAYLIST_DIALOG",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_AUTH_SUCCESS:"EMPLOYEE_PODCASTS_AUTH_SUCCESS",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",SET_NOW_PLAYING_COVER_EXPANDED_STATE:"SET_NOW_PLAYING_COVER_EXPANDED_STATE",SET_NOW_PLAYING_COVER_FORCED_EXPANDED_STATE:"SET_NOW_PLAYING_COVER_FORCED_EXPANDED_STATE",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_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:"OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG",CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:"CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG",OPEN_BOOK_CONSUMPTION_CAP_MODAL:"OPEN_BOOK_CONSUMPTION_CAP_MODAL",CLOSE_BOOK_CONSUMPTION_CAP_MODAL:"CLOSE_BOOK_CONSUMPTION_CAP_MODAL"},a=e=>({type:i.COPY_LINK_SUCCESS,link:e}),s=()=>({type:i.SHOW_L2L_MODAL}),r=()=>({type:i.HIDE_L2L_MODAL}),o=e=>({type:i.OPEN_DELETE_PLAYLIST_DIALOG,uri:e}),l=()=>({type:i.CLOSE_DELETE_PLAYLIST_DIALOG}),d=(e,t)=>({type:i.OPEN_DELETE_FOLDER_DIALOG,uri:e,onDeleteCallback:t}),c=()=>({type:i.CLOSE_DELETE_FOLDER_DIALOG}),u=e=>({type:i.OPEN_REMOVE_FROM_LIBRARY_DIALOG,uri:e}),m=()=>({type:i.CLOSE_REMOVE_FROM_LIBRARY_DIALOG}),p=e=>({type:i.OPEN_LEAVE_PLAYLIST_DIALOG,playlistUri:e}),g=()=>({type:i.CLOSE_LEAVE_PLAYLIST_DIALOG}),h=(e,t)=>({type:i.OPEN_BLOCK_USER_DIALOG,uri:e,name:t}),k=()=>({type:i.CLOSE_BLOCK_USER_DIALOG}),v=(e=null)=>({type:i.OPEN_SIGNUP_PROMPT_DIALOG,uri:e}),f=()=>({type:i.CLOSE_SIGNUP_PROMPT_DIALOG}),y=()=>({type:i.HIDE_UNSUPPORTED_MESSAGE}),S=e=>({type:i.SHOW_UNSUPPORTED_MESSAGE,message:e}),b=()=>({type:i.HIDE_PLAYBACK_NOT_SUPPORTED_MODAL}),_=()=>({type:i.SHOW_PLAYBACK_NOT_SUPPORTED_MODAL}),N=()=>({type:i.HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL}),E=()=>({type:i.SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL}),x=()=>({type:i.OPEN_FULLSCREEN_MODE}),C=()=>({type:i.CLOSE_FULLSCREEN_MODE}),w=e=>({type:i.SET_NOW_PLAYING_COVER_FORCED_EXPANDED_STATE,forcedExpandedState:e}),I=()=>({type:i.CONNECT_DEVICE_PICKER_OPENED}),T=()=>({type:i.CONNECT_DEVICE_PICKER_CLOSED}),A=()=>({type:i.SHOW_CONNECT_NUDGE}),P=()=>({type:i.HIDE_CONNECT_NUDGE}),O=e=>({type:i.UPDATE_UI_HISTORY_STATE,historyState:e}),D=()=>({type:i.ENTER_FULLSCREEN}),R=()=>({type:i.LEAVE_FULLSCREEN}),L=e=>({type:i.SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY,isOpen:e}),F=(e,t)=>({type:i.SHOW_TRACK_CREDITS,isOpen:e,trackUri:t}),j=()=>({type:i.SHOW_S2L_MODAL}),M=()=>({type:i.HIDE_S2L_MODAL}),U=()=>({type:i.INITIALISE_QUICKSILVER}),B=()=>({type:i.TRIGGER_CLICK_DEPRECATION_MESSAGE}),V=()=>({type:i.OPEN_REMOVE_DOWNLOADS_DIALOG}),H=()=>({type:i.CLOSE_REMOVE_DOWNLOADS_DIALOG}),G=()=>({type:i.OPEN_CLEAR_CACHE_DIALOG}),W=()=>({type:i.CLOSE_CLEAR_CACHE_DIALOG}),z=(e,t)=>({type:i.OPEN_RENAME_FOLDER_MODAL,name:e,handleRename:t}),K=()=>({type:i.CLOSE_RENAME_FOLDER_MODAL}),Y=e=>({type:i.OPEN_BOOK_CONSUMPTION_CAP_MODAL,consumptionCapExplanation:e}),q=()=>({type:i.CLOSE_BOOK_CONSUMPTION_CAP_MODAL}),Z=(e,t,n,a)=>({type:i.OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG,uri:e,onConfirm:t,onCancel:n,remoteDeviceInfo:a}),Q=()=>({type:i.CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG})},20386:(e,t,n)=>{"use strict";n.d(t,{Q:()=>p});var i=n(61740),a=n(3802),s=n(99948),r=n(22508),o=n(65852);function l(e){return null!=e&&""!==e}function d(e){return l(e)&&"#"!==e}function c(e,...t){return t.find(e)??null}function u(...e){return c(l,...e)}function m(...e){const t=c(d,...e);return t?(0,o.p)(t):t}function p(e){const t=(0,i.v9)((e=>e.ads?.vto?.info??null)),n=(0,i.v9)((e=>e.ads?.audio?.info??null)),l=(0,s.Y)((e=>e?.context),((e,t)=>e?.uri===t?.uri));if(!(0,r.k6)(e))return null;const{advertiser:d,url:c,title:p}=e,g=a.ag.get("ad-formats.advertisement"),h=a.ag.get("ad-formats.learnMore");if(function(e){return e.isPodcastAd}(e)){const e=l?.metadata?.context_description||d||h;return{title:u(p,t?.advertiser,n?.buttonMessage)??g,subtitle:e,url:m(t?.clickUrl,n?.clickUrl,c),blurbUri:l?.metadata?.context_description&&e===l?.metadata.context_description&&l.uri?(0,o.p)(l.uri):void 0}}if(function(e){return"video"===e.mediaType}(e))return{title:t?.advertiser??g,subtitle:t?.buttonMessage??h,url:m(t?.clickUrl,c)};const k=!0===n?.isFeaturedActionPlay?a.ag.get("ad-formats.playTrack"):null;return{title:d||g,subtitle:u(n?.buttonMessage,k)??h,url:m(n?.clickUrl,c)}}},87468:(e,t,n)=>{"use strict";n.d(t,{e:()=>a});var i=n(70304);function a(e){return`${(0,i.lc)(e)}/sponsors`}},14556:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var i=n(36844),a=n(41836);function s(){return(0,i.W6)(a.fX)}},54093:(e,t,n)=>{"use strict";function i(e){return{...e,clickthrough:e.clickthroughUrl,trackingEvents:e.trackingEvents,metadata:{...e,creative_id:e.creativeId,lineitem_id:e.lineitemId},display:e.displayImage}}n.d(t,{t:()=>i})},88294:(e,t,n)=>{"use strict";n.d(t,{D:()=>a});var i=n(70304);function a(e){return`${(0,i.mH)(e)}/sponsors`}},25097:(e,t,n)=>{"use strict";n.d(t,{Fw:()=>u,Hp:()=>i,Ir:()=>p,MJ:()=>c,_G:()=>s,_M:()=>g,az:()=>d,bo:()=>h,dk:()=>k,fm:()=>l,kH:()=>S,kh:()=>f,lT:()=>y,lb:()=>m,r1:()=>a,rt:()=>r,uE:()=>o,yg:()=>v});const i={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"},a="HPTO_COMPONENT_MOUNTED",s="HPTO_LOG_EVENT",r="HPTO_LOG_ERROR_EVENT",o=e=>({type:i.GOT_TEMPLATE,data:e}),l=e=>({type:i.HPTO_CONTAINER_MOUNTED,data:{enableHptoLocationRefactor:e}}),d=e=>({type:a,element:e}),c=e=>({type:i.HPTO_COMPONENT_UNMOUNTED,data:{clearCreative:e}}),u=()=>({type:i.HPTO_COMPONENT_NEW_AD_RENDERED}),m=()=>({type:i.FETCH_CREATIVE}),p=()=>({type:i.FETCHING_CREATIVE}),g=e=>({type:i.GOT_CREATIVE,data:e}),h=e=>({type:i.SET_HPTO_PREVIEW,data:e}),k=()=>({type:i.HPTO_PREVIEW_HOME_NAVIGATION}),v=()=>({type:i.CREATIVE_FETCH_FAILED}),f=(e,t="")=>({type:s,event:e,context:t}),y=e=>({type:r,error:e}),S=()=>({type:i.DEBUG_FORCE_REFRESH_HPTO})},68262:(e,t,n)=>{"use strict";n.d(t,{F7:()=>m,Jk:()=>d,LA:()=>u,PA:()=>g,W3:()=>l,sp:()=>c,t4:()=>r,vK:()=>p});var i=n(23055),a=n(24558);const s=[a.O.NATIVE,a.O.IMAGE,a.O.HTML],r=e=>e.ads.hpto?.template||null,o=e=>e.ads.root.isHptoHidden,l=e=>e.ads.hpto?.hptoIsStable||null,d=e=>e.ads.root.isPremium,c=e=>e.ads.hpto?.creativeFetchingState||null,u=(0,i.P1)((e=>e.ads.hpto?.creative||null),(e=>e.ads.hpto?.preview||null),((e,t)=>t||e)),m=(0,i.P1)(u,d,o,((e,t,n)=>{if(!e)return!1;return!(!s.includes(e.bannerMode)||t&&n)})),p=(0,i.P1)(d,o,((e,t)=>!e||!t)),g=(0,i.P1)(u,(e=>!!e&&s.includes(e.bannerMode)))},48178:(e,t,n)=>{"use strict";n.d(t,{Z:()=>v});var i=n(59496),a=n(56162),s=n(58706),r=n(3802),o=n(9708),l=n(76084),d=n(83747),c=n(98306),u=n(79475),m=n(4637);const p="110px",g=({adId:e,advertiser:t,tagline:n,displayImage:i,buttonMessage:a,cardOnClick:r,buttonOnClick:g})=>(0,m.jsx)(o.w,{"":"leavebehind",onClick:r,onClickHint:`Learn more about ${t}`,layout:"wide",variant:"tinted",id:e,size:"xxl",title:(0,m.jsx)(l.g,{weight:"bold",variant:"ballad",lineClamp:1,"":"leavebehind-advertiser",children:t}),subtitle:(0,m.jsx)(d.l,{as:"div",paddingBottom:s.hM$,lineClamp:2,"":"leavebehind-tagline",children:n}),media:(0,m.jsx)(c.d,{"":"leavebehind-image",src:i.src,imageWidth:p,imageHeight:p,alt:i.alt}),body:(0,m.jsx)(u.D,{"":"leavebehind-button",colorSet:"invertedLight",buttonSize:"sm","aria-label":`Learn more about ${t}`,onClick:g,children:a})}),h="Q37FJoGFTgoNpsDfGsN1",k="FDps6_94Is8Rqkopfsrw",v=({leavebehinds:e,seeAllButton:t})=>(0,m.jsx)(i.Suspense,{fallback:null,children:(0,m.jsxs)("section",{"":"music-leavebehinds-wrapper",children:[(0,m.jsxs)("div",{className:k,children:[(0,m.jsx)(a.D,{as:"h2",semanticColor:"textBase",variant:"canon",paddingBottom:s.nuo,"":"music-leavebehinds-title",children:r.ag.get("podcast-ads.recent_ads")}),t]}),(0,m.jsx)("div",{className:h,"":"leavebehinds-list-wrapper",children:e.map((e=>(0,m.jsx)(g,{...e},e.adId)))})]})})},78195:(e,t,n)=>{"use strict";n.d(t,{v:()=>i});const i=e=>e.ads.musicLeavebehinds.leavebehinds||null},87810:(e,t,n)=>{"use strict";n.d(t,{Gr:()=>a,Wi:()=>i,ZN:()=>s});let i=function(e){return e.FETCH_LEAVEBEHINDS="FETCH_LEAVEBEHINDS",e.UPDATE_LEAVEBEHINDS="UPDATE_LEAVEBEHINDS",e.CLEAR_LEAVEBEHINDS="CLEAR_LEAVEBEHINDS",e.ERROR_FETCHING_LEAVEBEHINDS="ERROR_FETCHING_LEAVEBEHINDS",e}({});const a=e=>({type:i.UPDATE_LEAVEBEHINDS,data:e}),s=()=>({type:i.FETCH_LEAVEBEHINDS})},462:(e,t,n)=>{"use strict";n.d(t,{AG:()=>h,Gi:()=>s,IP:()=>d,Kf:()=>o,Ot:()=>v,Pu:()=>p,Ud:()=>S,Vw:()=>g,bQ:()=>c,fd:()=>u,hk:()=>l,i7:()=>a,iN:()=>m,jY:()=>i,kh:()=>y,mr:()=>r,uE:()=>f,z8:()=>k});const i="REQUEST_SPONSORED_PLAYLISTS",a="REQUEST_SPONSORED_PLAYLISTS_SUCCESS",s="REQUEST_SPONSORED_PLAYLIST_AD",r="REQUEST_SPONSORED_PLAYLIST_AD_SUCCESS",o="LOG_EVENT_SPONSORED_PLAYLIST",l="SPONSORED_PLAYLIST_RENDERED",d="SPONSORED_PLAYLIST_DESTROYED",c="SET_SPONSORED_PREVIEW_AD",u=e=>({type:s,playlistUri:e}),m=e=>({type:a,sponsorships:e}),p=e=>({type:"REQUEST_SPONSORED_PLAYLISTS_FAILURE",error:e}),g=()=>({type:l}),h=()=>({type:d}),k=()=>({type:i}),v=(e,t)=>({type:r,playlistUri:e,ad:t}),f=e=>({type:c,previewAd:e}),y=e=>({type:o,message:e}),S=e=>({type:"REQUEST_SPONSORED_PLAYLIST_AD_FAILURE",error:e})},34221:(e,t,n)=>{"use strict";n.d(t,{K:()=>a,u:()=>i});const i=300,a=200},83587:(e,t,n)=>{"use strict";n.d(t,{Hp:()=>i,SY:()=>d,Vb:()=>r,Zc:()=>s,hX:()=>o,ir:()=>c,kh:()=>l,w9:()=>a});const i={MINIMIZE_VIDEO_AD_VIEW:"MINIMIZE_VIDEO_AD_VIEW",MAXIMIZE_VIDEO_AD_VIEW:"MAXIMIZE_VIDEO_AD_VIEW",HIDE_VIDEO_AD_VIEW:"HIDE_VIDEO_AD_VIEW",SHOW_VIDEO_AD_VIEW:"SHOW_VIDEO_AD_VIEW",VTO_LOG_EVENT:"VTO_LOG_EVENT",VTO_SET_INFO:"VTO_SET_INFO",VTO_NAVIGATION_CHANGE:"VTO_NAVIGATION_CHANGE"},a=()=>({type:i.MINIMIZE_VIDEO_AD_VIEW}),s=()=>({type:i.MAXIMIZE_VIDEO_AD_VIEW}),r=()=>({type:i.HIDE_VIDEO_AD_VIEW}),o=()=>({type:i.SHOW_VIDEO_AD_VIEW}),l=(e,t)=>({type:i.VTO_LOG_EVENT,event:e,eventReason:t}),d=e=>({type:i.VTO_SET_INFO,info:e}),c=()=>({type:i.VTO_NAVIGATION_CHANGE})},71182:(e,t,n)=>{"use strict";n.d(t,{postEvent:()=>r});var i=n(8097),a=n(10427);const s=new i.EventsClient((0,a.G)()),{postEvent:r}=s},43630:(e,t,n)=>{"use strict";n.d(t,{adsCosmos:()=>i});const i=(0,n(44007).v)()},50423:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getEpisodeSponsors:()=>s});var i=n(43630),a=n(54093);const s=async(...e)=>{const t=globalThis;if("function"==typeof t.getEpisodeSponsorsOverride)return await t.getEpisodeSponsorsOverride(...e);const[n,s]=e;if(!n)throw new Error("episodeBase62Id invalid for getting episode sponsors");const r=((...[e,t])=>`https://spclient.wg.spotify.com/podcast-ap4p/${2===t?.version?"v2/episodeSponsors":"rawSponsoredSection"}/${e}${2===t?.version?"?responseFormat=json":""}`)(...e);if(2===s?.version){return(await i.adsCosmos.get(r)).ads.map(a.t)}return await i.adsCosmos.get(r)}},39275:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getShowSponsors:()=>s});var i=n(43630),a=n(54093);const s=async(...e)=>(await i.adsCosmos.get(((...[e])=>`https://spclient.wg.spotify.com/podcast-ap4p/showSponsors/${e}?responseFormat=json`)(...e))).ads.map(a.t)},89606:(e,t,n)=>{"use strict";n.d(t,{tg:()=>s,gN:()=>A,oc:()=>c});var i=n(73229),a=n(43630);function s(...e){return console.log("cosmos-connector: ",...e),e}var r=n(10427);const o=new i.ProductStateClient((0,r.G)()),l={"Content-Type":"application/json"},d=e=>`sp://ads/v1/events/${e}`;function c(e,t,n,i){return a.adsCosmos.sub(d(e),t,n,i)}var u=n(50423),m=n(39275);const p="sp://device_state/state";const g="sp://ads/v1/podcast/metadata";const h=Date.now(),k="https://spclient.wg.spotify.com/ads/v1/ads",v="https://spclient.wg.spotify.com/sponsoredplaylist/v1/sponsored",f="sp://ads/v1/slots",y="sp://ads/v1/formats/",S="sp://ads/v1/settings",b=`${S}/request_header`,_="sp://ads/v1/state",N="sp://ads/v2/state",E=["audio","video","banner"];let x=k,C=v;function w(e,t){a.adsCosmos.sub(y+e,(e=>{t(e)}))}function I(e){return a.adsCosmos.get(`${S}/${e}`,l)}function T(e,t){return a.adsCosmos.post(`${f}/${e}/${t}`,{},l)}const A={subscribeToFormat:w,getSlotConfigurations:I,subscribeToAdsProductState:function(e){return o.subValues(i.SubValuesRequest.fromPartial({}),(t=>{t.pairs.ads&&e({ads:t.pairs.ads})}))},subscribeToProductState:function(e,t){return o.subValues(i.SubValuesRequest.fromPartial({}),(n=>{n.pairs[e]&&t({[e]:n.pairs[e]})}))},getAdSlotConfig:e=>I(e).then((t=>t.settings.filter((t=>t.id===e))[0])),getAdForSlot(e,t,n){s("fetch ad for slot=%o, localTargeting=%o",t,e,x);const i=x!==k?x:`${x}/${t}`;return a.adsCosmos.get(i,{targeting:e,pod:{},session_id:h,overrides:n||{}},{}).then((e=>{if(!e.pod)throw new Error("pod-not-defined");if(!e.pod[t])throw new Error("slot-not-defined");if(0===e.pod[t].length)throw new Error("no-ads");return e.pod[t][0]}))},fetchAdForSlot(e,t){const n=`sp://ads/v1/ads/${e}`;s("fetchAdForSlot endpoint=%o",n);return a.adsCosmos.get(n,t,{}).then((t=>{if(!t[e])throw new Error("slot-not-defined");if(0===t[e].length)throw new Error("no-ads");return t[e][0]}))},requestPreviewAd:e=>(s("Requesting preview ad, adid=%o",e),a.adsCosmos.post(`sp://ads/v1/preview/${e}`,{})),overrideCountry:e=>(s("Overring country=%o",e),a.adsCosmos.put("sp://ads/v2/testing/request_override/country",{value:e})),patchTargeting:(e,t)=>a.adsCosmos.put(`sp://ads/v1/targeting/${e}`,{value:t},l),increaseStreamTime:e=>a.adsCosmos.post("sp://ads/v1/testing/playtime",{value:e},l),addNewSlot:(e,t)=>a.adsCosmos.put(`${f}/${e}`,{formats:[t]},l).then((()=>`${f}/${e}/${t}`)),subscribeToSlot:(e,t)=>a.adsCosmos.sub(e,(e=>{t(e)})),subscribeToSlotType:(e,t)=>a.adsCosmos.sub(`${f}/${e}`,(e=>{t(e)})),subscribeToAllFormats(e){E.map((t=>{w(t,(n=>{e(t,n)}))}))},subscribeToEvent:c,postEvent:function(e,t,n){const i=`sp://ads/v1/events/${t}/${e}`;if(n&&n.event_data){if(Object.keys(n.event_data).some((e=>"string"!=typeof n.event_data?.[e])))return Promise.reject(new TypeError("Invalid Payload. All event_data values need to be strings. Furthermore, event_data shouldn't even be used at all anymore since it has been deprecated with https://ghe.spotify.net/ads/adscore-docs/pull/6"))}return a.adsCosmos.post(i,n||{},l)},postToSlot(e,t,n){const i=`${f}/${e}/${t}`;return a.adsCosmos.post(i,n||{},l)},getSlotConfiguration:(e,t)=>window.Ads&&window.Ads.adFormatOverrides.billboardShowAfterSeconds?Promise.resolve(window.Ads.adFormatOverrides.billboardShowAfterSeconds):I(e).then((n=>{let i;return n.settings.forEach((n=>{n.id===e&&(i=n[t])})),i})),configureSlot:(e,t,n)=>a.adsCosmos.put(`${S}/${e}/${t}`,{value:n},l),enableSlot:e=>a.adsCosmos.put(`${S}/${e}/slot_enabled`,{value:!0},l),getSponsoredUris(){const e=C!==v?C:v;return a.adsCosmos.get(e)},getSponsorshipAd(e){const t=C!==v?C:`${v}/${e}`;return s("getSponsorshipAd",t),a.adsCosmos.get(t)},subToState(e){a.adsCosmos.sub(_,e)},subToAdState(e){a.adsCosmos.sub(N,e)},getState:()=>a.adsCosmos.get(_),getAdState:()=>a.adsCosmos.get(N),getFeatureFlags:e=>a.adsCosmos.post("sp://abba/v1/flags",{flags:e},l),setAdSlotEndpoint(e){x=e,s("setAdSlotEndpoint",e)},setAdStatePusherEndpoint:e=>(s("setAdStatePusherEndpoint",e),a.adsCosmos.put("sp://ads/v2/settings/state/ad_state_endpoint",{value:e},l)),setSponsoredUri(e){C=e,s("setSponsoredUri",e)},triggerSlotFetch:e=>T(e,"fetch"),triggerSlotPlay:e=>T(e,"now"),triggerSlotClear:e=>T(e,"clear"),triggerSlotClearAll:e=>T(e,"clear_all"),setRequestHeader:(e,t,n)=>a.adsCosmos.put(`${b}/${e}`,{value:t,refresh_inventory:n},l),removeRequestHeader:(e,t)=>a.adsCosmos.del(`${b}/${e}`,{refresh_inventory:t},l),setAdStateKey:(e,t)=>a.adsCosmos.put(`${N}/${e}`,{value:t},l),setAdState:e=>a.adsCosmos.put(`${N}`,e,l),loadAdPod:e=>(s("Loading ad pod via cosmos",e),a.adsCosmos.put("sp://ads/v2/testing/insert_ads",{value:JSON.stringify(e)},l)),overridePodcastMetadata:function(e){return s("Overriding podcast metadata",e),a.adsCosmos.put(g,e,l)},logAudioVolume:async function(e){await a.adsCosmos.put(p,{volume:e},l)},getEpisodeSponsors:u.getEpisodeSponsors,getShowSponsors:m.getShowSponsors}},50538:(e,t,n)=>{"use strict";n.d(t,{N:()=>k,f:()=>f});var i=n(66685),a=n.n(i);const s=["Loftie","HBOMax","Squarespace","Casper","Smile Direct Club","Test Advertiser #6","Test Advertiser #7"],r=async()=>s.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 o=n(89606);const l="podcast_midroll_15_clickthrough",d="podcast-midroll-1",c={segments:[{slot:d,start:3e4,stop:45e3,targeting:{maxads:"1"},admockerTestCase:l}]};const u="https://admocker.spotify.com";let m;function p(e){return o.gN.increaseStreamTime(e)}function g(e,t){return o.gN.configureSlot(e,"ad_server_endpoint",t).then((()=>{h()}))}function h(){m?._debugForceRefreshHpto?.()}const k={overrideCountry:function(e){return o.gN.overrideCountry(e)},patchTargeting:function(e,t){return o.gN.patchTargeting(e,t)},increaseStreamTime:p,getAdServerEndpoint:function(e){return o.gN.getSlotConfigurations(e).then((e=>e.settings[0].ad_server_endpoint))},overrideAdServerEndpoint:g,overrideAdSlotEndpoint:function(e){return o.gN.setAdSlotEndpoint(e)},overrideAdStatePusherEndpoint:function(e){return o.gN.setAdStatePusherEndpoint(e)},overrideSponsoredPlaylistEndpoint:function(e){o.gN.setSponsoredUri(e),m?.overrideSponsoredPlaylistEndpoint?.()},_debugForceRefreshHpto:h,manualPodLoad:function(e){return(0,o.tg)("manualPodLoad(): pod=%o",e),o.gN.loadAdPod(e)},setAdServerEndpoint:async function(e,t,n){const i="ad_server_endpoint",a=await o.gN.getSlotConfigurations(e);let s="";return a?.settings?.[0]?.[i]&&(s=a.settings[0][i].replace("https://pubads.g.doubleclick.net",t)),s+=`&session_id=${n}`,o.gN.configureSlot(e,i,s)},clearSlot:function(e){return o.gN.postToSlot(e,"clear")},triggerSlot:async function(e){return await o.gN.triggerSlotClearAll(e),o.gN.postToSlot(e,"fetch")},subToFormats:function(e){return o.gN.subscribeToAllFormats(((t,n)=>{e?e(t,n):(0,o.tg)("config for slot=%o, res=%o",t,n)}))},subToState:function(e){return o.gN.subToState((t=>{e?e(t):(0,o.tg)("legacy ads state updated: %o",t)}))},subToAdState:function(e){o.gN.subToAdState((t=>{e?e(t):(0,o.tg)("ad state updated: %o",t)}))},getState:function(e){return o.gN.getState().then((t=>(e?e(t):(0,o.tg)("legacy ads state: %o",t.state),t)))},getAdState:function(e){return o.gN.getAdState().then((t=>{e?e(t):(0,o.tg)("ad state: %o",t)}))},configureSlot:function(e,t,n){return o.gN.configureSlot(e,t,n)},debug:o.tg,getAdSlotConfigurations:function(e,t){o.gN.getSlotConfigurations(e).then((n=>{t?t(n):(0,o.tg)("config for slot=%o, res=%o",e,n)}))},setRequestHeader:function(e,t,n){return o.gN.setRequestHeader(e,t,n)},removeRequestHeader:function(e,t){return o.gN.removeRequestHeader(e,t)},createSlotAndOverrideItsAdServerEndpoint:function(e,t){return o.gN.addNewSlot(e).then((()=>g(e,t))).catch((t=>(0,o.tg)(`Problem creating and overriding ${e} slot, error=%o`,t)))},enableSlot:function(e){return o.gN.enableSlot(e)},queueVideoAd:function(){return Promise.all([o.gN.addNewSlot("stream","video"),o.gN.increaseStreamTime(1200),o.gN.patchTargeting("focus","true"),o.gN.patchTargeting("adbreak","video,adscore")])},setBillboardTimeout(e){k.adFormatOverrides.billboardShowAfterSeconds=e},applyAdmockerForPodcastAd:function({podcastMetadata:e=c,sessionId:t="1",endpoint:n=(e=>function(e,t){return`${u}/mock/ad?test_case=${e}&session_id=${t}`}(e.admockerTestCase,t))}={}){return e.segments.forEach((e=>{const t="function"==typeof n?n(e):n;g(e.slot,t)})),o.gN.overridePodcastMetadata(e)},adFormatOverrides:{billboardShowAfterSeconds:null},overrideGetEpisodeSponsors:function(e=r){globalThis.getEpisodeSponsorsOverride=e}};let v=!1;function f(e){m=e,v||(a().unbind("shift+f5"),a().bind("shift+f5",(()=>{p(1200)})),v=!0,window.Ads=k)}},65852:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var i=n(50346);function a(e){const t=(0,i.EC)(e);return function(e){return null!==e}(t)?t.toURI():e}},24558:(e,t,n)=>{"use strict";n.d(t,{O:()=>a,Y:()=>i});let i=function(e){return e.NOT_FETCHING="NOT_FETCHING",e.FETCHING="FETCHING",e.FETCHED="FETCHED",e.FAILED="FAILED",e}({}),a=function(e){return e.IMAGE="image",e.HTML="html",e.NATIVE="native",e}({})},78573:(e,t,n)=>{"use strict";n.d(t,{W9:()=>r,hf:()=>l});var i=n(78476);const a="stream",s="video";let r=function(e){return e.CLICKED="clicked",e.COLLAPSED="collapsed",e.EXPANDED="expanded",e.VIEWED="viewed",e}({}),o=function(e){return e.FOREGROUNDED="foregrounded",e.BACKGROUNDED="backgrounded",e}({});class l{enabled=!1;active=!1;fireImpressionOnStart=!1;constructor(e,t){this.focusState=e,this.videoTakeoverApi=t}async enable(e){return this.enabled||(this.enabled=!0,this.listener=e,this.focusState.addFocusListener(this),await this.videoTakeoverApi.addNewSlot(a,s),this.subscription=this.videoTakeoverApi.subscribeToSlotType(a,this.onAdMessage)),null}async disable(){this.enabled&&(this.resetState(),this.enabled=!1,this.listener=void 0,this.subscription&&this.subscription.cancel(),this.focusState.removeAllFocusListeners())}logEvent(e,t){if(this.playbackState){const{eventData:n,extraData:i}=this.createEventData(this.playbackState);this.log(e,n,i,t)}}onRender(){this.logEvent(this.focusState.hasFocus()?o.FOREGROUNDED:o.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(e.format===s&&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}async handleApplicationGainedFocus(){this.active&&this.logEvent(o.FOREGROUNDED),await Promise.all([this.videoTakeoverApi.patchTargeting("focus","true"),this.videoTakeoverApi.patchTargeting("adbreak","video,adscore")])}async handleApplicationLostFocus(){this.active&&this.logEvent(o.BACKGROUNDED),await Promise.all([this.videoTakeoverApi.patchTargeting("focus","false"),this.videoTakeoverApi.patchTargeting("adbreak","adscore")])}log(e,t={},n={},i){this.playbackState&&this.videoTakeoverApi.postEvent(this.playbackState.adId,e,{event_data:{clientReportedUserAgent:navigator.userAgent,...t},...n,...i&&{reason:i}})}onCreated(e){this.active=!0,this.playbackState=e,this.listener&&this.listener.onCreated()}onEnded(e,t){this.active=!1,this.playbackState=e,i.xu.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}}},2831:(e,t,n)=>{"use strict";n.d(t,{HI:()=>d,Hp:()=>i,Iq:()=>s,Ru:()=>o,jj:()=>a,nX:()=>c,tv:()=>r,xG:()=>l});const i={ADS_ENABLED:"ADS_ENABLED",ADS_DISABLED:"ADS_DISABLED",ADS_PREMIUM:"ADS_PREMIUM",ADS_HPTO_HIDDEN:"ADS_HPTO_HIDDEN",ADS_POST_HIDE_HPTO:"ADS_POST_HIDE_HPTO",TRIGGER_PREVIEW_AD:"TRIGGER_PREVIEW_AD",LOG_NOW_PLAYING_AD_CLICK:"LOG_NOW_PLAYING_AD_CLICK"},a=()=>({type:i.ADS_ENABLED}),s=()=>({type:i.ADS_DISABLED}),r=e=>({type:i.ADS_PREMIUM,isPremium:e}),o=e=>({type:i.ADS_HPTO_HIDDEN,isHptoHidden:e}),l=()=>({type:i.ADS_POST_HIDE_HPTO}),d=e=>({type:i.TRIGGER_PREVIEW_AD,adUriHexId:e}),c=e=>({type:i.LOG_NOW_PLAYING_AD_CLICK,eventReason:e})},22521:(e,t,n)=>{"use strict";n.d(t,{I:()=>s});const i="main-actionBarBackground-background";var a=n(4637);const s=({backgroundColor:e})=>(0,a.jsx)("div",{className:i,style:{backgroundColor:e}})},4270:(e,t,n)=>{"use strict";n.d(t,{o:()=>c,F:()=>u});var i=n(84875),a=n.n(i),s=n(22521),r=n(76270);const o="main-actionBar-ActionBar",l="main-actionBar-ActionBarRow";var d=n(4637);const c=({backgroundColor:e,children:t,style:n})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.I,{backgroundColor:e}),(0,d.jsx)(r.U,{children:(0,d.jsx)("div",{className:a()(o,"contentSpacing"),style:n,children:t})})]}),u=({children:e})=>(0,d.jsx)("div",{className:l,"":"action-bar-row",children:e})},78586:(e,t,n)=>{"use strict";n.d(t,{G:()=>N});var i=n(84875),a=n.n(i),s=n(56162),r=n(83680),o=n(28471),l=n(30366),d=n(63082),c=n(79475),u=n(3802),m=n(69392),p=n(64719);const g="lIp2JaiMRS6_yF05q5N9",h="uzQIGWrDxI1E09vQnrXk",k="s58sp4t3h1uU9n_42KqD",v="c0KyMkxeMCWQGE7cR8s_",f="I2hCY2G1sJIBaTtEfJt_",y="bXJ77rNIJ18Y0GfegQdr",S="y9bkifFKNExwjaoINLm9",b="Qsmn7PN8jFZ8tATBCnFs";var _=n(4637);const N=({title:e,description:t,id:n,visible:i,primaryButtonText:N,secondaryButtonText:E,checkboxText:x,onHide:C,onPrimaryButtonClick:w,onSecondaryButtonClick:I=C,onCheckboxClick:T,onCloseClick:A=I,showButtons:P=!0,children:O,placement:D="auto",hideArrow:R,className:L,popperOptions:F,zIndex:j,maxWidth:M,tippyClassName:U,tippyWrapperClassName:B,hideOnClickOutside:V=!0,useSecondaryStyling:H=!1,childRef:G,fadeOut:W=!1,renderInline:z=!0})=>(0,_.jsx)(m.x,{renderInline:z,visible:i,placement:D,hideArrow:R,popperOptions:F,className:U,tippyWrapperClassName:B,zIndex:j,maxWidth:M,onHide:V?C:()=>{},childRef:G,fadeOut:W,overlay:(0,_.jsxs)("div",{className:a()(g,L),"":`${n}-hook`,children:[(0,_.jsxs)("div",{className:h,children:[(0,_.jsx)(s.D,{as:"p",className:k,variant:"cello",children:e}),!P&&(0,_.jsx)(p.E,{size:"sm",className:b,onClick:e=>A?.(e),ariaLabel:u.ag.get("close"),icon:r.k})]}),(0,_.jsx)(s.D,{as:"p",className:v,variant:"mesto",children:t}),P&&(0,_.jsxs)("div",{className:f,children:[(0,_.jsx)("div",{children:x&&(0,_.jsx)(o.z,{id:"dont.show.onboarding.npv",onChange:T,semanticColor:"essentialBase",className:y,children:(0,_.jsx)(s.D,{variant:"mesto",children:x()})})}),(0,_.jsxs)("div",{className:S,children:[E&&(0,_.jsx)(l.o,{onClick:I,buttonSize:"sm",children:E()}),N&&(H?(0,_.jsx)(d.P,{onClick:w,buttonSize:"sm",children:N()}):(0,_.jsx)(c.D,{colorSet:"invertedLight",onClick:w,buttonSize:"sm",children:N()}))]})]})]}),children:O})},64238:(e,t,n)=>{"use strict";n.d(t,{D:()=>c});var i=n(59496),a=n(3802),s=n(25459),r=n(71166),o=n(95663),l=n(60557),d=n(4637);const c=({id:e,children:t,targetURI:n,fadeOut:c=!1})=>{const u=(0,i.useCallback)((()=>{window.open((0,r.cd)(n).href)}),[n]),m={getTitle:()=>a.ag.get("action-trigger.available-in-app-only"),getDescription:()=>a.ag.get("action-trigger.listen-mixed-media-episode"),primaryButtonText:()=>a.ag.get("action-trigger.button.get-app"),secondaryButtonText:()=>a.ag.get("action-trigger.button.not-now"),isCTA:!0,intentPrimaryButton:"download-app",onLogInteraction:(0,o.o)(),shouldHideOnScroll:!0,fadeOut:c};return(0,d.jsx)(s.P,{className:l.Z.container,id:e,onPrimaryButtonClick:u,options:m,children:t})}},53523:(e,t,n)=>{"use strict";n.d(t,{P:()=>p,n:()=>m});var i=n(59496),a=n(61740),s=n(3802),r=n(25459),o=n(69392),l=n(95634),d=n(95663),c=n(60557),u=n(4637);const m=o.L,p=({id:e,options:t,children:n})=>{const o=(0,a.I0)(),p=(0,i.useCallback)((()=>{o((0,l.sX)())}),[o]),g=(0,d.o)(),h={isCTA:!0,placement:m.rightTop,...t,primaryButtonText:()=>s.ag.get("login"),secondaryButtonText:()=>s.ag.get("action-trigger.button.not-now"),onLogInteraction:g};return(0,u.jsx)(r.P,{className:c.Z.container,id:e,onPrimaryButtonClick:p,options:h,children:n})}},14241:(e,t,n)=>{"use strict";n.d(t,{H:()=>P,q:()=>T});var i=n(59496),a=n(84875),s=n.n(a),r=n(82954),o=n(5153),l=n(48122),d=n(37133),c=n(3802),u=n(3289),m=n(4637);const p=(0,i.memo)((function({size:e,onEnd:t}){return(0,m.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,m.jsxs)("g",{id:"_R_G",children:[(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_4_G",transform:" translate(0, 0.006) translate(0, 0)",children:(0,m.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,m.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_3_G",children:(0,m.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,m.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_2_G",children:(0,m.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,m.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_1_G",children:(0,m.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,m.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_0_G",transform:" rotate(-130) scale(1.03, 1.03)",children:(0,m.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,m.jsx)("g",{id:"time_group"}),(0,m.jsxs)("defs",{children:[(0,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"0s",from:"0",to:"1",xlinkHref:"#time_group"})]})]})})),g=(0,i.memo)((function({size:e,onEnd:t}){return(0,m.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,m.jsxs)("g",{id:"_R_G",children:[(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_4_G_N_3_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_4_G",transform:" translate(0, 0.006) translate(0, 0)",children:(0,m.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,m.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_3_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_3_G",children:(0,m.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,m.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_2_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_2_G",transform:" rotate(-130) scale(1.03, 1.03)",children:(0,m.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,m.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_1_G",children:(0,m.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,m.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_N_1_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_2_T_0",transform:" translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_0_G",children:(0,m.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,m.jsx)("g",{id:"time_group"}),(0,m.jsxs)("defs",{children:[(0,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"0s",from:"0",to:"1",xlinkHref:"#time_group"})]})]})}));var h=n(58706);const k=(0,i.memo)((function({size:e,onEnd:t}){const n=e>16?2.35:2.5;return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:e*n,height:e*n,viewBox:"0 0 224 224",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(e*n-e)/2}px`},children:[(0,m.jsxs)("defs",{children:[(0,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_0",fill:"freeze",attributeName:"fill",from:h.ixZ,to:h.ixZ,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,m.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,m.jsx)("animate",{dur:"0.6833333s",begin:"0s",xlinkHref:"#_R_G_L_1_G_D_0_P_1",fill:"freeze",attributeName:"fill",from:h.ixZ,to:h.ixZ,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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"1s",from:0,to:1,xlinkHref:"#time_group"})]}),(0,m.jsxs)("g",{id:"_R_G",children:[(0,m.jsx)("g",{id:"_R_G_L_7_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_7_G",transform:" translate(112, 112) translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_7_G_D_0_P_0_G_0_T_0",children:(0,m.jsx)("ellipse",{id:"_R_G_L_7_G_D_0_P_0",stroke:h.By7,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:30,strokeOpacity:1,cx:0,cy:0})})})}),(0,m.jsx)("g",{id:"_R_G_L_6_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_6_G",transform:" translate(112, 112) translate(0, 0)",children:(0,m.jsx)("g",{id:"_R_G_L_6_G_D_0_P_0_G_0_T_0",children:(0,m.jsx)("ellipse",{id:"_R_G_L_6_G_D_0_P_0",stroke:h.By7,strokeLinecap:"round",strokeLinejoin:"round",fill:"none",strokeWidth:30,strokeOpacity:1,cx:0,cy:0})})})}),(0,m.jsx)("g",{id:"_R_G_L_5_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_5_G",children:(0,m.jsx)("path",{id:"_R_G_L_5_G_D_0_P_0",fill:h.ixZ,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,m.jsx)("g",{id:"_R_G_L_4_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_4_G",children:(0,m.jsx)("path",{id:"_R_G_L_4_G_D_0_P_0",fill:h.By7,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,m.jsx)("g",{id:"_R_G_L_3_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_3_G",children:(0,m.jsx)("path",{id:"_R_G_L_3_G_D_0_P_0",fill:h.ixZ,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,m.jsx)("g",{id:"_R_G_L_2_G_M",children:(0,m.jsx)("g",{id:"_R_G_L_2_G",children:(0,m.jsx)("path",{id:"_R_G_L_2_G_D_0_P_0",fill:h.By7,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,m.jsx)("g",{id:"_R_G_L_1_G_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_1_G_N_1_T_0",transform:" translate(112, 112)",children:(0,m.jsxs)("g",{id:"_R_G_L_1_G",transform:" scale(4, 4)",children:[(0,m.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",fill:h.ixZ,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,m.jsx)("path",{id:"_R_G_L_1_G_D_0_P_1",fill:h.ixZ,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,m.jsx)("g",{id:"_R_G_L_0_G_N_1_T_0_M",children:(0,m.jsx)("g",{id:"_R_G_L_0_G_N_1_T_0",transform:" translate(112, 112)",children:(0,m.jsxs)("g",{id:"_R_G_L_0_G",transform:" translate(0, 0)",children:[(0,m.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",fill:h.By7,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,m.jsx)("path",{id:"_R_G_L_0_G_D_1_P_0",stroke:h.By7,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,m.jsx)("g",{id:"time_group"})]})})),v=(0,i.memo)((function({size:e,onEnd:t}){const n=2.35;return(0,m.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid meet",width:e*n,height:e*n,viewBox:"0 0 224 224",style:{willChange:"transform",transform:"translate3d(0, 0, 0)",margin:`-${(e*n-e)/2}px`},children:[(0,m.jsxs)("defs",{children:[(0,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.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,m.jsx)("animate",{attributeType:"XML",attributeName:"opacity",dur:"1s",from:0,to:1,xlinkHref:"#time_group"})]}),(0,m.jsxs)("g",{id:"_R_G",children:[(0,m.jsx)("g",{id:"_R_G_L_1_G_N_2_T_0",children:(0,m.jsx)("g",{id:"_R_G_L_1_G",transform:" translate(0, -28) scale(4, 4) translate(0, 0)",children:(0,m.jsx)("path",{id:"_R_G_L_1_G_D_0_P_0",stroke:h.ixZ,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,m.jsx)("g",{id:"_R_G_L_0_G_N_2_T_0",children:(0,m.jsxs)("g",{id:"_R_G_L_0_G",transform:" translate(0.214, -27.999) scale(4, 4) translate(0, 0)",children:[(0,m.jsx)("path",{id:"_R_G_L_0_G_D_0_P_0",fill:h.By7,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,m.jsx)("path",{id:"_R_G_L_0_G_D_1_P_0",stroke:h.By7,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,m.jsx)("g",{id:"time_group"})]})}));var f=n(66604),y=n(36844),S=n(91546),b=n(41836),_=n(66721),N=n(67565);const E=new(n(59580).Ct);function x(e){const t=(0,i.useRef)([]);t.current=Array.isArray(e)?e:[e];return()=>{const e=t.current,n=function(e){return E.create(e,(()=>{const t=new Audio(e);return t.load(),t}))}(e[Math.floor(Math.random()*e.length)]);n.play()}}const C={button:"main-addButton-button",active:"main-addButton-active",disabled:"main-addButton-disabled",helmet:"main-addButton-helmet",ZoomInAnimation:"main-addButton-zoomInAnimation"};function w(e,t){return(0,m.jsx)(_.Ee,{src:t?(0,S.g)("images/mando_helmet_felix.png"):(0,S.g)("images/mando_helmet.png"),className:C.helmet,width:e,height:e,loading:"lazy"})}function I(e){const{surface:t,isViewingVariant:n,isPlayingVariant:i}=(0,N.ae)(),a=(0,y.W6)(b.k7,{loadingValue:b.zZ.DISABLED}),s=a!==b.zZ.DISABLED,r=a===b.zZ.HELMET_AND_SOUND||a===b.zZ.FELIX,o=a===b.zZ.FELIX,l=x(function(e){return e?[(0,S.g)("sounds/mando_this_is_the_way_felix.mp3")]:[(0,S.g)("sounds/mando_this_is_the_way_103.mp3"),(0,S.g)("sounds/mando_this_is_the_way_107.mp3")]}(o));if(t===N.Tg.ALBUM||t===N.Tg.TRACK||t===N.Tg.PLAYLIST){const t=s&&n===N.$e.MANDALORIAN,i=r&&t;return{content:t?w(e,o):null,playSound:i?l:()=>{}}}if(t===N.Tg.NOW_PLAYING){const t=s&&i===N.$e.MANDALORIAN,n=r&&t;return{content:t?w(e,o):null,playSound:n?l:()=>{}}}return{content:null,playSound:()=>{}}}let T=function(e){return e[e.xs=16]="xs",e[e.sm=24]="sm",e[e.md=32]="md",e[e.lg=48]="lg",e[e.xl=64]="xl",e}({});var A=function(e){return e.none="none",e.positive="positive",e.undo="undo",e}(A||{});const P=i.memo((function({onClick:e,isAdded:t,size:n,disabled:a=!1,isEpisode:h=!1,isAudiobook:y=!1,className:S,...b}){const _=t?c.ag.get("remove_from_your_library"):c.ag.get("save_to_your_library"),N=(0,f.T)(),[E,x]=(0,i.useState)(A.none),w=(0,i.useCallback)((()=>x(A.none)),[x]),{content:T,playSound:P}=I(n),O=(0,i.useCallback)((n=>{if(a)return;const{currentTarget:i,detail:s}=n;x(t?A.undo:A.positive),e(n),t||P(),s>0&&i&&i.blur()}),[t,e,a,P]);let D;return D=null!==T?t?T:(0,m.jsx)(r.A,{iconSize:n}):N||E===A.none?h||y?t?(0,m.jsx)(o.K,{iconSize:n}):(0,m.jsx)(l.G,{iconSize:n}):t?(0,m.jsx)(d.a,{iconSize:n}):(0,m.jsx)(r.A,{iconSize:n}):h||y?E===A.positive?(0,m.jsx)(p,{size:n,onEnd:w}):(0,m.jsx)(g,{size:n,onEnd:w}):E===A.positive?(0,m.jsx)(k,{size:n,onEnd:w}):(0,m.jsx)(v,{size:n,onEnd:w}),(0,m.jsx)(u._,{label:_,children:(0,m.jsx)("button",{type:"button",role:"switch","aria-checked":t,"aria-label":_,className:s()(C.button,S,{[C.active]:t,[C.disabled]:a}),onClick:O,"":"add-button",...b,children:D})})}))},62344:(e,t,n)=>{"use strict";n.d(t,{q:()=>I});var i=n(59496),a=n(84875),s=n.n(a),r=n(27509),o=n(46731),l=n.n(o),d=n(94041),c=n(31925),u=n(4637);const m=({iconSize:e,placeholderText:t})=>t?(0,u.jsx)("svg",{width:e,height:e,fill:"currentColor",viewBox:"0 0 18 20",xmlns:"http://www.w3.org/2000/svg","":"user-icon",children:(0,u.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"central",children:t})}):(0,u.jsx)(c.f,{"aria-hidden":"true",iconSize:e,"":"user-icon"});var p=n(28031);const g="main-avatar-avatar",h="main-avatar-withBadge",k="main-avatar-image",v="main-avatar-piled",f="main-avatar-piledIcon",y="main-avatar-placeholderWrapper",S="main-avatar-placeholderTransparent",b={},_=[d.HjQ,d.XfI,d.pCU,d.dG,d.m1g,d.s8M],N=e=>{if(!b[e]){const t=function(e){let t,n=0;if(0===e.length)return n;for(let i=0,a=e.length;il()(e)[0].toUpperCase(),x=e=>{const t=N(e);return(e=>{const{r:t,g:n,b:i}=e.rgb;return(299*t+587*n+114*i)/1e3>=128})((0,p.l)(t))?d.Snx:d.ixZ},C=({username:e,displayName:t,userIconSize:n,transparent:i})=>{const a=e&&t?(e=>({background:N(e),color:x(e)}))(e):{},r=e&&t?{placeholderText:E(t)}:{};return(0,u.jsx)("div",{className:s()(y,{[S]:i}),"":"placeholder-wrapper",style:a,children:(0,u.jsx)(m,{iconSize:n,...r})})};var w=n(42006);const I=(0,i.memo)((function(e){const{label:t,images:n,width:i,className:a,withBadge:o,userIconSize:l,testID:d,piled:c,username:m,displayName:p,customPlaceholder:y,transparent:S}=e,b=(0,r.o)(n,{desiredSize:i}),_=y||(0,u.jsx)(C,{username:m,displayName:p,userIconSize:l,transparent:S});return(0,u.jsxs)("figure",{className:s()(g,{[h]:o},a),title:t,style:{width:c?.7*i:i,height:i},"":d,children:[(0,u.jsx)("div",{className:s()({[v]:c}),style:{width:i,height:i,insetInlineStart:c?(.7-1)*i:0},children:b?(0,u.jsx)(w.E,{loading:"eager",src:b,alt:t,className:k,children:_}):_}),c&&(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"0",width:"0","aria-hidden":"true",children:(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"avatarClipPath",clipPathUnits:"objectBoundingBox",children:(0,u.jsx)("path",{className:f,d:"M 0.166 0.872 C 0.241 0.775 0.286 0.652 0.286 0.518 C 0.286 0.374 0.235 0.243 0.15 0.143 C 0.24 0.055 0.364 0 0.5 0 C 0.776 0 1 0.224 1 0.5 C 1 0.776 0.776 1 0.5 1 C 0.372 1 0.255 0.952 0.166 0.872 Z","transform-origin":"0.5 0.5"})})})})]})}))},88333:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var i=n(63120),a=n(4637);const s=({href:e,children:t,...n})=>(0,a.jsx)(i.default,{to:e,...n,children:t})},13655:(e,t,n)=>{"use strict";n.d(t,{q:()=>x,o:()=>w});var i=n(59496),a=n(84875),s=n.n(a),r=n(35302),o=n(75257),l=n(3802),d=n(94031),c=n(3289),u=n(64320),m=n(82538),p=n(93309),g=n(13339),h=n(56038),k=n(12696);var v=n(94350);const f="x-downloadButton-cancelDownloadButton",y="x-downloadButton-DownloadButton",S="x-downloadButton-button",b="x-downloadButton-removeDownload",_="x-downloadButton-cancelDownload",N="x-downloadButton-progress";var E=n(4637);let x=function(e){return e[e.xs=16]="xs",e[e.sm=24]="sm",e[e.md=32]="md",e}({});const C=e=>{const{currentTarget:t,detail:n}=e;n>0&&t&&t.blur()},w=({uri:e,isFollowing:t,canDownload:n=!0,onFollow:a,size:w=x.sm,className:I,onClick:T=(()=>{}),showUpsell:A=!0})=>{const P={"--size":`${w}px`},[O,D]=(0,i.useState)(!1),{capability:R,availability:L,addDownload:F}=(0,p._)(e),j=(0,d.D)(),M=(0,g.A)(e);((e,t)=>{const n=(0,k.r)(),a=(0,i.useRef)(!1);(0,i.useEffect)((()=>{e===m.Om.DOWNLOADING&&!1===a.current&&(a.current=!0,n.say(l.ag.get("download.downloading",t.totalItems)))}),[n,e,t]);const s=(0,h.D)(e);(0,i.useEffect)((()=>{s===m.Om.DOWNLOADING&&e===m.Om.YES&&(a.current=!1,n.say(l.ag.get("download.complete")))}),[n,s,e])})(L,M);const U=(0,i.useCallback)((e=>{e.preventDefault(),R===m.PQ.NO_PERMISSION?T(e,m.mc.NO_PERMISSION):(!1===t?(a(),D(!0)):F(),T(e,m.mc.ADD)),C(e)}),[F,R,t,T,a]),B=(0,i.useCallback)((t=>{t.preventDefault(),j(e),C(t),T(t,m.mc.REMOVE)}),[e,j,T]);(0,i.useEffect)((()=>{!0===O&&!0===t&&(F(),D(!1))}),[t,O,F]);const V=L===m.Om.YES;return R===m.PQ.NO_CAPABILITY||R===m.PQ.NO_PERMISSION_HIDE?null:(n||V)&&(R!==m.PQ.NO_PERMISSION||A)?R===m.PQ.NO_PERMISSION?(0,E.jsx)("div",{className:y,children:(0,E.jsx)(u.Nt,{offset:[-2,20],action:"toggle",trigger:"click",content:(0,E.jsx)(u.yv,{children:(0,E.jsx)("span",{children:l.ag.get("download.upsell")})}),renderInline:!1,children:(0,E.jsx)("div",{children:(0,E.jsx)(c._,{label:l.ag.get("download.download"),children:(0,E.jsx)("button",{className:s()(S,I),role:"switch",onClick:U,"aria-label":l.ag.get("download.download"),"aria-checked":!1,children:(0,E.jsx)(r.D,{iconSize:w})})})})})}):V?(0,E.jsx)(c._,{label:l.ag.get("download.remove"),children:(0,E.jsx)("button",{className:s()(S,I,b),role:"switch",onClick:B,"aria-label":l.ag.get("download.remove"),"aria-checked":!0,children:(0,E.jsx)(o.E,{iconSize:w})})}):L===m.Om.NO?(0,E.jsx)(c._,{label:l.ag.get("download.download"),children:(0,E.jsx)("button",{className:s()(S,I),role:"switch",onClick:U,"aria-label":l.ag.get("download.download"),"aria-checked":!1,children:(0,E.jsx)(r.D,{iconSize:w})})}):(0,E.jsxs)("div",{className:s()(_,I),role:"switch","aria-checked":!0,children:[(0,E.jsx)(c._,{label:l.ag.get("download.cancel"),children:(0,E.jsx)("button",{style:P,className:s()(S,f,I),onClick:B,"aria-label":l.ag.get("download.cancel")})}),(0,E.jsx)("span",{style:P,className:s()(N,f),children:(0,E.jsx)(v.e,{"aria-valuetext":l.ag.get("progress.downloading-tracks"),percentage:M.percentage,size:w})})]}):null}},73538:(e,t,n)=>{"use strict";n.d(t,{s:()=>u});var i=n(84875),a=n.n(i),s=n(96959),r=n(3802),o=n(3289);const l="fXu_epm4wnGo0vCaArXW";var d=n(4637),c=function(e){return e[e.xs=16]="xs",e[e.sm=24]="sm",e[e.md=32]="md",e}(c||{});const u=({isDisliked:e=!1,onClick:t=(()=>{}),size:n=c.md,className:i})=>(0,d.jsx)(o._,{label:r.ag.get("playback-control.ban"),children:e?(0,d.jsx)("button",{type:"button",role:"switch","aria-label":r.ag.get("playback-control.ban"),"aria-checked":e,className:a()(l,i),onClick:t,children:(0,d.jsx)(s.H,{iconSize:n})}):(0,d.jsx)("button",{type:"button","aria-label":r.ag.get("playback-control.ban"),className:a()(l,i),onClick:t,children:(0,d.jsx)(s.H,{iconSize:n})})})},35394:(e,t,n)=>{"use strict";n.d(t,{q:()=>u,z:()=>m});var i=n(59496),a=n(84875),s=n.n(a),r=n(86307),o=n(3802),l=n(3289);const d="main-moreButton-button";var c=n(4637);let u=function(e){return e[e.xs=16]="xs",e[e.sm=24]="sm",e[e.md=32]="md",e}({});const m=i.forwardRef((function({onClick:e=(()=>{}),size:t=u.md,label:n=o.ag.get("more"),className:i},a){return(0,c.jsx)(l._,{label:n,children:(0,c.jsx)("button",{ref:a,type:"button","aria-haspopup":"menu","aria-label":n,className:s()(d,i),onClick:e,"":"more-button",children:(0,c.jsx)(r.N,{iconSize:t})})})}))},46525:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});var i=n(59496),a=n(14241),s=n(66632),r=n(95663),o=n(4637);const l=i.memo((function({uri:e,className:t,onClick:n,size:l=a.q.xs}){const[d,c]=(0,s.Z)(e),u=(0,r.o)(),m=(0,i.useCallback)((t=>{t.preventDefault(),u({targetUri:e,intent:d?"remove-from-library":"add-to-library",type:"click"}),n&&n(!d),c(!d)}),[u,e,d,n,c]);return(0,o.jsx)(a.H,{className:t,size:l,onClick:m,isAdded:!!d,isEpisode:!0})}))},66405:(e,t,n)=>{"use strict";n.d(t,{B:()=>l});var i=n(59496),a=n(14241),s=n(95663),r=n(66632),o=n(4637);const l=i.memo((function({uri:e,className:t,onClick:n,size:l=a.q.xs}){const[d,c]=(0,r.Z)(e),u=(0,s.o)(),m=(0,i.useCallback)((t=>{t.preventDefault(),u({targetUri:e,intent:d?"remove-from-library":"add-to-library",type:"click"}),n&&n(!d),c(!d)}),[d,u,e,n,c]);return(0,o.jsx)(a.H,{className:t,size:l,onClick:m,isAdded:d})}))},28604:(e,t,n)=>{"use strict";n.d(t,{r:()=>S});var i=n(59496),a=n(56162),s=n(7142),r=n(3802),o=n(63887),l=n(61709),d=n(54299),c=n(24952),u=n(96768),m=n(20920),p=n(88794),g=n(40066),h=n(88513),k=n(14280),v=n(63120),f=n(4637);const y=({artist:e,index:t,logger:n,spec:s})=>{const r=(0,i.useCallback)((()=>{n.logInteraction(s.cardLinkFactory({position:t}).hitUiNavigate({destination:e.uri}))}),[n,s,t,e.uri]);return(0,l.i)(e)&&e.uri?(0,f.jsx)(d._,{menu:(0,f.jsx)(k.m,{uri:e.uri}),children:(0,f.jsx)(v.default,{to:e.uri,dir:"auto",onClick:r,children:e.name})},e.uri):(0,f.jsx)(a.D,{variant:"mesto",children:e.name})},S=({name:e,uri:t,images:n,artists:a=[],sharingInfo:l,year:k,isHero:v=!1,onClick:S,testId:b,index:_,requestId:N,color:E})=>{let x;const{onLibraryItemRemove:C}=(0,i.useContext)(o.H),w=(0,g.Y)(t),I=()=>a.map((e=>e.name)).join(r.ag.getSeparator());return x=v?(0,f.jsx)(m.Z,{index:_,onClick:S,headerText:e,featureIdentifier:"album",uri:t,playUri:w,ariaPauseLabel:r.ag.get("tracklist.a11y.pause",e,I()),ariaPlayLabel:r.ag.get("tracklist.a11y.play",e,I()),renderCardImage:()=>(0,f.jsx)(u.x,{isHero:!0,images:n,color:E,FallbackComponent:e=>(0,f.jsx)(s.c,{iconSize:64,...e})}),renderSubHeaderContent:(e,t)=>(0,f.jsxs)(f.Fragment,{children:[a.map(((n,i)=>[i>0&&r.ag.getSeparator(),(0,f.jsx)(y,{artist:n,index:i,logger:e,spec:t},n.uri)])),(0,f.jsx)(p.k,{children:r.ag.get("card.tag.album")})]}),testId:b,requestId:N}):(0,f.jsx)(c.C,{onClick:S,headerText:e,featureIdentifier:"album",uri:t,playUri:w,ariaPauseLabel:r.ag.get("tracklist.a11y.pause",e,I()),index:_,ariaPlayLabel:r.ag.get("tracklist.a11y.play",e,I()),renderCardImage:()=>(0,f.jsx)(u.x,{isHero:v,images:n,color:E,FallbackComponent:e=>(0,f.jsx)(s.c,{iconSize:64,...e})}),renderSubHeaderContent:(e,t)=>(0,f.jsxs)(f.Fragment,{children:[!!k&&(0,f.jsxs)("time",{dateTime:k.toString(),children:[k," • "]}),a.map(((n,i)=>[i>0&&r.ag.getSeparator(),(0,f.jsx)(y,{artist:n,index:i,logger:e,spec:t},n.uri)]))]}),testId:b,requestId:N}),(0,f.jsx)(d._,{menu:(0,f.jsx)(h.Y,{uri:t,artistUri:a?.[0]?.uri,sharingInfo:l,onRemoveCallback:C}),children:x})}},57559:(e,t,n)=>{"use strict";n.d(t,{i:()=>m});var i=n(59496),a=n(3802),s=n(54299),r=n(48811),o=n(24952),l=n(96768),d=n(88513),c=n(26758),u=n(4637);const m=i.memo((function(e){const{images:t,name:n,uri:i,type:m,year:p,sharingInfo:g,latest:h,showType:k,onClick:v,delegatePlayback:f=!1,isPlaying:y,onPlay:S,index:b,navigationUrl:_}=e,N=h?a.ag.get("artist.latest-release"):p;return(0,u.jsx)(s._,{menu:(0,u.jsx)(d.Y,{uri:i,sharingInfo:g}),children:(0,u.jsx)(o.C,{onClick:v,featureIdentifier:"album",headerText:n,uri:i,index:b,delegatePlayback:f,isPlaying:y,onPlay:S,navigationUrl:_,renderCardImage:()=>(0,u.jsx)(l.x,{images:t}),renderSubHeaderContent:()=>(0,u.jsxs)(u.Fragment,{children:[!!N&&(0,u.jsx)("time",{dateTime:(p||"").toString(),children:N}),k&&(0,u.jsx)("span",{className:c.Z.type,children:(0,r.R)(m)})]})})})}))},79823:(e,t,n)=>{"use strict";n.d(t,{I:()=>g});var i=n(59496),a=n(74991),s=n(3802),r=n(63887),o=n(54299),l=n(24952),d=n(96768),c=n(20920),u=n(88794),m=n(14280),p=n(4637);const g=e=>{const{name:t,uri:n,images:g,isHero:h,onClick:k,testId:v,index:f,requestId:y,color:S}=e;let b;const{onLibraryItemRemove:_}=(0,i.useContext)(r.H);return b=h?(0,p.jsx)(c.Z,{index:f,onClick:k,headerText:t,featureIdentifier:"artist",uri:n,renderCardImage:()=>(0,p.jsx)(d.x,{isHero:h,isCircular:!0,images:g,color:S,FallbackComponent:e=>(0,p.jsx)(a.a,{iconSize:64,...e})}),renderSubHeaderContent:()=>(0,p.jsx)(u.k,{children:s.ag.get("card.tag.artist")}),testId:v,requestId:y}):(0,p.jsx)(l.C,{index:f,onClick:k,headerText:t,featureIdentifier:"artist",uri:n,renderCardImage:()=>(0,p.jsx)(d.x,{isHero:h,isCircular:!0,images:g,color:S,FallbackComponent:e=>(0,p.jsx)(a.a,{iconSize:64,...e})}),renderSubHeaderContent:()=>(0,p.jsx)("span",{children:s.ag.get("card.tag.artist")}),testId:v,requestId:y}),(0,p.jsx)(o._,{menu:(0,p.jsx)(m.m,{uri:n,onRemoveCallback:_}),children:b})}},79351:(e,t,n)=>{"use strict";n.d(t,{c:()=>v});var i=n(45509),a=n(56162),s=n(95798),r=n(3802),o=n(54299),l=n(24952),d=n(96768),c=n(20920),u=n(88794),m=n(64052),p=n(99553);const g="Xk3_ws6o9K6gsByypayv",h="vycTlaEAs2kg_vqzEJ0A";var k=n(4637);const v=({name:e,uri:t,images:n,authorName:v,isHero:f,onClick:y,testId:S,index:b,requestId:_,isLocked:N=!1,color:E,gatedContentAccessReason:x})=>{let C;const w=(0,m.c)(x);return C=f?(0,k.jsx)(c.Z,{index:b,onClick:y,headerText:e,featureIdentifier:"audiobook",uri:t,isPlayable:!1,renderCardImage:()=>(0,k.jsx)(d.x,{isHero:!0,images:n,color:E,FallbackComponent:e=>(0,k.jsx)(i.P,{iconSize:64,...e})}),renderSubHeaderContent:()=>(0,k.jsxs)(k.Fragment,{children:[w&&(0,k.jsx)(a.D,{variant:"mesto",semanticColor:"textBrightAccent",className:h,children:r.ag.get("content.available.premium")}),(0,k.jsx)(a.D,{variant:"mesto",children:v}),(0,k.jsx)(u.k,{children:"AUDIOBOOK"})]}),testId:S,requestId:_}):(0,k.jsx)(l.C,{index:b,onClick:y,headerText:e,featureIdentifier:"audiobook",uri:t,isPlayable:!1,renderCardImage:()=>(0,k.jsx)(d.x,{images:n,color:E,FallbackComponent:e=>(0,k.jsx)(i.P,{iconSize:64,...e})}),renderSubHeaderContent:()=>(0,k.jsxs)(k.Fragment,{children:[N&&(0,k.jsx)(s.W,{iconSize:16,className:g}),w&&(0,k.jsx)(a.D,{variant:"mesto",semanticColor:"textBrightAccent",className:h,children:r.ag.get("content.available.premium")}),(0,k.jsx)(a.D,{as:"span",variant:"mesto",children:v})]}),testId:S,requestId:_}),(0,k.jsx)(o._,{menu:(0,k.jsx)(p.X,{uri:t}),children:C})}},24952:(e,t,n)=>{"use strict";n.d(t,{C:()=>C,Z:()=>x});var i=n(59496),a=n(84875),s=n.n(a),r=n(61740),o=n(89605),l=n(47183),d=n(50346),c=n(3802),u=n(30985),m=n(17201),p=n(39669),g=n(48607),h=n(96170),k=n(32422),v=n(6376),f=n(98187),y=n(6142),S=n(95663),b=n(77462),_=n(24927),N=n(26758),E=n(4637);const x=e=>{const{onClick:t=(()=>{}),delegatePlayback:n=!1,delegateLogging:a=!1,delegateNavigation:x=!1,playInsteadOfNavigating:C=!1,isPlaying:w,onPlay:I=(()=>{}),onContextMenu:T=(()=>{}),onTouchStart:A=(()=>{}),onTouchEnd:P=(()=>{}),featureIdentifier:O,uri:D,renderCardImage:R,renderSubHeaderContent:L=(()=>null),isPlayable:F=!0,isDownloadable:j=!1,headerText:M,hasNewEpisodeIndicator:U,className:B,playUri:V=D,albumURI:H,testId:G,ariaPlayLabel:W,ariaPauseLabel:z,index:K,navigationUrl:Y,requestId:q}=e,Z=(0,o.s0)(),Q=(0,S.o)(),J=H?`?highlight=${D}`:"",$=(0,y.O)([D],M),{spec:X,logger:ee,UBIFragment:te}=(0,h.fU)(l.createDesktopPlayandnavcardEventFactory,{data:{uri:D,position:K,reason:q??""}}),ne=H||D,ie=(0,d.EC)(ne,{parseUnknown:!0}),ae=ie?.type,se=(0,r.v9)(u.br),re=(0,r.v9)(u.yE),oe=c.ag.getUrlLocale(),le=(0,k.S9)({localeFeatureFlag:se,entityFeatureFlag:re,urlLocale:oe,entity:ae,type:"link"}),{isPlaying:de,togglePlay:ce,isActive:ue}=(0,g.n)({uri:V},{featureIdentifier:O});let me=de;n&&"boolean"==typeof w&&(me=w);const pe=(0,i.useCallback)((()=>{let e=X.cardPlayButtonFactory().hitPause({itemToBePaused:D});me||(e=ue?X.cardPlayButtonFactory().hitResume({itemToBeResumed:D}):X.cardPlayButtonFactory().hitPlay({itemToBePlayed:D}));const t=ee.logInteraction(e);if(I(D,t),a||Q({targetUri:D,intent:me?"pause":"play",type:"click"}),n){if("function"!=typeof I)throw Error("No delegate playback handler provided")}else ce({loggingParams:t})}),[a,n,ue,me,ee,Q,I,X,ce,D]),ge=(0,i.useCallback)((()=>{if(t(D),C)return void pe();if(x)return;Q({targetUri:D,intent:"navigate",type:"click"});const e=X.hitUiNavigate({destination:Y??D});let n;ee.logInteraction(e),ie&&(n=ie.toURLPath(!0)+J);let i=Y??n;i=le?`/${p.F0}${oe}${i}`:i,i&&Z(i)}),[t,D,x,Q,X,Y,ee,ie,le,oe,J,Z,C,pe]),he=(0,h.Wi)(X);return(0,E.jsx)(te,{spec:X,children:(0,E.jsx)(_.Q,{uri:e.uri,trigger:_.x.OnMouseDown,children:(0,E.jsx)("div",{ref:he,className:s()(N.Z.card,B),onContextMenu:T,onTouchStart:A,onTouchEnd:P,"":G,children:(0,E.jsxs)("div",{draggable:!0,onDragStart:$,className:N.Z.draggable,children:[(0,E.jsxs)("div",{className:N.Z.imageContainer,children:[R(),F&&(0,E.jsx)("div",{className:s()(N.Z.PlayButtonContainer,{[N.Z.PlayButtonContainerVisible]:me}),children:(0,E.jsx)(m.f,{isPlaying:me,onClick:pe,ariaPlayLabel:W??c.ag.get("playlist.a11y.play",M),ariaPauseLabel:z??c.ag.get("playlist.a11y.pause",M)})})]}),(0,E.jsxs)("div",{className:N.Z.cardMetadata,children:[(0,E.jsx)(v.O,{to:H||D,search:J,onClick:ge,hasNewEpisodeIndicator:U,title:M,navigationUrl:Y,disableLink:x,children:M}),(0,E.jsx)(f.i,{children:L(ee,X)})]}),j&&(0,E.jsx)(b.$,{uri:D,className:N.Z.DownloadStatusIndicator,size:16}),(0,E.jsx)("div",{onClick:ge,className:N.Z.cardLink,"":"card-click-handler"})]})})})})},C=x},6376:(e,t,n)=>{"use strict";n.d(t,{O:()=>m});var i=n(59496),a=n(94041),s=n(56162),r=n(40780),o=n(63120);const l="main-cardHeader-link",d="main-cardHeader-text",c="main-cardHeader-hasNewEpisodeIndicator";var u=n(4637);const m=i.memo((function({search:e,children:t,to:n,onClick:i,isHero:m,title:p,hasNewEpisodeIndicator:g=!1,navigationUrl:h,disableLink:k=!1}){const v=m?"alto":"balladBold",f=(0,u.jsxs)(s.D,{as:"div",variant:v,className:d,paddingBottom:a.hM$,semanticColor:"textBase",children:[g&&(0,u.jsx)(r.Rd,{className:c}),t]});return k?f:(0,u.jsx)(o.Link,{to:n,onClick:i,title:p,className:l,dir:"auto",search:e,pathname:h,children:f})}))},96768:(e,t,n)=>{"use strict";n.d(t,{x:()=>u});var i=n(84875),a=n.n(i),s=n(56876),r=n(42006),o=n(75207),l=n(79765),d=n(4637);const c=e=>(0,d.jsx)(s.U,{iconSize:64,...e}),u=e=>{const{children:t,isHero:n=!1,isCircular:i=!1,withWaves:s=!1,FallbackComponent:u=c,images:m=[],color:p,loadingMode:g="lazy"}=e,h=(0,o.X)(m,{desiredSize:300,desiredLabel:"standard"}),k={backgroundImage:s&&h?.url?`url(${h?.url})`:void 0,"--card-color":p};return(0,d.jsx)("div",{className:a()(l.Z.imageWrapper,{[l.Z.hero]:n,[l.Z.circular]:i,[l.Z.withWavesWrapper]:s}),style:k,children:(0,d.jsxs)("div",{className:a()({[l.Z.withWaves]:s}),children:[(0,d.jsx)(r.E,{className:a()(l.Z.image,{[l.Z.circular]:i}),src:h?.url,loading:g,testid:"card-image",fadeIn:!0,children:u&&(0,d.jsx)("div",{className:l.Z.imagePlaceholder,children:(0,d.jsx)(u,{"aria-hidden":!0,"":"card-image-fallback"})})}),t]})})}},98187:(e,t,n)=>{"use strict";n.d(t,{i:()=>c});var i=n(59496),a=n(84875),s=n.n(a),r=n(56162);const o="main-cardSubHeader-root",l="main-cardSubHeader-isHero";var d=n(4637);const c=i.memo((function(e){const{children:t,isHero:n}=e;return(0,d.jsx)(r.D,{as:"div",variant:"mesto",className:s()(o,{[l]:n}),semanticColor:"textSubdued",children:t})}))},20920:(e,t,n)=>{"use strict";n.d(t,{Z:()=>A});var i=n(59496),a=n(84875),s=n.n(a),r=n(61740),o=n(89605),l=n(47183),d=n(50346),c=n(3802),u=n(17201),m=n(39669),p=n(48607),g=n(96170),h=n(32422),k=n(6376),v=n(98187),f=n(6142),y=n(95663),S=n(30985),b=n(77462);const _="main-heroCard-card",N="main-heroCard-cardLink",E="main-heroCard-draggable",x="main-heroCard-cardMetadata",C="main-heroCard-isDownloadable",w="main-heroCard-PlayButtonContainer",I="main-heroCard-isPlaying";var T=n(4637);const A=e=>{const{onClick:t=(()=>{}),onContextMenu:n=(()=>{}),onTouchStart:a=(()=>{}),onTouchEnd:A=(()=>{}),delegatePlayback:P=!1,delegateLogging:O=!1,delegateNavigation:D=!1,playInsteadOfNavigating:R=!1,isPlaying:L,onPlay:F=(()=>{}),featureIdentifier:j,uri:M,renderCardImage:U,renderSubHeaderContent:B=(()=>null),isPlayable:V=!0,isDownloadable:H=!1,headerText:G,hasNewEpisodeIndicator:W=!1,className:z,playUri:K=M,albumURI:Y,testId:q,ariaPlayLabel:Z,ariaPauseLabel:Q,index:J,requestId:$}=e,X=(0,o.s0)(),ee=(0,y.o)(),te=Y?`?highlight=${M}`:"",ne=(0,r.v9)(S.br),ie=(0,r.v9)(S.yE),ae=c.ag.getUrlLocale(),se=(0,f.O)([M],G),{spec:re,logger:oe,UBIFragment:le}=(0,g.fU)(l.createDesktopPlayandnavcardEventFactory,{data:{uri:M,position:J,reason:$??""}}),{isPlaying:de,isActive:ce,togglePlay:ue}=(0,p.n)({uri:K},{featureIdentifier:j});let me=de;P&&"boolean"==typeof L&&(me=L);const pe=(0,i.useCallback)((()=>{let e=re.cardPlayButtonFactory().hitPause({itemToBePaused:M});me||(e=ce?re.cardPlayButtonFactory().hitResume({itemToBeResumed:M}):re.cardPlayButtonFactory().hitPlay({itemToBePlayed:M}));const t=oe.logInteraction(e);if(F(M,t),O||ee({targetUri:M,intent:me?"pause":"play",type:"click"}),P){if("function"!=typeof F)throw Error("No delegate playback handler provided")}else ue({loggingParams:t})}),[O,P,ce,me,oe,ee,F,re,ue,M]),ge=(0,i.useCallback)((()=>{if(t(M),R)return void pe();if(D)return;ee({targetUri:M,intent:"navigate",type:"click"});const e=re.hitUiNavigate({destination:M});oe.logInteraction(e);const n=Y||M,i=(0,d.EC)(n),a=i.toURLPath(!0),s=(0,h.S9)({localeFeatureFlag:ne,entityFeatureFlag:ie,urlLocale:ae,entity:i.type,type:"link"})?`/${m.F0}${ae}${a}${te}`:`${a}${te}`;X(s)}),[t,M,R,D,ee,re,oe,Y,ne,ie,ae,te,X,pe]),he=(0,g.Wi)(re);return(0,T.jsx)(le,{spec:re,children:(0,T.jsx)("div",{ref:he,className:s()(_,z),onContextMenu:n,onTouchStart:a,onTouchEnd:A,"":q,children:(0,T.jsxs)("div",{draggable:!0,onDragStart:se,className:E,children:[U(),(0,T.jsxs)("div",{className:x,children:[(0,T.jsx)(k.O,{to:Y||M,search:te,onClick:ge,isHero:!0,title:G,hasNewEpisodeIndicator:W,children:G}),(0,T.jsx)(v.i,{children:B(oe,re)})]}),H&&(0,T.jsx)(b.$,{uri:M,className:C,size:16}),V&&(0,T.jsx)("div",{className:s()(w,{[I]:me}),children:(0,T.jsx)(u.f,{isPlaying:me,onClick:pe,ariaPlayLabel:Z,ariaPauseLabel:Q})}),(0,T.jsx)("div",{onClick:ge,className:N,"":"herocard-click-handler"})]})})})}},88794:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});var i=n(56162);const a="main-cardSubHeader-text";var s=n(4637);const r=({children:e})=>e?(0,s.jsx)(i.D,{semanticColor:"textBase",variant:"mestoBold",className:a,children:e}):null},75523:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var i=n(56876),a=n(3802),s=n(63120),r=n(27652),o=n(54299),l=n(56952),d=n(24952),c=n(96768),u=n(20920),m=n(88794),p=n(73444),g=n(4637);const h=(e,t)=>(n,i)=>{i&&e.logInteraction(t.cardLinkFactory({position:0}).hitUiNavigate({destination:i}))},k=({name:e,uri:t,images:n,description:k,authorName:v,isHero:f=!1,onClick:y=(()=>{}),testId:S,index:b,requestId:_,color:N,isPlayable:E})=>{let x,C=(0,g.jsx)(p.X,{uri:t}),w=E,I=!1;return(0,r.MW)(t)&&(w=!0,C=(0,g.jsx)(r.XL,{}),I=!0),x=f?(0,g.jsx)(u.Z,{index:b,onClick:y,headerText:e,featureIdentifier:"playlist",uri:t,isDownloadable:!0,playInsteadOfNavigating:I,renderCardImage:()=>(0,g.jsx)(c.x,{isHero:!0,images:n,color:N,FallbackComponent:e=>(0,g.jsx)(i.U,{iconSize:64,...e})}),renderSubHeaderContent:(e,t)=>(0,g.jsxs)(g.Fragment,{children:[k?(0,g.jsx)(l.N,{source:k,LinkComponent:s.Link,onLinkClick:h(e,t)}):v&&(0,g.jsx)("span",{children:a.ag.get("search.playlist-by",v)}),(0,g.jsx)(m.k,{children:a.ag.get("card.tag.playlist")})]}),testId:S,requestId:_,isPlayable:w}):(0,g.jsx)(d.C,{index:b,onClick:y,headerText:e,featureIdentifier:"playlist",uri:t,isDownloadable:!0,playInsteadOfNavigating:I,renderCardImage:()=>(0,g.jsx)(c.x,{images:n,color:N,FallbackComponent:e=>(0,g.jsx)(i.U,{iconSize:64,...e})}),renderSubHeaderContent:(e,t)=>(0,g.jsx)(g.Fragment,{children:k?(0,g.jsx)(l.N,{source:k,LinkComponent:s.Link,onLinkClick:h(e,t)}):v&&(0,g.jsx)("span",{children:a.ag.get("search.playlist-by",v)})}),testId:S,requestId:_,isPlayable:w}),(0,g.jsx)(o._,{menu:C,children:x})}},36876:(e,t,n)=>{"use strict";n.d(t,{I:()=>p});var i=n(56876),a=n(23202),s=n(53809),r=n(54299),o=n(48607),l=n(22508),d=n(24952),c=n(96768),u=n(78371),m=n(4637);const p=({name:e,uri:t,images:n,onClick:p=(()=>{}),index:g,testId:h})=>{const k=t.replace("spotify:station:","spotify:"),{isPlaying:v,togglePlay:f}=(0,o.n)({uri:t,restrictions:s.B},{featureIdentifier:"radio"}),y={shuffle:!1,repeat:l.zq.REPEAT_NONE};return(0,m.jsx)(r._,{menu:(0,m.jsx)(u.i,{uri:t}),children:(0,m.jsx)(d.C,{index:g,onClick:p,featureIdentifier:"radio",delegatePlayback:!0,isPlaying:v,onPlay:()=>f(y),headerText:e,uri:t,testId:h,renderCardImage:()=>(0,m.jsx)(c.x,{images:n,withWaves:!0,FallbackComponent:e=>(0,m.jsx)(i.U,{iconSize:64,...e})}),renderSubHeaderContent:()=>(0,m.jsx)("span",{children:(0,a.getRadioLabel)(k)})})})}},58089:(e,t,n)=>{"use strict";n.d(t,{_:()=>g});var i=n(59496),a=n(3802),s=n(63887),r=n(54299),o=n(12741),l=n(24952),d=n(96768),c=n(20920),u=n(88794),m=n(762),p=n(4637);const g=({images:e,name:t,uri:n,publisher:g,sharingInfo:h,mediaType:k,isHero:v=!1,onClick:f,testId:y,index:S,requestId:b,color:_})=>{let N;const E=k===o.E.MIXED?a.ag.get("type.show"):a.ag.get("card.tag.show"),{onLibraryItemRemove:x}=(0,i.useContext)(s.H);return N=v?(0,p.jsx)(c.Z,{index:S,onClick:f,delegatePlayback:!0,headerText:t,featureIdentifier:"show",uri:n,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(d.x,{isHero:!0,images:e,color:_}),renderSubHeaderContent:()=>(0,p.jsxs)(p.Fragment,{children:[g&&(0,p.jsx)("span",{children:g}),(0,p.jsx)(u.k,{children:E})]}),testId:y,requestId:b}):(0,p.jsx)(l.C,{onClick:f,isPlayable:!1,delegatePlayback:!0,headerText:t,featureIdentifier:"show",uri:n,index:S,renderCardImage:()=>(0,p.jsx)(d.x,{isHero:v,images:e,color:_}),renderSubHeaderContent:()=>(0,p.jsx)(p.Fragment,{children:g&&(0,p.jsx)("span",{children:g})}),testId:y,requestId:b}),(0,p.jsx)(r._,{menu:(0,p.jsx)(m.M,{uri:n,sharingInfo:h,onRemoveCallback:x}),children:N})}},9654:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var i=n(59496),a=n(84875),s=n.n(a),r=n(28291),o=n(52052),l=n(26758),d=n(79765);const c="V8p0Uoki3EIdMPOxzLow",u="YVcNB7bcFd5axagLHfAF",m="fabXdRhkEdHzu8OgR5Vn",p="fvOob2VViovPwenD9MRA";var g=n(4637);const h=(0,i.memo)((({isLoading:e})=>{const t=(0,r.h)("shimmer");return(0,g.jsx)("div",{ref:t,className:s()(d.Z.imageWrapper,{[p]:e})})})),k=(0,i.memo)((({cardImage:e,isLoading:t})=>(0,g.jsxs)("div",{className:s()(l.Z.card,c),"aria-hidden":!0,"":"skeleton-card",children:[(0,g.jsx)("div",{className:l.Z.imageContainer,children:e||(0,g.jsx)(h,{isLoading:t})}),(0,g.jsxs)("div",{className:l.Z.cardMetadata,children:[(0,g.jsx)(o.C,{as:"div",variant:"balladBold",className:u,charCount:15,isLoading:t}),(0,g.jsx)(o.C,{as:"div",variant:"mesto",className:m,charCount:10,isLoading:t})]})]})))},16500:(e,t,n)=>{"use strict";n.d(t,{G:()=>v});var i=n(3802),a=n(40075),s=n(54299),r=n(4882),o=n(90303),l=n(24952),d=n(96768),c=n(20920),u=n(88794),m=n(14280),p=n(84229),g=n(63120);const h="Cv51KKt1hDVs4oYd4jZ1";var k=n(4637);const v=({name:e,uri:t,images:n,album:v,artists:f,isExplicit:y,is19PlusOnly:S,isHero:b=!1,onClick:_,testId:N,index:E,requestId:x,isLyricsMatch:C,color:w})=>{let I;return I=b?(0,k.jsx)(c.Z,{index:E,onClick:_,headerText:e,featureIdentifier:"track",uri:t,albumURI:v?.uri,renderCardImage:()=>(0,k.jsx)(d.x,{isHero:!0,images:n,color:w}),renderSubHeaderContent:()=>(0,k.jsxs)(k.Fragment,{children:[y&&!S&&(0,k.jsx)(r.N,{className:h}),S&&(0,k.jsx)(o.X,{size:16,className:h}),f.map(((e,t)=>[t>0&&i.ag.getSeparator(),(0,k.jsx)(s._,{menu:(0,k.jsx)(m.m,{uri:e.uri}),children:(0,k.jsx)(g.default,{to:e.uri,dir:"auto",children:e.name})},e.uri)])),C&&(0,k.jsx)(a.q,{}),(0,k.jsx)(u.k,{children:i.ag.get("card.tag.track")})]}),testId:N,requestId:x}):(0,k.jsx)(l.C,{index:E,onClick:_,headerText:e,featureIdentifier:"track",uri:t,albumURI:v?.uri,renderCardImage:()=>(0,k.jsx)(d.x,{images:n,color:w}),renderSubHeaderContent:()=>(0,k.jsxs)(k.Fragment,{children:[y&&!S&&(0,k.jsx)(r.N,{className:h}),S&&(0,k.jsx)(o.X,{size:16,className:h}),f.map(((e,t)=>[t>0&&i.ag.getSeparator(),(0,k.jsx)(s._,{menu:(0,k.jsx)(m.m,{uri:e.uri}),children:(0,k.jsx)(g.default,{to:e.uri,dir:"auto",children:e.name})},e.uri)])),C&&(0,k.jsx)(a.q,{})]}),testId:N,requestId:x}),(0,k.jsx)(s._,{menu:(0,k.jsx)(p.$,{uri:t,artists:f,albumUri:v?.uri}),children:I})}},82171:(e,t,n)=>{"use strict";n.d(t,{l:()=>x});var i=n(59496),a=n(84875),s=n.n(a),r=n(22991),o=n(79642),l=n(79102),d=n(21840),c=n(22345);function u(){const e=(0,i.useRef)(0);return(0,i.useCallback)((t=>{const n=t.currentTarget,i=n.style.scrollBehavior;let a=!1;const s=n.scrollLeft,r=t.clientX;let o=0;function l(){cancelAnimationFrame(e.current),document.removeEventListener("wheel",d)}function d(){l(),n.style.scrollBehavior=i}function c(){n.scrollLeft+=o,o*=.95,Math.abs(o)>.5?e.current=requestAnimationFrame(c):d()}n.style.userSelect="none",n.style.scrollBehavior="auto",l();const u=e=>{const t=e.clientX-r;Math.abs(t)>10&&(a=!0);const i=n.scrollLeft;n.scrollLeft=s-t,o=n.scrollLeft-i};document.addEventListener("mousemove",u),document.addEventListener("mouseup",(()=>{const t=e=>{e.preventDefault(),e.stopImmediatePropagation()};!0===a&&(n.addEventListener("click",t,{once:!0,capture:!0}),setTimeout((()=>{n.removeEventListener("click",t,{capture:!0})}))),n.style.removeProperty("user-select"),document.removeEventListener("mousemove",u),l(),e.current=requestAnimationFrame(c),document.addEventListener("wheel",d,{once:!0})}),{once:!0})}),[])}const m=100;const p="search-searchCategory-contentArea",g="search-searchCategory-catergoryGrid",h="MUloQuW1xQawwVs0mDp4",k="OlnSvEViCZ_vVdnc3mSQ",v="FjMPyh7lOujDVYQRvp0H",f="search-searchCategory-carousel",y="search-searchCategory-carouselButton",S="search-searchCategory-carouselButtonVisible";var b=n(4637),_=function(e){return e[e.LEFT=-1]="LEFT",e[e.RIGHT=1]="RIGHT",e}(_||{});function N(e,t){(0,d.Bu)(e,t),t.scrollIntoView({block:"end",inline:"center"})}function E(e,t){const n=e.querySelector('[tabindex="0"]')||e.firstElementChild;n&&n instanceof HTMLElement&&(t===_.RIGHT&&n.nextElementSibling instanceof HTMLElement?N(n,n.nextElementSibling):t===_.LEFT&&n.previousElementSibling instanceof HTMLElement&&N(n,n.previousElementSibling))}const x=e=>{const{children:t,className:n,showButtons:a=!0,ariaLabel:d}=e,N=(0,i.useRef)(null),x=(0,i.useRef)(null),[C,w]=(0,i.useState)(!1),[I,T]=(0,i.useState)(!1),A=(0,i.useCallback)((()=>{if(!N.current||!x.current)return;const e=N.current,t=x.current,n=e.scrollWidth-e.clientWidth,i=Math.abs(e.scrollLeft),a=i<1?Math.floor(i):Math.ceil(i),s=t.offsetWidth>e.clientWidth;T(s&&0!==a),w(s&&a{const t=e*(N.current.clientWidth/2);N.current.scrollBy({left:t}),A()}),[A]),D=(0,l.S)(),R=(0,i.useCallback)((e=>{"ArrowLeft"===e.key?(e.preventDefault(),E(N.current,D?_.RIGHT:_.LEFT)):"ArrowRight"===e.key&&(e.preventDefault(),E(N.current,D?_.LEFT:_.RIGHT))}),[D]),L=D?C:I,F=D?I:C,j=a&&(L||F),M=u(),U=function(){const e=(0,i.useRef)(!0),t=(0,i.useRef)(null),n=(0,i.useRef)(null);return(0,i.useCallback)((i=>{if(!i.deltaY)return;const a=i.currentTarget;e.current&&(e.current=!1,t.current=a.style.scrollBehavior,a.style.scrollBehavior="auto"),a.scrollLeft+=i.deltaY+i.deltaX,n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{e.current=!0,a.style.scrollBehavior=t.current??""}),m)}),[])}();return(0,b.jsxs)("div",{className:s()(p,n),children:[(0,b.jsx)("div",{ref:N,className:s()(g,{[k]:F&&!L,[h]:L&&!F,[v]:L&&F}),onScroll:A,onKeyDown:R,onMouseDown:M,onWheel:U,role:"list","aria-label":d,tabIndex:0,children:(0,b.jsx)("div",{ref:x,role:"presentation",children:t})}),j&&(0,b.jsxs)("div",{className:f,dir:"ltr",children:[(0,b.jsx)("button",{className:s()(y,{[S]:L}),tabIndex:-1,onClick:()=>O(_.LEFT),children:(0,b.jsx)(r.e,{autoMirror:!1,semanticColor:"textBase",iconSize:16})}),(0,b.jsx)("button",{className:s()(y,{[S]:F}),tabIndex:-1,onClick:()=>O(_.RIGHT),children:(0,b.jsx)(o.V,{autoMirror:!1,semanticColor:"textBase",iconSize:16})})]})]})}},51385:(e,t,n)=>{"use strict";n.d(t,{Q:()=>u});var i=n(84875),a=n.n(i),s=n(56162),r=n(30366),o=n(79475),l=n(83185);const d={container:"main-confirmDialog-container",overlay:"main-confirmDialog-overlay",buttonContainer:"main-confirmDialog-buttonContainer"};var c=n(4637);Spicetify.ReactComponent.ConfirmDialog=u;function u({onClose:e=(()=>{}),onOutside:t,isOpen:n=!0,titleText:i,descriptionText:u,cancelText:m,confirmText:p,confirmLabel:g,onConfirm:h,allowHTML:k=!1,shouldCloseOnEsc:v=!0,shouldCloseOnOverlayClick:f=!0,...y}){return n?(0,c.jsx)(l.Z,{animated:!0,shouldCloseOnEsc:v,shouldCloseOnOverlayClick:f,overlayClassName:d.overlay,onRequestClose:t??e,contentLabel:y["aria-label"],isOpen:!0,shouldFocusAfterRender:!1,...y,children:(0,c.jsxs)("div",{className:a()("encore-light-theme",d.container),children:[(0,c.jsx)(s.D,{as:"h2",variant:"canon",semanticColor:"textBase",children:i}),u&&(k?(0,c.jsx)(s.D,{as:"p",variant:"mesto",semanticColor:"textBase",dangerouslySetInnerHTML:{__html:u},"":"confirm-dialog-description"}):(0,c.jsx)(s.D,{as:"p",variant:"mesto",semanticColor:"textBase","":"confirm-dialog-description",children:u})),(0,c.jsxs)("div",{className:d.buttonContainer,children:[m&&(0,c.jsx)(r.o,{onClick:e,semanticColor:"textBase",children:m}),(0,c.jsx)(o.D,{"aria-label":g,autoFocus:!0,onClick:h,children:p})]})]})}):null}},57807:(e,t,n)=>{"use strict";n.d(t,{Zb:()=>f,x3:()=>v,xM:()=>y});var i=n(59496),a=n(61740),s=n(56084),r=n(3802),o=n(99308),l=n(98340),d=n(66632),c=n(96170),u=n(85483),m=n(95663),p=n(32812),g=n(4637);const h=i.memo((function({uri:e,divider:t,saveSuccess:n,removeSuccess:r,onRemoveCallback:l,removeLabel:h,saveLabel:k,useDialog:v=!1,initialState:f=!1}){const y=(0,a.I0)(),S=(0,m.o)(),b=!(0,p.k)(),[_,N]=(0,d.Z)(e,f),E=(0,d.y)(),{spec:x,logger:C}=(0,c.fU)(s.M,{data:{uri:e}}),w=(0,i.useCallback)((()=>{const t=x.followButtonFactory();v&&_?y((0,u.YU)(e)):(S({targetUri:e,intent:_?"remove-from-library":"add-to-library",type:"click"}),N(!_),_?(l(e),C.logInteraction(t.hitUnfollow({itemToBeUnfollowed:e})),r&&y(r(e))):(C.logInteraction(t.hitFollow({itemToBeFollowed:e})),n&&y(n(e))))}),[x,v,_,y,e,S,N,l,C,r,n]);return(0,g.jsx)(o.s,{role:"menuitem",divider:t,disabled:b&&!E?.getCapabilities().canModifyOffline,onClick:w,children:_?h:k})})),k=()=>{},v=i.memo((function({uri:e,onRemoveCallback:t=k,divider:n,useDialog:i,initialState:a=!1}){return(0,g.jsx)(l.ZP,{value:"follow-artist",children:(0,g.jsx)(h,{uri:e,divider:n,onRemoveCallback:t,removeLabel:r.ag.get("unfollow"),saveLabel:r.ag.get("follow"),useDialog:i,initialState:a})})})),f=i.memo((function({uri:e,onRemoveCallback:t=k,divider:n,useDialog:i=!1,initialState:a=!1}){return(0,g.jsx)(l.ZP,{value:"follow-playlist",children:(0,g.jsx)(h,{uri:e,divider:n,onRemoveCallback:t,removeLabel:r.ag.get("contextmenu.remove-from-library"),saveLabel:r.ag.get("contextmenu.add-to-library"),useDialog:i,initialState:a})})})),y=i.memo((function({uri:e,onRemoveCallback:t=k,divider:n,useDialog:i=!1,initialState:a=!1}){return(0,g.jsx)(l.ZP,{value:"follow-show",children:(0,g.jsx)(h,{uri:e,divider:n,onRemoveCallback:t,removeLabel:r.ag.get("unfollow"),saveLabel:r.ag.get("follow"),useDialog:i,initialState:a})})}))},36730:(e,t,n)=>{"use strict";n.d(t,{z:()=>p});var i=n(59496),a=n(3802),s=n(49795),r=n(19641),o=n(32812),l=n(41836),d=n(99308),c=n(98340),u=n(4637);const m=({uri:e,divider:t})=>{const{onCopyLink:n}=(0,r.l)({uri:e,permissionLevel:"CONTRIBUTOR"}),i=!(0,o.k)();return(0,u.jsx)(d.s,{role:"menuitem",divider:t,onClick:n,disabled:i,children:a.ag.get("contextmenu.invite-collaborators")})},p=i.memo((function(e){return(0,u.jsx)(s.F,{property:l.bM,renderNewExperience:()=>(0,u.jsx)(c.ZP,{value:"leave-playlist",children:(0,u.jsx)(m,{...e})}),renderOldExperience:()=>null})}))},83503:(e,t,n)=>{"use strict";n.d(t,{H:()=>g});var i=n(59496),a=n(61740),s=n(3802),r=n(49795),o=n(41836),l=n(99308),d=n(98340),c=n(96170),u=n(85483),m=n(4637);const p=({uri:e,divider:t,spec:n})=>{const r=(0,a.I0)(),o=(0,c.$P)(),d=(0,i.useCallback)((()=>{r((0,u.IF)(e)),o.logInteraction(n.leavePlaylistButtonFactory().hitLeavePlaylist({playlist:e}))}),[r,o,n,e]);return(0,m.jsx)(l.s,{role:"menuitem",divider:t,onClick:d,children:s.ag.get("contextmenu.leave-playlist")})},g=i.memo((function(e){return(0,m.jsx)(r.F,{property:o.bM,renderNewExperience:()=>(0,m.jsx)(d.ZP,{value:"leave-playlist",children:(0,m.jsx)(p,{...e})}),renderOldExperience:()=>null})}))},64109:(e,t,n)=>{"use strict";n.d(t,{X:()=>k});var i=n(59496),a=n(3802),s=n(99308),r=n(98340),o=n(88664),l=n(36472),d=n(46164),c=n(96170),u=n(9374),m=n(29251),p=n(4637);const g=(e,t)=>{switch(t){case u.p.FOLDER:return e?a.ag.get("contextmenu.unpin-folder"):a.ag.get("contextmenu.pin-folder");case u.p.PLAYLIST:case u.p.LIKED_SONGS:case u.p.YOUR_EPISODES:case u.p.LOCAL_FILES:return e?a.ag.get("contextmenu.unpin-playlist"):a.ag.get("contextmenu.pin-playlist");case u.p.ALBUM:return e?a.ag.get("contextmenu.unpin-album"):a.ag.get("contextmenu.pin-album");case u.p.ARTIST:return e?a.ag.get("contextmenu.unpin-artist"):a.ag.get("contextmenu.pin-artist");case u.p.SHOW:return e?a.ag.get("contextmenu.unpin-show"):a.ag.get("contextmenu.pin-show");case u.p.AUDIOBOOK:return e?a.ag.get("contextmenu.unpin-audiobook"):a.ag.get("contextmenu.pin-audiobook");default:return(0,m._)(t),""}},h=({uri:e,canPin:t,isPinned:n,type:a,divider:r,spec:u})=>{const m=(0,c.$P)(),h=(0,i.useContext)(d.H),k=(0,i.useCallback)((()=>{t===o.TL.NO_IN_FOLDER?h.getEvents().emit(l.EW.UPDATE_PIN_ERROR,{reason:l.EN.NO_PIN_IN_FOLDER,uri:e}):n?(h.unpin(e),u&&m.logInteraction(u.pinButtonFactory().hitUnpinItem({itemToUnpin:e}))):(h.pin(e),u&&m.logInteraction(u.pinButtonFactory().hitPinItem({itemToPin:e})))}),[t,h,e,n,m,u]);return(0,p.jsx)(s.s,{role:"menuitem",divider:r,onClick:k,children:g(n,a)})},k=i.memo((function(e){return(0,p.jsx)(r.ZP,{value:"pin-action",children:(0,p.jsx)(h,{...e})})}))},40778:(e,t,n)=>{"use strict";n.d(t,{aU:()=>it,CW:()=>Bt,ms:()=>k,x9:()=>we,jj:()=>De,Jx:()=>D,K_:()=>We,uj:()=>Ke,AM:()=>Qe,WQ:()=>$e,R2:()=>Be,f0:()=>Rt,pJ:()=>Dt,bs:()=>Lt,fc:()=>Me,ZI:()=>Y,m8:()=>K,IW:()=>q,SB:()=>Z,Jh:()=>fe,Iy:()=>Gt,Fg:()=>lt,N0:()=>$,W2:()=>C,h$:()=>V,DY:()=>Mt,gh:()=>Le,Xu:()=>He,Qf:()=>Te,ai:()=>Ut,fW:()=>et,tz:()=>ae,lG:()=>ue,K:()=>me,EC:()=>ce,ZX:()=>rt,V8:()=>de,AA:()=>S});var i=n(59496),a=n(61740),s=n(75430),r=n(50346),o=n(92403),l=n(99308),d=n(98340),c=n(68640),u=n(6385),m=n(96170),p=n(28418),g=n(4637);const h=({uris:e,playlist:t,divider:n,spec:d,children:h})=>{const k=i.useContext(c.ZF),v=(0,a.I0)(),f=(0,m.$P)(),y=(0,i.useCallback)((async()=>{let n=e;if((0,r.nK)(e[0])){n=(await k.getContents(e[0])).items.filter(p.K).map((e=>e.uri))}if(1===e.length){const n=d?.addToOtherPlaylistFactory().hitAddToPlaylist({playlist:t.uri,itemToBeAdded:e[0]});n&&f.logInteraction(n)}v((0,o.jV)(t.uri,n))}),[f,d,e,v,t.uri,k]);return(0,g.jsx)(l.s,{role:"menuitem",divider:n,onClick:y,trailingIcon:(0,u.c)(t)?(0,g.jsx)(s.R,{iconSize:16}):null,children:h??t.name})},k=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"add-to-existing",children:(0,g.jsx)(h,{...e})})}));var v=n(85483),f=n(95663);const y=({uri:e,displayText:t,divider:n,ubiLogger:s,contextMenuSpec:r})=>{const o=(0,a.I0)(),d=(0,f.o)(),c=(0,i.useMemo)((()=>r.showCreditsFactory()),[r]),u=(0,m.Wi)(c),p=(0,i.useCallback)((async()=>{s.logInteraction(c.hitUiReveal()),d({targetUri:e,intent:"show-credits",type:"click"}),o((0,v.Pd)(!0,e))}),[e,o,d,s,c]);return(0,g.jsx)(l.s,{role:"menuitem",divider:n,onClick:p,elementRef:u,children:t})},S=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"show-credits",children:(0,g.jsx)(y,{...e})})}));var b=n(45862),_=n(37409),N=n(4464),E=n(3401);const x=({uri:e,divider:t,spec:n})=>{const a=(0,f.o)(),s=(0,i.useContext)(b.qi),r=(0,_.g)().getState(),o=(0,E.YQ)(e),d=(0,m.$P)(),c=(0,i.useCallback)((()=>{a({intent:"share",type:"click"}),d.logInteraction(n.shareEmbedButtonFactory({uri:e}).hitUiReveal());const t=r?.item?.uri,i=(0,N.k)(r);s({type:"open",uri:e,currentTrackUri:t,currentPosition:i})}),[a,d,n,e,r,s]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:c,children:o})},C=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"ewg-open",children:(0,g.jsx)(x,{...e})})}));var w=n(3802),I=n(19641),T=n(23888),A=n(96848),P=n(30009);const O=({uri:e,sharingInfo:t,displayText:n,divider:a,isPrivatePlaylist:s=!1,spec:r})=>{const{modifierKeyHeld:o}=(0,A.Np)(),{onCopyLink:d}=(0,T.y)({sharingInfo:t,uri:e,interactionData:{intent:"share",type:"click"}}),c=(0,m.$P)(),{onCopyLink:u}=(0,I.l)({uri:e,permissionLevel:"VIEWER"}),p=(0,i.useCallback)((()=>{o?(0,P.v)(e):s?u():d(),c.logInteraction(r.copyLinkButtonFactory().hitCopyToClipboard())}),[o,s,c,r,e,u,d]);return(0,g.jsx)(l.s,{role:"menuitem",divider:a,onClick:p,children:o?w.ag.get("context-menu.copy-spotify-uri"):n})},D=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"copy-link",children:(0,g.jsx)(O,{...e})})}));var R=n(55530),L=n.n(R),F=n(25515),j=n(55760),M=n(47146);function U(){let e=L().create().hex;return e=e.replace(/-/g,""),e.substr(0,16)}const B=i.memo((function({uri:e,context:t,divider:n,spec:s}){const r=(0,j.s4)(),o=(0,f.o)(),d=(0,m.$P)(),{isPWA:c,isDesktop:u}=(0,a.v9)((e=>e.platform)),p=(0,a.v9)(M.C7),h=(0,i.useCallback)((()=>{const n=`${e}${t?`?context=${encodeURIComponent(t)}`:""}`;o({targetUri:n,intent:"open-in-app",type:"click"}),d.logInteraction(s.openInDesktopButtonFactory().hitOpenApp({destination:e,app:"desktop"})),r.send((0,F.K)({link:window.location.href,entity_uri:n,source:"open-in-app",deeplink_session_id:U()})),window.open(n)}),[e,t,o,d,s,r]);return c||u||p?null:(0,g.jsx)(l.s,{role:"menuitem",divider:n,onClick:h,children:w.ag.get("contextmenu.open_desktop_app")})})),V=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"open-in-app",children:(0,g.jsx)(B,{...e})})}));var H=n(30985),G=n(39669),W=n(32422);const z=({uri:e,queryParams:t="",displayText:n,divider:i})=>{const s=(0,a.v9)(H.br),o=(0,a.v9)(H.yE),d=w.ag.getUrlLocale();if(!e)return null;const c=(0,r.EC)(e),u=c?.type,m=(0,r.EC)(c)?.toURLPath(!0),p=`${(0,W.S9)({localeFeatureFlag:s,entityFeatureFlag:o,urlLocale:d,entity:u,type:"link"})?c?.toURL(`/${G.F0}${d}/`):m}${t}`;return(0,g.jsx)(l.s,{role:"menuitem",divider:i,to:p,children:n})},K=({uri:e,contextUri:t,divider:n,displayText:i=w.ag.get("contextmenu.go-to-artist")})=>e!==t?(0,g.jsx)(z,{divider:n,uri:e,displayText:i}):null,Y=({uri:e,contextUri:t,highlightedUri:n,divider:i})=>e!==t?(0,g.jsx)(z,{divider:i,uri:e,displayText:w.ag.get("contextmenu.go-to-album"),queryParams:`?highlight=${n}`}):null,q=({uri:e,contextUri:t,divider:n})=>e!==t?(0,g.jsx)(z,{divider:n,uri:e,displayText:w.ag.get("context-menu.episode-page-link")}):null,Z=({uri:e,divider:t})=>(0,g.jsx)(z,{divider:t,uri:e,displayText:w.ag.get("contextmenu.go-to-playlist")});var Q=n(28170);const J=({uris:e,reference:t,displayText:n,divider:a,spec:s})=>{const{createPlaylistFromAlbum:o,createPlaylistFromTracks:d,createPlaylistFromPlaylist:u}=(0,Q.K)(),p=i.useContext(c.ZF),h=(0,m.$P)(),k=(0,i.useCallback)((async()=>{let n;const i=null!==t?{after:t}:{before:"start"};if(n=(0,r.YF)(e[0])?await o(e[0],i):(0,r.nK)(e[0])?await u(e[0],i):await d(e,i),1===e.length){const t=s?.addToPlaylistButtonFactory().hitAddToPlaylist({playlist:n??"",itemToBeAdded:e[0]});t&&h.logInteraction(t)}}),[h,s,e,o,t,u,d]);return(0,r.nK)(e[0])&&!p.getCapabilities().canFetchAllTracks?null:(0,g.jsx)(l.s,{role:"menuitem",divider:a,onClick:k,children:n})},$=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"new-playlist",children:(0,g.jsx)(J,{...e})})}));var X=n(32812),ee=n(61601),te=n(51783),ne=n(66490);const ie=({uri:e,currentUserUri:t,canReportUser:n,divider:a,spec:s})=>{const[o,d]=(0,i.useState)(!1),c=(0,i.useContext)(ee.G),u=(0,m.$P)(),p=!(0,X.k)();(0,i.useEffect)((()=>{(0,r.nK)(e)&&c.canReportPlaylist(e,t).then(d),(0,r.OB)(e)&&d(!0),(0,r.Kv)(e)&&d(!!n),(0,r.RS)(e)&&c.canReportShow(e).then(d)}),[e,t,n,c]);const{openURLWithSessionTransfer:h}=(0,ne.e)(),k=(0,i.useCallback)((async()=>{if(!o)return;const t=await c.getReportURL(e);h(t),s&&u.logInteraction(s.reportButtonFactory().hitUiNavigate({destination:e}))}),[o,c,e,h,s,u]);return c.isURIReportable(e)&&e!==t?(0,g.jsx)(l.s,{role:"menuitem",as:"a",divider:a,disabled:!o||p,onClick:k,trailingIcon:(0,g.jsx)(te.h,{iconSize:16}),children:w.ag.get("contextmenu.report")}):null},ae=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"report",children:(0,g.jsx)(ie,{...e})})}));var se=n(6664),re=n(66632);const oe=i.memo((function({uri:e,divider:t,saveSuccess:n,removeSuccess:s,onRemoveCallback:r,removeLabel:o,saveLabel:d,useDialog:c=!1,initialState:u=!1}){const m=(0,a.I0)(),p=(0,f.o)(),h=!(0,X.k)(),[k,y]=(0,re.Z)(e,u),S=(0,re.y)(),b=(0,i.useCallback)((()=>{c&&k?m((0,v.YU)(e)):(p({targetUri:e,intent:k?"remove-from-library":"add-to-library",type:"click"}),y(!k),k?(r(e),s&&m(s(e))):n&&m(n(e)))}),[c,k,m,e,p,y,r,s,n]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,disabled:h&&!S?.getCapabilities().canModifyOffline,onClick:b,children:k?o:d})})),le=()=>{},de=i.memo((function({uri:e,onRemoveCallback:t=le,divider:n,useDialog:i=!1,initialState:a=!1}){return(0,g.jsx)(d.ZP,{value:"save-track",children:(0,g.jsx)(oe,{uri:e,divider:n,onRemoveCallback:t,removeLabel:w.ag.get("remove_from_your_liked_songs"),saveLabel:w.ag.get("save_to_your_liked_songs"),useDialog:i,initialState:a})})})),ce=i.memo((function({uri:e,onRemoveCallback:t=le,divider:n,useDialog:i=!1,initialState:a=!1}){return(0,g.jsx)(d.ZP,{value:"save-episode",children:(0,g.jsx)(oe,{uri:e,divider:n,removeSuccess:se.SS,onRemoveCallback:t,saveSuccess:se.kK,removeLabel:w.ag.get("contextmenu.remove-from-your-episodes"),saveLabel:w.ag.get("contextmenu.save-to-your-episodes"),useDialog:i,initialState:a})})})),ue=i.memo((function({uri:e,onRemoveCallback:t=le,divider:n,useDialog:i=!1,initialState:a=!1}){return(0,g.jsx)(d.ZP,{value:"save-album",children:(0,g.jsx)(oe,{uri:e,divider:n,onRemoveCallback:t,removeLabel:w.ag.get("contextmenu.remove-from-library"),saveLabel:w.ag.get("contextmenu.add-to-library"),useDialog:i,initialState:a})})})),me=i.memo((function({uri:e,onRemoveCallback:t=le,divider:n,useDialog:i=!1,initialState:a=!1}){return(0,g.jsx)(d.ZP,{value:"save-book",children:(0,g.jsx)(oe,{uri:e,divider:n,onRemoveCallback:t,removeLabel:w.ag.get("contextmenu.remove-from-library"),saveLabel:w.ag.get("contextmenu.add-to-library"),useDialog:i,initialState:a})})}));var pe=n(89605),ge=n(3803),he=n(25899),ke=n(68220);const ve=({uri:e,displayText:t,divider:n,spec:a})=>{const s=(0,pe.s0)(),o=!(0,X.k)(),d=(0,f.o)(),c=(0,m.$P)(),u=(0,i.useCallback)((async()=>{d({targetUri:e,intent:"go-to-radio",type:"click"}),a&&c.logInteraction(a.navigateButtonFactory({identifier:"go-to-radio"}).hitUiNavigate({destination:e}));const t=(0,ge.S)(e);if(null!==t&&t.type===r.JM.PLAYLIST)s(t.toURLPath(!0));else{const t=await(0,ke.M)(he.b.getInstance(),e),[n]=t.body.mediaItems;s((0,r.EC)(n.uri).toURLPath(!0))}}),[d,e,a,c,s]);return(0,g.jsx)(l.s,{role:"menuitem",divider:n,disabled:o,onClick:u,children:t})},fe=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"go-to-radio",children:(0,g.jsx)(ve,{...e})})}));n(72071);const ye=Spicetify.GraphQL.Definitions["queryAlbumTrackUris"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryAlbumTrackUris"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albumUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"track"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}}]}}]}}]}}]};var Se=n(41921),be=n(72933),_e=n(11611);const Ne=e=>({uri:e,uid:null}),Ee=({uris:e,divider:t,spec:n,logger:a})=>{const s=(0,f.o)(),r=(0,_.g)(),o=(0,i.useCallback)((()=>{s({intent:"add-to-queue",type:"click"}),r.addToQueue(e.map(Ne)),n&&a&&a.logInteraction(n.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:e.length}))}),[s,r,e,n,a]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:o,children:w.ag.get("contextmenu.add-to-queue")})},xe=({uris:e,spec:t,logger:n})=>{const a=(0,f.o)(),s=(0,_.g)(),{request:r}=(0,i.useContext)(Se.Ax),o=(0,i.useCallback)((async()=>{a({intent:"add-to-queue",type:"click"}),t&&n&&n.logInteraction(t.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:e.length}));const i=await r(ye,{uri:e[0],offset:0,limit:100});if("Album"!==i?.data?.albumUnion.__typename)return;const o=(i?.data.albumUnion.tracks.items||[]).map((e=>e.track.uri));s.addToQueue(o.map(Ne))}),[n,a,s,r,t,e]);return(0,g.jsx)(l.s,{role:"menuitem",onClick:o,children:w.ag.get("contextmenu.add-to-queue")})},Ce=({uris:e,spec:t,logger:n})=>{const a=(0,f.o)(),s=(0,_.g)(),r=(0,i.useContext)(c.ZF),o=(0,i.useCallback)((async()=>{a({intent:"add-to-queue",type:"click"});const i=(await r.getContents(e[0],{limit:100})).items.filter((e=>!!e)).map((e=>e.uri));t&&n&&n.logInteraction(t.addToQueueButtonFactory().hitAddItemsToQueue({numberOfItemsToAddToQueue:i.length})),s.addToQueue(i.map(Ne))}),[n,a,s,r,t,e]);return(0,g.jsx)(l.s,{role:"menuitem",onClick:o,children:w.ag.get("contextmenu.add-to-queue")})},we=i.memo((function(e){const{uri:t}=(0,be.$)(),n=(0,_e.Y)(),i={...e,logger:(0,m.$P)()};if(!t||n)return null;let a=(0,g.jsx)(Ee,{...i});return(0,r.YF)(e.uris[0])?a=(0,g.jsx)(xe,{...i}):(0,r.nK)(e.uris[0])&&(a=(0,g.jsx)(Ce,{...i})),(0,g.jsx)(d.ZP,{value:"add-to-queue",children:a})})),Ie=({uids:e,uris:t,contextUri:n,divider:a,spec:s})=>{const o=(0,f.o)(),d=(0,_.g)(),c=(0,m.$P)(),u=(0,i.useMemo)((()=>e.map(((e,n)=>({uid:e,uri:t[n]})))),[e,t]),p=(0,i.useCallback)((()=>{o({intent:"remove-from-queue",type:"click"}),c.logInteraction(s.removeFromQueueButtonFactory().hitRemoveItemsFromQueue({numberOfItemsToRemoveFromQueue:t.length})),d.removeFromQueue(u)}),[o,c,s,t.length,d,u]);return n&&"queue"===(0,r.EC)(n)?.id?(0,g.jsx)(l.s,{role:"menuitem",divider:a,onClick:p,children:w.ag.get("contextmenu.remove-from-queue")}):null},Te=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"remove-from-queue",children:(0,g.jsx)(Ie,{...e})})}));var Ae=n(36844),Pe=n(41836);const Oe=({uri:e,spec:t,divider:n,isCollaborative:a})=>{const s=(0,f.o)(),r=(0,i.useContext)(c.ZF),{setCollaborativeState:o}=(0,c.Yv)(e),d=(0,m.$P)(),u=r.getCapabilities().canToggleCollaborative,p=(0,Ae.W6)(Pe.bM),h=(0,i.useCallback)((()=>{if(s({intent:"playlisting",type:"click"}),o(!a),t){let n;n=a?t.collaborativePlaylistButtonFactory().hitMakePlaylistNonCollaborative({playlistToBeMadeNonCollaborative:e}):t.collaborativePlaylistButtonFactory().hitMakePlaylistCollaborative({playlistToBeMadeCollaborative:e}),d.logInteraction(n)}}),[a,d,s,o,t,e]);return!u||p&&!a?null:(0,g.jsx)(l.s,{role:"menuitemcheckbox",divider:n,onClick:h,"aria-checked":a,children:w.ag.get("contextmenu.collaborative")})},De=i.memo((function(e){return(0,g.jsx)(i.Suspense,{fallback:null,children:(0,g.jsx)(d.ZP,{value:"toggle-collaborative",children:(0,g.jsx)(Oe,{...e})})})})),Re=({uri:e,divider:t,isPublished:n,isCollaborative:s,spec:r})=>{const o=(0,f.o)(),{setPublishedState:d}=(0,c.lh)(),u=(0,a.I0)(),p=(0,m.$P)(),h=(0,i.useCallback)((()=>{if(!s){if(o({intent:"playlisting",type:"click"}),d(e,!n),r){let t;t=n?r.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPrivate({playlistToBeMadePrivate:e}):r.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPublic({playlistToBeMadePublic:e}),p.logInteraction(t)}u(n?(0,se.sO)():(0,se.EJ)())}}),[u,s,n,p,o,d,r,e]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:h,disabled:s||void 0===n,children:n?w.ag.get("contextmenu.make-secret"):w.ag.get("contextmenu.make-public")})},Le=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"toggle-published",children:(0,g.jsx)(Re,{...e})})}));var Fe=n(73495);const je=({uri:e,name:t,description:n,image:a,divider:s,spec:r})=>{const o=(0,f.o)(),d=(0,i.useContext)(Fe.zy),c=(0,m.$P)(),u=(0,i.useCallback)((()=>{o({intent:"playlisting",type:"click"}),d({type:"open",playlistDetails:{name:t,description:n,image:a,uri:e}}),r&&c.logInteraction(r.editButtonFactory({uri:e}).hitUiReveal())}),[n,d,a,c,t,o,r,e]);return(0,g.jsx)(l.s,{role:"menuitem",divider:s,onClick:u,children:w.ag.get("contextmenu.edit-details")})},Me=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"edit-details",children:(0,g.jsx)(je,{...e})})})),Ue=({uri:e,divider:t,spec:n})=>{const s=(0,f.o)(),r=(0,a.I0)(),o=(0,m.$P)(),d=(0,i.useCallback)((()=>{s({intent:"playlisting",type:"click"}),r((0,v.p_)(e)),n&&o.logInteraction(n.deleteButtonFactory().hitDeletePlaylist({playlistToBeDeleted:e}))}),[r,o,s,n,e]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:d,children:w.ag.get("contextmenu.delete")})},Be=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"delete-playlist",children:(0,g.jsx)(Ue,{...e})})})),Ve=e=>{const t=(0,i.useContext)(c.ZF),{removeItems:n}=(0,c.Yv)(e.playlistUri),{uris:a,uids:s,divider:r,playlistUri:o,removePlaylistItems:d=n,canBeRemoved:u}=e,m=(0,f.o)(),p=(0,c.ET)(o),{hasUidsGeneratedFromIndicies:h}=t.getCapabilities(),k=(0,i.useCallback)((()=>{m({targetUri:o,intent:"playlisting",type:"click"});const e=a.map(((e,t)=>({uri:e,uid:s[t]||""})));d(e)}),[m,o,d,s,a]);return h&&!s.every((e=>Number.isInteger(Number(e))))?null:u||p?.canRemove?(0,g.jsx)(l.s,{role:"menuitem",divider:r,onClick:k,children:w.ag.get("contextmenu.remove-from-playlist")}):null},He=i.memo((function(e){return(0,r.nK)(e.playlistUri)?(0,g.jsx)(d.ZP,{value:"remove-from-playlist",children:(0,g.jsx)(Ve,{...e})}):null})),Ge=({position:e,divider:t,onCreateCallback:n=(()=>{})})=>{const a=(0,f.o)(),{createFolder:s}=(0,c.lh)(),r=(0,i.useCallback)((async()=>{a({intent:"playlisting",type:"click"});const t=await s(w.ag.get("playlist.default_folder_name"),e);n(t)}),[e,s,a,n]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:r,children:w.ag.get("contextmenu.create-folder")})},We=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"create-folder",children:(0,g.jsx)(Ge,{...e})})})),ze=({position:e,divider:t,onCreateCallback:n=(()=>{})})=>{const a=(0,f.o)(),{createPlaylist:s}=(0,Q.K)(),r=(0,i.useCallback)((()=>{a({intent:"create-playlist",type:"click"}),s(w.ag.get("playlist.default_playlist_name"),e),n()}),[e,s,a,n]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:r,children:w.ag.get("contextmenu.create-playlist")})},Ke=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"create-playlist",children:(0,g.jsx)(ze,{...e})})}));var Ye=n(19281),qe=n(27555);const Ze=({uri:e,isEmpty:t,name:n,displayText:a,divider:s,spec:o})=>{const{createPlaylist:d}=(0,c.lh)(),u=(0,pe.s0)(),p=(0,i.useContext)(c.ZF),h=!(0,X.k)(),k=(0,f.o)(),v=(0,m.$P)(),y=(0,i.useCallback)((async()=>{const t=(0,Ye.B1)(n),i=await((e,t)=>e.build().withMethod("POST").withHost(qe.W7).withPath("/freshen").withJsonContentType().withBody({playlistURI:t,type:"W2V_freshener"}).withEndpointIdentifier("/freshen").send())(he.b.getInstance(),e),a=function(e){return Array.from(new Set(e))}(function(e){return e.map((e=>`spotify:track:${e.id}`))}(i.body.recommendedTracks)),s=await d(t,{before:"start"});if(null===s)return;const l=(0,r.EC)(s).toURLPath(!0);await p.add(s,a,{before:"start"}),o&&v.logInteraction(o.createButtonFactory().hitCreatePlaylist()),k({targetUri:e,intent:"create-similar-playlist",type:"click"}),u(l)}),[n,e,d,p,o,k,u,v]);return(0,g.jsx)(l.s,{role:"menuitem",divider:s,disabled:h||t,onClick:y,children:a})},Qe=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"create-similar-playlist",children:(0,g.jsx)(Ze,{...e})})})),Je=({uri:e,divider:t,onDeleteCallback:n})=>{const s=(0,f.o)(),r=(0,a.I0)(),o=(0,i.useCallback)((()=>{s({intent:"playlisting",type:"click"}),r((0,v.Q2)(e,n))}),[r,n,s,e]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:o,children:w.ag.get("contextmenu.delete")})},$e=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"delete-folder",children:(0,g.jsx)(Je,{...e})})})),Xe=({onRename:e,divider:t,uri:n,spec:a})=>{const s=(0,f.o)(),r=(0,m.$P)(),o=(0,i.useCallback)((()=>{s({intent:"playlisting",type:"click"}),r.logInteraction(a.renameButtonFactory().hitRenamePlaylist({playlistToBeRenamed:n})),e()}),[s,r,a,n,e]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:o,children:w.ag.get("contextmenu.rename")})},et=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"rename",children:(0,g.jsx)(Xe,{...e})})}));var tt=n(81926);const nt=({divider:e})=>{const t=(0,a.I0)(),n=(0,i.useCallback)((()=>{t((0,tt.q$)())}),[t]);return(0,g.jsx)(l.s,{role:"menuitem",divider:e,onClick:n,children:w.ag.get("context-menu.about-recommendations")})},it=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"about-recommendations",children:(0,g.jsx)(nt,{...e})})}));var at=n(46164);const st=({trackUris:e})=>{const[t,n]=(0,i.useState)(null),a=(0,f.o)(),s=(0,i.useContext)(at.H);(0,i.useEffect)((()=>{(async()=>{const t=await s.contains(...e);n(t.every(Boolean))})()}),[s,e]);const r=(0,i.useCallback)((async()=>{t?await s.remove(...e):await s.add(...e),a({intent:t?"remove-from-library":"add-to-library",type:"click"})}),[t,s,a,e]);return null===t?null:(0,g.jsx)(l.s,{role:"menuitem",onClick:r,children:t?w.ag.get("remove_from_your_liked_songs"):w.ag.get("save_to_your_liked_songs")})},rt=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"save-multiple-track",children:(0,g.jsx)(st,{...e})})})),ot=({uri:e,isPlayed:t,onChange:n=(()=>{}),divider:a})=>{const s=(0,i.useContext)(at.H),r=(0,i.useCallback)((()=>{t?s.markAsUnPlayed(e):s.markAsPlayed(e),n(!t)}),[s,n,t,e]);return s.getCapabilities()?.canMarkEpisodesAsDone?(0,g.jsx)(l.s,{role:"menuitem",divider:a,onClick:r,children:t?w.ag.get("contextmenu.mark-as-unplayed"):w.ag.get("contextmenu.mark-as-played")}):null},lt=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"mark-as-played",children:(0,g.jsx)(ot,{...e})})}));var dt=n(94031),ct=n(58658),ut=n(93309),mt=n(35302),pt=n(56162),gt=n(75257),ht=n(15143),kt=n(31506),vt=n(70175),ft=n(82538),yt=n(49873),St=n(29251),bt=n(9102);const _t=864e5,Nt=5e3;function Et(e,t=!1){const n=(0,X.k)(),i=(0,Ae.W6)(Pe.iH,{loadingValue:!1}),a=(0,yt.c)(),s=n&&i&&a.getCapabilities().canRemoteDownload,r=(0,bt.useQueryClient)(),{data:o}=(0,bt.useQuery)(["useOfflineContextForDevices",e],(()=>a.getContextForDevices(e).then(Ct)),{cacheTime:_t,staleTime:0,refetchInterval:t&&Nt,enabled:s,placeholderData:()=>r.getQueriesData(["useOfflineContextForDevices"])?.find((([e,t])=>!!t))?.[1]?.map((e=>({...e,contextDownloadAvailability:ft.Om.NO,contextDownloadPercentage:0})))});return s?o??[]:[]}const xt=2592e6;function Ct(e){return e.filter((({lastSeenAtMs:e})=>Date.now()-eNumber(t.isLocal)-Number(e.isLocal)||t.lastSeenAtMs-e.lastSeenAtMs||e.name.localeCompare(t.name)))}function wt(e){switch(e){case ft.Om.NO:return(0,g.jsx)(mt.D,{iconSize:16,semanticColor:"textBase"});case ft.Om.WAITING:case ft.Om.DOWNLOADING:return(0,g.jsx)(pt.D,{semanticColor:"textSubdued",children:(0,g.jsx)(ht.l,{size:16})});case ft.Om.YES:return(0,g.jsx)(gt.E,{iconSize:16,semanticColor:"textBrightAccent"});default:return(0,St._)(e),null}}const It=({name:e,deviceId:t,cacheId:n,type:a,deviceType:s,clientPlatform:r,contextDownloadAvailability:o,isLocal:d,uri:c,spec:u,addDownloadPrerequisites:p,localDownloadAvailability:h})=>{const k=(0,m.$P)(),v=(0,yt.c)(),f=(0,vt.k)(),y=function(){const e=(0,bt.useQueryClient)();return(0,i.useCallback)((t=>e.invalidateQueries(["useOfflineContextForDevices",t])),[e])}(),S=(0,dt.D)(),b=(0,kt.z)(a),_=d?h:o,N=_!==ft.Om.NO,E=_===ft.Om.YES,x={remoteClientPlatform:r.toString(),remoteDeviceId:t,remoteDeviceType:s.toString()};return(0,g.jsx)(l.s,{onClick:async()=>{let i;N?(S(c,d?void 0:{deviceId:t,cacheId:n,deviceName:e,clientPlatform:r,deviceType:s}),i=E?d?u.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:c}):u.remoteDeviceDownloadButtonFactory().hitRemoveDownloadFromRemoteDevice({itemToRemoveFromDownloads:c,...x}):d?u.downloadButtonFactory().hitStopDownload({itemToStopDownload:c}):u.remoteDeviceDownloadButtonFactory().hitStopDownloadToRemoteDevice({itemToStopDownload:c,...x})):(p(),v.addDownload(c,{deviceId:t,cacheId:n}),i=d?u.downloadButtonFactory().hitDownload({itemToDownload:c}):u.remoteDeviceDownloadButtonFactory().hitDownloadToRemoteDevice({itemToDownload:c,...x}),f(w.ag.get("web-player.remote-downloads.feedback.downloading-to-remote-device",e))),y(c),k.logInteraction(i)},"aria-checked":N,role:"menuitemcheckbox",leadingIcon:(0,g.jsx)(b,{iconSize:16,semanticColor:"textSubdued"}),trailingIcon:wt(_),CheckedIcon:null,children:d?w.ag.get("web-player.remote-downloads.context-menu.this-computer"):e})};var Tt=n(79102);const At=({uri:e,divider:t,addToLibrary:n=!0,showUri:a,spec:s})=>{const r=(0,m.$P)(),[o,l]=(0,i.useState)(!1),c=Et(e,o),u=(0,Tt.S)(),p=function(e,t=!0,n){const[a,s]=(0,re.Z)(e),[r,o]=(0,re.Z)(n);return(0,i.useCallback)((()=>{!a&&t?s(!0):!t&&n&&(r||o(!0))}),[t,a,r,s,o,n])}(e,n,a),{availability:h}=(0,ut._)(e),k=(0,i.useMemo)((()=>s.downloadToDeviceSubmenuFactory()),[s]);return(0,g.jsx)(ct.W,{displayText:w.ag.get("contextmenu.download"),depth:1,placement:u?"left-start":"right-start",divider:t,onOpenChange:e=>{l(e),e&&r.logImpression(k.impression())},children:(0,g.jsx)(d.ZP,{value:"download",children:c.map((t=>(0,g.jsx)(It,{uri:e,spec:k,addDownloadPrerequisites:p,localDownloadAvailability:h,...t},t.cacheId)))})})};const Pt=({uri:e,divider:t,addToLibrary:n=!0,showUri:a,spec:s})=>{const r=(0,f.o)(),o=(0,m.$P)(),[d,c]=(0,re.Z)(e),[u,p]=(0,re.Z)(a),{capability:h,availability:k,addDownload:v}=(0,ut._)(e),y=(0,dt.D)(),S=(0,i.useCallback)((()=>{if(h===ft.PQ.NO_PERMISSION)return;let t;r({targetUri:e,intent:k!==ft.Om.NO?"remove-from-download":"download",type:"click"}),k!==ft.Om.NO?(y(e),t=s.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e})):(!d&&n?c(!0):!n&&a&&(u||p(!0)),v(),t=s.downloadButtonFactory().hitDownload({itemToDownload:e})),o.logInteraction(t)}),[h,k,v,y,d,o,r,c,s,e,n,a,u,p]);return h===ft.PQ.NO_CAPABILITY||h===ft.PQ.NO_PERMISSION_HIDE?null:(0,g.jsx)(l.s,{divider:t,onClick:S,"aria-checked":k!==ft.Om.NO,role:"menuitemcheckbox",disabled:h===ft.PQ.NO_PERMISSION,children:w.ag.get("contextmenu.download")})},Ot=e=>{const t=Et(e.uri).some((({isLocal:e})=>!e))?At:Pt;return(0,g.jsx)(t,{...e})},Dt=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"download-episode",children:(0,g.jsx)(Ot,{...e})})})),Rt=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"download-chapter",children:(0,g.jsx)(Ot,{...e,addToLibrary:!1})})})),Lt=i.memo((function(e){return(0,g.jsx)(d.ZP,{value:"download-playlist",children:(0,g.jsx)(Ot,{...e})})}));var Ft=n(49795);const jt=({uri:e,divider:t,isPrivate:n,spec:a})=>{const s=(0,f.o)(),{setPrivateState:r}=(0,c.Yv)(e),{setPublishedState:o}=(0,c.lh)(),d=(0,m.$P)(),u=(0,i.useCallback)((()=>{if(s({intent:"playlisting",type:"click"}),n||o(e,!1),r(!n),a){let t;t=n?a.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPublic({playlistToBeMadePublic:e}):a.togglePlaylistPermissionsButtonFactory().hitMakePlaylistPrivate({playlistToBeMadePrivate:e}),d.logInteraction(t)}}),[n,d,s,r,o,a,e]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:u,children:n?w.ag.get("contextmenu.make-playlist-public"):w.ag.get("contextmenu.make-playlist-private")})},Mt=i.memo((function(e){return(0,g.jsx)(Ft.F,{property:Pe.bM,renderNewExperience:()=>(0,g.jsx)(d.ZP,{value:"toggle-private",children:(0,g.jsx)(jt,{...e})}),renderOldExperience:()=>null})})),Ut=({divider:e,removeRecommendation:t})=>(0,g.jsx)(l.s,{role:"menuitem",divider:e,onClick:t,children:w.ag.get("contextmenu.remove-recommendation")}),Bt=({divider:e,addRecommendation:t})=>(0,g.jsx)(l.s,{role:"menuitem",divider:e,onClick:t,children:w.ag.get("contextmenu.add-recommendation-to-this-playlist")});var Vt=n(29931);const Ht=({uri:e,divider:t,spec:n})=>{const{add:a,remove:s,useContains:r}=(0,Vt.P)("ignoreinrecs"),[o]=r(e),d=(0,m.$P)(),c=(0,i.useCallback)((()=>{let t;o?(s(e),t=n.excludeRecommendationsButtonFactory().hitIncludeInRecommendations({contextToBeIncluded:e})):(a(e),t=n.excludeRecommendationsButtonFactory().hitExcludeFromRecommendations({contextToBeExcluded:e})),d.logInteraction(t)}),[o,d,s,e,n,a]);return(0,g.jsx)(l.s,{role:"menuitem",divider:t,onClick:c,children:o?w.ag.get("contextmenu.include-in-recommendations"):w.ag.get("contextmenu.exclude-from-recommendations")})},Gt=i.memo((function(e){return(0,Ae.W6)(Pe.e$)?(0,g.jsx)(d.ZP,{value:"toggle-ignore-in-recommendations",children:(0,g.jsx)(Ht,{...e})}):null}))},43625:(e,t,n)=>{"use strict";n.d(t,{I:()=>P});var i=n(59496),a=n(3802),s=n(98340),r=n(68640),o=n(54455),l=n(66806),d=n(79102),c=n(58658),u=n(96848),m=n(47425),p=n(7813),g=n(99308),h=n(96170),k=n(4637);const v=(e,t)=>{const{addPlaylists:n,movePlaylists:a,containsPlaylists:s}=(0,r.lh)(),o=(0,h.$P)();return(0,i.useCallback)((async i=>{const[r]=await s([e]);let l;r?(a({uri:e},i),l=t.addToFolderButtonFactory().hitSort()):(n([e],i),l=t.addToFolderButtonFactory().hitFollow({itemToBeFollowed:e})),l&&o.logInteraction(l)}),[s,e,o,a,t,n])},f=({uri:e,folder:t,spec:n,children:i})=>{const a=v(e,n);return(0,k.jsx)(g.s,{role:"menuitem",onClick:()=>a({after:t}),children:i??t.name})},y=i.memo((function(e){return(0,k.jsx)(s.ZP,{value:"add-to-existing",children:(0,k.jsx)(f,{...e})})}));var S=n(59242);function b(e){const{item:t,filter:n}=e,i=(0,k.jsx)(p.o,{searchWords:[n],textToHighlight:t.displayTitle});return(0,k.jsxs)(y,{...e,children:[(0,k.jsx)("div",{dir:"auto",className:S.Z.addToPlaylistTitle,children:i}),t.displaySubtitle?(0,k.jsxs)("div",{dir:"auto",className:S.Z.addToPlaylistSubtitle,children:[(0,k.jsx)(m.P,{iconSize:16}),(0,k.jsx)(p.o,{searchWords:[n],textToHighlight:t.displaySubtitle})]}):null]})}var _=n(75563),N=n(24256),E=n(61571);const x=()=>(0,k.jsx)(_._w,{className:E.Z.filterPlaylistSearch,children:(0,k.jsx)(_.IZ,{role:"menuitem",as:"div",children:(0,k.jsx)(N.K,{alwaysExpanded:!0,placeholder:a.ag.get("contextmenu.find-folder")})})});var C=n(96332),w=n(53008),I=n(40778),T=n(24337);const A=({playlistUri:e,folder:t,items:n,displayText:a,depth:s,spec:r})=>{const m=(0,d.S)(),p=(0,u.qT)(),g=v(e,r),{filter:h}=(0,i.useContext)(l.fo),f=1===s,S=(0,i.useMemo)((()=>0===h.length?n:(0,C.J)(h,n,!0)),[h,n]),_=(0,i.useCallback)(((e=t)=>{g({after:e}),p({type:"close"})}),[g,p,t]);return(0,k.jsx)(c.W,{displayText:a,depth:s,placement:m?"left-start":"right-start",onClick:()=>_(),children:(0,k.jsxs)("div",{className:f?T.Z.filterPlaylistSearchContainer:void 0,children:[f&&(0,k.jsx)(x,{}),(0,k.jsx)(I.K_,{position:f?{before:"start"}:{after:t},onCreateCallback:_,divider:"after"}),S.map((t=>(0,o.lU)(t)?(0,w.f)(t)?(0,k.jsx)(b,{uri:e,folder:t,item:t,filter:h??"",spec:r},t.uri):(e=>e.items.some((e=>(0,o.lU)(e))))(t)?(0,k.jsx)(A,{folder:t,playlistUri:e,items:t.items,displayText:t.name,depth:s+1,spec:r},t.uri):(0,k.jsx)(y,{folder:t,uri:e,spec:r},t.uri):null))]})})},P=i.memo((function({playlistUri:e,isInLibrary:t,spec:n}){const d=(0,r.Cu)();if(!d)return null;return d.items.some((e=>(0,o.lU)(e)))?(0,k.jsx)(s.ZP,{value:"add-to-folder",children:(0,k.jsx)(i.Suspense,{fallback:null,children:(0,k.jsx)(l.hz,{uri:"spotify:internal:foldersubmenufolders",children:(0,k.jsx)(A,{playlistUri:e,folder:d,items:d.items||[],displayText:t?a.ag.get("contextmenu.move-playlist-to-folder"):a.ag.get("contextmenu.add-playlist-to-folder"),depth:1,spec:n})})})}):null}))},23042:(e,t,n)=>{"use strict";n.d(t,{p:()=>I});var i=n(59496),a=n(50346),s=n(3802),r=n(99308),o=n(98340),l=n(68640),d=n(66806),c=n(79102),u=n(58658),m=n(54455),p=n(47425),g=n(7813),h=n(40778),k=n(59242),v=n(4637);function f(e){const{item:t,filter:n}=e,i=(0,v.jsx)(g.o,{searchWords:[n],textToHighlight:t.displayTitle});return(0,v.jsx)(h.ms,{...e,children:(0,v.jsxs)("div",{children:[(0,v.jsx)("div",{dir:"auto",className:k.Z.addToPlaylistTitle,children:i}),t.displaySubtitle?(0,v.jsxs)("div",{dir:"auto",className:k.Z.addToPlaylistSubtitle,children:[(0,v.jsx)(p.P,{iconSize:16}),(0,v.jsx)(g.o,{searchWords:[n],textToHighlight:t.displaySubtitle})]}):null]})})}var y=n(75563),S=n(24256),b=n(61571);const _=()=>(0,v.jsx)(y._w,{className:b.Z.filterPlaylistSearch,children:(0,v.jsx)(y.IZ,{role:"menuitem",as:"div",children:(0,v.jsx)(S.K,{alwaysExpanded:!0,placeholder:s.ag.get("contextmenu.find-playlist")})})});var N=n(96332),E=n(53008),x=n(24337);const C=({uris:e,reference:t,items:n,displayText:a,depth:r,spec:o})=>{const l=(0,c.S)(),{filter:p}=(0,i.useContext)(d.fo),g=1===r,k=(0,i.useMemo)((()=>0===p.length?n:(0,N.J)(p,n)),[p,n]);return(0,v.jsx)(u.W,{displayText:a,depth:r,placement:l?"left-start":"right-start",children:(0,v.jsxs)("div",{className:g?x.Z.filterPlaylistSearchContainer:void 0,children:[g&&(0,v.jsx)(_,{}),(0,v.jsx)(h.N0,{divider:"after",uris:e,reference:t,displayText:s.ag.get("contextmenu.create-playlist")}),k.map((t=>(0,m.lU)(t)?(0,v.jsx)(C,{reference:t,uris:e,items:t.items,displayText:t.name,depth:r+1,spec:o},t.uri):(0,m.no)(t)&&t.canAdd?(0,E.f)(t)?(0,v.jsx)(f,{uris:e,playlist:t,item:t,filter:p??"",spec:o},t.uri):(0,v.jsx)(h.ms,{uris:e,playlist:t,spec:o},t.uri):null))]})})},w=e=>(0,v.jsx)(d.hz,{uri:`spotify:internal:foldersubmenu:${e.reference?.uri??"root"}`,children:(0,v.jsx)(C,{...e})}),I=i.memo((function({uris:e,isRecommendation:t,isPlaylist:n,spec:d,isEmpty:c}){const u=i.useContext(l.ZF);let m=s.ag.get("contextmenu.add-to-playlist");t?m=s.ag.get("contextmenu.add-to-another-playlist"):n&&(m=s.ag.get("contextmenu.add-playlist-to-other-playlist"));const p=(0,l.Cu)();return(0,a.nK)(e[0])&&!u.getCapabilities().canFetchAllTracks?null:c?(0,v.jsx)(r.s,{role:"menuitem",disabled:!0,children:m}):(0,v.jsx)(o.ZP,{value:"add-to-playlist",children:(0,v.jsx)(i.Suspense,{fallback:null,children:(0,v.jsx)(w,{uris:e,items:p?.items||[],reference:null,displayText:m,depth:1,spec:d})})})}))},88513:(e,t,n)=>{"use strict";n.d(t,{Y:()=>h});var i=n(59496),a=n(3802),s=n(1996),r=n(98340),o=n(88664),l=n(45118),d=n(9374),c=n(23042),u=n(91834),m=n(40778),p=n(64109),g=n(4637);const h=Spicetify.ReactComponent.AlbumMenu=i.memo((function({uri:e,sharingInfo:t,onRemoveCallback:n,canPin:i=o.TL.NO,isPinned:h=!1,useDialogForUnfollow:k=!1,isInLibrary:v}){const{spec:f}=(0,l.T)(e);return(0,g.jsx)(r.ZP,{value:"album",children:(0,g.jsxs)(s.v,{children:[(0,g.jsx)(m.x9,{spec:f,uris:[e]}),(0,g.jsx)(m.Jh,{spec:f,divider:"after",uri:e,displayText:a.ag.get("contextmenu.go-to-artist-radio")}),i!==o.TL.NO&&(0,g.jsx)(p.X,{uri:e,canPin:i,isPinned:h,type:d.p.ALBUM,spec:f}),(0,g.jsx)(m.lG,{uri:e,onRemoveCallback:n,useDialog:k,initialState:v}),(0,g.jsx)(c.p,{spec:f,uris:[e]}),(0,g.jsxs)(u.q,{divider:"before",children:[(0,g.jsx)(m.Jx,{uri:e,spec:f,sharingInfo:t,displayText:a.ag.get("context-menu.copy-album-link")}),(0,g.jsx)(m.W2,{spec:f,uri:e})]}),(0,g.jsx)(m.h$,{spec:f,divider:"before",uri:e})]})})}))},14280:(e,t,n)=>{"use strict";n.d(t,{m:()=>h});var i=n(59496),a=n(3802),s=n(1996),r=n(98340),o=n(88664),l=n(45118),d=n(9374),c=n(91834),u=n(40778),m=n(57807),p=n(64109),g=n(4637);const h=Spicetify.ReactComponent.ArtistMenu=i.memo((function({uri:e,sharingInfo:t,onRemoveCallback:n,canPin:i=o.TL.NO,isPinned:h=!1,useDialogForUnfollow:k=!1,isInLibrary:v}){const{spec:f}=(0,l.T)(e);return(0,g.jsx)(r.ZP,{value:"artist",children:(0,g.jsxs)(s.v,{children:[(0,g.jsx)(m.x3,{uri:e,onRemoveCallback:n,useDialog:k,initialState:v}),i!==o.TL.NO&&(0,g.jsx)(p.X,{uri:e,canPin:i,isPinned:h,type:d.p.ARTIST,spec:f}),(0,g.jsx)(u.Jh,{uri:e,displayText:a.ag.get("contextmenu.go-to-artist-radio")}),(0,g.jsx)(u.tz,{spec:f,uri:e}),(0,g.jsxs)(c.q,{children:[(0,g.jsx)(u.Jx,{spec:f,uri:e,sharingInfo:t,displayText:a.ag.get("contextmenu.share.copy-artist-link")}),(0,g.jsx)(u.W2,{spec:f,uri:e})]}),(0,g.jsx)(u.h$,{spec:f,divider:"before",uri:e})]})})}))},99553:(e,t,n)=>{"use strict";n.d(t,{X:()=>k});var i=n(59496),a=n(36844),s=n(3802),r=n(1996),o=n(98340),l=n(88664),d=n(45118),c=n(9374),u=n(91834),m=n(41836),p=n(40778),g=n(64109),h=n(4637);const k=Spicetify.ReactComponent.PodcastShowMenu=i.memo((function({uri:e,sharingInfo:t,canPin:n=l.TL.NO,isPinned:i=!1,useDialogForUnfollow:k=!1,isInLibrary:v}){const{spec:f}=(0,d.T)(e),y=(0,a.W6)(m.hT,{loadingValue:!1});return(0,h.jsx)(o.ZP,{value:"show",children:(0,h.jsxs)(r.v,{children:[(0,h.jsx)(p.K,{uri:e,useDialog:k,initialState:v}),n!==l.TL.NO&&(0,h.jsx)(g.X,{uri:e,canPin:n,isPinned:i,type:c.p.AUDIOBOOK,spec:f}),(0,h.jsx)(u.q,{children:(0,h.jsx)(p.Jx,{spec:f,uri:e,sharingInfo:t,displayText:s.ag.get("context-menu.copy-book-link")})}),(0,h.jsx)(p.h$,{spec:f,divider:"before",uri:e}),y&&(0,h.jsx)(p.tz,{spec:f,uri:e})]})})}))},44355:(e,t,n)=>{"use strict";n.d(t,{r:()=>d});var i=n(59496),a=n(1996),s=n(98340),r=n(45118),o=n(40778),l=n(4637);const d=i.memo((function({uri:e,contextUri:t,uid:n,showUri:i,isLocked:d}){const{spec:c}=(0,r.T)(e);return d?null:(0,l.jsx)(s.ZP,{value:"chapter",children:(0,l.jsxs)(a.v,{children:[!d&&(0,l.jsx)(o.x9,{spec:c,uris:[e]}),n&&!d&&(0,l.jsx)(o.Qf,{spec:c,uids:[n],uris:[e],contextUri:t}),!d&&(0,l.jsx)(o.f0,{uri:e,showUri:i,spec:c})]})})}))},73769:(e,t,n)=>{"use strict";n.d(t,{k:()=>h});var i=n(59496),a=n(3802),s=n(1996),r=n(98340),o=n(52315),l=n(26406),d=n(45118),c=n(23042),u=n(44355),m=n(91834),p=n(40778),g=n(4637);const h=i.memo((function({uri:e,isPlayed:t=null,contextUri:n,uid:i,sharingInfo:h,onMarkAsPlayed:k=(()=>{}),canBeRemovedFromPlaylist:v}){const f=(0,o.I)(e),{spec:y}=(0,d.T)(e);return f?.episodeOrChapter&&(0,l.Ey)(f.episodeOrChapter)?(0,g.jsx)(u.r,{uri:e,contextUri:n,uid:i}):f?.episodeOrChapter?(0,g.jsx)(r.ZP,{value:"episode",children:(0,g.jsxs)(s.v,{children:[(0,g.jsx)(p.x9,{spec:y,uris:[e]}),i&&(0,g.jsx)(p.Qf,{spec:y,uids:[i],uris:[e],contextUri:n}),(0,g.jsx)(p.EC,{uri:e}),i&&(0,g.jsx)(p.Xu,{uris:[e],uids:[i],playlistUri:n||"",canBeRemoved:v}),(0,g.jsx)(p.pJ,{spec:y,uri:e}),(0,g.jsx)(p.IW,{uri:e,contextUri:n}),null!==t&&(0,g.jsx)(p.Fg,{uri:e,isPlayed:t,onChange:k}),(0,g.jsx)(c.p,{spec:y,uris:[e]}),(0,g.jsxs)(m.q,{divider:"before",children:[(0,g.jsx)(p.Jx,{spec:y,uri:e,sharingInfo:h,displayText:a.ag.get("context-menu.copy-episode-link")}),(0,g.jsx)(p.W2,{spec:y,uri:e})]}),(0,g.jsx)(p.h$,{divider:"before",uri:e,spec:y,context:n})]})}):null}))},96332:(e,t,n)=>{"use strict";n.d(t,{J:()=>s});var i=n(66155),a=n(54455);const s=(e,t,n=!1,r=[],o=[],l=[])=>{for(const d of t)if((0,a.lU)(d)||(0,a.no)(d)){const t=(0,i.B)(e,d.name),c=null!==t?[...o,t]:o;(0,a.lU)(d)&&s(e,d.items,n,r,c,[...l,d.name]),((0,a.no)(d)||n&&(0,a.lU)(d))&&c?.length>0&&r.push({...d,displayTitle:d.name,displaySubtitle:l.length>0?l.join(" • "):null,matchScore:c.reduce(((e,t)=>e+t.reduce(((e,t)=>e+t.range.length),0)),0)})}return r.sort(((e,t)=>t.matchScore-e.matchScore))}},53008:(e,t,n)=>{"use strict";function i(e){return"displayTitle"in e}n.d(t,{f:()=>i})},8646:(e,t,n)=>{"use strict";n.d(t,{N:()=>c});var i=n(59496),a=n(1996),s=n(98340),r=n(45118),o=n(23042),l=n(40778),d=n(4637);const c=i.memo((function({uri:e,uid:t,contextUri:n,canBeRemovedFromPlaylist:i}){const{spec:c}=(0,r.T)(e);return(0,d.jsx)(s.ZP,{value:"local-file",children:(0,d.jsxs)(a.v,{children:[(0,d.jsx)(l.x9,{spec:c,uris:[e]}),t&&(0,d.jsx)(l.Qf,{spec:c,uids:[t],uris:[e],contextUri:n}),t&&(0,d.jsx)(l.Xu,{uris:[e],uids:[t],playlistUri:n||"",canBeRemoved:i}),(0,d.jsx)(o.p,{spec:c,uris:[e]})]})})}))},73444:(e,t,n)=>{"use strict";n.d(t,{X:()=>w});var i=n(59496),a=n(3802),s=n(1218),r=n(48271),o=n(27652),l=n(68591),d=n(1996),c=n(98340),u=n(88664),m=n(66632),p=n(68640),g=n(14709),h=n(45118),k=n(9374),v=n(43625),f=n(23042),y=n(91834),S=n(40778),b=n(57807),_=n(36730),N=n(83503),E=n(64109),x=n(4637);const C=Spicetify.ReactComponent.PlaylistMenu=i.memo((function({uri:e,onRemoveCallback:t,isEnhanced:n,isPublished:i,canPin:o=u.TL.NO,isPinned:C=!1}){const w=(0,l.t)(),{canGetStation:I}=w.getCapabilities(),T=(0,p.ET)(e,{decorateFormatListData:!0}),[A]=(0,m.Z)(e),{spec:P}=(0,h.T)(e),O=!!T?.permissions?.isPrivate,D=(0,g.p)(e)??i,{isEnhanced:R}=(0,r.U)(e),L=n??R;return T?.permissions&&!T.permissions.canView&&A?T&&(0,x.jsx)(c.ZP,{value:"playlist",children:(0,x.jsx)(d.v,{children:(0,x.jsx)(b.Zb,{uri:e,onRemoveCallback:t})})}):T&&(0,x.jsx)(c.ZP,{value:"playlist",children:(0,x.jsxs)(d.v,{children:[(0,x.jsx)(S.x9,{spec:P,uris:[e]}),I&&(0,x.jsx)(S.Jh,{spec:P,uri:e,displayText:a.ag.get("contextmenu.go-to-playlist-radio")}),T.isOwnedBySelf&&(0,x.jsx)(S.jj,{spec:P,divider:"before",uri:e,isCollaborative:T.isCollaborative}),A&&!O&&(0,x.jsx)(S.gh,{spec:P,divider:T.isOwnedBySelf?"after":"both",uri:e,isPublished:D,isCollaborative:T.isCollaborative}),T.isOwnedBySelf&&(0,x.jsx)(S.fc,{spec:P,uri:e,name:T.name,description:T.description,image:T.images[0]}),!T.isOwnedBySelf&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(S.tz,{spec:P,uri:e}),(0,x.jsx)(b.Zb,{uri:e,onRemoveCallback:t})]}),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(S.AM,{uri:e,spec:P,isEmpty:0===T.totalLength,name:T.name,displayText:a.ag.get("contextmenu.create-similar-playlist")}),T.isOwnedBySelf&&(0,x.jsx)(S.R2,{spec:P,uri:e})]}),!L&&(0,x.jsx)(S.bs,{spec:P,uri:e}),T.permissions?.canAdministratePermissions&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(S.DY,{spec:P,divider:"before",uri:e,isPrivate:O}),!L&&(0,x.jsx)(_.z,{uri:e})]}),T.permissions?.canCancelMembership&&(0,x.jsx)(N.H,{spec:P,divider:"before",uri:e}),(T.isOwnedBySelf&&T.hasSpotifyTracks||L)&&(0,x.jsx)(s.g,{spec:P,uri:e}),(0,x.jsx)(S.Iy,{spec:P,uri:e}),(0,x.jsx)(v.I,{playlistUri:e,isInLibrary:A,spec:P}),(0,x.jsx)(f.p,{spec:P,uris:[e],isPlaylist:!0,isEmpty:0===T.totalLength}),o!==u.TL.NO&&(0,x.jsx)(E.X,{uri:e,canPin:o,isPinned:C,type:k.p.PLAYLIST,spec:P}),(T.isOwnedBySelf||!O)&&(0,x.jsxs)(y.q,{divider:"before",children:[(0,x.jsx)(S.Jx,{spec:P,uri:e,displayText:a.ag.get("contextmenu.share.copy-playlist-link"),isPrivatePlaylist:O}),(0,x.jsx)(S.W2,{spec:P,uri:e})]}),!!T?.formatListData&&(0,x.jsx)(S.aU,{divider:"before"}),(0,x.jsx)(S.h$,{spec:P,divider:"before",uri:e})]})})})),w=e=>(0,o.MW)(e.uri)?(0,x.jsx)(o.XL,{}):(0,x.jsx)(C,{...e})},78371:(e,t,n)=>{"use strict";n.d(t,{i:()=>m});var i=n(59496),a=n(50346),s=n(3803),r=n(1996),o=n(98340),l=n(45118),d=n(23042),c=n(40778),u=n(4637);const m=i.memo((function({uri:e,tracks:t}){const n=(0,s.t)(e),{spec:m}=(0,l.T)(e),p=(0,i.useMemo)((()=>t?.map((e=>e.uri))??[]),[t]);let g=null;switch(n?.type){case a.JM.ARTIST:g=(0,u.jsx)(c.m8,{uri:n.toURI()});break;case a.JM.ALBUM:g=(0,u.jsx)(c.ZI,{uri:n.toURI()});break;case a.JM.PLAYLIST:case a.JM.PLAYLIST_V2:g=(0,u.jsx)(c.SB,{uri:n.toURI()})}return(0,u.jsx)(o.ZP,{value:"radio",children:(0,u.jsxs)(r.v,{children:[g,(0,u.jsx)(d.p,{spec:m,uris:p}),(0,u.jsx)(c.h$,{spec:m,divider:"before",uri:e})]})})}))},12880:(e,t,n)=>{"use strict";n.d(t,{a:()=>l});var i=n(59496),a=n(1996),s=n(98340),r=n(40778),o=n(4637);const l=i.memo((function({position:e,onCreateCallback:t}){return(0,o.jsx)(s.ZP,{value:"folder",children:(0,o.jsxs)(a.v,{children:[(0,o.jsx)(r.uj,{position:e,onCreateCallback:t}),(0,o.jsx)(r.K_,{position:e,onCreateCallback:t})]})})}))},90055:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var i=n(59496),a=n(36844),s=n(1996),r=n(98340),o=n(88664),l=n(45118),d=n(9374),c=n(41836),u=n(40778),m=n(64109),p=n(3802),g=n(99308),h=n(48607),k=n(96170),v=n(4637);const f=({uri:e,spec:t})=>{const{togglePlay:n,isPlaying:a,isActive:s}=(0,h.n)({uri:e},{featureIdentifier:"folder"}),r=(0,k.$P)(),o=(0,i.useCallback)((()=>{n(),t&&r&&(a?r.logInteraction(t.playButtonFactory({uri:e}).hitPause({itemToBePaused:e})):s?r.logInteraction(t.playButtonFactory({uri:e}).hitResume({itemToBeResumed:e})):r.logInteraction(t.playButtonFactory({uri:e}).hitPlay({itemToBePlayed:e})))}),[s,a,r,t,n,e]);return(0,v.jsx)(g.s,{role:"menuitem",onClick:o,children:a?p.ag.get("pause"):p.ag.get("play")})},y=i.memo((function(e){return(0,v.jsx)(r.ZP,{value:"create-folder",children:(0,v.jsx)(f,{...e})})}));var S=n(61740),b=n(85483);const _=({uri:e,name:t,divider:n,spec:a,handleRename:s})=>{const r=(0,k.$P)(),o=(0,S.I0)(),l=(0,i.useCallback)((()=>{a&&r.logInteraction(a.editButtonFactory({uri:e}).hitUiReveal()),o((0,b.UX)(t,s))}),[o,r,t,s,a,e]);return(0,v.jsx)(g.s,{role:"menuitem",divider:n,onClick:l,children:p.ag.get("contextmenu.rename")})},N=i.memo((function(e){return(0,v.jsx)(r.ZP,{value:"rename",children:(0,v.jsx)(_,{...e})})})),E=i.memo((function({reference:e,name:t="",onRename:n,onCreateCallback:i=(()=>{}),onDeleteCallback:p,canPin:g=o.TL.NO,isPinned:h=!1}){const{spec:k}=(0,l.T)(e.uri),f=(0,a.W6)(c.yA,{loadingValue:!1});return(0,v.jsx)(r.ZP,{value:"folder",children:(0,v.jsxs)(s.v,{children:[f?(0,v.jsx)(N,{spec:k,uri:e.uri,name:t,handleRename:n}):(0,v.jsx)(u.fW,{uri:e.uri,spec:k,onRename:n}),(0,v.jsx)(u.WQ,{uri:e.uri,divider:"after",onDeleteCallback:p}),g!==o.TL.NO&&(0,v.jsx)(m.X,{uri:e.uri,canPin:g,isPinned:h,type:d.p.FOLDER,spec:k}),(0,v.jsx)(u.uj,{position:{after:e},onCreateCallback:i}),(0,v.jsx)(u.K_,{position:{after:e},onCreateCallback:i}),(0,v.jsx)(y,{uri:e.uri,spec:k})]})})}))},70079:(e,t,n)=>{"use strict";n.d(t,{j:()=>E});var i=n(59496),a=n(3802),s=n(1218),r=n(48271),o=n(68591),l=n(1996),d=n(98340),c=n(88664),u=n(68640),m=n(14709),p=n(45118),g=n(9374),h=n(43625),k=n(23042),v=n(91834),f=n(40778),y=n(57807),S=n(36730),b=n(83503),_=n(64109),N=n(4637);const E=i.memo((function({reference:e,onRename:t,isPublished:n,canPin:i=c.TL.NO,isPinned:E=!1,useDialogForUnfollow:x=!1,isInLibrary:C}){const{uri:w}=e,I=(0,o.t)(),{canGetStation:T}=I.getCapabilities(),A=(0,u.ET)(w),P=!!A?.permissions?.isPrivate,{isEnhanced:O}=(0,r.U)(w),D=(0,m.p)(w)??n,{spec:R}=(0,p.T)(w);return A&&(0,N.jsx)(d.ZP,{value:"playlist",children:(0,N.jsxs)(l.v,{children:[(0,N.jsx)(f.x9,{spec:R,uris:[w]}),T&&(0,N.jsx)(f.Jh,{spec:R,uri:w,displayText:a.ag.get("contextmenu.go-to-playlist-radio")}),A.isOwnedBySelf&&(0,N.jsx)(f.jj,{spec:R,divider:"before",uri:w,isCollaborative:A.isCollaborative}),!P&&(0,N.jsx)(f.gh,{spec:R,divider:A.isOwnedBySelf?"after":"both",uri:w,isPublished:D,isCollaborative:A.isCollaborative}),A.isOwnedBySelf&&(0,N.jsx)(f.fc,{spec:R,uri:w,name:A.name,description:A.description,image:A.images[0]}),!A.isOwnedBySelf&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(f.tz,{spec:R,uri:w}),(0,N.jsx)(y.Zb,{uri:w,useDialog:x,initialState:C})]}),A.isOwnedBySelf&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(f.AM,{spec:R,uri:w,isEmpty:0===A.totalLength,name:A.name,displayText:a.ag.get("contextmenu.create-similar-playlist")}),(0,N.jsx)(f.R2,{spec:R,uri:w}),t&&(0,N.jsx)(f.fW,{uri:w,spec:R,onRename:t})]}),!O&&(0,N.jsx)(f.bs,{spec:R,uri:w}),(0,N.jsx)(f.uj,{position:{after:e},divider:"before"}),(0,N.jsx)(f.K_,{position:{after:e}}),A.permissions?.canAdministratePermissions&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(f.DY,{spec:R,divider:"before",uri:w,isPrivate:P}),!O&&(0,N.jsx)(S.z,{uri:w})]}),A.permissions?.canCancelMembership&&(0,N.jsx)(b.H,{spec:R,divider:"before",uri:w}),(A.isOwnedBySelf&&A.hasSpotifyTracks||O)&&(0,N.jsx)(s.g,{spec:R,uri:w}),(0,N.jsx)(f.Iy,{spec:R,uri:w}),(0,N.jsx)(h.I,{playlistUri:w,isInLibrary:!0,spec:R}),(0,N.jsx)(k.p,{spec:R,uris:[w],isPlaylist:!0}),i!==c.TL.NO&&(0,N.jsx)(_.X,{uri:w,canPin:i,isPinned:E,type:g.p.PLAYLIST,spec:R}),(A.isOwnedBySelf||!P)&&(0,N.jsxs)(v.q,{divider:"before",children:[(0,N.jsx)(f.Jx,{spec:R,uri:w,displayText:a.ag.get("contextmenu.share.copy-playlist-link"),isPrivatePlaylist:P}),(0,N.jsx)(f.W2,{spec:R,uri:w})]})]})})}))},91834:(e,t,n)=>{"use strict";n.d(t,{q:()=>d});var i=n(59496),a=n(3802),s=n(79102),r=n(58658),o=n(98340),l=n(4637);const d=i.memo((function({children:e,divider:t}){const n=(0,s.S)();return(0,l.jsx)(o.ZP,{value:"share",children:(0,l.jsx)(r.W,{divider:t,displayText:a.ag.get("contextmenu.share"),placement:n?"left-start":"right-start",children:e})})}))},762:(e,t,n)=>{"use strict";n.d(t,{M:()=>f});var i=n(59496),a=n(3802),s=n(1996),r=n(98340),o=n(88664),l=n(98432),d=n(26406),c=n(45118),u=n(9374),m=n(99553),p=n(91834),g=n(40778),h=n(57807),k=n(64109),v=n(4637);const f=i.memo((function({uri:e,sharingInfo:t,onRemoveCallback:n,canPin:i=o.TL.NO,isPinned:f=!1,useDialogForUnfollow:y,isInLibrary:S}){const{spec:b}=(0,c.T)(e),{data:_}=(0,l.l)(e);return _&&(0,d.l6)(_)?(0,v.jsx)(m.X,{uri:e,sharingInfo:t,useDialogForUnfollow:!0,isInLibrary:S}):_&&(0,v.jsx)(r.ZP,{value:"show",children:(0,v.jsxs)(s.v,{children:[(0,v.jsx)(h.xM,{uri:e,onRemoveCallback:n,useDialog:y,initialState:S}),i!==o.TL.NO&&(0,v.jsx)(k.X,{uri:e,canPin:i,isPinned:f,type:u.p.SHOW,spec:b}),(0,v.jsxs)(p.q,{children:[(0,v.jsx)(g.Jx,{spec:b,uri:e,sharingInfo:t,displayText:a.ag.get("context-menu.copy-show-link")}),(0,v.jsx)(g.W2,{spec:b,uri:e})]}),(0,v.jsx)(g.h$,{spec:b,divider:"before",uri:e})]})})}))},84229:(e,t,n)=>{"use strict";n.d(t,{$:()=>S});var i=n(59496),a=n(74095),s=n(50346),r=n(3802),o=n(1996),l=n(98340),d=n(96170),c=n(45118),u=n(23042),m=n(40778),p=n(72071);const g=Spicetify.GraphQL.Definitions["queryTrackArtists"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryTrackArtists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trackUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}}]}}]};var h=n(79102),k=n(58658),v=n(4637);const f=i.memo((function({trackUri:e,contextUri:t}){let n=[];const i=(a={uri:e},(0,p.a)(g,a,s));var a,s;"Track"===i.data?.trackUnion.__typename&&(n=i.data.trackUnion.artists.items.map((e=>({uri:e.uri,name:e.profile.name}))));const o=(0,h.S)();return(0,v.jsx)(k.W,{displayText:r.ag.get("contextmenu.go-to-artist"),depth:1,placement:o?"left-start":"right-start",children:(0,v.jsx)(l.ZP,{value:"go-to-artist",children:n.map((({uri:e,name:n})=>(0,v.jsx)(m.m8,{displayText:n,uri:e,contextUri:t},e)))})})}));var y=n(91834);const S=i.memo((function({uri:e,uid:t,artists:n=[],albumUri:p,contextUri:g,sharingInfo:h,removePlaylistItems:k,isRecommendation:S,removeRecommendation:b,addRecommendation:_,canBeRemovedFromPlaylist:N}){const{spec:E,logger:x,UBIFragment:C}=(0,d.fU)(a.createDesktopTrackContextMenuEventFactory,{data:{uri:e}}),{spec:w}=(0,c.T)(e),I=(0,i.useCallback)((()=>{if(_){let t;_(),g&&(0,s.nK)(g)?t=E.addRecommendationFactory().hitAddToPlaylist({playlist:g??"",itemToBeAdded:e}):g&&(0,s.zO)(g)&&(t=E.addRecommendationFactory().hitLike({itemToBeLiked:e})),t&&x.logInteraction(t)}}),[g,x,_,E,e]),T=(0,i.useCallback)((()=>{b&&(b(),x.logInteraction(E.removeRecommendationFactory().hitRemoveRecommendation({contextUri:g??"",recommendedItemUri:e})))}),[g,x,b,E,e]);return(0,v.jsx)(C,{spec:E,children:(0,v.jsx)(l.ZP,{value:"track","":"track-menu",children:(0,v.jsxs)(o.v,{children:[(0,v.jsx)(m.x9,{spec:w,uris:[e]}),t&&(0,v.jsx)(m.Qf,{spec:w,uids:[t],uris:[e],contextUri:g}),(0,v.jsx)(m.Jh,{spec:w,uri:e,displayText:r.ag.get("contextmenu.go-to-song-radio"),divider:"before"}),n.length>1?(0,v.jsx)(f,{trackUri:e,contextUri:g}):(0,v.jsx)(m.m8,{uri:n?.[0]?.uri,contextUri:g}),(0,v.jsx)(m.ZI,{uri:p,contextUri:g,highlightedUri:e}),(0,v.jsx)(m.AA,{uri:e,displayText:r.ag.get("contextmenu.show-credits"),divider:"after",ubiLogger:x,contextMenuSpec:E}),(0,v.jsx)(m.V8,{uri:e}),S&&b?(0,v.jsx)(m.ai,{removeRecommendation:T}):t&&(0,v.jsx)(m.Xu,{uris:[e],uids:[t],playlistUri:g||"",removePlaylistItems:k,canBeRemoved:N}),S&&_?(0,v.jsx)(m.CW,{addRecommendation:I}):null,(0,v.jsx)(u.p,{spec:w,uris:[e],isRecommendation:S}),(0,v.jsxs)(y.q,{divider:"before",children:[(0,v.jsx)(m.Jx,{spec:w,uri:e,sharingInfo:h,displayText:r.ag.get("context-menu.copy-track-link")}),(0,v.jsx)(m.W2,{spec:w,uri:e})]}),(0,v.jsx)(m.h$,{spec:w,divider:"before",uri:e,context:g})]})})})}))},68776:(e,t,n)=>{"use strict";n.d(t,{I:()=>D});var i=n(59496),a=n(61740),s=n(3802),r=n(49795),o=n(17652),l=n(41836),d=n(82108),c=n(1996),u=n(98340),m=n(85270),p=n(45118),g=n(40778),h=n(6664),k=n(85483),v=n(32812),f=n(99308),y=n(44358),S=n(25899),b=n(42205),_=n(95663),N=n(4637);const E=({currentUserUri:e,uri:t,name:n,divider:r})=>{const o=(0,_.o)(),l=!(0,v.k)(),{isBlocked:d,blockUser:c,unblockUser:u}=function(e,t,n){const[s,r]=(0,i.useState)(!1),o=(0,a.I0)(),l=(0,y.t)();return(0,i.useEffect)((()=>{e&&(0,b.getIsBlocked)(S.b.getInstance(),{currentUserUri:e,uri:t}).then((e=>{if(l()){if(200!==e.status)throw new Error("Invalid response from socialgraph");r(e.body?.[0]?.is_dismissed||!1)}}))}),[e,t,l]),{isBlocked:s,blockUser:()=>{e&&o((0,k.Vr)(t,n))},unblockUser:async()=>{e&&(await(0,b.unblockUser)(S.b.getInstance(),{currentUserUri:e,uri:t}),o((0,h.MK)()))}}}(e,t,n),m=(0,i.useCallback)((async()=>{o({targetUri:t,intent:d?"unblock":"block",type:"click"}),d?await u():await c()}),[o,t,c,u,d]);if(!e||e===t)return null;const p=d?s.ag.get("contextmenu.unblock"):s.ag.get("contextmenu.block");return(0,N.jsx)(f.s,{role:"menuitem",divider:r,disabled:l,onClick:m,children:p})},x=i.memo((function(e){return(0,N.jsx)(u.ZP,{value:"block-user",children:(0,N.jsx)(E,{...e})})})),C=i.memo((function({onClick:e,currentUserUri:t,uri:n,divider:i}){return e&&t===n?(0,N.jsx)(u.ZP,{value:"edit-profile",children:(0,N.jsx)(f.s,{role:"menuitem",divider:i,onClick:e,children:s.ag.get("contextmenu.edit-profile")})}):null}));var w=n(56084),I=n(95335),T=n(96170);const A=()=>{},P=({uri:e,divider:t,onRemoveCallback:n=A})=>{const{spec:r,logger:o}=(0,T.fU)(w.M,{data:{uri:e}}),l=(0,_.o)(),c=!(0,v.k)(),u=(0,a.v9)(d.Gg).user,[m,p]=(0,I.H)(e),g=(0,i.useCallback)((()=>{const t=r.followButtonFactory();l({targetUri:e,intent:m?"unfollow":"follow",type:"click"}),m?(p(!1),o.logInteraction(t.hitUnfollow({itemToBeUnfollowed:e})),n(e)):(p(!0),o.logInteraction(t.hitFollow({itemToBeFollowed:e})))}),[m,o,l,n,p,r,e]);if(u&&u.uri===e)return null;const h=m?s.ag.get("contextmenu.unfollow"):s.ag.get("contextmenu.follow");return(0,N.jsx)(f.s,{role:"menuitem",testid:"follow-user-context-menu-item",divider:t,disabled:c,onClick:g,children:h})},O=i.memo((function(e){return(0,N.jsx)(u.ZP,{value:"follow-user",children:(0,N.jsx)(P,{...e})})})),D=i.memo((function({uri:e,onEditProfileCallback:t}){const{user:n}=(0,a.v9)(d.Gg),{spec:i}=(0,p.T)(e),{data:h,loading:k}=(0,o.J)(m.n5.getProfile,[{uri:e}]);return k?null:h?(0,N.jsx)(u.ZP,{value:"user",children:(0,N.jsxs)(c.v,{children:[(0,N.jsx)(O,{uri:e}),(0,N.jsx)(r.F,{property:l.Zj,renderNewExperience:()=>(0,N.jsx)(x,{uri:h.uri,name:h.name,currentUserUri:n?.uri})}),(0,N.jsx)(C,{onClick:t,uri:e,currentUserUri:n?.uri}),(0,N.jsx)(g.tz,{spec:i,uri:e,canReportUser:!h.report_abuse_disabled,currentUserUri:n?.uri}),(0,N.jsx)(g.Jx,{spec:i,uri:e,displayText:s.ag.get("contextmenu.share.copy-profile-link")})]})}):null}))},65321:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var i=n(59496),a=n(84875),s=n.n(a),r=n(50346),o=n(19496),l=n.n(o);const d=()=>!1!==l().getParser(window.navigator.userAgent).satisfies({"Microsoft Edge":">=17"});var c=n(4637);class u extends i.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:n}=this.props,i=this.getMatchingDropData(e);this.enterEventCount=0,this.leaveEventCount=0;const a=e.defaultPrevented;e.preventDefault(),t(e),a||n(e,i),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),n={};t.forEach((t=>{const i=e.dataTransfer.getData(t),a=0===t.indexOf("text/x-spotify"),s=a?i.split("\n"):[i];n[t]=s.map((e=>{if(a){const t=(0,r.EC)(e);if(t)return t.toURI()}return e})).filter((e=>!!e))}));const i=e.dataTransfer.getData("text/plain");return n.all=i?i.split("\n").map((e=>{const t=(0,r.EC)(e);return t?t.toURI():e})):[],n}render(){const{types:e,as:t,testId:n,className:i}=this.props,a=t,r=e.filter(Boolean).map((e=>`GlueDropTarget--${e.replace("text/x-spotify-","")}`));return(0,c.jsx)(a,{className:s()("GlueDropTarget",r,{"GlueDropTarget--active":this.state.isDropTargetActive},i),onDragOver:d()?this.handleDragOver:void 0,onDragEnter:d()?this.handleDragEnter:void 0,onDragLeave:d()?this.handleDragLeave:void 0,onDrop:d()?this.handleDrop:void 0,onContextMenu:this.props.onContextMenu,"":n,children:this.props.children})}}u.defaultProps={as:"div",children:null,onDragEnter(){},onDragLeave(){},onDrop(){},onContextMenu(){},types:[],className:""}},84260:(e,t,n)=>{"use strict";n.d(t,{Fu:()=>r,UD:()=>d,ZP:()=>l,aN:()=>o});var i=n(50346),a=n(49288);let s=function(e){return e.TRACKS="text/x-spotify-tracks",e.ALBUMS="text/x-spotify-albums",e.ARTISTS="text/x-spotify-artists",e.PLAYLISTS="text/x-spotify-playlists",e.PLAYLISTS_V2="text/x-spotify-playlists",e.FOLDERS="text/x-spotify-folders",e.USERS="text/x-spotify-users",e.SHOWS="text/x-spotify-shows",e.EPISODES="text/x-spotify-episodes",e.LOCAL_TRACKS="text/x-spotify-local-tracks",e.LOCAL_ALBUMS="text/x-spotify-local-albums",e.LOCAL_ARTISTS="text/x-spotify-local-artists",e.COLLECTION_ALBUMS="text/x-spotify-collection-albums",e.COLLECTION_ARTISTS="text/x-spotify-collection-artists",e}({});const r=(0,a.y)(s),o={[i.JM.TRACK]:s.TRACKS,[i.JM.ALBUM]:s.ALBUMS,[i.JM.ARTIST]:s.ARTISTS,[i.JM.PLAYLIST]:s.PLAYLISTS,[i.JM.PLAYLIST_V2]:s.PLAYLISTS_V2,[i.JM.FOLDER]:s.FOLDERS,[i.JM.PROFILE]:s.USERS,[i.JM.SHOW]:s.SHOWS,[i.JM.EPISODE]:s.EPISODES,[i.JM.LOCAL]:s.LOCAL_TRACKS,[i.JM.LOCAL_ALBUM]:s.LOCAL_ALBUMS,[i.JM.LOCAL_ARTIST]:s.LOCAL_ARTISTS,[i.JM.COLLECTION_ALBUM]:s.COLLECTION_ALBUMS,[i.JM.COLLECTION_ARTIST]:s.COLLECTION_ARTISTS},l=o,d={[s.TRACKS]:i.JM.TRACK,[s.ALBUMS]:i.JM.ALBUM,[s.ARTISTS]:i.JM.ARTIST,[s.PLAYLISTS]:i.JM.PLAYLIST,[s.PLAYLISTS_V2]:i.JM.PLAYLIST_V2,[s.FOLDERS]:i.JM.FOLDER,[s.USERS]:i.JM.PROFILE,[s.SHOWS]:i.JM.SHOW,[s.EPISODES]:i.JM.EPISODE,[s.LOCAL_TRACKS]:i.JM.LOCAL,[s.LOCAL_ALBUMS]:i.JM.LOCAL_ALBUM,[s.LOCAL_ARTISTS]:i.JM.LOCAL_ARTIST,[s.COLLECTION_ALBUMS]:i.JM.COLLECTION_ALBUM,[s.COLLECTION_ARTISTS]:i.JM.COLLECTION_ARTIST}},7656:(e,t,n)=>{"use strict";n.d(t,{$:()=>p});var i=n(87903),a=n(3802),s=n(30301),r=n(99948),o=n(22508),l=n(59496),d=n(47122),c=n(18761);var u=n(4637);function m(e){return e.includes("Spotify")?e:`Spotify – ${e}`}const p=({children:e,usePlayingItem:t})=>{let n=m(e);(e=>{const{mainLandmarkRef:t}=(0,c.Oh)(),n=(0,d.D)(),i=n.location?.state?.preventMoveFocus,a=(0,l.useRef)(n.length<2);a.current=n.length<2,(0,l.useEffect)((()=>{const n=t.current;!i&&!a.current&&n&&e&&(n.setAttribute("aria-label",e),n.focus())}),[e,t,i])})(e);const{isPlaying:p}=(0,s.IK)(),g=(0,r.Y)((e=>e?.item));return g&&(p||t)&&((0,o.G_)(g)?n=[g.name,g.artists.map((e=>e.name)).join(a.ag.getSeparator())].join(" • "):(0,o.iw)(g)?n=[g.name,g.show.name].join(" • "):(0,o.k6)(g)&&(n=m(a.ag.get("ad-formats.advertisement")))),(0,u.jsx)(i.q,{defaultTitle:"Spotify",defer:!1,children:(0,u.jsx)("title",{children:n})})}},91703:(e,t,n)=>{"use strict";n.d(t,{$:()=>i.$});var i=n(7656)},77462:(e,t,n)=>{"use strict";n.d(t,{$:()=>h});var i=n(59496),a=n(84875),s=n.n(a),r=n(75257),o=n(3802),l=n(82538),d=n(93309),c=n(13339),u=n(15143),m=n(94350);const p="hcxPtZcvjM07S6ydT685";var g=n(4637);const h=i.memo((function({uri:e,className:t,size:n=16,as:i="div"}){const{availability:a}=(0,d._)(e),h=(0,c.A)(e);return a===l.Om.NO?null:(0,g.jsx)(i,{className:s()(p,t),children:a===l.Om.DOWNLOADING?(0,g.jsx)(m.e,{percentage:h.percentage,size:n}):a===l.Om.WAITING?(0,g.jsx)(u.l,{size:n}):a===l.Om.YES?(0,g.jsx)(r.E,{iconSize:n,title:o.ag.get("shared.library.filter.downloaded")}):null})}))},15143:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var i=n(59496),a=n(4637);const s=(0,i.memo)((function({size:e}){const t=2e3,n=20*Math.PI,i=n-.8*n,s=Math.floor(Date.now()%t*360/t);return(0,a.jsx)("svg",{height:e,role:"img",width:e,viewBox:"0 0 24 24",children:(0,a.jsx)("circle",{strokeDasharray:`${n} ${n}`,strokeDashoffset:i,stroke:"currentColor",strokeWidth:"2",fill:"transparent",r:10,cx:"12",cy:"12",children:(0,a.jsx)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",from:`${s} 12 12`,to:`${360+s} 12 12`,dur:"2000ms",repeatCount:"indefinite"})})})}))},70786:(e,t,n)=>{"use strict";n.d(t,{v:()=>d});var i=n(84875),a=n.n(i),s=n(50983);const r="main-dropDown-dropDown",o="main-dropDown-isSafari";var l=n(4637);const d=({value:e,id:t,children:n,disabled:i,onSelect:d,className:c,dir:u})=>(0,l.jsx)("span",{className:c,children:(0,l.jsx)("select",{className:a()(r,{[o]:(0,s.G)()}),value:e?.toString(),id:t,disabled:i,onBlur:()=>{},onChange:e=>{d(e.target.value)},dir:u,children:n})})},78297:(e,t,n)=>{"use strict";n.d(t,{F:()=>h});var i=n(84875),a=n.n(i),s=n(71316),r=n(56162),o=n(3802);const l="main-editImage-buttonContainer",d="main-editImageButton-image",c="main-editImageButton-overlay",u="main-editImageButton-rounded",m="main-editImageButton-icon",p="main-editImageButton-copy";var g=n(4637);const h=function({overlay:e=!1,rounded:t=!1,onClick:n}){return(0,g.jsx)("div",{className:l,children:(0,g.jsx)("button",{"":"edit-image-button",className:a()(d,{[c]:e,[u]:t}),"aria-haspopup":"true",onClick:n,type:"button",children:(0,g.jsxs)("div",{className:a()(m,"icon"),children:[(0,g.jsx)(s.y,{iconSize:48,"aria-hidden":"true"}),(0,g.jsx)(r.D,{variant:"ballad",className:p,children:o.ag.get("choose_photo")})]})})})}},3401:(e,t,n)=>{"use strict";n.d(t,{zs:()=>ve,YQ:()=>he});var i=n(59496),a=n(84875),s=n.n(a),r=n(30999),o=n(56162),l=n(83680),d=n(30366),c=n(74720),u=n(67353),m=n(11216),p=n(28471),g=n(79475),h=n(50346),k=n(3802);const v=352,f="100%",y={frameBorder:0,allowFullScreen:!0,allow:["autoplay","clipboard-write","encrypted-media","fullscreen","picture-in-picture"].join("; "),loading:"lazy"},S=[1,60,3600],b=[3600,60,1],_={seconds:NaN,humanString:"-:--"};function N(e){if(!isFinite(e))return _.humanString;let t=Math.round(e);return b.reduce(((e,n,i)=>{const a=0===e.length?1:2;if(t>=n||e.length>0||i===S.length-2){const i=Math.floor(t/n);t-=i*n,e.push(i.toString().padStart(a,"0"))}return e}),[]).join(":")}function E(e){let t=NaN;if("number"==typeof e)t=Math.round(e);else if("string"==typeof e){const n=e.split(":");n.length<=S.length&&(t=n.reverse().reduce(((e,t,n)=>e+=function(e){const t=parseInt(e,10);return t>=0?t:NaN}(t)*S[n]),0))}return isNaN(t)?_:{seconds:t,humanString:N(t)}}var x=n(98340),C=n(7182),w=n(29662),I=n(26406),T=n(9374),A=n(30009);var P=n(45862),O=n(95663),D=n(70786),R=n(83185);const L="main-embedWidgetGenerator-container",F="main-embedWidgetGenerator-contentCode",j="main-embedWidgetGenerator-visible",M="main-embedWidgetGenerator-code",U="main-embedWidgetGenerator-timestampInput",B="main-embedWidgetGenerator-content",V="main-embedWidgetGenerator-contentHeader",H="main-embedWidgetGenerator-contentFooter",G="main-embedWidgetGenerator-contentIframe",W="main-embedWidgetGenerator-copyWrapper",z="main-embedWidgetGenerator-copyBtn",K="main-embedWidgetGenerator-darkControl",Y="main-embedWidgetGenerator-widthField",q="main-embedWidgetGenerator-tooltipInitiator",Z="main-embedWidgetGenerator-tooltip",Q="main-embedWidgetGenerator-transControl",J="main-embedWidgetGenerator-header",$="main-embedWidgetGenerator-closeBtn",X="main-embedWidgetGenerator-theme",ee="main-embedWidgetGenerator-themeDescription",te="main-embedWidgetGenerator-themeRadio",ne="main-embedWidgetGenerator-active",ie="main-embedWidgetGenerator-terms",ae="main-embedWidgetGenerator-dimensionsContainer",se="main-embedWidgetGenerator-dimensionLabel",re="main-embedWidgetGenerator-dimensionField",oe="main-embedWidgetGenerator-crossSep",le="main-embedWidgetGenerator-startAt",de="main-embedWidgetGenerator-loadingIndicator";var ce=n(4637);let ue=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:v,width:f},theme:[["1",null],["0","#282828"]],height:[[v,"normal"],[152,"compact"]],constraints:{width:{min:250,max:600,minPercentage:40,maxPercentage:100}}},pe={[ue.PODCAST_AUDIO]:{disallow:{timestamp:!1,theme:!1,width:!1},defaults:{theme:"1",height:v,width:f},theme:[["1",null],["0","#282828"]],height:[[v,"normal"],[152,"compact"]],constraints:{width:{min:250,max:600,minPercentage:40,maxPercentage:100}}},[ue.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}}},[ue.TRACK]:me,[ue.PLAYLIST]:me,[ue.ARTIST]:me,[ue.ALBUM]:me},ge={disallow:{timestamp:!0,theme:!0,width:!0},defaults:{theme:"1",height:v,width:f},theme:[],height:[],constraints:{width:{min:250,max:600,minPercentage:40,maxPercentage:100}}};const he=e=>{const t=(0,h.EC)(e);switch(t?.type){case"show":return k.ag.get("ewg.title.show");case"episode":return k.ag.get("ewg.title.episode");case"track":return k.ag.get("ewg.title.track");case"album":return k.ag.get("ewg.title.album");case"artist":return k.ag.get("ewg.title.artist");case"playlist-v2":case"playlist":return k.ag.get("ewg.title.playlist");default:return k.ag.get("ewg.title")}},ke=({uri:e,currentTrackUri:t,currentPosition:n,isOpen:a})=>{const f=(0,i.useMemo)((()=>(0,h.EC)(e)),[e]),S=t===e,b=he(e),[_,N]=(0,i.useState)(null),[x,me]=(0,i.useState)(null),[ke,ve]=(0,i.useState)(null),[fe,ye]=(0,i.useState)(null),[Se,be]=(0,i.useState)(!1),[_e,Ne]=(0,i.useState)(!1),[Ee,xe]=(0,i.useState)(S?n??0:0),[Ce,we]=(0,i.useState)(!0),[Ie,Te]=(0,i.useState)(!1),[Ae,Pe]=(0,i.useState)(k.ag.get("ewg.copy")),Oe=null!==_?pe[_]:ge,De=(0,w.zZ)(),Re=(0,C.J)(e,"#FFF"),Le=(0,O.o)(),Fe=(0,i.useRef)(null),je=(0,i.useRef)(null),Me=(0,i.useContext)(P.qi),Ue=(0,i.useCallback)((()=>{Me({type:"close"})}),[Me]),Be=()=>{if(!je?.current)return;const e=je.current.value;if(_){const[t,n]=function(e,t){const{width:n}=pe[e].constraints,i=parseInt(t.replace(/px|%$/,""),10);if(Number.isFinite(i)){if(-1!==t.indexOf("%")){const e=Math.max(n.minPercentage,Math.min(n.maxPercentage,Math.round(i)));return[`${e}%`,`${e}%`]}const e=Math.max(n.min,Math.min(n.max,Math.round(i)));return[`${e}px`,e.toString()]}return["100%","100%"]}(_,e);je.current.value=t,ye(n)}},Ve=()=>{if(Fe?.current){const e=E(Fe.current.value);Fe.current.value=e.humanString,e.seconds!==Ee&&(we(!0),xe(e.seconds))}};(0,i.useEffect)((()=>{if(_===ue.PODCAST_VIDEO&&ke){const e=parseInt(ke,10);ye(351===e?624..toString():496..toString())}}),[ke,_]),(0,i.useEffect)((()=>{(async()=>{const t=f?.type;if(t===h.JM.EPISODE){const t=await De.getEpisodeOrChapter(e);return t.type===T.p.EPISODE&&t.mediaTypes?.includes(I.$_.Video)?N(ue.PODCAST_VIDEO):N(ue.PODCAST_AUDIO)}if(t===h.JM.SHOW){const t=await De.getContents(e,{offset:0,limit:1});if(t.items.length>0&&null!==t.items[0]){const e=await De.getEpisodeOrChapter(t.items[0].uri);return e.type===T.p.EPISODE&&e.mediaTypes?.includes(I.$_.Video)?N(ue.PODCAST_VIDEO):N(ue.PODCAST_AUDIO)}}t===h.JM.TRACK?N(ue.TRACK):t===h.JM.ARTIST?N(ue.ARTIST):t===h.JM.ALBUM?N(ue.ALBUM):N(ue.PLAYLIST)})()}),[De,e,f]),(0,i.useEffect)((()=>{ve(Oe.defaults.height.toString()),me(Oe.defaults.theme),ye(Oe.defaults.width.toString())}),[Oe]);const He=_===ue.PODCAST_VIDEO,Ge=null!==_?function(e,t,n,i,a){const s=(0,h.EC)(e);if(!s)return null;const r=s.toURLPath(),o=new URL(`https://open.spotify.com/embed/${r}${a?"/video":""}`);return o.searchParams.set("utm_source","generator"),t&&"1"!==t&&o.searchParams.set("theme",t),n&&void 0!==i&&o.searchParams.set("t",i.toString()),o}(e,x,_e,Ee,He):null,We=Ge&&Oe!==ge&&ke&&fe?(0,ce.jsx)("iframe",{onLoad:()=>{we(!1)},style:{borderRadius:"12px"},src:Ge?.toString(),width:fe,height:ke,...y},Ge?.toString()):null,ze=We?(r.renderToStaticMarkup(We)||"").replace(/src=".*?"/,`src="${Ge?.toString()}"`):"";return(0,ce.jsxs)(R.Z,{isOpen:a,contentLabel:b,children:[(0,ce.jsxs)("div",{className:s()(L),children:[(0,ce.jsxs)("div",{className:J,children:[(0,ce.jsx)(o.D,{as:"h1",variant:"canon",children:b}),(0,ce.jsx)("button",{className:$,onClick:()=>{Ue(),Le({type:"click",intent:"close"})},children:(0,ce.jsx)(l.k,{iconSize:16,"aria-label":k.ag.get("close")})})]}),(0,ce.jsxs)("div",{className:B,children:[(0,ce.jsxs)("div",{className:V,children:[(0,ce.jsxs)("div",{className:X,style:{visibility:Oe.disallow.theme?"hidden":"visible"},children:[(0,ce.jsxs)("p",{className:ee,children:[k.ag.get("ewg.color"),":"]}),Oe.theme.map((([e,t])=>{return(0,ce.jsx)("button",{style:{backgroundColor:null===t?Re:t},className:s()(te,{[ne]:x===e}),onClick:(n=e,()=>{x!==n&&(we(!0),me(n))})},e);var n}))]}),(0,ce.jsxs)("div",{className:ae,children:[(0,ce.jsxs)("div",{className:se,children:[k.ag.get("ewg.size"),":"]}),(0,ce.jsxs)("div",{className:re,children:[ke&&(0,ce.jsx)(D.v,{id:"ewg-height",value:ke,onSelect:ve,children:Oe.height.map((([e,t])=>(0,ce.jsxs)("option",{value:e,children:["normal"===t?k.ag.get("ewg.size.normal"):k.ag.get("ewg.size.compact")," ","(",e,"px)"]},e)))}),Oe.disallow.width?null:(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)("span",{className:oe,children:"×"}),(0,ce.jsxs)("div",{className:Y,children:[(0,ce.jsx)("input",{className:K,type:"text",ref:je,defaultValue:Oe.defaults.width,onKeyUp:e=>{"Enter"===e.key&&Be()},onBlur:Be}),(0,ce.jsx)(d.o,{"aria-label":k.ag.get("ewg.help"),"aria-describedby":"ewg-help-text",buttonSize:"sm",iconOnly:c.S,className:q,onMouseOver:()=>be(!0),onMouseLeave:()=>be(!1)}),(0,ce.jsx)("div",{onFocus:()=>be(!0),onMouseOver:()=>be(!0),onMouseLeave:()=>be(!1),className:s()(Z,{[j]:Se}),children:(0,ce.jsx)(u.u,{id:"ewg-help-text",children:k.ag.get("ewg.help-text")})})]})]})]})]})]}),(0,ce.jsxs)("div",{className:G,style:{height:v,maxHeight:"calc(100vh - 402px)"},children:[Ce&&(0,ce.jsx)("div",{className:de,children:(0,ce.jsx)(m.T,{})}),We]}),(0,ce.jsx)("small",{className:ie,dangerouslySetInnerHTML:{__html:k.ag.get("ewg.terms",{devTerms:"https://developer.spotify.com/terms/",platfRules:"https://www.spotify.com/platform-rules/"})}}),(0,ce.jsxs)("div",{className:H,children:[(0,ce.jsxs)("div",{className:le,style:{visibility:Oe.disallow.timestamp?"hidden":"visible"},children:[(0,ce.jsx)(p.z,{className:K,checked:_e,type:"checkbox",id:"ewg-timestamp",onChange:e=>{const t=e.currentTarget.checked;_e!==t&&(we(!0),Ne(t),Le({type:"click",intent:"toggle",itemIdSuffix:`timestamp/${t}`}))},"":"timestamp-checkbox"}),(0,ce.jsx)("label",{htmlFor:"ewg-timestamp",children:k.ag.get("ewg.start-at")}),(0,ce.jsx)("input",{className:s()(Q,U),disabled:!_e,type:"text",defaultValue:E(Math.floor(Ee/1e3).toString()).humanString,ref:Fe,onBlur:Ve,onKeyUp:e=>{"Enter"===e.key&&Ve()}})]}),(0,ce.jsxs)("div",{className:W,children:[(0,ce.jsx)(p.z,{className:K,checked:Ie,type:"checkbox",id:"ewg-showcode",onChange:e=>{const t=e.currentTarget.checked;Te(t),Le({type:"click",intent:"show-more",itemIdSuffix:`showcode/${t}`})}}),(0,ce.jsx)("label",{htmlFor:"ewg-showcode",children:k.ag.get("ewg.showcode")}),(0,ce.jsx)(g.D,{className:z,buttonSize:"sm",onClick:()=>{(0,A.v)(ze),Le({type:"click",intent:"copy"}),Pe(k.ag.get("ewg.copied")),setTimeout((()=>Pe(k.ag.get("ewg.copy"))),5e3)},children:Ae})]})]})]})]}),(0,ce.jsx)("section",{className:s()(F,{[j]:Ie}),children:(0,ce.jsx)("pre",{className:M,"":"iframe-code",children:ze})})]})},ve=()=>{const e=(0,i.useContext)(P.nz);return e.uri?(0,ce.jsx)(x.ZP,{value:"embed-widget-generator",children:(0,ce.jsx)(ke,{...e})}):null}},45862:(e,t,n)=>{"use strict";n.d(t,{nz:()=>o,qi:()=>r,ye:()=>d});var i=n(59496),a=n(4637);const s={isOpen:!1,uri:""},r=(0,i.createContext)(void 0),o=(0,i.createContext)(s);function l(e,t){switch(t.type){case"open":return{...e,uri:t.uri,currentTrackUri:t.currentTrackUri,currentPosition:t.currentPosition,isOpen:!0};case"close":return{...s,isOpen:!1};default:throw new Error("Unknown action received!")}}const d=({children:e})=>{const[t,n]=(0,i.useReducer)(l,s);return(0,a.jsx)(r.Provider,{value:n,children:(0,a.jsx)(o.Provider,{value:t,children:e})})}},45911:(e,t,n)=>{"use strict";n.d(t,{u:()=>k});var i=n(59496),a=n(84875),s=n.n(a),r=n(56162),o=n(79475),l=n(477),d=n(88333);const c="FvfvGU3jvHRskUU9v9_8",u="Q9AlbZn2EGzy3MTWXa8X",m="mxmxS0y8LiwSs5nueKPT",p="GXxVAveNFStY3pBI_NO4",g="eHcXC2s97InYP7rMNT0H";var h=n(4637);const k=(0,i.memo)((function(e){const{children:t,message:n,title:i,linkTitle:a,linkTo:k,onClick:v,renderInline:f=!1}=e,{isXSOnly:y,isSMOnly:S}=(0,l.e)(),b=y||S;return(0,h.jsxs)("section",{className:s()(c,{[u]:f}),children:[t,(0,h.jsx)(r.D,{as:"h1",variant:b?"cello":"alto",className:p,children:i}),(0,h.jsx)(r.D,{variant:b?"mesto":"ballad",className:g,children:n}),a&&(k||v)&&(0,h.jsx)(o.D,{colorSet:"invertedLight",className:m,href:k,onClick:v,component:d.Z,children:a})]})}))},49663:(e,t,n)=>{"use strict";n.d(t,{J:()=>r,r:()=>l});var i=n(3802),a=n(53523),s=n(4637);const r="entityHeaderAdd",o={placement:a.n.bottomLeft,zIndex:1,getTitle:({triggerAction:e})=>((e||{}).type,i.ag.get("action-trigger.save-library")),getDescription:({triggerAction:e})=>((e||{}).type,i.ag.get("action-trigger.logged-out-continue"))},l=({children:e})=>(0,s.jsx)(a.P,{id:r,options:o,"":"login-trigger",children:e})},16743:(e,t,n)=>{"use strict";n.d(t,{W:()=>u});var i=n(59496),a=n(84875),s=n.n(a),r=n(91929),o=n(21524),l=n(91577),d=n(87305),c=n(4637);const u=(0,i.forwardRef)((({children:e},t)=>{const{scrollNodeRef:n}=(0,i.useContext)(o.VX),{ref:a,inView:u}=(0,r.YD)({initialInView:!0,rootMargin:"0px 100%",root:n.current}),m=s()(d.Z.topbarContent,{[d.Z.topbarContentFadeIn]:!u}),p=(0,i.useCallback)((e=>{a(e),t&&("function"==typeof t?t(e):t.current=e)}),[a,t]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{ref:p}),(0,c.jsx)(l.w,{className:m,children:e})]})}))},73997:(e,t,n)=>{"use strict";n.d(t,{i:()=>o});var i=n(56162),a=n(6142),s=n(87305),r=n(4637);const o=({text:e,dragUri:t,dragLabel:n})=>{const o=(0,a.O)(t?[t]:[],n);return(0,r.jsx)(i.D,{as:"span",variant:"canon",className:s.Z.topbarTitle,draggable:!(!t||!n),onDragStart:o,children:e})}},41226:(e,t,n)=>{"use strict";n.d(t,{T0:()=>te,gF:()=>h,Oz:()=>E,rn:()=>de.r,fR:()=>g,sP:()=>k,YD:()=>Be,Oe:()=>N,QS:()=>ee,xd:()=>le,eM:()=>f.e,Kc:()=>_,ms:()=>H,oX:()=>Oe});var i=n(59496),a=n(84875),s=n.n(a),r=n(87995),o=n(21718),l=n(27509);const d={small:"(max-width: 1023px)",medium:"(max-width: 1279px)",large:"(max-width: 1599px)",xlarge:"(min-width: 1600px)"},c=()=>Object.keys(d).find((e=>window.matchMedia(d[e]).matches));var u=n(3608),m=n(87305),p=n(4637);let g=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.SMALL=1]="SMALL",e}({});const h=({children:e,backgroundColor:t,backgroundImages:n,size:a=g.DEFAULT})=>{const d=(0,i.useRef)(null),h=(0,i.useRef)(null),{imageUrl:k}=function(e,t){const[n,a]=(0,i.useState)({imageUrl:""}),[s,r]=(0,i.useState)(c());return(0,o.a)((()=>{r(c())})),(0,i.useEffect)((()=>{const n=t?.current?t.current.clientWidth:null;if(e&&e.length){const t=(0,l.o)(e,{desiredSize:n??void 0});a({imageUrl:t??""})}else a({imageUrl:""})}),[t,e,s]),n}(n,d),v=(0,i.useCallback)((e=>{const t=e.target,n=t.scrollTop/t.offsetHeight;n>parseInt(m.Z.BACKGROUND_HEIGHT_PERCENTAGE,10)/100||requestAnimationFrame((()=>{h.current?.style.setProperty("--scroll",n.toString())}))}),[]);return(0,u.c)(v,{disabled:!k||navigator.hardwareConcurrency<=4}),(0,p.jsxs)("div",{ref:d,className:s()("contentSpacing",m.Z.container,m.Z.nonWrapped,{[m.Z.withBackgroundImage]:k,[m.Z.smallHeader]:a===g.SMALL}),children:[!k&&(0,p.jsx)("div",{className:m.Z.backgroundColor,style:{backgroundColor:t}}),!k&&(0,p.jsx)("div",{className:s()(m.Z.backgroundColor,m.Z.overlay)}),k&&r.createPortal((0,p.jsxs)("div",{ref:h,children:[(0,p.jsx)("div",{"":"background-image",className:s()(m.Z.background,m.Z.gradient),style:{backgroundImage:`url(${k})`}}),(0,p.jsx)("div",{className:s()(m.Z.background,m.Z.overlay),style:{"--bgColor":t}})]}),document.querySelector(".under-main-view")),e]})},k=(0,i.memo)((function(e){return(0,p.jsx)("div",{className:m.Z.headerText,children:e.children})}));var v=n(6142),f=n(68415),y=n(42006),S=n(4183);const b=({type:e,className:t})=>(0,p.jsx)("div",{className:s()(m.Z.image,m.Z.imagePlaceholder,t),children:(0,p.jsx)(S.t,{type:e})});let _=function(e){return e[e.ROUNDED_CORNERS=0]="ROUNDED_CORNERS",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e[e.WITH_WAVES=3]="WITH_WAVES",e}({});const N=i.memo(i.forwardRef((function({name:e,images:t,placeholderType:n,renderImage:i,className:a,shape:r=_.SQUARE,loading:o="lazy",dragUri:l,onContextMenu:d},c){const[u,g,h]=(0,f.R)(t),k=(0,v.O)(l?[l]:[],e);return(0,p.jsx)("div",{ref:c,onContextMenu:d,className:s()(m.Z.image,a,{[m.Z.wavesBackground]:r===_.WITH_WAVES}),draggable:!(!l||!e),onDragStart:k,children:i?(0,p.jsx)("div",{className:s()(m.Z.image,m.Z.shadow,{[m.Z.roundedCorners]:r===_.ROUNDED_CORNERS,[m.Z.circle]:r===_.CIRCLE}),children:i()}):(0,p.jsx)(y.E,{loading:o,src:u,alt:e,className:s()(m.Z.image,m.Z.shadow,{[m.Z.roundedCorners]:r===_.ROUNDED_CORNERS,[m.Z.circle]:r===_.CIRCLE}),srcSet:g||void 0,sizes:h,children:(0,p.jsx)(b,{type:n,className:s()(m.Z.image,m.Z.shadow,{[m.Z.roundedCorners]:r===_.ROUNDED_CORNERS,[m.Z.circle]:r===_.CIRCLE})})})})}))),E=(0,i.memo)((function({dragUri:e,onContextMenu:t,onTouchStart:n,onTouchEnd:i,...a}){const s=(0,v.O)([e||""],a.name);return(0,p.jsx)("div",{className:m.Z.imageContainer,draggable:!!e,onDragStart:s,onContextMenu:t,onTouchStart:n,onTouchEnd:i,children:(0,p.jsx)(N,{...a})})}));var x=n(61740),C=n(56162),w=n(50346),I=n(3802),T=n(45265),A=n(44526),P=n(4721),O=n(75252),D=n(80912),R=n(36844),L=n(62344),F=n(61709),j=n(41836),M=n(54299),U=n(14280),B=n(68776),V=n(63120);const H=3;function G(e){return e.displayName||e.name||""}const W=e=>{let t=null;return(0,w.OB)(e)&&(t=(0,p.jsx)(U.m,{uri:e})),(0,w.Kv)(e)&&(t=(0,p.jsx)(B.I,{uri:e})),t},z=({creator:e,onClick:t,position:n=0})=>{const a=(0,i.useCallback)((i=>{t?.(i,{position:n,creator:e})}),[e,t,n]);return(0,F.i)(e)?(0,p.jsx)(M._,{menu:W(e.uri),children:(0,p.jsx)(C.D,{variant:"mestoBold",children:(0,p.jsx)(V.Link,{"":"creator-link",to:e.uri,onClick:a,children:G(e)})})}):(0,p.jsx)(C.D,{variant:"mesto",children:G(e)})},K=({creator:e,onClick:t})=>{const[n,i]=I.ag.get("playlist.header.made-for","USER").split("USER");return(0,p.jsxs)("div",{className:s()(m.Z.metaDataText,m.Z.creatorWrapper),children:[(0,p.jsx)(D.V,{semanticColor:"textBrightAccent"}),(0,p.jsx)(C.D,{variant:"mesto",children:n}),(0,p.jsx)(z,{creator:e,onClick:t}),(0,p.jsx)(C.D,{variant:"mesto",children:i})]})},Y=({creator:e,onClick:t})=>(0,p.jsxs)("div",{className:s()(m.Z.metaDataText,m.Z.creatorWrapper),children:[e.images.length>0&&(0,p.jsx)(L.q,{label:G(e),images:e.images.map((e=>({url:e.url,width:e.width||null,height:e.height||null}))),width:24,userIconSize:16}),(0,p.jsx)(z,{creator:e,onClick:t})]}),q=({creators:e,onPiledCreatorsClick:t})=>{const n=e.slice(0,H).map(((e,t)=>(0,p.jsx)(L.q,{label:G(e),images:e.images.map((e=>({url:e.url,width:e.width||null,height:e.height||null}))),width:24,userIconSize:16,piled:t>0},e.uri)));let i=I.ag.get("playlist.header.creator-and-others",G(e[0]),e.length-1);return 2===e.length&&(i=I.ag.get("playlist.header.creator-and-co-creator",G(e[0]),G(e[1]))),t?(0,p.jsxs)("button",{className:s()(m.Z.metaDataText,m.Z.creatorWrapper,m.Z.creatorButton),onClick:t,children:[n,i]}):(0,p.jsxs)("div",{className:s()(m.Z.metaDataText,m.Z.creatorWrapper),children:[n,i]})},Z=({creators:e,onCreatorClick:t})=>(0,p.jsx)(p.Fragment,{children:e.map(((e,n)=>(0,p.jsxs)(i.Fragment,{children:[0!==n&&(0,p.jsx)("span",{className:m.Z.divider}),(0,p.jsx)(z,{creator:e,onClick:t,position:n})]},e.id)))}),Q=({creators:e,onPiledCreatorsClick:t,onCreatorClick:n})=>{const i=(0,R.W6)(j.bM);if(1===e.length){const[t]=e;return t.isMadeFor?(0,p.jsx)(K,{creator:t,onClick:n}):(0,p.jsx)(Y,{creator:t,onClick:n})}return e.every((e=>(0,w.Kv)(e.uri)))&&i?(0,p.jsx)(q,{creators:e,onPiledCreatorsClick:t}):(0,p.jsx)(Z,{creators:e,onCreatorClick:n})};var J=n(82108);function $(e,t,n){return 0===e?null:(0,p.jsxs)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:[I.ag.get("tracklist-header.songs-counter",e),t>0?I.ag.getSeparator():null,n?(0,p.jsx)(A.jC,{durationMs:t}):(0,p.jsx)(A.nL,{durationMs:t})]})}const X=function({to:e,children:t,onClick:n=(()=>{})}){const a=(0,i.useCallback)((t=>{n(t,e)}),[n,e]);return(0,p.jsx)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:e?(0,p.jsx)(V.Link,{to:e,onClick:a,children:t}):t})},ee=e=>{const{author:t,creators:n,onPiledCreatorsClick:a,onCreatorClick:r,releaseDate:o,totalTracks:d=0,totalEpisodes:c=0,totalFollowers:u=0,onTotalFollowersClick:g,totalFollowing:h=0,onTotalFollowingClick:k,totalLikes:v=0,publicPlaylists:f=0,privatePlaylists:y=0,newEntries:S=0,durationMilliseconds:b=0,isEstimatedDuration:_=!1,userUri:N,albumType:E,isTrack:A,album:D}=e,R=(0,x.v9)(J.Gg),L=R.overrides?.locale||I.ag.getLocale();return(0,p.jsxs)("div",{className:m.Z.metaData,children:[t&&(0,p.jsx)(C.D,{className:m.Z.metaDataAuthor,variant:"canon","":"entityAuthor",children:t}),n&&(0,p.jsx)(i.Suspense,{fallback:null,children:(0,p.jsx)(Q,{creators:n,onPiledCreatorsClick:a,onCreatorClick:r})}),E&&(0,p.jsx)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:E}),f>0&&(0,p.jsx)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:I.ag.get("user.public-playlists",f)}),y>0&&(0,p.jsx)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:I.ag.get("user.private-playlists",y)}),D&&(0,p.jsx)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:(0,p.jsx)(V.Link,{to:D.uri,children:D.name})}),o&&(0,p.jsx)(T.w,{label:(0,O.BI)((0,O.RX)(o),L),children:(0,p.jsx)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:(0,O.RX)(o).getUTCFullYear()})}),v>0&&(0,p.jsx)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:I.ag.get("likes",v)}),u>0&&(0,p.jsx)(X,{to:N?(0,w.QK)((0,P.C)(N),["followers"]).toURI():null,onClick:g,children:I.ag.get("user.followers",u)}),h>0&&(0,p.jsx)(X,{to:N?(0,w.QK)((0,P.C)(N),["following"]).toURI():null,onClick:k,children:I.ag.get("user.following",h)}),c>0&&(0,p.jsx)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:I.ag.get("tracklist-header.episodes-counter",c)}),$(d,b,_),A&&(0,p.jsx)(C.D,{variant:"mesto",className:m.Z.metaDataText,children:(0,l.m)(b)}),S>0&&(0,p.jsx)(C.D,{variant:"mesto",className:s()(m.Z.metaDataText,m.Z.newEntriesIndicator),children:I.ag.get("chart.new-entries",S)})]})},te=(0,i.memo)((function(e){return(0,p.jsx)("span",{className:m.Z.detailsText,children:e.children})}));var ne=n(97614),ie=n(85830),ae=n(22345);const se=e=>{const t=16*parseFloat(e.replace("rem",""));return t+.08*t+.12*t},re=({children:e,scale:t,variant:n="bass",...a})=>{const s=(0,i.useRef)(null),[r,o]=(0,i.useState)(!1),l=(0,ie.y1)((()=>{s.current&&(()=>{if(s.current){o(!1);for(let e=0;e(0,R.W6)(ke.iU)&&"0JQ5DAwD41iRZZRVB8exON"===e;let De=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.SMALL=1]="SMALL",e}({});var Re=function(e){return e.ANDROID="https://play.google.com/store/apps/details?id=com.spotify.music",e.IOS="https://apps.apple.com/app/spotify-music/id324684580",e}(Re||{});const Le=[I.go.de,I.go.fi,I.go.frCA,I.go.hu,I.go.it,I.go.ms,I.go.pl],Fe=i.memo((function(e){return(0,p.jsx)("span",{children:(0,p.jsx)("h3",{className:we,children:e.children})})})),je=e=>e.split("
").map(((e,t)=>(0,p.jsxs)(i.Fragment,{children:[e," ",(0,p.jsx)("br",{})]},t))),Me=({locale:e,isAnonymous:t,isEligible:n})=>{let i;!t&&n?i=je(I.ag.get("wrapped.logged_in_and_eligible.description.2022")):t||n?i=je(I.ag.get("wrapped.logged_out_or_eligible.description.2022")):t||n||(i=je(I.ag.get("wrapped.ineligible.description.2022")));const a=(0,ye.s4)();function r(e,n){const i={category:"wrapped_hub_2021",action:"click",label:`app_store_${n}`,destination_url:e,os:(0,pe.y)()},s=t?(0,ue.w)(i):(0,ce.t)(i);a.send(s)}return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Fe,{children:i}),(0,p.jsxs)("div",{className:s()(Pe),"":"app-store-icons",children:[(0,p.jsx)(V.default,{to:Re.IOS,target:"_blank",onClick:()=>r(Re.IOS,"apple"),children:(0,p.jsx)("img",{src:(0,me.g)((0,Se.b)(e)),alt:"Apple app store icon",className:xe})}),(0,p.jsx)(V.default,{to:Re.ANDROID,target:"_blank",onClick:()=>r(Re.ANDROID,"android"),children:(0,p.jsx)("img",{src:(0,me.g)((0,Se.V)(e)),alt:"Google play store icon",className:s()(xe,Ce)})})]})]})},Ue=({isAnonymous:e,locale:t})=>{const[n,a]=(0,i.useState)();return(0,i.useEffect)((()=>{e?a(!1):he.uC.getEligibility(ge.b.getInstance()).then((e=>{a(e.body.isEligible)})).catch((()=>a(!1)))}),[e,a]),void 0===n?null:(0,p.jsx)(Me,{isEligible:n,isAnonymous:e,locale:t})},Be=({title:e=I.ag.get("wrapped.title.2022"),size:t=De.DEFAULT,isAnonymous:n=!0})=>{const a=(0,i.useRef)(null),r=I.ag.getLocale(),o=Le.includes(r)?Ae:"";return(0,p.jsxs)("div",{ref:a,className:s()(m.Z.container,{[m.Z.smallHeader]:t===De.SMALL},be),children:[(0,p.jsx)("div",{"":"background-color",className:s()(m.Z.background,m.Z.gradient)}),(0,p.jsx)("div",{className:s()(m.Z.background,_e)}),(0,p.jsx)("div",{className:m.Z.background}),(0,p.jsx)(ve.W,{children:(0,p.jsx)(fe.i,{text:e})}),(0,p.jsxs)("div",{className:s()(Ne),children:[(0,p.jsxs)("div",{className:s()(m.Z.headerText,Ee),children:[(0,p.jsx)("h1",{className:s()(Te,o),children:je(e)}),(0,p.jsx)(Ue,{locale:r,isAnonymous:n})]}),(0,p.jsx)("div",{className:s()(Ie)})]})]})}},40576:(e,t,n)=>{"use strict";n.d(t,{L:()=>d});var i=n(46146),a=n(59496),s=n(47122),r=n(4637);const o=({error:e,resetErrorBoundary:t})=>{const n=(0,s.D)();return(0,a.useEffect)((()=>{const e=n.listen((()=>{t()}));return()=>{e()}}),[n,t]),null},l=({fallback:e,children:t})=>(0,r.jsx)(a.Suspense,{fallback:e,children:t}),d=({FallbackComponent:e=o,SuspenseFallback:t=null,children:n,onError:a})=>(0,r.jsx)(l,{fallback:t,children:(0,r.jsx)(i.SV,{FallbackComponent:e,onError:a,children:n})})},81589:(e,t,n)=>{"use strict";n.d(t,{w:()=>p});var i=n(59496),a=n(84875),s=n.n(a),r=n(56162),o=n(79475),l=n(83185);const d="KIbfbFDao0SHpZsKoKZD",c="yZh70k8am9QCTKmucbwo";var u=n(4637);const m=()=>window.location.reload(),p=(0,i.memo)((function({headingMessage:e,message:t,onDismissDialog:n=m,isOpen:i=!1,buttonLabel:a,animated:p}){return(0,u.jsx)(l.Z,{isOpen:i,shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:e,animated:p,children:(0,u.jsxs)("div",{className:s()(d,"encore-light-theme"),children:[(0,u.jsx)(r.D,{variant:"canon",as:"h1",children:e}),(0,u.jsx)(r.D,{as:"p",variant:"ballad",children:t}),(0,u.jsx)("div",{className:c,children:(0,u.jsx)(o.D,{onClick:n,autoFocus:!0,children:a})})]})})}))},24256:(e,t,n)=>{"use strict";n.d(t,{K:()=>x});var i=n(59496),a=n(84875),s=n.n(a),r=n(85830),o=n(48710),l=n(83680),d=n(3802),c=n(46997),u=n(3289),m=n(66806);const p="x-filterBox-filterInputContainer",g="x-filterBox-expandedOrHasFilter",h="x-filterBox-expandButton",k="x-filterBox-filterInput",v="x-filterBox-fullWidth",f="x-filterBox-overlay",y="x-filterBox-expandRight",S="x-filterBox-searchIconContainer",b="x-filterBox-searchIcon",_="x-filterBox-clearButton";var N=n(4637);const E=e=>(0,c.eY)(c.O4.FILTER,e),x=i.memo((function({alwaysExpanded:e=!1,placeholder:t,filterBoxApiRef:n,outerRef:a,onFilter:x,onClear:C,onActivate:w,clearOnEscapeInElementRef:I,debounceFilterChangeTimeout:T=200,expandDirection:A="left",fullWidth:P=!1,useExpandCallback:O=E}){const{filter:D,setFilter:R}=(0,i.useContext)(m.fo),[L,F]=(0,i.useState)(e||!!D),[j,M]=(0,i.useState)(D),U=(0,i.useRef)(null),B=(0,i.useRef)(null),V=a??U;(0,c.J4)(c.sN.FILTER);const H=(0,r.y1)(((e,t=!1)=>{x&&!t&&x(e),R(e)}),T,{leading:!1,trailing:!0,maxWait:1e3}),G=(0,i.useCallback)((()=>{C?.(),M(""),H("",!0)}),[C,H]);(0,i.useImperativeHandle)(n,(()=>({clearFilter:G})));const W=(0,i.useCallback)((()=>{!1!==w?.()&&(F(!0),V.current?.focus())}),[F,V,w]);O(W);const z=(0,i.useCallback)((e=>{const t=e.currentTarget.value;M(t),H(t)}),[H,M]),K=(0,i.useCallback)((()=>{j||e||F(!1)}),[j,e,F]),Y=(0,i.useCallback)((t=>{"Escape"===t.key&&(j?(t.stopPropagation(),G()):e||(F(!1),B.current?.focus()))}),[e,G,j]);return(0,i.useEffect)((()=>{const e=e=>{"Escape"===e.key&&I?.current?.contains(e.target)&&G()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[G,I]),(0,N.jsx)(u._,{label:t,disabled:L||!t,children:(0,N.jsxs)("div",{className:s()(p,{[g]:L}),role:"search",children:[(0,N.jsx)("input",{ref:V,className:s()(k,{[v]:P}),role:"searchbox",maxLength:80,autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,placeholder:t,onChange:z,onKeyDown:Y,onBlur:K,value:j,"aria-hidden":!L,tabIndex:L?void 0:-1}),(0,N.jsxs)("div",{className:f,children:[(0,N.jsx)("span",{className:S,children:(0,N.jsx)(o.j,{iconSize:16,className:b,"aria-hidden":!0})}),j&&(0,N.jsx)("button",{className:_,onClick:e=>{e.stopPropagation(),G(),V.current?.focus()},"aria-label":d.ag.get("search.a11y.clear-input"),children:(0,N.jsx)(l.k,{iconSize:16})})]}),(0,N.jsx)("button",{className:s()(h,{[y]:"right"===A}),onClick:W,"":"expand-button","aria-hidden":L,tabIndex:L?-1:void 0,"aria-label":t,ref:B,children:(0,N.jsx)(o.j,{iconSize:16,className:b})})]})})}))},88959:(e,t,n)=>{"use strict";n.d(t,{e:()=>u});var i=n(59496),a=n(84875),s=n.n(a),r=n(3802);const o="artist-followButton-button",l="artist-followButton-followed",d="artist-followButton-disabled";var c=n(4637);const u=(0,i.memo)((function({isFollowing:e,onClick:t,disabled:n=!1,buttonText:i}){const a=e?r.ag.get("following"):r.ag.get("follow");return(0,c.jsx)("button",{type:"button",className:s()(o,{[l]:e,[d]:n}),onClick:t,children:i||a})}))},92009:(e,t,n)=>{"use strict";n.d(t,{P:()=>u,y:()=>c});var i=n(59496),a=n(84875),s=n.n(a),r=n(3608),o=n(71166);var l=n(78586),d=n(4637);const c=function(e){let t=e,n=[];return{addListener:e=>{n.push(e)},removeListener:e=>{n=n.filter((t=>t!==e))},get:()=>t,set:e=>{t=e(t),n.forEach((e=>{e(t)}))}}}({triggerId:null,triggerAction:null}),u=({id:e,children:t,childRef:n,options:{placement:a,isCTA:u,intentPrimaryButton:m="login",getDescription:p,getTitle:g,hideArrow:h,shouldHideOnOutsideClick:k=(()=>!0),shouldHideOnScroll:v=!1,fadeOut:f=!1,popperOptions:y,zIndex:S,maxWidth:b,tippyClassName:_,primaryButtonText:N,secondaryButtonText:E,checkboxText:x,useSecondaryStyling:C,onLogInteraction:w,tippyWrapperClassName:I,renderInline:T},onPrimaryButtonClick:A=(()=>{}),onSecondaryButtonClick:P,onCheckboxClick:O,className:D,onHide:R,onShow:L})=>{const F=u?"tooltip-with-cta":"tooltip-without-cta",[{triggerId:j,triggerAction:M},U]=function(e){const t=(0,i.useState)()[1];return(0,i.useEffect)((()=>(e.addListener(t),()=>{e.removeListener(t)})),[e,t]),[e.get(),e.set]}(c),B=Boolean(j&&j===e),V=(0,i.useCallback)((e=>{e.stopPropagation();const t=(0,o.TB)((0,o.iZ)(void 0,!0),"spotify_web_player").toString();w?.({itemIdSuffix:F,intent:m,type:"click",targetUri:t}),U((e=>({...e,triggerAction:null,triggerId:null}))),A()}),[A,w,U,F,m]),H=(0,i.useCallback)((e=>t=>{t.stopPropagation&&t.stopPropagation(),w?.({intent:"close-upsell",type:"click",itemIdSuffix:`${F}/${e}`}),U((e=>({...e,triggerAction:null,triggerId:null})))}),[w,U,F]);(0,i.useEffect)((()=>{R&&L&&(B?L():R())}),[R,L,B]);const G=(0,i.useRef)(!1);(0,i.useEffect)((()=>{!G.current&&B&&(w?.({intent:"open-upsell",type:"view",itemIdSuffix:F}),G.current=!0),G.current&&!B&&(G.current=!1)}),[w,F,B]);const W=(0,i.useCallback)((()=>{v&&B&&U((e=>({...e,triggerAction:null,triggerId:null})))}),[U,v,B]);(0,r.c)(W);const z=g({triggerAction:M}),K=p({triggerAction:M}),Y=k({triggerAction:M});return(0,d.jsx)(l.G,{placement:a,className:s()(D,{"encore-dark-theme":!T}),tippyClassName:_,tippyWrapperClassName:I,popperOptions:y,zIndex:S,maxWidth:b,title:z,description:K,hideArrow:h,id:e,visible:B,showButtons:u,hideOnClickOutside:Y,onHide:H("backdrop"),onSecondaryButtonClick:P??H("close-button"),onPrimaryButtonClick:V,primaryButtonText:N,secondaryButtonText:E,onCheckboxClick:O,checkboxText:x,useSecondaryStyling:C,childRef:n,fadeOut:f,renderInline:T,children:t})}},25459:(e,t,n)=>{"use strict";n.d(t,{P:()=>i.P});var i=n(92009)},83185:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var i=n(84875),a=n.n(i),s=n(76316),r=n.n(s),o=n(4637);const l=e=>{const{isOpen:t,contentLabel:n,children:i,className:s,overlayClassName:l,animated:d,animation:c,...u}=e;let m=0;return d?m=300:c?.closeTimeoutMs&&(m=c.closeTimeoutMs),(0,o.jsx)(r(),{className:{base:a()("GenericModal","encore-dark-theme",{"GenericModal--animated":d},[c?.modal?.base,s]),afterOpen:a()("",{"GenericModal--afterOpen":d},[c?.modal?.afterOpen]),beforeClose:a()("",{"GenericModal--beforeClose":d},[c?.modal?.beforeClose])},overlayClassName:{base:a()("GenericModal__overlay",{"GenericModal__overlay--animated":d},[c?.overlay?.base,l]),afterOpen:a()("",{"GenericModal__overlay--afterOpen":d},[c?.overlay?.afterOpen]),beforeClose:a()("",{"GenericModal__overlay--beforeClose":d},[c?.overlay?.beforeClose])},bodyOpenClassName:"GenericModal__Body--open",isOpen:t,...m?{closeTimeoutMS:m}:{},shouldFocusAfterRender:!0,preventScroll:!0,ariaHideApp:!1,contentLabel:n,...u,children:i})}},72556:(e,t,n)=>{"use strict";n.d(t,{e:()=>d});var i=n(74720),a=n(45265);const s="GuwMf98GUBSpCDgf8KRA",r="qBZYab2T7Yc4O5Nh0mjA",o="nW1RKQOkzcJcX6aDCZB4";var l=n(4637);const d=({message:e,placement:t="top",messageClassName:n})=>(0,l.jsx)("div",{className:s,children:(0,l.jsx)(a.w,{showDelay:0,label:e,placement:t,labelClassName:n,children:(0,l.jsx)("div",{className:r,children:(0,l.jsx)(i.S,{iconSize:16,tabIndex:0,"aria-describedby":a.P,className:o})})})})},7813:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var i=n(9237),a=n.n(i);const s={highlightedText:"main-contextMenu-highlightedText"};var r=n(4637);function o({searchWords:e,textToHighlight:t,...n}){return 0===e.length||e.every((e=>!e))?(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsx)(a(),{highlightClassName:s.highlightedText,searchWords:e,textToHighlight:t,autoEscape:!0,...n})}},82279:(e,t,n)=>{"use strict";n.d(t,{IW:()=>g,WQ:()=>h,lh:()=>m});var i=n(59496),a=n(94041),s=n(16201),r=n(80784),o=n(76144),l=n(40332),d=n(18634),c=n(75207),u=n(4637);const m=e=>{const t=(0,c.X)(e.images);return{uri:e.uri,imageUrl:t?.url}},p=(0,i.createContext)({fetchMultipleColors:()=>{},resetColor:()=>{},setColorFromUri:()=>{},clearColor:()=>{}}),g=({children:e})=>{const[,t]=(0,s.cl)(),{request:n}=(0,i.useContext)(d.A),[c,m]=(0,i.useState)({}),[g,h]=(0,i.useState)(a.Sns),k=(0,i.useCallback)((()=>{t((0,r.S2)(g))}),[g,t]),v=(0,i.useCallback)((()=>{t((0,r.A5)())}),[t]),f=(0,i.useCallback)((e=>{const n=c[e];t((0,r.S2)(n||a.Sns))}),[t,c]),y=(0,i.useCallback)((async e=>{const t={};(await(0,l.EC)(n,e.map((e=>e.imageUrl||"")))).forEach((({colorRaw:n},i)=>{const a=n.toCSS(o.j.HEX);t[e[i].uri]=a,0===i&&h(a)})),m(t)}),[n]);return(0,u.jsx)(p.Provider,{value:{setColorFromUri:f,resetColor:k,fetchMultipleColors:y,clearColor:v},children:e})};function h(){const e=(0,i.useContext)(p);if(null===e)throw new Error("Trying to use 'ShortcutsColorContext' without 'ShortcutsColorProvider'!");return e}},22823:(e,t,n)=>{"use strict";n.d(t,{S:()=>u});var i=n(84875),a=n.n(i),s=n(27905),r=n(56162);const o="artist-artistVerifiedBadge-wrapper",l="artist-artistVerifiedBadge-badge",d="artist-artistVerifiedBadge-fillColor";var c=n(4637);const u=({text:e,iconSize:t=24,className:n})=>(0,c.jsxs)("span",{className:a()(o,n),children:[(0,c.jsx)("div",{className:`${l} ${d}`}),(0,c.jsx)(s.T,{semanticColor:"textAnnouncement",className:l,iconSize:t}),e?(0,c.jsx)(r.D,{variant:"mesto",children:e}):null]})},78419:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var i=n(4637);const a=({className:e,name:t})=>(0,i.jsx)("svg",{height:16,role:"img",width:16,viewBox:"0 0 24 24",className:e,name:t,"aria-hidden":"true",children:(0,i.jsx)("circle",{cx:"50%",cy:"50%",r:"6",fill:"currentColor"})})},6174:(e,t,n)=>{"use strict";n.d(t,{H:()=>r});var i=n(3802);const a={circle:"main-loadingIndicator-circle",loadingIcon:"main-loadingIndicator-loadingIcon"};var s=n(4637);function r(){return(0,s.jsxs)("div",{className:a.loadingIcon,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:a.circle,cx:"-140",cy:"50",r:"32"}),(0,s.jsx)("circle",{className:a.circle,cx:"0",cy:"50",r:"32"}),(0,s.jsx)("circle",{className:a.circle,cx:"140",cy:"50",r:"32"})]}),(0,s.jsx)("span",{className:"hidden-visually",children:i.ag.get("page.loading")})]})}},97302:(e,t,n)=>{"use strict";n.d(t,{g:()=>r});var i=n(3802),a=n(49513),s=n(4637);const r=e=>(0,s.jsx)(a.V,{...e,text:i.ag.get("paid")})},98042:(e,t,n)=>{"use strict";n.d(t,{P:()=>s});var i=n(23246),a=n(4637);const s=({iconSize:e,className:t})=>(0,a.jsx)("div",{className:t,children:(0,a.jsx)(i.G,{iconSize:e,"aria-hidden":!0})})},61478:(e,t,n)=>{"use strict";n.d(t,{uL:()=>l,Hy:()=>o,Hs:()=>d});var i=n(59496);const a="main-imagePicker-fileInput";var s=n(4637);const r={accept:"image/.jpg, image/.jpeg, image/.png"};let o=function(e){return e.FILE_TOO_BIG="FILE_TOO_BIG",e.IMAGE_TOO_SMALL="IMAGE_TOO_SMALL",e}({});const l=function({onChange:e,onError:t,isOpen:n=!1,minImageWidth:l=0,minImageHeight:d=0,maxFileSizeMB:c=1/0,...u}){const m=i.useRef(null),p={...r,...u};(0,i.useEffect)((()=>{m.current&&n&&m.current.click()}),[m,n]);const g=1048576*c;return(0,s.jsx)("input",{...p,type:"file","":"image-file-picker",ref:m,className:a,onChange:async function(n){const i=n.target,[a]=Array.from(i.files||[]),s=await async function(e){const t=await function(e){return new Promise(((t,n)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>{t(i.result?.toString())},i.onerror=e=>n(e)}))}(e),[n,i]=await function(e){return new Promise(((t,n)=>{const i=new Image;i.onload=()=>{const{width:e,height:n}=i;t([e,n])},i.src=e,i.onerror=e=>n(e)}))}(t);return{imageFile:e,imageDataUrl:t,imageWidth:n,imageHeight:i}}(a);try{await async function(e){if(e.imageWidthg)throw o.FILE_TOO_BIG}(s),e(s)}catch(e){if("string"!=typeof e||!Object.values(o).includes(e))throw e;t(e)}}})};function d(){const[e,t]=(0,i.useState)(!1);return[e,(0,i.useCallback)((()=>{t(!0),setTimeout((()=>t(!1)),0)}),[t])]}},90500:(e,t,n)=>{"use strict";n.d(t,{X:()=>m});var i=n(84875),a=n.n(i),s=n(56162),r=n(74572);const o="pIZVZOfjnJGth1BcoA1E",l="ZBBTIITnUdwh05dCI0tm",d="sz8Nwj2lvhOZxDwYWRQr",c="jjPsW7vuG9xH9qhEGL3I";var u=n(4637);const m=({message:e,isErrorMessage:t=!1})=>e?(0,u.jsx)("div",{role:"alert",children:(0,u.jsx)("div",{className:a()(o,{[l]:t}),children:(0,u.jsxs)(s.D,{as:"p",variant:"finale",className:d,children:[(0,u.jsx)(r.l,{iconSize:16,className:c,"aria-hidden":"true"}),e]})})}):null},84828:(e,t,n)=>{"use strict";n.d(t,{X8:()=>p,lb:()=>m});var i=n(36844),a=n(3802),s=n(61815),r=n(95357),o=n(81090),l=n(41836);const d="macOS"===(0,r.y)(),c=(0,s.ZO)()===o.W.Desktop;let u=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_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_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.NAVIGATION_BAR_DECREASE_WIDTH="NAVIGATION_BAR_DECREASE_WIDTH",e.NAVIGATION_BAR_INCREASE_WIDTH="NAVIGATION_BAR_INCREASE_WIDTH",e.RIGHT_SIDEBAR_DECREASE_WIDTH="RIGHT_SIDEBAR_DECREASE_WIDTH",e.RIGHT_SIDEBAR_INCREASE_WIDTH="RIGHT_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}({});const m={[u.OPEN_SEARCH_MODAL]:["mod+k"],[u.OPEN_HELP]:["mod+/","?"],[u.CREATE_NEW_PLAYLIST]:[c?"mod+n":"alt+shift+p"],[u.LIKE_DISLIKE_SONG]:["alt+shift+b"],[u.LOG_OUT]:["alt+shift+f6"],[u.CREATE_NEW_FOLDER]:[c?"mod+shift+n":"mod+alt+shift+p"],[u.SELECT_ALL]:["mod+a"],[u.FILTER]:["mod+f"],[u.TOGGLE_PLAY]:["space"],[u.SEEK_BACKWARD]:[d?"mod+shift+left":"shift+left"],[u.SEEK_FORWARD]:[d?"mod+shift+right":"shift+right"],[u.SHUFFLE]:[c?"mod+s":"alt+s"],[u.REPEAT]:[c?"mod+r":"alt+r"],[u.RAISE_VOLUME]:[c?"mod+up":"alt+up"],[u.LOWER_VOLUME]:[c?"mod+down":"alt+down"],[u.SKIP_PREVIOUS]:[c?"mod+left":"alt+left"],[u.SKIP_NEXT]:[c?"mod+right":"alt+right"],[u.GO_TO_PLAYLISTS]:["alt+shift+1"],[u.GO_TO_PODCASTS]:["alt+shift+2"],[u.GO_TO_ARTISTS]:["alt+shift+3"],[u.GO_TO_ALBUMS]:["alt+shift+4"],[u.GO_TO_HOME]:["alt+shift+h"],[u.GO_TO_PREFERENCES]:["mod+,"],[u.GO_BACKWARDS]:c?["mod+alt+left","alt+left"]:["mod+left"],[u.GO_FORWARDS]:c?["mod+alt+right","alt+right"]:["mod+right"],[u.GO_TO_SEARCH]:[c?"mod+l":"mod+shift+l"],[u.GO_TO_NOW_PLAYING]:["alt+shift+j"],[u.GO_TO_LIKED_SONGS]:["alt+shift+s"],[u.GO_TO_MADE_FOR_YOU]:["alt+shift+m"],[u.GO_TO_NEW_RELEASES]:["alt+shift+n"],[u.GO_TO_CHARTS]:["alt+shift+c"],[u.GO_TO_QUEUE]:["alt+shift+q"],[u.OPEN_CONTEXT_MENU]:["alt+j"],[u.NAVIGATION_BAR_DECREASE_WIDTH]:["alt+shift+left"],[u.NAVIGATION_BAR_INCREASE_WIDTH]:["alt+shift+right"],[u.RIGHT_SIDEBAR_DECREASE_WIDTH]:["alt+shift+up"],[u.RIGHT_SIDEBAR_INCREASE_WIDTH]:["alt+shift+down"],[u.TOGGLE_DEBUG_WINDOW]:["alt+command+x"],[u.FOCUS_YLX_TEXT_FILTER]:c?["mod+alt+f"]:["shift+mod+alt+f"]};function p(){const e=(0,i.W6)(l.yA,{loadingValue:!1}),t=(0,i.W6)(l.t$,{loadingValue:!1});return{basic:[{action:u.CREATE_NEW_PLAYLIST,get description(){return a.ag.get("playlist.new-header")},enabled:!0},{action:u.CREATE_NEW_FOLDER,get description(){return a.ag.get("keyboard.shortcuts.description.createNewFolder")},enabled:!0},{action:u.OPEN_CONTEXT_MENU,get description(){return a.ag.get("keyboard.shortcuts.description.openContextMenu")},enabled:!0},{action:u.OPEN_SEARCH_MODAL,get description(){return a.ag.get("keyboard.shortcuts.description.openSearchModal")},enabled:!0},{action:u.SELECT_ALL,get description(){return a.ag.get("keyboard.shortcuts.description.selectAll")},enabled:c},{action:u.FILTER,get description(){return a.ag.get("filter")},enabled:c},{action:u.FOCUS_YLX_TEXT_FILTER,get description(){return a.ag.get("web-player.your-library-x.text-filter.generic-placeholder")},enabled:e},{action:u.LOG_OUT,get description(){return a.ag.get("user.log-out")},enabled:!0}],playback:[{action:u.TOGGLE_PLAY,get description(){return a.ag.get("keyboard.shortcuts.description.togglePlay")},enabled:!0},{action:u.LIKE_DISLIKE_SONG,get description(){return a.ag.get("keyboard.shortcuts.description.likeDislikeSong")},enabled:!0},{action:u.SHUFFLE,get description(){return a.ag.get("keyboard.shortcuts.description.shuffle")},enabled:!0},{action:u.REPEAT,get description(){return a.ag.get("keyboard.shortcuts.description.repeat")},enabled:!0},{action:u.SKIP_PREVIOUS,get description(){return a.ag.get("keyboard.shortcuts.description.skipPrev")},enabled:!0},{action:u.SKIP_NEXT,get description(){return a.ag.get("keyboard.shortcuts.description.skipNext")},enabled:!0},{action:u.SEEK_BACKWARD,get description(){return a.ag.get("keyboard.shortcuts.description.seekBackward")},enabled:!0},{action:u.SEEK_FORWARD,get description(){return a.ag.get("keyboard.shortcuts.description.seekForward")},enabled:!0},{action:u.RAISE_VOLUME,get description(){return a.ag.get("keyboard.shortcuts.description.raiseVolume")},enabled:!0},{action:u.LOWER_VOLUME,get description(){return a.ag.get("keyboard.shortcuts.description.lowerVolume")},enabled:!0}],navigation:[{action:u.GO_TO_HOME,get description(){return a.ag.get("keyboard.shortcuts.description.home")},enabled:!0},{action:u.GO_BACKWARDS,get description(){return a.ag.get("keyboard.shortcuts.description.goBackwards")},enabled:!0},{action:u.GO_FORWARDS,get description(){return a.ag.get("keyboard.shortcuts.description.goForwards")},enabled:!0},{action:u.GO_TO_PREFERENCES,get description(){return a.ag.get("keyboard.shortcuts.description.goToPreferences")},enabled:c},{action:u.GO_TO_NOW_PLAYING,get description(){return a.ag.get("keyboard.shortcuts.description.currentlyPlaying")},enabled:!0},{action:u.GO_TO_SEARCH,get description(){return a.ag.get("keyboard.shortcuts.description.search")},enabled:!0},{action:u.GO_TO_LIKED_SONGS,get description(){return a.ag.get("keyboard.shortcuts.description.likedSongs")},enabled:!0},{action:u.GO_TO_QUEUE,get description(){return a.ag.get("playback-control.queue")},enabled:!0},{action:u.GO_TO_PLAYLISTS,get description(){return a.ag.get("keyboard.shortcuts.description.yourPlaylists")},enabled:!0},{action:u.GO_TO_PODCASTS,get description(){return a.ag.get("keyboard.shortcuts.description.yourPodcasts")},enabled:!0},{action:u.GO_TO_ARTISTS,get description(){return a.ag.get("keyboard.shortcuts.description.yourArtists")},enabled:!0},{action:u.GO_TO_ALBUMS,get description(){return a.ag.get("keyboard.shortcuts.description.yourAlbums")},enabled:!0},{action:u.GO_TO_MADE_FOR_YOU,get description(){return a.ag.get("keyboard.shortcuts.description.madeForYour")},enabled:!0},{action:u.GO_TO_NEW_RELEASES,get description(){return a.ag.get("new_releases")},enabled:!0},{action:u.GO_TO_CHARTS,get description(){return a.ag.get("keyboard.shortcuts.description.charts")},enabled:!0}],layout:[{action:u.NAVIGATION_BAR_DECREASE_WIDTH,get description(){return a.ag.get("keyboard.shortcuts.layout.navigationBarDecreaseWidth")},enabled:!0},{action:u.NAVIGATION_BAR_INCREASE_WIDTH,get description(){return a.ag.get("keyboard.shortcuts.layout.navigationBarIncreaseWidth")},enabled:!0},{action:u.RIGHT_SIDEBAR_DECREASE_WIDTH,get description(){return a.ag.get("keyboard.shortcuts.layout.rightSidebarDecreaseWidth")},enabled:!0},{action:u.RIGHT_SIDEBAR_INCREASE_WIDTH,get description(){return a.ag.get("keyboard.shortcuts.layout.rightSidebarIncreaseWidth")},enabled:!0}],employee:[{action:u.TOGGLE_DEBUG_WINDOW,description:"Toggle Debug Window",enabled:t}]}}},96490:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var i=n(59496),a=n(84875),s=n.n(a),r=n(66685),o=n.n(r),l=n(85830),d=n(79102),c=n(29251),u=n(27704),m=n(4637),p=function(e){return e[e.DOWN=-1]="DOWN",e[e.NONE=0]="NONE",e[e.UP=1]="UP",e}(p||{});const g=({cssCustomProperty:e,min:t,max:n,ranges:a=("number"==typeof t&&"number"==typeof n?[[t,n]]:[]),value:r,initialValue:g,onCSSPropertyChange:h,label:k,placement:v,elementRef:f,decreaseSizeKeyboardCombination:y,increaseSizeKeyboardCombination:S})=>{const[b,_]=(0,i.useState)(!1),N=(0,i.useRef)(h);N.current=h;const E=parseInt(getComputedStyle(document.documentElement).getPropertyValue(e),10),[x,C]=(0,i.useState)(g??E),w=(0,d.S)(),I=(0,i.useCallback)(((e,t=p.NONE)=>{if(a.some((([t,n])=>t<=e&&e<=n)))return e;switch(t){case p.NONE:{const[t,n]=a.slice().sort((([t,n],[i,a])=>Math.min(Math.abs(t-e),Math.abs(n-e))-Math.min(Math.abs(i-e),Math.abs(a-e))))[0];return e(a[n-1]?.[1]??0){const s=a[i+1]?.[0]??1/0;return n{if(!f.current)return null;const t=f.current.getBoundingClientRect();return"inline-start"===v?w?e-t.left:t.right-e:"inline-end"===v?w?t.right-e:e-t.left:null}),[v,f,w]),A=(0,i.useCallback)((t=>{document.documentElement.style.setProperty(e,`${t}px`)}),[e]),P=(0,i.useCallback)(((e,t=!1)=>{if(null==e)return;const n=I(e);A(n),C(n),t||N.current?.(n)}),[I,A]),O=(0,l.y1)(P,50,{leading:!0,maxWait:100});if((0,i.useEffect)((()=>{void 0!==r&&O(r)}),[r,O]),(0,i.useLayoutEffect)((()=>{void 0!==g&&P(g,!0)}),[g,P]),Number.isNaN(x)){const e=(a[0][1]-a[0][0])/2;console.error(`[LayoutResizer] css property value is not a number. Defaulting to ${e}`),P(e)}const D=(0,i.useCallback)((e=>{v.startsWith("inline")?O(T(e.clientX)):O(T(e.clientY))}),[v,O,T]),R=(0,i.useCallback)((()=>{const e=document.getElementById("Desktop_PanelContainer_Id");e?.classList.add("disableTransitions");_(!0),document.addEventListener("mouseup",(()=>{_(!1),document.removeEventListener("mousemove",D),e?.classList.remove("disableTransitions")}),{once:!0}),document.addEventListener("mousemove",D)}),[D]);(0,i.useEffect)((()=>(y&&o().bind(y,(()=>{P(I(x-10,-1))})),S&&o().bind(S,(()=>{P(I(x+10,1))})),()=>{y&&o().unbind(y),S&&o().unbind(S)})),[y,I,S,x,P]);const L=parseInt(f.current?.style.zIndex||"0",10),F=a[0][0],j=a[a.length-1][1];return(0,m.jsxs)(m.Fragment,{children:[b&&(0,m.jsx)("div",{className:"LayoutResizer__resize-overlay",style:{zIndex:L+1}}),(0,m.jsx)("div",{"":"LayoutResizer__resize-bar",onMouseDown:R,style:{zIndex:L+1},className:s()("LayoutResizer__resize-bar",{"LayoutResizer__resize-bar--resizing":b,"LayoutResizer__inline-start":"inline-start"===v,"LayoutResizer__inline-end":"inline-end"===v,"LayoutResizer__block-start":"block-start"===v,"LayoutResizer__block-end":"block-end"===v,"LayoutResizer__resize-bar-east":"inline-start"===v?x===j:x===F,"LayoutResizer__resize-bar-west":"inline-start"===v?x===F:x===j}),onDoubleClick:()=>{const e=a.findIndex((([e])=>e===x)),t=a.findIndex((([e,t])=>t===x));if(-1!==t){const e=a.at(t+1);e&&P(e[0])}else if(-1!==e){const t=a.at(e-1);t&&P(t[1])}},children:(0,m.jsx)(u.q,{className:"LayoutResizer__input",type:"range",min:F,max:j,onChange:function(e){if(b)return;let t=parseInt(e.target.value,10);t=I(t,Math.sign(t-x)),O(t)},value:r??x,step:10,children:k})})]})}},63120:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Link:()=>h,default:()=>v});var i=n(59496),a=n(61740),s=n(33103),r=n(50346),o=n(3802),l=n(30985),d=n(39669),c=n(21524),u=n(37409),m=n(32422),p=n(95663),g=n(4637);const h=(0,i.memo)((0,i.forwardRef)((function(e,t){const{to:n,pageId:h,onClick:v,children:f,draggable:y=!1,state:S,search:b,pathname:_,tabIndex:N,...E}=e,x=(0,p.o)(),C=(0,u.g)(),w=(0,i.useContext)(c.DJ),I=(0,a.v9)(l.br),T=(0,a.v9)(l.yE),A=o.ag.getUrlLocale(),P={onClick:(0,i.useCallback)((e=>{x({intent:"navigate",type:"click",targetUri:n}),v&&v(e,(0,r.EC)(n,{parseUnknown:!0})?.toURI())}),[x,n,v]),draggable:y,...E},O={pageId:h,...S,referrer:e.referrer||w||C.getReferrer()},D=_||(0,r.EC)(n,{parseUnknown:!0});if(D){let e;const n=(e=>{const t=k(e)?e.toURLPath(!0):e,n=(0,r.EC)(t,{parseUnknown:!0}),i=n?.type;return(0,m.S9)({localeFeatureFlag:I,entityFeatureFlag:T,urlLocale:A,entity:i,type:"link"})})(D);if(k(D)){const t=D.toURL(`/${d.F0}${A}/`);e=n?t:D.toURLPath(!0)}else e=n?`/${d.F0}${A}${D}`:D;return(0,g.jsx)(s.rU,{...P,ref:t,to:{pathname:e,search:b},state:O,tabIndex:N,children:f})}const R=b?`${n}${b}`:n;return(0,g.jsx)("a",{...P,ref:t,href:R,target:"_blank",rel:"noopener nofollow",tabIndex:N,children:f})})));function k(e){return!!e&&"string"!=typeof e}const v=h},40495:(e,t,n)=>{"use strict";n.d(t,{O:()=>l});var i=n(59496),a=n(33103),s=n(37409),r=n(95663),o=n(4637);const l=(0,i.memo)((0,i.forwardRef)((function(e,t){const{onClick:n,to:l,referrer:d,navigationalRoot:c,...u}=e,m=(0,s.g)(),p=(0,r.o)(),g=(0,i.useCallback)((e=>{p({intent:"navigate",type:"click",targetUri:l}),n&&n(e)}),[p,n,l]);return(0,o.jsx)(a.OL,{ref:t,draggable:!1,end:e.end,to:l,state:{referrer:d||m.getReferrer(),navigationalRoot:c},"aria-label":e["aria-label"],tabIndex:e.tabIndex,onClick:g,...u,children:e.children})})))},23627:(e,t,n)=>{"use strict";n.d(t,{h:()=>k});var i=n(59496),a=n(20707),s=n(56162),r=n(74572),o=n(3802);const l=3e4,d=200;function c(e,t){switch(t.type){case"LOADING":return{...e,loading:!0};case"ERROR":return{...e,loading:!1,error:!0};default:return e}}var u=n(32812),m=n(6174);const p="main-loadingPage-container";var g=n(4637);const h=({loading:e=!0})=>(0,g.jsx)("div",{className:p,children:e?(0,g.jsx)(m.H,{}):null}),k=e=>{const{hasError:t,errorMessage:n,loadOffline:m=!1,timeoutInMs:k}=e,v=(0,u.k)(),[f,y,S]=function(e,t,n=l){const[a,s]=(0,i.useReducer)(c,{loading:!1,error:e});return(0,i.useEffect)((()=>{if(e)return s({type:"ERROR"}),()=>{};const t=setTimeout((()=>{s({type:"LOADING"})}),d);return()=>{clearTimeout(t)}}),[e]),(0,i.useEffect)((()=>{let e;return t&&(e=window.setTimeout((()=>{s({type:"ERROR"})}),n)),()=>{clearTimeout(e)}}),[a.loading,t,n]),[a.loading,t,a.error]}(t,v,k),[b,_]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{const e=setTimeout((()=>{_(!0)}),1e3);return()=>{clearTimeout(e)}}),[]),y||m?S?(0,g.jsxs)("div",{className:p,children:[(0,g.jsx)(r.l,{iconSize:64,"aria-hidden":"true"}),(0,g.jsx)(s.D,{as:"p",variant:"alto",children:n}),(0,g.jsx)(s.D,{as:"p",variant:"ballad",children:o.ag.get("error.not_found.body")})]}):b?(0,g.jsx)(h,{loading:f}):(0,g.jsx)("div",{}):(0,g.jsxs)("div",{className:p,children:[(0,g.jsx)(a.i,{iconSize:64,"aria-hidden":"true"}),(0,g.jsx)(s.D,{as:"p",variant:"alto",children:o.ag.get("offline.feedback-text")})]})}},94174:(e,t,n)=>{"use strict";n.d(t,{R:()=>k});var i=n(59496),a=n(84875),s=n.n(a),r=n(72802);var o=n(79102),l=n(66604),d=n(22345);const c="main-trackInfo-overlay",u="main-trackInfo-rightToLeft",m="main-trackInfo-equalGradientWidth",p="main-trackInfo-contentContainer",g="main-trackInfo-contentWrapper";var h=n(4637);const k=({children:e,title:t,speed:n=.2,pauseAtEndEdgeDurationMs:a=1200,initialMouseIntDelayMs:k=200,startAnimationOnMount:v=!0,startAnimationOnMountDelayMs:f=1e3,iterationCount:y="single",iterationCountOnTouchDevices:S="infinite",scrollMethod:b="transform",equalGradientWidth:_})=>{const N=(0,i.useRef)(null),E=(0,i.useRef)(null),x=(0,i.useRef)(null),C=(0,i.useRef)(0),w=(0,i.useRef)("scrolling"),I=(0,o.S)()?"rtl":"ltr",T=(0,i.useRef)("ltr"),A=(0,i.useRef)(y),P=(0,l.T)(),O=(0,r.a)("(any-pointer: coarse)"),D=(0,i.useRef)({initialMouseInteraction:null,animationOnMount:null}),R=(0,i.useCallback)((()=>x.current&&N.current?x.current.clientWidth-N.current.clientWidth:0),[]),L=(0,i.useCallback)((()=>"rtl"===T.current?1:-1),[T]),F=(0,i.useCallback)((()=>{const e=R();return e>0&&I!==T.current?0+-1*L()*e:0}),[R,I,L]),j=(0,i.useCallback)((()=>{x.current?.style.setProperty("--trans-x",`${F()}px`)}),[F]),M=(0,i.useCallback)((()=>{if(P)return;if(C.current)return;let e=!1,t=0,i=1,s=!1;const r=o=>{const l=R();if(l<=0)return;let d=!0,c=t;if(e){if(s)o>s+a&&(s=!1);else if("paused"===w.current);else{c+=i*(60*(o-e)/1e3)*n,c>l?(i*=-1,s=o,c=l):c<0&&(i*=-1,s=o,c=0,d="infinite"===A.current)}if(t=c,"transform"===b){const e=L()*t+F();x.current?.style.setProperty("--trans-x",`${e}px`),E.current.scrollLeft=0}else"scroll"===b&&(E.current.scrollLeft=t)}e=o,C.current=0,d&&(C.current=requestAnimationFrame(r))};w.current="scrolling",r(0)}),[n,a,b,L,F,R,P]),U=(0,i.useCallback)((()=>C.current),[]),B=(0,i.useCallback)((()=>{w.current="paused"}),[]),V=(0,i.useCallback)((()=>{w.current="scrolling"}),[]),H=(0,i.useCallback)((()=>{cancelAnimationFrame(C.current),w.current="paused",C.current=0}),[]),G=(0,i.useCallback)((()=>{Object.values(D.current).forEach((e=>e&&clearTimeout(e)))}),[]),W=(0,i.useCallback)((e=>{U()?B():"focus"!==e&&(D.current.initialMouseInteraction=setTimeout(M,k))}),[M,B,k,U]),z=(0,i.useCallback)((()=>{D.current.initialMouseInteraction&&clearTimeout(D.current.initialMouseInteraction),U()&&V()}),[V,U]);return(0,i.useEffect)((()=>{v&&(D.current.animationOnMount&&clearTimeout(D.current.animationOnMount),D.current.animationOnMount=setTimeout(M,f))}),[M,f,v]),(0,i.useEffect)((()=>()=>{H(),G(),j()}),[H,G,j]),(0,i.useEffect)((()=>{const e=x.current?.children[0];e&&(T.current=getComputedStyle(e).direction,"rtl"===T.current&&N.current?.classList.add(u)),j()}),[I,F,j]),(0,d.y)({onResize:()=>{H(),j()},refOrElement:N,observeOnly:"width"}),(0,i.useEffect)((()=>{O&&(A.current=S)}),[O,S]),(0,h.jsx)("div",{ref:N,className:s()(c,_&&m),onMouseOver:()=>W("mouse"),onFocus:()=>W("focus"),onMouseOut:z,onBlur:z,title:P&&t?t:void 0,children:(0,h.jsx)("div",{ref:E,className:p,children:(0,h.jsx)("div",{ref:x,className:s()(g,_&&m),children:e})})})}},63982:(e,t,n)=>{"use strict";n.d(t,{D:()=>l,V:()=>r});var i=n(3802),a=n(53523),s=n(4637);const r="createPlaylist",o={getTitle:()=>i.ag.get("action-trigger.create-playlist"),getDescription:()=>i.ag.get("action-trigger.login-playlist")},l=({children:e,renderInline:t})=>(0,s.jsx)(a.P,{id:r,options:{...o,renderInline:t},children:e})},50013:(e,t,n)=>{"use strict";n.d(t,{W:()=>be});var i=n(59496),a=n(61740),s=n(36844);var r=n(6142),o=n(54299),l=n(28246),d=n(50499),c=n(25532),u=n(50338),m=n(99548),p=n(95307),g=n(9182),h=n(46611),k=n(43276),v=n(4637);const f=parseInt("384px",10),y=()=>{const{expandedState:e}=(0,h.o)(),t=(0,k.x)(),n=(0,r.O)();if(null===t)return null;const i=e===l.NowPlayingCoverStateEnum.expanded,{context:a,item:s,index:y}=t;return(0,v.jsx)(o._,{menu:(0,v.jsx)(c.$,{context:a,item:s}),children:(0,v.jsx)("div",{draggable:(0,g.Q)(s),onDragStart:e=>{n(e,[s.uri],(0,p.R)(s))},children:(0,v.jsx)(m.y,{uri:a.uri,owner:a.metadata?.context_owner,children:(0,v.jsx)(u.R,{referrer:"now_playing_bar",context:a,item:s,index:y,isVisible:i,adEventReason:"cover_art_expanded",children:(0,v.jsx)(d.T,{item:s,maxSize:f,desiredLabel:"xlarge"})})})})})};var S=n(49823),b=n(41836),_=n(99948),N=n(22508),E=n(35800),x=n(69718);const C="main-coverSlotExpanded-container",w="main-coverSlotExpanded-containerExpanding",I="main-coverSlotExpanded-enter",T="main-coverSlotExpanded-enterActive",A="main-coverSlotExpanded-expanding",P="main-coverSlotExpanded-exitActive",O=({children:e,renderActionButton:t})=>{const{expandedState:n,setTransientForcedExpandedState:a}=(0,h.o)(),r=(0,s.W6)(b.yA,{loadingValue:!1}),o=n===l.NowPlayingCoverStateEnum.expanded,{hasContext:d,isPlayingAd:c}=(0,_.Y)((e=>({hasContext:e?.hasContext,isPlayingAd:(0,N.k6)(e?.item??void 0)})));(0,i.useEffect)((()=>{a(c?l.NowPlayingCoverStateEnum.expanded:l.NowPlayingCoverStateEnum.none)}),[c,a]);const u=o&&d,m=(0,s.W6)(b.JI),p=(0,x.m)();return m&&p===E.s.NowPlayingView?null:(0,v.jsx)(S.Z,{in:u,timeout:250,unmountOnExit:!0,classNames:{enter:I,enterActive:r?A:T,exitActive:P},children:(0,v.jsxs)("div",{"":"CoverSlotExpanded__container",className:r?w:C,children:[e,t()]})})};var D=n(84875),R=n.n(D),L=n(19422),F=n(3802),j=n(3289);const M="main-coverSlotExpandedCollapseButton-collapseButton",U=()=>{const{setLocalStorageExpandedState:e}=(0,h.o)();return(0,v.jsx)(j._,{label:F.ag.get("npb.collapseCoverArt"),children:(0,v.jsx)("button",{className:R()("CoverSlotExpanded__actionButton",M),onClick:()=>{e(l.NowPlayingCoverStateEnum.collapsed)},"aria-label":F.ag.get("npb.collapseCoverArt"),children:(0,v.jsx)(L.C,{iconSize:16})})})};var B=n(98340),V=n(35302),H=n(56162),G=n(95663);const W="KgjFD1C8GPOqiAMEI4Wl",z="Yw9u5QqYvW1sY8hr729O",K="UrxMTgMjpBSI1WOXf2wV",Y=i.memo((function(e){const{onClick:t}=e,n=(0,G.o)(),a=(0,i.useCallback)((e=>{n({intent:"install-app",type:"click",targetUri:"/install-pwa"}),t(e)}),[n,t]);return(0,v.jsxs)("button",{onClick:a,className:W,children:[(0,v.jsx)("div",{className:z,children:(0,v.jsx)("svg",{viewBox:"0 0 64 64",xmlns:"http://www.w3.org/2000/svg",children:(0,v.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M50.9288482,28.3686995 C40.6139223,22.2429099 23.5996824,21.6796628 13.7528525,24.668235 C12.1712611,25.1477974 10.4991074,24.2551616 10.020312,22.674325 C9.54075242,21.0919599 10.4326187,19.4209426 12.0153564,18.9402338 C23.3188247,15.5091649 42.1091547,16.1717636 53.9838913,23.2207587 C55.4065211,24.0648651 55.8727065,25.9021053 55.0297516,27.3220687 C54.1860323,28.7439428 52.3476568,29.213188 50.9288482,28.3686995 M50.5910548,37.4417921 C49.8677032,38.6160515 48.3323482,38.9840345 47.1592422,38.2633534 C38.5600315,32.9774668 25.4464645,31.4459238 15.2725406,34.5342297 C13.953465,34.9331646 12.5598763,34.1887919 12.1594154,32.8720012 C11.7616293,31.5529179 12.5056154,30.1616135 13.8227803,29.7607681 C25.4453181,26.2337867 39.8932454,27.9418698 49.7702628,34.0118696 C50.9429866,34.7340793 51.3121138,36.2702077 50.5910548,37.4417921 M46.6754793,46.1553085 C46.1003899,47.0983843 44.8726409,47.3937643 43.9330097,46.8190535 C36.4186355,42.2263353 26.9604208,41.1892576 15.8216459,43.7334225 C14.748273,43.9798909 13.6787213,43.3069749 13.4337829,42.2335956 C13.1876981,41.1605985 13.8579352,40.0906583 14.9336008,39.8457184 C27.1232036,37.0589064 37.5791315,38.2583858 46.0140309,43.4124404 C46.9544263,43.986769 47.2505687,45.2152896 46.6754793,46.1553085 M31.9998089,0 C14.3271776,0 0,14.3268811 0,31.9996179 C0,49.6742653 14.3271776,64 31.9998089,64 C49.6732045,64 64,49.6742653 64,31.9996179 C64,14.3268811 49.6732045,0 31.9998089,0"})})}),(0,v.jsx)(H.D,{variant:"ballad",as:"div",weight:"bold",className:K,children:F.ag.get("pwa.download-app")})]})}));var q=n(43499);function Z(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 Q=i.memo((function(){const e=(0,a.I0)(),t=(0,G.o)(),[n,s]=(0,i.useReducer)(Z,{deferredPrompt:void 0,installed:!1,canBeInstalled:!1});(0,i.useEffect)((()=>{const t=()=>{s({type:"installed"}),e((0,q.oT)())},n=e=>{e.preventDefault(),s({type:"before-install",prompt:e})};return window.addEventListener("beforeinstallprompt",n),window.addEventListener("appinstalled",t),()=>{window.removeEventListener("beforeinstallprompt",n),window.removeEventListener("appinstalled",t)}}),[e]);const r=(0,i.useCallback)((e=>{e.preventDefault(),t({intent:"install-app",type:"click",targetUri:"/install-pwa"}),n.deferredPrompt&&n.deferredPrompt.prompt()}),[n.deferredPrompt,t]),{canBeInstalled:o,installed:l}=n;return!o||l?null:(0,v.jsx)(Y,{onClick:r})}));var J=n(40495),$=n(20688);const X=i.memo((function(e){const{isDesktop:t,isPWA:n,shouldCalloutPWA:i}=e;return t||n?null:i?(0,v.jsx)(Q,{}):(0,v.jsx)("div",{className:R()($.Z.navBarItem),children:(0,v.jsxs)(J.O,{to:"/download",className:({isActive:e})=>R()("link-subtle",$.Z.navBarLink,{[$.Z.navBarLinkActive]:e}),children:[(0,v.jsx)(V.D,{"aria-hidden":"true"}),(0,v.jsx)(H.D,{variant:"mestoBold",className:"ellipsis-one-line",children:F.ag.get("navbar.install-app")})]})})}));var ee=n(19709),te=n(39669),ne=n(4055),ie=n(47146);const ae="iYuun6jjV82lsYbccJVS",se="T84lhzqb5VCzhao2XHa0",re=()=>{const[e,t]=(0,i.useState)(!1),n=(0,ne.g)(),s=(0,a.v9)(ie.rZ);(0,i.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),1100);return()=>{t(!1),clearTimeout(e)}}),[]);const r=(0,a.v9)(ie.Vd);return n&&e?(0,v.jsx)(ee.VB,{language:F.ag.getSmartlingLocale(),market:s.toLowerCase(),children:(0,v.jsxs)("div",{className:ae,"":"nav-bar-legal-links",children:[(0,v.jsx)(ee.Po,{}),(0,v.jsx)("a",{draggable:!1,href:te.z4,target:"_blank",rel:"noopener",className:se,children:(0,v.jsx)(H.D,{variant:"finale",children:F.ag.get("cookies")})}),r&&(0,v.jsx)("a",{draggable:!1,href:te.iz,target:"_blank",rel:"noopener",className:se,children:(0,v.jsx)(H.D,{variant:"finale",children:"Форма для Ваших обращений"})})]})}):null};var oe=n(34221),le=n(2831);const de="xaIJCzLBUjT3v2jC36P3",ce="NjzdxgK9pQx2Yj04CKzr",ue="X7gEj3fPmPfF7t28pPht",me=(0,i.forwardRef)((function(e,t){const n=(0,a.I0)(),r=(0,_.Y)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri)),o=(0,N.k6)(r)?r.url??void 0:void 0,[l,d]=(0,i.useState)(!1),c=(0,a.v9)((e=>e.ads.vto?.isMinimized)),u=(0,s.W6)(b.yA,{loadingValue:!1});return(0,i.useEffect)((()=>{c?setTimeout((()=>{d(!0)}),oe.K):d(!1)}),[c]),(0,v.jsx)("a",{onClick:()=>{n((0,le.nX)("minimized_video_takeover"))},hidden:!l,href:o||void 0,ref:t,className:R()(de,{[ce]:l,[ue]:u})})}));var pe=n(79642),ge=n(83587),he=n(78573);const ke="nkfuv1hrhxglxpnokpv7",ve=()=>{const e=(0,a.I0)();return(0,v.jsx)("button",{className:R()("CoverSlotExpanded__actionButton",ke),onClick:()=>{e((0,ge.Zc)()),e((0,ge.kh)(he.W9.EXPANDED))},"aria-label":F.ag.get("npb.expandVideo"),children:(0,v.jsx)(pe.V,{iconSize:24})})};var fe=n(19503);const ye="main-downloadClient-container",Se=(0,i.lazy)((()=>n.e(9801).then(n.bind(n,59801))));Spicetify.React=i;var be=(0,i.memo)((0,i.forwardRef)((function({isAnonymous:e,EpisodeSponsorNowPlayingBarHat:t=Se,CoverSlotExpanded:n=O},r){const{isDesktop:o,isPWA:d,shouldCalloutPWA:c}=(0,a.v9)((e=>e.platform)),u=(0,a.v9)((e=>e.ads.vto)),m=(0,s.W6)(b.JI),p=!u?.isHidden&&u?.isMinimized&&!m,{nowPlayingCover:g}=(0,a.v9)((e=>e.ui)),h=(0,a.v9)(ie.C7),k=g.forcedExpandedState===l.NowPlayingCoverStateEnum.expanded,f=(0,s.W6)(b.yA),S=(0,i.useCallback)((()=>p?(0,v.jsx)(ve,{}):k?null:(0,v.jsx)(U,{})),[p,k]);return(0,v.jsxs)("div",{className:ye,children:[!e&&!h&&!f&&(0,v.jsx)(B.ZP,{value:"download",children:(0,v.jsx)(X,{isDesktop:o,isPWA:d,shouldCalloutPWA:c})}),e&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(re,{}),(0,v.jsx)(fe.x,{})]}),o&&(0,v.jsx)(t,{}),(0,v.jsxs)(n,{renderActionButton:S,children:[(0,v.jsx)(y,{}),p&&(0,v.jsx)(me,{ref:r})]})]})})))},49795:(e,t,n)=>{"use strict";n.d(t,{F:()=>o});var i=n(59496),a=n(36844),s=n(4637);const r=({renderOldExperience:e=(()=>null),renderNewExperience:t=(()=>null),forceNewExperience:n,property:i})=>(0,a.W6)(i)||n?t():e(),o=({suspenseFallback:e=null,renderNewExperience:t,renderOldExperience:n,forceNewExperience:a=!1,property:o})=>(0,s.jsx)(i.Suspense,{fallback:e,children:(0,s.jsx)(r,{renderNewExperience:t,renderOldExperience:n,forceNewExperience:a,property:o})})},76270:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var i=n(59496),a=n(98911),s=n(72102),r=n(4637);const o=i.memo(i.forwardRef((function({className:e,children:t,options:n},i){const o=(0,s.NY)((()=>({className:"os-theme-spotify",sizeAutoCapable:!0,scrollbars:{clickScrolling:!0,autoHide:"leave",...n?.scrollbars},updateOnLoad:null,...n})),[n]);return(0,r.jsx)(a.E,{className:e,options:o,ref:i,children:t})})))},70631:(e,t,n)=>{"use strict";n.d(t,{p:()=>k});var i=n(59496),a=n(89605),s=n(60946),r=n(48710),o=n(18600),l=n(74572),d=n(79475),c=n(81326),u=n(3802),m=n(96170);const p="main-pageErrorTemplate-errorBody";var g=n(4637);const h={"/":s.A,"/search":r.j,"/collection":o.$},k=i.memo((function(){const e=(0,a.TH)(),t=(n=e.pathname,h[n]||l.l);var n;const{spec:s,logger:r}=(0,m.fU)(c.createDesktopErrorPageEventFactory,{data:{uri:e.pathname}}),o=(0,m.Wi)(s),k=(0,i.useCallback)((()=>{const e=s.reloadPageButtonFactory().hitRefreshContent();r.logInteraction(e),window.location.reload()}),[s,r]);return(0,g.jsxs)("div",{className:p,ref:o,children:[(0,g.jsx)(t,{width:46,height:46}),(0,g.jsx)("h1",{children:u.ag.get("error-dialog.generic.header")}),(0,g.jsx)("p",{children:u.ag.get("error-dialog.generic.body")}),(0,g.jsx)(d.D,{onClick:k,children:u.ag.get("fatal-error.button-label")})]})}))},20882:(e,t,n)=>{"use strict";n.d(t,{v:()=>v});var i=n(59496),a=n(97525),s=n(92616),r=n(30366),o=n(1982),l=n(79475),d=n(3802),c=n(61278),u=n(39669),m=n(66490),p=n(11611);const g="wTtSN5qCRogLw_ONPzid",h="Zp4roOZZCr2D0jkQgTwW";var k=n(4637);const v=function({title:e,placement:t,arrow:n,children:v}){const f=(0,p.Y)(),{openURLWithSessionTransfer:y}=(0,m.e)(),[S,b]=(0,i.useState)(!1),_=(0,i.useCallback)((()=>{b(!1),y(u.IT,"_blank")}),[y]);return f?(0,k.jsx)(a.x,{onShow:()=>b(!0),onHide:()=>b(!1),placement:t,overlay:S&&(0,k.jsx)(c.i,{children:(0,k.jsx)("div",{children:(0,k.jsxs)(s.J,{role:"alertdialog",popoverTitle:e,arrow:n,colorSet:"announcement",className:g,children:[d.ag.get("pick-and-shuffle.upsell.message"),(0,k.jsxs)("div",{className:h,children:[(0,k.jsx)(r.o,{buttonSize:o.z.sm,onClick:()=>b(!1),children:d.ag.get("pick-and-shuffle.upsell.dismiss")}),(0,k.jsx)(l.D,{buttonSize:o.z.sm,onClick:_,colorSet:"invertedLight",children:d.ag.get("pick-and-shuffle.upsell.explore-premium")})]})]})})}),children:v}):v}},77312:(e,t,n)=>{"use strict";n.d(t,{$:()=>o});var i=n(59496),a=n(17201),s=n(95663),r=n(4637);const o=i.memo((function({uri:e,ariaPlayLabel:t,ariaPauseLabel:n,onClick:i,isPlaying:o,size:l,locked:d,...c}){const u=(0,s.o)();return(0,r.jsx)(a.f,{ariaPlayLabel:t,ariaPauseLabel:n,isPlaying:o,onClick:t=>{d||u({targetUri:e,intent:o?"pause":"play",type:"click",itemIdSuffix:"button"}),i(t)},size:l,locked:d,...c})}))},24843:(e,t,n)=>{"use strict";n.d(t,{I:()=>c});var i=n(59496),a=n(31538),s=n(37912),r=n(83292),o=n(3802),l=n(3289),d=n(4637);const c=i.forwardRef((function({className:e,iconClassName:t,isPlaying:n,isLocked:i,onClick:c=(()=>{}),playAriaLabel:u=o.ag.get("play")},m){let p=(0,d.jsx)(a.J,{className:t});i?p=(0,d.jsx)(s.Z,{iconSize:32}):n&&(p=(0,d.jsx)(r.k,{className:t}));let g=o.ag.get("play");return g=i?o.ag.get("mwp.header.content.unavailable"):n?o.ag.get("pause"):u,(0,d.jsx)(l._,{label:g,children:(0,d.jsx)("button",{onClick:e=>{c(e,n?"pause":"play")},className:e,"aria-label":g,ref:m,children:p})})}))},19281:(e,t,n)=>{"use strict";n.d(t,{B1:()=>x,RG:()=>f,VH:()=>S,VK:()=>N,Vd:()=>l,_j:()=>_,aK:()=>E,b3:()=>y,cB:()=>b,hI:()=>r});var i=n(3802),a=n(72502),s=n(82849);let r=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}({});var o=function(e){return e.DESC="DESC",e.ASC="ASC",e}(o||{});const l={[r.TITLE]:["title"],[r.ADDED_BY]:["added_by"],[r.ADDED_AT]:["added_at"],[r.ARTIST]:["artist_name","album_title","album_track_number"],[r.ALBUM]:["album_title","album_track_number"],[r.SHOW]:["album_title","added_at"],[r.DURATION]:["duration"]},d={[a.Q.TITLE]:s.bD.TITLE,[a.Q.ADDED_BY]:s.bD.ADDED_BY,[a.Q.ADDED_AT]:s.bD.ADDED_AT,[a.Q.DURATION]:s.bD.DURATION,[a.Q.ALBUM]:s.bD.ALBUM,[a.Q.ALBUM_OR_PODCAST]:s.bD.ALBUM,[a.Q.ALBUM_OR_SHOW]:null,[a.Q.ARTIST]:null,[a.Q.ACTIONS]:null,[a.Q.RELEASE_DATE]:null,[a.Q.INDEX]:null,[a.Q.PLAYS]:null,[a.Q.ADD]:null,[a.Q.EVENT_DATE]:null},c=(a.Q.TITLE,r.TITLE,a.Q.ADDED_BY,r.ADDED_BY,a.Q.ADDED_AT,r.ADDED_AT,a.Q.DURATION,r.DURATION,a.Q.ALBUM,r.ALBUM,a.Q.ALBUM_OR_PODCAST,r.ALBUM,a.Q.ALBUM_OR_SHOW,a.Q.ARTIST,a.Q.ACTIONS,a.Q.RELEASE_DATE,a.Q.INDEX,a.Q.PLAYS,a.Q.ADD,a.Q.EVENT_DATE,a.k.NONE,a.k.DESC,o.DESC,a.k.ASC,o.ASC,a.k.SECONDARY_DESC,o.DESC,a.k.SECONDARY_ASC,o.ASC,[a.Q.INDEX,a.Q.TITLE,a.Q.ALBUM,a.Q.ADDED_AT,a.Q.DURATION]),u=[a.Q.INDEX,a.Q.TITLE,a.Q.ALBUM,a.Q.ADDED_BY,a.Q.ADDED_AT,a.Q.DURATION],m=[a.Q.INDEX,a.Q.TITLE,a.Q.ALBUM_OR_PODCAST,a.Q.RELEASE_DATE,a.Q.ADDED_AT,a.Q.DURATION],p=[a.Q.INDEX,a.Q.TITLE,a.Q.ALBUM_OR_PODCAST,a.Q.ADDED_BY,a.Q.RELEASE_DATE,a.Q.ADDED_AT,a.Q.DURATION],g=[a.Q.INDEX,a.Q.TITLE,a.Q.ALBUM,a.Q.EVENT_DATE,a.Q.DURATION],h=[a.Q.INDEX,a.Q.TITLE,a.Q.ALBUM,a.Q.EVENT_DATE,a.Q.DURATION],k=[a.Q.INDEX,a.Q.TITLE,a.Q.ALBUM,a.Q.ADDED_BY,a.Q.DURATION],v={[a.k.NONE]:void 0,[a.k.DESC]:s.As.DESC,[a.k.ASC]:s.As.ASC,[a.k.SECONDARY_DESC]:s.As.DESC,[a.k.SECONDARY_ASC]:s.As.ASC},f=(e,t,n,i,s,r,o)=>{let l=c;const d=e||o>1;return r?l=k:d&&t?l=p:t?l=m:d?l=u:i?l=g:s&&(l=h),n?l:l.filter((e=>e!==a.Q.ADDED_AT))},y=e=>[a.k.ASC,a.k.SECONDARY_ASC].includes(e),S=e=>[a.k.DESC,a.k.SECONDARY_DESC].includes(e),b=(e,t)=>e===a.Q.TITLE&&(e=>[a.k.SECONDARY_ASC,a.k.SECONDARY_DESC].includes(e))(t),_=e=>{if(e.order&&e.column)return b(e.column,e.order)?{field:s.bD.ARTIST,order:v[e.order]}:{field:d[e.column],order:v[e.order]}},N=(e,t)=>{const n=e===a.Q.TITLE?5:3,i=(t.order+1)%n;return t.column===e?{column:i?t.column:null,order:i}:{column:e,order:a.k.ASC}},E=e=>{if(!e)return;return`text =^# "${e}"`},x=e=>{const t=e||i.ag.get("playlist.similar-playlist"),n=t.match(new RegExp("(.*)\\((\\d+)\\)$"));return n?`${n[1].trim()} (${a=n[2],parseInt(a,10)+1})`:`${t} (2)`;var a}},73495:(e,t,n)=>{"use strict";n.d(t,{ME:()=>c,_U:()=>l,w:()=>s,zy:()=>o});var i=n(59496),a=n(4637);let s=function(e){return e.TITLE="title",e.DESCRIPTION="description",e.NONE="NONE",e}({});const r={isOpen:!1,isImagePickerOpen:!1,playlistDetails:{uri:"",name:"",description:"",image:void 0},focusedElement:s.NONE},o=(0,i.createContext)(void 0),l=(0,i.createContext)(r);function d(e,t){switch(t.type){case"open":return{...e,isOpen:!0,playlistDetails:t.playlistDetails,focusedElement:t.focusedElement||s.NONE};case"close":return{...r};case"openWithImagePicker":return{...e,isOpen:!0,isImagePickerOpen:!0,playlistDetails:t.playlistDetails,focusedElement:s.NONE};default:throw new Error("Unknown action received!")}}const c=({children:e})=>{const[t,n]=(0,i.useReducer)(d,r);return(0,a.jsx)(o.Provider,{value:n,children:(0,a.jsx)(l.Provider,{value:t,children:e})})}},69392:(e,t,n)=>{"use strict";n.d(t,{x:()=>u,L:()=>c});var i=n(59496),a=n(29049),s=n(84875),r=n.n(s),o=n(95019);const l="main-contextMenu-tippyWrapper";var d=n(4637);const c={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"},u=({visible:e,overlay:t,placement:n,children:s,childRef:c,maxWidth:u=336,hideArrow:m=!1,className:p="",tippyWrapperClassName:g,popperOptions:h={},onHide:k,zIndex:v,fadeOut:f=!1,useLazyMounting:y=!1,renderInline:S=!0})=>{const[b,_]=(0,i.useState)(!1),N=(0,i.useMemo)((()=>({onMount:()=>_(!0),onHidden:()=>_(!1)})),[]),E=(0,i.useCallback)(((e,t)=>k?.(t)),[k]),x=(0,o.ky)();return e||f?(0,d.jsx)(i.Suspense,{fallback:s,children:(0,d.jsx)(a.ZP,{animation:"shift-toward-subtle",maxWidth:u,visible:e,theme:"activation",placement:n||"auto",interactive:!0,arrow:!m,content:b||!y?t:"",className:p,onClickOutside:E,popperOptions:h,zIndex:v,offset:[0,14],reference:c,...y&&N,appendTo:!x||S?void 0:()=>x.body,children:(0,d.jsx)("div",{className:r()(l,g),children:s})})}):s}},29655:(e,t,n)=>{"use strict";n.d(t,{k:()=>c});var i=n(59496),a=n(56162),s=n(3802),r=n(53417),o=n(98340);const l="artist-popularTrackList-seeMore";var d=n(4637);const c=({nrTracks:e,initialTracks:t,usePlayContextItem:n})=>{const[c,u]=(0,i.useState)(!1),m=(0,i.useCallback)((()=>{u(!c)}),[c]),p=(0,i.useCallback)((({uri:e,contextUri:t,totalMilliseconds:i,name:a,artists:s,contentRating:o,isPlayable:l,playcount:c,imageUrl:u,albumUri:m},p)=>(0,d.jsx)(r.l0,{index:p,uri:e,contextUri:t,totalMilliseconds:i,name:a,artists:s,isPlayable:l,contentRating:o,playcount:c||0,imageUrl:u,albumUri:m,usePlayContextItem:n},e)),[n]),g=(0,i.useCallback)((e=>e.uri),[]),h=(0,i.useMemo)((()=>[r.QD.INDEX,r.QD.TITLE,r.QD.PLAYS,r.QD.DURATION]),[]);return(0,d.jsxs)(o.ZP,{value:"artist-popular-tracks-list",children:[(0,d.jsx)(r.Pv,{ariaLabel:s.ag.get("tracklist.popular-tracks"),renderRow:p,nrTracks:Math.min(e,c?10:5),tracks:t,resolveUri:g,columns:h}),e>5?(0,d.jsx)("button",{"aria-expanded":c,className:l,onClick:m,children:(0,d.jsx)(a.D,{as:"div",variant:"mestoBold",children:c?s.ag.get("artist-page.tracks.showless"):s.ag.get("artist-page.tracks.seemore")})}):null]})}},24927:(e,t,n)=>{"use strict";n.d(t,{Q:()=>b,x:()=>y});var i=n(59496),a=n(36844),s=n(29251),r=n(50346),o=n(80370),l=n(74642),d=n(12799),c=n(26588),u=n(66806),m=n(29939);const p=e=>{const t=(0,u.Vu)(e,m.HI),{metadataOptions:n,contentsOptions:i}=(0,c.d)(t,"");return(0,d.s)(e,n,i)},g=({children:e,callback:t,hoverDelayMs:n=200})=>{const a=(0,i.useRef)();return i.cloneElement(e,{onMouseEnter:i=>{a.current=setTimeout(t,n),e.props.onMouseEnter?.(i)},onMouseLeave:t=>{clearTimeout(a.current),e.props.onMouseLeave?.(t)}})},h=({children:e,callback:t,...n})=>i.cloneElement(e,{onMouseDown:n=>{t(),e.props.onMouseDown?.(n)},...n}),k=({children:e,callback:t})=>{const n=(0,i.useRef)(t);return(0,i.useMemo)((()=>{n.current()}),[]),e};var v=n(41836),f=n(4637);let y=function(e){return e[e.OnMouseDown=0]="OnMouseDown",e[e.OnHover=1]="OnHover",e[e.OnRender=2]="OnRender",e}({});const S=e=>{const t=(e=>{const t=(0,r.EC)(e);switch(t?.type){case r.JM.ALBUM:return o.i;case r.JM.PLAYLIST:case r.JM.PLAYLIST_V2:return p;case r.JM.ARTIST:return l.Z;default:return()=>()=>{}}})(e.uri)(e.uri);switch(e.trigger){case y.OnMouseDown:return(0,f.jsx)(h,{callback:t,children:e.children});case y.OnHover:return(0,f.jsx)(g,{callback:t,hoverDelayMs:e.hoverDelayMs,children:e.children});case y.OnRender:return(0,f.jsx)(k,{callback:t,children:e.children});default:return(0,s.U)(e)}},b=({uri:e,trigger:t,children:n,...s})=>{const r=(0,a.W6)(v.KL,{loadingValue:!1}),o=i.cloneElement(n,s);return r?(0,f.jsx)(i.Fragment,{children:(0,f.jsx)(S,{uri:e,trigger:t,children:o})},e):o}},66167:(e,t,n)=>{"use strict";n.d(t,{ko:()=>K});var i=n(59496),a=n(84875),s=n.n(a),r=n(57734),o=n(50983),l=n(85830),d=n(95019);function c(e,t){const n=e.current;if(null===n)return 0;const i=n.getBoundingClientRect();return Math.max(0,Math.min((t-i.left)/i.width,1))}var u=n(36844),m=n(91546);const p=20,g=[{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}],h=200;function k(e,t){const n=document.createElement("canvas"),i=n.getContext("2d");if(null===i)return null;const a=Math.sqrt(e**2+t**2),s=h;return n.width=a/1.5+2*s,n.height=a+2*s,i.translate(s,s),{canvas:n,context:i,width:n.width-2*s,height:n.height-2*s,padding:s}}function v(e,t,n,i,a=0){const s=i/2*Math.PI/180,r=n/Math.cos(s),o=Math.sin(s)*r*2;e.beginPath(),e.moveTo((t-o)/2,a),e.lineTo(t/2,a+n),e.lineTo((t-o)/2+o,a),e.closePath()}function f(e,t){const n=function(e,t){const n=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,m.g)("images/stranger-things-nether-bottom-left.png"),e}),[]),a=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,m.g)("images/stranger-things-nether-bottom-right.png"),e}),[]);return function(i){if(a){const n=e-a.naturalWidth,s=t-a.naturalHeight;i.drawImage(a,0,0,a.naturalWidth,a.naturalHeight,n,s,a.naturalWidth,a.naturalHeight)}if(n){const e=0,a=t-n.naturalHeight;i.drawImage(n,0,0,n.naturalWidth,n.naturalHeight,e,a,n.naturalWidth,n.naturalHeight)}}}(e,t),[a,s]=(0,i.useState)(y(e,t)),[r,o]=(0,i.useState)(S(e,t));return(0,i.useEffect)((()=>{s(y(e,t)),o(S(e,t))}),[e,t]),(i,s,o,l)=>{if(!a||!r)return;const d=o/100,c=s.left+s.width*d,u=s.top+s.height/2;let m=0;m=d>.5?(d-.5)/.5*-60:60-d/.5*60;const p=a.width,h=a.height,k=-a.width/2,v=-a.height,f=p,y=h;i.save(),i.fillStyle="rgba(0, 0, 0, 0.85)",i.fillRect(0,0,e,t);const S=i.createLinearGradient(e/2,0,e/2,t);S.addColorStop(0,"rgba(57, 139, 216, 0.3)"),S.addColorStop(1,"rgba(0, 29, 62, 0.15)"),i.fillStyle=S,i.fillRect(0,0,e,t),"flashlight-on"===g[l].name?(i.save(),i.translate(c,u),i.rotate(m*Math.PI/180),i.globalCompositeOperation="destination-out",i.drawImage(a,0,0,p,h,k,v+100,f,y),i.restore(),n(i),i.save(),i.translate(c,u),i.rotate(m*Math.PI/180),i.globalCompositeOperation="source-over",i.drawImage(r,0,0,p,h,k,v+100,f,y),i.restore()):n(i),i.restore()}}function y(e,t){const n=k(e,t);if(!n)return null;const{canvas:i,context:a,width:s,height:r,padding:o}=n,l=a.createLinearGradient(s/2,0,s/2,r);l.addColorStop(0,"rgba(0, 0, 0, 1)"),l.addColorStop(1,"rgba(0, 0, 0, 0)");const d=a.createLinearGradient(s/2,0,s/2,r);return d.addColorStop(.7,"rgba(0, 0, 0, 1)"),d.addColorStop(1,"rgba(0, 0, 0, 0)"),a.save(),a.fillStyle="rgba(0, 0, 0, 1)",v(a,s,r,30,120),a.filter="blur(10px)",a.fill(),a.restore(),a.globalCompositeOperation="destination-out",a.fillStyle=d,a.fillRect(-o,-o,s+2*o,r+2*o),a.globalCompositeOperation="source-over",a.fillStyle="rgba(0, 0, 0, 1)",v(a,s,r,5,40),a.filter="blur(30px)",a.fill(),a.fillStyle="rgba(0, 0, 0, 1)",v(a,s,r,30,80),a.filter="blur(40px)",a.fill(),a.restore(),a.globalCompositeOperation="destination-out",a.fillStyle=l,a.fillRect(-o,-o,s+2*o,r+2*o),i}function S(e,t){const n=k(e,t);if(!n)return null;const{canvas:i,context:a,width:s,height:r,padding:o}=n;a.save(),a.fillStyle="rgba(80, 170, 255, 0.6)",v(a,s,r,30,120),a.filter="blur(10px)",a.fill(),a.restore();const l=a.createLinearGradient(s/2,0,s/2,r);l.addColorStop(.7,"rgba(0, 0, 0, 1)"),l.addColorStop(1,"rgba(0, 0, 0, 0)"),a.globalCompositeOperation="destination-out",a.fillStyle=l,a.fillRect(-o,-o,s+2*o,r+2*o),a.globalCompositeOperation="source-over",a.fillStyle="rgba(80, 170, 255, 0.8)",v(a,s,r,5,40),a.filter="blur(30px)",a.fill(),a.fillStyle="rgba(80, 170, 255, 0.4)",v(a,s,r,30,150),a.filter="blur(40px)",a.fill(),a.restore(),a.save(),a.translate(s/2,r-140),a.scale(1,10),a.fillStyle="rgba(198, 238, 251, 0.2)",a.filter="blur(24px)",a.beginPath(),a.arc(0,0,22,0,2*Math.PI),a.fill(),a.fillStyle="rgba(234, 255, 255, 0.2)",a.filter="blur(18px)",a.beginPath(),a.arc(0,0,20,0,2*Math.PI),a.fill(),a.restore(),a.save(),a.translate(s/2,r-70),a.scale(1,5),a.fillStyle="rgba(198, 238, 251, 0.1)",a.filter="blur(14px)",a.beginPath(),a.arc(0,0,18,0,2*Math.PI),a.fill(),a.fillStyle="rgba(234, 255, 255, 0.1)",a.filter="blur(8px)",a.beginPath(),a.arc(0,0,20,0,2*Math.PI),a.fill(),a.restore(),a.fillStyle="rgba(100, 190, 255, 1)",a.filter="blur(22px)",a.beginPath(),a.arc(s/2,r+100,20,0,2*Math.PI),a.fill(),a.fillStyle="rgba(198, 238, 251, 1)",a.filter="blur(4px)",a.beginPath(),a.arc(s/2,r+100,14,0,2*Math.PI),a.fill(),a.fillStyle="rgba(234, 255, 255, 1)",a.filter="blur(1px)",a.beginPath(),a.arc(s/2,r+100,12,0,2*Math.PI),a.fill();const d=a.createLinearGradient(s/2,0,s/2,r);return d.addColorStop(0,"rgba(0, 0, 0, 1)"),d.addColorStop(1,"rgba(0, 0, 0, 0)"),a.globalCompositeOperation="destination-out",a.fillStyle=d,a.fillRect(-o,-o,s+2*o,r+2*o),a.globalCompositeOperation="source-over",i}const b=100,_=[{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}],N=64,E=8,x=2;function C(e,t){const n=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,m.g)("images/stranger-things-spores.png"),e}),[]),[a,s]=(0,i.useState)(w(e,t));return(0,i.useEffect)((()=>{a?function(e,t,n){e.forEach((e=>{e.x=Math.random()*t,e.y=Math.random()*n}))}(a,e,t):s(w(e,t))}),[e,t,a]),function(i){null!==n&&a.forEach((a=>{a.x-=a.directionX*a.velocityX,a.y-=a.directionY*a.velocityY,a.y>t+10?(a.x=Math.random()*e,a.y=-10):a.x<-10&&(a.x=e+10,a.y=Math.random()*t);const s=a.spriteSheetX,r=a.spriteSheetY,o=N,l=N,d=a.x-a.size/2,c=a.y-a.size/2,u=a.size,m=a.size;i.save(),i.globalAlpha*=a.alpha,i.drawImage(n,s,r,o,l,d,c,u,m),i.restore()}))}}function w(e,t){const n=[];for(let i=0;i.5?1:-1,directionY:Math.random()>.5?1:-1,velocityX:r/300,velocityY:r/400})}return n}class I{_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 T{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&&g[this.phase].isInfinite&&this.setPhase(g.findIndex((e=>e.isStartOfFlashlightEnter)))}),15e3*Math.random()+5e3);this.flickerTimerId=e()}stop(){const e=g.findIndex((e=>e.isStartOfExit));this.phase{const{getPercentage:t,isDragging:n=!1,isPlayingStrangerThings:a=!1,progressBar:s}=e,r=(0,i.useMemo)((()=>new I),[]),o=(0,i.useMemo)((()=>new T),[]),l=(0,i.useRef)(null),[d,c]=(0,i.useState)(null),[u,m]=(0,i.useState)(window.innerHeight),[p,h]=(0,i.useState)(window.innerWidth),[k,v]=(0,i.useState)(!1),[y,S]=(0,i.useState)(!1),b=C(p,u),_=f(p,u),N=(0,i.useCallback)((e=>{!n&&a&&(e?o.stop():(o.start(),S(!0)))}),[n,a,o]),E=(0,i.useCallback)((()=>{a&&(o.setPhase(g.findIndex((e=>e.isStartOfFlashlightEnter))),S(!0))}),[a,o]),x=(0,i.useCallback)((()=>{o.stop()}),[o]),w=(0,i.useCallback)((()=>{if(!y)return void v(!0);v(!1);const e=window.innerHeight,t=window.innerWidth;h(t),m(e)}),[y]),O=(0,i.useCallback)((()=>{if(!l.current)return;const{frame:e,lastPhaseFrame:n,phase:i}=o;if(o.frame=e+1,g[i].isEndOfExit)S(!1);else{if(g[i].isInfinite||e-n===g[i].frames&&o.setPhase(i+1),l.current.width=p,l.current.height=u,"normal"!==g[i].name){const e=l.current.getContext("2d");if(!e||!d)return;const n=t();_(e,d,n,i),b(e)}o.animationFrameRequestId=requestAnimationFrame(O)}}),[u,p,_,b,t,d,o]);return(0,i.useEffect)((()=>{window.addEventListener("resize",w);const e=r;return e.enableActivityMonitor(),e.subscribeToActivity(5e3,N),()=>{window.removeEventListener("resize",w),e.disableActivityMonitor(),e.unsubscribeToActivity(N)}}),[r,N,w]),(0,i.useEffect)((()=>{a||o.stop()}),[a,o]),(0,i.useEffect)((()=>{n?E():n||x()}),[n,E,x]),(0,i.useEffect)((()=>{y?(k&&w(),o.animationFrameRequestId=requestAnimationFrame(O)):o.animationFrameRequestId&&cancelAnimationFrame(o.animationFrameRequestId)}),[y,O,w,k,o]),(0,i.useEffect)((()=>{s.current&&c(s.current.getBoundingClientRect())}),[p,u,s]),y?(0,P.jsx)("canvas",{className:A,ref:l,width:p,height:u}):null};var D=n(41836);const R=e=>(0,u.W6)(D.kI,{loadingValue:!1})&&e.isPlayingStrangerThings?(0,P.jsx)(O,{...e}):null;n(95822);var L=n(27704);const F="playback-progressbar",j="playback-progressbar-isInteractive",M="progress-bar",U="x-progressBar-progressBarBg",B="x-progressBar-sliderArea",V="x-progressBar-fillColor",H="VI_bMRxDl9fS6qksct7W",G="sW0M_K97doEB3B4Ts58i",W="DuvrswZugGajIFNXObAr",z="progress-bar__slider",K=({value:e,max:t,step:n,labelText:a,isInteractive:u=!0,forceActiveStyles:m=!1,onDragStart:p,onDragMove:g,onDragEnd:h,onStepForward:k,onStepBackward:v,saberConfig:f=null,isPlayingStrangerThings:y=!1,isAttackOnTitanEasterEggActive:S,...b})=>{const _=(0,i.useRef)(null),{isDragging:N,onMouseDown:E}=(({progressBarRef:e,onDragStart:t,onDragMove:n,onDragEnd:a})=>{const[s,r]=(0,i.useState)(!1),o=(0,i.useRef)(!1),u=(0,d.ky)(),m=(0,i.useRef)(t),p=(0,i.useRef)(n),g=(0,i.useRef)(a);m.current=t,p.current=n,g.current=a;const h=(0,l.y1)((t=>{p.current(c(e,t.clientX)),o.current=!0}),20,{leading:!0,maxWait:20});return{isDragging:s,onMouseDown:(0,i.useCallback)((t=>{const n=t=>{r(!1),h.cancel(),g.current(c(e,t.clientX),{wasDraggedBeforeReleased:o.current}),u?.removeEventListener("mousemove",h),o.current=!1};0===t.button&&(m.current(c(e,t.clientX)),r(!0),u?.addEventListener("mousemove",h),u?.addEventListener("mouseup",n,{once:!0}),o.current=!1)}),[u,e,r,h])}})({progressBarRef:_,onDragStart:p,onDragMove:g,onDragEnd:h}),x=u?100*Math.max(0,Math.min(1,e/t)):0,C=m||N,w=u&&null!==f,I=u&&!(0,o.G)(),T=(({onStepForward:e,onStepBackward:t,value:n})=>(0,l.y1)((i=>{parseFloat(i.target.value)>n?e?.():t?.()}),100,{trailing:!1,leading:!0,maxWait:200}))({onStepForward:k,onStepBackward:v,value:e}),A=(0,i.useCallback)((()=>x),[x]);return(0,P.jsxs)("div",{className:s()(F,{[j]:u}),"":b["data-testid"],children:[(0,P.jsx)(L.q,{disabled:!u,type:"range",min:0,max:t,value:e,step:n,onChange:T,"aria-valuetext":b["aria-valuetext"],children:a}),(0,P.jsxs)("div",{className:s()(M,{[H]:null!==f,[W]:C}),style:{...w?f:null,"--progress-bar-transform":`${x}%`,...S?{"--fg-color":r.G,"--is-active-fg-color":r.G}:null},onMouseDown:E,"":"progress-bar",children:[w?(0,P.jsx)("div",{className:G,"":"progress-bar-saber-overlay"}):null,(0,P.jsxs)("div",{ref:_,className:U,"":"progress-bar-background",children:[(0,P.jsx)("div",{className:B,children:(0,P.jsx)("div",{className:V})}),(0,P.jsx)("div",{className:z})]}),I&&(0,P.jsx)("div",{style:{width:"100%"},children:(0,P.jsx)(R,{getPercentage:A,progressBar:_,isPlayingStrangerThings:y,isDragging:N})})]})]})}},94350:(e,t,n)=>{"use strict";n.d(t,{e:()=>l});var i=n(59496);const a="main-progressRing-circleShadow",s="main-progressRing-circleColor";var r=n(4637);const o=20*Math.PI,l=i.memo((function({percentage:e,size:t,ariaValueText:n},i){const l=o-e/100*o;return(0,r.jsxs)("svg",{height:t,width:t,viewBox:"0 0 24 24",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e),...n?{"aria-valuetext":n}:{},...i,children:[(0,r.jsx)("circle",{className:a,r:"10",cx:"12",cy:"12"}),(0,r.jsx)("circle",{"":"circleColor",className:s,strokeDasharray:`${o} ${o}`,strokeDashoffset:`${l}`,r:"10",cx:"12",cy:"12"}),(0,r.jsx)("rect",{width:"6",height:"6",fill:"white",x:"9",y:"9"})]})}))},97355:(e,t,n)=>{"use strict";n.d(t,{h:()=>v});var i=n(59496),a=n(84875),s=n.n(a),r=n(56162),o=n(58706),l=n(30366),d=n(79475),c=n(3802),u=n(83185);const m="main-playlistRemoveMultipleModal-container",p="main-playlistRemoveMultipleModal-title",g="main-playlistRemoveMultipleModal-description",h="main-playlistRemoveMultipleModal-buttonContainer";var k=n(4637);const v=i.memo((function({onClose:e,onRemove:t,isOpen:n,tracks:a,title:v}){const f=(0,i.useCallback)((n=>{t(a),e(n)}),[t,e,a]);return(0,k.jsx)(u.Z,{shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:e,contentLabel:v,isOpen:n,children:(0,k.jsxs)("div",{className:m,children:[(0,k.jsx)(r.D,{as:"h2",variant:"cello",className:p,children:v}),(0,k.jsx)(r.D,{as:"p",variant:"mesto",className:g,paddingBottom:o.g4V,children:c.ag.get("playlist.remove_multiple_description")}),(0,k.jsxs)("div",{className:s()("encore-light-theme",h),children:[(0,k.jsx)(l.o,{onClick:e,children:c.ag.get("playlist.delete-cancel")}),(0,k.jsx)(d.D,{onClick:f,children:c.ag.get("remove")})]})]})})}))},73854:(e,t,n)=>{"use strict";n.d(t,{Ci:()=>s,m1:()=>o,r7:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)({uris:[],setUris:()=>{},dropOriginUri:void 0,setDropOriginUri:()=>{}}),r=({children:e})=>{const[t,n]=(0,i.useState)([]),[r,o]=(0,i.useState)(void 0);return(0,a.jsx)(s.Provider,{value:{uris:t,setUris:n,dropOriginUri:r,setDropOriginUri:o},children:e})};function o(){return(0,i.useContext)(s).uris}},18761:(e,t,n)=>{"use strict";n.d(t,{Oh:()=>o,aC:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({children:e,mainLandmarkRef:t,lyricsCinemaRef:n,topbarRef:i})=>(0,a.jsx)(s.Provider,{value:{mainLandmarkRef:t,lyricsCinemaRef:n,topbarRef:i},children:e}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("GlobalElementRefsContext used without being initialized.");return e}},90154:(e,t,n)=>{"use strict";n.d(t,{U:()=>o});var i=n(59496),a=n(9407);function s(){return null}var r=n(4637);function o(){const[e]=(0,a.z)("lintHtmlWithCss",!1);let t;return t=s,(0,r.jsx)(i.Suspense,{fallback:null,children:(0,r.jsx)(t,{})})}},67314:(e,t,n)=>{"use strict";n.d(t,{P:()=>c,i:()=>d});var i=n(59496),a=n(85830),s=n(21524),r=n(34553);const o={TRACKLIST_ROW_HEIGHT:"56px",TRACKLIST_HEADER_HEIGHT:"36px"},l=30;function d(){const e=parseInt(o.TRACKLIST_HEADER_HEIGHT,10),t=r.K1+e,{scrollNodeRef:n}=(0,i.useContext)(s.VX);c(n,t,30)}function c(e,t=l,n=l,s=l,r=200){const o=(0,a.y1)((t=>{if(!e.current)return;const n=t<0?-1:1,i=100*t*t;e.current.scrollTop=e.current.scrollTop+n*i}),50,{leading:!0,trailing:!1,maxWait:50}),d=(0,i.useCallback)((()=>{if(!e.current)return;let i=0,a=0,l=null,d=Date.now(),c=0;const u=e.current.getBoundingClientRect(),m=()=>{l&&window.cancelAnimationFrame(l),l=null,o.cancel()},p=()=>{o(c),l=window.requestAnimationFrame(p)},g=e=>{i=e.clientY,a=e.clientX,c=(()=>{const{top:e,right:o,bottom:l,left:c}=u;if(!(a>=c&&a<=o))return 0;const m=e,p=e+t+s,g=l-n-s,h=l;let k=0;const v=i>=m&&i<=p,f=i>=g&&i<=h,y=Date.now()-d;if(v&&y>r)if(ir&&(k=i>h-s?1:(i-g)/(h-n-g));return v||f||(d=Date.now()),k})(),0!==c?l??=window.requestAnimationFrame(p):m()},h=()=>{m(),document.removeEventListener("dragover",g)};document.addEventListener("dragend",h,{once:!0}),document.addEventListener("drop",h,{once:!0}),document.addEventListener("pointerup",h,{once:!0}),document.addEventListener("dragover",g)}),[s,n,t,r,e,o]);(0,i.useEffect)((()=>(document.addEventListener("dragstart",d),()=>{document.removeEventListener("dragstart",d)})),[d])}},35923:(e,t,n)=>{"use strict";n.d(t,{L:()=>v,R:()=>p});var i=n(59496),a=n(72102),s=n(36844),r=n(85735),o=n(34553),l=n(9200),d=n(41836),c=n(9407),u=n(29251),m=n(93614);let p=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=920]="EXPANDED_MAX",e}({});var g=function(e){return e[e.MIN=120]="MIN",e[e.DEFAULT=232]="DEFAULT",e[e.MAX=384]="MAX",e}(g||{});const h=[[p.COLLAPSED,p.COLLAPSED],[p.DEFAULT_MIN,p.DEFAULT_MAX],[p.EXPANDED_MIN,p.EXPANDED_MAX]],k=[[g.MIN,g.MAX]],v=()=>{const e=(0,r.Y)(),[t,n]=(0,c.z)("nav-bar-width",g.DEFAULT),v=(0,s.W6)(d.yA,{loadingValue:!1}),f=(0,s.W6)(d._c,{loadingValue:!1}),{ylxSidebarState:y,setYlxSidebarState:S}=(0,l.U)(),[b,_]=(0,c.z)("ylx-default-state-nav-bar-width",Math.max(p.DEFAULT_MIN,Math.min(Math.round(.23*innerWidth),p.DEFAULT_MAX))),[N,E]=(0,c.z)("ylx-expanded-state-nav-bar-width",Math.max(p.EXPANDED_MIN,Math.min(Math.round(.55*innerWidth),p.EXPANDED_MAX)));let x;switch(y){case l.c.COLLAPSED:x=p.COLLAPSED;break;case l.c.DEFAULT:x=b;break;case l.c.EXPANDED:x=N;break;case null:x=t;break;default:(0,u._)(y),x=t}const C=(0,i.useCallback)((e=>{v?e{const t=w-o.IW-3*e;return v?f?h.filter((([e])=>e<=t)).map((([e,n])=>[e,Math.min(n,t)])):h:k}),[v,w,f]);let T,A;if(v)switch(y){case l.c.COLLAPSED:T=A=p.COLLAPSED;break;case l.c.DEFAULT:T=p.DEFAULT_MIN,A=p.DEFAULT_MAX;break;case l.c.EXPANDED:T=p.EXPANDED_MIN,A=p.EXPANDED_MAX;break;case null:T=0,A=0;break;default:T=0,A=0,(0,u._)(y)}else T=g.MIN,A=g.MAX;return{size:x,setSize:C,minMaxRanges:I,minWidth:T,maxWidth:A,ylxCollapsedStateNavbarWidth:p.COLLAPSED,ylxDefaultStateNavbarWidth:b,ylxExpandedStateNavbarWidth:N}}},85735:(e,t,n)=>{"use strict";n.d(t,{Y:()=>s});var i=n(9200);const a=8;function s(){const{ylxSidebarState:e}=(0,i.U)();return null!==e?a:0}},92141:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,r:()=>o});var i=n(59496),a=n(9407),s=n(4637);const r=e=>Boolean(e);function o({uri:e,children:t,defaultState:n,sortContext:o,localStorageKey:l="sortedState",validator:d=r}){const[c={},u]=(0,a.z)(l,{}),m=(0,i.useRef)(c);(0,i.useEffect)((()=>{m.current=c}));const p=(0,i.useCallback)((t=>{if(JSON.stringify(t)===JSON.stringify(n)){const t={...m.current};delete t[e],u(t)}else u({...m.current,[e]:t})}),[n,u,e]),g=(0,i.useMemo)((()=>{const t=c[e];return{sortState:d(t)?t:n,setSortState:p}}),[c,e,d,n,p]);return(0,s.jsx)(o.Provider,{value:g,children:t})}const l=(e,t,n="sortedState",i=r)=>{const[s={}]=(0,a.z)(n,{}),o=s[e];return i(o)?o:t}},20737:(e,t,n)=>{"use strict";n.d(t,{M:()=>a});var i=n(66155);const a=(e,t)=>"string"==typeof e&&"string"==typeof t?!(e.length>0)||null!==(0,i.B)(e,t):"boolean"!=typeof e||e},66806:(e,t,n)=>{"use strict";n.d(t,{fo:()=>o,hz:()=>l,Vu:()=>d.V});var i=n(59496),a=n(82226),s=n(4637);const r=(0,a.Ue)((e=>({lastFilterState:"",lastFilteredUri:"",setLastState:(t,n)=>{e({lastFilterState:t,lastFilteredUri:n})}}))),o=(0,i.createContext)({setFilter:()=>{throw new Error("setFilter must be used within a FilterProvider")},filter:""}),l=({uri:e,children:t})=>{const{lastFilterState:n,lastFilteredUri:a,setLastState:l}=r.getState(),[d,c]=(0,i.useState)(a===e?n:""),u=(0,i.useCallback)((t=>{c(t),l(t,e)}),[l,e]),m=(0,i.useMemo)((()=>({filter:d,setFilter:u})),[d,u]);return(0,s.jsx)(o.Provider,{value:m,children:t})};var d=n(92141)},50181:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SeeAll:()=>u,default:()=>m});var i=n(59496),a=n(84875),s=n.n(a),r=n(56162),o=n(3802),l=n(63120);const d="search-recentSearches-seeAll";var c=n(4637);const u=(0,i.memo)((function(e){const{link:t,pageId:n,className:i,label:a,state:u,pathname:m,onClick:p}=e;return(0,c.jsx)(l.default,{to:t,className:s()(d,i),pageId:n,state:u,pathname:m,"":e["data-testid"],onClick:p,children:(0,c.jsx)(r.D,{variant:"mestoBold",children:a||o.ag.get("search.see-all")})})})),m=u},82400:(e,t,n)=>{"use strict";n.d(t,{N:()=>T});var i=n(59496),a=n(84875),s=n.n(a),r=n(40576),o=n(62517),l=n(23329),d=n(22991),c=n(79642),u=n(3802),m=n(3289),p=n(64719);const g="pdLDCowVOiUIfeu9hihi",h="yuNKB15IIjFkFJbXil2H",k="zjhp3VC76BipaXjVHuGx",v="x-carousel-carousel",f="x-carousel-button";var y=n(4637);const S=e=>{const{canScrollLeft:t,canScrollRight:n,onClick:i}=e;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(m._,{label:u.ag.get("carousel.left"),children:(0,y.jsx)(p.E,{disabled:!t,size:"sm",onClick:()=>{i("previous")},icon:d.e,ariaLabel:u.ag.get("carousel.left"),tabIndex:-1,className:f})}),(0,y.jsx)(m._,{label:u.ag.get("carousel.right"),children:(0,y.jsx)(p.E,{disabled:!n,size:"sm",onClick:()=>{i("next")},icon:c.V,ariaLabel:u.ag.get("carousel.right"),tabIndex:-1,className:f})})]})};var b=n(59359),_=n(85830),N=n(79102);const E=e=>{const{containerRef:t,onScrollEnd:n}=e,a=(0,N.S)(),[s,r]=(0,i.useState)({canScrollLeft:!1,canScrollRight:!0}),{canScrollLeft:o,canScrollRight:l}=s,d=(0,_.y1)((()=>{r(function(e){let t=!1,n=!1;if(e.current){const{scrollLeft:i,offsetWidth:a,scrollWidth:s}=e.current,r=Math.ceil(Math.abs(i));t=r>0,n=r+a{const e=t.current;return e?.addEventListener("scroll",d),()=>{e?.removeEventListener("scroll",d)}}),[t,d]);return{canScrollLeft:o,canScrollRight:l,scroll:(0,i.useCallback)(((e,n)=>{let i="previous"===e?-1:1;a&&(i*=-1),i*=n.columnCount*n.columnWidth+n.gridGap,t.current?.scrollBy({top:0,left:i})}),[t,a])}};var x=n(57968);const C=i.memo((function({children:e,title:t,seeAllUri:n,pageId:a,total:r,onClickShelfTitle:l,onClickShelfSeeAll:d,onSwipe:c,onClickCarouselControls:u,elementRef:m}){const p=(0,i.useRef)(null),f=(0,i.useRef)(!1),[_,N]=(0,i.useState)({columnCount:-1,columnWidth:-1,minContainerWidth:-1,gridGap:0}),{columnCount:C}=_,w=(0,i.useCallback)((({columnCount:t})=>t>0?e:null),[e]),{canScrollLeft:I,canScrollRight:T,scroll:A}=E({containerRef:p,onScrollEnd:()=>{!1===f.current&&c?.(),f.current=!1}}),P=(0,i.useCallback)((e=>{f.current=!0,A(e,_),u?.(e)}),[_,u,A]),O=(0,i.useCallback)((e=>{N(e)}),[]);if(!Array.isArray(e)||0===e.length)return null;const D=e.length>C&&C>0,R=r>C,L={"--carousel-number-of-items":e.length,"--min-container-width":`${_.minContainerWidth}px`};return(0,y.jsxs)("section",{ref:m,style:L,className:s()(x.Z.shelf,"Shelf"),"aria-label":t,children:[(0,y.jsxs)("div",{className:s()(x.Z.header,h),children:[(0,y.jsx)(b.r,{title:t,seeAllUri:n,pageId:a,hasMoreElements:R,onClickTitle:l,onClickSeeAll:d,className:k}),D&&(0,y.jsx)("div",{className:v,children:(0,y.jsx)(S,{canScrollLeft:I,canScrollRight:T,onClick:P})})]}),(0,y.jsx)(o.T,{className:s()(x.Z.shelfGrid,g),render:w,onLayoutChange:O,ref:p})]})}));C.displayName="BaseCarouselShelf";const w=e=>(0,y.jsx)(r.L,{onError:e=>{(0,l.vK)(e,"Carousel")},children:(0,y.jsx)(C,{...e})});w.displayName="Carousel";var I=n(33570);const T=({index:e,id:t,...n})=>{const{seeAllUri:i}=n,{onClickShelfTitle:a,onClickShelfSeeAll:s,onSwipe:r,onClickCarouselControls:o,elementRef:l,UBIWrapper:d}=(0,I.e)({seeAllUri:i,index:e,id:t});return(0,y.jsx)(d,{children:(0,y.jsx)(w,{...n,onClickShelfTitle:a,onClickShelfSeeAll:s,onSwipe:r,onClickCarouselControls:o,elementRef:l})})}},69527:(e,t,n)=>{"use strict";n.d(t,{q:()=>r});var i=n(5488),a=n(33570),s=n(4637);const r=({index:e,id:t,...n})=>{const{seeAllUri:r}=n,{onClickShelfTitle:o,onClickShelfSeeAll:l,elementRef:d,UBIWrapper:c}=(0,a.e)({seeAllUri:r,index:e,id:t});return(0,s.jsx)(c,{children:(0,s.jsx)(i.P,{...n,onClickShelfTitle:o,onClickShelfSeeAll:l,elementRef:d})})}},5488:(e,t,n)=>{"use strict";n.d(t,{P:()=>E});var i=n(59496),a=n(84875),s=n.n(a),r=n(40576),o=n(62517),l=n(23329),d=n(76084),c=n(56162),u=n(9708),m=n(98306),p=n(3802),g=n(63120);const h="wPxPHYvMnLIjAdubiOBB",k="VFhWb3KBXEqkAi9XtTEQ",v="_HnlZlDZv0UbjotlEX6P";var f=n(4637);const y=(0,i.lazy)((()=>Promise.resolve().then(n.bind(n,50181)))),S=i.memo((function({pretitle:e,title:t,media:n,titleVariant:a="canon",seeAllUri:r,pageId:o,hasMoreElements:l,seeAllLabel:S=p.ag.get("shelf.see-all"),className:b,seeAllProps:_,onClickTitle:N,onClickSeeAll:E}){return(0,f.jsx)(u.w,{"":"list-row-shelf-header",id:"header-only",pretitle:(0,f.jsx)(d.g,{variant:"mesto",semanticColor:"textSubdued",children:e}),className:s()(h,b),title:(0,f.jsx)(d.g,{variant:a,semanticColor:"textBase",children:l?(0,f.jsx)(g.Link,{"":"see-all-link",to:r||"",pageId:o,onClick:N,..."boolean"==typeof l?void 0:l,children:t}):(0,f.jsx)(c.D,{variant:a,semanticColor:"textBase",tabIndex:-1,children:t})}),media:(0,f.jsx)(m.d,{className:v,src:n,circle:!0}),trailing:l&&(0,f.jsx)(i.Suspense,{fallback:!0,children:(0,f.jsx)(y,{link:r||"",className:k,pageId:o,onClick:E,label:S,..."boolean"==typeof l?void 0:l,..._})})})}));var b=n(59359),_=n(57968);const N=i.memo((function({title:e,tagline:t,children:n,seeAllUri:a,showAll:r,className:l="",total:d,testId:c="component",pageId:u,seeAllLabel:m,alwaysShowSeeAll:p=!1,showSeeAll:g=!0,onClickShelfTitle:h,onClickShelfSeeAll:k,elementRef:v,renderSubHeader:y,listRowHeaderProps:N}){const[E,x]=(0,i.useState)(0),C=(0,i.useCallback)((({columnCount:e})=>{x(e)}),[]),w=(0,i.useCallback)((({columnCount:e})=>(0,f.jsx)(f.Fragment,{children:r?n:Array.isArray(n)&&n.filter(((t,n)=>nE||p)&&!!a&&!r);return(0,f.jsxs)("section",{ref:v,className:s()(l,_.Z.shelf,"Shelf"),"":`${c}-shelf`,"aria-label":e,children:[(0,f.jsx)("div",{className:_.Z.header,children:N?(0,f.jsx)(S,{seeAllUri:a,seeAllLabel:m,pageId:u,hasMoreElements:I,onClickTitle:h,onClickSeeAll:k,...N}):(0,f.jsx)(b.r,{title:e,tagline:t,seeAllUri:a,seeAllLabel:m,pageId:u,hasMoreElements:I,onClickTitle:h,onClickSeeAll:k})}),y&&(0,f.jsx)("div",{className:_.Z.subHeader,children:y()}),(0,f.jsx)(o.T,{className:s()(_.Z.shelfGrid,{[_.Z.showAll]:r}),render:w,onLayoutChange:C})]})}));N.displayName="BaseShelf";const E=e=>(0,f.jsx)(r.L,{onError:e=>{(0,l.vK)(e,"Shelf")},children:(0,f.jsx)(N,{...e})})},59359:(e,t,n)=>{"use strict";n.d(t,{r:()=>m});var i=n(59496),a=n(84875),s=n.n(a),r=n(56162),o=n(3802),l=n(50181),d=n(63120),c=n(57968),u=n(4637);const m=i.memo((function({title:e,titleVariant:t="canon",tagline:n,seeAllUri:i,pageId:a,hasMoreElements:m,seeAllLabel:p=o.ag.get("shelf.see-all"),className:g,seeAllProps:h,onClickTitle:k,onClickSeeAll:v}){return(0,u.jsxs)("div",{className:s()(c.Z.topRow,g),children:[(0,u.jsxs)("div",{className:c.Z.titleWrapper,children:[m?(0,u.jsx)(r.D,{as:"h2",variant:t,semanticColor:"textBase",children:(0,u.jsx)(d.Link,{"":"see-all-link",to:i||"",pageId:a,className:c.Z.title,onClick:k,..."boolean"==typeof m?void 0:m,children:e})}):(0,u.jsx)(r.D,{as:"h2",variant:t,semanticColor:"textBase",className:c.Z.title,tabIndex:-1,children:e}),n&&(0,u.jsx)(r.D,{as:"p",variant:"mesto",semanticColor:"textSubdued",children:n})]}),m&&(0,u.jsx)(l.default,{link:i||"",className:c.Z.seeAll,pageId:a,onClick:v,label:p,..."boolean"==typeof m?void 0:m,...h})]})}))},33570:(e,t,n)=>{"use strict";n.d(t,{e:()=>o});var i=n(59496),a=n(79139),s=n(96170),r=n(4637);const o=({seeAllUri:e,index:t,id:n})=>{const{spec:o,logger:l}=(0,s.fU)(a.createDesktopShelfEventFactory,{data:{identifier:n,position:t}}),d=(0,i.useCallback)((()=>{const e=o.swipeUiReveal();l.logInteraction(e)}),[l,o]),c=(0,i.useCallback)((e=>{const t=o.shelfHeaderFactory().shelfCarouselControlsFactory(),n="next"===e?t.shelfCarouselControlsNextFactory():t.shelfCarouselControlsPreviousFactory();l.logInteraction(n.hitUiReveal())}),[l,o]);return{onClickShelfTitle:(0,i.useCallback)((()=>{const t=o.shelfHeaderFactory().shelfHeaderTitleFactory().hitUiNavigate({destination:e??""});l.logInteraction(t)}),[l,e,o]),onClickShelfSeeAll:(0,i.useCallback)((()=>{const t=o.shelfHeaderFactory().shelfHeaderSeeAllFactory().hitUiNavigate({destination:e??""});l.logInteraction(t)}),[l,e,o]),onSwipe:d,onClickCarouselControls:c,elementRef:(0,s.Wi)(o),UBIWrapper:(0,i.useCallback)((({children:e})=>(0,r.jsx)(s.Nh,{spec:o,children:e})),[o])}}},52052:(e,t,n)=>{"use strict";n.d(t,{C:()=>c});var i=n(84875),a=n.n(i),s=n(56162),r=n(28291);const o="dxnMpEuxRQ5Ml60ftDcz",l="jFPYamKaGvZv7JA45KCu";var d=n(4637);const c=({as:e,variant:t,className:n,charCount:i,isLoading:c})=>{const u=(0,r.h)("shimmer");return(0,d.jsx)(s.D,{ref:u,as:e,variant:t,className:a()(o,n,{[l]:c}),style:{width:i?`${i}ch`:void 0},tabIndex:-1,"aria-hidden":!0})}},55477:(e,t,n)=>{"use strict";n.d(t,{A:()=>_});var i=n(59496),a=n(55530),s=n.n(a),r=n(16004),o=n(77675),l=n(56162),d=n(69812),c=n(86613),u=n(11661),m=n(1996),p=n(78115),g=n(99308),h=n(53417),k=n(4637);const v=({heading:e,selected:t,onSelect:n,options:i,sortOrder:a,...s})=>{let r;a&&(a===h.kn.ASC||a===h.kn.SECONDARY_ASC?r=c.C:a!==h.kn.DESC&&a!==h.kn.SECONDARY_DESC||(r=u.B));return(0,k.jsxs)(m.v,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),...s,children:[e?(0,k.jsx)(p.F,{children:e}):null,i.map((({key:e,value:i},a)=>(0,k.jsx)(g.s,{role:"menuitemradio","aria-checked":e===t.key,CheckedIcon:r,onClick:()=>n(e,a),children:i},e)))]})},f="x-sortBox-sortDropdown",y="cvTLPmjt6T7M85EKcB8w",S="SbDHY3fVADNJ4l9qOLQ2",b=({isOpen:e,className:t})=>e?(0,k.jsx)(r.U,{iconSize:16,"aria-hidden":"true",className:t}):(0,k.jsx)(o.i,{iconSize:16,"aria-hidden":"true",className:t}),_=({heading:e,options:t,selected:n,onSelect:a,sortOrder:r,variant:o="mesto",semanticColor:c,disabled:u,onClick:m,ariaLabel:p})=>{const[g]=t;n||(n=g);const h=(0,i.useMemo)((()=>`sortboxlist-${s().create().hex}`),[]);return(0,k.jsx)(d.y,{menu:(0,k.jsx)(v,{selected:n,options:t,onSelect:a,sortOrder:r,heading:e,id:h}),children:(e,t,i)=>(0,k.jsxs)("button",{className:f,onClick:e=>{u||(m?.(e),t(e))},ref:i,type:"button","aria-label":p,role:"combobox","aria-controls":h,"aria-expanded":e,children:[(0,k.jsx)(l.D,{semanticColor:c,variant:o,className:y,children:n.value}),(0,k.jsx)(b,{isOpen:e,className:S})]})})}},24584:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});const i="liKqY2CEkAKTwX2SfNCu",a="fwTMCeAaUoWDj9WcQbgy",s="bEEDwYBSsninmQ7a4QK9";var r=n(84875),o=n.n(r),l=n(40495),d=n(4637);const c=({className:e,noLink:t=!1,customLink:n="/",hasText:r=!1})=>{const c=(0,d.jsxs)("svg",{viewBox:"0 0 167.5 167.5",className:o()(s),children:[(0,d.jsx)("title",{children:"Spotify"}),(0,d.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"})]}),u=(0,d.jsxs)("svg",{viewBox:"0 0 1134 340",className:o()(a),children:[(0,d.jsx)("title",{children:"Spotify"}),(0,d.jsx)("path",{fill:"currentColor",d:"M8 171c0 92 76 168 168 168s168-76 168-168S268 4 176 4 8 79 8 171zm230 78c-39-24-89-30-147-17-14 2-16-18-4-20 64-15 118-8 162 19 11 7 0 24-11 18zm17-45c-45-28-114-36-167-20-17 5-23-21-7-25 61-18 136-9 188 23 14 9 0 31-14 22zM80 133c-17 6-28-23-9-30 59-18 159-15 221 22 17 9 1 37-17 27-54-32-144-35-195-19zm379 91c-17 0-33-6-47-20-1 0-1 1-1 1l-16 19c-1 1-1 2 0 3 18 16 40 24 64 24 34 0 55-19 55-47 0-24-15-37-50-46-29-7-34-12-34-22s10-16 23-16 25 5 39 15c0 0 1 1 2 1s1-1 1-1l14-20c1-1 1-1 0-2-16-13-35-20-56-20-31 0-53 19-53 46 0 29 20 38 52 46 28 6 32 12 32 22 0 11-10 17-25 17zm95-77v-13c0-1-1-2-2-2h-26c-1 0-2 1-2 2v147c0 1 1 2 2 2h26c1 0 2-1 2-2v-46c10 11 21 16 36 16 27 0 54-21 54-61s-27-60-54-60c-15 0-26 5-36 17zm30 78c-18 0-31-15-31-35s13-34 31-34 30 14 30 34-12 35-30 35zm68-34c0 34 27 60 62 60s62-27 62-61-26-60-61-60-63 27-63 61zm30-1c0-20 13-34 32-34s33 15 33 35-13 34-32 34-33-15-33-35zm140-58v-29c0-1 0-2-1-2h-26c-1 0-2 1-2 2v29h-13c-1 0-2 1-2 2v22c0 1 1 2 2 2h13v58c0 23 11 35 34 35 9 0 18-2 25-6 1 0 1-1 1-2v-21c0-1 0-2-1-2h-2c-5 3-11 4-16 4-8 0-12-4-12-12v-54h30c1 0 2-1 2-2v-22c0-1-1-2-2-2h-30zm129-3c0-11 4-15 13-15 5 0 10 0 15 2h1s1-1 1-2V93c0-1 0-2-1-2-5-2-12-3-22-3-24 0-36 14-36 39v5h-13c-1 0-2 1-2 2v22c0 1 1 2 2 2h13v89c0 1 1 2 2 2h26c1 0 1-1 1-2v-89h25l37 89c-4 9-8 11-14 11-5 0-10-1-15-4h-1l-1 1-9 19c0 1 0 3 1 3 9 5 17 7 27 7 19 0 30-9 39-33l45-116v-2c0-1-1-1-2-1h-27c-1 0-1 1-1 2l-28 78-30-78c0-1-1-2-2-2h-44v-3zm-83 3c-1 0-2 1-2 2v113c0 1 1 2 2 2h26c1 0 1-1 1-2V134c0-1 0-2-1-2h-26zm-6-33c0 10 9 19 19 19s18-9 18-19-8-18-18-18-19 8-19 18zm245 69c10 0 19-8 19-18s-9-18-19-18-18 8-18 18 8 18 18 18zm0-34c9 0 17 7 17 16s-8 16-17 16-16-7-16-16 7-16 16-16zm4 18c3-1 5-3 5-6 0-4-4-6-8-6h-8v19h4v-6h4l4 6h5zm-3-9c2 0 4 1 4 3s-2 3-4 3h-4v-6h4z"})]}),m=r?u:c;return t?(0,d.jsx)("div",{className:o()(i,e),children:m}):n.startsWith("https://")?(0,d.jsx)("a",{href:n,className:o()(i,e),children:m}):(0,d.jsx)(l.O,{to:n,className:o()(i,e),children:m})}},90762:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var i=n(84875),a=n.n(i);const s="x-toggle-wrapper",r="x-toggle-indicatorWrapper",o="x-toggle-input",l="x-toggle-indicator";var d=n(4637);const c=({value:e,disabled:t,onSelected:n,id:i,className:c})=>(0,d.jsxs)("label",{className:a()(s,c),children:[(0,d.jsx)("input",{id:i,className:o,type:"checkbox",disabled:t,checked:e,onChange:e=>{const t=e.target.checked;n(t)}}),(0,d.jsx)("span",{className:r,children:(0,d.jsx)("span",{className:l})})]})},91577:(e,t,n)=>{"use strict";n.d(t,{w:()=>c});var i=n(59496),a=n(84875),s=n.n(a),r=n(87995),o=n(36044),l=n(78184),d=n(4637);const c=({children:e,className:t=""})=>{const{elementRef:n}=i.useContext(o.E),a=s()(l.Z.topbarContent,t);return n?(0,r.createPortal)((0,d.jsx)("div",{"":"topbar-content",className:a,children:e}),n):null}},36044:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,y:()=>r});var i=n(59496),a=n(4637);const s=i.createContext({}),r=({children:e})=>{const[t,n]=i.useState();return(0,a.jsx)(s.Provider,{value:{elementRef:t,setElementRef:n},children:e})}},13938:(e,t,n)=>{"use strict";n.d(t,{v:()=>g,J:()=>p});var i=n(84875),a=n.n(i),s=n(59496),r=n(76160),o=n(63120);const l="nLNTsyonBwoRIzAv1AME",d="E4I5I7G2CfW32hLWZaqE",c="w4ZoklZWkrsyrVA34vI8";var u=n(4637);const m=({title:e,uri:t,className:n,onClick:i,position:l})=>{const m=(0,s.useCallback)((e=>{i?.(e,{uri:t,position:l})}),[i,l,t]);return(0,u.jsx)(o.Link,{"aria-label":e,className:a()(d,c,n),to:t,onClick:m,children:(0,u.jsx)(r.A,{as:"span",children:e})})};function p(e){return!!e.uri&&!!e.title}const g=({topics:e,className:t,onClick:n})=>(0,u.jsx)("div",{className:a()(l,t),children:e.filter(p).map(((e,t)=>(0,u.jsx)(m,{title:e.title,uri:e.uri,position:t,onClick:n},e.uri)))})},19671:(e,t,n)=>{"use strict";n.d(t,{i:()=>r,o:()=>o});var i=n(59496),a=n(68640),s=n(4637);const r=(0,i.createContext)({toggleSelected:()=>!1,isSelected:()=>!1,getSelected:()=>[],clearSelected:()=>{},selectAll:()=>{},pushPopSelected:()=>{}});function o({resolveUri:e,resolveUid:t,getItems:n,nrTracks:o,children:l}){const[d,c]=(0,i.useState)({}),u=(0,i.useRef)([{index:0,range:[]}]),m=(0,i.useContext)(a.ZF),{canMoveMultipleItems:p}=m.getCapabilities(),g=e=>n(e,e,{cachedOnly:!0})[0],h=()=>{Object.keys(d).length>0&&c({}),u.current=[{index:0,range:[]}]},k=e=>{const n=g(e);return Boolean(n&&d[t(n,e)])},v=n=>{k(n)?(e=>{const n=g(e),i=t(n,e);c((e=>(delete e[i],{...e}))),u.current.length>1&&u.current.pop()})(n):(n=>{const i=g(n);if(!i)return;const a=e(i),s=t(i,n);a&&s&&(c((e=>({...e,[s]:{uid:s,uri:a,index:n}}))),u.current.push({index:n,range:[]}))})(n)};return(0,s.jsx)(r.Provider,{value:{toggleSelected:(n,i,a)=>{p&&(i||a)||h(),p&&i?(n=>{const i={...d},a=u.current[u.current.length-1];a.range.forEach((e=>{delete i[e]})),a.range=[];const s=Math.min(a.index,n),r=Math.max(a.index,n);for(let n=s;n<=r;n++){const s=g(n);if(!s)continue;const r=e(s),o=t(s,n);r&&o&&(i[o]={uid:o,uri:r,index:n},a.range.push(n))}c(i)})(n):v(n)},isSelected:k,getSelected:()=>Object.values(d).sort(((e,t)=>e.index-t.index)),clearSelected:h,selectAll:()=>{const i=n(0,o,{cachedOnly:!0}),a={},s=Array.from(Array(o).keys());for(let n=0;n<=o;n++){const s=i[n];if(!s)continue;const r=e(s),o=t(s,n);r&&o&&(a[o]={uid:o,uri:r,index:n})}c(a),u.current=[{index:0,range:s}]},pushPopSelected:(e,t)=>{p||h();const n=e+t,i=k(e),a=k(n);a?v(e):i&&!a?v(n):i||a||(v(n),v(e))}},children:l})}},28106:(e,t,n)=>{"use strict";n.d(t,{W:()=>T,c:()=>A});var i=n(59496),a=n(84875),s=n.n(a),r=n(61740),o=n(85830),l=n(50346),d=n(3802),c=n(57314),u=n(3770),m=n(91917),p=n(87417),g=n(39669),h=n(96170),k=n(19671),v=n(23451),f=n(6142),y=n(95663),S=n(82108),b=n(1996),_=n(98340),N=n(45118),E=n(23042),x=n(40778),C=n(4637);const w=i.memo((function({uris:e,uids:t,contextUri:n,removePlaylistItems:i}){const{spec:a}=(0,N.T)(e[0]);return(0,C.jsx)(_.ZP,{value:"multi-select",children:(0,C.jsxs)(b.v,{children:[(0,C.jsx)(x.x9,{spec:a,uris:e}),(0,C.jsx)(x.Qf,{spec:a,uids:t,uris:e,contextUri:n}),(0,C.jsx)(x.ZX,{trackUris:e.filter((e=>(0,l.wj)(e)))}),n&&(0,l.nK)(n)?(0,C.jsx)(x.Xu,{uris:e,uids:t,playlistUri:n||"",removePlaylistItems:i}):null,(0,C.jsx)(E.p,{spec:a,uris:e})]})})}));var I=n(24280);let T=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:n,ariaRowIndex:a,dragMetadata:b,contextUri:_,isPlayable:N,ageRestricted:E,showUnplayableAsEnabled:x=!1,onTriggerPlay:A,onTriggerPaywall:P,isActive:O,onMove:D,onContextMenu:R,onInsert:L,allowedDropTypes:F=[],initialSelectedState:j=!1,spec:M,removePlaylistItems:U,isLocked:B,onDoubleClick:V})=>{const{pushPopSelected:H,toggleSelected:G,isSelected:W,getSelected:z,clearSelected:K}=(0,i.useContext)(k.i),Y=(0,r.I0)(),q=(0,r.v9)(S.QT),Z=(0,f.O)(),Q=(0,i.useRef)(null);let J;const{sectionId:$=0}=b,[X,ee]=(0,i.useState)(T.None),te=(0,p.c)({action:"open"});(0,i.useEffect)((()=>{j&&Q.current&&(G(n,!1,!1),(0,m.Jp)(Q.current))}),[]);const ne=(0,i.useCallback)((e=>e.find((e=>F?.includes(e)))),[F?.includes]),ie=(0,i.useCallback)((e=>{if(e.target!==e.currentTarget)return;let i=[];W(n)?i=z().map((({uri:e})=>e)):(G(n,!1,!1),i=[t]);const{name:a,createdBy:s,sectionId:r}=b;let o=`${a} • ${s}`;i.length>1&&(o=d.ag.get("tracklist.drag.multiple.label",i.length)),Z(e,i,o,_,r)}),[Z,b,z,W,G,n,t,_]),ae=(0,i.useCallback)((e=>{if(ne(Array.from(e.dataTransfer.types))&&Q.current){e.preventDefault();const{top:t,height:n}=Q.current.getBoundingClientRect(),i=e.clientY{ee(T.None)}),[]),re=(0,i.useCallback)((e=>{if(F.length>0){e.preventDefault();const t=e.dataTransfer.getData("text/x-spotify-context"),i=parseInt(e.dataTransfer.getData("text/x-spotify-section"),10)||0,a=z();if(D&&t===_&&$===i&&a.length>0)D(a,n,X,{section:i,origin:i});else if(L){let a=[];F.forEach((t=>{const n=e.dataTransfer.getData(t);n&&(a=a.concat(n.split("\n").map((e=>{const t=(0,l.EC)(e);return t?t.toURI():e}))))})),a.length>0&&L(a,n,X,t,{section:$,origin:i})}}ee(T.None),K()}),[F,D,L,_,n,X,z,K,$]),oe=(0,y.o)(),le=(0,h.$P)(),de=(0,o.y1)((e=>{oe({intent:"play",type:"double-click"});const n=M?le.logInteraction(M.doubleHitPlay({itemToBePlayed:t})):void 0;A(e,n)}),g.s_,{leading:!0,trailing:!1}),ce=(0,i.useCallback)((e=>{M&&P&&le.logInteraction(M.doubleHitShowPaywall({paywalledItem:t})),P?.(e)}),[le,P,M,t]),ue=(0,i.useCallback)((()=>Y((0,c.e2)())),[Y]),me=(0,i.useCallback)((()=>Y((0,v.RM)(t))),[t,Y]);B?J=ce:N?J=de:(E&&!q&&(J=me),J=V||ue);const pe=(0,i.useCallback)((e=>{G(n,e.shiftKey,e.ctrlKey||e.metaKey)}),[G,n]),ge=(0,i.useCallback)((e=>{const t=W(n);if(t||G(n,e.shiftKey,e.ctrlKey||e.metaKey),!R)return;const i=z().map((({uri:e})=>e)),a=z().map((({uid:e})=>e));i.length>1&&t?te(e,(0,C.jsx)(w,{uris:i,uids:a,contextUri:_,removePlaylistItems:U})):R(e)}),[W,n,R,z,G,te,_,U]),he=(0,i.useCallback)((e=>{if(!Q.current?.contains(e.target))return;const t="ArrowUp"===e.key?-1:1;["ArrowUp","ArrowDown"].includes(e.key)&&(e.shiftKey?H(n,t):G(n+t,!1,!1))}),[H,G,n]),ke=(0,h.Wi)(M),ve=(0,i.useCallback)((e=>{Q.current=e,ke?.(e)}),[ke]),fe=W(n),ye=fe&&W(n-1),Se=fe&&W(n+1);return(0,C.jsx)(u.RX,{rowIndex:a,"aria-selected":fe,children:(0,C.jsx)("div",{"":"tracklist-row",className:s()(I.Z.trackListRow,I.Z.trackListRowGrid,{[I.Z.active]:O,[I.Z.disabled]:!N,[I.Z.showDisabledAsEnabled]:x,[I.Z.selected]:fe,[I.Z.isPreviousRowSelected]:ye,[I.Z.isNextRowSelected]:Se,[I.Z.dropTargetBefore]:X===T.Before,[I.Z.dropTargetAfter]:X===T.After}),onDoubleClick:J,onClick:pe,onContextMenu:ge,draggable:!0,onKeyDown:he,onDragStart:ie,onDragOver:ae,onDragLeave:se,onDrop:re,ref:ve,children:e})})}},1733:(e,t,n)=>{"use strict";n.d(t,{T:()=>d});var i=n(59496),a=n(6142),s=n(54299),r=n(14280),o=n(63120),l=n(4637);const d=({children:e,uri:t,name:n,onClick:d,index:c})=>{const u=(0,a.O)([t],n),m=(0,i.useCallback)((()=>{d?.(t,c)}),[d,t,c]);return(0,l.jsx)(s._,{menu:(0,l.jsx)(r.m,{uri:t}),children:(0,l.jsx)(o.Link,{draggable:!0,to:t,onDragStart:u,dir:"auto",onClick:m,children:e})})}},67509:(e,t,n)=>{"use strict";n.d(t,{O:()=>r});var i=n(56162),a=n(3802),s=n(4637);const r=({dateAdded:e,prefix:t})=>{let n=e.getTime()>0&&a.ag.formatRelativeDate(e,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"});return n&&t&&(n=`${t} ${n}`),(0,s.jsx)(i.D,{variant:"mesto",semanticColor:"textSubdued",children:n})}},8754:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var i=n(59496),a=n(84875),s=n.n(a),r=n(56162),o=n(27509),l=n(24280),d=n(4637);const c=(0,i.memo)((function({duration:e,className:t}){return(0,d.jsx)(r.D,{as:"div",variant:"mesto",className:s()(t,l.Z.rowDuration),semanticColor:"textSubdued",children:(0,o.m)(e)})}))},87854:(e,t,n)=>{"use strict";n.d(t,{D:()=>h});var i=n(59496),a=n(84875),s=n.n(a),r=n(85830),o=n(91546),l=n(39669),d=n(66604),c=n(96170),u=n(95663),m=n(24843),p=n(24280),g=n(4637);const h=i.forwardRef((function({className:e="",children:t,onClick:n,isPlaying:a,isActive:h,isLocked:k=!1,playAriaLabel:v,uri:f,spec:y},S){const b=(0,u.o)(),[_,N]=(0,i.useState)(!1),E=(0,c.$P)(),x=(0,r.y1)((e=>{const{currentTarget:t,detail:i}=e;let s;if(e.stopPropagation(),i>0&&t&&t.blur(),b({intent:a?"pause":"play",type:"click"}),y&&!k){const e=y.playbackButtonFactory();let t;t=h&&a?e.hitPause({itemToBePaused:f}):h&&!a?e.hitResume({itemToBeResumed:f}):e.hitPlay({itemToBePlayed:f}),s=E.logInteraction(t)}else y&&E.logInteraction(y.playbackButtonFactory().hitShowPaywall({paywalledItem:f}));n(e,s)}),l.s_,{leading:!0,trailing:!1});(0,i.useEffect)((()=>{const e=()=>{N(!0)},t=()=>{N(!1)};return a&&(N(document.hasFocus()),window.addEventListener("focus",e),window.addEventListener("blur",t)),()=>{window.removeEventListener("focus",e),window.removeEventListener("blur",t)}}),[a]);const C=!(0,d.T)()&&_;return(0,g.jsxs)("div",{className:s()(p.Z.rowMarker,e),children:[a?(0,g.jsx)("img",{className:p.Z.playingIcon,width:"14",height:"14",alt:"",src:(0,o.g)(C?"images/equaliser-animated-green.gif":"images/equaliser-green.svg")}):t,(0,g.jsx)(m.I,{className:p.Z.rowPlayPauseButton,iconClassName:p.Z.rowPlayPauseIcon,onClick:x,isPlaying:a,isLocked:k,playAriaLabel:v,ref:S})]})}))},90755:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});var i=n(56162),a=n(24280),s=n(4637);const r=({children:e})=>e?"number"==typeof e?(0,s.jsx)(i.D,{variant:"ballad",className:a.Z.number,children:e}):(0,s.jsx)("span",{className:a.Z.icon,children:e}):null},17810:(e,t,n)=>{"use strict";n.d(t,{Lb:()=>p,hU:()=>g,uD:()=>h});var i=n(59496),a=n(84875),s=n.n(a),r=n(24280),o=n(4637);const l=i.memo((function(){return(0,o.jsx)("div",{className:s()(r.Z.placeholder,r.Z.rowSectionVariable,r.Z.placeholderVariable)})})),d=i.memo((function(){return(0,o.jsx)("div",{className:s()(r.Z.placeholder,r.Z.rowSectionEnd,r.Z.placeholderEnd)})})),c=i.memo((function(){return(0,o.jsx)("div",{className:s()(r.Z.placeholder,r.Z.rowSectionIndex,r.Z.placeholderIndex)})})),u=i.memo((function(){return(0,o.jsx)("div",{className:s()(r.Z.placeholder,r.Z.rowSectionStart,r.Z.placeholderStartWithCoverImage)})})),m=i.memo((function(){return(0,o.jsx)("div",{className:s()(r.Z.placeholder,r.Z.rowSectionStart,r.Z.placeholderStart)})})),p=i.memo((function({height:e}){return(0,o.jsxs)("div",{className:r.Z.trackListRowGrid,style:{height:e},"":"tracklist-row-placeholder",children:[(0,o.jsx)(c,{}),(0,o.jsx)(u,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(d,{})]})})),g=i.memo((function({height:e}){return(0,o.jsxs)("div",{className:r.Z.trackListRowGrid,style:{height:e},"":"tracklist-row-placeholder",children:[(0,o.jsx)(u,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(d,{})]})})),h=i.memo((function({height:e}){return(0,o.jsxs)("div",{className:r.Z.trackListRowGrid,style:{height:e},"":"tracklist-row-placeholder",children:[(0,o.jsx)(c,{}),(0,o.jsx)(m,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(l,{}),(0,o.jsx)(d,{})]})}))},57858:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var i=n(3770),a=n(24280),s=n(4637);const r=({children:e,ariaColIndex:t,ariaSort:n,role:r="gridcell"})=>"columnheader"===r?(0,s.jsx)(i.YU,{columnIndex:t,ariaSort:n,className:a.Z.rowSectionEnd,children:e}):(0,s.jsx)(i.id,{columnIndex:t,className:a.Z.rowSectionEnd,children:e})},60768:(e,t,n)=>{"use strict";n.d(t,{U:()=>r});var i=n(3770),a=n(24280),s=n(4637);const r=({children:e,ariaColIndex:t,ariaSort:n,role:r="gridcell"})=>"columnheader"===r?(0,s.jsx)(i.YU,{columnIndex:t,ariaSort:n,className:a.Z.rowSectionVariable,children:e}):(0,s.jsx)(i.id,{columnIndex:t,className:a.Z.rowSectionVariable,children:e})},84202:(e,t,n)=>{"use strict";n.d(t,{K:()=>l});var i=n(84875),a=n.n(i),s=n(56162),r=n(24280),o=n(4637);const l=({children:e})=>(0,o.jsx)(s.D,{className:a()(r.Z.rowSubTitle,"standalone-ellipsis-one-line"),variant:"mesto",semanticColor:"textSubdued",children:e})},91944:(e,t,n)=>{"use strict";n.d(t,{W:()=>d});var i=n(84875),a=n.n(i),s=n(56162),r=n(45265),o=n(24280),l=n(4637);const d=({titleText:e,children:t})=>{const n=(0,l.jsx)(s.D,{variant:"ballad",semanticColor:"textBase",dir:"auto",className:a()(o.Z.rowTitle,"standalone-ellipsis-one-line"),as:"div",children:t});return(0,l.jsx)(r.w,{label:e,children:n})}},29939:(e,t,n)=>{"use strict";n.d(t,{Gb:()=>m,HI:()=>u,MI:()=>l,P0:()=>o,RJ:()=>d,kz:()=>p,zq:()=>c});var i=n(59496),a=n(92141),s=n(72502),r=n(4637);const o=[s.Q.ADDED_AT,s.Q.TITLE,s.Q.ALBUM],l=[s.Q.INDEX,s.Q.TITLE,s.Q.ALBUM,s.Q.DURATION],d=[s.Q.INDEX,s.Q.TITLE,s.Q.ALBUM,s.Q.DURATION],c=[s.Q.INDEX,s.Q.TITLE,s.Q.ALBUM,s.Q.ALBUM_OR_PODCAST,s.Q.ADDED_BY,s.Q.ADDED_AT,s.Q.DURATION],u={column:null,order:s.k.NONE},m=(0,i.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a TracksSortProvider")},sortState:u}),p=i.memo((function({uri:e,children:t}){return(0,r.jsx)(a.r,{uri:e,defaultState:u,sortContext:m,children:t})}))},61304:(e,t,n)=>{"use strict";n.d(t,{o:()=>u});var i=n(59496),a=n(3802),s=n(96170),r=n(7813),o=n(1733),l=n(24280),d=n(4637);const c=({name:e,uri:t,nonInteractive:n,children:i,onClick:a,index:s})=>n?(0,d.jsx)("span",{className:l.Z.text,children:i}):(0,d.jsx)(o.T,{name:e,uri:t,onClick:a,index:s,children:i},t),u=({artists:e,filter:t,nonInteractive:n=!1,spec:o})=>{const l=(0,s.$P)(),u=(0,i.useCallback)(((e,t)=>{o&&l.logInteraction(o.artistLinkFactory({position:t??0,uri:e}).hitUiNavigate({destination:e}))}),[l,o]);return(0,d.jsx)(d.Fragment,{children:e.map((({uri:e,name:i},s)=>[s>0&&a.ag.getSeparator(),(0,d.jsx)(c,{uri:e,name:i,nonInteractive:n,onClick:u,index:s,children:(0,d.jsx)(r.o,{searchWords:[t??""],textToHighlight:i})},e)]))})}},61108:(e,t,n)=>{"use strict";n.d(t,{p_:()=>ne,BM:()=>L,dS:()=>X,T6:()=>I,g3:()=>N,Op:()=>z.O,A$:()=>F.A,bt:()=>ce,qS:()=>Z,lD:()=>m,VG:()=>f,vm:()=>K,Du:()=>S.D,Zv:()=>$,km:()=>y.k,Lb:()=>H.Lb,JR:()=>me,fx:()=>W,mU:()=>V.m,Dd:()=>M,vZ:()=>U,UA:()=>B.U,K9:()=>E.K,Wh:()=>b.W});var i=n(84875),a=n.n(i),s=n(42006),r=n(21586),o=n(57318),l=n(34058),d=n(24280),c=n(4637);const u=({isVideo:e,isEpisode:t})=>{let n=r.F;e?n=o.O:t&&(n=l.J);const i=t&&!e?4:0;return(0,c.jsx)("div",{className:a()(d.Z.rowImage,d.Z.rowImageFallback),style:{borderRadius:i||void 0},children:(0,c.jsx)(n,{iconSize:16})})},m=({src:e,isVideo:t=!1,isEpisode:n=!1})=>e?(0,c.jsx)(s.E,{className:a()(d.Z.rowImage,{[d.Z.rowImageVideo]:t}),draggable:!1,src:e,loading:"eager",width:"40",height:"40",radius:n&&!t?4:0,children:(0,c.jsx)(u,{isVideo:t,isEpisode:n})}):(0,c.jsx)(u,{isVideo:t,isEpisode:n});var p=n(85830),g=n(39669),h=n(96170),k=n(95663),v=n(24843);const f=({uri:e,src:t,playAriaLabel:n,onClick:i,isPlaying:s,isActive:r,isLocked:o,isEpisode:l,isVideo:u,spec:f})=>{const y=(0,k.o)(),S=(0,h.$P)(),b=(0,p.y1)((t=>{let n;if(y({type:"click",intent:s?"pause":"play"}),f){const t=f.playbackButtonFactory();let i;i=r&&s?t.hitPause({itemToBePaused:e}):r&&!s?t.hitResume({itemToBeResumed:e}):t.hitPlay({itemToBePlayed:e}),n=S.logInteraction(i)}i(t,n)}),g.s_,{leading:!0,trailing:!1});return(0,c.jsxs)("div",{className:d.Z.rowImageWithPlay,children:[(0,c.jsx)(m,{src:t,isEpisode:l,isVideo:u}),(0,c.jsx)(v.I,{className:a()(d.Z.rowPlayPauseButton,d.Z.rowImagePlayPauseButton,{[d.Z.rowImagePlayPauseButtonPlaying]:s}),iconClassName:d.Z.rowPlayPauseIcon,onClick:b,isPlaying:s,isLocked:o,playAriaLabel:n})]})};var y=n(90755),S=n(87854),b=n(91944),_=n(56162);const N=({children:e})=>e?(0,c.jsx)(_.D,{variant:"ballad",className:d.Z.rowBadges,semanticColor:"textSubdued",children:e}):null;var E=n(84202),x=n(59496),C=n(3802),w=n(1733);const I=({artists:e,spec:t})=>{const n=(0,h.$P)(),i=(0,x.useCallback)(((e,i)=>{t&&n.logInteraction(t.artistLinkFactory({position:i??0,uri:e}).hitUiNavigate({destination:e}))}),[n,t]);return e?(0,c.jsx)(c.Fragment,{children:e.map((({uri:e,name:t},n)=>[n>0&&C.ag.getSeparator(),(0,c.jsx)(w.T,{name:t,uri:e,onClick:i,index:n,children:t},e)]))}):null};var T=n(50346),A=n(6142),P=n(54299),O=n(88513),D=n(762),R=n(63120);const L=({children:e,uri:t,name:n,nonInteractive:i=!1,creatorUri:s,spec:r})=>{let o=null;const l=(0,A.O)([t],n),u=(0,h.$P)(),m=(0,x.useCallback)((()=>{r&&u.logInteraction(r.albumLinkFactory({uri:t}).hitUiNavigate({destination:t}))}),[u,r,t]);return i?(0,c.jsx)("span",{className:a()("standalone-ellipsis-one-line",d.Z.text),children:e}):((0,T.YF)(t)&&(o=(0,c.jsx)(O.Y,{uri:t,artistUri:s})),(0,T.RS)(t)&&(o=(0,c.jsx)(D.M,{uri:t})),(0,c.jsx)(P._,{menu:o,children:(0,c.jsx)(_.D,{variant:"mesto",children:(0,c.jsx)(R.Link,{draggable:!0,onDragStart:l,className:a()("standalone-ellipsis-one-line"),to:t,dir:"auto",onClick:m,children:e})})}))};var F=n(8754),j=n(3770);const M=({children:e,ariaColIndex:t,ariaSort:n,role:i="gridcell"})=>"columnheader"===i?(0,c.jsx)(j.YU,{columnIndex:t,ariaSort:n,className:d.Z.rowSectionIndex,children:e}):(0,c.jsx)(j.id,{columnIndex:t,className:d.Z.rowSectionIndex,children:e}),U=({children:e,ariaColIndex:t,ariaSort:n,role:i="gridcell"})=>"columnheader"===i?(0,c.jsx)(j.YU,{columnIndex:t,ariaSort:n,className:d.Z.rowSectionStart,children:e}):(0,c.jsx)(j.id,{columnIndex:t,className:d.Z.rowSectionStart,children:e});var B=n(60768),V=n(57858),H=n(17810),G=n(75252);const W=({releaseDate:e})=>(0,c.jsx)(_.D,{variant:"mesto",children:(0,G.rL)((0,G.RX)(e))});var z=n(67509);const K=({children:e})=>(0,c.jsx)("div",{className:d.Z.rowMainContent,children:e});var Y=n(46525),q=n(66405);const Z=({uri:e,type:t,spec:n})=>{const i=(0,h.$P)(),a=(0,x.useCallback)((t=>{if(!n)return;const a=t?n.heartButtonFactory().hitLike({itemToBeLiked:e}):n.heartButtonFactory().hitRemoveLike({itemNoLongerLiked:e});i.logInteraction(a)}),[n,i,e]);return"episode"===t?(0,c.jsx)(Y.w,{uri:e,className:d.Z.rowHeartButton,onClick:a}):(0,c.jsx)(q.B,{uri:e,className:d.Z.rowHeartButton,onClick:a})};var Q=n(69812),J=n(35394);const $=({menu:e,label:t,spec:n})=>{const i=(0,h.$P)(),a=(0,x.useCallback)((()=>{n&&i.logInteraction(n.contextButtonFactory().hitUiReveal())}),[i,n]);return(0,c.jsx)(Q.y,{menu:e,onShow:a,children:(0,c.jsx)(J.z,{className:d.Z.rowMoreButton,size:16,label:t})})},X=({children:e})=>(0,c.jsx)(_.D,{dir:"auto",className:a()(d.Z.rowTitle,d.Z.discTitle,"standalone-ellipsis-one-line"),as:"div",variant:"balladBold",children:e});var ee=n(62344),te=n(68776);const ne=({uri:e,imageUrl:t,name:n,showAvatar:i,spec:a})=>{const s=(0,h.$P)(),r=(0,x.useCallback)((()=>{a&&s.logInteraction(a.addedByLinkFactory({position:0,uri:e}).hitUiNavigate({destination:e}))}),[s,a,e]);return(0,c.jsx)(P._,{menu:(0,c.jsx)(te.I,{uri:e}),children:(0,c.jsxs)(R.Link,{className:d.Z.addedBy,to:e,onClick:r,children:[i&&(0,c.jsx)(ee.q,{images:[{url:t,width:null,height:null}],label:n,width:24,userIconSize:16}),(0,c.jsx)(_.D,{variant:"mesto",className:"standalone-ellipsis-one-line",children:n})]})})};var ie=n(61740),ae=n(25899),se=n(85270),re=n(37409),oe=n(99948),le=n(6664),de=n(73538);const ce=({isDisliked:e,feedbackPath:t,feedbackUri:n,deleteFeedbackPath:i,spec:a,onClick:s,name:r,contextUri:o})=>{const l=(0,h.$P)(),u=(0,re.g)(),m=(0,ie.I0)(),{uri:p}=(0,oe.Y)((e=>({uri:e?.item?.uri})),((e,t)=>e?.uri===t?.uri)),g=(0,x.useCallback)((async()=>{n&&(await se.x2.deleteFeedback(ae.b.getInstance(),i,n),s?.(),a&&o&&l.logInteraction(a.addRecommendationButtonFactory().hitAddToPlaylist({playlist:o,itemToBeAdded:n})))}),[i,n,s,l,o,a]),k=(0,x.useCallback)((async()=>{n&&(await se.x2.setFeedback(ae.b.getInstance(),t,n),p===n&&u.skipToNext(),s?.(),m((0,le.Oh)(r)),a&&o&&l.logInteraction(a.removeRecommendationButtonFactory().hitRemoveRecommendation({recommendedItemUri:n,contextUri:o})))}),[n,t,p,s,m,r,a,o,u,l]);return(0,c.jsx)(de.s,{className:d.Z.rowFeedbackButton,size:16,onClick:e?g:k,isDisliked:e})};var ue=n(34725);const me=({stationURI:e,trackURI:t})=>{const n=(0,ue.j)(e,t);return(0,c.jsx)(de.s,{className:d.Z.rowFeedbackButton,size:16,onClick:n})}},53417:(e,t,n)=>{"use strict";n.d(t,{Ym:()=>W.Ym,h_:()=>W.h_,kn:()=>I.k,QD:()=>I.Q,UT:()=>W.UT,dx:()=>W.dx,l0:()=>W.l0,dN:()=>j,rc:()=>M,iJ:()=>W.iJ,YK:()=>W.YK,cp:()=>W.cp,Lb:()=>z.Lb,uD:()=>z.uD,hU:()=>z.hU,e9:()=>W.e9,pt:()=>W.pt,Pv:()=>G});var i=n(59496),a=n(84875),s=n.n(a),r=n(3802),o=n(3770),l=n(40115),d=n(69040),c=n(21524),u=n(22345),m=n(61108),p=n(66806);const g=e=>{const{filter:t}=(0,i.useContext)(p.fo),n=(0,i.useRef)(!1);(0,i.useEffect)((()=>{n.current=!0;const e=setTimeout((()=>{n.current=!1}),1e3);return()=>{clearTimeout(e)}}),[t]),(0,i.useEffect)((()=>{""===t&&n.current&&e()}))};var h=n(50346),k=n(46895),v=n(46997),f=n(19671),y=n(24280);const S=(e,t,n,a)=>{const{clearSelected:s,selectAll:r,getSelected:o}=(0,i.useContext)(f.i),l=(0,i.useCallback)((()=>{if(!e.current)return;const i=document.querySelector(`.${y.Z.trackList}`),a=i?.isEqualNode(e.current)||!1,s=document.activeElement?.closest(`.${y.Z.trackList}`);(s?.isEqualNode(e.current)||!1||a&&!s)&&(t?n().then((()=>{r()})):r())}),[e,t,n,r]),d=(0,i.useCallback)((async(e,t)=>{const n=o().map((({uri:e})=>t?e:(0,h.EC)(e)?.toURL())).join("\n");n.length&&await e(n)}),[o]),c=(0,i.useCallback)((t=>{if(e.current?.contains(document.activeElement)){const e=o();if(0===e.length)return;a(e,(()=>{s()}),t)}}),[s,o,a,e]),u=(0,i.useCallback)((async e=>{await d(e,!1),c(!0)}),[d,c]);return(0,k.gs)(u),(0,k.TQ)(d),(0,v.eY)(v.O4.SELECT_ALL,l),(0,v.eY)(v.O4.DELETE,(()=>c())),{handleDelete:c}};var b=n(91929),_=n(77675),N=n(16004),E=n(19281),x=n(56162),C=n(63258),w=n(3289),I=n(72502),T=n(4637);var A=n(34553);const P=()=>{},O={[I.Q.INDEX]:()=>(0,T.jsx)(T.Fragment,{children:"#"}),[I.Q.TITLE]:({className:e,children:t,onSort:n,as:i="div",alternativeText:a,columnIndex:o})=>(0,T.jsxs)(i,{className:s()(y.Z.column,e),onClick:()=>n(I.Q.TITLE,o),children:[(0,T.jsx)(x.D,{variant:"mesto",className:"standalone-ellipsis-one-line",children:a||r.ag.get("tracklist.header.title")}),t]}),[I.Q.PLAYS]:()=>(0,T.jsx)(x.D,{variant:"mesto",className:y.Z.playsHeader,children:r.ag.get("tracklist.header.plays")}),[I.Q.ADDED_BY]:({className:e,children:t,onSort:n,as:i="div",columnIndex:a})=>(0,T.jsxs)(i,{className:s()(y.Z.column,e),onClick:()=>n(I.Q.ADDED_BY,a),children:[(0,T.jsx)(x.D,{variant:"mesto",className:"standalone-ellipsis-one-line",children:r.ag.get("tracklist.header.added-by")}),t]}),[I.Q.ADDED_AT]:({className:e,children:t,onSort:n,as:i="div",columnIndex:a})=>(0,T.jsxs)(i,{className:s()(y.Z.column,e),onClick:()=>n(I.Q.ADDED_AT,a),children:[(0,T.jsx)(x.D,{variant:"mesto",className:"standalone-ellipsis-one-line",children:r.ag.get("tracklist.header.date-added")}),t]}),[I.Q.RELEASE_DATE]:({className:e,children:t,as:n="div"})=>(0,T.jsxs)(n,{className:s()(y.Z.column,e),children:[(0,T.jsx)(x.D,{variant:"mesto",className:s()("standalone-ellipsis-one-line",e),children:r.ag.get("tracklist.header.release-date")}),t]}),[I.Q.DURATION]:({className:e,children:t,onSort:n,as:i="div",columnIndex:a})=>(0,T.jsx)(w._,{label:r.ag.get("tracklist.header.duration"),children:(0,T.jsxs)(i,{"aria-label":r.ag.get("tracklist.header.duration"),className:s()(y.Z.column,y.Z.durationHeader,e),onClick:()=>n(I.Q.DURATION,a),children:[t,(0,T.jsx)(C.q,{iconSize:16})]})}),[I.Q.EVENT_DATE]:({className:e,children:t,as:n="div"})=>(0,T.jsxs)(n,{className:s()(y.Z.column,e),children:[(0,T.jsx)(x.D,{variant:"mesto",className:s()("standalone-ellipsis-one-line",e),children:r.ag.get("tracklist.header.event")}),t]}),[I.Q.ACTIONS]:({className:e})=>(0,T.jsx)("div",{"aria-label":r.ag.get("tracklist.header.actions"),className:s()(y.Z.column,y.Z.actionsHeader,e)}),[I.Q.ALBUM]:({className:e,children:t,onSort:n,as:i="div",columnIndex:a})=>(0,T.jsxs)(i,{className:s()(y.Z.column,e),onClick:()=>n(I.Q.ALBUM,a),children:[(0,T.jsx)(x.D,{variant:"mesto",className:"standalone-ellipsis-one-line",children:r.ag.get("tracklist.header.album")}),t]}),[I.Q.ALBUM_OR_PODCAST]:({className:e,children:t,onSort:n,as:i="div",columnIndex:a})=>(0,T.jsxs)(i,{className:s()(y.Z.column,e),onClick:()=>n(I.Q.ALBUM_OR_PODCAST,a),children:[(0,T.jsx)(x.D,{variant:"mesto",className:s()("standalone-ellipsis-one-line",e),children:r.ag.get("tracklist.header.album-or-podcast")}),t]}),[I.Q.ALBUM_OR_SHOW]:({className:e,children:t,onSort:n,as:i="div",columnIndex:a})=>(0,T.jsxs)(i,{className:s()(y.Z.column,e),onClick:()=>n(I.Q.ALBUM_OR_SHOW,a),children:[(0,T.jsx)(x.D,{variant:"mesto",className:s()("standalone-ellipsis-one-line",e),children:r.ag.get("music_and_talk.album_or_show")}),t]}),get[I.Q.ADD](){throw Error("Add has no corresponding column header component")},get[I.Q.ARTIST](){throw Error("Artist has no corresponding column header component")}},D=(e,t,n)=>(i,a,o)=>{let l=m.UA;const d=((e,t,n)=>n.has(e)?t.column!==e?I.k.NONE:t.order:I.k.NONE)(i,t,e),c=O[i];0===a&&i===I.Q.INDEX?l=m.Dd:1===a&&o[0]===I.Q.INDEX||0===a?l=m.vZ:a===o.length-1&&(l=m.mU);const u=e.has(i),p=u?n:P,g=(0,E.b3)(d),h=(0,E.VH)(d);let k;g&&(k="ascending"),h&&(k="descending"),d===I.k.NONE&&(k="none");const v=(0,E.cB)(i,d)?r.ag.get("card.tag.artist"):void 0;return(0,T.jsx)(l,{role:"columnheader",ariaColIndex:a,ariaSort:k,children:(0,T.jsxs)(c,{className:s()({[y.Z.sortable]:u}),onSort:p,alternativeText:v,as:u?"button":"div",columnIndex:a,children:[h&&(0,T.jsx)(_.i,{iconSize:16,semanticColor:"textBrightAccent",className:y.Z.arrow,"aria-hidden":"true"}),g&&(0,T.jsx)(N.U,{iconSize:16,className:y.Z.arrow,semanticColor:"textBrightAccent","aria-hidden":"true"})]})},i)},R=({columns:e,sortableColumns:t,onSort:n,sortState:a,top:r=A.K1})=>{const{scrollNodeRef:l}=i.useContext(c.VX),{ref:d,inView:u}=(0,b.YD)({threshold:[1],root:l.current,rootMargin:`-${r+1}px 100000px 0px 100000px`,initialInView:!0});return(0,T.jsx)("div",{className:s()(y.Z.trackListHeader,{[y.Z.trackListHeaderStuck]:!u}),ref:d,style:{top:r},children:(0,T.jsx)(o.RX,{rowIndex:0,className:s()(y.Z.trackListHeaderRow,y.Z.trackListRowGrid),children:e.map(D(t,a,n))})})},L={column:null,order:I.k.NONE},F=20,j=56,M=64,U=(e,t,n)=>{const i=t?1:0;return e<504?Math.min(2+i,n):e<728?Math.min(3+i,n):e<984?Math.min(4+i,n):e<1208?Math.min(5+i,n):Math.min(6+i,n)},B=(e,t)=>t.toString();function V({resolveUri:e,resolveUid:t=B,tracks:n,nrTracks:i,fetchTracks:a,limit:s=100,...r}){const{getItems:o,nrValidItems:d,invalidateCache:c,cacheAll:u,hasItems:m}=(0,l.Q)({nrItems:i,fetch:a,limit:s,initialItems:n});return(0,T.jsx)(f.o,{resolveUri:e,resolveUid:t,getItems:o,nrTracks:d,children:(0,T.jsx)(H,{...r,resolveUri:e,resolveUid:t,getItems:o,nrTracks:d,invalidateCache:c,cacheAll:u,hasItems:m})})}function H({nrTracks:e,renderRow:t,sortableColumns:n=new Set,sortState:a=L,onSort:l=(()=>{}),onRemove:h=(()=>{}),canFetchAllTracks:k=!1,rowPlaceholder:v=m.Lb,hasHeaderRow:b=!1,columns:_,outerRef:N,outerDomRef:E,ariaLabel:x,testID:C="track-list",resolveUid:w,resolveUri:A,headerTop:P,getItems:O,invalidateCache:D,cacheAll:B,hasItems:V,isConcertPlaylist:H}){const{scrollNodeRef:G}=(0,i.useContext)(c.VX),{clearSelected:W,getSelected:z}=(0,i.useContext)(f.i),{filter:K}=(0,i.useContext)(p.fo),Y=(0,i.useRef)(null),q=(0,i.useRef)({firstIndex:-1,lastIndex:-1}),[Z,Q]=(0,i.useState)(_.length),J=E??Y,$=_.includes(I.Q.INDEX),X=r.ag.getLocale()===r.go.ar?M:j,{handleDelete:ee}=S(J,k,B,h),te=(0,i.useCallback)((()=>{if(!J.current)return;const e=J.current.offsetWidth,t=U(e,$,_.length);Q(t)}),[_,$,J]);(0,u.y)({refOrElement:J,observeOnly:"width",onResize:te}),(0,i.useEffect)((()=>{te()}),[te]),(0,i.useEffect)((()=>{const e=e=>{J.current&&e.target instanceof Node&&(J.current.contains(e.target)||"INPUT"!==e.target.tagName&&W())};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}}),[W,J]);const ne=(0,i.useCallback)((e=>{G.current&&(G.current.scrollTop=e*X)}),[G,X]),ie=(0,i.useCallback)((t=>{if(k&&t.length>0){const n=[];B().then((()=>{O(0,e).forEach(((e,i)=>{e&&t.some((t=>t.uid===w(e,i)||t.uri===A(e)))&&n.push(i)})),n.length>0&&ne(Math.min(...n))})).catch((e=>{console.error(e)}))}}),[B,k,O,e,w,A,ne]),ae=(0,i.useCallback)((()=>{const e=z();ie(e.map((({uid:e})=>({uid:e}))))}),[z,ie]);g(ae);const se=(0,i.useCallback)((()=>q.current),[]);(0,i.useImperativeHandle)(N,(()=>({update:()=>D(),getRows:()=>O(0,e,{cachedOnly:!0}),scrollToItem:e=>ie([e]),getSelected:z,scrollToIndex:ne,getVisibleTrackWindow:se})));const re=(0,i.useCallback)((e=>{if("Escape"===e.key&&!e.repeat){if(K)return;W()}"Backspace"!==e.key&&"Delete"!==e.key||e.repeat||ee()}),[W,ee,K]),oe=(0,i.useCallback)(((e,t)=>(0,T.jsx)(v,{height:e},t)),[v]);return(0,T.jsxs)(o.j,{"aria-rowcount":e+Number(b),"aria-colcount":Z,"aria-label":x,ref:J,className:s()({[y.Z.trackList]:!H,[y.Z.indexable]:$,[y.Z.delayedVisibility]:!V,[y.Z.concertTrackList]:H}),onKeyDown:re,"":C,children:[b&&(0,T.jsx)(R,{columns:_,sortableColumns:n,sortState:a,onSort:l,top:P}),(0,T.jsx)(d.V,{renderRows:(e,n)=>{Math.max(n-e+1,0)>0&&(q.current={firstIndex:e,lastIndex:n});return O(e,n).map(((n,i)=>n?t(n,e+i):oe(`${X}px`,`${e+i}`)))},nrRows:e,rowHeight:X,scrollNodeRef:G,nrRowsOverscan:F,renderPlaceholder:oe})]})}const G=i.memo(V);var W=n(36641),z=n(17810)},51336:(e,t,n)=>{"use strict";n.d(t,{t:()=>I});var i=n(59496),a=n(41915),s=n(95167),r=n(3802),o=n(49921),l=n(98340),d=n(96170),c=n(84875),u=n.n(c),m=n(85830),p=n(3770),g=n(39669),h=n(95663),k=n(19671),v=n(24280),f=n(4637);const y=({children:e,index:t,ariaRowIndex:n,onTriggerPlay:a,isActive:s,uri:r,spec:o})=>{const l=(0,d.$P)(),{pushPopSelected:c,toggleSelected:y,isSelected:S}=(0,i.useContext)(k.i),b=(0,i.useRef)(null),_=(0,h.o)(),N=(0,m.y1)((e=>{_({intent:"play",type:"double-click"});const t=l.logInteraction(o.doubleHitPlay({itemToBePlayed:r}));a(e,t)}),g.s_,{leading:!0,trailing:!1}),E=(0,i.useCallback)((e=>{y(t,e.shiftKey,e.ctrlKey||e.metaKey)}),[y,t]),x=(0,i.useCallback)((e=>{if(!b.current?.contains(e.target))return;const n="ArrowUp"===e.key?-1:1;["ArrowUp","ArrowDown"].includes(e.key)&&(e.shiftKey?c(t,n):y(t+n,!1,!1))}),[c,y,t]),C=S(t),w=C&&S(t-1),I=C&&S(t+1),T=(0,d.Wi)(o),A=(0,i.useCallback)((e=>{b.current=e,T?.(e)}),[T]);return(0,f.jsx)(p.RX,{rowIndex:n,"aria-selected":C,children:(0,f.jsx)("div",{"":"tracklist-row",className:u()(v.Z.trackListRow,v.Z.trackListRowGrid,{[v.Z.active]:s,[v.Z.selected]:C,[v.Z.isPreviousRowSelected]:w,[v.Z.isNextRowSelected]:I}),onDoubleClick:N,onClick:E,onKeyDown:x,ref:A,children:e})})};var S=n(61108),b=n(8754),_=n(87854),N=n(90755),E=n(57858),x=n(60768),C=n(84202),w=n(91944);const I=({uri:e,title:t="",index:n,subtitle:c="",showName:u="",showUri:m="",duration:p=0,start:g,stop:h})=>{const{isActive:k,isPlaying:I,onClick:T}=(0,o.k)({episodeUri:e,start:g,stop:h}),A=(0,i.useCallback)(((e,t)=>{T(t)}),[T]),{spec:P}=(0,d.fU)(s.r,{data:{position:n,reason:"",uri:e}});return(0,f.jsx)(l.ZP,{value:"row",index:n,children:(0,f.jsxs)(y,{index:n,ariaRowIndex:n+1,onTriggerPlay:A,isActive:k,spec:P,uri:e,children:[(0,f.jsxs)(S.vZ,{ariaColIndex:0,children:[(0,f.jsx)(_.D,{uri:e,playAriaLabel:r.ag.get("tracklist.a11y.play",c,u),onClick:A,isPlaying:I,isActive:k,spec:P,children:(0,f.jsx)(N.k,{children:(0,f.jsx)(a.l,{className:v.Z.talkIcon,"aria-hidden":!0})})}),(0,f.jsxs)(S.vm,{children:[(0,f.jsx)(w.W,{titleText:t,children:t}),(0,f.jsx)(C.K,{children:c})]})]}),(0,f.jsx)(x.U,{ariaColIndex:1,children:(0,f.jsx)(S.BM,{uri:m,name:u,spec:P,children:(0,f.jsx)("span",{dir:"auto",children:u})})}),(0,f.jsx)(E.m,{ariaColIndex:2,children:(0,f.jsx)(b.A,{duration:p,className:v.Z.talkSegmentDuration})})]})})}},36641:(e,t,n)=>{"use strict";n.d(t,{Ym:()=>E,h_:()=>ee,UT:()=>he,dx:()=>Y,l0:()=>oe,iJ:()=>fe,YK:()=>ue,cp:()=>ce,e9:()=>se,pt:()=>ae,SS:()=>ke});var i=n(59496),a=n(95167),s=n(3802),r=n(59200),o=n(20195),l=n(4882),d=n(90303),c=n(98340),u=n(43064),m=n(96170),p=n(94033),g=n(72171),h=n(78048),k=n(84229),v=n(63120),f=n(61108),y=n(56162),S=n(24280),b=n(4637);const _=(0,i.memo)((function({playcount:e}){return e<1?null:(0,b.jsx)(y.D,{as:"div",variant:"mesto",className:S.Z.rowPlayCount,children:s.ag.formatNumber(e)})}));var N=n(28106);const E=i.memo((function({uri:e,name:t,isPlayable:n,duration_ms:i,artists:y,isExplicit:E,isMOGEFRestricted:x,index:C,trackNumber:w,playcount:I,shouldRenderPlayCount:T,shouldHighLight:A=!1,contextUri:P,uid:O,usePlayContextItem:D}){const{spec:R}=(0,m.fU)(a.r,{data:{position:C,reason:"",uri:e}}),L=(0,u._)(e),F=(0,h.k)(e,n),{badges:j,hasBadges:M}=(0,p.r)({downloadAvailability:L,isExplicit:E,isMOGEFRestricted:x}),U=y.map((e=>e.name)).join(s.ag.getSeparator()),B=e=>e.map((e=>({...e,key:e.uri}))),{isActive:V,isPlaying:H,triggerPlay:G,togglePlay:W}=D({uid:O,uri:e,index:C}),z=(0,g.E)();return(0,b.jsx)(c.ZP,{value:"row",index:C,children:(0,b.jsx)(r.xV,{trigger:"right-click",action:"open",menu:(0,b.jsx)(k.$,{uri:e,albumUri:P,artists:B(y),contextUri:P}),children:(0,b.jsxs)(N.c,{uri:e,contextUri:P,isPlayable:F,index:C,isActive:V,onTriggerPlay:(e,t)=>{G({loggingParams:t})},ageRestricted:x,ariaRowIndex:C+1,dragMetadata:{name:t,createdBy:U},initialSelectedState:A,spec:R,children:[(0,b.jsx)(f.Dd,{ariaColIndex:0,children:(0,b.jsx)(f.Du,{uri:e,playAriaLabel:s.ag.get("tracklist.a11y.play",t,U),onClick:(e,t)=>{W({loggingParams:t})},isPlaying:H,isActive:V,spec:R,children:(0,b.jsx)(f.km,{children:w})})}),(0,b.jsx)(f.vZ,{ariaColIndex:1,children:(0,b.jsxs)(f.vm,{children:[z?(0,b.jsx)(v.Link,{to:e,className:S.Z.rowTitle,"":"internal-track-link",children:(0,b.jsx)(f.Wh,{titleText:t,children:t})}):(0,b.jsx)(f.Wh,{titleText:t,children:t}),M&&(0,b.jsxs)(f.g3,{children:[j.download&&(0,b.jsx)(o.G,{size:16}),j.explicit&&(0,b.jsx)(l.N,{}),j.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]}),(0,b.jsx)(f.K9,{children:(0,b.jsx)(f.T6,{artists:y.map((e=>({uri:e.uri,name:e.name}))),spec:R})})]})}),T&&(0,b.jsx)(f.UA,{ariaColIndex:1+Number(T),children:(0,b.jsx)(_,{playcount:I})}),(0,b.jsxs)(f.mU,{ariaColIndex:2+Number(T),children:[(0,b.jsx)(f.qS,{uri:e,spec:R}),(0,b.jsx)(f.A$,{duration:i}),(0,b.jsx)(f.Zv,{menu:(0,b.jsx)(k.$,{uri:e,albumUri:P,artists:B(y)}),label:s.ag.get("more.label.track",t,U),spec:R})]})]})})})}),((e,t)=>e.uri===t.uri));var x=n(57318),C=n(34058),w=n(21586),I=n(52210),T=n(97302),A=n(12741),P=n(75207),O=n(73769),D=n(8646),R=n(84449),L=n(7813),F=n(66806),j=n(61304),M=n(75252),U=n(95663);const B=({eventDate:e,ticketingSiteURL:t})=>{const n=(0,U.o)(),i=s.ag.formatDate((0,M.RX)(e),{year:"numeric",month:"short",day:"numeric"}),a=s.ag.get("tracklist.livestream");return(0,M.RX)(e){n({targetUri:t,intent:"navigate",type:"click"})},children:[(0,b.jsx)(I.i,{className:S.Z.eventTicketIcon,height:19}),`${a} • ${i}`]})})},V=({concertDate:e,concertVenue:t,concertURL:n,index:i,spec:a})=>{const s=(0,m.$P)(),r=t?`${e} • ${t} `:`${e} `;return(0,b.jsx)(y.D,{className:S.Z.eventDate,variant:"mesto",semanticColor:"textSubdued",children:(0,b.jsx)(v.default,{to:n,onClick:()=>{const e=a.eventLinkFactory({position:i,uri:n,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:n});s.logInteraction(e)},children:r})})};var H=n(62344),G=n(54299),W=n(68776);const z=({uri:e,imageUrl:t,displayName:n,username:i,piled:a,onClick:s})=>{const r=(0,b.jsx)(H.q,{images:[{url:t,width:null,height:null}],label:n,width:24,userIconSize:16,piled:a,displayName:n,username:i,className:S.Z.facepileAvatar});return e?(0,b.jsx)(G._,{menu:(0,b.jsx)(W.I,{uri:e}),children:(0,b.jsx)(v.Link,{className:S.Z.facepile,to:e,onClick:s,children:r})}):(0,b.jsx)("span",{className:S.Z.facepile,children:r})},K=({users:e,spec:t})=>{const n=(0,m.$P)();return(0,b.jsx)(i.Fragment,{children:e.slice(0,5).map(((e,i)=>(0,b.jsx)(z,{uri:e.uri,imageUrl:(0,P.X)(e.images)?.url||"",displayName:e.displayName,username:e.username,piled:i>0,onClick:()=>{if(!t||!e.uri)return;const a=t.addedByLinkFactory({position:i,uri:e.uri}).hitUiNavigate({destination:e.uri});n.logInteraction(a)}},e.uri||e.displayName)))})},Y=i.memo((function({uri:e,uid:t,name:n,duration_ms:y,artists:_,albumOrShow:E,isMOGEFRestricted:M,isExplicit:U,isPlayable:H,isLocal:G=!1,isPaywalled:W,isUserSubscribed:z,index:Y,playIndex:q=null,isCollaborative:Z,nrCollaborators:Q=1,isMixedMedia:J,addedBy:$,hasDecoratedAddedBy:X,dateAdded:ee,release_date:te,type:ne,imgUrl:ie,contextUri:ae,onMove:se,onInsert:re,usePlayContextItem:oe,allowedDropTypes:le,feedbackPath:de,feedbackUri:ce,deleteFeedbackPath:ue,isDisliked:me,ticketingSiteURL:pe="",eventDate:ge,concertDate:he,concertURL:ke="",concertVenue:ve,isConcert:fe,isLive:ye,isBlend:Se=!1,canRemove:be,onFeedbackClick:_e,playlistName:Ne}){const Ee=(0,m.$P)(),{spec:xe}=(0,m.fU)(a.r,{data:{position:Y,reason:"",uri:e}}),{filter:Ce}=(0,i.useContext)(F.fo),we=(0,u._)(e),Ie=(0,h.k)(e,H,G),Te="episode"===ne,Ae="track"!==ne&&E?.mediaType===A.E.VIDEO,Pe=W&&!z,{badges:Oe,hasBadges:De}=(0,p.r)({downloadAvailability:we,isExplicit:U,isMOGEFRestricted:M,isPaywalled:W}),Re=(0,g.E)(),Le=()=>{const e=xe.eventLinkFactory({position:Y,uri:ke,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:ke});Ee.logInteraction(e)};let Fe=Y+1;J&&(Fe=Ae?(0,b.jsx)(x.O,{"":"video-icon",iconSize:16,"aria-hidden":"true"}):Te?(0,b.jsx)(C.J,{"":"podcast-icon",iconSize:16,"aria-hidden":"true"}):(0,b.jsx)(w.F,{"":"track-icon",iconSize:16,"aria-hidden":"true"}));let je=(0,b.jsx)(k.$,{uri:e,uid:t,albumUri:E?.uri,artists:_,contextUri:ae,canBeRemovedFromPlaylist:be});Te?je=(0,b.jsx)(O.k,{uri:e,uid:t,showUri:E?.uri,contextUri:ae,canBeRemovedFromPlaylist:be}):G&&(je=(0,b.jsx)(D.N,{uri:e,uid:t,contextUri:ae,canBeRemovedFromPlaylist:be}));const Me=Te?E.publisher:_?.map((e=>e.name)).join(s.ag.getSeparator())||"",Ue=$?.[0],Be=(0,P.X)(Ue?.images,{desiredWidth:24,desiredLabel:"small"}),{isActive:Ve,isPlaying:He,triggerPlay:Ge,togglePlay:We}=oe({uid:t,uri:e,index:q??Y}),ze=Z||Q>1||Se,Ke=()=>(0,b.jsx)(f.Wh,{titleText:n,children:(0,b.jsx)(L.o,{searchWords:[Ce],textToHighlight:n})});return(0,b.jsx)(c.ZP,{value:"row",index:Y,children:(0,b.jsx)(R.l,{renderInline:!1,enabled:!0,showUri:E.uri,children:(t,i)=>(0,b.jsx)(r._P,{menu:je,children:(0,b.jsxs)(N.c,{uri:e,contextUri:ae,index:Y,onTriggerPlay:(e,t)=>{Ge({loggingParams:t})},onTriggerPaywall:e=>{i(e)},isLocked:Pe,isActive:Ve,ariaRowIndex:Y+1,isPlayable:Ie,ageRestricted:M,dragMetadata:{name:n,createdBy:Me},onMove:se,onInsert:re,allowedDropTypes:le,spec:xe,children:[(0,b.jsx)(f.Dd,{ariaColIndex:0,children:(0,b.jsx)(R.l,{showUri:E.uri,renderInline:!1,enabled:Pe,children:(0,b.jsx)(f.Du,{uri:e,playAriaLabel:s.ag.get("tracklist.a11y.play",n,Me),onClick:(e,t)=>{Pe||We({loggingParams:t})},isPlaying:He,isActive:Ve,isLocked:Pe,spec:xe,children:(0,b.jsx)(f.km,{children:Fe})})})}),(0,b.jsxs)(f.vZ,{ariaColIndex:1,children:[(0,b.jsx)(f.lD,{src:ie,isVideo:Ae,isEpisode:Te}),(0,b.jsxs)(f.vm,{children:[Re?(0,b.jsx)(v.Link,{to:e,className:S.Z.rowTitle,"":"internal-track-link",children:Ke()}):Ke(),De&&(0,b.jsxs)(f.g3,{children:[Oe.download&&(0,b.jsx)(o.G,{size:16}),Oe.explicit&&(0,b.jsx)(l.N,{}),Oe.paid&&(0,b.jsx)(T.g,{}),Oe.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]}),(0,b.jsxs)(f.K9,{children:[!Te&&!Ae&&_&&(0,b.jsx)(j.o,{nonInteractive:G,artists:_,filter:Ce,spec:xe}),Te&&!Ae&&Me]})]})]}),(0,b.jsx)(f.UA,{ariaColIndex:2,children:(0,b.jsx)(f.BM,{nonInteractive:G,uri:E.uri,name:E.name,creatorUri:_?.[0]?.uri,spec:xe,children:(0,b.jsx)(L.o,{searchWords:[Ce],textToHighlight:E.name})})}),ze&&(0,b.jsx)(f.UA,{ariaColIndex:3,children:Se?(0,b.jsx)(K,{users:$,spec:xe}):(0,b.jsx)(f.p_,{name:Ue?.displayName||Ue?.username||"",uri:Ue?.uri||"",imageUrl:Be?.url||"",showAvatar:X,spec:xe})}),J&&(0,b.jsx)(f.UA,{ariaColIndex:3+Number(ze),children:Te&&(0,b.jsx)(f.fx,{releaseDate:te})}),ye&&(0,b.jsx)(f.UA,{ariaColIndex:3+Number(ze)+Number(J),children:ge&&pe?(0,b.jsx)(c.ZP,{value:"ticket-link",children:(0,b.jsx)(B,{eventDate:ge,ticketingSiteURL:pe})}):null}),fe&&(0,b.jsx)(f.UA,{ariaColIndex:3+Number(ze)+Number(J),children:he&&ke?(0,b.jsx)(c.ZP,{value:"ticket-link",children:(0,b.jsx)(V,{concertDate:he,concertVenue:ve,concertURL:ke,index:Y,spec:xe})}):null}),!ye&&!fe&&(0,b.jsx)(f.UA,{ariaColIndex:3+Number(ze)+Number(J),children:ee?(0,b.jsx)(f.Op,{dateAdded:new Date(ee)}):null}),(0,b.jsxs)(f.mU,{ariaColIndex:4+Number(ze)+Number(J),children:[!Ae&&!G&&(0,b.jsx)(f.qS,{uri:e,type:ne,spec:xe}),fe&&(0,b.jsx)(v.Link,{to:ke,onClick:Le,children:(0,b.jsx)(I.i,{className:S.Z.eventTicketIcon,height:19})}),de&&ue&&(0,b.jsx)(f.bt,{isDisliked:me,feedbackPath:de,deleteFeedbackPath:ue,feedbackUri:ce||e,onClick:_e,name:Ne,contextUri:ae}),(0,b.jsx)(f.A$,{duration:y}),(0,b.jsx)(f.Zv,{menu:je,label:s.ag.get("more.label.track",n,Me),spec:xe})]})]})})})})}),((e,t)=>e.uri===t.uri&&e.allowedDropTypes.length===t.allowedDropTypes.length&&e.isCollaborative===t.isCollaborative&&e.nrCollaborators===t.nrCollaborators&&e.isPlayable===t.isPlayable&&e.isMixedMedia===t.isMixedMedia));var q=n(77675),Z=n(16004),Q=n(78419),J=n(82849);const $={[J.tl.DOWN]:()=>(0,b.jsx)(q.i,{iconSize:16,className:S.Z.statusChangeDown}),[J.tl.UP]:()=>(0,b.jsx)(Z.U,{iconSize:16,className:S.Z.statusChangeUp}),[J.tl.NEW]:()=>(0,b.jsx)(Q.Z,{className:S.Z.notificationDot}),[J.tl.EQUAL]:()=>null},X=({status:e,number:t})=>{const n=$[e];return(0,b.jsxs)("div",{className:S.Z.rowChartStatus,children:[(0,b.jsx)(y.D,{variant:"ballad",children:t}),(0,b.jsx)(n,{})]})},ee=i.memo((function({uri:e,name:t,duration_ms:n,artists:i,album:r,isMOGEFRestricted:g,isExplicit:v,isPlayable:y,uid:E,index:x,contextUri:C,imgUrl:w,statusChange:I,showPlayCount:T,playCount:A,usePlayContextItem:P}){const{spec:O}=(0,m.fU)(a.r,{data:{position:x,reason:"",uri:e}}),{isActive:D,isPlaying:R,triggerPlay:L,togglePlay:F}=P({uid:E,uri:e,index:x}),j=(0,u._)(e),M=(0,h.k)(e,y),{badges:U,hasBadges:B}=(0,p.r)({downloadAvailability:j,isExplicit:v,isMOGEFRestricted:g}),V=i?.map((e=>e.name)).join(s.ag.getSeparator())||"";return(0,b.jsx)(c.ZP,{value:"row",index:x,children:(0,b.jsx)(G._,{menu:(0,b.jsx)(k.$,{uri:e,albumUri:r?.uri,artists:i}),children:(0,b.jsxs)(N.c,{uri:e,contextUri:C,index:x,onTriggerPlay:(e,t)=>{L({loggingParams:t})},isActive:D,ariaRowIndex:x+1,isPlayable:M,ageRestricted:g,dragMetadata:{name:t,createdBy:V},allowedDropTypes:[],spec:O,children:[(0,b.jsx)(f.Dd,{ariaColIndex:0,children:(0,b.jsx)(f.Du,{uri:e,className:S.Z.rowMarkerChartStatus,playAriaLabel:s.ag.get("tracklist.a11y.play",t,V),onClick:(e,t)=>{F({loggingParams:t})},isPlaying:R,isActive:D,spec:O,children:I?(0,b.jsx)(X,{number:x+1,status:I}):(0,b.jsx)(f.km,{children:x+1})})}),(0,b.jsxs)(f.vZ,{ariaColIndex:1,children:[(0,b.jsx)(f.lD,{src:w}),(0,b.jsxs)(f.vm,{children:[(0,b.jsx)(f.Wh,{titleText:t,children:t}),B&&(0,b.jsxs)(f.g3,{children:[U.download&&(0,b.jsx)(o.G,{size:16}),U.explicit&&(0,b.jsx)(l.N,{}),U.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]}),(0,b.jsx)(f.K9,{children:(0,b.jsx)(f.T6,{artists:i,spec:O})})]})]}),T&&(0,b.jsx)(f.UA,{ariaColIndex:2,children:(0,b.jsx)(_,{playcount:A})}),(0,b.jsx)(f.UA,{ariaColIndex:2+Number(T),children:(0,b.jsx)(f.BM,{uri:r.uri,name:r.name,creatorUri:i?.[0]?.uri,spec:O,children:r.name})}),(0,b.jsxs)(f.mU,{ariaColIndex:3+Number(T),children:[(0,b.jsx)(f.qS,{uri:e,spec:O}),(0,b.jsx)(f.A$,{duration:n}),(0,b.jsx)(f.Zv,{menu:(0,b.jsx)(k.$,{uri:e,albumUri:r?.uri,artists:i}),label:s.ag.get("more.label.track",t,V),spec:O})]})]})})})}),((e,t)=>e.uri===t.uri));var te=n(40075),ne=n(48607);const ie=({uri:e,enabled:t,className:n,children:i})=>{const a=(0,g.E)();return t&&a?(0,b.jsx)(v.default,{to:e,className:n,children:i}):(0,b.jsx)(b.Fragment,{children:i})},ae=i.memo((function({uri:e,name:t,duration:n,album:i,artists:r,index:g,imgUrl:v,isPlayable:y,isExplicit:_,is19PlusOnly:E,requestId:x,isLyricsMatch:C}){const{isActive:w,isPlaying:I,triggerPlay:T,togglePlay:A}=(0,ne.n)({uri:e},{featureIdentifier:"search",referrerIdentifier:"search"}),{spec:P}=(0,m.fU)(a.r,{data:{position:g,reason:x??"",uri:e}}),O=(0,u._)(e),D=(0,h.k)(e,y),{badges:R,hasBadges:L}=(0,p.r)({downloadAvailability:O,isExplicit:_,isMOGEFRestricted:E}),F=(r||[]).map((e=>e.name)).join(s.ag.getSeparator());return(0,b.jsx)(c.ZP,{value:"row",index:g,children:(0,b.jsx)(G._,{menu:(0,b.jsx)(k.$,{uri:e,artists:r,contextUri:e,albumUri:i?.uri}),children:(0,b.jsxs)(N.c,{uri:e,contextUri:e,index:g,ariaRowIndex:g,onTriggerPlay:(e,t)=>{T({loggingParams:t})},isActive:w,isPlayable:D,ageRestricted:E,dragMetadata:{name:t,createdBy:F},spec:P,children:[(0,b.jsxs)(f.vZ,{ariaColIndex:0,children:[(0,b.jsx)(f.VG,{uri:e,src:v,onClick:(e,t)=>{A({loggingParams:t})},isLocked:!1,isPlaying:I,isActive:w,playAriaLabel:s.ag.get("tracklist.a11y.play",t,F),spec:P}),(0,b.jsxs)(f.vm,{children:[(0,b.jsx)(ie,{enabled:!0,uri:e,className:S.Z.rowTitle,children:(0,b.jsx)(f.Wh,{titleText:t,children:t})}),L&&(0,b.jsxs)(f.g3,{children:[R.download&&(0,b.jsx)(o.G,{size:16}),R.explicit&&(0,b.jsx)(l.N,{}),R.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]}),(0,b.jsxs)(f.K9,{children:[(0,b.jsx)(f.T6,{artists:r,spec:P}),C&&(0,b.jsx)(te.q,{})]})]})]}),(0,b.jsxs)(f.mU,{ariaColIndex:1,children:[(0,b.jsx)(f.qS,{uri:e,spec:P}),(0,b.jsx)(f.A$,{duration:n.milliseconds}),(0,b.jsx)(f.Zv,{menu:(0,b.jsx)(k.$,{uri:e,artists:r,contextUri:e,albumUri:i?.uri}),label:s.ag.get("more.label.track",t,F),spec:P})]})]})})})}),((e,t)=>e.uri===t.uri&&e.index===t.index)),se=i.memo((function({uri:e,name:t,duration:n,artists:i,album:r,isExplicit:g,is19PlusOnly:v,isPlayable:y,index:_,imgUrl:E,requestId:x,isLyricsMatch:C}){const{isActive:w,isPlaying:I,triggerPlay:T,togglePlay:A}=(0,ne.n)({uri:e},{featureIdentifier:"search",referrerIdentifier:"search"}),{spec:P}=(0,m.fU)(a.r,{data:{position:_,reason:x??"",uri:e}}),O=(0,u._)(e),D=(0,h.k)(e,y),{badges:R,hasBadges:L}=(0,p.r)({downloadAvailability:O,isExplicit:g,isMOGEFRestricted:v}),F=i?.map((e=>e.name)).join(s.ag.getSeparator())||"";return(0,b.jsx)(c.ZP,{value:"row",index:_,children:(0,b.jsx)(G._,{menu:(0,b.jsx)(k.$,{uri:e,albumUri:r?.uri,artists:i,contextUri:e}),children:(0,b.jsxs)(N.c,{uri:e,contextUri:e,onTriggerPlay:(e,t)=>{T({loggingParams:t})},isActive:w,index:_,ariaRowIndex:_+1,isPlayable:D,ageRestricted:v,dragMetadata:{name:t,createdBy:F},spec:P,children:[(0,b.jsx)(f.Dd,{ariaColIndex:0,children:(0,b.jsx)(f.Du,{uri:e,playAriaLabel:s.ag.get("tracklist.a11y.play",t,F),onClick:(e,t)=>{A({loggingParams:t})},isPlaying:I,isActive:w,spec:P,children:(0,b.jsx)(f.km,{children:_+1})})}),(0,b.jsxs)(f.vZ,{ariaColIndex:1,children:[(0,b.jsx)(f.lD,{src:E}),(0,b.jsxs)(f.vm,{children:[(0,b.jsx)(ie,{enabled:!0,uri:e,className:S.Z.rowTitle,children:(0,b.jsx)(f.Wh,{titleText:t,children:t})}),L&&(0,b.jsxs)(f.g3,{children:[R.download&&(0,b.jsx)(o.G,{size:16}),R.explicit&&(0,b.jsx)(l.N,{}),R.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]}),(0,b.jsxs)(f.K9,{children:[(0,b.jsx)(f.T6,{artists:i,spec:P}),C&&(0,b.jsx)(te.q,{})]})]})]}),(0,b.jsx)(f.UA,{ariaColIndex:2,children:(0,b.jsx)(f.BM,{uri:r?.uri||"",name:r?.name||"",creatorUri:i?.[0]?.uri,spec:P,children:r?.name})}),(0,b.jsxs)(f.mU,{ariaColIndex:3,children:[(0,b.jsx)(f.qS,{uri:e,spec:P}),(0,b.jsx)(f.A$,{duration:n.milliseconds}),(0,b.jsx)(f.Zv,{menu:(0,b.jsx)(k.$,{uri:e,albumUri:r?.uri,artists:i,contextUri:e}),label:s.ag.get("more.label.track",t,F),spec:P})]})]})})})}),((e,t)=>e.uri===t.uri));var re=n(73972);const oe=i.memo((function({uri:e,name:t,totalMilliseconds:n,artists:i,isPlayable:r,contentRating:y,imageUrl:E,albumUri:x,contextUri:C,index:w,playcount:I,usePlayContextItem:T}){const{spec:A}=(0,m.fU)(a.r,{data:{position:w,reason:"",uri:e}}),{isActive:P,isPlaying:O,triggerPlay:D,togglePlay:R}=T({uri:e,index:w}),L=(0,u._)(e),F=(0,h.k)(e,r),{badges:j,hasBadges:M}=(0,p.r)({downloadAvailability:L,contentRating:y}),U=y===re.KS.NineteenPlus,B=i.map((e=>e.name)).join(s.ag.getSeparator()),V=(0,g.E)();return(0,b.jsx)(c.ZP,{value:"row",index:w,children:(0,b.jsx)(G._,{menu:(0,b.jsx)(k.$,{uri:e,contextUri:C,albumUri:x}),children:(0,b.jsxs)(N.c,{uri:e,onTriggerPlay:(e,t)=>{D({loggingParams:t})},isActive:P,contextUri:C,isPlayable:F,ageRestricted:U,dragMetadata:{name:t,createdBy:B},index:w,ariaRowIndex:w,spec:A,children:[(0,b.jsx)(f.Dd,{ariaColIndex:0,children:(0,b.jsx)(f.Du,{uri:e,playAriaLabel:s.ag.get("tracklist.a11y.play",t,B),isPlaying:O,isActive:P,onClick:(e,t)=>{R({loggingParams:t})},spec:A,children:(0,b.jsx)(f.km,{children:w+1})})}),(0,b.jsxs)(f.vZ,{ariaColIndex:1,children:[(0,b.jsx)(f.lD,{src:E}),(0,b.jsxs)(f.vm,{children:[V?(0,b.jsx)(v.Link,{to:e,className:S.Z.rowTitle,"":"internal-track-link",children:(0,b.jsx)(f.Wh,{titleText:t,children:t})}):(0,b.jsx)(f.Wh,{titleText:t,children:t}),M&&(0,b.jsxs)(f.g3,{children:[j.download&&(0,b.jsx)(o.G,{size:16}),j.explicit&&(0,b.jsx)(l.N,{}),j.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]})]})]}),(0,b.jsx)(f.UA,{ariaColIndex:2,children:(0,b.jsx)(_,{playcount:I})}),(0,b.jsxs)(f.mU,{ariaColIndex:3,children:[(0,b.jsx)(f.qS,{uri:e,spec:A}),(0,b.jsx)(f.A$,{duration:n}),(0,b.jsx)(f.Zv,{menu:(0,b.jsx)(k.$,{uri:e,albumUri:x,contextUri:C,artists:i}),label:s.ag.get("more.label.track",t,B),spec:A})]})]})})})}),((e,t)=>e.uri===t.uri));var le=n(63082),de=n(68640);const ce=i.memo((function({uid:e,uri:t,name:n,imgUrl:r,artists:g,isExplicit:v,index:y,album:_,contextUri:E,isPlayable:x,isMOGEFRestricted:C,usePlayContextItem:w}){const{spec:I,logger:T}=(0,m.fU)(a.r,{data:{position:y,reason:"",uri:t}}),A=(0,i.useMemo)((()=>E.replace("internal:recs:","")),[E]),P=(0,U.o)(),{addItems:O}=(0,de.Yv)(A),{isActive:D,isPlaying:R,triggerPlay:L,togglePlay:F}=w({uid:e,uri:t,index:y}),j=(0,i.useCallback)((()=>{T.logInteraction(I.addButtonFactory().hitAddToPlaylist({playlist:A,itemToBeAdded:t})),O([t],{after:"end"}),P({type:"click",intent:"add-to-playlist",itemIdSuffix:"playlist/add",targetUri:A})}),[T,I,A,t,O,P]),M=(0,u._)(t),B=(0,h.k)(t,x),V=g.map((e=>e.name)).join(s.ag.getSeparator()),{badges:H,hasBadges:W}=(0,p.r)({downloadAvailability:M,isExplicit:v,isMOGEFRestricted:C});return(0,b.jsx)(c.ZP,{value:"row",index:y,children:(0,b.jsx)(G._,{menu:(0,b.jsx)(k.$,{uri:t,albumUri:_.uri,artists:g,contextUri:E}),children:(0,b.jsxs)(N.c,{uri:t,contextUri:E,isPlayable:B,onTriggerPlay:(e,t)=>{L({loggingParams:t})},isActive:D,ageRestricted:C,index:y,ariaRowIndex:y,dragMetadata:{name:n,createdBy:V},spec:I,children:[(0,b.jsxs)(f.vZ,{ariaColIndex:0,children:[(0,b.jsx)(f.VG,{uri:t,src:r,onClick:(e,t)=>{F({loggingParams:t})},isLocked:!1,isPlaying:R,isActive:D,playAriaLabel:s.ag.get("tracklist.a11y.play",n,V),spec:I}),(0,b.jsxs)(f.vm,{children:[(0,b.jsx)(f.Wh,{titleText:n,children:n}),W&&(0,b.jsxs)(f.g3,{children:[H.download&&(0,b.jsx)(o.G,{size:16}),H.explicit&&(0,b.jsx)(l.N,{}),H.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]}),(0,b.jsx)(f.K9,{children:(0,b.jsx)(f.T6,{artists:g,spec:I})})]})]}),(0,b.jsx)(f.UA,{ariaColIndex:1,children:(0,b.jsx)(f.BM,{uri:_.uri,name:_.name,creatorUri:g?.[0]?.uri,spec:I,children:_.name})}),(0,b.jsx)(f.mU,{ariaColIndex:2,children:(0,b.jsx)(le.P,{buttonSize:"sm",onClick:j,"aria-label":s.ag.get("addToPlaylist-icon.label"),"":"add-to-playlist-button",children:s.ag.get("playlist.extender.button.add")})})]})})})}),((e,t)=>e.uid===t.uid&&e.uri===t.uri&&e.index===t.index)),ue=i.memo((function({uid:e,uri:t,isPlayable:n,isMOGEFRestricted:a,isExplicit:r,contextUri:m,name:g,imgUrl:k,index:v,podcast:y,usePlayContextItem:_}){const E=(0,i.useMemo)((()=>m.replace("internal:recs:","")),[m]),x=(0,U.o)(),{addItems:C}=(0,de.Yv)(E),{isActive:w,isPlaying:I,triggerPlay:T,togglePlay:A}=_({uid:e,uri:t,index:v}),P=(0,i.useCallback)((()=>{C([t],{after:"end"}),x({type:"click",intent:"add-to-playlist",itemIdSuffix:"playlist/add",targetUri:E})}),[C,t,x,E]),D=(0,u._)(t),R=(0,h.k)(t,n),{badges:L,hasBadges:F}=(0,p.r)({downloadAvailability:D,isExplicit:r,isMOGEFRestricted:a});return(0,b.jsx)(c.ZP,{value:"row",index:v,children:(0,b.jsx)(G._,{menu:(0,b.jsx)(O.k,{uri:t,contextUri:m}),children:(0,b.jsxs)(N.c,{uri:t,contextUri:t,isPlayable:R,onTriggerPlay:()=>{T()},isActive:w,ageRestricted:a,index:v,ariaRowIndex:v,dragMetadata:{name:g,createdBy:y.name},children:[(0,b.jsxs)(f.vZ,{ariaColIndex:0,children:[(0,b.jsx)(f.VG,{uri:t,src:k,onClick:()=>{A()},isLocked:!1,isPlaying:I,isActive:w,isEpisode:!0,playAriaLabel:s.ag.get("tracklist.a11y.play",g,y.name)}),(0,b.jsxs)(f.vm,{children:[(0,b.jsx)(f.Wh,{titleText:g,children:g}),F&&(0,b.jsxs)(f.g3,{children:[L.download&&(0,b.jsx)(o.G,{size:16}),L.explicit&&(0,b.jsx)(l.N,{}),L.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]})]})]}),(0,b.jsx)(f.UA,{ariaColIndex:1,children:(0,b.jsx)(f.BM,{uri:y.uri,name:y.name,children:y.name})}),(0,b.jsx)(f.mU,{ariaColIndex:2,children:(0,b.jsx)(le.P,{buttonSize:"sm",onClick:P,children:s.ag.get("playlist.extender.button.add")})})]})})})}),((e,t)=>e.uid===t.uid&&e.uri===t.uri&&e.index===t.index));var me=n(84875),pe=n.n(me),ge=n(7142);const he=({discNumber:e})=>(0,b.jsxs)("div",{className:pe()(S.Z.trackListRowGrid,S.Z.discRow),children:[(0,b.jsx)(f.Dd,{ariaColIndex:0,children:(0,b.jsx)("div",{className:S.Z.rowMarker,children:(0,b.jsx)(f.km,{children:(0,b.jsx)(ge.c,{iconSize:16})})})}),(0,b.jsx)(f.vZ,{ariaColIndex:1,children:(0,b.jsx)(f.vm,{children:(0,b.jsx)(f.dS,{children:s.ag.get("tracklist.disc-sperator.title",e)})})})]}),ke=i.memo((function({uri:e,name:t,duration_ms:n,artists:i,album:r,contextUri:g,isExplicit:v,isMOGEFRestricted:y,isPlayable:_,index:E,imgUrl:x,usePlayContextItem:C}){const{spec:w}=(0,m.fU)(a.r,{data:{position:E,reason:"",uri:e}}),{isActive:I,isPlaying:T,triggerPlay:A,togglePlay:P}=C({uri:e,index:E}),O=(0,u._)(e),D=(0,h.k)(e,_),{badges:R,hasBadges:L}=(0,p.r)({downloadAvailability:O,isExplicit:v,isMOGEFRestricted:y}),F=i?.map((e=>e.name)).join(s.ag.getSeparator())||"";return(0,b.jsx)(c.ZP,{value:"row",index:E,children:(0,b.jsx)(G._,{menu:(0,b.jsx)(k.$,{uri:e,albumUri:r.uri,artists:i,contextUri:g}),children:(0,b.jsxs)(N.c,{uri:e,contextUri:g,onTriggerPlay:(e,t)=>{A({loggingParams:t})},isActive:I,index:E,ariaRowIndex:E+1,isPlayable:D,ageRestricted:y,dragMetadata:{name:t,createdBy:F},spec:w,children:[(0,b.jsx)(f.Dd,{ariaColIndex:0,children:(0,b.jsx)(f.Du,{uri:e,playAriaLabel:s.ag.get("tracklist.a11y.play",t,F),isPlaying:T,isActive:I,onClick:(e,t)=>{P({loggingParams:t})},spec:w,children:(0,b.jsx)(f.km,{children:E+1})})}),(0,b.jsxs)(f.vZ,{ariaColIndex:1,children:[(0,b.jsx)(f.lD,{src:x}),(0,b.jsxs)(f.vm,{children:[(0,b.jsx)(f.Wh,{titleText:t,children:t}),L&&(0,b.jsxs)(f.g3,{children:[R.download&&(0,b.jsx)(o.G,{size:16}),R.explicit&&(0,b.jsx)(l.N,{}),R.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]}),(0,b.jsx)(f.K9,{children:(0,b.jsx)(f.T6,{artists:i,spec:w})})]})]}),(0,b.jsx)(f.UA,{ariaColIndex:2,children:(0,b.jsx)(f.BM,{uri:r.uri,name:r.name,creatorUri:i?.[0]?.uri,spec:w,children:r.name})}),(0,b.jsxs)(f.mU,{ariaColIndex:3,children:[(0,b.jsx)(f.qS,{uri:e,spec:w}),(0,b.jsx)(f.A$,{duration:n}),(0,b.jsx)(f.Zv,{menu:(0,b.jsx)(k.$,{uri:e,albumUri:r.uri,artists:i,contextUri:g}),label:s.ag.get("more.label.track",t,F),spec:w})]})]})})})}),((e,t)=>e.uri===t.uri));var ve=n(37409);const fe=i.memo((function({uri:e,name:t,isPlayable:n,artists:r,album:g,contentRating:v,index:y,trackNumber:_,durationMs:E,shouldHighLight:x=!1,contextUri:C,uid:w,usePlayContextItem:I,isContextActive:T}){const{spec:A}=(0,m.fU)(a.r,{data:{position:y,reason:"",uri:e}}),P=(0,ve.g)(),{togglePlay:O,triggerPlay:D,isPlaying:R,isActive:L}=I({uri:e}),F=(0,i.useCallback)(((t,n)=>{T&&!R?P.skipToNext({uri:e,uid:w}):O({loggingParams:n})}),[T,R,P,O,w,e]),j=(0,u._)(e),M=(0,h.k)(e,n),{badges:U,hasBadges:B}=(0,p.r)({downloadAvailability:j,contentRating:v}),V=v===re.KS.NineteenPlus,H=r.map((e=>e.name)).join(s.ag.getSeparator()),W=e=>e.map((e=>({name:e.name||"",uri:e.uri,key:e.uri})));return(0,b.jsx)(c.ZP,{value:"row",index:y,children:(0,b.jsx)(G._,{menu:(0,b.jsx)(k.$,{uri:e,albumUri:g.uri,artists:W(r),contextUri:C}),children:(0,b.jsxs)(N.c,{uri:e,contextUri:C,isPlayable:M,index:y,onTriggerPlay:(e,t)=>{D({loggingParams:t})},isActive:L,ageRestricted:V,ariaRowIndex:y+1,dragMetadata:{name:t,createdBy:H},initialSelectedState:x,spec:A,children:[(0,b.jsx)(f.Dd,{ariaColIndex:0,children:(0,b.jsx)(f.Du,{uri:e,playAriaLabel:s.ag.get("tracklist.a11y.play",t,H),isPlaying:R,isActive:L,onClick:F,spec:A,children:(0,b.jsx)(f.km,{children:_})})}),(0,b.jsxs)(f.vZ,{ariaColIndex:1,children:[(0,b.jsx)(f.lD,{src:g.images?.[0]?.url}),(0,b.jsxs)(f.vm,{children:[(0,b.jsx)(f.Wh,{titleText:t,children:t}),B&&(0,b.jsxs)(f.g3,{children:[U.download&&(0,b.jsx)(o.G,{size:16}),U.explicit&&(0,b.jsx)(l.N,{}),U.nineteen&&(0,b.jsx)(d.X,{className:S.Z.nineteen,size:16})]}),(0,b.jsx)(f.K9,{children:(0,b.jsx)(f.T6,{artists:r.map((e=>({uri:e.uri,name:e.name||""}))),spec:A})})]})]}),(0,b.jsx)(f.UA,{ariaColIndex:2,children:(0,b.jsx)(f.BM,{uri:g.uri,name:g.name,creatorUri:r?.[0]?.uri,children:g.name})}),(0,b.jsxs)(f.mU,{ariaColIndex:3,children:[(0,b.jsx)(f.qS,{uri:e,spec:A}),(0,b.jsx)(f.JR,{stationURI:C,trackURI:e}),(0,b.jsx)(f.A$,{duration:E}),(0,b.jsx)(f.Zv,{spec:A,menu:(0,b.jsx)(k.$,{uri:e,albumUri:C,artists:W(r)}),label:s.ag.get("more.label.track",t,H)})]})]})})})}),((e,t)=>e.uri===t.uri&&e.name===t.name));n(51336)},72502:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i,k:()=>a});let i=function(e){return e.INDEX="INDEX",e.TITLE="TITLE",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.ADD="ADD",e}({}),a=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}({})},86165:(e,t,n)=>{"use strict";n.d(t,{L:()=>o});var i=n(59496);const a=()=>{if(navigator.webdriver)return!1;const{userAgent:e,appVersion:t}=navigator;if(function(e,t){return/headless/i.test(e)||/headless/i.test(t)}(e,t??""))return!1;if(function(e){return/chrome/i.test(e)}(e)&&(!window.chrome||!navigator.plugins?.length||""===navigator.languages))return!1;const n=Object.keys(document);for(const e of n)if(e.startsWith("$cdc_"))return!1;return!0};let s;const r=()=>(s=s??a(),s);function o(){const e=(0,i.useRef)(void 0),t=(0,i.useRef)(!1),n=(0,i.useRef)(!1),a=r(),s=(0,i.useCallback)((i=>{a&&i.isTrusted?"click"!==i.type?e.current=!0:n.current?e.current=t.current:e.current=!0:e.current=!1}),[a]);return(0,i.useEffect)((()=>{function e(){t.current=!0}function i(e){n.current="mouse"===e.pointerType}return document.addEventListener("mousemove",e),document.addEventListener("pointerdown",i),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("pointerdown",i)}}),[]),[e,s]}},91917:(e,t,n)=>{"use strict";n.d(t,{Jp:()=>r,pr:()=>s,uK:()=>o});var i=n(74488),a=n(21840);function s(e,t,n){if(!e)return void console.error("No grid element found. Canceling moving focus");if(!(0,a.lK)(e))return;const s=e.querySelector('[tabindex="0"]'),r=n?u:c;if(t===i.N.UP){const t=r(e,s,i.N.UP);if(!t)return;(0,a.Bu)(s,l(s,t))}if(t===i.N.DOWN){const t=r(e,s,i.N.DOWN);if(!t)return;(0,a.Bu)(s,l(s,t))}if(t===i.N.LEFT){const t=d(s,-1);if(t)return void(0,a.Bu)(s,t);const n=r(e,s,i.N.LEFT);if(!n)return;const o=n.querySelectorAll("a, button"),l=o[o.length-1];(0,a.Bu)(s,l)}if(t===i.N.RIGHT){const t=d(s,1);if(t)return void(0,a.Bu)(s,t);const n=r(e,s,i.N.RIGHT);if(!n)return;const o=n.querySelectorAll("a, button")[0];(0,a.Bu)(s,o)}}function r(e){const t=e.closest('[role="grid"]');if(!t)return;const n=e.querySelectorAll("a, button")[0],i=t.querySelector('[tabindex="0"]');(0,a.Bu)(i,n)}function o(e,t,n){const i=e.querySelector(`[aria-rowindex="${t}"]`);if(!i)return void e.focus({preventScroll:!0});const s=i.querySelector(`[aria-colindex="${n}"]`);if(!s)return void r(i);const o=s.querySelectorAll("a, button")[0],l=e.querySelector('[tabindex="0"]');(0,a.Bu)(l,o)}function l(e,t){const n=e.closest("[aria-colindex]"),i=Array.from(n.querySelectorAll("a, button")).indexOf(e),a=t.querySelectorAll("a, button");return a[i]||a[0]}function d(e,t){const n=Array.from(e.closest("[aria-colindex]").querySelectorAll("a, button")),i=n.findIndex((t=>t===e))+t;return n[i]}function c(e,t,n){const s=t.closest("[aria-rowindex]");if(n===i.N.DOWN){const n=Array.from(e.querySelectorAll("[aria-rowindex]")),i=t.closest("[aria-colindex]").getAttribute("aria-colindex");for(let e=n.indexOf(s)+1;e=0;e--){const t=n[e].querySelector(`[aria-colindex="${r}"]`);if((0,a.KX)(t))return t}}if(n===i.N.LEFT){const e=Array.from(s.querySelectorAll("[aria-colindex]")),n=t.closest("[aria-colindex]");for(let t=e.indexOf(n)-1;t>=0;t--){const n=e[t];if((0,a.KX)(n))return n}}if(n===i.N.RIGHT){const e=Array.from(s.querySelectorAll("[aria-colindex]")),n=t.closest("[aria-colindex]");for(let t=e.indexOf(n)+1;tparseInt(e.getAttribute("aria-rowindex")??"0",10))),r=parseInt(i,10),o=Math.max(...s);for(let t=r+1;t<=o;t+=1){const i=t,s=e.querySelector(`[aria-colindex="${n}"][aria-rowindex="${i}"]`);if((0,a.KX)(s))return s}}if(n===i.N.UP){const n=t.closest("[aria-colindex]").getAttribute("aria-colindex"),i=t.closest("[aria-rowindex]").getAttribute("aria-rowindex");for(let t=parseInt(i,10)-1;t>=0;t-=1){const i=t,s=e.querySelector(`[aria-colindex="${n}"][aria-rowindex="${i}"]`);if((0,a.KX)(s))return s}}if(n===i.N.LEFT){const n=t.closest("[aria-colindex]"),i=parseInt(n.getAttribute("aria-rowindex"),10),s=parseInt(n.getAttribute("aria-colindex"),10),r=Array.from(e.querySelectorAll(`[aria-rowindex="${i}"]`));for(let e=s-2;e>=0;e--){const t=r[e];if((0,a.KX)(t))return t}}if(n===i.N.RIGHT){const n=t.closest("[aria-colindex]"),i=parseInt(n.getAttribute("aria-rowindex"),10),s=parseInt(n.getAttribute("aria-colindex"),10),r=Array.from(e.querySelectorAll(`[aria-rowindex="${i}"]`));for(let e=s;e{"use strict";n.d(t,{j:()=>o,id:()=>c,YU:()=>m,RX:()=>u});var i=n(59496),a=n(74488),s=n(91917);var r=n(4637);const o=i.forwardRef((function({children:e,className:t,onKeyDown:n=(()=>{}),isFluid:o=!1,...l},d){const c=(0,i.useRef)(null);(e=>{const t=(0,i.useRef)(null);(0,i.useEffect)((()=>{const n=e.current;if(!n)return()=>{};const i=e=>{const n=e.target;if(n instanceof HTMLElement){const e=parseInt(n.closest("[aria-rowindex]")?.getAttribute("aria-rowindex")??"",10),i=parseInt(n.closest("[aria-colindex]")?.getAttribute("aria-colindex")??"",10);t.current={target:n,rowIndex:e,colIndex:i}}};return n.addEventListener("focusout",i),()=>{n.removeEventListener("focusout",i)}}),[e]),(0,i.useEffect)((()=>{if(t.current&&e.current){const{target:n,rowIndex:i,colIndex:a}=t.current,r=e.current?.contains(n);!r&&Number.isInteger(i)&&Number.isInteger(a)&&(0,s.uK)(e.current,i,a),t.current=null}}))})(c),(0,i.useImperativeHandle)(d,(()=>c.current));const u=(0,i.useCallback)((e=>{c.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,s.pr)(c.current,a.N.UP,o),"ArrowDown"===e.key&&(0,s.pr)(c.current,a.N.DOWN,o),"ArrowLeft"===e.key&&(0,s.pr)(c.current,a.N.LEFT,o),"ArrowRight"===e.key&&(0,s.pr)(c.current,a.N.RIGHT,o),n(e))}),[n,o]);return(0,r.jsx)("div",{ref:c,role:"grid","aria-rowcount":l["aria-rowcount"],"aria-colcount":l["aria-colcount"],"aria-label":l["aria-label"],className:t,onKeyDown:u,tabIndex:0,"":l["data-testid"],children:e})}));var l=n(92199);const d=e=>{(0,i.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])},c=({children:e,columnIndex:t,className:n,...a})=>{const s=(0,i.useRef)(null);return(0,l.O)(s),d(s),(0,r.jsx)("div",{ref:s,className:n,role:"gridcell","aria-colindex":t+1,tabIndex:-1,...a,children:e})},u=({children:e,rowIndex:t,className:n,"aria-selected":a})=>{const o=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const e=o.current,t=e=>{const t=e.currentTarget;t.contains(document.activeElement)||(0,s.Jp)(t)};return e&&e.addEventListener("click",t),()=>{e&&e.removeEventListener("click",t)}}),[]),(0,r.jsx)("div",{ref:o,className:n,role:"row","aria-rowindex":t+1,"aria-selected":a,children:e})},m=({children:e,ariaSort:t,columnIndex:n,className:a})=>{const s=(0,i.useRef)(null);return(0,l.O)(s),d(s),(0,r.jsx)("div",{ref:s,className:a,role:"columnheader","aria-colindex":n+1,...t?{"aria-sort":t}:{},tabIndex:-1,children:e})}},13557:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,E:()=>m});var i=n(59496),a=n(74488),s=n(21840);function r(e,t,n=!0,i=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,s.lK)(e))return;const r=e.querySelector('[tabindex="0"]');t===a.N.UP&&(0,s.Bu)(r,o(e,r,a.N.UP,n,i)),t===a.N.DOWN&&(0,s.Bu)(r,o(e,r,a.N.DOWN,n,i))}function o(e,t,n,i,s){const r=t.closest('li[role="listitem"]');if(!r)return t;let o=r,l=t;const d=Array.from(e.querySelectorAll('li[role="listitem"]')),c=d.indexOf(r);if(c<0)return t;if(n===a.N.UP){if(document.activeElement===e){if(o=d[d.length-1],s){const e=o?.querySelectorAll("a[href], button");l=e[e.length-1]}else l=o?.querySelector("a[href], button");return l??t}if(s){const e=Array.from(r.querySelectorAll("a[href], button")),n=e.indexOf(t)-1;if(n>=0)return e[n]}let n=c-1;const a=()=>!l&&(!i&&n>=0||i&&c!==n);do{o=d[n];if(i&&!o&&(n=d.length-1,o=d[n]),s){const e=o?.querySelectorAll("a[href], button");l=e?e[e.length-1]:null}else l=o?.querySelector("a[href], button");n-=1}while(a())}else if(n===a.N.DOWN){if(document.activeElement===e)return o=d[0],l=o?.querySelector("a[href], button"),l??t;if(s){const e=Array.from(r.querySelectorAll("a[href], button")),n=e.indexOf(t)+1;if(n{const e=!i&&n<=d.length;return!l&&(e||i&&c!==n)};do{o=d[n];i&&!o&&(n=0,o=d[n]),l=o?.querySelector("a[href], button"),n+=1}while(a())}return l||t}var l=n(24933),d=n(4637);const c=({onKeyDown:e,children:t,circular:n=!0,allowsMultipleInteractiveChildrenInItem:o=!1,...c})=>{const u=(0,i.useRef)(null);(0,l.W)(u);const m=(0,i.useCallback)((t=>{u.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),document.documentElement.classList.remove("no-focus-outline")),"ArrowUp"===t.key&&r(u.current,a.N.UP,n,o),"ArrowDown"===t.key&&r(u.current,a.N.DOWN,n,o),e?.(t))}),[n,o,e]),p=(0,i.useCallback)((e=>{if(!u.current)return;const t=e.target,n=u.current.querySelector('[tabindex="0"]');t.closest('li[role="listitem"]')&&t!==n&&(0,s.Bu)(n,t,{preventScroll:!0})}),[]);return(0,d.jsx)("ul",{role:"list",ref:u,onKeyDown:m,onFocus:p,tabIndex:0,...c,children:t})};var u=n(92199);const m=({children:e,innerRef:t,...n})=>{const a=(0,i.useRef)(null),s=t??a;return(0,u.O)(s),(0,d.jsx)("li",{ref:s,role:"listitem",...n,children:e})}},27704:(e,t,n)=>{"use strict";n.d(t,{q:()=>a});var i=n(4637);function a({children:e,...t}){return(0,i.jsxs)("label",{className:"hidden-visually",children:[e,(0,i.jsx)("input",{...t})]})}},12696:(e,t,n)=>{"use strict";n.d(t,{r:()=>s});var i=n(59496);class a{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 n="assertive"!==this.settings.level?"status":"alert";this.currentRegion.setAttribute("aria-live",this.settings.level),this.currentRegion.setAttribute("role",n),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 s=({delay:e,idPrefix:t,level:n,parent:s}={})=>{const r=(0,i.useMemo)((()=>new a({delay:e,idPrefix:t,level:n,parent:s})),[e,t,n,s]);return(0,i.useEffect)((()=>()=>{r.clearNode()}),[r]),r}},24933:(e,t,n)=>{"use strict";n.d(t,{W:()=>a});var i=n(59496);const a=e=>{const[t,n]=(0,i.useState)(null);(0,i.useEffect)((()=>{const t=e.current;if(!t)return()=>{};const i=({target:e})=>{e instanceof HTMLElement&&n(e)};return t.addEventListener("focusout",i),()=>{t.removeEventListener("focusout",i)}}),[e]),(0,i.useEffect)((()=>{const i=e.current;if(!t||!i)return;const a=i.contains(t),s=i.contains(document.activeElement);!a&&!s&&i.focus({preventScroll:!0}),n(null)}),[e,t])}},84449:(e,t,n)=>{"use strict";n.d(t,{l:()=>v});var i=n(56162),a=n(79475),s=n(30366),r=n(3802),o=n(96848),l=n(59737),d=n(64320),c=n(29662);const u="a_fhw77sDAmUWT0DjcLz",m="IVCTj3T2ms7JvLUiF4hZ",p="_vX7nRSblUeXv4DTYkKu",g="ST9Bhw7AdmFCTZDIKw3n";var h=n(4637);const k=({showUri:e})=>{const t=(0,o.qT)(),n=(0,c.ye)(e);return null===n?null:n?.basic?(e=>{const n=e.title,s=e.body;return(0,h.jsxs)("div",{className:u,children:[(0,h.jsx)(i.D,{as:"div",variant:"cello",className:m,children:n}),(0,h.jsx)(i.D,{as:"div",variant:"mesto",className:p,children:s}),(0,h.jsx)("div",{className:g,children:(0,h.jsx)(a.D,{buttonSize:"sm",colorSet:"invertedLight",onClick:()=>{t({type:"close"})},children:e.cta})})]})})(n.basic):n?.upsellLink?(e=>{const n=e.title,o=e.body;return(0,h.jsxs)("div",{className:u,children:[(0,h.jsx)(i.D,{as:"div",variant:"cello",className:m,children:n}),(0,h.jsx)(i.D,{as:"div",variant:"mesto",className:p,children:o}),(0,h.jsxs)("div",{className:g,children:[(0,h.jsx)(s.o,{buttonSize:"sm",semanticColor:"textBase",onClick:()=>{t({type:"close"})},children:r.ag.get("close")}),(0,h.jsx)(a.D,{buttonSize:"sm",colorSet:"invertedLight",href:e.url,children:e.cta})]})]})})(n.upsellLink):(()=>{const e=r.ag.get("paywalls.modal-heading"),n=(0,h.jsxs)(h.Fragment,{children:[r.ag.get("paywalls.modal-body-p1"),(0,h.jsx)("br",{}),(0,h.jsx)("br",{}),r.ag.get("paywalls.modal-body-p2"),(0,h.jsx)("br",{}),(0,h.jsx)("br",{}),r.ag.get("paywalls.modal-body-p3")]});return(0,h.jsxs)("div",{className:u,children:[(0,h.jsx)(i.D,{as:"div",variant:"cello",className:m,children:e}),(0,h.jsx)(i.D,{as:"div",variant:"mesto",className:p,children:n}),(0,h.jsx)("div",{className:g,children:(0,h.jsx)(s.o,{buttonSize:"sm",semanticColor:"textBase",onClick:()=>{t({type:"close"})},children:r.ag.get("close")})})]})})()},v=({children:e,enabled:t,showUri:n,renderInline:i=!0})=>t&&n?(0,h.jsx)(d.Nt,{trigger:"click",action:"toggle",offset:[-2,20],renderInline:i,content:(0,h.jsx)(d.yv,{children:(0,h.jsx)(k,{showUri:n})}),children:e}):(0,l.x)(e)?e(!1,(()=>{}),{current:null}):e},25032:e=>{e.exports={cast:{appId:"CC32E753"}}},34553:(e,t,n)=>{"use strict";n.d(t,{IW:()=>o,JP:()=>s,K1:()=>r,cr:()=>a,zH:()=>i});const i="web_player",a="nowPlayingCoverExpandedState",s="isPlaybackBarRemainingTimeToggled",r=64,o=416},39206:(e,t,n)=>{"use strict";n.d(t,{L:()=>k});var i=n(59496),a=n(53417),s=n(61815),r=n(81090),o=n(98340),l=n(9374),d=n(72102),c=n(41921),u=n(54039),m=n(28301),p=n(44810);const g=(e,t)=>{const{request:n}=(0,i.useContext)(c.Ax),a=(0,d.NY)((()=>t),[t]),s=(0,i.useMemo)((()=>function(e){return(0,p.y)(e)?e.items.reduce(((e,t)=>(e.push(t.discNumber-1),e.concat(Array(t.nrTracks??0).fill(t.discNumber)))),[]):null}(a)),[a]);return(0,i.useCallback)((async(t,i)=>{const r=await n(u.qe,{uri:e,offset:null!==s?t-s[t]:t,limit:i});return(0,m.fy)(r?.data,a)}),[a,s,n,e])};var h=n(4637);const k=i.memo((function({ariaLabel:e,nrTracks:t,discs:n,albumUri:d,highlightUri:c,scrollToIndex:u,usePlayContextItem:m,hasHeaderRow:p=!0,initalTracks:k}){const v=(0,s.ZO)()===r.W.Web,f=g(d,n),y=(0,i.useRef)(null),S=(0,i.useRef)(!1),[b,_]=(0,i.useState)(null);(0,i.useEffect)((()=>{y.current&&(b?y.current.scrollToIndex(b):u&&y.current.scrollToIndex(u))}),[b,u]);const N=(0,i.useCallback)((async(e,t)=>{const n=await f(e,t);if(c&&!b){const e=n.items?.findIndex((e=>e.type===l.p.TRACK&&e?.uri===c));_(e||-1)}return n}),[f,c,b]),E=(0,i.useCallback)(((e,t)=>{if("AlbumDisc"===e.type)return(0,h.jsx)(a.UT,{discNumber:e.discNumber},t+e.discNumber);const n=e.linkedUri??e.uri,i=e.playcount?parseInt(e.playcount,10):0,s=!(S.current||!c||c!==e.uri&&c!==n);return s&&(S.current=!0),(0,h.jsx)(a.Ym,{index:t,trackNumber:e.trackNumber,contextUri:d,uri:n,uid:e.uid,duration_ms:e.duration.milliseconds,name:e.name,isPlayable:e.isPlayable,artists:e.artists,isExplicit:e.isExplicit,isMOGEFRestricted:e.is19PlusOnly,playcount:i,shouldRenderPlayCount:!v,shouldHighLight:s,usePlayContextItem:m},t+e.uri)}),[c,d,v,m]),x=(0,i.useMemo)((()=>(e=>e?[a.QD.INDEX,a.QD.TITLE,a.QD.DURATION]:[a.QD.INDEX,a.QD.TITLE,a.QD.PLAYS,a.QD.DURATION])(v)),[v]),C=(0,i.useCallback)((e=>e.type===l.p.TRACK?e.uri:""),[]);return(0,h.jsx)(o.ZP,{value:"album-tracklist",children:(0,h.jsx)(a.Pv,{ariaLabel:e,hasHeaderRow:p,rowPlaceholder:a.uD,columns:x,renderRow:E,resolveUri:C,nrTracks:t,fetchTracks:N,limit:300,outerRef:y,tracks:k},d)})}))},54039:(e,t,n)=>{"use strict";n.d(t,{hi:()=>a,qe:()=>s});n(72071);const i=Spicetify.GraphQL.Definitions["albumTrack"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"albumTrack"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContextTrack"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uid"}},{kind:"Field",name:{kind:"Name",value:"track"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"saved"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"playcount"}},{kind:"Field",name:{kind:"Name",value:"discNumber"}},{kind:"Field",name:{kind:"Name",value:"trackNumber"}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"relinkingInformation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"linkedTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}}]},a=Spicetify.GraphQL.Definitions["getAlbum"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAlbum"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"locale"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albumUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"albumMetadataFull"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"albumMetadataFull"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"FragmentSpread",name:{kind:"Name",value:"albumArtists"}},{kind:"FragmentSpread",name:{kind:"Name",value:"albumCoverArt"}},{kind:"FragmentSpread",name:{kind:"Name",value:"albumDiscs"}},{kind:"FragmentSpread",name:{kind:"Name",value:"albumReleases"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"copyright"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"courtesyLine"}},{kind:"Field",name:{kind:"Name",value:"saved"}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareUrl"}},{kind:"Field",name:{kind:"Name",value:"shareId"}}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"albumTrack"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"moreAlbumsByArtist"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"albumArtists"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"albumCoverArt"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorRaw"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}},{kind:"Field",name:{kind:"Name",value:"colorLight"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}},{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"albumDiscs"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"number"}},{kind:"Field",name:{kind:"Name",value:"tracks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"albumReleases"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"releases"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},...i.definitions,{kind:"FragmentDefinition",name:{kind:"Name",value:"moreAlbumsByArtist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"moreAlbumsByArtist"},name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"popularReleasesAlbums"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"year"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}},{kind:"Field",name:{kind:"Name",value:"type"}}]}}]}}]}}]}}]}}]}}]},s=Spicetify.GraphQL.Definitions["queryAlbumTracks"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryAlbumTracks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albumUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"albumTrack"}}]}}]}}]}}]}}]}},...i.definitions]}},80370:(e,t,n)=>{"use strict";n.d(t,{j:()=>w,i:()=>I});var i=n(59496),a=n(9102),s=n(61740),r=n(3802),o=n(39669),l=n(41921),d=n(49258),c=n(50100),u=n(72071),m=n(46164),p=n(82538),g=n(43064),h=n(32422),k=n(54039),v=n(32812),f=n(30985),y=n(9374),S=n(29251),b=n(82249);const _=e=>({...e,uid:void 0,isSaved:!1,playcount:"0",linkedUri:e.uri}),N=e=>{switch(e){case"album":return b.V.Album;case"ep":return b.V.Ep;case"single":return b.V.Single;case"compilation":return b.V.Compilation;default:return(0,S.U)(e)}};var E=n(28301);const x=(e,t,n)=>{const{name:i}=(0,d.Y)(k.hi),a={uri:e,locale:t,offset:0,limit:50};return{key:[i,a],fn:async()=>{const e=await(0,c.J)(n,k.hi,a);return"Album"===e?.data?.albumUnion.__typename?(0,E.fe)(e?.data.albumUnion):null}}},C=()=>{const e=(0,s.v9)(f.br),t=r.ag.getUrlLocale(),n=(0,s.v9)(f.yE);return(0,h.S9)({localeFeatureFlag:e,entityFeatureFlag:n,urlLocale:t,entity:"album",type:"link"})?`${o.F0}${t}`:""},w=e=>{const t=!(0,v.k)(),n=(0,g._)(e),s=(0,i.useContext)(m.H),[r,o]=(0,i.useState)(null),{request:d}=(0,i.useContext)(l.Ax),c=C(),h=x(e,c,d),{data:k,isLoading:f,error:S}=(0,a.useQuery)(h.key,h.fn,{cacheTime:15*u.y,staleTime:5e3}),b=t&&n===p.Om.YES;(0,i.useEffect)((()=>{b&&s.getAlbum(e).then((e=>o(e?(e=>{return{type:y.p.ALBUM,uri:e.uri,name:e.name,artists:(n=e.artists,n.map((e=>({type:y.p.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:N(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(_)};var t,n})(e):null)))}),[b,s,e]);return{loading:b?!r:f,error:S,data:b?r:k??null,canLoadOffline:b}},I=e=>{const{request:t}=(0,i.useContext)(l.Ax),n=(0,a.useQueryClient)(),s=C();return(0,i.useCallback)((()=>{const i=x(e,s,t);n.prefetchQuery(i.key,i.fn)}),[n,t,s,e])}},44103:(e,t,n)=>{"use strict";n.d(t,{L:()=>i.L});var i=n(39206)},82249:(e,t,n)=>{"use strict";n.d(t,{V:()=>i});let i=function(e){return e.Album="ALBUM",e.Audiobook="AUDIOBOOK",e.Compilation="COMPILATION",e.Ep="EP",e.Podcast="PODCAST",e.Single="SINGLE",e.Unknown="UNKNOWN",e}({})},28301:(e,t,n)=>{"use strict";n.d(t,{X7:()=>o,fe:()=>m,fy:()=>p});var i=n(73972),a=n(9374),s=n(29251),r=n(44810);const o=({track:{uri:e,name:t,playcount:n,duration:{totalMilliseconds:a},contentRating:s,artists:{items:r},albumOfTrack:o,playability:{playable:l}}},d)=>({uri:e,contextUri:d,totalMilliseconds:a,name:t,contentRating:s?.label||i.KS.None,isPlayable:l,playcount:parseInt(n||"0",10),artists:r.map((e=>({name:e.profile.name,uri:e.uri}))),imageUrl:o?.coverArt?.sources?.length?o?.coverArt.sources[0].url:"",albumUri:o?.uri??""}),l=e=>(e||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),d=e=>{switch(e){case i.VQ.Minute:case i.VQ.Hour:case i.VQ.Day:return"day";case i.VQ.Month:return"month";case i.VQ.Year:case void 0:return"year";default:return(0,s.U)(e)}},c=e=>{if(null!==e)return{date:e.isoString,precision:d(e.precision)}},u=e=>{return{type:a.p.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===i.KS.Explicit,is19PlusOnly:e.track.contentRating?.label===i.KS.NineteenPlus,isSaved:e.track.saved,playcount:e.track.playcount??"",linkedUri:"Track"===e.track.relinkingInformation?.linkedTrack.__typename?e.track.relinkingInformation?.linkedTrack.uri:null};var t},m=e=>{const t={totalCount:e.discs.totalCount,items:e.discs.items.map((e=>({type:"AlbumDisc",discNumber:e.number,nrTracks:e.tracks.totalCount})))},n=e.tracks.items.map(u),s=(0,r.X)(n,t)||[];return{type:a.p.ALBUM,uri:e.uri,name:e.name,artists:(m=e.artists,m.items.map((e=>({type:a.p.ARTIST,name:e.profile.name,images:l(e.visuals.avatarImage?.sources),uri:e.uri,id:e.id})))),images:l(e.coverArt?.sources),moreAlbumsByArtist:(d=e.moreAlbumsByArtist,d?.items[0]?.discography?.popularReleasesAlbums?.items.map((e=>({type:a.p.ALBUM,uri:e.uri,albumType:e.type,name:e.name,images:l(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===i.Ku.CatalogueRestricted,discs:t,copyright:e.copyright,albumType:e.type,duration:(o=e.tracks,{durationMs:o.items.length>0?o.items.reduce(((e,t)=>e+t.track.duration.totalMilliseconds),0)/o.items.length*o.totalCount:0,isEstimate:o.items.length{if("Album"!==e?.albumUnion?.__typename)return{items:[],totalLength:0};const n=e.albumUnion.tracks.items.map(u);return{items:(0,r.X)(n,t)||[],totalLength:(0,r.y)(t)?t.totalCount+e.albumUnion.tracks.totalCount:e.albumUnion.tracks.totalCount}}},44810:(e,t,n)=>{"use strict";n.d(t,{X:()=>a,y:()=>i});const i=e=>e.totalCount>=2&&e.totalCount<=10,a=(e,t)=>{if(!i(t)||!e)return e;let n=0;return e.reduce(((e,t)=>((t.trackNumber{"use strict";n.d(t,{W:()=>G});var i=n(59496),a=n(83680),s=n(56162),r=n(34885),o=n(3802),l=n(62344),d=n(84875),c=n.n(d),u=n(22991),m=n(79642),p=n(42006),g=n(21718);const h="od_kF1rLZbir8kM_F607",k="qyKJPLjz8o4jnbk92JOn",v="zsVdTdACMZA_MWB3HlEW",f="nsakAYOtgZOAcEO4ObrM",y="uJjmxe0T11dUVeW6Biz8",S="F1K3uW1jqwG0wxFHO5gl",b="Ii9XdJaXIuKbmR1zC4Rt";var _=n(4637);const N=i.memo((function(e){const{images:t,initialSelected:n=0}=e,[a,s]=(0,i.useState)(n),[r,l]=(0,i.useState)(0),d=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const e=d.current;e&&l(e.clientWidth)}),[]),(0,g.a)((()=>{const e=d.current;e&&l(e.clientWidth)})),0===t.length?null:(0,_.jsxs)("div",{className:h,children:[t.length>1&&(0,_.jsxs)(_.Fragment,{children:[0!==a&&(0,_.jsx)("button",{type:"button","aria-label":o.ag.get("gallery.prev"),onClick:()=>s(a-1),className:c()(k,v),children:(0,_.jsx)(u.e,{})}),a!==t.length-1&&(0,_.jsx)("button",{type:"button","aria-label":o.ag.get("gallery.next"),onClick:()=>s(a+1),className:c()(k,f),children:(0,_.jsx)(m.V,{})})]}),(0,_.jsx)("ul",{className:y,ref:d,dir:"auto",children:t.map(((e,t)=>(0,_.jsx)("li",{"aria-hidden":a!==t,className:S,style:{transform:`translateX(-${a*r}px)`},children:(0,_.jsx)(p.E,{loading:"lazy",src:e.url,width:e.width,height:e.height,className:b})},t)))})]})}));var E=n(83185),x=n(63120),C=n(76270),w=n(56952),I=n(96170),T=n(73972),A=n(67176),P=n(36165),O=n(8799),D=n(22616),R=n(36844),L=n(41836),F=n(51783);const j={external:"i4D2KoD4VsgqCciKSU23",externalIcon:"zuzEUQ73xaDpNkHRu4Q4",link:"oe0FHRJU7PvjoTnXJmfr"};function M(e){switch(e){case T.bm.Facebook:return(0,_.jsx)(A.z,{className:j.externalIcon});case T.bm.Twitter:return(0,_.jsx)(P.J,{className:j.externalIcon});case T.bm.Instagram:return(0,_.jsx)(O.R,{className:j.externalIcon});case T.bm.Wikipedia:return(0,_.jsx)(F.h,{className:j.externalIcon});case T.bm.Soundbetter:return(0,_.jsx)(D.e,{className:j.externalIcon});case T.bm.Other:default:return null}}function U(e){if(e.name===T.bm.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 B(e){switch(e){case T.bm.Facebook:return"Facebook";case T.bm.Twitter:return"Twitter";case T.bm.Instagram:return"Instagram";case T.bm.Wikipedia:return"Wikipedia";case T.bm.Soundbetter:return"Hire Me on SoundBetter";case T.bm.Other:default:return"Other"}}const V=({links:e})=>{const t=(0,R.W6)(L.QC)?e:e.filter((e=>e.name!==T.bm.Soundbetter));return 0===t.length?null:(0,_.jsx)("div",{className:j.external,children:t.map((e=>(0,_.jsxs)("a",{rel:"noopener noreferrer",target:"_blank",href:U(e),className:j.link,children:[M(e.name),(0,_.jsx)(s.D,{variant:"mesto",children:B(e.name)})]},e.url)))})};var H=n(55796);const G=i.memo((function(e){const{artistUri:t,name:n,bio:d,bioSource:c,images:u=[],avatarImages:m=[],worldRank:p,monthlyListeners:g,topCities:h,followers:k,externalLinks:v=[],isOpen:f,closeModal:y}=e,{spec:S}=(0,I.fU)(r.p,{data:{identifier:"",uri:t}}),b=(0,i.useCallback)((()=>{S.closeButtonFactory().hitUiHide(),y()}),[y,S]),A=(0,I.Wi)(S);return(0,_.jsxs)(E.Z,{contentLabel:n,className:H.Z.modal,isOpen:f,onRequestClose:b,animation:{modal:{base:H.Z.modalBase,afterOpen:H.Z.modalAfterOpen,beforeClose:H.Z.modalBeforeClose}},animated:!0,children:[(0,_.jsx)("button",{type:"button","aria-label":o.ag.get("close"),onClick:b,className:H.Z.close,children:(0,_.jsx)(a.k,{iconSize:16})}),(0,_.jsxs)(C.U,{className:H.Z.scrollbars,children:[(0,_.jsx)(N,{images:u}),(0,_.jsx)("div",{className:H.Z.content,ref:A,children:(0,_.jsxs)("div",{className:H.Z.columnContainer,children:[(0,_.jsxs)("div",{className:H.Z.statsContainer,children:[p>0?(0,_.jsxs)("div",{className:H.Z.rank,children:[(0,_.jsxs)(s.D,{as:"div",variant:"canon",children:["#",p]}),(0,_.jsx)(s.D,{as:"div",variant:"finale",children:o.ag.get("artist-page.world_rank")})]}):null,"number"==typeof k?(0,_.jsxs)("div",{className:H.Z.stats,children:[(0,_.jsx)(s.D,{as:"div",variant:"alto",semanticColor:"textBase",children:o.ag.formatNumber(k)}),(0,_.jsx)(s.D,{as:"div",variant:"mesto",children:o.ag.get("followers")})]}):null,"number"==typeof g?(0,_.jsxs)("div",{className:H.Z.stats,children:[(0,_.jsx)(s.D,{as:"div",variant:"alto",semanticColor:"textBase",children:o.ag.formatNumber(g)}),(0,_.jsx)(s.D,{as:"div",variant:"mesto",children:o.ag.get("monthly_listeners")})]}):null,h&&h.length?h.map((({city:e,numberOfListeners:t,country:n},i)=>(0,_.jsxs)("div",{className:H.Z.cityBlock,children:[(0,_.jsx)(s.D,{as:"div",variant:"mestoBold",semanticColor:"textBase",children:o.ag.get("artist-page.where-people-listen-from",e||"",n||"")}),(0,_.jsx)(s.D,{as:"div",variant:"mesto",children:o.ag.get("artist-page.how-many-listeners",t||0)})]},i))):null,(0,_.jsx)(i.Suspense,{fallback:null,children:(0,_.jsx)(V,{links:v})})]}),(0,_.jsx)("div",{className:H.Z.bioContainer,children:d?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(s.D,{as:"div",variant:"ballad",className:H.Z.bio,dir:"auto",children:(0,_.jsx)(w.k,{source:d,LinkComponent:x.Link,onLinkClick:b})}),c===T.Yk.Autobiography&&(0,_.jsxs)("div",{className:H.Z.postedBy,children:[(0,_.jsx)(l.q,{images:m,label:n,width:32,userIconSize:16,className:H.Z.postedByAvatar}),(0,_.jsx)(s.D,{as:"div",variant:"mesto",children:o.ag.get("acq.artist.about.attribution",{artist:n})})]})]}):null})]})})]})]})}))},74642:(e,t,n)=>{"use strict";n.d(t,{z:()=>v,Z:()=>f});var i=n(59496),a=n(9102),s=n(61740),r=n(3802),o=n(39669),l=n(41921),d=n(50100),c=n(72071),u=n(32422);const m=Spicetify.GraphQL.Definitions["queryArtistOverview"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistOverview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"locale"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"saved"}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareUrl"}},{kind:"Field",name:{kind:"Name",value:"shareId"}}]}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"verified"}},{kind:"Field",name:{kind:"Name",value:"pinnedItem"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"comment"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"backgroundImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"itemV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MerchResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[{kind:"Argument",name:{kind:"Name",value:"utmContent"},value:{kind:"StringValue",value:"direct",block:!1}},{kind:"Argument",name:{kind:"Name",value:"utmMedium"},value:{kind:"StringValue",value:"app-artistpick",block:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Merch"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"item"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExclusiveMerch"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"subtitle"}},{kind:"Field",name:{kind:"Name",value:"checkoutUrl"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"images"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"type"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Concert"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"venue"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"location"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"biography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}},{kind:"Field",name:{kind:"Name",value:"externalLinks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistExternalLinkItem"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"playlistsV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"gallery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"25"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}},{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorRaw"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"headerImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}},{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorRaw"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"discography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistDiscography"}}]}},{kind:"Field",name:{kind:"Name",value:"stats"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"followers"}},{kind:"Field",name:{kind:"Name",value:"monthlyListeners"}},{kind:"Field",name:{kind:"Name",value:"worldRank"}},{kind:"Field",name:{kind:"Name",value:"topCities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistTopCity"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"relatedContent"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appearsOn"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"releases"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"year"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"featuringV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"images"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"discoveredOnV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"images"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"relatedArtists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"goods"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"events"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userLocation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"concerts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"festival"}},{kind:"Field",name:{kind:"Name",value:"nearUser"}},{kind:"Field",name:{kind:"Name",value:"venue"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"location"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coordinates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"latitude"}},{kind:"Field",name:{kind:"Name",value:"longitude"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"partnerLinks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"partnerName"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"year"}},{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"day"}},{kind:"Field",name:{kind:"Name",value:"hour"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"limit"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"merch"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"4"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistMerchItem"}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"artistExternalLinkItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Link"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"artistDiscography"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistDiscography"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"latest"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"copyright"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"year"}},{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"day"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"popularReleasesAlbums"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"copyright"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"year"}},{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"day"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"singles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"releases"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"copyright"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"year"}},{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"day"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"albums"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"releases"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"copyright"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"year"}},{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"day"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"compilations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"releases"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"copyright"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"year"}},{kind:"Field",name:{kind:"Name",value:"month"}},{kind:"Field",name:{kind:"Name",value:"day"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"Field",name:{kind:"Name",value:"label"}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"customData"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"key"},value:{kind:"StringValue",value:"wpi",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"Variable",name:{kind:"Name",value:"locale"}}}]}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"topTracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uid"}},{kind:"Field",name:{kind:"Name",value:"track"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"playcount"}},{kind:"Field",name:{kind:"Name",value:"discNumber"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"artistTopCity"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CityListenerStats"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"numberOfListeners"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"country"}},{kind:"Field",name:{kind:"Name",value:"region"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"artistMerchItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Merch"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}}]};var p=n(30985);const g=()=>{const e=(0,s.v9)(p.br),t=(0,s.v9)(p.yE),n=r.ag.getUrlLocale();return(0,u.S9)({localeFeatureFlag:e,entityFeatureFlag:t,urlLocale:n,entity:"artist",type:"link"})?`${o.F0}${n}`:""},h=(e,t)=>[e,t],k=(e,t,n)=>async()=>(0,d.J)(n,m,{uri:e,locale:t}),v=e=>{const t=g(),{request:n}=(0,i.useContext)(l.Ax),{data:s,isLoading:r,error:o}=(0,a.useQuery)(h(e,t),k(e,t,n),{cacheTime:5*c.y,staleTime:5*c.y});return{data:s?.data??null,extensions:s?.extensions,error:o??null,loading:r}},f=e=>{const{request:t}=(0,i.useContext)(l.Ax),n=(0,a.useQueryClient)(),s=g();return(0,i.useCallback)((()=>{n.prefetchQuery(h(e,s),k(e,s,t),{staleTime:5*c.y})}),[n,t,s,e])}},16761:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ArtistOffers:()=>ln,default:()=>xa});var i=n(59496),a=n(89605),s=n(47792),r=n(50346),o=n(3802),l=n(23627),d=n(61740),c=n(56162),u=n(70927),m=n(63120),p=n(31503),g=n(96170),h=n(47563),k=n(76160),v=n(9102),f=n(25899),y=n(82710);const S=async()=>(await(0,y.getPromoRow)(f.b.getInstance())).body,b=e=>{const[t,{artistId:n,geonameId:i}]=e.queryKey;return(async(e,t)=>(await(0,y.getConcertsForArtist)(f.b.getInstance(),t,e)).body)(n,i)},_=6e5,N="EPBWBmUPyLEpl4VJflaL",E="JFiowuVIURESjJJznyZx",x="P6CL1uHz_zTqst4gaAXQ",C="JEd1tp9FdtDLBOCRSVe0";var w=n(4637);const I=e=>{const t=(0,g.$P)(),n=(0,i.useMemo)((()=>e.spec.promoRowFactory()),[e.spec]),a=(0,g.Wi)(n),{data:s,isLoading:r,isError:o}=(0,v.useQuery)("artistConcertsPromoRow",S,{staleTime:_});if(o)return null;if(r)return(0,w.jsx)("div",{className:N});if(!s)return null;return(0,w.jsxs)("div",{className:N,style:{backgroundColor:s.backgroundColor},ref:a,children:[(0,w.jsx)(c.D.h2,{variant:"cello",className:E,children:s.title}),(0,w.jsx)(m.default,{to:s.destinationURI,className:x,onClick:()=>{const e=n.hitUiNavigate({destination:s.destinationURI});t.logInteraction(e)},children:(0,w.jsx)(k.A,{as:"span",selected:!0,children:s.ctaText})}),(0,w.jsx)("img",{className:C,alt:"",src:s.imageURL})]})};var T=n(97009),A=n(27532);const P="xpUBYro3YQTRrHlOtDUG",O="RqzE7votb8N93rc_jcM1",D="FNDlk94hIuzTU46SX9XI",R="vy9zjnjiY17LMoE8NIXU",L="McNZLhuWvDVET5VU3isa",F="Y7ipyLdgXswfEfkyakDd",j="fPraNia968RT4uPMTi3A",M="us2rJWb_948b7dlVgBOe",U="GqNQN9feHja7Au6wOdLG",B="LkCU9WXlxfddrPDZZZ4J",V="LtyyKmwxLSSxcYCrRZJh",H=(0,i.memo)((e=>{const{concert:t,onClick:n}=e,i=(0,T.CH)(t.startDate.localDate),a="ONLINE"===t.category,s=t.venue,r=t.location,o=a?s:`${s} • ${r}`;return(0,w.jsxs)(m.Link,{to:`/concert/${t.id}`,className:R,onClick:n,children:[(0,w.jsxs)("div",{className:L,"aria-hidden":!0,children:[(0,w.jsx)(c.D.span,{variant:"mestoBold",className:F,children:(0,T.jw)(i)}),(0,w.jsx)(c.D.span,{variant:"canon",className:j,children:(0,T.wf)(i)})]}),(0,w.jsxs)("div",{className:M,children:[(0,w.jsx)(c.D.span,{variant:"cello",className:U,"":"event-title",children:(0,A.Yl)(t)}),(0,w.jsxs)(c.D.span,{variant:"ballad",className:B,children:[(0,T.xE)(i)," • ",(0,T.hK)(i)]}),(0,w.jsx)(c.D.span,{variant:"ballad",className:V,"":"event-venue",children:o})]})]})})),G=(0,i.memo)((e=>{const{concerts:t,spec:n,locationName:i}=e,a=(0,g.$P)(),s=(0,g.Wi)(n);return 0===t.length?(0,w.jsx)(c.D.p,{variant:"ballad",ref:s,children:i?o.ag.get("artist.concerts.error.not_found_near_location",i):o.ag.get("artist.concerts.error.not_found")}):(0,w.jsx)("div",{ref:s,children:t.map(((e,t)=>{const i=`spotify:concert:${e.id}`;return(0,w.jsx)(H,{concert:e,onClick:()=>{const e=n.eventRowFactory({position:t,uri:i}).hitUiNavigate({destination:i});a.logInteraction(e)}},e.id)}))})})),W=G;var z=n(72942);const K=e=>{const t=o.ag.get("artist.concerts.artist_tour_dates"),[n,i]=t.split("{0}");return(0,w.jsxs)(w.Fragment,{children:[n,(0,w.jsx)(m.Link,{to:e.uri,className:P,children:e.name}),i]})},Y=(0,i.memo)((e=>{const{data:t,locationName:n,onSetLocation:a}=e,{artist:s,concerts:r}=t,{spec:l}=(0,g.fU)(u.createDesktopConcertsArtistConcertsEventFactory,{data:{uri:s.uri,identifier:s.id}}),m=(0,g.Wi)(l),k=(0,i.useMemo)((()=>l.headerFactory()),[l]),v=(0,i.useMemo)((()=>l.locationEventsFactory({identifier:n})),[l,n]),f=(0,i.useMemo)((()=>l.otherEventsFactory()),[l]),y=(0,d.v9)(p.dZ),S=(0,h.qV)(y,s.id),{nearUser:b,otherLocations:_}=(e=>{const t={nearUser:[],otherLocations:[]};return e.forEach((e=>{e.nearUser?t.nearUser.push(e.concert):t.otherLocations.push(e.concert)})),t})(r);return(0,w.jsxs)("section",{ref:m,className:D,children:[(0,w.jsx)(c.D,{as:"h1",className:O,variant:"brio",semanticColor:"textBase",children:S?K(s):s.name}),(0,w.jsxs)("section",{children:[(0,w.jsx)(z.Z,{handleLocationChange:e=>{e&&a(e)},locationStr:n,headerSpec:k}),(0,w.jsx)(W,{concerts:b,spec:v,locationName:n})]}),(0,w.jsx)("section",{children:(0,w.jsx)(I,{spec:l})}),(0,w.jsxs)("section",{children:[(0,w.jsx)(c.D,{as:"h2",className:O,variant:"alto",semanticColor:"textBase",children:o.ag.get("concerts.header.other")}),(0,w.jsx)(W,{concerts:_,spec:f})]})]})})),q=Y,Z=()=>{const{artistId:e=""}=(0,a.UO)(),[t,n]=(0,i.useState)(),{data:s,isLoading:r}=(e=>{const t=["artistConcerts",e];return(0,v.useQuery)(t,b,{staleTime:_,keepPreviousData:!0,retry:!1})})({artistId:e,geonameId:t?.geohash});return r?(0,w.jsx)(l.h,{hasError:!1,errorMessage:""}):s?(0,w.jsx)(q,{data:s,locationName:t?.location||s.userLocation||o.ag.get("concerts.default_location"),onSetLocation:n}):(0,w.jsx)(l.h,{hasError:!0,errorMessage:o.ag.get("concert.error.concert_not_found_title")})};var Q=n(67565),J=n(84875),$=n.n(J),X=n(28604),ee=n(91703),te=n(5488);const ne="ZLNNoB2n5gQpMPa2h2NC";var ie=n(72071);const ae=Spicetify.GraphQL.Definitions["queryArtistAppearsOn"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistAppearsOn"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"relatedContent"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appearsOn"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"relatedAlbumGroup"}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"relatedAlbumGroup"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumGroup"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"releases"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"relatedAlbum"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"relatedAlbum"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"2"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}}]};var se=n(36016);const re=i.memo((function(){const{artistId:e=""}=(0,a.UO)(),t=(0,se.qo)(e),{loading:n,error:i,data:s}=(r={uri:t},d={cacheTime:15*ie.y},(0,ie.a)(ae,r,d));var r,d;const c="Artist"===s?.artistUnion.__typename?s.artistUnion:null;if(null===c||i||n)return(0,w.jsx)(l.h,{hasError:null!==i,errorMessage:o.ag.get("error.request-artist-appears-on")});const u=c.profile.name,m=(0,se.uW)(c.relatedContent.appearsOn.items);return(0,w.jsxs)("div",{className:$()("contentSpacing",ne),children:[u?(0,w.jsx)(ee.$,{children:o.ag.get("artist-page.appearson.seo.title",u)}):null,(0,w.jsx)(te.P,{title:o.ag.get("artist.appears-on"),total:m.length,showAll:!0,children:m.map(((e,t)=>(0,w.jsx)(X.r,{index:t,...(0,se.bC)(e)},e.uri)))})]})}));var oe=n(36844);const le=Spicetify.GraphQL.Definitions["discographyAlbum"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"discographyAlbum"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"year"}},{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareId"}},{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}},{kind:"Field",name:{kind:"Name",value:"tracks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]},de=Spicetify.GraphQL.Definitions["albumMetadataReleases"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"albumMetadataReleases"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumGroup"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"releases"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"discographyAlbum"}}]}}]}}]}}]},ce=Spicetify.GraphQL.Definitions["albumMetadata"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"albumMetadata"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumGroupPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"albumMetadataReleases"}}]}}]}}]},ue=Spicetify.GraphQL.Definitions["queryArtistDiscographyAlbums"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistDiscographyAlbums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albums"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"albumMetadata"}}]}}]}}]}}]}}]}},...ce.definitions,...de.definitions,...le.definitions]},me=Spicetify.GraphQL.Definitions["queryArtistDiscographySingles"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistDiscographySingles"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"singles"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"albumMetadata"}}]}}]}}]}}]}}]}},...ce.definitions,...de.definitions,...le.definitions]},pe=Spicetify.GraphQL.Definitions["queryArtistDiscographyCompilations"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistDiscographyCompilations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"compilations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"albumMetadata"}}]}}]}}]}}]}}]}},...ce.definitions,...de.definitions,...le.definitions]},ge=Spicetify.GraphQL.Definitions["queryArtistDiscographyAll"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistDiscographyAll"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"all"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"albumMetadata"}}]}}]}}]}}]}}]}},...ce.definitions,...de.definitions,...le.definitions]},he=Spicetify.GraphQL.Definitions["queryArtistDiscographyOverview"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistDiscographyOverview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"discography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albums"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"Field",name:{kind:"Name",value:"singles"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"Field",name:{kind:"Name",value:"compilations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"Field",name:{kind:"Name",value:"all"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]}}]}}]}}]};var ke=n(41921);var ve=n(41836),fe=n(62517),ye=n(33971),Se=n(9407),be=n(48607),_e=n(73972),Ne=n(43438),Ee=n(14241),xe=n(13655),Ce=n(35394),we=n(88513),Ie=n(41226),Te=n(73997),Ae=n(77312),Pe=n(44103),Oe=n(6142),De=n(95663),Re=n(98479),Le=n(60599),Fe=n(69812),je=n(66632);const Me="artist-artistDiscography-topBar",Ue="artist-artistDiscography-topBarScrolled",Be="artist-artistDiscography-artistName",Ve="artist-artistDiscography-button",He="artist-artistDiscography-active",Ge="artist-artistDiscography-tracklist",We="artist-artistDiscography-cardGrid",ze="artist-artistDiscography-headerContainer",Ke="artist-artistDiscography-firstAlbum",Ye="artist-artistDiscography-headerImage",qe="artist-artistDiscography-headerMetadata",Ze="artist-artistDiscography-headerButtons",Qe="artist-artistDiscography-headerTitle";function Je(e){switch(e){case _e.VZ.Single:return o.ag.get("single");case _e.VZ.Ep:return o.ag.get("ep");case _e.VZ.Compilation:return o.ag.get("compilation");case _e.VZ.Album:default:return o.ag.get("album")}}const $e=i.memo((function({album:e,artistUri:t,usePlayContextPage:n,pageIndex:a,setTopBarContent:s}){const r=(0,De.o)(),[l,d]=(0,je.Z)(e.uri),{titleRef:u,tracklistRef:p,displayTopBar:g}=(0,Re.W)(),h=(0,i.useCallback)((async()=>{r({targetUri:e.uri,intent:l?"unsave":"save",type:"click"});try{await d(!l)}catch{}}),[r,e.uri,l,d]),{isPlaying:k,togglePlay:v,usePlayContextItem:f}=n({pageURI:e.uri,pageIndex:a}),y=(0,Oe.O)(e.uri?[e.uri]:[],e.name),S=(0,i.useMemo)((()=>({items:[],totalCount:0})),[]),b=(0,i.useMemo)((()=>{if(g)return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Ae.$,{size:"md",onClick:()=>v(),disabled:!e.playability.playable,isPlaying:k,uri:e.uri}),(0,w.jsx)(Te.i,{text:e.name,dragUri:e.uri,dragLabel:e.name})]})}),[e.name,e.playability.playable,e.uri,g,k,v]);return(0,i.useEffect)((()=>{s(b)}),[s,b]),(0,w.jsxs)(Q.fd,{surface:Q.Tg.ALBUM,uris:[e.uri],children:[(0,w.jsxs)("div",{className:$()(ze,{[Ke]:0===a}),children:[(0,w.jsx)(Ie.Oe,{className:Ye,images:e.coverArt?.sources||[],name:e.name,placeholderType:"album",dragUri:e.uri}),(0,w.jsxs)("div",{className:qe,children:[(0,w.jsx)(c.D,{variant:"alto",semanticColor:"textBase",className:Qe,draggable:!!e.uri,onDragStart:y,children:(0,w.jsx)(m.Link,{to:e.uri,children:e.name})}),(0,w.jsx)("div",{ref:u}),(0,w.jsx)(Ie.QS,{releaseDate:e.date?.isoString,totalTracks:e.tracks.totalCount,albumType:Je(e.type)}),(0,w.jsxs)("div",{className:Ze,children:[(0,w.jsx)(Ae.$,{onClick:()=>v(),disabled:!e.playability.playable,isPlaying:k,size:"sm",uri:e.uri,version:Le.ul.secondary}),(0,w.jsx)(Ie.rn,{children:(0,w.jsx)(Ee.H,{isAdded:!!l,onClick:h,disabled:!1,size:Ee.q.sm})}),(0,w.jsx)(xe.o,{uri:e.uri,isFollowing:!!l,onFollow:h,size:xe.q.sm}),(0,w.jsx)(Fe.y,{menu:(0,w.jsx)(we.Y,{uri:e.uri,artistUri:t,sharingInfo:e.sharingInfo}),children:(0,w.jsx)(Ce.z,{size:Ce.q.sm,label:o.ag.get("more.label.context",e.name)})})]})]})]}),(0,w.jsx)("div",{ref:p,className:$()("contentSpacing",Ge),children:(0,w.jsx)(Pe.L,{ariaLabel:e.name,nrTracks:e.tracks.totalCount,albumUri:e.uri,discs:S,usePlayContextItem:f})})]})}));var Xe=n(57559);const et=i.memo((function(e){const{usePlayContextPage:t,pageIndex:n}=e,{isPlaying:i,togglePlay:a}=t({pageURI:e.uri,pageIndex:n});return(0,w.jsx)(Xe.i,{index:n,showType:!0,...e,delegatePlayback:!0,isPlaying:i,onPlay:()=>a()})}));var tt=n(16518),nt=n(65369),it=n(55477),at=n(91577),st=n(3608);let rt=function(e){return e.GRID="grid",e.LIST="list",e}({});const ot=i.memo((function({artistName:e,artistUri:t,albumType:n,dropDownOptions:a,onTypeChange:s,displayMode:r,onDisplayModeChange:o,topBarContent:l}){const[d,u]=(0,i.useState)(!1),p=(0,i.useCallback)((e=>{const t=e.target.scrollTop;t>0&&!d?u(!0):0===t&&d&&u(!1)}),[d]);return(0,st.c)(p,{executeOnceOnStart:!0}),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(at.w,{children:r!==rt.GRID?l:void 0}),(0,w.jsxs)("div",{className:$()(Me,"contentSpacing",{[Ue]:d}),children:[(0,w.jsx)(c.D,{as:"div",variant:"canon",className:Be,children:(0,w.jsx)(m.Link,{to:t,children:e})}),(0,w.jsx)(it.A,{options:a,onSelect:s,selected:n}),(0,w.jsx)("button",{type:"button",role:"switch","aria-checked":r===rt.LIST,"aria-label":rt.LIST,className:$()(Ve,{[He]:r===rt.LIST}),onClick:()=>o(rt.LIST),children:(0,w.jsx)(tt.d,{iconSize:16})}),(0,w.jsx)("button",{type:"button",role:"switch","aria-checked":r===rt.GRID,"aria-label":rt.GRID,className:$()(Ve,{[He]:r===rt.GRID}),onClick:()=>o(rt.GRID),children:(0,w.jsx)(nt.z,{iconSize:16})})]})]})})),lt=(0,i.memo)((function({uri:e,name:t,dropDownOptions:n,nrAll:s,nrAlbums:o,nrSingles:l,nrCompilations:d,initialDropDownOption:c}){const[u,m]=(0,i.useState)(c),[,p]=(0,i.useState)(0),{pathname:g}=(0,a.TH)(),h=(0,a.s0)(),[k=rt.LIST,v]=(0,Se.z)("discography-page-view-mode",rt.LIST),[f,y]=(0,i.useState)(void 0),S=(0,i.useRef)({all:{items:[],currentOffset:0,totalCount:s},[_e.VZ.Album]:{items:[],currentOffset:0,totalCount:o},[_e.VZ.Single]:{items:[],currentOffset:0,totalCount:l},[_e.VZ.Compilation]:{items:[],currentOffset:0,totalCount:d}}),{requestAlbums:b,requestSingles:_,requestCompilations:N,requestAll:E}=(e=>{const{request:t}=(0,i.useContext)(ke.Ax);return{requestAlbums:(0,i.useCallback)((async(n,i)=>{if(!i)return[];const a=await t(ue,{uri:e,offset:n,limit:i});return"Artist"!==a?.data?.artistUnion?.__typename?[]:(0,se.Pm)(a.data.artistUnion.discography.albums.items||[])}),[e,t]),requestSingles:(0,i.useCallback)((async(n,i)=>{if(!i)return[];const a=await t(me,{uri:e,offset:n,limit:i});return"Artist"!==a?.data?.artistUnion?.__typename?[]:(0,se.Pm)(a.data.artistUnion.discography.singles.items||[])}),[e,t]),requestCompilations:(0,i.useCallback)((async(n,i)=>{if(!i)return[];const a=await t(pe,{uri:e,offset:n,limit:i});return"Artist"!==a?.data?.artistUnion?.__typename?[]:(0,se.Pm)(a.data.artistUnion.discography.compilations.items||[])}),[e,t]),requestAll:(0,i.useCallback)((async(n,i)=>{if(!i)return[];const a=await t(ge,{uri:e,offset:n,limit:i});return"Artist"!==a?.data?.artistUnion?.__typename?[]:(0,se.Pm)(a.data.artistUnion.discography.all.items||[])}),[e,t])}})(e),x=(0,i.useCallback)((async()=>{let e=b;u.key===_e.VZ.Single&&(e=_),u.key===_e.VZ.Compilation&&(e=N),"all"===u.key&&(e=E);const t=S.current[u.key].totalCount-S.current[u.key].currentOffset,n=await e(S.current[u.key].currentOffset,Math.min(50,t));n.length>0&&(S.current[u.key].items=S.current[u.key].items.concat(n),S.current[u.key].currentOffset+=n.length),p((e=>e+1))}),[u.key,b,E,N,_]),C=(0,i.useCallback)((e=>{const t=n.find((t=>t.key===e));t&&(h(g.replace(/discography.*/,`discography/${t.key.toLowerCase()}`),{replace:!0}),m(t))}),[n,h,g]),{usePlayContextPage:I}=(0,be.n)({uri:e,pages:S.current[u.key].items.filter((e=>(0,r.YF)(e.uri))).map((e=>{const t=(0,r.EC)(e.uri).id;return{uri:e.uri,url:`hm://artistplaycontext/v1/page/spotify/album/${t}/km`}})),metadata:{"disable-autoplay":"true"}},{featureIdentifier:"artist"});return(0,w.jsxs)(ye.C,{onReachBottom:x,children:[(0,w.jsx)(ot,{artistName:t,artistUri:e,topBarContent:f,dropDownOptions:n,albumType:u,onTypeChange:C,displayMode:k,onDisplayModeChange:e=>{v(e)}}),k===rt.LIST?S.current[u.key].items.map(((t,n)=>(0,w.jsx)($e,{album:t,artistUri:e,usePlayContextPage:I,pageIndex:n,setTopBarContent:y},t.uri))):(0,w.jsx)(fe.T,{className:$()("contentSpacing",We),render:()=>S.current[u.key].items.map(((n,i)=>(0,w.jsx)(et,{...(0,Ne.B$)(n,e,t),usePlayContextPage:I,pageIndex:i},n.uri)))})]})})),dt=(0,i.memo)((function(){const{artistId:e="",albumType:t}=(0,a.UO)(),n=(0,oe.W6)(ve.EW),i=(0,se.qo)(e),{loading:s,error:r,data:d}=(c={uri:i},u={cacheTime:15*ie.y},(0,ie.a)(he,c,u));var c,u;if(null===d||!d?.artistUnion||"Artist"!==d?.artistUnion.__typename||r||s)return(0,w.jsx)(l.h,{hasError:null!==r,errorMessage:o.ag.get("error.request-artist-discography")});const m=d.artistUnion.profile.name,p=[];d.artistUnion.discography.all.totalCount>0&&n&&p.push({key:"all",value:o.ag.get("artist-page-discography.all")}),d.artistUnion.discography.albums.totalCount>0&&p.push({key:_e.VZ.Album,value:o.ag.get("artist.albums")}),d.artistUnion.discography.singles.totalCount>0&&p.push({key:_e.VZ.Single,value:o.ag.get("artist.singles")}),d.artistUnion.discography.compilations.totalCount>0&&p.push({key:_e.VZ.Compilation,value:o.ag.get("artist.compilations")});const g=p.find((e=>!("all"!==e.key||"all"!==t||!n)||(e.key===_e.VZ.Album&&t===_e.VZ.Album.toLowerCase()||(e.key===_e.VZ.Single&&t===_e.VZ.Single.toLowerCase()||e.key===_e.VZ.Compilation&&t===_e.VZ.Compilation.toLowerCase()))))||p[0];return(0,w.jsxs)(w.Fragment,{children:[m?(0,w.jsx)(ee.$,{children:o.ag.get("artist-page.discography.seo.title",m)}):null,(0,w.jsx)(lt,{uri:i,name:m||"",dropDownOptions:p,nrAll:d.artistUnion.discography.all.totalCount,nrAlbums:d.artistUnion.discography.albums.totalCount,nrSingles:d.artistUnion.discography.singles.totalCount,nrCompilations:d.artistUnion.discography.compilations.totalCount,initialDropDownOption:g})]})}));var ct=n(75523);const ut=Spicetify.GraphQL.Definitions["artistPlaylist"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"artistPlaylist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]},mt=Spicetify.GraphQL.Definitions["queryArtistPlaylists"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistPlaylists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"playlistsV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistPlaylists"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"artistPlaylists"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistPageV2"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistPlaylist"}}]}}]}},...ut.definitions]},pt=Spicetify.GraphQL.Definitions["queryArtistDiscoveredOn"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistDiscoveredOn"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"relatedContent"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"discoveredOnV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistPlaylist"}}]}}]}}]}}]}}]}}]}},...ut.definitions]},gt=i.memo((function(){const{artistId:e=""}=(0,a.UO)(),t=(0,se.qo)(e),{loading:n,error:i,data:s}=(r={uri:t},d={cacheTime:15*ie.y},(0,ie.a)(pt,r,d));var r,d;if(null===s||"Artist"!==s.artistUnion.__typename||i||n)return(0,w.jsx)(l.h,{hasError:null!==i,errorMessage:o.ag.get("error.request-artist-featuring")});const c=s.artistUnion.relatedContent.discoveredOnV2.items;return(0,w.jsxs)("div",{className:$()("contentSpacing",ne),children:[(0,w.jsx)(ee.$,{children:o.ag.get("artist-page.discovered-on")}),(0,w.jsx)(te.P,{title:o.ag.get("artist-page.discovered-on"),total:c.length,showAll:!0,children:c.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,w.jsx)(ct.Z,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)}))})]})})),ht=Spicetify.GraphQL.Definitions["queryArtistFeaturing"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistFeaturing"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"relatedContent"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"featuringV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistPlaylist"}}]}}]}}]}}]}}]}}]}},...ut.definitions]},kt=i.memo((function(){const{artistId:e=""}=(0,a.UO)(),t=(0,se.qo)(e),{loading:n,error:i,data:s}=(r={uri:t},d={cacheTime:15*ie.y},(0,ie.a)(ht,r,d));var r,d;if(null===s||"Artist"!==s?.artistUnion?.__typename||i||n)return(0,w.jsx)(l.h,{hasError:null!==i,errorMessage:o.ag.get("error.request-artist-featuring")});const c=s.artistUnion,{name:u}=c.profile,m=c.relatedContent.featuringV2.items;return(0,w.jsxs)("div",{className:$()("contentSpacing",ne),children:[u?(0,w.jsx)(ee.$,{children:o.ag.get("artist-page.featuring.seo.title",u)}):null,(0,w.jsx)(te.P,{title:o.ag.get("artist-page.featuring",u),total:m.length,showAll:!0,children:m.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,w.jsx)(ct.Z,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)}))})]})}));var vt=n(94041),ft=n(81025),yt=n(4270),St=n(79823),bt=n(14280),_t=n(49663),Nt=n(88959),Et=n(49795),xt=n(29655),Ct=n(69527),wt=n(7184),It=n(59359),Tt=n(97277),At=n(33122);const Pt=i.memo((function({concerts:e,artistId:t}){const{spec:n,logger:a}=(0,g.fU)(wt.createDesktopOnTourSectionEventFactory,{data:{uri:`${(0,Ne.GJ)(t)}`,position:0,reason:"Elevated On Tour shelf"}}),s=`${(0,Ne.GJ)(t)}:concerts`,r=(0,g.Wi)(n);return(0,w.jsx)(i.Suspense,{fallback:null,children:(0,w.jsxs)("div",{ref:r,children:[(0,w.jsx)(It.r,{title:o.ag.get("artist-page.on-tour"),seeAllUri:s,onClickSeeAll:()=>{const e=n.seeAllButtonFactory({uri:s}).hitUiNavigate({destination:s});a.logInteraction(e)},hasMoreElements:!0}),(0,w.jsx)("ul",{className:At.Z.onTourShelfGrid,children:e.slice(0,6).map(((e,t)=>(0,w.jsx)("li",{children:(0,w.jsx)(Tt.A,{concert:e,index:t,spec:n})},e.id)))})]})})}));var Ot=n(88541),Dt=n(80964),Rt=n(98340),Lt=n(74150),Ft=n(6444),jt=n(9603),Mt=n(75207),Ut=n(58706),Bt=n(62344),Vt=n(56952),Ht=n(12330),Gt=n(23312),Wt=n(55796);const zt=i.memo((function(e){const{artistUri:t,name:n,bio:a,bioSource:s,images:r=[],avatarImages:l=[],worldRank:d,monthlyListeners:u,topCities:m,followers:p,externalLinks:g=[],showModal:h=!1,className:k="",spec:v}=e,[f,y]=(0,i.useState)(h),S=(0,Ht.$)(),b=(0,i.useCallback)((()=>{const e=v.hitUiReveal();S.logInteraction(e),y(!0)}),[v,S]),_=(0,i.useCallback)((()=>{y(!1)}),[]),N=r.find((e=>(e.width||0)>=(e.height||0))),E=N&&{backgroundImage:`linear-gradient(${Ut.X33} 0%, ${Ut.ajA} 100%), url(${N.url})`};return(0,w.jsxs)("div",{className:k,children:[(0,w.jsx)(c.D,{as:"h2",variant:"canon",semanticColor:"textBase",className:Wt.Z.heading,children:o.ag.get("artist.about")}),(0,w.jsx)("div",{className:$()(Wt.Z.artistGridContainer),children:(0,w.jsxs)("button",{type:"button","aria-label":n,className:$()(Wt.Z.container,{[Wt.Z.backgroundImage]:E}),onClick:b,style:E,children:[d>0?(0,w.jsxs)("div",{className:Wt.Z.rank,children:[(0,w.jsxs)(c.D,{as:"div",variant:"canon",children:["#",d]}),(0,w.jsx)(c.D,{as:"div",variant:"finale",children:o.ag.get("artist-page.world_rank")})]}):null,(0,w.jsxs)("div",{className:Wt.Z.content,children:[!N&&(0,w.jsx)(Bt.q,{images:l,label:n,width:204,userIconSize:76,className:Wt.Z.avatar}),"number"==typeof u?(0,w.jsx)(c.D,{as:"div",variant:"balladBold",semanticColor:"textBase",children:o.ag.get("artist.monthly-listeners-count",u)}):null,a?(0,w.jsx)(c.D,{as:"div",variant:"ballad",className:Wt.Z.bio,semanticColor:"textBase",dir:"auto",children:(0,w.jsx)(Vt.N,{source:a})}):null]})]})}),(0,w.jsx)(Gt.W,{artistUri:t,name:n,bio:a,bioSource:s,worldRank:d,images:r,topCities:m,followers:p,externalLinks:g,isOpen:f,closeModal:_,monthlyListeners:u})]})})),Kt="Jr6tcq7gSdKFSqofza3T";var Yt=n(63071);function qt(e){const t=e[0];return!(!t||!("releases"in t))}const Zt=({artistId:e,artistUri:t,artistName:n,discography:a,shelfIndex:s,spec:r})=>{const[l,d]=(0,i.useState)("popularReleasesAlbums"),c=(0,i.useMemo)((()=>r.discographyShelfFactory({position:s})),[r,s]),u=(0,Ht.$)(),m=(0,i.useMemo)((()=>[a.popularReleasesAlbums.totalCount>0?"popularReleasesAlbums":null,a.singles.totalCount>0?"singles":null,a.albums.totalCount>0?"albums":null,a.compilations.totalCount>0?"compilations":null].filter(Boolean)),[a]),p=(0,i.useCallback)((e=>{const t=c.chipsFactory().chipFactory({identifier:e,position:m.indexOf(e)}).hitFilter();u.logInteraction(t),d(e)}),[c,m,u]),h=(0,i.useCallback)((()=>(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)("div",{className:Kt,children:[a.popularReleasesAlbums.totalCount>0&&(0,w.jsx)(k.A,{selected:"popularReleasesAlbums"===l,onClick:()=>p("popularReleasesAlbums"),selectedColorSet:"invertedLight",children:o.ag.get("artist-page.popular")}),a.albums.totalCount>0&&(0,w.jsx)(k.A,{selected:"albums"===l,onClick:()=>p("albums"),selectedColorSet:"invertedLight",children:o.ag.get("artist.albums")}),a.singles.totalCount>0&&(0,w.jsx)(k.A,{selected:"singles"===l,onClick:()=>p("singles"),selectedColorSet:"invertedLight",children:o.ag.get("artist.singles")}),a.compilations.totalCount>0&&(0,w.jsx)(k.A,{selected:"compilations"===l,onClick:()=>p("compilations"),selectedColorSet:"invertedLight",children:o.ag.get("artist.compilations")})]})})),[a,l,p]);let v=a[l];"popularReleasesAlbums"===l&&a.latest&&(v={...a[l],items:[a.latest,...a[l].items.filter((e=>e.uri!==a.latest?.uri))]});let f="all";"albums"===l?f=_e.VZ.Album.toLowerCase():"singles"===l?f=_e.VZ.Single.toLowerCase():"compilations"===l&&(f=_e.VZ.Compilation.toLowerCase());const y=`${(0,Ne.GJ)(e)}:discography:${f}`,S=(0,i.useCallback)((()=>{const e=c.shelfHeaderFactory().titleFactory().hitUiNavigate({destination:y??""});u.logInteraction(e)}),[u,y,c]),b=(0,i.useCallback)((()=>{const e=c.shelfHeaderFactory().seeAllButtonFactory().hitUiNavigate({destination:y??""});u.logInteraction(e)}),[u,y,c]),_=(0,g.Wi)(c),N=v.items;return(0,w.jsx)(Rt.JL,{value:"shelf/discography",children:(0,w.jsx)(te.P,{total:v.totalCount,title:o.ag.get("artist-page.discography"),seeAllUri:y,alwaysShowSeeAll:!0,className:Yt.Z.artistShelfSpacer,renderSubHeader:h,onClickShelfTitle:S,onClickShelfSeeAll:b,elementRef:_,children:(qt(N)?(0,Ne.Hr)(N):N).map(((e,i)=>(0,w.jsx)(Rt.JL,{value:"card",index:i,children:(0,w.jsx)(Xe.i,{latest:e.uri===a.latest?.uri,showType:!0,...(0,Ne.B$)(e,t,n),index:i})},e.uri)))})})};var Qt=n(91318),Jt=n(94285),$t=n(3289),Xt=n(66721);const en="artist-artistOffers-item",tn="artist-artistOffers-pic",nn="artist-artistOffers-info",an="artist-artistOffers-name",sn="artist-artistOffers-description",rn="artist-artistOffers-icon",on=({offer:e,index:t,spec:n,titleVariant:a})=>{const{name:s,uri:r,description:o,image:l,url:d}=e,u=(0,g.$P)(),m=(0,i.useMemo)((()=>n.merchCardFactory({identifier:r,uri:d||"",position:t})),[d,r,n,t]),p=(0,g.Wi)(m);if(!s||!d)return null;const h=e=>{e?.stopPropagation();const t=m.hitNavigateToExternalUri({destination:d});u.logInteraction(t)};return(0,w.jsxs)("div",{className:en,ref:p,onClick:()=>{h(),window.open(d,"_blank")},children:[l?.sources?.[0].url&&(0,w.jsx)(Xt.Ee,{src:l.sources?.[0].url,className:tn,alt:s,width:"48",height:"48",loading:"lazy"}),(0,w.jsxs)("div",{className:nn,children:[(0,w.jsx)($t._,{label:s,children:(0,w.jsx)(c.D,{as:"a",href:d,target:"_blank",onClick:h,variant:a,semanticColor:"textBase",className:an,"":"offer-name",children:s})}),(0,w.jsx)($t._,{label:o,children:(0,w.jsx)(c.D,{as:"p",variant:"mesto",className:sn,children:o})})]}),(0,w.jsx)(Jt.T,{iconSize:16,className:rn,"aria-hidden":"true"})]})},ln=({items:e,className:t,merchVariant:n,artistId:i="",variant:a="balladBold"})=>{const{spec:s}=(0,g.fU)(Qt.createDesktopMerchShelfEventFactory,{data:{identifier:i,uri:(0,Ne.qo)(i),position:0,reason:n}});return(0,w.jsx)("ul",{className:t,children:e.map(((e,t)=>(0,w.jsx)("li",{children:(0,w.jsx)(on,{offer:e,index:t,spec:s,titleVariant:a})},e.uri+t)))})};var dn=n(16743),cn=n(22823),un=n(35725),mn=n(54299);const pn=i.memo((function({uri:e,artist:{name:t,sharingInfo:n,verified:a,monthlyListeners:s,headerImage:{sources:r,extractedColors:l},avatarImage:{sources:d,extractedColors:c}},togglePlay:u,isPlaying:m,spec:p,isActive:h}){const k=(0,g.$P)(),v=(0,i.useMemo)((()=>p.topBarFactory()),[p]),f=(0,g.Wi)(v),y=(0,i.useMemo)((()=>p.topBarFactory().playButtonFactory()),[p]),S=i.useCallback((()=>{const t=(0,Dt.aK)({isPlaying:m,isActive:h,spec:y,logger:k,uri:e});u({loggingParams:t})}),[u,m,h,e,y,k]),b={backgroundColor:(0,un.Y)(l?.colorRaw.hex||c?.colorRaw.hex||null)},_=r.length>0;return _&&(b.backgroundImages=r),(0,w.jsxs)(Ie.gF,{...b,children:[(0,w.jsxs)(dn.W,{ref:f,children:[(0,w.jsx)(Ae.$,{size:"md",onClick:S,isPlaying:m,uri:e}),(0,w.jsx)(Te.i,{text:t,dragUri:e,dragLabel:t})]}),_?null:(0,w.jsx)(mn._,{menu:(0,w.jsx)(bt.m,{uri:e,sharingInfo:n}),children:(0,w.jsx)(Ie.Oz,{dragUri:e,images:(d||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),name:t,placeholderType:"artist",shape:Ie.Kc.CIRCLE})}),(0,w.jsxs)(Ie.sP,{children:[a&&(0,w.jsx)(cn.S,{text:o.ag.get("artist.verified")}),(0,w.jsx)(mn._,{menu:(0,w.jsx)(bt.m,{uri:e,sharingInfo:n}),children:(0,w.jsx)(Ie.xd,{dragUri:e,dragLabel:t,children:t})}),(0,w.jsx)(Ie.T0,{children:o.ag.get("artist.monthly-listeners-count",s)})]})]})}));var gn=n(57988),hn=n(63082),kn=n(88333);const vn="yBfmq8hesL_kS3haPkhg",fn="MFGqgrafYuIqkGao5tt8",yn="Bi8nGSg6ICOJ5Qewu_8C",Sn="lvYe0qVaINdDD2RsAWxQ",bn="j5t55FylgHL6FVA_fHB5",_n="vzq0mjreTX3_P6lc_ajx",Nn="wfn24cDtgkkPtlI6x0Rw",En="OMZpD7ZSVqraSXPYcpg6",xn="CrtM2Dansd7c6zWmaWdc",Cn="UDmh7e8IT4UIScR2CsmX",wn="P9u2QJN2z8Jvj0tuHTCe",In="Q1KphyoGGEfPCkw9n3cB",Tn="eYxyC8G88x1ZCS6lP4u4",An="JsATn2ej01PgXNeX_UV3",Pn=()=>(0,w.jsxs)("div",{className:yn,children:[(0,w.jsx)(gn.y,{className:_n}),(0,w.jsx)(c.D,{as:"div",variant:"balladBold",className:Nn,children:"Exclusive"})]});const On=i.memo((function(e){const t=(0,g.$P)(),{artistId:n=""}=(0,a.UO)(),{search:s}=(0,a.TH)(),r=(0,se.qo)(n),{avatarImages:o=[],name:l,spec:d,item:u,comment:m,backgroundImage:p,isExclusive:h}=e,[k,v]=(0,je.Z)(r),{checkoutUrl:f,title:y,subtitle:S,backgroundImageUrl:b}=function(e,t){const n="checkoutUrl"in e;return{checkoutUrl:(n?e.checkoutUrl:e.url)??"",title:(n?e.title:e.name)??"",subtitle:(n?e.subtitle:e.price)??"",backgroundImageUrl:n?t?.sources[0]?.url??"":(i=e.image?.sources??[],i.length?i.find((e=>640===e.width))?.url??"":"")};var i}(u,p),_=new URLSearchParams(s).get("utm_medium")??"",N=h?((e,t)=>{const n="social-artistpick-exclusive";return`${e}?utm_medium=${t===n?n:"app-artistpick-exclusive"}`})(f,_):f,E=k?"View item":"Follow to view item",x=!!m,C=(0,i.useCallback)((()=>{if(h&&!k){const e=d.artworkFactory().hitFollow({itemToBeFollowed:r});t.logInteraction(e),v(!0)}const e=d.artworkFactory().hitNavigateToExternalUri({destination:N});t.logInteraction(e),window.open(N,"_blank","noopener")}),[d,t,N,v,k,r,h]),I=(0,i.useCallback)((e=>{if(e.stopPropagation(),h&&!k){const e=d.linkFactory().hitFollow({itemToBeFollowed:r});t.logInteraction(e),v(!0)}const n=d.linkFactory().hitNavigateToExternalUri({destination:N});t.logInteraction(n)}),[d,t,N,v,k,r,h]);return(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)("div",{className:vn,onClick:C,"":"artist-pick-merch-container",children:[(0,w.jsx)("img",{className:$()(Sn,{[bn]:h&&!k}),src:b,alt:"merch"}),(0,w.jsx)("div",{className:fn}),(0,w.jsxs)("div",{children:[x&&(0,w.jsxs)("div",{className:$()(An,In),children:[(0,w.jsx)(Bt.q,{images:o,label:l,width:24,userIconSize:16,className:Tn}),(0,w.jsx)(c.D,{variant:"mesto",className:"standalone-ellipsis-one-line",title:m,"":"merch-artist-pick-comment",children:m})]}),(0,w.jsxs)("div",{className:En,children:[h&&(0,w.jsx)(Pn,{}),(0,w.jsx)(c.D,{as:"h1",variant:"canon",className:xn,children:y}),(0,w.jsx)(c.D,{as:"p",variant:"mestoBold",className:Cn,children:S}),(0,w.jsx)(hn.P,{buttonSize:"sm",className:wn,onClick:I,href:N,component:kn.Z,"":"artist-pick-merch-button-link",children:h?E:"Go to item"})]})]})]})})}));var Dn=n(64991),Rn=n(42006);const Ln="mYvNDps8FDVgHSCzpeqC",Fn="KFkFH5Ne5Wmpi2CeJ04j",jn="_J01KVkIVWXWiD__tOsv",Mn="DySXXNunbOQfLv1ZKezD",Un="OOmQiEAn7X_8Iy2FBVU2",Bn="IMdvero47nmFe0shJfyW",Vn="bcQYU3hnhbKjQYonBprT",Hn="N2H1mslT6i_RSEIV_C9r",Gn=({artistName:e,avatarImages:t,backgroundImageUrl:n,itemImageUrl:i,itemName:a,itemType:s,itemUri:r,comment:o,handleLinkClick:l,handleArtistPickImageClick:d,onDragStart:u})=>(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)("section",{className:Ln,onClick:d,"":"artist-pick-with-background-container",draggable:!0,onDragStart:u,children:[(0,w.jsx)(Rn.E,{src:n,alt:"merch",loading:"eager"}),(0,w.jsx)("div",{className:Fn}),(0,w.jsxs)("div",{children:[(0,w.jsxs)("section",{className:$()(Hn,Bn),children:[(0,w.jsx)(Bt.q,{images:t,label:e,width:24,userIconSize:16,className:Vn}),(0,w.jsx)(c.D,{variant:"mesto",className:"standalone-ellipsis-one-line",title:o??"",children:o})]}),(0,w.jsxs)("section",{className:jn,children:[(0,w.jsx)("div",{children:(0,w.jsx)(Rn.E,{src:i,className:Mn,alt:"",width:"76",height:"76",loading:"eager"})}),(0,w.jsxs)("div",{className:Un,children:[(0,w.jsx)(c.D,{as:"div",variant:"balladBold",children:(0,w.jsx)(m.default,{to:r,onClick:l,"":"artist-pick-link",children:a})}),(0,w.jsx)(c.D,{as:"div",variant:"mesto",children:s})]})]})]})]})}),Wn="_1CRNzNyAMFxnnS30JUo",zn="shpD56313Kzaevyqt80w",Kn="o6lOM3qmit24hWlOBbw0",Yn="_GJZaoUD9ozPvCUDT2Mp",qn="wzbBvk50RY186L5jDZ8D",Zn="M_ZRz3M4W6DAmrdtrzvT",Qn="A2Wpa1NZBcZzFHgAy512",Jn="ydlidzq2hSQrvGXn7yni";function $n(e,t){switch(t){case _e.p2.Album:switch(e.type){case _e.VZ.Album:return o.ag.get("album");case _e.VZ.Single:return o.ag.get("single");case _e.VZ.Compilation:return o.ag.get("compilation");case _e.VZ.Ep:return o.ag.get("ep");default:return o.ag.get("album")}case _e.p2.Artist:return o.ag.get("artist");case _e.p2.Playlist:return o.ag.get("playlist");case _e.p2.Track:return o.ag.get("song");case _e.p2.Episode:return o.ag.get("card.tag.episode");default:return""}}function Xn(e,t){switch(t){case _e.p2.Album:case _e.p2.Playlist:case _e.p2.Track:case _e.p2.Episode:return e.name||"";case _e.p2.Artist:return e.profile.name||"";default:return""}}const ei=[_e.p2.Album,_e.p2.Artist,_e.p2.Concert,_e.p2.Playlist,_e.p2.Track,_e.p2.ExclusiveMerch,_e.p2.Merch,_e.p2.Episode];function ti(e,t){return ei.includes(t)}const ni=i.memo((function(e){const{avatarImages:t=[],name:n,pinnedItem:s,className:l="",spec:d}=e,{comment:u,type:p,item:h}=s,k=(0,g.$P)(),v=(0,a.s0)(),f=(0,Oe.O)([ti(0,p)?h.uri:""],ti(0,p)?Xn(h,p):""),y=(0,i.useCallback)((()=>{if(ti(0,p)){const e=d.artworkFactory().hitUiNavigate({destination:(0,r.EC)(h.uri).toURLPath(!0)});k.logInteraction(e),v((0,r.EC)(h.uri).toURLPath(!0))}}),[h,p,d,k,v]),S=(0,i.useCallback)((()=>{if(ti(0,p)){const e=d.linkFactory().hitUiNavigate({destination:(0,r.EC)(h.uri).toURLPath(!0)});k.logInteraction(e),v((0,r.EC)(h.uri).toURLPath(!0))}}),[h,p,d,k,v]);if(!ti(0,p))return null;const b=function(e,t){switch(t){case _e.p2.Album:return e.coverArt;case _e.p2.Artist:return e.visuals.avatarImage;case _e.p2.Playlist:return e.images.items[0]||null;case _e.p2.Track:return e?.album?.coverArt||null;case _e.p2.Episode:{const t=(0,Mt.X)(e?.coverArt?.sources,{desiredHeight:300});return t?{sources:[t]}:null}default:return null}}(h,p),_=b?.sources[0]?.url,N=!!u,E=u||o.ag.get("acq.artist.about.attribution",{artist:n}),x=(0,wt.createDesktopOnTourSectionEventFactory)({data:{uri:h.uri,position:0,reason:"Artist pick: Concert"}});const C=function(){if([_e.p2.Merch,_e.p2.ExclusiveMerch].includes(p)&&("checkoutUrl"in h||"url"in h))return(0,w.jsx)(On,{name:n,item:h,comment:u,backgroundImage:s.backgroundImage,avatarImages:t,spec:d,isExclusive:p===_e.p2.ExclusiveMerch});if(_e.p2.Concert===p&&"venue"in h)return(0,w.jsx)(Dn.A,{concert:h,spec:x});const e="uri"in h?h.uri:"";return s.backgroundImage?.sources[0].url?(0,w.jsx)(Gn,{avatarImages:t,artistName:n,itemName:Xn(h,p),itemType:$n(h,p),itemUri:e,itemImageUrl:_??"",comment:E,backgroundImageUrl:s?.backgroundImage?.sources[0].url,handleArtistPickImageClick:y,handleLinkClick:S,onDragStart:f}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{onClick:y,className:Kn,onDragStart:f,draggable:!0,"":"artist-pick-image-container",children:(0,w.jsx)(Rn.E,{src:_,className:Yn,alt:"",width:"76",height:"76",loading:"eager"})}),(0,w.jsxs)("div",{onDragStart:f,draggable:!0,children:[(0,w.jsxs)("div",{className:$()({[qn]:!0,[Jn]:N}),children:[(0,w.jsx)(Bt.q,{images:t,label:n,width:24,userIconSize:16,className:Zn}),(0,w.jsx)(c.D,{variant:"mesto",className:"standalone-ellipsis-one-line",title:E,children:E})]}),(0,w.jsx)(c.D,{as:"div",variant:"balladBold",children:(0,w.jsx)(m.default,{to:e,onClick:S,"":"artist-pick-link",children:Xn(h,p)})}),(0,w.jsx)(c.D,{as:"div",variant:"mesto",className:Qn,children:$n(h,p)})]})]})}();return(0,w.jsxs)("div",{className:l,children:[(0,w.jsx)(c.D,{as:"h2",variant:"canon",semanticColor:"textBase",className:Wn,children:o.ag.get("artist-page.artists-pick")}),(0,w.jsx)("div",{className:zn,children:C})]})}));var ii=n(37133);const ai="QWAQMuWlIwVfc5Cv7hXp",si="GTVQoci5Dn2bPcwcH0Np",ri="ljuooUtXELNQsWeYrMT2",oi="SxHlW6byhoJSUJNugaE1",li="Kujbn0F68QOf_o44cNxw",di="k6Nq7pavAmiyJlxj52QA",ci=e=>{const{uri:t,name:n,nrTracks:s,avatarImages:l=[],className:d="",spec:u}=e,p=(0,g.$P)(),h=(0,a.s0)(),k=(0,i.useCallback)((()=>{const e=u.artistFactory().hitUiNavigate({destination:(0,r.EC)(t).toURLPath(!0)});p.logInteraction(e),h((0,r.EC)(t).toURLPath(!0))}),[u,t,p,h]),v=(0,i.useCallback)((()=>{const e=u.linkFactory().hitUiNavigate({destination:(0,r.EC)(t).toURLPath(!0)});p.logInteraction(e)}),[u,p,t]);return(0,w.jsxs)("div",{className:d,children:[(0,w.jsx)(c.D,{as:"h2",variant:"canon",semanticColor:"textBase",className:ai,children:o.ag.get("artist-page.saved-header")}),(0,w.jsxs)("div",{className:si,children:[(0,w.jsxs)("div",{onClick:k,className:oi,"":"saved-tracks-avatar",children:[(0,w.jsx)(Bt.q,{images:l,label:n,width:76,userIconSize:76}),(0,w.jsx)("div",{className:li,children:(0,w.jsx)(ii.a,{iconSize:14,className:di})})]}),(0,w.jsxs)("div",{children:[(0,w.jsx)(c.D,{as:"div",variant:"balladBold",children:(0,w.jsx)(m.default,{to:t,onClick:v,"":"saved-tracks-link",children:o.ag.get("artist-page.saved-tracks-amount",s)})}),(0,w.jsx)(c.D,{as:"div",variant:"mesto",className:ri,children:o.ag.get("artist-page.saved-by-artist",n)})]})]})]})};var ui=n(95886),mi=n(76123),pi=n(24697),gi=n(30366),hi=n(83680),ki=n(92650),vi=n(28356),fi=n(30468),yi=n(48415);const Si="WurdECaSIWEDCAelx7w5",bi="tt98tU3O5e2jDDowFL6z",_i="APTePLeQgkNrGdSs2Alg",Ni="HvcHz2IVNHf5ZbDl51cs",Ei="L5eh0Met537t6kO60mNQ",xi="clPmbX_PddNTEskYgCmD",Ci="mMy1f_odFmYIRsmkfypf",wi="MXwdYKAc77WRko8xteYw",Ii="VNuCxmZmIgPXKjfLYWpc",Ti="LNdxeogS1DTFRF8I4a4K",Ai="YkN2KPIwz6Dp7MQWiWkS",Pi="rsKWAzku_ny3zrfnZ5Dy",Oi="iIyvKzoN1NVJlt_gtzRg",Di="Am_X_wIkQA2_gcMHrhXb",Ri="nVLjPE6F7eG6vGRUizPo",Li="e9BLOqb7gQobVLk7kMX2",Fi=({userStats:e})=>{const t=e.map(((e,t)=>(0,w.jsx)(vi.S,{className:Oi,children:(0,w.jsx)(fi.p,{colSpan:4,className:Di,children:(0,w.jsxs)("div",{className:Ti,children:[(0,w.jsx)("div",{className:Ai,children:t+=1}),(0,w.jsx)(pi.E,{src:e.profileImg,circle:!0,imageHeight:"50px",imageWidth:"50px"}),(0,w.jsxs)("div",{className:Pi,children:[(0,w.jsx)(c.D,{as:"p",children:e.displayName}),(0,w.jsxs)(c.D,{as:"p",className:Ri,children:[e.minutesPlayed,"m"]})]})]})})},t)));return(0,w.jsxs)(yi.i,{className:Ii,children:[(0,w.jsxs)("colgroup",{children:[(0,w.jsx)("col",{}),(0,w.jsx)("col",{width:"50%"}),(0,w.jsx)("col",{width:"50%"})]}),(0,w.jsx)("tbody",{children:t})]})};var ji=n(38191),Mi=n(22991),Ui=n(80912),Bi=n(79475);const Vi="YeGMtF6vRIbGdEJu4MIu",Hi="tUGhhVg39aIVc8QBnyNI",Gi="dRW8iJPl0gFGFpInjRqq",Wi="HzIF8d4fZBYLPFtcRoZm",zi="cIScgQhFRNDKZCkEvnpz",Ki="upvnuAPOXH03rJqCkufN",Yi="rZaBsXwddIq7T58BZgQ0",qi="a7a06RGAUbQV0JT_omh_",Zi="oaV8DrzmGf70bXqNyPAd",Qi="ErPUlvL_0ZqhBOWnp9EZ",Ji="QhodJD5vJTcQNtg4wCAU",$i=({setShowLeaderboard:e,setShowLeaderboardShareCard:t,artistInfo:n,currentUserInfo:i})=>{const{minutesPlayed:a,percentile:s,profileImg:r}=i;return(0,w.jsx)(ji.l,{"aria-label":"Title",id:"dialogAlert",colorSet:"mutedAccent",className:Vi,body:(0,w.jsxs)("div",{className:Hi,children:[(0,w.jsx)("div",{className:Gi,children:(0,w.jsx)(gi.o,{"aria-label":"close-share-card",iconOnly:Mi.e,onClick:()=>t(!1)})}),(0,w.jsx)("div",{className:Wi,children:(0,w.jsx)(gi.o,{"aria-label":"close-leaderboard-dialog",iconOnly:hi.k,onClick:()=>e(!1),buttonSize:"sm"})}),(0,w.jsxs)("div",{className:zi,children:[(0,w.jsxs)("div",{className:Ki,children:[(0,w.jsxs)("div",{className:Yi,children:[(0,w.jsx)(pi.E,{circle:!0,imageHeight:"100px",imageWidth:"100px",src:r,className:qi,style:{gridColumnStart:1,zIndex:1}}),(0,w.jsx)(pi.E,{circle:!0,imageHeight:"100px",imageWidth:"100px",src:n.profileImg,className:qi,style:{gridColumnStart:4}})]}),(0,w.jsxs)(c.D,{as:"p",variant:"finale",children:[(0,w.jsxs)("span",{className:Zi,children:[a,"M"]})," ","STREAMED THIS WEEK"]}),(0,w.jsxs)(c.D,{as:"p",variant:"alto",className:Qi,children:["I'M IN THE"," ",(0,w.jsxs)("span",{className:Zi,children:[s,"%"]})," OF"," ",(0,w.jsx)("span",{children:n.displayName.toUpperCase()})," LISTENERS THIS WEEK."]}),(0,w.jsx)("div",{className:Ji,children:(0,w.jsx)(Ui.V,{iconSize:32})})]}),(0,w.jsx)(Bi.D,{"aria-label":"share-button",colorSet:"invertedLight",children:"Share this"})]})]})})},Xi=({setShowLeaderboard:e,artistInfo:t,currentUserInfo:n,userStats:a})=>{const[s,r]=(0,i.useState)(!1);return(0,w.jsx)(ui.Y,{center:!0,withPortal:!0,children:s?(0,w.jsx)($i,{setShowLeaderboard:e,setShowLeaderboardShareCard:r,artistInfo:t,currentUserInfo:n}):(0,w.jsx)(mi.d,{className:Si,dialogTitle:(0,w.jsxs)("div",{className:bi,children:[(0,w.jsx)(pi.E,{src:"https://i.scdn.co/image/a8f3fe2c87edf4f67acb629d832e65846c451afc",className:_i,circle:!0,imageHeight:"40px",imageWidth:"40px"}),(0,w.jsx)(pi.E,{src:t.profileImg,className:Ni,circle:!0,imageHeight:"60px",imageWidth:"60px"}),(0,w.jsx)("div",{className:Ei,children:(0,w.jsx)(c.D,{as:"p",children:t.displayName})}),(0,w.jsx)("div",{className:xi,children:(0,w.jsxs)(c.D,{as:"p",children:["You listened to ",t.displayName," for"," ",(0,w.jsxs)("span",{className:Li,children:[n.minutesPlayed,"m"]})," ","this week, putting you in the top"," ",(0,w.jsxs)("span",{className:Li,children:[n.percentile,"%"]})," ","of spotify employees."]})}),(0,w.jsx)("div",{className:Ci,children:(0,w.jsx)(gi.o,{iconOnly:hi.k,buttonSize:"sm",semanticColor:"textSubdued",onClick:()=>e(!1)})}),(0,w.jsx)("div",{className:wi,children:(0,w.jsx)(gi.o,{iconOnly:ki.o,buttonSize:"lg",onClick:()=>r(!0)})})]}),"aria-label":"Title",id:"dialogAlert",colorSet:"mutedAccent",footer:(0,w.jsx)(Fi,{userStats:a})})})};var ea=n(11216),ta=n(31925),na=n(44007);const ia="a3Nne2VCH_BelS2gV1JL",aa="CBCh09tJlDipZ5KZejwv",sa="E13YocWAYgBQAfXg7Ulb",ra="BFzOQ2NMM5vmz4jwkWcG",oa=(0,i.memo)((function({artistId:e}){const t=(0,na.v)(),[n,a]=(0,i.useState)(!1),[s,r]=(0,i.useState)();if((0,i.useEffect)((()=>{(async()=>{await t.get(`https://spclient.wg.spotify.com/leaderboard-artist-service/v1/leaderboardartist/${e}`).then(r)})()}),[e,t]),!s)return(0,w.jsx)(ea.T,{});const{artistInfo:o,currentUserInfo:l,userStats:d}=s,u=d.slice(0,3).map(((e,t)=>(0,w.jsx)(i.Fragment,{children:e.profileImg?(0,w.jsx)(pi.E,{circle:!0,imageHeight:"50px",imageWidth:"50px",src:e.profileImg,className:sa,style:{gridColumnStart:t+1}}):(0,w.jsx)(ta.f,{iconSize:32,className:sa,style:{gridColumnStart:t+1}})},t)));return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("button",{onClick:()=>{a(!0)},className:ia,children:[(0,w.jsx)("div",{className:aa,children:u}),(0,w.jsxs)("div",{className:ra,children:[(0,w.jsx)(c.D,{as:"p",variant:"violaBold",semanticColor:"textBase",children:"View Employee Leaderboard"}),(0,w.jsxs)(c.D,{as:"p",children:["You're in the top ",l.percentile,"% of Listeners"]})]})]}),n?(0,w.jsx)(Xi,{setShowLeaderboard:a,artistInfo:o,currentUserInfo:l,userStats:d}):null]})}));var la=n(74642);function da(e){return null!=e}const ca=i.memo((function(){const{artistId:e=""}=(0,a.UO)(),t=(0,oe.W6)(ve.CM),n=(0,Ne.qo)(e),[s,r]=(0,je.Z)(n),d=(0,De.o)(),u=(0,oe.W6)(ve.EW),m=(0,oe.W6)(ve.yr),p=(0,oe.W6)(ve.XF),{spec:h,logger:k,UBIFragment:v}=(0,g.fU)(ft.V,{data:{identifier:e,uri:n}}),f=i.useMemo((()=>h.headerFactory()),[h]),y=i.useMemo((()=>h.actionBarFactory()),[h]),S=i.useMemo((()=>h.featuredFactory().popularTracksFactory()),[h]),b=i.useMemo((()=>h.offersFactory()),[h]),{loading:_,error:N,data:E}=(0,la.z)(n),{isPlaying:x,togglePlay:C,usePlayContextItem:I,isActive:T}=(0,be.n)({uri:n},{featureIdentifier:"artist"}),A=i.useCallback((()=>{const e=(0,Dt.aK)({isPlaying:x,isActive:T,spec:y.playButtonFactory(),logger:k,uri:n});C({loggingParams:e})}),[C,T,x,n,y,k]),P=(0,Lt.MY)({offset:0,limit:1,uri:n}),O=(0,i.useCallback)((async()=>{d({targetUri:n,intent:s?"unsave":"save",type:"click"});const e=h.actionBarFactory().followButtonFactory().hitFollow({itemToBeFollowed:n}),t=h.actionBarFactory().followButtonFactory().hitUnfollow({itemToBeUnfollowed:n});k.logInteraction(s?t:e);try{await r(!s)}catch{}}),[d,n,s,r,h,k]);if(null===E||null===E.artistUnion||"Artist"!==E.artistUnion?.__typename||N||_)return(0,w.jsx)(l.h,{hasError:null!==N,errorMessage:o.ag.get("error.request-artist-failure")});const D=E?.artistUnion?.profile.name,R=E.artistUnion,L=R.relatedContent.relatedArtists.items,F=R.sharingInfo,j=R.relatedContent.featuringV2.items,M=R.discography.latest,{totalCount:U,items:B}=R.discography.popularReleasesAlbums,V=B,H=U||V.length,G=(0,Ne.Hr)(R.relatedContent.appearsOn.items),W=R.discography.topTracks.items.map((e=>(0,se.X7)(e,n))),z=R.relatedContent.discoveredOnV2.items,{stats:{monthlyListeners:K,followers:Y,worldRank:q,topCities:Z},profile:{name:Q,verified:J,pinnedItem:X,biography:te,externalLinks:ne,playlistsV2:ie},visuals:{headerImage:ae,avatarImage:re,gallery:le},goods:{events:de,merch:ce}}=R,ue=m&&P?.totalLength||!!X,me=X?{...X,item:(0,se.MF)(X)}:null,pe=(M?[M,...V]:V).filter(da).filter(((e,t,n)=>n.map((e=>e.uri)).indexOf(e.uri)===t));const ge=ae?.extractedColors?.colorRaw.hex||re?.extractedColors?.colorRaw.hex||vt.Sns;return(0,w.jsxs)("div",{className:Yt.Z.overview,children:[(0,w.jsx)(ee.$,{children:(0,Ft.Kw)({artistName:D})}),(0,w.jsx)(pn,{uri:n,artist:{sharingInfo:F,monthlyListeners:K||0,name:Q,verified:J||!1,headerImage:ae||{sources:[],extractedColors:null},avatarImage:re||{sources:[],extractedColors:null}},togglePlay:C,isPlaying:x,isActive:T,spec:f}),(0,w.jsxs)("div",{className:Yt.Z.artistOverviewContent,children:[(0,w.jsxs)(yt.o,{backgroundColor:ge,children:[(0,w.jsxs)(yt.F,{children:[(0,w.jsx)(Ae.$,{size:"lg",onClick:A,isPlaying:x,uri:n}),(0,w.jsx)(_t.r,{children:(0,w.jsx)(Nt.e,{isFollowing:s,onClick:O})}),(0,w.jsx)(Fe.y,{menu:(0,w.jsx)(bt.m,{uri:n,sharingInfo:F}),children:(0,w.jsx)(Ce.z,{label:o.ag.get("more.label.context",Q)})})]}),t?(0,w.jsx)(oa,{artistId:e}):null]}),(0,w.jsxs)("div",{className:"contentSpacing",children:[(0,w.jsx)("div",{children:(0,w.jsx)(fe.T,{render:({columnCount:t})=>{const n={"--column-count":t};return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("div",{className:$()(Yt.Z.popularTracks,{[Yt.Z.popularTracksBlock]:t<5||!ue}),style:{...n},children:[(0,w.jsx)(c.D,{as:"h2",variant:"canon",semanticColor:"textBase",className:Yt.Z.heading,children:o.ag.get("artist.popular-tracks")}),W.length?(0,w.jsx)(v,{spec:S,children:(0,w.jsx)(xt.k,{nrTracks:W.length,initialTracks:W,usePlayContextItem:I})}):null]}),m&&P?.totalLength?(0,w.jsx)(ci,{className:$()(Yt.Z.sideBlock),uri:`${(0,Ne.GJ)(e)}:saved`,name:Q,nrTracks:P.totalLength,avatarImages:re?.sources,spec:h.featuredFactory().likedSongsFactory()}):null,me?(0,w.jsx)(ni,{className:$()(Yt.Z.sideBlock),avatarImages:re?.sources,name:Q,pinnedItem:me,spec:h.featuredFactory().pickedFactory()}):null]})},className:Yt.Z.artistOverviewContainer})}),(0,w.jsxs)(v,{spec:h,children:[(0,w.jsx)(Et.F,{property:ve.EW,renderOldExperience:()=>(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Rt.JL,{value:"shelf/popular-releases",children:(0,w.jsx)(Ct.q,{total:H+(M?1:0),title:o.ag.get("artist-page.popular"),className:Yt.Z.artistShelfSpacer,index:0,id:"popular-releases",children:pe.map(((e,t)=>(0,w.jsx)(Rt.JL,{value:"card",index:t,children:(0,w.jsx)(Xe.i,{index:t,latest:e.uri===M?.uri,showType:!0,...(0,Ne.B$)(e,n,Q)})},e.uri)))})}),(0,w.jsx)(Rt.JL,{value:"shelf/albums",children:(0,w.jsx)(Ct.q,{total:R.discography.albums.totalCount,title:o.ag.get("artist.albums"),seeAllUri:`${(0,Ne.GJ)(e)}:discography:${_e.VZ.Album.toLowerCase()}`,seeAllLabel:o.ag.get("artist-page.show-discography"),alwaysShowSeeAll:!0,className:Yt.Z.artistShelfSpacer,index:1,id:"albums",children:(0,Ne.Hr)(R.discography.albums.items).map(((e,t)=>(0,w.jsx)(Rt.JL,{value:"card",index:t,children:(0,w.jsx)(Xe.i,{index:t,latest:e.uri===M?.uri,showType:!0,...(0,Ne.B$)(e,n,Q)})},e.uri)))})}),(0,w.jsx)(Rt.JL,{value:"shelf/singles-and-eps",children:(0,w.jsx)(Ct.q,{total:R.discography.singles.totalCount,title:o.ag.get("artist.singles"),seeAllUri:`${(0,Ne.GJ)(e)}:discography:${_e.VZ.Single.toLowerCase()}`,seeAllLabel:o.ag.get("artist-page.show-discography"),alwaysShowSeeAll:!0,className:Yt.Z.artistShelfSpacer,index:2,id:"singles-and-eps",children:(0,Ne.Hr)(R.discography.singles.items).map(((e,t)=>(0,w.jsx)(Rt.JL,{value:"card",index:t,children:(0,w.jsx)(Xe.i,{index:t,latest:e.uri===M?.uri,showType:!0,...(0,Ne.B$)(e,n,Q)})},e.uri)))})}),(0,w.jsx)(Rt.JL,{value:"shelf/compilations",children:(0,w.jsx)(Ct.q,{total:R.discography.compilations.totalCount,title:o.ag.get("artist.compilations"),seeAllUri:`${(0,Ne.GJ)(e)}:discography:${_e.VZ.Compilation.toLowerCase()}`,seeAllLabel:o.ag.get("artist-page.show-discography"),alwaysShowSeeAll:!0,className:Yt.Z.artistShelfSpacer,index:3,id:"compilations",children:(0,Ne.Hr)(R.discography.compilations.items).map(((e,t)=>(0,w.jsx)(Rt.JL,{value:"card",index:t,children:(0,w.jsx)(Xe.i,{index:t,latest:e.uri===M?.uri,showType:!0,...(0,Ne.B$)(e,n,Q)})},e.uri)))})})]}),renderNewExperience:()=>(0,w.jsx)(Zt,{discography:R.discography,artistId:e,artistUri:n,artistName:Q,shelfIndex:0,spec:h})}),(0,w.jsx)(Rt.JL,{value:"shelf/featuring",children:(0,w.jsx)(Ct.q,{total:j.length,title:o.ag.get("artist-page.featuring",Q),seeAllUri:`${(0,Ne.GJ)(e)}:featuring`,className:Yt.Z.artistShelfSpacer,index:u?1:4,id:"featuring",children:j.map(((e,t)=>{if("Playlist"===e.data.__typename){const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,w.jsx)(Rt.JL,{value:"card",index:t,children:(0,w.jsx)(ct.Z,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)},n.uri)}return null}))})}),de.concerts.items&&de.concerts.items.length>0&&(0,w.jsx)(Pt,{artistId:e,total:de.concerts.totalCount,concerts:de.concerts.items}),p===ve.sM.VARIANTB&&ce.items.length>0&&(0,w.jsx)(v,{spec:b,children:(0,w.jsx)(Ot.s,{id:e,uri:(0,Ne.qo)(e),merchItems:ce.items,merchVariant:p})}),(0,w.jsx)(Rt.JL,{value:"shelf/fans-also-like",children:(0,w.jsx)(Ct.q,{total:L.length,title:o.ag.get("artist-page.fansalsolike"),seeAllUri:`${(0,Ne.GJ)(e)}:related`,className:Yt.Z.artistShelfSpacer,index:u?2:5,id:"fans-also-like",children:L.map(((e,t)=>(0,w.jsx)(Rt.JL,{value:"card",index:t,children:(0,w.jsx)(St.I,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]})},e.uri)))})}),(0,w.jsx)(Rt.JL,{value:"shelf/appears-on",children:(0,w.jsx)(Ct.q,{total:G.length,title:o.ag.get("artist.appears-on"),seeAllUri:`${(0,Ne.GJ)(e)}:appears-on`,className:Yt.Z.artistShelfSpacer,index:u?3:6,id:"appears-on",children:G.map(((e,t)=>(0,w.jsx)(Rt.JL,{value:"card",index:t,children:(0,w.jsx)(Xe.i,{index:t,showType:!0,...(0,se.pf)(e)})},e.uri)))})}),ie.items.length?(0,w.jsx)(Rt.JL,{value:"shelf/artist-playlists",children:(0,w.jsx)(Ct.q,{total:ie.totalCount,title:o.ag.get("artist-page.artist-playlists"),seeAllUri:`${(0,Ne.GJ)(e)}:playlists`,className:Yt.Z.artistShelfSpacer,index:u?4:7,id:"artist-playlists",children:ie.items.map(((e,t)=>{if("Playlist"===e.data.__typename){const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,w.jsx)(Rt.JL,{value:"card",index:t,children:(0,w.jsx)(ct.Z,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)},n.uri)}return null}))})}):null,(0,w.jsx)(Rt.JL,{value:"shelf/discovered-on",children:(0,w.jsx)(Ct.q,{total:z.length,title:o.ag.get("artist-page.discovered-on",Q),seeAllUri:`${(0,Ne.GJ)(e)}:discovered-on`,className:Yt.Z.artistShelfSpacer,index:u?5:8,id:"discovered-on",children:z.map(((e,t)=>{if("Playlist"===e.data.__typename){const n=e.data,i="User"===n.ownerV2.data.__typename&&n.ownerV2.data.name||n.name;return(0,w.jsx)(Rt.JL,{value:"card",index:t,children:(0,w.jsx)(ct.Z,{index:t,uri:n.uri,name:n.name,authorName:i,description:n.description||"",images:n.images?.items?.[0]?.sources||[]},n.uri)},n.uri)}return null}))})})]}),(0,w.jsx)(fe.T,{render:({columnCount:t})=>(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(zt,{className:Yt.Z.about,artistUri:R.uri,name:Q,avatarImages:re?.sources.map(jt.Bi),bio:te?.text||"",bioSource:te?.type||_e.Yk.Biography,images:le.items.map((e=>{const t=e.sources.map(jt.Bi);return(0,Mt.X)(t,{desiredLabel:"large",desiredSize:600})})).filter(da),worldRank:q||0,monthlyListeners:K,topCities:Z.items||[],followers:Y,externalLinks:ne?.items,spec:h.aboutFactory()}),p===ve.sM.DEFAULT&&ce.items.length?(0,w.jsxs)("div",{className:$()(Yt.Z.merch,{[Yt.Z.merchSmall]:t<4}),children:[(0,w.jsx)(c.D,{as:"h2",variant:"canon",semanticColor:"textBase",className:Yt.Z.heading,children:o.ag.get("artist-page.merch")}),(0,w.jsx)(v,{spec:b,children:(0,w.jsx)(ln,{items:ce.items,artistId:e,merchVariant:p})})]}):null]})}),p===ve.sM.VARIANTA&&ce.items.length>0&&(0,w.jsx)(v,{spec:b,children:(0,w.jsx)("div",{className:Yt.Z.merchShelfContent,children:(0,w.jsx)(Ot.s,{id:e,uri:(0,Ne.qo)(e),merchItems:ce.items,merchVariant:p})})})]})]})]})})),ua=i.memo((function(){return(0,w.jsx)(i.Suspense,{fallback:null,children:(0,w.jsx)(ca,{})})})),ma=i.memo((function(){const{artistId:e=""}=(0,a.UO)(),t=(0,se.qo)(e),{loading:n,error:i,data:s}=(r={uri:t},d={cacheTime:15*ie.y},(0,ie.a)(mt,r,d));var r,d;const c="Artist"===s?.artistUnion.__typename?s.artistUnion:null;if(null===c||i||n)return(0,w.jsx)(l.h,{hasError:null!==i,errorMessage:o.ag.get("error.request-artist-playlists")});const u=c.profile.name,{items:m}=c.profile.playlistsV2,p=(0,se.pj)(m);return(0,w.jsxs)("div",{className:$()("contentSpacing",ne),children:[u?(0,w.jsx)(ee.$,{children:o.ag.get("artist-page.artist-playlists.seo.title",u)}):null,(0,w.jsx)(te.P,{total:p.length,title:o.ag.get("artist-page.artist-playlists"),showAll:!0,children:p.map(((e,t)=>(0,w.jsx)(ct.Z,{index:t,uri:e.uri,name:e.name,authorName:e.authorName||e.name,description:e.description,images:e.images},e.uri)))})]})})),pa=Spicetify.GraphQL.Definitions["queryArtistRelated"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistRelated"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"relatedContent"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"relatedArtists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]}}]}}]}}]},ga=i.memo((function(){const{artistId:e=""}=(0,a.UO)(),t=(0,se.qo)(e),{loading:n,error:i,data:s}=(r={uri:t},d={cacheTime:15*ie.y},(0,ie.a)(pa,r,d));var r,d;const c="Artist"===s?.artistUnion.__typename?s.artistUnion:null;if(null===c||i||n)return(0,w.jsx)(l.h,{hasError:null!==i,errorMessage:o.ag.get("error.request-related-artists")});const u=c.profile.name,m=c.relatedContent.relatedArtists.items;return(0,w.jsxs)("div",{className:$()("contentSpacing",ne),children:[u?(0,w.jsx)(ee.$,{children:o.ag.get("artist-page.fansalsolike.seo.title",u)}):null,(0,w.jsx)(te.P,{title:o.ag.get("artist-page.fansalsolike"),total:m.length,showAll:!0,children:m.map(((e,t)=>(0,w.jsx)(St.I,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]},e.uri)))})]})}));var ha=n(53417),ka=n(12107);const va=Spicetify.GraphQL.Definitions["queryArtistMinimal"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryArtistMinimal"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]},fa="Etjqlb2I2wFLmS0idcnV",ya=[ha.QD.INDEX,ha.QD.TITLE,ha.QD.ALBUM,ha.QD.ADDED_AT,ha.QD.DURATION],Sa=({artistUri:e,collectionUri:t})=>{const n=(0,Lt.MY)({offset:0,limit:1,uri:e}),{error:a,data:s}=(r={uri:e},(0,ie.a)(va,r,d));var r,d;const{usePlayContextItem:c,togglePlay:u,isPlaying:m}=(0,be.n)({uri:t},{featureIdentifier:"your_library"}),p="Artist"===s?.artistUnion.__typename?s.artistUnion:null;return n&&p&&!a?(0,w.jsxs)("div",{className:$()("contentSpacing",fa),children:[(0,w.jsxs)(at.w,{children:[(0,w.jsx)(Ae.$,{size:"md",onClick:()=>u(),isPlaying:m,uri:t}),(0,w.jsx)(Te.i,{text:o.ag.get("artist-page.liked-songs-by-artist-title",p.profile.name)})]}),n.totalLength>0&&(0,w.jsx)(i.Suspense,{fallback:(0,w.jsx)(l.h,{hasError:null!==a,errorMessage:o.ag.get("error.request-collection-tracks-failure")}),children:(0,w.jsx)(ka.p,{nrTracks:n.totalLength,columns:ya,collectionUri:t,uri:e,usePlayContextItem:c,initialItems:[]})})]}):null},ba=()=>{const{artistId:e=""}=(0,a.UO)(),t=(0,se.qo)(e),n=(0,d.v9)((({session:e})=>e?.user?.id))||null,i=n?(0,r.g8)(n,e).toURI():null;return n&&i?(0,w.jsx)(Sa,{artistUri:t,collectionUri:i}):null};var _a=n(2106),Na=n(50042);const Ea=(0,i.memo)((function(){const{artistId:e=""}=(0,a.UO)(),t=(0,se.qo)(e),{search:n}=(0,a.TH)(),i=new URLSearchParams(n).get("pageUri"),o=(0,r.EC)(i)?i:null;return(0,w.jsx)(Q.fd,{surface:Q.Tg.ARTIST,uris:[t],children:(0,w.jsx)("section",{"":"artist-page","data-test-uri":t,children:(0,w.jsxs)(a.Z5,{children:[(0,w.jsx)(a.AW,{path:"discography",element:(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST_ALBUMS,children:(0,w.jsx)(dt,{})})}),(0,w.jsx)(a.AW,{path:"discography/:albumType",element:(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST_ALBUMS,children:(0,w.jsx)(dt,{})})}),(0,w.jsx)(a.AW,{path:"featuring",element:(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST_FEATURING,children:(0,w.jsx)(kt,{})})}),(0,w.jsx)(a.AW,{path:"related",element:(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST_RELATED,children:(0,w.jsx)(ga,{})})}),(0,w.jsx)(a.AW,{path:"appears-on",element:(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST_APPEARS_ON,children:(0,w.jsx)(re,{})})}),(0,w.jsx)(a.AW,{path:"playlists",element:(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST_PLAYLISTS,children:(0,w.jsx)(ma,{})})}),(0,w.jsx)(a.AW,{path:"discovered-on",element:(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST_DISCOVERED_ON,children:(0,w.jsx)(gt,{})})}),(0,w.jsx)(a.AW,{path:"saved",element:(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST_SAVED_TRACKS,children:(0,w.jsx)(ba,{})})}),(0,w.jsx)(a.AW,{path:"/",element:o?(0,w.jsx)(Na.InstrumentedRedirect,{to:{search:n,pathname:"/artist/:artistId/discography"}}):(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST,children:(0,w.jsx)(ua,{})})}),(0,w.jsx)(a.AW,{path:"concerts",element:(0,w.jsx)(_a.K,{pageId:s.Wg.ARTIST_CONCERTS,children:(0,w.jsx)(Z,{})})})]})})})}));Ea.displayName="ArtistPage";const xa=Ea},36016:(e,t,n)=>{"use strict";n.d(t,{MF:()=>m,Pm:()=>c,X7:()=>l,bC:()=>r,pf:()=>o,pj:()=>u,qo:()=>s,uW:()=>d});var i=n(73972),a=n(28418);const s=e=>`spotify:artist:${e}`,r=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:n,duration:{totalMilliseconds:a},contentRating:s,artists:{items:r},albumOfTrack:o,playability:{playable:l}}},d)=>({uri:e,contextUri:d,totalMilliseconds:a,name:t,contentRating:s?.label||i.KS.None,isPlayable:l,playcount:parseInt(n||"0",10),artists:r.map((e=>({uri:e.uri,name:e.profile.name}))),imageUrl:o?.coverArt?.sources?.length?o?.coverArt.sources[0].url:"",albumUri:o?.uri||""}),d=e=>e?e.reduce(((e,t)=>(e.push(t.releases.items[0]),e)),[]):[],c=e=>e?e.reduce(((e,t)=>(e.push(t.releases.items[0]),e)),[]):[],u=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(a.K),m=e=>"itemV2"in e&&"object"==typeof e.itemV2&&e.itemV2&&"data"in e.itemV2?e.itemV2.data:"item"in e&&"object"==typeof e.item&&e.item?e.item:{}},57734:(e,t,n)=>{"use strict";n.d(t,{G:()=>o,H:()=>l});var i=n(36844),a=n(41836),s=n(30301);const r="spotify:playlist:37i9dQZF1DWXkVfVmXHa7l",o="#D4000E";function l(){const e=(0,i.W6)(a.A$,{loadingValue:!1}),{isActive:t}=(0,s.cR)(r);return e&&t}},64052:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var i=n(36844),a=n(41836);function s(e){return(0,i.W6)(a.vW,{loadingValue:!1})&&"ABP"===e}},99696:(e,t,n)=>{"use strict";n.d(t,{w8:()=>c,x8:()=>r,y2:()=>d,zp:()=>s});var i=n(59496),a=n(4637);const s=(e,t)=>({type:"OPEN",name:e,handle:t}),r=e=>({type:"CLOSE",name:e});function o(e,t){switch(t.type){case"OPEN":{const{name:n,handle:i}=t;return e.map.has(n)?e:(e.map.set(n,i),{...e,map:e.map})}case"CLOSE":{const{name:n}=t;return e.map.delete(n)?{...e,map:e.map}:e}}return e}const l=(0,i.createContext)(null),d=({children:e})=>{const t=new Map,n={map:t,get:e=>t.get(e)??null},[s,r]=(0,i.useReducer)(o,n);return(0,a.jsx)(l.Provider,{value:[s,r],children:e})};function c(){const e=(0,i.useContext)(l);if(null===e)throw new Error("Trying to use 'AuxiliaryWindowContext' without 'AuxiliaryWindowProvider'!");return e}},46361:(e,t,n)=>{"use strict";n.d(t,{N:()=>s,H:()=>u});var i=n(59496),a=n(99696);let s=function(e){return e[e.POPUP=0]="POPUP",e[e.FLOATING=1]="FLOATING",e}({});function r(e){return e instanceof Node&&"STYLE"===e.nodeName}function o(e){return e instanceof Node&&"LINK"===e.nodeName}function l({nodeName:e,attributes:t}){return`${e}${Array.from(t).map((({name:e,value:t})=>`[${e}="${t}"]`)).join("")}`}function d(e){const t=window.open("about:blank",function(e){const{name:t,type:n}=e;switch(n){case s.POPUP:default:return t;case s.FLOATING:return`${t}@auxiliary`}}(e),function(e){const{position:{x:t,y:n},size:{width:i,height:a}}=e;return`left=${t},top=${n},width=${i},height=${a}`}(e));if(null!==t){n=window.document,(i=t.document).head.querySelectorAll("style, link[rel=stylesheet]").forEach((e=>{i.head.removeChild(e)})),Array.from(n.styleSheets).forEach((e=>{if(e.href){const t=n.createElement("link");t.rel="stylesheet",t.href=e.href,i.head.appendChild(t)}else try{if(e.cssRules){const t=i.createElement("style");Array.from(e.cssRules).forEach((e=>{t.appendChild(i.createTextNode(e.cssText))})),i.head.appendChild(t)}}catch(t){console.warn("Failed to read `styleSheet.cssRules` - possibly a CORS issue?!",e)}})),function(e,t){const n=e.createElement("base");n.setAttribute("href",t),e.head.appendChild(n)}(t.document,`${window.location.protocol}//${window.location.hostname}/`);let a=null;a=new MutationObserver((e=>{for(const n of e)n.addedNodes.forEach((e=>{(o(e)||r(e))&&t.document.head.appendChild(e.cloneNode(!0))})),n.removedNodes.forEach((e=>{if(o(e))t.document.head.querySelector(l(e))?.remove();else if(r(e)){const n=e.textContent;Array.from(t.document.head.querySelectorAll(l(e))).find((({textContent:e})=>e===n))?.remove()}}))})),a.observe(window.document.head,{childList:!0}),t.addEventListener("beforeunload",(()=>{null!==a&&(a.disconnect(),a=null),e.onClose?.(t)}))}var n,i;return t}function c(e,t){window.updateAuxiliaryWindow(e.name,t)}function u(e){const[t,n]=(0,a.w8)(),r=(0,i.useRef)(e),o=e.type===s.FLOATING,l=t.get(e.name);r.current=e;const u=(0,i.useCallback)((()=>{null!==l&&(l.close(),n((0,a.x8)(r.current.name)))}),[n,l]),m=(0,i.useCallback)((()=>{if(null!==l)return;const e=d({...r.current,onClose:e=>{r.current.onClose?.(e),n((0,a.x8)(r.current.name))}});null!==e&&(o&&c(e,r.current),n((0,a.zp)(r.current.name,e)))}),[n,o,l]),p=(0,i.useCallback)((e=>{null!==l&&o&&c(l,e)}),[o,l]);return(0,i.useEffect)((()=>(window.addEventListener("beforeunload",u),()=>{window.removeEventListener("beforeunload",u)})),[u]),{handle:l,open:m,close:u,update:p}}},86577:(e,t,n)=>{"use strict";n.d(t,{_0:()=>i,_p:()=>r,eP:()=>a,ws:()=>s});const i=o(120),a=o(30),s=(o(15),o(60)),r=o(15);function o(e){return 60*e*1e3}},35563:(e,t,n)=>{"use strict";n.d(t,{Cn:()=>s,Np:()=>a,_k:()=>r});var i=n(29251);function a(e){return{url:e.url,width:e.width,height:e.height}}function s(e){if("Episode"===e.__typename){const t=e.podcastV2.data;return"Podcast"!==t.__typename?[]:t.coverArt?.sources.map(a)??[]}return[]}function r(e){switch(e.__typename){case"Artist":return e.visuals.avatarImage?.sources.map(a)??[];case"Album":case"Audiobook":case"Podcast":case"Episode":case"Chapter":return e.coverArt?.sources.map(a)??[];case"Track":return e.albumOfTrack?.coverArt?.sources.map(a)??[];case"Playlist":return e.images.items[0]?.sources.map(a)??[];case"User":return e.avatar?.sources.map(a)??[];case"Merch":return e.image?.sources.map(a)??[];case"ArtistConcerts":{const t=e.mainArtist.data;return"Artist"!==t.__typename?[]:t.visuals.avatarImage?.sources.map(a)??[]}case"GenericError":case"NotFound":case"RestrictedContent":case"BrowseExternalHref":return[];case"BrowseSectionContainer":return e.data?.cardRepresentation?.artwork?.sources.map(a)??[];case"BrowseSpacesHub":return e.artwork?.sources.map(a)??[];case"BrowseClientFeature":return e.artwork?.sources.map(a)??e.iconOverlay?.sources.map(a)??[];default:return(0,i._)(e),[]}}},18277:(e,t,n)=>{"use strict";n.d(t,{Tn:()=>f,w2:()=>i.w2,Xh:()=>i.Xh});var i=n(71534),a=n(96170),s=n(29251),r=n(35563),o=n(99678),l=n(4637);function d(e){const t=(0,r._k)(e);if(t.length>0)return t[0].url}function c(e,t){switch(e.content.__typename){case"BrowseXlinkResponseWrapper":case"BrowseSectionContainerWrapper":return function(e,t,n){switch(e.__typename){case"BrowseClientFeature":return(0,l.jsx)(o.p,{title:e.title?.transformedLabel??"",pageId:"search",href:e.featureUri,color:e.backgroundColor?.hex,imageUrl:d(e),ubiId:e.featureUri,index:t},e.featureUri);case"BrowseSectionContainer":return e.data?.cardRepresentation?(0,l.jsx)(o.p,{title:e.data.cardRepresentation.title?.transformedLabel??"",pageId:"search",href:(0,i.t1)(n),color:e.data.cardRepresentation.backgroundColor?.hex,imageUrl:d(e),ubiId:n,index:t},n):null;case"BrowseSpacesHub":{const n=(0,i.wJ)(e.spaceId);return(0,l.jsx)(o.p,{title:e.title?.transformedLabel??"",pageId:"search",href:n,color:e.backgroundColor?.hex,imageUrl:d(e),ubiId:n,index:t},n)}case"GenericError":case"NotFound":case"BrowseExternalHref":return null;default:return(0,s._)(e),null}}(e.content.data,t,e.uri);case"AlbumResponseWrapper":case"ArtistResponseWrapper":case"EpisodeOrChapterResponseWrapper":case"PlaylistResponseWrapper":case"PodcastOrAudiobookResponseWrapper":case"TrackResponseWrapper":case"UserResponseWrapper":case"ConcertResponseWrapper":case"MerchResponseWrapper":case"ArtistConcertsResponseWrapper":case"NoContent":case"UnknownType":return null;default:return(0,s._)(e.content),null}}var u=n(69527),m=n(86577),p=n(72071),g=n(37924);const h=Spicetify.GraphQL.Definitions["browseAll"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"browseAll"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pagePagination"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PaginationInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sectionPagination"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PaginationInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"browseStart"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"kind"},value:{kind:"EnumValue",value:"MAIN_BROWSE"}},{kind:"ObjectField",name:{kind:"Name",value:"pagePagination"},value:{kind:"Variable",name:{kind:"Name",value:"pagePagination"}}},{kind:"ObjectField",name:{kind:"Name",value:"sectionPagination"},value:{kind:"Variable",name:{kind:"Name",value:"sectionPagination"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseSectionContainer"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"sections"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseAllSectionItem"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"browseAllSectionItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseSection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"title"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transformedLabel"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sectionItems"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseAllItem"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"browseAllItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"content"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseAllItemContent"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"browseAllItemContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseItemContent"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseSectionContainer"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseClientFeature"}}]}},...g.dK.definitions,...g.N9.definitions,...g.K1.definitions,...g.$z.definitions]},k=()=>{const{data:e}=((e,t)=>(0,p.a)(h,e,t))({pagePagination:{offset:0,limit:10},sectionPagination:{offset:0,limit:99}},{cacheTime:m._0,staleTime:m.eP});return"BrowseSectionContainer"!==e?.browseStart?.__typename?[]:e.browseStart.sections?.items??[]},v="M7LKuAFiIKaigK0fVguF",f=({browseAllSpec:e})=>{const t=k();return(0,l.jsx)("div",{className:v,children:t.map(((t,n)=>function(e,t,n){if(!e.data?.__typename)return null;switch(e.data.__typename){case"BrowseGridSectionData":return(0,l.jsx)(a.Nh,{spec:t,children:(0,l.jsx)(u.q,{title:e.data?.title?.transformedLabel??"",index:n,id:e.uri,showAll:!0,children:e.sectionItems.items.map(((e,t)=>c(e,t)))})},e.uri);case"BrowseSingleItemSectionData":case"BrowseGenericSectionData":case"BrowseRelatedSectionData":case"BrowseUnsupportedSectionData":return null;default:return(0,s._)(e.data),null}}(t,e,n)))})}},37924:(e,t,n)=>{"use strict";n.d(t,{$z:()=>f,Fk:()=>g,Go:()=>h,H5:()=>y,K1:()=>i,N9:()=>a,RL:()=>k,Tf:()=>l,X6:()=>s,YJ:()=>m,_C:()=>o,dK:()=>v,dV:()=>c,nE:()=>r,qJ:()=>u,tl:()=>d,zZ:()=>p});const i=Spicetify.GraphQL.Definitions["browseImageURLAndSize"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseImageURLAndSize"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ImageSource"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]},a=Spicetify.GraphQL.Definitions["browseImageSources"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseImageSources"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageURLAndSize"}}]}}]}}]},s=Spicetify.GraphQL.Definitions["browseAlbum"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseAlbum"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}}]}}]}}]}}]},r=Spicetify.GraphQL.Definitions["browseArtist"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseArtist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}}]}}]}}]}}]}}]},o=Spicetify.GraphQL.Definitions["browseEpisode"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseEpisode"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeOrChapterResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}},{kind:"Field",name:{kind:"Name",value:"state"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}}]}}]}}]}}]}}]}}]}}]},l=Spicetify.GraphQL.Definitions["browseChapter"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseChapter"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeOrChapterResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}},{kind:"Field",name:{kind:"Name",value:"state"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"audiobookV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}}]}}]},d=Spicetify.GraphQL.Definitions["browsePlaylist"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browsePlaylist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"images"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}}]}}]},c=Spicetify.GraphQL.Definitions["browsePodcast"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browsePodcast"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastOrAudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaType"}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]},u=Spicetify.GraphQL.Definitions["browseAudiobook"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseAudiobook"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastOrAudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"authors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]},m=Spicetify.GraphQL.Definitions["browseTrack"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseTrack"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}}]}}]},p=Spicetify.GraphQL.Definitions["browseUser"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseUser"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatar"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}}]}}]}}]}}]},g=Spicetify.GraphQL.Definitions["browseMerch"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseMerch"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MerchResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},arguments:[{kind:"Argument",name:{kind:"Name",value:"utmMedium"},value:{kind:"StringValue",value:"app-browse",block:!1}},{kind:"Argument",name:{kind:"Name",value:"utmContent"},value:{kind:"StringValue",value:"direct",block:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Merch"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"price"}}]}}]}}]}}]},h=Spicetify.GraphQL.Definitions["browseArtistConcerts"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseArtistConcerts"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistConcertsResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistConcerts"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mainArtist"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"concerts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]}}]}}]},k=Spicetify.GraphQL.Definitions["browseContent"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseContent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseItemContent"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseAlbum"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseArtist"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseEpisode"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseChapter"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browsePlaylist"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browsePodcast"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseAudiobook"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseTrack"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseUser"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseMerch"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseArtistConcerts"}}]}}]},v=Spicetify.GraphQL.Definitions["browseSectionContainer"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseSectionContainer"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseSectionContainerWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseSectionContainer"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cardRepresentation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transformedLabel"}}]}},{kind:"Field",name:{kind:"Name",value:"artwork"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"backgroundColor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}}]}}]}}]}}]}}]}}]},f=Spicetify.GraphQL.Definitions["browseClientFeature"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseClientFeature"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseXlinkResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseSpacesHub"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transformedLabel"}}]}},{kind:"Field",name:{kind:"Name",value:"spaceId"}},{kind:"Field",name:{kind:"Name",value:"artwork"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"backgroundColor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseClientFeature"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transformedLabel"}}]}},{kind:"Field",name:{kind:"Name",value:"featureUri"}},{kind:"Field",name:{kind:"Name",value:"artwork"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"browseImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"backgroundColor"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}},{kind:"Field",name:{kind:"Name",value:"iconOverlay"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]},y=Spicetify.GraphQL.Definitions["browseItem"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"browseItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BrowseItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"content"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseContent"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseSectionContainer"}},{kind:"FragmentSpread",name:{kind:"Name",value:"browseClientFeature"}}]}}]}}]}},71534:(e,t,n)=>{"use strict";n.d(t,{Xh:()=>u,px:()=>p,t1:()=>m,w2:()=>c,wJ:()=>k});var i=n(59496),a=n(36844),s=n(50346),r=n(41836),o=n(4637);const l=(0,i.lazy)((()=>Promise.all([n.e(1814),n.e(8677),n.e(3817)]).then(n.bind(n,27776)).then((e=>({default:e.BrowsePage}))))),d=(0,i.lazy)((()=>Promise.all([n.e(1814),n.e(8677),n.e(3817)]).then(n.bind(n,50339)).then((e=>({default:e.BrowseSection}))))),c=({id:e})=>e.startsWith("section")?(0,o.jsx)(d,{uri:h(e)}):(0,o.jsx)(l,{uri:g(e),id:e}),u=e=>(0,a.W6)(r.Oe,{loadingValue:!1})&&(e=>/^(section)?[0-9A-Za-z_-]{22}$/.test(e))(e);function m(e){const t=(0,s.EC)(e,{parseUnknown:!0}),[n,i]=t?.args??[];if(i&&"page"===n)return`/genre/${i}`}function p(e){const t=(0,s.EC)(e,{parseUnknown:!0}),[n,i]=t?.args??[];if(i&&"section"===n)return`/genre/section${i}`}function g(e){return`spotify:page:${e}`}function h(e){return`spotify:section:${e.replace(/^section/,"")}`}function k(e){return`spotify:genre:${e}`}},69036:(e,t,n)=>{"use strict";n.d(t,{R$:()=>s,RD:()=>c,Vv:()=>u,ZR:()=>o,bb:()=>d,ot:()=>l,tk:()=>a,ul:()=>i,vj:()=>r});const i="BROWSE_REQUEST",a="BROWSE_REQUEST_SUCCESS",s="BROWSE_ITEMS_STYLE_REQUEST",r="BROWSE_ITEMS_STYLE_REQUEST_SUCCESS",o=e=>({type:i,isClientXConcertsHubEnabled:e}),l=e=>({type:a,data:e}),d=e=>({type:"BROWSE_REQUEST_FAILURE",error:e}),c=e=>({type:r,items:e}),u=e=>({type:"BROWSE_ITEMS_STYLE_REQUEST_FAILURE",error:e})},99678:(e,t,n)=>{"use strict";n.d(t,{T:()=>J,p:()=>B});var i=n(59496),a=n(61740),s=n(36844),r=n(41836),o=n(84875),l=n.n(o),d=n(85830),c=n(56162),u=n(79475),m=n(22991),p=n(79642),g=n(3802),h=n(62517),k=(n(23329),n(95663)),v=(n(40576),n(63120));const f="RqBX4yuCHgMNXtcJnxv5",y="nUgbAeYj4gkJ_tXlm_ck",S="I8HKKfSJDDPx7rwCatT2",b="v5TOXMimmpi0Ind7QLHC",_="gjJebeNMJQIjXZyOmINz",N="nuwPDs07FwDYc9TP9KWA",E="YYQh0cc9R7oKH5WmxBUP",x="D7SjPRxlJwibVXmL_BNN",C="un9ka9FQajcXmx1ncJIo",w="SdMIYvEJ5rA5V8t_gOnk";var I=n(4637);const T=e=>{const{title:t,children:n,seeAllUri:a,pageId:s,className:r="",childColumnSpan:o=1}=e,[T,A]=(0,i.useState)(!1),[P,O]=(0,i.useState)(!1),D=(0,i.useRef)(null),R=(0,k.o)(),L=(0,d.y1)((()=>{!function(e,t,n,i,a){if(null===a.current)return;const{scrollLeft:s,offsetWidth:r,scrollWidth:o}=a.current,l=s>0,d=s+r(0,I.jsxs)(I.Fragment,{children:[T&&(0,I.jsx)("div",{className:`${N} ${x}`,children:(0,I.jsx)(u.D,{title:g.ag.get("playback-control.skip-back"),className:C,onClick:()=>{!function(e,t,n,i){null!==i.current&&(i.current.scrollLeft-=e*(t+n))}(e,t,i,D),R({intent:"carousel-left",type:"click",itemIdSuffix:"carousel"})},tabIndex:-1,"aria-label":g.ag.get("playback-control.skip-back"),iconOnly:m.e,colorSet:"invertedLight"})}),P&&(0,I.jsx)("div",{className:`${N} ${E}`,children:(0,I.jsx)(u.D,{title:g.ag.get("playback-control.skip-forward"),className:C,onClick:()=>{!function(e,t,n,i){null!==i.current&&(i.current.scrollLeft+=e*(t+n))}(e,t,i,D),R({intent:"carousel-right",type:"click",itemIdSuffix:"carousel"})},tabIndex:-1,"aria-label":g.ag.get("playback-control.skip-forward"),iconOnly:p.V,colorSet:"invertedLight"})}),n]})})})})]})};var A=n(98340),P=n(96170),O=n(94041),D=n(43171),R=n(50346),L=n(42006);const F="x-categoryCard-CategoryCard",j="x-categoryCard-title",M="x-categoryCard-image",U=O.Sns,B=({title:e,imageUrl:t,viewId:n,pageId:a,color:s=U,href:r,index:o,ubiId:l})=>{const d=n&&`/genre/${n}`||r||"#",{spec:u,logger:m}=(0,P.fU)(D.createDesktopCategoryCardEventFactory,{data:{position:o,identifier:l}}),p=(0,i.useCallback)((()=>{const e=(0,R.EC)(d)?.toURI();e&&m.logInteraction(u.hitUiNavigate({destination:e}))}),[m,u,d]),g=(0,P.Wi)(u);return(0,I.jsx)(v.Link,{to:d,pageId:a,className:F,style:{backgroundColor:s},onClick:p,ref:g,children:(0,I.jsxs)("div",{children:[t?(0,I.jsx)(L.E,{loading:"lazy",src:t,className:M}):null,(0,I.jsx)(c.D,{variant:"canon",className:j,children:e})]})})},V="a2ruVaZt_DdrdHz3GqgU",H="EfZJn6C1pA6BsRD5UpDR",G="xGVkSPi5IQWS8RjzeCmq",W=({title:e,imageUrl:t,viewId:n,color:a=U,pageId:s,index:r})=>{const o=`/genre/${n}`,{spec:l,logger:d}=(0,P.fU)(D.createDesktopCategoryCardEventFactory,{data:{position:r,identifier:n}}),u=(0,i.useCallback)((()=>{const e=(0,R.EC)(o)?.toURI();e&&d.logInteraction(l.hitUiNavigate({destination:e}))}),[d,l,o]),m=(0,P.Wi)(l);return(0,I.jsx)(v.Link,{to:o,pageId:s,className:V,style:{backgroundColor:a},onClick:u,ref:m,children:(0,I.jsxs)("div",{children:[(0,I.jsx)(c.D,{variant:"altoBrio",className:H,children:e}),t?(0,I.jsx)(L.E,{loading:"lazy",className:G,src:t}):null]})})};var z=n(5488);const K="search-searchBrowse-browseAllContainer",Y="search-searchBrowse-browseAllWrapper",q=(0,a.$j)((e=>({topGenres:e.browse.topGenres,browseAll:e.browse.browseAll})))((e=>{const{topGenres:t,browseAll:n,topGenresSpec:i,browseAllSpec:a}=e;return t||n?(0,I.jsxs)("div",{className:K,children:[t&&(0,I.jsx)(A.ZP,{value:"top-genre",children:(0,I.jsx)(P.Nh,{spec:i,children:(0,I.jsx)(T,{title:t.title,childColumnSpan:2,children:t.items.map((({viewId:e,color:t,title:n,imageUrl:i},a)=>(0,I.jsx)(A.ZP,{index:a,value:"hero-category-card",children:(0,I.jsx)(W,{title:n,viewId:e,pageId:"search",color:t,imageUrl:i,index:a})},e)))})})}),n&&(0,I.jsx)("div",{className:Y,"":"browse-all",children:(0,I.jsx)(P.Nh,{spec:a,children:(0,I.jsx)(z.P,{title:n.title,showAll:!0,children:n.items.map((({viewId:e,color:t,title:n,imageUrl:i,href:a,ubiId:s},r)=>(0,I.jsx)(B,{title:n,viewId:e,pageId:"search",href:a,color:t,imageUrl:i,ubiId:s,index:r},e||a)))})})})]}):null}));var Z=n(69036);const Q=e=>{const t=(0,s.W6)(r.dE),n=(0,a.I0)();return(0,i.useEffect)((()=>{n((0,Z.ZR)(t))}),[t,n]),(0,I.jsx)(q,{topGenresSpec:e.topGenresSpec,browseAllSpec:e.browseAllSpec})},J=e=>(0,I.jsx)(i.Suspense,{fallback:null,children:(0,I.jsx)(Q,{topGenresSpec:e.topGenresSpec,browseAllSpec:e.browseAllSpec})})},76912:(e,t,n)=>{"use strict";n.d(t,{$:()=>a,I:()=>s});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("useBuddyFeedContext() must be used within a BuddyFeedContext.Provider");return e}},72942:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var i=n(59496),a=n(84875),s=n.n(a),r=n(48710),o=n(83680),l=n(56162),d=n(74572),c=n(3802),u=n(25899),m=n(85270),p=n(96170);const g="BQArksxcJg8rObx3WgoM",h="DHSo2PFYUume7wnQOok4",k="e7m85731K8PcdAPpY0_T",v="R45Db8HjecWWvYTtWruo",f="O29ZkehgRCpe4Io6FaiU",y="O1L1tbcQzBU4hFEXILkR",S="L36zsCia1Kz2AlUHD5AK",b="hbq5vdirqm7cXKmcBAi6",_="YUkRX7lY9vlYdgHxtLFX",N="gsZrVTOAUh2y9qRZ_7b1",E="L9Xuw2iBlGAweYBf3PW8",x="uFIqHwED5XuyDvejh8QB",C="krbh8BJtWizoq5QIXnhT";var w=n(4637);const I="location_no_results",T="location_fetch_error",A={[I]:()=>c.ag.get("concert.error.no_locations_found_subtitle"),[T]:()=>c.ag.get("concert.error.general_error_title")},P=e=>{const t=(0,i.useRef)(null),n=(0,i.useRef)(null),[a,g]=(0,i.useState)(""),[h,P]=(0,i.useState)(-1),[O,D]=(0,i.useState)([]),[R,L]=(0,i.useState)(),{placeholder:F,onSelectLocation:j,hideLocationSelector:M,spec:U}=e,{resultsSpec:B,inputSpec:V,clearSpec:H}=(0,i.useMemo)((()=>{if(!U)return{};const e=U.changeLocationFormFactory();return{resultsSpec:U.locationsResponseFactory(),inputSpec:e.changeLocationInputFactory(),clearSpec:e.changeLocationClearFactory()}}),[U]),G=(0,p.$P)(),W=a.trim();(0,i.useEffect)((()=>{if(P(-1),L(void 0),W.length<=1)return D([]),void(V&&G.logInteraction(V.keyStrokeUiHide()));V&&G.logInteraction(V.keyStrokeTextEdit({fieldToBeChanged:"loction"}));let e=!0;return m.LH.fetchLocationQuery(u.b.getInstance(),W).then((t=>{if(!e)return;const n=t.body.results||[];D(n),n.length?L(void 0):L(I)}),(()=>{e&&(D([]),L(T))})),()=>{e=!1}}),[V,G,W]);const z=(e,t)=>{if(j(e),!B)return;const n=B.locationResultFactory({identifier:e.location||e.geonameId?.toString(10)||"",position:t}).hitUiHide();G.logInteraction(n)};let K=s()(k,v);return(O&&O.length||R===I)&&(K=k),(0,w.jsx)("div",{className:f,"data-interaction-context":"location-selector",children:(0,w.jsxs)("div",{className:y,onKeyDown:e=>{const i="ArrowUp",a="ArrowDown",s="Escape",r="Tab",o=e.key;let l=h;switch([s,a,i,r].indexOf(o)>-1&&e.preventDefault(),o){default:return;case s:return void j(void 0);case i:l=Math.max(h-1,-1);break;case a:case r:l=Math.min(h+1,O.length-1);break;case"Enter":z(O[h],h)}if(l<0)t.current?.focus();else{const e=n.current?.childNodes[l];e&&e.focus()}P(l)},role:"searchbox",onBlur:e=>{e.relatedTarget||(g(""),M())},children:[(0,w.jsx)("div",{children:(0,w.jsxs)("div",{className:b,children:[(0,w.jsx)(r.j,{className:_,iconSize:16}),(0,w.jsx)("input",{className:S,type:"search",id:"change-location-input",placeholder:F,value:a,onChange:e=>g(e.target.value),ref:t,"aria-label":F,autoFocus:!0}),(0,w.jsx)("button",{className:K,"aria-label":c.ag.get("search.a11y.clear-input"),onClick:()=>{g(""),H&&G.logInteraction(H.hitTextClear())},children:(0,w.jsx)(o.k,{iconSize:16})})]})}),(0,w.jsxs)("ol",{className:N,ref:n,children:[R&&(0,w.jsxs)(l.D,{as:"li",variant:"ballad",className:E,children:[(0,w.jsx)(d.l,{iconSize:16}),A[R]()]}),O&&O.length&&O.map(((e,t)=>(0,w.jsx)(l.D,{as:"li",variant:"ballad",weight:"book",className:C,tabIndex:t+1,children:(0,w.jsx)("a",{className:x,onClick:()=>z(e,t),role:"button",children:e.location})},t)))||null]})]})})},O=e=>{const{handleLocationChange:t,locationStr:n,headerSpec:a}=e,[s,r]=(0,i.useState)(!1),o=(0,i.useMemo)((()=>a?.changeLocationButtonFactory()),[a]),d=(0,i.useMemo)((()=>a?.changeLocationUiFactory({identifier:n})),[a,n]),u=(0,p.$P)();return(0,w.jsxs)("div",{className:g,children:[(0,w.jsxs)(l.D,{as:"h2",variant:"alto",children:[c.ag.get("concerts_shows_in"),!s&&(0,w.jsx)("span",{className:h,dir:"auto",onClick:()=>{r(!0),o&&u.logInteraction(o.hitUiReveal())},role:"button",children:n})]}),s&&(0,w.jsx)("span",{children:(0,w.jsx)(P,{placeholder:c.ag.get("concerts.input.search_placeholder"),onSelectLocation:e=>{t(e),r(!1)},hideLocationSelector:()=>r(!1),spec:d})})]})}},97277:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var i=n(59496),a=n(84875),s=n.n(a),r=n(56162),o=n(36844),l=n(3802),d=n(63120),c=n(41836),u=n(96170),m=n(97009),p=n(27532),g=n(33122),h=n(4637);function k(e,t){return"ONLINE"===t&&null!==e.name?e.name:[e.name,e.location?.name].filter(Boolean).join(l.ag.getSeparator())}const v=({children:e,id:t,enableConcertEntityLinks:n,condensed:a,spec:r,index:o})=>{const l=(0,u.$P)(),c=(0,i.useMemo)((()=>r.tourEntryFactory({identifier:t,uri:`spotify:concert:${t}`,position:o||0,reason:""})),[r,t,o]),m=()=>{l.logInteraction(c.hitUiNavigate({destination:`spotify:concert:${t}`}))};return n?(0,h.jsx)(d.default,{to:`spotify:concert:${t}`,className:s()(g.Z.item,{[g.Z.condensed]:a}),onClick:m,children:e}):(0,h.jsx)("div",{className:g.Z.item,children:e})},f=i.memo((function({concert:e,spec:t,index:n,condensed:i,elevatedDate:a,titleVariant:l="balladBold"}){const{venue:d,id:u,category:f}=e,y=(0,o.W6)(c.zO),S=(0,m.CH)(e.date.isoString);return(0,h.jsxs)(v,{id:u,enableConcertEntityLinks:y,condensed:i,spec:t,index:n,children:[(0,h.jsxs)("time",{className:s()(g.Z.date,{[g.Z.condensed]:i,[g.Z.elevated]:a}),dateTime:e.date.isoString,children:[(0,h.jsx)(r.D,{as:"h5",variant:"mestoBold",className:g.Z.dateMonth,children:(0,m.jw)(S)}),(0,h.jsx)(r.D,{as:"h1",variant:"canon",className:g.Z.dateDay,children:(0,m.wf)(S)})]}),(0,h.jsxs)("div",{className:g.Z.info,children:[(0,h.jsx)(r.D,{as:"h3",variant:l,semanticColor:"textBase",className:s()(g.Z.title,{[g.Z.condensed]:i}),children:(0,p.M3)(e)}),(0,h.jsxs)(r.D,{as:"p",variant:"mesto",className:s()(g.Z.timeAndVenue,{[g.Z.condensed]:i}),children:[(0,h.jsx)("time",{className:g.Z.time,children:(0,m.dC)(S)}),k(d,f)]})]})]})}))},64991:(e,t,n)=>{"use strict";n.d(t,{A:()=>i.A});var i=n(97277)},97009:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>m,CH:()=>a,FO:()=>l,OF:()=>p,dC:()=>c,hK:()=>u,jw:()=>r,jx:()=>d,wf:()=>o,xE:()=>s});var i=n(3802);const a=e=>24===e.length?new Date(e.substring(0,19)):22===e.length?new Date(e.substring(0,16)):new Date(e),s=e=>i.ag.formatDate(e,{weekday:"short",month:"short",day:"numeric"}),r=e=>i.ag.formatDate(e,{month:"short"}),o=e=>i.ag.formatDate(e,{day:"numeric"}),l=e=>i.ag.formatDate(e,{weekday:"short"}),d=e=>i.ag.formatDate(e,{month:"short",day:"numeric"}),c=e=>i.ag.formatDate(e,{weekday:"short",hour:"numeric",minute:"numeric"}),u=e=>i.ag.formatDate(e,{hour:"numeric",minute:"numeric"}),m=(e,t)=>{if(e.toDateString()===t.toDateString())return s(e);if(e.getMonth()===t.getMonth()){return`${i.ag.formatDate(e,{day:"numeric",month:"short"})}–${i.ag.formatDate(t,{day:"numeric"})}`}return`${i.ag.formatDate(e,{day:"numeric",month:"short"})}–${i.ag.formatDate(t,{day:"numeric",month:"short"})}`},p=e=>{const t=new Date(e);return new Date>t}},27532:(e,t,n)=>{"use strict";n.d(t,{M3:()=>d,Yl:()=>l,ij:()=>r});var i=n(3802);const a=e=>!!e.title&&(e.festival||!e.artists.length),s=e=>e.artists.map((e=>e.name)),r=e=>{if(a(e))return e.title;const t=s(e);return 1===t.length?i.ag.get("concert.header.upcoming_concert_title_1",...t):2===t.length?i.ag.get("concert.header.upcoming_concert_title_2",...t):3===t.length?i.ag.get("concert.header.upcoming_concert_title_3",...t):4===t.length?i.ag.get("concert.header.upcoming_concert_title_4",...t):t.length>4?i.ag.get("concert.header.upcoming_concert_title_more",...t):""},o=e=>1===e.length?i.ag.get("concert.header.entity_title_1",...e):2===e.length?i.ag.get("concert.header.entity_title_2",...e):3===e.length?i.ag.get("concert.header.entity_title_3",...e):4===e.length?i.ag.get("concert.header.entity_title_4",...e):e.length>4?i.ag.get("concert.header.entity_title_more",...e):"",l=e=>{if(a(e))return e.title;const t=s(e);return o(t)},d=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 o(t)}},31506:(e,t,n)=>{"use strict";n.d(t,{j:()=>i.jc,z:()=>i.z$});var i=n(10706)},10706:(e,t,n)=>{"use strict";n.d(t,{eX:()=>E,j_:()=>_,jc:()=>y,js:()=>N,p0:()=>b,s$:()=>x,z$:()=>S});var i=n(93875),a=n(73440),s=n(69492),r=n(64556),o=n(74893),l=n(99700),d=n(59326),c=n(93202),u=n(96518),m=n(57508),p=n(50202),g=n(73911),h=n(17520),k=n(9173),v=n(3802),f=n(67189);function y(e){return e===f.Yi.CAST_AUDIO||e===f.Yi.CAST_VIDEO}function S(e,t){let n=i.f;switch(t?"multispeaker":e){case f.Yi.COMPUTER:case f.Yi.CHROMEBOOK:n=a.g;break;case f.Yi.TABLET:n=s.y;break;case f.Yi.SMARTPHONE:n=r.B;break;case f.Yi.SPEAKER:case f.Yi.CAST_AUDIO:case f.Yi.AUDIO_DONGLE:case f.Yi.HomeThing:n=o.X;break;case f.Yi.TV:case f.Yi.STB:case f.Yi.CAST_VIDEO:n=l.x;break;case f.Yi.AVR:n=d.T;break;case f.Yi.GAME_CONSOLE:n=c.c;break;case f.Yi.SMARTWATCH:n=u.b;break;case f.Yi.CarThing:case f.Yi.AUTOMOBILE:n=m.C;break;case"multispeaker":n=p.r}return n}function b(e,t="disconnected"){return y(e)?"connected"===t?g.d:h.O:k.W}function _(e,t){let n;switch(e){case f.uP.PREMIUM_REQUIRED:n=v.ag.get("web-player.connect.device-picker.get-premium");break;case f.uP.NOT_INSTALLED:n=v.ag.get("web-player.connect.device-picker.install-spotify");break;case f.uP.UNSUPPORTED_URI:n=v.ag.get("web-player.connect.device-picker.unsupported-uri");break;case f.uP.INCOMPATIBLE:n=v.ag.get("web-player.connect.device-picker.update-device");break;case f.uP.NOT_AUTHORIZED:n=t?v.ag.get("web-player.connect.device-picker.playstation-unauthorized"):v.ag.get("web-player.connect.device-picker.device-unavailable");break;case f.uP.UNAVAILABLE:n=v.ag.get("web-player.connect.device-picker.device-unavailable");break;case f.uP.AD_PLAYING:n=v.ag.get("web-player.connect.device-picker.ad-playing");break;case f.uP.NARRATION:n=v.ag.get("web-player.connect.device-picker.tts-playing");break;case f.uP.WAKING_UP:n=v.ag.get("web-player.connect.device-picker.wakingup-device");break;case f.uP.TIMED_OUT_WAKEUP:n=v.ag.get("web-player.connect.device-picker.wakeup-timeout");break;case f.uP.UNKNOWN:default:n=v.ag.get("web-player.connect.device-picker.restart-device")}return{helpText:n,tooltip:undefined}}function N(e){return e.sort(((e,t)=>e.isLocal?-1:t.isLocal?1:e.name.toLowerCase().localeCompare(t.name.toLowerCase())))}function E(e){return void 0!==e&&2===e.available.length&&e.available.includes("cast")&&e.available.includes("connect")}function x(e,t){return e===f.Yi.GAME_CONSOLE&&("ps5"===t||"ps4"===t)}},14291:(e,t,n)=>{"use strict";n.d(t,{R:()=>b,h:()=>c});var i=n(59496),a=n(87995),s=n(46997),r=n(95019),o=n(46669),l=n(4637);const d=(0,i.lazy)((async()=>{const{DebugWindowContents:e}=await Promise.all([n.e(1814),n.e(5320)]).then(n.bind(n,83279));return{default:e}})),c=()=>{const{handle:e,show:t}=(0,o.C)();return(0,s.eY)(s.O4.SHOW_DEBUG_WINDOW,(()=>{t()})),null!==e?a.createPortal((0,l.jsx)(r.WU,{handle:e,children:(0,l.jsx)(i.Suspense,{fallback:null,children:(0,l.jsx)(d,{})})}),e.document.body):null};n(56708);var u=n(3802),m=n(27998),p=n(19154),g=n(57044),h=n(56162),k=n(90762);const v={container:"SsxBZ9Nwxg30ZcXUcUcJ",title:"HVN1FVVriodEnWgn1GZ4",rows:"legiK6gOuEtSJvxYKoXc",row:"N6dpLHX_oZBYC1FQy8SA",type:"krXyPxbq59r39DlZdHzv",keyPick:"_o0S4kMO8jLyHmiTwjxg",pseudoLocalizationToggle:"yuK7YlDkSnTHzZph5sQq"};function f(){const[e,t]=(0,i.useState)(g.ZP.isEnabled());return(0,l.jsxs)("div",{children:[" ",(0,l.jsx)(h.D,{as:"h4",variant:"canon",semanticColor:"textBase",children:"Pseudo localization"}),(0,l.jsxs)("div",{children:[(0,l.jsxs)(h.D,{variant:"ballad",children:["Perform"," ",(0,l.jsx)("a",{href:"https://en.wikipedia.org/wiki/Pseudolocalization",children:"pseudolocalization"})," ","against the DOM.",(0,l.jsx)("br",{})]}),(0,l.jsx)(h.D,{variant:"viola",children:"In Accented English all Latin letters are replaced by accented Unicode counterparts which don't impair the readability of the content. This allows developers to quickly test if any given string is being correctly displayed in its 'translated' form. Additionally, simple heuristics are used to make certain words longer to better simulate the experience of international users."})]}),(0,l.jsx)("br",{}),(0,l.jsxs)("div",{className:v.pseudoLocalizationToggle,children:[(0,l.jsx)(h.D,{as:"label",htmlFor:"pseudo-localization",variant:"ballad",children:"Toggle pseudo-localization"}),(0,l.jsx)(k.Z,{id:"pseudo-localization",value:e,onSelected:e=>{e?(t(!0),g.ZP.start()):(t(!1),g.ZP.stop(),window.location.reload())}})]})]})}var y=n(75017),S=n(86971);const b=()=>{const{settings:e}=(0,S.r)(),t=(0,y.D)(e.values),n=u.ag.getLocale(),a=u.ag.getDictionary(),[s,r]=(0,i.useState)(null);(0,i.useEffect)((()=>{const e={};return Promise.all(Object.keys(p.k1).map((async t=>{e[t]=await(0,m.q)(t)}))).then((()=>{r(e)})).finally((()=>{setImmediate((()=>{u.ag.setDictionary(a),u.ag.setLocale(n)}))})),()=>{u.ag.setDictionary(a),u.ag.setLocale(n)}}),[n,a]);const[o,d]=(0,i.useState)(null),c=u.ag.get.bind(u.ag);return t?(0,l.jsxs)("div",{className:v.container,children:[(0,l.jsx)("h1",{className:v.title,children:"Locales"}),(0,l.jsx)("h3",{children:"You can use this tool to test if the Desktop client is able to properly render every locale with correct font-family within Desktop UI."}),(0,l.jsx)(f,{}),s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:v.keyPick,children:[(0,l.jsx)("p",{children:"Choose a string key from the dropdown to test it"}),(0,l.jsxs)("select",{onChange:e=>{d(e.target.value)},children:[(0,l.jsx)("option",{selected:null===o,children:"Select a key"}),Object.keys(s[u.go.en]||{}).map((e=>(0,l.jsx)("option",{selected:o===e,children:e},e)))]})]}),(0,l.jsx)("div",{className:v.rows,children:Object.entries(p.k1).map((([e,{displayName:t,displayNameEn:n}])=>(e in s&&(u.ag.setDictionary(s[e]),u.ag.setLocale(e)),(0,l.jsxs)("div",{className:v.row,children:[(0,l.jsxs)("h3",{children:[n," (",e,") (",t,")"]}),o?(0,l.jsx)("p",{className:v.type,children:e in s?c(o):"💥 Can't load dictionary 💥 "}):null]},e))))})]}):(0,l.jsx)("p",{children:"Please wait until we fetch all dictionaries"})]}):null}},46669:(e,t,n)=>{"use strict";n.d(t,{C:()=>i.C});var i=n(62890)},62890:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var i=n(46361);const a={name:"debug-window",type:i.N.POPUP,position:{x:200,y:200},size:{width:1200,height:800}};function s(){const{handle:e,open:t,close:n}=(0,i.H)(a);return{handle:e,show:t,hide:n}}},94031:(e,t,n)=>{"use strict";n.d(t,{D:()=>o});var i=n(59496),a=n(61740),s=n(85483),r=n(49873);function o(){const e=(0,r.c)(),t=(0,a.I0)();return(0,i.useCallback)(((n,i)=>new Promise((a=>t((0,s.n0)(n,(()=>e.removeDownload(n,i).then((()=>a(!0)))),(()=>a(!1)),i))))),[t,e])}},96694:(e,t,n)=>{"use strict";n.d(t,{c:()=>a,f:()=>s});var i=n(88566);let a=function(e){return e.ENHANCED="enhanced",e.DEHANCED="dehanced",e.ENHANCED_WITH_NUM_RECS="enhanced_with_num_recs",e.RECOMMENDATION_ADDED="recommendation_added",e.RECOMMENDATION_ADD_FAIL="recommendation_add_fail",e.RECOMMENDATION_REMOVED="recommendation_removed",e.RECOMMENDATION_REMOVE_FAIL="recommendation_remove_fail",e.ENHANCE_OFFLINE_FAILURE="enhance_offline_failure",e}({});class s extends i.r{}},56969:(e,t,n)=>{"use strict";n.d(t,{t:()=>k});var i=n(50346),a=n(19281),s=n(78690),r=n(59580),o=n(46843),l=n(22508),d=n(62134);n(72071);const c=Spicetify.GraphQL.Definitions["decorateItemsForEnhance"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"decorateItemsForEnhance"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"trackUris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userUris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"trackUris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"userUris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatar"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]},u=e=>"User"===e?.__typename,m=e=>"Track"===e?.__typename;async function p(e,t,n,a,s){await async function(e,t,n,a,s){const r=Array.from(new Set(s.filter((e=>!m(n.get(e.uri)))).map((e=>e.uri)))),o=Array.from(new Set(s.filter((e=>e.itemAttributes.addedBy&&!u(a.get(e.itemAttributes.addedBy)))).map((e=>e.itemAttributes.addedBy))));(r.length||o.length)&&await async function(e,t,n,a,s,r){const o=await t.create(`${s.join(",")}|${r.join("@")}`,(()=>e(c,{trackUris:s,userUris:r.map((e=>(0,i.QK)(e).toURI()))},["trackUris","userUris"]))),l=o.flatMap((e=>e.tracks??[])),d=o.flatMap((e=>e.users??[]));if(l?.length!==s.length||d?.length!==r.length)throw new Error("Error decorating tracks and users for enhance! Mismatch in array sizes.");l?.forEach(((e,t)=>{m(e)&&n.set(s[t],e)})),d?.forEach(((e,t)=>{u(e)&&a.set(r[t],e)}))}(e,t,n,a,r,o)}(e,t,n,a,s);const r=s.find((e=>e.itemAttributes.isRecommendation));return s.map((e=>function(e,t,n,i=!1){const a=Number(e.itemAttributes.addedAt);return{__typename:"Track",uid:e.itemId,uri:e.uri,name:t?.name??"",albumOfTrack:{uri:t?.albumOfTrack?.uri??"",name:t?.albumOfTrack?.name??"",coverArt:t?.albumOfTrack?.coverArt??null},artists:{items:t?.artists.items??[]},contentRating:t?.contentRating??null,duration:{totalMilliseconds:t?.duration.totalMilliseconds??0},playability:{playable:t?.playability.playable??!1},isEnhanced:e.itemAttributes.isRecommendation,isFirstRecommendationOfPage:i,addedBy:n,playContextPageIndex:e.itemAttributes.playerContextPage,addedAt:isNaN(a)?null:new Date(1e3*a)}}(e,n.get(e.uri),a.get(e.itemAttributes.addedBy),e===r)))}const g=`${n(27555).XA}/enhanced-view/v1`;var h=n(96694);class k{TTL=36e5;CLEAN_INTERVAL=36e5;_events=new h.f;_getPageShouldEmitEnhancedWithRecs=!1;_inflightDecorationCache=new r.tL;_tracksCache=new r.tp(this.TTL,this.CLEAN_INTERVAL);_userCache=new r.tp(this.TTL,this.CLEAN_INTERVAL);MAX_PAGE_SIZE=300;constructor(e,t,n){this._builder=e,this._graphQLBatchedLoader=t,this._playerAPI=n}getEvents(){return this._events}async setIsEnhanced(e,t){throw new Error("Setting enhanced state is not yet implemented")}async getContextState(e){throw new Error("Getting context state is not yet implemented")}subscribeToContextState(e,t){return t(new Error("Subscribing to context state is not yet implemented")),()=>{}}async addRecommendation(e,t,n,i,a){try{const{body:s,status:r}=await function(e,t,n,i,a=0,s=0){return e.build().withMethod("POST").withHost(g).withPath(`/context/${encodeURIComponent(t)}/add`).withQueryParameters({sessionId:n,offset:a,limit:s}).withHeaders([{key:"accept",value:"text/plain"}]).withBody(JSON.stringify({itemIds:i})).withoutMarket().withEndpointIdentifier("/enhanced-view/v1/context/{contextUri}/add").send()}(this._builder,e,t,n,i,a);return 200===r&&this._events.emit(h.c.RECOMMENDATION_ADDED,{uri:e}),{enhancePage:s,status:r}}catch(t){throw this._events.emit(h.c.RECOMMENDATION_ADD_FAIL,{uri:e}),t}}async removeItems(e,t,n,i,a,s){try{const{body:r,status:o}=await function(e,t,n,i,a=0,s=0){return e.build().withMethod("POST").withHost(g).withPath(`/context/${encodeURIComponent(t)}/remove`).withQueryParameters({sessionId:n,offset:a,limit:s}).withBody(JSON.stringify({itemIds:i})).withoutMarket().withEndpointIdentifier("/enhanced-view/v1/context/{contextUri}/remove").send()}(this._builder,e,t,n,i,a);return 200===o&&s&&this.getEvents().emit(h.c.RECOMMENDATION_REMOVED,{uri:e}),{enhancePage:r,status:o}}catch(t){throw s&&this.getEvents().emit(h.c.RECOMMENDATION_REMOVE_FAIL,{uri:e}),t}}async getPage(e,t,n,i,a){const{body:s,status:r}=await function(e,t,n,i,a=0,s=0){return e.build().withHost(g).withPath(`/context/${encodeURIComponent(t)}`).withQueryParameters({...i?{sessionId:i}:{},iteration:n,offset:a,limit:s,format:"json"}).withEndpointIdentifier("/enhanced-view/v1/context/{contextUri}").send()}(this._builder,e,t,n,i,a);return this._getPageShouldEmitEnhancedWithRecs&&(this._events.emit(h.c.ENHANCED_WITH_NUM_RECS,{uri:e,numRecs:s.numTotalRecs}),this._getPageShouldEmitEnhancedWithRecs=!1),{enhancePage:s,status:r}}async decoratePageItems(e){return await p(this._graphQLBatchedLoader,this._inflightDecorationCache,this._tracksCache,this._userCache,e)}async updatePlayContextIfApplicable(e,t){if(this._playerAPI.getState()?.context.uri!==e)return;const{isEnhanced:n,iteration:r}=await this.getContextState(e);let c;if((0,i.nK)(e))c=(0,d.U)(e,t&&(0,a._j)(t));else{if(!(0,i.zO)(e))return;c=(0,o.I)(e,t&&(0,s.w)(t))}if(c.metadata||={},n){if(!r)return;const{enhancePage:t}=await this.getPage(e,r,void 0,0,1);c.url=t?.dspContextUri,c.metadata[l.sb.SORTING_CRITERIA]=""}else c.url=`context://${e}`,c.metadata[l.sb.REPORTING_URI]=e;const u=this._playerAPI.getState(),m=u?.sessionId;u?.context.uri===e&&m&&this._playerAPI.updateContext(m,c)}}},4898:(e,t,n)=>{"use strict";n.d(t,{O:()=>r,_:()=>o});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useEnhanceAPI must be used within a EnhanceAPIProvider");return e}},99372:(e,t,n)=>{"use strict";n.d(t,{v:()=>r});var i=n(36844),a=n(50346),s=n(41836);const r=({uri:e,renderEnabled:t,renderDisabled:n})=>{const r=(0,i.W6)(s.Up,{loadingValue:!1}),o=(0,i.W6)(s.We,{loadingValue:!1});return(0,a.nK)(e)&&r||(0,a.zO)(e)&&o?t():n?.()??null}},922:(e,t,n)=>{"use strict";n.d(t,{U:()=>r});var i=n(59496),a=n(29939),s=n(4898);function r(e){const t=(0,s._)(),[n,r]=(0,i.useState)(!1),[o,l]=(0,i.useState)();(0,i.useEffect)((()=>{let n=!1;const i=t.subscribeToContextState(e,((e,t)=>{e||n||(r(t.isEnhanced),l(t.iteration))}));return()=>{i(),n=!0}}),[e,t]);const{sortState:d}=(0,i.useContext)(a.Gb),c=(0,i.useCallback)((n=>t.setIsEnhanced(e,n,d)),[e,t,d]),u=(0,i.useCallback)((()=>c(!n)),[c,n]);return{isEnhanced:n,iteration:o,setIsEnhanced:c,toggleIsEnhanced:u}}},1218:(e,t,n)=>{"use strict";n.d(t,{g:()=>m});var i=n(59496),a=n(3802),s=n(32812),r=n(99308),o=n(96170),l=n(99372),d=n(922),c=n(4637);const u=({uri:e,divider:t,spec:n})=>{const{isEnhanced:i,toggleIsEnhanced:u}=(0,d.U)(e),m=!(0,s.k)(),p=(0,o.$P)();return(0,c.jsx)(l.v,{uri:e,renderEnabled:()=>(0,c.jsx)(r.s,{role:"menuitem",divider:t,disabled:m&&!i,onClick:()=>{m&&!i||(n&&p.logInteraction(i?n.enhanceButtonFactory().hitUnenhanceContext({contextToBeUnenhanced:e}):n.enhanceButtonFactory().hitEnhanceContext({contextToBeEnhanced:e})),u())},children:i?a.ag.get("web-player.enhance.contextmenu.turn-off-enhance"):a.ag.get("web-player.enhance.contextmenu.turn-on-enhance")})})},m=i.memo((function(e){return(0,c.jsx)(i.Suspense,{fallback:null,children:(0,c.jsx)(u,{...e})})}))},48271:(e,t,n)=>{"use strict";n.d(t,{U:()=>i.U});var i=n(922)},58527:(e,t,n)=>{"use strict";n.d(t,{L:()=>r,O:()=>s});var i=n(59496),a=n(4637);const s=(0,i.createContext)({visible:!1,setVisible:()=>{}}),r=({children:e})=>{const[t,n]=(0,i.useState)(!1);return(0,a.jsx)(s.Provider,{value:{visible:t,setVisible:n},children:e})}},38586:(e,t,n)=>{"use strict";n.d(t,{hf:()=>u,jg:()=>d,nt:()=>c});var i=n(59496),a=n(29251),s=n(4637);function r(e,t){switch(t.type){case"OPEN":return{...e,isOpen:!0};case"CLOSE":return{...e,isOpen:!1};default:(0,a.U)(t)}}const o=(0,i.createContext)(void 0),l=(0,i.createContext)((()=>{})),d=({children:e})=>{const[t,n]=(0,i.useReducer)(r,{isOpen:!1});return(0,s.jsx)(l.Provider,{value:n,children:(0,s.jsx)(o.Provider,{value:t,children:e})})};function c(){const e=(0,i.useContext)(o);if(void 0===e)throw new Error("useLanguageSelectionModalState must be used within a LanguageSelectionModalContextProvider");return e}function u(){const e=(0,i.useContext)(l);if(void 0===e)throw new Error("useLanguageSelectionModalDispatch must be used within a LanguageSelectionModalDispatchContextProvider");return e}},19503:(e,t,n)=>{"use strict";n.d(t,{x:()=>u,K:()=>V});var i=n(59496),a=n(63082),s=n(8678),r=n(3802),o=n(19154),l=n(38586);const d="Ka2HOvFsfXcLu7He0nTD";var c=n(4637);const u=()=>{const e=r.ag.getLocale(),t=o.k1[e]??o.k1.en,n=(0,l.hf)(),u=(0,i.useCallback)((()=>{n({type:"OPEN"})}),[n]);return(0,c.jsx)("div",{className:d,children:(0,c.jsx)(a.P,{iconLeading:s.z,buttonSize:"sm",onClick:u,"":"language-selection-button",children:t.displayName})})};var m=n(87995),p=n(61740),g=n(56162),h=n(58706),k=n(61278),v=n(22345),f=n(37180),y=n(14786),S=n(7072),b=n(32422),_=n(50346),N=n(30985),E=n(39669);const x="Gf_hXbIvfUvlnE_jnkw8",C=({children:e,locale:t,onClick:n,type:i="button"})=>{const a=t===E.ZW,s=(0,p.v9)(N.yE),r={className:x,id:t,onClick:e=>(e=>{if("button"===i){e.preventDefault();const t=new URL(window.location.href);window.location.href.includes("locale")&&t.searchParams.delete("locale"),window.location.href=t.href}n(t)})(e),"":`language-option-${t}`};if("link"===i){const n=(0,b.fd)(window.location.pathname),i=(0,_.EC)(window.location.pathname),o=i?.type,l=(0,S.nT)(t),d=(0,b.S9)({entityFeatureFlag:s,entity:n&&!a?"":o,urlLocale:l,type:"route"}),u=(0,S.ac)(window.location.pathname,!a),m=(0,S.is)(u,t,!1),p=d?m:window.location.pathname.replace(/\//,""),g=(e=>e.endsWith("/")?e.slice(0,-1):e)(`${E.Li}${p}`);return(0,c.jsx)("a",{href:g,...r,children:e})}return(0,c.jsx)("button",{...r,children:e})},w="QN6q7D8yep8_vpem9h9t",I=({style:e,children:t})=>(0,c.jsx)("div",{className:w,style:e,children:t});var T=n(84875),A=n.n(T);const P="zR8QNf_xkSN8l2nrr7qn",O="XOuJWoOqDoKhvu3tpsf1",D="VdanMHKK5Onw77cpKNJo",R="biCYmK3d8L8l7A_xC_Ge",L="uzrPPSY_Qq9u4Yos40TQ",F="VtOVn196CnZ8321SwK5W",j=({onClose:e,children:t})=>{const n=(0,i.useRef)(null),{isOpen:a}=(0,l.nt)();return(0,c.jsx)("div",{"":"language-selection-modal",className:A()(P,"encore-dark-theme",{[O]:a}),onClick:t=>{t.target===n.current&&e()},role:"presentation",ref:n,children:t})},M=({ariaDescribedBy:e,ariaLabelledBy:t,children:n})=>{const{isOpen:i}=(0,l.nt)();return(0,c.jsx)("div",{className:D,role:"dialog",hidden:!i,"aria-modal":!0,"aria-labelledby":t,"aria-describedby":e,children:n})};var U=n(83680);const B=({onClose:e})=>(0,c.jsx)("button",{"":"close-button",className:F,onClick:()=>{e()},children:(0,c.jsx)(U.k,{iconSize:16,"aria-label":r.ag.get("close")})}),V=({languageSelectionModalRef:e})=>{const t=(0,i.useRef)(null),[n,a]=(0,i.useState)("0"),s=(0,l.hf)(),d=(0,p.v9)(N.br),u=(0,i.useCallback)((()=>{s({type:"CLOSE"})}),[s]),{isOpen:_}=(0,l.nt)(),E=(0,i.useCallback)((()=>{t.current&&a(`${t.current.getBoundingClientRect().height}px`)}),[a]),x=e=>{(0,f.pC)({name:"sp_locale",value:e,domain:(0,y.J)("open.spotify.com"),days:365}),u()};var w;if(w=u,(0,i.useEffect)((()=>{const e=e=>{"Escape"===e.key&&w()};return window.addEventListener("keyup",e,!1),()=>window.removeEventListener("keyup",e)})),(0,v.y)({refOrElement:t,observeOnly:"height",onResize:E}),!e.current)return null;const T="language-selection-title",A="language-selection-subtitle",P={"--header-height":n};return(0,m.createPortal)((0,c.jsx)(k.i,{active:_,children:(0,c.jsx)("div",{children:(0,c.jsx)(j,{onClose:u,children:(0,c.jsxs)(M,{ariaLabelledBy:T,ariaDescribedBy:A,children:[(0,c.jsxs)("div",{className:R,ref:t,children:[(0,c.jsxs)("div",{className:L,children:[(0,c.jsx)(g.D,{as:"h1",variant:"canon",semanticColor:"textBase",id:T,paddingBottom:h.dly,children:r.ag.get("i18n.language-selection.title")}),(0,c.jsx)(g.D,{as:"p",variant:"ballad",semanticColor:"textBase",id:A,paddingBottom:h.o78,children:r.ag.get("i18n.language-selection.subtitle")})]}),(0,c.jsx)(B,{onClose:u})]}),(0,c.jsx)(I,{style:{...P},children:o.ge.map((e=>{const t=(0,S.nT)(e),n=(0,b.S9)({localeFeatureFlag:d,urlLocale:t,type:"locale"});return(0,c.jsxs)(C,{onClick:x,locale:e,type:n?"link":"button",children:[(0,c.jsx)(g.D,{semanticColor:"textBase",children:o.k1[e].displayName}),(0,c.jsx)(g.D,{children:o.k1[e].displayNameEn})]},e)}))})]})})})}),e.current)}},63787:(e,t,n)=>{"use strict";n.d(t,{H:()=>s,r:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)({onLibraryItemRemove:()=>{}}),r=({onLibraryItemRemove:e,children:t})=>(0,a.jsx)(s.Provider,{value:{onLibraryItemRemove:e},children:t})},63887:(e,t,n)=>{"use strict";n.d(t,{H:()=>i.H});var i=n(63787)},12107:(e,t,n)=>{"use strict";n.d(t,{p:()=>f});var i=n(59496),a=n(3802),s=n(19281),r=n(97355),o=n(66806),l=n(53417),d=n(29939),c=n(98340),u=n(46164),m=n(96170),p=n(75207),g=n(78690),h=n(4637);const k=new Set(d.P0),v=new Set([]),f=i.memo((function({nrTracks:e,collectionUri:t,columns:n,initialItems:f,uri:y,sortable:S=!0,scrollToUri:b,usePlayContextItem:_,outerDomRef:N,spec:E}){const x=(0,i.useContext)(u.H),C=(0,i.useRef)(null),{filter:w}=(0,i.useContext)(o.fo),I=(0,i.useRef)((()=>{})),[T,A]=(0,i.useState)([]),{sortState:P,setSortState:O}=(0,i.useContext)(d.Gb),D=(0,m.$P)(),R=(0,i.useCallback)(((e,t)=>{e===l.QD.ADDED_AT?O({column:l.QD.ADDED_AT,order:P.order===l.kn.ASC?l.kn.DESC:l.kn.ASC}):O((0,s.VK)(e,P)),E&&D.logInteraction(E.columnHeaderFactory({identifier:e,position:t||0}).hitSort())}),[D,O,P,E]);(0,i.useEffect)((()=>{C.current&&b&&C.current.scrollToItem({uri:b})}),[b]);const L=(0,i.useCallback)((e=>{const t=e.map((e=>e.uri));I.current(),x?.remove(...t)}),[x]),F=(0,i.useCallback)(((e,t)=>{I.current=t,e.length>1?A(e):L(e)}),[L]),j=(0,i.useCallback)((async(e,t)=>{const n=await(x?.getTracks({offset:e,limit:t,uri:y,sort:(0,g.w)(P),filter:w})),i=n?.totalLength??0;return{items:n?.items??[],totalLength:i}}),[w,x,P,y]),M=(0,i.useCallback)(((e,n)=>{const i=(0,p.X)(e.album?.images,{desiredSize:40,desiredLabel:"small"});return(0,h.jsx)(l.dx,{index:n,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,isCollaborative:!1,isMixedMedia:!1,isPaywalled:!1,isUserSubscribed:!1,isLocal:e.isLocal,addedBy:[],dateAdded:e.addedAt,hasDecoratedAddedBy:!1,release_date:"",isMOGEFRestricted:e.is19PlusOnly,type:e.type,imgUrl:i?.url||"",onMove:()=>{},onInsert:()=>{},usePlayContextItem:_,allowedDropTypes:[],isDisliked:!1,playlistName:a.ag.get("sidebar.liked_songs")},n+e.uri)}),[t,_]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(c.ZP,{value:"liked-songs-tracklist",children:(0,h.jsx)(l.Pv,{ariaLabel:a.ag.get("sidebar.liked_songs"),hasHeaderRow:!0,columns:n,sortableColumns:x?.getCapabilities().canSortTracksAndEpisodes&&S?k:v,sortState:P,onSort:R,renderRow:M,resolveUri:e=>e.uri,resolveUid:e=>e.uri,onRemove:F,nrTracks:e,fetchTracks:j,limit:50,canFetchAllTracks:x?.getCapabilities().canFetchAllItems,outerRef:C,outerDomRef:N,tracks:f},t)}),(0,h.jsx)(r.h,{title:a.ag.get("remove_from_your_liked_songs"),isOpen:T.length>0,tracks:T,onClose:e=>{e.stopPropagation(),A([])},onRemove:L})]})}))},78690:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var i=n(19281),a=n(87843),s=n(82849);const r={[s.bD.ADDED_AT]:a._1.ADDED_AT,[s.bD.ADDED_BY]:null,[s.bD.ALBUM]:a._1.ALBUM_NAME,[s.bD.ARTIST]:a._1.ARTIST_NAME,[s.bD.DURATION]:null,[s.bD.TITLE]:a._1.NAME},o=e=>{const t=(0,i._j)(e);if(!t)return;const n=r[t.field],a=t.order;return n&&a?{field:n,order:a}:void 0}},40408:(e,t,n)=>{"use strict";n.d(t,{p:()=>h});var i=n(3802),a=n(24952),s=n(96768),r=n(48607),o=n(9654),l=n(79923),d=n(61740),c=n(82108),u=n(74150),m=n(9637);var p=n(4637);const g=({metadata:e,index:t})=>{const{isPlaying:n,togglePlay:o}=(0,r.n)({uri:e.uri},{featureIdentifier:"your_library"}),{name:l,images:d}=e;return(0,p.jsx)(a.Z,{index:t,delegatePlayback:!0,delegateLogging:!0,isPlaying:n,featureIdentifier:"your_library",onPlay:(e,t)=>o({loggingParams:t}),headerText:l,uri:e.uri,renderCardImage:()=>(0,p.jsx)(s.x,{images:d}),renderSubHeaderContent:()=>(0,p.jsx)("span",{children:i.ag.get("tracklist-header.songs-counter",e.totalLength)})})},h=({index:e})=>{const t=function(){const e=(0,u.MY)({offset:0,limit:1}),{user:t}=(0,d.v9)(c.Gg);if(null===e||null===t)return null;const n=(0,l.I2)(t.id);return n?{uri:n.uri,name:n.name,images:n.images,totalLength:e?.totalLength,unfilteredTotalLength:e.unfilteredTotalLength,owner:(0,m.V)(t)}:null}();return t?(0,p.jsx)(g,{metadata:t,index:e}):(0,p.jsx)(o.A,{cardImage:(0,p.jsx)(s.x,{images:[l.Ds]}),isLoading:!0})}},73460:(e,t,n)=>{"use strict";n.d(t,{S:()=>r});var i=n(36973);const a="fRZRXRIV2YBCFLYgwDAr";var s=n(4637);const r=({iconSize:e=64,...t})=>(0,s.jsx)("div",{className:a,children:(0,s.jsx)(i._,{iconSize:e,...t,semanticColor:"textBrightAccent","aria-hidden":!0})})},39936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>E});var i=n(59496),a=n(56162),s=n(3802),r=n(84875),o=n.n(r),l=n(91929);const d="lyrics-lyricsContent-lyric",c="lyrics-lyricsContent-active",u="lyrics-lyricsContent-highlight",m="lyrics-lyricsContent-unsynced",p="lyrics-lyricsContent-isInteractive",g="lyrics-lyricsContent-provider";var h=n(4637);const k=i.memo((function({onObserve:e,text:t,lineNumber:n,activeLineIndex:a,isTimeSynced:s,onClick:r,onActiveLineChange:g}){const{ref:k,inView:v}=(0,l.YD)({threshold:0,triggerOnce:!0});(0,i.useEffect)((()=>{v&&e(t)}),[v,e,t]);const f=(0,i.useRef)(),y=(0,i.useRef)(!0);(0,i.useEffect)((()=>{g(f,y.current),y.current=!1}),[a,g]);const S=(0,i.useCallback)((e=>{k(e),f.current=e||void 0}),[k]);return(0,h.jsx)("div",{dir:"auto",className:o()(d,{[p]:!!r,[c]:a===n,[u]:a>n,[m]:!s}),"":"fullscreen-lyric",ref:S,onClick:r,children:t})}));var v=n(91048);const f={start:0,end:1,text:""};var y=n(4174),S=n(99948),b=n(55760);const _=140,N=1500;const E=i.memo((function({trackUri:e,data:t,format:n,onLineClick:r,onActiveLineChange:o}){const{provider:l,providerLyricsId:d,providerDisplayName:c,syncType:u,isTimeSynced:m}=t,{lyricWithEmptyLines:p,activeLineIndex:E,hasSkipped:x,shouldAnimateScroll:C}=((e,t)=>{const n=(0,i.useRef)(0),{lyrics:a=[],isTimeSynced:s}=t,r=(0,i.useRef)(0),[o]=(0,v.B)(500,(t=>t?.item?.uri===e)),l=(0,i.useMemo)((()=>[f,f,...a].map(((e,t)=>({...e,lineNumber:t})))),[a]),d=s?l.findIndex((({start:e,end:t})=>o>=e&&o2e3;return n.current=o,{lyricWithEmptyLines:l,activeLineIndex:d,prevActiveLineIndex:c,lineIndexDiff:d-c,shouldAnimateScroll:u,hasSkipped:m}})(e,t),w=function(e){const{trackUri:t,format:n,provider:a,providerLyricsId:s,syncType:r}=e,[o,l]=(0,i.useState)(!1),[d,c]=(0,i.useState)(0),[u,m]=(0,i.useState)(!1),p=(0,S.Y)((e=>e?.playbackId??void 0)),g=(0,i.useMemo)((()=>(0,y.N)({lyrics_format:n,track_uri:t,provider:a,provider_lyrics_id:s,sync_type:r,playback_id:p})),[n,a,s,r,t,p]);(0,i.useEffect)((()=>{l(!1),c(0),m(!1);const e=setTimeout((()=>{m(!0)}),N);return()=>{clearTimeout(e)}}),[g]);const h=(0,b.s4)();return(0,i.useEffect)((()=>{o||d>=_&&u&&(h.send(g),l(!0))}),[d,o,g,h,u]),(0,i.useCallback)((e=>{e.length>1&&c((t=>t+e.length))}),[c])}({trackUri:e,format:n,provider:l,providerLyricsId:d,syncType:u});return(0,h.jsxs)(h.Fragment,{children:[p.map((({text:e,lineNumber:t})=>(0,h.jsx)(k,{text:e,lineNumber:t,activeLineIndex:E,isTimeSynced:m,onObserve:w,onClick:r&&(e=>r(e,p[t].start)),onActiveLineChange:(e,n)=>o({lineRef:e,firstUpdate:n,isFirstLine:m&&0===t,isActiveLine:m&&E===t,activeLineIndex:E,hasSkipped:x,shouldAnimateScroll:C})},t))),c&&(0,h.jsx)("div",{className:g,children:(0,h.jsx)(a.D,{as:"p",variant:"mesto",dir:"auto",children:s.ag.get("web-player.lyrics.providedBy",c)})})]})}))},44472:(e,t,n)=>{"use strict";n.d(t,{Z:()=>re});var i=n(84875),a=n.n(i),s=n(61740),r=n(94041),o=n(50346),l=n(35725),d=n(84120),c=n(83682),u=n(99948),m=n(59496),p=n(56162),g=n(10620),h=n(3802),k=n(21524),v=n(37409),f=n(96170),y=n(39936);const S="lyrics-lyrics-contentContainer",b="lyrics-lyrics-contentWrapper",_="lyrics-lyricsContent-description";var N=n(4637);const E=({trackUri:e,data:t,format:n})=>{const{spec:i,logger:a}=(0,f.fU)(g.createDesktopLyricsEventFactory,{data:{uri:e}}),s=(0,v.g)(),r=(0,m.useContext)(k.VX),o=(0,m.useCallback)(((e,t)=>{const n=i.lyricsLineFactory().hitSeekToTime({msToSeekTo:t});a.logInteraction(n);e.currentTarget.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),s.seekTo(t);const r=s.getState();r&&!r.isPaused||s.resume()}),[a,s,i]),l=(0,m.useCallback)((({lineRef:e,firstUpdate:t,isFirstLine:n,isActiveLine:i,activeLineIndex:a,hasSkipped:s,shouldAnimateScroll:o})=>{if(e.current&&r.scrollNodeRef.current&&(i||n&&a<0)){const n=e.current.getBoundingClientRect().top,i=r.scrollNodeRef.current.getBoundingClientRect().height,a=i/4,l=n>=a&&n<=i-a;if(!l&&!(t||s))return;const d="visible"===document.visibilityState&&o&&l?"smooth":"auto";e.current?.scrollIntoView({behavior:d,block:"center",inline:"center"})}}),[r.scrollNodeRef]);return(0,N.jsx)("div",{className:S,children:(0,N.jsxs)("div",{className:b,children:[!t.isTimeSynced&&(0,N.jsx)(p.D,{as:"p",variant:"mesto",className:_,dir:"auto",children:h.ag.get("web-player.lyrics.unsynced")}),(0,N.jsx)(y.Z,{trackUri:e,data:t,format:n,onLineClick:t.isTimeSynced?o:void 0,onActiveLineChange:l},e)]})})};var x=n(29251);const C="oNqyFdyc0Z01aWTF8qtF",w="C3pBU1DsOUJJOAv89ZFT",I=(0,m.memo)((function({version:e}){const{getMessage:t}=(()=>{const e=[h.ag.get("web-player.lyrics.noLyrics0"),h.ag.get("web-player.lyrics.noLyrics1"),h.ag.get("web-player.lyrics.noLyrics2"),h.ag.get("web-player.lyrics.noLyrics3")];return{getMessage:t=>{let n;switch(t){case"ad":n=h.ag.get("web-player.lyrics.ad");break;case"error":n=h.ag.get("web-player.lyrics.error");break;case"unavailable":n=e[Math.floor(Math.random()*e.length)];break;default:(0,x._)(t),n=""}return n}}})();return(0,N.jsx)("div",{className:C,children:(0,N.jsx)("span",{className:w,children:t(e)})})}));var T=n(19953),A=n(31450),P=n(97089),O=n(3115),D=n(16004),R=n(77675),L=n(59200),F=n(1996),j=n(78115),M=n(99308),U=n(75702),B=n(56217);const V="qnJd7AVNVGM33NxaibzG",H="tPJJwfJAQV0WDsE9Kfmd",G=[{volume:U.B.SING_ALONG_OFF,icon:(0,N.jsx)(T.D,{iconSize:16}),get label(){return h.ag.get("singalong.off")}},{volume:U.B.HIGH,icon:(0,N.jsx)(A.d,{iconSize:16}),get label(){return h.ag.get("singalong.more-vocal")}},{volume:U.B.LOW,icon:(0,N.jsx)(P.J,{iconSize:16}),get label(){return h.ag.get("singalong.less-vocal")}}],W=m.memo((function({currentTrackUri:e}){const{isSupported:t,volume:n,setVocalVolume:i}=(e=>{const t=(0,B.$)(),[n,i]=(0,m.useState)(U.B.SING_ALONG_OFF),{isSupported:a}=t.getCapabilities();return(0,m.useEffect)((()=>{t.setStatus(U.q.DISABLED).then((()=>{i(U.B.SING_ALONG_OFF)}))}),[e,t]),(0,m.useEffect)((()=>()=>{t.setStatus(U.q.DISABLED)}),[t]),{isSupported:a,volume:n,setVocalVolume:(0,m.useCallback)((async e=>{e===U.B.SING_ALONG_OFF?await t.setStatus(U.q.DISABLED):await t.setStatus(U.q.ENABLED),await t.setVocalVolume(e),i(e)}),[t])}})(e),s=(0,m.useCallback)((e=>{t&&i(e.volume)}),[t,i]);if(!t)return null;const r=G.find((e=>e.volume===n)),o=r?.volume===U.B.SING_ALONG_OFF;return(0,N.jsx)(L.yj,{menu:(0,N.jsxs)(F.v,{children:[(0,N.jsx)(j.F,{children:h.ag.get("singalong.title")}),G.map((e=>(0,N.jsx)(M.s,{role:"menuitemradio","aria-checked":n===e.volume,"aria-label":e.label,onClick:()=>s(e),leadingIcon:e.icon,children:e.label},e.volume)))]}),children:(e,t,n)=>(0,N.jsxs)("button",{onClick:t,ref:n,type:"button",className:a()(V,{[H]:o}),children:[o?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(O.r,{iconSize:16}),(0,N.jsx)(p.D,{variant:"mesto",children:h.ag.get("singalong.button")})]}):(0,N.jsxs)(N.Fragment,{children:[r.icon,(0,N.jsx)(p.D,{variant:"mesto",children:r.label})]}),e?(0,N.jsx)(D.U,{iconSize:16}):(0,N.jsx)(R.i,{iconSize:16})]})})}));var z=n(91703),K=n(6174),Y=n(27913),q=n(99765);const Z="lyrics-lyrics-container",Q="lyrics-lyrics-adLeaderboardIsEnabled",J="lyrics-lyrics-coverTopBar",$="DADZePCqi2OVZpayspK_",X="lyrics-lyrics-background",ee="lyrics-lyrics-vocalRemoval",te=(0,N.jsx)("div",{className:$,children:(0,N.jsx)(K.H,{})}),ne=(0,N.jsx)(I,{version:"error"}),ie=(0,N.jsx)(I,{version:"ad"}),ae=(0,N.jsx)(I,{version:"unavailable"}),se={active:r.ixZ,inactive:r.Snx,passed:r.Snx,background:r.tGJ,messaging:r.ixZ},re=({coverTopBar:e=!1,format:t})=>{const n=(0,q.A)(),i=(0,c.O)(),r=(0,u.Y)((e=>e?.item),((e,t)=>e?.uri===t?.uri)),m=r?.uri||"",{data:p,loading:g,error:h}=(0,Y.C)(m,r?.images);let k=se;p?.hasLyrics&&(k={active:p.colors.activeText,inactive:p.colors.text,passed:d.Il.fromCSS(p.colors.activeText,.7).toCSS(d.jT.RGBA),background:p.colors.background,messaging:p.colors.text}),(0,l.Y)(k.background,se.background);const v=(0,u.Y)((e=>e?.nextItems?.[0]),((e,t)=>e?.uri===t?.uri));(0,Y.C)(v?.uri,v?.images);let f=te,y=!1;if(m)if((0,o.mg)(m))f=ie;else if(h)f=ne;else if(g)f=te;else if(p)if(p.hasLyrics){const e=i.activeDevice?.isLocal??!1;y=n&&p.hasVocalRemoval&&e,f=(0,N.jsx)(E,{trackUri:m,data:p,format:t})}else f=ae;const S=(0,s.v9)((e=>e.ads.leaderboard.isEnabled)),b={"--lyrics-color-active":k.active,"--lyrics-color-inactive":k.inactive,"--lyrics-color-passed":k.passed,"--lyrics-color-background":k.background,"--lyrics-color-messaging":k.messaging};return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(z.$,{usePlayingItem:!0,children:"Spotify"}),(0,N.jsxs)("div",{className:a()(Z,{[Q]:S,[J]:!e}),style:b,children:[(0,N.jsx)("div",{className:X}),f,y?(0,N.jsx)("div",{className:ee,children:(0,N.jsx)(W,{currentTrackUri:m})}):null]})]})}},27913:(e,t,n)=>{"use strict";n.d(t,{C:()=>m});var i=n(9102),a=n(50346),s=n(27509),r=n(99765),o=n(30616),l=n(84120);var d=n(51918);function c(e,t,n){const{startTimeMs:i,words:a}=e,s=n[t+1];return{start:i||0,end:s&&s.startTimeMs?s.startTimeMs:1/0,text:a}}function u(e){const t=function(e){return{r:e>>16&255,g:e>>8&255,b:255&e}}(e);return l.Il.fromRGB(t).toCSS(l.jT.RGB)}const m=(e,t)=>{const n=(0,s.o)(t||void 0,{desiredLabel:"large",desiredSize:600})??t?.[0]?.url??"",l=(0,r.A)(),m=["lyrics",{uri:e,image:n,vocalRemoval:l}],{data:p,isLoading:g,isError:h}=(0,i.useQuery)(m,(async()=>e&&n&&(0,a.wj)(e)?await async function(e,t,n){try{const s=await(0,d.S)(e,t,n);return{hasLyrics:!0,isTimeSynced:(a=s.lyrics.syncType,"LINE_SYNCED"===a||"SYLLABLE_SYNCED"===a),syncType:s.lyrics.syncType,lyrics:s.lyrics.lines.map(c),colors:(i=s.colors,{text:u(i.text),activeText:u(i.highlightText),background:u(i.background)}),provider:s.lyrics.provider,providerDisplayName:s.lyrics.providerDisplayName,providerLyricsId:s.lyrics.providerLyricsId,hasVocalRemoval:s.hasVocalRemoval??!1}}catch(e){if(e instanceof o.m&&404===e.status)return{hasLyrics:!1};throw e}var i,a}(e,n,l):{hasLyrics:!1}),{cacheTime:18e5,staleTime:6e5});return{data:p??null,loading:g,error:h}}},99765:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(36844),a=n(41836),s=n(56217);const r=()=>{const e=(0,s.$)(),{isSupported:t}=e.getCapabilities();return(0,i.W6)(a.cp,{loadingValue:!1})&&t}},51918:(e,t,n)=>{"use strict";n.d(t,{S:()=>r,y:()=>o});var i=n(50346),a=n(25899),s=n(27555);const r=async(e,t,n)=>{const r=(0,i.EC)(e).id,o=a.b.getInstance();return(await o.build().withHost(s.f).withPath(`/track/${encodeURIComponent(r)}/image/${encodeURIComponent(t)}`).withQueryParameters({format:"json",vocalRemoval:n}).withEndpointIdentifier("/track/{trackId}").send()).body},o=async e=>{const t=(0,i.QS)((0,i.EC)(e)?.id);if(!t)return!1;const n=a.b.getInstance(),r=await n.build().withHost(s.Z9).withPath(`/track/${encodeURIComponent(t)}`).withEndpointIdentifier("/track/{trackId}").send();return r.body?.has_lyrics||!1}},88541:(e,t,n)=>{"use strict";n.d(t,{s:()=>h});var i=n(91318),a=n(3802),s=n(5488),r=n(98340),o=n(96170),l=n(59496),d=n(56952),c=n(24952),u=n(96768),m=n(4637);const p=({merchId:e,spec:t,uri:n,url:i,images:a,description:s,merchName:r="",testId:p,index:g,merchVariant:h})=>{const k=(0,o.$P)(),v=(0,l.useMemo)((()=>t.merchCardFactory({identifier:e,uri:n,position:g})),[e,n,t,g]),f=()=>{window.open(i,"_blank");const e=v.hitNavigateToExternalUri({destination:i});k.logInteraction(e)},y=(0,o.Wi)(v);return(0,m.jsx)("div",{ref:y,children:(0,m.jsx)(c.C,{delegateNavigation:!0,index:g,onClick:f,headerText:r,featureIdentifier:"playlist",requestId:h,uri:n,isPlayable:!1,renderCardImage:()=>(0,m.jsx)(u.x,{images:a}),renderSubHeaderContent:()=>(0,m.jsx)(m.Fragment,{children:s?(0,m.jsx)(d.N,{source:s,onLinkClick:f}):r&&(0,m.jsxs)("span",{children:["Description: ",r]})}),testId:p})})};var g=n(63071);const h=({id:e,merchItems:t,merchVariant:n,uri:l})=>{const{spec:d}=(0,o.fU)(i.createDesktopMerchShelfEventFactory,{data:{identifier:e,uri:l,position:0,reason:n}});return(0,m.jsx)(r.JL,{value:"shelf/offers","":"merch-shelf",children:(0,m.jsx)(s.P,{total:t.length,title:a.ag.get("web-player.merch.title"),className:g.Z.artistShelfSpacer,seeAllLabel:a.ag.get("web-player.merch.seeAllUri"),children:t.map(((e,t)=>e.url&&e.name?(0,m.jsx)(r.JL,{value:"card",index:t,children:(0,m.jsx)(p,{index:t,url:e.url,uri:e.uri,merchName:e.name,description:e.description||"",images:e.image?.sources||[],merchVariant:n,merchId:e.uri,spec:d},e.url)},e.url):null))})})}},2106:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var i=n(51849),a=n(4637);function s({children:e,pageId:t,navigationalRoot:n,entityUri:s}){return(0,a.jsx)(i.e,{navigationalRoot:n,pageId:t,entityUri:s,children:e})}},50042:(e,t,n)=>{"use strict";n.r(t),n.d(t,{InstrumentedRedirect:()=>l});var i=n(89605),a=n(92999),s=n(96170),r=n(5822);var o=n(4637);const l=({to:e,state:t})=>{const n=(0,i.UO)(),l=function(){const e=(0,i.TH)(),t=(0,s.$P)(),n=e.state?.interactionId;return n??t.getInteractionId((0,r.S)(e.pathname))}();return"string"==typeof e?(0,o.jsx)(i.Fg,{to:(0,a.Gn)(e,n),state:{...t,interactionId:l},replace:!0}):(0,o.jsx)(i.Fg,{to:{...e,pathname:(0,a.Gn)(e.pathname,n)},state:{...t,interactionId:l},replace:!0})}},50499:(e,t,n)=>{"use strict";n.d(t,{T:()=>h});var i=n(59496),a=n(84875),s=n.n(a),r=n(4183),o=n(42006);const l="cover-art",d="cover-art-auto-height",c="cover-art-icon",u="cover-art-image";var m=n(4637);const p=(0,i.memo)((function({imgSrc:e,className:t,onClick:n,type:i,width:a,height:p,loading:g="lazy"}){const h=s()(l,t,{[d]:!p});return(0,m.jsxs)("div",{className:h,style:{width:a||"auto",height:p||"auto"},onClick:n,"aria-hidden":"true",children:[(0,m.jsx)("div",{className:c,children:(0,m.jsx)(r.t,{type:i})}),(0,m.jsx)(o.E,{testid:"cover-art-image",loading:g,src:e,className:u})]})}));var g=n(27509);const h=({item:e,size:t,maxSize:n=t,desiredLabel:i="",className:a})=>{const s=(0,g.o)(e?.images??void 0,{desiredSize:n,desiredLabel:i});return(0,m.jsx)("div",{className:a,children:(0,m.jsx)(p,{loading:"eager",imgSrc:s,width:t,height:t,type:e?.type})})}},75360:(e,t,n)=>{"use strict";n.d(t,{_:()=>G});var i=n(84875),a=n.n(i),s=n(67187),r=n(3802);const o="main-trackInfo-container",l="main-trackInfo-name",d="main-trackInfo-artists",c="main-trackInfo-enhanced";var u=n(4637);const m=({item:e})=>(0,u.jsx)("div",{className:c,children:"enhanced_recommendation"===e?.metadata?.provider&&(0,u.jsx)(s._,{semanticColor:"textPositive",title:r.ag.get("web-player.enhance.button_text_enhanced"),iconSize:16,width:14,height:14,"":"enhance-badge"})});var p=n(59496),g=n(56162),h=n(20386),k=n(94174),v=n(22508),f=n(29251),y=n(50346),S=n(99553),b=n(63120),_=n(6142),N=n(59200);const E=({item:e,onClick:t})=>{const{book:n}=e,i=(0,y.EC)(n.uri)?.toURLPath(!0),a=(0,_.O)([n.uri],e.book.name);return i?(0,u.jsx)(N._P,{menu:(0,u.jsx)(S.X,{uri:n.uri}),children:(0,u.jsx)(b.default,{to:i,draggable:!0,onDragStart:a,"":"context-item-info-book",dir:"auto",onClick:t,children:n.name})}):(0,u.jsx)("span",{dir:"auto",children:n.name})};var x=n(762);const C=({item:e,onClick:t})=>{const{show:n}=e,i=(0,y.EC)(n.uri)?.toURLPath(!0),a=(0,_.O)([n.uri],n.name);return i?(0,u.jsx)(N._P,{menu:(0,u.jsx)(x.M,{uri:n.uri}),children:(0,u.jsx)("span",{draggable:!0,onDragStart:a,children:(0,u.jsx)(b.default,{to:i,"":"context-item-info-show",dir:"auto",onClick:t,children:n.name})})}):(0,u.jsx)("span",{dir:"auto",children:n.name})};var w=n(14280);const I=({item:e,onClick:t})=>{const n=(0,_.O)();return(0,u.jsx)(u.Fragment,{children:e.artists.map(((e,i)=>{const a=(0,y.EC)(e.uri)?.toURLPath(!0);return(0,u.jsxs)("span",{children:[i>0?r.ag.getSeparator():null,a?(0,u.jsx)(N._P,{menu:(0,u.jsx)(w.m,{uri:e.uri}),children:(0,u.jsx)(b.default,{to:a,"":"context-item-info-artist",dir:"auto",draggable:!0,onDragStart:t=>{n(t,[e.uri],e.name)},onClick:t,children:e.name})}):(0,u.jsx)("span",{dir:"auto",children:e.name})]},i)}))})},T=({item:e,onClick:t})=>{const n=(0,_.O)();return(0,u.jsx)(u.Fragment,{children:e.artists.map(((e,i)=>{const a=(0,y.EC)(e.uri)?.toURLPath(!0);return(0,u.jsxs)("span",{children:[i>0?r.ag.getSeparator():null,a?(0,u.jsx)(N._P,{menu:(0,u.jsx)(w.m,{uri:e.uri}),children:(0,u.jsx)(b.default,{to:a,"":"context-item-info-artist",dir:"auto",draggable:!0,onClick:t,onDragStart:t=>{n(t,[e.uri],e.name)},children:e.name})}):(0,u.jsx)("span",{dir:"auto",children:e.name})]},i)}))})},A=(0,p.lazy)((()=>n.e(9221).then(n.bind(n,39221)))),P=({item:e,isNowPlayingView:t=!1,onClick:n,typeVariant:i="finale"})=>{let a=null;const s=(0,h.Q)(e),r=(0,v.k6)(e)?s?.title:e.name;if((0,v.G_)(e))a=(0,u.jsx)(I,{item:e,onClick:n});else if((0,v.iw)(e))a=(0,u.jsx)(C,{item:e,onClick:n});else if((0,v.G7)(e))a=(0,u.jsx)(E,{item:e,onClick:n});else if((0,v.k6)(e)){if(t)return null;a=(0,u.jsx)(p.Suspense,{fallback:!0,children:(0,u.jsx)(A,{item:e,onClick:n})})}else(0,v.RB)(e)?a=(0,u.jsx)(T,{item:e,onClick:n}):(0,f.U)(e);return(0,u.jsx)("div",{className:d,children:(0,u.jsx)(k.R,{title:r,children:(0,u.jsx)(g.D,{"":"context-item-info-subtitles",as:"div",variant:i,className:d,semanticColor:"textSubdued",children:a})},e.uri)})};var O=n(61740),D=n(2831);const R=({item:e,onClick:t,isNowPlayingView:n=!1})=>{const i=(0,O.I0)(),{title:a,url:s}=(0,h.Q)(e),r="advertiser_title_"+(n?"npv":"npb");return null!==s?(0,u.jsx)("a",{"":"context-item-info-ad-title",onClick:e=>(t?.(e,s),i((0,D.nX)(r))),href:s,rel:"noopener noreferrer",target:"_blank",children:a}):(0,u.jsx)(u.Fragment,{children:a})};var L=n(25532);const F=({item:e,children:t,onClick:n})=>{const i=function(e){return(0,v.G_)(e)?(0,y.EC)(e.album.uri)?.toURLPath(!0)??"#":(0,v.iw)(e)||(0,v.G7)(e)?(0,y.EC)(e.uri)?.toURLPath(!0)??"#":((0,v.k6)(e)||(0,v.RB)(e)||(0,f._)(e),"#")}(e);return(0,v.G_)(e)||(0,v.iw)(e)||(0,v.G7)(e)?(0,u.jsx)(b.default,{"":"context-item-link",style:{border:"none"},to:i,onClick:n,children:t}):(0,v.k6)(e)||(0,v.RB)(e)?(0,u.jsx)(u.Fragment,{children:t}):(0,f.U)(e)},j=({item:e,context:t,onClick:n})=>(0,u.jsx)(N._P,{menu:(0,u.jsx)(L.$,{context:t,item:e}),children:(0,u.jsx)(F,{item:e,onClick:n,children:e.name})});var M=n(95307);const U=({item:e,context:t,onClick:n})=>{const i=(0,_.O)([e.uri],(0,M.R)(e));return(0,u.jsx)(N._P,{menu:(0,u.jsx)(L.$,{context:t,item:e}),children:(0,u.jsx)("span",{draggable:!0,onDragStart:i,children:(0,u.jsx)(F,{item:e,onClick:n,children:e.name})})})},B=({item:e,context:t,onClick:n})=>{const i=(0,_.O)();return(0,u.jsx)(N._P,{menu:(0,u.jsx)(L.$,{context:t,item:e}),children:(0,u.jsx)("span",{draggable:!0,onDragStart:t=>{i(t,[e.uri],(0,M.R)(e))},children:(0,u.jsx)(F,{item:e,onClick:n,children:e.name})})})},V=({item:e,context:t,onClick:n})=>{const i=(0,_.O)();return(0,u.jsx)(N._P,{menu:(0,u.jsx)(L.$,{context:t,item:e}),children:(0,u.jsx)("span",{draggable:!0,onDragStart:t=>{i(t,[e.uri],(0,M.R)(e))},children:(0,u.jsx)(F,{item:e,onClick:n,children:e.name})})})},H=({context:e,item:t,onClick:n,typeVariant:i="mesto",isNowPlayingView:a=!1})=>{let s=null;const r=(0,h.Q)(t),o=(0,v.k6)(t)?r?.title:t.name;return(0,v.G_)(t)&&t.isLocal?s=(0,u.jsx)(u.Fragment,{children:t.name}):(0,v.iw)(t)?s=(0,u.jsx)(U,{onClick:n,item:t,context:e}):(0,v.G_)(t)?s=(0,u.jsx)(B,{onClick:n,item:t,context:e}):(0,v.G7)(t)?s=(0,u.jsx)(j,{onClick:n,item:t,context:e}):(0,v.k6)(t)?s=(0,u.jsx)(R,{onClick:n,item:t,isNowPlayingView:a}):(0,v.RB)(t)?s=(0,u.jsx)(V,{onClick:n,item:t,context:e}):(0,f.U)(t),(0,u.jsx)("div",{className:l,children:(0,u.jsx)(k.R,{title:o,children:(0,u.jsx)(g.D,{"":"context-item-info-title",as:"div",variant:i,className:l,dir:"auto",children:s})},t.uri)})},G=({context:e,item:t,isNowPlayingView:n=!1,className:i,titleTypeVariant:s,subtitleTypeVariant:r,onTitleClick:l,onSubtitleClick:d})=>(0,u.jsxs)("div",{className:a()(i,o),children:[(0,u.jsx)(H,{context:e,item:t,onClick:(e,t)=>l?.(t),typeVariant:s,isNowPlayingView:n}),(0,u.jsx)(m,{item:t}),(0,u.jsx)(P,{item:t,onClick:(e,t)=>d?.(t),typeVariant:r,isNowPlayingView:n})]})},25532:(e,t,n)=>{"use strict";n.d(t,{$:()=>d});var i=n(44355),a=n(73769),s=n(84229),r=n(27652),o=n(22508),l=n(4637);const d=({context:e,item:t})=>(0,o.G_)(t)?(0,l.jsx)(s.$,{uid:t.uid??"",uri:t.uri,albumUri:t.album.uri,artists:t.artists,contextUri:e.uri??""}):(0,o.iw)(t)?(0,l.jsx)(a.k,{uri:t.uri,uid:t.uid??"",contextUri:e.uri??""}):(0,o.G7)(t)?(0,l.jsx)(i.r,{uri:t.uri,uid:t.uid??"",contextUri:e.uri??""}):(0,r.At)(t)?null:(0,o.RB)(t)?(0,l.jsx)(s.$,{uri:t.uri,uid:t.uid??"",contextUri:e.uri??""}):null},50338:(e,t,n)=>{"use strict";n.d(t,{R:()=>g});var i=n(59496),a=n(50346),s=n(65852),r=n(63120),o=n(13791),l=n(22508),d=n(29251),c=n(66787),u=n(4637);const m=(0,i.lazy)((()=>n.e(1132).then(n.bind(n,81132))));function p(e,t,n){let i=(0,s.p)(e.uri);const r=(0,a.wj)(i),d=i===o.b,c="queue"===t.provider;(r||c||d)&&((0,l.G_)(t)?i=t.album.uri:((0,l.iw)(t)||(0,l.G7)(t))&&(i=t.uri),d&&(i="spotify:collection:local-files"));const u=(0,a.EC)(i);if(null===u)return null;if((0,l.G_)(t)||(0,l.iw)(t)||(0,l.G7)(t)){return{to:u.toURLPath(!0),search:(m={uid:t.uid,uri:t.uri,page:n?.pageIndex??null,pageUri:n?.pageURI??null,index:n?.itemIndex??null,highlight:r?t.uri:null},Object.keys(m).filter((e=>null!==m[e])).map((e=>`${e}=${encodeURIComponent(m[e])}`)).join("&"))}}var m;return{to:u.toURLPath(!0)}}const g=({context:e,index:t,item:n,isVisible:a,children:s,className:o,referrer:g,onClick:h,adEventReason:k})=>{const v=(0,c.b)(n),f=n.type,y=a?void 0:-1;if((0,l.G_)(n)||(0,l.iw)(n)||(0,l.G7)(n)){const i=p(e,n,t);return i?(0,u.jsx)(r.default,{className:o,referrer:g,"":"context-link","data-context-item-type":f,style:{border:"none"},to:i.to,search:i.search,"aria-label":v,tabIndex:y,onClick:h,children:s}):(0,u.jsx)(u.Fragment,{children:s})}return(0,l.k6)(n)?(0,u.jsx)(i.Suspense,{fallback:(0,u.jsx)(u.Fragment,{children:s}),children:(0,u.jsx)(m,{item:n,"aria-label":v,tabIndex:y,adEventReason:k,children:s})}):(0,l.RB)(n)?(0,u.jsx)(u.Fragment,{children:s}):(0,d.U)(n)}},99548:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var i=n(59496),a=n(61740),s=n(50346),r=n(92403),o=n(65321),l=n(6142),d=n(95663),c=n(4637);const u=({uri:e,owner:t,children:n})=>{const u=(0,a.I0)(),m=(0,d.o)(),p=(0,a.v9)((e=>e.session.user?.id)),g=(0,s.nK)(e),h=(0,i.useCallback)(((t,n)=>{const i=[...n[l.a[s.JM.ALBUM]]||[],...n[l.a[s.JM.TRACK]]||[],...n[l.a[s.JM.LOCAL_TRACK]]||[],...n[l.a[s.JM.EPISODE]]||[]];i.length>0&&(u((0,r.jV)(e,i)),m({targetUri:e,intent:"add",type:"drop"}))}),[u,m,e]);return g&&t===p?(0,c.jsx)(o.Z,{types:[l.a[s.JM.ALBUM],l.a[s.JM.TRACK],l.a[s.JM.EPISODE],l.a[s.JM.LOCAL]],onDrop:h,testId:"cover-drop-target",children:n}):(0,c.jsx)(c.Fragment,{children:n})}},95307:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var i=n(3802),a=n(22508),s=n(29251);function r(e){if((0,a.G_)(e)||(0,a.RB)(e)){let t=e.name;const n=e.artists.map((e=>e.name)).join(i.ag.getSeparator());return n&&(t=`${t} • ${n} `),t}return(0,a.iw)(e)?`${e.name} • ${e.show.name}`:(0,a.G7)(e)||(0,a.k6)(e)?(console.error(e.uri,"is not draggable"),""):(0,s.U)(e)}},66787:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var i=n(3802),a=n(22508),s=n(29251);function r(e){return(0,a.G_)(e)?i.ag.get("playback-control.now-playing-label",e.name,e.artists.map((({name:e})=>e)).join(i.ag.getSeparator())):(0,a.iw)(e)?i.ag.get("playback-control.now-playing-label",e.name,e.show.name):(0,a.G7)(e)?i.ag.get("playback-control.now-playing-label",e.name,e.book.name):(0,a.k6)(e)?i.ag.get("ad-formats.advertisement"):(0,a.RB)(e)?i.ag.get("queue.now-playing"):(0,s.U)(e)}},9182:(e,t,n)=>{"use strict";n.d(t,{Q:()=>a});var i=n(22508);function a(e){return(0,i.G_)(e)||(0,i.iw)(e)}},46611:(e,t,n)=>{"use strict";n.d(t,{o:()=>m});var i=n(59496),a=n(61740),s=n(36844),r=n(85483),o=n(34553),l=n(41836),d=n(16674),c=n(9407),u=n(28246);function m(){let e;const t=(0,a.I0)(),n=(0,a.v9)(d.Y),m=(0,i.useCallback)((e=>{t((0,r.EW)(e))}),[t]),[p,g]=(0,c.z)(o.cr,u.NowPlayingCoverStateEnum.collapsed);let h=!1;return(0,s.W6)(l.JI,{loadingValue:!1})?e=u.NowPlayingCoverStateEnum.none:(e=n!==u.NowPlayingCoverStateEnum.none?n:p,h=p===u.NowPlayingCoverStateEnum.expanded||n===u.NowPlayingCoverStateEnum.expanded),{isExpanded:h,expandedState:e,setLocalStorageExpandedState:g,setTransientForcedExpandedState:m}}},43276:(e,t,n)=>{"use strict";n.d(t,{x:()=>r});var i=n(99948),a=n(87527);function s(e,t){return null===e||null===t?e===t:e.context.uri===t.context.uri&&e.item?.uri===t.item?.uri&&(0,a.V)(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 r(){const e=(0,i.Y)((e=>e),s);if(null===e)return null;const{context:t,item:n,index:a}=e;return null===n?null:{context:t,item:n,index:a}}},24090:(e,t,n)=>{"use strict";n.d(t,{_:()=>i._});var i=n(75360)},17617:(e,t,n)=>{"use strict";n.d(t,{o:()=>i.o});var i=n(46611)},84847:(e,t,n)=>{"use strict";n.d(t,{x:()=>i.x});var i=n(43276)},69947:(e,t,n)=>{"use strict";n.d(t,{$:()=>u,M:()=>c});var i=n(59496),a=n(84875),s=n.n(a),r=n(56162);const o="main-nowPlayingView-section",l="main-nowPlayingView-sectionHeader";var d=n(4637);const c=({children:e,className:t})=>(0,d.jsx)(r.D,{as:"div",variant:"balladBold",semanticColor:"textBase",className:s()(l,t),children:e}),u=(0,i.forwardRef)((({children:e,className:t,style:n},i)=>(0,d.jsx)("div",{ref:i,className:s()(o,t),style:n,children:e})))},40660:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,F:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)({online:!0}),r=({children:e,initialStatus:t=!0})=>{const[n,r]=(0,i.useState)(t);(0,i.useEffect)((()=>{const e=()=>{r(!0)},t=()=>{r(!1)},n=()=>{document.hidden||r(navigator.onLine)};return window.addEventListener("online",e),window.addEventListener("offline",t),window.addEventListener("visibilitychange",n),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t),window.removeEventListener("visibilitychange",n)}}),[]);const o=(0,i.useMemo)((()=>({online:n})),[n]);return(0,a.jsx)(s.Provider,{value:o,children:e})}},92737:(e,t,n)=>{"use strict";n.d(t,{Jv:()=>r,Ol:()=>a,S$:()=>i,ux:()=>s});const i=280,a=420,s="panel-width",r="--panel-width"},9801:(e,t,n)=>{"use strict";n.d(t,{Q:()=>a,W:()=>s});var i=n(59496);const a=(0,i.createContext)(void 0);function s(){const e=(0,i.useContext)(a);if(!e)throw new Error("usePanelAPI() must be used within a PanelContext.Provider");return e}},24066:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var i=n(59496),a=n(9801),s=n(20455);const r=()=>{const e=(0,a.W)(),[t,n]=(0,i.useState)((()=>e.getLastCachedPanelState()??s.s.Disabled));return(0,i.useEffect)((()=>e.subscribeToPanelState(n)),[e]),t}},74604:(e,t,n)=>{"use strict";n.d(t,{r:()=>u});var i=n(36844),a=n(35923),s=n(85735),r=n(34553),o=n(93614),l=n(9407),d=n(41836),c=n(92737);function u(){const[e,t]=(0,l.z)(c.ux,Math.max(c.S$,Math.min(Math.round(.23*innerWidth),c.Ol))),n=(0,i.W6)(d._c,{loadingValue:!1}),u=(0,s.Y)(),{minWidth:m}=(0,a.L)(),p=(0,o.T)();let g=c.Ol;if(n){const e=p-m-r.IW-4*u;g=Math.min(Math.max(0,e),g)}return{size:e,setSize:t,min:c.S$,max:g}}},57816:(e,t,n)=>{"use strict";n.d(t,{T:()=>c});var i=n(59496),a=n(61740),s=n(9801),r=n(24066),o=n(67443),l=n(96901),d=n(20455);const c=e=>{const t=(0,a.I0)(),n=(0,r.m)(),c=(0,s.W)(),u=n===e,m=(0,i.useCallback)((()=>{c.setPanelState(u?d.s.Disabled:e),e===d.s.NowPlayingView&&u&&t((0,o.Bl)(l.B.mini))}),[u,e,c,t]);return{isActive:u,toggle:m}}},52143:(e,t,n)=>{"use strict";n.d(t,{l:()=>b});var i=n(59496),a=n(84875),s=n.n(a),r=n(92737),o=n(86046),l=n(3802),d=n(15342),c=n(84828),u=n(96490),m=n(74604),p=n(4637);const g=({elementRef:e,cssCustomProperty:t,itemUri:n})=>{const{spec:i,logger:a}=(0,d.f)(o.m,{data:{uri:n||""}}),{min:s,max:r,size:g,setSize:h}=(0,m.r)(),k=g;return(0,p.jsx)(u.A,{elementRef:e,placement:"inline-start",label:l.ag.get("resize.sidebar"),cssCustomProperty:t,onCSSPropertyChange:e=>{h(e),a.logInteraction(i.npvUiResizeFactory().dragUiResize({startSizePx:k,endSizePx:e}))},initialValue:k,min:s,max:r,decreaseSizeKeyboardCombination:c.lb.RIGHT_SIDEBAR_DECREASE_WIDTH,increaseSizeKeyboardCombination:c.lb.RIGHT_SIDEBAR_INCREASE_WIDTH})};var h=n(36844),k=n(24066),v=n(41836),f=n(35800),y=n(96382),S=n(3426);const b=Spicetify.ReactComponent.PanelSkeleton=({label:e,itemUri:t,className:n,style:a,children:o})=>{const l=(0,i.useRef)(null),{animatedStyles:d,animatedClassNames:c}=function(){const e=(0,h.W6)(v.C1),t=(0,k.m)(),{size:n}=(0,y.r)(),i=t===f.s.Disabled?{width:0,opacity:0}:{width:n,opacity:1};return e?{animatedStyles:i,animatedClassNames:S.Z.panelTransition}:{animatedStyles:i,animatedClassNames:""}}();return(0,p.jsxs)("aside",{"aria-label":e,className:s()(S.Z.container,n,c),style:Object.assign({},a,d),id:"Desktop_PanelContainer_Id",ref:l,children:[(0,p.jsx)(g,{itemUri:t,elementRef:l,cssCustomProperty:r.Jv}),o]})}},61940:(e,t,n)=>{"use strict";n.d(t,{K:()=>d});var i=n(59496),a=n(84875),s=n.n(a),r=n(76270),o=n(3426),l=n(4637);const d=Spicetify.ReactComponent.PanelContent=i.forwardRef((({children:e,className:t},n)=>(0,l.jsx)(r.U,{className:o.Z.scrollBarContainer,children:(0,l.jsx)("div",{ref:n,className:s()(o.Z.content,t),children:e})})))},724:(e,t,n)=>{"use strict";n.d(t,{Q:()=>i.Q,W:()=>i.W});var i=n(9801)},48631:(e,t,n)=>{"use strict";n.d(t,{V:()=>T});var i=n(59496),a=n(84875),s=n.n(a),r=n(33103),o=n(56162),l=n(22991),d=n(83680),c=n(66336),u=n(50346),m=n(3802),p=n(94174),g=n(57816),h=n(3289),k=n(64719),v=n(59200),f=n(96170),y=n(88513),S=n(14280),b=n(73769),_=n(73444),N=n(84229),E=n(6142),x=n(3426),C=n(4637);const w={[u.JM.PLAYLIST]:_.X,[u.JM.PLAYLIST_V2]:_.X,[u.JM.ALBUM]:y.Y,[u.JM.TRACK]:N.$,[u.JM.ARTIST]:S.m,[u.JM.EPISODE]:b.k},I=({link:e,title:t,variant:n,semanticColor:i})=>{const{spec:a,logger:s}=(0,f.fU)(c.createDesktopNpvHeaderSectionEventFactory,{}),l=(0,C.jsx)(p.R,{children:(0,C.jsx)(o.D,{variant:n,semanticColor:i,children:t||""})},t||""),d=(0,u.EC)(e);let m,g=!1,h=[];const k=d&&w[d.type];if(k){const e=d.toURI();m=(0,C.jsx)(k,{uri:e}),g=!(!e||!t),h=g?[e]:[]}const y=(0,E.O)(h,t??"");return(0,C.jsx)(v._P,{menu:m,children:(0,C.jsx)("div",{className:x.Z.titleContainer,children:e&&t?(0,C.jsx)(r.rU,{draggable:g,onDragStart:g?y:void 0,to:e,className:x.Z.link,onClick:()=>{s.logInteraction(a.contextLinkFactory().hitUiNavigate({destination:e||""}))},children:l}):l})})},T=Spicetify.ReactComponent.PanelHeader=({link:e,title:t,panel:n,isAdvert:a=!1,actions:r,onClose:o,className:c,preventDefaultClose:u=!1,onBack:p,titleVariant:v="balladBold",titleSemanticColor:f="textBase"})=>{const{toggle:y}=(0,g.T)(n),S=(0,i.useCallback)((()=>{o?.(),u||y()}),[o,u,y]);return(0,C.jsxs)("div",{className:s()(x.Z.header,c),children:[p&&(0,C.jsx)("span",{className:x.Z.actions,children:(0,C.jsx)(h._,{label:m.ag.get("desktop.login.Back"),children:(0,C.jsx)(k.E,{ariaLabel:m.ag.get("desktop.login.Back"),className:x.Z.closeButton,size:"sm",onClick:p,icon:l.e})})}),(0,C.jsx)(I,{title:t,link:e,variant:v,semanticColor:f}),(0,C.jsxs)("span",{className:s()(x.Z.actions,x.Z.closeContainer),children:[r,!a&&(0,C.jsx)("div",{"":"PanelHeader_CloseButton",children:(0,C.jsx)(h._,{label:m.ag.get("close"),children:(0,C.jsx)(k.E,{ariaLabel:m.ag.get("close"),className:x.Z.closeButton,size:"sm",onClick:S,icon:d.k})})})]})]})}},35800:(e,t,n)=>{"use strict";n.d(t,{s:()=>i.s});var i=n(20455)},69718:(e,t,n)=>{"use strict";n.d(t,{m:()=>i.m});var i=n(24066)},96382:(e,t,n)=>{"use strict";n.d(t,{r:()=>i.r});var i=n(74604)},93901:(e,t,n)=>{"use strict";n.d(t,{T:()=>i.T});var i=n(57816)},20455:(e,t,n)=>{"use strict";n.d(t,{s:()=>i});let i=function(e){return e[e.Disabled=0]="Disabled",Spicetify._reservedPanelIds=e,e[e.BuddyFeed=1]="BuddyFeed",e[e.NowPlayingView=2]="NowPlayingView",e[e.WhatsNewFeed=3]="WhatsNewFeed",e[e.Puffin=4]="Puffin",e}({})},55760:(e,t,n)=>{"use strict";n.d(t,{X2:()=>a,s4:()=>r,tc:()=>s});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e}function r(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e.getEventSender()}},78777:(e,t,n)=>{"use strict";n.d(t,{S7:()=>r,tS:()=>d,vM:()=>o});var i=n(59496),a=n(4637);const s={isOpen:!1,uri:null},r=(0,i.createContext)(void 0),o=(0,i.createContext)(s);function l(e,t){switch(t.type){case"open":return{...e,isOpen:!0,uri:t.uri};case"close":return{...s};default:throw new Error("Unknown action received!")}}const d=({children:e})=>{const[t,n]=(0,i.useReducer)(l,s);return(0,a.jsx)(r.Provider,{value:n,children:(0,a.jsx)(o.Provider,{value:t,children:e})})}},51016:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});var i=n(59496),a=n(23888),s=n(23600);const r=({uri:e,permissionLevel:t})=>{const n=(0,s.z)(),{onCopyLink:r}=(0,a.y)({uri:e,interactionData:{intent:"share",type:"click"}});return{onCopyLink:(0,i.useCallback)((async()=>{const i=await n.getPermissionGrant(e,t),a=new URLSearchParams;return i.token&&a.set("pt",i.token),r(a)}),[e,t,n,r])}}},26588:(e,t,n)=>{"use strict";n.d(t,{d:()=>r});var i=n(36844),a=n(19281),s=n(41836);const r=(e,t)=>({metadataOptions:{decorateFormatListData:!0,withSync:!0,hydrateCollaboratorsWithMembers:(0,i.W6)(s.bM)},contentsOptions:{offset:0,limit:25,sort:(0,a._j)(e),filter:t}})},19641:(e,t,n)=>{"use strict";n.d(t,{l:()=>i.l});var i=n(51016)},23202:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>V,getRadioLabel:()=>U});var i=n(59496),a=n(89605),s=n(56162),r=n(48247),o=n(50346),l=n(3802),d=n(4270),c=n(35394),u=n(78371),m=n(41226),p=n(16743),g=n(73997),h=n(23627),k=n(77312),v=n(16201),f=n(68591);var y=n(69812),S=n(54299),b=n(48607),_=n(22508),N=n(96170),E=n(84875),x=n.n(E),C=n(53417),w=n(98340),I=n(73972);const T="NBwG2a4Dmwo6g_YrRdpo",A="dTKw7B8X1ybw7SHebMH3",P="Ort1bswCfg95FTY9jLlv",O="KNUIWLKuuA1qIkTt4jus",D="I_J_2yQ25qssX6VlXXCk",R="dMLIMzZSh8rtGpbdj8Pa";var L=n(4637);const F=i.memo((function({ariaLabel:e,tracks:t,radioStationUri:n,highlightUri:a,scrollToIndex:r,usePlayContextItem:o,isContextActive:d}){const c=(0,i.useRef)(null),u=(0,i.useRef)(!1),m=t.length>0;(0,i.useEffect)((()=>{c.current&&r&&c.current.scrollToIndex(r)}),[r]);const p=(0,i.useCallback)(((e,t)=>{let i=I.KS.Unknown;const s=!u.current&&a===e.uri;return s&&(u.current=!0),e.isExplicit&&(i=I.KS.Explicit),e.is19PlusOnly&&(i=I.KS.NineteenPlus),(0,L.jsx)(C.iJ,{index:t,trackNumber:t+1,durationMs:e.duration.milliseconds,contextUri:n,uri:e.uri,uid:e.uid??e.uri,name:e.name,isPlayable:!0,artists:e.artists,album:e.album,contentRating:i,shouldHighLight:s,usePlayContextItem:o,isContextActive:d},t+e.uri)}),[a,n,o,d]),g=t.length>0?t:new Array(50).fill(void 0),h=l.ag.getLocale()===l.go.ar?C.rc:C.dN,k=Math.min(5,g.length)*h,v=-(k-h),f=(0,i.useMemo)((()=>[C.QD.INDEX,C.QD.TITLE,C.QD.ALBUM,C.QD.ACTIONS,C.QD.DURATION]),[]),y=(0,i.useCallback)((e=>e.uri),[]),S=(0,i.useCallback)((e=>e.uid??e.uri),[]);return(0,L.jsxs)(w.ZP,{value:"radio-station-tracklist",children:[(0,L.jsx)("div",{className:x()({[O]:m}),style:{"--footer-height":`${k}px`,"--footer-margin-top":`${v}px`},children:(0,L.jsx)(C.Pv,{ariaLabel:e,hasHeaderRow:!0,rowPlaceholder:C.Lb,columns:f,renderRow:p,resolveUri:y,resolveUid:S,nrTracks:g.length,tracks:g,outerRef:c},n)}),m&&(0,L.jsx)("div",{className:D,children:(0,L.jsx)(s.D,{variant:"ballad",as:"p",children:l.ag.get("playlist-radio.more-songs")})})]})}));var j=n(80964);function M(e){if(0===e.length)return"";const t=e.map((e=>e.name));return 1===t.length?l.ag.get("playlist-radio.header.oneFeaturedArtist",t[0]):2===t.length?l.ag.get("playlist-radio.header.twoFeaturedArtists",t[0],t[1]):3===t.length?l.ag.get("playlist-radio.header.threeFeaturedArtists",t[0],t[1],t[2]):l.ag.get("playlist-radio.header.moreThanThreeFeaturedArtists",t[0],t[1],t[2])}function U(e){const t=(0,o.EC)(e);switch(t?.type){case o.JM.PLAYLIST:case o.JM.PLAYLIST_V2:return l.ag.get("playlist-radio");case o.JM.TRACK:return l.ag.get("song-radio");case o.JM.ALBUM:return l.ag.get("album-radio");case o.JM.ARTIST:return l.ag.get("artist-radio");default:return l.ag.get("radio")}}const B=({station:e})=>{const{stationURI:t,entityURI:n,title:a,image:o,relatedArtists:h,context:f,tracks:E}=e,x=(0,v.Zj)(o.url),{spec:C,logger:w,UBIFragment:I}=(0,N.fU)(r.createDesktopRadioStationEventFactory,{data:{identifier:t,uri:n}}),O=i.useMemo((()=>C.headerFactory()),[C]),D=i.useMemo((()=>C.actionBarFactory()),[C]),B=i.useMemo((()=>O.topBarFactory().playButtonFactory()),[O]),V=i.useMemo((()=>D.playButtonFactory()),[D]),{togglePlay:H,usePlayContextItem:G,isPlaying:W,isActive:z}=(0,b.n)(f,{featureIdentifier:"radio"}),K=i.useCallback((e=>{const t=(0,j.aK)({isPlaying:W,isActive:z,spec:e,logger:w,uri:f.uri}),n={shuffle:!1,repeat:_.zq.REPEAT_NONE,loggingParams:t};H(n)}),[H,z,W,f.uri,w]),Y=e=>()=>K(e);return(0,L.jsxs)("section",{className:T,children:[(0,L.jsxs)(m.gF,{backgroundColor:x,children:[(0,L.jsxs)(p.W,{children:[(0,L.jsx)(k.$,{size:"md",onClick:Y(B),isPlaying:W,uri:f.uri}),(0,L.jsx)(g.i,{text:a,dragUri:t,dragLabel:a})]}),(0,L.jsx)(S._,{menu:null,children:(0,L.jsx)("div",{className:P,children:(0,L.jsx)(m.Oe,{loading:"eager",name:a,images:[o],placeholderType:"playlist",shape:m.Kc.WITH_WAVES,dragUri:t})})}),(0,L.jsxs)(m.sP,{children:[(0,L.jsx)(s.D,{variant:"mestoBold",children:U(n)}),(0,L.jsx)(S._,{menu:null,children:(0,L.jsx)(m.xd,{dragUri:t,dragLabel:a,children:a})}),(0,L.jsx)(s.D,{variant:"mesto",className:R,children:M(h)})]})]}),(0,L.jsxs)("div",{className:A,children:[(0,L.jsx)(d.o,{backgroundColor:x,children:(0,L.jsxs)(d.F,{children:[(0,L.jsx)(k.$,{onClick:Y(V),isPlaying:W,size:"lg",uri:f.uri}),(0,L.jsx)(y.y,{menu:(0,L.jsx)(u.i,{uri:t,tracks:E}),children:(0,L.jsx)(c.z,{label:l.ag.get("more.label.context",a)})})]})}),(0,L.jsx)("div",{className:"contentSpacing",children:(0,L.jsx)(I,{spec:C,children:(0,L.jsx)(F,{ariaLabel:a,radioStationUri:t,tracks:E,usePlayContextItem:G,isContextActive:z})})})]})]})},V=()=>{const{id:e="",entity:t=""}=(0,a.UO)(),n=function(e){const t=(0,f.t)(),[n,a]=(0,i.useState)(null);return(0,i.useEffect)((()=>{let n=!0,i=null;const s=e=>{n&&a(e)};return a(null),(async()=>{const[r,o]=await t.getStation(e,s);n?(a(r),i=o):null!==o&&o.cancel()})(),()=>{n=!1,null!==i&&i.cancel()}}),[t,e]),n}((0,o.AB)([t,e]).toURI());return null===n?(0,L.jsx)(h.h,{hasError:!1,errorMessage:l.ag.get("error.not_found.title.station")}):(0,L.jsx)(B,{station:n})}},49666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RECENTLY_PLAYED_VIEW_ID:()=>O,RecentlyPlayed:()=>R,default:()=>L});var i=n(84875),a=n.n(i),s=n(56162),r=n(36844),o=n(3802),l=n(28604),d=n(79823),c=n(79351),u=n(75523),m=n(36876),p=n(58089),g=n(16500),h=n(69527),k=n(40408),v=n(22981),f=n(62517),y=n(92348),S=n(33482),b=n(98340),_=n(59496),N=n(72971),E=n(15144);var x=n(26849),C=n(29251),w=n(82400),I=n(41836);const T="uFQUpbITgGovaKRr6I_g",A="AKksNlfz_QuQjE1FPwYG";var P=n(4637);const O="recently-played",D=(e,t)=>{const n=e.uri;switch(e.type){case N.hn.LIKED_SONGS:return(0,P.jsx)(k.p,{index:t},n);case N.hn.YOUR_EPISODES:return(0,P.jsx)(v.T,{index:t},n);case N.hn.ALBUM:return(0,P.jsx)(l.r,{index:t,name:e.name,uri:e.uri,images:e.images,artists:e.artists,sharingInfo:null},n);case N.hn.ARTIST:return(0,P.jsx)(d.I,{index:t,name:e.name,uri:e.uri,images:e.images},n);case N.hn.PLAYLIST:return(0,P.jsx)(u.Z,{index:t,name:e.name,uri:e.uri,images:e.images,description:e.description,authorName:e.owner.displayName},n);case N.hn.SHOW:return(0,P.jsx)(p._,{index:t,name:e.name,uri:e.uri,images:e.images,publisher:e.publisher,sharingInfo:null},n);case N.hn.AUDIOBOOK:return(0,P.jsx)(c.c,{index:t,name:e.name,uri:e.uri,images:e.images,authorName:e.authors?.[0]??""},n);case N.hn.RADIO:return(0,P.jsx)(m.I,{index:t,name:e.name,uri:e.uri,images:e.images},n);case N.hn.TRACK:return(0,P.jsx)(g.G,{index:t,name:e.name,uri:e.uri,images:e.images,is19PlusOnly:e.isMOGEFRestricted,artists:e.artists,album:null,isExplicit:e.isExplicit,sharingInfo:null},n);default:return(0,C._)(e),null}},R=({title:e,showAll:t=!1,index:n=0})=>{const i=e??o.ag.get("view.recently-played"),l=(0,r.W6)(I.ty,{loadingValue:!1}),d=l?w.N:h.q,c=(0,r.W6)(I.yg),u=(0,S.S)(c),m=function(e=!0){const t=(0,E.Y)(),[n,i]=(0,_.useState)(t.getContexts());return(0,_.useEffect)((()=>{if(!e)return;const n=({data:e})=>i(e);return t.addListener(N.$f.UPDATE,n),()=>{t.removeListener(N.$f.UPDATE,n)}}),[t,e]),n}(!l);return null===m?null:t?(0,P.jsx)(y.q,{config:u,children:(0,P.jsxs)("section",{className:a()("contentSpacing",T),children:[(0,P.jsx)(s.D,{as:"h1",variant:"canon",className:A,children:i}),(0,P.jsx)(b.ZP,{value:"EntitiesGrid",children:(0,P.jsx)(f.T,{render:()=>m.map(((e,t)=>(0,P.jsx)(b.ZP,{value:"card",index:t,children:D(e,t)},e?.uri)))})})]})}):(0,P.jsx)(y.q,{config:u,children:(0,P.jsx)(d,{id:"recently-played",index:n,total:m.length,seeAllUri:(0,x.p)(O),pageId:"home",title:i,children:m.map(((e,t)=>D(e,t)))})})},L=R},21789:(e,t,n)=>{"use strict";n.d(t,{J:()=>s,u:()=>o});var i=n(59496),a=n(9407);const s="fusionSearchHistory",r=50,o=()=>{const[e,t]=(0,a.z)(s,[]),n=(0,i.useCallback)((e=>{t(function(e){const t={},n=[];for(let i=0;i{let i=[];n&&(i=e.filter((e=>e.uri!==n))),t(i)}}}},40075:(e,t,n)=>{"use strict";n.d(t,{q:()=>l});var i=n(56162),a=n(3802),s=n(49795),r=n(41836),o=n(4637);const l=()=>(0,o.jsx)(s.F,{property:r.mQ,renderNewExperience:()=>(0,o.jsxs)(o.Fragment,{children:[" • ",(0,o.jsx)(i.D,{variant:"mesto",semanticColor:"textBase",dir:"auto",as:"span",children:a.ag.get("search.lyrics-match")})]})})},18566:(e,t,n)=>{"use strict";n.d(t,{Z:()=>H});var i=n(36844),a=n(3802),s=n(54059),r=n(42495),o=n(59496),l=n(84875),d=n.n(l),c=n(38345);function u(){const e=(0,s.f)(),[t,n]=(0,o.useState)(!1),i=(0,o.useCallback)((t=>{e.setEnabledState(t)}),[e]);return(0,o.useEffect)((()=>e.subscribeToEnabledState(n)),[e]),[t,i]}function m(){const e=(0,s.f)(),[t,n]=(0,o.useState)(e.getPreset()),i=(0,o.useCallback)((t=>{e.setPreset(t)}),[e]);return(0,o.useEffect)((()=>e.subscribeToPresetChange((e=>{n(e)})))),[t,i]}var p=n(85830);function g(e){return`${e>0?`+${e}`:e}dB`}const h={wrapper:"x-settings-equalizerPanelWrapper",preset:"x-settings-equalizerPanelPreset",filters:"x-settings-equalizerPanelFilters",filter:"x-settings-equalizerPanelFilter",input:"x-settings-equalizerPanelInput",label:"x-settings-equalizerPanelLabel",gainLabel:"x-settings-equalizerPanelGainLabel",gainLabelUp:"x-settings-equalizerPanelGainLabelUp",gainLabelDown:"x-settings-equalizerPanelGainLabelDown",canvas:"x-settings-equalizerPanelCanvas"};var k=n(4637);function v({filter:e,onChange:t}){const n=(0,s.f)(),i=(0,o.useRef)(null),[r]=m();(0,o.useEffect)((()=>{const t=r.filters.find((t=>t.key===e.key));i.current&&t&&(i.current.value=`${t.gain}`)}),[r,e.key]),(0,o.useEffect)((()=>{i.current&&i.current.setAttribute("aria-valuetext",a.ag.get("equalizer.filterA11yValueText",e.gain))}),[]);const l=(0,p.y1)(((e,t)=>{n.setFilterGain(e,t)}),100,{maxWait:200});return(0,k.jsxs)("div",{className:h.filter,children:[(0,k.jsx)("input",{"aria-label":a.ag.get("equalizer.filterLabel",e.frequency),ref:i,type:"range",min:-c.l5,max:c.l5,step:.1,defaultValue:e.gain,className:h.input,onChange:n=>{const i=parseFloat(n.target.value);n.target.setAttribute("aria-valuetext",a.ag.get("equalizer.filterA11yValueText",i)),l(e.key,i),t(i)}}),(0,k.jsx)("label",{className:h.label,children:(d=e.frequency,d>=1e3?d/1e3+"KHz":`${d}Hz`)})]});var d}const f=()=>{const[e,t]=(0,o.useState)(window.devicePixelRatio||1);return(0,o.useEffect)((()=>{const e=()=>{matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener("change",(()=>{t(window.devicePixelRatio),e()}),{once:!0})};e()}),[]),e};var y=n(22345);function S(e,t){e.moveTo(t[0],t[1]);for(let n=2;n(e.push(t.x),e.push(t.y),e)),[]);i.unshift(e[0].y),i.unshift(e[0].x),i.push(e[e.length-1].x),i.push(e[e.length-1].y);for(let e=2;e{e.beginPath(),e.arc(t.x,t.y,4,0,2*Math.PI),e.fill()}))}(n,t))}const E=60,x=300;function C(e,t){const n=t.clientWidth/e.length;return e.map(((e,i)=>({x:i*n+n/2,y:t.clientHeight-(e+c.l5+3)/(2*c.l5+6)*t.clientHeight})))}function w(e){const t=(0,o.useRef)(null),n=f(),i=(0,o.useCallback)((()=>{if(!t.current)return;const e=n,i=t.current.getBoundingClientRect();t.current.width=i.width*e,t.current.height=i.height*e,t.current.getContext("2d")?.scale(e,e)}),[n]),a=(0,o.useCallback)((()=>{if(!t.current||!e.current)return;const n=C(e.current,t.current);N(t.current,n)}),[e]),s=(0,o.useCallback)((n=>{if(!t.current||!e.current)return;const i=C(e.current,t.current),a=C(n,t.current);!function(e,t,n){const i=E*(x/1e3);let a=0;const s=JSON.parse(JSON.stringify(t)),r=n.map(((e,n)=>e.y-t[n].y)),o=()=>{if(!(a>=i)){for(let e=0;e{i(),a()}),[i,a]),(0,y.y)({refOrElement:t,onResize:()=>{i(),a()}}),{canvasRef:t,drawCanvas:a,animateCanvas:s}}function I(){const[e,t]=u(),[n,i]=m(),s=(0,o.useRef)(n.filters.map((e=>e.gain))),{canvasRef:r,drawCanvas:l,animateCanvas:p}=w(s);return(0,o.useEffect)((()=>{const e=n.filters.map((e=>e.gain));"custom"!==n.key&&p(e),s.current=e}),[n,p]),(0,k.jsxs)("div",{className:h.wrapper,children:[(0,k.jsx)("canvas",{"aria-label":a.ag.get("equalizer.equalizer"),role:"img",className:h.canvas,ref:r}),(0,k.jsx)("label",{className:d()(h.gainLabel,h.gainLabelUp),children:g(c.l5)}),(0,k.jsx)("label",{className:d()(h.gainLabel,h.gainLabelDown),children:g(-c.l5)}),(0,k.jsx)("div",{className:h.filters,dir:"ltr",children:n.filters.map(((n,a)=>(0,k.jsx)(v,{filter:n,onChange:n=>{s.current[a]=n,l(),e||t(!0),i((0,c.f8)(s.current))}},n.key)))})]})}var T=n(56162),A=n(70786);const P={container:"x-settings-equalizerPresetsContainer",label:"x-settings-equalizerPresetsLabel"};function O(){const[e,t]=u(),[n,i]=m();return(0,k.jsxs)("div",{className:P.container,children:[(0,k.jsx)(T.D,{as:"label",variant:"viola",semanticColor:"textSubdued",htmlFor:"desktop.equalizer.preset",className:P.label,children:a.ag.get("equalizer.presets")}),(0,k.jsxs)(A.v,{id:"desktop.equalizer.preset",value:n.key,onSelect:n=>{i(n),e||t(!0)},children:["custom"===n.key&&(0,k.jsx)("option",{value:n.key,children:n.displayName}),Object.entries(c.PG).map((([e,t])=>(0,k.jsx)("option",{value:e,children:t.displayName},e)))]})]})}var D=n(63082);function R(){const[e,t]=u(),[,n]=m();return(0,k.jsx)(D.P,{onClick:()=>{n(c.PG.flat.key),e||t(!0)},buttonSize:"sm",children:a.ag.get("equalizer.reset")})}var L=n(90762),F=n(4965),j=n(48954),M=n(5181),U=n(90585);function B(){const[e,t]=u();return(0,k.jsxs)(j.Z,{filterMatchQuery:a.ag.get("equalizer.equalizer"),children:[(0,k.jsx)(U.M,{children:(0,k.jsx)(F.D,{htmlFor:"settings.equalizer",children:a.ag.get("equalizer.equalizer")})}),(0,k.jsx)(M.m,{children:(0,k.jsx)(L.Z,{id:"settings.equalizer",value:e,onSelected:t})})]})}const V={equalizerSection:"x-settings-equalizerSection",equalizerWrapper:"x-settings-equalizerWrapper",equalizerResetButtonWrapper:"x-settings-equalizerResetButtonWrapper"};function H(){const e=(0,s.f)();return(0,i.W6)(r.Ro,{loadingValue:!1})&&e.isSupported()?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(B,{}),(0,k.jsx)(j.Z,{filterMatchQuery:a.ag.get("equalizer.equalizer"),children:(0,k.jsxs)("div",{className:V.equalizerSection,children:[(0,k.jsx)(O,{}),(0,k.jsx)("div",{className:V.equalizerWrapper,children:(0,k.jsx)(I,{})}),(0,k.jsx)("div",{className:V.equalizerResetButtonWrapper,children:(0,k.jsx)(R,{})})]})})]}):null}},43988:(e,t,n)=>{"use strict";n.d(t,{v:()=>u});var i=n(3802),a=n(90762),s=n(51150),r=n(4965),o=n(48954),l=n(5181),d=n(90585),c=n(4637);const u=()=>{const{libraryRowMode:e,setLibraryRowMode:t}=(0,s.g)();return(0,c.jsxs)(o.Z,{filterMatchQuery:"Enable compact library view",children:[(0,c.jsx)(d.M,{children:(0,c.jsx)(r.D,{htmlFor:"settings.library.compact-mode",children:i.ag.get("settings.library.compactMode")})}),(0,c.jsx)(l.m,{children:(0,c.jsx)(a.Z,{id:"settings.library.compact-mode",value:e===s.Z.COMPACT,onSelected:e=>{t(e?s.Z.COMPACT:s.Z.DEFAULT)}})})]})}},14725:(e,t,n)=>{"use strict";n.d(t,{H:()=>o});var i=n(3802),a=n(59602),s=n(43713),r=n(4637);const o=({children:e})=>(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(a.Q,{filterMatchQuery:"Library",children:[(0,r.jsx)(s.q,{children:i.ag.get("settings.library")}),e]})})},38800:(e,t,n)=>{"use strict";n.d(t,{$:()=>u});var i=n(3802),a=n(90762),s=n(4965),r=n(48954),o=n(5181),l=n(90585),d=n(98928),c=n(4637);const u=()=>{const[e,t]=(0,d.R)();return(0,c.jsxs)(r.Z,{filterMatchQuery:i.ag.get("settings.npv"),children:[(0,c.jsx)(l.M,{children:(0,c.jsx)(s.D,{htmlFor:"settings.npv",children:i.ag.get("settings.npv")})}),(0,c.jsx)(o.m,{children:(0,c.jsx)(a.Z,{id:"settings.npv",value:e,onSelected:t})})]})}},98928:(e,t,n)=>{"use strict";n.d(t,{B:()=>s,R:()=>a});var i=n(9407);const a=()=>(0,i.z)("toggleNowPlayingView",!0),s=()=>{const[e]=a();return e}},60315:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var i=n(3802),a=n(90762),s=n(59496),r=n(9102),o=n(61740),l=n(25899),d=n(42205),c=n(6664),u=n(17652),m=n(70175),p=n(82108);var g=n(4965),h=n(48954),k=n(5181),v=n(90585),f=n(4637);const y=()=>{const[e,t]=(()=>{const e=(0,r.useQueryClient)(),{user:t}=(0,o.v9)(p.Gg),n=t?.uri??"",a=(0,m.k)(),{data:g,queryKey:h}=(0,u.J)(d.getShowFollows,[{uri:n}]),k=(0,s.useCallback)((async({showFollows:e})=>{await(0,d.setShowFollows)(l.b.getInstance(),{uri:n,showFollows:e})}),[n]),v=(0,r.useMutation)({mutationFn:k,onMutate:async t=>{await e.cancelQueries({queryKey:h});const n=e.getQueryData(h);return e.setQueryData(h,t),{prevState:n,newState:t}},onError:(t,n,s)=>{e.setQueryData(h,s?.prevState),a(i.ag.get("error.generic"),c.nY.ERROR)},onSettled:()=>{e.invalidateQueries({queryKey:h})}});return[g?.showFollows??!0,v.mutate]})();return(0,f.jsxs)(h.Z,{filterMatchQuery:i.ag.get("desktop.settings.showFollows"),children:[(0,f.jsx)(v.M,{children:(0,f.jsx)(g.D,{htmlFor:"desktop.settings.showFollows",children:i.ag.get("desktop.settings.showFollows")})}),(0,f.jsx)(k.m,{children:(0,f.jsx)(a.Z,{id:"desktop.settings.showFollows",value:e,onSelected:e=>t({showFollows:e})})})]})}},66832:(e,t,n)=>{"use strict";n.d(t,{c:()=>o,k:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)(void 0),r=({children:e})=>{const[t,n]=(0,i.useState)(!1),[r,o]=(0,i.useState)(new Set),l=(0,i.useCallback)(((e,t)=>{o((n=>{if(n.has(e)===t)return n;const i=new Set(n);return t?i.add(e):i.delete(e),i}))}),[]),d=r.size>0;return(0,a.jsx)(s.Provider,{value:{sectionMatch:t,setSectionMatch:n,sectionContainsMatch:d,setSectionFilterMatchQueryValue:l},children:e})},o=()=>{const e=(0,i.useContext)(s);if(void 0===e)throw new Error("useSectionMatchState() must be used within a SectionFilterMatchContextProvider");return e}},51269:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});var i=n(66806);const a="x-settings-container";var s=n(4637);const r=({children:e,outerRef:t})=>(0,s.jsx)(i.hz,{uri:"spotify:internal:settings",children:(0,s.jsx)("div",{ref:t,className:a,"":"settings-page",children:e})})},84721:(e,t,n)=>{"use strict";n.d(t,{b:()=>d});var i=n(56162),a=n(58706),s=n(3802),r=n(24256);const o={header:"x-settings-headerContainer",heading:"x-settings-header"};var l=n(4637);function d({containerRef:e}){return(0,l.jsxs)("div",{className:o.header,children:[(0,l.jsx)(i.D,{as:"h1",variant:"canon",className:o.heading,semanticColor:"textBase",paddingBottom:a.o78,children:s.ag.get("desktop.settings.settings")}),(0,l.jsx)("div",{children:(0,l.jsx)(r.K,{placeholder:"",alwaysExpanded:!1,clearOnEscapeInElementRef:e,debounceFilterChangeTimeout:0})})]})}},4965:(e,t,n)=>{"use strict";n.d(t,{D:()=>l});var i=n(59496),a=n(56162),s=n(7813),r=n(66806),o=n(4637);function l({htmlString:e,children:t,htmlFor:n,semanticColor:l="textSubdued",className:d,...c}){const{filter:u}=(0,i.useContext)(r.fo);if(!t&&!e)return null;let m=t;return e&&(m=(0,o.jsx)("span",{dangerouslySetInnerHTML:{__html:e}})),(0,o.jsx)(a.D,{as:"label",variant:"viola",semanticColor:l,htmlFor:n,className:d,"":c["data-testid"],children:u.length>0?(0,o.jsx)(s.o,{searchWords:[u],textToHighlight:t||e||""}):m})}},48954:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var i=n(59496),a=n(66832),s=n(66806),r=n(20737);const o="x-settings-row";var l=n(4637);const d=({children:e,filterMatchQuery:t})=>{const{filter:n}=(0,i.useContext)(s.fo),{setSectionFilterMatchQueryValue:d,sectionMatch:c}=(0,a.c)(),u=(0,r.M)(n,t);return(0,i.useEffect)((()=>{d(t,u)}),[u,t,d]),c||u?(0,l.jsx)("div",{className:o,children:e}):null}},5181:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});const i="x-settings-secondColumn";var a=n(4637);const s=({children:e})=>(0,a.jsx)("div",{className:i,children:e})},90585:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});const i="x-settings-firstColumn";var a=n(4637);const s=({children:e})=>(0,a.jsx)("div",{className:i,children:e})},59602:(e,t,n)=>{"use strict";n.d(t,{Q:()=>c});var i=n(59496),a=n(66832),s=n(66806),r=n(20737);const o={section:"x-settings-section"};var l=n(4637);function d({children:e,filterMatchQuery:t}){const{filter:n}=(0,i.useContext)(s.fo),{setSectionMatch:d,sectionContainsMatch:c}=(0,a.c)(),u=(0,r.M)(n,t);return(0,i.useEffect)((()=>{d(u)}),[u,d]),u||c?(0,l.jsx)("div",{className:o.section,children:e}):null}function c(e){return(0,l.jsx)(a.k,{children:(0,l.jsx)(d,{...e})})}},43713:(e,t,n)=>{"use strict";n.d(t,{q:()=>l});var i=n(59496),a=n(56162),s=n(7813),r=n(66806),o=n(4637);function l({children:e}){const{filter:t}=(0,i.useContext)(r.fo);return(0,o.jsx)(a.D,{as:"h2",variant:"cello",semanticColor:"textBase",children:(0,o.jsx)(s.o,{searchWords:[t],textToHighlight:e})})}},50057:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DesktopSettings:()=>Ge,default:()=>We,getIsEmployeeDesktopSettings:()=>He});var i=n(59496),a=n(36844),s=n(94972),r=n(18085),o=n(3802),l=n(90762),d=n(4965),c=n(48954),u=n(5181),m=n(90585),p=n(59602),g=n(43713),h=n(4637);const k=({settings:{values:e},setValue:t})=>navigator&&/^win/i.test(navigator.platform)?(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("desktop.settings.compatibility"),children:[(0,h.jsx)(g.q,{children:o.ag.get("desktop.settings.compatibility")}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.enableHardwareAcceleration"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.enableHardwareAcceleration",children:o.ag.get("desktop.settings.enableHardwareAcceleration")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.enableHardwareAcceleration",value:!!e["ui.hardware_acceleration"],onSelected:e=>{t("ui.hardware_acceleration",e)}})})]})]}):null;var v=n(56162),f=n(66167),y=n(41836),S=n(18566);const b="x-settings-crossFadeContainer",_=12e3,N=({settings:{values:e},setValue:t})=>{const n=(0,a.W6)(y.q7),[s,r]=(0,i.useState)(-1),k=-1===s?Number(e["audio.crossfade.time_v2"]):s,N=`${Math.round(k/1e3)} ${o.ag.get("desktop.settings.sec")}`;return(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("desktop.settings.playback"),children:[(0,h.jsx)(g.q,{children:o.ag.get("desktop.settings.playback")}),void 0!==e["audio.crossfade_v2"]&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.crossfadeTracks"),children:[(0,h.jsxs)(m.M,{children:[(0,h.jsx)(d.D,{htmlFor:"desktop.settings.crossfadeTracks",children:o.ag.get("desktop.settings.crossfadeTracks")}),e["audio.crossfade_v2"]&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:b,children:(0,h.jsx)(f.ko,{value:k,max:_,step:1e3,labelText:o.ag.get("desktop.settings.crossfadeTracks"),onStepBackward:()=>{r(Math.max(0,k-1e3))},onStepForward:()=>{r(Math.min(_,k+1e3))},onDragStart:e=>{r(e*_)},onDragMove:e=>{r(e*_)},onDragEnd:e=>{const n=Math.floor(e*_);r(n),t("audio.crossfade.time_v2",n)}})}),(0,h.jsx)(v.D,{variant:"mesto",semanticColor:"textSubdued",children:N})]})]}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.crossfadeTracks",value:!!e["audio.crossfade_v2"],onSelected:e=>{t("audio.crossfade_v2",e)}})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.automixInfo"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.automixInfo",children:o.ag.get("desktop.settings.automixInfo")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.automixInfo",value:!!e["audio.automix"],onSelected:e=>{t("audio.automix",e)}})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.monoDownmixer"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.monoDownmixer",children:o.ag.get("desktop.settings.monoDownmixer")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.monoDownmixer",value:!!e["audio.downmixer_v2"],onSelected:e=>{t("audio.downmixer_v2",e)}})})]}),n&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.silenceTrimmer"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.silenceTrimmer",children:o.ag.get("desktop.settings.silenceTrimmer")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.silenceTrimmer",value:!!e["audio.silence_trimmer_v2"],onSelected:e=>{t("audio.silence_trimmer_v2",e)}})})]}),(0,h.jsx)(S.Z,{})]})};var E=n(70786);const x={minimized:{label:()=>o.ag.get("desktop.settings.autostartMinimized")},normal:{label:()=>o.ag.get("desktop.settings.autostartNormal")},off:{label:()=>o.ag.get("desktop.settings.autostartOff")}},C=({settings:{values:e,autoStart:t},setValue:n})=>(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("desktop.settings.startupAndWindowBehavior"),children:[(0,h.jsx)(g.q,{children:o.ag.get("desktop.settings.startupAndWindowBehavior")}),void 0!==e["app.autostart-mode"]&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.autostart"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.autostart",children:o.ag.get("desktop.settings.autostart")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(E.v,{id:"desktop.settings.autostart",value:e["app.autostart-mode"],onSelect:e=>{n("app.autostart-mode",e)},children:t.map((({enumKey:e,enumValue:t})=>(0,h.jsx)("option",{value:t,children:x[e]?x[e].label():""},e)))})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.closeShouldMinimize"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.closeShouldMinimize",children:o.ag.get("desktop.settings.closeShouldMinimize")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.closeShouldMinimize",value:!!e["ui.minimize_to_tray"],onSelected:e=>{n("ui.minimize_to_tray",e)}})})]})]});var w=n(84875),I=n.n(w);const T={"auto-detect":{label:()=>o.ag.get("desktop.settings.proxy.autodetect")},"no-proxy":{label:()=>o.ag.get("desktop.settings.proxy.noproxy")},http:{label:()=>o.ag.get("desktop.settings.proxy.http")},socks4:{label:()=>o.ag.get("desktop.settings.proxy.socks4")},socks5:{label:()=>o.ag.get("desktop.settings.proxy.socks5")}},A=[{enumKey:"auto-detect",enumValue:0},{enumKey:"no-proxy",enumValue:1},{enumKey:"http",enumValue:2},{enumKey:"socks4",enumValue:3},{enumKey:"socks5",enumValue:4}];var P=n(98880);const O="mpdBa62OP4Fr5wvCsa89",D="x-proxySettings-ProxySettings",R="x-proxySettings-fullWidth",L="x-settings-input",F="x-proxySettings-horizontalPair",j=({id:e,type:t,placeHolder:n,inputRef:i,handleOnChange:a})=>(0,h.jsx)("input",{type:t||"text",id:e,"":e,className:L,placeholder:n,ref:i,onChange:a}),M=({children:e,label:t})=>(0,h.jsx)(P.c,{label:t,className:F,children:e});var U=n(63082);const B={button:"x-settings-restartAppButton"};function V({onClick:e}){return(0,h.jsx)(U.P,{className:B.button,onClick:e,children:o.ag.get("settings.restartApp")})}const H=(e,t,n)=>{let i=`${e}:${t}`;switch(n){case 2:i+="@http";break;case 3:i+="@socks4";break;case 4:i+="@socks5"}return i},G=({addr:e,mode:t,pass:n,user:a,setValue:s,restartContainer:r,fullWidth:l})=>{const d=(0,i.useRef)(null),c=(0,i.useRef)(null),u=(0,i.useRef)(null),m=(0,i.useRef)(null),[k,v]=(0,i.useState)(""),[f,y]=(0,i.useState)(""),[S,b]=(0,i.useState)(!1);(0,i.useEffect)((()=>{const[t,n]=e?.split(/[:@]+/)||["",""];v(t),y(n),d.current&&(d.current.value=t),c.current&&(c.current.value=n)}),[e]),(0,i.useEffect)((()=>{m.current&&n&&(m.current.value=n.toString())}),[n]),(0,i.useEffect)((()=>{u.current&&a&&(u.current.value=a.toString())}),[a]);const _=(0,i.useCallback)((({target:e})=>{const n=H(e.value,f,t||0);v(e.value),s("network.proxy.addr",n),b(!0)}),[t,f,s]),N=(0,i.useCallback)((({target:e})=>{const n=H(k,e.value,t||0);y(e.value),s("network.proxy.addr",n),b(!0)}),[t,k,s]),x=(0,i.useCallback)((({target:e})=>{s("network.proxy.user",e.value),b(!0)}),[s]),C=(0,i.useCallback)((({target:e})=>{s("network.proxy.pass",e.value),b(!0)}),[s]),w=0!==t&&1!==t,P=3!==t;return(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("desktop.settings.proxy.title"),children:[(0,h.jsx)(g.q,{children:o.ag.get("desktop.settings.proxy.title")}),(0,h.jsxs)("div",{className:I()(D,l?R:null),children:[(0,h.jsx)(M,{label:o.ag.get("desktop.settings.proxy.type"),children:(0,h.jsx)(E.v,{id:"network.proxy.mode",value:t,onSelect:e=>{const t=parseInt(e,10);s("network.proxy.mode",t),b(!0)},children:A.map((({enumKey:e,enumValue:t})=>(0,h.jsx)("option",{value:t,"":e,children:T[e]?T[e].label():""},e)))})}),w?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:O,children:[(0,h.jsx)(M,{label:o.ag.get("desktop.settings.proxy.host"),children:(0,h.jsx)(j,{id:"network.proxy.host",handleOnChange:_,placeHolder:o.ag.get("desktop.settings.proxy.host"),inputRef:d})}),(0,h.jsx)(M,{label:o.ag.get("desktop.settings.proxy.port"),children:(0,h.jsx)(j,{id:"network.proxy.port",type:"number",handleOnChange:N,placeHolder:o.ag.get("desktop.settings.proxy.port"),inputRef:c})})]}),(0,h.jsxs)("div",{className:P?O:void 0,children:[(0,h.jsx)(M,{label:o.ag.get("desktop.settings.proxy.user"),children:(0,h.jsx)(j,{id:"network.proxy.user",handleOnChange:x,placeHolder:o.ag.get("desktop.settings.proxy.user"),inputRef:u})}),P?(0,h.jsx)(M,{label:o.ag.get("desktop.settings.proxy.pass"),children:(0,h.jsx)(j,{id:"network.proxy.pass",handleOnChange:C,placeHolder:o.ag.get("desktop.settings.proxy.pass"),type:"password",inputRef:m})}):null]})]}):null,S&&(0,h.jsx)("div",{children:(0,h.jsx)(V,{onClick:r})})]})]})};var W=n(61740),z=n(85483),K=n(32812),Y=n(89039),q=n(49873);function Z(){const e=(0,q.c)(),[t,n]=(0,i.useState)(null),[a,s]=(0,i.useState)(!0),[r,o]=(0,i.useState)(null);return(0,i.useEffect)((()=>{const t=window.setInterval((()=>{!async function(){if(null===r){try{const t=await e.getStatistics();n(t)}catch(e){o(e instanceof Error?e:new Error("Error when fetching storage statistics."))}s(!1)}}()}),1500);return()=>clearInterval(t)}),[e,r]),[t,a,r]}const Q="x-settings-button",J="x-settings-wordBreakAll",$=({settings:e,setValue:t})=>{const n=(0,i.useContext)(Y.t),a=(0,i.useContext)(r.z),s=!(0,K.k)(),[l,k]=(0,i.useState)(!1),v=(0,i.useCallback)((()=>{a.applyUpdate()}),[a]),[f,y,S]=Z(),b=(0,W.I0)();let _="",N="",E=0;y?(_=o.ag.get("page.loading"),N=o.ag.get("page.loading")):S||null===f?(_=o.ag.get("error.generic"),N=o.ag.get("error.generic")):(E=f.currentSizeMB-f.currentLockedSizeMB,_=` ${E} MB`,N=` ${f.currentLockedSizeMB} MB`);const x=e.values["storage.location"];return(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("desktop.settings.storage"),children:[(0,h.jsx)(g.q,{children:o.ag.get("desktop.settings.storage")}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.storage.downloads.heading"),children:[(0,h.jsx)(m.M,{children:(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{children:[(0,h.jsx)(d.D,{htmlFor:"desktop.settings.downloads",semanticColor:"textBase",children:o.ag.get("desktop.settings.storage.downloads.heading")}),(0,h.jsx)(d.D,{htmlFor:"desktop.settings.downloads",children:N})]}),(0,h.jsx)(d.D,{htmlFor:"desktop.settings.downloads",children:o.ag.get("desktop.settings.storage.downloads.text")})]})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(U.P,{id:"desktop.settings.downloads",buttonSize:"sm",onClick:()=>{b((0,z.Sl)())},disabled:s||!f||0===f.currentLockedSizeMB,className:Q,children:o.ag.get("desktop.settings.storage.downloads.button")})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.storage.cache.heading"),children:[(0,h.jsx)(m.M,{children:(0,h.jsxs)("div",{children:[(0,h.jsxs)("div",{children:[(0,h.jsx)(d.D,{htmlFor:"desktop.settings.cache",semanticColor:"textBase",children:o.ag.get("desktop.settings.storage.cache.heading")}),(0,h.jsx)(d.D,{htmlFor:"desktop.settings.cache",children:_})]}),(0,h.jsx)(d.D,{htmlFor:"desktop.settings.cache",children:o.ag.get("desktop.settings.storage.cache.text")})]})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(U.P,{id:"desktop.settings.cache",buttonSize:"sm",onClick:()=>{b((0,z.ct)())},disabled:0===E,className:Q,children:o.ag.get("desktop.settings.storage.cache.button")})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.offlineStorageLocation"),children:[(0,h.jsx)(m.M,{children:(0,h.jsxs)("div",{children:[(0,h.jsx)("div",{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.offline-storage",semanticColor:"textBase",children:o.ag.get("desktop.settings.offlineStorageLocation")})}),(0,h.jsx)(d.D,{htmlFor:"desktop.settings.offline-storage",className:J,children:x})]})}),(0,h.jsxs)(u.m,{children:[(0,h.jsx)(U.P,{id:"desktop.settings.offline-storage",buttonSize:"sm",onClick:async()=>{const i=await n.browseForFolder();i.path&&(t("storage.location",i.path),i.path!==e.values["storage.location"]&&k(!0))},className:Q,children:o.ag.get("desktop.settings.offlineStorageChangeLocation")}),l&&(0,h.jsx)(V,{onClick:v})]})]})]})},X=({settings:e,setValue:t})=>{const n=(0,i.useContext)(r.z),a=(0,i.useCallback)((()=>{n.applyUpdate()}),[n]),{values:s}=e;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(N,{settings:e,setValue:t}),(0,h.jsx)(C,{settings:e,setValue:t}),(0,h.jsx)($,{settings:e,setValue:t}),(0,h.jsx)(G,{setValue:t,restartContainer:a,mode:s["network.proxy.mode"],addr:s["network.proxy.addr"],user:s["network.proxy.user"],pass:s["network.proxy.pass"]}),(0,h.jsx)(k,{settings:e,setValue:t})]})};var ee=n(95663);const te=({settings:{values:e},setValue:t})=>{const n=(0,a.W6)(y.Cd,{loadingValue:!1}),i=(0,ee.o)();if(void 0===e["app.player.autoplay"])return null;const s="0"!==e.autoplay;return(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("desktop.settings.autoplay"),children:[(0,h.jsx)(g.q,{children:o.ag.get("desktop.settings.autoplay")}),!n&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.localAutoplayInfo"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.localAutoplayInfo",children:o.ag.get("desktop.settings.localAutoplayInfo")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.localAutoplayInfo",value:!!e["app.player.autoplay"],onSelected:e=>{t("app.player.autoplay",e)}})})]}),!n&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.globalAutoplayInfo"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.localAutoplayInfo",children:o.ag.get("desktop.settings.globalAutoplayInfo")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.localAutoplayInfo",value:s,onSelected:e=>{i({intent:e?"enable_autoplay":"disable_autoplay",type:"click"}),t("autoplay",e?"1":"0")}})})]}),n&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.autoplayInfo"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"global.settings.autoplayInfo",children:o.ag.get("desktop.settings.autoplayInfo")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"global.settings.autoplayInfo",value:s,onSelected:e=>{i({intent:e?"enable_autoplay":"disable_autoplay",type:"click"}),t("autoplay",e?"1":"0")}})})]})]})};var ne=n(35800),ie=n(93901),ae=n(21085);var se=n(38800);const re=({settings:{values:e},setValue:t})=>{const n=void 0===e.catalogue||"free"===e.catalogue.toLowerCase(),s=(0,i.useContext)(ae.N),r=s?.client_capabilities?.can_show_system_media_controls,k=s?.client_capabilities?.can_show_track_notifications,v=(0,a.W6)(y.JI),{isActive:f,toggle:S}=(0,ie.T)(ne.s.BuddyFeed);return(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("settings.display"),children:[(0,h.jsx)(g.q,{children:o.ag.get("settings.display")}),v&&(0,h.jsx)(se.$,{}),!n&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("settings.showMusicAnnouncements"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"settings.showMusicAnnouncements",children:o.ag.get("settings.showMusicAnnouncements")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"settings.showMusicAnnouncements",value:!e["ui.hide_hpto"],onSelected:e=>{t("ui.hide_hpto",!e)}})})]}),k&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("settings.showTrackNotifications"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"settings.trackNotifications",children:o.ag.get("settings.showTrackNotifications")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"settings.trackNotifications",value:!!e["ui.track_notifications_enabled"],onSelected:e=>{t("ui.track_notifications_enabled",e)}})})]}),r&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.showSystemMediaControls"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"settings.systemMediaControlsEnabled",children:o.ag.get("desktop.settings.showSystemMediaControls")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"settings.systemMediaControlsEnabled",value:!!e["ui.system_media_controls_enabled"],onSelected:e=>{t("ui.system_media_controls_enabled",e)}})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("buddy-feed.see-what-your-friends-are-playing"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"settings.showFriendActivity",children:o.ag.get("buddy-feed.see-what-your-friends-are-playing")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"settings.showFriendActivity",value:f,onSelected:S})})]})]})};var oe=n(28471),le=n(82108),de=n(4050);const ce="m7e5wHq6US9u3BbLQXEX",ue="ul4DB6lq_3qO_aCiEbcc",me=()=>{const e=(0,W.I0)(),{locale:t,user:n,overrides:a}=(0,W.v9)(le.Gg),s=(0,i.useRef)(null),r=(0,i.useRef)(null),o=(0,i.useCallback)((t=>{s.current&&s.current.value&&e((0,de.k9)(t?s.current.value:""))}),[e]),l=(0,i.useCallback)((t=>{r.current&&r.current.value&&e((0,de.fY)(t?r.current.value:""))}),[e]),d=a?.country||n?.country,p=a?.locale||t;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(c.Z,{filterMatchQuery:d??"",children:[(0,h.jsx)(m.M,{children:(0,h.jsx)("div",{className:ce,children:(0,h.jsx)(oe.z,{id:"overrides.country",onChange:e=>{const t=e.target.checked;o(t)},defaultChecked:!!a?.country,children:(0,h.jsx)(v.D,{variant:"viola",semanticColor:"textSubdued",children:"Country"})})})}),(0,h.jsx)(u.m,{children:(0,h.jsx)("input",{type:"text",id:"overrides.country.input",className:ue,disabled:!a?.country,ref:s,defaultValue:d,onChange:()=>o(!0)})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:a?.locale??"",children:[(0,h.jsx)(m.M,{children:(0,h.jsx)("div",{className:ce,children:(0,h.jsx)(oe.z,{id:"overrides.locale",onChange:e=>{const t=e.target.checked;l(t)},defaultChecked:!!a?.locale,children:(0,h.jsx)(v.D,{variant:"viola",semanticColor:"textSubdued",children:"Language"})})})}),(0,h.jsx)(u.m,{children:(0,h.jsx)("input",{type:"text",id:"overrides.locale.input",className:ue,disabled:!a?.locale,ref:r,defaultValue:p,onChange:()=>l(!0)})})]})]})},pe=({settings:{values:e},setValue:t})=>He(e)?(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("settings.employee"),children:[(0,h.jsx)(g.q,{children:o.ag.get("settings.employee")}),(0,h.jsx)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.language-override"),children:(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"",children:o.ag.get("desktop.settings.language-override")})})}),(0,h.jsx)(me,{}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.enableDeveloperMode"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"settings.developerMode",children:o.ag.get("desktop.settings.enableDeveloperMode")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"settings.developerMode",value:!!e["app.enable-developer-mode"],onSelected:e=>{t("app.enable-developer-mode",e)}})})]})]}):null,ge=({settings:{values:e},setValue:t})=>{const n="1"===e["lock-filter-explicit-content"],i="0"===e["filter-explicit-content"]||void 0===e["filter-explicit-content"],a=n?o.ag.get("desktop.settings.explicitContentFilterSettingLocked"):o.ag.get("desktop.settings.explicitContentFilterSetting");return(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("desktop.settings.explicitContentFilter"),children:[(0,h.jsx)(g.q,{children:o.ag.get("desktop.settings.explicitContentFilter")}),(0,h.jsxs)(c.Z,{filterMatchQuery:a,children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.explicitContentFilter",children:a})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.explicitContentFilter",disabled:n,value:i,onSelected:e=>{t("filter-explicit-content",e?"0":"1")}})})]})]})};var he=n(19154);const ke=({settings:{values:e},setValue:t})=>{const n=e.language,a=(0,i.useContext)(r.z),s=(0,i.useCallback)((()=>{a.applyUpdate()}),[a]);return void 0===e.language?null:(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("desktop.settings.language"),children:[(0,h.jsx)(g.q,{children:o.ag.get("desktop.settings.language")}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.selectLanguage"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.selectLanguage",children:o.ag.get("desktop.settings.selectLanguage")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(E.v,{dir:"auto",value:e.language,id:"desktop.settings.selectLanguage",onSelect:e=>{t("language",e)},children:he.bC.map((e=>(0,h.jsx)("option",{value:e,children:`${he.k1[e].displayName} (${he.k1[e].displayNameEn})`},e)))})})]}),navigator.language!==n?(0,h.jsx)(V,{onClick:s}):null]})},ve=()=>{const[e,t]=(0,s.S)();return(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("settings.showLocalFiles"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"settings.showLocalFiles",children:o.ag.get("settings.showLocalFiles")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"settings.showLocalFiles",value:e,onSelected:e=>{t(e)}})})]})},fe=()=>(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("settings.localFiles"),children:[(0,h.jsx)(g.q,{children:o.ag.get("settings.localFiles")}),(0,h.jsx)(ve,{})]});var ye=n(12696),Se=n(13791);const be=e=>void 0!==e.id;function _e(e){let t;if(!be(e))return e.path;switch(e.id){case Se.G.DOWNLOADS:t=o.ag.get("local-files.source.downloads");break;case Se.G.ITUNES:t=o.ag.get("local-files.source.itunes");break;case Se.G.MY_MUSIC:t=o.ag.get("local-files.source.my_music");break;case Se.G.WINDOWS_MUSIC_LIBRARY:t=o.ag.get("local-files.source.windows_music_library");break;default:t=String(e.id)}return t}const Ne=({source:e,onAddOrRemoveSource:t})=>{const[n,a]=(0,i.useState)(!be(e)||e.enabled),s=be(e)?String(e.id):e.path;return(0,h.jsxs)(c.Z,{filterMatchQuery:_e(e),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:`settings.local-files.${s}`,children:_e(e)})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:`settings.local-files.${s}`,value:n,onSelected:n=>{a(n),t(e,n)}})})]})},Ee=()=>{const[e,t]=(0,i.useState)(),n=(0,i.useContext)(Y.t),a=(0,ye.r)(),s=(0,i.useCallback)((async()=>t(await n.getSources())),[n]);(0,i.useEffect)((()=>{s()}),[s]);const r=(0,i.useCallback)((async()=>{const{path:e}=await n.browseForFolder();e&&(await n.addFolder({path:e}),s(),a.say(o.ag.get("settings.localFilesFolderAdded",e)))}),[a,n,s]),l=(0,i.useCallback)(((e,t)=>{e.enabled=t,n.mutateDefaultSource(e)}),[n]),d=(0,i.useCallback)(((e,t)=>{t?n.addFolder(e):n.removeFolder(e)}),[n]);return(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("settings.showSongsFrom"),children:[(0,h.jsx)(g.q,{children:o.ag.get("settings.showSongsFrom")}),e?.defaultSources.map((e=>(0,h.jsx)(Ne,{source:e,onAddOrRemoveSource:l},String(e.id)))),e?.folders.map((e=>(0,h.jsx)(Ne,{source:e,onAddOrRemoveSource:d},e.path))),(0,h.jsx)("div",{children:(0,h.jsx)(U.P,{buttonSize:"sm","aria-label":o.ag.get("settings.addASource"),onClick:()=>{r()},children:o.ag.get("settings.addASource")})})]})};var xe=n(66953),Ce=n(67176),we=n(56570),Ie=n(35015);const Te=we.D.CONNECTION_STATE_CHANGE;var Ae=n(72556),Pe=n(60315);const Oe="xm2mOJwSu9_GfODYzx8M",De=100,Re=800,Le=600;const Fe=({settings:{values:e},setValue:t})=>{const[n,s,r]=function(){const e=(0,Ie.H)(),[t,n]=(0,i.useState)(null),a=(0,i.useCallback)((t=>{e.connect(t)}),[e]),s=(0,i.useCallback)((()=>{e.disconnect()}),[e]);return(0,i.useEffect)((()=>{const t=e=>{n(e.data)};return e.addListener(Te,t),()=>{e.removeListener(Te,t)}}),[e,n]),[t,a,s]}(),k=(0,a.W6)(y.AJ,{loadingValue:!1}),v=(0,i.useCallback)((()=>{n?.connection?r():s({window:{width:Math.max(Re,window.outerWidth-De),height:Math.max(Le,window.outerHeight-De)}})}),[n,s,r]);if(!(void 0!==e["publish-playlist"]&&void 0!==e["incognito-enabled"]))return null;const f=!!e["incognito-enabled"];return(0,h.jsxs)(p.Q,{filterMatchQuery:o.ag.get("desktop.settings.social"),children:[(0,h.jsx)(g.q,{children:o.ag.get("desktop.settings.social")}),n?.show_connect_option&&(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.facebook"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.facebook",children:o.ag.get("desktop.settings.facebook")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(U.P,{id:"desktop.settings.facebook",buttonSize:"sm",className:Oe,onClick:v,iconLeading:Ce.z,children:!0===n.connection?o.ag.get("desktop.settings.facebook.disconnect"):o.ag.get("desktop.settings.facebook.connect")})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.newPlaylistsPublic"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.newPlaylistsPublic",children:o.ag.get("desktop.settings.newPlaylistsPublic")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.newPlaylistsPublic",value:"1"===e["publish-playlist"],onSelected:e=>{t("publish-playlist",e?"1":"0")}})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.privateSession"),children:[(0,h.jsxs)(m.M,{children:[(0,h.jsx)(d.D,{htmlFor:"desktop.settings.privateSession",children:o.ag.get("desktop.settings.privateSession")}),(0,h.jsx)(Ae.e,{message:o.ag.get("desktop.settings.privateSession.tooltip")})]}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.privateSession",value:!!e["incognito-enabled"],onSelected:e=>{t("incognito-enabled",e)}})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.publishActivity"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.publishActivity",children:o.ag.get("desktop.settings.publishActivity")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.publishActivity",disabled:f,value:"0"!==e["publish-activity"],onSelected:e=>{t("publish-activity",e?"1":"0")}})})]}),(0,h.jsxs)(c.Z,{filterMatchQuery:o.ag.get("desktop.settings.publishTopArtists"),children:[(0,h.jsx)(m.M,{children:(0,h.jsx)(d.D,{htmlFor:"desktop.settings.publishTopArtists",children:o.ag.get("desktop.settings.publishTopArtists")})}),(0,h.jsx)(u.m,{children:(0,h.jsx)(l.Z,{id:"desktop.settings.publishTopArtists",disabled:f,value:"1"===e["public-toplist"],onSelected:e=>{t("public-toplist",e?"1":"0")}})})]}),k&&(0,h.jsx)(Pe.A,{})]})};var je=n(42261),Me=n(43988),Ue=n(14725),Be=n(51269),Ve=n(84721);function He(e){return"1"===e.employee}const Ge=()=>{const{settings:e,setValue:t}=(0,je.r)(),n=(0,i.useRef)(null),r=(0,a.W6)(y.yA,{loadingValue:!1}),[o]=(0,s.S)();return(0,h.jsxs)(Be.T,{outerRef:n,children:[(0,h.jsx)(Ve.b,{containerRef:n}),(0,h.jsx)(ke,{settings:e,setValue:t}),(0,h.jsx)(ge,{settings:e,setValue:t}),(0,h.jsx)(te,{settings:e,setValue:t}),(0,h.jsx)(xe.nJ,{settings:e,setValue:t}),r?(0,h.jsxs)(Ue.H,{children:[(0,h.jsx)(Me.v,{}),(0,h.jsx)(ve,{})]}):(0,h.jsx)(fe,{}),o?(0,h.jsx)(Ee,{}):null,(0,h.jsx)(re,{settings:e,setValue:t}),(0,h.jsx)(Fe,{settings:e,setValue:t}),(0,h.jsx)(X,{settings:e,setValue:t}),(0,h.jsx)(pe,{settings:e,setValue:t})]})},We=Ge},66953:(e,t,n)=>{"use strict";n.d(t,{nJ:()=>C,PF:()=>y,kN:()=>E,gj:()=>N});var i=n(59496),a=n(89605),s=n(3802),r=n(70786),o=n(72556),l=n(78419),d=n(90762),c=n(70175),u=n(4965),m=n(48954),p=n(5181),g=n(90585),h=n(59602),k=n(43713);const v="ExWXnW7FQJM6rPMDexR7";var f=n(4637);const y={automatic:{enum:0,label:()=>s.ag.get("desktop.settings.streamingQualityAutomatic")},low:{enum:1,label:()=>s.ag.get("desktop.settings.streamingQualityLow")},medium:{enum:2,label:()=>s.ag.get("desktop.settings.streamingQualityNormal")},high:{enum:3,label:()=>s.ag.get("desktop.settings.streamingQualityHigh")},veryhigh:{enum:4,label:()=>s.ag.get("desktop.settings.streamingQualityVeryHigh")},hifi:{enum:5,label:()=>s.ag.get("desktop.settings.streamingQualityHiFi")}},S=0,b=1,_=2;function N(e){switch(parseInt(e["audio-quality"],10)){default:case S:return!1;case b:case _:return!0}}function E(e,t){switch(parseInt(e,10)){default:case y.automatic.enum:case y.low.enum:case y.medium.enum:case y.high.enum:return!0;case y.veryhigh.enum:return N(t);case y.hifi.enum:return function(e){switch(parseInt(e["audio-quality"],10)){default:case S:case b:return!1;case _:return!0}}(t)}}const x={loud:{label:()=>s.ag.get("desktop.settings.loudnessLoud")},normal:{label:()=>s.ag.get("desktop.settings.loudnessNormal")},quiet:{label:()=>s.ag.get("desktop.settings.loudnessQuiet")}},C=({settings:{values:e,formats:t,loudness:n},setValue:S})=>{const b=!e["audio.normalize_v2"],_=e["audio.play_bitrate_enumeration"],N=e["audio.sync_bitrate_enumeration"],{search:C}=(0,a.TH)(),I=new URLSearchParams(C).has("feature-activation"),T=(0,c.k)(5e3),A=void 0!==e["audio.play_bitrate_enumeration"];return(0,i.useEffect)((()=>{I&&T(s.ag.get("web-player.feature-activation-shelf.audio_quality_toast_message"))}),[T,I]),A?(0,f.jsxs)(h.Q,{filterMatchQuery:s.ag.get("desktop.settings.musicQuality"),children:[(0,f.jsx)(k.q,{children:s.ag.get("desktop.settings.musicQuality")}),(0,f.jsxs)(m.Z,{filterMatchQuery:s.ag.get("desktop.settings.streamingQuality"),children:[(0,f.jsx)(g.M,{children:(0,f.jsx)(u.D,{htmlFor:"desktop.settings.streamingQuality",children:s.ag.get("desktop.settings.streamingQuality")})}),(0,f.jsxs)(p.m,{children:[(0,f.jsx)(r.v,{id:"desktop.settings.streamingQuality",value:E(_,e)?e["audio.play_bitrate_enumeration"]:y.high.enum,onSelect:t=>{let n=parseInt(t,10);E(t,e)||(n=y.high.enum),S("audio.play_bitrate_non_metered_enumeration",n),S("audio.play_bitrate_enumeration",n)},children:w(t,e)}),I?(0,f.jsx)(l.Z,{className:v}):null]})]}),(0,f.jsxs)(m.Z,{filterMatchQuery:s.ag.get("desktop.settings.automatic-downgrade.title"),children:[(0,f.jsxs)(g.M,{children:[(0,f.jsx)(u.D,{htmlFor:"desktop.settings.automatic-downgrade",children:s.ag.get("desktop.settings.automatic-downgrade.title")}),(0,f.jsx)(o.e,{message:s.ag.get("desktop.settings.automatic-downgrade.info")})]}),(0,f.jsx)(p.m,{children:(0,f.jsx)(d.Z,{id:"desktop.settings.automatic-downgrade",value:!!e["audio.allow_downgrade"],onSelected:e=>{S("audio.allow_downgrade",e)}})})]}),(0,f.jsxs)(m.Z,{filterMatchQuery:s.ag.get("desktop.settings.normalize"),children:[(0,f.jsx)(g.M,{children:(0,f.jsx)(u.D,{htmlFor:"desktop.settings.normalize",children:s.ag.get("desktop.settings.normalize")})}),(0,f.jsx)(p.m,{children:(0,f.jsx)(d.Z,{id:"desktop.settings.normalize",value:!!e["audio.normalize_v2"],onSelected:e=>{S("audio.normalize_v2",e)}})})]}),(0,f.jsxs)(m.Z,{filterMatchQuery:s.ag.get("desktop.settings.loudnessEnvironment_with_limiter_details"),children:[(0,f.jsx)(g.M,{children:(0,f.jsx)(u.D,{htmlFor:"desktop.settings.loudnessEnvironment",children:s.ag.get("desktop.settings.loudnessEnvironment_with_limiter_details")})}),(0,f.jsx)(p.m,{children:(0,f.jsx)(r.v,{id:"desktop.settings.loudnessEnvironment",disabled:b,value:e["audio.loudness.environment"],onSelect:e=>{S("audio.loudness.environment",parseInt(e,10))},children:n.map((({enumKey:e,enumValue:t})=>(0,f.jsx)("option",{value:t,children:x[e]?x[e].label():""},e)))})})]})]}):null};function w(e,t){const n=function(e){return"2"===e["audio-quality"]}(t);return e.filter((({enumKey:e})=>e in y)).filter((({enumKey:e})=>{switch(y[e].enum){default:case y.automatic.enum:return!n;case y.low.enum:case y.medium.enum:case y.high.enum:case y.veryhigh.enum:return!0;case y.hifi.enum:return n}})).map((({enumKey:e,enumValue:t})=>(0,f.jsx)("option",{value:t,children:y[e]?y[e].label():""},e)))}},42261:(e,t,n)=>{"use strict";n.d(t,{r:()=>g});var i=n(59496),a=n(31715),s=n(73229),r=n(87192),o=n(10427),l=n(74583);function d(){return new s.ProductStateClient((0,o.G)())}const c=[{enumKey:"quiet",enumValue:0},{enumKey:"normal",enumValue:1},{enumKey:"loud",enumValue:2}],u=[{enumKey:"minimized",enumValue:"minimized"},{enumKey:"normal",enumValue:"normal"},{enumKey:"off",enumValue:"off"}],m=["filter-explicit-content","publish-playlist","publish-activity","public-toplist","autoplay"],p=["incognito-enabled"],g=()=>{const e=(0,i.useRef)((0,a.makePrefs)((0,o.G)())),{isPrivateSession:t,setPrivateSession:n}=(0,r.M)(),[g,h]=(0,i.useState)({formats:[],values:{"incognito-enabled":t},autoStart:u,loudness:c}),k=e=>"string"==typeof e?{string:e}:"boolean"==typeof e?{bool:e}:{number:String(e)},v=e=>Object.fromEntries(Object.entries(e.entries).map((([e,{string:t,bool:n,number:i}])=>[e,t??n??i]))),f=(0,i.useCallback)((async(t,i)=>{m.includes(t)?await d().putValues(s.PutValuesRequest.fromPartial({pairs:{[t]:i}})):p.includes(t)?n(Boolean(i)):await e.current.set({entries:{[t]:k(i)}})}),[n]);return(0,i.useEffect)((()=>{h((e=>({...e,values:{...e.values,"incognito-enabled":t}})))}),[t]),(0,i.useEffect)((()=>{new l.No((0,o.G)()).getFormats({}).then((e=>{const t=[{enumKey:"automatic",enumValue:0,supported:!0},...e.formats.filter((e=>e.supported))].map((e=>({...e,enumKey:e.enumKey.toLocaleLowerCase()})));h((e=>({...e,formats:t})))}));const t=d().subValues(s.SubValuesRequest.fromPartial({}),(e=>{h((t=>({...t,values:{...t.values,...e.pairs}})))})),n=e.current.subAll({},(e=>{h((t=>({...t,values:{...t.values,...v(e)}})))}));return()=>{n.cancel(),t.cancel()}}),[]),{settings:g,setValue:f}}},75017:(e,t,n)=>{"use strict";n.d(t,{D:()=>i.getIsEmployeeDesktopSettings});var i=n(50057)},86971:(e,t,n)=>{"use strict";n.d(t,{r:()=>i.r});var i=n(42261)},95822:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var i=n(99948);const a=["spotify:playlist:37i9dQZF1DXc3KPAjGyPdm"];function s(){return(0,i.Y)((e=>{const t=e?.context.uri??"";return a.includes(t)}))}},57962:(e,t,n)=>{"use strict";n.d(t,{U:()=>i});let i=function(e){return e.HOME="home",e.COLLECTION="collection",e.CREATE_PLAYLIST="create-playlist",e.LIKED_SONGS="liked-songs",e.YOUR_EPISODES="your-episodes",e.SEARCH="search",e.SETTINGS="settings",e.PLAYLISTS_SIDEBAR="playlists-sidebar",e.NOW_PLAYING_BAR="now-playing-bar",e.BUDDY_FEED="buddy-feed",e.PROFILE="profile",e.DEEP_LINK="deep-link",e.MAKE_MUSIC="make-music",e.NOW_PLAYING_PANEL="now_playing_panel",e.WHATS_NEW_PANEL="whats_new_panel",e.UNKNOWN="unknown",e}({})},66942:(e,t,n)=>{"use strict";n.d(t,{E:()=>r,G:()=>s});var i=n(59496),a=n(4637);const s=(0,i.createContext)(void 0),r=({value:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t})},70804:(e,t,n)=>{"use strict";n.d(t,{j:()=>m,M:()=>p});var i=n(59496),a=n(47792),s=n(57962),r=n(29251);const o=(e,t)=>{if(e.state?.navigationalRoot)return e.state?.navigationalRoot;if(e.state?.referrer&&e.state?.referrer!==t?.state?.referrer)switch(e.state.referrer){case"buddy_feed":return s.U.BUDDY_FEED;case"now_playing_bar":return s.U.NOW_PLAYING_BAR;case"user_profile":return s.U.PROFILE;case"playlists_sidebar":return s.U.PLAYLISTS_SIDEBAR;case"deeplink":return s.U.DEEP_LINK;case"home":return s.U.HOME;case"search":return s.U.SEARCH;case"your_library":return s.U.COLLECTION;case"now_playing_panel":return s.U.NOW_PLAYING_PANEL;case"whats_new_panel":return s.U.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,r._)(e.state.referrer)}return t?.state?.navigationalRoot};class l{locationKeys=[];constructor(e,t){this.history=e,this.ubiLogger=t,this.unsubscribe=this.listen()}listen(){return this.onLocationChange(this.history.location),this.history.listen(this.onLocationChange)}onLocationChange=e=>{const t=this.location;if(e!==t){if(e.state={...e.state,navigationalRoot:o(e,t)},e.key){this.locationKeys.includes(e.key)||(this.locationKeys=[...this.locationKeys,e.key]);const n=this.locationKeys.indexOf(e.key),i=t?.key?this.locationKeys.indexOf(t.key):-1;this.direction=n>i?a.hw.FORWARD:a.hw.BACK}this.location=e}};getNavigationReason(e){const{location:t,action:n}=this.history;return this.pageView?"POP"===n?this.direction:t.state?.navigationReason:e===s.U.DEEP_LINK?a.hw.DEEP_LINK:a.hw.CLIENT_STARTED}reportPageView=e=>{const{location:t,action:n}=this.history;this.onLocationChange(t);if(e.pageId&&e.pageId===this.pageView?.pageId&&e.entityUri===this.pageView?.entityUri||t.pathname===this.pageView?.pathname)return;const i=e?.navigationalRoot??t.state?.navigationalRoot??s.U.DEEP_LINK,r="POP"!==n?t.state?.interactionId??this.ubiLogger.getInteractionId(e.entityUri):void 0;this.pageView={pageId:e.pageId,entityUri:e.entityUri,navigationalRoot:i,navigationReason:this.getNavigationReason(i),pathname:t.pathname,interactionId:r},t.state={...t.state,navigationalRoot:i};const o={navigationalRoot:this.pageView.navigationalRoot??s.U.UNKNOWN,pageId:this.pageView.pageId??"UNKNOWN",entityUri:this.pageView.entityUri??"UNKNOWN"};this.pageView.interactionId?this.ubiLogger.logNavigation({...o,interactionId:this.pageView.interactionId}):this.ubiLogger.logNavigation({...o,navigationReason:this.pageView.navigationReason??a.hw.UNKNOWN})}}var d=n(96170),c=n(47122),u=n(4637);const m=(0,i.createContext)(void 0),p=({children:e})=>{const t=(0,c.D)(),n=(0,d.$P)(),a=(0,i.useMemo)((()=>new l(t,n)),[t,n]);return(0,i.useEffect)((()=>()=>a.unsubscribe()),[a]),(0,u.jsx)(m.Provider,{value:a,children:e})}},90707:(e,t,n)=>{"use strict";n.d(t,{H:()=>o,b:()=>r});var i=n(59496),a=n(66942),s=n(70804);const r=()=>(0,i.useContext)(s.j),o=()=>(0,i.useContext)(a.G)},47203:(e,t,n)=>{"use strict";n.d(t,{U:()=>i.U});var i=n(57962)},51849:(e,t,n)=>{"use strict";n.d(t,{e:()=>d});var i=n(89605),a=n(5822),s=n(90707),r=n(66942),o=n(59496);var l=n(4637);const d=({children:e,navigationalRoot:t,pageId:n,entityUri:d})=>{const c=(0,s.H)(),u=t??c,m=(0,i.TH)();return function({pageId:e,navigationalRoot:t,entityUri:n}){const i=(0,s.b)();(0,o.useEffect)((()=>{i&&e&&i.reportPageView({pageId:e,navigationalRoot:t,entityUri:n})}),[e,i,t,n])}({pageId:n,navigationalRoot:u,entityUri:(0,a.S)(d??m.pathname)}),(0,l.jsx)(r.E,{value:u,children:e})}},67443:(e,t,n)=>{"use strict";n.d(t,{Bl:()=>i.Bl,Iq:()=>i.Iq,mO:()=>i.mO});var i=n(20458)},96901:(e,t,n)=>{"use strict";n.d(t,{B:()=>i});let i=function(e){return e.none="none",e.mini="mini",e.npv="npv",e.cinema="cinema",e.pip="pip",e.fullscreen="fullscreen",e}({})},20458:(e,t,n)=>{"use strict";n.d(t,{Bl:()=>a,Iq:()=>i,mO:()=>s});let i=function(e){return e.SET_VIDEO_MODE="SET_VIDEO_MODE",e.SET_HIDDEN_BY_USER="SET_HIDDEN_BY_USER",e}({});const a=e=>({type:i.SET_VIDEO_MODE,mode:e}),s=e=>({type:i.SET_HIDDEN_BY_USER,hiddenByUser:e})},27652:(e,t,n)=>{"use strict";n.d(t,{QU:()=>o,rv:()=>r,XL:()=>P,KE:()=>me,Wc:()=>Xe,tZ:()=>Le,sg:()=>nt,HV:()=>ye,At:()=>S,MW:()=>y,O6:()=>v,O9:()=>k,_n:()=>p,Kc:()=>N,oP:()=>b,WM:()=>d});var i=n(89605),a=n(50042);const s="37i9dQZF1EYkqdzj48dyYq",r=`spotify:playlist:${s}`,o="#0A59B8";var l=n(4637);const d=()=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(i.AW,{path:`/playlist/${s}`,element:(0,l.jsx)(a.InstrumentedRedirect,{to:"/"})})});var c=n(36844),u=n(61815),m=n(41836);const p=()=>{const e=(0,u.wW)(),t=(0,c.W6)(m.wZ,{loadingValue:!1});return e&&t};var g=n(48607),h=n(68640);const k=()=>{const e=(0,h.ET)(r,{decorateFormatListData:!0}),t=e?.formatListData?.attributes.lexicon_context_url;return{metadata:e,lexiconContextUrl:t}},v=e=>{const{featureIdentifier:t="unknown"}=e||{},{lexiconContextUrl:n}=k();return(0,g.n)({uri:r,url:n},{featureIdentifier:t})};var f=n(84847);const y=e=>e===r,S=e=>"true"===e?.metadata?.is_narration,b=()=>{const e=(0,f.x)(),{isPlaying:t,isActive:n}=v();return{isNarrator:n&&!!e&&S(e.item),isNarratorSpeaking:t}};var _=n(66632);const N=()=>{const[e]=(0,_.Z)(r,!1);return e};var E=n(59359),x=n(59496),C=n(56162),w=n(3802),I=n(35394),T=n(40778),A=n(1996);const P=x.memo((()=>(0,l.jsx)(A.v,{children:(0,l.jsx)(T.aU,{divider:"before"})})));var O=n(91929);const D=e=>e/2-e/2*22*2/169,R=e=>22*e/169,L=[{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 F=n(24697);const j=(0,x.memo)((function(){const{metadata:e}=k();return(0,l.jsx)(F.E,{style:{width:"100%",aspectRatio:"1/1",borderRadius:"50%"},src:e?.images?.[0]?.url})}));var M=n(21524),U=n(66604),B=n(22345);class V{constructor(e,t){this.x=e,this.y=t}static fromRadiusAndAngle(e,t){return new V(e*Math.cos(t),e*Math.sin(t))}static sum(e,t){return new V(e.x+t.x,e.y+t.y)}static mul(e,t){return new V(e*t.x,e*t.y)}controlPoint(e,t){return V.sum(this,V.fromRadiusAndAngle(e,t))}}const H=18.5/169;function G(e,t,n,i){const a=new V(e.x,e.y);if(i){const e=t/2*H*i.xScale,s=t/2*H*i.yScale,r=(n-i.beginTime)/i.duration,o=(i.clockwise?1:-1)*r*2*Math.PI;a.x+=e*Math.cos(o),a.y+=s*Math.sin(o)}const s=new Path2D;return s.arc(a.x,a.y,t,0,2*Math.PI),s}const W=()=>{const e=(0,x.useRef)(null),t=(0,x.useRef)(0),n=(0,x.useRef)(0),{scrollNodeRef:i}=(0,x.useContext)(M.VX),{ref:a,inView:s}=(0,O.YD)({root:i.current,initialInView:!1}),r=(0,x.useCallback)((()=>{const n=performance.now();t.current=t.current||n;const i=n-t.current,a=e.current?.getContext("2d");if(e.current&&a){const t=e.current.width/window.devicePixelRatio;a.clearRect(0,0,e.current.width,e.current.height),function(e,t,n){const i=new V(t/2,t/2),a=D(t),s=R(a);e.lineWidth=s;for(const{color:t,idleAnimation:s}of L)e.strokeStyle=t,e.stroke(G(i,a,n,s))}(a,t,i)}}),[]),o=(0,x.useCallback)((()=>{n.current=requestAnimationFrame((()=>{r(),o()}))}),[r]),d=(0,x.useCallback)((()=>{if(!e.current)return;const t=e.current.offsetWidth,n=window.devicePixelRatio||1,i=t*n;e.current.width=i,e.current.height=i;const a=e.current.getContext("2d");a?.scale(n,n)}),[]);return(0,B.y)({onResize:d,refOrElement:e,observeOnly:"width"}),(0,x.useEffect)((()=>(d(),s&&o(),()=>{cancelAnimationFrame(n.current)})),[d,o,s]),(0,l.jsx)("canvas",{style:{width:"100%",aspectRatio:"1/1"},ref:t=>{a(t),e.current=t}})},z=()=>(0,U.T)()?(0,l.jsx)(j,{}):(0,l.jsx)(W,{});var K=n(17201),Y=n(59200);const q="yhzmVjWVTHexH4wxeqvT",Z="vwSnTIt8eOJPkhYq9dak",Q="Ir5UGUEEjrNjtod7oLqd",J="d4FrTI5j_rkDgPjTTT1g",$="wez8Kfu5KSb_sIZzlzPT",X="TlD22XrL2WvV1os5qj7m",ee="eiVSI329ZuShN8wyhVQV",te="ClUmjcSm1A7KMvK0creR",ne=({title:e,description:t})=>{const{togglePlay:n,isPlaying:i}=v(),a=(0,l.jsx)(P,{}),s=(0,x.useCallback)((()=>{n()}),[n]),r=(0,x.useCallback)((e=>{"Enter"===e.code&&n()}),[n]);return(0,l.jsx)(Y._P,{menu:a,children:(0,l.jsxs)("div",{className:q,onClick:s,onKeyDown:r,tabIndex:0,role:"button",children:[(0,l.jsx)("div",{className:Z,children:(0,l.jsx)("div",{className:Q,children:(0,l.jsx)(z,{})})}),(0,l.jsxs)("div",{className:J,children:[(0,l.jsxs)("div",{className:$,children:[(0,l.jsx)(C.D,{variant:"brio",semanticColor:"textBase",children:e}),(0,l.jsx)("span",{className:ee,children:"BETA"})]}),(0,l.jsx)(C.D,{variant:"mesto",className:X,children:t}),(0,l.jsxs)("div",{className:te,onClick:e=>{e.stopPropagation()},children:[(0,l.jsx)(K.f,{onClick:s,version:K.u.secondary,isPlaying:i,size:"sm"}),(0,l.jsx)(Y.yj,{menu:a,children:(0,l.jsx)(I.z,{size:16,label:w.ag.get("more.label.context",e)})})]})]})]})})};var ie=n(84875),ae=n.n(ie),se=n(92348);const re="dS9Ou6JrRXZvYfs7VzpP";var oe=n(79371),le=n(16623);const de=(0,x.memo)((function(e){const{spanColumns:t,className:n,children:i}=e,a=(0,se.u)(),{containerRef:s,getWidth:r}=(0,le.o)(),[o,d]=(0,x.useState)({containerWidth:-1}),c=(0,x.useCallback)((e=>{if(null===e)return;const n=(0,oe.nf)(e,t,a);d({containerWidth:n})}),[a,t]);(0,B.y)({refOrElement:s,observeOnly:"width",observeOnMount:!0,onResize:()=>c(r())});const u={"--container-width":`${o.containerWidth}px`};return(0,l.jsx)("div",{className:ae()(re,n,"FixedColumnsContainerInGrid"),style:{...u},children:i})})),ce="DpP6uINGzQh5Y3kvqPiW",ue="iDmoFdvmJuT1BU8JyIK_",me=({shelfTitle:e,title:t,description:n,spec:i})=>(0,l.jsxs)(de,{spanColumns:3,className:ce,children:[(0,l.jsx)("div",{className:ue,children:(0,l.jsx)(E.r,{title:e})}),(0,l.jsx)(ne,{title:t,description:n,spec:i})]});var pe=n(24090),ge=n(37834),he=n(87873),ke=n(10427);const ve=new Map;let fe=null;const ye=()=>fe||(fe=new ge.Fo((0,ke.G)()),fe.subLoudness(he.Empty.fromJSON(null),(e=>{ve.has(e.playbackId)||(ve.clear(),ve.set(e.playbackId,[]));const t=ve.get(e.playbackId),n=Math.min(1,Math.max(0,e.loudness[0]/80));t[Math.floor(parseInt(e.position,10)/40)]=n})),fe);var Se=n(37409);function be(e,t,n){return(1-e)*t+e*n}const _e=e=>e-Math.PI,Ne=Math.PI/2,Ee=e=>e+Ne,xe=.67,Ce=4/3*Math.PI,we=e=>4/3*Math.tan(Math.PI/(2*e)),Ie=2;function Te(e,t,n,i,a,s,r,o=1,l=1){const d=V.sum(e,V.fromRadiusAndAngle((1-o*l*xe)*s,t)),c=Ee(t)-o*(4*Math.PI/9),u=n.controlPoint(r,Ee(Ce)),m=d.controlPoint(r,_e(c)),p=d.controlPoint(r,c),g=i.controlPoint(r,_e(Ee(a))),h=new Path2D;return h.moveTo(n.x,n.y),h.bezierCurveTo(u.x,u.y,m.x,m.y,d.x,d.y),h.bezierCurveTo(p.x,p.y,g.x,g.y,i.x,i.y),h.arc(e.x,e.y,s,a,Ce,!1),h}const Ae=()=>{const e=(0,x.useRef)(null),t=(0,Se.g)(),n=(0,x.useRef)(0),i=(0,x.useRef)(0),a=(0,x.useRef)(0),s=(0,x.useRef)(0),r=(0,x.useRef)(0),o=(0,x.useRef)(0),d=(0,x.useRef)(0),c=(0,x.useRef)(-1),u=(0,x.useRef)(0),m=(0,x.useCallback)((()=>{const l=performance.now(),u=t.getState();n.current=n.current||l;const m=l-n.current;u.isPaused?(i.current=i.current||m,a.current=m-i.current):(s.current+=a.current,a.current=0,i.current=0);const p=m-a.current-s.current,g=1-Math.max(0,Math.min(1,(d.current-m)/80)),h=be(g,r.current,o.current);if(c.current!==h){c.current=h;const t=e.current?.getContext("2d");if(e.current&&t){const n=e.current.width/window.devicePixelRatio;t.clearRect(0,0,e.current.width,e.current.height),function(e,t,n){const i=new V(t/2,t/2),a=D(t),s=R(a),r=Ce+2*Math.PI/Ie,o=be(.5,Ce,r),l=V.sum(i,V.fromRadiusAndAngle(a,Ce)),d=V.sum(i,V.fromRadiusAndAngle(a,r)),c=a*we(2*Ie);e.lineWidth=s;for(const{loudnessAnimation:t,color:s}of L)e.strokeStyle=s,e.stroke(Te(i,o,l,d,r,a,c,n,t?.multiplier||0))}(t,n,c.current)}}if(1===g){if(r.current=o.current,u.isPaused)o.current=0;else{const e=((e,t)=>{if(!e)return;const n=ve.get(e),i=Math.floor(t/40);return!n||i>=n.length?void 0:n[i]})(u.playbackId,p);o.current=e??0}d.current=m+80}}),[t]),p=(0,x.useCallback)((()=>{u.current=requestAnimationFrame((()=>{m(),p()}))}),[m]),g=(0,x.useCallback)((()=>{if(!e.current)return;const t=e.current.offsetWidth,n=window.devicePixelRatio||1,i=t*n;e.current.width=i,e.current.height=i;const a=e.current.getContext("2d");a?.scale(n,n)}),[]);return(0,B.y)({onResize:g,refOrElement:e,observeOnly:"width"}),(0,x.useEffect)((()=>(g(),p(),()=>{cancelAnimationFrame(u.current)})),[g,p]),(0,l.jsx)("canvas",{style:{width:"100%",aspectRatio:"1/1"},ref:e})},Pe=()=>(0,U.T)()?(0,l.jsx)(j,{}):(0,l.jsx)(Ae,{});var Oe=n(96170);const De="VeV6wzYXNcjC3phqDklt",Re="XgWqIQWTisOJ3u2NzYFK",Le=({spec:e})=>{const t=(0,f.x)()||{item:null,context:null},{item:n,context:i}=t;return(0,l.jsx)(Oe.Nh,{spec:e,children:(0,l.jsxs)("div",{className:De,children:[(0,l.jsx)("div",{className:Re,children:(0,l.jsx)(Pe,{})}),i&&n?(0,l.jsx)(pe._,{context:i,item:n,titleTypeVariant:"canon",subtitleTypeVariant:"ballad"}):null]})})};var Fe=n(47746),je=n(78586),Me=n(99948);function Ue(){return(0,Me.Y)((e=>e?.nextItems.find((e=>e.metadata?.jump_track))??e?.nextItems.find((e=>e.metadata?.["narration.intro.ssml"]||e.metadata?.["narration.jump.ssml"]))),((e,t)=>e?.uri===t?.uri))}var Be=n(9407),Ve=n(66842),He=n(46642);const Ge="yourdj.tiredofset.tooltipshown",We={status:"inactive",skippedCount:0},ze=({children:e,onTooltipShown:t,api:n})=>{const[i,a]=(0,x.useState)(!1),s=(0,x.useCallback)((()=>{a(!1)}),[]);(0,x.useImperativeHandle)(n,(()=>({visible:i,hide:()=>{s()}})));const[r,o]=(0,Be.z)(Ge,!1),d=(0,x.useCallback)((e=>{r||(t?.(e),o(!0),a(!0))}),[r,t,o]);return((e,t,n)=>{const i=(0,x.useRef)("inactive"),{isPlaying:a}=v(),s=Ue();(0,x.useEffect)((()=>{a&&s?"inactive"===i.current&&(i.current="dj_active"):(i.current="inactive",n())}),[a,s,n]),(0,x.useEffect)((()=>{const n=()=>{"dj_active_then_blurred"===i.current&&(i.current="executed",s(),setTimeout((()=>{t("blur_then_focus")}),1e3))},a=()=>{"dj_active"===i.current&&(i.current="dj_active_then_blurred")};function s(){e||(window.removeEventListener("focus",n),window.removeEventListener("blur",a))}return e||(window.addEventListener("focus",n),window.addEventListener("blur",a)),s}),[a,t,e])})(r,d,s),((e,t,n)=>{const i=(0,x.useRef)(We),{isPlaying:a}=v(),s=Ue();(0,x.useEffect)((()=>{a&&s?"inactive"===i.current.status&&(i.current.status="dj_active"):(i.current=We,n())}),[a,s,n]),(0,He.G)(Ve.rg.ACTION,(n=>{e||n.data.action===Ve.zr.SKIP_TO_NEXT&&("dj_active"!==i.current.status&&"dj_active_then_skipped"!==i.current.status||(i.current.skippedCount+=1,2===i.current.skippedCount&&(i.current.status="executed",t("multiple_skips"))))}))})(r,d,s),(0,l.jsx)(je.G,{title:w.ag.get("yourdj.jumpbutton.tooltip.title"),description:w.ag.get("yourdj.jumpbutton.tooltip.desc"),visible:i,id:Ge,showButtons:!1,hideOnClickOutside:!1,onSecondaryButtonClick:a.bind(null,!1),children:e})};var Ke=n(3289);const Ye="uNwWVYsO7MhJTvG8LTf7",qe="cncNtgkWYCEJLsq1b7Ec",Ze="xBba0HxpAwWVUfqR32Kr",Qe="Li4qzD6Wfp91DswR0WAV",Je="x_EML11vzDLAvA18VW68";let $e=function(e){return e[e.xs=16]="xs",e[e.sm=24]="sm",e[e.md=32]="md",e}({});const Xe=()=>{const e=(0,x.useRef)(null),t=Ue(),{isActive:n}=v(),{isNarrator:i}=b(),a=(0,Se.g)(),s=(0,x.useCallback)((()=>{t&&(e.current?.hide(),a.skipTo(t))}),[a,t]);return!n||i?null:(0,l.jsx)(ze,{api:e,children:(0,l.jsx)(Ke._,{label:w.ag.get("yourdj.jumpbutton.tooltip.hover"),disabled:!t,children:(0,l.jsx)("button",{className:ae()(Ye,{[Je]:!t}),onClick:s,children:(0,l.jsx)("div",{className:ae()(qe),children:(0,l.jsx)(Fe.E,{iconSize:$e.xs,className:ae()(Ze,{[Qe]:!t})})})})})})},et="j1NLAJlee5UppsghgrQT",tt="yourdj.ylx.tooltipshown",nt=({children:e,onTooltipShown:t,api:n})=>{const[i,a]=(0,x.useState)(!1);(0,x.useImperativeHandle)(n,(()=>({visible:i,hide:()=>{a(!1)}})));const{isPlaying:s}=v(),r=(0,x.useRef)(null),[o,d]=(0,Be.z)(tt,!1),c=(0,x.useCallback)((e=>{o||(t?.(e),d(!0),a(!0))}),[o,t,d]);return(0,x.useEffect)((()=>{if(s)return r.current&&clearTimeout(r.current),void a(!1);o||(r.current=setTimeout((()=>{c("dj_in_ylx")}),2e3))}),[o,c,s]),(0,l.jsx)(je.G,{title:w.ag.get("ylx.clicktoplay"),description:w.ag.get("yourdj.ylx.tooltip.description"),visible:i,id:tt,showButtons:!1,hideOnClickOutside:!1,onSecondaryButtonClick:a.bind(null,!1),placement:"right",renderInline:!1,tippyWrapperClassName:et,className:"encore-dark-theme",zIndex:1e4,children:e})}},82301:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});var i=n(98042),a=n(52566),s=n(4637);const r=()=>(0,s.jsx)("div",{className:a.Z.coverContainer,children:(0,s.jsx)(i.P,{iconSize:64,className:a.Z.coverIcon})})},14769:(e,t,n)=>{"use strict";n.d(t,{x:()=>d});var i=n(61740),a=n(50346),s=n(3802),r=n(82108),o=n(74150),l=n(9637);function d(){const e=(0,o.j$)({offset:0,limit:1}),{user:t}=(0,i.v9)(r.Gg);if(null===e||!t?.id)return null;return{uri:(0,a.wG)(t.id,"your-episodes").toURI(),name:s.ag.get("sidebar.your_episodes"),images:[],totalLength:e?.totalLength,owner:(0,l.V)(t)}}},22981:(e,t,n)=>{"use strict";n.d(t,{T:()=>p});var i=n(3802),a=n(24952),s=n(96768),r=n(48607),o=n(82301),l=n(9654),d=n(14769),c=n(52566),u=n(4637);const m=({metadata:e,index:t})=>{const{isPlaying:n,togglePlay:l}=(0,r.n)({uri:e.uri},{featureIdentifier:"your_library"}),{name:d,images:m}=e;return(0,u.jsx)(a.Z,{index:t,delegatePlayback:!0,delegateLogging:!0,isPlaying:n,featureIdentifier:"your_library",onPlay:(e,t)=>l({loggingParams:t}),headerText:d,uri:e.uri,renderCardImage:()=>(0,u.jsx)(s.x,{images:m,FallbackComponent:o.$}),renderSubHeaderContent:()=>(0,u.jsx)("span",{children:i.ag.get("tracklist-header.episodes-counter",e.totalLength)}),className:c.Z.yourEpisodesCard})},p=({index:e})=>{const t=(0,d.x)();return t?(0,u.jsx)(m,{metadata:t,index:e}):(0,u.jsx)(l.A,{cardImage:(0,u.jsx)(s.x,{FallbackComponent:o.$}),isLoading:!0})}},13973:(e,t,n)=>{"use strict";n.d(t,{x:()=>i.x});var i=n(14769)},66946:(e,t,n)=>{"use strict";n.d(t,{U:()=>o,c:()=>r});var i=n(36844),a=n(41836),s=n(9407);let r=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.COLLAPSED=1]="COLLAPSED",e[e.EXPANDED=2]="EXPANDED",e}({});function o(){const e=(0,i.W6)(a.yA,{loadingValue:!1}),[t,n]=(0,s.z)("ylx-sidebar-state",r.DEFAULT);return e?{ylxSidebarState:t,setYlxSidebarState:n,isCollapsed:t===r.COLLAPSED,isExpanded:t===r.EXPANDED}:{ylxSidebarState:null,setYlxSidebarState:e=>{throw new Error(`Can't set YLXSidebarState to ${r[e]} as YLX is not enabled`)},isCollapsed:!1,isExpanded:!1}}},51150:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Fa,YourLibraryX:()=>zs,g:()=>ja});var i=n(59496),a=n(84875),s=n.n(a),r=n(89130),o=n(61740),l=n(85830),d=n(72102),c=n(36844),u=n(44594),m=n(50346),p=n(12880),g=n(40576),h=n(50013),k=n(17617),v=n(59200),f=n(16623),y=n(40115),S=n(88664),b=n(46164),_=n(39097),N=n(23329);const E=new Set(["Unidentified","Alt","AltGraph","CapsLock","Control","Fn","FnLock","Meta","NumLock","ScrollLock","Shift","Symbol","SymbolLock","Hyper","Super","Enter","Tab","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp","Backspace","Clear","Copy","CrSel","Cut","Delete","EraseEof","ExSel","Insert","Paste","Redo","Undo","Accept","Again","Attn","Cancel","ContextMenu","Escape","Execute","Find","Help","Pause","Play","Props","Select","ZoomIn","ZoomOut","BrightnessDown","BrightnessUp","Eject","LogOff","Power","PowerOff","PrintScreen","Hibernate","Standby","WakeUp","AllCandidates","Alphanumeric","CodeInput","Compose","Convert","Dead","FinalMode","GroupFirst","GroupLast","GroupNext","GroupPrevious","ModeChange","NextCandidate","NonConvert","PreviousCandidate","Process","SingleCandidate","HangulMode","HanjaMode","JunjaMode","Eisu","Hankaku","Hiragana","HiraganaKatakana","KanaMode","KanjiMode","Katakana","Romaji","Zenkaku","ZenkakuHankaku","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","Soft1","Soft2","Soft3","Soft4","ChannelDown","ChannelUp","Close","MailForward","MailReply","MailSend","MediaClose","MediaFastForward","MediaPause","MediaPlay","MediaPlayPause","MediaRecord","MediaRewind","MediaStop","MediaTrackNext","MediaTrackPrevious","New","Open","Print","Save","SpellCheck","Key11","Key12","AudioBalanceLeft","AudioBalanceRight","AudioBassBoostDown","AudioBassBoostToggle","AudioBassBoostUp","AudioFaderFront","AudioFaderRear","AudioSurroundModeNext","AudioTrebleDown","AudioTrebleUp","AudioVolumeDown","AudioVolumeUp","AudioVolumeMute","MicrophoneToggle","MicrophoneVolumeDown","MicrophoneVolumeUp","MicrophoneVolumeMute","SpeechCorrectionList","SpeechInputToggle","LaunchApplication1","LaunchApplication2","LaunchCalendar","LaunchContacts","LaunchMail","LaunchMediaPlayer","LaunchMusicPlayer","LaunchPhone","LaunchScreenSaver","LaunchSpreadsheet","LaunchWebBrowser","LaunchWebCam","LaunchWordProcessor","BrowserBack","BrowserFavorites","BrowserForward","BrowserHome","BrowserRefresh","BrowserSearch","BrowserStop","AppSwitch","Call","Camera","CameraFocus","EndCall","GoBack","GoHome","HeadsetHook","LastNumberRedial","Notification","MannerMode","VoiceDial","TV","TV3DMode","TVAntennaCable","TVAudioDescription","TVAudioDescriptionMixDown","TVAudioDescriptionMixUp","TVContentsMenu","TVDataService","TVInput","TVInputComponent1","TVInputComponent2","TVInputComposite1","TVInputComposite2","TVInputHDMI1","TVInputHDMI2","TVInputHDMI3","TVInputHDMI4","TVInputVGA1","TVMediaContext","TVNetwork","TVNumberEntry","TVPower","TVRadioService","TVSatellite","TVSatelliteBS","TVSatelliteCS","TVSatelliteToggle","TVTerrestrialAnalog","TVTerrestrialDigital","TVTimer","AVRInput","AVRPower","ColorF0Red","ColorF1Green","ColorF2Yellow","ColorF3Blue","ColorF4Grey","ColorF5Brown","ClosedCaptionToggle","Dimmer","DisplaySwap","DVR","Exit","FavoriteClear0","FavoriteClear1","FavoriteClear2","FavoriteClear3","FavoriteRecall0","FavoriteRecall1","FavoriteRecall2","FavoriteRecall3","FavoriteStore0","FavoriteStore1","FavoriteStore2","FavoriteStore3","Guide","GuideNextDay","GuidePreviousDay","Info","InstantReplay","Link","ListProgram","LiveContent","Lock","MediaApps","MediaAudioTrack","MediaLast","MediaSkipBackward","MediaSkipForward","MediaStepBackward","MediaStepForward","MediaTopMenu","NavigateIn","NavigateNext","NavigateOut","NavigatePrevious","NextFavoriteChannel","NextUserProfile","OnDemand","Pairing","PinPDown","PinPMove","PinPToggle","PinPUp","PlaySpeedDown","PlaySpeedReset","PlaySpeedUp","RandomToggle","RcLowBattery","RecordSpeedNext","RfBypass","ScanChannelsToggle","ScreenModeNext","Settings","SplitScreenToggle","STBInput","STBPower","Subtitle","Teletext","VideoModeNext","Wink","ZoomToggle"]);const x=1e3;function C(e,t){const[n,a]=(0,i.useState)(""),s=(0,i.useRef)(n);s.current=n;const r=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const n=e.current;if(!n||!t)return a(""),()=>{};const i=e=>{const t="Backspace"===e.key,n=" "===e.key,i=e.metaKey||e.ctrlKey,o=e.target instanceof HTMLElement&&e.target?.matches("input, textarea, [contenteditable]"),l=e.isComposing||229===e.keyCode,d=(c=e.key,E.has(c)&&!t);var c;const u=n&&!s.current,m=t&&!s.current;if(i||o||l||d||u||m)return;(t&&s.current||n)&&(e.preventDefault(),e.stopPropagation()),a((n=>t?n.slice(0,-1):n+e.key)),r.current&&clearTimeout(r.current),r.current=setTimeout((()=>a("")),x)};return n.addEventListener("keydown",i,!0),()=>{n.removeEventListener("keydown",i,!0),r.current&&clearTimeout(r.current)}}),[e,t]),n}var w=n(4637);const I=(0,i.createContext)({setTypeaheadResult:({uid:e,str:t})=>{if(e||t)throw new Error("setTypeaheadResult must be used within a TypeaheadProvider")},typeaheadResult:{uid:null,str:""}}),T=({children:e,containerRef:t,findMatchingTypeaheadUid:n,isEnabled:a=!0})=>{const[s,r]=(0,i.useState)({uid:null,str:""}),o=(0,i.useMemo)((()=>({typeaheadResult:s,setTypeaheadResult:r})),[s,r]),l=C(t,a),d=(0,i.useRef)(l);d.current=l;const c=(0,i.useRef)(n);return c.current=n,(0,i.useEffect)((()=>{l&&a?c.current(l).then((e=>{l===d.current&&r({uid:e,str:l})})):r({uid:null,str:""})}),[a,l,r]),(0,w.jsx)(I.Provider,{value:o,children:e})},A="Vf3ww2_My5QuwUnbpzhu";var P=n(67526);const O=()=>{const{typeaheadResult:{str:e}}=(0,i.useContext)(I);return e?(0,w.jsx)(P.A9,{className:A,children:e}):null};var D=n(96170),R=n(9374),L=n(56162),F=n(3802);const j="wW9brXu3G3dR9CQ77Tyk",M="sgpkGFrp4dcnre_TJtaI",U=({className:e})=>(0,w.jsx)("section",{className:s()(j,e),children:(0,w.jsxs)("div",{className:M,children:[(0,w.jsx)(L.D,{as:"h2",variant:"canon",semanticColor:"textBase",children:F.ag.get("web-player.your-library-x.empty-state-folder-title")}),(0,w.jsx)(L.D,{as:"p",variant:"mesto",semanticColor:"textBase",children:F.ag.get("web-player.your-library-x.empty-state-folder-subtitle")})]})});var B=n(28170),V=n(79475),H=n(88333);const G="xi3ytXbuSuzCYy5LwjFu",W="OcOr6YadMDDeh_NPgClX",z="eL94fWmhg6WbrdKZfGEW",K=(0,i.memo)((function(e){const{message:t,title:n,linkTitle:i,linkTo:a,onClick:r,className:o}=e;return(0,w.jsxs)("section",{className:s()(G,o),children:[(0,w.jsxs)("div",{className:W,children:[(0,w.jsx)(L.D,{variant:"balladBold",semanticColor:"textBase",children:n}),(0,w.jsx)(L.D,{variant:"mesto",semanticColor:"textBase",children:t})]}),(0,w.jsx)("div",{className:z,children:i&&(a||r)&&(0,w.jsx)(V.D,{className:z,as:r?"button":void 0,colorSet:"invertedLight",href:a,onClick:r,component:H.Z,buttonSize:"sm",children:i})})]})}));var Y=n(63982);const q=({className:e})=>{const{createPlaylist:t}=(0,B.K)(),n=(0,i.useCallback)((()=>{t()}),[t]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Y.D,{renderInline:!1,children:(0,w.jsx)(K,{onClick:n,linkTitle:F.ag.get("web-player.your-library-x.empty-state-playlists-cta"),title:F.ag.get("web-player.your-library-x.empty-state-playlists-title"),message:F.ag.get("web-player.your-library-x.empty-state-playlists-subtitle"),className:e})}),(0,w.jsx)(K,{linkTo:"/genre/podcasts-web",linkTitle:F.ag.get("web-player.your-library-x.empty-state-podcasts-browse"),title:F.ag.get("web-player.your-library-x.empty-state-podcasts-to-follow"),message:F.ag.get("web-player.your-library-x.empty-state-podcasts-keep-you-updated"),className:e})]})},Z="JouuH90_RNAdTj0ZjcCA",Q="YtlFVHxvaGSz4vJdDdEa",J="spFG_i1jkxOkxb1_SaLJ",$="_8ZKfG3dOxfcr9Yyy5cv",X=({query:e,className:t})=>(0,w.jsxs)("div",{className:s()(Z,t),"":"no-search-results-view",children:[(0,w.jsx)(L.D,{as:"h1",variant:"cello",className:Q,children:F.ag.get("web-player.your-library-x.empty-results-title-short",(0,w.jsx)("span",{className:J,children:(0,w.jsx)("span",{className:$,children:e})}))}),(0,w.jsx)(L.D,{as:"h2",variant:"mesto",children:F.ag.get("web-player.your-library-x.empty-results-text-short")})]});var ee=n(74572);const te="yrUQENj0tMcKDW5v0mfb",ne="jsT0vJ8rWXPMeoFsMdNK",ie=({onClick:e})=>(0,w.jsxs)("div",{className:te,children:[(0,w.jsx)("div",{className:"icon",children:(0,w.jsx)(ee.l,{iconSize:48,semanticColor:"textBase"})}),(0,w.jsxs)("div",{className:ne,children:[(0,w.jsx)(L.D,{as:"h2",variant:"canon",semanticColor:"textBase",children:F.ag.get("web-player.your-library-x.error-title")}),(0,w.jsx)(L.D,{as:"p",variant:"mesto",semanticColor:"textBase",children:F.ag.get("web-player.your-library-x.error-body")})]}),(0,w.jsx)("div",{children:(0,w.jsx)(V.D,{onClick:e,colorSet:"invertedLight",buttonSize:"sm",children:F.ag.get("web-player.your-library-x.error-button")})})]}),ae=(0,i.createContext)(null);var se=n(9407);const re="ylx-expanded-folders";const oe=({children:e})=>{const t=function(){const[e,t]=(0,se.z)(re,[]),n=(0,i.useCallback)((t=>e.includes(t)),[e]),a=(0,i.useCallback)(((n,i)=>{const a=e.indexOf(n);if(i){if(-1!==a)return;t([...e,n])}else{if(-1===a)return;t(e.filter((e=>e!==n)))}}),[e,t]);return{expandedFolders:e,getIsFolderExpanded:n,setIsFolderExpanded:a}}();return(0,w.jsx)(ae.Provider,{value:t,children:e})},le="main-yourLibraryX-listItemGroup",de="Dtr130mQSR0j8k7bu5KS",ce="Ks_qLLEMUQzP7ejeQCwQ",ue="o_wMyH9_LbAmIwlVqsF0",me="vR1zUcAr6PBeHIvA_K13",pe="TiJahFhH6KZaibhRtEOA",ge="B_HdWVSEWPHaOf9LQAtC",he="Pns6F5g4OEwEpdmOWTLg",ke="gOCoOAfYUiOq2RlMCOjr",ve="eldivguzYznZgQoShJbe",fe="rTLczxlwElfe8CeNpuh6",ye="main-yourLibraryX-libraryItem",Se="pFmiujkSoJU4nVLZNO32",be="raKUx1vRBRjpm8xR2bIV",_e="jNqzRycGQMLmnhgQNqxy",Ne="Q955MS3fMIZGQAtvDYCq",Ee="cVy6fGx6QtJbCnID7XdB",xe="main-yourLibraryX-listItem",Ce=({isScrolled:e})=>(0,w.jsxs)("div",{className:s()(ye,be,{[_e]:e}),children:[(0,w.jsx)(L.D,{variant:"finaleBold",semanticColor:"textSubdued",children:F.ag.get("web-player.your-library-x.expanded-list-header.title")}),(0,w.jsx)(L.D,{variant:"finaleBold",semanticColor:"textSubdued",children:F.ag.get("web-player.your-library-x.expanded-list-header.date-added")}),(0,w.jsx)(L.D,{variant:"finaleBold",semanticColor:"textSubdued",children:F.ag.get("web-player.your-library-x.expanded-list-header.played-at")})]});var we=n(37769),Ie=n(82171),Te=n(21840),Ae=n(76160),Pe=n(66632),Oe=n(73854),De=n(79102),Re=n(49288);const Le=[m.JM.TRACK,m.JM.LOCAL_TRACK,m.JM.ALBUM,m.JM.ARTIST,m.JM.PLAYLIST,m.JM.PLAYLIST_V2,m.JM.FOLDER,m.JM.EPISODE,m.JM.SHOW];let Fe=function(e){return e.ON="on",e.BEFORE="before",e.AFTER="after",e}({});const je=(0,Re.y)(Fe);function Me(e){return Le.includes(e)}function Ue(e,t,n,i,a){if(e.defaultPrevented)return null;const s=n.includes(Fe.BEFORE),r=n.includes(Fe.AFTER);let o=Fe.ON;if(t instanceof HTMLElement&&(s||r)){const{top:r,height:l,left:d,width:c,right:u}=t.getBoundingClientRect(),m=n.includes(Fe.ON);if("horizontal"===i)if(m&&s){(a?e.clientX>Math.round(u)-c/4:e.clientXMath.round(u)-c/2:e.clientX{const n=Ve.UD[e];return!!Me(n)&&t.includes(n)})).map((e=>Ve.UD[e])).filter(Me)}var Ge=n(28418);function We(e,t,n){const i=He(e,t),a=function(e,t){return e.split(/[\s,;]+/g).map((e=>(0,m.EC)(e?.trim()))).filter(Ge.K).reduce(((e,n)=>Me(n.type)&&t.includes(n.type)?(e[n.type]||=[],e[n.type].push(n.toURI()),e):e),{})}(e.dataTransfer?.getData("text/plain"),t),s=Array.from(new Set([...Object.keys(a),...i])).filter(Me),r=Object.fromEntries(s.map((t=>{const n=a[t]??[],i=e.dataTransfer?.getData(Be.a[t])?.split("\n").filter(Boolean)??[];return[t,Array.from([...i,...n.filter((e=>!i.includes(e)))])]})));if(n){const{[m.JM.PLAYLIST]:e,...t}=r,n=Array.from(new Set([...r[m.JM.PLAYLIST_V2]??[],...(r[m.JM.PLAYLIST]??[]).map(ze)]));return{...t,...n.length?{[m.JM.PLAYLIST_V2]:n}:null}}return r}function ze(e){const t=(0,m.EC)(e);return t?.type===m.JM.PLAYLIST?(0,m.FW)(t.id).toURI():e}const Ke={droppableUriTypes:"album artist episode folder playlist playlist-v2 show track local",useDropTarget:"main-useDropTarget-base","useDropTarget--album":"main-useDropTarget-album","useDropTarget--artist":"main-useDropTarget-artist","useDropTarget--episode":"main-useDropTarget-episode","useDropTarget--folder":"main-useDropTarget-folder","useDropTarget--playlist":"main-useDropTarget-playlist","useDropTarget--playlist-v2":"main-useDropTarget-playlistV2","useDropTarget--show":"main-useDropTarget-show","useDropTarget--track":"main-useDropTarget-track","useDropTarget--local":"main-useDropTarget-local"};function Ye({uri:e,allowedURITypesByDropPosition:t,onDrop:n,onLongDragOver:a,longDragOverTimeout:s=1e3,reorderDirection:r="vertical"}){const o=(0,d.NY)((()=>t),[t]),l=(0,De.S)(),c=(0,Oe.m1)(),u=!!e&&1===c.length&&c[0]===e,p=Object.values(o).every((e=>e.includes(m.JM.PLAYLIST_V2)&&!e.includes(m.JM.PLAYLIST))),[g,h]=(0,i.useState)(null),k=(0,i.useCallback)((e=>u?[]:Object.entries(o).filter((([t,n])=>He(e,n).length>0)).map((([e])=>e)).filter(je)),[u,o]),v=(0,i.useRef)(0),f=(0,i.useRef)(null),y=(0,i.useRef)(null),S=(0,i.useCallback)((()=>{v.current=0,f.current=null,h(null),y.current&&(window.clearTimeout(y.current),y.current=null)}),[]);(0,i.useEffect)((()=>S),[S]);const b=(0,i.useCallback)((e=>{const t=k(e);t.length&&(h(Ue(e,f.current,t,r,l)),e.dataTransfer&&!e.defaultPrevented&&(e.dataTransfer.dropEffect=t.includes(Fe.ON)?"copy":"move"),e.preventDefault())}),[k,l,r]),_=(0,i.useCallback)((e=>{if(k(e).length&&(e.preventDefault(),1==++v.current&&e.target instanceof HTMLElement)){f.current=e.target;const t=()=>{f.current&&document.contains(f.current)||(S(),document.removeEventListener("dragenter",t))};document.addEventListener("dragenter",t),document.addEventListener("dragend",(()=>{document.removeEventListener("dragenter",t),S()}),{once:!0}),a&&(y.current=window.setTimeout(a,s))}}),[k,a,s,S]),N=(0,i.useCallback)((e=>{k(e).length&&0==--v.current&&S()}),[k,S]),E=(0,i.useCallback)((e=>{const t=Ue(e,f.current,k(e),r,l);if(!e.defaultPrevented&&t){const i=We(e,o[t]??[],p);Object.keys(i).length&&n&&(n(i,t),e.preventDefault())}S()}),[k,r,l,S,o,p,n]);return{dropPosition:g,className:(0,i.useMemo)((()=>`${Ke.useDropTarget} ${Array.from(new Set(Object.values(o).flat()))?.map((e=>Ke[`useDropTarget--${e}`]??"")).join(" ")}`),[o]),onDragEnter:_,onDragLeave:N,onDragOver:b,onDrop:E}}const qe="main-yourLibraryX-libraryOnDrop",Ze="as7TWnIA1jnumFte_u0R",Qe="main-yourLibraryX-libraryBeforeDrop",Je="main-yourLibraryX-libraryAfterDrop",$e="V57QBvW1q79gFmT8NBvz",Xe={marginBlockEnd:0,willChange:"transform, opacity"},et=({filterId:e,isPrimaryFilter:t,isPlaceholder:n,resetFilterIds:a,toggleFilterId:r,allowedDropTargetURITypes:o=Le,className:l,ChipComponent:d=Ae.A,innerRef:c,index:u=0,spec:m,...p})=>{const g=(0,D.$P)(),h=(0,Pe.y)(),k=p.selected,v=e?h.getFilterLabel(e):"",f=(0,i.useCallback)((()=>{!e||k&&t?(a(),k&&t&&e?g.logInteraction(m.filterChipFactory({identifier:v,position:u}).hitClearFilter()):g.logInteraction(m.clearButtonFactory().hitClearFilter())):(r(e),k?g.logInteraction(m.filterChipFactory({identifier:v,position:u}).hitClearFilter()):g.logInteraction(m.filterChipFactory({identifier:v,position:u}).hitFilter()))}),[e,v,k,t,a,r,u,g,m]),y=(0,i.useCallback)((e=>{e.detail>1||n||f()}),[n,f]),{className:S,dropPosition:b,..._}=Ye({allowedURITypesByDropPosition:{[Fe.ON]:o},onLongDragOver:f});return(0,w.jsx)(d,{...p,"aria-label":p["aria-label"],..._,...b===Fe.ON?{selectedColorSet:"base"}:void 0,className:s()(l,S,{[Ze]:b===Fe.ON,[$e]:n}),onClick:y,selectedColorSet:b===Fe.ON?"invertedDark":"invertedLight",secondary:k&&!t,style:Xe,ref:c,tabIndex:-1})},tt=[{id:"p1",name:"Playlists"},{id:"p2",name:"Podcasts & Shows"},{id:"p3",name:"Artists"},{id:"p4",name:"Albums"}],nt=(0,i.memo)((function({availableFilters:e,selectedFilters:t,toggleFilterId:n,resetFilterIds:a,className:s,spec:r}){const o=!(t||e),l=o?tt:[...t??[],...e??[]],d=(0,i.useRef)(null),c=(0,i.useCallback)((()=>{(0,Te.Bu)(d.current,d.current?.nextElementSibling instanceof HTMLElement?d.current?.nextElementSibling:null),a()}),[a]);return 0===l.length?null:(0,w.jsxs)(Ie.l,{className:s,ariaLabel:F.ag.get("web-player.your-library-x.filter_options"),children:[!!t?.length&&(0,w.jsx)(et,{resetFilterIds:c,toggleFilterId:n,allowedDropTargetURITypes:Hs,ChipComponent:we.w,"aria-label":F.ag.get("web-player.your-library-x.clear_filters"),innerRef:d,spec:r}),l.map(((e,i)=>{const s=t?.includes(e),l=0===i;return(0,w.jsx)(et,{filterId:e.id,isPrimaryFilter:l,isPlaceholder:o,resetFilterIds:a,toggleFilterId:n,selected:s,spec:r,index:i,children:e.name},e.id)}))]})}));var it=n(66806);const at=(0,i.createContext)({openedFolderUri:"",pushFolder:()=>{},popFolder:()=>{},resetFolder:()=>{},change:"PUSH"}),st=({children:e})=>{const{setFilter:t}=(0,i.useContext)(it.fo),[n,a]=(0,se.z)("opened-folder-uri",""),s=(0,i.useRef)([n??""]),r=(0,i.useRef)("PUSH"),o=(0,i.useCallback)((e=>{a(e),t("")}),[a,t]),l=(0,i.useCallback)((e=>{s.current.push(e),r.current="PUSH",o(s.current.at(-1))}),[o]),d=(0,i.useCallback)((()=>{s.current.pop();const e=s.current.at(-1);return r.current="POP",o(e),e}),[o]),c=(0,i.useCallback)((()=>{s.current=[""],o("")}),[o]);return(0,w.jsx)(at.Provider,{value:{openedFolderUri:n,pushFolder:l,popFolder:d,resetFolder:c,change:r.current},children:e})};var rt=n(27652),ot=n(92348),lt=n(33482),dt=n(98040),ct=n(29251),ut=n(85483),mt=n(88513),pt=n(77462),gt=n(7813),ht=n(48607),kt=n(30301),vt=n(39140),ft=n(58706),yt=n(74488);function St(e,t,n=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,Te.lK)(e))return;const i=e.querySelector('[tabindex="0"]');t===yt.N.UP&&(0,Te.Bu)(i,bt(e,i,yt.N.UP,n)),t===yt.N.DOWN&&(0,Te.Bu)(i,bt(e,i,yt.N.DOWN,n)),t===yt.N.RIGHT&&(0,Te.Bu)(i,_t(i,yt.N.RIGHT,n)),t===yt.N.LEFT&&(0,Te.Bu)(i,_t(i,yt.N.LEFT,n))}function bt(e,t,n,i=!1){const a=t.closest('li[role="row"]');if(!a)return t;let s=a;const r=Array.from(e.querySelectorAll('li[role="row"]')),o=r.indexOf(a);if(o<0)return t;if(n===yt.N.UP){if(document.activeElement===e){s=r[r.length-1];return(i?s.querySelector("a[href], button"):s)??t}let n=o-1;s=r[n],n-=1}else if(n===yt.N.DOWN){if(document.activeElement===e){s=r[0];return(i?s.querySelector("a[href], button"):s)??t}let n=o+1;s=r[n],n+=1}return(i?s.querySelector("a[href], button"):s)??t}function _t(e,t,n=!1){const i=e.closest('li[role="row"]');if(!i)return e;let a=e;const s=Array.from(i.querySelectorAll("a[href], button")),r=s.indexOf(e);let o=0;if(t===yt.N.RIGHT&&r-1!==s.length)o=r+1;else{if(t===yt.N.LEFT&&-1===r)return i;if(t===yt.N.LEFT&&0!==r)o=r-1;else if(t===yt.N.LEFT&&0===r){return(n?i.querySelector("a[href], button"):i)??i}}return a=s.at(o),a??e}var Nt=n(24933);const Et=({onKeyDown:e,children:t,firstInteractiveIsWrapper:n=!1,...a})=>{const s=(0,i.useRef)(null);(0,Nt.W)(s);const r=(0,i.useCallback)((t=>{s.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),document.documentElement.classList.remove("no-focus-outline")),"ArrowUp"===t.key&&St(s.current,yt.N.UP,n),"ArrowDown"===t.key&&St(s.current,yt.N.DOWN,n),"ArrowRight"===t.key&&St(s.current,yt.N.RIGHT,n),"ArrowLeft"===t.key&&St(s.current,yt.N.LEFT,n),e?.(t))}),[n,e]),o=(0,i.useCallback)((e=>{if(!s.current)return;const t=e.target,n=s.current.querySelector('[tabindex="0"]');t.closest('li[role="row"]')&&t!==n&&(0,Te.Bu)(n,t,{preventScroll:!0})}),[]);return(0,w.jsx)("ul",{role:"treegrid",ref:s,onKeyDown:r,onFocus:o,tabIndex:0,...a,children:t})};var xt=n(92199);const Ct=({children:e,innerRef:t,...n})=>{const a=(0,i.useRef)(null),s=t??a;return(0,xt.O)(s),(0,w.jsx)("li",{ref:s,role:"row",...n,children:e})};var wt=n(24927),It=n(83747),Tt=n(81839);const At={entityImage:"main-yourLibraryX-listRowEntityImage",link:"main-yourLibraryX-listRowLink",subtitle:"main-yourLibraryX-listRowSubtitle",titleLink:"main-yourLibraryX-listRowTitleLink",icon:"main-yourLibraryX-listRowIcon",subtitleLeadingWrapper:"main-yourLibraryX-listRowSubtitleLeadingWrapper"},Pt=({leading:e,subtitle:t,uri:n})=>{const i=`listrow-subtitle-${n}`;return(0,w.jsx)("div",{className:At.subtitle,children:(0,w.jsxs)(It.l,{lineClamp:1,className:At.link,id:i,children:[(0,w.jsx)("span",{className:At.subtitleLeadingWrapper,children:e}),t]})})},Ot=({leading:e,subtitle:t,uri:n})=>{const i=`card-subtitle-${n}`;return(0,w.jsx)("div",{className:At.subtitle,children:(0,w.jsxs)(Tt._,{lineClamp:1,className:At.link,id:i,role:"gridcell",children:[(0,w.jsx)("span",{className:At.subtitleLeadingWrapper,children:e}),t]})})};var Dt=n(89605),Rt=n(76084),Lt=n(29964),Ft=n(54299);const jt={state:{referrer:"your_library",preventMoveFocus:!0}};function Mt(e,t,n,a){const{filter:s}=(0,i.useContext)(it.fo),{isActive:r}=(0,kt.cR)(e),o=function(e){const{typeaheadResult:{uid:t,str:n}}=(0,i.useContext)(I);return t===e?n:null}(e),l=!!o,d=(0,i.useRef)(null),c=(0,Dt.s0)(),u=(0,i.useCallback)((e=>{e.preventDefault(),a?a():t&&c(t,jt)}),[a,c,t]);(0,i.useLayoutEffect)((()=>{l&&d.current?.closest('[role="row"], [role="listitem"]')?.querySelector("button")?.focus({preventScroll:!0})}),[l]);return{isActive:r,onClick:u,contents:s||o?(0,w.jsx)("span",{ref:d,children:(0,w.jsx)(gt.o,{autoEscape:!0,searchWords:[s.trim(),...o?.split(" ")??""],textToHighlight:n})}):n}}const Ut=({uri:e,playbackUri:t=e,title:n,menu:i,to:a=(0,m.EC)(e)?.toURLPath(!0)||"",handleNavigate:r})=>{const{isActive:o,contents:l}=Mt(t,a,n,r),d=`listrow-title-${e}`;return(0,w.jsx)(Ft._,{menu:i,children:(0,w.jsx)(Rt.g,{id:d,lineClamp:1,className:s()(At.link,At.titleLink),semanticColor:o?"textBrightAccent":"textBase",children:l})})},Bt=({uri:e,playbackUri:t=e,title:n,menu:i,to:a=(0,m.EC)(e)?.toURLPath(!0)||"",handleNavigate:r})=>{const{isActive:o,onClick:l,contents:d}=Mt(t,a,n,r);return(0,w.jsx)(Ft._,{menu:i,children:(0,w.jsx)(Lt.l,{lineClamp:1,className:s()(At.link,At.titleLink),semanticColor:o?"textBrightAccent":"textBase",href:a,onClick:l,role:"gridcell",children:d})})};var Vt=n(36747),Ht=n(29931),Gt=n(51385);const Wt=({isConfirmationForPlaylist:e,onConfirm:t,onClose:n})=>{const i=e?F.ag.get("web-player.your-library-x.unpin-confirmation-dialog.title-playlist"):F.ag.get("web-player.your-library-x.unpin-confirmation-dialog.title-folder");return(0,w.jsx)(Gt.Q,{"aria-label":i,titleText:i,descriptionText:e?F.ag.get("web-player.your-library-x.unpin-confirmation-dialog.message-playlist"):F.ag.get("web-player.your-library-x.unpin-confirmation-dialog.message-folder"),onConfirm:t,onClose:n,confirmText:F.ag.get("web-player.your-library-x.unpin-confirmation-dialog.confirm-button-text"),confirmLabel:e?F.ag.get("web-player.your-library-x.unpin-confirmation-dialog.confirm-button-label-playlist"):F.ag.get("web-player.your-library-x.unpin-confirmation-dialog.confirm-button-label-folder"),cancelText:F.ag.get("web-player.your-library-x.unpin-confirmation-dialog.cancel-button-text"),allowHTML:!0})};function zt(e,t,n){const a=(0,Pe.y)(),{contains:s}=(0,Ht.P)("ylpin"),[r,o]=(0,i.useState)(null),l=(0,i.useCallback)((async(t,i)=>{if(n)return void e(t,i);const{[m.JM.PLAYLIST_V2]:a=[],[m.JM.FOLDER]:r=[]}=t,l=[...a,...r];if(!!l.length&&(await s(...l)).some(Boolean)){if(l.length>1)throw new Error("Reordering multiple pinned items at once is not supported");o({dropData:t,dropPosition:i})}else e(t,i)}),[n,s,e]),d=(0,D.$P)();return{applyDropWithUnpinConfirmation:l,unpinConfirmationDialog:r?(0,w.jsx)(Wt,{isConfirmationForPlaylist:!r.dropData.folder?.length,onClose:()=>o(null),onConfirm:async()=>{const{[m.JM.PLAYLIST_V2]:n=[],[m.JM.FOLDER]:i=[]}=r.dropData;await a.unpin([...n,...i][0]),d.logInteraction(t.dragUnpinItem({itemToUnpin:[...n,...i][0]})),e(r.dropData,r.dropPosition),o(null)}}):null}}function Kt(){const{dropOriginUri:e}=(0,i.useContext)(Oe.Ci);return"spotify:collection"===e}function Yt(){const e=(0,Vt.o)(),t=Kt();return(0,i.useCallback)((async(n,i)=>{const a=await e.contains(n);if(1!==new Set(a).size)throw new Error("Dropping a mix of newly added and moved playlists is not supported");if(a[0]){if(n.length>1)throw new Error("Moving multiple playlists at once is not supported");t?await e.move({uri:n[0]},i):await e.move({uri:n[0]},i,!0)}else await e.add(n,i)}),[t,e])}m.JM.PLAYLIST_V2,m.JM.FOLDER;const qt=300,Zt={state:{referrer:"your_library",preventMoveFocus:!0}};function Qt({uri:e,to:t=(0,m.EC)(e)?.toURLPath(!0)||"",handleNavigate:n,dragLabel:a,isPinned:s,canReorder:r,allowedDropTargetDropOnURITypes:o=[],onDropTargetDropOn:l,onLongDragOver:d,openDeleteDialog:c,togglePlay:u,isItemInGrid:p,playInsteadOfNavigating:g=!1,isPlaying:h,isActive:k,spec:v}){const f=(0,Dt.s0)(),y=(0,Dt.TH)(),_=(0,i.useCallback)((()=>{f(t,Zt)}),[f,t]),N=(0,D.$P)(),E=(0,i.useRef)(0),x=(0,i.useRef)(null),C=(0,i.useCallback)((({target:e})=>e instanceof HTMLElement&&!x.current?.contains(e)),[]),w=(0,i.useCallback)((i=>{if(!C(i)){if(i.preventDefault(),i.target.scrollIntoView({block:"nearest"}),g){if(E.current>Date.now())return;return E.current=Date.now()+qt,void(h||(u?.(),N.logInteraction(v.yourLibraryItemFactory().hitPlay({itemToBePlayed:e}))))}n?n():t&&f(t,Zt),N.logInteraction(v.yourLibraryItemFactory().hitUiNavigate({destination:e}))}}),[C,g,n,t,N,v,e,u,h,f]),I=(0,i.useCallback)((t=>{g||C(t)||u&&(k?h?N.logInteraction(v.yourLibraryItemFactory().doubleHitPause({itemToBePaused:e})):N.logInteraction(v.yourLibraryItemFactory().doubleHitResume({itemToBeResumed:e})):N.logInteraction(v.yourLibraryItemFactory().doubleHitPlay({itemToBePlayed:e})),u?.())}),[C,g,u,k,h,N,v,e]),T=(0,i.useCallback)((()=>{N.logInteraction(v.yourLibraryItemFactory().secondaryHitUiReveal())}),[N,v]),A=(0,Be.O)([e],a,"",0,"spotify:collection");let P=[];s?P=S.f9:r&&(P=S.WF);const O={[Fe.ON]:o,[Fe.BEFORE]:P,[Fe.AFTER]:P},{handleDropBeforeOrAfterRootlistItem:R,unpinConfirmationDialog:L}=function(e,t,n){const a=(0,Vt.o)(),s=(0,i.useContext)(b.H),r=(0,D.$P)(),o=Yt(),l=(0,i.useCallback)((async(i,l)=>{const{[m.JM.PLAYLIST_V2]:d=[],[m.JM.FOLDER]:[c]=[]}=i,u=l===Fe.BEFORE?{before:{uri:e}}:{after:{uri:e}};if(n){const e=d.at(0)??c;await s.pin(e,u),r.logInteraction(t.dragPinItem({itemToPin:e}))}else c?await a.moveFolder({uri:c},u):await o(d,u);r.logInteraction(t.dragSort())}),[e,n,s,r,t,a,o]),{unpinConfirmationDialog:d,applyDropWithUnpinConfirmation:c}=zt(l,t,n);return{handleDropBeforeOrAfterRootlistItem:(0,i.useCallback)((async(e,t)=>{const{[m.JM.PLAYLIST_V2]:n=[],[m.JM.FOLDER]:i=[]}=e;if(n.length&&i.length)throw new Error("Dropping a mix of playlists and folders is not supported");if(i.length>1)throw new Error("Dropping multiple folders is not supported");c(e,t)}),[c]),unpinConfirmationDialog:d}}(e,v,s),F=(0,i.useCallback)(((e,t)=>{t===Fe.ON?l?.(e,t):t!==Fe.BEFORE&&t!==Fe.AFTER||R(e,t)}),[l,R]),{dropPosition:j,className:M,...U}=Ye({uri:e,allowedURITypesByDropPosition:O,onDrop:F,onLongDragOver:d??_,reorderDirection:p?"horizontal":"vertical"}),B=(0,i.useCallback)((t=>{t.repeat||C(t)||("Backspace"!==t.key&&"Delete"!==t.key||!c||c(),"Enter"===t.key&&t.shiftKey&&u&&(t.preventDefault(),u()),"Enter"===t.key&&N.logInteraction(v.yourLibraryItemFactory().keyStrokeUiNavigate({destination:e})))}),[C,N,c,v,u,e]),V=(0,m.EC)(y.pathname,{parseUnknown:!0})?.toURI();return{onClick:w,onDoubleClick:I,draggable:!!a,onDragStart:A,onKeyDown:B,unpinConfirmationDialog:L,dropPosition:j,dropTargetClassName:M,logRightClick:T,isViewActive:!!V&&(0,m.U4)(e,V),itemRef:x,...U}}const Jt=e=>{switch(e){case R.p.ALBUM:return F.ag.get("web-player.your-library-x.type-album");case R.p.ARTIST:return F.ag.get("web-player.your-library-x.type-artist");case R.p.FOLDER:return F.ag.get("web-player.your-library-x.type-folder");case R.p.AUDIOBOOK:return F.ag.get("web-player.your-library-x.type-audiobook");case R.p.YOUR_EPISODES:case R.p.LOCAL_FILES:case R.p.LIKED_SONGS:case R.p.PLAYLIST:return F.ag.get("web-player.your-library-x.type-playlist");case R.p.SHOW:return F.ag.get("web-player.your-library-x.type-show");default:return(0,ct.U)(e)}},$t=e=>{switch(e){case R.p.YOUR_EPISODES:case R.p.LIKED_SONGS:case R.p.LOCAL_FILES:return R.p.PLAYLIST;default:return e}};var Xt=n(75630);const en=({pinned:e})=>e?(0,w.jsx)(Xt.t,{semanticColor:"textBrightAccent",iconSize:16,title:F.ag.get("web-player.your-library-x.pinned"),className:At.icon}):null,tn="eB4weTwpV1CJo1Ycry5o",nn="DHzyoCWhWjunaSpGo3fm",an="R7bnv14gXI2ndBOqFvCf",sn="IyHaBob4EvHvpR1d0aMt",rn=({uri:e,to:t=(0,m.EC)(e)?.toURLPath(!0)||"",handleNavigate:n,dragLabel:i,name:a,subtitle:r,cover:o,type:l,downloadButton:d,canReorder:c,allowedDropTargetDropOnURITypes:u,onDropTargetDropOn:p,onLongDragOver:g,menu:h,leading:k,openDeleteDialog:f,togglePlay:y,isPinned:S,shouldShowType:b,playbackUri:_,isPlaying:N,isActive:E,playInsteadOfNavigating:x,spec:C})=>{const{onClick:I,onDoubleClick:T,draggable:A,onDragStart:P,onKeyDown:O,dropPosition:D,dropTargetClassName:R,unpinConfirmationDialog:L,logRightClick:F,isViewActive:j,itemRef:M,...U}=Qt({uri:e,to:t,handleNavigate:n,dragLabel:i,isPinned:S,canReorder:c,allowedDropTargetDropOnURITypes:u,onDropTargetDropOn:p,openDeleteDialog:f,onLongDragOver:g,togglePlay:y,isItemInGrid:!0,isPlaying:N,isActive:E,spec:C,playInsteadOfNavigating:x}),B=(0,w.jsx)(Bt,{uri:e,title:a,menu:h,handleNavigate:n,playbackUri:_}),V=(0,w.jsx)(Ot,{leading:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(en,{pinned:S}),d]}),subtitle:(0,w.jsxs)(w.Fragment,{children:[b&&Jt(l),!!r&&b&&" • ",r]}),uri:e});return(0,w.jsxs)(w.Fragment,{children:[L,(0,w.jsx)(Ct,{draggable:A,onDragStart:P,onKeyDown:O,className:s()(R,{[qe]:D===Fe.ON,[Qe]:D===Fe.BEFORE,[Je]:D===Fe.AFTER}),"aria-selected":E,innerRef:M,children:(0,w.jsx)(v._P,{menu:h,onShow:F,children:(0,w.jsx)(wt.Q,{uri:e,trigger:wt.x.OnMouseDown,children:(0,w.jsx)(vt.Z,{id:e,title:B,subtitle:V,media:o,size:"sm",leading:k,className:tn,variant:j?"tinted":void 0,onClick:I,onDoubleClick:T,padding:ft.nuo,...U})})})})]})};var on=n(96768),ln=n(81281),dn=n(42531),cn=n(4183),un=n(17201);const mn=({name:e,uri:t,togglePlay:n,spec:a,isActive:r,isPlaying:o})=>{const l=(0,D.$P)(),d=(0,i.useCallback)((()=>{r?o?l.logInteraction(a.yourLibraryItemFactory().doubleHitPause({itemToBePaused:t})):l.logInteraction(a.yourLibraryItemFactory().doubleHitResume({itemToBeResumed:t})):l.logInteraction(a.yourLibraryItemFactory().doubleHitPlay({itemToBePlayed:t})),n()}),[r,o,l,a,n,t]);return(0,w.jsx)("div",{className:s()(an,{[sn]:o}),role:"gridcell",children:(0,w.jsx)(un.f,{isPlaying:o,onClick:d,ariaPlayLabel:F.ag.get("playlist.a11y.play",e),ariaPauseLabel:F.ag.get("playlist.a11y.pause",e)})})};var pn=n(41836);const gn=(0,i.createContext)({optimizeImage:e=>e});let hn=function(e){return e.ALBUM_COVER="ab67616d",e.PLAYLIST="ab67706c",e.ARTIST_AVATAR="ab676161",e.PODCAST_COVER="ab676563",e.AUDIOBOOK_COVERS="ab676663",e}({});const kn={[hn.ALBUM_COVER]:{jpeg:{"00004851":64,"00001e02":300,"0000b273":640},webp_85:{"000011eb":64,"0000e1a3":300,"0000aa54":640},webp_35:{"000001e7":64,"00001a9d":300,"0000d619":640}},[hn.PLAYLIST]:{jpeg:{"00006c11":64,"0000da84":300,"0000bebb":640},webp_85:{"0000dec5":64,"0000d72c":300,"000097ac":640},webp_35:{"00003d08":64,"0000f8e4":300,"000034f2":640}},[hn.ARTIST_AVATAR]:{jpeg:{"0000f178":160,"00005174":320,"0000e5eb":640},webp_85:{"0000101f":160,"0000939b":320,"000086f7":640},webp_35:{"0000a000":160,"0000f254":320,"0000b64f":640}},[hn.PODCAST_COVER]:{jpeg:{"0000f68d":64,"00005f1f":300,"0000ba8a":640},webp_85:{"0000955f":64,"0000bdcf":300,"0000eeee":640},webp_35:{"0000a26f":64,"0000c344":300,"0000f5b9":640}},[hn.AUDIOBOOK_COVERS]:{jpeg:{"0000703b":64,"0000db5b":300,"000022a8":640},webp_85:{"00000c35":64,"000076bd":300,"0000382d":640},webp_35:{"00000c13":64,"00009783":300,"0000bd1a":640}}},vn=(0,Re.y)(hn);const fn=({children:e})=>{const t=(0,c.W6)(pn.wm,{loadingValue:!1});let n=!1;const a=new globalThis.Image;a.onload=()=>{n=1===a.width},a.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=";const s=(0,i.useCallback)(((e,i)=>{if(!t)return e;const a=!0===navigator.connection?.saveData;return function(e,t,n){const[i,a,s,r,o]=e?.match(Sn)??[];if(vn(s)){const e=function(e,t,n,{supportsWebP:i,devicePixelRatio:a=1,isSaveDataEnabled:s}={}){const r=kn[e]??{},{jpeg:o,webp_85:l,webp_35:d}=r;if(t in o||t in l||t in d){const e=a>1.5;let o="jpeg";if(i){const t=Object.values(r.webp_35).at(-1)??0;o=s||n&&e&&t>=n*a?"webp_35":"webp_85"}if(n){const e=Object.entries(r[o]);for(const[t,i]of e)if(i>=n*a)return t;return e.at(-1)?.[0]??t}}return t}(s,r,t,n);if(e!==r){return`${a}${s}${e}${o}`}}return e}(e,i,{supportsWebP:n,isSaveDataEnabled:a,devicePixelRatio})}),[n,t]);return(0,w.jsx)(gn.Provider,{value:{optimizeImage:s},children:e})};function yn(){const e=(0,i.useContext)(gn).optimizeImage;return(0,i.useCallback)(((t,n)=>{if(t?.length){const i=t[0].url,a=e(i,n);if(a!==i)return[{url:a}]}return t}),[e])}const Sn=/^(https:\/\/i\.scdn\.co\/image\/|spotify:image:)([0-9a-f]{8})([0-9a-f]{8})(.*)$/;const bn=(0,i.memo)((function({title:e,type:t,images:n,isCircular:i,color:a}){const s=yn();return(0,w.jsx)(ln.O,{fadeIn:!0,images:s(n,48),shape:i?ln.K.CIRCLE:ln.K.ROUNDED_CORNERS,size:dn.m$.SIZE_48,iconSize:24,type:t,title:e,className:At.entityImage,color:a,loadingMode:"eager"})})),_n=(0,i.memo)((function({title:e,type:t,uri:n,images:i,isCircular:a,togglePlay:s,color:r,spec:o,isActive:l,isPlaying:d}){const c=yn();return(0,w.jsx)("div",{className:nn,children:(0,w.jsx)(on.x,{images:c(i,Ci),FallbackComponent:e=>(0,w.jsx)(cn.t,{semanticColor:"textSubdued",type:t,iconSize:64,...e}),isCircular:a,color:r,loadingMode:"eager",children:s&&(0,w.jsx)(mn,{name:e,uri:n,togglePlay:s,spec:o,isActive:l,isPlaying:d})})})}));var Nn=n(13557);const En="_ymJNIfklFmogab9uWY1",xn=({folderDepth:e=0})=>(0,w.jsx)("li",{className:En,style:{"--ylx-folder-depth":e}}),Cn=e=>{const{RowVariantComponent:t,uri:n,to:i=(0,m.EC)(n)?.toURLPath(!0)||"",handleNavigate:a,folderDepth:r,className:o,dragLabel:l,isPinned:d,canReorder:c,allowedDropTargetDropOnURITypes:u,onDropTargetDropOn:p,onLongDragOver:g,style:h,openDeleteDialog:k,togglePlay:v,isPlaying:f,isActive:y,menu:S,name:b,subtitle:_,downloadButton:N,expandFolderButton:E,cover:x,alt:C,type:I,addedAt:T,lastPlayedAt:A,shouldShowType:P,playbackUri:O,playInsteadOfNavigating:D,spec:R,...L}=e,{onClick:F,onDoubleClick:j,onDragStart:M,onKeyDown:U,dropPosition:B,dropTargetClassName:V,draggable:H,unpinConfirmationDialog:G,logRightClick:W,isViewActive:z,itemRef:K,...Y}=Qt({uri:n,to:i,handleNavigate:a,dragLabel:l,isPinned:d,canReorder:c,allowedDropTargetDropOnURITypes:u,onDropTargetDropOn:p,onLongDragOver:g,openDeleteDialog:k,togglePlay:v,isPlaying:f,isActive:y,playInsteadOfNavigating:D,spec:R});return(0,w.jsxs)(w.Fragment,{children:[G,B===Fe.BEFORE&&(0,w.jsx)(xn,{folderDepth:r}),(0,w.jsx)(Nn.E,{style:{"--ylx-folder-depth":r,...h},draggable:H,onDragStart:M,onDoubleClick:j,className:s()(o,V,xe,{[qe]:B===Fe.ON}),...L,...Y,onKeyDown:U,innerRef:K,children:(0,w.jsx)(t,{...e,to:i,isActive:y,isViewActive:z,onClick:F,logRightClick:W,playInsteadOfNavigating:D})}),B===Fe.AFTER&&(0,w.jsx)(xn,{folderDepth:r})]})};function wn(e){const{uri:t,artists:n}=e,{filter:a}=(0,i.useContext)(it.fo),{isPlaying:s,isActive:r}=(0,kt.cR)(t),l=(0,o.I0)(),d=(0,i.useCallback)((()=>{l((0,ut.YU)(t))}),[l,t]),{togglePlay:c}=(0,ht.n)({uri:t},{featureIdentifier:"album",referrerIdentifier:"your_library"});return{isPlaying:s,isActive:r,openDeleteDialog:d,togglePlay:c,menu:(0,w.jsx)(mt.Y,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0}),subtitleText:(0,w.jsx)(gt.o,{searchWords:[a.trim()],textToHighlight:n.at(0)?.name??""}),downloadButton:(0,w.jsx)(pt.$,{uri:t,size:12,className:At.icon,as:"span"})}}const In=({libraryItem:e,shouldShowType:t=!1,RowVariantComponent:n,spec:i})=>{const{uri:a,images:s,name:r,pinned:o,type:l,addedAt:d,lastPlayedAt:c,color:u}=e,{isPlaying:m,isActive:p,openDeleteDialog:g,togglePlay:h,menu:k,subtitleText:v,downloadButton:f}=wn(e),y=(0,w.jsx)(bn,{title:r,type:l,images:s,color:u});return(0,w.jsx)(Cn,{RowVariantComponent:n,uri:a,cover:y,name:r,subtitle:v,downloadButton:f,alt:r,type:l,dragLabel:r,menu:k,togglePlay:h,openDeleteDialog:g,addedAt:d,lastPlayedAt:c,isPinned:o,isPlaying:m,isActive:p,shouldShowType:t,spec:i})},Tn=({libraryItem:e,shouldShowType:t=!1,spec:n})=>{const{uri:i,images:a,name:s,pinned:r,type:o,color:l}=e,{togglePlay:d,menu:c,subtitleText:u,downloadButton:m,openDeleteDialog:p,isPlaying:g,isActive:h}=wn(e),k=(0,w.jsx)(_n,{title:s,type:o,images:a,uri:i,togglePlay:d,color:l,spec:n,isActive:h,isPlaying:g});return(0,w.jsx)(rn,{uri:i,name:s,subtitle:u,menu:c,dragLabel:s,cover:k,downloadButton:m,type:o,togglePlay:d,isPinned:r,shouldShowType:t,openDeleteDialog:p,isPlaying:g,isActive:h,spec:n})};var An=n(14280);function Pn(e){const{uri:t}=e,n=(0,o.I0)(),{togglePlay:a}=(0,ht.n)({uri:t},{featureIdentifier:"artist",referrerIdentifier:"your_library"}),{isPlaying:s,isActive:r}=(0,kt.cR)(t);return{togglePlay:a,isPlaying:s,isActive:r,openDeleteDialog:(0,i.useCallback)((()=>{n((0,ut.YU)(t))}),[n,t]),menu:(0,w.jsx)(An.m,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0})}}const On=({libraryItem:e,shouldShowType:t,RowVariantComponent:n,spec:i})=>{const{uri:a,images:s,name:r,type:o,addedAt:l,lastPlayedAt:d,pinned:c,color:u}=e,{togglePlay:m,isPlaying:p,isActive:g,openDeleteDialog:h,menu:k}=Pn(e),v=(0,w.jsx)(bn,{title:r,type:o,images:s,isCircular:!0,color:u});return(0,w.jsx)(Cn,{RowVariantComponent:n,uri:a,cover:v,name:r,type:o,alt:r,dragLabel:r,menu:k,togglePlay:m,openDeleteDialog:h,addedAt:l,lastPlayedAt:d,isPlaying:p,isActive:g,isPinned:c,shouldShowType:t,spec:i})},Dn=({libraryItem:e,shouldShowType:t,spec:n})=>{const{uri:i,images:a,name:s,type:r,pinned:o,color:l}=e,{togglePlay:d,menu:c,openDeleteDialog:u,isPlaying:m,isActive:p}=Pn(e),g=(0,w.jsx)(_n,{title:s,type:r,images:a,uri:i,togglePlay:d,isCircular:!0,color:l,spec:n,isActive:p,isPlaying:m});return(0,w.jsx)(rn,{uri:i,name:s,menu:c,dragLabel:s,cover:g,type:r,togglePlay:d,isPinned:o,shouldShowType:t,openDeleteDialog:u,isPlaying:m,isActive:p,spec:n})};var Rn=n(99553);function Ln(e){const{uri:t,authorName:n}=e,{filter:a}=(0,i.useContext)(it.fo),s=(0,o.I0)(),{isPlaying:r,isActive:l}=(0,kt.cR)(t),{togglePlay:d}=(0,ht.n)({uri:t},{featureIdentifier:"audiobook",referrerIdentifier:"your_library"});return{isPlaying:r,isActive:l,openDeleteDialog:(0,i.useCallback)((()=>{s((0,ut.YU)(t))}),[s,t]),togglePlay:d,menu:(0,w.jsx)(Rn.X,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0}),subtitleText:(0,w.jsx)(gt.o,{searchWords:[a.trim()],textToHighlight:n})}}const Fn=({libraryItem:e,shouldShowType:t,RowVariantComponent:n,spec:i})=>{const{uri:a,images:s,name:r,type:o,pinned:l,addedAt:d,lastPlayedAt:c,color:u}=e,{isPlaying:m,isActive:p,openDeleteDialog:g,togglePlay:h,menu:k,subtitleText:v}=Ln(e),f=(0,w.jsx)(bn,{title:r,type:o,images:s,color:u});return(0,w.jsx)(Cn,{RowVariantComponent:n,uri:a,cover:f,name:r,subtitle:v,alt:r,dragLabel:r,menu:k,togglePlay:h,openDeleteDialog:g,addedAt:d,lastPlayedAt:c,isPlaying:m,isActive:p,isPinned:l,shouldShowType:t,type:o,spec:i})},jn=({libraryItem:e,shouldShowType:t,spec:n})=>{const{uri:i,images:a,name:s,type:r,pinned:o,color:l}=e,{togglePlay:d,menu:c,subtitleText:u,openDeleteDialog:m,isPlaying:p,isActive:g}=Ln(e),h=(0,w.jsx)(_n,{title:s,type:r,images:a,uri:i,togglePlay:d,color:l,spec:n,isActive:g,isPlaying:p});return(0,w.jsx)(rn,{uri:i,name:s,subtitle:u,menu:c,dragLabel:s,cover:h,togglePlay:d,isPinned:o,shouldShowType:t,type:r,openDeleteDialog:m,isPlaying:p,isActive:g,spec:n})};var Mn=n(30366),Un=n(77675),Bn=n(90055),Vn=n(68640);function Hn(e,t){const{createPlaylistFromAlbum:n,createPlaylistFromTracks:a}=(0,B.K)(),s=(0,D.$P)(),r=(0,Vt.o)(),o=Yt(),l=(0,i.useCallback)((n=>{if(!t)return;const{[m.JM.PLAYLIST_V2]:i=[],[m.JM.FOLDER]:a=[]}=n,l={after:{uri:t}};i.length&&(o(i,l),s.logInteraction(e.dragSort())),a.length&&(r.moveFolder({uri:a[0]},l),s.logInteraction(e.dragSort()))}),[o,s,r,e,t]),{unpinConfirmationDialog:d,applyDropWithUnpinConfirmation:c}=zt(l,e);return{unpinConfirmationDialog:d,handleDropOnFolder:(0,i.useCallback)((async i=>{if(!t)return;const{[m.JM.TRACK]:r=[],[m.JM.LOCAL_TRACK]:o=[],[m.JM.ALBUM]:l=[],[m.JM.EPISODE]:d=[],[m.JM.PLAYLIST_V2]:u=[],[m.JM.FOLDER]:p=[]}=i,g={after:{uri:t}};u.length||p.length?c(i,Fe.ON):l.length?(n(l[0],g),s.logInteraction(e.yourLibraryItemFactory().dragCreatePlaylist())):(r.length||o.length||d.length)&&(a([...r,...o,...d],g),s.logInteraction(e.yourLibraryItemFactory().dragCreatePlaylist()))}),[t,c,n,s,e,a])}}const Gn=[m.JM.TRACK,m.JM.LOCAL_TRACK,m.JM.ALBUM,m.JM.EPISODE,m.JM.PLAYLIST_V2,m.JM.FOLDER];function Wn(e,t){const{uri:n,name:a,numberOfFolders:s,numberOfPlaylists:r,pinned:l}=e,{isPlaying:d,isActive:c}=(0,kt.cR)(n),{pushFolder:u}=(0,i.useContext)(at),m=(0,o.I0)(),{togglePlay:p}=(0,ht.n)({uri:n},{featureIdentifier:"folder",referrerIdentifier:"your_library"}),g=(0,o.v9)((e=>e.platform.isDesktop)),{handleDropOnFolder:h,unpinConfirmationDialog:k}=Hn(t,n),{renameFolder:v}=(0,Vn.lh)(),f=h,y=[r>0||!s?F.ag.get("web-player.your-library-x.rows.folder.number-of-playlists",r):null,s>0?F.ag.get("web-player.your-library-x.rows.folder.number-of-folders",s):null].filter(Ge.K).join(F.ag.getSeparator()),S=(0,i.useCallback)(((t="")=>{v(e,t)}),[e,v]),b=(0,i.useCallback)((()=>{u(e.uri)}),[e.uri,u]);return{openDeleteDialog:(0,i.useCallback)((()=>{m((0,ut.Q2)(n))}),[m,n]),togglePlay:g?p:void 0,menu:(0,w.jsx)(Bn.A,{reference:{uri:n},name:a,canPin:e.canPin,isPinned:l,onRename:S}),subtitleText:y,onDropTargetDropOn:f,handleNavigate:b,dropOnFolderUnpinConfirmationDialog:k,isPlaying:d,isActive:c}}const zn=({libraryItem:e,RowVariantComponent:t,spec:n})=>{const{uri:a,folderDepth:r,name:o,type:l,isFlattened:d,pinned:c,canReorder:u}=e,{openDeleteDialog:p,togglePlay:g,menu:h,subtitleText:k,onDropTargetDropOn:v,handleNavigate:f,dropOnFolderUnpinConfirmationDialog:y,isPlaying:S,isActive:b}=Wn(e,n),[_,N]=function(e){const{getIsFolderExpanded:t,setIsFolderExpanded:n}=(0,i.useContext)(ae);return[(0,i.useMemo)((()=>t(e)),[t,e]),(0,i.useCallback)((t=>{n(e,t)}),[n,e])]}(a),E=(0,D.$P)(),x=(0,i.useCallback)((()=>{N(!0),E.logInteraction(n.yourLibraryItemFactory().dragUiReveal())}),[E,N,n]),C=(0,i.useCallback)((e=>{e.stopPropagation()}),[]),I=(0,i.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),N(!_),_?E.logInteraction(n.yourLibraryItemFactory().toggleFolderButtonFactory().hitUiHide()):E.logInteraction(n.yourLibraryItemFactory().toggleFolderButtonFactory().hitUiReveal())}),[N,_,E,n]),T=!d&&(0,w.jsx)(Mn.o,{"aria-label":_?F.ag.get("web-player.your-library-x.collapse-folder"):F.ag.get("web-player.your-library-x.expand-folder"),iconOnly:Un.i,buttonSize:"sm",condensedAll:!0,onClick:I,onDoubleClick:C,tabIndex:-1,className:s()(me,pe,{[Ee]:!_})}),A=(0,w.jsx)(bn,{title:o,type:l});return(0,w.jsxs)(w.Fragment,{children:[y,(0,w.jsx)(Cn,{RowVariantComponent:t,uri:a,to:`/folder/${(0,m.EC)(a)?.id??""}`,handleNavigate:f,folderDepth:r,cover:A,name:o,subtitle:k,alt:o,dragLabel:o,menu:h,canReorder:u,allowedDropTargetDropOnURITypes:Gn,onDropTargetDropOn:v,onLongDragOver:x,togglePlay:g,openDeleteDialog:p,addedAt:e.addedAt,lastPlayedAt:e.lastPlayedAt,isPinned:c,shouldShowType:!1,type:l,isPlaying:S,isActive:b,expandFolderButton:T,spec:n})]})},Kn=({libraryItem:e,spec:t})=>{const{uri:n,name:i,type:a,pinned:s,canReorder:r}=e,{togglePlay:o,menu:l,subtitleText:d,onDropTargetDropOn:c,handleNavigate:u,openDeleteDialog:p,isPlaying:g,isActive:h}=Wn(e,t),k=(0,w.jsx)(_n,{title:i,type:a,uri:n,togglePlay:o,spec:t,isActive:h,isPlaying:g});return(0,w.jsx)(rn,{uri:n,to:`/folder/${(0,m.EC)(n)?.id??""}`,handleNavigate:u,cover:k,name:i,subtitle:d,menu:l,dragLabel:i,canReorder:r,allowedDropTargetDropOnURITypes:Gn,onLongDragOver:u,onDropTargetDropOn:c,togglePlay:o,isPinned:s,shouldShowType:!1,type:a,openDeleteDialog:p,isPlaying:g,isActive:h,spec:t})};var Yn=n(1996),qn=n(98340),Zn=n(45118),Qn=n(64109);const Jn=i.memo((function({uri:e,canPin:t,isPinned:n}){const{spec:i}=(0,Zn.T)(e);return(0,w.jsx)(qn.ZP,{value:"generic",children:(0,w.jsx)(Yn.v,{children:t!==S.TL.NO&&(0,w.jsx)(Qn.X,{uri:e,canPin:t,isPinned:n,type:R.p.PLAYLIST,spec:i})})})}));var $n=n(82108);const Xn=[m.JM.TRACK];function ei(e){const{numberOfSongs:t}=e,n="spotify:collection:tracks",{user:a}=(0,o.v9)($n.Gg),s=(0,m.wG)(a?.id).toURI(),r=s,l=s,{togglePlay:d}=(0,ht.n)({uri:r},{featureIdentifier:"your_library",referrerIdentifier:"your_library"}),c=(0,i.useContext)(b.H),{isPlaying:u,isActive:p}=(0,kt.cR)(r),g=(0,i.useCallback)((e=>{const{[m.JM.TRACK]:t=[]}=e;t?.length&&c?.add(...t)}),[c]);return{isPlaying:u,isActive:p,togglePlay:d,menu:(0,w.jsx)(Jn,{uri:n,canPin:e.canPin,isPinned:e.pinned}),downloadButton:(0,w.jsx)(pt.$,{uri:l,size:12,className:At.icon,as:"span"}),subtitleText:(0,w.jsx)(w.Fragment,{children:F.ag.get("web-player.your-library-x.rows.liked-songs.subtitle",t)}),onDropTargetDropOn:g,playbackUri:r,uri:n}}const ti=({libraryItem:e,shouldShowType:t,RowVariantComponent:n,spec:i})=>{const{images:a,name:s,type:r,pinned:o,addedAt:l,lastPlayedAt:d,color:c}=e,{isPlaying:u,isActive:m,togglePlay:p,menu:g,subtitleText:h,onDropTargetDropOn:k,playbackUri:v,uri:f,downloadButton:y}=ei(e),S=(0,w.jsx)(bn,{title:s,type:r,images:a,color:c});return(0,w.jsx)(Cn,{RowVariantComponent:n,uri:f,cover:S,name:s,subtitle:h,alt:s,dragLabel:s,menu:g,allowedDropTargetDropOnURITypes:Xn,onDropTargetDropOn:k,togglePlay:p,addedAt:l,lastPlayedAt:d,isPlaying:u,isActive:m,isPinned:o,shouldShowType:t,type:r,playbackUri:v,downloadButton:y,spec:i})},ni=({libraryItem:e,shouldShowType:t,spec:n})=>{const{images:i,name:a,type:s,pinned:r,color:o}=e,{togglePlay:l,menu:d,subtitleText:c,onDropTargetDropOn:u,playbackUri:m,uri:p,downloadButton:g,isPlaying:h,isActive:k}=ei(e),v=(0,w.jsx)(_n,{title:a,type:s,images:i,uri:m,togglePlay:l,color:o,spec:n,isActive:k,isPlaying:h});return(0,w.jsx)(rn,{uri:p,name:a,subtitle:c,menu:d,dragLabel:a,allowedDropTargetDropOnURITypes:Xn,onDropTargetDropOn:u,cover:v,togglePlay:l,isPinned:r,shouldShowType:t,type:s,playbackUri:m,downloadButton:g,isPlaying:h,isActive:k,spec:n})};var ii=n(75257),ai=n(73460),si=n(79923),ri=n(13791);function oi(e){const{numberOfFiles:t}=e,n=ri.b,i=(0,si.gB)().uri,{isPlaying:a,isActive:s}=(0,kt.cR)(n);return{playbackUri:n,uri:i,isPlaying:a,isActive:s,menu:(0,w.jsx)(Jn,{uri:i,canPin:e.canPin,isPinned:e.pinned}),downloadButton:(0,w.jsx)(ii.E,{iconSize:16,className:At.icon,semanticColor:"textBrightAccent"}),subtitleText:F.ag.get("web-player.your-library-x.rows.local-files.subtitle",t)}}const li=({libraryItem:e,shouldShowType:t,RowVariantComponent:n,spec:i})=>{const{name:a,addedAt:s,lastPlayedAt:r,type:o,pinned:l}=e,{playbackUri:d,uri:c,isPlaying:u,menu:m,subtitleText:p,downloadButton:g,isActive:h}=oi(e),k=(0,w.jsx)("div",{className:ge,children:(0,w.jsx)(ai.S,{iconSize:24,title:a})});return(0,w.jsx)(Cn,{RowVariantComponent:n,uri:c,name:a,subtitle:p,alt:a,dragLabel:a,menu:m,addedAt:s,lastPlayedAt:r,isPinned:l,isPlaying:u,isActive:h,shouldShowType:t,playbackUri:d,downloadButton:g,cover:k,type:o,spec:i})},di=({libraryItem:e,shouldShowType:t,spec:n})=>{const{name:i,images:a,type:s,pinned:r}=e,{playbackUri:o,uri:l,menu:d,downloadButton:c,subtitleText:u,isPlaying:m,isActive:p}=oi(e),g=(0,w.jsx)("div",{className:nn,children:(0,w.jsx)(on.x,{images:a,FallbackComponent:ai.S})});return(0,w.jsx)(rn,{uri:l,name:i,subtitle:u,menu:d,cover:g,type:s,playbackUri:o,downloadButton:c,isPinned:r,shouldShowType:t,isPlaying:m,isActive:p,spec:n})};var ci=n(3770);const ui=({index:e,type:t})=>(0,w.jsx)(ci.id,{columnIndex:0,children:(0,w.jsx)(vt.Z,{className:tn,media:(0,w.jsx)(on.x,{images:[],FallbackComponent:()=>(0,w.jsx)(cn.t,{type:t,iconSize:64,semanticColor:"textSubdued"}),isCircular:t===R.p.ARTIST}),variant:"naked",id:e,title:""})});var mi=n(92403),pi=n(70079);const gi=[m.JM.TRACK,m.JM.LOCAL_TRACK,m.JM.ALBUM,m.JM.EPISODE];function hi(e,t){const{uri:n,isLoading:a,owner:s,pinned:r}=e,l=(0,i.useContext)(Vn.ZF),{filter:d}=(0,i.useContext)(it.fo);(0,i.useEffect)((()=>{a&&l.resync(n)}),[l,n,a]);const{togglePlay:c}=(0,ht.n)({uri:n},{featureIdentifier:"playlist",referrerIdentifier:"your_library"}),{isPlaying:u,isActive:p}=(0,kt.cR)(n),g=(0,o.I0)(),h=(0,D.$P)();let k,v=[];const f=(0,i.useCallback)((async e=>{const{[m.JM.TRACK]:i=[],[m.JM.LOCAL_TRACK]:a=[],[m.JM.ALBUM]:s=[],[m.JM.EPISODE]:r=[]}=e,o=[...i,...a,...s,...r];g((0,mi.jV)(n,o)),h.logInteraction(t.yourLibraryItemFactory().dragAddToPlaylist({itemToBeAdded:o.at(0)??"",playlist:n}))}),[g,h,t,n]);e.canAddTo&&(v=gi,k=f);return{openDeleteDialog:(0,i.useCallback)((()=>{g((0,ut.p_)(n))}),[g,n]),togglePlay:c,isPlaying:u,isActive:p,menu:(0,w.jsx)(pi.j,{reference:e,canPin:e.canPin,isPinned:r,useDialogForUnfollow:!0,isInLibrary:!0}),downloadButton:(0,w.jsx)(pt.$,{uri:n,size:12,className:At.icon,as:"span"}),subtitleText:(0,rt.MW)(n)?(0,w.jsx)(w.Fragment,{children:F.ag.get("ylx.clicktoplay")}):(s.uri,(0,w.jsx)(gt.o,{searchWords:[d.trim()],textToHighlight:s.name})),allowedDropTargetDropOnURITypes:v,onDropTargetDropOn:k}}const ki=({libraryItem:e,shouldShowType:t,RowVariantComponent:n,spec:i})=>{const{uri:a,images:s,folderDepth:r,name:o,type:l,pinned:d,addedAt:c,lastPlayedAt:u,color:m,canReorder:p}=e,{openDeleteDialog:g,togglePlay:h,isPlaying:k,isActive:v,menu:f,downloadButton:y,subtitleText:S,allowedDropTargetDropOnURITypes:b,onDropTargetDropOn:_}=hi(e,i),N=(0,w.jsx)(bn,{title:o,type:l,images:s,color:m});return(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(Cn,{RowVariantComponent:n,uri:a,folderDepth:r,cover:N,name:o,subtitle:S,alt:o,dragLabel:o,menu:f,canReorder:p,allowedDropTargetDropOnURITypes:b,onDropTargetDropOn:_,togglePlay:h,openDeleteDialog:g,addedAt:c,lastPlayedAt:u,isPlaying:k,isActive:v,isPinned:d,shouldShowType:t,type:l,downloadButton:y,spec:i,playInsteadOfNavigating:(0,rt.MW)(a)})})},vi=({libraryItem:e,shouldShowType:t,spec:n})=>{const{uri:i,images:a,name:s,type:r,pinned:o,color:l,canReorder:d}=e,{togglePlay:c,menu:u,downloadButton:m,subtitleText:p,onDropTargetDropOn:g,allowedDropTargetDropOnURITypes:h,openDeleteDialog:k,isPlaying:v,isActive:f}=hi(e,n),y=(0,w.jsx)(_n,{title:s,type:r,images:a,uri:i,togglePlay:c,color:l,spec:n,isActive:f,isPlaying:v});return(0,w.jsx)(rn,{uri:i,name:s,subtitle:p,menu:u,dragLabel:s,canReorder:d,allowedDropTargetDropOnURITypes:h,onDropTargetDropOn:g,cover:y,togglePlay:c,isPinned:o,shouldShowType:t,type:r,downloadButton:m,openDeleteDialog:k,isPlaying:v,isActive:f,spec:n,playInsteadOfNavigating:(0,rt.MW)(i)})};var fi=n(762);function yi(e){const{uri:t,publisher:n}=e,{filter:a}=(0,i.useContext)(it.fo),s=(0,o.I0)(),{togglePlay:r}=(0,ht.n)({uri:t},{featureIdentifier:"show",referrerIdentifier:"your_library"}),{isPlaying:l,isActive:d}=(0,kt.cR)(t);return{isPlaying:l,isActive:d,openDeleteDialog:(0,i.useCallback)((()=>{s((0,ut.YU)(t))}),[s,t]),togglePlay:r,menu:(0,w.jsx)(fi.M,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0}),downloadButton:(0,w.jsx)(pt.$,{uri:t,size:12,className:At.icon,as:"span"}),subtitleText:(0,w.jsx)(gt.o,{autoEscape:!0,searchWords:[a.trim()],textToHighlight:n})}}const Si=({libraryItem:e,shouldShowType:t,RowVariantComponent:n,spec:i})=>{const{uri:a,images:s,name:r,type:o,addedAt:l,lastPlayedAt:d,pinned:c,color:u}=e,{isPlaying:m,isActive:p,openDeleteDialog:g,togglePlay:h,menu:k,downloadButton:v,subtitleText:f}=yi(e),y=(0,w.jsx)(bn,{title:r,type:o,images:s,color:u});return(0,w.jsx)(Cn,{RowVariantComponent:n,uri:a,cover:y,name:r,subtitle:f,alt:r,dragLabel:r,menu:k,togglePlay:h,openDeleteDialog:g,addedAt:l,lastPlayedAt:d,isPlaying:m,isActive:p,isPinned:c,shouldShowType:t,type:o,downloadButton:v,spec:i})},bi=({libraryItem:e,shouldShowType:t,spec:n})=>{const{uri:i,images:a,name:s,type:r,pinned:o,color:l}=e,{togglePlay:d,menu:c,downloadButton:u,subtitleText:m,openDeleteDialog:p,isPlaying:g,isActive:h}=yi(e),k=(0,w.jsx)(_n,{title:s,type:r,images:a,uri:i,togglePlay:d,color:l,spec:n,isActive:h,isPlaying:g});return(0,w.jsx)(rn,{uri:i,name:s,subtitle:m,menu:c,dragLabel:s,cover:k,togglePlay:d,isPinned:o,shouldShowType:t,type:r,downloadButton:u,openDeleteDialog:p,isPlaying:g,isActive:h,spec:n})},_i=[m.JM.EPISODE];function Ni(e){const{numberOfDownloadedEpisodes:t}=e,{user:n}=(0,o.v9)($n.Gg),a=(0,m.wG)(n?.id,"your-episodes").toURI(),s="spotify:collection:your-episodes",{togglePlay:r}=(0,ht.n)({uri:a},{featureIdentifier:"episode",referrerIdentifier:"your_library"}),{isPlaying:l,isActive:d}=(0,kt.cR)(a),c=(0,i.useContext)(b.H),u=(0,i.useCallback)((e=>{const{[m.JM.EPISODE]:t=[]}=e;t?.length&&c?.add(...t)}),[c]);return{isPlaying:l,isActive:d,togglePlay:r,menu:(0,w.jsx)(Jn,{uri:s,canPin:e.canPin,isPinned:e.pinned}),downloadButton:t?(0,w.jsx)(ii.E,{iconSize:16,className:At.icon,semanticColor:"textBrightAccent"}):null,subtitleText:F.ag.get("web-player.your-library-x.subtitle-your-episodes"),onDropTargetDropOn:u,playbackUri:a,uri:s}}const Ei=({libraryItem:e,RowVariantComponent:t,spec:n})=>{const{images:i,name:a,type:s,pinned:r,lastPlayedAt:o,addedAt:l,color:d}=e,{isPlaying:c,isActive:u,togglePlay:m,menu:p,downloadButton:g,subtitleText:h,onDropTargetDropOn:k,playbackUri:v,uri:f}=Ni(e),y=(0,w.jsx)(bn,{title:a,type:s,images:i,color:d});return(0,w.jsx)(Cn,{RowVariantComponent:t,uri:f,cover:y,name:a,subtitle:h,alt:a,dragLabel:a,menu:p,allowedDropTargetDropOnURITypes:_i,onDropTargetDropOn:k,togglePlay:m,addedAt:l,lastPlayedAt:o,isPlaying:c,isActive:u,isPinned:r,shouldShowType:!1,type:s,downloadButton:g,playbackUri:v,spec:n})},xi=({libraryItem:e,spec:t})=>{const{images:n,name:i,type:a,pinned:s,color:r}=e,{togglePlay:o,menu:l,downloadButton:d,subtitleText:c,onDropTargetDropOn:u,playbackUri:m,uri:p,isPlaying:g,isActive:h}=Ni(e),k=(0,w.jsx)(_n,{title:i,type:a,images:n,uri:p,togglePlay:o,color:r,spec:t,isActive:h,isPlaying:g});return(0,w.jsx)(rn,{uri:p,name:i,subtitle:c,menu:l,dragLabel:i,allowedDropTargetDropOnURITypes:_i,onDropTargetDropOn:u,cover:k,togglePlay:o,playbackUri:m,downloadButton:d,isPinned:s,shouldShowType:!1,type:a,isPlaying:g,isActive:h,spec:t})},Ci=250,wi=(0,Re.y)(R.p),Ii=(0,i.memo)((function({item:e,primaryFilter:t,spec:n}){const i={shouldShowType:!(0,rt.MW)(e.uri)&&$t(e.type)!==t,spec:n};switch(e.type){case R.p.FOLDER:return(0,w.jsx)(Kn,{libraryItem:e,...i});case R.p.ALBUM:return(0,w.jsx)(Tn,{libraryItem:e,...i});case R.p.ARTIST:return(0,w.jsx)(Dn,{libraryItem:e,...i});case R.p.AUDIOBOOK:return(0,w.jsx)(jn,{libraryItem:e,...i});case R.p.SHOW:return(0,w.jsx)(bi,{libraryItem:e,...i});case R.p.PLAYLIST:return(0,w.jsx)(vi,{libraryItem:e,...i});case R.p.LIKED_SONGS:return(0,w.jsx)(ni,{libraryItem:e,...i});case R.p.YOUR_EPISODES:return(0,w.jsx)(xi,{libraryItem:e,...i});case R.p.LOCAL_FILES:return(0,w.jsx)(di,{libraryItem:e,...i});default:(0,ct.U)(e)}})),Ti=({getItems:e,scrollNodeRef:t,primaryFilter:n,nrValidItems:a,spec:s})=>{const r=(0,lt.S)(lt.Q.NEW_CARDS),o=(0,i.useRef)({}),l=(0,i.useCallback)((e=>(0,w.jsx)(ui,{index:e,type:wi(n)?n:void 0},e)),[n]),d=(0,i.useCallback)(((t,i)=>e(t,i).map(((e,i)=>e?(0,w.jsx)(Ii,{item:e,spec:s,primaryFilter:n},e.uri):l(`${t+i}`)))),[e,n,l,s]),c=(0,i.useCallback)(((e,t)=>{o.current={numColumns:e,rowHeight:t}}),[]);return(0,w.jsx)(ot.q,{config:r,children:(0,w.jsx)(Et,{firstInteractiveIsWrapper:!0,"aria-label":F.ag.get("web-player.your-library-x.your-library"),children:(0,w.jsx)(dt.u,{renderItems:d,nrItems:a,estimatedItemMaxHeight:Ci,scrollNodeRef:t,onGridResize:c})})})};var Ai=n(18600),Pi=n(89139),Oi=n(66946),Di=n(3289);const Ri="main-yourLibraryX-header",Li="main-yourLibraryX-collapseButtonWrapper",Fi="main-yourLibraryX-headerContent",ji="main-yourLibraryX-collapseButtonIsCollapsed",Mi="main-yourLibraryX-collapseButton",Ui="main-yourLibraryX-button",Bi="ha4xXmMVP7gCvKZh9Ipf",Vi="main-yourLibraryX-iconOnly",Hi="main-yourLibraryX-createButton",Gi="main-yourLibraryX-headerIsCollapsed",Wi="WYU7SXdABSulyirnmIYb",zi="DF8qJeKP7CRNb13tJeJg",Ki=({folderUri:e,dropTargetClassName:t,spec:n})=>{const{isCollapsed:a,ylxSidebarState:r,setYlxSidebarState:o}=(0,Oi.U)(),l=(0,D.$P)(),d=(0,i.useRef)(null);(0,i.useEffect)((()=>{r!==Oi.c.COLLAPSED&&(d.current=r)}),[r]);const c=(0,i.useCallback)((()=>{const e=r===Oi.c.COLLAPSED?d.current??Oi.c.DEFAULT:Oi.c.COLLAPSED;o(e),l.logInteraction(n.hitToggleState({stateBeforeToggle:null!==r?Oi.c[r].toLowerCase():"",stateAfterToggle:Oi.c[e].toLowerCase()}))}),[r,o,l,n]),u=a?Ai.$:Pi.n;return(0,w.jsx)(Di._,{label:a?F.ag.get("web-player.your-library-x.expand-your-library"):F.ag.get("web-player.your-library-x.collapse-your-library"),placement:a?"right":void 0,children:(0,w.jsx)(Mn.o,{"aria-label":a?F.ag.get("web-player.your-library-x.expand-your-library"):F.ag.get("web-player.your-library-x.collapse-your-library"),onClick:c,className:s()(Li,Ui,t),condensed:!0,iconLeading:e||a?void 0:u,iconOnly:e||a?u:void 0,children:!e&&!a&&F.ag.get("web-player.your-library-x.your-library")})})};var Yi=n(80734),qi=n(58507);const Zi=({dropTargetClassName:e,spec:t})=>{const{ylxSidebarState:n,setYlxSidebarState:i}=(0,Oi.U)(),a=n===Oi.c.DEFAULT,r=(0,D.$P)();return(0,w.jsx)(Di._,{label:a?F.ag.get("web-player.your-library-x.enlarge-your-library"):F.ag.get("web-player.your-library-x.reduce-your-library"),children:(0,w.jsx)(Mn.o,{className:s()(Ui,Vi,e),iconOnly:a?Yi.E:qi.D,"aria-label":a?F.ag.get("web-player.your-library-x.enlarge-your-library"):F.ag.get("web-player.your-library-x.reduce-your-library"),onClick:()=>{i(a?Oi.c.EXPANDED:Oi.c.DEFAULT),r.logInteraction(t.hitToggleState({stateBeforeToggle:a?"default":"expanded",stateAfterToggle:a?"expanded":"default"}))},buttonSize:"sm"})})};var Qi=n(86307);const Ji=({folderMenu:e,folderName:t,dropTargetClassName:n})=>(0,w.jsx)(v.yj,{menu:e,children:(0,w.jsx)("span",{children:(0,w.jsx)(Di._,{label:F.ag.get("more.label.context",t),children:(0,w.jsx)(Mn.o,{className:s()(Ui,Vi,n),iconOnly:Qi.N,"aria-haspopup":"menu","aria-label":F.ag.get("more.label.context",t),buttonSize:"sm"})})})});var $i=n(16518),Xi=n(65369);let ea=function(e){return e[e.LIST=0]="LIST",e[e.GRID=1]="GRID",e}({});const ta=()=>{const{isExpanded:e}=(0,Oi.U)(),[t,n]=(0,se.z)("items-view",ea.LIST);return{itemsView:t,setItemsView:n,isGridView:t===ea.GRID&&e}},na=({dropTargetClassName:e,spec:t})=>{const{isGridView:n,setItemsView:i}=ta(),a=(0,D.$P)();return(0,w.jsx)(Di._,{label:n?F.ag.get("web-player.your-library-x.list-view"):F.ag.get("web-player.your-library-x.grid-view"),children:(0,w.jsx)(Mn.o,{className:s()(Ui,e),iconOnly:n?$i.d:Xi.z,"aria-label":n?F.ag.get("web-player.your-library-x.list-view"):F.ag.get("web-player.your-library-x.grid-view"),onClick:()=>{i(n?ea.LIST:ea.GRID),a.logInteraction(t.hitToggleState({stateBeforeToggle:n?"grid":"list",stateAfterToggle:n?"list":"grid"}))},buttonSize:"sm"})})};var ia=n(8138),aa=n(38176),sa=n(47425),ra=n(99308);const oa=function({folderUri:e,spec:t}){const{createPlaylist:n}=(0,B.K)(),{createFolder:i}=(0,Vn.lh)(),a=(0,D.$P)(),s=e?{after:{uri:e}}:{before:"start"};return(0,w.jsxs)(Yn.v,{children:[(0,w.jsx)(ra.s,{onClick:()=>{n(void 0,s),a.logInteraction(t.createPlaylistOptionFactory().hitCreatePlaylist())},role:"menuitem",leadingIcon:(0,w.jsx)(aa.h,{iconSize:16}),children:F.ag.get("web-player.your-library-x.create.create-a-new-playlist")}),(0,w.jsx)(ra.s,{onClick:()=>{i(F.ag.get("web-player.your-library-x.default_folder_name"),s),a.logInteraction(t.createFolderOptionFactory().hitCreateFolder({uri:""}))},role:"menuitem",leadingIcon:(0,w.jsx)(sa.P,{iconSize:16}),children:F.ag.get("web-player.your-library-x.create.create-a-playlist-folder")})]})},la=({className:e="",folderUri:t,tooltipPlacement:n,spec:a})=>{const r=F.ag.get("web-player.your-library-x.create.button-label"),o=(0,D.$P)(),{createPlaylistFromAlbum:l,createPlaylistFromTracks:d,createPlaylistFromPlaylist:c}=(0,B.K)(),{className:u,dropPosition:p,...g}=Ye({allowedURITypesByDropPosition:{[Fe.ON]:[m.JM.TRACK,m.JM.ALBUM,m.JM.PLAYLIST_V2]},onDrop:(0,i.useCallback)((e=>{const{[m.JM.TRACK]:t,[m.JM.ALBUM]:n,[m.JM.PLAYLIST_V2]:i=[]}=e;t?.length&&d(t,{before:"start"}),n?.length&&l(n[0],{before:"start"}),i.length&&c(i[0],{before:"start"})}),[l,c,d])});return(0,w.jsx)(v.xV,{renderInline:!0,menu:(0,w.jsx)(oa,{folderUri:t,spec:a.createMenuFactory()}),preventScrollingWhileOpen:!1,children:(t,i,l)=>(0,w.jsx)(Di._,{label:r,placement:n,children:(0,w.jsx)(Mn.o,{ref:l,iconOnly:ia.S,className:s()(e,u,{[Ze]:p===Fe.ON}),"aria-label":r,onClick:e=>{i(e),o.logInteraction(a.hitUiReveal())},buttonSize:"sm",...g})})})};var da=n(22991);const ca=({handleNavigateBack:e})=>{const{dropPosition:t,className:n,onDrop:a,...r}=Ye({allowedURITypesByDropPosition:{[Fe.ON]:Le},onLongDragOver:e}),o=(0,i.useCallback)((e=>{e.preventDefault()}),[]);return(0,w.jsx)(Di._,{label:F.ag.get("web-player.your-library-x.navigate-back-folder"),children:(0,w.jsx)(Mn.o,{className:s()(Ui,Bi,n,{[Ze]:t===Fe.ON}),"aria-label":F.ag.get("web-player.your-library-x.navigate-back-folder"),onClick:e,iconOnly:da.e,buttonSize:"sm",...r,onDrop:o})})},ua=({folderUri:e,folderName:t,folderMenu:n,onRename:a,spec:r})=>{const{isActive:l}=(0,kt.cR)(e??"not-a-folder"),d=(0,o.I0)(),c=(0,D.$P)(),u=(0,i.useCallback)((()=>{d((0,ut.UX)(t,a)),c.logInteraction(r.hitRenameFolder({uri:e}))}),[d,t,e,c,a,r]);return(0,w.jsx)(Di._,{label:t,children:(0,w.jsx)("div",{className:Wi,children:(0,w.jsx)(v._P,{menu:n,children:(0,w.jsx)(Mn.o,{"aria-label":t,onClick:u,buttonSize:"sm",condensed:!0,className:s()(Ui),children:(0,w.jsx)(L.D,{variant:"balladBold",semanticColor:l?"textBrightAccent":void 0,className:zi,children:t})})})})})};var ma=n(20287),pa=n(63815);const ga="_4JcTGCbNeqSDgdBfKdfy",ha="wB8ig1vfWJiTattGsxKX",ka=()=>{const{syncing:e,percentage:t,currentItem:n,totalItems:i}=(0,pa.W)();return e?(0,w.jsxs)("div",{className:ga,children:[(0,w.jsxs)("div",{className:ha,children:[(0,w.jsx)(L.D,{variant:"mestoBold",semanticColor:"textBase",children:F.ag.get("web-player.your-library-x.download-progress-title")}),(0,w.jsx)(L.D,{variant:"mestoBold",semanticColor:"textBase",children:F.ag.get("web-player.your-library-x.download-progress-count-out-of-total",n,i)})]}),(0,w.jsx)(ma.k,{value:t})]}):null};var va=n(35923),fa=n(85735),ya=n(34553),Sa=n(93614);const ba=({parentDropTargetClassName:e,isLibraryCompletelyEmpty:t,folderUri:n,folderName:a,spec:r})=>{const{isCollapsed:o,ylxSidebarState:l}=(0,Oi.U)(),d=function(){const e=(0,Sa.T)(),t=(0,fa.Y)();return e>va.R.EXPANDED_MIN+3*t+ya.IW}(),{renameFolder:c}=(0,Vn.lh)(),{popFolder:u}=(0,i.useContext)(at),m=!o||t&&o,p=(0,i.useCallback)(((e="")=>{n&&c({uri:n},e)}),[n,c]),g=(0,i.useCallback)((()=>{u()}),[u]),h=n?(0,w.jsx)(Bn.A,{reference:{uri:n},name:a,onRename:p,onDeleteCallback:g}):null;return(0,w.jsxs)("header",{className:s()(Ri,{[Gi]:o}),children:[!o&&(0,w.jsx)(ka,{}),(0,w.jsxs)("div",{className:s()(Fi,{[ji]:o}),children:[(0,w.jsxs)("div",{className:s()(Mi,{[ji]:o}),children:[(0,w.jsx)(Ki,{folderUri:n,dropTargetClassName:e,spec:r.toggleCollapsedModeButtonFactory({identifier:""})}),n&&(0,w.jsx)(ca,{handleNavigateBack:g}),!o&&n&&void 0!==a&&(0,w.jsx)(ua,{folderUri:n,folderName:a,folderMenu:h,onRename:p,spec:r.folderTitleFactory()},n)]}),m&&(0,w.jsx)(la,{className:s()(Hi,Ui,Vi),folderUri:n,tooltipPlacement:o?"right":void 0,spec:r.createMenuButtonFactory()}),n&&!o&&(0,w.jsx)(Ji,{folderName:a,folderMenu:h,dropTargetClassName:e}),l===Oi.c.EXPANDED&&(0,w.jsx)(na,{dropTargetClassName:e,spec:r.viewDensityToggleFactory({identifier:""})}),(l===Oi.c.DEFAULT&&d||l===Oi.c.EXPANDED)&&(0,w.jsx)(Zi,{dropTargetClassName:e,spec:r.toggleExpandedModeButtonFactory({identifier:""})})]})]})};var _a=n(69040),Na=n(9708),Ea=n(55042),xa=n(33356);const Ca=({iconSize:e=16})=>(0,w.jsx)("span",{className:me,children:(0,w.jsx)(xa.w,{iconSize:e,semanticColor:"textBrightAccent",className:ue})}),wa=({children:e,title:t,subtitleSlot:n,isPlaying:i})=>(0,w.jsx)(Di._,{label:(0,w.jsxs)("div",{className:s()("encore-dark-theme",fe),children:[(0,w.jsxs)("div",{children:[t,n]}),i&&(0,w.jsx)(Ca,{})]}),placement:"right",showDelay:0,children:e}),Ia=e=>{const t=(0,i.useRef)(null);return(0,rt.MW)(e.uri)?(0,w.jsx)(rt.sg,{api:t,children:(0,w.jsx)(wa,{...e})}):(0,w.jsx)(wa,{...e})},Ta=({date:e})=>(0,w.jsx)(L.D,{variant:"mesto",semanticColor:"textSubdued",className:Se,children:e&&F.ag.formatRelativeDate(new Date(e),{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})}),Aa=e=>{const t=e.handleNavigate,n=(0,w.jsx)(Ut,{uri:e.uri,title:e.name,menu:e.menu,handleNavigate:t,playbackUri:e.playbackUri}),a=e.expandFolderButton??(e.isPlaying&&(0,w.jsx)(Ca,{})),s=(0,w.jsx)(Pt,{leading:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(en,{pinned:e.isPinned}),e.downloadButton]}),subtitle:(0,w.jsxs)(w.Fragment,{children:[e.shouldShowType&&Jt(e.type),!!e.subtitle&&e.shouldShowType&&" • ",e.subtitle]}),uri:e.uri}),r=e.logRightClick,o=(0,rt.MW)(e.uri)?rt.sg:i.Fragment;return(0,w.jsx)(o,{children:(0,w.jsx)(v._P,{menu:e.menu,onShow:r,children:(0,w.jsx)(wt.Q,{uri:e.uri,trigger:wt.x.OnMouseDown,children:(0,w.jsx)(Na.w,{className:le,media:e.cover,title:n,subtitle:s,trailing:a,id:e.uri,variant:e.isViewActive?"tinted":void 0,padding:ft.dly,onClick:e.onClick,hoverAnimationDuration:"0ms"})})})})},Pa=e=>{const t=e.handleNavigate,n=(0,w.jsx)(Ut,{uri:e.uri,title:e.name,menu:e.menu,handleNavigate:t,playbackUri:e.playbackUri}),i=(0,w.jsx)(Pt,{leading:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(en,{pinned:e.isPinned}),e.downloadButton]}),subtitle:(0,w.jsxs)(w.Fragment,{children:[e.shouldShowType&&Jt(e.type),!!e.subtitle&&e.shouldShowType&&" • ",e.subtitle]}),uri:e.uri}),a=e.logRightClick;return(0,w.jsx)(Ia,{...e,title:n,subtitleSlot:i,children:(0,w.jsx)("div",{children:(0,w.jsx)(v._P,{menu:e.menu,onShow:a,children:(0,w.jsx)(wt.Q,{uri:e.uri,trigger:wt.x.OnMouseDown,children:(0,w.jsx)(Na.w,{className:s()(le,ce),media:e.cover,id:e.uri,padding:ft.dly,onClick:e.onClick,variant:void 0,title:void 0,hoverAnimationDuration:"0ms"})})})})})},Oa=e=>{const t=e.logRightClick;return(0,w.jsx)(v._P,{menu:e.menu,onShow:t,children:(0,w.jsxs)("div",{className:ye,children:[(0,w.jsx)(Aa,{...e}),(0,w.jsx)(Ta,{date:e.addedAt}),(0,w.jsx)(Ta,{date:e.lastPlayedAt})]})})},Da=e=>{const t=e.handleNavigate,n=(0,w.jsxs)("div",{className:Ne,children:[(0,w.jsx)(Ut,{uri:e.uri,title:e.name,menu:e.menu,handleNavigate:t,playbackUri:e.playbackUri}),e.shouldShowType&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Ea.o,{children:"•"}),(0,w.jsx)(Ea.o,{lineClamp:1,children:Jt(e.type)})]}),(!e.shouldShowType&&e.type===R.p.ALBUM||(0,rt.MW)(e.uri))&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(Ea.o,{children:"•"}),(0,w.jsx)(Pt,{leading:null,uri:e.uri,subtitle:e.subtitle})]})]}),i=(0,w.jsx)(en,{pinned:e.isPinned}),a=e.expandFolderButton??(e.isPlaying?(0,w.jsx)(Ca,{iconSize:12}):e.downloadButton&&(0,w.jsx)("div",{className:me,children:e.downloadButton})),r=e.logRightClick;return(0,w.jsx)(v._P,{menu:e.menu,onShow:r,children:(0,w.jsx)(wt.Q,{uri:e.uri,trigger:wt.x.OnMouseDown,children:(0,w.jsx)(Na.w,{className:s()(le,de),title:n,leading:e.isPinned?i:void 0,trailing:a,id:e.uri,variant:e.isViewActive?"tinted":void 0,padding:`${ft.hM$} ${ft.dly}`,onClick:e.onClick,size:"sm",hoverAnimationDuration:"0ms"})})})},Ra=e=>{const t=e.logRightClick;return(0,w.jsx)(v._P,{menu:e.menu,onShow:t,children:(0,w.jsxs)("div",{className:ye,children:[(0,w.jsx)(Da,{...e}),(0,w.jsx)(Ta,{date:e.addedAt}),(0,w.jsx)(Ta,{date:e.lastPlayedAt})]})})},La=({height:e,isCompact:t,primaryFilter:n})=>(0,w.jsx)(Nn.E,{className:s()({[he]:!t,[ve]:t,[ke]:n===R.p.ARTIST}),style:{height:e}});let Fa=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.COMPACT=1]="COMPACT",e}({});const ja=()=>{const[e,t]=(0,se.z)("library-row-mode",Fa.DEFAULT),{ylxSidebarState:n}=(0,Oi.U)();return{libraryRowMode:e,setLibraryRowMode:t,rowHeight:e===Fa.DEFAULT||n===Oi.c.COLLAPSED?64:32}},Ma=(0,i.memo)((function({item:e,primaryFilter:t,RowVariantComponent:n,spec:i}){const a={shouldShowType:!(0,rt.MW)(e.uri)&&$t(e.type)!==t,RowVariantComponent:n,spec:i};switch(e.type){case R.p.FOLDER:return(0,w.jsx)(zn,{libraryItem:e,...a});case R.p.ALBUM:return(0,w.jsx)(In,{libraryItem:e,...a});case R.p.ARTIST:return(0,w.jsx)(On,{libraryItem:e,...a});case R.p.AUDIOBOOK:return(0,w.jsx)(Fn,{libraryItem:e,...a});case R.p.SHOW:return(0,w.jsx)(Si,{libraryItem:e,...a});case R.p.PLAYLIST:return(0,w.jsx)(ki,{libraryItem:e,...a});case R.p.LIKED_SONGS:return(0,w.jsx)(ti,{libraryItem:e,...a});case R.p.YOUR_EPISODES:return(0,w.jsx)(Ei,{libraryItem:e,...a});case R.p.LOCAL_FILES:return(0,w.jsx)(li,{libraryItem:e,...a});default:(0,ct.U)(e)}})),Ua=({getItems:e,scrollNodeRef:t,primaryFilter:n,nrValidItems:a,spec:s})=>{const{ylxSidebarState:r}=(0,Oi.U)(),{rowHeight:o,libraryRowMode:l}=ja(),d=l===Fa.COMPACT,c=((e,t)=>{switch(e){case Oi.c.COLLAPSED:return Pa;case Oi.c.DEFAULT:return t?Da:Aa;case Oi.c.EXPANDED:return t?Ra:Oa;default:(0,ct.U)(e)}})(r,d),u=(0,i.useCallback)(((e,t)=>(0,w.jsx)(La,{height:e,isCompact:d,primaryFilter:n},t)),[d,n]),m=(0,i.useCallback)(((t,i)=>e(t,i).map(((e,i)=>e?(0,w.jsx)(Ma,{item:e,spec:s,RowVariantComponent:c,primaryFilter:n},e.uri):u(`${o}px`,`${t+i}`)))),[c,e,n,u,o,s]);return(0,w.jsx)(Nn.A,{circular:!1,allowsMultipleInteractiveChildrenInItem:!0,"aria-label":F.ag.get("web-player.your-library-x.your-library"),children:(0,w.jsx)(_a.V,{renderRows:m,nrRows:a,rowHeight:o,scrollNodeRef:t,renderPlaceholder:u})})};var Ba=n(55477),Va=n(87995),Ha=n(83680),Ga=n(92616);const Wa="oszTUDKpXrPHyeWPs276",za="cKHK53VIATgkMZYQDfol",Ka="QMGfkFWtxrVkgNgFXDyw",Ya=function({id:e,title:t,bodyText:n,children:a,root:s,show:r,childrenWrapperClassName:o}){const[l,d]=(0,se.z)(`onboarding-dismissed:${e}`,!1),[c,u]=(0,i.useState)(null),[m,p]=(0,i.useState)(null),g=(0,i.useCallback)((()=>d(!0)),[d]);(0,i.useEffect)((()=>{if(l)return()=>{};const e=e=>{"Escape"===e.key&&g()};return window.addEventListener("keydown",e,!0),()=>{window.removeEventListener("keydown",e,!0)}}),[l,g,m]);const h=c?.getBoundingClientRect();return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("span",{ref:u,className:o,children:a}),!l&&h&&r&&(0,Va.createPortal)((0,w.jsx)("div",{className:Wa,style:{top:h?.top??0,left:h?.left??0,width:h?.width,height:h?.height},ref:p,children:(0,w.jsxs)(Ga.J,{popoverTitle:t,arrow:Ga.J.left,colorSet:"announcement",className:za,children:[(0,w.jsx)(L.D,{as:"p",dangerouslySetInnerHTML:{__html:n||""}}),(0,w.jsx)(Mn.o,{buttonSize:"sm",onClick:g,iconOnly:Ha.k,"aria-label":F.ag.get("close"),className:Ka,size:16})]})}),s||document.body)]})},qa="main-yourLibraryX-librarySort",Za="main-yourLibraryX-librarySortWrapper",Qa=({sortOrders:e,activeSortOrderId:t,setActiveSortOrderId:n,root:a,showReorderingOnboarding:s,spec:r})=>{const o=(0,D.$P)(),l=(0,Pe.y)(),d=e.find((e=>e.id===t))??e?.at(0),c=(0,i.useRef)(null);return(0,w.jsx)("div",{className:qa,ref:c,children:(0,w.jsx)(Ya,{id:"ylx-playlist-ordering",bodyText:F.ag.get("web-player.your-library-x.custom-ordering-onboarding-text"),root:a,show:s,childrenWrapperClassName:Za,children:(0,w.jsx)(Ba.A,{options:e.map((({id:e,name:t})=>({key:e,value:t}))),onClick:()=>{o.logInteraction(r.hitUiReveal())},onSelect:(e,t)=>{n(e);const i=l.getSortOrderLabel(e);o.logInteraction(r.sortMenuFactory().sortOptionFactory({identifier:i,position:t}).hitSort())},selected:{key:d?.id??"",value:d?.name??""},heading:F.ag.get("web-player.your-library-x.sort_by"),ariaLabel:F.ag.get("web-player.your-library-x.sort_by")})})})};var Ja=n(24256),$a=n(84828),Xa=n(48234);const es=({clearOnEscapeInElementRef:e,primaryFilter:t,spec:n})=>{const a=(0,Pe.y)(),s=(0,D.$P)(),r=function(e){switch(e){case R.p.ALBUM:return F.ag.get("web-player.your-library-x.text-filter.albums-placeholder");case R.p.ARTIST:return F.ag.get("web-player.your-library-x.text-filter.artists-placeholder");case R.p.PLAYLIST:return F.ag.get("web-player.your-library-x.text-filter.playlists-placeholder");case R.p.SHOW:return F.ag.get("web-player.your-library-x.text-filter.shows-placeholder");case R.p.AUDIOBOOK:return F.ag.get("web-player.your-library-x.text-filter.audiobooks-placeholder");case"downloaded":return F.ag.get("web-player.your-library-x.text-filter.downloaded-placeholder");case void 0:return F.ag.get("web-player.your-library-x.text-filter.generic-placeholder");default:return void(0,ct._)(e)}}(t),o=(0,i.useCallback)((()=>(s.logInteraction(n.searchButtonFactory().hitUiReveal()),!0)),[s,n]),l=(0,i.useCallback)((()=>(s.logInteraction(n.textFilterFactory().keyStrokeClearFilter()),!0)),[s,n]);return(0,w.jsx)(Ja.K,{placeholder:r,clearOnEscapeInElementRef:e,debounceFilterChangeTimeout:a?.getCapabilities().canTextFilterContentsInRealtime?0:void 0,expandDirection:"right",onActivate:o,onClear:l,useExpandCallback:e=>{(0,Xa.x)($a.lb.FOCUS_YLX_TEXT_FILTER,e)}})};var ts=n(76270),ns=n(67314),is=n(724),as=n(35800),ss=n(69718),rs=n(96382),os=n(93901),ls=n(9200);const ds=1248,cs=800,us=(0,Re.y)(as.s),ms=(0,Re.y)(ls.c),ps=()=>(function(){const{size:e,setSize:t,minWidth:n,maxWidth:a,ylxCollapsedStateNavbarWidth:s,ylxDefaultStateNavbarWidth:o,ylxExpandedStateNavbarWidth:l}=(0,va.L)(),{ylxSidebarState:d,setYlxSidebarState:c}=(0,ls.U)(),u=(0,fa.Y)(),m=(0,is.W)(),p=(0,ss.m)(),g=(0,os.T)(p);(0,i.useRef)(g.toggle).current=g.toggle;const{min:h,max:k,size:v,setSize:f}=(0,rs.r)(),y=(0,Sa.T)(),S=(0,i.useRef)(null),b=(0,i.useRef)(null),_=(0,i.useRef)(null);(0,i.useLayoutEffect)((()=>{const i=y-e-3*u-(p!==as.s.Disabled?v+u:0),g={leftSidebarWidth:e,leftSidebarMinWidth:n,leftSidebarMaxWidth:a,ylxSidebarState:d,ylxSidebarStateRestoreTarget:S.current,rightSidebarWidth:v,rightSidebarMinWidth:h,rightSidebarMaxWidth:k,rightSidebarPanel:p,rightSidebarPanelRestoreTarget:b.current,storedCollapsedYLXWidth:s,storedDefaultYLXWidth:o,storedExpandedYLXWidth:l,clientWidth:y,mainContentWidth:i,panelGapValue:u},N=_.current;if((0,r.J)(g,N))return;const E=function(e,t){if(!e)return{};let{leftSidebarWidth:n=0,rightSidebarWidth:i=0}=t;const{mainContentWidth:a=0,leftSidebarMinWidth:s=0,leftSidebarMaxWidth:r=0,ylxSidebarState:o,ylxSidebarStateRestoreTarget:l,rightSidebarMinWidth:d=0,rightSidebarMaxWidth:c=0,rightSidebarPanel:u,rightSidebarPanelRestoreTarget:m,storedCollapsedYLXWidth:p=0,storedDefaultYLXWidth:g=0,storedExpandedYLXWidth:h=0,clientWidth:k=0,panelGapValue:v=0}=t,f={},y=u!==as.s.Disabled,S=void 0!==e.leftSidebarWidth&&n>e.leftSidebarWidth,b=void 0!==e.rightSidebarWidth&&i>e.rightSidebarWidth,_=void 0===e.clientWidth?0:k-e.clientWidth,N=_<0,E=k>0,x=ads?C=Math.max(0,C-(a-ds)):x&&(C=x);const w=o===ls.c.EXPANDED&&e.ylxSidebarState!==ls.c.EXPANDED,I=o===ls.c.DEFAULT&&e.ylxSidebarState!==ls.c.DEFAULT;let T=n-s;S&&(T=w?n-va.R.EXPANDED_MIN:I?n-va.R.DEFAULT_MIN:0);let A=b?0:i-d;const P=C<=T+A;if(aya.IW?(f.ylxSidebarState=ls.c.DEFAULT,C-=n-g,T=g-va.R.DEFAULT_MIN):(f.ylxSidebarState=ls.c.COLLAPSED,C-=n-p,T=0),f.ylxSidebarStateRestoreTarget=t.ylxSidebarState);else if(u===as.s.Disabled&&m!==as.s.Disabled&&us(m)&&u!==e.rightSidebarPanelRestoreTarget&&a-i-v>=ya.IW)f.rightSidebarPanel=m,f.rightSidebarPanelRestoreTarget=null;else if(o===ls.c.DEFAULT&&l===ls.c.EXPANDED&&a-(h-n)>=ya.IW)f.ylxSidebarState=ls.c.EXPANDED,f.ylxSidebarStateRestoreTarget=null;else if(o===ls.c.COLLAPSED&&l===ls.c.DEFAULT&&a-(g-n)>=ya.IW)f.ylxSidebarState=ls.c.DEFAULT,f.ylxSidebarStateRestoreTarget=null;else if(E&&a>=cs){let e=r-n,t=c-i;const a=Math.min(_,e+t);for(let s=0;s0?(n++,e--):i0&&(i++,t--)}o!==e.ylxSidebarState&&ms(l)&&l===e.ylxSidebarStateRestoreTarget&&(f.ylxSidebarStateRestoreTarget=null);u!==e.rightSidebarPanel&&us(m)&&m===e.rightSidebarPanelRestoreTarget&&(f.rightSidebarPanelRestoreTarget=null);if(C>0&&C<=T+A)for(let e=0;ei&&n>s&&T>0?(n--,T--):i>d&&A>0&&(i--,A--);n&&n!==t.leftSidebarWidth&&(f.leftSidebarWidth=n);i&&i!==t.rightSidebarWidth&&(f.rightSidebarWidth=i);return f}(N,g);void 0!==E.leftSidebarWidth&&t(E.leftSidebarWidth),ms(E.ylxSidebarState)&&c(E.ylxSidebarState),void 0!==E.ylxSidebarStateRestoreTarget&&(S.current=E.ylxSidebarStateRestoreTarget),void 0!==E.rightSidebarWidth&&f(E.rightSidebarWidth),void 0!==E.rightSidebarPanel&&m.setPanelState(E.rightSidebarPanel),void 0!==E.rightSidebarPanelRestoreTarget&&(b.current=E.rightSidebarPanelRestoreTarget),_.current=g}),[e,n,a,t,d,v,h,k,f,p,s,o,l,c,m,y,u])}(),null),gs=()=>(0,c.W6)(pn._c,{loadingValue:!1})?(0,w.jsx)(ps,{}):null;var hs=n(32812);const ks="ylx-active-filter-ids";var vs=n(66155);var fs=n(81589),ys=n(36472),Ss=n(79041);function bs(){const[e,t]=(0,i.useState)(null);if((0,Ss.b)(ys.EW.UPDATE_PIN_ERROR,(e=>{t(e.data)})),void 0===e?.reason)return null;switch(e.reason){case ys.EN.TOO_MANY_PINS:return(0,w.jsx)(fs.w,{animated:!0,headingMessage:F.ag.get("web-player.your-library-x.pin-error.title"),message:F.ag.get("web-player.your-library-x.pin-error.message",e.maximumPinnedItems),buttonLabel:F.ag.get("web-player.your-library-x.pin-error.ok"),isOpen:!0,onDismissDialog:()=>t(null)});case ys.EN.NO_PIN_IN_FOLDER:return(0,w.jsx)(fs.w,{animated:!0,headingMessage:F.ag.get("web-player.your-library-x.pin-error.no-pin-in-folder.title"),message:F.ag.get("web-player.your-library-x.pin-error.no-pin-in-folder.message"),buttonLabel:F.ag.get("web-player.your-library-x.pin-error.ok"),isOpen:!0,onDismissDialog:()=>t(null)});default:return(0,ct._)(e),null}}const _s="ylx-active-sort-order-by-filter-id";var Ns=n(70556),Es=n(89039),xs=n(97411);const Cs={[ys.XD.ALBUMS]:R.p.ALBUM,[ys.XD.ARTISTS]:R.p.ARTIST,[ys.XD.BOOKS]:R.p.AUDIOBOOK,[ys.XD.EPISODES]:R.p.EPISODE,[ys.XD.SHOWS]:R.p.SHOW,[ys.XD.TRACKS]:R.p.TRACK};function ws(e,t){const n=(0,i.useCallback)((({data:{list:n}})=>{const i=Cs[n];Is(e,i)&&t()}),[e,t]);(0,Ss.b)(ys.EW.UPDATE,n),(0,Ss.b)(ys.EW.UPDATE_PIN,t);const a=(0,i.useCallback)((()=>{Is(e,R.p.PLAYLIST)&&t()}),[e,t]);(0,Vn.iu)(a),function(e){(0,i.useEffect)((()=>{const t=(0,xs.k)(),n=/^hm:\/\/collection\/ylpin\//;return t.matchMessages(n,e),()=>{t.unmatchMessages(n,e)}}),[e])}(t),function(e){const t=(0,i.useContext)(Es.t),n=t.getEvents();(0,i.useEffect)((()=>(n.addListener(Ns.p.UPDATE,e),()=>{n.removeListener(Ns.p.UPDATE,e)})),[t,n,e])}(t)}function Is(e,t){switch(e){case R.p.ALBUM:case R.p.ARTIST:case R.p.AUDIOBOOK:case R.p.SHOW:return e===t;case R.p.PLAYLIST:switch(t){case R.p.TRACK:case R.p.PLAYLIST:case R.p.EPISODE:return!0;default:return!1}default:return!0}}const Ts="main-yourLibraryX-libraryContainer",As="main-yourLibraryX-libraryIsExpanded",Ps="main-yourLibraryX-libraryIsCollapsed",Os="main-yourLibraryX-libraryFilter",Ds="main-yourLibraryX-libraryItemContainer",Rs="main-yourLibraryX-libraryRootlist",Ls="glUVqQHA9VNQp0CHUTAs",Fs="main-yourLibraryX-filters",js="HUFl7FOi5oAlMEZNCBf4",Ms="main-yourLibraryX-isScrolled",Us="main-yourLibraryX-filterArea",Bs={items:[],totalLength:0},Vs=5e4,Hs=[m.JM.TRACK,m.JM.ALBUM,m.JM.ARTIST,m.JM.PLAYLIST_V2,m.JM.SHOW,m.JM.EPISODE],Gs=[m.JM.TRACK,m.JM.LOCAL_TRACK,m.JM.ALBUM,m.JM.EPISODE,m.JM.PLAYLIST_V2],Ws=()=>{const{filter:e}=(0,i.useContext)(it.fo),[t,n]=(0,i.useState)(null),{filtersPickedByUserRef:a,selectedFilterIds:o,resetFilterIds:g,toggleFilterId:h}=function(e){const{openedFolderUri:t="",change:n}=(0,i.useContext)(at),a=(0,i.useRef)(t),[s,r]=(0,se.z)(ks,{[t]:[]}),o=(0,i.useRef)(!0),l=(0,d.jP)(((n,i=!0)=>{const a=new Set(e);a.has(n)?a.delete(n):a.add(n),o.current=i,r({...s,[t]:Array.from(a)})}),[e,r,t]),c=(0,i.useCallback)((()=>r({...s,[t]:[]})),[t,s,r]);return(0,i.useMemo)((()=>{t!==a.current&&"PUSH"===n&&r({...s,[t]:s[a.current]}),a.current=t}),[n,t,s,r]),{filtersPickedByUserRef:o,selectedFilterIds:s[t],resetFilterIds:c,toggleFilterId:l}}(t?.selectedFilters?.map((e=>e.id))??[]),E=o?.[0],{selectedSortOrderId:x,setSelectedSortOrderId:C}=function(e){const[t,n]=(0,se.z)(_s,{}),a=`${e}`;return{selectedSortOrderId:t[a],setSelectedSortOrderId:(0,i.useCallback)((e=>{n({...t,[a]:e})}),[a,t,n])}}(E),I=(0,i.useRef)(null),A=(0,i.useRef)(null),P=(0,i.useRef)(null),{expandedFolders:L}=(0,i.useContext)(ae),{openedFolderUri:F,resetFolder:j}=(0,i.useContext)(at),M=(0,_.I)(),B=(0,i.useContext)(b.H),V=Yt(),[H,G]=(0,i.useState)(!1),{isCollapsed:W,isExpanded:z,setYlxSidebarState:K}=(0,Oi.U)(),{isGridView:Y}=ta(),{spec:Z,UBIFragment:Q}=(0,D.fU)(u.C,{data:{identifier:"yourlibraryx"}});let J;J=W?"collapsed":z?Y?"expanded_grid":"expanded_list":"default";const $=(0,i.useMemo)((()=>Z.sidebarFactory({uri:F??"",identifier:J})),[Z,F,J]),ee=(0,D.Wi)($),te=(0,i.useMemo)((()=>$.headerFactory()),[$]),ne=(0,i.useMemo)((()=>te.filtersFactory()),[te]),re=(0,i.useMemo)((()=>te.searchBarFactory()),[te]),oe=(0,i.useMemo)((()=>te.sortMenuButtonFactory()),[te]),le=(0,i.useMemo)((()=>$.listFactory()),[$]),de=(0,D.$P)();!function(e=[],t=[],n){const a=(0,hs.k)(),s=(0,i.useContext)(b.H).getContentsDownloadedFilterId(),r=(0,i.useRef)(e);r.current=e;const o=(0,i.useRef)(t);o.current=t;const l=(0,i.useRef)(n);l.current=n;const c=(0,i.useRef)(!1);(0,i.useEffect)((()=>{if(!s)return;const e=o.current.includes(s),t=r.current.includes(s),n=o.current.length>1,i=!a&&!n&&!e&&t,d=a&&e&&c.current;(i||d)&&(i&&(c.current=!0),l.current(s,!1))}),[s,a]);const u=(0,i.useRef)(t);(0,d.KW)((()=>{s&&(t.includes(s)&&!u.current.includes(s)&&c.current||(c.current=!1),u.current=t)}),[s,t])}(t?.availableFilters?.map((e=>e.id)),t?.selectedFilters?.map((e=>e.id)),h);const{handleDropOnFolder:ce,unpinConfirmationDialog:ue}=Hn(le,F),me=Kt();(0,ns.P)(I);const pe=F?Gs:Hs,{dropPosition:ge,className:he,...ke}=Ye({allowedURITypesByDropPosition:{[Fe.ON]:me?[]:pe},onDrop:(0,i.useCallback)((async e=>{if(F)ce(e);else{const{[m.JM.TRACK]:t,[m.JM.ALBUM]:n,[m.JM.ARTIST]:i,[m.JM.EPISODE]:a,[m.JM.SHOW]:s,[m.JM.PLAYLIST_V2]:r=[]}=e;t?.length&&(B?.add(...t),de.logInteraction(le.dragCreatePlaylist())),n?.length&&(B?.add(...n),de.logInteraction(le.dragLike({itemToBeLiked:n.at(0)??""}))),i?.length&&(B?.add(...i),de.logInteraction(le.dragLike({itemToBeLiked:i.at(0)??""}))),a?.length&&(B?.add(...a),de.logInteraction(le.dragLike({itemToBeLiked:a.at(0)??""}))),s?.length&&(B?.add(...s),de.logInteraction(le.dragLike({itemToBeLiked:s.at(0)??""}))),r.length&&(V(r,{before:"start"}),me?de.logInteraction(le.dragSort()):de.logInteraction(le.dragLike({itemToBeLiked:r.at(0)??""})))}}),[F,ce,B,de,le,V,me]),onLongDragOver:(0,i.useCallback)((()=>{W&&K(Oi.c.DEFAULT)}),[W,K])}),ve=(0,i.useMemo)((()=>({filters:o,sortOrder:x,textFilter:e,includeLocalFiles:M,includeYourEpisodes:!0,expandedFolders:W||Y?[]:L,filtersPickedByUser:a.current,folderUri:F})),[L,a,M,Y,W,F,o,x,e]),fe=(0,i.useCallback)((async(e,t)=>{try{const i=await B.getContents({offset:e,limit:t,...ve}),{offset:a,limit:s,items:o,...l}=i;return G(!1),{fetchedId:ve.folderUri,onCacheSuccess:()=>{n((e=>(0,r.J)(l,e)?e:l))},...i}}catch(e){return e instanceof S.Ik?(g(),Bs):e instanceof S.j2?(C(void 0),Bs):e instanceof S.xX?(j(),Bs):((0,N.PC)(e),G(!0),Bs)}}),[ve,B,g,j,C]),ye=!1===t?.hasUnfilteredItems,Se=t?.hasTextFilter&&0===t.totalLength&&""!==e,{setFilter:be}=(0,i.useContext)(it.fo);(0,i.useEffect)((()=>{Se&&W&&be("")}),[Se,W,be]);const _e=0===t?.totalLength&&t.selectedFilters.length>0&&!t?.hasTextFilter&&t?.hasUnfilteredItems;(0,d.KW)((()=>{const e=t?.selectedFilters.at(-1);_e&&e&&h(e.id,!1)}),[_e,t?.selectedFilters]);const Ne=(0,c.W6)(pn.ZU,{loadingValue:!1})&&B?.getCapabilities().canFetchAllItems,{fetchedId:Ee,getItems:xe,nrValidItems:we,invalidateCache:Ie}=(0,y.Q)({nrItems:50,fetch:fe,limit:50,cacheAllOnInvalidation:Ne,cacheAllLimit:Vs}),Te=(0,l.y1)(Ie,200,{leading:!0,trailing:!0,maxWait:1e3});ws(t?.primaryFilter,Te);const Ae=!F&&!Ee||F===Ee;((e,t="")=>{const n=(0,i.useRef)({});(0,i.useLayoutEffect)((()=>{if(!e.current)return()=>{};const i=e.current,a=n.current[t];i.scrollTop=a??0;const s=()=>{n.current[t]=i.scrollTop};return i?.addEventListener("scroll",s),()=>{i?.removeEventListener("scroll",s)}}),[e,t])})(I,Ee);const Pe=(0,i.useCallback)((()=>{Ie(),G(!1)}),[Ie]),Oe=function(e){const[t,n]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{if(!window.IntersectionObserver)return()=>{};const t=new window.IntersectionObserver((e=>{e.forEach((e=>{n(!e.isIntersecting)}))}),{root:e.current,rootMargin:"-100% 0px 0px 0px",threshold:0});return e.current?.firstElementChild&&t.observe(e.current.firstElementChild),()=>{t.disconnect()}}),[e]),t&&!!e.current?.scrollTop}(I),{isExpanded:De}=(0,k.o)(),Re=!!t?.openedFolderName,Le=(0,c.W6)(pn.KK,{loadingValue:!1})&&Ne,je=function(e,t,n){const{isGridView:a}=ta(),{rowHeight:s}=ja();return(0,i.useCallback)((async i=>{let r=s,o=1;if(a){const t=e.current?.querySelector('li[role="row"]');r=t?.getBoundingClientRect().height??0,t?.parentElement&&(o=getComputedStyle(t.parentElement).getPropertyValue("grid-template-columns").split(" ").length)}if(!r)return null;const l=n(0,Vs,{cachedOnly:!0}),d=l.find((e=>e?.name&&(0,vs.B)(i,e.name))),c=d?l.indexOf(d):-1;return-1!==c&&t.current&&function(e,t,n,i){if(!e)return;const{scrollTop:a,offsetHeight:s}=e,r=t&&e?t.getBoundingClientRect().top+a-e.getBoundingClientRect().top:0;if(r+na+s){const t=n-s/2+r+i/2;e.scrollTop=t}}(t.current,e.current,Math.floor(c/o)*r,r),d?.uri??null}),[e,t,s,n,a])}(P,I,xe),Me=H?(0,w.jsx)(ie,{onClick:Pe}):null;let Ue;(0,i.useEffect)((()=>{H&&W&&K(Oi.c.DEFAULT)}),[H,W,K]),ye&&!W&&(Ue=Re?(0,w.jsx)(U,{className:he}):(0,w.jsx)(q,{className:he}));const Be=Se?(0,w.jsx)(X,{query:e,className:he}):null,Ve=!W&&!Ue&&(0,w.jsxs)("div",{className:s()(Os,he),children:[(0,w.jsx)(es,{clearOnEscapeInElementRef:A,primaryFilter:t?.primaryFilter,spec:re},F),(0,w.jsx)(Qa,{sortOrders:t?.availableSortOrders??[],activeSortOrderId:t?.selectedSortOrder?.id,setActiveSortOrderId:C,root:A.current,showReorderingOnboarding:t?.primaryFilter===R.p.PLAYLIST&&!t?.reorderAllowed,spec:oe})]}),He=H&&!t,Ge=z&&!Y&&!Me&&!Ue;return(0,w.jsx)(T,{containerRef:A,findMatchingTypeaheadUid:je,isEnabled:Le,children:(0,w.jsxs)(Q,{spec:Z,children:[(0,w.jsx)(gs,{}),(0,w.jsx)(v._P,{menu:(0,w.jsx)(p.a,{position:{before:"start"}}),children:(0,w.jsxs)("div",{className:s()(Ts,{[qe]:ge===Fe.ON,[Ps]:W,[As]:De}),ref:e=>{A.current=e,ee(e)},...ke,tabIndex:-1,children:[ue,(0,w.jsxs)("div",{className:s()({[Ms]:Oe}),children:[(0,w.jsx)(ba,{parentDropTargetClassName:he,isLibraryCompletelyEmpty:ye,folderUri:t?.passedFolderUri,folderName:t?.openedFolderName,spec:te.titleRowFactory()}),!W&&!He&&(0,w.jsxs)("div",{className:Us,children:[(0,w.jsx)(nt,{selectedFilters:t?.selectedFilters,availableFilters:t?.availableFilters,toggleFilterId:h,resetFilterIds:g,className:s()(Fs,{[js]:!Ae}),scrollNodeRef:I,spec:ne},Ee),z&&Ve]}),Ge&&(0,w.jsx)(Ce,{isScrolled:Oe})]}),(0,w.jsx)(ts.U,{className:Ds,ref:e=>{e&&!I.current&&(I.current=e.osInstance().getElements().viewport)},children:(0,w.jsx)(f.M,{containerRef:A,children:(0,w.jsxs)("div",{className:s()(Rs,{[js]:!H&&!Ae,[Ps]:W,[As]:De,[Ls]:Ge}),children:[!z&&Ve,Me||Ue||Be,(0,w.jsx)("div",{ref:P,children:Y?(0,w.jsx)(Ti,{getItems:xe,scrollNodeRef:I,primaryFilter:t?.primaryFilter,nrValidItems:we,spec:le}):(0,w.jsx)(Ua,{getItems:xe,scrollNodeRef:I,primaryFilter:t?.primaryFilter,nrValidItems:we,spec:le})})]})})}),bs(),(0,w.jsx)(O,{})]})})]})})},zs=({npbVideoAdRef:e})=>{const{isAnonymous:t}=(0,o.v9)((e=>e.session));return(0,w.jsx)(g.L,{onError:e=>{(0,N.vK)(e,"YourLibraryX")},children:(0,w.jsx)(it.hz,{uri:"spotify:collection",children:(0,w.jsx)(fn,{children:(0,w.jsx)(oe,{children:(0,w.jsxs)(st,{children:[(0,w.jsx)(Ws,{}),(0,w.jsx)(h.W,{isAnonymous:t,ref:e})]})})})})})}},9200:(e,t,n)=>{"use strict";n.d(t,{U:()=>i.U,c:()=>i.c});var i=n(66946)},93614:(e,t,n)=>{"use strict";n.d(t,{T:()=>a});var i=n(59496);function a(){const[e,t]=(0,i.useState)(document.body.clientWidth);return(0,i.useLayoutEffect)((()=>{const e=()=>{t(document.body.clientWidth)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),document.body.clientWidth}},6142:(e,t,n)=>{"use strict";n.d(t,{a:()=>c.aN,O:()=>p});var i=n(59496),a=n(30999),s=n(56162),r=n(50346),o=n(73854),l=n(28418);const d={dndImageShelter:"main-dragAndDrop-dndImageShelter",dndImage:"main-dragAndDrop-dndImage"};var c=n(84260),u=n(4637);const m=({text:e})=>(0,u.jsx)(s.D,{variant:"ballad",dir:"auto",children:e}),p=Spicetify.ReactHook.DragHandler=(e=[],t="",n="",s=0,p)=>{const{setUris:g,setDropOriginUri:h}=(0,i.useContext)(o.Ci);return(i,o=e,k=t,v=n,f=s)=>{i.defaultPrevented||g(o),h(p),window.addEventListener("click",(()=>{document.body.removeAttribute("data-dragging-type"),document.body.removeAttribute("data-dragging-uri-type")}),{once:!0});const y=o.map((e=>(0,r.EC)(e))).filter(l.K),S=y.map((e=>e?.toURL()));if(0===y.length||i.metaKey)return void i.preventDefault();i.dataTransfer.setData("text/x-spotify-context",v),i.dataTransfer.setData("text/uri-list",S.join("\n")),i.dataTransfer.setData("text/plain",S.join("\n")),i.dataTransfer.setData("text/x-spotify-section",`${f||0}`);const b={};y.forEach((e=>{const t=c.aN[e.type];b[t]??=[],b[t].push(e.toURI())})),document.body.setAttribute("data-dragging-type",Object.keys(b).join(" ")),document.body.setAttribute("data-dragging-uri-type",Object.keys(b).filter(c.Fu).map((e=>c.UD[e])).join(" ")),Object.entries(b).forEach((([e,t])=>{i.dataTransfer.setData(e,t.join("\n"))}));const _=(0,a.renderToString)((0,u.jsx)(m,{text:k}));if("function"==typeof i.dataTransfer.setDragImage){const e=function(e){const t=document.createElement("p");t.className=d.dndImage,t.innerHTML=e;const n=document.createElement("div");return n.className=d.dndImageShelter,document.body.appendChild(t),document.body.appendChild(n),{element:t,remove(){requestAnimationFrame((()=>{t.parentNode&&t.parentNode.removeChild(t),n.parentNode&&n.parentNode.removeChild(n)}))}}}(_);i.dataTransfer.setDragImage(e.element,0,0),e.remove()}}}},17652:(e,t,n)=>{"use strict";n.d(t,{J:()=>o});var i=n(9102),a=n(25899);let s=0;const r=new WeakMap,o=function(e,t,n){const o=r.has(e)?r.get(e):r.set(e,++s).get(e),l=["useEndpoint",e.name,o,t],{isLoading:d,error:c,data:u}=(0,i.useQuery)(l,(()=>e(a.b.getInstance(),...t||[])),{cacheTime:n?.cacheTime,staleTime:n?.staleTime,enabled:n?.enabled});return{data:u??null,error:c,loading:d,queryKey:l}}},68415:(e,t,n)=>{"use strict";n.d(t,{R:()=>s,e:()=>i});const i={SMALL:192,BIG:232},a={small:{width:64,height:64},standard:{width:300,height:300},large:{width:640,height:640},xlarge:{width:1280,height:1280}};function s(e){const t=function(e=[]){const t=e.map(r),n=t.filter((e=>e.width>=i.SMALL&&e.url)).sort(((e,t)=>e.width-t.width));return n.length?n:t}(e),[n]=t,a=n?.url||null;if(!a)return[];return[a,t.filter((({url:e,width:t})=>e&&t)).map((({url:e,width:t})=>`${e} ${t/2}w, ${e} ${t}w`)).join(", "),`(min-width: 1280px) ${i.BIG}px, ${i.SMALL}px`]}function r(e){if(!e.label)return e;const{width:t,height:n}=a[e.label];return{url:e.url,width:t,height:n}}},47122:(e,t,n)=>{"use strict";n.d(t,{D:()=>a});var i=n(55760);const a=()=>{const e=(0,i.tc)();if(null===e)throw new Error("Trying to use 'PlatformContext' without 'PlatformProvider'!");return e.getHistory()}},95663:(e,t,n)=>{"use strict";n.d(t,{o:()=>d});var i=n(59496),a=n(61740),s=n(89605),r=n(21524);const o=(e,t)=>n=>{const{intent:i,type:a,targetUri:s,itemIdSuffix:r,pathNameOverride:o}=n,l=r?`${t}/${r}`:t,d=o||e;return{page:d.split(/\//).filter((e=>""!==e)).shift(),view_uri:d,action_intent:i,action_type:a,target_uri:s,item_id:l}};var l=n(8511);function d(){const e=(0,i.useContext)(r.H8),t=(0,a.I0)(),{pathname:n}=(0,s.TH)();return(0,i.useCallback)((i=>{const a=o(n,e);t((0,l._)(a(i)))}),[t,n,e])}},4055:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(61740),a=n(82108);const s=()=>(0,i.v9)(a.Gg).isAnonymous},72171:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var i=n(61740);const a=()=>(0,i.v9)((e=>e.platform?.isBrowser))},11611:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o});var i=n(61740),a=n(36844),s=n(41836),r=n(82108);const o=()=>{const e=(0,a.W6)(s.wy,{loadingValue:!1}),t=(0,i.v9)(r.OA);return e&&t}},78048:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});var i=n(32812),a=n(82538),s=n(43064);function r(e,t=!0,n=!1){const r=(0,s._)(e),o=(0,i.k)(),l=r===a.Om.YES;return t&&(o||l||n)}},79102:(e,t,n)=>{"use strict";n.d(t,{S:()=>a});var i=n(61740);function a(){return(0,i.v9)((e=>e.ui?.textDirection?.isRTL))}},40066:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var i=n(61740),a=n(50346),s=n(66632),r=n(32812),o=n(82108);const l=e=>{const[t]=(0,s.Z)(e),n=(0,r.k)(),l=(0,i.v9)(o.n5);return!n&&t?(0,a.zJ)(l,(0,a.EC)(e)?.id).toURI():e}},32812:(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var i=n(59496),a=n(40660);const s=()=>{const e=(0,i.useContext)(a.n);if(null===e)throw new Error("Trying to use 'OfflineContext' without 'OfflineStatusProvider'!");return e.online}},477:(e,t,n)=>{"use strict";n.d(t,{e:()=>p});var i=n(72802);const a="(min-width: 0px)",s="(min-width: 0px) and (max-width: 767px)",r="(min-width: 768px)",o="(min-width: 768px) and (max-width: 1023px)",l="(min-width: 1024px)",d="(min-width: 1024px) and (max-width: 1279px)",c="(min-width: 1280px)",u="(min-width: 1280px) and (max-width: 1919px)",m="(min-width: 1920px)",p=()=>({isXS:(0,i.a)(a),isXSOnly:(0,i.a)(s),isSM:(0,i.a)(r),isSMOnly:(0,i.a)(o),isMD:(0,i.a)(l),isMDOnly:(0,i.a)(d),isLG:(0,i.a)(c),isLGOnly:(0,i.a)(u),isXL:(0,i.a)(m)})},28291:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var i=n(59496);function a(e){return(0,i.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])}},70175:(e,t,n)=>{"use strict";n.d(t,{k:()=>o});var i=n(59496),a=n(61740),s=n(6664),r=n(45522);const o=e=>{const t=(0,a.I0)();return(0,i.useCallback)(((n,i)=>(0,r.T)({hide:()=>t((0,s.Xe)()),show:()=>t((0,s.TB)(n,i)),msTimeout:e})),[e,t])}},28133:(e,t,n)=>{"use strict";n.d(t,{a:()=>r,z:()=>o});var i=n(59496),a=n(89605),s=n(37409);const r=()=>{const e=(0,a.TH)(),t=(0,s.g)();e.state?.referrer?t.setReferrer(e.state?.referrer):e.state={...e.state,referrer:t.getReferrer()}},o=e=>{const t=(0,s.g)(),n=(0,a.TH)();(0,i.useEffect)((()=>{t.setReferrer(e),n.state={..."object"==typeof n.state?n.state:{},referrer:e}}),[n,t,e])}},31070:(e,t,n)=>{"use strict";n.d(t,{Gt:()=>a,Hp:()=>i,XJ:()=>o,Yk:()=>d,b8:()=>r,gq:()=>s,q1:()=>l});const i={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"};function a(){return{type:i.TRIGGER_APP_START_IN_APP_MESSAGE}}function s(e){return{type:i.SHOW_IN_APP_MESSAGE,message:e}}function r(){return{type:i.DISMISS_IN_APP_MESSAGE}}function o(e,t){return{type:i.PREVIEW_IN_APP_MESSAGE,creativeId:e,appUri:t}}function l(e){return{type:i.SET_IN_APP_MESSAGING_ENV,env:e}}function d(e){return{type:i.SHOW_PREVIEW_TOOL,show:e}}},14204:(e,t,n)=>{"use strict";var i=n(8927),a=n(87995),s=n(25515),r=n(30045),o=n(32162),l=n(45658),d=n(72755),c=n(50346),u=n(3802),m=n(46997),p=n(61815),g=n(81090);const h={version:"1.1.64.510",date:new Date(2021,6,20)};function k(){if((0,p.ZO)()!==g.W.Desktop)return!0;const e=function(){const e=window.navigator.userAgent.match(p.c6);return e?.groups?.version??null}();if(!e)return!0;const t=function(e){const t=h.version.split(".")[2],[,n,i]=e.split(".");if("1"!==n)return new Date;const a=parseInt(t,10),s=parseInt(i,10);if(isNaN(s))return new Date;const r=s-a,o=new Date(h.date.getTime());return o.setDate(o.getDate()+14*r),o}(e);return n=t,((new Date).getTime()-n.getTime())/864e5<30;var n}var v=n(27998),f=n(38366),y=n(16320),S=n(83477),b=n(56969),_=n(88607),N=n(20455);const E="ui-panel-state",x=e=>{switch(e){case N.s.NowPlayingView:return N.s.NowPlayingView;case N.s.WhatsNewFeed:return N.s.WhatsNewFeed;default:return N.s.Disabled}};class C{listeners=[];constructor(e){this.localStorageAPI=e}_getPanelFromLocalStorage(){return x(this.localStorageAPI.getItem(E))}getLastCachedPanelState(){return this._getPanelFromLocalStorage()}subscribeToPanelState(e){this.listeners=[...this.listeners,e];const t=this.localStorageAPI.getEvents(),n=t=>{t.data.key===E&&e(x(t.data.value))};return t.addListener(_.u.UPDATE,n),e(this._getPanelFromLocalStorage()),()=>{t.removeListener(_.u.UPDATE,n)}}async setPanelState(e){this.localStorageAPI.setItem(E,e)}}var w=n(44743);class I{constructor(e,t,n,i){this.storage=e,this.storageKey=t,this.playerApi=n,this.libraryApi=i}executeAction(e,t){(function(e,t){return e===w.gi&&!!t})(e,t)&&this.playerApi.play(t.context,t.origin,t.options),function(e,t){return e===w.wH&&!!t}(e,t)&&this.libraryApi.add(...t.uris)}triggerActions(){const e=this.storage.getItem(this.storageKey);if(e){this.cleanActions();try{const t=JSON.parse(e);if(!function(e){return!!(e&&e.key&&e.action)}(t))return;this.executeAction(t.key,t.action)}catch(e){return}}}storeAction(...[e,t]){this.storage.setItem("PLAY_AT_FIRST_TAP_HAD_DEFERRED_ACTIONS",JSON.stringify(!0)),this.storage.setItem(this.storageKey,JSON.stringify({key:e,action:t}))}cleanActions(){this.storage.removeItem(this.storageKey)}}var T=n(30009);class A{async copy(e){(0,T.v)(e)}async paste(){return await navigator.clipboard.readText()}}var P=n(27555);const O=`${P.XA}/collection/v2`;var D=n(24014);class R{events=new D.yF;constructor(e,t,n){this._builder=e,this._transport=t,this._username=n,this._subscribeToCollectionChangedMessages()}_subscribeToCollectionChangedMessages(){if(!this._username)return;const e=new RegExp(String.raw`hm://collection/([^/]*)/[^/]*/json`);this._transport.matchMessages(e,(({payloads:t,uri:n})=>{if(void 0===t||0===t.length)return;const i=n.match(e)?.[1];if(!i||!(0,D.XC)(i))return;const{items:a}=JSON.parse(t[0]),{added:s,removed:r}=a.reduce(((e,{type:t,identifier:n,removed:i})=>{const a=`spotify:${t}:${n}`;return i?e.removed.push(a):e.added.push(a),e}),{added:[],removed:[]});s.length&&this.events.emit(D.zy.ADDED,{set:i,uris:s,source:"server"}),r.length&&this.events.emit(D.zy.REMOVED,{set:i,uris:r,source:"server"})}),d.DEALER_PLUGIN_NAME)}getEvents(){return this.events}async add(e,t){if(!this._username)throw new Error("Username is required");await function(e,t,n,i){return e.build().withHost(O).withPath("/write").withMethod("POST").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withResponseType("json").withBody(JSON.stringify({username:t,set:n,items:i.map((e=>({uri:e})))})).withEndpointIdentifier("/collection/v2/add").send()}(this._builder,this._username,e,t),this.events.emit(D.zy.ADDED,{set:e,uris:t,source:"client"})}async remove(e,t){if(!this._username)throw new Error("Username is required");await function(e,t,n,i){return e.build().withHost(O).withPath("/write").withMethod("POST").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withResponseType("json").withBody(JSON.stringify({username:t,set:n,items:i.map((e=>({uri:e,is_removed:!0})))})).withEndpointIdentifier("/collection/v2/remove").send()}(this._builder,this._username,e,t),this.events.emit(D.zy.REMOVED,{set:e,uris:t,source:"client"})}async contains(e,t){if(!this._username)throw new Error("Username is required");const n=await function(e,t,n,i){return e.build().withHost(O).withPath("/contains").withMethod("POST").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withResponseType("json").withBody(JSON.stringify({username:t,set:n,items:i.map((e=>({uri:e})))})).withEndpointIdentifier("/collection/v2/contains").send()}(this._builder,this._username,e,t);return n.body.found}subscribeContains(e,t,n){let i=[];this.contains(e,t).then((e=>{i=e,n(e)}));const a=({data:{set:a,uris:s}})=>{if(e!==a)return;s.some((e=>{const n=t.indexOf(e);return!1===i[n]}))&&(s.forEach((e=>{const n=t.indexOf(e);-1!==n&&(i[n]=!0)})),n(i))},s=({data:{set:a,uris:s}})=>{if(e!==a)return;s.some((e=>{const n=t.indexOf(e);return!0===i[n]}))&&(s.forEach((e=>{const n=t.indexOf(e);-1!==n&&(i[n]=!1)})),n(i))};return this.events.addListener(D.zy.ADDED,a),this.events.addListener(D.zy.REMOVED,s),()=>{this.events.removeListener(D.zy.ADDED,a),this.events.removeListener(D.zy.REMOVED,s)}}}var L=n(79711);class F{enableMenuItem(){return Promise.resolve()}disableMenuItem(){return Promise.resolve()}setTitlebarHeight(){return Promise.resolve()}notifyUsableStateReached(){return Promise.resolve()}notifyReadyStateReached(){return Promise.resolve()}notifyViewLoaded(){return Promise.resolve()}getEvents(){return new L.z}}var j=n(79452),M=n(94676),U=n(38345);class B extends j.t{constructor(e){super(e),this.webAudioFilters=[]}setEnabledState(e){this.localStorageAPI.setItem(M.K,e);const t=(e,t)=>{this.webAudioFilters[t]&&(this.webAudioFilters[t].gain.value=e.gain)};e?this.filters.forEach(t):U.PG.flat.filters.forEach(t)}getEnabledState(){const e=this.localStorageAPI.getItem(M.K);return!(e instanceof Error)&&e}subscribeToEnabledState(e){const t=this.localStorageAPI.getItem(M.K);e(!(t instanceof Error)&&t);const n=t=>{t.data.key===M.K&&e(t.data.value)},i=this.localStorageAPI.getEvents();return i.addListener(_.u.UPDATE,n),()=>{i.removeListener(_.u.UPDATE,n)}}connectAudioProcessor(e){const t=new AudioContext({latencyHint:"playback"}),n=t.createMediaElementSource(e);this.webAudioFilters=this.filters.map(((e,n)=>{const i=t.createBiquadFilter();return i.frequency.value=e.frequency,0===n?i.type="lowshelf":n===this.filters.length-1?i.type="highshelf":(i.type="peaking",i.Q.value=5),i.gain.value=e.gain,i})),this.webAudioFilters.reduce(((e,t)=>(e.connect(t),t)),n).connect(t.destination),document.addEventListener("click",(()=>{t.resume()}),{once:!0})}async setFilterGain(e,t){const n=Math.max(-U.l5,Math.min(t,U.l5)),i=this.filters.findIndex((t=>t.key===e));this.webAudioFilters[i]&&(this.webAudioFilters[i].gain.value=n),this.filters[i].gain=n}async getFilters(){return this.filters}isSupported(){return"AudioContext"in window}}var V=n(53016),H=n(56570);const G={show_connect_option:!1,connection:!1};class W extends H.Z{constructor(){super(),this.onAddListener(H.D.CONNECTION_STATE_CHANGE,(e=>{e.data.listener(new V.B(H.D.CONNECTION_STATE_CHANGE,G)),e.preventDefault()}))}connect(){return Promise.resolve(G)}disconnect(){return Promise.resolve(G)}}var z=n(93318),K=n(80588),Y=n(95357),q=n(19496),Z=n.n(q);class Q{async getVersionInfo(){return{containerVersion:Z().parse(navigator.userAgent).browser.version||"unknown",containerBuildType:"unknown",containerPlatform:"unknown",uiVersion:"xpui_2023-05-11_1683815926051_eb595a6",cefVersion:"unknown"}}subscribe(){return{cancel:()=>{}}}async prepareUpdate(){}async applyUpdate(){window.location.reload()}}var J=n(57920),$=n(90091);const X=(e,t)=>[(0,$.jx)(e),(0,$.UR)({version:"xpui_2023-05-11_1683815926051_eb595a6"}),(0,$.Mb)(),(0,$.sr)(t)],ee=(e,t,n,i,a)=>{const s=(0,J.mi)({transport:e,suppressPersist:false,context:X(t,n),storagePrefix:t,ownerProvider:i,useOptimizedESS2NA:a});return s};var te=n(58934),ne=n(41082);function ie(e,t,n){return Math.min(Math.max(e,t),n)}var ae=n(74824);const se="playback",re=.0625;class oe{_volume=null;_remoteVolume=null;constructor(e){this._harmony=e,this._events=new ae.N,this._events.addListener(ae.r.VOLUME,(({data:{volume:e,isLocal:t}})=>{this._volume=e||0,t&&(e=>{try{localStorage.setItem(se,JSON.stringify({volume:e}))}catch(e){}})(e)})),this._harmony.addListener(ne.ih.VOLUME_CHANGED,(({data:{volume:e,remote:t}})=>{this._events.emit(ae.r.VOLUME,{volume:e,isLocal:!t})})),this._harmony.addListener(ne.ih.LAST_ACTIVE_DEVICE_INFO_CHANGED,(({data:{deviceInfo:e}})=>{if(null!==e){const t=this._remoteVolume!==e.volume;t&&!e.local&&(this._remoteVolume=e.volume||0,this._events.emit(ae.r.VOLUME,{volume:this._remoteVolume,isLocal:!1})),null!==this._remoteVolume&&t&&e.local&&(this._remoteVolume=null,this._events.emit(ae.r.VOLUME,{volume:e.volume,isLocal:!0}))}}))}getCapabilities(){return{canChangeVolume:!0,canGetPlaybackInfo:!1,canGetFiles:!1,puffinEnabled:!1}}getEvents(){return this._events}async getVolume(){return await this._harmony.getVolume()}async setVolume(e){const t=ie(e,0,1);await this._harmony.setVolume(t)}async raiseVolume(){null!==this._volume&&await this.setVolume(this._volume+re)}async lowerVolume(){null!==this._volume&&await this.setVolume(this._volume-re)}async getPlaybackInfo(){return null}async getFiles(){throw new Error("Not implemented!")}getDevices(){throw new Error("Method not implemented.")}getCurrentDevice(){throw new Error("Method not implemented.")}setCurrentDevice(){throw new Error("Method not implemented.")}getFiltersEvents(){throw new Error("Method not implemented.")}getSavedDevices(){throw new Error("Method not implemented.")}}var le=n(70784);const de=.0625;class ce{_volume=null;constructor(e){this._overture=e,this._events=new ae.N,this._events.addListener(ae.r.VOLUME,(({data:{volume:e}})=>{this._volume=e})),this._overture.addListener(le.oQ.VOLUME_CHANGED,(({data:e})=>{this._events.emit(ae.r.VOLUME,{volume:e.volume,isLocal:!0})}))}getCapabilities(){return{canChangeVolume:!0,canGetPlaybackInfo:!1,canGetFiles:!1,puffinEnabled:!1}}getEvents(){return this._events}async getVolume(){return await this._overture.getVolume()}async setVolume(e){const t=ie(e,0,1);await this._overture.setVolume(t)}async raiseVolume(){null!==this._volume&&await this.setVolume(this._volume+de)}async lowerVolume(){null!==this._volume&&await this.setVolume(this._volume-de)}async getPlaybackInfo(){return null}async getFiles(){throw new Error("Not implemented!")}getDevices(){throw new Error("Method not implemented.")}getCurrentDevice(){throw new Error("Method not implemented.")}setCurrentDevice(){throw new Error("Method not implemented.")}getFiltersEvents(){throw new Error("Method not implemented.")}getSavedDevices(){throw new Error("Method not implemented.")}}function ue(e){const t=Z().getParser(window.navigator.userAgent),n=function(e){switch(e){case"macOS":return"osx";case"Chrome OS":return"chrome";default:return e}}(t.getOSName()||"not_applicable"),i=function(e,t){if("Windows"===e)switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return""}return t}(n,t.getOSVersion());return`web_player ${n} ${i};${t.getBrowserName()} ${t.getBrowserVersion()};${e}`.toLowerCase()}function me(){const e=Z().getParser(window.navigator.userAgent);return e.satisfies({chrome:">=37",firefox:">=47",safari:">=13.1",edge:">=79"})||e.getUA().includes("Spotify")}let pe=null;function ge(e,t){const n="Safari"===Z().parse(window.navigator.userAgent).browser.name;return pe=(0,ne.BE)({transport:e,client:{descriptor:{id:null,randomizeId:!0,name:`Web Player (${Z().getParser(window.navigator.userAgent).getBrowserName()})`,brand:"spotify",model:"web_player",platform_identifier:t.platformIdentifier,capabilities:{video_playback:me()}}},streamer:{disallowRobustnessValues:[ne.nA.EMPTY],cubicVolume:!0,videoPlayerContainer:t.videoPlayerContainer,disableMux:n,createPlayer:t.createPlayer},controller:{decorateTrackWindow:!0},claimInactivePlayerStates:!0,onlyLocalState:!1}),pe}var he=n(22508),ke=n(66842),ve=n(9374),fe=n(29251);function ye(e,{shuffle:t}){return(void 0!==t||!(0,c.RS)(e.uri))&&t}function Se(e,{repeat:t}){if(void 0===t&&(0,c.RS)(e.uri))return ne.zq.OFF;switch(t){case he.zq.REPEAT_NONE:return ne.zq.OFF;case he.zq.REPEAT_CONTEXT:return ne.zq.CONTEXT;case he.zq.REPEAT_TRACK:return ne.zq.TRACK;default:return}}function be({featureIdentifier:e,featureVersion:t,referrerIdentifier:n,viewURI:i,externalReferrer:a}){return{featureIdentifier:e,featureVersion:t,referrerIdentifier:n,viewURI:i,externalReferrer:a}}function _e(e,t,n){return{contextURI:e.uri,trackUID:n.skipTo?.uid,trackURI:n.skipTo?.uri,index:n.skipTo?.index,pageIndex:n.skipTo?.pageIndex,initialOffset:n.seekTo,shuffle:ye(e,n),repeatMode:Se(e,n),filter:e.metadata?.[he.sb.FILTERING_PREDICATE],sort:e.metadata?.[he.sb.SORTING_CRITERIA],playOrigin:be(t),paused:n.paused,loggingParams:n.loggingParams}}const Ne=new RegExp(String.raw`^q[0-9]+$`);function Ee(e,t,n){const i=!!e.uid&&Ne.test(e.uid),a=n??(i?"queue":null);return(0,c.wj)(e.uri)||(0,c.dB)(e.uri)?function(e,t,n){return{type:ve.p.TRACK,uri:t.linked_from?.uri?t.linked_from.uri:t.uri,uid:t.uid??null,name:t.name??"",mediaType:t.track_type??"audio",duration:{milliseconds:t.duration_ms??0},album:{type:ve.p.ALBUM,uri:t.album?.uri??"",name:t.album?.name??"",images:t.album?.images??[]},artists:t.artists?.map((({uri:e,name:t})=>({type:ve.p.ARTIST,uri:e,name:t||""})))??[],isLocal:(0,c.dB)(t.uri),provider:e,metadata:n,get images(){return this.album.images}}}(a,e,t):(0,c.hn)(e.uri)?"true"===t?.is_audiobook_chapter?function(e,t,n){return{type:ve.p.CHAPTER,uri:t.uri,uid:t.uid??null,name:t.name??"",mediaType:t.track_type??"audio",duration:{milliseconds:t.duration_ms??0},book:{type:ve.p.AUDIOBOOK,uri:t.album?.uri??"",name:t.album?.name??"",images:t.album?.images??[]},provider:e,metadata:n,get images(){return this.book.images}}}(a,e,t):function(e,t,n){return{type:ve.p.EPISODE,uri:t.uri,uid:t.uid??null,name:t.name??"",mediaType:t.track_type??"audio",duration:{milliseconds:t.duration_ms??0},show:{type:ve.p.SHOW,uri:t.album?.uri??"",name:t.album?.name??"",images:t.album?.images??[]},provider:e,metadata:n,get images(){return this.show.images}}}(a,e,t):(0,c.mg)(e.uri)?function(e,t,n){return{type:ve.p.AD,uri:t.uri,uid:t.uid??null,title:t.name??null,advertiser:t.artists?.[0].name??null,url:t.artists?.[0].uri??null,id:null,mediaType:t.track_type??"audio",duration:{milliseconds:t.duration_ms??0},images:t.album?.images??[],isPodcastAd:!1,isSkippableAd:!1,isTestAd:!1,provider:e,metadata:n}}(a,e,t):{...he.F3,uri:e.uri,uid:e.uid??null,provider:a}}function xe(e){switch(e){default:case ne.zq.OFF:return he.zq.REPEAT_NONE;case ne.zq.CONTEXT:return he.zq.REPEAT_CONTEXT;case ne.zq.TRACK:return he.zq.REPEAT_TRACK}}function Ce(e){switch(e){case ne.cJ.DEFAULT:case ne.cJ.UNKNOWN:case void 0:return{bitrateLevel:he.M4.UNKNOWN};case ne.cJ.LOW:return{bitrateLevel:he.M4.LOW};case ne.cJ.NORMAL:return{bitrateLevel:he.M4.NORMAL};case ne.cJ.HIGH:return{bitrateLevel:he.M4.HIGH};case ne.cJ.VERY_HIGH:return{bitrateLevel:he.M4.VERY_HIGH};case ne.cJ.HIFI:return{bitrateLevel:he.M4.HIFI};default:return(0,fe.U)(e)}}function we(e=[]){return e.map((e=>he.Fd.includes(e)?e:"unknown"))}function Ie({disallow_pausing_reasons:e=[],disallow_resuming_reasons:t=[],disallow_seeking_reasons:n=[],disallow_skipping_prev_reasons:i=[],disallow_skipping_next_reasons:a=[],disallow_toggling_repeat_context_reasons:s=[],disallow_toggling_repeat_track_reasons:r=[],disallow_toggling_shuffle_reasons:o=[],disallow_transferring_playback_reasons:l=[]}){return{canPause:0===e.length,canResume:0===t.length,canSeek:0===n.length,canSkipPrevious:0===i.length,canSkipNext:0===a.length,canToggleRepeatContext:0===s.length,canToggleRepeatTrack:0===r.length,canToggleShuffle:0===o.length,disallowPausingReasons:we(e),disallowResumingReasons:we(t),disallowSeekingReasons:we(n),disallowSkippingPreviousReasons:we(i),disallowSkippingNextReasons:we(a),disallowTogglingRepeatContextReasons:we(s),disallowTogglingRepeatTrackReasons:we(r),disallowTogglingShuffleReasons:we(o),disallowTransferringPlaybackReasons:we(l)}}class Te extends ke.Bc{constructor(e){super(),this._harmony=e,this._harmony.addListener(ne.ih.STATE_CHANGED,(({data:{state:e}})=>{this.emit(ke.rg.UPDATE,function(e){if(null===e)return null;const t=null!==e.context.uri,n=null!==e.track_window.current_track;return{sessionId:"",timestamp:e.timestamp,context:{uri:e.context.uri??"",metadata:e.context.metadata},index:{pageURI:null,pageIndex:null,itemIndex:null},item:(i=e.track_window.current_track,null===i?null:Ee(i)),shuffle:e.shuffle,repeat:xe(e.repeat_mode),speed:e.paused?0:1,playbackQuality:Ce(e.playback_quality),playbackId:null,positionAsOfTimestamp:e.position,duration:e.duration,restrictions:Ie(e.restrictions),hasContext:t&&n,isPaused:e.paused,isBuffering:!1,previousItems:e.track_window.previous_tracks.map((e=>Ee(e))),nextItems:e.track_window.next_tracks.map((e=>Ee(e)))};var i}(e))}))}}var Ae=n(5666),Pe=n(59580),Oe=n(58673);class De{_queue=null;_cache=new Pe.tp(36e5,3e5);constructor(e,t,n,i){this._events=e,this._queueManager=t,this._loader=n,this.getRepeatMode=i,this._queueManager.addListener(ne.ih.PLAYER_QUEUE_CHANGED,(async e=>{this._queue=e.data.internalPlayerQueue,this._state=await this.getQueueState(),this._events.emitQueueUpdate(this._state)})),this._state=(0,Ae.ew)([],this.getRepeatMode())}async getQueueState(){const e=this._queue?.current_track?Ee(this._queue?.current_track,this._queue?.current_track.metadata,this._queue?.current_track.provider):null,t=this._queue?.next_items.map((e=>Ee(e,e.metadata,e.provider)))??[];let n=e?[e,...t]:t;try{n=await(0,Oe.f_)(this._loader,this._cache,n)}catch(e){console.error(e)}return(0,Ae.ew)(n,this.getRepeatMode())}isSameItem(e,t){return e.uid&&t.uid?e.uid===t.uid:e.uri===t.uri}isQueued(e){return"queue"===e.provider}markAsQueued(e){return{...e,provider:"queue",metadata:{...e.metadata,is_queued:"true"}}}createQueueItem(e,t){return{uri:e.uri,type:"track",provider:t?"queue":"context",metadata:{is_queued:t.toString()}}}async addToQueue(e){this._queueManager.addToQueue(e.map((e=>e.uri)))}async removeFromQueue(e){null!==this._queue&&this._queueManager.setInternalPlayerQueue({revision:this._queue.revision,next_items:this._queue.next_items?.filter((t=>!e.some((e=>this.isSameItem(e,t))))),previous_items:this._queue.previous_items})}async clearQueue(){null!==this._queue&&this._queueManager.setInternalPlayerQueue({revision:this._queue.revision,next_items:this._queue.next_items.filter((e=>!this.isQueued(e))),previous_items:this._queue.previous_items})}async reorderQueue(e,t){if(null===this._queue)return;const n=[...this._queue.next_items];this._queueManager.setInternalPlayerQueue({revision:this._queue.revision,next_items:(0,Ae.iT)(e,n,t,this.isSameItem,this.isQueued,this.markAsQueued),previous_items:this._queue.previous_items})}async insertIntoQueue(e,t){if(null===this._queue)return;const n=[...this._queue.next_items];this._queueManager.setInternalPlayerQueue({revision:this._queue.revision,next_items:(0,Ae.LT)(e,n,t,this.isSameItem,this.isQueued,this.createQueueItem),previous_items:this._queue.previous_items})}getQueue(){return this._state}getInternalQueue(){return this._queue}}class Re{_state=null;constructor(e,t,n){this._harmony=e,this._defaultFeatureVersion=n,this._events=new Te(this._harmony),this._events.addListener(ke.rg.UPDATE,(({data:e})=>{this._state=e})),this._queue=new De(this._events,this._harmony.getQueueManager(),t,(()=>this._state?.repeat??he.zq.REPEAT_NONE)),this.referrer="PlayerHarmony_UnknownReferrer"}setDefaultFeatureVersion(e){void 0===e.featureVersion&&(e.featureVersion=this._defaultFeatureVersion)}getCapabilities(){return{canChangeSpeed:!1,canChangeVolume:!0,canPlayMultipleContextPages:!0,maxNextTracks:2,hasDecoratedQueue:!0}}getEvents(){return this._events}getState(){return this._state}getReferrer(){return this.referrer}setReferrer(e){this.referrer=e}async play(e,t,n={}){this._events.emitPlaySync(e,t,n)||(this.setDefaultFeatureVersion(t),e.pages?this._harmony.playPages(e.pages.map((e=>({tracks:e.items?.map((({uri:e,uid:t})=>({uri:e,uid:t??void 0}))),pageURL:e.url,nextPageURL:e.nextPageUrl,metadata:e.metadata}))),null,_e(e,t,n)):this._harmony.playURI(e.uri,null,_e(e,t,n)))}async pause(){this._events.emitPauseSync()||await this._harmony.pause()}async resume(){this._events.emitResumeSync()||await this._harmony.resume()}async skipToNext(e){if(this._events.emitSkipToNextSync())return;let t;const n=this._queue.getInternalQueue();e&&n&&(t=n.next_items.find((t=>(!e.uid||t.uid===e.uid)&&t.uri===e.uri))),await this._harmony.nextTrack(null,{track:t})}async skipToPrevious(){this._events.emitSkipToPreviousSync()||await this._harmony.smartPreviousTrack()}async skipTo(){throw new Error("Not implemented")}async seekTo(e){await this._harmony.seek(e)}async seekForward(e){await this._harmony.seekForward(e)}async seekBackward(e){await this._harmony.seekBackward(e)}async setShuffle(e){await this._harmony.setShuffle(e)}async setRepeat(e){switch(e){case he.zq.REPEAT_NONE:await this._harmony.setRepeatMode(ne.zq.OFF);break;case he.zq.REPEAT_CONTEXT:await this._harmony.setRepeatMode(ne.zq.CONTEXT);break;case he.zq.REPEAT_TRACK:await this._harmony.setRepeatMode(ne.zq.TRACK)}}async setSpeed(e){throw new Error("Changing playback speed not possible with Harmony.")}async canPlayEncryptedContent(){return void 0!==(await this._harmony.getMediaConfig()).keysystem}async refreshCurrentContext(){await this._harmony.updateCurrentContext()}async updateContext(){throw new Error("Updating context not possible with Harmony.")}async addToQueue(e){if(!this._events.emitQueueActionSync(ke.FE.ADD))try{await this._queue.addToQueue(e),this._events.emitQueueActionComplete(ke.FE.ADD)}catch(e){throw this._events.emitQueueActionComplete(ke.FE.ADD,e instanceof Error?e:new Error("Unknown error object")),e}}async reorderQueue(e,t){if(!this._events.emitQueueActionSync(ke.FE.REORDER))try{await this._queue.reorderQueue(e,t),this._events.emitQueueActionComplete(ke.FE.REORDER)}catch(e){throw this._events.emitQueueActionComplete(ke.FE.REORDER,e instanceof Error?e:new Error("Unknown error object")),e}}async insertIntoQueue(e,t){if(!this._events.emitQueueActionSync(ke.FE.INSERT))try{await this._queue.insertIntoQueue(e,t),this._events.emitQueueActionComplete(ke.FE.INSERT)}catch(e){throw this._events.emitQueueActionComplete(ke.FE.INSERT,e instanceof Error?e:new Error("Unknown error object")),e}}async removeFromQueue(e){if(!this._events.emitQueueActionSync(ke.FE.REMOVE))try{await this._queue.removeFromQueue(e),this._events.emitQueueActionComplete(ke.FE.REMOVE)}catch(e){throw this._events.emitQueueActionComplete(ke.FE.REMOVE,e instanceof Error?e:new Error("Unknown error object")),e}}async clearQueue(){if(!this._events.emitQueueActionSync(ke.FE.CLEAR))try{await this._queue.clearQueue(),this._events.emitQueueActionComplete(ke.FE.CLEAR)}catch(e){throw this._events.emitQueueActionComplete(ke.FE.CLEAR,e instanceof Error?e:new Error("Unknown error object")),e}}getQueue(){return this._queue.getQueue()}getForcedShuffle(){return!1}setForcedShuffle(){}}function Le(e){return`Partner spotify ${e}`}var Fe=n(89241);function je(e){return function(...e){return e.filter((({url:e,height:t,width:n})=>Boolean(e)&&Boolean(t)&&Boolean(n))).map((({url:e,width:t,height:n})=>({url:e,height:parseInt(n??"0",10),width:parseInt(t??"0",10)})))}({url:e.image_url,height:e.image_height,width:e.image_width},{url:e.image_url_small,height:e.image_height_small,width:e.image_width_small},{url:e.image_url_large,height:e.image_height_large,width:e.image_width_large},{url:e.image_url_xlarge,height:e.image_height_xlarge,width:e.image_width_xlarge})}function Me(e,t){return null===e?null:(0,c.wj)(e.uri)||(0,c.dB)(e.uri)?function(e,t){const n=e.metadata;return{type:ve.p.TRACK,uri:e.uri,uid:null,name:n.title??"",mediaType:e.mediaType,duration:{milliseconds:t},album:{type:ve.p.ALBUM,uri:n.album_uri??"",name:n.album_title??"",images:je(n)},artists:[{type:ve.p.ARTIST,uri:n.artist_uri??"",name:n.artist_name??""}],isLocal:(0,c.dB)(e.uri),isExplicit:!1,is19PlusOnly:!1,provider:null,get images(){return this.album.images}}}(e,t):(0,c.hn)(e.uri)?function(e,t){const n=e.metadata;return{type:ve.p.EPISODE,uri:e.uri,uid:null,name:n.title??"",mediaType:e.mediaType,duration:{milliseconds:t},show:{type:ve.p.SHOW,uri:n.album_uri??"",name:n.album_title??"",images:je(n)},provider:null,get images(){return this.show.images}}}(e,t):(0,c.mg)(e.uri)?function(e,t){const n=e.metadata;return{type:ve.p.AD,uri:e.uri,uid:null,title:n.title??null,advertiser:n.artist_name??null,url:n.artist_uri??null,id:n.ad_id??null,mediaType:e.mediaType,duration:{milliseconds:t},images:[],isPodcastAd:!1,isSkippableAd:!1,isTestAd:!1,provider:null}}(e,t):{...he.F3,uri:e.uri,metadata:e.metadata||null}}function Ue(e){switch(e){case le.zq.CONTEXT:return he.zq.REPEAT_CONTEXT;case le.zq.TRACK:return he.zq.REPEAT_TRACK;case le.zq.NONE:default:return he.zq.REPEAT_NONE}}function Be({playbackState:e}){return{canPause:!!e.playing,canResume:!e.playing,canSeek:!0,canSkipPrevious:!1,canSkipNext:!1,canToggleRepeatContext:!1,canToggleRepeatTrack:!1,canToggleShuffle:!1,disallowPausingReasons:e.playing?[]:["already_paused"],disallowResumingReasons:e.playing?["already_playing"]:[],disallowSeekingReasons:[],disallowSkippingPreviousReasons:["unknown"],disallowSkippingNextReasons:["unknown"],disallowTogglingRepeatContextReasons:["unknown"],disallowTogglingRepeatTrackReasons:["unknown"],disallowTogglingShuffleReasons:["unknown"],disallowTransferringPlaybackReasons:[]}}function Ve(e){const t=e.hasContext||e.isPaused||e.isBuffering;return{canSeek:t??!1,disallowSeekingReasons:t?[]:["not_playing_track"]}}function He(e){if(null===e)return null;const t=e.playbackState,n=e.track,i=n?.metadata,a=function(e){const t=e.track,n=t?.metadata;return n?.contextURI||t?.uri||null}(e);return a?{sessionId:"",timestamp:Date.now(),context:{uri:a??"",metadata:i},index:{pageURI:null,pageIndex:null,itemIndex:null},item:n?Me(n,t.duration):null,shuffle:!1,repeat:Ue(le.zq.NONE),speed:1,playbackQuality:{bitrateLevel:he.M4.UNKNOWN},playbackId:null,positionAsOfTimestamp:t.position,duration:t.duration,restrictions:{...Be(e),...Ve({hasContext:!!n&&!!a,isPaused:!t.playing,isBuffering:!1})},hasContext:!!n&&!!a,isPaused:!t.playing,previousItems:[],nextItems:[]}:null}const Ge=200,We=400;var ze=n(23327);const Ke={"com.apple.fps.1_0":"fairplay","com.widevine.alpha":"widevine","com.microsoft.playready":"playready"},Ye=e=>e.pages?.length&&e.pages[0].items?.length?e.pages[0].items[0]:e,qe=async(e,t,n,i="com.widevine.alpha",a)=>{const s={...t.metadata,contextURI:t!==e?e.uri:null};if(t.metadata?.externalResolvedUrl)return(0,le.SK)({uri:t.uri,resolvedURL:t.metadata?.externalResolvedUrl,fileId:"",metadata:s,logData:a});if("episode"===(0,c.EC)(t.uri)?.type){const e=s.mediaType,n="yes"===s.useAuthEndpoint,r=((e,t=!1,n="audio")=>t?`@webgate/${Ke[e]}-license/v1/${n}/license`:`https://spclient.wg.spotify.com/${Ke[e]}-license/v1/unauth/${n}/license`)(i,n,e),o=await(0,ze.IS)(t,i,e);return(0,le.SK)({uri:t.uri,licenseEndpoint:r,metadata:s,logData:a,fileId:"",noAuth:!n,...o})}const r=new Error(`No valid solution has been found to play this item (${t?.uri})`);throw n.emitSync(ke.rg.ERROR,new Fe.lu(Fe.cg.ONE_TRACK_UNPLAYABLE,[],r)),r};function Ze(e,t){const n=function(e){const t=new ke.Bc;let n,i,a={sessionId:"",timestamp:0,context:{uri:""},index:{pageURI:null,pageIndex:null,itemIndex:null},item:null,shuffle:!1,repeat:he.zq.REPEAT_NONE,speed:1,playbackQuality:{bitrateLevel:he.M4.UNKNOWN},playbackId:null,positionAsOfTimestamp:0,duration:0,restrictions:{canPause:!1,canResume:!1,canSeek:!1,canSkipNext:!1,canSkipPrevious:!1,canToggleRepeatContext:!1,canToggleRepeatTrack:!1,canToggleShuffle:!1,disallowPausingReasons:["not_playing_track"],disallowResumingReasons:["not_playing_track"],disallowSeekingReasons:["not_playing_track"],disallowSkippingPreviousReasons:["not_playing_context"],disallowSkippingNextReasons:["not_playing_context"],disallowTogglingRepeatContextReasons:["not_playing_context"],disallowTogglingRepeatTrackReasons:["not_playing_context"],disallowTogglingShuffleReasons:["not_playing_context"],disallowTransferringPlaybackReasons:[]},hasContext:!1,isPaused:!1,isBuffering:!1,previousItems:[],nextItems:[]};function s(e){return{...a,...e,context:{...a.context,...e?.context}}}function r(e){a=s(e),t.emit(ke.rg.UPDATE,a)}async function o(){r(He(await e.getCurrentState()))}async function l(e){if(e){if(n)return;n=setTimeout((()=>{n=null,r({isBuffering:e})}),Ge)}else n?(clearTimeout(n),n=null,r({isBuffering:e})):i||(i=setTimeout((()=>{i=null,r({isBuffering:e})}),We))}async function d(){const t=await e.getCurrentState(),n=He(t),i=n?{...n,isBuffering:!1,hasContext:!1,isPaused:!1,positionAsOfTimestamp:a.duration}:{positionAsOfTimestamp:a.duration,position:a.duration,isBuffering:!1,hasContext:!1,isPaused:!1,restrictions:Be(t)},o=s(i),l=Ve(i);r({...o,restrictions:{...i.restrictions,...l}})}return e.on(le.oQ.ERROR,(e=>{const{error:n}=e.data;n.unrecoverable?t.emit(ke.rg.ERROR,new Fe.lu(Fe.cg.PLAYBACK_ERROR,[],n)):t.emit(ke.rg.ERROR,new Fe.jB(Fe.cg.PLAYBACK_ERROR,[],n))})),e.on(le.oQ.PAUSED,o),e.on(le.oQ.PROGRESS,(async()=>{Date.now()-a.timestamp>=1e3&&o(),(a.isBuffering||n)&&((await e.getCurrentState()).playbackState.buffering||l(!1))})),e.on(le.oQ.TRACK_LOADED,o),e.on(le.oQ.TRACK_ENDED,d),e.on(le.oQ.LIST_ENDED,d),e.on(le.oQ.BUFFERING_START,(async()=>{await l(!0)})),e.on(le.oQ.BUFFERING_END,(async()=>{await l(!1)})),e.on(le.oQ.AUTOPLAY_FAILED,(async()=>{await l(!1)})),e.on(le.oQ.BEFORE_TRACK_LOAD,(async()=>{await l(!0)})),e.on(le.oQ.POSITION_CHANGED,(async()=>{(await e.getCurrentState()).playbackState.playing&&await l(!0)})),t}(e);let i,a=null,s="PlayerOverture_UnknownReferrer",r={unloadedSeekPosition:0,playArgs:null};const o=async()=>{if(void 0===i){const t=await e.getMediaConfig();i=t.keysystem}return i};return n.addListener(ke.rg.UPDATE,(({data:e})=>{a=e})),"undefined"!=typeof window&&o(),{getCapabilities:()=>({canChangeSpeed:!1,canChangeVolume:!0,canPlayMultipleContextPages:!1,maxNextTracks:0,hasDecoratedQueue:!1}),canPlayEncryptedContent:async()=>void 0!==await o(),getEvents:()=>n,getState:()=>a,getReferrer:()=>s,setReferrer(e){s=e},async play(i,a,s){if(n.emitPlaySync(i,a,s??{}))return;const l=await o(),d=Ye(i),c=await qe(i,d,n,l,t),u=(0,le.Sy)({tracks:[c]}),m={index:s?.skipTo?.index??void 0,initialPosition:s?.seekTo??0};await e.playList(u,m),r={playArgs:[i,a,s],unloadedSeekPosition:0}},async pause(){n.emitPauseSync()||await e.pause()},async resume(){if(!!(await e.getCurrentState()).track){if(n.emitResumeSync())return;await e.resume()}else if(r.playArgs){const[e,t,n]=r.playArgs;await this.play(e,t,{...n,seekTo:r.unloadedSeekPosition})}else;},async skipToNext(){n.emitSkipToNextSync()||await e.nextTrack()},async skipTo(){throw new Error("Not implemented")},async skipToPrevious(){n.emitSkipToPreviousSync()||await e.previousTrack()},async seekTo(t){(await e.getCurrentState()).track?await e.seek(t):r.unloadedSeekPosition=t},async seekForward(t){const n=(await e.getCurrentState()).playbackState.position;await e.seek(n+t)},async seekBackward(t){const n=(await e.getCurrentState()).playbackState.position;await e.seek(n-t)},async setShuffle(){throw new Error("setShuffle is not supported in Overture")},async setRepeat(){throw new Error("setRepeat is not supported in Overture")},async setSpeed(){throw new Error("setSpeed is not supported in Overture")},async refreshCurrentContext(){},async updateContext(){throw new Error("Updating context not possible with Overture.")},async addToQueue(){throw new Error("addToQueue is not supported in Overture")},async clearQueue(){throw new Error("clearQueue is not supported in Overture")},async removeFromQueue(){throw new Error("removeFromQueue is not supported in Overture")},async reorderQueue(){throw new Error("reorderQueue is not supported in Overture")},async insertIntoQueue(){throw new Error("insertIntoQueue is not supported in Overture")},getQueue(){throw new Error("getQueue is not supported in Overture")},getForcedShuffle:()=>!1,setForcedShuffle(){}}}function Qe(e,{isAnonymous:t,type:n,createPlayer:i}){if(t){const t=function(e,t){return(0,le.cr)({transport:e,...t})}(e,{platform_identifier:Le(n),config:{preinitMediaElement:!1,enableWithoutEME:!0,unauthenticatedLogs:!0,videoPlayerContainer:".VideoPlayer__container",audioPlayerContainer:".VideoPlayer__container"},autoActivateElement:!0});return{harmony:null,overture:t}}return{harmony:ge(e,{videoPlayerContainer:".VideoPlayer__container",platformIdentifier:ue(n),createPlayer:i}),overture:null}}const Je=5e3,$e="data-translations-url-for-locale";var Xe=n(37180);class et{getContents(){return Promise.resolve({})}getEvents(){return{addListener:()=>{},removeListener:()=>{}}}getCapabilities(){return{isSupported:!1}}}class tt{subscribeToPrivateSession(){return()=>{}}async setPrivateSession(){}getCapabilities(){return{isSupported:!1}}}var nt=n(83466),it=n(89487),at=n(34553);class st{constructor(e){this.recaptchaWebPlayerFraudSiteKey=e,this.log("load")}log(e){const{grecaptcha:t}=window;if(t){const n=`open3/${e.toLowerCase()}`;t.enterprise.ready((()=>{t.enterprise.execute(this.recaptchaWebPlayerFraudSiteKey,{action:n}).then((e=>{const t=new URLSearchParams({token:e,action:n,productType:at.zH});fetch(`/recaptcha/fraud?${t}`)})).catch((()=>{}))}))}}}var rt=n(38693);class ot{constructor(e,t){this._playlistAPI=e,this._showAPI=t}isURIReportable(e){return(0,rt.gS)(e)}canReportPlaylist(e,t){return(0,rt.RH)(this._playlistAPI,e,t,!0)}getReportURL(e){return Promise.resolve(`https://support.spotify.com/abuse/?uri=${e}&platform=desktop-web`)}canReportShow(e){return(0,rt.j2)(this._showAPI,e)}}class lt{getCapabilities(){return{isSupported:!1}}async getSegments(){return[]}async getArtists(){return[]}}async function dt(){let e=null;if("serviceWorker"in navigator){const{Workbox:t}=await n.e(1814).then(n.bind(n,27107));e=new t("/service-worker.js"),e.register()}return async function(t){if(e){const n=await e.messageSW(t);return JSON.parse(n)}return new Promise((()=>{}))}}var ct=n(7498),ut=n(42495);class mt{_events=new ct.C;_hasSubtitleSupport=!1;_isLocal=!0;_subtitleLanguages=[];constructor(e,t){if(this._harmony=e,null===this._harmony)return void(this._hasSubtitleSupport=!1);this._hasSubtitleSupport=t.getValue(ut.dq),this._harmony.addListener(ne.ih.LAST_ACTIVE_DEVICE_INFO_CHANGED,(({data:e})=>{this._isLocal=e.deviceInfo?.local??!0}));let n=null;this._harmony.addListener(ne.ih.STATE_CHANGED,(({data:e})=>{const t=e.state?.track_window?.current_track,i=t?.uri??null,a="episode"===t?.type;this._hasSubtitleSupport&&this._isLocal&&a?i!==n&&(setTimeout((async()=>{const e=await this._harmony.getSubtitleLanguages();this.setSubtitleLanguages(e)}),1e3),n=i):this.setSubtitleLanguages([])}))}setSubtitleLanguages(e){this._subtitleLanguages=e,this._events.emit(ct.d.SUBTITLE_LANGUAGES_CHANGED,e)}getCapabilities(){return{hasSubtitleSupport:this._hasSubtitleSupport,hasMinimizeBitrateSupport:!1,hasPipSupport:!1}}getEvents(){return this._events}async getSubtitleLanguages(){return this._subtitleLanguages}async getPreferredSubtitleLanguage(){return null===this._harmony?null:this._harmony.getActiveSubtitleLanguage()}async setPreferredSubtitleLanguage(e){null!==this._harmony&&(null!==e?(this._harmony.setSubtitleLanguage(e),this._harmony.showSubtitles()):this._harmony.hideSubtitles())}setMinimizeBitrate(e){}setWindow(e){}}var pt=n(25899);const gt="web-player";var ht=n(65204);const kt=e=>!!e&&["accessToken","accessTokenExpirationTimestampMs","isAnonymous"].every((t=>t in e));function vt(e,t,n=(()=>{})){let i=t();return kt(i)||(i=null),(0,ht.k)((async()=>{if(i&&!(0,ht.p)(i))return i;const t=await function(e,t,n){return e.build().withHost(P.SW).withHostIdentifier("https://open.spotify.com").withPath("/get_access_token").withQueryParameters({reason:t,productType:n}).withoutMarket().withoutAuthorization().withEndpointIdentifier("/get_access_token").send()}(pt.b.getInstance(),"transport",e);return t.body}),n)}var ft=n(51818),yt=n(57849);class St{_events=new ft.a;_state=yt.p;constructor(e,t){this._tokenProvider=vt(e,t,this.onTokenChanged.bind(this))}onTokenChanged(e){this._state={isAuthorized:null!==e&&!(0,ht.p)(e),token:e,retryAttempt:null,retryAt:null},this._events.emit(ft.B.UPDATE,this._state)}getCapabilities(){return{canGetSessionTransferURL:!1}}getEvents(){return this._events}getState(){return this._state}getTokenProvider(){return this._tokenProvider}tryAuthorize(){throw new Error("Not implemented!")}async getSessionTransferURL(){throw new Error("Getting a session transfer URL is not possible on web!")}}var bt=n(17407),_t=n(67189);function Nt(e,t,n){return!e&&(!t.startsWith("harmony:")||!n.startsWith("Web Player")&&!n.startsWith("Mobile Web Player"))}function Et(e){const{id:t,name:n,type:i,is_group:a,local:s,is_active:r,is_being_activated:o,is_controllable:l,volume:d,playback_features:c,version:u}=e;return{id:t,connectStateId:t,name:n??"",type:i,isGroup:a,isLocal:s,isActive:r,isConnecting:o,isDisabled:!l,volume:d,hifiSupport:{fullySupported:!!c?.hifi_status?.fully_supported,deviceSupported:!!c?.hifi_status?.device_supported,userEligible:!!c?.hifi_status?.user_eligible},supportsLogout:Nt(s,u,n)}}function xt(e,t){return t?_t.TK.CONNECTING:e&&!e.isLocal?_t.TK.CONNECTED:_t.TK.NOT_CONNECTED}function Ct(e){const t=e.map(Et);let n=t.find((e=>e.isActive));if(!n){const e=t.findIndex((e=>e.isLocal));-1!==e&&(n={...t[e],isActive:!0},t[e]=n)}const i=t.find((e=>e.isConnecting&&!e.isActive));return{connectionStatus:xt(n,i),activeDevice:n??null,connectingDevice:i??null,devices:t}}class wt extends bt.M{constructor(e){super(),this.harmony=e;let t=null;this.harmony.addListener(ne.ih.DEVICES_CHANGED,(({data:e})=>{e.devices&&e.devices.length>0&&(t=Ct(e.devices),this.emit(bt.F.UPDATE,t))})),this.harmony.addListener(ne.ih.LAST_ACTIVE_DEVICE_INFO_CHANGED,(async({data:e})=>{if(e.deviceInfo)if(t&&t.activeDevice?.id===e.deviceInfo.id)this.emit(bt.F.UPDATE,function(e,t){const n=Et(t),i=e.devices.findIndex((e=>e.isActive)),a=[...e.devices];return-1!==i&&(a[i]=n),{...e,connectionStatus:xt(n,void 0),activeDevice:n,devices:a}}(t,e.deviceInfo));else{const e=await this.harmony.getDevices();e&&e.length>0&&(t=Ct(e),this.emit(bt.F.UPDATE,t))}}))}}class It{state=null;constructor(e){this.harmony=e,this.events=new wt(this.harmony),this.events.addListener(bt.F.UPDATE,(({data:e})=>{this.state=e}))}getCapabilities(){return{supportsLocalDiscovery:!1}}getState(){return this.state}getEvents(){return this.events}async discoverDevices(){throw new Error("Discovering devices on local network is not supported in Harmony")}async transferPlayback(e,t){await this.harmony.transfer(e,{loggingParams:t})}async logout(e){if(null===e||0===e.length)throw new Error("missing device id");const t=await this.harmony.logout(e);return{success:t}}async setPreferredIncarnation(){throw new Error("Device Incarnation not supported")}}class Tt extends bt.M{}class At{constructor(){this.events=new Tt}getCapabilities(){return{supportsLocalDiscovery:!1}}getState(){return null}getEvents(){return this.events}async discoverDevices(){}async transferPlayback(e,t){}async logout(){return Promise.resolve({success:!0})}async setPreferredIncarnation(){return Promise.resolve({success:!0})}}var Pt=n(41921),Ot=n(49258),Dt=n(78315);const Rt=Spicetify.GraphQL.Definitions["addToLibrary"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"addToLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addLibraryItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]},Lt=Spicetify.GraphQL.Definitions["removeFromLibrary"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"removeFromLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeLibraryItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]},Ft=Spicetify.GraphQL.Definitions["pinLibraryItem"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"pinLibraryItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinItemInLibrary"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinResult"}}]}}]}}]},jt=Spicetify.GraphQL.Definitions["unpinLibraryItem"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"unpinLibraryItem"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"unpinItemInLibrary"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinResult"}}]}}]}}]};function Mt(e){const t=e.map((e=>(0,c.EC)(e))).map((e=>null!==e?e.type:null)).reduce(((e,t)=>e===t?e:null));if(null===t)throw new Error("Given URIs need to be of the same type!");return t}function Ut(e){return e===c.JM.ALBUM||e===c.JM.ARTIST||e===c.JM.TRACK||e===c.JM.SHOW||e===c.JM.EPISODE}async function Bt(e,t){if(!Ut(Mt(t)))throw new Error("Unknown URI type!");await e(Rt,{uris:t},["uris"])}async function Vt(e,t){if(!Ut(Mt(t)))throw new Error("Unknown URI type!");await e(Lt,{uris:t},["uris"])}async function Ht(e,t,n){const i=await e(Ft,{uri:(0,Dt.h)(t,n)});return i?.data?.pinItemInLibrary?.pinResult??null}async function Gt(e,t,n){await e(jt,{uri:(0,Dt.h)(t,n)})}var Wt=n(72071);const zt=Spicetify.GraphQL.Definitions["fetchLibraryAlbums"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchLibraryAlbums"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"library"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albums"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryAlbumPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"offset"}},{kind:"Field",name:{kind:"Name",value:"limit"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryAlbumResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"addedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"album"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryAlbum"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryAlbum"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}}]}}]}}]}}]},Kt=Spicetify.GraphQL.Definitions["areAlbumsInLibrary"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"areAlbumsInLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albums"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"saved"}}]}}]}}]}}]},Yt=Spicetify.GraphQL.Definitions["fetchLibraryArtists"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchLibraryArtists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"library"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryArtistPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"offset"}},{kind:"Field",name:{kind:"Name",value:"limit"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryArtistResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"addedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"artist"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryArtist"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryArtist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]},qt=Spicetify.GraphQL.Definitions["areArtistsInLibrary"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"areArtistsInLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"saved"}}]}}]}}]}}]},Zt=Spicetify.GraphQL.Definitions["fetchLibraryTracks"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchLibraryTracks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"library"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryTrackPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"offset"}},{kind:"Field",name:{kind:"Name",value:"limit"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryTrackResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"addedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"track"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryTrack"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryTrack"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"discNumber"}},{kind:"Field",name:{kind:"Name",value:"trackNumber"}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}}]}}]}}]}}]}}]},Qt=Spicetify.GraphQL.Definitions["areTracksInLibrary"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"areTracksInLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"saved"}}]}}]}}]}}]},Jt=Spicetify.GraphQL.Definitions["fetchLibraryShows"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchLibraryShows"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"library"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"podcasts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryPodcastPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"offset"}},{kind:"Field",name:{kind:"Name",value:"limit"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryPodcastResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"addedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"podcast"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryPodcast"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryPodcast"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"language"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaType"}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}}]}}]}}]}}]},$t=Spicetify.GraphQL.Definitions["areShowsInLibrary"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"areShowsInLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"podcasts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"saved"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"saved"}}]}}]}}]}}]},Xt=Spicetify.GraphQL.Definitions["fetchLibraryAudiobooks"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchLibraryAudiobooks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"library"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"audiobooks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryAudiobookPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"offset"}},{kind:"Field",name:{kind:"Name",value:"limit"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryAudiobookResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"addedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"audiobook"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryAudiobook"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryAudiobook"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"authors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"accessInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isUserMemberOfAtLeastOneGroup"}}]}}]}}]}}]}}]},en=Spicetify.GraphQL.Definitions["fetchLibraryEpisodes"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchLibraryEpisodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"library"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"episodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryEpisodePage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"offset"}},{kind:"Field",name:{kind:"Name",value:"limit"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserLibraryEpisodeResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"addedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"episode"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryEpisode"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryEpisode"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"mediaType"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}},{kind:"Field",name:{kind:"Name",value:"state"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"language"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"restrictions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paywallContent"}}]}}]}}]}}]}}]},tn=Spicetify.GraphQL.Definitions["areEpisodesInLibrary"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"areEpisodesInLibrary"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"episodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"saved"}}]}}]}}]}}]};function nn(e){return e.map((e=>null!==e&&(("Album"===e.__typename||"Artist"===e.__typename||"Track"===e.__typename||"Podcast"===e.__typename||"Episode"===e.__typename||"Audiobook"===e.__typename)&&e.saved)))}async function an(e,t,n){const i=(a=n.filter((t=>!e.has(t))),s=e=>{const t=(0,c.EC)(e);if(null===t||(n=t.type)!==c.JM.ALBUM&&n!==c.JM.ARTIST&&n!==c.JM.TRACK&&n!==c.JM.SHOW&&n!==c.JM.EPISODE)throw new Error("Unknown URI type!");var n;return t.type},a.reduce(((e,t)=>{const n=s(t);return(e[n]=e[n]||[]).push(t),e}),{}));var a,s;return await Promise.all(Object.entries(i).map((async([n,i])=>{const a=await async function(e,t,n){if(0===n.length)return[];switch(t){case c.JM.ALBUM:return nn((await e(Kt,{uris:n},["uris"])).flatMap((e=>e.albums)));case c.JM.ARTIST:return nn((await e(qt,{uris:n},["uris"])).flatMap((e=>e.artists)));case c.JM.TRACK:return nn((await e(Qt,{uris:n},["uris"])).flatMap((e=>e.tracks)));case c.JM.SHOW:return nn((await e($t,{uris:n},["uris"])).flatMap((e=>e.podcasts)));case c.JM.EPISODE:return nn((await e(tn,{uris:n},["uris"])).flatMap((e=>e.episodes)));default:throw new Error("Unknown URI type!")}}(t,n,i);i.forEach(((t,n)=>e.set(t,a[n])))}))),n.map((t=>e.get(t)??!1))}var sn=n(36472),rn=n(8191);class on extends rn.w{constructor(e,t,n,i){super(e),this._containsItems=t,this._transport=n,this._pattern=i}onMessage({payloads:e}){if(void 0===e||0===e.length)return;const{items:t}=JSON.parse(e[0]);if(!Array.isArray(t))return;let n=!1,i=!1,a=!1,s=!1,r=!1;for(const e of t)switch(e.type){case"album":{const t=(0,c.jy)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),n=!0;break}case"artist":{const t=(0,c.WN)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),i=!0;break}case"episode":{const t=(0,c.YD)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),a=!0;break}case"show":{const t=(0,c.xt)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),s=!0;break}case"track":{const t=(0,c.tn)(e.identifier).toURI();this._cache.set(t,!e.removed),this.emitUpdateItems([t],!e.removed),r=!0;break}}n&&this.emit(sn.EW.UPDATE,{list:sn.XD.ALBUMS}),i&&this.emit(sn.EW.UPDATE,{list:sn.XD.ARTISTS}),a&&this.emit(sn.EW.UPDATE,{list:sn.XD.EPISODES}),s&&(this.emit(sn.EW.UPDATE,{list:sn.XD.SHOWS}),this.emit(sn.EW.UPDATE,{list:sn.XD.BOOKS})),r&&this.emit(sn.EW.UPDATE,{list:sn.XD.TRACKS})}subscribeToUpdates(){this._transport.matchMessages(this._pattern,this.onMessage.bind(this),d.DEALER_PLUGIN_NAME)}unsubscribeFromUpdates(){this._transport.unmatchMessages(this._pattern,this.onMessage.bind(this),d.DEALER_PLUGIN_NAME)}async onBatchChanged(e){if(0===e.size)return;const t=Array.from(e.keys()),n=await this._containsItems(t);this.emitUpdateItems(t,n)}}class ln extends rn.w{subscribeToUpdates(){}unsubscribeFromUpdates(){}emitUpdateItems(){}emitOperationComplete(){}async onBatchChanged(){}}function dn(e,t,n,i){return i?new ln(e):new on(e,t,n,new RegExp(String.raw`hm://collection/(collection|listenlater|show)/.+/json`))}var cn=n(9603);function un(e){const t=(0,cn.U2)(e,"album"),n=(0,cn.U2)(t,"data");return"Album"!==n.__typename?function(e){const t={type:ve.p.ARTIST,uri:"",name:""};return{type:ve.p.ALBUM,uri:e,name:"",images:[],artists:[t],release:{date:new Date(1970,1).toISOString(),precision:"year"}}}(t._uri):{type:ve.p.ALBUM,uri:t._uri,name:n.name,artists:(0,cn.BH)(n.artists),images:(0,cn.NS)(n.coverArt),release:(0,cn.dR)(n.date)}}function mn(e){const t=(0,cn.U2)(e,"artist"),n=(0,cn.U2)(t,"data");return"Artist"!==n.__typename?(i=t._uri,{type:ve.p.ARTIST,uri:i,name:"",images:[]}):{type:ve.p.ARTIST,uri:t._uri,name:n.profile.name,images:(0,cn.NS)(n.visuals.avatarImage)};var i}var pn=n(12741);function gn(e){return{type:ve.p.EPISODE,uri:e,name:"",description:"",duration:{milliseconds:0},timeLeft:{milliseconds:0},images:[],languages:[],release:{date:new Date(1970,1).toISOString(),precision:"year"},show:{type:ve.p.SHOW,uri:"",name:"",publisher:"",images:[],mediaType:pn.E.UNKNOWN},podcastSubscription:{isPaywalled:!1,isUserSubscribed:!1},isPlayable:!1,isExplicit:!1,is19PlusOnly:!1}}function hn(e){return{type:ve.p.SHOW,uri:e,name:"",publisher:"",images:[],mediaType:pn.E.UNKNOWN}}function kn(e){const t=(0,cn.U2)(e,"episode"),n=(0,cn.U2)(t,"data");if("Episode"!==n.__typename)return gn(t._uri);const i=n.podcastV2,a=i.data,s="Podcast"!==a.__typename?hn(i._uri):(0,cn.jv)(a);return{type:ve.p.EPISODE,uri:t._uri,name:n.name,description:n.description??"",duration:(0,cn.Pv)(n.duration),timeLeft:(0,cn.GD)(n.duration,n.playedState),images:(0,cn.NS)(n.coverArt),languages:(0,cn.LO)(n.language),release:(0,cn.dR)(n.releaseDate),show:s,podcastSubscription:(0,cn.w$)(n.restrictions,n.playability),isPlayable:(0,cn.Rn)(n.playability),isExplicit:(0,cn.sW)(n.contentRating),is19PlusOnly:(0,cn.R7)(n.contentRating)}}function vn(e){return(0,cn.p_)(e,"UserLibraryEpisodePage","Error fetching library shows via GraphQL!"),{items:e.items.map(kn),offset:e.pagingInfo.offset,limit:e.pagingInfo.limit,totalLength:e.totalCount,unfilteredTotalLength:e.totalCount}}function fn(e){const t=(0,cn.U2)(e,"podcast"),n=(0,cn.U2)(t,"data");return"Podcast"!==n.__typename?(i=t._uri,{type:ve.p.SHOW,uri:i,name:"",publisher:"",images:[]}):{type:ve.p.SHOW,uri:t._uri,name:n.name,publisher:n.publisher?.name??"",images:(0,cn.NS)(n.coverArt)};var i}function yn(e){const t=(0,cn.U2)(e,"addedAt"),n=(0,cn.U2)(e,"track"),i=(0,cn.U2)(n,"data");return"Track"!==i.__typename?function(e,t){const n={type:ve.p.ARTIST,uri:"",name:""};return{type:ve.p.TRACK,uri:e,name:"",album:{type:ve.p.ALBUM,uri:"",name:"",images:[],artist:n},artists:[n],duration:{milliseconds:0},discNumber:0,trackNumber:0,isPlayable:!1,isExplicit:!1,is19PlusOnly:!1,isLocal:!1,addedAt:(0,cn.Bq)(t)}}(n._uri,t):{type:ve.p.TRACK,uri:n._uri,name:i.name,album:(0,cn.Cf)((0,cn.U2)(i,"albumOfTrack")),artists:(0,cn.mQ)(i.artists),duration:(0,cn.Pv)(i.duration),discNumber:i.discNumber,trackNumber:i.trackNumber,isPlayable:i.playability.playable,isExplicit:(0,cn.sW)(i.contentRating),is19PlusOnly:(0,cn.R7)(i.contentRating),isLocal:!1,addedAt:(0,cn.Bq)(t)}}function Sn(e){return(0,cn.p_)(e,"UserLibraryTrackPage","Error fetching library shows via GraphQL!"),{items:e.items.map(yn),offset:e.pagingInfo.offset,limit:e.pagingInfo.limit,totalLength:e.totalCount,unfilteredTotalLength:e.totalCount}}function bn(e){const t=(0,cn.U2)(e,"audiobook"),n=(0,cn.U2)(t,"data");if("Audiobook"!==n.__typename)return i=t._uri,{type:ve.p.AUDIOBOOK,uri:i,name:"",authorName:"",images:[],isLocked:!1};var i;const a=(0,cn.U2)(n,"authors");return{type:ve.p.AUDIOBOOK,uri:t._uri,name:n.name,authorName:a?.[0]?.name??"",images:(0,cn.NS)(n.coverArt),isLocked:(n.accessInfo&&!n.accessInfo.isUserMemberOfAtLeastOneGroup)??!1}}const _n=Spicetify.GraphQL.Definitions["libraryV2"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"libraryV2"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"100"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},defaultValue:{kind:"ListValue",values:[]}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"order"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"textFilter"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"flatten"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"features"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"LibraryFeature"}}}},defaultValue:{kind:"ListValue",values:[]}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"expandedFolders"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},defaultValue:{kind:"ListValue",values:[]}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"folderUri"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},defaultValue:{kind:"NullValue"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeFoldersWhenFlattening"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"libraryV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"page"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"filterIds"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}},{kind:"Argument",name:{kind:"Name",value:"sortOrderId"},value:{kind:"Variable",name:{kind:"Name",value:"order"}}},{kind:"Argument",name:{kind:"Name",value:"textFilter"},value:{kind:"Variable",name:{kind:"Name",value:"textFilter"}}},{kind:"Argument",name:{kind:"Name",value:"flatten"},value:{kind:"Variable",name:{kind:"Name",value:"flatten"}}},{kind:"Argument",name:{kind:"Name",value:"features"},value:{kind:"Variable",name:{kind:"Name",value:"features"}}},{kind:"Argument",name:{kind:"Name",value:"expandedFolders"},value:{kind:"Variable",name:{kind:"Name",value:"expandedFolders"}}},{kind:"Argument",name:{kind:"Name",value:"folderUri"},value:{kind:"Variable",name:{kind:"Name",value:"folderUri"}}},{kind:"Argument",name:{kind:"Name",value:"includeFoldersWhenFlattening"},value:{kind:"Variable",name:{kind:"Name",value:"includeFoldersWhenFlattening"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvalidFilterIdError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"invalidFilterId"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"InvalidSortOrderIdError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"invalidSortOrderId"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"availableFilters"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"selectedFilters"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"availableSortOrders"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"selectedSortOrder"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"breadcrumbs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"uri"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"pinnable"}},{kind:"Field",name:{kind:"Name",value:"pinned"}},{kind:"Field",name:{kind:"Name",value:"depth"}},{kind:"Field",name:{kind:"Name",value:"addedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"playedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"item"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2Album"}},{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2Artist"}},{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2Audiobook"}},{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2Podcast"}},{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2PodcastOrAudiobook"}},{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2Folder"}},{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2Playlist"}},{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2PseudoPlaylist"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"offset"}},{kind:"Field",name:{kind:"Name",value:"limit"}}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2Album"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2Artist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2Audiobook"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2AudiobookFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2AudiobookFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"authors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"accessInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isUserMemberOfAtLeastOneGroup"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2Podcast"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2PodcastFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2PodcastFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"language"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaType"}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2PodcastOrAudiobook"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastOrAudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2PodcastFields"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2AudiobookFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2Folder"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryFolderResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Folder"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2FolderFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2FolderFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"FolderResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Folder"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"folderCount"}},{kind:"Field",name:{kind:"Name",value:"playlistCount"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2Playlist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2PlaylistFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2PlaylistFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"collaborative"}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"avatar"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"width"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"username"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"images"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2PseudoPlaylist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LibraryPseudoPlaylistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PseudoPlaylist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"libraryV2PseudoPlaylistFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"libraryV2PseudoPlaylistFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PseudoPlaylist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"count"}},{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]};var Nn=n(88664),En=n(84120);function xn(e){const t=(0,cn.U2)(e,"item"),n=(0,cn.U2)(t,"data");return"Album"!==n.__typename?function(e){const t={type:ve.p.ARTIST,uri:"",name:""};return{type:ve.p.ALBUM,uri:e,name:"",images:[],artists:[t],release:{date:new Date(1970,1).toISOString(),precision:"year"},pinned:!1,addedAt:null,lastPlayedAt:null,canPin:Nn.TL.NO}}(t._uri):{type:ve.p.ALBUM,uri:n.uri,name:n.name,artists:(0,cn.BH)(n.artists),images:(0,cn.NS)(n.coverArt),release:(0,cn.dR)(n.date),pinned:e.pinned,canPin:Nn.TL.YES,addedAt:(0,cn.D)(e.addedAt),lastPlayedAt:(0,cn.D)(e.playedAt),color:(0,En.bS)(n.coverArt?.extractedColors)}}function Cn(e){const t=(0,cn.U2)(e,"item"),n=(0,cn.U2)(t,"data");return"Artist"!==n.__typename?(i=t._uri,{type:ve.p.ARTIST,uri:i,name:"",images:[],pinned:!1,canPin:Nn.TL.NO,addedAt:null,lastPlayedAt:null}):{type:ve.p.ARTIST,uri:t._uri,name:n.profile.name,images:(0,cn.NS)(n.visuals.avatarImage),pinned:e.pinned,canPin:Nn.TL.YES,addedAt:(0,cn.D)(e.addedAt),lastPlayedAt:(0,cn.D)(e.playedAt),color:(0,En.bS)(n.visuals.avatarImage?.extractedColors)};var i}function wn(e){const t=(0,cn.U2)(e,"item"),n=(0,cn.U2)(t,"data");if("Audiobook"!==n.__typename)return i=t._uri,{type:ve.p.AUDIOBOOK,uri:i,name:"",authorName:"",images:[],isLocked:!1,pinned:!1,canPin:Nn.TL.NO,addedAt:null,lastPlayedAt:null};var i;const a=(0,cn.U2)(n,"authors");return{type:ve.p.AUDIOBOOK,uri:t._uri,name:n.name,authorName:a?.[0]?.name??"",images:(0,cn.NS)(n.coverArt),isLocked:(n.accessInfo&&!n.accessInfo.isUserMemberOfAtLeastOneGroup)??!1,pinned:e.pinned,canPin:Nn.TL.YES,addedAt:(0,cn.D)(e.addedAt),lastPlayedAt:(0,cn.D)(e.playedAt),color:(0,En.bS)(n.coverArt?.extractedColors)}}function In(e,t,n=!1){const i=(0,cn.U2)(e,"item"),a=(0,cn.U2)(i,"data");return"Folder"!==a.__typename?(s=i._uri,{type:ve.p.FOLDER,uri:s,rowId:s,name:"",pinned:!1,canPin:Nn.TL.NO,numberOfFolders:0,numberOfPlaylists:0,canReorder:!1,isFlattened:!1,addedAt:null,lastPlayedAt:null}):{type:ve.p.FOLDER,uri:a.uri,rowId:a.uri,name:a.name,pinned:e.pinned,canPin:e.pinnable?Nn.TL.YES:Nn.TL.NO,numberOfFolders:a.folderCount,numberOfPlaylists:a.playlistCount,folderDepth:e.depth,canReorder:t,isFlattened:n,addedAt:(0,cn.D)(e.addedAt),lastPlayedAt:(0,cn.D)(e.playedAt)};var s}function Tn(){return{type:ve.p.USER,name:"",uri:"",id:"",username:"",images:[]}}function An(e,t,n,i){const a=(0,cn.U2)(e,"item"),s=(0,cn.U2)(a,"data");if(i.has(a._uri))return null;if("Playlist"!==s.__typename)return r=a._uri,o=e.depth,l=e.pinned,{type:ve.p.PLAYLIST,uri:r,name:"",images:[],pinned:l,canPin:Nn.TL.NO,owner:Tn(),folderDepth:o,canReorder:!1,addedAt:null,lastPlayedAt:null};var r,o,l;const d=(0,cn.U2)(s,"ownerV2"),c=(0,cn.U2)(d,"data");return{type:ve.p.PLAYLIST,uri:s.uri,name:s.name,images:(0,cn.NS)(s.images.items.at(0)??null),pinned:e.pinned,canPin:e.pinnable?Nn.TL.YES:Nn.TL.NO,folderDepth:e.depth,canAddTo:s.collaborative||"User"===c.__typename&&c.username===n,canReorder:t,owner:"User"===c.__typename?{type:ve.p.USER,uri:c.uri,name:c.name,username:c.username,images:(0,cn.NS)(c.avatar)??null,id:c.id}:Tn(),addedAt:(0,cn.D)(e.addedAt),lastPlayedAt:(0,cn.D)(e.playedAt),color:(0,En.bS)(s.images.items.at(0)?.extractedColors)}}function Pn(e){const t=(0,cn.U2)(e,"item"),n=(0,cn.U2)(t,"data");return"Podcast"!==n.__typename?(i=t._uri,{type:ve.p.SHOW,uri:i,name:"",publisher:"",images:[],pinned:!1,canPin:Nn.TL.NO,addedAt:null,lastPlayedAt:null}):{type:ve.p.SHOW,uri:t._uri,name:n.name,publisher:n.publisher?.name??"",images:(0,cn.NS)(n.coverArt),pinned:e.pinned,canPin:Nn.TL.YES,addedAt:(0,cn.D)(e.addedAt),lastPlayedAt:(0,cn.D)(e.playedAt),color:(0,En.bS)(n.coverArt?.extractedColors)};var i}function On(e){return"spotify:collection:tracks"===e.item._uri?function(e){const t=(0,cn.U2)(e,"item"),n=(0,cn.U2)(t,"data");if("PseudoPlaylist"!==n.__typename)return i=t._uri,{type:ve.p.LIKED_SONGS,uri:i,name:"",images:[],pinned:!1,canPin:Nn.TL.NO,addedAt:null,lastPlayedAt:null};var i;return{type:ve.p.LIKED_SONGS,uri:n.uri,name:n.name,images:n.image.sources,pinned:e.pinned,canPin:Nn.TL.YES,numberOfSongs:n.count,addedAt:null,lastPlayedAt:(0,cn.D)(e.playedAt),color:(0,En.bS)(n.image.extractedColors)}}(e):function(e){const t=(0,cn.U2)(e,"item"),n=(0,cn.U2)(t,"data");if("PseudoPlaylist"!==n.__typename)return i=t._uri,{type:ve.p.YOUR_EPISODES,uri:i,name:"",images:[],pinned:!1,canPin:Nn.TL.NO,addedAt:null,lastPlayedAt:null};var i;return{type:ve.p.YOUR_EPISODES,uri:n.uri,name:n.name,images:n.image.sources,pinned:e.pinned,canPin:Nn.TL.YES,addedAt:null,lastPlayedAt:(0,cn.D)(e.playedAt),color:(0,En.bS)(n.image.extractedColors)}}(e)}function Dn(e,t,n,i=new Set){const a=e?.page;if("InvalidFilterIdError"===a?.__typename)throw new Nn.Ik(a.invalidFilterId);if("InvalidSortOrderIdError"===a?.__typename)throw new Nn.j2(a.invalidSortOrderId);if("NotFound"===a?.__typename)throw new Nn.xX(a.message??"Folder not found");(0,cn.p_)(a,"LibraryPage","Error fetching library via GraphQL!");const s=t?.filters?.[0],r="Playlists"===s&&"Custom Order"===a.selectedSortOrder.id,o=!!t?.textFilter,l=a.breadcrumbs;return{items:(a.items??[]).map((e=>function(e,t,n,i,a){switch(e.item.__typename){case"AlbumResponseWrapper":return xn(e);case"ArtistResponseWrapper":return Cn(e);case"AudiobookResponseWrapper":return wn(e);case"PodcastOrAudiobookResponseWrapper":case"PodcastResponseWrapper":return Pn(e);case"PlaylistResponseWrapper":return An(e,t,n,a);case"LibraryPseudoPlaylistResponseWrapper":return On(e);case"LibraryFolderResponseWrapper":return In(e,t,i);default:return(0,fe._)(e.item,"Type not recognized"),null}}(e,r,n,o,i))),offset:a.pagingInfo.offset,limit:a.pagingInfo.limit,totalLength:a.totalCount,unfilteredTotalLength:a.totalCount,passedFilterIds:t?.filters??[],availableFilters:a.availableFilters,selectedFilters:a.selectedFilters,availableSortOrders:a.availableSortOrders,selectedSortOrder:a.selectedSortOrder,primaryFilter:Rn(s)??void 0,hasUnfilteredItems:!!o||a.totalCount>0,hasTextFilter:o,reorderAllowed:r,passedFolderUri:t?.folderUri,openedFolderName:l?.at(-1)?.name,parentFolderUri:l?.at(-2)?.uri}}function Rn(e){switch(e){case"Albums":return ve.p.ALBUM;case"Artists":return ve.p.ARTIST;case"Playlists":return ve.p.PLAYLIST;case"Podcasts & Shows":return ve.p.SHOW;case"Audiobooks":return ve.p.AUDIOBOOK;default:return null}}var Ln=n(73972);const Fn=0,jn=50,Mn={items:[],totalLength:0,unfilteredTotalLength:0,offset:0,limit:0},Un={...Mn,primaryFilter:void 0,passedFilterIds:[],availableFilters:[],selectedFilters:[],availableSortOrders:[],selectedSortOrder:{id:"",name:""},hasUnfilteredItems:!1,hasTextFilter:!1,reorderAllowed:!1,passedFolderUri:void 0};class Bn{_cache=new Map;_inFlightCache=new Pe.tL;constructor(e,t,n,i,a=new Set){this._loader=e,this._isAnonymous=n,this._currentUsername=i,this.filteredPlaylists=a,this._events=dn(this._cache,(async e=>await an(this._cache,this._batchedLoader,e)),t,this._isAnonymous),this._batchedLoader=(0,Pt.QM)(this._loader,50)}getCapabilities(){return{canSort:!1,canFilter:!1,canSortTracksAndEpisodes:!1,canFilterTracksAndEpisodes:!1,canModifyOffline:!1,canGetTracksByArtistOrAlbum:!1,canMarkEpisodesAsDone:!1,canFetchAllItems:!1,canPin:!0,canTextFilterContentsInRealtime:!1}}checkIfLoggedIn(){if(this._isAnonymous)throw new Error("LibraryAPI is not available for anonymous users!")}async query(e,t){return await this._inFlightCache.create(`${(0,Ot.Y)(e).name}:${JSON.stringify(t)}`,(()=>this._loader(e,t)))}markAsInLibrary(e){e.items.forEach((({uri:e})=>this._cache.set(e,!0)))}async getAlbums(e={}){if(this._isAnonymous)return Mn;const{offset:t=Fn,limit:n=jn}=e,i=await this.query(zt,{offset:t,limit:n}),a=(s=i?.data?.me?.library?.albums??null,(0,cn.p_)(s,"UserLibraryAlbumPage","Error fetching library albums via GraphQL!"),{items:s.items.map(un),offset:s.pagingInfo.offset,limit:s.pagingInfo.limit,totalLength:s.totalCount,unfilteredTotalLength:s.totalCount});var s;return this.markAsInLibrary(a),a}async getArtists(e={}){if(this._isAnonymous)return Mn;const{offset:t=Fn,limit:n=jn}=e,i=await this.query(Yt,{offset:t,limit:n}),a=(s=i?.data?.me?.library?.artists??null,(0,cn.p_)(s,"UserLibraryArtistPage","Error fetching library artists via GraphQL!"),{items:s.items.map(mn),offset:s.pagingInfo.offset,limit:s.pagingInfo.limit,totalLength:s.totalCount,unfilteredTotalLength:s.totalCount});var s;return this.markAsInLibrary(a),a}async getShows(e={}){if(this._isAnonymous)return Mn;const{offset:t=Fn,limit:n=jn}=e,i=await this.query(Jt,{offset:t,limit:n}),a=(s=i?.data?.me?.library?.podcasts??null,(0,cn.p_)(s,"UserLibraryPodcastPage"),{items:s.items.map(fn)||[],offset:s.pagingInfo.offset,limit:s.pagingInfo.limit,totalLength:s.totalCount,unfilteredTotalLength:s.totalCount});var s;return this.markAsInLibrary(a),a}async getTracks(e={}){if(this._isAnonymous)return Mn;if(void 0!==e.uri)return{items:[],offset:0,limit:0,totalLength:0,unfilteredTotalLength:0};const{offset:t=Fn,limit:n=jn}=e,i=await this.query(Zt,{offset:t,limit:n}),a=Sn(i?.data?.me?.library?.tracks??null);return this.markAsInLibrary(a),a}async getEpisodes(e={}){if(this._isAnonymous)return Mn;const{offset:t=Fn,limit:n=jn}=e,i=await this.query(en,{offset:t,limit:n}),a=vn(i?.data?.me?.library?.episodes??null);return this.markAsInLibrary(a),a}async getBooks(e={}){if(this._isAnonymous)return Mn;const{offset:t=Fn,limit:n=jn}=e,i=await this.query(Xt,{offset:t,limit:n}),a=(s=i?.data?.me?.library?.audiobooks??null,(0,cn.p_)(s,"UserLibraryAudiobookPage"),{items:s.items.map(bn)||[],offset:s.pagingInfo.offset,limit:s.pagingInfo.limit,totalLength:s.totalCount,unfilteredTotalLength:s.totalCount});var s;return this.markAsInLibrary(a),a}getEvents(){return this._events}onUpdateItems(e,t){this._events.emitUpdateItems(e,t)}async add(...e){if(!this._events.emitOperationSync(sn.pT.ADD,e)){this.checkIfLoggedIn();try{this.onUpdateItems(e,!0),await Bt(this._batchedLoader,e),this._events.emitOperationComplete(sn.pT.ADD,e)}catch(t){throw this.onUpdateItems(e,!1),this._events.emitOperationComplete(sn.pT.ADD,e,t instanceof Error?t:new Error("Unknown error object")),t}}}async remove(...e){if(!this._events.emitOperationSync(sn.pT.REMOVE,e)){this.checkIfLoggedIn();try{this.onUpdateItems(e,!1),await Vt(this._batchedLoader,e),this._events.emitOperationComplete(sn.pT.REMOVE,e)}catch(t){throw this.onUpdateItems(e,!0),this._events.emitOperationComplete(sn.pT.REMOVE,e,t instanceof Error?t:new Error("Unknown error object")),t}}}async contains(...e){if(this._isAnonymous)return new Array(e.length).fill(!1);const t=await an(this._cache,this._batchedLoader,e);return this.onUpdateItems(e,t),t}containsSync(e){return!this._isAnonymous&&this._cache.get(e)}markAsPlayed(){return Promise.resolve()}markAsUnPlayed(){return Promise.resolve()}async pin(e){const t=await Ht(this._loader,e,this._currentUsername);t===Ln.Mw.FailedItemLimitReached?this._events.emitUpdatePinErrorTooManyPins(e,4):t===Ln.Mw.Successful&&this._events.emitUpdatePin(e,!0)}async unpin(e){await Gt(this._loader,e,this._currentUsername),this._events.emitUpdatePin(e,!1)}async getContents(e){if(this._isAnonymous)return Un;const t=!!e?.textFilter,n=await this.query(_n,{filters:e?.filters,order:e?.sortOrder??null,textFilter:e?.textFilter??null,features:[Ln.dm.LikedSongs,Ln.dm.YourEpisodes],limit:e?.limit,offset:e?.offset,flatten:t,expandedFolders:t?void 0:e?.expandedFolders,folderUri:e?.folderUri||null,includeFoldersWhenFlattening:!0});return Dn(n?.data?.me?.libraryV2??null,e,this._currentUsername,this.filteredPlaylists)}async getAlbum(){return null}getContentsDownloadedFilterId(){return null}getFilterLabel(e){return e.toLowerCase().replace(/\s/g,"_")}getSortOrderLabel(e){return e.toLowerCase().replace(/\s/g,"_")}}var Vn=n(87843),Hn=n(53502);const Gn=0,Wn=50,zn={items:[],totalLength:0,unfilteredTotalLength:0,offset:0,limit:0},Kn={...zn,primaryFilter:void 0,passedFilterIds:[],availableFilters:[],selectedFilters:[],availableSortOrders:[],selectedSortOrder:{id:"",name:""},hasUnfilteredItems:!1,hasTextFilter:!1,reorderAllowed:!1,passedFolderUri:void 0};function Yn(e){return e?.type===ve.p.ALBUM}function qn(e){return e?.type===ve.p.ARTIST}function Zn(e){return e?.type===ve.p.SHOW}function Qn(e){return e?.type===ve.p.AUDIOBOOK}const Jn="Alphabetical",$n="Recently added",Xn="Creator";function ei(e){if(void 0===e)return $n;const{field:t}=e;if(t===Vn.hx.NAME)return Jn;if(t===Vn.hx.ADDED_AT)return $n;throw new Error("Invalid artist sort params!")}function ti(e){if(void 0===e)return $n;const{field:t}=e;if(t===Vn.lY.NAME)return Jn;if(t===Vn.lY.ARTIST_NAME)return Xn;if(t===Vn.lY.ADDED_AT)return $n;throw new Error("Invalid album sort params!")}function ni(e){if(void 0===e)return $n;const{field:t}=e;if(t===Vn.aW.NAME)return Jn;if(t===Vn.aW.ADDED_AT)return $n;throw new Error("Invalid show sort params!")}function ii(e){if(void 0===e)return $n;if(e===Vn.VN.NAME)return Jn;if(e===Vn.VN.ADDED_AT)return $n;throw new Error("Invalid book sort params!")}function ai(e){return void 0===e?null:e.value}class si{_cache=new Map;_inFlightCache=new Pe.tL;constructor(e,t,n,i,a=new Set){this._loader=e,this._isAnonymous=n,this._currentUsername=i,this.filteredPlaylists=a,this._events=dn(this._cache,(async e=>await an(this._cache,this._batchedLoader,e)),t,this._isAnonymous),this._batchedLoader=(0,Pt.QM)(this._loader,50)}getCapabilities(){return{canSort:!0,canFilter:!0,canSortTracksAndEpisodes:!1,canFilterTracksAndEpisodes:!1,canModifyOffline:!1,canGetTracksByArtistOrAlbum:!1,canMarkEpisodesAsDone:!1,canFetchAllItems:!1,canPin:!0,canTextFilterContentsInRealtime:!1}}checkIfLoggedIn(){if(this._isAnonymous)throw new Error("LibraryAPI is not available for anonymous users!")}async query(e,t){return await this._inFlightCache.create(`${(0,Ot.Y)(e).name}:${JSON.stringify(t)}`,(()=>this._loader(e,t)))}markAsInLibrary(e){e.items.forEach((e=>e&&this._cache.set(e.uri,!0)))}async getAlbums(e={}){if(this._isAnonymous)return zn;const{offset:t=Gn,limit:n=Wn,sort:i,filter:a}=e,s=await this.query(_n,{filters:["Albums"],order:ti(i),textFilter:ai((0,Hn.cj)(a)),offset:t,limit:n}),r=Dn(s?.data?.me?.libraryV2??null);return this.markAsInLibrary(r),{...r,items:r.items.filter(Yn)}}async getArtists(e={}){if(this._isAnonymous)return zn;const{offset:t=Gn,limit:n=Wn,sort:i,filter:a}=e,s=await this.query(_n,{filters:["Artists"],order:ei(i),textFilter:ai((0,Hn.cj)(a)),offset:t,limit:n}),r=Dn(s?.data?.me?.libraryV2??null);return this.markAsInLibrary(r),{...r,items:r.items.filter(qn)}}async getShows(e={}){if(this._isAnonymous)return zn;const{offset:t=Gn,limit:n=Wn,sort:i,filter:a}=e,s=await this.query(_n,{filters:["Podcasts & Shows"],order:ni(i),textFilter:ai((0,Hn.cj)(a)),offset:t,limit:n}),r=Dn(s?.data?.me?.libraryV2??null);return this.markAsInLibrary(r),{...r,items:r.items.filter(Zn)}}async getTracks(e={}){if(this._isAnonymous)return zn;if(void 0!==e.uri)return{items:[],offset:0,limit:0,totalLength:0,unfilteredTotalLength:0};const{offset:t=Gn,limit:n=Wn}=e,i=await this.query(Zt,{offset:t,limit:n}),a=Sn(i?.data?.me?.library?.tracks??null);return this.markAsInLibrary(a),a}async getEpisodes(e={}){if(this._isAnonymous)return zn;const{offset:t=Gn,limit:n=Wn}=e,i=await this.query(en,{offset:t,limit:n}),a=vn(i?.data?.me?.library?.episodes??null);return this.markAsInLibrary(a),a}async getBooks(e={}){if(this._isAnonymous)return zn;const{offset:t=Gn,limit:n=Wn,sort:i,filter:a}=e,s=await this.query(_n,{filters:["Audiobooks"],order:ii(i),textFilter:ai((0,Hn.cj)(a)),offset:t,limit:n}),r=Dn(s?.data?.me?.libraryV2??null);return this.markAsInLibrary(r),{...r,items:r.items.filter(Qn)}}getEvents(){return this._events}onUpdateItems(e,t){this._events.emitUpdateItems(e,t)}async add(...e){if(!this._events.emitOperationSync(sn.pT.ADD,e)){this.checkIfLoggedIn();try{this.onUpdateItems(e,!0),await Bt(this._batchedLoader,e),this._events.emitOperationComplete(sn.pT.ADD,e)}catch(t){throw this.onUpdateItems(e,!1),this._events.emitOperationComplete(sn.pT.ADD,e,t instanceof Error?t:new Error("Unknown error object")),t}}}async remove(...e){if(!this._events.emitOperationSync(sn.pT.REMOVE,e)){this.checkIfLoggedIn();try{this.onUpdateItems(e,!1),await Vt(this._batchedLoader,e),this._events.emitOperationComplete(sn.pT.REMOVE,e)}catch(t){throw this.onUpdateItems(e,!0),this._events.emitOperationComplete(sn.pT.REMOVE,e,t instanceof Error?t:new Error("Unknown error object")),t}}}async contains(...e){if(this._isAnonymous)return new Array(e.length).fill(!1);const t=await an(this._cache,this._batchedLoader,e);return this.onUpdateItems(e,t),t}containsSync(e){return!this._isAnonymous&&this._cache.get(e)}markAsPlayed(){return Promise.resolve()}markAsUnPlayed(){return Promise.resolve()}async pin(e){const t=await Ht(this._loader,e,this._currentUsername);t===Ln.Mw.FailedItemLimitReached?this._events.emitUpdatePinErrorTooManyPins(e,4):t===Ln.Mw.Successful&&this._events.emitUpdatePin(e,!0)}async unpin(e){return Gt(this._loader,e,this._currentUsername)}async getContents(e){if(this._isAnonymous)return Kn;const t=await this.query(_n,{filters:e?.filters,order:e?.sortOrder??null,textFilter:e?.textFilter??null,features:[Ln.dm.LikedSongs,Ln.dm.YourEpisodes],limit:e?.limit,offset:e?.offset,flatten:!!e?.textFilter,expandedFolders:e?.expandedFolders,folderUri:e?.folderUri||null});return Dn(t?.data?.me?.libraryV2??null,e,this._currentUsername,this.filteredPlaylists)}async getAlbum(){return null}getContentsDownloadedFilterId(){return null}getFilterLabel(e){return e.toLowerCase().replace(/\s/g,"_")}getSortOrderLabel(e){return e.toLowerCase().replace(/\s/g,"_")}}var ri=n(70556);class oi{constructor(){this._events=new ri.L}getCapabilities(){return{canSort:!1,canFilter:!1,canFetchAllTracks:!1}}getEvents(){return this._events}getIsEnabled(){return!1}setIsEnabled(e){}subscribeIsEnabled(e){return()=>{}}browseForFolder(){return Promise.resolve({path:null})}async getTracks(e){return Promise.reject()}async getSources(){return Promise.reject()}async mutateDefaultSource(e){return Promise.reject()}async addFolder(e){return Promise.reject()}async removeFolder(e){return Promise.reject()}}var li=n(7477),di=n(82538),ci=n(21113);const ui="https://spclient.wg.spotify.com/offline/v1";async function mi(e,t,n,i=!1){if(!n)throw new Error("Passing a `deviceKey` is required in `OfflineWeb`");const a={operations:[{operation:i?"REMOVE":"ADD",uri:t}]};await e.build().withHost(ui).withMethod("POST").withPath(`/devices/${n.deviceId}/cache/${n.cacheId}/resources:write`).withEndpointIdentifier("/devices/{deviceId}/cache/{cacheId}/resources:write").withJsonContentType().withBody(a).withoutMarket().send()}var pi=n(16470),gi=n(49288),hi=function(e){return e.UNSPECIFIED="UNSPECIFIED",e.REQUESTED="REQUESTED",e.PENDING="PENDING",e.DOWNLOADING="DOWNLOADING",e.DOWNLOADED="DOWNLOADED",e.FAILURE="FAILURE",e}(hi||{});const ki=(0,gi.y)(hi);function vi(e){if(ki(e))switch(e){case hi.UNSPECIFIED:return di.Om.NO;case hi.REQUESTED:case hi.PENDING:return di.Om.WAITING;case hi.DOWNLOADING:return di.Om.DOWNLOADING;case hi.DOWNLOADED:return di.Om.YES;case hi.FAILURE:return di.Om.NO;default:return(0,fe._)(e),di.Om.NO}return di.Om.NO}class fi{_events=new ci.N;constructor(e){this._builder=e}getCapabilities(){return{canDownload:()=>di.PQ.NO_CAPABILITY,canRemoteDownload:!0}}getEvents(){return this._events}async getDownloads(){return Promise.reject()}getAvailabilitySync(){return di.Om.NO}async getContextForDevices(e){const t=await async function(e,t){return await e.build().withHost(ui).withPath(`/resources/${encodeURIComponent(t)}`).withEndpointIdentifier("/resources/{resource}").withoutMarket().send()}(this._builder,e);return 200!==t.status?[]:function({devices:e,resources:t}){const n=Object.fromEntries(t.map((({cache_id:e,resource:t})=>[e,t])));return e.filter((({client_id:e})=>di.wk.includes(e))).map((({device_id:e,cache_id:t,name:i,type:a,platform:s,last_seen_at:r})=>({deviceId:e,cacheId:t,deviceType:a,clientPlatform:s,isLocal:!1,name:i,type:(0,pi.t)(a),lastSeenAtMs:new Date(r).getTime(),contextDownloadAvailability:vi(n[t]?.state),contextDownloadPercentage:n[t]?.progress??0})))}(t.body)}async addDownload(e,t){await mi(this._builder,e,t)}async removeDownload(e,t){await mi(this._builder,e,t,!0)}async removeAllDownloads(){return Promise.reject()}async removeCache(){return Promise.reject()}async getStatistics(){return Promise.reject()}}var yi=n(64250),Si=n(11302),bi=n(18037),_i=n(64107);const Ni=new RegExp(String.raw`hm://playlist/v2/playlist/(?.+)`);class Ei extends _i.n{_uris=new Set;constructor(e){super(),this._transport=e,this.onMessage=this.onMessage.bind(this)}onBatchChanged(e){this._uris=new Set(e.keys()),this._transport.unmatchMessages(Ni,this.onMessage,d.DEALER_PLUGIN_NAME),e.size>0&&this._transport.matchMessages(Ni,this.onMessage,d.DEALER_PLUGIN_NAME)}onMessage(e){const t=e.uri.match(Ni);if(void 0!==t?.groups?.base62Id){const e=(0,c.FW)(t.groups.base62Id).toURI();this._uris.has(e)&&this.emit(yi.XL.UPDATE,{uri:e})}}}var xi=n(74913);const Ci=Spicetify.GraphQL.Definitions["playlistUser"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"playlistUser"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatar"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}}]}}]}}]}}]},wi=Spicetify.GraphQL.Definitions["FetchPlaylistMetadata"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"FetchPlaylistMetadata"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistUser"}}]}},{kind:"Field",name:{kind:"Name",value:"images"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorRaw"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"collaborative"}},{kind:"Field",name:{kind:"Name",value:"followers"}},{kind:"Field",name:{kind:"Name",value:"format"}},{kind:"Field",name:{kind:"Name",value:"attributes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareUrl"}}]}}]}}]},Ii=Spicetify.GraphQL.Definitions["playlistContentsItemTrackArtist"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"playlistContentsItemTrackArtist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]},Ti=Spicetify.GraphQL.Definitions["playlistContentsItemTrackAlbum"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"playlistContentsItemTrackAlbum"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistContentsItemTrackArtist"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}}]}}]},Ai=Spicetify.GraphQL.Definitions["playlistContentsItemTrack"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"playlistContentsItemTrack"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",alias:{kind:"Name",value:"trackDuration"},name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"playcount"}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistContentsItemTrackAlbum"}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistContentsItemTrackArtist"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"discNumber"}},{kind:"Field",name:{kind:"Name",value:"trackNumber"}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}}]}}]},Pi=Spicetify.GraphQL.Definitions["playlistContentsItemLocalTrack"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"playlistContentsItemLocalTrack"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LocalTrack"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",alias:{kind:"Name",value:"albumName"},name:{kind:"Name",value:"album"}},{kind:"Field",alias:{kind:"Name",value:"artistName"},name:{kind:"Name",value:"artist"}},{kind:"Field",alias:{kind:"Name",value:"localTrackDuration"},name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}}]}}]},Oi=Spicetify.GraphQL.Definitions["playlistContentsItemEpisodeShow"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"playlistContentsItemEpisodeShow"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaType"}}]}}]},Di=Spicetify.GraphQL.Definitions["playlistContentsItemEpisode"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"playlistContentsItemEpisode"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",alias:{kind:"Name",value:"episodeDuration"},name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"language"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistContentsItemEpisodeShow"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"restrictions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paywallContent"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}}]}}]},Ri=Spicetify.GraphQL.Definitions["playlistContentsItemResponse"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"playlistContentsItemResponse"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistItemResponse"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistContentsItemTrack"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LocalTrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LocalTrack"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistContentsItemLocalTrack"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistContentsItemEpisode"}}]}}]}}]}}]}}]},Li=Spicetify.GraphQL.Definitions["playlistContentsItem"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"playlistContentsItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uid"}},{kind:"Field",name:{kind:"Name",value:"addedAt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"addedBy"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistUser"}}]}},{kind:"Field",name:{kind:"Name",value:"attributes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"value"}}]}},{kind:"Field",name:{kind:"Name",value:"item"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistContentsItemResponse"}}]}}]}}]},Fi=Spicetify.GraphQL.Definitions["FetchPlaylistContents"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"FetchPlaylistContents"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistItemsPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"offset"}},{kind:"Field",name:{kind:"Name",value:"limit"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"playlistContentsItem"}}]}}]}}]}}]}}]},ji=Spicetify.GraphQL.Definitions["fetchPlaylist"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchPlaylist"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playlistV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FetchPlaylistMetadata"}},{kind:"FragmentSpread",name:{kind:"Name",value:"FetchPlaylistContents"}}]}}]}}]}},...wi.definitions,...Ci.definitions,...xi.rD.definitions,...xi.rA.definitions,...Fi.definitions,...Li.definitions,...Ri.definitions,...Ai.definitions,...Ti.definitions,...Ii.definitions,...Pi.definitions,...Di.definitions,...Oi.definitions]},Mi=Spicetify.GraphQL.Definitions["fetchPlaylistMetadata"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchPlaylistMetadata"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playlistV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FetchPlaylistMetadata"}},{kind:"FragmentSpread",name:{kind:"Name",value:"FetchPlaylistContentsDurations"}}]}}]}}]}},...wi.definitions,...Ci.definitions,...xi.rD.definitions,...xi.rA.definitions,{kind:"FragmentDefinition",name:{kind:"Name",value:"FetchPlaylistContentsDurations"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistItemsPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"limit"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"item"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",alias:{kind:"Name",value:"trackDuration"},name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LocalTrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"LocalTrack"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"localTrackDuration"},name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"episodeDuration"},name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}}]}}]}}]}}]}}]}}]}}]}}]}}]},Ui=Spicetify.GraphQL.Definitions["fetchPlaylistContents"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchPlaylistContents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"0"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"50"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playlistV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"FetchPlaylistContents"}}]}}]}}]}},...Fi.definitions,...Li.definitions,...Ci.definitions,...xi.rD.definitions,...xi.rA.definitions,...Ri.definitions,...Ai.definitions,...Ti.definitions,...Ii.definitions,...Pi.definitions,...Di.definitions,...Oi.definitions]};function Bi(e){return{url:e.url,width:e.width,height:e.height}}function Vi(e){switch(e){case Ln.VQ.Minute:case Ln.VQ.Hour:case Ln.VQ.Day:return"day";case Ln.VQ.Month:return"month";case Ln.VQ.Year:case void 0:return"year";default:return(0,fe.U)(e)}}function Hi(e){return null===e||"User"!==e.data.__typename?null:{type:ve.p.USER,uri:e.data.uri,username:e.data.username,displayName:e.data.name??null,images:e.data.avatar?.sources?.map(Bi)||[]}}function Gi(e){return{type:ve.p.ARTIST,uri:e.uri,name:e.profile.name}}function Wi(e){switch(e){case Ln.Cl.Audio:return pn.E.AUDIO;case Ln.Cl.Video:return pn.E.VIDEO;case Ln.Cl.Mixed:return pn.E.MIXED;case Ln.Cl.Unknown:return pn.E.UNKNOWN;default:return(0,fe.U)(e)}}function zi(e,t){let n=!1;return e&&t!==Ln.Ku.PaymentRequired&&(n=!0),{isPaywalled:e,isUserSubscribed:n}}function Ki(e,t){if(null===e||null===e.item)return null;const n={uid:e.uid,playIndex:t,addedAt:e.addedAt?.isoString||null,addedBy:Hi(e.addedBy),formatListAttributes:e.attributes?.reduce(((e,{key:t,value:n})=>(e[t]=n,e)),{})??{}};switch(e.item.__typename){case"TrackResponseWrapper":return"Track"===e.item.data.__typename?{...(r=e.item.data,{type:ve.p.TRACK,uri:r.uri,name:r.name,duration:{milliseconds:r.trackDuration.totalMilliseconds},album:r.albumOfTrack?(o=r.albumOfTrack,{type:ve.p.ALBUM,uri:o.uri,name:o.name,artist:Gi(o.artists.items[0]),images:o.coverArt?.sources.map(Bi)??[]}):null,artists:r.artists.items.map(Gi),discNumber:r.discNumber,trackNumber:r.trackNumber,isExplicit:r.contentRating?.label===Ln.KS.Explicit,is19PlusOnly:r.contentRating?.label===Ln.KS.NineteenPlus,isPlayable:r.playability.playable,isLocal:!1}),...n}:null;case"LocalTrackResponseWrapper":return"LocalTrack"===e.item.data.__typename?{...(s=e.item.data,{type:ve.p.TRACK,uri:s.uri,name:s.name,album:{type:ve.p.ALBUM,uri:"",name:s.albumName??"",artist:{type:ve.p.ARTIST,uri:"",name:s.artistName??""},images:[]},artists:[{type:ve.p.ARTIST,uri:"",name:s.artistName??""}],duration:{milliseconds:s.localTrackDuration?.totalMilliseconds??0},discNumber:0,trackNumber:0,isPlayable:!1,isExplicit:!1,is19PlusOnly:!1,isLocal:!0}),...n}:null;case"EpisodeResponseWrapper":return"Episode"===e.item.data.__typename?{...(i=e.item.data,{type:ve.p.EPISODE,uri:i.uri,name:i.name,description:i.description??"",duration:{milliseconds:i.episodeDuration.totalMilliseconds},timeLeft:{milliseconds:i.episodeDuration.totalMilliseconds-i.playedState.playPositionMilliseconds},images:i.coverArt?.sources.map(Bi)??[],languages:i.language?[i.language.code]:[],release:{date:i.releaseDate?.isoString,precision:Vi(i.releaseDate?.precision)},show:"Podcast"===i.podcastV2.data.__typename?(a=i.podcastV2.data,{type:ve.p.SHOW,uri:a.uri,name:a.name,publisher:a.publisher?.name??"",images:a.coverArt?.sources.map(Bi)??[],mediaType:Wi(a.mediaType)}):null,podcastSubscription:zi(i.restrictions?.paywallContent??!1,i.playability.reason),isPlayable:i.playability.playable,isExplicit:i.contentRating?.label===Ln.KS.Explicit,is19PlusOnly:i.contentRating?.label===Ln.KS.NineteenPlus}),...n}:null;case"UnknownType":case null:case void 0:return null;default:return(0,fe._)(e.item),null}var i,a,s,r,o}function Yi(e){if("PlaylistItemsPage"!==e.content?.__typename)throw new Error("Error fetching playlist via GraphQL!");return{items:e.content.items?.map(Ki)||[],offset:e.content.pagingInfo.offset,limit:e.content.pagingInfo.limit,totalLength:e.content.totalCount}}function qi(e){if(null===e)return null;const t=e.attributes,n=t["madeFor.name"]??null,i=t["madeFor.username"]??null,a="1"===t["madeFor.displayed"];return null!==i&&a?{type:ve.p.USER,uri:`spotify:user:${encodeURIComponent(i)}`,username:i,displayName:n,images:[]}:null}function Zi(e,t){if("PlaylistItemsPage"!==t.content?.__typename)throw new Error("Error fetching playlist via GraphQL!");const n=t.content.totalCount,i=function(e){if("PlaylistItemsPage"!==e.content?.__typename)throw new Error("Error fetching playlist via GraphQL!");const t={duration:0,count:0},n=e.content.items?.reduce(((e,t)=>{if(null===t||null===t.item)return e;const n=t.item;switch(n.__typename){case"TrackResponseWrapper":"Track"===n.data.__typename&&(e.duration+=n.data.trackDuration.totalMilliseconds,e.count++);break;case"LocalTrackResponseWrapper":"LocalTrack"===n.data.__typename&&(e.duration+=n.data.localTrackDuration?.totalMilliseconds||0,e.count++);break;case"EpisodeResponseWrapper":"Episode"===n.data.__typename&&(e.duration+=n.data.episodeDuration.totalMilliseconds,e.count++);break;case"UnknownType":break;default:(0,fe._)(n)}return e}),t)??t;return{milliseconds:n.count>0?n.duration/n.count*e.content.totalCount:0,isEstimate:n.count"EpisodeResponseWrapper"===e?.item?.__typename))??!1,d=t.content.items?.some((e=>"TrackResponseWrapper"===e?.item?.__typename))??!1,c=r,u=r,m=n>0,p=(g=t.format,h=t.attributes,null===g?null:null===h?{type:g,attributes:{}}:{type:g,attributes:h.reduce(((e,{key:t,value:n})=>(e[t]=n,e)),{})});var g,h;return{isPublished:!1,type:ve.p.PLAYLIST,uri:t.uri,name:t.name,description:t.description??"",totalLength:n,unfilteredTotalLength:n,totalLikes:t.followers,duration:i,images:t.images.items?.at(0)?.sources.map(Bi)??[],owner:s,madeFor:qi(p),isLoaded:a,isOwnedBySelf:r,isCollaborative:o,hasEpisodes:l,hasSpotifyTracks:d,hasSpotifyAudiobooks:null,canAdd:c,canRemove:u,canPlay:m,formatListData:p,canReportAnnotationAbuse:!1,collaborators:null,permissions:null,hasDateAdded:!1}}var Qi=n(7857),Ji=n(64717),$i=n(87074);function Xi(e){e.formatListData?.type?e.hasDateAdded=!$i.C.includes(e.formatListData.type):e.hasDateAdded=!0}const ea=Spicetify.GraphQL.Definitions["addToPlaylist"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"addToPlaylist"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"playlistUri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"newPosition"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PlaylistItemPositionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addItemsToPlaylist"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"playlistUri"},value:{kind:"Variable",name:{kind:"Name",value:"playlistUri"}}},{kind:"ObjectField",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}},{kind:"ObjectField",name:{kind:"Name",value:"newPosition"},value:{kind:"Variable",name:{kind:"Name",value:"newPosition"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ta=Spicetify.GraphQL.Definitions["removeFromPlaylist"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"removeFromPlaylist"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"playlistUri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeItemsFromPlaylist"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"uids"},value:{kind:"Variable",name:{kind:"Name",value:"uids"}}},{kind:"ObjectField",name:{kind:"Name",value:"playlistUri"},value:{kind:"Variable",name:{kind:"Name",value:"playlistUri"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},na=Spicetify.GraphQL.Definitions["moveItemsInPlaylist"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"moveItemsInPlaylist"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"playlistUri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"newPosition"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PlaylistItemPositionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"moveItemsInPlaylist"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"playlistUri"},value:{kind:"Variable",name:{kind:"Name",value:"playlistUri"}}},{kind:"ObjectField",name:{kind:"Name",value:"uids"},value:{kind:"Variable",name:{kind:"Name",value:"uids"}}},{kind:"ObjectField",name:{kind:"Name",value:"newPosition"},value:{kind:"Variable",name:{kind:"Name",value:"newPosition"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]};function ia(e){const{before:t,after:n}=e;if("start"===t)return{moveType:Ln.Le.TopOfPlaylist,fromUid:null};if("end"===n)return{moveType:Ln.Le.BottomOfPlaylist,fromUid:null};if(void 0!==t)return{moveType:Ln.Le.BeforeUid,fromUid:t.uid};if(void 0!==n)return{moveType:Ln.Le.AfterUid,fromUid:n.uid};throw new Error("Couldn't determine position to insert tracks based on input")}var aa=n(1754);class sa{_inFlightCache=new Pe.tL;constructor(e,t,n,i){var a;this._builder=e,this._loader=t,this._transport=n,this._username=i,this._events=(a=this._transport,new Ei(a))}emitUpdate(e){this._events.emit(yi.XL.UPDATE,{uri:e})}getCapabilities(){return{canSort:!1,canFilter:!1,canModifyOffline:!1,canMoveMultipleItems:!1,canFetchAllTracks:!1,canDecorateAddedBy:!0,canToggleCollaborative:!1,canHandlePermissions:!1,hasUidsGeneratedFromIndicies:!1}}async query(e,t){return await this._inFlightCache.create(`${(0,Ot.Y)(e).name}:${JSON.stringify(t)}`,(()=>this._loader(e,t)))}async getPlaylist(e,t={},n={}){const i=await this.query(ji,{uri:e,offset:n.offset??0,limit:n.limit??0});if("Playlist"!==i?.data?.playlistV2?.__typename)throw new Error("Error fetching playlist via GraphQL!");const a=function(e,t){if("Playlist"!==t?.__typename)throw new Error("Error fetching playlist via GraphQL!");return{metadata:Zi(e,t),contents:Yi(t)}}(this._username,i.data.playlistV2);return Xi(a.metadata),a}async getMetadata(e){const t=await this.query(Mi,{uri:e,offset:0,limit:100});if("Playlist"!==t?.data?.playlistV2?.__typename)throw new Error("Error fetching playlist via GraphQL!");const n=Zi(this._username,t.data.playlistV2);return Xi(n),n}async getContents(e,t){const n=await this.query(Ui,{uri:e,offset:t?.offset??0,limit:t?.limit??50});if("Playlist"!==n?.data?.playlistV2?.__typename)throw new Error("Error fetching playlist via GraphQL!");return Yi(n?.data.playlistV2)}getEvents(){return this._events}async add(e,t,n){if(!this._events.emitAddSync(e,t))try{await this._loader(ea,{uris:t,playlistUri:e,newPosition:ia(n)}),this.emitUpdate(e),this._events.emitAddComplete(e,null,t)}catch(n){this._events.emitAddComplete(e,(0,aa.T)(n),t)}}async move(e,t,n){if(!this._events.emitMoveSync(e,t))try{await this._loader(na,{playlistUri:e,uids:t.map((e=>e.uid)),newPosition:ia(n)}),this.emitUpdate(e),this._events.emitMoveComplete(e,null,t)}catch(n){this._events.emitMoveComplete(e,(0,aa.T)(n),t)}}async remove(e,t){if(!this._events.emitRemoveSync(e,t))try{await this._loader(ta,{playlistUri:e,uids:t.map((e=>e.uid))}),this.emitUpdate(e),this._events.emitRemoveComplete(e,null,t)}catch(n){this._events.emitRemoveComplete(e,(0,aa.T)(n),t)}}async uploadImage(e){return(0,Qi.I)(this._builder,e)}async updateDetails(e,t){if(!this._events.emitUpdateSync(e,t))try{await(0,Si.b)(this._builder,e,t),this.emitUpdate(e),this._events.emitUpdateComplete(e,null,t)}catch(n){this._events.emitUpdateComplete(e,(0,aa.T)(n),t)}}async setCollaborativeState(){throw new Error("Setting collaboration state is not possible with the WebAPI.")}async resolvePlaylistFormatURI(e){return(0,Ji.J)(this._builder,e)}async getRecommendedTracks(e,t,n){return await(0,bi.A)(this._builder,e,t,n)}async resync(){}}var ra=n(4716),oa=n(70506),la=n(9637),da=n(52165);function ca(e){const t=(0,c.EC)(e);return t?t.id:""}function ua(e){return new DataView(e.buffer).getUint32(0)}function ma(e){return`${new DataView(e.buffer).getUint32(0)},${(0,da.zv)(e.subarray(4)).padEnd(40,"0")}`}const pa={basePermissionLevel:"UNKNOWN",memberPermissions:{}};class ga{_cache=new Pe.tL;constructor(e){this._builder=e,this._events=new oa.Ti}getCapabilities(){return{}}getEvents(){return this._events}async getMemberPermissions(e){const t=ca(e);return(await this._cache.create(`metadata:${t}`,(()=>this._builder.build().withHost(P.KH).withMethod("GET").withPath(`/playlist/${t}/permission/members`).withEndpointIdentifier("/playlist/{playlistId}/permission/members").withoutMarket().send()))).body||pa}async getPermissionGrant(e,t){return await(0,ra.Re)(this._builder,e,t)}async claimPermissions(e,t){const n={operation:oa.Qd.CLAIM_PERMISSION,uri:e,token:t};this._events.emitOperationSync(n);try{const i=await(0,ra.jw)(this._builder,e,t);return this._events.emitOperationComplete(n),i}catch(e){throw this._events.emitOperationComplete(n,e),e}}async getMembers(e){const{memberPermissions:t,basePermissionLevel:n}=await this.getMemberPermissions(e);return{members:Object.entries(t).map((([e,t])=>({permissionLevel:t.permissionLevel,songsAdded:0,user:(0,la.V)({id:e,uri:e,display_name:e})}))),basePermissionLevel:n}}subscribeToMembers(e,t){return this.getMembers(e).then((e=>{t(null,e)})).catch((e=>{t(e)})),()=>{}}async removeMember(e,t){const n=ca(e),i={operation:oa.Qd.REMOVE_MEMBER,uri:e,username:t};this._events.emitOperationSync(i);try{await this._builder.build().withHost(P.KH).withMethod("DELETE").withPath(`/playlist/${n}/permission/member/user/${encodeURIComponent(t)}`).withEndpointIdentifier("/playlist/{id}/permission/member/user/{username}").withJsonContentType().withoutMarket().send(),this._events.emitOperationComplete(i)}catch(e){throw this._events.emitOperationComplete(i,e),e}}async setMemberPermission(e,t,n){const i=ca(e),a={operation:oa.Qd.SET_MEMBER_PERMISSION,uri:e,permissionLevel:n};this._events.emitOperationSync(a);try{const{memberPermissions:s}=await this.getMemberPermissions(e);await this._builder.build().withHost(P.KH).withMethod("POST").withPath(`/playlist/${i}/permission/member/user/${encodeURIComponent(t)}`).withEndpointIdentifier("/playlist/{id}/permission/member/user/{username}").withJsonContentType().withBody({...s[t],permissionLevel:n}).withoutMarket().send(),this._events.emitOperationComplete(a)}catch(e){throw this._events.emitOperationComplete(a,e),e}}async getBasePermission(e){return await(0,ra.Du)(this._builder,e)}async setBasePermission(e,t){const n=ca(e),i={operation:oa.Qd.SET_BASE_PERMISSION,uri:e,permissionLevel:t};this._events.emitOperationSync(i);try{const a=await(0,ra.Du)(this._builder,e);await this._builder.build().withHost(P.KH).withMethod("POST").withPath(`/playlist/${n}/permission/base`).withEndpointIdentifier("/playlist/{id}/permission/base").withJsonContentType().withBody({...a,permissionLevel:t}).withoutMarket().send(),this._events.emitOperationComplete(i)}catch(e){throw this._events.emitOperationComplete(i,e),e}}}var ha=n(54455),ka=n(15572),va=n(2802),fa=n(29058),ya=n(37184),Sa=n(7187);const ba=new RegExp(String.raw`hm://playlist/v2/user/.+/rootlist`),_a=new RegExp(String.raw`hm://playlist/v2/playlist/.+`);class Na extends ya.w{constructor(e,t){super(),this._transport=e,this._contains=t}subscribeToUpdates(){this._transport.matchMessages(ba,this.onRootlistMessage.bind(this),d.DEALER_PLUGIN_NAME),this._transport.matchMessages(_a,this.onPlaylistMessage.bind(this),d.DEALER_PLUGIN_NAME)}unsubscribeFromUpdates(){this._transport.unmatchMessages(ba,this.onRootlistMessage.bind(this),d.DEALER_PLUGIN_NAME),this._transport.unmatchMessages(_a,this.onPlaylistMessage.bind(this),d.DEALER_PLUGIN_NAME)}async onRootlistMessage(e){const t=e?.payloads?.[0];if(void 0===t)return;const n=Sa.pS.bu.decode((0,da.dN)(t));void 0!==n.parentRevision&&void 0!==n.newRevision&&(this.emitSync(fa.Yt.UPDATE,{revision:n.parentRevision,newRevision:n.newRevision}),this.onContainsItems(this._aggregator.getBatch()))}async onPlaylistMessage(e){const t=e?.payloads?.[0];if(void 0===t)return;(function(e,...t){return void 0!==e.ops?.find((e=>{const n=e.updateListAttributes?.newAttributes;return void 0!==n&&t.some((e=>!1===n.noValue?.includes(e)))}))})(Sa.pS.mn.decode((0,da.dN)(t)),Sa._c.LIST_NAME,Sa._c.LIST_COLLABORATIVE)&&this.emit(fa.Yt.UPDATE,null)}async onContainsItems(e){if(e.size>0){const t=Array.from(e.keys()),n=await this._contains(t);this.emitUpdateItems(t,n)}}}var Ea=n(76076),xa=n(2170);function Ca(e,t){const n=(0,c.EC)(e.uri,{parseUnknown:!0}),i=t.contents?.items?.findIndex((e=>(0,Ea.U4)(n,(0,c.EC)(e.uri,{parseUnknown:!0}))));return i??-1}const wa={revision:new Uint8Array,length:0,attributes:void 0,contents:void 0,diff:void 0,syncResult:void 0,resultingRevisions:[],multipleHeads:!1,upToDate:!1,nonces:[],timestamp:"",ownerUsername:"",abuseReportingEnabled:!1,capabilities:void 0,geoblock:[],changesRequireResync:!1,createdAt:"",appliedLenses:void 0},Ia={type:"folder",uri:"",addedAt:null,name:"",items:[],hash:"",rawItemCount:0};class Ta{_cache=null;_decorationCache=new Pe.Ct(3e5);_fetchContentsPromise=null;_applyChangesPromise=null;constructor(e,t,n,i){this._builder=e,this._username=n,this._isAnonymous=i,this._events=new Na(t,this.contains.bind(this)),this._events.addListener(fa.Yt.UPDATE,(e=>{null!==e.data&&null!==this._cache?this.fetchContents(e.data.newRevision):this._cache=null}))}getCapabilities(){return{canSort:!1,canFilter:!1,canModifyOffline:!1}}getUsername(){if(null===this._username)throw new Error("RootlistAPI is not available for anonymous users!");return this._username}async fetchContents(e=null){if(this._fetchContentsPromise)return await this._fetchContentsPromise;if(this._isAnonymous)return Promise.resolve({data:wa,tree:Ia});const t=this.getUsername();return(null===this._cache||null!==e&&ua(e)>ua(this._cache.data.revision))&&(this._fetchContentsPromise=new Promise(((n,i)=>{(async function(e,t,n=null){const i=await e.build().withHost(P.fe).withMethod("GET").withPath(`/user/${encodeURIComponent(t)}/rootlist`).withEndpointIdentifier("/user/{username}/rootlist").withoutMarket().withQueryParameters({decorate:"revision,length,attributes,timestamp,owner",...null!==n?{revision:ma(n)}:{bustCache:Date.now()}}).send();return Sa.hA.fromJSON(i.body)})(this._builder,t,e).then((e=>{if(function(e){return void 0!==e.revision}(e)){const i=new ka.cm(t).build(e);n({data:e,tree:i})}else i(new Error("Response is missing revision!"))})).catch(i)})).finally((()=>{this._fetchContentsPromise=null})),this._cache=await this._fetchContentsPromise),this._cache}async applyChanges(e){if(null!==this._applyChangesPromise)throw new Error("Refusing to apply multiple deltas at the same time!");return this._applyChangesPromise=async function(e,t,n){const i=await e.build().withMethod("POST").withHost(P.fe).withPath(`/user/${encodeURIComponent(t)}/rootlist/changes`).withEndpointIdentifier("/user/{username}/rootlist/changes").withoutMarket().withJsonContentType().withBody(Sa.ow.toJSON(n)).send();return Sa.hA.fromJSON(i.body).revision??null}(this._builder,this.getUsername(),e).then((async e=>{await this.fetchContents(e)})).finally((()=>{this._applyChangesPromise=null})),this._applyChangesPromise}async waitForPendingChanges(){this._applyChangesPromise&&await this._applyChangesPromise}async getRootNode(){const{tree:e}=await this.fetchContents();return e}async getFolderNode(e){if(!e.folderUri)throw new Error("Folder URI not provided!");const t=await this.getRootNode(),n=(0,ka.r_)(t,e.folderUri);if(null===n)throw new Error("Folder not found!");return n}emitUpdate(){this._events.emit(fa.Yt.UPDATE,null)}getEvents(){return this._events}async getMetadata(){await this.waitForPendingChanges();const e=[...(await this.getRootNode()).items];let t=0,n=0;for(;e.length>0;){const i=e[0];(0,ha.lU)(i)?e.push(...i.items):((0,ha.no)(i)&&i.isOwnedBySelf&&t++,n++),e.shift()}return{ownedPlaylistCount:t,playlistCount:n}}async getContents(e){await this.waitForPendingChanges();const t=await(e?.folderUri?this.getFolderNode(e):this.getRootNode());let n;if(e?.flatten){const e=(0,ka.fK)(t);n={...e,totalItemCount:e.items.length}}else n={...t,totalItemCount:t.items.length};const i=e?.offset??0,a=e?.limit?i+e.limit:void 0;return n.items=n.items.slice(i,a),e?.decorateImagesAndOwner&&await(0,xa.H)(this._builder,this._decorationCache,(0,ka.qr)(n)),n}async renameFolder(e,t){const[n]=(0,Ea.HS)({folderUri:e.uri,name:t}),[i]=(0,Ea.HS)({name:t}),[a]=(0,Ea.HS)({folderUri:e.uri}),s=(new va.D).add([i],{before:{uri:a}}).remove([{uri:a}]).add([n],{before:{uri:i}}).remove([{uri:i}]).buildListChanges();await this.applyChanges(s),this.emitUpdate()}async createFolder(e,t){if(!this._username)throw new Error("Cannot create a folder if not logged in");const n=(0,Ea.qd)(8),i=(0,Ea.on)(this._username,n,e),a=(new va.D).add((0,Ea.HS)({name:e,hash:n}),t).buildListChanges();return await this.applyChanges(a),this.emitUpdate(),{uri:i}}async moveFolder(e,t){const{data:n}=await this.fetchContents(),i=await this.getFolderNode({folderUri:e.uri}),a=Ca(e,n),s=function(e,t){const{before:n,after:i}=e,{length:a}=t;return void 0===n==(void 0===i)?-1:"start"===n?0:"end"===i?void 0===a?Number.NaN:a:n?Ca(n,t):i?Ca(i,t)+1:-1}(t,n),r=i.rawItemCount;if(s>=a&&se.uri)));return e.map((e=>i.has(e)))}containsSync(e){const t=this._cache?.data.contents?.items;return t?void 0!==t.find((t=>t.uri===e)):void 0}async getPublishedState(e){await this.waitForPendingChanges();const t=await this.getRootNode(),n=(0,ka.ub)(t,e);return!(!n||!(0,ha.no)(n))&&n.isPublished}async setPublishedState(e,t){const n=(new va.D).updateItemAttributes({newAttributes:{values:{public:t}},item:{uri:e}}).buildListChanges();await this.applyChanges(n),this.emitUpdate()}}var Aa=n(72971),Pa=n(28418);const Oa=Spicetify.GraphQL.Definitions["fetchEntitiesForRecentlyPlayed"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchEntitiesForRecentlyPlayed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"lookup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedAlbum"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedArtist"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedTrack"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeOrChapterResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedEpisode"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedChapter"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastOrAudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedPodcast"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedAudiobook"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedPlaylist"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedUser"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConcertResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"GenreResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MerchResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UnknownTypeWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedUser"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RecentlyPlayedAlbum"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RecentlyPlayedArtist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RecentlyPlayedTrack"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RecentlyPlayedEpisode"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedPodcast"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RecentlyPlayedPodcast"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RecentlyPlayedChapter"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"audiobookV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedAudiobook"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RecentlyPlayedAudiobook"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"authors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RecentlyPlayedPlaylist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"images"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"RecentlyPlayedUser"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"RecentlyPlayedUser"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"name"}}]}}]};function Da(e,t){const n=e.map((e=>{if("UnknownTypeWrapper"===e.__typename)return null;if("PreReleaseResponseWrapper"===e.__typename)return null;const n=e.data;switch(n.__typename){case"Album":return{_uri:e._uri,type:t||Aa.hn.ALBUM,uri:n.uri,name:n.name,images:n.coverArt?.sources??[],artists:n.artists.items.map((e=>({uri:e.uri,name:e.profile.name})))};case"Track":return{_uri:e._uri,type:Aa.hn.TRACK,uri:n.uri,name:n.name,images:n.albumOfTrack?.coverArt?.sources??[],artists:n.artists.items.map((e=>({uri:e.uri,name:e.profile.name}))),isExplicit:n.contentRating?.label===Ln.KS.Explicit,isMOGEFRestricted:n.contentRating?.label===Ln.KS.NineteenPlus};case"Playlist":if("User"!==n.ownerV2.data.__typename)throw new Error(`Error fetching playlist owner for URI ${n.uri}`);return{_uri:e._uri,type:t||Aa.hn.PLAYLIST,uri:n.uri,name:n.name,images:n.images.items.at(0)?.sources??[],description:n.description??"",owner:{uri:n.ownerV2.data.uri,displayName:n.ownerV2.data.name??n.ownerV2.data.username??""}};case"Podcast":return{_uri:e._uri,type:Aa.hn.SHOW,uri:n.uri,name:n.name,images:n.coverArt?.sources??[],publisher:n.publisher?.name??""};case"Audiobook":return{_uri:e._uri,type:Aa.hn.AUDIOBOOK,uri:n.uri,name:n.name,images:n.coverArt?.sources??[],authors:n.authors?.map((e=>e?.name??""))??[]};case"Artist":return{_uri:e._uri,type:t||Aa.hn.ARTIST,uri:n.uri,name:n.profile.name,images:n.visuals.avatarImage?.sources??[]};case"Episode":if("Podcast"!==n.podcastV2.data.__typename)throw new Error(`Error fetching show entity for URI ${e._uri}`);return{_uri:e._uri,type:Aa.hn.SHOW,uri:n.podcastV2.data.uri,name:n.podcastV2.data.name,images:n.podcastV2.data.coverArt?.sources??[],publisher:n.podcastV2.data.publisher?.name??""};case"Chapter":if("Audiobook"!==n.audiobookV2.data.__typename)throw new Error(`Error fetching show entity for URI ${e._uri}`);return{_uri:e._uri,type:Aa.hn.AUDIOBOOK,uri:n.audiobookV2.data.uri,name:n.audiobookV2.data.name,images:n.audiobookV2.data.coverArt?.sources??[],authors:n.audiobookV2.data.authors?.map((e=>e?.name??""))??[]};default:return null}})).filter(Pa.K);return n}function Ra(e){const t=(0,c.EC)(e);if(null===t||t.type!==c.JM.STATION||2!==t.args?.length)throw new Error(`Invalid station URI ${e}`);const[n,i]=t.args;switch(n){case c.JM.ARTIST:return(0,c.WN)(i).toURI();case c.JM.ALBUM:return(0,c.jy)(i).toURI();case c.JM.PLAYLIST:return(0,c.FW)(i).toURI();default:throw new Error(`Unsupported station type ${n}`)}}async function La(e,t){const n=[],i=[],a=[];t.forEach((e=>{switch(!0){case(0,c.zO)(e):n.push(e);break;case(0,c.ie)(function(e){return(0,c.oi)(e)?(0,c.AB)(["playlist",(0,c.EC)(e)?.args]).toURI():e}(e)):i.push(e);break;default:a.push(e)}}));const s=function(e){return e.map((e=>({type:e.endsWith("your-episodes")?Aa.hn.YOUR_EPISODES:Aa.hn.LIKED_SONGS,uri:e,_uri:e})))}(n),r=await async function(e,t){const n=t.map(Ra);if(0===n.length)return[];const i=(await e(Oa,{uris:n}))?.data?.lookup;if(!(0,Pa.K)(i)||void 0===i)throw new Error(`Error fetching entities for URIs ${n}`);return Da(i,Aa.hn.RADIO)}(e,i),o=await async function(e,t){if(0===t.length)return[];const n=(await e(Oa,{uris:t}))?.data?.lookup;if(!(0,Pa.K)(n)||void 0===n)throw new Error(`Error fetching entities for URIs [${t}]`);if(1===n.length&&"PlaylistResponseWrapper"===n[0].__typename&&"NotFound"===n[0].data.__typename)throw new Error(`Error fetching entities for URIs [${t}]`);return Da(n)}(e,a);return[...o,...s,...r]}async function Fa(e,t){const n=t.map((e=>e.uri)),i=(await La(e,n))?.map((e=>{const n={...e,timestampMs:t.find((t=>t.uri===e._uri))?.lastPlayedTime};return delete n._uri,n})).filter(Pa.K);return i}async function ja(e,t){return(await e.build().withMethod("GET").withHost(P.No).withPath(`/user/${encodeURIComponent(t)}/recently-played`).withQueryParameters({format:"json",offset:0,limit:50,filter:"default,collection-new-episodes"}).withEndpointIdentifier("/user/{userId}/recently-played").send()).body}function Ma(e,t){return Array.from(e.concat(t??[]).reduce(((e,t)=>{let n=t.uri;(0,c.WP)(n)&&(n=(0,c.FW)((0,c.EC)(n).id).toURI());const i=e.get(n);return(void 0===i||i.timestampMst.timestampMs-e.timestampMs))}class Ua extends Aa.sw{_localContexts=[];_remoteContexts=null;_inFlightCache=new Pe.tL;_listeners=0;_shouldRefresh=!1;_lastContextURI=null;static REMOTE_CONTEXTS_CACHE_KEY="remote-contexts";constructor(e,t,n,i){super(),this._request=t,this._builder=n,this._username=i,this.onAddListener(Aa.$f.UPDATE,(()=>{this._listeners++})),this.onRemoveListener(Aa.$f.UPDATE,(()=>{this._listeners--})),window.addEventListener("visibilitychange",(()=>{document.hidden||(0!==this._listeners?this.refresh():this._shouldRefresh=!0)})),window.addEventListener("online",(()=>{navigator.onLine&&(0!==this._listeners?this.refresh():this._shouldRefresh=!0)})),e.getEvents().addListener(ke.rg.UPDATE,(({data:e})=>{this.onPlayerStateUpdate(e)}))}async onPlayerStateUpdate(e){const t=e?.context.uri??null;if(null===t||t===this._lastContextURI)return;this._lastContextURI=t;const n=this._localContexts.findIndex((e=>e.uri===t));if(-1!==n){const[e]=this._localContexts.splice(n,1);this._localContexts.unshift({...e,timestampMs:Date.now()})}else{const[e]=await this._inFlightCache.create(t,(()=>Fa(this._request,[{uri:t,lastPlayedTime:Date.now()}])));e&&this._localContexts.unshift(e)}const i=Ma(this._localContexts,this._remoteContexts??[]);this.emit(Aa.$f.UPDATE,i)}async refresh(){if(null===this._username)return;const e=this._username,t=await this._inFlightCache.create(Ua.REMOTE_CONTEXTS_CACHE_KEY,(()=>async function(e,t,n){const[i]=[await ja(e,n)];return await Fa(t,i.playContexts)}(this._builder,this._request,e)));this._remoteContexts=t.filter(Pa.K);const n=Ma(this._localContexts,this._remoteContexts);this.emit(Aa.$f.UPDATE,n)}getContexts(){return(null===this._remoteContexts||this._shouldRefresh)&&(this._shouldRefresh=!1,this.refresh()),0===this._localContexts.length&&null===this._remoteContexts?null:Ma(this._localContexts,this._remoteContexts??[])}}var Ba=n(44058),Va=n(70065),Ha=n(74730),Ga=n(52408),Wa=n(86271),za=n(61208);const Ka=(0,Ha.hh)(Ga.H).addMiddleware(Ba.a).addMiddleware(Va.d).addMiddleware(Wa.Q).addMiddleware(za.Y);var Ya=n(6555);const qa=Spicetify.GraphQL.Definitions["queryShowAccessInfo"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryShowAccessInfo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"podcastUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accessInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accessExplanation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpsellAccessExplanation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"actionText"}},{kind:"Field",name:{kind:"Name",value:"body"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasicAccessExplanation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"actionText"}},{kind:"Field",name:{kind:"Name",value:"body"}},{kind:"Field",name:{kind:"Name",value:"title"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MultiPassAccessExplanation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"body"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"soaPartners"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"soaPartners"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConsumptionCappedAccessExplanation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"actionText"}},{kind:"Field",name:{kind:"Name",value:"body"}},{kind:"Field",name:{kind:"Name",value:"title"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accessInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accessExplanation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpsellAccessExplanation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"actionText"}},{kind:"Field",name:{kind:"Name",value:"body"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BasicAccessExplanation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"actionText"}},{kind:"Field",name:{kind:"Name",value:"body"}},{kind:"Field",name:{kind:"Name",value:"title"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MultiPassAccessExplanation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"body"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"soaPartners"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"soaPartners"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConsumptionCappedAccessExplanation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"actionText"}},{kind:"Field",name:{kind:"Name",value:"body"}},{kind:"Field",name:{kind:"Name",value:"title"}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"soaPartners"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SOAPartner"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"displayName"}},{kind:"Field",name:{kind:"Name",value:"linkUrl"}},{kind:"Field",name:{kind:"Name",value:"logoUrl"}}]}}]};var Za=n(24377);const Qa=Spicetify.GraphQL.Definitions["queryShowMetadataV2"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryShowMetadataV2"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"podcastUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"podcastMetadataV2"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"audiobookMetadataV2"}}]}}]}}]}},...Za.Rr.definitions,...xi.rD.definitions,...xi.rA.definitions,...Za.n0.definitions,...xi.Zl.definitions,...xi.TS.definitions,...Za.Sz.definitions,...Za.Kg.definitions,...Za.Vn.definitions,...Za.NF.definitions]};var Ja=n(26406);const $a=Spicetify.GraphQL.Definitions["queryBookChapters"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryBookChapters"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"podcastUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"chaptersV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContextChapterPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"chapterPage"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"chapterPage"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContextChapterPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nextOffset"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contextChapter"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"contextChapter"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContextChapterV2"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"uid"}},{kind:"Field",name:{kind:"Name",value:"entity"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"audiobookChapter"}}]}}]}}]}}]}},...Za.Vn.definitions,...xi.rD.definitions,...xi.rA.definitions,...xi.TS.definitions,...Za.NF.definitions]},Xa=Spicetify.GraphQL.Definitions["getEpisodeOrChapter"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getEpisodeOrChapter"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"episodeUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"podcastEpisode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"audiobookChapter"}}]}}]}}]}},...Za.n0.definitions,...xi.rD.definitions,...xi.rA.definitions,...xi.Zl.definitions,...xi.TS.definitions,...Za.Sz.definitions,...Za.Vn.definitions,...Za.NF.definitions]},es=Spicetify.GraphQL.Definitions["queryPodcastEpisodes"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryPodcastEpisodes"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"podcastUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"episodesV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContextEpisodePage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"podcastEpisodePage"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"podcastEpisodePage"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContextEpisodePage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nextOffset"}}]}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contextPodcastEpisode"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"contextPodcastEpisode"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContextEpisodeV2"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uid"}},{kind:"Field",name:{kind:"Name",value:"entity"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"podcastEpisode"}}]}}]}}]}}]}},...Za.n0.definitions,...xi.rD.definitions,...xi.rA.definitions,...xi.Zl.definitions,...xi.TS.definitions,...Za.Sz.definitions]};var ts=n(23062),ns=n(15176);class is{capabilities={canSort:!1,canFilter:!1,canGetDefaultSort:!1};constructor(e,t){this._request=e,this._isAnonymous=t,this._events=new ns.T}async getMetadata(e){const t=await(async(e,t)=>{const n=await e(Qa,{uri:t});if("RestrictedContent"===n?.data?.podcastUnionV2.__typename)throw new Error(Ja.xr.RestrictedContent);if("Podcast"===n?.data?.podcastUnionV2?.__typename||"Audiobook"===n?.data?.podcastUnionV2?.__typename)return n.data.podcastUnionV2;throw new Error(Ja.xr.Generic)})(this._request,e);return(0,Ya.rB)(t,this._isAnonymous)}async getBookContents(e,t){const n=await(async(e,t,n,i)=>{const a=await e($a,{uri:t,offset:n,limit:i});if("Audiobook"===a?.data?.podcastUnionV2?.__typename&&"ContextChapterPage"===a?.data.podcastUnionV2.chaptersV2?.__typename)return a.data.podcastUnionV2.chaptersV2;throw new Error("Error while requesting the chapters")})(this._request,e,t.offset,t.limit);return(0,Ya.ld)(n,this._isAnonymous)}async getContents(e,t){const n=await(async(e,t,n,i)=>{const a=await e(es,{uri:t,offset:n,limit:i});if("Podcast"===a?.data?.podcastUnionV2?.__typename&&"ContextEpisodePage"===a?.data?.podcastUnionV2.episodesV2?.__typename)return a.data.podcastUnionV2.episodesV2;throw new Error("Error while requesting the show episodes")})(this._request,e,t.offset,t.limit);return(0,Ya.om)(n)}async getEpisodeOrChapter(e){const t=await(async(e,t)=>{const n=await e(Xa,{uri:t});if("Episode"===n?.data?.episodeUnionV2?.__typename||"Chapter"===n?.data?.episodeUnionV2?.__typename)return n.data.episodeUnionV2;throw new Error("Error while requesting the episode or chapter")})(this._request,e);return(0,Ya.sV)(t,this._isAnonymous)}getPlayerSort(){return""}getPlayerFilter(){return""}async getAccessInfo(e){return await(async(e,t)=>{const n=await e(qa,{uri:t});if("Audiobook"!==n?.data?.podcastUnionV2.__typename&&"Podcast"!==n?.data?.podcastUnionV2.__typename)return{};const i=n?.data?.podcastUnionV2.accessInfo?.accessExplanation;switch(i?.__typename){case"UpsellAccessExplanation":return{upsellLink:{title:i?.title||"",body:i?.body||"",cta:i?.actionText||"",url:i?.url||""}};case"BasicAccessExplanation":return{basic:{title:i?.title||"",body:i?.body||"",cta:i?.actionText||""}};case"MultiPassAccessExplanation":{const e=[];return i?.soaPartners?.forEach((t=>{t&&e.push({displayName:t.displayName||"",linkUrl:t.linkUrl||"",logoUrl:t.logoUrl||""})})),{multiPass:{title:i?.title||"",body:i?.body||"",soaPartners:e}}}default:return{}}})(this._request,e)}async checkoutBook(e){return await(0,ts.Q)(e)}getEvents(){return this._events}}var as=n(75702);class ss{getCapabilities(){return{isSupported:!1}}async setVocalVolume(){}async setStatus(){}async getStatus(){return as.q.DISABLED}}var rs=n(30500),os=n(67349),ls=n(32859),ds=n(15440),cs=n(76089);class us{name="allow-offline-requests";constructor(){this.onBeforeProcessRequest=this.onBeforeProcessRequest.bind(this)}onBeforeProcessRequest(e){const{data:t}=e;t.options?.metadata?.noRequestTransform||navigator.onLine||(t.options=(0,cs.F)(t.options,{allowOffline:!0,authorize:!1}))}attach(e,t){t.on(d.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest)}detach(e,t){t.removeListener(d.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest)}}function ms(){return new us}function ps(e,t){const n=(0,ds.f)(d.createBaseTransport,(0,ls.w)(),e,t.transportOptions);return t.useDealer&&n.addPlugin(rs.dv,{WebSocket}),n.addPlugin(ms),n.addPlugin(os.Mb,function(e){const t=Z().getParser(window.navigator.userAgent),n=t.getPlatform();let i;switch(n.type){case Z().PLATFORMS_MAP.mobile:i="smartphone";break;case Z().PLATFORMS_MAP.tablet:i="tablet";break;case Z().PLATFORMS_MAP.desktop:i="computer";break;case Z().PLATFORMS_MAP.tv:i="tv";break;default:i=void 0}return{clientInfo:{clientID:"65b708073fc0480ea92a077233ca87bd",clientVersion:"1.2.11.916.geb595a67",os:t.getOSName(!0)??"unknown",osVersion:t.getOSVersion()??"unknown",deviceBrand:n.vendor??"unknown",deviceModel:n.model??"unknown",containerVersion:void 0,deviceID:e.deviceId,deviceType:i,platformIdentifier:void 0}}}(t.clientInfoOptions)),n.on(d.TransportEvent.CONNECTED,(()=>{n.isAuthenticated()||n.authenticate()})),n.on(d.TransportEvent.DISCONNECTED,(()=>{n.connect()})),n.connect(),n}var gs=n(78379),hs=n(85270);class ks{_inFlightCache=new Pe.tL;constructor(e,t){this._builder=e,this._isAnonymous=t}async getUser(){return this._isAnonymous?null:async function(e){const{body:t}=await hs.n5.getMe(e);return{type:ve.p.USER,uri:t.uri,username:t.id,displayName:t.display_name||null,images:t.images.map((({url:e,width:t,height:n})=>({url:e,width:t||void 0,height:n||void 0}))),optInTrialPremiumOnlyMarket:Boolean(t.policies?.opt_in_trial_premium_only_market)}}(this._builder)}async getProductState(){if(this._isAnonymous)return null;const{body:e}=await this._inFlightCache.create("getProductState",(()=>hs.n5.getProductState(this._builder)));return e}}var vs=n(7072);let fs=function(e){return e.ALWAYS="always",e.OVERLAY="overlay",e}({});function ys(){switch((0,Y.L)()){case g.U.Windows:return"windows";case g.U.macOS:return"osx";case g.U.Linux:return"linux";case g.U.ChromeOS:return"chromeos";case g.U.Other:default:return"other"}}const Ss=()=>({os_name:ys(),os_settings:{scroller_style:fs.ALWAYS,double_click_interval_ms:1/0},app_platform:"WebPlayer",client_name:"web-player",client_version_triple:"0.0.0",client_version_quadruple:"0.0.0.0",client_version_quintuple:"0.0.0.0-unknown",client_capabilities:{can_autostart:!1,can_restart:!1,can_show_track_notifications:!1,can_show_system_media_controls:!1,can_minimize_or_exit_on_close:!1},event_sender_installation_id_hex:"",is_developer_mode:!1});class bs{getCapabilities(){return{isSupported:!1}}connectToFacebook(){throw new Error("Method not implemented.")}subscribeToFacebookConnectionState(e){throw new Error("Method not implemented.")}subscribeToBuddyActivity(){return{cancel:()=>{}}}fetchFacebookFriends(){throw new Error("Method not implemented.")}fetchFriendActivity(){throw new Error("Method not implemented.")}}var _s=n(27652),Ns=n(41836),Es=n(69634),xs=n(37135);async function Cs(e){const t="65b708073fc0480ea92a077233ca87bd",n="1.2.11.916.geb595a67",i=Ss(),{translations:a,locale:s}=await async function(){const e=document.head.querySelector(`link[${$e}]`),t=e.getAttribute("href"),n=e.getAttribute($e),i=new AbortController,a=setTimeout((()=>i.abort()),Je),s=await fetch(t,{signal:i.signal}).then((e=>e.json())).catch((()=>({})));return clearTimeout(a),{translations:s,translationsUrl:t,locale:n}}(),r=(0,vs.nT)(s);(0,xs.u)(a,s,r);const o=(0,te.Z)("session"),l=(0,te.Z)("config"),d=new St(gt,(()=>(0,te.Z)("session"))),u=ps(d.getTokenProvider(),{useDealer:!o.isAnonymous,clientInfoOptions:{deviceId:l.correlationId}}),{correlationId:m}=l,p=(0,te.Z)("features"),h=(0,te.Z)("seo"),k=(0,f.lX)(),v=new fi(pt.b.getInstance()),_=function(){const e=(0,Xe.vQ)("client-web_remote-config-overrides")||"";try{return y.VK.fromJSON(JSON.parse(e)["web-player"]||{})}catch(e){return y.VK.builder().build()}}(),N=y.VK.fromJSON((0,te.K)("remote-configuration")),E={accessToken:o.accessToken,accessTokenExpirationTimestampMs:o.accessTokenExpirationTimestampMs,isAnonymous:o.isAnonymous,market:o.isAnonymous?l.market:"from_token",locale:s,valid:!0};(0,K.d)(u,E,n,i.app_platform);const x=new ks(pt.b.getInstance(),o.isAnonymous),w=await x.getUser(),T=w?.username||null,P=new Ka({timeout:1e4,clientId:"web-player",transport:u,eventSender:ee(u,t,m,(()=>T),!1),initialConfiguration:N}),O=y.VK.merge(await P.resolve({username:T}),_),D=new li.K(T??"anonymous"),L=(0,Pt.PQ)(pt.b.getInstance()),j=(0,Pt.QM)(L),M=new B(D),U=Qe(u,{isAnonymous:o.isAnonymous,type:e===g.W.PWA?"desktopInstall":"desktop",createPlayer:e=>{const t=document.createElement(e);return M.isSupported()&&O.getValue(ut.Ro)&&M.connectAudioProcessor(t),t}}),V=function({harmony:e,overture:t},n,{clientId:i}){if(null!==e)return new Re(e,n,"xpui_2023-05-11_1683815926051_eb595a6");if(null!==t){const{correlationId:e}=(0,te.Z)("config");return Ze(t,{clientId:i,correlationId:e})}throw new Error("Unable to create PlayerAPI without a Harmony or Overture instance!")}(U,j,{clientId:t}),H=function({harmony:e,overture:t}){if(null!==e)return new oe(e);if(null!==t)return new ce(t);throw new Error("Unable to create PlaybackAPI without a Harmony or Overture instance!")}(U),G=new Q,q=O.getValue(ut.Uk)?new si(L,u,o.isAnonymous,T,new Set([_s.rv])):new Bn(L,u,o.isAnonymous,T,new Set([_s.rv])),Z=new F,J=new oi,$=new et,X=new Ta(pt.b.getInstance(),u,T,o.isAnonymous),ne=new sa(pt.b.getInstance(),L,u,T),ie=new ga(pt.b.getInstance()),ae=new nt.l(pt.b.getInstance(),L,V,o.isAnonymous),se=new is(L,o.isAnonymous),re=new ot(ne,se),le=new A,de=new W,ue=new z.$(pt.b.getInstance()),pe=new tt,ge=new lt,he=new Ua(V,L,pt.b.getInstance(),T),ve=O.getValue(ut.WS),fe=function(e){return null===e?new At:new It(e)}(U.harmony),ye=ee(u,t,m,(()=>T),O.getValue(Ns.FC)),Se=new I(sessionStorage,"ACTION_STORE_KEY",V,q),be=new mt(U.harmony,O),_e=new b.t(pt.b.getInstance(),j,V),Ne=new ss,Ee=new gs.z(S.R.getUBILogger({eventSender:ye,disableAutoBackgroundMonitoring:!0,playContextUriProvider:{getPlayContextUri:()=>V.getState()?.context.uri??null},playbackIdProvider:{getPlaybackId:()=>V.getState()?.playbackId??null}}),null!==w),xe=new R(pt.b.getInstance(),u,T),{recaptchaWebPlayerFraudSiteKey:Ce}=(0,te.Z)("config",{recaptchaWebPlayerFraudSiteKey:null,optimizeId:null,gtmId:null,locale:"en"}),we=Ce?new st(Ce):new it.U,Ie=(0,Es.R)({container:e,history:k,eventSender:ye,playerAPI:V,appStartupId:""}),Te=new bs,Ae=new C(D);return function(e,t){const n=e.getEvents(),i=t.getEvents();let a=null;const s=t=>{t.data.uri===a&&e.refreshCurrentContext()};n.addListener(ke.rg.UPDATE,(({data:e})=>{const t=e?.context.uri??null;null!==a&&null!==t&&a!==t&&(i.removeListener(yi.XL.UPDATE,s,{uri:a}),a=null),null===a&&null!==t&&(0,c.nK)(t)&&(a=t,i.addListener(yi.XL.UPDATE,s,{uri:a}))}))}(V,ne),{version:n,container:e,operatingSystem:(0,Y.L)(),isDeveloperMode:!1,isVideoSupported:me(),enableCastConnect:ve,getServiceWorkerMessenger:dt,getSession:()=>E,getTransport:()=>u,getEventSender:()=>ye,getTranslations:()=>a,getFeatureFlags:()=>p,getSEOExperiments:()=>h,getHistory:()=>k,getAdManagers:()=>Ie,getRemoteConfiguration:()=>O,getActionStoreAPI:()=>Se,getAuthorizationAPI:()=>d,getClipboardAPI:()=>le,getConnectAPI:()=>fe,getControlMessageAPI:()=>Z,getFacebookAPI:()=>de,getFollowAPI:()=>ue,getGraphQLLoader:()=>L,getLibraryAPI:()=>q,getLocalFilesAPI:()=>J,getOfflineAPI:()=>v,getPlatformData:()=>i,getPlayerAPI:()=>V,getPlaybackAPI:()=>H,getPlayHistoryAPI:()=>$,getPlaylistAPI:()=>ne,getPlaylistPermissionsAPI:()=>ie,getPrivateSessionAPI:()=>pe,getRadioStationAPI:()=>ae,getRecaptchaLoggerAPI:()=>we,getRecentlyPlayedAPI:()=>he,getReportAPI:()=>re,getRootlistAPI:()=>X,getSegmentsAPI:()=>ge,getShowAPI:()=>se,getUpdateAPI:()=>G,getUserAPI:()=>x,getVideoAPI:()=>be,getEnhanceAPI:()=>_e,getSingAlongAPI:()=>Ne,getUBILogger:()=>Ee,getCollectionPlatformAPI:()=>xe,getLocalStorageAPI:()=>D,getEqualizerAPI:()=>M,getBuddyFeedAPI:()=>Te,getPanelAPI:()=>Ae}}const ws=432;const Is=()=>"1"===((0,Xe.vQ)("client-web_one-trust")??"1");function Ts(e){return e.container===g.W.Desktop}var As=n(39669),Ps=n(35344);class Os{constructor(e){this.spotifyTransport=e}async getDialog(e){const t=await Ps.Y(this.spotifyTransport,e),{r:n,g:i,b:a}=this.getColorRGB(t.body.color);return{backgroundColor:`rgb(${n}, ${i}, ${a})`,providerUrl:t.body.provider_url}}getColorRGB(e){return{r:e>>>16&255,g:e>>>8&255,b:e>>>0&255}}}const Ds=(e,t)=>{let n=[];return{storeAction:i=>{n=i(n),e.setItem(t,JSON.stringify(n))},pullAction:()=>{const i=e.getItem(t);if(e.removeItem(t),n=[],i)try{return JSON.parse(i)}catch(e){return null}return null}}};var Rs=n(51761),Ls=n(23329),Fs=n(35526),js=n(58116);const Ms={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)}};var Us=n(69494),Bs=n(48821);const Vs=[{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:/^\/blend\/party/,pageIdentifier:"/blend/party"}],Hs=(e="")=>{const t=Vs.find((({regExp:t})=>t.test(e)));return t?.pageIdentifier??"unknown"};var Gs=n(43499),Ws=n(19154);let zs=function(e){return e.RTL="rtl",e.LTR="ltr",e}({});const Ks=e=>{document.documentElement.setAttribute("dir",e)};let Ys=function(e){return e.SET_RTL_MODE="SET_RTL_MODE",e}({});const qs=e=>{e===zs.RTL?Ks(zs.RTL):Ks(zs.LTR)},Zs=e=>{const t=(e=>Ws.k1[e]?.isRTL?zs.RTL:zs.LTR)(e);return qs(t),n=t===zs.RTL,{type:Ys.SET_RTL_MODE,isRTL:n};var n};var Qs=n(85483),Js=n(9102),$s=n(61740),Xs=n(40576),er=n(58527),tr=n(40660),nr=n(78777),ir=n(70804),ar=n(80784),sr=n(59496),rr=n(50983),or=n(59102),lr=n(4637);const dr=e=>({type:"INIT_PICTURE_IN_PICTURE",isReady:e}),cr=()=>({type:"OPEN_PICTURE_IN_PICTURE"}),ur=()=>({type:"CLOSE_PICTURE_IN_PICTURE"});function mr(e,t){if("INIT_PICTURE_IN_PICTURE"===t.type)return e.isReady===t.isReady&&(0,or.yN)("Try to mount / unmount multiple `PictureInPictureUpdater` components!"),{...e,isReady:t.isReady};switch(e.isReady||(0,or.yN)("Trying to dispatch PiP action without a `PictureInPictureUpdater` being mounted!"),t.type){case"OPEN_PICTURE_IN_PICTURE":return{...e,isVisible:!0};case"CLOSE_PICTURE_IN_PICTURE":return{...e,isVisible:!1}}return e}const pr=(0,sr.createContext)(null),gr=({children:e})=>{const t={isEnabled:!!document.pictureInPictureEnabled&&!navigator.webdriver&&(0,p.ZO)()!==g.W.Desktop&&!(0,rr.G)(),isReady:!1,isVisible:!1},[n,i]=(0,sr.useReducer)(mr,t);return(0,lr.jsx)(pr.Provider,{value:[n,i],children:e})};function hr(){const e=(0,sr.useContext)(pr);if(null===e)throw new Error("Trying to use 'PictureInPictureContext' without 'PictureInPictureStore'!");return e}var kr=n(83682),vr=n(99948),fr=n(27509);const yr=640;const Sr=()=>{const[e,t]=hr(),{isVisible:n}=e,i=(0,vr.Y)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.isPaused===t?.isPaused&&e?.item?.uri===t?.item?.uri)),a=(0,kr.O)(),s=(0,sr.useRef)(i),r=(0,sr.useRef)(null),o=(0,sr.useRef)(!1);s.current=i;const l=()=>(r.current=r.current??function(){const e=document.createElement("canvas");e.width=yr,e.height=yr;const t=e.getContext("2d"),n=document.createElement("video");return n.srcObject=e.captureStream(),n.muted=!0,{context:t,video:n}}(),r.current);return(0,sr.useEffect)((()=>(t(dr(!0)),()=>{t(dr(!1))})),[t]),(0,sr.useEffect)((()=>{const e=()=>{},s=async()=>{const n=l(),a=document.pictureInPictureElement===n.video,s=function(e){const t=e?.item?.images??[];return(0,fr.o)(t,{desiredSize:yr})??null}(i);null!==s?(await async function({context:e,video:t},n){const i=new Image;i.crossOrigin="anonymous",i.src=n,await i.decode(),e.drawImage(i,0,0,yr,yr),await t.play()}(n,s),a||await async function({video:e},t){try{await e.requestPictureInPicture(),e.addEventListener("leavepictureinpicture",t,{once:!0})}catch(e){(0,or.H)(e)}}(n,(()=>{o.current||t(ur()),o.current=!1})),(e=>{const t=e?.hasContext??!1,n=e?.isPaused??!1;document.pictureInPictureElement&&(!t||n?document.pictureInPictureElement.pause():document.pictureInPictureElement.play())})(i)):e()},d=((e,t)=>{const n=e?.hasContext??!1,i=e?.item?.type===ve.p.EPISODE&&"audio"!==e?.item.mediaType,a=t.activeDevice?.isLocal??!0;return!!n&&!!a&&!i})(i,a);d&&n?s():e()}),[n,i,a,t]),null};var br=n(96848),_r=n(95019);const Nr=({children:e,queryClient:t})=>(0,lr.jsx)(Js.QueryClientProvider,{client:t,children:e});var Er=n(62551),xr=n(45862);const Cr="main-appShell-container",wr="main-appShell-sideBar",Ir="main-appShell-navItems",Tr="main-appShell-mainContent",Ar="main-appShell-topBar",Pr="main-appShell-cards",Or="main-appShell-cardsHeader",Dr="main-appShell-cardsWrapper",Rr="main-appShell-card",Lr="main-appShell-playbackBar",Fr=(0,sr.memo)((function(){return(0,lr.jsxs)("div",{className:Cr,children:[(0,lr.jsx)("div",{className:wr,children:(0,lr.jsxs)("svg",{className:Ir,width:"232",height:"704",viewBox:"0 0 232 704",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("path",{fill:"#000",d:"M0 0h227v704H0z"}),(0,lr.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,lr.jsx)("path",{fill:"#404040",d:"M53 162h122v11H53zM64 258h95v11H64z"}),(0,lr.jsx)("path",{fill:"#fff",d:"M16 248h32v32H16z"}),(0,lr.jsx)("path",{d:"M38 263h-5v-5h-2v5h-5v2h5v5h2v-5h5v-2z",fill:"#000"}),(0,lr.jsx)("path",{fill:"url(#paint0_linear)",d:"M16 292h32v32H16z"}),(0,lr.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,lr.jsx)("path",{fill:"#404040",d:"M64 303h79v11H64z"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 353h142v11H16zM16 395h53v11H16zM16 437h98v11H16zM16 479h143v11H16zM16 521h97v11H16z",opacity:"0.6"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 218h71v11H16z"}),(0,lr.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,lr.jsx)("path",{fill:"#404040",d:"M53 78h122v11H53zM53 120h122v11H53z"}),(0,lr.jsx)("defs",{children:(0,lr.jsxs)("linearGradient",{id:"paint0_linear",x1:"0",y1:"308",x2:"32",y2:"340",gradientUnits:"userSpaceOnUse",children:[(0,lr.jsx)("stop",{stopColor:"#450AF5"}),(0,lr.jsx)("stop",{offset:"1",stopColor:"#C4EFD9"})]})})]})}),(0,lr.jsxs)("div",{className:Tr,children:[(0,lr.jsx)("div",{className:Ar,children:(0,lr.jsxs)("svg",{width:"125",height:"95",viewBox:"0 0 125 95",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{x:"0",y:"31",width:"125",height:"32",rx:"16",fill:"#282828"}),(0,lr.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,lr.jsx)("path",{fill:"#404040",d:"M1014 42h66v11h-66z"})]})}),(0,lr.jsxs)("div",{children:[(0,lr.jsxs)("div",{className:Pr,children:[(0,lr.jsxs)("div",{className:Or,children:[(0,lr.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,lr.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,lr.jsxs)("div",{className:Dr,children:[(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]}),(0,lr.jsxs)("div",{className:Pr,children:[(0,lr.jsxs)("div",{className:Or,children:[(0,lr.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,lr.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,lr.jsxs)("div",{className:Dr,children:[(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]}),(0,lr.jsxs)("div",{className:Pr,children:[(0,lr.jsxs)("div",{className:Or,children:[(0,lr.jsx)("svg",{width:"257",height:"23",viewBox:"0 0 257 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{fill:"#404040",d:"M0 0h257v23H0z"})}),(0,lr.jsx)("svg",{width:"72",height:"11",viewBox:"0 0 72 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{fill:"#404040",d:"M0 0h72v11H0z"})})]}),(0,lr.jsxs)("div",{className:Dr,children:[(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]}),(0,lr.jsxs)("svg",{className:Rr,width:"164",height:"232",viewBox:"0 0 164 232",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("rect",{width:"164",height:"232",rx:"8",fill:"#282828"}),(0,lr.jsx)("path",{fill:"#404040",d:"M16 16h132v132H16zM16 166h122v11H16zM16 182h72v11H16zM16 206h94v6H16z"})]})]})]})]})]}),(0,lr.jsxs)("div",{className:Lr,children:[(0,lr.jsx)("div",{children:(0,lr.jsx)("svg",{width:"175",height:"40",viewBox:"0 0 175 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsx)("path",{fill:"#404040",d:"M53 5h122v11H53zM53 23h101v11H53zM0 0h40v40H0z"})})}),(0,lr.jsx)("div",{children:(0,lr.jsxs)("svg",{width:"216",height:"48",viewBox:"0 0 216 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.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,lr.jsx)("circle",{cx:"108",cy:"24",r:"20",fill:"#fff"}),(0,lr.jsx)("path",{d:"M100 16h16v16h-16V16z",fill:"#fff"}),(0,lr.jsx)("path",{d:"M104.018 30l10.392-6-10.392-6v12z",fill:"#000"})]})}),(0,lr.jsx)("div",{children:(0,lr.jsx)("svg",{width:"99",height:"16",viewBox:"0 0 99 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.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 jr=n(81589);const Mr=sr.memo((function(){return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(jr.w,{isOpen:!0,headingMessage:u.ag.get("error-dialog.generic.header"),message:u.ag.get("error-dialog.generic.body"),buttonLabel:u.ag.get("fatal-error.button-label")}),(0,lr.jsx)(Fr,{})]})}));var Ur=n(82279),Br=n(46642);function Vr(e){return e?.map((({url:e,width:t,height:n})=>({src:e,sizes:`${t}x${n}`})))??[]}function Hr(e){window.navigator.mediaSession&&(window.navigator.mediaSession.metadata=function(e){return(0,he.G_)(e)?new window.MediaMetadata({title:e.name,artist:e.artists.map((e=>e.name)).join(u.ag.getSeparator()),album:e.album.name,artwork:Vr(e.images)}):(0,he.iw)(e)?new window.MediaMetadata({title:e.name,artist:"",album:e.show.name,artwork:Vr(e.images)}):(0,he.G7)(e)?new window.MediaMetadata({title:e.name,artist:"",album:e.book.name,artwork:Vr(e.images)}):(0,he.k6)(e)?new window.MediaMetadata({title:u.ag.get("ad-formats.advertisement"),artist:"",album:"",artwork:Vr(e.images)}):(0,he.RB)(e)||void 0===e?new window.MediaMetadata({title:"",artist:"",album:"",artwork:[]}):(0,fe.U)(e)}(e))}const Gr=()=>((0,Br.G)(ke.rg.UPDATE,(({data:e})=>Hr(e?.item??void 0))),null),Wr=()=>(0,p.wW)()?null:(0,lr.jsx)(Gr,{});var zr=n(89130),Kr=n(92999),Yr=n(43115),qr=n(16064);function Zr(e=""){const t=`https://open.spotify.com${e}`;let n="";const i=/^\/\w+\/([a-zA-Z0-9]+)[/\w+]*/.exec(e);i&&(n=i[1]);let a=e,s=e;const r=e.match(/^\/search\/(.*)\/(.*)/);return/^\/genre\//.test(e)||/^\/view\//.test(e)?s="/browse/genres":"/"===e?(s="/browse",a="/browse/featured"):"/browse/charts"===e?s="/charts":"/collection/tracks"===e?s="/collection/songs":"/search"===e?s="/search":r?(s="podcasts"===r[2]?"/search/shows":`/search/${r[2]}`,a=`/search/${r[2]}`):e.match(/\/search\/(?.*)/)?(s="/search",a="/search/results"):"/download"===e?s="/upsell":"/queue"===e?s="/nowplaying/queue":/^\/artist\/[a-zA-Z0-9]+\/related/.test(e)?(a=(0,c.WN)(n).toString(),s="/artist/related"):/^\/artist\/[a-zA-Z0-9]+\/about/.test(e)?(a=(0,c.WN)(n).toString(),s="/artist/about"):/^\/artist\/[a-zA-Z0-9]+\/concerts/.test(e)?(a=(0,c.WN)(n).toString(),s="/artist/concerts"):(0,c.OB)(t)?(a=(0,c.WN)(n).toString(),s="/artist"):(0,c.nK)(t)?(a=(0,c.FW)(n).toString(),s="/playlist"):(0,c.YF)(t)?(a=(0,c.jy)(n).toString(),s="/album"):(0,c.hn)(t)?(a=(0,c.YD)(n).toString(),s="/episode"):(0,c.RS)(t)?(a=(0,c.xt)(n).toString(),s="/shows"):(0,c.Kv)(t)?(a=(0,c.QK)(n).toString(),s="/profile"):(0,c.wj)(t)&&(a=(0,c.tn)(n).toString(),s="/track"),{viewUri:a,mappedPageId:s}}var Qr=n(89605);const Jr=()=>"undefined"==typeof window||void 0===window.gtag||void 0===window.google_tag_manager,$r=(e,t,n)=>{Jr()||window.gtag("event",t,{event_category:e,event_label:n})};var Xr=n(95634),eo=n(16674);const to="#login";class no extends sr.Component{constructor(e){super(e);const{eventSender:t,location:n,isAnonymous:i}=this.props;t.send(so(n.pathname,i))}shouldComponentUpdate(e){const{eventSender:t,navigationType:n,location:i,isAnonymous:a}=e,{location:s}=this.props,r=i.hash===to||s.hash===to;var o;return(0,zr.J)(i,s)||n===Kr.aU.Replace||r||(o=i.pathname,Jr()||window.gtag("pageview",{pathname:o}),t.send(function(e,t=!1){const{viewUri:n,mappedPageId:i}=Zr(e),a={page:i,type:"exit",view_uri:n};return t?(0,qr.t)(a):(0,Yr.v)(a)}(s.pathname,a)),t.send(so(i.pathname,a))),!1}render(){return null}}const io=(0,$s.$j)((function(e,t){return{...t,isAnonymous:e.session.isAnonymous}}))((ao=no,e=>{const t=(0,Qr.TH)(),n=(0,Qr.s0)(),i=(0,Qr.ur)(),a=(0,Qr.UO)();return(0,lr.jsx)(ao,{...e,navigate:n,navigationType:i,location:t,params:a})}));var ao;function so(e,t=!1){const{viewUri:n,mappedPageId:i}=Zr(e),a={page:i,type:"enter",view_uri:n};return t?(0,qr.t)(a):(0,Yr.v)(a)}var ro=n(73495);const oo=({apiInstance:e})=>((0,Br.G)(ke.rg.ACTION,(t=>{t.data.action!==ke.zr.PLAY&&t.data.action!==ke.zr.RESUME||e.log(t.data.action)})),null);var lo=n(99696),co=n(84875),uo=n.n(co),mo=n(10533),po=n(30301),go=n(46361),ho=n(9407);const ko={width:448,height:144},vo={name:"mini-player",type:go.N.FLOATING,position:{x:screen.availWidth-448-50,y:50},size:ko,minSize:ko,maxSize:ko};function fo(){const[e,t]=(0,ho.z)("mini-player-options",{}),{handle:n,open:i,close:a}=(0,go.H)({...vo,...e,onClose:e=>{t({position:{x:e.screenX,y:e.screenY-(screen.height-screen.availHeight)}})}}),s=(0,sr.useCallback)((()=>{null===n?i():a()}),[n,i,a]);return{isOpen:!!n,handle:n,show:i,hide:a,toggle:s}}const yo="zJFIha5vtXOlXnPSglax",So="vojO1KmAoycFuadjJqKJ",bo="H4d5iuP1SkygTy5P4DWO",_o=()=>{const e=(0,po.IK)(),{toggle:t,isOpen:n}=fo();return(0,lr.jsx)("button",{"aria-label":"Toggle mini-player",disabled:!e,className:uo()(So,{[bo]:n}),onClick:t,children:(0,lr.jsx)(mo.$,{className:yo,iconSize:16})})};var No=n(50499),Eo=n(24090),xo=n(56162),Co=n(29329),wo=n(66167),Io=n(57734),To=n(95663),Ao=n(37409),Po=n(91048);const Oo=5e3,Do=15e3;function Ro(){const e=(0,Ao.g)(),t=function(e){return e===ve.p.TRACK?Oo:e===ve.p.EPISODE?Do:0}((0,vr.Y)((e=>e?.item?.type)));return{seekBackward:(0,sr.useCallback)((()=>(0!==t&&e.seekBackward(t),t)),[e,t]),seekForward:(0,sr.useCallback)((()=>(0!==t&&e.seekForward(t),t)),[e,t]),seekOffsetMs:t}}var Lo=n(96170);const Fo="main-playbackBarRemainingTime-container",jo=({position:e,duration:t,isPreview:n,semanticColor:i="textSubdued",isFullscreenMode:a=!1})=>{const[s,r]=(0,ho.z)(at.JP,!1),o=(0,sr.useCallback)((()=>{n||r(!s)}),[s,r,n]);return(0,lr.jsx)(xo.D,{as:"div","":"playback-duration","data-test-position":e,variant:a?"ballad":"finale",className:Fo,onClick:o,semanticColor:i,children:s?`-${(0,fr.m)(t-e)}`:(0,fr.m)(t)})};var Mo=n(91546);const Uo=[{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,Mo.g)("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,Mo.g)("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,Mo.g)("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,Mo.g)("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,Mo.g)("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,Mo.g)("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,Mo.g)("images/sw_saber_ahsoka1.png")})`,"--saber-hilt-overlap":"-9px","--saber-hilt-width":"100px","--saber-hilt-height":"36px"}}],Bo=["spotify:playlist:37i9dQZF1DXaUaRhCgtpCo","spotify:playlist:69BOXIItwwyxTgdz6flzvU","spotify:playlist:37i9dQZF1DWUgUvAPAFxdh"],Vo=["official_star_wars","kirbysayshi","hansencc"],Ho=/Star Wars/i,Go="THX1138",Wo=Go.length,zo="saber-hilt-button";function Ko({onChange:e}){const t=function(){const[e,t]=(0,sr.useState)([]),[n,i]=(0,sr.useState)(!1);return(0,sr.useEffect)((()=>{const a=a=>{for(e.push(a.key);e.length>Wo;)e.shift();e.join("")===Go&&i(!n),t([...e])};return window.addEventListener("keypress",a),()=>{window.removeEventListener("keypress",a)}}),[e,n]),(0,vr.Y)((e=>{const t=e?.context.uri??"",n=e?.context?.metadata?.context_owner??"",i=e?.item??void 0;return!!Bo.includes(t)||!!Vo.includes(n)||!!(0,he.G_)(i)&&(Ho.test(i.name)||Ho.test(i.album.name))}))||n}(),{next:n,config:i}=function(e){const[t,n]=(0,sr.useState)(0);return{next:()=>{n((t+1)%Uo.length)},config:e?Uo[t]:null}}(t),a=(0,sr.useRef)(e);return a.current=e,(0,sr.useEffect)((()=>{a.current(i?.vars??null)}),[i]),i?(0,lr.jsx)("div",{className:"saber-hilt",children:(0,lr.jsx)("button",{"":zo,"aria-label":u.ag.get("playback-control.a11y.lightsaber-hilt-button",i?.name),className:"saber-hilt__btn",style:i.vars,onClick:n})}):null}var Yo=n(95822);const qo=({isPreview:e,isFullscreenMode:t=!1})=>{const[n,i]=(0,sr.useState)(null),a=(0,To.o)(),s=(0,Ao.g)(),r=(0,vr.Y)((e=>e),((e,t)=>e?.duration===t?.duration&&e?.hasContext===t?.hasContext&&e?.restrictions?.canSeek===t?.restrictions?.canSeek)),{seekBackward:o,seekForward:l,seekOffsetMs:d}=Ro(),{spec:c,logger:m}=(0,Lo.fU)(Co.createDesktopNpbPlayerControlsEventFactory,{}),p=r?.duration??0,g=r?.hasContext??!1,h=r?.restrictions?.canSeek??!1,[k,v]=(0,Po.z)(500),[f,y]=(0,sr.useState)(null),S=null!==f?f:k,b=e=>{y(e*p)},_=S>0||p>0,N=(0,fr.m)(_?S:NaN),E=(0,fr.m)(_?p:NaN),x=(0,$s.v9)((e=>!!e?.ui?.fullscreenMode?.isOpen)),C=(0,Yo.t)(),w=(0,Io.H)();return t!==x?null:(0,lr.jsxs)("div",{className:"playback-bar",children:[(0,lr.jsx)(xo.D,{"":"playback-position",as:"div",variant:t?"ballad":"finale",className:"playback-bar__progress-time-elapsed",semanticColor:t?"textBase":"textSubdued",children:N}),g?(0,lr.jsx)(Ko,{onChange:e=>{i(e)}}):null,(0,lr.jsx)(wo.ko,{labelText:u.ag.get("playback-control.a11y.seek-slider-button"),value:Math.floor(S/1e3),max:Math.floor(p/1e3),step:Math.floor(d/1e3),"aria-valuetext":u.ag.get("download.progress-global",N,E),isInteractive:g&&_,onDragStart:b,onDragMove:b,onDragEnd:(e,{wasDraggedBeforeReleased:t})=>{if(y(null),a({intent:"seek",type:"click"}),!h)return;const n=e*p;v(n),s.seekTo(n),t?m.logInteraction(c.progressBarFactory().dragSeekToTime({msToSeekTo:n})):m.logInteraction(c.progressBarFactory().hitSeekToTime({msToSeekTo:n}))},onStepBackward:()=>{if(!h)return;const e=o();v(Math.max(0,Math.min(p,k-e)))},onStepForward:()=>{if(!h)return;const e=l();v(Math.max(0,Math.min(p,k+e)))},saberConfig:n,isPlayingStrangerThings:C,isAttackOnTitanEasterEggActive:w,"":"playback-progressbar"}),(0,lr.jsx)(jo,{position:S,duration:p>0?p:NaN,isPreview:e,semanticColor:t?"textBase":"textSubdued",isFullscreenMode:t})]})};var Zo=n(85830),Qo=n(31538),Jo=n(83292),$o=n(35889),Xo=n(36844),el=n(55760),tl=n(86165);var nl=n(3289),il=n(87527);const al="main-playPauseButton-button",sl=({iconSize:e=16,onClick:t})=>{const n=(0,Ao.g)(),i=(0,To.o)(),a=function(){const e=(0,Xo.W6)(Ns.Nm),t=(0,el.s4)(),[n,i]=(0,tl.L)();return(0,sr.useCallback)(((a,s)=>{function r(){i(a),n.current?t.send((0,$o.m)({action:null,page:null})):t.send((0,$o.m)({action:s,page:location.pathname}))}e&&("requestIdleCallback"in window?requestIdleCallback(r):r())}),[t,i,n,e])}(),{hasContext:s,isPaused:r,canPause:o,canResume:l}=(0,vr.Y)((e=>({hasContext:e?.hasContext,isPaused:e?.isPaused,canPause:e?.restrictions.canPause,canResume:e?.restrictions.canResume})),il.V),d=(0,Zo.y1)((e=>{i({type:"click",intent:r?"play":"pause"}),r&&l?(t?.("resume"),n.resume(),a(e,"play/resume")):!r&&o&&(t?.("pause"),n.pause())}),100,{leading:!0,trailing:!1}),c=r?u.ag.get("playback-control.play"):u.ag.get("playback-control.pause"),m={"--button-size":2*e+"px"},p=!s||(r?!l:!o);return(0,lr.jsx)(nl._,{label:c,children:(0,lr.jsx)("button",{style:m,className:al,onClick:d,disabled:p,"aria-label":c,"":"control-button-playpause",children:r?(0,lr.jsx)(Qo.J,{iconSize:e}):(0,lr.jsx)(Jo.k,{iconSize:e})})})};var rl=n(3334),ol=n(48491);function ll(){const e=(0,Ao.g)();return{...(0,vr.Y)((e=>({shuffle:e?.shuffle??!1,repeat:e?.repeat??he.zq.REPEAT_NONE,speed:e?.speed??0,canToggleShuffle:e?.restrictions.canToggleShuffle??!1,canToggleRepeatContext:e?.restrictions.canToggleRepeatContext??!1,canToggleRepeatTrack:e?.restrictions.canToggleRepeatTrack??!1})),il.V),canChangeSpeed:e.getCapabilities().canChangeSpeed,setShuffle:e.setShuffle.bind(e),setRepeat:e.setRepeat.bind(e),setSpeed:e.setSpeed.bind(e)}}const dl="main-repeatButton-button",cl="main-repeatButton-active";function ul(e,t,n){return t&&n?(e+1)%3:t?(e+1)%2:n?1===e?2:(e+2)%4:he.zq.REPEAT_NONE}const ml={[he.zq.REPEAT_NONE]:{get label(){return u.ag.get("playback-control.disable-repeat")},intent:"repeat-off",ariaChecked:"false"},[he.zq.REPEAT_CONTEXT]:{get label(){return u.ag.get("playback-control.enable-repeat")},intent:"repeat-all",ariaChecked:"true"},[he.zq.REPEAT_TRACK]:{get label(){return u.ag.get("playback-control.enable-repeat-one")},intent:"repeat-single",ariaChecked:"mixed"}},pl=({iconSize:e=16,onClick:t})=>{const n=(0,To.o)(),{setRepeat:i,repeat:a}=ll(),[s,r]=(0,vr.Y)((e=>[e?.restrictions.canToggleRepeatContext??!1,e?.restrictions.canToggleRepeatTrack??!1])),o=!s&&!r,l={"--button-size":2*e+"px"},d=ml[ul(a,s,r)].label;return(0,lr.jsx)(nl._,{label:d,children:(0,lr.jsx)("button",{style:l,className:uo()(dl,{[cl]:a!==he.zq.REPEAT_NONE}),onClick:()=>{const e=ul(a,s,r);n({type:"click",intent:ml[e].intent}),t?.(e),i(e)},disabled:o,role:"checkbox","aria-checked":ml[a].ariaChecked,"aria-label":d,"":"control-button-repeat",children:a===he.zq.REPEAT_TRACK?(0,lr.jsx)(rl.H,{iconSize:e}):(0,lr.jsx)(ol.K,{iconSize:e})})})};var gl=n(41923);const hl="MRfNcNMd_djj3KOg_VOB",kl=({iconSize:e=16,onClick:t})=>{const n=(0,To.o)(),i=(0,Ao.g)(),a=(0,vr.Y)((e=>e?.restrictions.canSeek??!1)),s={"--button-size":2*e+"px"};return(0,lr.jsx)(nl._,{label:u.ag.get("playback-control.skip-backward-15"),children:(0,lr.jsx)("button",{style:s,className:uo()(hl),onClick:()=>{n({type:"click",intent:"skip-back-15"}),t?.(-15e3),i.seekBackward(15e3)},disabled:!a,"aria-label":u.ag.get("playback-control.skip-backward-15"),"":"control-button-seek-back-15",children:(0,lr.jsx)(gl.v,{iconSize:e})})})};var vl=n(32183);const fl="XGCdw_LcXQHrxmvpxjwi",yl=({iconSize:e=16,onClick:t})=>{const n=(0,To.o)(),i=(0,Ao.g)(),a=(0,vr.Y)((e=>e?.restrictions.canSeek??!1)),s={"--button-size":2*e+"px"};return(0,lr.jsx)(nl._,{label:u.ag.get("playback-control.skip-forward-15"),children:(0,lr.jsx)("button",{style:s,className:uo()(fl),onClick:()=>{n({type:"click",intent:"skip-forward-15"}),t?.(15e3),i.seekForward(15e3)},disabled:!a,"aria-label":u.ag.get("playback-control.skip-forward-15"),"":"control-button-seek-forward-15",children:(0,lr.jsx)(vl.v,{iconSize:e})})})};var Sl=n(39757),bl=n(20882);const _l="main-shuffleButton-button",Nl="main-shuffleButton-active",El=({iconSize:e=16,onClick:t})=>{const n=(0,To.o)(),{shuffle:i,setShuffle:a,canToggleShuffle:s}=ll(),r=i?u.ag.get("playback-control.disable-shuffle"):u.ag.get("playback-control.enable-shuffle"),o={"--button-size":2*e+"px"};return(0,lr.jsx)(bl.v,{placement:"top",arrow:"bottom",title:u.ag.get("pick-and-shuffle.upsell.title.shuffle-button"),children:(0,lr.jsx)(nl._,{label:r,children:(0,lr.jsx)("button",{style:o,className:uo()(_l,{[Nl]:i}),onClick:()=>{const e=!i;n({type:"click",intent:"shuffle"}),t?.(e),a(e)},disabled:!s,role:"switch","aria-checked":i?"true":"false","aria-label":r,"":"control-button-shuffle",children:(0,lr.jsx)(Sl.z,{iconSize:e})})})})};var xl=n(37899);const Cl="main-skipBackButton-button",wl=({iconSize:e=16,onClick:t})=>{const n=(0,Ao.g)(),i=(0,To.o)(),a=(0,vr.Y)((e=>(e?.restrictions.canSkipPrevious||e?.restrictions.canSeek)??!1)),s=(0,Zo.y1)((()=>{i({type:"click",intent:"previous"}),t?.(),n.skipToPrevious()}),100,{leading:!0,trailing:!1}),r={"--button-size":2*e+"px"};return(0,lr.jsx)(nl._,{label:u.ag.get("playback-control.skip-back"),children:(0,lr.jsx)("button",{style:r,className:uo()(Cl),onClick:s,disabled:!a,"aria-label":u.ag.get("playback-control.skip-back"),"":"control-button-skip-back",children:(0,lr.jsx)(xl.y,{iconSize:e})})})};var Il=n(50148);const Tl="main-skipForwardButton-button",Al=({iconSize:e=16,onClick:t})=>{const n=(0,Ao.g)(),i=(0,To.o)(),a=(0,vr.Y)((e=>e?.restrictions.canSkipNext??null)),s=(0,Zo.y1)((()=>{i({type:"click",intent:"next"}),t?.(),n.skipToNext()}),100,{leading:!0,trailing:!1}),r={"--button-size":2*e+"px"};return(0,lr.jsx)(nl._,{label:u.ag.get("playback-control.skip-forward"),children:(0,lr.jsx)("button",{style:r,className:uo()(Tl),onClick:s,disabled:!a,"aria-label":u.ag.get("playback-control.skip-forward"),"":"control-button-skip-forward",children:(0,lr.jsx)(Il.W,{iconSize:e})})})};var Pl=n(59200),Ol=n(87297),Dl=n(90466),Rl=n(37844),Ll=n(14845),Fl=n(71463),jl=n(71096),Ml=n(76434),Ul=n(77043),Bl=n(43026),Vl=n(17059),Hl=n(6932),Gl=n(97862),Wl=n(97572),zl=n(48826),Kl=n(27747),Yl=n(14924),ql=n(71867),Zl=n(95624),Ql=n(19452),Jl=n(82527),$l=n(44977),Xl=n(69662),ed=n(5577),td=n(61068),nd=n(16673),id=n(5006),ad=n(72662),sd=n(26290),rd=n(85953),od=n(54652),ld=n(99343);const dd="INvB6IvAqjjvyfm0ezDi",cd={.5:Ol.dx,.6:Dl.Z,.7:Rl.A,.8:Ll.Ig,.9:Fl.A,1:jl.V,1.1:Ml.X,1.2:Ul.Av,1.3:Bl.u,1.4:Vl.W,1.5:Hl.vL,1.6:Gl.A,1.7:Wl.t,1.8:zl.s,1.9:Kl.G,2:Yl._,2.1:ql.l,2.2:Zl.L,2.3:Ql.j,2.4:Jl.K,2.5:$l.B,2.6:Xl.D,2.7:ed.K,2.8:td.W,2.9:nd.q,3:id.N,3.1:ad.l,3.2:sd.l,3.3:rd.$,3.4:od.a,3.5:ld.s},ud=({speed:e,iconSize:t=20})=>{const n=cd[e];return n?(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(n,{className:dd,iconSize:t}),(0,lr.jsx)("span",{className:"hidden-visually",children:`${e}x`})]}):(0,lr.jsx)("span",{children:`${e}x`})},md=({speed:e,iconSize:t=20})=>{let n=jl.V;switch(e){case.5:n=Ol.dx;break;case.8:n=Ll.Ig;break;case 1:n=jl.V;break;case 1.2:n=Ul.Av;break;case 1.5:n=Hl.vL;break;case 1.8:n=zl.s;break;case 2:n=Yl._;break;case 2.5:n=$l.B;break;case 3:n=id.N;break;case 3.5:n=ld.s;break;default:console.error("Got unfamiliar playback speed, falling back to 1.")}return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(n,{className:dd,iconSize:t}),(0,lr.jsx)("span",{className:"hidden-visually",children:`${e}x`})]})},pd=e=>{const t=(0,Xo.W6)(Ns.Am)?ud:md;return(0,lr.jsx)(t,{...e})};var gd=n(1996),hd=n(78115),kd=n(99308);const vd=1,fd=[.5,.8,1,1.2,1.5,1.8,2,2.5,3,3.5],yd=[.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],Sd=(e=vd,t=!1)=>{const n=t?yd:fd,[i]=n.slice().sort(((t,n)=>Math.abs(t-e)-Math.abs(n-e)));return i},bd="Is0ZfXiIyRoHd9y1OWtv",_d=function({selectedSpeed:e,setSelectedSpeed:t}){const n=(0,To.o)(),i=(0,Xo.W6)(Ns.Am),a=i?yd:fd,s=(0,sr.useRef)(null),r=(0,sr.useCallback)((e=>{null!==e&&(s.current=e)}),[]);return(0,sr.useEffect)((()=>{s?.current&&s.current.scrollIntoView({block:"center"})}),[s]),(0,lr.jsxs)(gd.v,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,lr.jsx)(hd.F,{children:u.ag.get("playback-control.playback-speed")}),(0,lr.jsx)("div",{className:i?bd:void 0,children:a.map((i=>(0,lr.jsx)(kd.s,{elementRef:i===e?r:void 0,onClick:()=>{t(i),n({type:"click",intent:"choose-speed",itemIdSuffix:`option-${i}x`})},"":`playback-speed-option-${i}`,role:"menuitemradio","aria-label":u.ag.get("playback-control.playback-speed-button-a11y",i),"aria-checked":i===e,children:`${i}x`},i)))})]})},Nd="playbackSpeed";const Ed="Ww5ppB6W74laf1c0H_pR",xd=({iconSize:e=20,onClick:t})=>{const{speed:n,setSpeed:i,canChangeSpeed:a}=function(){const e=(0,Xo.W6)(Ns.Am),{speed:t,setSpeed:n,canChangeSpeed:i}=ll(),[a,s]=(0,ho.z)(Nd,vd),r=(0,sr.useMemo)((()=>Sd(a??vd,e)),[a,e]);return{speed:(0,sr.useMemo)((()=>Boolean(t)?Sd(t,e):r),[t,r,e]),setSpeed:(0,sr.useCallback)((e=>{s(e),n(e)}),[s,n]),canChangeSpeed:i}}(),s=(0,To.o)(),{connectionStatus:r}=(0,kr.O)(),o=r===_t.TK.NOT_CONNECTED,l={"--button-size":2*e+"px"};return a?(0,lr.jsx)(Pl.xV,{renderInline:!0,placement:"top-start",menu:(0,lr.jsx)(_d,{selectedSpeed:n,setSelectedSpeed:e=>{t?.(e),i(e)}}),children:(t,i,a)=>(0,lr.jsx)(nl._,{label:u.ag.get("playback-control.change-playback-speed"),children:(0,lr.jsx)("button",{style:l,ref:a,className:Ed,onClick:e=>{i(e),s({type:"click",intent:"choose-speed"})},"aria-label":u.ag.get("playback-control.change-playback-speed"),disabled:!o,"":"control-button-playback-speed",children:(0,lr.jsx)(pd,{speed:n,iconSize:e})})})}):null};function Cd(){const e=(0,vr.Y)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri));return(0,he.iw)(e)||(0,he.G7)(e)?"audio"===e.mediaType||"mixed"===e.mediaType:!!(0,he.k6)(e)&&e.isPodcastAd}var wd=n(84847),Id=n(3442),Td=n(90773);var Ad=n(19953),Pd=n(97089),Od=n(11608),Dd=n(31450);const Rd=({volume:e=1,iconSize:t=16,...n})=>{const i={iconSize:t,role:"presentation",...n};return 0===e?(0,lr.jsx)(Ad.D,{"aria-label":u.ag.get("playback-control.a11y.volume-off"),...i}):e<1/3?(0,lr.jsx)(Pd.J,{"aria-label":u.ag.get("playback-control.a11y.volume-low"),...i}):e<2/3?(0,lr.jsx)(Od.k,{"aria-label":u.ag.get("playback-control.a11y.volume-medium"),...i}):(0,lr.jsx)(Dd.d,{"aria-label":u.ag.get("playback-control.a11y.volume-high"),...i})};let Ld=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 Fd=({iconSize:e=16,onVolumeBarClick:t,onVolumeBarDrag:n,onToggleMuteClick:i,className:a,mode:s=Ld.SHOW_SLIDER_ALWAYS,sliderWidth:r})=>{const{volume:o,setVolume:l,raiseVolume:d,lowerVolume:c}=function(){const e=(0,Id.f)(),[t,n]=(0,sr.useState)(-1);return(0,sr.useEffect)((()=>{let t=!0;return(async()=>{const i=await e.getVolume();t&&n(i)})(),()=>{t=!1}}),[e]),(0,Td._)(ae.r.VOLUME,(e=>n(e.data.volume))),{volume:t,setVolume:(0,sr.useCallback)((t=>{n(t),e.setVolume(t)}),[e]),raiseVolume:(0,sr.useCallback)((()=>e.raiseVolume()),[e]),lowerVolume:(0,sr.useCallback)((()=>e.lowerVolume()),[e])}}(),m=-1!==o,p=Math.min(1,Math.max(0,o)),[g,h]=(0,sr.useState)({isDragging:!1,isHoveringButton:!1,toggleVolumeLevel:null,dragPosition:0,shouldDragValueBeUsed:!1}),{shouldDragValueBeUsed:k,dragPosition:v,isHoveringButton:f,toggleVolumeLevel:y,isDragging:S}=g;let b=k?v:p;m||(b=1);const _=(0,Zo.y1)((e=>{const t=Math.min(1,Math.max(0,e));l(t)}),25,{maxWait:50,leading:!0}),N=()=>{h((e=>({...e,isHoveringButton:!0})))},E=()=>{h((e=>({...e,isHoveringButton:!1})))},x=0===o?u.ag.get("playback-control.unmute"):u.ag.get("playback-control.mute"),C={"--button-size":2*e+"px","--slider-width":r?`${r}px`:"100%"};return(0,lr.jsxs)("div",{style:C,className:uo()("volume-bar",a,{"volume-bar--disabled":!m,"volume-bar--slider-on-hover":s===Ld.SHOW_SLIDER_ON_HOVER}),"":"volume-bar",dir:"ltr",onWheel:e=>{if(!m)return;const t=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX,n=Math.max(-120,Math.min(120,e?.nativeEvent?.wheelDelta||t))/1200,i=Math.max(0,Math.min(1,b+n));l(i)},children:[(0,lr.jsx)(nl._,{label:x,children:(0,lr.jsx)("button",{className:"volume-bar__icon-button control-button",onClick:()=>{0===b?(i?.(!0),_(y??.7)):(h((e=>({...e,toggleVolumeLevel:b}))),i?.(!1),_(0))},disabled:!m,"aria-label":0===o?u.ag.get("playback-control.unmute"):u.ag.get("playback-control.mute"),onMouseEnter:N,onMouseLeave:E,"aria-describedby":"volume-icon","":"volume-bar-toggle-mute-button",children:(0,lr.jsx)(Rd,{id:"volume-icon",iconSize:e,volume:b})})}),(0,lr.jsx)("div",{className:"volume-bar__slider-container",onMouseEnter:N,onMouseLeave:E,children:(0,lr.jsx)(wo.ko,{labelText:u.ag.get("playback-control.a11y.volume-slider-button"),value:b,max:1,step:.1,onDragStart:e=>{h((t=>({...t,isDragging:!0,dragPosition:e,shouldDragValueBeUsed:!0})))},onDragMove:e=>{h((t=>({...t,dragPosition:e,shouldDragValueBeUsed:!0}))),S&&(n?.(e),_(e))},onDragEnd:e=>{h((e=>({...e,shouldDragValueBeUsed:!1,dragPosition:0,isDragging:!1}))),t?.(e),_(e)},onStepBackward:c,onStepForward:d,forceActiveStyles:f})})]})};var jd=n(80912);const Md="y5HzBxqGmj45ReuIGomO",Ud=({iconSize:e=16})=>{const t={"--button-size":2*e+"px"};return(0,lr.jsx)(nl._,{label:"Open Spotify",children:(0,lr.jsx)("button",{style:t,className:Md,onClick:()=>{window.showMainWindow()},"aria-label":"Open Spotify",children:(0,lr.jsx)(jd.V,{iconSize:e})})})};var Bd=n(66405);const Vd="okg_Ok_UlpqI3e9pHGj8",Hd="iTQIqmjUFbvm4RdUVqPf",Gd="T6zTKyPQYL476uNwQQHp",Wd="nAZ1BYKu8kzL6OK5zURI",zd="E9ZIzs2Fbfgamonrvkrc",Kd="_vO7IP2Zo9WpFyXzaaJQ",Yd="EBtWeK4CLa4YOSDNZQM5",qd=()=>{const e=Cd(),t=(0,wd.x)(),n=t?.context??null,i=t?.item??null;return(0,lr.jsx)("div",{className:"encore-dark-theme",children:(0,lr.jsxs)("div",{className:Vd,children:[(0,lr.jsx)(No.T,{className:Gd,item:i,maxSize:600,desiredLabel:"xlarge"}),(0,lr.jsxs)("div",{className:Wd,children:[(0,lr.jsx)("div",{className:zd,children:n&&i?(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(Eo._,{className:Kd,context:n,item:i}),(0,lr.jsx)(Bd.B,{uri:i.uri})]}):null}),(0,lr.jsx)("div",{className:Hd,children:(0,lr.jsx)(qo,{isPreview:!1})}),(0,lr.jsxs)("div",{className:Yd,children:[(0,lr.jsx)(Fd,{iconSize:16,mode:Ld.SHOW_SLIDER_ON_HOVER,sliderWidth:80}),!e&&(0,lr.jsx)(El,{iconSize:16}),e&&(0,lr.jsx)(kl,{iconSize:16}),(0,lr.jsx)(wl,{iconSize:16}),(0,lr.jsx)(sl,{iconSize:16}),(0,lr.jsx)(Al,{iconSize:16}),e&&(0,lr.jsx)(yl,{iconSize:16}),!e&&(0,lr.jsx)(pl,{iconSize:16}),(0,lr.jsx)(Ud,{iconSize:16})]})]})]})})},Zd=()=>{const{handle:e}=fo();return null!==e?a.createPortal((0,lr.jsx)(_r.WU,{handle:e,children:(0,lr.jsx)(qd,{})}),e.document.body):null},Qd=({children:e})=>{const t=(()=>{const e=(0,Xo.W6)(Ns.sm);return(0,p.ZO)()===g.W.Desktop&&e})();return(0,lr.jsx)(lr.Fragment,{children:t?e:null})},Jd=()=>(0,lr.jsx)(Qd,{children:(0,lr.jsx)(Zd,{})});var $d=n(99966),Xd=n(4898),ec=n(29335),tc=n(46895),nc=n(87549),ic=n(54059),ac=n(35015);const sc=({instance:e,children:t})=>(0,lr.jsx)(ac.e.Provider,{value:e,children:t});var rc=n(43097),oc=n(21085),lc=n(18085);const dc=({instance:e,children:t})=>(0,lr.jsx)(lc.z.Provider,{value:e,children:t});var cc=n(61922),uc=n(9171);const mc=({instance:e,children:t})=>(0,lr.jsx)(uc.i.Provider,{value:e,children:t});var pc=n(68591),gc=n(17761),hc=n(61601);const kc=({instance:e,children:t})=>(0,lr.jsx)(hc.G.Provider,{value:e,children:t});var vc=n(55345);const fc=(0,sr.createContext)(null),yc=({instance:e,children:t})=>(0,lr.jsx)(fc.Provider,{value:e,children:t}),Sc=()=>{const e=(0,sr.useContext)(fc);if(null===e)throw new Error("useVideoAPI must be used within a VideoAPIProvider");return e};var bc=n(87467);const _c=({instance:e,children:t})=>(0,lr.jsx)(bc.K.Provider,{value:e,children:t});var Nc=n(60430);const Ec=({instance:e,children:t})=>(0,lr.jsx)(Nc.h.Provider,{value:e,children:t});var xc=n(46164);const Cc=({instance:e,children:t})=>(0,lr.jsx)(xc.H.Provider,{value:e,children:t});var wc=n(11685),Ic=n(29514),Tc=n(49873);const Ac=({instance:e,children:t})=>(0,lr.jsx)(Tc.a.Provider,{value:e,children:t}),Pc=({instance:e,children:t})=>(0,lr.jsx)(Id.C.Provider,{value:e,children:t}),Oc=({instance:e,children:t})=>(0,lr.jsx)(Ao.E.Provider,{value:e,children:t});var Dc=n(68640),Rc=n(15144);const Lc=({instance:e,children:t})=>(0,lr.jsx)(Rc.C.Provider,{value:e,children:t});var Fc=n(29662),jc=n(56217);const Mc=(0,sr.createContext)(null);const Uc=({instance:e,children:t})=>(0,lr.jsx)(Mc.Provider,{value:e,children:t}),Bc=({children:e,providers:t})=>{if(void 0===e)throw new Error("MultiProvider requires children!");return t.reduceRight(((e,t)=>(0,sr.cloneElement)(t,void 0,e)),(0,lr.jsx)(sr.Fragment,{children:e}))};var Vc=n(76912),Hc=n(724);const Gc=({instance:e,children:t})=>(0,lr.jsx)(el.X2.Provider,{value:e,children:t}),Wc=({platform:e,children:t})=>{const n=[(0,lr.jsx)(Gc,{instance:e}),(0,lr.jsx)(Ic.os,{instance:e.getLocalStorageAPI()}),(0,lr.jsx)(ec.H,{instance:e.getActionStoreAPI()}),(0,lr.jsx)(_c,{instance:e.getAuthorizationAPI()}),(0,lr.jsx)(tc.dD,{instance:e.getClipboardAPI()}),(0,lr.jsx)(Ec,{instance:e.getConnectAPI()}),(0,lr.jsx)(m.J$,{instance:e.getControlMessageAPI()}),(0,lr.jsx)(sc,{instance:e.getFacebookAPI()}),(0,lr.jsx)(rc.R,{instance:e.getFollowAPI()}),(0,lr.jsx)(Pt.$C,{request:e.getGraphQLLoader()}),(0,lr.jsx)(Cc,{instance:e.getLibraryAPI()}),(0,lr.jsx)(wc.h,{instance:e.getLocalFilesAPI()}),(0,lr.jsx)(Ac,{instance:e.getOfflineAPI()}),(0,lr.jsx)(oc.u,{platformData:e.getPlatformData()}),(0,lr.jsx)(Oc,{instance:e.getPlayerAPI()}),(0,lr.jsx)(Pc,{instance:e.getPlaybackAPI()}),(0,lr.jsx)(cc.Ef,{instance:e.getPlayHistoryAPI()}),(0,lr.jsx)(Dc.ry,{instance:e.getPlaylistAPI()}),(0,lr.jsx)(mc,{instance:e.getPrivateSessionAPI()}),(0,lr.jsx)(pc.A,{instance:e.getRadioStationAPI()}),(0,lr.jsx)(Lc,{instance:e.getRecentlyPlayedAPI()}),(0,lr.jsx)(gc.P,{configuration:e.getRemoteConfiguration()}),(0,lr.jsx)(kc,{instance:e.getReportAPI()}),(0,lr.jsx)(Dc.xY,{instance:e.getRootlistAPI()}),(0,lr.jsx)(vc.s,{instance:e.getSegmentsAPI()}),(0,lr.jsx)(Fc.E0,{instance:e.getShowAPI()}),(0,lr.jsx)(dc,{instance:e.getUpdateAPI()}),(0,lr.jsx)(Uc,{instance:e.getUserAPI()}),(0,lr.jsx)(yc,{instance:e.getVideoAPI()}),(0,lr.jsx)(Xd.O,{instance:e.getEnhanceAPI()}),(0,lr.jsx)(Dc.NC,{instance:e.getPlaylistPermissionsAPI()}),(0,lr.jsx)(jc.E,{instance:e.getSingAlongAPI()}),(0,lr.jsx)(Lo.d0,{value:null}),(0,lr.jsx)(Lo.aH,{instance:e.getUBILogger()}),(0,lr.jsx)(nc.$,{instance:e.getCollectionPlatformAPI()}),(0,lr.jsx)(ic.x,{instance:e.getEqualizerAPI()}),(0,lr.jsx)(Vc.$.Provider,{value:e.getBuddyFeedAPI()}),(0,lr.jsx)(Hc.Q.Provider,{value:e.getPanelAPI()}),(0,lr.jsx)($d.u,{})];return(0,lr.jsx)(Bc,{providers:n,children:t})},zc=({history:e,children:t})=>{const[n,i]=(0,sr.useState)((()=>({location:e.location,action:e.action})));return(0,sr.useLayoutEffect)((()=>{e.listen(((e,t)=>i({location:e,action:t})))}),[e]),(0,lr.jsx)(Qr.F0,{location:n.location,navigationType:n.action,navigator:e,children:t})};var Kc=n(23627),Yc=n(42116);let qc=function(e){return e.LOGGING_CATEGORY="l2l",e.LOGGING_CATEGORY_MWP="l2l-mwp",e}({});function Zc({isPremiumUser:e,locationSearch:t,navigate:n,logNavigation:i,showDialog:a}){const s=!!(r=t)&&"1"===new URLSearchParams(r).get(qc.LOGGING_CATEGORY);var r;s&&(i(s),function(e,t){if(!e)return;const n=new URLSearchParams(e);n.delete(qc.LOGGING_CATEGORY),t({search:n.toString()},{replace:!0})}(t,n),s&&!e&&a())}var Qc=n(50787);const Jc=30,$c="sp_s2l",Xc=".spotify.com";var eu=function(e){return e.LOGGING_CATEGORY="s2l",e.LOGGING_CATEGORY_MWP="s2l-mwp",e}(eu||{});const tu=({os:e="",country:t=""})=>(0,Qc.x)({category:"in_app_message",action:"display",label:"download",destination_url:"open.spotify.com",os:e,country:t,context:window.location.search});function nu({locationSearch:e,navigate:t,logDialog:n,showDialog:i}){(function(e){if(!e)return!1;const t=new URLSearchParams(e);return Boolean(t.get(eu.LOGGING_CATEGORY))})(e)&&(n(),function(e,t){if(!e)return;const n=new URLSearchParams(e);n.delete(eu.LOGGING_CATEGORY),t({search:n.toString()},{replace:!0})}(e,t),i())}function iu(){const e=(0,Xe.vQ)($c);return e?JSON.parse(decodeURIComponent(e)):null}var au=n(79475),su=n(24584);const ru="QSYXf8dYOffYgwkMd5eC",ou="wSIDh56L1NbjcQQJ5Vkj",lu="AMqcnfR0iNvTMp3AZpze",du="SoFH2YPXp1wuOt2fe2tg",cu=({errorName:e})=>{const t={cdmerror:{logoLink:As.Z2,header:u.ag.get("error-page.header.cdmerror"),subtext:u.ag.get("error-page.subtext.cdmerror"),cta:{title:u.ag.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.ag.get("error-page.header.max_subscriptions_reached"),subtext:u.ag.get("error-page.subtext.max_subscriptions_reached")}}[e]||{};return(0,lr.jsxs)("div",{className:uo()(ru,"encore-dark-theme"),children:[t.logoLink?(0,lr.jsx)(su.Z,{className:uo()(ou),customLink:t.logoLink}):(0,lr.jsx)(su.Z,{className:uo()(ou),noLink:!0}),(0,lr.jsxs)("div",{className:uo()(lu),children:[t.header&&(0,lr.jsx)(xo.D,{as:"h1",variant:"brio",semanticColor:"textBase",dir:"auto",children:t.header}),t.subtext&&(0,lr.jsx)(xo.D,{as:"h2",variant:"ballad",semanticColor:"textBase",dir:"auto",children:t.subtext})]}),t.cta&&(0,lr.jsx)(au.D,{onClick:()=>{t?.cta?.url&&(window.location.href=t.cta.url)},className:uo()(du),colorSet:"brightAccent",children:t.cta.title})]})};var uu=n(58706),mu=n(30366),pu=n(42205),gu=n(6664),hu=n(82108),ku=n(83185);const vu="main-keyboardShortcutsHelpModal-container",fu="gPDYH11Cr1B2ZtS9z0P8",yu="IIQWD0tGOaagAN9uP_4h",Su="LdrQgiV3Kav0IR6Oqsej",bu=(0,sr.memo)((function(){const e=(0,$s.I0)(),{user:t}=(0,$s.v9)(hu.Gg),{name:n,uri:i,isOpen:a}=(0,$s.v9)((({ui:e})=>e.blockUserDialog)),s=(0,sr.useCallback)((async()=>{if(t&&i)try{await(0,pu.blockUser)(pt.b.getInstance(),{currentUserUri:t?.uri,uri:i}),e((0,Qs.HC)()),e((0,gu.aW)())}catch(t){throw e((0,Qs.HC)()),t}}),[e,t,i]),r=(0,sr.useCallback)((()=>{e((0,Qs.HC)())}),[e]),o=(0,sr.useCallback)((()=>{e((0,Qs.HC)())}),[e]);return(0,lr.jsx)(ku.Z,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:o,contentLabel:u.ag.get("block-user.dialog.title",n),isOpen:a,children:(0,lr.jsxs)("div",{className:vu,children:[(0,lr.jsx)(xo.D,{as:"h2",variant:"cello",className:fu,children:u.ag.get("block-user.dialog.title",n)}),(0,lr.jsx)(xo.D,{as:"p",variant:"mesto",className:yu,paddingBottom:uu.g4V,children:u.ag.get("block-user.dialog.description",n)}),(0,lr.jsxs)("div",{className:uo()("encore-light-theme",Su),children:[(0,lr.jsx)(mu.o,{buttonSize:mu.o.md,onClick:r,children:u.ag.get("block-user.dialog.cancel")}),(0,lr.jsx)(au.D,{onClick:s,buttonSize:au.D.md,children:u.ag.get("block-user.dialog.block")})]})]})})}));var _u=n(84828);const Nu="main-keyboardShortcutsHelpModal-container",Eu="main-keyboardShortcutsHelpModal-header",xu="main-keyboardShortcutsHelpModal-closeBtn",Cu="main-keyboardShortcutsHelpModal-sectionsContainer",wu="main-keyboardShortcutsHelpModal-sections",Iu="main-keyboardShortcutsHelpModal-sectionHeading",Tu="main-keyboardShortcutsHelpModal-sectionItem",Au="main-keyboardShortcutsHelpModal-sectionItemName",Pu="main-keyboardShortcutsHelpModal-key",Ou=e=>{switch(e){case"mod":return"macOS"===Z().getParser(window.navigator.userAgent).getOSName()?"⌘":"Ctrl";case"command":return"⌘";case"alt":return"macOS"===Z().getParser(window.navigator.userAgent).getOSName()?"⌥":"Alt";case"shift":case"ctrl":case"space":return e[0].toUpperCase()+e.slice(1);case"up":return"↑";case"right":return"→";case"down":return"↓";case"left":return"←";default:return e.toUpperCase()}},Du=(0,sr.memo)((function({children:e}){return(0,lr.jsx)(xo.D,{as:"kbd",variant:"ballad",className:Pu,children:Ou(e)})})),Ru=({combinations:e})=>(0,lr.jsx)(lr.Fragment,{children:e.map(((t,n)=>{const i=t.split("+");return(0,lr.jsxs)(sr.Fragment,{children:[i.map((e=>(0,lr.jsx)(Du,{children:e},e))),n(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(xo.D,{as:"h2",className:Iu,variant:"canon",children:t}),(0,lr.jsx)("ul",{children:e.map((e=>e.enabled?(0,lr.jsxs)("li",{className:Tu,children:[(0,lr.jsx)(xo.D,{variant:"ballad",className:Au,children:e.description}),(0,lr.jsx)(Ru,{combinations:_u.lb[e.action]})]},e.action):null))})]});var Fu=n(66685),ju=n.n(Fu),Mu=n(28170),Uu=n(66632);const Bu=e=>(t,n=!1)=>{let i,a=!1;return(...s)=>{i=s,a||(n||e.apply(e,s),a=!0,window.setTimeout((()=>{a=!1,n&&e.apply(e,i)}),t))}};var Vu=n(62890);function Hu(e,t){switch(t.type){case"OPEN":return{...e,isOpen:!0};case"CLOSE":return{...e,isOpen:!1};default:(0,fe.U)(t)}}const Gu=(0,sr.createContext)(void 0),Wu=({children:e})=>{const t=(0,sr.useReducer)(Hu,{isOpen:!1});return(0,lr.jsx)(Gu.Provider,{value:t,children:e})},zu=()=>{const e=(0,sr.useContext)(Gu);if(!e)throw new Error("useSearchModalDispatch must be used within SearchModalProvider");const[,t]=e;return t};var Ku=n(4050);const Yu=e=>(t,...n)=>{t.repeat||e(t,...n)},qu=({fill:e,width:t,height:n})=>(0,lr.jsxs)("svg",{width:t,height:n,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:[(0,lr.jsx)("title",{children:u.ag.get("close")}),(0,lr.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"})]});qu.defaultProps={fill:"#fff",width:32,height:32};const Zu=qu,Qu=(0,sr.memo)((function(){const e=(0,_u.X8)(),t=(0,$s.I0)(),n=(0,$s.v9)((e=>e.ui.keyboardShortcutsHelpModal.isOpen)),i=(0,sr.useCallback)((()=>{t((0,Qs.fW)(!1))}),[t]);(()=>{const e=(0,Qr.s0)(),t=(0,$s.I0)(),n=(0,$s.oR)(),i=(0,Ao.g)(),a=(0,Id.f)(),{createPlaylist:s}=(0,Mu.K)(),{shuffle:r,setShuffle:o,setRepeat:l,repeat:d}=ll(),{contextURI:m,playingURI:p,isPaused:g,canPause:h,canResume:k}=(0,vr.Y)((e=>({contextURI:e?.context.uri??null,playingURI:e?.item?.uri??"",isPaused:e?.isPaused,canPause:e?.restrictions.canPause,canResume:e?.restrictions.canResume})),il.V),{seekBackward:v,seekForward:f}=Ro(),y=(0,$s.v9)((e=>e.platform.isDesktop)),[S,b]=(0,Uu.Z)(p),{createFolder:_}=(0,Dc.lh)(),N=zu(),{show:E,hide:x,handle:C}=(0,Vu.C)(),w=!!C,I=(0,Xo.W6)(Ns.t$,{loadingValue:!1});(0,sr.useEffect)((()=>(ju().bind(_u.lb.OPEN_SEARCH_MODAL,Yu((e=>{N({type:"OPEN"}),e.preventDefault&&e.preventDefault()}))),()=>{ju().unbind(_u.lb.OPEN_SEARCH_MODAL)})),[N]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.OPEN_HELP,Yu((()=>{t(Qs.fW(!n.getState().ui.keyboardShortcutsHelpModal.isOpen))}))),()=>{ju().unbind(_u.lb.OPEN_HELP)})),[t,n]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.TOGGLE_PLAY,Yu((e=>{g&&k?i.resume():!g&&h&&i.pause(),e.preventDefault&&e.preventDefault()}))),()=>{ju().unbind(_u.lb.TOGGLE_PLAY)})),[h,k,g,i]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.LOG_OUT,Yu((()=>{t((0,Ku.Tz)())}))),()=>{ju().unbind(_u.lb.LOG_OUT)})),[t]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.OPEN_CONTEXT_MENU,Yu((()=>{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)}))),()=>{ju().unbind(_u.lb.OPEN_CONTEXT_MENU)})),[t]),(0,sr.useEffect)((()=>(y&&ju().bind(_u.lb.GO_BACKWARDS,Yu((()=>{e(-1)}))),()=>{ju().unbind(_u.lb.GO_BACKWARDS)})),[y,e]),(0,sr.useEffect)((()=>(y&&ju().bind(_u.lb.GO_FORWARDS,Yu((()=>{e(1)}))),()=>{ju().unbind(_u.lb.GO_FORWARDS)})),[y,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_HOME,Yu((()=>{e("/")}))),()=>{ju().unbind(_u.lb.GO_TO_HOME)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_PLAYLISTS,Yu((()=>{e("/collection/playlists")}))),()=>{ju().unbind(_u.lb.GO_TO_PLAYLISTS)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_PODCASTS,Yu((()=>{e("/collection/podcasts")}))),()=>{ju().unbind(_u.lb.GO_TO_PODCASTS)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_ARTISTS,Yu((()=>{e("/collection/artists")}))),()=>{ju().unbind(_u.lb.GO_TO_ARTISTS)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_ALBUMS,Yu((()=>{e("/collection/albums")}))),()=>{ju().unbind(_u.lb.GO_TO_ALBUMS)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_LIKED_SONGS,Yu((()=>{e("/collection/tracks")}))),()=>{ju().unbind(_u.lb.GO_TO_LIKED_SONGS)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_NOW_PLAYING,Yu((()=>{if(null!==m){const t=(0,c.EC)(m).toURLPath(!0);e(t)}}))),()=>{ju().unbind(_u.lb.GO_TO_NOW_PLAYING)})),[t,e,m]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_CHARTS,Yu((()=>{e("/genre/browse-charts-tab")}))),()=>{ju().unbind(_u.lb.GO_TO_CHARTS)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_SEARCH,Yu((()=>{e("/search",{state:{preventMoveFocus:!0}})}))),()=>{ju().unbind(_u.lb.GO_TO_SEARCH)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_MADE_FOR_YOU,Yu((()=>{e("/genre/made-for-x-hub")}))),()=>{ju().unbind(_u.lb.GO_TO_MADE_FOR_YOU)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_NEW_RELEASES,Yu((()=>{e("/genre/new-releases-page")}))),()=>{ju().unbind(_u.lb.GO_TO_NEW_RELEASES)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.GO_TO_QUEUE,Yu((()=>{e("/queue")}))),()=>{ju().unbind(_u.lb.GO_TO_QUEUE)})),[t,e]),(0,sr.useEffect)((()=>(ju().bind(_u.lb.LIKE_DISLIKE_SONG,Yu((()=>{b(!S)}))),()=>{ju().unbind(_u.lb.LIKE_DISLIKE_SONG)})),[t,p,S,b]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.CREATE_NEW_PLAYLIST,Yu((async()=>{await s()}))),()=>{ju().unbind(_u.lb.CREATE_NEW_PLAYLIST)})),[t,y,s]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.CREATE_NEW_FOLDER,Yu((()=>{_(u.ag.get("playlist.default_folder_name"),{before:"start"})}))),()=>{ju().unbind(_u.lb.CREATE_NEW_FOLDER)})),[_,t,y]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.SKIP_NEXT,Yu((()=>{i.skipToNext()}))),()=>{ju().unbind(_u.lb.SKIP_NEXT)})),[y,i]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.SKIP_PREVIOUS,Yu((()=>{i.skipToPrevious()}))),()=>{ju().unbind(_u.lb.SKIP_PREVIOUS)})),[y,i]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.RAISE_VOLUME,Bu((()=>{a.raiseVolume()}))(100)),()=>{ju().unbind(_u.lb.RAISE_VOLUME)})),[y,a,n]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.LOWER_VOLUME,Bu((()=>{a.lowerVolume()}))(100)),()=>{ju().unbind(_u.lb.LOWER_VOLUME)})),[y,a,n]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.SEEK_BACKWARD,Bu((()=>{v()}))(100)),()=>{ju().unbind(_u.lb.SEEK_BACKWARD)})),[t,y,n,i,v]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.SEEK_FORWARD,Bu((()=>{f()}))(100)),()=>{ju().unbind(_u.lb.SEEK_FORWARD)})),[t,y,n,i,f]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.SHUFFLE,Yu((()=>{o(!r)}))),()=>{ju().unbind(_u.lb.SHUFFLE)})),[t,y,n,r,o]),(0,sr.useEffect)((()=>(y||ju().bind(_u.lb.REPEAT,Yu((()=>{l((d+1)%3)}))),()=>{ju().unbind(_u.lb.REPEAT)})),[t,y,n,d,l]),(0,sr.useEffect)((()=>{I&&ju().bind(_u.lb.TOGGLE_DEBUG_WINDOW,Yu((()=>{w?x():E()})))}),[I,w,x,E])})();const a=e.employee.filter((e=>e.enabled));return(0,lr.jsx)(ku.Z,{isOpen:n,onRequestClose:i,contentLabel:u.ag.get("keyboard.shortcuts.help.heading"),children:(0,lr.jsxs)("div",{className:Nu,children:[(0,lr.jsxs)("div",{className:Eu,children:[(0,lr.jsx)(xo.D,{as:"h1",variant:"alto",children:u.ag.get("keyboard.shortcuts.help.heading")}),(0,lr.jsx)("button",{"aria-label":u.ag.get("close"),className:xu,onClick:i,children:(0,lr.jsx)(Zu,{width:18,height:18,fill:"currentColor"})}),(0,lr.jsxs)(xo.D,{variant:"ballad",as:"p",children:[u.ag.get("keyboard.shortcuts.help.subheading.press")," ",(0,lr.jsx)(Ru,{combinations:_u.lb.OPEN_HELP})," ",u.ag.get("keyboard.shortcuts.help.subheading.toToggle")]})]}),(0,lr.jsx)("div",{className:Cu,children:(0,lr.jsxs)("div",{className:wu,tabIndex:0,children:[(0,lr.jsx)(Lu,{shortcuts:e.basic,sectionTitle:u.ag.get("keyboard.shortcuts.section.basic")}),(0,lr.jsx)(Lu,{shortcuts:e.playback,sectionTitle:u.ag.get("keyboard.shortcuts.section.playback")}),(0,lr.jsx)(Lu,{shortcuts:e.navigation,sectionTitle:u.ag.get("keyboard.shortcuts.section.navigation")}),(0,lr.jsx)(Lu,{shortcuts:e.layout,sectionTitle:u.ag.get("keyboard.shortcuts.section.layout")}),a.length>0?(0,lr.jsx)(Lu,{shortcuts:a,sectionTitle:"Employee"}):null]})})]})})}));var Ju=n(51833),$u=n(97411),Xu=n(31070),em=n(95012),tm=n(50954);const nm="SHOW_BILLBOARD_AD_VIEW",im="HIDE_BILLBOARD_AD_VIEW",am="MINIMIZE_BILLBOARD_AD_VIEW",sm="CLICK_BILLBOARD_AD_VIEW",rm="IMAGE_LOADED_BILLBOARD_AD_VIEW",om="ERROR_BILLBOARD_AD_VIEW",lm="MANAGER_MINIMIZE_BILLBOARD_AD_VIEW",dm="FINISH_BILLBOARD_AD_VIEW",cm=()=>({type:dm}),um=()=>({type:im}),mm=e=>{const t=e?.item??void 0;return(0,he.k6)(t)},pm=e=>{const t=e?.item??void 0;return(0,he.k6)(t)&&"video"===t.mediaType},gm=e=>{const t=e?.item??void 0;return(0,he.k6)(t)&&"audio"===t.mediaType};function hm(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 km(e){return pm(e)}const vm="prod",fm=!1,ym="web-modal",Sm={pattern:"app:start",type:"CLIENT_EVENT"},bm={pattern:"app:deprecation:start",type:"CLIENT_EVENT"},_m={pattern:"app:deprecation:click",type:"CLIENT_EVENT"};let Nm=null;function Em(){return Nm}const xm=(e,t)=>n=>i=>a=>{const s=i(a),r=n.getState(),{dispatch:o}=n,{isAnonymous:l}=(0,hu.Gg)(r);let d="";function c(e){e&&o((0,Xu.gq)(e))}function m(e,t){const n=new li.K("quicksilver_message");let i=t;if(t)return n.setItem(e,t),t;const a=n.getItem(e);return a instanceof em.d||a instanceof tm.y||(i=a),i}if(l)return s;switch(a.type){case Qs.types.INITIALISE_QUICKSILVER:!function(e){Nm=(0,Ju.Of)((0,$u.k)().toPublic(),{actions:["DISMISS","URL","EXTERNAL_URL"],app:{platform:"WebPlayer",clientId:"65b708073fc0480ea92a077233ca87bd"},enableLogs:fm,formats:[ym],locale:u.ag.getLocale(),env:vm,triggerTypes:["URI","CLIENT_EVENT"]}),Nm.start(),Nm.on(Ju.FP.CONNECTED,(()=>{e((0,Xu.Gt)())}))}(o);break;case Qs.types.TRIGGER_CLICK_DEPRECATION_MESSAGE:Nm&&!km(t.getState())&&(d=hm(e.location.pathname),Nm.requestMessage({appUri:d,trigger:_m}).then((e=>m(bm.pattern,e))).then(c));break;case Xu.Hp.TRIGGER_APP_START_IN_APP_MESSAGE:Nm&&!km(t.getState())&&(Nm.requestMessage({appUri:"spotify:home",trigger:Sm}).then(c),r.session.productState?.["client-deprecated"]&&Nm.requestMessage({appUri:"spotify:home",trigger:bm}).then((e=>m(bm.pattern,e))).then(c));break;case Qs.types.UPDATE_UI_HISTORY_STATE:d=hm(e.location.pathname),Nm&&!km(t.getState())&&d&&Nm.requestMessage({appUri:d,trigger:{pattern:d,type:"URI"}}).then(c);break;case nm:o((0,Xu.b8)());break;case Xu.Hp.PREVIEW_IN_APP_MESSAGE:Nm&&a.creativeId&&Nm.previewMessage({appUri:a.appUri||"spotify:home",creativeId:a.creativeId}).then(c);break;case Xu.Hp.SET_IN_APP_MESSAGING_ENV:Nm&&Nm.setEnv(a.env);break;case Ku.y:Nm&&Nm.stop()}return s};function Cm(e,t){if(e){if(/^spotify:/.test(e)){t((0,c.EC)(e).toURLPath(!0))}else{const t=document.createElement("a");t.href=e,t.target="_blank",t.click()}}}const wm=(e,t)=>n=>{switch(n.action){case"DISMISS":default:return void e();case"URL":{const{url:i=""}=n;return Cm(i,t),void e()}case"EXTERNAL_URL":{const{url:e=""}=n;return void Cm(e,t)}}};function Im(e,t,n,i){if(e&&""===e.innerHTML){const a=function(e,t,n){const i=Em();if(i){const a=i.createIframe(e,n);return a.setAttribute("data-testid","inAppMessageIframe"),a.style.borderRadius="5px",a.style.margin="auto",a.style.opacity="0",a.style.transition="opacity 150ms linear",a.addEventListener("load",(()=>{const{contentWindow:e,contentDocument:n}=a;e&&function(e){e&&e.focus()}(e),n&&(Ms.setup(n),function(e,t){const n=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),i=n[0],a=n[n.length-1];e.addEventListener("keydown",(e=>{"Tab"===e.key&&e.target===a&&(e.preventDefault(),i.focus()),e.shiftKey&&"Tab"===e.key&&a.focus(),"Escape"!==e.key&&27!==e.keyCode||t()}),!0)}(n,t)),a.style.opacity="1"})),a}return null}(t,n,i);a&&e.appendChild(a)}}function Tm({message:e}){const t=(0,sr.useRef)(null);return function(e,t){const n=(0,$s.I0)(),i=(0,Qr.s0)(),a=(0,sr.useCallback)((()=>{n((0,Xu.b8)())}),[n]);(0,sr.useEffect)((()=>{const n=t.current;return Im(n,e,a,wm(a,i)),()=>{!function(e){e&&(e.innerHTML="")}(n)}}),[e,a,n,t,i])}(e,t),(0,lr.jsx)("div",{"":"inAppMessageContainer",ref:t})}function Am(){return(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(Pm,{})})}function Pm(){const e=(0,Xo.W6)(Ns.yi),{message:t,dismissMessage:n}=function(){const e=(0,$s.I0)();return{message:(0,$s.v9)((e=>e.inAppMessaging?.message)),dismissMessage:(0,sr.useCallback)((()=>{e((0,Xu.b8)())}),[e])}}(),i=!!t&&t.format===ym;return e?(0,lr.jsx)(ku.Z,{animated:!0,contentLabel:"In-App Message Modal",isOpen:i,onRequestClose:n,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!1,children:i&&!!t&&(0,lr.jsx)(Tm,{message:t})}):null}const Om={env:vm,message:null,showPreviewTool:!1},Dm=(e=Om,t)=>{switch(t.type){case Xu.Hp.SHOW_IN_APP_MESSAGE:return{...e,message:t.message};case Xu.Hp.DISMISS_IN_APP_MESSAGE:return{...e,message:null};case Xu.Hp.SET_IN_APP_MESSAGING_ENV:return{...e,env:t.env};case Xu.Hp.SHOW_PREVIEW_TOOL:return{...e,showPreviewTool:t.show};default:return e}};var Rm=n(83680),Lm=n(81926);const Fm="tJeH2W2to1A7d9tWBRoi",jm="oNjdJbGQ9ypf7KR0nYJW",Mm="ibrRlYShsgThsh8VNS8Q",Um="Yl9jzsnP8e_5i9me3h7H",Bm="vxBybZOmHdDF_nmLE4sa",Vm=(0,sr.memo)((function(){const e=(0,$s.I0)(),{isOpen:t}=(0,$s.v9)((e=>e.aboutRecs)),n=(0,sr.useCallback)((()=>{e((0,Lm.oT)())}),[e]),i=`https://about-recommendations.spotify.com/?bg=${uu.tGJ.substr(1)}&hideHeader=true`;return(0,lr.jsx)(ku.Z,{animated:!0,isOpen:t,onRequestClose:n,contentLabel:u.ag.get("context-menu.about-recommendations"),children:(0,lr.jsxs)("div",{className:Fm,children:[(0,lr.jsx)(xo.D,{as:"h1",variant:"alto",semanticColor:"textBase",className:jm,children:u.ag.get("context-menu.about-recommendations")}),(0,lr.jsx)("div",{className:Mm,children:(0,lr.jsx)("iframe",{className:Um,title:u.ag.get("context-menu.about-recommendations"),src:i})}),(0,lr.jsx)("button",{"aria-label":u.ag.get("close_button_action"),className:Bm,onClick:n,children:(0,lr.jsx)(Rm.k,{iconSize:24})})]})})})),Hm=(0,sr.lazy)((async()=>{const{AboutSpotifyModal:e}=await n.e(7994).then(n.bind(n,12767));return{default:e}})),Gm=(0,sr.lazy)((async()=>await n.e(7994).then(n.bind(n,59639))));function Wm(){return(0,lr.jsxs)(sr.Suspense,{fallback:null,children:[(0,lr.jsx)(Hm,{}),(0,lr.jsx)(Gm,{})]})}var zm=n(16364),Km=n(12050),Ym=n(54946),qm=n(63437),Zm=n(81022),Qm=n(72703),Jm=n(45991),$m=n(17652);function Xm(e){switch(e){case"Performers":return u.ag.get("track-credits.performers");case"Writers":return u.ag.get("track-credits.writers");case"Producers":return u.ag.get("track-credits.producers");default:return e}}function ep(e){switch(e){case"assistant recording engineer":return u.ag.get("track-credits.assistant-recording-engineer");case"engineer":return u.ag.get("track-credits.engineer");case"assistant engineer":return u.ag.get("track-credits.assistant-engineer");case"trumpet":return u.ag.get("track-credits.trumpet");case"guitar":return u.ag.get("track-credits.guitar");case"composer and lyricist":return u.ag.get("track-credits.composer-and-lyricist");case"associated performer":return u.ag.get("track-credits.associated-performer");case"background vocals":return u.ag.get("track-credits.background-vocals");case"bass":return u.ag.get("track-credits.bass");case"co-producer":return u.ag.get("track-credits.co-producer");case"additional engineer":return u.ag.get("track-credits.additional-engineer");case"masterer":return u.ag.get("track-credits.masterer");case"mixer":return u.ag.get("track-credits.mixer");case"recording engineer":return u.ag.get("track-credits.recording-engineer");case"accordion":return u.ag.get("track-credits.accordion");case"piano":return u.ag.get("track-credits.piano");case"organ":return u.ag.get("track-credits.organ");case"background vocal":return u.ag.get("track-credits.background-vocal");case"recorded by":return u.ag.get("track-credits.recorded-by");case"mixing engineer":return u.ag.get("track-credits.mixing-engineer");case"editor":return u.ag.get("track-credits.editor");case"fiddle":return u.ag.get("track-credits.fiddle");case"additional vocals":return u.ag.get("track-credits.additional-vocals");case"violin":return u.ag.get("track-credits.violin");case"viola":return u.ag.get("track-credits.viola");case"percussion":return u.ag.get("track-credits.percussion");case"mastering engineer":return u.ag.get("track-credits.mastering-engineer");case"composer":return u.ag.get("track-credits.composer");case"additional keyboards":return u.ag.get("track-credits.additional-keyboards");case"mix engineer":return u.ag.get("track-credits.mix-engineer");case"mandolin":return u.ag.get("track-credits.mandolin");case"acoustic guitar":return u.ag.get("track-credits.acoustic-guitar");case"keyboards":return u.ag.get("track-credits.keyboards");case"synthesizer":return u.ag.get("track-credits.synthesizer");case"drum programmer":return u.ag.get("track-credits.drum-programmer");case"programmer":return u.ag.get("track-credits.programmer");case"assistant mixer":return u.ag.get("track-credits.assistant-mixer");case"assistant mixing engineer":return u.ag.get("track-credits.assistant-mixing-engineer");case"digital editor":return u.ag.get("track-credits.digital-editor");case"drums":return u.ag.get("track-credits.drums");case"drum programming":return u.ag.get("track-credits.drum-programming");case"conga":return u.ag.get("track-credits.conga");case"samples":return u.ag.get("track-credits.samples");case"audio recording engineer":return u.ag.get("track-credits.audio-recording-engineer");case"audio additional mix engineer":return u.ag.get("track-credits.audio-additional-mix-engineer");case"recording":return u.ag.get("track-credits.recording");case"assistant producer":return u.ag.get("track-credits.assistant-producer");case"writer":return u.ag.get("track-credits.writer");case"strings":return u.ag.get("track-credits.strings");case"music publisher":return u.ag.get("track-credits.music-publisher");case"programming":return u.ag.get("track-credits.programming");case"music production":return u.ag.get("track-credits.music-production");case"background vocalist":return u.ag.get("track-credits.background-vocalist");case"producer":return u.ag.get("track-credits.producer");case"vocal":return u.ag.get("track-credits.vocal");case"songwriter":return u.ag.get("track-credits.songwriter");case"lyricist":return u.ag.get("track-credits.lyricist");case"additional mixer":return u.ag.get("track-credits.additional-mixer");case"upright bass":return u.ag.get("track-credits.upright-bass");case"clapping":return u.ag.get("track-credits.clapping");case"electric bass":return u.ag.get("track-credits.electric-bass");case"horn arranger":return u.ag.get("track-credits.horn-arranger");case"flugelhorn":return u.ag.get("track-credits.flugelhorn");case"second engineer":return u.ag.get("track-credits.second-engineer");case"rhythm guitar":return u.ag.get("track-credits.rhythm-guitar");case"bass guitar":return u.ag.get("track-credits.bass-guitar");case"electric guitar":return u.ag.get("track-credits.electric-guitar");case"dobro":return u.ag.get("track-credits.dobro");case"instruments":return u.ag.get("track-credits.instruments");case"vocal ensemble":return u.ag.get("track-credits.vocal-ensemble");case"recording arranger":return u.ag.get("track-credits.recording-arranger");case"arranger":return u.ag.get("track-credits.arranger");case"steel guitar":return u.ag.get("track-credits.steel-guitar");case"executive producer":return u.ag.get("track-credits.executive-producer");case"additional production":return u.ag.get("track-credits.additional-production");case"designer":return u.ag.get("track-credits.designer");case"assistant mix engineer":return u.ag.get("track-credits.assistant-mix-engineer");case"studio musician":return u.ag.get("track-credits.studio-musician");case"voice performer":return u.ag.get("track-credits.voice-performer");case"orchestra":return u.ag.get("track-credits.orchestra");case"chamber ensemble":return u.ag.get("track-credits.chamber-ensemble");case"additional percussion":return u.ag.get("track-credits.additional-percussion");case"cajon":return u.ag.get("track-credits.cajon");case"miscellaneous production":return u.ag.get("track-credits.miscellaneous-production");case"backing vocals":return u.ag.get("track-credits.backing-vocals");case"pedal steel":return u.ag.get("track-credits.pedal-steel");case"additional producer":return u.ag.get("track-credits.additional-producer");case"keyboard arrangements":return u.ag.get("track-credits.keyboards-arrangements");case"saxophone":return u.ag.get("track-credits.saxophone");case"sound engineer":return u.ag.get("track-credits.sound-engineer");case"assistant remix engineer":return u.ag.get("track-credits.assistant-remix-engineer");case"double bass":return u.ag.get("track-credits.double-bass");case"co-writer":return u.ag.get("track-credits.co-writer");case"pro tools":return u.ag.get("track-credits.pro-tools");case"tape realization":return u.ag.get("track-credits.tape-realization");case"ambient sounds":return u.ag.get("track-credits.ambient-sounds");case"sound effects":return u.ag.get("track-credits.sound-effects");case"harp":return u.ag.get("track-credits.harp");case"cymbals":return u.ag.get("track-credits.cymbals");case"vocal engineer":return u.ag.get("track-credits.vocal-engineer");case"mellotron":return u.ag.get("track-credits.mellotron");case"recorder":return u.ag.get("track-credits.recorder");case"main artist":return u.ag.get("track-credits.main-artist");case"production":return u.ag.get("track-credits.production");case"artist":return u.ag.get("track-credits.artist");case"vocals":return u.ag.get("track-credits.vocals");case"featuring":return u.ag.get("track-credits.featuring");case"featured artist":return u.ag.get("track-credits.featured-artist");case"work arranger":return u.ag.get("track-credits.work-arranger");case"mixing engineers":return u.ag.get("track-credits.mixing-engineers");case"re-mixer":return u.ag.get("track-credits.re-mixer");case"recording producer":return u.ag.get("track-credits.recording-producer");case"co-mixer":return u.ag.get("track-credits.co-mixer");case"bells":return u.ag.get("track-credits.bells");case"pro tools editing":return u.ag.get("track-credits.pro-tools-editing");case"vibraphone":return u.ag.get("track-credits.vibraphone");case"additional recording":return u.ag.get("track-credits.additional-recording");case"vocal producer":return u.ag.get("track-credits.vocal-producer");case"sitar":return u.ag.get("track-credits.sitar");case"cello":return u.ag.get("track-credits.cello");case"flute":return u.ag.get("track-credits.flute");case"horn":return u.ag.get("track-credits.horn");case"brass band":return u.ag.get("track-credits.brass-band");case"programming and keyboards":return u.ag.get("track-credits.programming-and-keyboards");case"all instruments":return u.ag.get("track-credits.all-instruments");case"programmed and arranged by":return u.ag.get("track-credits.programmed-and-arranged-by");case"additional programmer":return u.ag.get("track-credits.additional-programmer");case"recording and mixing":return u.ag.get("track-credits.recording-and-mixing");case"engineer and mixer":return u.ag.get("track-credits.engineer-and-mixer");case"vocal arranger":return u.ag.get("track-credits.vocal-arranger");case"income participant":return u.ag.get("track-credits.income-participant");default:return e}}const tp="main-trackCreditsModal-container",np="main-trackCreditsModal-header",ip="main-trackCreditsModal-closeBtn",ap="main-trackCreditsModal-mainSection",sp="main-trackCreditsModal-originalCredits",rp="main-trackCreditsModal-sectionTitle",op="main-trackCreditsModal-creditsGroup",lp="main-trackCreditsModal-creditsEntry",dp="main-trackCreditsModal-clickableCreditsEntry",cp="main-trackCreditsModal-sourceNames",up="main-trackCreditsModal-additionalCredits",mp=(0,sr.memo)((function(){const e=(0,$s.I0)(),{isOpen:t,trackUri:n}=(0,$s.v9)((e=>e.ui.trackCreditsModal)),i=n.split(":"),a=i[i.length-1],{data:s,error:r,loading:o}=(0,$m.J)(hs.pH.V,[a]),l=(0,sr.useCallback)((()=>{e((0,Qs.Pd)(!1,""))}),[e]),d=(0,el.s4)(),{isAnonymous:c}=(0,$s.v9)(hu.Gg),{spec:m,logger:p}=(0,Lo.fU)(Jm.createTrackCreditsEventFactory,{data:{uri:n}});return(0,lr.jsx)(ku.Z,{contentLabel:u.ag.get("track-credits.label"),isOpen:t,onRequestClose:l,children:!o&&!r&&s&&(0,lr.jsxs)("div",{className:tp,children:[(0,lr.jsxs)("div",{className:np,children:[(0,lr.jsx)(xo.D,{as:"h1",variant:"alto",children:u.ag.get("track-credits.label")}),(0,lr.jsx)("button",{"aria-label":u.ag.get("close"),className:ip,onClick:l,children:(0,lr.jsx)(Zu,{width:18,height:18,fill:"white"})})]}),(0,lr.jsxs)("div",{className:ap,onScroll:c?()=>d.send((0,Qm.W)({track_uri:n})):()=>d.send((0,Zm.d)({track_uri:n})),children:[(0,lr.jsxs)("div",{className:sp,children:[(0,lr.jsx)(xo.D,{as:"h2",className:rp,variant:"cello",children:s.body.trackTitle}),s.body.roleCredits.map((e=>{const t=m.creditSectionFactory({identifier:e.roleTitle});return(0,lr.jsxs)("div",{className:op,children:[(0,lr.jsx)(xo.D,{as:"p",variant:"mestoBold",children:Xm(e.roleTitle)}),e.artists.length>0?e.artists.map((({name:i,externalUrl:a})=>a?(0,lr.jsx)("a",{href:a,draggable:!1,rel:"noopener noreferrer",onClick:()=>{const s=t.artistNameFactory({identifier:i}).hitNavigateToExternalUri({destination:a});p.logInteraction(s),c?d.send((0,qm.d)({track_uri:n,clickable_text:i,role:e.roleTitle,external_url:a})):d.send((0,Ym.x)({track_uri:n,clickable_text:i,role:e.roleTitle,external_url:a}))},target:"_blank",className:dp,children:i},i):(0,lr.jsx)(xo.D,{className:lp,variant:"mesto",semanticColor:"textSubdued",children:i},i))):"-"]},e.roleTitle)})),(0,lr.jsxs)(xo.D,{as:"p",variant:"mesto",children:[u.ag.get("track-credits.source"),":"," ",s.body.sourceNames.join(u.ag.getSeparator())]})]}),s.body.extendedCredits&&s.body.extendedCredits.length>0&&(0,lr.jsxs)("div",{className:up,children:[(0,lr.jsx)(xo.D,{as:"h3",className:rp,variant:"balladBold",children:u.ag.get("track-credits.additional-credits")}),s.body.extendedCredits.map((e=>(0,lr.jsxs)("div",{className:op,children:[(0,lr.jsx)(xo.D,{as:"p",variant:"mestoBold",children:ep(e.roleTitle.toLowerCase())}),e.artists.map((t=>(0,lr.jsx)("a",{href:t.url,draggable:!1,rel:"noopener noreferrer",onClick:()=>{c?d.send((0,Km.Y)({track_uri:n,clickable_text:t.name,role:e.roleTitle,external_url:t.url})):d.send((0,zm.v)({track_uri:n,clickable_text:t.name,role:e.roleTitle,external_url:t.url}))},target:"_blank",className:dp,children:t.name},t.name)))]},e.roleTitle))),(0,lr.jsxs)(xo.D,{as:"p",variant:"mesto",className:cp,semanticColor:"textSubdued",children:[u.ag.get("track-credits.source"),":"," ",(0,lr.jsx)("a",{draggable:!1,rel:"noopener noreferrer",target:"_blank",href:"https://soundbetter.com",children:"SoundBetter"})]})]})]})]})})}));function pp(){const e=(0,Xo.W6)(Ns.Mm),t=(0,$s.I0)();return(0,sr.useEffect)((()=>{e&&t((0,Xu.q1)("dev"))}),[e,t]),null}function gp(){const e=(0,Xo.W6)(Ns.rG),t=(0,$s.I0)();return(0,sr.useEffect)((()=>{t((0,Xu.Yk)(e))}),[e,t]),null}function hp(){return(0,lr.jsxs)(sr.Suspense,{fallback:null,children:[(0,lr.jsx)(pp,{}),(0,lr.jsx)(gp,{})]})}var kp=n(11216),vp=n(61478),fp=n(86307),yp=n(69812);const Sp="main-playlistEditDetailsModal-container",bp="main-playlistEditDetailsModal-content",_p="main-playlistEditDetailsModal-header",Np="main-playlistEditDetailsModal-closeBtn",Ep="main-playlistEditDetailsModal-albumCover",xp="main-playlistEditDetailsModal-imageLoadingContainer",Cp="main-playlistEditDetailsModal-imageChangeButton",wp="main-playlistEditDetailsModal-imageDropDownContainer",Ip="main-playlistEditDetailsModal-imageDropDownButton",Tp="main-playlistEditDetailsModal-textElement",Ap="main-playlistEditDetailsModal-textElementError",Pp="main-playlistEditDetailsModal-textElementInfo",Op="main-playlistEditDetailsModal-title",Dp="main-playlistEditDetailsModal-textElementLabel",Rp="main-playlistEditDetailsModal-description",Lp="main-playlistEditDetailsModal-titleInput",Fp="main-playlistEditDetailsModal-titleInputWithPadding",jp="main-playlistEditDetailsModal-descriptionTextarea",Mp="main-playlistEditDetailsModal-save",Up="main-playlistEditDetailsModal-disclaimer",Bp="main-playlistEditDetailsModal-characterCounter",Vp="main-playlistEditDetailsModal-titleCharacterCounter",Hp="main-playlistEditDetailsModal-descriptionCharacterCounter",Gp="main-playlistEditDetailsModal-insertLinkButton",Wp=({openImagePicker:e,onRemoveImage:t})=>(0,lr.jsx)("div",{className:wp,children:(0,lr.jsx)(yp.y,{menu:(0,lr.jsxs)(gd.v,{children:[(0,lr.jsx)(kd.s,{role:"menuitem",onClick:e,children:u.ag.get("playlist.edit-details.change-photo")}),(0,lr.jsx)(kd.s,{role:"menuitem",onClick:t,children:u.ag.get("playlist.edit-details.remove-photo")})]}),children:(0,lr.jsxs)("button",{className:Ip,type:"button",children:[(0,lr.jsx)(fp.N,{iconSize:16,"aria-hidden":"true"}),(0,lr.jsx)("span",{className:"hidden-visually",children:u.ag.get("edit_photo")})]})})});var zp=n(77156);const Kp=({onClick:e})=>(0,lr.jsx)("button",{title:"Insert link",className:Gp,onClick:e,children:(0,lr.jsx)(zp.v,{iconSize:16,"aria-hidden":"true"})});var Yp=n(46731),qp=n.n(Yp);const Zp=({className:e,usedCharacters:t,maxCharacters:n,isVisible:i=!0})=>{const a=n-t,{ariaLive:s,ariaAtomic:r}=function(e){let t,n;return e<=20?(t="assertive",n=!0):e<=60?(t="polite",n=!1):e<=70?(t="polite",n=!0):(t="off",n=!0),{ariaLive:t,ariaAtomic:n}}(a);return(0,lr.jsx)("span",{className:uo()(Bp,e,{"hidden-visually":!i}),"aria-label":u.ag.get("character-counter"),"aria-live":s,"aria-atomic":r,children:`${t}/${n}`})},Qp=(0,sr.forwardRef)((function({autoFocus:e,handleOnChange:t,playlistDescription:n,maxNumCharacters:i=300},a){const s=(0,sr.useMemo)((()=>`text-input-${(0,Ea.qd)(8)}`),[]),r=i-20,[o,l]=(0,sr.useState)(!1),d=qp()(n).length;return(0,sr.useEffect)((()=>{e&&"function"!=typeof a&&a?.current?.select()}),[e,a]),(0,lr.jsxs)("div",{className:Rp,children:[(0,lr.jsx)(xo.D,{htmlFor:s,as:"label",variant:"finaleBold",className:Dp,children:u.ag.get("playlist.edit-details.description-label")}),(0,lr.jsx)("textarea",{ref:a,"":"playlist-edit-details-description-input",autoFocus:e,className:uo()(Tp,jp,{[Pp]:o}),onChange:e=>{const n=t(qp()(e.target.value).slice(0,i).join(""));l(!!n)},placeholder:u.ag.get("playlist.edit-details.description-placeholder"),value:n}),(0,lr.jsx)(Zp,{className:Hp,maxCharacters:i,usedCharacters:d,isVisible:d>=r})]})}));var Jp=function(e){return e.CONTAINS_NEW_LINE="CONTAINS_NEW_LINE",e.CONTAINS_HTML="CONTAINS_HTML",e.SAVE_WARNING="SAVE_WARNING",e.OFFLINE_WARNING="OFFLINE_WARNING",e.FILE_TOO_BIG="FILE_TOO_BIG",e.IMAGE_TOO_SMALL="IMAGE_TOO_SMALL",e.IMAGE_FILE_UPLOAD_FAILED="IMAGE_FILE_UPLOAD_FAILED",e.NAME_REQUIRED="NAME_REQUIRED",e.UPDATE_DETAILS_FAILED="UPDATE_DETAILS_FAILED",e.IMAGE_INVALID_JPG="IMAGE_INVALID_JPG",e}(Jp||{});const $p={type:"info",code:Jp.CONTAINS_NEW_LINE,get message(){return u.ag.get("playlist.edit-details.error.description-breaks")}},Xp={type:"info",code:Jp.CONTAINS_HTML,get message(){return u.ag.get("playlist.edit-details.error.invalid-html")}},eg={type:"info",code:Jp.SAVE_WARNING,get message(){return u.ag.get("playlist.edit-details.error.unsaved-changes")}},tg={type:"info",code:Jp.OFFLINE_WARNING,get message(){return u.ag.get("playlist.edit-details.error.no-internet")}},ng={type:"error",code:Jp.FILE_TOO_BIG,get message(){return u.ag.get("playlist.edit-details.error.file-size-exceeded",10)}},ig={type:"error",code:Jp.IMAGE_TOO_SMALL,get message(){return u.ag.get("playlist.edit-details.error.too-small",300,300)}},ag={type:"error",code:Jp.IMAGE_FILE_UPLOAD_FAILED,get message(){return u.ag.get("playlist.edit-details.error.file-upload-failed")}},sg={type:"error",code:Jp.NAME_REQUIRED,get message(){return u.ag.get("playlist.edit-details.error.missing-name")}},rg={type:"error",code:Jp.UPDATE_DETAILS_FAILED,get message(){return u.ag.get("playlist.edit-details.error.failed-to-save")}},og=({autoFocus:e,handleOnChange:t,maxNumCharacters:n=100,playlistName:i,onSubmit:a})=>{const[s,r]=(0,sr.useState)(!1),o=(0,sr.useMemo)((()=>`text-input-${(0,Ea.qd)(8)}`),[]),l=n-10,d=qp()(i).length,c=d>=l,m=(0,sr.useRef)(null);return(0,sr.useEffect)((()=>{e&&m.current?.select()}),[e]),(0,lr.jsxs)("div",{className:Op,children:[(0,lr.jsx)(xo.D,{as:"label",htmlFor:o,variant:"finaleBold",className:Dp,children:u.ag.get("playlist.edit-details.name-label")}),(0,lr.jsx)("input",{"":"playlist-edit-details-name-input",id:o,autoFocus:e,ref:m,type:"text",className:uo()(Tp,Lp,{[Fp]:c,[Ap]:s}),onKeyDown:e=>{"Enter"===e.key&&a()},onChange:e=>{const i=t(qp()(e.target.value).slice(0,n).join(""));r(!!i)},placeholder:u.ag.get("playlist.edit-details.name-placeholder"),value:i}),(0,lr.jsx)(Zp,{isVisible:c,maxCharacters:n,usedCharacters:d,className:Vp})]})};var lg=n(41226);const dg={name:"",description:"",image:void 0,loading:!1,message:null,hasWarnedAboutUnsavedChanges:!1};function cg(e){return{type:"setPlaylistDescription",data:e}}function ug(e){return{type:"setLoading",data:e}}function mg(e){return{type:"setMessage",data:e}}function pg(e,t){switch(t.type){case"setImageData":return{...e,loading:!1,image:{width:lg.eM.SMALL,height:lg.eM.SMALL,url:t.data}};case"removeImage":return{...e,loading:!1,imageToken:null,image:void 0};case"setImageToken":return{...e,imageToken:t.data};case"setPlaylistName":return{...e,name:t.data};case"setPlaylistDescription":return{...e,description:t.data};case"setLoading":return{...e,loading:t.data,message:null};case"setHasWarnedAboutUnsavedChanges":return{...e,hasWarnedAboutUnsavedChanges:t.data};case"setMessage":return{...e,loading:!1,message:t.data};case"reset":return{...dg,name:t.data.name,description:t.data.description,image:t.data.image};default:return e}}var gg=n(32812),hg=n(78297),kg=n(90500);const vg=/[\b\f\n\r\t\v\0]/,fg=/<[bi]/i,yg=({isOpen:e,isImagePickerOpen:t,focusedElement:n,name:i,description:a,image:s,uri:r,onClose:o})=>{a=(e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value})(a);const{uploadImage:l,updateDetails:d}=(0,Dc.Yv)(r),[m,p]=function({name:e,description:t,image:n}){const[i,a]=(0,sr.useReducer)(pg,{...dg,name:e,description:t,image:n});return[i,a]}({name:i,description:a,image:s}),[g,h]=(0,vp.Hs)(),k=!(0,gg.k)(),v=(0,sr.useRef)(null),f=(0,$s.v9)((e=>"1"===e.session.productState?.["playlist-annotations-markup"]));(0,sr.useEffect)((()=>{p(mg(k?tg:null))}),[k,p]),(0,sr.useEffect)((()=>{t&&h()}),[t,h]);const y=(0,sr.useCallback)((()=>{p({type:"removeImage"})}),[p]),S=(e=!1)=>{const t=null===m.imageToken,n=m.imageToken;!(i!==m.name||a!==m.description||n||t)||m.hasWarnedAboutUnsavedChanges||e?(p(function(e){return{type:"reset",data:e}}({name:i,description:a,image:s})),o()):(p(mg(eg)),p({type:"setHasWarnedAboutUnsavedChanges",data:!0}))};async function b(){if(!m.loading)if(0!==m.name.length){p(ug(!0));try{await async function(){const e={};i!==m.name&&(e.name=m.name);a!==m.description&&(e.description=m.description);m.imageToken?e.imageUploadToken=await m.imageToken:null===m.imageToken&&(e.imageUploadToken=m.imageToken);await d(e)}(),p(ug(!1));S(!0)}catch{p(mg(rg))}}else p(mg(sg))}return(0,lr.jsx)(ku.Z,{isOpen:e,onRequestClose:()=>{S()},contentLabel:u.ag.get("playlist.edit-details.title"),children:(0,lr.jsxs)("div",{"":"playlist-edit-details-modal",className:Sp,children:[(0,lr.jsxs)("div",{className:_p,children:[(0,lr.jsx)(xo.D,{as:"h1",variant:"canon",children:u.ag.get("playlist.edit-details.title")}),(0,lr.jsx)("button",{className:Np,onClick:()=>{S()},children:(0,lr.jsx)(Rm.k,{iconSize:16,"aria-label":u.ag.get("close")})})]}),m.message&&(0,lr.jsx)(kg.X,{isErrorMessage:"error"===m.message.type,message:m.message.message}),f?(0,lr.jsx)(Kp,{onClick:function(){if(!v.current)return;const{selectionStart:e,selectionEnd:t}=v.current,n=m.description.substring(e,t);let i=n;const a=!!(0,c.EC)(i);!i.startsWith("http://")&&!i.startsWith("https://")&&!a&&(i=`https://${i}`),p(cg([m.description.substring(0,e),`${n}`,m.description.substring(t)].join("")))}}):null,(0,lr.jsxs)("div",{className:bp,children:[(0,lr.jsx)(vp.uL,{isOpen:g,minImageWidth:300,minImageHeight:300,maxFileSizeMB:10,onChange:async function(e){if(!e)return;const{imageFile:t,imageDataUrl:n}=e;if(p(mg(null)),p({type:"setImageData",data:n}),t)try{const e=l(t);p({type:"setImageToken",data:e}),await e}catch{p(mg(ag))}},onError:e=>{e===vp.Hy.FILE_TOO_BIG?p(mg(ng)):e===vp.Hy.IMAGE_TOO_SMALL&&p(mg(ig))}}),(0,lr.jsxs)("div",{className:Ep,children:[(0,lr.jsx)(lg.Oe,{loading:"eager",name:m.name,images:m.image?[m.image]:[],placeholderType:"playlist"}),(0,lr.jsx)("div",{className:Cp,children:(0,lr.jsx)(hg.F,{overlay:!!m.image,onClick:h})}),(0,lr.jsx)(Wp,{onRemoveImage:y,openImagePicker:h}),!!m.imageToken&&m.loading&&(0,lr.jsx)("div",{className:xp,children:(0,lr.jsx)(kp.T,{})})]}),(0,lr.jsx)(og,{autoFocus:n===ro.w.TITLE,handleOnChange:e=>(p({type:"setPlaylistName",data:e}),0===e.length?(p(mg(sg)),sg):(p(mg(null)),null)),playlistName:m.name,onSubmit:b}),(0,lr.jsx)(Qp,{ref:v,autoFocus:n===ro.w.DESCRIPTION,handleOnChange:e=>{let t=e;return fg.test(t)?(p(mg(Xp)),Xp):vg.test(t)?(t=(e||"").replace(vg,""),p(mg($p)),$p):(p(cg(t)),null)},playlistDescription:m.description}),(0,lr.jsx)("div",{className:Mp,children:(0,lr.jsx)(au.D,{colorSet:"invertedLight",onClick:b,disabled:m.loading,"":"playlist-edit-details-save-button",children:u.ag.get("save")})}),(0,lr.jsx)(xo.D,{as:"p",variant:"finaleBold",className:Up,children:u.ag.get("image-upload.legal-disclaimer")})]})]})})},Sg=()=>{const{isOpen:e,isImagePickerOpen:t,playlistDetails:n,focusedElement:i}=(0,sr.useContext)(ro._U),a=(0,sr.useContext)(ro.zy),s=(0,sr.useCallback)((()=>{a({type:"close"})}),[a]),{name:r,description:o,uri:l,image:d}=n;return e?(0,lr.jsx)(yg,{isOpen:e,isImagePickerOpen:t,onClose:s,focusedElement:i,uri:l,name:r,description:o,image:d}):null};var bg=n(48142),_g=n(66490),Ng=n(68896),Eg=n(71017);const xg={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 Cg(e,t){var n;n=Object.values(xg),document.documentElement.classList.remove(...n);const i=[];"Microsoft Edge"===Z().parse(window.navigator.userAgent).browser.name?i.push(xg.BROWSER_EDGE):(0,rr.G)()&&i.push(xg.BROWSER_SAFARI),t===g.U.macOS?i.push(xg.OS_MACOS):t===g.U.Windows?i.push(xg.OS_WINDOWS):t===g.U.Linux?i.push(xg.OS_LINUX):t===g.U.ChromeOS&&i.push(xg.OS_CHROMEOS),e===g.W.Desktop?i.push(xg.CONTAINER_DESKTOP):e===g.W.PWA?i.push(xg.CONTAINER_PWA):e===g.W.Web&&i.push(xg.CONTAINER_WEB),function(e){e.forEach((e=>{document.documentElement.classList.add(e)}))}(i)}const wg=()=>{const e=(0,Qr.s0)(),t=(0,$s.I0)(),n=(0,Qr.TH)(),i=(0,$s.v9)((e=>e.ui.history.canGoBack)),a=(0,$s.v9)((e=>e.ui.history.canGoForward)),{createPlaylist:s}=(0,Mu.K)(),{openURL:r,openURLWithSessionTransfer:o}=(0,_g.e)(),{spec:l,logger:d}=(0,Lo.fU)(bg.w,{data:{uri:(0,c.EC)(n.pathname)?.toURI()??""},parentAbsoluteLocation:{locations:[]}});return(0,m.eY)(m.O4.CREATE_NEW_PLAYLIST,(async()=>{await s()})),(0,m.eY)(m.O4.BROWSE_BACKWARD,(()=>{i&&e(-1)})),(0,m.eY)(m.O4.BROWSE_FORWARD,(()=>{a&&e(1)})),(0,m.eY)(m.O4.LOGOUT,(()=>{t((0,Ku.Tz)())})),(0,m.eY)(m.O4.SHOW_ABOUT,(()=>{t((0,Ng.GV)())})),(0,m.eY)(m.O4.SHOW_PREFERENCES,(()=>{e("/preferences")})),(0,m.eY)(m.O4.SHOW_SEARCH,(()=>{/\/search(\/.*|)$/.test(n.pathname)||e("/search",{state:{preventMoveFocus:!0}})})),(0,m.eY)(m.O4.SHOW_ACCOUNT,(()=>{o("https://spotify.com/account/overview/")})),(0,m.eY)(m.O4.SHOW_COMMUNITY,(()=>{o("https://community.spotify.com/")})),(0,m.eY)(m.O4.SHOW_HELP,(()=>{o("https://support.spotify.com/")})),(0,m.eY)(m.O4.SHOW_LICENSES,(()=>{t((0,Eg.qd)())})),(0,m.eY)(m.O4.SHOW_LICENSING_INFORMATION,(()=>{r("https://www.spotify.com/int/legal/licensing-info/")})),(0,m.eY)(m.O4.SHOW_SCTA_INFORMATION,(()=>{r("https://www.spotify.com/int/legal/specified-commercial-transactions")})),(0,m.eY)(m.O4.ENTER_FULLSCREEN,(()=>{d.logInteraction(l.fullscreenButtonFactory().hitUiReveal()),t((0,Qs.rM)())})),(0,m.eY)(m.O4.LEAVE_FULLSCREEN,(()=>{d.logInteraction(l.fullscreenButtonFactory().hitUiHide()),t((0,Qs.Xo)())})),(0,m.eY)(m.O4.SET_PLATFORM_EMULATION_AUTO,(()=>{Cg((0,p.ZO)(),(0,Y.L)())})),(0,m.eY)(m.O4.SET_PLATFORM_EMULATION_MACOS,(()=>{Cg((0,p.ZO)(),g.U.macOS)})),(0,m.eY)(m.O4.SET_PLATFORM_EMULATION_WINDOWS,(()=>{Cg((0,p.ZO)(),g.U.Windows)})),(0,m.eY)(m.O4.SET_PLATFORM_EMULATION_LINUX,(()=>{Cg((0,p.ZO)(),g.U.Linux)})),null};var Ig=n(98117),Tg=(n(8049),n(4174)),Ag=n(27913),Pg=n(80657);const Og=e=>{e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()},Dg=()=>{document.fullscreenElement&&document.exitFullscreen?document.exitFullscreen():document.mozFullScreen&&document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitIsFullScreen&&document.webkitExitFullscreen&&document.webkitExitFullscreen()},Rg=()=>!!(document.fullscreenElement||document.webkitIsFullScreen||document.mozFullScreen);var Lg=n(56180);const Fg=sr.createContext(null),jg=({children:e})=>{const t=(0,sr.useRef)(null);return(0,lr.jsx)(Fg.Provider,{value:t,children:e})};var Mg=n(11101),Ug=n(50300);const Bg="Psc33HXPyazZYAAr1tgz",Vg="VGJz_GOARJ6j02JICvW6",Hg="VpNHGG5ZhoxQ8AqW709S",Gg="P7395UzhjxLUlLZvj5fb",Wg=function(e){const{children:t,active:n=!1,focus:i=!0,label:a,onClick:s,noBackground:r=!1}=e;return(0,lr.jsx)(nl._,{label:a,children:(0,lr.jsx)("button",{className:uo()(Bg,{[Gg]:n,[Vg]:r,[Hg]:i}),onClick:s,"aria-label":a,children:t})})};var zg=n(35800),Kg=n(69718),Yg=n(96901),qg=n(20458);const Zg=e=>e.ui.videoPlayer.hiddenByUser,Qg=e=>e.ui.videoPlayer.mode,Jg="MBzbwWcyfbqSftBtnn3g",$g=({noBackground:e,iconSize:t=16})=>{const n=(0,$s.I0)(),i=(0,Kg.m)(),a=(0,$s.v9)(Qg)===Yg.B.cinema;return(0,vr.Y)(Lg.CM)?(0,lr.jsx)("div",{className:uo()({[Jg]:a}),children:(0,lr.jsx)(Wg,{noBackground:e,active:a,label:a?u.ag.get("video-player.default-view"):u.ag.get("video-player.cinema-mode"),onClick:()=>{Rg()&&Dg(),a?i===zg.s.NowPlayingView?n((0,qg.Bl)(Yg.B.npv)):n((0,qg.Bl)(Yg.B.mini)):n((0,qg.Bl)(Yg.B.cinema))},children:a?(0,lr.jsx)(Mg.o,{iconSize:t}):(0,lr.jsx)(Ug.S,{iconSize:t})})}):null};var Xg=n(66766);const eh=ct.d.SUBTITLE_LANGUAGES_CHANGED;var th=n(98340);const nh="-x-cc",ih=({languages:e=[],activeLanguage:t,onSelectLanguage:n,onClose:i})=>{const a=(0,Xo.W6)(Ns.tc);return(0,lr.jsx)(th.ZP,{value:"subtitles",children:(0,lr.jsxs)(gd.v,{onClose:i,getInitialFocusElement:e=>e?e.querySelector('[aria-checked="true"]'):null,children:[(0,lr.jsx)(hd.F,{divider:"after",children:u.ag.get("subtitles-picker.heading")}),(0,lr.jsx)(kd.s,{onClick:()=>{n(null)},"aria-checked":!t,role:"menuitemradio",children:u.ag.get("subtitles-picker.option_off")}),e.map((e=>(0,lr.jsxs)(kd.s,{onClick:()=>{n(e)},role:"menuitemradio","aria-checked":"string"==typeof t&&e.toLowerCase()===t.toLowerCase(),children:[ah(e)," ",a?`(${u.ag.get("subtitles-picker.autogenerated")})`:null]},e)))]})})};function ah(e){const[t]=e.toLowerCase().split("-");let n="";switch(t){case"zh":n=u.ag.get("subtitles-picker.option_zh");break;case"cs":n=u.ag.get("subtitles-picker.option_cs");break;case"nl":n=u.ag.get("subtitles-picker.option_nl");break;case"en":n=u.ag.get("subtitles-picker.option_en");break;case"fi":n=u.ag.get("subtitles-picker.option_fi");break;case"fr":n=u.ag.get("subtitles-picker.option_fr");break;case"de":n=u.ag.get("subtitles-picker.option_de");break;case"el":n=u.ag.get("subtitles-picker.option_el");break;case"hu":n=u.ag.get("subtitles-picker.option_hu");break;case"id":n=u.ag.get("subtitles-picker.option_id");break;case"it":n=u.ag.get("subtitles-picker.option_it");break;case"ja":n=u.ag.get("subtitles-picker.option_ja");break;case"ms":n=u.ag.get("subtitles-picker.option_ms");break;case"pl":n=u.ag.get("subtitles-picker.option_pl");break;case"pt":n=u.ag.get("subtitles-picker.option_pt");break;case"es":n=u.ag.get("subtitles-picker.option_es");break;case"sv":n=u.ag.get("subtitles-picker.option_sv");break;case"tr":n=u.ag.get("subtitles-picker.option_tr");break;case"vi":n=u.ag.get("subtitles-picker.option_vi");break;default:n=e}return e.endsWith(nh)&&(n+=" [CC]"),n}const sh=e=>(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(ih,{...e})}),rh=sr.memo((function({renderInline:e=!1,noBackground:t,iconSize:n=16}){const{isSupported:i,availableLanguages:a,preferredLanguage:s,setPreferredLanguage:r}=function(){const e=Sc(),t=e.getCapabilities(),[n,i]=(0,sr.useState)([]),[a,s]=(0,sr.useState)(null);return(0,sr.useEffect)((()=>{(async()=>{i(await e.getSubtitleLanguages())})();const t=e.getEvents(),n=({data:e})=>i(e);return t.addListener(eh,n),()=>{t.removeListener(eh,n)}}),[e,i]),(0,sr.useEffect)((()=>{(async()=>{s(await e.getPreferredSubtitleLanguage())})()}),[e,s]),{isSupported:t.hasSubtitleSupport,availableLanguages:n,preferredLanguage:a,setPreferredLanguage:async t=>{e.setPreferredSubtitleLanguage(t),s(t)}}}();return i&&0!==a.length?(0,lr.jsx)(yp.y,{renderInline:e,menu:(0,lr.jsx)(sh,{onSelectLanguage:r,languages:a,activeLanguage:s}),children:(0,lr.jsx)(Wg,{noBackground:t,active:null!==s,label:u.ag.get("subtitles-picker.heading"),children:(0,lr.jsx)(Xg.M,{iconSize:n})})}):null}));var oh=n(61278),lh=n(73525);const dh="ylcmjHXKpwmez5_bBVgt",ch="kChcaF3yz3SoL5dZPwEr",uh="tr1hDrJgoPSbMXlXU_sl",mh="mbUrqWP55sK6zhspiR72",ph="SVGHXIQcH9HYU7uGITw5",gh="N5cWYDvyLrfnyMZuqQHo",hh="gIobRDHAxkAvUaF4_OOL",kh="FTi9QEhetf4Q4__5sb4S",vh="Gw7E7MkWci1ttQhb4EK0",fh="Lgyj1e9c3lrdgVGlMIyV",yh=(0,sr.memo)((function({iconSize:e=16}){return(0,lr.jsx)("button",{className:vh,onClick:()=>{Dg()},"aria-label":u.ag.get("npv.exit-full-screen"),title:u.ag.get("npv.exit-full-screen"),children:(0,lr.jsx)(lh.Y,{iconSize:e})})}));var Sh=n(3115);const bh="main-genericButton-button",_h="main-genericButton-buttonActive",Nh=e=>{const t=e.isActive??!1,n=uo()(bh,{[_h]:t},e.className);return(0,lr.jsx)(nl._,{label:e.label,children:(0,lr.jsx)(mu.o,{style:e.style,"aria-label":e.label,buttonSize:"sm",className:n,disabled:e.disabled,iconOnly:e.icon,onClick:e.onToggle,"":e.testId,"data-active":t.toString()})})},Eh=()=>(0,lr.jsx)(Sh.r,{iconSize:24}),xh=({onClick:e,enabled:t})=>{const n=(0,sr.useCallback)((()=>{e?.(!t)}),[e,t]);return(0,lr.jsx)(Nh,{className:fh,isActive:t,onToggle:n,label:u.ag.get("web-player.lyrics.title"),testId:"fullscreen-mode-overlay-lyrics-button",icon:Eh})},Ch=(0,sr.memo)(xh);var wh=n(14241),Ih=n(46525);const Th=({item:e})=>(0,he.G_)(e)?(0,lr.jsx)(Bd.B,{uri:e.uri,size:wh.q.sm}):(0,he.iw)(e)?(0,lr.jsx)(Ih.w,{uri:e.uri,size:wh.q.sm}):null,Ah=({isVisible:e,onClick:t,item:n,isLyricsAvailable:i,isLyricsEnabled:a,onLyricsButtonClick:s})=>{const r=Cd();return(0,lr.jsx)(oh.i,{active:e,focusTrapOptions:{initialFocus:!1},children:(0,lr.jsx)("div",{className:uo()(dh,{[ch]:e}),onClick:t,children:(0,lr.jsxs)("div",{className:uh,"":"fullscreen-mode-controls",children:[(0,lr.jsx)(qo,{isPreview:!1,isFullscreenMode:!0}),(0,lr.jsxs)("div",{className:mh,children:[(0,lr.jsx)("div",{className:uo()(ph,gh),children:n&&(0,lr.jsx)(Th,{item:n})}),(0,lr.jsxs)("div",{className:uo()(ph,hh),children:[r&&(0,lr.jsx)(xd,{iconSize:24}),!r&&(0,lr.jsx)(El,{iconSize:24}),r&&(0,lr.jsx)(kl,{iconSize:24}),(0,lr.jsx)(wl,{iconSize:24}),(0,lr.jsx)(sl,{iconSize:32}),(0,lr.jsx)(Al,{iconSize:24}),r&&(0,lr.jsx)(yl,{iconSize:24}),!r&&(0,lr.jsx)(pl,{iconSize:24})]}),(0,lr.jsxs)("div",{className:uo()(ph,kh),children:[(0,lr.jsx)(rh,{iconSize:24,renderInline:!0,noBackground:!0}),!r&&i&&(0,lr.jsx)(Ch,{enabled:a,onClick:s}),(0,lr.jsx)(Fd,{iconSize:16}),(0,lr.jsx)($g,{noBackground:!0,iconSize:16}),(0,lr.jsx)(yh,{iconSize:24})]})]})]})})})},Ph=Spicetify.GraphQL.Definitions["queryFullscreenMode"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryFullscreenMode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"artistUri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"artistUri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"headerImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}}]}}]}}]}}]}}]},Oh=()=>{const e=(0,$s.v9)(hu.VG);return(0,vr.Y)(Lg.CM)||e};function Dh(e){return(0,he.G_)(e)?{uri:e.uri,name:e.name,creatorName:e.artists[0]?.name,coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,he.iw)(e)?{uri:e.uri,name:e.name,creatorName:e.show.name,coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,he.G7)(e)?{uri:e.uri,name:e.name,creatorName:e.book.name,coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,he.k6)(e)?{uri:e.uri,name:e.title??"",creatorName:e.advertiser??"",coverArtImageUrl:e.images?.[0]?.url,duration:e.duration.milliseconds}:(0,he.RB)(e)||void 0===e?void 0:(0,fe.U)(e)}const Rh=e=>{const{request:t}=(0,sr.useContext)(Pt.Ax),[n,i]=(0,sr.useState)(void 0);return(0,sr.useEffect)((()=>{let n=!0;return e&&async function(e,t){return e(Ph,{artistUri:t}).then((e=>{if("Artist"===e?.data?.artistUnion.__typename)return e.data.artistUnion.visuals.headerImage?.sources[0]?.url})).catch((()=>{}))}(t,e).then((e=>{n&&i(e)})),()=>{n=!1}}),[e,t]),n},Lh=sr.lazy((async()=>{const{ArtistNpv:e}=await n.e(1814).then(n.bind(n,19312));return{default:e}})),Fh=sr.memo((function({videoRef:e}){const t="/lyrics"===(0,Qr.TH)().pathname,[n,i]=(0,sr.useState)(t),a=(0,Ao.g)(),s=(0,To.o)(),r=(0,vr.Y)((e=>e),((e,t)=>(0,il.V)(e?.restrictions,t?.restrictions)&&e?.item?.uri===t?.item?.uri&&e?.isPaused===t?.isPaused)),o=r?.item??void 0,l=r?.nextItems??[],d=r?.playbackId??void 0,c=(0,he.G_)(o)?o.artists[0]?.uri:void 0,u=o?.images,m=Rh(c);let p=(0,Pg.b)(u?.[0]?.url);(()=>{const e=(0,$s.I0)();(0,sr.useEffect)((()=>{const t=()=>{Rg()||e((0,Qs.oH)())};return window.addEventListener("fullscreenchange",t),window.addEventListener("webkitfullscreenchange",t),()=>{window.removeEventListener("fullscreenchange",t),window.removeEventListener("webkitfullscreenchange",t)}}),[e]),(0,sr.useEffect)((()=>{const e=e=>{"Escape"===e.key&&Dg()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[e])})();const{position:g,contextName:h,contextUri:k,isPaused:v,canResume:f,canPause:y,timestamp:S}=function(e){const t=e?.context.metadata?.context_description,n=e?.context.uri||void 0,i=e?.positionAsOfTimestamp??void 0,a=e?.timestamp,s=e?.isPaused,r=e?.restrictions.canPause,o=e?.restrictions.canResume;return{contextName:t,contextUri:n,position:i,timestamp:a,isPaused:s,canPause:r,canResume:o}}(r),{isOverlayVisible:b,showOverlay:_}=(()=>{const[e,t]=(0,sr.useState)(!1),n=(0,sr.useRef)(null),i=(0,Zo.y1)((()=>{null!==n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{t(!1)}),2500),t(!0)}),100,{leading:!0});return(0,sr.useEffect)((()=>()=>{null!==n.current&&clearTimeout(n.current)}),[]),{isOverlayVisible:e,showOverlay:i}})(),N=function(e){const t=Dh(e);return(0,he.G_)(e)||(0,he.iw)(e)||(0,he.G7)(e)||(0,he.k6)(e)?{...t,duration:e.duration.milliseconds,mediaType:(n=e.mediaType,"video"===n||"mixed"===n?"video":"audio")}:(0,he.RB)(e)||void 0===e?void 0:(0,fe.U)(e);var n}(o),E=Dh(l.length>0?l[0]:void 0),x=(0,Lg.CM)(r),C=(0,sr.useCallback)((e=>{e.target===e.currentTarget&&(s({type:"click",intent:v?"play":"pause"}),v&&f?a.resume():!v&&y&&a.pause())}),[y,f,v,s,a]),w=(0,sr.useCallback)((e=>{i(e)}),[i]),{data:I,loading:T}=(0,Ag.C)(N?.uri,u),A=!!I?.hasLyrics,P=I?.hasLyrics?I.providerLyricsId:void 0;p=A?I.colors.background:p;const O=(0,sr.useMemo)((()=>function(e,t,n){if(e&&n&&n.hasLyrics)return{status:t?"loading":"success",content:{provider:n.provider,syncType:n.syncType,lines:n.lyrics.map((e=>({timestamp:Number(e.start),text:e.text})))}}}(n,T,I)),[n,T,I]),D=(0,el.s4)(),R=(0,sr.useCallback)(((e,t,n)=>D.send((0,Tg.N)({lyrics_format:"fullscreen",track_uri:e,provider:t,provider_lyrics_id:P,sync_type:n,playback_id:d}))),[d,P,D]);return(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsxs)("div",{onMouseMove:_,onFocus:_,children:[(0,lr.jsx)("div",{ref:e}),(0,lr.jsx)(Lh,{currentTrack:N,position:g??0,timestamp:S??0,nextTrack:E,backgroundColor:p,backgroundImageUrl:m,contextName:h,contextUri:k,playbackIsPaused:v,contextMetadataVisible:!x||b,trackMetadataVisible:!x||b,lyrics:O,onLyricsReport:R,controlsVisible:!1,progressBarVisible:!x||b,CustomProgressBar:void 0,CustomPlaybackControls:(0,lr.jsx)(Ah,{isVisible:b,onClick:C,item:o,isLyricsAvailable:A,isLyricsEnabled:n,onLyricsButtonClick:w})})]})})})),jh=sr.memo((function({videoRef:e}){const t=(0,sr.useContext)(Fg),n=Oh(),i=(0,$s.I0)(),a=(0,$s.v9)((e=>e.ui.fullscreenMode.isOpen));return(0,sr.useEffect)((()=>{if(!n)return void Dg();const e=Rg();!a&&e&&Dg()}),[n,a,i]),(0,lr.jsx)("div",{ref:t,children:n&&a?(0,lr.jsx)(Fh,{videoRef:e}):null})}));var Mh=n(3401);const Uh="I0UigpTrBFkGuoWMpQcq",Bh="jxzPm9gLS9LiyU5veW3H",Vh="bYPDBcU3uU79vGF1pQBg",Hh="pWvyF1E7_RN2INjZfCUd",Gh="E4UTzaVPMhPYyLm1z_eb",Wh="ReyA3uE3K7oEz7PTTnAn",zh="vSC7et_G7LUWnvTARtHq",Kh="xFb8C_XRObIFocIOPuTj";const Yh=(0,$s.$j)((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({type:am}),adClick:()=>e({type:sm}),onImageLoaded:()=>e({type:rm}),onError:()=>e({type:om})})))((({companionSrc:e,clickUrl:t,mediaSrc:n,adClick:i,hide:a,isOpen:s,imageLoaded:r,onImageLoaded:o,onError:l,isMinimized:d,isPreview:c})=>{const m=()=>{i(),a()},p=(0,Qr.s0)(),g=(0,vr.Y)((e=>e?.context.uri));return(0,sr.useEffect)((()=>{s&&function(e,t,n){const i=new Image;i.addEventListener("load",t),i.addEventListener("error",n),i.src=e}(n,o,l)}),[s,n,o,l,c,g,p]),s&&r?d?(0,lr.jsx)("div",{"":"billboard-minimized",className:Wh,children:e&&(0,lr.jsx)("a",{draggable:!1,className:zh,href:t,onClick:i,children:(0,lr.jsx)("img",{draggable:!1,className:Kh,alt:u.ag.get("ad-formats.advertisement"),src:e})})}):(0,lr.jsx)(ku.Z,{isOpen:s,shouldCloseOnEsc:!1,onRequestClose:a,contentLabel:u.ag.get("ad-formats.advertisement"),children:(0,lr.jsxs)("div",{id:"view-billboard-ad",className:uo()(Uh,{ready:s}),children:[(0,lr.jsx)("a",{draggable:!1,tabIndex:-1,className:Bh,href:t,onClick:m,children:u.ag.get("ad-formats.advertisement")}),(0,lr.jsx)("button",{"aria-label":u.ag.get("ad-formats.dismissAd"),className:Vh,onClick:a,children:(0,lr.jsx)(Zu,{width:18,height:18,fill:"currentColor"})}),(0,lr.jsx)("a",{draggable:!1,"":"billboard-image-link",className:Hh,href:t,onClick:m,children:(0,lr.jsx)("img",{draggable:!1,className:Gh,alt:u.ag.get("ad-formats.advertisement"),src:n})})]})}):null})),qh="SET_LEADERBOARD_ELEMENT",Zh="NAVIGATION_CHANGE_LEADERBOARD_AD",Qh="SET_LEADERBOARD_ENABLED",Jh="SET_LEADERBOARD_DISABLED",$h=()=>({type:Jh}),Xh="main-leaderboardComponent-container",ek=()=>{const e=(0,$s.I0)(),t=(0,$s.v9)((e=>e.ads.leaderboard.isEnabled)),n=(0,Qr.TH)();(0,sr.useEffect)((()=>{e({type:Zh})}),[e,n.pathname]);const i=(0,sr.useCallback)((t=>{null!==t&&e({type:qh,element:t})}),[e]);return t?(0,lr.jsx)("div",{children:(0,lr.jsx)("div",{"":"test-ref-div",className:Xh,ref:i})}):null};var tk=n(44740),nk=n(51385);n(62505);const ik=(0,sr.memo)((function(){const e=(0,$s.I0)(),t=(0,To.o)(),{removeFolder:n}=(0,tk.l)(),i=(0,Qr.s0)(),a=(0,Qr.TH)(),{uri:s,onDeleteCallback:r}=(0,$s.v9)((({ui:e})=>e.deleteFolderDialog)),o=(0,sr.useCallback)((()=>{e((0,Qs.cq)())}),[e]),l=(0,sr.useCallback)((()=>{s&&(t({targetUri:s,intent:"delete-folder",type:"click",itemIdSuffix:"delete"}),n(s),o(),(0,c.EC)(s)?.toURLPath().endsWith(a.pathname)&&i("/collection/playlists",{replace:!0}),r&&r())}),[s,t,n,o,a.pathname,r,i]);return(0,lr.jsx)(nk.Q,{"aria-label":u.ag.get("folder.delete-header"),titleText:u.ag.get("folder.delete-header"),onConfirm:l,onClose:o,confirmText:u.ag.get("contextmenu.delete"),confirmLabel:u.ag.get("folder.delete-header"),cancelText:u.ag.get("queue.cancel-button")})})),ak={"&":"&","<":"<",">":">",'"':""","'":"'"},sk=/[&<>"']/g,rk=RegExp(sk.source);const ok=Object.values(ak);RegExp(`${ok.join("|")}`,"g"),RegExp(`${ok.join("|")}`);n(62505);const lk=(0,sr.memo)((function(){const e=(0,Qr.s0)(),t=(0,Qr.TH)(),n=(0,$s.I0)(),i=(0,To.o)(),a=(0,$s.v9)((e=>e.ui.deletePlaylistDialog.uri)),[,s]=(0,Uu.Z)(a),r=(0,Dc.ET)(a),o=(0,Xo.W6)(Ns.yA),l=(0,sr.useCallback)((()=>{i({targetUri:a,intent:"delete-playlist",type:"click",itemIdSuffix:"delete"}),s(!1),n((0,Qs.me)()),(0,c.U4)(a,t.pathname)&&e(o?"/":"/collection/playlists",{replace:!0})}),[i,a,s,n,t.pathname,o,e]),d=(0,sr.useCallback)((()=>{n((0,Qs.me)())}),[n]);return r&&(0,lr.jsx)(nk.Q,{"aria-label":u.ag.get("playlist.delete",r.name),titleText:u.ag.get("playlist.delete-title",r.name),descriptionText:u.ag.get("playlist.delete-description",(m=r.name,m&&rk.test(m)?m.replace(sk,(e=>e in ak?ak[e]:e)):m)),onConfirm:l,onClose:d,confirmText:u.ag.get("contextmenu.delete"),confirmLabel:u.ag.get("playlist.delete",r.name),cancelText:u.ag.get("queue.cancel-button"),allowHTML:!0});var m}));var dk=n(65852),ck=n(34221),uk=n(83587),mk=n(67443),pk=n(78573);const gk="fFoN1cMJLIJo0k_vgNyw",hk="Lk23rM5uSl5mgEXroOPH",kk="f14LfcDx_wvogzdXzoq9",vk="QMMTQfEw3AIHFf4dTRp3",fk="Hj1B5D7WgG4aZkU8meAp",yk="nPKDEvIoCzySBR24pZiN",Sk="dqP_KBPyAygbxKtY3k3w",bk=({setOuterContainer:e,npbVideoAdRef:t})=>{const n=(0,$s.I0)(),i=(0,vr.Y)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri)),a=(0,he.k6)(i)?i.url??void 0:void 0,s=(0,$s.v9)((e=>e?.ads?.vto?.isMinimized)),r=(0,Xo.W6)(Ns.JI),o=(0,sr.useRef)(),l=(0,Qr.TH)();(0,sr.useEffect)((()=>{o.current?n((0,uk.ir)()):o.current=!0}),[n,l.pathname]);const[d,c]=(0,sr.useState)(null);return(0,sr.useEffect)((()=>(n((0,uk.Zc)()),()=>{n((0,uk.w9)())})),[n]),(0,sr.useEffect)((()=>{s?(r&&n((0,mk.Bl)(Yg.B.npv)),setTimeout((()=>{null!==d&&e(t.current)}),ck.K)):null!==d&&e(d)}),[n,e,t,s,d,r]),(0,lr.jsx)(ku.Z,{className:fk,animation:{overlay:{base:vk,beforeClose:Sk,afterOpen:yk},closeTimeoutMs:ck.u},isOpen:!s,parentSelector:()=>document.querySelector(".Root__modal-slot"),shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:u.ag.get("ad-formats.advertisement"),children:(0,lr.jsxs)("div",{className:gk,children:[(0,lr.jsx)("button",{"aria-label":u.ag.get("ad-formats.dismissAd"),className:kk,onClick:()=>{n((0,uk.w9)()),n((0,uk.kh)(pk.W9.COLLAPSED)),r&&n((0,mk.Bl)(Yg.B.npv))},children:(0,lr.jsx)(Zu,{width:18,height:18,fill:"currentColor"})}),(0,lr.jsx)("a",{"":"video-takeover-link",href:a?(0,dk.p)(a):void 0,onClick:()=>{n((0,uk.kh)(pk.W9.CLICKED,"video_takeover"))},ref:e=>c(e),className:hk})]})})},_k=({setOuterContainer:e,npbVideoAdRef:t})=>(0,$s.v9)((e=>e?.ads?.vto?.isHidden))?null:(0,lr.jsx)(bk,{setOuterContainer:e,npbVideoAdRef:t});const Nk=e=>{const t=(()=>{const[e]=(0,sr.useState)((()=>{const e=document.createElement("div");return e.classList.add("VideoPlayer__container"),e}));return e})();if((0,sr.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"},Ek=()=>{const e=(0,$s.v9)(Qg),t=(0,sr.useRef)(Yg.B.mini);return(0,sr.useEffect)((()=>{e!==Yg.B.mini&&e!==Yg.B.cinema&&e!==Yg.B.npv&&e!==Yg.B.pip||(t.current=e)}),[e]),t};var xk=n(28246),Ck=n(17617);function wk(e,t){(0,sr.useLayoutEffect)((()=>{t.current&&e(t.current)}),[t,e])}const Ik=1500,Tk=100;function Ak(){const[e,t]=(0,sr.useState)(!1),n=(0,sr.useRef)(null),i=(0,Zo.y1)((()=>{n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{t(!1)}),Ik),t(!0)}),Tk,{maxWait:Tk,leading:!0}),a=(0,sr.useCallback)((e=>{t(e),i.cancel()}),[i]);return(0,sr.useEffect)((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{isControlsVisible:e,setIsControlsVisible:a,handleKeepViewVisible:i}}var Pk=n(50994);const Ok="fuONPgUcYO2bf15HunlX",Dk=({noBackground:e,iconSize:t=16})=>{const n=(0,$s.I0)(),i=(0,Kg.m)(),a=(0,$s.v9)(Qg)===Yg.B.pip;return(0,vr.Y)(Lg.CM)?(0,lr.jsx)("div",{className:uo()({[Ok]:a}),children:(0,lr.jsx)(Wg,{noBackground:e,active:a,label:a?u.ag.get("video-player.default-view"):u.ag.get("npb_pip_web_player"),onClick:()=>{Rg()&&Dg(),a?i===zg.s.NowPlayingView?n((0,qg.Bl)(Yg.B.npv)):n((0,qg.Bl)(Yg.B.mini)):n((0,qg.Bl)(Yg.B.pip))},children:(0,lr.jsx)(mo.$,{iconSize:t})})}):null},Rk="aHe1QDDI5hmYWAKf4MoR",Lk="QOt96NwplKPuFi9evhHq",Fk=function({visible:e,className:t}){const n=(0,$s.I0)(),i=Oh(),a=Sc(),s=(0,sr.useContext)(Fg),r=(0,$s.v9)(Qg)===Yg.B.mini,o=(0,$s.v9)((e=>e.platform.isDesktop)),l=a.getCapabilities().hasPipSupport;return(0,lr.jsxs)("div",{className:uo()(Rk,t,{[Lk]:e}),children:[(0,lr.jsx)(rh,{renderInline:!0}),(0,lr.jsx)($g,{}),o&&l&&(0,lr.jsx)(Dk,{}),i&&(0,lr.jsx)(Wg,{label:u.ag.get("npv.full-screen"),onClick:()=>{s?.current&&(Og(s.current),n((0,Qs.OC)()))},children:(0,lr.jsx)(Pk.i,{iconSize:16})}),r&&(0,lr.jsx)(Wg,{label:u.ag.get("close_button_action"),onClick:()=>{n((0,qg.mO)(!0))},children:(0,lr.jsx)(Rm.k,{iconSize:16})})]})},jk="kJKEEG391Pf_PLzwG2Vm",Mk="gVnOoWHXwLnTNK2RRIKg",Uk=({cinemaModeRef:e,nowPlayingBarRef:t,setVideoContainer:n,hiddenByUser:i})=>{const s=(0,sr.useRef)(null),r=(0,$s.I0)(),o=(0,Xo.W6)(Ns.JI),{setTransientForcedExpandedState:l}=(0,Ck.o)();wk(n,s);const{isControlsVisible:d,handleKeepViewVisible:c}=Ak(),u=(0,Kg.m)();return(0,sr.useEffect)((()=>{const e=e=>{"Escape"===e.key&&(o&&u===zg.s.NowPlayingView?r((0,qg.Bl)(Yg.B.npv)):r((0,qg.Bl)(Yg.B.mini)))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[r,o,u]),(0,sr.useEffect)((()=>(l(xk.NowPlayingCoverStateEnum.collapsed),()=>{l(xk.NowPlayingCoverStateEnum.none)})),[l]),e.current?t.current?a.createPortal((0,lr.jsxs)("div",{ref:s,hidden:i,className:jk,onMouseMove:c,onFocus:c,"":"video-player-cinema",children:[(0,lr.jsx)(oh.i,{containerElements:[e.current,t.current],active:!i}),(0,lr.jsx)(Fk,{visible:d,className:Mk})]}),e.current):(console.error("No ref found for nowPlayingBar!"),null):(console.error("No container found for cinema video!"),null)},Bk=sr.memo((function({setVideoContainer:e,fullscreenModeRef:t}){const n=(0,sr.useRef)(null);return wk(e,n),t.current?a.createPortal((0,lr.jsx)("div",{"":"video-player-fullscreen",className:uo()("VideoFullscreenMode"),children:(0,lr.jsx)("div",{className:"VideoFullscreenMode__video-container",ref:n})}),t.current):(console.error("No container found for fullscreen video!"),null)})),Vk="432px",Hk="0px",Gk="0px",Wk="IHJo1TDFzY4mDw_ny8RQ";var zk=n(21524);let Kk=function(e){return e.TOP_RIGHT="TOP_RIGHT",e.TOP_LEFT="TOP_LEFT",e.BOTTOM_RIGHT="BOTTOM_RIGHT",e.BOTTOM_LEFT="BOTTOM_LEFT",e}({});function Yk({videoContainerRef:e,corner:t,aspectRatio:n}){if(!e.current)return;const[i,a]=n.split("/"),s=parseInt(i,10)/parseInt(a,10),r=n=>{const i=e.current;if(!i)return;const a=getComputedStyle(i,null),r=parseInt(a.width,10),o=parseInt(a.height,10),l=parseInt(a.top,10),d=parseInt(a.right,10),c=parseInt(a.bottom,10),u=parseInt(a.left,10),m=n.movementX,p=n.movementY;let g=r;const h=Math.abs(m)>Math.abs(p),k=m<0,v=p<0,f=!k,y=!v;switch(t){case Kk.TOP_LEFT:if((l<=at.K1||u<=0)&&(v||k))return;g=h?r-m:(o-p)*s;break;case Kk.TOP_RIGHT:if((l<=at.K1||d<=0)&&(v||f))return;g=h?r+m:(o-p)*s;break;case Kk.BOTTOM_RIGHT:if((c<=0||d<=0)&&(y||f))return;g=h?r+m:(o+p)*s;break;case Kk.BOTTOM_LEFT:if((c<=0||u<=0)&&(y||k))return;g=h?r-m:(o+p)*s;break;default:(0,fe.U)(t)}i.style.setProperty("--video-player-mini-width",`${g}px`)};!function(e,t){const n=t.current;if(!n)return;const{top:i,right:a,bottom:s,left:r}=getComputedStyle(n);e===Kk.BOTTOM_LEFT?(n.style.bottom="revert",n.style.left="revert",n.style.top=i,n.style.right=a):e===Kk.TOP_RIGHT?(n.style.top="revert",n.style.right="revert",n.style.bottom=s,n.style.left=r):e===Kk.BOTTOM_RIGHT&&(n.style.bottom="revert",n.style.right="revert",n.style.top=i,n.style.left=r)}(t,e),document.addEventListener("mousemove",r),document.addEventListener("mouseup",(()=>{document.removeEventListener("mousemove",r),function(e){const t=e.current;if(!t)return;const{right:n,bottom:i,width:a,height:s}=getComputedStyle(t);t.style.setProperty("--video-player-mini-bottom",i),t.style.setProperty("--video-player-mini-right",n),t.style.setProperty("--video-player-mini-width",a),t.style.setProperty("--video-player-mini-height",s),t.style.removeProperty("top"),t.style.removeProperty("right"),t.style.removeProperty("bottom"),t.style.removeProperty("left")}(e)}),{once:!0})}const qk="ayK5x4g3ziBv1HBvVN4A",Zk="JsQlADdGP1mmaYQBRjAs",Qk="RLkiXgkY1CMOMIqvBXHz",Jk="kxAklKmg1SJCkvHHZ_Hh",$k="C25ijUb1EHOyPteh9a8K",Xk=({corner:e,aspectRatio:t,videoContainerRef:n})=>{return(0,lr.jsx)("div",{className:uo()(qk,{[Zk]:e===Kk.TOP_LEFT,[Qk]:e===Kk.TOP_RIGHT,[$k]:e===Kk.BOTTOM_RIGHT,[Jk]:e===Kk.BOTTOM_LEFT}),"":`CORNER_${e}`,onMouseDown:(i=e,e=>{n.current&&(e.stopPropagation(),e.preventDefault(),Yk({aspectRatio:t,videoContainerRef:n,corner:i}))})});var i};const ev=({hiddenByUser:e,setVideoContainer:t,savedPosition:n,setSavedPosition:i,aspectRatio:a})=>{const s=(0,sr.useRef)(null),{scrollNodeRef:r}=(0,sr.useContext)(zk.VX);wk(t,s),(({videoContainerRef:e,savedPosition:t,setSavedPosition:n})=>{const i=(0,sr.useRef)(t);(0,sr.useLayoutEffect)((()=>{const t=e.current;if(!t)return;const a=(e,n)=>t.style.setProperty(e,`${n}px`),{width:s,right:r,bottom:o}=i.current;return a("--video-player-mini-width",s),a("--video-player-mini-right",r),a("--video-player-mini-bottom",o),()=>{const e=getComputedStyle(t,null),i=t=>parseInt(e.getPropertyValue(t),10);n({width:i("--video-player-mini-width"),right:i("--video-player-mini-right"),bottom:i("--video-player-mini-bottom")})}}),[n,e])})({videoContainerRef:s,savedPosition:n,setSavedPosition:i});const{isControlsVisible:o,setIsControlsVisible:l,handleKeepViewVisible:d}=Ak();return(0,lr.jsxs)("div",{ref:s,hidden:e,className:Wk,onMouseLeave:()=>{l(!1)},onMouseDown:e=>{s.current&&r.current&&(e.stopPropagation(),e.preventDefault(),function({videoContainerRef:e,scrollNodeRef:t,mouseDownX:n,mouseDownY:i}){if(!e.current)return;if(!t.current)return;const a=e.current.getBoundingClientRect(),s=t.current.getBoundingClientRect(),r=a.right-n,o=a.bottom-i;e.current.style.setProperty("--video-player-mini-width",`${a.width}px`),e.current.style.setProperty("--video-player-mini-height",`${a.height}px`);const l=t=>{if(!e.current)return;const n=t.clientX,i=t.clientY;let l=s.right-n-r,d=s.bottom-i-o;l=Math.min(Math.max(0,l),s.width-a.width),d=Math.min(Math.max(0,d),s.height-a.height-at.K1),e.current.style.setProperty("--video-player-mini-right",`${l}px`),e.current.style.setProperty("--video-player-mini-bottom",`${d}px`)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",(()=>{document.removeEventListener("mousemove",l)}),{once:!0})}({scrollNodeRef:r,videoContainerRef:s,mouseDownX:e.clientX,mouseDownY:e.clientY}))},onMouseMove:d,onFocus:d,"":"video-player-mini",children:[(0,lr.jsx)(Xk,{corner:Kk.TOP_LEFT,videoContainerRef:s,aspectRatio:a}),(0,lr.jsx)(Xk,{corner:Kk.TOP_RIGHT,videoContainerRef:s,aspectRatio:a}),(0,lr.jsx)(Xk,{corner:Kk.BOTTOM_RIGHT,videoContainerRef:s,aspectRatio:a}),(0,lr.jsx)(Xk,{corner:Kk.BOTTOM_LEFT,videoContainerRef:s,aspectRatio:a}),(0,lr.jsx)(Fk,{visible:o})]})};var tv=n(2831);const nv=function({visible:e,className:t}){const n=(0,$s.I0)();return(0,lr.jsx)("div",{className:uo()(Rk,t,{[Lk]:e}),children:(0,lr.jsx)(Wg,{label:u.ag.get("npv.full-screen"),onClick:e=>{e.stopPropagation(),e.preventDefault(),n((0,uk.Zc)()),n((0,uk.kh)(pk.W9.EXPANDED))},children:(0,lr.jsx)(Pk.i,{iconSize:16})})})},iv="ouiL5cH1WduxtprQ0Iig",av=({setVideoContainer:e,isPlayingAd:t=!1})=>{const n=(0,sr.useRef)(null),{scrollNodeRef:i}=(0,sr.useContext)(zk.VX),s=(0,$s.I0)(),r=(0,vr.Y)((e=>e?.item??void 0),((e,t)=>e?.uri===t?.uri)),o=(0,he.k6)(r)?r.url??void 0:void 0;wk(e,n);const l=(0,sr.useRef)(!0);(0,sr.useEffect)((()=>(l.current=!0,()=>{l.current=!1})));const{isControlsVisible:d,setIsControlsVisible:c,handleKeepViewVisible:u}=Ak(),m=document.getElementById("VideoPlayerNpv_ReactPortal");return null===m?null:a.createPortal((0,lr.jsx)("div",{ref:n,hidden:!1,className:iv,style:{position:"relative"},onMouseLeave:()=>{c(!1)},onMouseDown:e=>{n.current&&i.current&&(e.stopPropagation(),e.preventDefault())},onMouseMove:u,onFocus:u,"":"video-player-npv",children:t?(0,lr.jsx)("a",{href:o,onClick:()=>{s((0,tv.nX)("video_player_npv"))},"":"video-player-ad-wrapper",children:(0,lr.jsx)(nv,{visible:d})}):(0,lr.jsx)(Fk,{visible:d})}),m)},sv=({npbVideoAdRef:e,nowPlayingBarRef:t,cinemaModeRef:n,fullscreenModeRef:i})=>{const a=(0,$s.I0)(),s=(0,sr.useRef)(),r=(0,sr.useRef)(),[o,l]=(0,sr.useState)(null),d=(0,Xo.W6)(Ns.JI),[c,u]=(0,sr.useState)({width:parseInt(Vk,10),bottom:parseInt(Gk,10),right:parseInt(Hk,10)}),m=(0,$s.v9)((e=>e.platform.isDesktop)),{isPlayingVideo:p,isPlayingAd:g,contextUri:h,playbackId:k}=(0,vr.Y)((e=>{const t=e?.item??void 0;return{isPlayingVideo:(0,Lg.CM)(e),isPlayingAd:(0,he.k6)(t),contextUri:e?.context.uri,playbackId:e?.playbackId}})),v=(0,$s.v9)((e=>e?.ads?.vto?.isMinimized)),f=(0,$s.v9)(Qg),y=(0,$s.v9)(Zg),S=Nk(o),b=f===Yg.B.pip;if((()=>{const e=(0,$s.I0)(),t=(0,vr.Y)(Lg.CM),{connectionStatus:n}=(0,kr.O)(),i=n===_t.TK.CONNECTED||n===_t.TK.CONNECTING,a=Ek();(0,sr.useEffect)((()=>{t&&!i?Rg()?e((0,qg.Bl)(Yg.B.fullscreen)):e((0,qg.Bl)(a.current)):e((0,qg.Bl)(Yg.B.none))}),[t,i,e,a])})(),(()=>{const e=(0,$s.I0)(),t=(0,vr.Y)(Lg.CM),n=Ek();(0,sr.useEffect)((()=>{const i=()=>{t&&(Rg()?e((0,qg.Bl)(Yg.B.fullscreen)):e((0,qg.Bl)(n.current)))};return window.addEventListener("fullscreenchange",i),window.addEventListener("webkitfullscreenchange",i),()=>{window.removeEventListener("fullscreenchange",i),window.removeEventListener("webkitfullscreenchange",i)}}),[e,t,n])})(),p&&g&&r.current!==k&&(a((0,uk.Zc)()),r.current=k),(0,sr.useEffect)((()=>{p&&s.current!==h&&(a((0,qg.mO)(!1)),s.current=h)}),[a,h,p]),m&&p&&g&&!b&&(d&&!v||!d))return(0,lr.jsx)(_k,{npbVideoAdRef:e,setOuterContainer:l});const _=d&&b;if(f===Yg.B.npv||_)return(0,lr.jsx)(Xs.L,{children:(0,lr.jsx)(av,{isPlayingAd:g,setVideoContainer:l})});const N=!d&&b;return f===Yg.B.mini&&p||N?(0,lr.jsx)(Xs.L,{children:(0,lr.jsx)(ev,{savedPosition:c,setSavedPosition:u,aspectRatio:S,hiddenByUser:y,setVideoContainer:l})}):f===Yg.B.cinema?(0,lr.jsx)(Xs.L,{children:(0,lr.jsx)(Uk,{hiddenByUser:y,cinemaModeRef:n,nowPlayingBarRef:t,setVideoContainer:l})}):f===Yg.B.fullscreen?(0,lr.jsx)(Xs.L,{children:(0,lr.jsx)(Bk,{fullscreenModeRef:i,setVideoContainer:l})}):null};var rv=n(4417),ov=n.n(rv),lv=n(49823);const dv={NotificationBubble:"main-notificationBubble-NotificationBubble",isError:"main-notificationBubble-isError",isNotice:"main-notificationBubble-isNotice",horizontal:"main-notificationBubble-horizontal",isClickable:"main-notificationBubble-isClickable",enter:"main-notificationBubble-enter",enterActive:"main-notificationBubble-enterActive",exit:"main-notificationBubble-exit",exitActive:"main-notificationBubble-exitActive",withPointer:"main-notificationBubble-withPointer",withTopRightPointer:"main-notificationBubble-withTopRightPointer",withTopLeftPointer:"main-notificationBubble-withTopLeftPointer",withSidePointer:"main-notificationBubble-withSidePointer",isCloseable:"main-notificationBubble-isCloseable",closeIcon:"main-notificationBubble-closeIcon"},cv=e=>{const{children:t,isHidden:n,isClickable:i,withPointer:a,withTopLeftPointer:s,withTopRightPointer:r,withSidePointer:o,horizontal:l,maxWidth:d,feedbackType:c=gu.nY.NOTICE}=e;return(0,lr.jsx)(lv.Z,{in:!n,classNames:dv,timeout:500,unmountOnExit:!0,children:(0,lr.jsx)("div",{className:uo()(dv.NotificationBubble,{[dv.isClickable]:i,[dv.withPointer]:a,[dv.withTopLeftPointer]:s,[dv.withTopRightPointer]:r,[dv.withSidePointer]:o,[dv.horizontal]:l,[dv.isError]:c===gu.nY.ERROR,[dv.isNotice]:c===gu.nY.NOTICE}),style:{maxWidth:d?`${d}px`:""},role:"alert","aria-live":"polite",children:t})})},uv="main-notificationBubbleContainer-NotificationBubbleContainer",mv=()=>{const{message:e,feedbackType:t,isHidden:n}=(0,$s.v9)((e=>e.feedbackBubble)),i=/<[a-z][\s\S]*>/i.test(e);return(0,lr.jsx)("div",{className:uv,children:(0,lr.jsx)(cv,{isHidden:n,feedbackType:t,children:i?ov()(e,{transform:{b:e=>(0,lr.jsx)(xo.D,{variant:"balladBold",semanticColor:"textBase",children:e.children})}}):e})})};class pv extends sr.PureComponent{handleRequestClose(){this.props.closeModal()}render(){const{isOpen:e,closeModal:t}=this.props;return(0,lr.jsx)(jr.w,{headingMessage:u.ag.get("offline-error.device-limit-reached.header"),message:u.ag.get("offline-error.device-limit-reached.message"),buttonLabel:u.ag.get("close"),isOpen:e,onDismissDialog:t})}}const gv=(0,$s.$j)((e=>({isOpen:e.ui.offlineDeviceLimitReachedDialog.isOpen})),(e=>({closeModal:()=>e((0,Qs.$1)())})))(pv);class hv extends sr.PureComponent{constructor(e){super(e),this.handleRequestClose=this.handleRequestClose.bind(this),this.browserName=Z().getParser(window.navigator.userAgent).getBrowserName()}handleRequestClose(){this.props.closeModal()}render(){const{isOpen:e,closeModal:t}=this.props;return(0,lr.jsx)(jr.w,{headingMessage:u.ag.get("fatal-error.header"),onDismissDialog:t,buttonLabel:u.ag.get("close"),message:u.ag.get("browser_upgrade_notice",this.browserName),isOpen:e})}}const kv=(0,$s.$j)((e=>({isOpen:e.ui.playbackNotSupportedErrorDialog.isOpen})),(e=>({closeModal:()=>e((0,Qs.PL)())})))(hv);var vv=n(7182);const fv="CMgJZD0JMx_Yz1tlE7hd";var yv=n(42006);const Sv="SVnAziPF2z_cgAGrp6He",bv="miG_SXrw265mkozdEHrJ",_v="RWLySPhsOTyK2EsAGUgx",Nv="X_vuuyeQDD6IWI4aIE6k",Ev="VdyeU78LKQdX8Dclnfxr",xv="Z12I3N4OnNvzRSNKOeUn",Cv="IDHZCFcj1ynmYu6Sm5SR",wv="UmY163JiUcgJt2MKNyGW",Iv="SYKOtPBDhPSs6zGwbk6A";var Tv=n(54186);const Av={[Tv.Uo.XSMALL]:xv,[Tv.Uo.SMALL]:xv,[Tv.Uo.MEDIUM]:Cv,[Tv.Uo.LARGE]:wv,[Tv.Uo.XLARGE]:wv},Pv=({image:e,title:t,description:n,primaryButton:i,secondaryButton:a,renderExtraInfo:s,style:r,className:o,size:l=Tv.Uo.SMALL})=>{const d="string"==typeof t?(0,lr.jsx)("h2",{className:_v,children:t}):(0,lr.jsx)("div",{className:_v,children:t});let c,u;return n&&(c="string"==typeof n?(0,lr.jsx)("p",{className:Nv,children:n}):(0,lr.jsx)("div",{className:Nv,children:n})),a&&(u=(0,lr.jsx)("div",{className:Iv,children:a})),(0,lr.jsxs)("div",{className:uo()(`${Sv} ${Av[l]}`,o),style:r,"":"dialog-root",children:[e&&(0,lr.jsx)("div",{className:Ev,children:(0,lr.jsx)(yv.E,{loading:"lazy",src:e})}),(0,lr.jsxs)("div",{className:bv,children:[d,c,i,u,s&&s()]})]})};var Ov=n(63082),Dv=function(e){return e[e.SIGNUP=0]="SIGNUP",e[e.LOGIN=1]="LOGIN",e[e.DOWNLOAD=2]="DOWNLOAD",e}(Dv||{});const Rv=(0,sr.memo)((function({image:e,mediaType:t,backgroundColor:n,onSignupClick:i,onLoginClick:a,onDownloadClick:s,downloadLink:r}){const o=e=>t=>{switch(t.preventDefault(),e){case Dv.DOWNLOAD:s&&s(),window.open(r,"_top","noopener");break;case Dv.SIGNUP:i&&i(),(0,Fs.L6)();break;case Dv.LOGIN:a&&a(),(0,Fs.h$)()}},l="audio"===t?u.ag.get("fta.wall.start-listening"):u.ag.get("fta.wall.start-watching"),d=(0,lr.jsx)(au.D,{onClick:o(Dv.SIGNUP),children:u.ag.get("mwp.cta.sign.up.free")}),c=r?(0,lr.jsx)(Ov.P,{"":"upsell-download-app-button",onClick:o(Dv.DOWNLOAD),children:u.ag.get("mwp.cta.download.app")}):void 0,m=(0,Tv.jh)();return(0,lr.jsx)(Pv,{image:e,title:l,primaryButton:d,secondaryButton:c,size:m,style:n?{backgroundColor:n}:{},renderExtraInfo:()=>(0,lr.jsxs)("p",{className:fv,onKeyDown:()=>o(Dv.LOGIN),role:"presentation",children:[(0,lr.jsx)(xo.D,{as:"span",variant:"mesto",children:u.ag.get("already_have_account")}),(0,lr.jsx)(xo.D,{as:"a",href:"#",onClick:o(Dv.LOGIN),children:u.ag.get("login")})]})})}));var Lv=n(71166);const Fv="anllJYN1jeYGGE1iAJUJ",jv="YQRQdqiQ_iT0eo0owsJL",Mv="ftlV6Ixmq4wkKMg7hJ1v",Uv={[Tv.Uo.SMALL]:0,[Tv.Uo.MEDIUM]:600,[Tv.Uo.LARGE]:1024},Bv=()=>{const e=(0,Lv.IM)();return e.searchParams.set("referrer","dwp"),e},Vv=({image:e,mediaType:t,backgroundColor:n,onClose:i})=>{const a=(0,To.o)(),s=e=>()=>{a({intent:e,type:"click"})},{ref:r,breakpoint:o}=(0,Tv.Db)(Uv);return(0,sr.useEffect)((()=>{const e=e=>{"Escape"===e.key&&(i(),a({intent:"close-upsell",type:"key-escape"}))};return a({intent:"open-upsell",type:"impression"}),window.addEventListener("keyup",e,!1),()=>window.removeEventListener("keyup",e)}),[a,i]),(0,lr.jsx)(Tv.ZU.Provider,{value:o,children:(0,lr.jsx)("div",{className:`dialog ${Mv}`,role:"presentation",ref:r,onClick:e=>{/dialog/.test(e.target.className)&&(a({intent:"close-upsell",type:"click",itemIdSuffix:"backdrop"}),i())},children:(0,lr.jsxs)("div",{className:Fv,style:{backgroundColor:n},children:[(0,lr.jsx)(Rv,{image:e,mediaType:t,onDownloadClick:s("download-app"),onLoginClick:s("login"),onSignupClick:s("signup"),downloadLink:Bv().toString()}),(0,lr.jsx)("div",{className:jv,children:(0,lr.jsx)(mu.o,{onClick:()=>{a({intent:"close-upsell",type:"click",itemIdSuffix:"close-button"}),i()},children:u.ag.get("close")})})]})})})},Hv=sr.memo((function({uri:e}){const t=(0,$s.I0)(),n=(0,Mo.g)("images/focused_stroy_play.png"),[i,a]=(0,vv.p)(e,"#9BF0E1",n);return(0,lr.jsx)(th.ZP,{value:"signup-modal",children:(0,lr.jsx)(Vv,{image:i,mediaType:(0,c.RS)(e??"")?"mixed":"audio",onClose:()=>{t((0,Qs.dE)())},backgroundColor:a})})})),Gv=({className:e})=>(0,lr.jsxs)("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:[(0,lr.jsx)("rect",{width:"14.933",height:"14.933",x:"0.533",y:"0.533",fill:"#E22134",rx:"7.467"}),(0,lr.jsx)("path",{fill:"#fff",d:"M6.143 12V4.437h-1.28c-.15.79-.907 1.387-1.995 1.419v1.003h1.813V12h1.462zm5.092-5.13c0 .82-.65 1.343-1.386 1.343-.758 0-1.387-.512-1.387-1.344 0-.81.64-1.333 1.387-1.333.736 0 1.386.533 1.386 1.333zm-4 4.874c.384.245 1.12.416 1.75.416 2.56 0 3.893-1.61 3.893-4.341 0-2.4-1.397-3.542-2.997-3.542-1.611 0-2.859 1.088-2.859 2.635 0 1.59 1.227 2.539 2.603 2.539.853 0 1.514-.363 1.802-.843-.074 1.397-.96 2.261-2.453 2.261-.512 0-1.067-.16-1.355-.32l-.384 1.195z"}),(0,lr.jsx)("rect",{width:"14.933",height:"14.933",x:"0.533",y:"0.533",stroke:"#fff",strokeWidth:"1.067",rx:"7.467"})]});function Wv(e,t,n,i){if(n<=0||i<=0||i>1)return{height:-1,width:-1,parentHeight:e,parentWidth:t};const a=e*t,s=1/i*n,r=Math.sqrt(a/s);return{height:r,width:r*n,parentHeight:e,parentWidth:t}}const zv="dzS9k6yn4XzF3jWcS3W2",Kv="ezHLQVkVclgu_n15ybG6",Yv="gQ3lUcmizympex29IHL7",qv="VDUUJg30Ewzy9OP54arn",Zv={[Tv.Uo.SMALL]:1,[Tv.Uo.MEDIUM]:.72,[Tv.Uo.LARGE]:1.82},Qv={[Tv.Uo.SMALL]:0,[Tv.Uo.MEDIUM]:600,[Tv.Uo.LARGE]:1024},Jv=({image:e,onConfirm:t,backgroundColor:n})=>{const i=(e=>Object.keys(Qv).reverse().find((t=>e>=Qv[t]?t:null)))(window.innerWidth),{width:a,height:s,parentHeight:r}=function(e,t){const[n,i]=(0,sr.useState)((()=>Wv(window.innerHeight,window.innerWidth,e,t))),a=(0,sr.useRef)(),s=(0,sr.useCallback)((()=>{i(Wv(window.innerHeight,window.innerWidth,e,t))}),[e,t]);return(0,sr.useEffect)((()=>(a.current||(i(Wv(window.innerHeight,window.innerWidth,e,t)),window.addEventListener("resize",s),a.current=!0),()=>{a.current&&(i(Wv(window.innerHeight,window.innerWidth,e,t)),window.removeEventListener("resize",s),a.current=!1)})),[e,t,s]),n}(Zv[i],.3333333333333333),o=n?{backgroundColor:n}:{},l=((e,t,n,i)=>e===Tv.Uo.SMALL?{width:"100vw",height:"100vh"}:e===Tv.Uo.MEDIUM&&i<750||e===Tv.Uo.LARGE&&i<520?{width:"inherit",height:"inherit"}:{width:`${Math.ceil(t)}px`,height:`${Math.ceil(n)}px`})(i,a,s,r),d=(0,lr.jsxs)("span",{children:[(0,lr.jsx)("span",{className:Kv,children:u.ag.get("age.restriction.explicitContent")}),(0,lr.jsx)(Gv,{className:Yv})]}),c=(0,lr.jsx)(au.D,{colorSet:"invertedLight",onClick:t,children:u.ag.get("age.restriction.continue")});return(0,lr.jsx)(Pv,{className:uo()(zv,{[qv]:1===Zv[i]}),style:{...l,...o},image:e,title:u.ag.get("age.restriction.confirmAge"),description:d,primaryButton:c,size:i})};var $v=n(23451);const Xv="J2uBhFKAVeDnSUb6Diq_",ef="dlCbZFZLaxVOGbVUleiV",tf=()=>{const e=(0,$s.I0)(),{image:t,backgroundColor:n,providerUrl:i}=(0,$s.v9)((({ageRestriction:e})=>({image:"",backgroundColor:e.dialog.backgroundColor,providerUrl:e.dialog.providerUrl})));return(0,lr.jsxs)("div",{className:Xv,children:[(0,lr.jsx)(Jv,{image:t,onConfirm:()=>{window.location.assign(i)},backgroundColor:n}),(0,lr.jsx)("div",{className:ef,children:(0,lr.jsx)(mu.o,{onClick:()=>{e((0,$v.QN)())},children:u.ag.get("close")})})]})},nf=()=>{const e=(0,$s.I0)(),t=(0,$s.v9)((({ageRestriction:e})=>e.isOpen));return(0,lr.jsx)(ku.Z,{animated:!0,onRequestClose:()=>{e((0,$v.QN)())},contentLabel:u.ag.get("age.restriction.confirmAge"),isOpen:t,children:(0,lr.jsx)(tf,{})})};var af=n(92403);const sf="main-duplicateTrackModal-container",rf="main-duplicateTrackModal-title",of="main-duplicateTrackModal-description",lf="main-duplicateTrackModal-buttonContainer",df=(0,sr.memo)((function(){const e=(0,$s.I0)(),t=(0,sr.useContext)(Dc.ZF),{isOpen:n,playlistName:i,playlistUri:a,uris:s=[],onlyOneTrack:r,position:o={after:"end"},newUris:l=[]}=(0,$s.v9)((({duplicateTracks:e})=>{const t=!!e.uri;return{...e,onlyOneTrack:t,uris:t&&e.uri?[e.uri]:e.uris}})),d=l?.length,c=!r&&d,m=(0,sr.useCallback)((()=>{c&&t.add(a,l,o),e((0,af.o8)())}),[t,c,l,o,a,e]),p=(0,sr.useCallback)((()=>{t.add(a,s,o),e((0,af.o8)())}),[t,s,o,a,e]),g=(0,sr.useCallback)((()=>{e((0,af.o8)())}),[e]);let h;return h=c?u.ag.get("duplicate.tracks.someAlreadyAddedDescription",i):r?u.ag.get("duplicate.tracks.oneAlreadyAdded",i):u.ag.get("duplicate.tracks.allAlreadyAdded",i),(0,lr.jsx)(ku.Z,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:g,contentLabel:u.ag.get("duplicate.tracks.alreadyAdded"),isOpen:n,children:(0,lr.jsxs)("div",{className:sf,children:[(0,lr.jsx)(xo.D,{as:"h2",variant:"cello",className:rf,children:c?u.ag.get("duplicate.tracks.someAlreadyAdded"):u.ag.get("duplicate.tracks.alreadyAdded")}),(0,lr.jsx)(xo.D,{as:"p",variant:"mesto",className:of,paddingBottom:uu.g4V,children:h}),(0,lr.jsxs)("div",{className:uo()("encore-light-theme",lf),children:[(0,lr.jsx)(mu.o,{onClick:p,children:c?u.ag.get("duplicate.tracks.addAll"):u.ag.get("duplicate.tracks.addAnyway")}),(0,lr.jsx)(au.D,{onClick:m,children:c?u.ag.get("duplicate.tracks.addNewOnes"):u.ag.get("duplicate.tracks.dontAdd")})]})]})})}));var cf=n(52980);const uf=({children:e})=>(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(cf.b,{children:e})});var mf=n(91633);const pf="WuHfzknUICVJtLZJU_30",gf="FL2TkYu6_lxeXmfUTwx4",hf="Q63kq6vgG3LPQAi93zXP",kf="BLcZj2U0cGry7c3uk5qQ",vf="wCeOtCjqvDK0rflTnpuK",ff="dz7vC5O_M9gcvqxCqOnc",yf="zqGag8YfKcWwtZEqvghN";class Sf extends sr.PureComponent{static defaultProps={render:null};componentDidMount(){document.addEventListener("keydown",this.handleEscape)}componentWillUnmount(){document.removeEventListener("keydown",this.handleEscape)}handleEscape=({key:e})=>{const{onClose:t}=this.props;"Escape"===e&&t()};handleClick=e=>{e.preventDefault(),window.location.reload(!0)};createMarkupForMessage=e=>({__html:e});render(){const{allowHTML:e,isError:t,message:n,onClose:i,render:a}=this.props,s=a?a():n;return(0,lr.jsx)(mf.Z,{children:(null!==n||null!==a)&&(0,lr.jsx)(lv.Z,{classNames:"feedbackBar-animation",timeout:{enter:250,exit:200},children:(0,lr.jsxs)("div",{className:uo()(pf,{[gf]:this.props.isError,[kf]:this.props.isNotice,[hf]:this.props.isNotSupported,[vf]:this.props.isCookie}),"aria-live":"polite",children:[(0,lr.jsxs)("div",{className:ff,children:[e?(0,lr.jsx)("span",{dangerouslySetInnerHTML:this.createMarkupForMessage(n)}):s," ",t&&(0,lr.jsx)("a",{draggable:!1,className:yf,"aria-label":u.ag.get("error.reload"),onClick:this.handleClick,children:u.ag.get("error.reload")})]}),(0,lr.jsx)(mu.o,{buttonSize:"sm",iconOnly:Rm.k,onClick:i,"aria-label":"Close",semanticColor:"textBase"})]})})})}}const bf=Sf,_f="ABD0FGjBGqGZG33bP7Lc",Nf="iV_SwHyMafiGlMDhlcB5",Ef="gMEKhUL8rKx7DhSDUVk7",xf="Z0v7BXnINL5FxFXjQIzE",Cf=sr.memo((function({playlistUri:e}){const t=(0,$s.I0)(),n=(0,Qr.s0)(),i=(0,To.o)(),[a,s]=(0,Uu.Z)(e),r=(0,$s.v9)(hu.Gg).user,o=(0,Dc.ET)(e),{removeMember:l}=(0,Dc.Yv)(e),d=o?.permissions?.isPrivate,c=o?.canAdd,m=(0,sr.useCallback)((()=>{r?.id&&(i({intent:"playlisting",type:"click"}),a&&d&&s(!1),l(r?.id),t((0,Qs.mm)()),n("/collection/playlists"))}),[r?.id,i,a,d,l,t,n,s]),p=(0,sr.useCallback)((()=>{t((0,Qs.mm)())}),[t]),g=u.ag.get("leave-playlist.dialog.leave");let h=u.ag.get("leave-playlist.dialog.private-description");return d||(h=c?u.ag.get("leave-playlist.dialog.public-contributor-description"):u.ag.get("leave-playlist.dialog.public-listener-description")),(0,lr.jsx)(ku.Z,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:p,contentLabel:g,isOpen:!0,children:(0,lr.jsxs)("div",{className:_f,children:[(0,lr.jsx)(xo.D,{as:"h2",variant:"cello",className:Nf,children:u.ag.get("leave-playlist.dialog.title")}),(0,lr.jsx)(xo.D,{as:"p",variant:"mesto",className:Ef,paddingBottom:uu.g4V,children:h}),(0,lr.jsxs)("div",{className:uo()("encore-light-theme",xf),children:[(0,lr.jsx)(mu.o,{onClick:p,children:u.ag.get("leave-playlist.dialog.cancel")}),(0,lr.jsx)(au.D,{onClick:m,children:g})]})]})})})),wf=sr.memo((function(){const{isOpen:e,playlistUri:t}=(0,$s.v9)((e=>e.ui.leavePlaylistDialog));return t&&e?(0,lr.jsx)(Cf,{playlistUri:t}):null}));var If=n(49795);const Tf=e=>(0,lr.jsx)("img",{alt:"Zara Larsson",src:(0,Mo.g)("images/zara-larsson-singles.png"),...e});var Af=n(66777);const Pf="m7yI2BjDd8Jfq4bwU_IT",Of="A0uXWh53dpxhad3t59v_",Df="jN93nx_3NxRM0qYmOmjB",Rf="x_mFp6qsLw0AgSON4gdy",Lf="aS3WvPBqyZdP1S28pn6r",Ff="FvaVPD0bBm4QOZEKRYOm",jf="nRjGqzP1Yyg9utpJtFEG",Mf="lljaf1wMpxMQY1AVr1sf",Uf="Mhj98HFd0jXE916R2Ggz",Bf="TicfIwifH276e2046RzG",Vf="ONMHZOOfFwfCPGr5rKNp",Hf="ZQ94gWpWwDhhvQ7bRv9S",Gf="DNkhD0rW2qSWeBj4HBIZ",Wf=sr.memo((function(){const e=(0,$s.I0)(),t=(0,$s.v9)((e=>e.ui.loginToListenDialog.isOpen)),n=(0,To.o)();n({intent:"navigate",type:"view"});const i=(0,sr.useCallback)((()=>{n({intent:"close",type:"click"}),e((0,Qs.pW)())}),[e,n]),a=(0,sr.useCallback)((t=>{n({intent:"upgrade-to-premium",type:"click"}),e((0,Qs.pW)()),t?window.open(As.Np,"_blank"):window.open(As.li,"_blank")}),[e,n]);return(0,lr.jsx)(If.F,{property:Ns.jL,renderOldExperience:()=>(0,lr.jsx)(ku.Z,{animated:!0,isOpen:t,className:jf,overlayClassName:Mf,contentLabel:u.ag.get("mwp.d2p.modal.title"),onRequestClose:i,children:(0,lr.jsxs)("div",{className:Pf,children:[(0,lr.jsx)("div",{className:Ff,children:(0,lr.jsx)(Tf,{className:Of})}),(0,lr.jsxs)("div",{className:`${Ff}`,children:[(0,lr.jsx)("div",{className:Df,children:(0,lr.jsx)(Af.D,{color:"var(--spice-text)",height:"23"})}),(0,lr.jsx)(xo.D,{as:"h1",variant:"alto",children:u.ag.get("mwp.d2p.modal.title")}),(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",children:u.ag.get("mwp.d2p.modal.description")}),(0,lr.jsx)(au.D,{onClick:a.bind(null,!0),className:`${Rf}`,children:u.ag.get("mwp.d2p.modal.cta")}),(0,lr.jsx)(mu.o,{onClick:i,className:`${Rf} ${Lf}`,children:u.ag.get("mwp.d2p.modal.dismiss")})]})]})}),renderNewExperience:()=>(0,lr.jsx)(ku.Z,{animated:!0,isOpen:t,className:jf,overlayClassName:Mf,contentLabel:u.ag.get("mwp.d2p.modal.title"),onRequestClose:i,children:(0,lr.jsxs)("div",{className:`${Pf} ${Uf}`,children:[(0,lr.jsx)("div",{className:`${Ff} ${Gf}`,children:(0,lr.jsx)("img",{alt:u.ag.get("midyear.cta"),src:(0,Mo.g)("images/mid-year.png")})}),(0,lr.jsxs)("div",{className:`${Ff}`,children:[(0,lr.jsx)(xo.D,{as:"h1",variant:"alto",children:u.ag.get("midyear.title")}),(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",children:u.ag.get("midyear.intro")}),(0,lr.jsx)(au.D,{onClick:a,className:`${Rf} ${Bf}`,children:u.ag.get("midyear.cta")}),(0,lr.jsx)(mu.o,{onClick:i,className:`${Rf} ${Lf} ${Vf}`,children:u.ag.get("mwp.d2p.modal.dismiss")}),(0,lr.jsx)(xo.D,{as:"p",className:Hf,variant:"finale",dangerouslySetInnerHTML:{__html:u.ag.get("midyear.terms",{help_link:"https://www.spotify.com/legal/premium-promotional-offer-terms/"})}})]})]})})})})),zf=sr.memo((function(){return(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(Wf,{})})}));var Kf=n(60946),Yf=n(26449),qf=n(48710),Zf=n(18147),Qf=n(18600),Jf=n(89139),$f=n(67641),Xf=n(47746);const ey="CCeu9OfWSwIAJqA49n84",ty="NdVm10_yLWkkgq87jOMk",ny=sr.memo((function({onClick:e,iconReplacement:t=null,size:n=32,className:i}){const[a,s]=(0,sr.useState)(!1),r={"--button-size":`${n}px`};return(0,lr.jsx)("button",{className:uo()(ey,i,{[ty]:a}),style:r,"aria-label":a?u.ag.get("pause"):u.ag.get("playing"),onClick:e,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:t??(a?(0,lr.jsx)(Jo.k,{iconSize:n}):(0,lr.jsx)(Dd.d,{iconSize:n}))})})),iy="main-collectionLinkButton-iconWrapper",ay="rWC_mXq9vNEjP4yvvEeC",sy="main-collectionLinkButton-collectionLinkButton",ry="main-collectionLinkButton-icon",oy="main-collectionLinkButton-collectionLinkText",ly="main-collectionLinkButton-selected",dy="main-collectionLinkButton-dragEnter",cy="Frn4juLXf6zInWBEFFzr",uy="main-rootlist-statusIcons";var my=function(e){return e[e.xs=16]="xs",e[e.sm=24]="sm",e[e.md=32]="md",e}(my||{});const py=(0,sr.memo)((()=>{const{isPlaying:e,togglePlay:t}=(0,_s.O6)(),n=(0,_s.Kc)(),{metadata:i}=(0,_s.O9)(),[a,s]=(0,sr.useState)(!1),r=(0,sr.useCallback)((()=>{t()}),[t]);if(!n)return null;if(!i?.name)return null;const o=()=>e?(0,lr.jsx)(ny,{className:cy,size:16}):a?(0,lr.jsx)(ny,{className:cy,size:16,iconReplacement:(0,lr.jsx)(Qo.J,{iconSize:16,className:ay})}):null;return(0,lr.jsxs)("button",{className:sy,onClick:r,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,lr.jsx)("div",{className:ry,"aria-hidden":!0,children:(0,lr.jsx)("div",{className:iy,children:(0,lr.jsx)(Xf.E,{iconSize:my.xs})})}),(0,lr.jsx)(xo.D,{variant:"mestoBold",className:uo()("standalone-ellipsis-one-line",oy),children:i.name}),(0,lr.jsx)("div",{className:uy,children:(0,lr.jsx)(o,{})})]})}));var gy=n(30985),hy=n(32422),ky=n(8138),vy=n(63982),fy=n(65321),yy=n(84260);const Sy="main-createPlaylistButton-button",by="Jz6S0hp1vLCJM0pIKwow",_y="main-createPlaylistButton-icon",Ny="main-createPlaylistButton-createPlaylistIcon",Ey="Mvo56wLT_lMG_re9vA7W",xy="main-createPlaylistButton-text",Cy=(0,sr.memo)((function({spec:e}){const t=(0,Lo.$P)(),n=(0,To.o)(),i=(0,gg.k)(),[a,s]=(0,sr.useState)(!1),{createPlaylistFromAlbum:r,createPlaylistFromTracks:o,createPlaylist:l}=(0,Mu.K)(),{isAnonymous:d}=(0,$s.v9)(hu.Gg),m=(0,sr.useContext)(Dc.ZF).getCapabilities().canModifyOffline,p=!i&&!m,g=(0,Zo.y1)((async()=>{if(p)return;const i=d?t.logInteraction(e.hitUiReveal()):t.logInteraction(e.hitCreatePlaylist());n({targetUri:"",intent:"playlisting",type:"click",itemIdSuffix:"create-playlist"}),await l(i.interactionId)}),2e3,{leading:!0,trailing:!1}),h=(0,sr.useCallback)(((n,i)=>{d||t.logInteraction(e.dragCreatePlaylist());const a=i[yy.ZP[c.JM.ALBUM]];a&&a[0]&&r(a[0],{before:"start"});const s=[...i[yy.ZP[c.JM.TRACK]]||[],...i[yy.ZP[c.JM.LOCAL]]||[],...i[yy.ZP[c.JM.EPISODE]]||[]];s&&s[0]&&o(s,{before:"start"})}),[r,o,d,t,e]),k=(0,sr.useCallback)((()=>{s(!0)}),[]),v=(0,sr.useCallback)((()=>{s(!1)}),[]),f=(0,sr.useMemo)((()=>i?[yy.ZP[c.JM.ALBUM],yy.ZP[c.JM.TRACK],yy.ZP[c.JM.LOCAL],yy.ZP[c.JM.EPISODE]]:[]),[i]);return(0,lr.jsx)(fy.Z,{types:f,onDrop:h,onDragEnter:k,onDragLeave:v,children:(0,lr.jsx)(vy.D,{children:(0,lr.jsxs)("button",{type:"button",className:uo()(Sy,{[Ey]:a&&!p,[by]:p}),onClick:g,"":"create-playlist-button",children:[(0,lr.jsx)("div",{className:_y,children:(0,lr.jsx)("div",{className:Ny,children:(0,lr.jsx)(ky.S,{iconSize:12,"aria-hidden":!0})})}),(0,lr.jsx)(xo.D,{variant:"mestoBold",className:uo()(xy,"standalone-ellipsis-one-line"),children:u.ag.get("sidebar.playlist_create")})]})})})}));var wy=n(63815);const Iy="L3vU7A1LzZSa3DcQcnmK",Ty=()=>{const{syncing:e,currentItem:t,totalItems:n}=(0,wy.W)();return e?(0,lr.jsx)(xo.D,{as:"div",variant:"mesto",className:Iy,children:u.ag.get("download.progress-global",`${t}`,`${n}`)}):null},Ay="Ym_p2Bk1FWRtvgNjq2Ez",Py="PJuB4n2TjjZFBiWAW2zx",Oy=({percentage:e,ariaValueText:t})=>(0,lr.jsx)("div",{className:Ay,children:(0,lr.jsx)("div",{style:{transform:`translateX(-${100-Math.round(e)}%)`},className:Py,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(e),...t?{"aria-valuetext":t}:{}})}),Dy="ewscCyNhoCkYK_f_8jkz",Ry=()=>{const{syncing:e,percentage:t}=(0,wy.W)();return e?(0,lr.jsx)("div",{className:Dy,children:(0,lr.jsx)(Oy,{percentage:t})}):null};var Ly=n(37133),Fy=n(47203),jy=n(53523);const My="likedSongs",Uy={getTitle:()=>u.ag.get("action-trigger.liked-songs"),getDescription:()=>u.ag.get("action-trigger.login-liked-songs")},By=({children:e})=>(0,lr.jsx)(jy.P,{id:My,options:Uy,children:e});var Vy=n(79923),Hy=n(48607),Gy=n(77462),Wy=n(40495);const zy=sr.memo((function({children:e,contextUri:t,href:n,name:i,onClick:a,onDrop:s,types:r,spec:o,navigationalRoot:l}){const{pathname:d}=(0,Qr.TH)(),c=(0,Lo.$P)(),u=(0,To.o)(),[m,p]=(0,sr.useState)(!1),{isAnonymous:g}=(0,$s.v9)(hu.Gg),h=!!(0,Qr.bS)(n)?.pattern.end,k=(0,sr.useCallback)((async(e,t)=>{if(g)return;const n=r.flatMap((e=>t[yy.ZP[e]]));c.logInteraction(o.dragLike({itemToBeLiked:n[0]})),s?.(n)}),[g,s,r,c,o]),{isPlaying:v,isActive:f,togglePlay:y}=(0,Hy.n)({uri:t},{featureIdentifier:"your_library",referrerIdentifier:"your_library"}),S=(0,sr.useCallback)((e=>{g&&o.hitUiReveal?c.logInteraction(o.hitUiReveal()):g||d!==n&&c.logInteraction(o.hitUiNavigate({destination:n})),a?.(e)}),[g,o,a,c,d,n]),b=(0,sr.useCallback)((()=>{y()}),[y]),_=(0,sr.useCallback)((()=>{p(!0)}),[]),N=(0,sr.useCallback)((()=>{p(!1)}),[]),E=(0,sr.useCallback)((()=>{if(g)return;let e;e=v?o.doubleHitPause({itemToBePaused:t}):f?o.doubleHitResume({itemToBeResumed:t}):o.doubleHitPlay({itemToBePlayed:t});const n=c.logInteraction(e);y({loggingParams:n}),u({targetUri:t,intent:"play",type:"double-click"})}),[g,v,f,c,y,u,t,o]);return(0,lr.jsx)(fy.Z,{types:r.map((e=>yy.ZP[e])),onDrop:k,onDragEnter:_,onDragLeave:N,children:(0,lr.jsxs)(Wy.O,{to:n,referrer:"your_library",navigationalRoot:l,onClick:S,onDoubleClick:E,className:uo()(sy,{[dy]:m,[ly]:h}),children:[(0,lr.jsx)("div",{className:ry,children:e}),(0,lr.jsx)(xo.D,{variant:"mestoBold",className:uo()("standalone-ellipsis-one-line",oy),children:i}),(0,lr.jsx)("div",{className:uy,children:v?(0,lr.jsx)(ny,{className:cy,onClick:b,size:16}):t&&(0,lr.jsx)(Gy.$,{uri:t,size:16})})]})})})),Ky="main-likedSongsButton-likedSongsIcon",Yy=sr.memo((function({spec:e}){const{user:t,isAnonymous:n}=(0,$s.v9)(hu.Gg),i=(0,Vy.I2)(t?.id),a=i?.uri||"",s="/collection/tracks",r=(0,$s.I0)(),o=(0,Uu.y)(),l=(0,sr.useCallback)((async e=>{o&&e.length>0&&await o.add(...e)}),[o]),d=(0,sr.useCallback)((e=>{n&&(r((0,Xr.BH)(s)),e.preventDefault())}),[n,r,s]);return(0,lr.jsx)(By,{children:(0,lr.jsx)(zy,{contextUri:a,href:s,name:u.ag.get("sidebar.liked_songs"),types:[c.JM.TRACK],onClick:d,onDrop:l,spec:e,navigationalRoot:Fy.U.LIKED_SONGS,children:(0,lr.jsx)("div",{className:Ky,children:(0,lr.jsx)(Ly.a,{iconSize:12,"aria-hidden":!0})})})})}));var qy=n(50013),Zy=n(78586);const Qy="ftcQYbC5YLLX7tb_GcHP",Jy=({children:e})=>{const[t,n]=(0,ho.z)("search-callout-seen",!1),i=(0,Qr.TH)(),a=(0,sr.useCallback)((()=>{n(!0)}),[n]);return(0,sr.useEffect)((()=>{i.pathname.startsWith("/search")&&a()}),[i,a]),(0,lr.jsx)(Zy.G,{title:u.ag.get("navbar.search.callout-title"),description:u.ag.get("navbar.search.callout-description"),id:"searchCallout",visible:!t,onHide:a,onPrimaryButtonClick:()=>{},showButtons:!1,hideOnClickOutside:!1,placement:"left-start",tippyClassName:Qy,children:e})},$y=({children:e})=>(0,Xo.W6)(Ns.Jw)===Ns.pF.CALLOUT?(0,lr.jsx)(Jy,{children:e}):e,Xy=({children:e})=>(0,lr.jsx)(sr.Suspense,{fallback:e,children:(0,lr.jsx)($y,{children:e})});var eS=n(13973),tS=n(98042);const nS="main-yourEpisodesButton-yourEpisodesIcon",iS=sr.memo((function({spec:e}){const t=(0,eS.x)(),n=(0,$s.I0)(),i=(0,Uu.y)(),a=(0,sr.useCallback)((async e=>{i&&e.length>0&&(await i.add(...e),n((0,gu.kK)()))}),[n,i]);return t?.totalLength?(0,lr.jsx)(zy,{contextUri:t.uri,href:"/collection/episodes",name:u.ag.get("sidebar.your_episodes"),types:[c.JM.EPISODE],onDrop:a,spec:e,navigationalRoot:Fy.U.YOUR_EPISODES,children:(0,lr.jsx)(tS.P,{iconSize:16,"aria-hidden":!0,className:nS})}):null})),aS="yourLibrary",sS={getTitle:()=>u.ag.get("action-trigger.enjoy-library"),getDescription:()=>u.ag.get("action-trigger.login-library"),zIndex:5},rS=({children:e})=>(0,lr.jsx)(jy.P,{id:aS,options:sS,children:e});var oS=n(88443),lS=n(13557),dS=n(54299),cS=n(69040),uS=n(67458),mS=n(6385),pS=n(77675),gS=n(79102),hS=n(6142);const kS="main-rootlist-rootlist",vS="main-rootlist-rootlistContent",fS="main-rootlist-rootlistDividerContainer",yS="main-rootlist-rootlistDivider",SS="main-rootlist-rootlistDividerGradient",bS="main-rootlist-rootlistPlaylistsScrollNode",_S="main-rootlist-dropIndicator",NS="main-rootlist-textWrapper",ES="main-rootlist-expandArrow",xS="main-rootlist-expandArrowActive",CS="main-rootlist-rootlistItem",wS="main-rootlist-rootlistItemOverlay",IS="main-rootlist-rootlistItemLink",TS="main-rootlist-rootlistItemLinkActive",AS="UCEIwrWMxnBFH4uoPybJ",PS="xbsDt2_VfIDs0cQOXvgf",OS="ZcKzjCkYGeMizcSAP8UX",DS="daCBcwvAGyqpyuBNaWTY",RS="main-rootlist-statusIcons";var LS=function(e){return e[e.None=0]="None",e[e.Before=1]="Before",e[e.After=2]="After",e}(LS||{});const FS=(0,sr.memo)((function({uri:e,indentation:t,name:n,allowedDropTypes:i,onDrop:a,onDragOverItem:s,onDelete:r,onContextMenu:o,onTouchStart:l,onTouchEnd:d,expandFolder:u,children:p,spec:g}){const h=(0,Qr.s0)(),k=(0,sr.useRef)(null),v=(0,sr.useRef)(0),f=(0,hS.O)([e],n),y=(0,sr.useRef)(LS.None),S=(0,Lo.$P)();(0,sr.useEffect)((()=>()=>window.clearTimeout(v.current)),[]);const b=(0,sr.useCallback)((()=>{k.current?.contains(document.activeElement)&&r()}),[r]);(0,m.eY)(m.O4.DELETE,b);const _=(0,sr.useCallback)(((e,t)=>e.find((e=>t?.includes(e)))),[]),N=(0,sr.useCallback)((()=>{k.current&&(k.current.classList.remove(PS),window.clearTimeout(v.current),v.current=0,y.current=LS.None)}),[]),E=(0,sr.useCallback)((n=>{if(!k.current)return;const a=_(Array.from(n.dataTransfer.types),[hS.a[c.JM.PLAYLIST],hS.a[c.JM.FOLDER]]),r=_(Array.from(n.dataTransfer.types),i),{top:o,height:l}=k.current.getBoundingClientRect(),d=n.clientY{u()}),1e3):v.current=window.setTimeout((()=>{const t=(0,c.EC)(e)?.toURLPath(!0);t&&(h(t),S.logInteraction(g.dragUiNavigate({destination:t})))}),1e3)))}),[_,i,e,s,t,u,h,S,g]);return(0,lr.jsx)(fy.Z,{as:"div",types:[...i,hS.a[c.JM.PLAYLIST],hS.a[c.JM.FOLDER]],onDrop:a,onDragLeave:N,children:(0,lr.jsx)(lS.E,{innerRef:k,className:uo()(CS),style:{"--indentation":t},draggable:!0,onDragStart:f,onDragOver:E,onContextMenu:o,onTouchStart:l,onTouchEnd:d,"":"rootlist-item",children:p})})})),jS=sr.memo((function({name:e,onRename:t}){const n=(0,sr.useRef)(null),i=(0,sr.useCallback)((e=>{e.target.select()}),[]),a=(0,sr.useCallback)((e=>{"Enter"===e.key?t(e.target.value):"Escape"===e.key&&t(null)}),[t]),s=(0,sr.useCallback)((e=>{t(e.target.value)}),[t]);(0,sr.useEffect)((()=>{n.current&&n.current.focus()}),[]);const r=(0,sr.useCallback)((e=>{e.preventDefault(),e.stopPropagation()}),[]);return(0,lr.jsx)("input",{ref:n,type:"text","":"rename-input",className:DS,defaultValue:e,onFocus:i,onBlur:s,onKeyDown:a,draggable:!0,onDragStart:r})})),MS=sr.memo((function({uri:e,name:t,isRenaming:n,onRename:i,onDoubleClick:a,onKeyDown:s,children:r,spec:o}){const l=(0,Qr.s0)(),d=(0,sr.useRef)(null),u=`/${(0,c.EC)(e,{parseUnknown:!0})?.toURLPath()}`,m=(0,Lo.$P)(),p=(0,sr.useCallback)((()=>{m.logInteraction(o.hitUiNavigate({destination:u}))}),[u,m,o]);return n?(0,lr.jsx)(jS,{name:t,onRename:i}):(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)("div",{"aria-hidden":"true",className:wS,onDoubleClick:a,onClick:()=>{l(u,{state:{preventMoveFocus:!0,referrer:"playlists_sidebar"}}),d.current?.focus(),p()}}),(0,lr.jsx)(Wy.O,{ref:d,referrer:"playlists_sidebar",className:({isActive:e})=>uo()("standalone-ellipsis-one-line",IS,{[TS]:e}),to:u,onDoubleClick:a,onKeyDown:s,tabIndex:-1,onClick:p,children:(0,lr.jsx)(xo.D,{className:NS,dir:"auto",children:r})})]})}));var US=n(90055);const BS=(0,sr.memo)((function({folder:e,indentation:t,resolveItem:n,onDragOverItem:i,isExpanded:a,onToggleExpandedClick:s,index:r,spec:o}){const{createPlaylistFromAlbum:l,createPlaylistFromTracks:d}=(0,Mu.K)(),{addPlaylists:m,movePlaylists:p,renameFolder:g,moveFolder:h}=(0,tk.l)(),k=(0,$s.v9)((e=>e.platform.isDesktop)),[v,f]=(0,sr.useState)(!1),y=(0,$s.I0)(),S=(0,Lo.$P)(),b=(0,sr.useMemo)((()=>o.rootlistItemFactory({position:r,uri:e.uri})),[e.uri,r,o]),_=(0,gS.S)(),N=(0,sr.useCallback)(((t,i)=>{const a=n(i.all[0]),{top:s,height:r}=t.target.getBoundingClientRect(),u=t.clientY{f(!0)}),[]),x=(0,sr.useCallback)((t=>{t&&t!==name&&g(e,t),f(!1)}),[g,e]),C=(0,sr.useCallback)((()=>{a(e.uri)||s(e.uri)}),[e.uri,a,s]),w=(0,sr.useCallback)((()=>{a(e.uri)&&s(e.uri)}),[e.uri,a,s]),I=(0,sr.useCallback)((()=>{a(e.uri)?S.logInteraction(b.toggleFolderButtonFactory().hitUiHide()):S.logInteraction(b.toggleFolderButtonFactory().hitUiReveal()),s(e.uri)}),[e.uri,a,S,s,b]),T=(0,sr.useCallback)((()=>{y((0,Qs.Q2)(e.uri))}),[y,e.uri]),{togglePlay:A,isActive:P,isPlaying:O}=(0,Hy.n)({uri:e.uri},{featureIdentifier:"playlist",referrerIdentifier:"playlists_sidebar"}),D=(0,sr.useCallback)((()=>{k&&(P?O?S.logInteraction(b.doubleHitPause({itemToBePaused:e.uri})):S.logInteraction(b.doubleHitResume({itemToBeResumed:e.uri})):S.logInteraction(b.doubleHitPlay({itemToBePlayed:e.uri})),A())}),[e.uri,P,O,S,b,k,A]),R=(0,sr.useCallback)((e=>{e.repeat||("Backspace"!==e.key&&"Delete"!==e.key||T(),"Enter"===e.key&&D(),"ArrowRight"===e.key&&(_?w():C()),"ArrowLeft"===e.key&&(_?C():w()))}),[T,w,C,_,D]),L=(0,sr.useCallback)((()=>{S.logInteraction(b.secondaryHitUiReveal())}),[S,b]),F=(0,sr.useMemo)((()=>[hS.a[c.JM.PLAYLIST],hS.a[c.JM.FOLDER],hS.a[c.JM.TRACK],hS.a[c.JM.ALBUM],hS.a[c.JM.EPISODE]]),[]),j=`spotify:folder:${(0,c.EC)(e.uri)?.id}`;return(0,lr.jsx)(th.ZP,{value:"row",index:r,children:(0,lr.jsx)(dS._,{menu:(0,lr.jsx)(US.A,{reference:e,onRename:E,onCreateCallback:C}),onShow:L,children:(0,lr.jsxs)(FS,{uri:e.uri,indentation:t,name:e.name,allowedDropTypes:F,onDrop:N,onDragOverItem:i,onDelete:T,expandFolder:C,spec:b,children:[(0,lr.jsx)(MS,{uri:j,name:e.name,isRenaming:v,onRename:x,onKeyDown:R,onDoubleClick:D,spec:b,children:e.name}),(0,lr.jsx)(mu.o,{"aria-label":u.ag.get("sidebar.expand_folder"),iconOnly:pS.i,buttonSize:"sm",condensedAll:!0,onClick:I,tabIndex:-1,className:uo()(ES,{[xS]:a(e.uri)})})]})})})}));var VS=n(75430),HS=n(45265),GS=n(70079);const WS=(0,sr.memo)((function({indentation:e,onDragOverItem:t,resolveItem:n,playlistName:i,reference:a,canAdd:s,couldBePlayable:r,isCollaborative:o,index:l,spec:d}){const{uri:m}=a,[p,g]=(0,sr.useState)(i),[h,k]=(0,sr.useState)(!1),v=(0,To.o)(),{addPlaylists:f,movePlaylists:y,moveFolder:S}=(0,tk.l)(),{updateDetails:b}=(0,Dc.Yv)(m),_=(0,$s.I0)(),N=(0,Lo.$P)(),E=(0,sr.useMemo)((()=>d.rootlistItemFactory({position:l,uri:m})),[l,m,d]),{isPlaying:x,togglePlay:C,isActive:w}=(0,Hy.n)({uri:m},{featureIdentifier:"playlist",referrerIdentifier:"playlists_sidebar"});(0,sr.useEffect)((()=>{g(i)}),[i]);const I=(0,sr.useCallback)(((e,t)=>{const i=[...t[hS.a[c.JM.ALBUM]]||[],...t[hS.a[c.JM.TRACK]]||[],...t[hS.a[c.JM.LOCAL]]||[],...t[hS.a[c.JM.EPISODE]]||[]];if(i.length>0)_((0,af.jV)(m,i)),v({targetUri:m,intent:"add",type:"drop"}),N.logInteraction(E.dragAddToPlaylist({itemToBeAdded:i[0],playlist:m}));else{const i=t.all[0],s=n(i),{top:r,height:o}=e.target.getBoundingClientRect(),l=e.clientY{const e=N.logInteraction(E.pauseButtonFactory().hitPause({itemToBePaused:m}));C({loggingParams:e})}),[N,m,E,C]),A=(0,sr.useCallback)((()=>{if(!r)return;let e;e=w?x?E.doubleHitPause({itemToBePaused:m}):E.doubleHitResume({itemToBeResumed:m}):E.doubleHitPlay({itemToBePlayed:m});const t=N.logInteraction(e);C({loggingParams:t})}),[r,w,x,N,m,E,C]),P=(0,sr.useCallback)((()=>{k(!0)}),[]),O=(0,sr.useCallback)((e=>{e&&e!==i&&(g(e),b({name:e})),k(!1)}),[i,b]),D=(0,sr.useCallback)((()=>{_((0,Qs.p_)(m))}),[_,m]),R=(0,sr.useCallback)((e=>{e.repeat||("Backspace"!==e.key&&"Delete"!==e.key||(D(),N.logInteraction(E.keyStrokeDeletePlaylist({playlistToBeDeleted:m}))),"Enter"===e.key&&C())}),[D,N,m,E,C]),L=(0,sr.useCallback)((()=>{N.logInteraction(E.secondaryHitUiReveal())}),[N,E]),F=(0,sr.useMemo)((()=>s?[hS.a[c.JM.ALBUM],hS.a[c.JM.TRACK],hS.a[c.JM.LOCAL],hS.a[c.JM.EPISODE]]:[]),[s]);return(0,lr.jsx)(th.ZP,{value:"row",index:l,children:(0,lr.jsx)(Pl._P,{menu:(0,lr.jsx)(GS.j,{reference:a,onRename:P}),onShow:L,children:(0,lr.jsxs)(FS,{uri:m,indentation:e,name:p,allowedDropTypes:F,onDrop:I,onDragOverItem:t,onDelete:D,spec:E,children:[(0,lr.jsx)(MS,{uri:m,name:p,isRenaming:h,onRename:O,onDoubleClick:A,onKeyDown:R,spec:E,children:p}),(0,lr.jsx)("div",{className:RS,children:x?(0,lr.jsx)(ny,{className:OS,onClick:T,size:12}):(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(Gy.$,{uri:m,size:12}),o&&(0,lr.jsx)(HS.w,{label:u.ag.get("sidebar.collaborative_playlist"),children:(0,lr.jsx)("span",{"aria-label":u.ag.get("sidebar.collaborative_playlist"),children:(0,lr.jsx)(VS.R,{iconSize:12})})})]})})]})})})}));var zS=n(12880),KS=n(76270);const YS=32,qS=()=>{const e=(0,uS.C)(),{createFolder:t}=(0,Dc.lh)(),{spec:n}=(0,Lo.fU)(oS.createDesktopRootlistEventFactory,{}),i=(0,sr.useRef)(null),a=(0,sr.useRef)(null),[s=[],r]=(0,ho.z)("expanded-folder",[]),o=(0,sr.useCallback)((e=>s.includes((0,c.EC)(e)?.id)),[s]),l=(0,sr.useMemo)((()=>{if(!e)return[];const t=(e,n)=>e.reduce(((e,i)=>(((0,ha.lU)(i)||(0,ha.no)(i))&&i.name&&(e.push({rootlistItem:i,depth:n}),(0,ha.lU)(i)&&o(i.uri)&&(e=e.concat(t(i.items,n+1)))),e)),[]);return t(e.items,0)}),[e,o]),d=(0,sr.useMemo)((()=>l.reduce(((e,t,n)=>(e[t.rootlistItem.uri]=n,e)),{})),[l]),p=(0,sr.useCallback)((e=>{const t=[...s];e.forEach((e=>{const n=(0,c.EC)(e)?.id;t.includes(n)||t.push(n)})),t.length>s.length&&r(t)}),[s,r]);((e,t,n,i)=>{const a=(0,sr.useRef)(""),s=(0,Qr.TH)(),r=(0,sr.useMemo)((()=>{if(!n)return{};const e={},t=(n,i)=>{n.forEach((n=>{(0,ha.lU)(n)&&t(n.items,[...i,n.uri]),e[n.uri]=i}))};return t(n.items,[]),e}),[n]),o=(0,sr.useCallback)((t=>{if(!e.current)return;const{scrollTop:n,offsetHeight:i}=e.current;if(tn+i){const n=t-i/2;e.current.scrollTop=n}}),[e]);(0,sr.useEffect)((()=>{if(!e.current)return;const n=(0,c.EC)(s.pathname)?.toURI();if(n&&n!==a.current){const e=t[n];Number.isInteger(e)?(o(e*YS),a.current=n):i(r[n]??[])}}),[t,s,o,e,i,r])})(a,d,e,p);const g=(0,sr.useCallback)((()=>t(u.ag.get("playlist.default_folder_name"),{before:"start"})),[t]);(0,m.eY)(m.O4.CREATE_NEW_FOLDER,g);const h=(0,sr.useCallback)((e=>{i.current&&(e.currentTarget.contains(e.relatedTarget)||(i.current.style.display="none"))}),[]),k=(0,sr.useCallback)((()=>{i.current&&(i.current.style.display="none")}),[]),v=(0,sr.useCallback)(((e,t,n)=>{if(i.current&&a.current)if(n){const{top:n}=a.current.getBoundingClientRect();i.current.style.display="block",i.current.style.top=`${e-n+a.current.scrollTop}px`,i.current.style.setProperty("--indentation",t+1)}else i.current.style.display="none"}),[]),f=(0,sr.useCallback)((e=>{const t=(0,c.EC)(e)?.id,n=o(e),i=s.filter((e=>e!==t));n||i.push(t),r(i)}),[s,o,r]),y=(0,sr.useCallback)((t=>{const n=[e];for(;n.length>0;){const e=n.pop();if(!e)return null;for(let i=0;il.slice(e,t+1).reduce(((t,i,a)=>{const{rootlistItem:s,depth:r}=i;if((0,ha.lU)(s)&&t.push((0,lr.jsx)(BS,{folder:s,indentation:r,resolveItem:y,onDragOverItem:v,isExpanded:o,onToggleExpandedClick:f,index:e+a,spec:n},s.uri)),(0,ha.no)(s)){if((0,_s.MW)(s.uri))return t;t.push((0,lr.jsx)(WS,{indentation:r,resolveItem:y,onDragOverItem:v,reference:s,playlistName:s.name,canAdd:s.canAdd,couldBePlayable:s.totalLength>0,isCollaborative:(0,mS.c)(s),index:e+a,spec:n},s.uri))}return t}),[])),[l,v,f,o,y,n]);return e?(0,lr.jsx)(dS._,{menu:(0,lr.jsx)(zS.a,{position:{before:"start"},onCreateCallback:()=>{}}),children:(0,lr.jsx)("div",{className:AS,children:(0,lr.jsxs)(KS.U,{className:bS,ref:e=>{e&&!a.current&&(a.current=e.osInstance().getElements().viewport)},children:[(0,lr.jsx)(lS.A,{"":"rootlist",onDragLeave:h,onDrop:k,circular:!1,children:(0,lr.jsx)(cS.V,{renderRows:S,nrRows:l.length,rowHeight:YS,scrollNodeRef:a})}),(0,lr.jsx)("div",{className:_S,ref:i})]})})}):null},ZS=({isAnonymous:e,children:t})=>(0,lr.jsx)(Xs.L,{onError:e=>(0,Ls.vK)(e,"RootlistContainer"),children:(0,lr.jsx)(th.ZP,{value:"rootlist",children:(0,lr.jsx)("div",{className:kS,"":"rootlist-container",children:(0,lr.jsxs)("div",{className:vS,children:[t,!e&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsxs)("div",{className:fS,children:[(0,lr.jsx)("hr",{className:yS}),(0,lr.jsx)("div",{className:SS})]}),(0,lr.jsx)(qS,{})]})]})})})});var QS=n(36747);const JS=({uri:e,to:t,children:n,onDrop:i,onNavigate:a,className:s})=>{const[r,o]=(0,sr.useState)(!1),l=(0,sr.useRef)(null),d=(0,Qr.s0)(),u=(0,$s.I0)(),m=(0,Uu.y)(),p=(0,QS.o)(),g=(0,Ao.g)(),h=function(e){const t=(0,c.EC)(e),n=(0,$s.v9)(hu.n5);switch(t?.type){case c.JM.PLAYLIST:case c.JM.PLAYLIST_V2:{let e;if((0,c.WP)(t)&&(e=t.username),n&&e===n)return[yy.ZP[c.JM.TRACK],yy.ZP[c.JM.LOCAL],yy.ZP[c.JM.ALBUM]];break}case c.JM.COLLECTION:return[yy.ZP[c.JM.TRACK],yy.ZP[c.JM.ALBUM],yy.ZP[c.JM.ARTIST],yy.ZP[c.JM.PLAYLIST],yy.ZP[c.JM.PLAYLIST_V2],yy.ZP[c.JM.SHOW]];case c.JM.QUEUE:return[yy.ZP[c.JM.TRACK],yy.ZP[c.JM.LOCAL],yy.ZP[c.JM.EPISODE]];default:return[]}return[]}(e),k=!!h.length;return(0,sr.useEffect)((()=>(r?l.current=window.setTimeout((()=>{(0,c.wj)(e)||(a?.(),d(t||(0,c.EC)(e).toURLPath(!0)))}),1e3):!r&&l.current&&clearTimeout(l.current),()=>{l.current&&clearTimeout(l.current)})),[r,e,t,a,d]),k?(0,lr.jsx)(fy.Z,{types:h,onDrop:t=>{const n=(0,c.EC)(e),a=Array.from(t.dataTransfer.types).find((e=>h.includes(e))),s=a&&t.dataTransfer.getData(a),r=s&&s.split("\n")[0],o=(0,c.EC)(r);if(o&&n)switch(i?.(o.toURI()),n.type){case c.JM.PLAYLIST:case c.JM.PLAYLIST_V2:u((0,af.jV)(e,[o.toURI()]));break;case c.JM.COLLECTION:(0,c.YF)(o)||(0,c.OB)(o)||(0,c.wj)(o)?m.add(o.toURI()):(0,c.nK)(o)?p.add([o.toURI()],{before:"start"}):(0,c.RS)(o)&&m.add(o.toURI());break;case c.JM.QUEUE:g.addToQueue([{uri:o.toURI(),uid:null}])}},onDragEnter:()=>{o(!0)},onDragLeave:()=>{o(!1)},targetUri:e,className:s,children:n}):(0,lr.jsx)("div",{children:n})};var $S=n(20688);const XS=sr.memo(sr.forwardRef((function(e,t){const{isAnonymous:n,isBrowser:i}=e,a=(0,$s.I0)(),s=(0,Qr.TH)(),r=(0,$s.v9)(gy.br),o=u.ag.getUrlLocale(),l=(0,_s._n)(),d=(0,hy.S9)({localeFeatureFlag:r,urlLocale:o,type:"locale"})?`/${As.F0}${o}`:"/",{spec:c,logger:m}=(0,Lo.fU)($f.createDesktopRootNavigationEventFactory,{}),p=(0,sr.useMemo)((()=>c.libraryButtonFactory()),[c]),g=(0,sr.useMemo)((()=>c.createPlaylistButtonFactory()),[c]),h=(0,sr.useMemo)((()=>c.likedSongsButtonFactory()),[c]),k=(0,sr.useMemo)((()=>c.yourEpisodesButtonFactory()),[c]),v=(0,sr.useCallback)((e=>{if(n)return m.logInteraction(p.hitUiReveal()),a((0,Xr.G1)("/collection")),void e?.preventDefault();m.logInteraction(p.hitUiNavigate({destination:"spotify:app:collection"}))}),[n,p,m,a]),f=(0,sr.useCallback)((e=>{n||m.logInteraction(p.dragLike({itemToBeLiked:e}))}),[n,p,m]),y=(0,sr.useMemo)((()=>c.homeButtonFactory()),[c]),S=(0,sr.useCallback)((()=>{m.logInteraction(y.hitUiNavigate({destination:"spotify:app:home"}))}),[y,m]),b=(0,sr.useMemo)((()=>c.searchButtonFactory()),[c]),_=(0,sr.useCallback)((()=>{m.logInteraction(b.hitUiNavigate({destination:"spotify:app:search"}))}),[b,m]);return(0,lr.jsxs)("div",{className:$S.Z.navBar,children:[i&&(0,lr.jsx)("div",{className:$S.Z.banner,role:"banner",children:(0,lr.jsx)(th.ZP,{value:"spotify-logo",children:(0,lr.jsx)(su.Z,{className:$S.Z.logo,hasText:!0,customLink:d})})}),(0,lr.jsxs)("ul",{className:$S.Z.entryPoints,children:[(0,lr.jsx)("li",{className:uo()($S.Z.navBarItem,"InvalidDropTarget"),children:(0,lr.jsx)(th.ZP,{value:"0/browse",children:(0,lr.jsxs)(Wy.O,{to:d,referrer:"home",className:uo()("link-subtle",$S.Z.navBarLink,{[$S.Z.navBarLinkActive]:"/"===s.pathname}),onClick:S,children:[(0,lr.jsx)(Kf.A,{className:"home-icon","aria-hidden":"true"}),(0,lr.jsx)(Yf.v,{className:"home-active-icon","aria-hidden":"true"}),(0,lr.jsx)(xo.D,{variant:"mestoBold",className:"ellipsis-one-line",children:u.ag.get("view.web-player-home")})]})})}),(0,lr.jsx)("li",{className:uo()($S.Z.navBarItem,"InvalidDropTarget"),children:(0,lr.jsx)(th.ZP,{value:"1/search",children:(0,lr.jsxs)(Wy.O,{to:"/search",referrer:"search",className:uo()("link-subtle",$S.Z.navBarLink,{[$S.Z.navBarLinkActive]:s.pathname.startsWith("/search")||"search"===s.state?.pageId}),onClick:_,children:[(0,lr.jsx)(qf.j,{className:"search-icon","aria-hidden":"true"}),(0,lr.jsx)(Zf.g,{className:"search-active-icon","aria-hidden":"true"}),(0,lr.jsx)(Xy,{children:(0,lr.jsx)(xo.D,{variant:"mestoBold",className:"ellipsis-one-line",children:u.ag.get("navbar.search")})})]})})}),(0,lr.jsx)("li",{className:$S.Z.navBarItem,children:(0,lr.jsxs)(JS,{uri:"spotify:user:@:collection",to:"/collection",onDrop:f,onNavigate:v,className:$S.Z.navBarItemDropTarget,children:[(0,lr.jsx)(rS,{children:(0,lr.jsx)(th.ZP,{value:"2/collection",children:(0,lr.jsxs)(Wy.O,{to:"/collection",referrer:"your_library",className:uo()("link-subtle",$S.Z.navBarLink,{[$S.Z.navBarLinkActive]:s.pathname.startsWith("/collection")&&"/collection/tracks"!==s.pathname&&"/collection/episodes"!==s.pathname}),onClick:v,children:[(0,lr.jsx)(Qf.$,{className:"collection-icon","aria-hidden":"true"}),(0,lr.jsx)(Jf.n,{className:"collection-active-icon","aria-hidden":"true"}),(0,lr.jsx)(xo.D,{variant:"mestoBold",className:"ellipsis-one-line",children:u.ag.get("navbar.your-library")}),(0,lr.jsx)(Ty,{})]})})}),(0,lr.jsx)(Ry,{})]})})]}),(0,lr.jsxs)(ZS,{isAnonymous:n,children:[(0,lr.jsx)(Cy,{spec:g}),(0,lr.jsx)(Yy,{spec:h}),(0,lr.jsx)(iS,{spec:k}),l&&(0,lr.jsx)(py,{})]}),(0,lr.jsx)(qy.W,{ref:t,isAnonymous:n})]})})));var eb=n(47146);const tb="dz_h98rH9nZCwfPdnKgr",nb="rAfV2jB_HMM9Xtr0Rqvn",ib="XkXPpDRWozMF6G8_GlLQ",ab=sr.memo((function(e){const{handleClick:t}=e,n=(0,$s.v9)(eb.C7),i=u.ag.get("pta.bottom-bar.title"),a=u.ag.get("fta.bottom-bar.subtitle"),s=u.ag.get("fta.sign-up-free");return(0,lr.jsxs)("div",{className:tb,onClick:t,"":"signup-bar",children:[(0,lr.jsxs)("div",{className:nb,children:[(0,lr.jsx)(xo.D,{as:"p",variant:"minuet",children:i}),(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",dangerouslySetInnerHTML:{__html:n?u.ag.get("fta.bottom-bar.subtitle-two"):a}})]}),(0,lr.jsx)(au.D,{colorSet:"invertedLight",onClick:t,className:ib,children:n?u.ag.get("mwp.d2p.modal.cta"):s})]})}));var sb=n(10706);const rb="main-connectBar-connectBar",ob="main-connectBar-connected",lb="main-connectBar-connecting",db="XNFGOt0d88FSLb1T2WIQ",cb=sr.memo((function(e){const{status:t,deviceName:n,deviceType:i}=e,a=(0,sb.p0)(i,t),s=t===_t.TK.CONNECTED?u.ag.get("web-player.connect.bar.connected-state",{device_name:n}):u.ag.get("web-player.connect.bar.connecting-state",{device_name:n}),r={"encore-bright-accent-set":t===_t.TK.CONNECTED,[ob]:t===_t.TK.CONNECTED,[lb]:t===_t.TK.CONNECTING};return(0,lr.jsx)("div",{children:(0,lr.jsxs)(xo.D,{as:"div",variant:"mesto",className:uo()(rb,r),"aria-live":"polite",children:[(0,lr.jsx)(a,{iconSize:16,className:db,role:"presentation"}),s]})})}));var ub=n(67565),mb=n(28321);const pb=({className:e="",disabledClassName:t="",onClick:n})=>{const i=Oh(),a=(0,sr.useContext)(Fg),s=(0,vr.Y)((e=>e?.hasContext??!1)),r=(0,$s.I0)(),o=!s,l=(0,sr.useCallback)((async()=>{a?.current&&(n?.(!0),r((0,Qs.OC)()),Og(a.current))}),[r,a,n]),d=uo()(e,{[t]:o});return i?(0,lr.jsx)(nl._,{label:u.ag.get("npv.full-screen"),children:(0,lr.jsx)("button",{onClick:l,className:d,"aria-label":u.ag.get("npv.full-screen"),title:u.ag.get("npv.full-screen"),disabled:o,"":"fullscreen-mode-button",children:(0,lr.jsx)(Pk.i,{iconSize:16})})}):null},gb=(0,sr.memo)(pb);var hb=n(64320),kb=n(76126);function vb(e,t=((e,t)=>e===t)){const n=(0,Nc.D)(),[i,a]=(0,sr.useState)((()=>{const t=n.getState()??kr.$;return e(t)}));return(0,kb.l)(bt.F.UPDATE,(n=>{const s=n.data??kr.$,r=e(s);t(i,r)||a(r)})),i}var fb=n(65577),yb=n(56129),Sb=n(69392),bb=n(42583);const _b="oS5b2oKYN9E28TQ0vzh7",Nb="hnNnS6kEPDJtQfUOzSN7",Eb=({onClose:e,onMouseEnter:t,onMouseLeave:n,message:i})=>{const{spec:a,logger:s}=(0,Lo.fU)(bb.createDesktopConnectNudgeEventFactory,{}),r=a.connectFromDevicePickerNudgeFactory(),o=(0,Lo.Wi)(r);return(0,lr.jsxs)("div",{className:_b,onMouseEnter:t,onMouseLeave:n,ref:o,onClick:()=>{s.logInteraction(r.hitNoAction())},children:[(0,lr.jsx)(xo.D,{id:"nudgeBody",as:"p",variant:"ballad",semanticColor:"textBase",children:i}),(0,lr.jsx)(mu.o,{iconOnly:Rm.k,buttonSize:"sm",semanticColor:"textBase",onClick:t=>{t.stopPropagation(),s.logInteraction(r.closeButtonFactory().hitUiHide()),e()},"aria-label":u.ag.get("close"),className:Nb})]})};var xb=n(48234);const Cb=e=>!!e?.devices.length&&e.devices.some((e=>e.isLocalNetwork&&!e.isDisabled&&(e=>{switch(e.type){case _t.Yi.AUDIO_DONGLE:case _t.Yi.AVR:case _t.Yi.CAST_AUDIO:case _t.Yi.CAST_VIDEO:case _t.Yi.GAME_CONSOLE:case _t.Yi.SPEAKER:case _t.Yi.STB:case _t.Yi.TV:return!0;default:return!1}})(e))),wb=new Date(0).toISOString(),Ib=["shift+alt+f10"],Tb=e=>{const t=(0,sr.useRef)(),n=(0,sr.useRef)(!1),i=(0,$s.oR)(),a=(0,Ao.g)(),s=(0,Nc.D)(),[r,o]=(0,ho.z)("connect-nudge-triggered-at",wb);(0,xb.x)(Ib,(async()=>{const{platform:{isDeveloperMode:e}}=i.getState();if(e){const e=new Date;e.setHours(e.getHours()-8),o(e.toISOString())}}));const l=(0,sr.useCallback)((()=>{const e=i.getState(),t=a.getState(),n=s.getState(),o=new Date(r);o.setHours(o.getHours()+8);const l=o<=new Date;return document.hasFocus()&&(e=>e?.connectionStatus===_t.TK.NOT_CONNECTED)(n)&&!(0,Lg.CM)(t)&&Cb(n)&&!(({ui:e,ads:t,feedbackBubble:n})=>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||e.connectNudge.isOpen||!0===t.billboard?.isOpen&&!t.billboard.isMinimized||!1===t.vto?.isHidden&&!1===t.vto?.isMinimized||!n.isHidden)(e)&&l}),[i,a,s,r]),d=(0,sr.useCallback)((()=>{if(l()){const t=(new Date).toISOString();o(t),e()}}),[e,l,o]),c=(0,sr.useCallback)((e=>{e.data.action===ke.zr.PLAY?t.current=e.data.context.uri:e.data.action===ke.zr.RESUME&&(n.current=!0)}),[]);(0,Br.G)(ke.rg.ACTION,c);const u=(0,sr.useCallback)((e=>{"string"==typeof t.current&&(0,Lg.QL)(e.data,t.current)===he.PO.PLAYING?(t.current=void 0,d()):n.current&&!1===e.data?.isPaused&&(n.current=!1,d())}),[d]);(0,Br.G)(ke.rg.UPDATE,u)},Ab=e=>{const t=(0,sr.useRef)(),n=(0,sr.useRef)(!1),i=(0,sr.useRef)(!1),a=(0,$s.I0)(),s=(0,sr.useCallback)((()=>{i.current&&clearTimeout(t.current),a((0,Qs.IA)())}),[a]),r=(0,sr.useCallback)((()=>{i.current=!1,n.current||s()}),[s]),o=(0,sr.useCallback)((()=>{var n;t.current=window.setTimeout(r,(n=e,Math.min(Math.max(200*n.length,4e3),1e4))),a((0,Qs.Io)()),i.current=!0}),[a,e,r]),l=(0,sr.useCallback)((e=>{n.current=e,e||i.current||s()}),[s]);return(0,sr.useMemo)((()=>({hideNudge:s,showNudge:o,setShouldKeepShowingNudge:l})),[s,o,l])},Pb=({children:e,triggerRef:t})=>{const n=(0,Xo.W6)(Ns.qX),i=u.ag.get("web-player.connect.nudge.listen-to-speaker"),{isNudgeVisible:a,isDevicePickerOpen:s}=(0,$s.v9)((({ui:e})=>({isNudgeVisible:e.connectNudge.isOpen,isDevicePickerOpen:e.connectDevicePicker.isOpen}))),r=(0,el.s4)(),{showNudge:o,hideNudge:l,setShouldKeepShowingNudge:d}=Ab(i),c=(0,sr.useCallback)((()=>{r.send((0,yb.U)({nudge_was_shown:n})),n&&o()}),[r,o,n]);return Tb(c),(0,sr.useEffect)((()=>{s&&l()}),[s,l]),(0,lr.jsx)(Sb.x,{placement:"top",visible:a,overlay:(0,lr.jsx)(Eb,{onClose:l,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),message:i}),childRef:t,popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,padding:24,tether:!1}}]},onHide:()=>{},fadeOut:!0,useLazyMounting:!0,children:e})},Ob="main-connectPicker-controlButton",Db="main-connectPicker-button",Rb="main-connectPicker-indicator",Lb="main-connectPicker-connecting",Fb="main-connectPicker-connected",jb="main-connectPicker-connectingIcon",Mb="device-picker-icon-button",Ub=(0,sr.forwardRef)((({isPickerOpen:e,onClick:t,onLogInteraction:n},i)=>{const a=(0,sr.useRef)(null),{spec:s,logger:r}=(0,Lo.fU)(fb.createDesktopConnectDevicePickerBtnEventFactory,{}),o=(0,$s.v9)((e=>e.ui.connectNudge.isOpen)),l=vb((e=>e.connectionStatus)),d=vb((e=>e.connectionStatus===_t.TK.CONNECTING?e.connectingDevice:e.connectionStatus===_t.TK.CONNECTED?e.activeDevice:void 0)),c=(0,sb.z$)(d?.type,d?.isGroup),m={"encore-bright-accent-set":l===_t.TK.CONNECTED,[Fb]:l===_t.TK.CONNECTED,[Lb]:l===_t.TK.CONNECTING};return(0,lr.jsx)(Pb,{triggerRef:a,children:(0,lr.jsx)(nl._,{label:u.ag.get("playback-control.connect-picker"),disabled:e||o,children:(0,lr.jsxs)("div",{className:Db,ref:a,children:[(0,lr.jsx)("div",{className:uo()(Rb,m)}),(0,lr.jsx)("button",{className:uo()("control-button",{"control-button--active":l===_t.TK.CONNECTED},Ob),onClick:i=>{const{interactionId:a}=r.logInteraction(((e,t,n)=>{let i;return i=t===_t.TK.CONNECTING?e.connectingButtonFactory():t===_t.TK.CONNECTED?e.connectedButtonFactory():e.notConnectedButtonFactory(),n?i.hitUiHide():i.hitUiReveal()})(s,l,e));n?.(a),t?.(i)},ref:i,"aria-label":u.ag.get("playback-control.connect-picker"),"aria-expanded":e,id:Mb,children:(0,lr.jsx)(c,{className:uo()({[jb]:l===_t.TK.CONNECTING}),iconSize:16,role:"presentation"})})]})})})}));function Bb(e){return window.cast&&e!==window.cast.framework.CastState.NO_DEVICES_AVAILABLE}const Vb=()=>{const e=(0,br.qT)();(0,sr.useEffect)((()=>{const t=t=>{"Escape"===t.key&&e({type:"close"})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[e])};var Hb=n(65725),Gb=n(72556),Wb=n(94174);const zb=e=>e instanceof Hb.DesktopConnectDevicePickerEventFactory.ContainerViewEventFactory.DeviceListEventFactory.RemoteDeviceEventFactory||e instanceof Hb.DesktopConnectDevicePickerEventFactory.ContainerViewEventFactory.DeviceListEventFactory.DisabledDeviceEventFactory||e instanceof Hb.DesktopConnectDevicePickerEventFactory.ContainerViewEventFactory.OffNetworkDeviceListEventFactory.RemoteDeviceEventFactory||e instanceof Hb.DesktopConnectDevicePickerEventFactory.ContainerViewEventFactory.OffNetworkDeviceListEventFactory.DisabledDeviceEventFactory||e instanceof Hb.DesktopConnectDevicePickerEventFactory.ContainerViewEventFactory.OnNetworkDeviceListEventFactory.RemoteDeviceEventFactory,Kb=(0,sr.createContext)({rowWithMenuOpenIdentifier:null,setRowWithMenuOpenIdentifier:()=>{}}),Yb=({children:e})=>{const[t,n]=(0,sr.useState)(null);return(0,lr.jsx)(Kb.Provider,{value:{rowWithMenuOpenIdentifier:t,setRowWithMenuOpenIdentifier:n},children:e})};var qb=n(35394),Zb=n(9173),Qb=n(17520),Jb=n(96959),$b=n(37433),Xb=n(70745);const e_="LVp1auH4vtD3hvb1s4gl",t_="zhMeyG5OMnE0jnMyORbf",n_=({deviceId:e,connectStateDeviceId:t,allowForgetDevice:n,incarnation:i})=>{const a=(0,Nc.D)(),s=(0,Lo.$P)(),{spec:r}=(0,Lo.fU)(Xb.createDesktopConnectContextMenuEventFactory,{}),o=(0,Lo.Wi)(r),l=r.forgetDeviceButtonFactory(),d=(0,Lo.Wi)(l),c=r.deviceIncarnationContainerFactory(),m=(0,Lo.Wi)(c);return n||i?(0,lr.jsx)("span",{ref:o,className:t_,children:(0,lr.jsxs)(gd.v,{children:[n&&(0,lr.jsx)(kd.s,{role:"menuitem",leadingIcon:(0,lr.jsx)(Jb.H,{iconSize:16}),onClick:()=>{s.logInteraction(l.hitLogoutFromRemoteDevice({remoteDeviceId:t})),a.logout(e)},elementRef:d,children:u.ag.get("web-player.connect.context-menu.forget-device")}),i&&(0,lr.jsxs)("div",{ref:m,children:[(0,lr.jsx)(hd.F,{children:u.ag.get("web-player.connect.context-menu.incarnation-title")}),i.available.map((n=>{const{icon:r,text:o}=(e=>{switch(e){case"connect":return{icon:(0,lr.jsx)(Zb.W,{iconSize:16}),text:u.ag.get("web-player.connect.context-menu.incarnation-connect")};case"cast":return{icon:(0,lr.jsx)(Qb.O,{iconSize:16}),text:u.ag.get("web-player.connect.context-menu.incarnation-cast")};default:return{}}})(n);return(0,lr.jsx)(kd.s,{role:"menuitemradio",leadingIcon:r,onClick:()=>{let r;switch(n){case"cast":r=c.googleCastButtonFactory();break;case"connect":r=c.spotifyConnectButtonFactory()}i.preferred!==n?(r&&s.logInteraction(r.hitChangeRemoteDeviceIncarnation({remoteDeviceId:t})),a.setPreferredIncarnation(e,n)):r&&s.logInteraction(r.hitNoAction())},"aria-checked":i.preferred===n,CheckedIcon:$b.N,children:o},n)}))]})]})}):null},i_=({title:e,deviceId:t,connectStateDeviceId:n,allowForgetDevice:i,incarnation:a,className:s,onHide:r,onShow:o,spec:l})=>{const[d,c]=(0,sr.useState)(!1),m=l.contextMenuButtonFactory({identifier:n}),p=(0,Lo.$P)(),g=(0,Lo.Wi)(m);return(0,lr.jsx)(Pl.yj,{renderInline:!0,menu:(0,lr.jsx)(Lo.Nh,{spec:m,children:(0,lr.jsx)(n_,{deviceId:t,connectStateDeviceId:n,allowForgetDevice:i,incarnation:a})}),onShow:()=>{c(!0),o?.()},onHide:()=>{c(!1),r?.()},offset:[0,-8],children:(0,lr.jsx)(qb.z,{ref:g,size:qb.q.xs,label:u.ag.get("more.label.context",e),className:uo()(e_,s),onClick:()=>{p.logInteraction(d?m.hitUiHide():m.hitUiReveal())}})})},a_="bk509U3ZhZc9YBJAmoPB",s_="ItaYxdM8MiuHsa2VXuGQ",r_="NY718ElwUbdZDytyiOBX",o_="HVCCFeUiHVwZVv74p34a",l_="bzmsYhq8qXerwAFF0AUJ",d_="ErSD7TARZzk270zuVjoi",c_="bSVIjPzgLuQbllliZ_AH",u_="lO__l5r92n_Ypx9wHL2i",m_="_3sSheG_prEUSigJ05sSB",p_="hwP4Oum2PB765sb8jigI",g_="tyZF5iwaJ6J5raHWkxwu",h_="ntdp2T_przGKYzhwYSGz",k_="VqUjiYOlfxlk_lFOusZ7",v_="zFqMGX3h5z2CO3f2uEiL",f_="pUkuSEO5HGdvTiujyI6H",y_="tm3lCLoFzk25Q_df5g5K",S_="IdxmFS96lyE7c5uiTnLM",b_="h3qSlLeqACMUaASiKDHa",__="MMjN8VsyKsAlLjFw4RMa",N_="AXkwHpGa_BG7Dy4v7o2V",E_="pXrRjiuo3ZpGwIvDAGzJ",x_="hcuLp8V4uEEfWZ4k6aLV",C_="_k3JjF2rHwdYfSPZH09S",w_="uWvwXlS0Da1bWsRX6KOw",I_="MNgY3fBEKs4U6SbZD2lo",T_="SzZayhxQEuTPMFgNrLOG",A_="gz7xPnsQVKVMnQY2KjJs",P_="E9qsFEgJZJnARk6hOCsj",O_="TJ5Bjp6vgnWVbh6mGN0n",D_="YY5a3DPS6akIYNqJdwn3",R_="mRU5_ANCjbwEWMpQZAKI",L_="_TOFVR3NTBR51N6BHDth",F_="AN2rvWrkrs7UsnY12hL8",j_="YUyFyiI58gL8VuLdbOD6",M_="QClIatTm05fvjVzODr8X",U_="OTuSSciCS3NJqFG8OKX2",B_="rsaJ_PD5Wsx9a9H2IyV_",V_="uBthvyMcAxMlCFFpafAJ",H_="gjcW3C9lFUaizYicV2Ky",G_="d03rm63o9oNz4ePSJqcJ",W_="iLv0NHO4Fxyuc1rTBI1Z",z_=({customClassName:e})=>(0,lr.jsxs)("svg",{width:"29",height:"16",viewBox:"0 0 29 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,lr.jsx)("title",{children:"HiFi"}),(0,lr.jsx)("rect",{width:"29",height:"16",rx:"2",className:u_}),(0,lr.jsx)("path",{d:"M11.882 11.5V4.7645H10.3715V7.4055H7.683V4.7645H6.182V11.5H7.683V8.821H10.3715V11.5H11.882ZM14.6918 11.5V6.7785H13.2478V11.5H14.6918ZM13.1243 5.3345C13.1243 5.8 13.5043 6.18 13.9603 6.18C14.4353 6.18 14.8153 5.8 14.8153 5.3345C14.8153 4.869 14.4353 4.489 13.9603 4.489C13.5043 4.489 13.1243 4.869 13.1243 5.3345ZM17.5729 11.5V8.9825H20.0619V7.6145H17.5634V6.1895H20.4039V4.7645H16.0624V11.5H17.5729ZM22.8002 11.5V6.7785H21.3562V11.5H22.8002ZM21.2327 5.3345C21.2327 5.8 21.6127 6.18 22.0687 6.18C22.5437 6.18 22.9237 5.8 22.9237 5.3345C22.9237 4.869 22.5437 4.489 22.0687 4.489C21.6127 4.489 21.2327 4.869 21.2327 5.3345Z",fill:"white"})]}),K_=(0,sr.forwardRef)((function({deviceId:e,connectStateDeviceId:t,Icon:n,TechIcon:i,title:a,subtitle:s,helpTooltip:r,supportsHiFi:o,canLogout:l,isDisabled:d,incarnation:c,onClick:u,spec:m},g){const{rowWithMenuOpenIdentifier:h,setRowWithMenuOpenIdentifier:k}=(0,sr.useContext)(Kb),v=(0,p.wW)(),f=!d&&v&&o,y=(0,sb.eX)(c),S=l||y,b=(0,br.qT)(),_=(0,gS.S)();return(0,lr.jsxs)("li",{className:l_,ref:g,children:[(0,lr.jsx)("button",{className:uo()(x_,d_,{[c_]:h===e}),onClick:()=>{d||(u&&u(),b({type:"close"}))},"aria-disabled":d,"aria-label":s?`${a} ${s}`:a,children:(0,lr.jsxs)("div",{className:uo()(y_,I_),children:[(0,lr.jsx)(n,{iconSize:32,semanticColor:d?void 0:"textBase",className:w_,"":"main-icon",role:"presentation"}),(0,lr.jsxs)("div",{className:uo()(R_,S&&A_),children:[(0,lr.jsxs)("div",{className:O_,children:[(0,lr.jsx)("div",{className:P_,children:(0,lr.jsx)(Wb.R,{equalGradientWidth:!0,title:a,children:(0,lr.jsx)(xo.D,{variant:"ballad",semanticColor:d?void 0:"textBase",className:C_,children:a})},`picker-row-title-${e}`)}),f&&(0,lr.jsx)(z_,{customClassName:L_})]}),(0,lr.jsxs)("div",{className:O_,children:[i&&(0,lr.jsx)(i,{iconSize:16,semanticColor:"textSubdued",className:D_,"":"sub-icon",role:"presentation"}),s&&(0,lr.jsx)("div",{className:P_,children:(0,lr.jsx)(Wb.R,{equalGradientWidth:!0,title:s,children:(0,lr.jsx)(xo.D,{variant:"finale",semanticColor:d?void 0:"textSubdued",className:C_,children:s})},`picker-row-subtitle-${e}`)}),r&&(0,lr.jsx)("div",{className:G_,children:(0,lr.jsx)(Gb.e,{message:r,placement:_?"right":"left",messageClassName:W_})})]})]})]})}),S&&zb(m)&&(0,lr.jsx)(i_,{title:a,deviceId:e,connectStateDeviceId:t,allowForgetDevice:l,incarnation:y?c:void 0,className:m_,onShow:()=>{k(e)},onHide:()=>{k(null)},spec:m})]})})),Y_=({position:e,deviceId:t,connectStateDeviceId:n,deviceName:i,deviceType:a,deviceModelName:s,isGroup:r,disabledReason:o,canLogout:l,spec:d})=>{const c=(0,sb.z$)(a,r),{helpText:u,tooltip:m}=(0,sb.j_)(o,(0,sb.s$)(a,s)),p=d.disabledDeviceFactory({identifier:n,position:e,reason:o}),g=(0,Lo.Wi)(p);return(0,lr.jsx)(K_,{deviceId:t,connectStateDeviceId:n,ref:g,isDisabled:!0,Icon:c,title:i,subtitle:u,helpTooltip:m,canLogout:l,spec:p})},q_={CAST_STATE_CHANGED:"CAST_STATE_CHANGED",TOGGLE_CAST:"TOGGLE_CAST",SET_CONNECTING_CAST_DEVICE_ID:"SET_CONNECTING_CAST_DEVICE_ID",RESET_CONNECTING_CAST_DEVICE_ID:"RESET_CONNECTING_CAST_DEVICE_ID"},Z_=e=>({type:q_.CAST_STATE_CHANGED,castState:e}),Q_=({isDisabled:e=!1})=>{const{spec:t,logger:n}=(0,Lo.fU)(Hb.createDesktopConnectDevicePickerEventFactory,{}),i=(0,$s.I0)(),a=t.containerViewFactory().deviceListFactory().castPlaceholderFactory(),s=(0,Lo.Wi)(a),r=(0,sb.p0)(_t.Yi.CAST_AUDIO,"disconnected");return(0,lr.jsx)(K_,{deviceId:"cast-placeholder",connectStateDeviceId:"cast-placeholder",ref:s,Icon:r,title:u.ag.get("web-player.connect.device-picker.google-cast-devices"),supportsHiFi:!1,onClick:()=>{n.logInteraction(a.hitUiReveal()),i({type:q_.TOGGLE_CAST})},isDisabled:e,spec:a})},J_=({deviceId:e,connectStateDeviceId:t,deviceName:n,supportsHiFi:i,spec:a})=>{const s=(0,Lo.$P)(),r=a.localDeviceFactory(),o=(0,sb.z$)(_t.Yi.COMPUTER,!1),l=(0,Nc.D)();return(0,lr.jsx)(K_,{deviceId:e,connectStateDeviceId:t,Icon:o,title:n,supportsHiFi:i,onClick:()=>{const{interactionId:t,pageInstanceId:n}=s.logInteraction(r.hitPullPlaybackToLocalDevice());l.transferPlayback(e,{interactionId:t,pageInstanceId:n})},spec:r})},$_=({position:e,deviceId:t,connectStateDeviceId:n,deviceName:i,deviceType:a,isGroup:s,supportsHiFi:r,canLogout:o,incarnation:l,spec:d})=>{const c=(0,Lo.$P)(),m=d.remoteDeviceFactory({identifier:n,position:e}),p=(0,sb.z$)(a,s);let g,h;(0,sb.jc)(a)&&(g=(0,sb.p0)(a,"disconnected"),h=u.ag.get("web-player.connect.device-picker.google-cast"));const k=(0,Nc.D)(),v=(0,Lo.Wi)(m);return(0,lr.jsx)(K_,{deviceId:t,connectStateDeviceId:n,ref:v,Icon:p,TechIcon:g,title:i,subtitle:h,supportsHiFi:r,canLogout:o,incarnation:l,onClick:()=>{const{interactionId:e,pageInstanceId:i}=c.logInteraction(m.hitConnectToRemoteDevice({remoteDeviceId:n}));k.transferPlayback(t,{interactionId:e,pageInstanceId:i})},spec:m})},X_=()=>(0,vr.Y)((e=>(e?.restrictions?.disallowTransferringPlaybackReasons?.length??0)>0)),eN="device-picker-section-heading",tN=({foundDevices:e})=>{const t=e?u.ag.get("web-player.connect.device-picker.select-another-device"):u.ag.get("web-player.connect.device-picker.no-devices-found");return(0,lr.jsx)("span",{className:S_,id:eN,children:(0,lr.jsx)(xo.D,{as:"h4",variant:"balladBold",semanticColor:"textBase",className:S_,children:t})})};var nN=n(72133),iN=n(66604);const aN=()=>{const e=(0,iN.T)();return(0,lr.jsx)(lr.Fragment,{children:e?(0,lr.jsx)(nN.i,{iconSize:32,semanticColor:"textBrightAccent",className:w_,"":"now-playing-active"}):(0,lr.jsx)("img",{className:w_,width:"32",height:"32",alt:"","aria-hidden":"true",src:(0,Mo.g)("images/device-picker-equaliser-animation.webp"),"":"animated-now-playing"})})},sN="device-picker-header",rN=({isLocalDevice:e,deviceName:t,deviceType:n,isGroup:i,supportsHiFi:a,canLogout:s,incarnation:r,isPlaying:o,deviceId:l,connectStateDeviceId:d})=>{const{spec:c}=(0,Lo.fU)(Hb.createDesktopConnectDevicePickerEventFactory,{}),m=(0,p.wW)(),g=m&&a,h=(0,sb.eX)(r),k=s||h;let v;if(o)v=(0,lr.jsx)(aN,{});else{const e=(0,sb.z$)(n,i);v=(0,lr.jsx)(e,{iconSize:32,semanticColor:"textBrightAccent",className:w_,"":"device-icon",role:"presentation"})}const f=(0,lr.jsx)("div",{className:P_,children:(0,lr.jsx)(Wb.R,{equalGradientWidth:!0,title:u.ag.get("web-player.connect.device-picker.current-device"),children:(0,lr.jsx)(xo.D,{as:"h3",variant:"cello",semanticColor:"textBase",children:u.ag.get("web-player.connect.device-picker.current-device")})},`picker-header-title-${t}`)});let y,S;e?y=m?u.ag.get("web-player.connect.device-picker.this-computer"):u.ag.get("web-player.connect.device-picker.this-web-browser"):(y=t,S=(0,sb.p0)(n,"connected"));const b=(0,lr.jsxs)("div",{className:O_,children:[S&&(0,lr.jsx)(S,{iconSize:16,semanticColor:"textBrightAccent",className:D_,"":"tech-icon"}),(0,lr.jsx)("div",{className:P_,children:(0,lr.jsx)(Wb.R,{equalGradientWidth:!0,title:y,children:(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",semanticColor:"textBrightAccent",children:y})},`picker-header-subtitle-${t}`)}),g&&(0,lr.jsx)(z_,{customClassName:L_})]});return(0,lr.jsxs)("div",{className:uo()(y_,N_),id:sN,children:[v,(0,lr.jsxs)("div",{className:uo()(T_,k&&A_),children:[f,b]}),k&&(0,lr.jsx)(i_,{title:y,deviceId:l,connectStateDeviceId:d,allowForgetDevice:s,incarnation:h?r:void 0,className:E_,spec:c.containerViewFactory().headerFactory().activeDeviceFactory()})]})},oN=({devices:e,areWebPlayerCastDevicesAvailable:t=!1,networkHeadingID:n="",spec:i})=>{const a=(0,p.wW)(),s=X_(),r=(0,Lo.Wi)(i),o=(e,t)=>{const n=a?u.ag.get("web-player.connect.device-picker.this-computer"):u.ag.get("web-player.connect.device-picker.this-web-browser");return false?(0,lr.jsx)(Y_,{position:e.isLocal?0:t+1,deviceId:e.id,connectStateDeviceId:e.connectStateId,deviceName:e.isLocal?n:e.name,deviceType:e.isLocal?_t.Yi.COMPUTER:e.type,deviceModelName:e.modelDisplayName,isGroup:e.isGroup,disabledReason:e.currentState??_t.uP.UNKNOWN,canLogout:!e.isLocalNetwork&&e.supportsLogout,spec:i},e.id):e.isLocal&&(e=>e instanceof Hb.DesktopConnectDevicePickerEventFactory.ContainerViewEventFactory.DeviceListEventFactory||e instanceof Hb.DesktopConnectDevicePickerEventFactory.ContainerViewEventFactory.OnNetworkDeviceListEventFactory)(i)?(0,lr.jsx)(J_,{deviceId:e.id,connectStateDeviceId:e.connectStateId,deviceName:n,supportsHiFi:e.hifiSupport.fullySupported,spec:i},e.id):(0,lr.jsx)($_,{position:t+1,deviceId:e.id,connectStateDeviceId:e.connectStateId,deviceName:e.name,deviceType:e.type,isGroup:e.isGroup,supportsHiFi:e.hifiSupport.fullySupported,canLogout:!e.isLocalNetwork&&e.supportsLogout,incarnation:e.incarnation,spec:i},e.id)};return(0,lr.jsxs)("ul",{"aria-labelledby":`${sN} ${eN} ${n}`,ref:r,children:[e.map(((e,t)=>o(e,t))),t&&(0,lr.jsx)(Q_,{isDisabled:s})]})},lN="local-network-heading",dN="other-networks-heading",cN=({localNetworkDevices:e,otherNetworksDevices:t,spec:n})=>(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(xo.D,{as:"h5",variant:"viola",semanticColor:"textSubdued",className:b_,id:lN,children:e.length>0?u.ag.get("web-player.connect.device-picker.on-this-network"):u.ag.get("web-player.connect.device-picker.no-devices-local-network")}),e.length>0&&(0,lr.jsx)(oN,{devices:e,networkHeadingID:lN,spec:n.onNetworkDeviceListFactory()}),t.length>0&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(xo.D,{as:"h5",variant:"viola",semanticColor:"textSubdued",className:uo()(b_,__),id:dN,children:u.ag.get("web-player.connect.device-picker.on-other-networks")}),(0,lr.jsx)(oN,{devices:t,networkHeadingID:dN,spec:n.offNetworkDeviceListFactory()})]})]});var uN=n(94285);const mN="https://support.spotify.com/article/spotify-connect/",pN=({className:e})=>{const{spec:t,logger:n}=(0,Lo.fU)(Hb.createDesktopConnectDevicePickerEventFactory,{}),i=t.containerViewFactory().externalHelpLinkFactory(),a=(0,Lo.Wi)(i);return(0,lr.jsxs)("a",{className:uo()(y_,x_,B_,e),href:mN,style:{textDecoration:"none"},target:"_blank",onClick:()=>{n.logInteraction(i.hitNavigateToExternalUri({destination:mN}))},ref:a,children:[(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",semanticColor:"textBase",className:H_,children:u.ag.get("web-player.connect.device-picker.help-external-link")}),(0,lr.jsx)(uN.T,{iconSize:16,"":"icon-external-link",semanticColor:"textSubdued",className:V_,role:"presentation",autoMirror:!0,"aria-hidden":"true"})]})},gN=({devices:e,areWebPlayerCastDevicesAvailable:t})=>{const n=(0,p.wW)(),i=X_(),{spec:a}=(0,Lo.fU)(Hb.createDesktopConnectDevicePickerEventFactory,{}),s=!n&&i?e.map((e=>({...e,isDisabled:!0}))):e,r=(0,sb.js)(s),o=r.filter((e=>e.isLocalNetwork)),l=r.filter((e=>!e.isLocalNetwork)),{rowWithMenuOpenIdentifier:d}=(0,sr.useContext)(Kb);return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(KS.U,{className:uo()(p_,o_,{[h_]:!!d}),children:(0,lr.jsxs)("div",{className:v_,children:[n&&l.length>0?(0,lr.jsx)(cN,{localNetworkDevices:o,otherNetworksDevices:l,spec:a.containerViewFactory()}):(0,lr.jsx)(oN,{devices:r,areWebPlayerCastDevicesAvailable:t,spec:a.containerViewFactory().deviceListFactory()}),(0,lr.jsx)(pN,{})]})}),(0,lr.jsx)("div",{className:k_})]})};var hN=n(26310),kN=n(70172),vN=n(83644),fN=n(35302);const yN=({title:e,subtitle:t,Icon:n})=>(0,lr.jsxs)("li",{className:y_,children:[(0,lr.jsx)(n,{iconSize:24,semanticColor:"textSubdued",className:M_,role:"presentation"}),(0,lr.jsxs)("div",{className:T_,children:[(0,lr.jsx)(xo.D,{variant:"ballad",semanticColor:"textBase",children:e}),(0,lr.jsx)(xo.D,{variant:"mesto",semanticColor:"textSubdued",className:U_,children:t})]})]}),SN=({isDesktop:e})=>{const{spec:t}=(0,Lo.fU)(Hb.createDesktopConnectDevicePickerEventFactory,{}),n=t.containerViewFactory().noDevicesViewFactory(),i=(0,Lo.Wi)(n);return(0,lr.jsxs)("div",{ref:i,className:F_,children:[(0,lr.jsxs)("ul",{"aria-labelledby":`${sN} ${eN}`,className:j_,children:[(0,lr.jsx)(yN,{Icon:hN.G,title:u.ag.get("web-player.connect.device-picker.check-wifi"),subtitle:u.ag.get("web-player.connect.device-picker.check-wifi-subtitle")}),(0,lr.jsx)(yN,{Icon:kN.Q,title:u.ag.get("web-player.connect.device-picker.play-from-another"),subtitle:u.ag.get("web-player.connect.device-picker.play-from-another-subtitle")}),e?(0,lr.jsx)(yN,{Icon:vN.A,title:u.ag.get("web-player.connect.device-picker.restart-speaker"),subtitle:u.ag.get("web-player.connect.device-picker.restart-speaker-subtitle")}):(0,lr.jsx)(yN,{Icon:fN.D,title:u.ag.get("web-player.connect.device-picker.switch-to-app"),subtitle:u.ag.get("web-player.connect.device-picker.switch-to-app-subtitle")})]}),(0,lr.jsx)("div",{className:o_,"aria-describedby":"device-picker-troubleshooting-list",children:(0,lr.jsx)(pN,{})})]})},bN=({devices:e,areWebPlayerCastDevicesAvailable:t})=>{const n=Boolean(e.find((e=>!e.isLocal))),i=e.filter((e=>!e.isActive&&e.name.length>0)),a=n||t,s=(0,p.wW)();return(0,lr.jsxs)("div",{className:f_,children:[(0,lr.jsx)(tN,{foundDevices:a}),a?(0,lr.jsx)(Yb,{children:(0,lr.jsx)(gN,{devices:i,areWebPlayerCastDevicesAvailable:t})}):(0,lr.jsx)(SN,{isDesktop:s})]})},_N=({isConnectBarVisible:e=!1,tooltipTriggerId:t})=>{Vb();const n={id:"",connectStateId:"",name:"",type:_t.Yi.COMPUTER,isGroup:!1,isLocal:!0,isActive:!0,isConnecting:!1,isDisabled:!1,volume:0,hifiSupport:{fullySupported:!1,deviceSupported:!1,userEligible:!1},supportsLogout:!1},{activeDevice:i,devices:a}=vb((e=>({activeDevice:e.activeDevice,devices:e.devices}))),s=i??n,r=Bb((0,$s.v9)((e=>e.playback?.castState??window.cast?.framework.CastState.NO_DEVICES_AVAILABLE))),{isPlaying:o}=(0,po.IK)();return(0,lr.jsx)(hb.yv,{className:uo()(a_,e&&g_),arrowClassName:r_,disableAutoFocus:!0,children:(0,lr.jsxs)("div",{"aria-labelledby":t,className:s_,children:[(0,lr.jsx)(rN,{deviceId:s.id,connectStateDeviceId:s.connectStateId,isLocalDevice:s.isLocal,deviceName:s.name,deviceType:s.type,isGroup:s.isGroup,supportsHiFi:s.hifiSupport.fullySupported,canLogout:!s.isLocalNetwork&&s.supportsLogout,incarnation:s.incarnation,isPlaying:o}),(0,lr.jsx)(bN,{devices:a,areWebPlayerCastDevicesAvailable:r})]})})};var NN=n(72595);const EN=({legacyCastPlaceholder:e}={legacyCastPlaceholder:!1})=>{const t=(0,el.s4)(),n=(0,$s.v9)((e=>e.playback?.castState??window.cast?.framework.CastState.NO_DEVICES_AVAILABLE)),i=vb((e=>e.devices));return(0,sr.useCallback)((a=>{i.forEach((e=>{let n=e.connectStateId;e.isLocal&&(n="local_device"),t.send((0,NN.n)({discovered_device_id:n,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.hifiSupport.deviceSupported,interaction_id:a}))})),(e?function(e){return e===window.cast?.framework.CastState.NOT_CONNECTED}(n):Bb(n))&&t.send((0,NN.n)({discovered_device_name:"Google Cast Devices Available",discovered_device_brand_display_name:"Google",interaction_id:a}))}),[i,n,t,e])},xN=()=>{const e=(0,$s.I0)(),[t,n]=(0,sr.useState)(!1),[i,a]=(0,sr.useState)(""),s=(0,Nc.D)(),r=vb((({connectionStatus:e,activeDevice:t,connectingDevice:n})=>({connectionStatus:e,activeDevice:t,connectingDevice:n})),il.V),o=r.connectionStatus,l=o===_t.TK.CONNECTED||o===_t.TK.CONNECTING,d=(0,sr.useCallback)((()=>{s.getCapabilities().supportsLocalDiscovery&&s.discoverDevices(),e((0,Qs.bW)()),n(!0)}),[s,e]),c=EN(),u=(0,sr.useCallback)((()=>{c(i),e((0,Qs.$B)()),n(!1)}),[n,c,i,e]);return(0,lr.jsx)(hb.Nt,{trigger:"click",action:"toggle",content:(0,lr.jsx)(_N,{isConnectBarVisible:l,tooltipTriggerId:Mb}),onShow:d,onHide:u,offset:[0,12],placement:"top",children:(0,lr.jsx)(Ub,{isPickerOpen:t,onLogInteraction:e=>{t||a(e)}})})};let CN=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}({}),wN=function(e){return e.Bluetooth_Degrades_HiFi="Bluetooth_Degrades_HiFi",e.Change_Cellular_Settings="Change_Cellular_Settings",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}({}),IN=function(e){return e[e.Internet=0]="Internet",e[e.Spotify_Connect=1]="Spotify_Connect",e[e.Downloads=2]="Downloads",e}({}),TN=function(e){return e.Good="good",e.Poor="poor",e.Unknown="unknown",e.Unavailable="unavailable",e}({});const AN=[{criteria:{online:!0,streamingHiFi:!1,targetingHiFi:!1,bitrateStrategy:[he.kZ.CACHED_FILE,he.kZ.BACKEND_ADVISED,he.kZ.BEST_MATCHING],trackHiFiAvailable:!0},result:wN.Change_Cellular_Settings},{criteria:{online:!0,autoAdjust:!1,trackHiFiAvailable:!0},result:wN.Opt_Out_Of_Downgrade},{criteria:{online:!0,streamingHiFi:!1,targetingHiFi:!0,deviceCompatible:!0,internetBandwidth:TN.Poor,trackHiFiAvailable:!0},result:wN.Poor_Bandwidth_Interferes},{criteria:{online:!0,autoAdjust:!0,streamingHiFi:!1,targetingHiFi:!1,deviceCompatible:!0,internetBandwidth:TN.Poor,trackHiFiAvailable:!0},result:wN.Default_To_Very_High},{criteria:{online:!0,streamingHiFi:!1,bitrateStrategy:[he.kZ.OFFLINED_FILE],trackHiFiAvailable:!0},result:wN.Need_To_Redownload},{criteria:{online:!0,streamingHiFi:!0,trackHiFiAvailable:!0},result:wN.Connect_Explanation}];const PN=[{criteria:{bitrateLevel:[he.M4.HIFI],strategy:[he.kZ.BEST_MATCHING,he.kZ.BACKEND_ADVISED,he.kZ.CACHED_FILE],deviceSupported:!0,autoAdjust:!0},result:TN.Good},{criteria:{bitrateLevel:[he.M4.LOW,he.M4.NORMAL,he.M4.HIGH,he.M4.VERY_HIGH],targetBitrateLevel:[he.M4.LOW,he.M4.NORMAL,he.M4.HIGH,he.M4.VERY_HIGH],strategy:[he.kZ.BEST_MATCHING,he.kZ.CACHED_FILE],deviceSupported:!0,autoAdjust:!0},result:TN.Good},{criteria:{bitrateLevel:[he.M4.LOW,he.M4.NORMAL,he.M4.HIGH,he.M4.VERY_HIGH],targetBitrateLevel:[he.M4.HIFI],strategy:[he.kZ.BEST_MATCHING,he.kZ.BACKEND_ADVISED,he.kZ.CACHED_FILE],targetBitrateAvailable:!0,deviceSupported:!0,autoAdjust:!0},result:TN.Poor},{criteria:{bitrateLevel:[he.M4.LOW,he.M4.NORMAL,he.M4.HIGH,he.M4.VERY_HIGH],targetBitrateLevel:[he.M4.LOW,he.M4.NORMAL,he.M4.HIGH,he.M4.VERY_HIGH],strategy:[he.kZ.BACKEND_ADVISED],deviceSupported:!0,autoAdjust:!0},result:TN.Poor},{criteria:{bitrateLevel:[he.M4.LOW,he.M4.NORMAL,he.M4.HIGH,he.M4.VERY_HIGH],targetBitrateLevel:[he.M4.HIFI],targetBitrateAvailable:!1,deviceSupported:!0,autoAdjust:!0},result:TN.Unavailable},{criteria:{autoAdjust:!1},result:TN.Unknown},{criteria:{deviceSupported:!1},result:TN.Unknown}],ON=[{criteria:{bitrateLevel:[he.M4.HIFI],deviceSupported:!0},result:!0},{criteria:{bitrateLevel:[he.M4.UNKNOWN,he.M4.LOW,he.M4.NORMAL,he.M4.HIGH,he.M4.VERY_HIGH],strategy:[he.kZ.BEST_MATCHING,he.kZ.BACKEND_ADVISED,he.kZ.CACHED_FILE],targetBitrateLevel:[he.M4.HIFI],targetBitrateAvailable:!0,deviceSupported:!0},result:!0},{criteria:{bitrateLevel:[he.M4.UNKNOWN,he.M4.LOW,he.M4.NORMAL,he.M4.HIGH,he.M4.VERY_HIGH],strategy:[he.kZ.OFFLINED_FILE],targetBitrateLevel:[he.M4.HIFI],targetBitrateAvailable:!0,deviceSupported:!0},result:!1},{criteria:{strategy:[he.kZ.BEST_MATCHING,he.kZ.BACKEND_ADVISED,he.kZ.CACHED_FILE],targetBitrateAvailable:!0,deviceSupported:!0},result:!1},{criteria:{deviceSupported:!1},result:!0},{criteria:{bitrateLevel:[he.M4.UNKNOWN,he.M4.LOW,he.M4.NORMAL,he.M4.HIGH,he.M4.VERY_HIGH],targetBitrateLevel:[he.M4.HIFI],targetBitrateAvailable:!1,deviceSupported:!0},result:!0},{criteria:{targetBitrateLevel:[he.M4.HIFI]},result:!0}],DN=(e,t)=>{for(const[n,i]of Object.entries(t.criteria))if(n===CN.bitrateLevel){if(!i.includes(e[CN.bitrateLevel]))return!1}else if(n===CN.targetBitrateLevel){if(!i.includes(e[CN.targetBitrateLevel]))return!1}else if(n===CN.strategy){if(!i.includes(e[CN.strategy]))return!1}else{if(!i===e[n])return!1}return!0},RN=e=>{for(const t of ON){if(DN(e,t))return t.result}return e[CN.bitrateLevel]===he.M4.HIFI||e[CN.targetBitrateLevel]===he.M4.HIFI},LN=e=>{for(const t of PN){if(DN(e,t))return t.result}return e[CN.strategy]===he.kZ.BACKEND_ADVISED?TN.Poor:TN.Good};var FN=n(86971);const jN={hifiStatus:he.dR.NONE,bitrateLevel:he.M4.UNKNOWN,targetBitrateLevel:he.M4.UNKNOWN,targetBitrateAvailable:!1,strategy:he.kZ.UNKNOWN};function MN(){const{hifiStatus:e,bitrateLevel:t,targetBitrateLevel:n,targetBitrateAvailable:i,strategy:a}=(0,vr.Y)((e=>({...jN,...e?.playbackQuality??null})),il.V),s=vb((e=>e.activeDevice)),r=(0,sr.useMemo)((()=>null!==s&&s.hifiSupport?s.hifiSupport:{fullySupported:!1,deviceSupported:!1,userEligible:!1}),[s]).deviceSupported,{settings:{values:o}}=(0,FN.r)(),l=o["audio.allow_downgrade"],d=s?.isLocal||!1;let c;c=d?a===he.kZ.CACHED_FILE||a===he.kZ.OFFLINED_FILE?IN.Downloads:IN.Internet:IN.Spotify_Connect;const u={bitrateLevel:t,targetBitrateLevel:n,targetBitrateAvailable:i,strategy:a,isLocal:d,deviceSupported:r,autoAdjust:l},m=RN(u),p=LN(u),g=(0,gg.k)(),h=n===he.M4.HIFI&&i,k=function({online:e,streamingHiFi:t,targetingHiFi:n,strategy:i,trackHiFiAvailable:a,autoAdjust:s,internetBandwidth:r,hifiCompatibleDevice:o,isLocal:l}){const d=[];for(const c of AN){const{criteria:u,result:m}=c;u.online===e&&(void 0!==u.autoAdjust&&u.autoAdjust!==s||void 0!==u.streamingHiFi&&u.streamingHiFi!==t||void 0!==u.targetingHiFi&&u.targetingHiFi!==n||void 0!==u.deviceCompatible&&u.deviceCompatible!==o||void 0!==u.bitrateStrategy&&!1===l||(void 0===u.bitrateStrategy||void 0!==i&&u.bitrateStrategy.includes(i))&&(void 0!==u.internetBandwidth&&u.internetBandwidth!==r||void 0!==u.trackHiFiAvailable&&u.trackHiFiAvailable!==a||d.push(m)))}return d}({online:g,streamingHiFi:t===he.M4.HIFI,targetingHiFi:n===he.M4.HIFI,strategy:a,trackHiFiAvailable:h,autoAdjust:l,internetBandwidth:p,hifiCompatibleDevice:r,isLocal:d});return{hifiStatus:e,bitrateLevel:t,flags:k,internetBandwidth:p,playingVia:{channelIsHiFi:m,channel:c},hifiCompatibleDevice:r}}var UN=n(66721);const BN={[wN.Connect_Explanation]:()=>u.ag.get("hifi.connectExplanation",`${u.ag.get("spotify-connect")}`,`${u.ag.get("desktop.settings.streamingQualityHiFi")}`),[wN.Change_Cellular_Settings]:()=>u.ag.get("hifi.changeCellularSettings"),[wN.Opt_Out_Of_Downgrade]:()=>u.ag.get("hifi.optOutOfDowngrade"),[wN.Poor_Bandwidth_Interferes]:()=>u.ag.get("hifi.poorBandwidthInterferes"),[wN.Default_To_Very_High]:()=>u.ag.get("hifi.defaultToVeryHigh"),[wN.Need_To_Redownload]:()=>u.ag.get("hifi.needToReDownload"),[wN.Bluetooth_Degrades_HiFi]:()=>u.ag.get("hifi.bluetoothDegradesHifi",`${u.ag.get("desktop.settings.streamingQualityHiFi")}`)},VN=()=>{const{flags:e}=MN(),t=[];return e.forEach((e=>{BN[e]&&t.push({id:e,text:BN[e]()})})),t};var HN=n(34414),GN=n(32509),WN=n(63120),zN=n(56952);const KN="KMRYEXD5N8nhIguIiBJX",YN="HI3xttOVfN5jrsTwwj9a",qN="x8K5uQB7yYKz5aXNXPMh",ZN="JoW96RZ4olZzshuAYMQw",QN="aCwCCeV0KAq6w4Zzf7oE",JN="iZi3VhLGO2YSFt2iD5VM",$N="QGRlV_c_erx7kBMRvra5",XN={value:0,label:()=>u.ag.get("hifi.unknown")},eE={value:1,label:()=>u.ag.get("desktop.settings.streamingQualityLow")},tE={value:2,label:()=>u.ag.get("desktop.settings.streamingQualityNormal")},nE={value:3,label:()=>u.ag.get("desktop.settings.streamingQualityHigh")},iE={value:4,label:()=>u.ag.get("desktop.settings.streamingQualityVeryHigh")},aE={value:5,label:()=>u.ag.get("desktop.settings.streamingQualityHiFi")},sE=({quality:e})=>{let t,n;switch(e){case he.M4.LOW:t=eE.label(),n=eE.value;break;case he.M4.NORMAL:t=tE.label(),n=tE.value;break;case he.M4.HIGH:t=nE.label(),n=nE.value;break;case he.M4.VERY_HIGH:t=iE.label(),n=iE.value;break;case he.M4.HIFI:t=aE.label(),n=aE.value;break;case he.M4.UNKNOWN:default:t=XN.label(),n=XN.value}return(0,lr.jsxs)("div",{className:KN,children:[(0,lr.jsx)(xo.D,{as:"h2",children:u.ag.get("hifi.currentAudioQuality")}),(0,lr.jsx)(xo.D,{as:"h1",variant:"alto",className:$N,children:t}),(0,lr.jsxs)("div",{className:YN,children:[(0,lr.jsx)(xo.D,{as:"p",variant:"mestoBold",className:JN,children:u.ag.get("desktop.settings.streamingQualityLow")}),(0,lr.jsxs)("div",{className:qN,children:[(0,lr.jsx)("div",{className:uo()(ZN,{[QN]:n>=1})}),(0,lr.jsx)("div",{className:uo()(ZN,{[QN]:n>=2})}),(0,lr.jsx)("div",{className:uo()(ZN,{[QN]:n>=3})}),(0,lr.jsx)("div",{className:uo()(ZN,{[QN]:n>=4})}),(0,lr.jsx)("div",{className:uo()(ZN,{[QN]:5===n})})]}),(0,lr.jsx)(xo.D,{as:"p",variant:"mestoBold",className:JN,children:u.ag.get("desktop.settings.streamingQualityHiFi")})]})]})},rE="ZPxtJCM9pDLDULYbxYlx",oE=({children:e})=>(0,lr.jsx)("div",{className:rE,children:e});var lE=n(94041),dE=n(31506);const cE="jDsXE7OLMWOY_76eZsPU",uE="L_WoceuKFbr6NJzlAgTI",mE=(0,p.ZO)()===g.W.Desktop,pE=({device:e})=>{const t=mE?u.ag.get("connect-picker.this-computer"):u.ag.get("connect-picker.this-web-browser"),n=e.isLocal?t:e.name,i=(0,dE.z)(e.type,e.isGroup);return(0,lr.jsxs)("div",{className:cE,children:[(0,lr.jsx)(xo.D,{as:"h2",variant:"mesto",semanticColor:"textBase",children:u.ag.get("connect-picker.listening-on")}),(0,lr.jsxs)("span",{children:[i&&(0,lr.jsx)(i,{iconSize:16,className:uE,color:lE.ekl}),(0,lr.jsx)(xo.D,{semanticColor:"textBrightAccent",children:n})]})]})};var gE=n(5153),hE=n(74572),kE=n(74720);const vE="novF8wEdTg7z80q3Ykws",fE="qYsWmMXU2vS2COWabAU3",yE="S7ZlyepCAF5STfR0svEU",SE="GpkwB7xWMvRcV_MNjswl",bE="rmlbOaIPSEWZfSAZsFlx";let _E=function(e){return e[e.PASSING=0]="PASSING",e[e.NEEDS_ATTENTION=1]="NEEDS_ATTENTION",e[e.UNKNOWN=2]="UNKNOWN",e}({});const NE=({metric:e,label:t,severity:n})=>(0,lr.jsxs)("div",{className:uo()(vE,{[SE]:n===_E.UNKNOWN}),children:[(()=>{switch(n){case _E.PASSING:return(0,lr.jsx)(gE.K,{iconSize:32,className:fE,semanticColor:"textBase"});case _E.NEEDS_ATTENTION:return(0,lr.jsx)(hE.l,{iconSize:32,className:yE,semanticColor:"textWarning"});case _E.UNKNOWN:return(0,lr.jsx)(kE.S,{iconSize:32,className:yE,semanticColor:"textBase"});default:return null}})(),(0,lr.jsxs)("div",{className:bE,children:[(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",semanticColor:"textBase",children:e}),(0,lr.jsx)(xo.D,{as:"p",semanticColor:"textSubdued",variant:"mesto",children:t})]})]}),EE=()=>{const{hifiCompatibleDevice:e,playingVia:t,internetBandwidth:n}=MN();return(0,lr.jsxs)("div",{children:[(0,lr.jsx)(NE,{metric:u.ag.get("hifi.hifiCompatibleDevice"),label:e?u.ag.get("hifi.yes"):u.ag.get("hifi.no"),severity:e?_E.PASSING:_E.NEEDS_ATTENTION}),(0,lr.jsx)(NE,{metric:u.ag.get("hifi.playingVia"),label:(()=>{const{channel:e}=t;switch(e){case IN.Downloads:return u.ag.get("local-files.source.downloads");case IN.Internet:return u.ag.get("hifi.networkConnection");case IN.Spotify_Connect:return u.ag.get("spotify-connect");default:return""}})(),severity:t.channelIsHiFi?_E.PASSING:_E.NEEDS_ATTENTION}),(0,lr.jsx)(NE,{metric:u.ag.get("hifi.internetBandwidth"),label:(()=>{switch(n){case TN.Good:return u.ag.get("hifi.good");case TN.Poor:return u.ag.get("hifi.poor");case TN.Unknown:default:return u.ag.get("hifi.unknown")}})(),severity:(()=>{switch(n){case TN.Good:return _E.PASSING;case TN.Poor:return _E.NEEDS_ATTENTION;case TN.Unknown:default:return _E.UNKNOWN}})()})]})},xE="dl5l7nGD0oOgTT_SLU40",CE="iU0USYhRL5JtiNcDbeZq",wE=({cards:e,quality:t,bandwidth:n=TN.Good})=>{const i=vb((e=>e.activeDevice));return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(sE,{quality:t}),n!==TN.Unavailable?(0,lr.jsxs)(lr.Fragment,{children:[i&&(0,lr.jsx)(pE,{device:i}),(0,lr.jsx)(EE,{}),e.map((({text:e,id:t})=>(0,lr.jsx)(oE,{children:(0,lr.jsx)(zN.k,{LinkComponent:WN.default,source:e,splitter:/\|/g})},t)))]}):(0,lr.jsxs)("div",{className:xE,children:[(0,lr.jsx)(xo.D,{as:"h1",variant:"alto",className:CE,children:u.ag.get("hifi.songNotAvailableTitle")}),(0,lr.jsx)(xo.D,{variant:"ballad",children:u.ag.get("hifi.songNotAvailable")})]})]})},IE="IcRpuhMiXFmNIOuD_cPR",TE="o5zR0zFgzGL25I5HHXWO",AE="_Cg8FRzh4osI4pLPiDDu",PE="c3RiDQwNPpRxrL23ldVK",OE="gqdy85Mfj1EQdSDlLCXm",DE=({cards:e,quality:t,bandwidth:n=TN.Good})=>{Vb();const i=(0,sr.useRef)(null);return(0,GN.H)(),(0,HN.K)({ref:i,preventScroll:!1}),(0,lr.jsx)(hb.yv,{className:IE,children:(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)("div",{className:AE}),(0,lr.jsx)(KS.U,{className:OE,children:(0,lr.jsx)("div",{className:TE,ref:i,tabIndex:-1,"aria-label":u.ag.get("web-player.hifi.aria-label"),children:(0,lr.jsx)(wE,{cards:e,quality:t,bandwidth:n})})}),(0,lr.jsx)("div",{className:PE})]})})},RE=e=>e.visible?(0,lr.jsx)(FE,{...e}):(0,lr.jsx)(lr.Fragment,{children:e.children}),LE=5;function FE({children:e,onClick:t}){const{bitrateLevel:n,internetBandwidth:i}=MN(),a=VN().slice(0,LE);return(0,lr.jsx)("div",{children:(0,lr.jsx)(hb.Nt,{trigger:"click",action:"toggle",offset:[-122,20],onShow:()=>{t?.(!0)},onHide:()=>{t?.(!1)},content:(0,lr.jsx)(DE,{cards:a,quality:n,bandwidth:i}),children:e})})}const jE="luhVzGRctW4iXg7vzJOQ",ME="T0BdYnv2qXQqgvX3JgtL",UE=({onClick:e})=>{const{hifiStatus:t}=MN(),n=(0,vr.Y)((e=>e?.item?.type===ve.p.TRACK));return t!==he.dR.NONE&&n?(0,lr.jsx)(RE,{onClick:e,visible:!0,children:(0,lr.jsx)("button",{className:uo()(ME,{[jE]:t===he.dR.ON}),"aria-label":u.ag.get("web-player.hifi.aria-label"),children:(0,lr.jsx)(UN.Ee,{src:(0,Mo.g)(`images/hifi-button-${t===he.dR.ON?"on":"off"}.svg`),loading:"eager"})})}):null};var BE=n(67139),VE=n(93901),HE=n(18761),GE=n(9200);let WE=function(e){return e.SET_LYRICS_MODE="SET_LYRICS_MODE",e}({});const zE=e=>({type:WE.SET_LYRICS_MODE,mode:e}),KE=e=>e.ui.lyrics.mode,YE={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:"main-lyricsCinema-lyricsCinemaVisible",nonDisplayedArea:"main-lyricsCinema-nonDisplayedArea",Container:"main-lyricsCinema-container",Controls:"main-lyricsCinema-controls",Content:"main-lyricsCinema-content"};function qE(){const e=(0,$s.v9)(KE),t=(0,$s.I0)(),{setYlxSidebarState:n}=(0,GE.U)(),i=(0,Xo.W6)(Ns.yA,{loadingValue:!1}),{mainLandmarkRef:a,topbarRef:s,lyricsCinemaRef:r}=(0,HE.Oh)(),{toggle:o,isActive:l}=(0,VE.T)(zg.s.NowPlayingView);return{mode:e,setMode:(0,sr.useCallback)((e=>{e===xk.LyricsMode.cinema&&l?(r.current?.classList.add(YE.lyricsCinemaVisible),a.current?.classList.add(YE.nonDisplayedArea),s.current?.classList.add(YE.nonDisplayedArea),i&&n(GE.c.COLLAPSED),o()):(r.current?.classList.remove(YE.lyricsCinemaVisible),a.current?.classList.remove(YE.nonDisplayedArea),s.current?.classList.remove(YE.nonDisplayedArea),l||o()),t(zE(e))}),[t,o,l,i,r,a,n,s])}}var ZE=n(86046),QE=n(66336),JE=n(13791);const $E=e=>(0,c.EC)(e)?.toURLPath(!0)??"",XE={context:null,item:null};var ex=n(52143),tx=n(61940),nx=n(48631),ix=n(267);const ax=()=>(0,lr.jsx)(lr.Fragment,{}),sx=()=>(0,lr.jsx)(lr.Fragment,{});var rx=n(92009),ox=n(72171),lx=n(52315),dx=n(19932);const cx=Spicetify.GraphQL.Definitions["queryNpvEpisode"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryNpvEpisode"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"episodeUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"htmlDescription"}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"topics"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"5"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"transcripts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"cdnUrl"}},{kind:"Field",name:{kind:"Name",value:"language"}}]}}]}}]}}]}}]}}]};var ux=n(22733),mx=n(64238);const px="YC6K2bFUeJkdE4cCvbD3",gx="vHQbygDcvOQ4Ls0W6vb1",hx="Ku9l84_lLCFE3crS1Y8B",kx="TortsxZeDfI28luc5Dac",vx="XHpZHlxCiVHe8qTVVskT",fx="lu9_R5Kw07YEWlq8eKs9",yx="RypbYIkqqlUkhxg_RwYm",Sx=(0,sr.memo)((function({transcriptSections:e,onTimeStampClick:t,episodeUri:n}){const{spec:i,logger:a}=(0,Lo.fU)(ux.m,{data:{uri:n}}),{isPlaying:s}=(0,Hy.n)({uri:n},{featureIdentifier:"episode"}),r=i.timestampLinkFactory();return(0,lr.jsx)(lr.Fragment,{children:(0,lr.jsxs)("div",{className:gx,children:[(0,lr.jsx)("div",{className:kx,children:(0,lr.jsx)(xo.D,{as:"p",variant:"finale",semanticColor:"textSubdued",children:u.ag.get("web-player.episode.transcript.disclaimer")})}),e.map(((e,i)=>{const o=`transcript-section-${i}`;return(0,lr.jsxs)("div",{className:hx,children:[(0,lr.jsx)("button",{className:vx,onClick:()=>{t(e.startMs,o),a.logInteraction(s?r.hitSeekToTime({msToSeekTo:e.startMs}):r.hitPlay({itemToBePlayed:n}))},children:(0,lr.jsx)(mx.D,{id:o,targetURI:(0,c.EC)(n),fadeOut:!0,children:(0,lr.jsx)(xo.D,{variant:"finaleBold",semanticColor:"textSubdued",className:fx,children:(0,fr.m)(e.startMs)})})}),e.content.map(((e,t)=>(0,lr.jsx)(xo.D,{variant:"viola",semanticColor:"textBase",className:yx,dir:"auto",children:e},`transcript-text-${t}`)))]},o)}))]})})}));function bx(e){return!!(0,vc.G)().getCapabilities().isSupported&&function(e){const t=e.metadata?.["parent_episode.uri"];return!!t&&(0,c.hn)(t)}(e)}var _x=n(33971),Nx=n(34058),Ex=n(21586),xx=n(76827),Cx=n(24843),wx=n(49921);const Ix="_QEMUk5U16U3CQn0wvbD",Tx="mbkl2P60JUhDqc9qGvp9",Ax="Xh6dG3pzi2SS7v4cvZzG",Px="sOdoW26RUwggLToa7xDt",Ox="B_TcBcc1BM2yLgvXbh66",Dx="tRnhyUQiKOxA3z8mUD_U",Rx="_shxqlkLuB52H1iCh_OQ",Lx="hAwePVlxumRNpdOSpwyV";const Fx=sr.forwardRef((function({className:e="",segment:t,onClickPlay:n,isPlaying:i},a){const[s,r]=(0,sr.useState)(!1),{label:o,Icon:l}=(0,sr.useMemo)((()=>function(e){if("TALK"===e.type)return{Icon:Nx.J,label:u.ag.get("playlist.a11y.play",e.title)};const t=e.track.artists?.map((e=>e.name)).join(u.ag.getSeparator())||"";return{Icon:Ex.F,label:u.ag.get("tracklist.a11y.play",e.track.name,t)}}(t)),[t]),d=(0,sr.useCallback)((()=>{n()}),[n]);(0,sr.useEffect)((()=>{const e=()=>{r(!0)},t=()=>{r(!1)};return i&&(r(document.hasFocus()),window.addEventListener("focus",e),window.addEventListener("blur",t)),()=>{window.removeEventListener("focus",e),window.removeEventListener("blur",t)}}),[i]);const c=!(0,iN.T)()&&s;return(0,lr.jsxs)("div",{className:uo()(Rx,e),children:[i?(0,lr.jsx)("img",{className:Dx,width:"14",height:"14",alt:"",src:(0,Mo.g)(c?"images/equaliser-animated-green.gif":"images/equaliser-green.svg")}):(0,lr.jsx)("span",{className:Dx,children:(0,lr.jsx)(l,{iconSize:16,"aria-hidden":"true"})}),(0,lr.jsx)(Cx.I,{className:Ox,iconClassName:Lx,onClick:d,isPlaying:i,isLocked:!1,playAriaLabel:o,ref:a})]})})),jx=({children:e,onTriggerPlay:t,episodeUri:n,index:i})=>{const{spec:a,logger:s}=(0,Lo.fU)(xx.A,{}),r=(0,To.o)(),o=(0,Zo.y1)((()=>{r({intent:"play",type:"double-click"});const e=s.logInteraction(a.segmentItemFactory({uri:n,position:i||0}).doubleHitPlay({itemToBePlayed:n}));t(e)}),As.s_,{leading:!0,trailing:!1});return(0,lr.jsx)("div",{className:Px,onDoubleClick:o,children:e})},Mx=({segment:e,episodeUri:t,index:n})=>{const{spec:i,logger:a}=(0,Lo.fU)(xx.A,{}),{isActive:s,isPlaying:r,onClick:o}=(0,wx.k)({episodeUri:t,start:e.start,stop:e.stop}),l={uri:t},d=function(e){const t=[{url:e.track.album.image}];return{type:ve.p.TRACK,uri:e.uri,uid:null,provider:null,images:t,name:e.track.name,mediaType:"audio",duration:{milliseconds:0},album:{type:ve.p.ALBUM,uri:e.track.album.uri,name:e.track.album.name,images:t},artists:e.track.artists.map((e=>({type:ve.p.ARTIST,name:e.name,uri:e.uri})))}}(e),c=i.segmentItemFactory({uri:t,position:n||0}).playbackButtonFactory(),u=(0,sr.useCallback)((()=>{o({}),s&&r?a.logInteraction(c.hitPause({itemToBePaused:t})):s&&!r?a.logInteraction(c.hitResume({itemToBeResumed:t})):a.logInteraction(c.hitPlay({itemToBePlayed:t}))}),[t,s,r,a,o,c]);return(0,lr.jsxs)(jx,{onTriggerPlay:o,episodeUri:t,children:[(0,lr.jsx)(Fx,{segment:e,isActive:s,isPlaying:r,onClickPlay:()=>{u()}}),(0,lr.jsx)(Eo._,{context:l,item:d,titleTypeVariant:"ballad",subtitleTypeVariant:"mesto",onTitleClick:e=>{a.logInteraction(i.segmentItemFactory({uri:t,position:n||0}).albumLinkFactory({uri:l.uri}).hitUiNavigate({destination:e||""}))},onSubtitleClick:e=>{a.logInteraction(i.segmentItemFactory({uri:t,position:n||0}).artistLinkFactory({uri:e||"",position:0}).hitUiNavigate({destination:e||""}))}})]})},Ux=({segment:e,episodeUri:t,index:n})=>{const{spec:i,logger:a}=(0,Lo.fU)(xx.A,{}),{isActive:s,isPlaying:r,onClick:o}=(0,wx.k)({episodeUri:t,start:e.start,stop:e.stop}),l=function(e){const t=[];return{type:ve.p.UNKNOWN,uri:e.uri,uid:null,provider:null,images:t,name:e.title,mediaType:"audio",duration:{milliseconds:0},album:{type:ve.p.ALBUM,uri:e.show.uri,name:e.show.name,images:t},artists:[]}}(e),d=i.segmentItemFactory({uri:t,position:n||0}).playbackButtonFactory(),c=(0,sr.useCallback)((()=>{o({}),s&&r?a.logInteraction(d.hitPause({itemToBePaused:t})):s&&!r?a.logInteraction(d.hitResume({itemToBeResumed:t})):a.logInteraction(d.hitPlay({itemToBePlayed:t}))}),[t,s,r,a,o,d]);return(0,lr.jsxs)(jx,{onTriggerPlay:o,episodeUri:t,children:[(0,lr.jsx)(Fx,{segment:e,isActive:s,isPlaying:r,onClickPlay:()=>{c()}}),(0,lr.jsx)(Wb.R,{children:(0,lr.jsx)(xo.D,{variant:"ballad",semanticColor:"textBase",children:l.name})},l.name)]})};var Bx=n(69947);const Vx=({item:e})=>{const t=e.metadata?.["parent_episode.uri"],n=function(e){const t=(0,vc.G)();return(0,sr.useCallback)((async(n,i)=>{if(!e)return[];try{return await t.getSegments(e,n,i)}catch(e){return[]}}),[e,t])}(t),[i,a]=(0,sr.useState)([]),s=(0,sr.useRef)(!1),r=(0,sr.useRef)(0),o=(0,sr.useCallback)((()=>{const e=r.current;null!==e&&(s.current||(s.current=!0,n(e,10).then((e=>{a((t=>{const n=t.concat(e);return r.current=n.length+1,n})),s.current=!1}))))}),[n]);return(0,sr.useEffect)((()=>{a([])}),[e.uri]),t?(0,lr.jsxs)(Bx.$,{className:Ix,children:[(0,lr.jsx)(Bx.M,{className:Tx,children:u.ag.get("music_and_talk.in_this_episode")}),(0,lr.jsx)("div",{className:Ax,children:(0,lr.jsx)(_x.C,{onReachBottom:o,triggerOnInitialLoad:!0,children:i.map(((e,n)=>"MUSIC"===e.type?(0,lr.jsx)(Mx,{segment:e,episodeUri:t},`${e.uri}-${n}`):(0,lr.jsx)(Ux,{segment:e,episodeUri:t},`${e.uri}-${n}`)))})})]}):null};var Hx=n(84516),Gx=n(97134),Wx=n(4464),zx=n(45509);const Kx="main-nowPlayingView-queue",Yx="main-nowPlayingView-nextInQueue",qx="main-nowPlayingView-queueItem",Zx="main-nowPlayingView-playNextButton",Qx="main-nowPlayingView-playNextIcon",Jx="main-nowPlayingView-playNext",$x="main-nowPlayingView-openQueue",Xx="main-nowPlayingView-playNextButtonIcon",eC="main-nowPlayingView-queueItemEntityImage";const tC=sr.forwardRef((function({className:e="",item:t,onClickPlay:n},i){const a=(0,Ao.g)(),{label:s,Icon:r}=(0,sr.useMemo)((()=>function(e){if((0,he.iw)(e))return{Icon:Nx.J,label:u.ag.get("tracklist.a11y.play",e.name,e.show.name)};if((0,he.G7)(e))return{Icon:zx.P,label:u.ag.get("tracklist.a11y.play",e.name,e.book.name)};if((0,he.G_)(e)||(0,he.RB)(e)){const t=e.artists?.map((e=>e.name)).join(u.ag.getSeparator())||"";return{Icon:Ex.F,label:u.ag.get("tracklist.a11y.play",e.name,t)}}return{Icon:Ex.F,label:u.ag.get("play")}}(t)),[t]),o=(0,sr.useCallback)((()=>(n(),a.skipToNext({uri:t.uri,uid:t.uid}))),[a,t,n]);return(0,lr.jsxs)("div",{className:uo()(Jx,e),"":"play-next-button",children:[(0,lr.jsx)("span",{className:Qx,children:(0,lr.jsx)(r,{iconSize:16,"aria-hidden":"true"})}),(0,lr.jsx)(Cx.I,{className:Zx,iconClassName:Xx,onClick:o,isPlaying:!1,isLocked:!1,playAriaLabel:s,ref:i})]})}));var nC=n(25532),iC=n(95307),aC=n(9182),sC=n(64709);const rC=({children:e,...t})=>(0,lr.jsx)(oC,{buttonSize:"sm",...t,$_css:uu.$_Y.white70,children:e});var oC=(0,sC.ZP)(Ov.P).withConfig({displayName:"ButtonSecondary___StyledEncoreButtonSecondary",componentId:"sc-1nxt2rd-0"})((e=>({borderColor:e.$_css})));const lC="/search",dC="/queue",cC=()=>(0,lr.jsxs)(Bx.$,{className:Kx,children:[(0,lr.jsx)(Bx.M,{children:u.ag.get("yourdj.npv.queue.title")}),(0,lr.jsx)(xo.D,{as:"div",semanticColor:"textSubdued",children:u.ag.get("yourdj.npv.queue.description")})]}),uC=({isContextAd:e})=>{const{nextUp:t,queued:n}=(0,Gx.W)(),i=(0,Ao.g)(),a=(0,Qr.s0)(),s=(0,wd.x)(),{spec:r,logger:o}=(0,Lo.fU)(Hx.C,{}),l=()=>(0,lr.jsxs)(Bx.$,{className:Kx,children:[(0,lr.jsx)(Bx.M,{children:u.ag.get("web-player.now-playing-view.empty-queue")}),(0,lr.jsx)(WN.default,{to:lC,children:(0,lr.jsx)(rC,{onClick:()=>{const e=r.searchButtonFactory().hitUiNavigate({destination:lC});o.logInteraction(e)},children:u.ag.get("web-player.now-playing-view.empty-queue-cta")})})]}),d=(0,sr.useCallback)((()=>{const e=r.openQueueButtonFactory().hitUiNavigate({destination:dC});o.logInteraction(e),a(dC)}),[a,r,o]),c=n[0]||t[0],m=(0,hS.O)();if(s?.context?.uri&&(0,_s.MW)(s.context.uri))return(0,lr.jsx)(cC,{});if(!s||!c)return(0,lr.jsx)(l,{});const{context:p}=s;return(0,lr.jsxs)(Bx.$,{className:Kx,children:[(0,lr.jsxs)(Bx.M,{children:[(0,lr.jsx)("div",{className:Yx,children:u.ag.get("queue.next-in-queue")}),(0,lr.jsx)(mu.o,{buttonSize:"sm",condensed:!0,onClick:d,className:$x,semanticColor:"textSubdued",children:u.ag.get("web-player.now-playing-view.open-queue")})]}),(0,lr.jsx)(Pl._P,{menu:(0,lr.jsx)(nC.$,{context:p,item:c}),children:(0,lr.jsxs)("div",{className:qx,draggable:(0,aC.Q)(c),onDragStart:e=>{e.target===e.currentTarget&&c.uri&&m(e,[c.uri],(0,iC.R)(c))},children:[!e&&(0,lr.jsx)(tC,{item:c,onClickPlay:()=>{const e=i.getState();if(!e)return;const t=r.playButtonFactory({uri:c.uri}).hitSkipToNext({itemToBeSkipped:e.item?.uri||"",positionMs:(0,Wx.k)(e)??-1,totalContentMs:e.duration??-1});o.logInteraction(t)}}),(0,lr.jsx)(No.T,{item:c,size:46,desiredLabel:"small",className:eC}),(0,lr.jsx)(Eo._,{context:p,item:c,titleTypeVariant:"ballad",subtitleTypeVariant:"mesto",onTitleClick:()=>{const e=r.titleFactory({uri:c.uri}).hitUiNavigate({destination:c.uri});o.logInteraction(e)},onSubtitleClick:()=>{const e=r.artistFactory({uri:c.uri}).hitUiNavigate({destination:c.uri});o.logInteraction(e)}})]})})]})};var mC=n(52052);const pC="f6_Fu_ei4TIJWR0wzvTk",gC="TLmzadNIdvV8sYzTuXRg",hC="MT9De6UrCVQ8Qo6o3ikA",kC=sr.memo((()=>(0,lr.jsx)("div",{className:pC,"aria-hidden":!0,children:(0,lr.jsxs)("div",{className:gC,children:[(0,lr.jsx)(mC.C,{as:"div",variant:"balladBold",className:hC,charCount:8,isLoading:!0}),[20,50,25].map(((e,t)=>(0,lr.jsx)(mC.C,{as:"div",variant:"mesto",className:hC,charCount:e,isLoading:!0},t)))]})})));var vC=n(13938);const fC="m3pzWNRu8xGY36YIaCY1",yC=({topics:e,logTopicNavigation:t})=>!e||e.length<1?null:(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(Bx.M,{children:u.ag.get("web-player.now-playing-view.discover-more")}),(0,lr.jsx)(vC.v,{topics:e,onClick:t,className:fC})]}),SC=({item:e,spec:t})=>{const n=(0,sr.useCallback)((()=>{}),[]),i=(0,vr.Y)((e=>e?.isPaused??void 0)),a=(0,Ao.g)(),{isPlaying:s,isActive:r}=(0,po.$o)(e.uri),o=(0,To.o)(),l=(0,ox.E)(),d=(0,lx.I)(e.uri)?.episodeOrChapter,c=bx(e),m=(0,sr.useCallback)(((t,n,c,u)=>{let m="play";!s||0!==t&&n||(m="pause"),o({intent:m,targetUri:e.uri,type:"click",itemIdSuffix:t>0?"podcast-description-timestamp":"button"}),d&&l?rx.y.set((()=>({triggerId:c||"activation-trigger-mme",triggerAction:null}))):r&&!n?i?(u?.("resume"),a.resume()):(u?.("pause"),a.pause()):a.seekTo(t)}),[s,o,e.uri,d,l,r,i,a]),p=(0,sr.useCallback)(((e,t)=>{m(e,!0,t)}),[m]),{loading:g,error:h,data:k}=(v={uri:e.uri},(0,Wt.a)(cx,v,f));var v,f;const[y,S]=(0,sr.useState)(null),b=(0,sr.useCallback)((async e=>{const t=await(0,dx.l)(e);S(t)}),[]);if((0,sr.useEffect)((()=>{d&&!(0,Ja.Ey)(d)&&d.transcript&&d.transcript.length>0&&b(d.transcript[0].cdnUrl)}),[b,d]),g&&e.uri&&!h)return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(kC,{}),(0,lr.jsx)(kC,{})]});if(!e.uri||"Episode"!==k?.episodeUnionV2?.__typename||g||h)return null;const _=k?.episodeUnionV2.podcastV2.data,N="Podcast"===_.__typename?_.topics.items:[];return(0,lr.jsxs)(lr.Fragment,{children:[c&&(0,lr.jsx)(Vx,{item:e}),(0,lr.jsxs)(Lo.Nh,{spec:t,children:[d&&d.type===ve.p.EPISODE&&d.transcript&&d.transcript.length>0?(0,lr.jsxs)(Bx.$,{className:px,children:[(0,lr.jsx)(Bx.M,{children:u.ag.get("web-player.now-playing-view.transcript")}),y&&(0,lr.jsx)(Sx,{transcriptSections:y||[],onTimeStampClick:p,episodeUri:e.uri})]}):null,(0,lr.jsx)(uC,{}),(0,lr.jsx)(yC,{topics:N,logTopicNavigation:n})]})]})},bC=({item:e,spec:t})=>(0,gg.k)()?(0,lr.jsx)(SC,{item:e,spec:t}):(0,lr.jsx)(lr.Fragment,{}),_C=()=>(0,lr.jsx)(lr.Fragment,{}),NC=Spicetify.GraphQL.Definitions["queryNpvArtist"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryNpvArtist"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"artistUri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"trackUri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"artistUri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"verified"}},{kind:"Field",name:{kind:"Name",value:"biography"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}},{kind:"Field",name:{kind:"Name",value:"externalLinks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistExternalLinkItem"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"visuals"}}]}},{kind:"Field",name:{kind:"Name",value:"goods"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"merch"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"3"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"merchItem"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"events"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"concerts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"2"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"concerts"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"stats"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"monthlyListeners"}},{kind:"Field",name:{kind:"Name",value:"worldRank"}},{kind:"Field",name:{kind:"Name",value:"topCities"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"artistTopCity"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"followers"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"trackUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"trackUri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"merch"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"3"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"merchItem"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"artistExternalLinkItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Link"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"visuals"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistVisuals"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"}}]}},{kind:"Field",name:{kind:"Name",value:"gallery"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"headerImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"merchItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Merch"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"concerts"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConcertPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"festival"}},{kind:"Field",name:{kind:"Name",value:"venue"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"location"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artistsV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"concertArtists"}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"concertArtists"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistPageV2"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"artistTopCity"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CityListenerStats"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"numberOfListeners"}},{kind:"Field",name:{kind:"Name",value:"city"}},{kind:"Field",name:{kind:"Name",value:"country"}},{kind:"Field",name:{kind:"Name",value:"region"}}]}}]};var EC=n(74991),xC=n(284),CC=n(62344),wC=n(22823),IC=n(75207),TC=n(23312);const AC="main-nowPlayingView-artistBio",PC="main-nowPlayingView-artistBioContent",OC="main-nowPlayingView-artistBioButton",DC="main-nowPlayingView-artistBioHasImage",RC="muTn937T_T9l0xqjlN8A",LC="main-nowPlayingView-artistBioText",FC="main-nowPlayingView-artistBioPlaceholderWrapper",jC=new Set(["spotify:artist:5UUG83KSlqPhrBssrducWV"]),MC=({artistUri:e,artist:t,visuals:n,stats:i,externalLinks:a=[]})=>{const[s,r]=(0,sr.useState)(!1),{gallery:o,avatarImage:l}=n,{monthlyListeners:d,worldRank:m,followers:p,topCities:g}=i,{spec:h,logger:k}=(0,Lo.fU)(xC.w,{}),v=(0,Qr.s0)(),f=(0,sr.useCallback)((()=>{const t=h.hitUiReveal();k.logInteraction(t),r(!0);const n=(0,c.EC)(e).toURLPath(!0);v(n)}),[k,h,e,v]);if(jC.has(e)||!t.biography?.text)return null;const y=[];o.items.forEach((e=>{const t=e.sources.map(cn.Bi),n=(0,IC.X)(t,{desiredLabel:"large",desiredSize:600});n&&y.push(n)}));const S=y.find((e=>(e.width||0)>=(e.height||0))),b=[];l?.sources.forEach((e=>{const t=(0,cn.Bi)(e);t&&b.push(t)}));const _=S&&{backgroundImage:`linear-gradient(${uu.u1d} 0%, ${uu.ajA} 100%), url(${S.url})`},N=t.verified&&!S&&b.length>0||!t.verified&&!S;return(0,lr.jsxs)(Bx.$,{className:AC,children:[(0,lr.jsx)("button",{type:"button","aria-label":t.name,className:uo()(OC,{[DC]:!!_}),onClick:f,style:_,"":"npv-artist-bio-button",children:(0,lr.jsxs)("div",{className:uo()(PC),children:[t.verified&&(0,lr.jsx)(wC.S,{text:u.ag.get("artist.verified")}),N&&(0,lr.jsx)(CC.q,{images:b,label:t.name,width:80,userIconSize:30,testID:"npv-artist-bio-avatar",customPlaceholder:(0,lr.jsx)("div",{className:FC,"":"npv-artist-bio-placeholder-wrapper",children:(0,lr.jsx)(EC.a,{iconSize:30})})}),(0,lr.jsxs)("div",{className:LC,children:[(0,lr.jsx)(xo.D,{as:"div",variant:"ballad",children:!!d&&u.ag.get("artist.monthly-listeners-count",d)}),(0,lr.jsx)("div",{children:(0,lr.jsx)(xo.D,{as:"span",variant:"mesto",className:RC,children:(0,lr.jsx)(zN.N,{source:t.biography.text})})})]})]})}),(0,lr.jsx)(TC.W,{artistUri:e,name:t.name,bio:t.biography?.text,bioSource:t.biography?.type,worldRank:m||0,isOpen:s,closeModal:()=>r(!1),images:y,externalLinks:a,topCities:g?.items,followers:p,monthlyListeners:i.monthlyListeners})]})},UC="main-nowPlayingView-creditsHeader",BC="main-nowPlayingView-creditsGroup",VC="main-nowPlayingView-creditsSource",HC="M0CzbL0Aoihruh3FEV_c",GC="zhpxNFtPj9BgqjfJkKoP",WC="VPhePP8rNWdt0eVh5lJC",zC=({roleCredits:e,sources:t})=>(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)("div",{className:BC,children:e.filter((e=>e.artists.length>0)).map((e=>(0,lr.jsxs)("div",{children:[(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",semanticColor:"textBase",children:Xm(e.roleTitle)}),(0,lr.jsx)(xo.D,{as:"p",variant:"mesto",semanticColor:"textSubdued",children:e.artists.map((e=>e.name)).join(u.ag.getSeparator())})]},e.roleTitle)))}),t.length>0&&(0,lr.jsxs)(xo.D,{className:VC,as:"p",variant:"mesto",children:[u.ag.get("track-credits.source"),":"," ",t.join(u.ag.getSeparator())]})]}),KC=({extendedCredits:e})=>e&&0!==e.length?(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsxs)("div",{className:BC,children:[(0,lr.jsx)(Bx.M,{className:UC,children:u.ag.get("track-credits.additional-credits")}),e.map((e=>(0,lr.jsxs)("div",{children:[(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",semanticColor:"textBase",children:ep(e.roleTitle)}),(0,lr.jsx)(xo.D,{as:"p",variant:"mesto",semanticColor:"textSubdued",children:e.artists.length>0?e.artists.map((e=>e.name)).join(u.ag.getSeparator()):"-"})]},e.roleTitle)))]}),(0,lr.jsxs)(xo.D,{as:"p",variant:"mesto",className:GC,children:[u.ag.get("track-credits.source"),":"," ",(0,lr.jsxs)(WN.default,{to:"https://soundbetter.com",target:"_blank",className:WC,children:["SoundBetter",(0,lr.jsx)(uN.T,{iconSize:12,className:HC})]})]})]}):null,YC=({uri:e})=>{const{data:t,error:n,loading:i}=(0,$m.J)(hs.pH.V,[e.id],{cacheTime:12e6,staleTime:6e6});if(n||i||!t)return null;const a=t.body;return(0,lr.jsxs)(Bx.$,{children:[(0,lr.jsx)(Bx.M,{className:UC,children:u.ag.get("web-player.now-playing-view.credits")}),a.roleCredits&&(0,lr.jsx)(zC,{roleCredits:a.roleCredits,sources:a.sourceNames}),a.extendedCredits&&(0,lr.jsx)(KC,{extendedCredits:a.extendedCredits})]})},qC=()=>{const{uri:e,isTrackPlaying:t}=(0,vr.Y)((e=>({uri:e?.item?.uri,isTrackPlaying:(0,he.G_)(e?.item??void 0)})),((e,t)=>e?.uri===t?.uri)),n=(0,c.EC)(e);return t&&n?(0,lr.jsx)(YC,{uri:n}):null};var ZC=n(44887),QC=n(39936);const JC="main-nowPlayingView-sectionHeaderSpacing",$C="main-nowPlayingView-lyricsTitle",XC="main-nowPlayingView-lyricsControls",ew="main-nowPlayingView-lyricsGradient",tw="main-nowPlayingView-lyricsContent",nw=()=>{const{spec:e,logger:t}=(0,Lo.fU)(ZC.p,{}),{setMode:n}=qE();return(0,lr.jsxs)("div",{className:XC,children:[(0,lr.jsx)(Wg,{label:u.ag.get("web-player.now-playing-view.lyrics.cinema-mode"),onClick:()=>{n(xk.LyricsMode.cinema),t.logInteraction(e.cinemaModeButtonFactory().hitUiReveal()),t.logImpression(e.cinemaModeButtonFactory().impression())},children:(0,lr.jsx)(Ug.S,{iconSize:16})}),(0,lr.jsx)(Wg,{label:u.ag.get("web-player.now-playing-view.close.lyrics"),onClick:()=>{n(xk.LyricsMode.none),t.logInteraction(e.closeLyricsButtonFactory().hitUiHide())},children:(0,lr.jsx)(Rm.k,{iconSize:16})})]})},iw=({item:e})=>{const{spec:t,logger:n}=(0,Lo.fU)(ZC.p,{}),i=(0,sr.useRef)(null),{mode:a,setMode:s}=qE(),r=(0,sr.useRef)(null),o=(0,sr.useRef)(0),{data:l}=(0,Ag.C)(e.uri,e?.images),d=(0,vr.Y)((e=>e?.nextItems?.[0]),((e,t)=>e?.uri===t?.uri));(0,Ag.C)(d?.uri,d?.images);const c=(0,sr.useCallback)((()=>{o.current=Date.now()}),[]),m=(0,sr.useCallback)((({lineRef:e,isActiveLine:t,shouldAnimateScroll:n,activeLineIndex:a,isFirstLine:s})=>{if(!i.current||!r.current)return;let l;if(e.current&&t?l=e.current?.offsetTop-r.current?.offsetTop-16:s&&a<0&&(l=0),void 0===l)return;const d=r.current?.scrollTop,c=Math.abs(d-l),u=i.current.clientHeight,m=Date.now()-o.current<2e3,p=o.current>0&&c>1*u;if(m||p)return;o.current=0;const g="visible"===document.visibilityState&&n?"smooth":"auto";r.current?.scrollTo({top:l,behavior:g})}),[]);if((0,sr.useLayoutEffect)((()=>{o.current=0,r.current?.scrollTo({top:0,behavior:"auto"})}),[e.uri]),!l?.hasLyrics)return null;if(a===xk.LyricsMode.npv){const t=l?.hasLyrics&&!l.isTimeSynced,n={"--lyrics-color-active":t?uu.ixZ:l.colors.activeText,"--lyrics-color-inactive":l.colors.text,"--lyrics-color-passed":En.Il.fromCSS(l.colors.activeText,.7).toCSS(En.jT.RGBA),"--lyrics-color-background":l.colors.background};return(0,lr.jsxs)(Bx.$,{className:uo()(JC,ew),style:n,ref:i,children:[(0,lr.jsxs)(Bx.M,{className:$C,children:[u.ag.get("web-player.lyrics.title"),(0,lr.jsx)(nw,{})]}),(0,lr.jsxs)("div",{className:tw,ref:r,onWheel:c,onScroll:c,children:[t&&(0,lr.jsx)(xo.D,{as:"p",variant:"mesto",dir:"auto",style:{color:l.colors.text},children:u.ag.get("web-player.lyrics.unsynced")}),(0,lr.jsx)(QC.Z,{trackUri:e.uri,data:l,format:"card",onActiveLineChange:m})]})]})}return(0,lr.jsx)(Bx.$,{className:JC,children:(0,lr.jsxs)(Bx.M,{className:$C,children:[u.ag.get("web-player.lyrics.title"),(0,lr.jsx)(rC,{onClick:()=>{s(xk.LyricsMode.npv),n.logInteraction(t.showLyricsButtonFactory().hitUiReveal()),n.logImpression(t.showLyricsButtonFactory().impression())},children:u.ag.get("web-player.now-playing-view.show.lyrics")})]})})};var aw=n(16761);const sw="main-nowPlayingView-merch",rw=({artistId:e,merch:t,fallbackMerch:n,enableMerchFallback:i})=>{let a=t;return i&&(!t||t.length<1)&&n.length>0&&(a=n),!a||a.length<1?null:(0,lr.jsxs)(Bx.$,{className:sw,children:[(0,lr.jsx)(Bx.M,{children:u.ag.get("web-player.now-playing-view.npv-merch")}),(0,lr.jsx)(aw.ArtistOffers,{items:a,artistId:e,merchVariant:ut.sM.VARIANTA,variant:"ballad"})]})};var ow=n(7184),lw=n(64991),dw=n(43438);const cw="IgTMXVbZtqtZwu3GZASd",uw="uvIvZ4XqfEFs88BAPaI8",mw="svHFeMC3Ef_TpSdRyvsM",pw=({artistId:e,data:t,variant:n="ballad"})=>{const i=(0,dw.GJ)(e),a=(0,Qr.s0)(),{spec:s,logger:r}=(0,Lo.fU)(ow.createDesktopOnTourSectionEventFactory,{data:{uri:i,position:0,reason:""}}),o={items:t.items.map((e=>({...e,artists:{items:e.artistsV2.items.flatMap((e=>"Artist"===e.data.__typename?e.data:[]))}}))),totalCount:t.totalCount};return o.items.length?(0,lr.jsxs)(Bx.$,{className:cw,children:[(0,lr.jsxs)(Bx.M,{children:[(0,lr.jsx)("div",{children:u.ag.get("web-player.now-playing-view.on-tour")}),o.items.length!==o.totalCount&&(0,lr.jsx)(mu.o,{buttonSize:"sm",condensed:!0,className:mw,onClick:()=>{(()=>{const e=s.seeAllButtonFactory({uri:i}).hitUiNavigate({destination:`${i}:concerts`});r.logInteraction(e);const t=(0,c.EC)(`${i}:concerts`).toURLPath(!0);a(t)})()},semanticColor:"textSubdued",children:u.ag.get("web-player.now-playing-view.show-all")})]}),o.items.map(((e,t)=>(0,lr.jsx)("div",{className:uw,children:(0,lr.jsx)(lw.A,{concert:e,index:t,spec:s,condensed:!0,elevatedDate:!0,titleVariant:n})},e.uri)))]}):null},gw=({item:e,spec:t})=>{const{loading:n,error:i,data:a}=(s={artistUri:e.artists[0].uri,trackUri:e.uri},r={cacheTime:12e5,staleTime:6e5},(0,Wt.a)(NC,s,r));var s,r;const o=(0,Xo.W6)(Ns.Ol),l=(0,Xo.W6)(Ns.xU),d=(0,Xo.W6)(Ns.oo),c=bx(e);if(n&&e.uri&&!i)return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(kC,{}),(0,lr.jsx)(kC,{}),(0,lr.jsx)(kC,{})]});if(!e.uri||"Artist"!==a?.artistUnion.__typename||"Track"!==a?.trackUnion.__typename||n||i)return null;const{profile:u,stats:m,visuals:p,profile:{externalLinks:g}}=a.artistUnion;return(0,lr.jsxs)(lr.Fragment,{children:[o&&(0,lr.jsx)(iw,{item:e}),(0,lr.jsxs)(Lo.Nh,{spec:t,children:[(0,lr.jsx)(MC,{artistUri:a.artistUnion.uri,artist:u,stats:m,visuals:p,externalLinks:g.items}),l&&(0,lr.jsx)(qC,{}),(0,lr.jsx)(pw,{artistId:a.artistUnion.id,data:a.artistUnion.goods.events.concerts}),(0,lr.jsx)(rw,{artistId:a.artistUnion.id,artistUri:a.artistUnion.uri,merch:a.trackUnion.merch.items,fallbackMerch:a.artistUnion.goods.merch.items,enableMerchFallback:d}),c&&(0,lr.jsx)(Vx,{item:e})]})]})},hw=({item:e,spec:t})=>(0,gg.k)()&&e.artists[0].uri?(0,lr.jsx)(gw,{item:e,spec:t}):(0,lr.jsx)(lr.Fragment,{}),kw=({item:e,spec:t})=>(0,ix.G)(e)&&!e.isLocal?(0,lr.jsx)(hw,{item:e,spec:t}):(0,ix.G)(e)&&e.isLocal?(0,lr.jsx)(_C,{}):(0,he.iw)(e)?(0,lr.jsx)(bC,{item:e,spec:t}):(0,he.G7)(e)?(0,lr.jsx)(sx,{}):(0,he.k6)(e)?(0,lr.jsx)(ax,{}):null,vw=({item:e,spec:t})=>{const n=(0,Lo.$P)(),i=(0,sr.useCallback)((i=>{const a=i?t.heartButtonFactory().hitLike({itemToBeLiked:e.uri}):t.heartButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});n.logInteraction(a)}),[e.uri,n,t]);return(0,he.G_)(e)?(0,lr.jsx)(Bd.B,{uri:e.uri,size:wh.q.xs,onClick:i}):(0,he.iw)(e)?(0,lr.jsx)(Ih.w,{uri:e.uri,size:wh.q.xs,onClick:i}):null};function fw(e){return(0,he.G_)(e)||(0,he.RB)(e)||(0,he.iw)(e)||(0,he.G7)(e)?e.name:(0,he.k6)(e)?"":(0,fe.U)(e)}const yw=({context:e,item:t})=>{const{spec:n,logger:i}=(0,Lo.fU)(QE.createDesktopNpvHeaderSectionEventFactory,{});return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(vw,{item:t,spec:n}),(0,lr.jsx)(Pl.yj,{menu:(0,lr.jsx)(nC.$,{context:e,item:t}),children:(0,lr.jsx)(qb.z,{size:qb.q.xs,label:u.ag.get("more.label.context",fw(t)),onClick:()=>{i.logInteraction(n.contextMenuButtonFactory().hitUiReveal())}})})]})};var Sw=n(50338),bw=n(99548);const _w="main-nowPlayingView-coverArt",Nw=({context:e,item:t,index:n})=>{const{spec:i,logger:a}=(0,Lo.fU)(QE.createDesktopNpvHeaderSectionEventFactory,{}),s=(0,hS.O)();return(0,lr.jsx)(lr.Fragment,{children:(0,lr.jsx)(Pl._P,{menu:(0,lr.jsx)(nC.$,{context:e,item:t}),children:(0,lr.jsx)("div",{draggable:(0,he.G_)(t)||(0,he.iw)(t),onDragStart:e=>{s(e,[t.uri],(0,iC.R)(t))},children:(0,lr.jsx)(bw.y,{uri:e.uri,owner:e.metadata?.context_owner,children:(0,lr.jsx)(Sw.R,{context:e,item:t,index:n,isVisible:!0,onClick:()=>{a.logInteraction(i.coverArtFactory({uri:t.uri}).hitUiNavigate({destination:t.uri}))},adEventReason:"visual_enhancement",children:(0,lr.jsx)(No.T,{className:_w,item:t,maxSize:384,desiredLabel:"xlarge"})})})})})})},Ew="main-nowPlayingView-nowPlayingWidget",xw="main-nowPlayingView-nowPlayingGrid",Cw="main-nowPlayingView-contextItemInfo",ww="main-nowPlayingView-trackInfo",Iw=(0,sr.lazy)((()=>n.e(5160).then(n.bind(n,5160)))),Tw=(0,sr.lazy)((()=>n.e(4073).then(n.bind(n,94073)))),Aw=({showContextItemInfo:e=!0,hideCoverArt:t=!1})=>{const{spec:n,logger:i}=(0,Lo.fU)(QE.createDesktopNpvHeaderSectionEventFactory,{}),a=(0,wd.x)();if(null===a)return null;const{context:s,item:r,index:o}=a,l="isPodcastAd"in r&&r.isPodcastAd&&r.metadata?.["podcast_ads.buttonMessage"]&&r.metadata?.["podcast_ads.tagline"];return(0,lr.jsxs)("div",{className:Ew,children:[(0,lr.jsxs)("div",{className:xw,children:[!t&&(0,lr.jsx)(Nw,{context:s,item:r,index:o}),e?(0,lr.jsxs)("div",{className:Cw,children:[(0,lr.jsx)(Eo._,{isNowPlayingView:!0,className:uo()(ww),context:s,item:r,titleTypeVariant:"canon",subtitleTypeVariant:"ballad",onTitleClick:e=>{i.logInteraction(n.titleFactory({uri:r.uri}).hitUiNavigate({destination:e||""}))},onSubtitleClick:e=>{i.logInteraction(n.artistFactory({uri:r.uri}).hitUiNavigate({destination:e||""}))}}),(0,he.k6)(r)?l?null:(0,lr.jsx)(sr.Suspense,{fallback:!0,children:(0,lr.jsx)(Iw,{item:r,onCtaClick:e=>{i.logInteraction(n.titleFactory({uri:r.uri}).hitUiNavigate({destination:e||""}))}})}):(0,lr.jsx)(yw,{context:s,item:r})]}):null]}),l&&(0,lr.jsx)(sr.Suspense,{fallback:!0,children:(0,lr.jsx)(Tw,{item:r,onCtaClick:e=>{i.logInteraction(n.titleFactory({uri:r.uri}).hitUiNavigate({destination:e||""}))}})})]})},Pw=()=>{const e=(0,$s.I0)(),t=(0,Kg.m)();return(0,sr.useEffect)((()=>{t===zg.s.NowPlayingView&&e((0,mk.Bl)(Yg.B.npv))}),[e,t]),(0,lr.jsx)("div",{id:"VideoPlayerNpv_ReactPortal"})},Ow="main-nowPlayingView-container",Dw="main-nowPlayingView-gradient",Rw="main-nowPlayingView-content",Lw="main-nowPlayingView-panelOpenDiv",Fw=({item:e,spec:t})=>{const n=(0,$s.v9)((e=>e.ads?.vto)),i="audio"!==e?.mediaType&&(e?.type===ve.p.AD&&n?.isMinimized||e?.type===ve.p.EPISODE);return(0,lr.jsx)("div",{className:Lw,"":"NPV_Panel_OpenDiv",children:e&&(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(Aw,{hideCoverArt:i}),(0,lr.jsx)(kw,{item:e,spec:t}),!(0,he.iw)(e)&&(0,lr.jsx)(uC,{})]})})},jw=({item:e,spec:t,currentPanel:n})=>n===zg.s.NowPlayingView?(0,_s.At)(e)?(0,lr.jsx)(_s.tZ,{spec:t}):(0,lr.jsx)(Fw,{currentPanel:n,item:e,spec:t}):(0,lr.jsx)("div",{"":"NPV_Panel_ClosedDiv"}),Mw=({className:e,currentPanel:t})=>{const{item:n}=(0,wd.x)()||{item:null},{spec:i,UBIFragment:a}=(0,Lo.fU)(ZE.m,{data:{uri:n?n.uri:""}}),s=(0,$s.I0)(),r=(0,Lo.Wi)(i),{title:o,link:l}=(()=>{const{user:e}=(0,$s.v9)(hu.Gg),{item:t,context:n}=(0,vr.Y)((e=>({item:e?.item,context:e?.context})),((e,t)=>e.item?.uri===t.item?.uri));if(!t||!n)return{title:null,link:null};const i=(0,Vy.gB)();if(n.uri===i.uri||n.uri===JE.b)return{title:i.name,link:$E(JE.b)};if((0,he.k6)(t))return{title:u.ag.get("ad-formats.advertisement"),link:null};if("queue"===t.provider)return{title:u.ag.get("playback-control.queue"),link:$E("spotify:app:queue")};const a=(0,Vy.I2)(e?.id);if(n.uri===a?.uri)return{title:a?.name,link:$E(a?.uri)};const s=(0,Vy.bl)(e?.id);if(n.uri===s?.uri)return{title:s?.name,link:$E(s?.uri)};if((0,_s.MW)(n.uri))return{title:n.metadata?.context_description??"",link:null};const r=(0,c.EC)(n.uri);if(r?.type===c.JM.TRACK||r?.type===c.JM.EPISODE||r?.type===c.JM.SHOW){if((0,he.G_)(t))return{title:t.name,link:$E(t.uri)};if((0,he.iw)(t)||(0,he.G7)(t))return{title:t.metadata?.["show.publisher"]??t.name,link:$E(t.uri)}}return{title:n.metadata?.context_description??"",link:$E(n.uri)}})(),d=(()=>{const{item:e}=(0,wd.x)()||XE,{isNarrator:t}=(0,_s.oP)(),n=(0,Xo.W6)(Ns.Mk),i=(0,Pg.b)(e?.images?.[0]?.url,lE.Sns,"colorDark");return t?_s.QU:n?i:null})(),m=d?{"--background-base":d}:{},p=(0,Lo.$P)(),g=(0,sr.useMemo)((()=>(0,QE.createDesktopNpvHeaderSectionEventFactory)()),[]);return(0,lr.jsx)(ub.fd,{surface:ub.Tg.NOW_PLAYING,children:(0,lr.jsx)(zk.DJ.Provider,{value:"now_playing_panel",children:(0,lr.jsx)(ex.l,{label:u.ag.get("web-player.now-playing-view.label"),className:uo()(Ow,e,{[Dw]:null!==d}),style:m,itemUri:n?.uri?n.uri:"","":"now-playing-view-container",children:(0,lr.jsx)(a,{spec:i,children:(0,lr.jsxs)(tx.K,{className:Rw,ref:r,children:[(0,lr.jsx)(nx.V,{title:o,link:l,panel:zg.s.NowPlayingView,onClose:()=>{const e=g.closeButtonFactory().hitUiHide();p.logInteraction(e),s((0,mk.Bl)(Yg.B.mini))},isAdvert:null!==n&&(0,he.k6)(n)}),(0,lr.jsx)(Pw,{}),(0,lr.jsx)(jw,{currentPanel:t,item:n,spec:i})]})})})})})};var Uw=n(25459);const Bw="Cffu0OWzcoGaMWSXoGsq",Vw="L5PLOiBhdFNjs4FEu8ln",Hw=Date.now()-6912e5,Gw=sr.memo((function({children:e}){const[t,n]=(0,sr.useState)(!1),[i,a]=(0,ho.z)("npv-onboarding-dismissed-time",Hw),[s,r]=(0,ho.z)("npv-onboarding-never-show-again",!1),o=(0,sr.useCallback)((()=>{rx.y.set((()=>({triggerId:null,triggerAction:null}))),a(Date.now()),r(t)}),[t,a,r]),l=(0,sr.useCallback)((e=>{const t=e.target.checked;n(t)}),[]),d=ov()(u.ag.get("web-player.now-playing-view.onboarding.description"),{transform:{b:e=>(0,lr.jsx)(xo.D,{variant:"balladBold",semanticColor:"textBase",children:e.children})}});return(0,lr.jsx)(Uw.P,{id:"npv-onboarding",className:Bw,options:{isCTA:!0,getTitle:()=>u.ag.get("web-player.now-playing-view.onboarding.title"),getDescription:()=>d,primaryButtonText:()=>u.ag.get("web-player.now-playing-view.onboarding.dismiss"),checkboxText:()=>u.ag.get("web-player.now-playing-view.onboarding.do-not-show-again"),placement:"top-end",tippyWrapperClassName:Vw,shouldHideOnOutsideClick:()=>!1},onPrimaryButtonClick:o,onCheckboxClick:l,children:e})}));const Ww=Date.now()-6912e5,zw=()=>{const e=function(){const[e,t]=(0,sr.useState)(!1),n=(0,Kg.m)(),i=(0,sr.useRef)(zg.s.Disabled);return(0,sr.useEffect)((()=>{n!==zg.s.NowPlayingView&&i.current===zg.s.NowPlayingView?t(!0):t(!1),i.current=n}),[n]),e}(),[t,n]=(0,ho.z)("npv-onboarding-dismissed",!1),[i]=(0,ho.z)("npv-onboarding-dismissed-time",Ww),[a]=(0,ho.z)("npv-onboarding-never-show-again",!1),s=(Date.now()-i)/36e5<24,r=(0,sr.useMemo)((()=>!a&&((!t||!s)&&!!e)),[s,e,t,a]);(0,sr.useEffect)((()=>{let e=null;return r&&(e=setTimeout((()=>{rx.y.set((()=>({triggerId:"npv-onboarding",triggerAction:null}))),n(!0)}),500)),()=>{null!==e&&clearTimeout(e)}}),[n,r])},Kw=({onClick:e})=>{const{isActive:t,toggle:n}=(0,VE.T)(zg.s.NowPlayingView),{mode:i,setMode:a}=qE(),{item:s}=(0,vr.Y)((e=>({item:e?.item})),((e,t)=>e.item?.uri===t.item?.uri)),r=!s||(0,he.k6)(s);return(0,lr.jsx)(Gw,{children:(0,lr.jsx)(Nh,{isActive:t,disabled:r,onToggle:()=>{e?.(!t),n(),i===xk.LyricsMode.cinema&&a(xk.LyricsMode.npv)},icon:BE.$,label:u.ag.get("web-player.now-playing-view.label"),testId:"control-button-npv"})})};var Yw=n(51918);const qw="ZMXGDTbwxKJhbmEDZlYy",Zw=sr.memo((function(e){const{onClick:t}=e,n=(0,Qr.TH)(),[i,a]=(0,sr.useState)(!1),s=(0,vr.Y)((e=>e?.item?.uri)),r="/lyrics"===n.pathname;return(0,sr.useEffect)((()=>{s&&(0,c.wj)(s)?(0,Yw.y)(s).then((e=>{a(e)})).catch((()=>{a(!1)})):!0===i&&a(!1)}),[i,s]),i||r?(0,lr.jsx)(Nh,{className:uo()(qw,e.className),isActive:r,onToggle:t,label:u.ag.get("web-player.lyrics.title"),testId:"lyrics-button",icon:Sh.r}):null})),Qw="/lyrics",Jw=({onClick:e,className:t})=>{const{isAnonymous:n}=(0,$s.v9)(hu.Gg),i=(0,Qr.TH)(),a=(0,Qr.s0)(),s=(0,vr.Y)((e=>!!e?.item?.metadata?.["segment.index"])),r=(0,sr.useCallback)((()=>{i.pathname.startsWith(Qw)?(e?.(null),a(-1)):(e?.(Qw),a(Qw,{state:{referrer:"now_playing_bar"}}))}),[i.pathname,a,e]);return n||s?null:(0,lr.jsx)(Zw,{onClick:r,className:t})};var $w=n(67809);function Xw({style:e,active:t,disabled:n,intent:i,label:a,labelActive:s,icon:r,iconActive:o,className:l,onClick:d}){const[c,u]=(0,sr.useState)(!1),m=(0,To.o)(),p=t&&s?s:a,g=t&&o?o:r;return(0,lr.jsx)(Nh,{style:e,className:l,isActive:t,disabled:n,onToggle:e=>{d?.(),c||e.target.blur(),u(!1),i&&m({type:"click",intent:i,targetUri:""})},onKeyDown:({key:e})=>{"enter"===e.toLowerCase()&&u(!0)},label:p,icon:g,testId:`control-button-${i}`})}var eI=n(47122);const tI=({onClick:e})=>{const{isEnabled:t,isVisible:n}=(()=>{const{isAnonymous:e}=(0,$s.v9)(hu.Gg),t=(0,_s.O6)();return e||t.isActive?{isVisible:!1}:{isVisible:!0,isEnabled:!0}})(),i=(0,Qr.TH)(),a=(0,eI.D)(),s=(0,Qr.s0)(),r=(0,sr.useMemo)((()=>"/queue"===i.pathname||"/history"===i.pathname),[i.pathname]),o=(0,sr.useCallback)((()=>{const t=a.entries?.slice(0,a.index+1)?.reverse()?.findIndex((({pathname:e})=>"/queue"!==e&&"/history"!==e));e?.(null),s(-1===t?"/":t>=0?-t:-1)}),[s,a,e]),l=(0,sr.useCallback)((()=>{e?.("/queue"),s("/queue",{state:{referrer:"now_playing_bar"}})}),[e,s]),d=(0,sr.useCallback)((()=>{t&&(r?o():l())}),[t,r,o,l]);return n?(0,lr.jsx)(JS,{uri:"spotify:queue",children:(0,lr.jsx)(Xw,{intent:"queue",icon:$w.S,label:u.ag.get("playback-control.queue"),onClick:d,active:r,disabled:!t})}):null},nI={extraControls:"main-nowPlayingBar-extraControls",topButton:"main-nowPlayingBar-topButton",lyricsButton:"main-nowPlayingBar-lyricsButton",buddyFeedIcon:"main-nowPlayingBar-buddyFeedIcon",volumeBar:"main-nowPlayingBar-volumeBar"};function iI(){const{isAnonymous:e}=(0,$s.v9)(hu.Gg),t=(0,Xo.W6)(Ns.JI),n=(0,Xo.W6)(Ns.Ol),i=((0,Xo.W6)(Ns.Ml),(0,_s._n)()),{spec:a,logger:s,UBIFragment:r}=(0,Lo.fU)(mb.createDesktopNpbExtraEventFactory,{});return(0,lr.jsx)(r,{spec:a,children:(0,lr.jsxs)("div",{className:nI.extraControls,children:[!e&&(0,p.wW)()&&(0,lr.jsx)(If.F,{property:Ns.y$,renderNewExperience:()=>(0,lr.jsx)(UE,{onClick:e=>{e?s.logInteraction(a.hifiBadgeFactory().hitUiReveal()):s.logInteraction(a.hifiBadgeFactory().hitUiHide())}})}),i&&(0,lr.jsx)(_s.Wc,{}),t&&(0,lr.jsx)(Kw,{onClick:e=>{e?s.logInteraction(a.npvButtonFactory().hitUiReveal()):s.logInteraction(a.npvButtonFactory().hitUiHide())}}),(!n||n&&!t)&&(0,lr.jsx)(Jw,{className:nI.lyricsButton,onClick:e=>{e?s.logInteraction(a.lyricsButtonFactory().hitUiNavigate({destination:e})):s.logInteraction(a.lyricsButtonFactory().hitUiNavigateBack())}}),(0,lr.jsx)(tI,{onClick:e=>{e?s.logInteraction(a.queueButtonFactory().hitUiNavigate({destination:e})):s.logInteraction(a.queueButtonFactory().hitUiNavigateBack())}}),!1,!e&&(0,lr.jsx)(xN,{}),(0,lr.jsx)(Fd,{className:nI.volumeBar,onVolumeBarClick:e=>{s.logInteraction(a.volumeBarFactory().hitSetVolume({newVolumePercentage:Math.floor(100*e)}))},onToggleMuteClick:e=>{e?s.logInteraction(a.volumeMuteButtonFactory().hitMutePlayback()):s.logInteraction(a.volumeMuteButtonFactory().hitUnmutePlayback())},onVolumeBarDrag:e=>{s.logInteraction(a.volumeBarFactory().dragSetVolume({newVolumePercentage:Math.floor(100*e)}))}}),(0,lr.jsx)(gb,{className:"control-button",disabledClassName:"control-button--disabled",onClick:e=>{e&&s.logInteraction(a.fullscreenButtonFactory().hitUiReveal())}})]})})}var aI=n(57318),sI=n(649),rI=n(73538);class oI extends sr.Component{shouldComponentUpdate(){return!1}render(){return(0,lr.jsx)("div",{className:"icon",children:(0,lr.jsx)("svg",{width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",children:(0,lr.jsxs)("g",{fill:"currentColor",fillRule:"evenodd",children:[(0,lr.jsx)("path",{d:"M1 3v9h14V3H1zm0-1h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z",fillRule:"nonzero"}),(0,lr.jsx)("path",{d:"M10 8h4v3h-4z"})]})})})}}const lI=oI;var dI=n(70175);var cI=n(34725),uI=n(75360),mI=n(46611),pI=n(43276);const gI="main-nowPlayingWidget-nowPlaying",hI="main-nowPlayingWidget-coverExpanded",kI="main-coverSlotCollapsed-navAltContainer",vI="main-nowPlayingWidget-coverArt",fI="WlJeGZh0DRN1R5IW84Yq",yI="main-nowPlayingWidget-trackInfo",SI=({onClick:e})=>{const{expandedState:t}=(0,mI.o)(),n=(0,pI.x)(),i=(0,hS.O)();if(null===n)return null;const a=t===xk.NowPlayingCoverStateEnum.expanded,{context:s,item:r,index:o}=n;return(0,lr.jsx)(dS._,{menu:(0,lr.jsx)(nC.$,{context:s,item:r}),children:(0,lr.jsx)("div",{draggable:(0,aC.Q)(r),onDragStart:e=>{i(e,[r.uri],(0,iC.R)(r))},children:(0,lr.jsx)(bw.y,{uri:s.uri,owner:s.metadata?.context_owner,children:(0,lr.jsx)(Sw.R,{context:s,item:r,index:o,isVisible:!a,onClick:(t,n)=>{e?.(n)},adEventReason:"cover_art_collapsed",children:(0,lr.jsx)(No.T,{item:r,size:56,maxSize:56,className:vI})})})})})};var bI=n(39989),_I=n(19422);const NI="main-coverSlotCollapsed-container",EI="main-coverSlotCollapsed-expandButton",xI=({children:e,onArrowClick:t,className:n})=>{const i=(0,Xo.W6)(Ns.JI),a=(0,$s.v9)(eo.Y),[s,r]=(0,ho.z)(at.cr,xk.NowPlayingCoverStateEnum.collapsed),o=s===xk.NowPlayingCoverStateEnum.expanded||a===xk.NowPlayingCoverStateEnum.expanded,{isActive:l,toggle:d}=(0,VE.T)(zg.s.NowPlayingView),c=(0,sr.useMemo)((()=>i&&l?{label:u.ag.get("npb.collapseCoverArt"),Icon:_I.C}:{label:u.ag.get("npb.expandCoverArt"),Icon:bI.y}),[i,l]);return(0,lr.jsxs)("div",{"":"CoverSlotCollapsed__container",className:uo()(NI,n),"aria-hidden":o?"true":"false",children:[e,a===xk.NowPlayingCoverStateEnum.collapsed?null:(0,lr.jsx)(nl._,{label:c.label,children:(0,lr.jsx)("button",{tabIndex:o?-1:void 0,className:uo()(EI),onClick:()=>{i?d():(r(xk.NowPlayingCoverStateEnum.expanded),t?.())},"aria-label":c.label,children:(0,lr.jsx)(c.Icon,{iconSize:16})})})]})};var CI=n(66787);const wI=({item:e,onLike:t})=>(0,he.G_)(e)?e.isLocal?null:(0,lr.jsx)(Bd.B,{uri:e.uri,className:"control-button control-button-heart",onClick:t}):(0,he.iw)(e)?(0,lr.jsx)(Ih.w,{uri:e.uri,className:"control-button control-button-heart",onClick:t}):(0,he.G7)(e)||(0,he.k6)(e)||(0,he.RB)(e)?null:(0,fe.U)(e),II=({context:e,item:t})=>{const n=((0,c.ie)(e.uri)||(0,c.oi)(e.uri))&&(0,he.G_)(t),i=(0,cI.j)(e.uri,t.uri);return n?(0,lr.jsx)(Xw,{intent:void 0,onClick:i,label:u.ag.get("playback-control.ban"),icon:Jb.H}):null},TI=({context:e,item:t,onClick:n=(()=>{})})=>{const i=(0,sr.useContext)(Dc.ZF),a=(0,Ao.g)(),s=e.metadata?.["dislike-endpoint"]??null,r=(0,$s.I0)(),o=e.metadata?.[he.sb.CONTEXT_DESCRIPTION]??"",l=(0,sr.useCallback)((async()=>{s&&(await hs.x2.setFeedback(pt.b.getInstance(),s,t.uri),e.uri&&await i.resync(e.uri),a.skipToNext(),r((0,gu.Oh)(o)),n?.())}),[e,t,i,a,s,r,o,n]);if(!(0,he.G_)(t))return null;return"1"===e.metadata?.["dislike-feedback-available"]&&null!==s?(0,lr.jsx)(rI.s,{size:16,className:"control-button control-button-feedback",isDisliked:!1,onClick:l}):null},AI=({item:e,onClick:t})=>{const n=(0,$s.I0)(),i=Sc(),a=(0,To.o)(),s=(0,dI.k)(),r=(0,vr.Y)(Lg.CM),o=(0,$s.v9)(Qg),l=(0,$s.v9)(Zg),d=o===Yg.B.npv,c=o===Yg.B.pip,m=i.getCapabilities().hasPipSupport,p=(0,sr.useCallback)((()=>{if(!r)return void s(u.ag.get("video-player.video-not-available"));const o=!l,d=o?"close-video":"show-video";t?.(l),a({type:"click",intent:d,targetUri:e.uri,itemIdSuffix:"video-toggle"}),i.getCapabilities().hasMinimizeBitrateSupport&&i.setMinimizeBitrate(o),c&&i.setPip&&m&&i.setPip(!1),n((0,mk.mO)(o))}),[r,l,t,a,e.uri,i,n,s,c,m]);if(!(0,he.iw)(e))return null;const g=o===Yg.B.fullscreen;i.setFullscreen&&i.setFullscreen(g),m&&i.setPip&&i.setPip(c),i.reportVideoMode&&i.reportVideoMode(o);const h=(0,he.iw)(e)&&("video"===e.mediaType||"mixed"===e.mediaType),k=h&&!g&&!d&&!c;return h&&i.getCapabilities().hasMinimizeBitrateSupport&&i.setMinimizeBitrate(l),k?(0,lr.jsx)(Xw,{icon:aI.O,iconActive:aI.O,intent:"video-toggle",active:!l&&r,onClick:p,label:u.ag.get("video-player.show-video"),labelActive:u.ag.get("video-player.hide-video")}):null},PI=({item:e,onClick:t})=>{const n=(0,To.o)(),{isEnabled:i,isVisible:a,show:s,hide:r}=function(){const[{isEnabled:e,isVisible:t},n]=hr();return{isEnabled:e,isVisible:t,show:(0,sr.useCallback)((()=>n(cr())),[n]),hide:(0,sr.useCallback)((()=>n(ur())),[n])}}(),o=(0,sr.useCallback)((()=>{let i;a?(r(),i="close-picture-in-picture"):(s(),i="show-picture-in-picture"),t?.(!a),n({type:"click",intent:i,targetUri:e.uri,itemIdSuffix:"picture-in-picture-toggle"})}),[a,s,r,n,e.uri,t]),l=(0,he.iw)(e)&&("video"===e.mediaType||"mixed"===e.mediaType),d=(0,he.k6)(e);return!l&&!d&&i?(0,lr.jsx)("div",{children:(0,lr.jsx)(nl._,{label:u.ag.get("npb_pip_web_player"),children:(0,lr.jsx)("button",{"":"pip-toggle-button",className:uo()(fI,"control-button",{"control-button--active":a}),onClick:o,children:(0,lr.jsx)(lI,{})})})}):null},OI=({isRemoteMode:e})=>{const{spec:t,logger:n}=(0,Lo.fU)(sI.createDesktopNpbNowPlayingWidgetEventFactory,{}),{expandedState:i}=(0,mI.o)(),a=(0,pI.x)();if(null===a)return(0,lr.jsx)("div",{className:uo()("now-playing")});const{context:s,item:r}=a,o=i===xk.NowPlayingCoverStateEnum.expanded,l=(0,CI.b)(r);return(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsxs)("div",{"":"now-playing-widget",className:uo()(gI,{[hI]:o}),role:"contentinfo","aria-label":l,children:[(0,lr.jsx)(xI,{className:kI,onArrowClick:()=>{n.logInteraction(t.coverartFactory({uri:r.uri}).coverartArrowFactory().hitUiReveal())},children:(0,lr.jsx)(SI,{onClick:e=>{n.logInteraction(t.coverartFactory({uri:r.uri}).hitUiNavigate({destination:e||""}))}})}),(0,lr.jsx)(uI._,{context:s,className:yI,item:r,onTitleClick:e=>{n.logInteraction(t.titleFactory({uri:r.uri}).hitUiNavigate({destination:e||""}))},onSubtitleClick:e=>{n.logInteraction(t.subtitleFactory({uri:r.uri}).hitUiNavigate({destination:e||""}))}}),(0,lr.jsx)(wI,{item:r,onLike:e=>{n.logInteraction(e?t.likeButtonFactory({uri:r.uri}).hitLike({itemToBeLiked:r.uri}):t.likeButtonFactory({uri:r.uri}).hitRemoveLike({itemNoLongerLiked:r.uri}))}}),(0,lr.jsx)(II,{context:s,item:r}),(0,lr.jsx)(TI,{context:s,item:r,onClick:()=>{n.logInteraction(t.hideButtonFactory().hitRemoveRecommendation({recommendedItemUri:r.uri,contextUri:s.uri}))}}),e?null:(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(AI,{onClick:e=>{n.logInteraction(e?t.videoToggleFactory({uri:r.uri}).hitUiHide():t.videoToggleFactory({uri:r.uri}).hitUiReveal())},item:r}),(0,lr.jsx)(PI,{onClick:e=>{n.logInteraction(e?t.pipButtonFactory({uri:r.uri}).hitUiHide():t.pipButtonFactory({uri:r.uri}).hitUiReveal())},item:r})]})]})})},DI="aguQsGoZR9wZeawKGdDh",RI="ieqOSqJb6kk3bG5XDOHk",LI=({paused:e,fromSeconds:t})=>{const[n,i]=(0,sr.useState)(t);return((e,t)=>{const n=(0,sr.useRef)(e);(0,sr.useEffect)((()=>{n.current=e}),[e]),(0,sr.useEffect)((()=>{if(null!==t){const e=setInterval((function(){n.current()}),t);return()=>clearInterval(e)}}),[t])})((0,sr.useCallback)((()=>{i((e=>e-1))}),[]),!e&&0!==n?1e3:null),(0,lr.jsxs)("div",{className:DI,children:[u.ag.get("ad-formats.skippable_ads.skip_countdown"),(0,lr.jsx)("span",{className:RI,children:n})]})},FI=({children:e})=>{const t=(0,vr.Y)((e=>e),((e,t)=>(0,il.V)(e?.restrictions,t?.restrictions)&&e?.item?.uri===t?.item?.uri&&e?.isPaused===t?.isPaused)),n=t?.restrictions.disallowSkippingNextReasons.includes("ad_disallow"),i=t?.isPaused??!1,a=gm(t),s=pm(t),r=(0,$s.v9)((e=>a?e?.ads?.audio?.info?.skippableAdDelaySeconds:s?e?.ads?.vto?.info?.skippableAdDelaySeconds:void 0));return n&&r?(0,lr.jsx)(LI,{paused:!!i,fromSeconds:r}):(0,lr.jsx)(lr.Fragment,{children:e})},jI=(0,sr.memo)((function({isPreview:e}){const t=(0,Ao.g)(),{spec:n,logger:i}=(0,Lo.fU)(Co.createDesktopNpbPlayerControlsEventFactory,{}),a=Cd();return(0,lr.jsxs)("div",{className:"player-controls","":"player-controls",dir:"ltr","aria-label":u.ag.get("playback-control.a11y.landmark-label"),children:[(0,lr.jsxs)("div",{className:"player-controls__buttons player-controls__buttons--new-icons",children:[(0,lr.jsxs)("div",{className:"player-controls__left",children:[a&&(0,lr.jsx)(xd,{onClick:e=>{const a=t.getState();a?.item&&i.logInteraction(n.speedControlButtonFactory().hitSetPlaybackSpeed({currentlyPlayedItem:a.item.uri,playbackSpeed:e}))}})," ",!a&&(0,lr.jsx)(El,{onClick:e=>{i.logInteraction(e?n.shuffleButtonFactory().hitShuffleEnable():n.shuffleButtonFactory().hitShuffleDisable())}}),a&&(0,lr.jsx)(kl,{onClick:e=>{i.logInteraction(n.seekBackButtonFactory().hitSeekByTime({msSeekedOffset:e}))}}),(0,lr.jsx)(wl,{onClick:()=>{const e=t.getState();e&&i.logInteraction(n.previousButtonFactory().hitSkipToPrevious({itemToBeSkipped:e.item?.uri||"",positionMs:(0,Wx.k)(e)??-1,totalContentMs:e.duration??-1}))}})]}),(0,lr.jsx)(sl,{onClick:e=>{const a=t.getState();a?.item&&("resume"===e?i.logInteraction(n?.playPauseButtonFactory().hitResume({itemToBeResumed:a.item.uri})):"pause"===e&&i.logInteraction(n?.playPauseButtonFactory().hitPause({itemToBePaused:a.item.uri})))}}),(0,lr.jsxs)("div",{className:"player-controls__right",children:[(0,lr.jsx)(FI,{children:(0,lr.jsx)(Al,{onClick:()=>{const e=t.getState();e?.item&&i.logInteraction(n.nextButtonFactory().hitSkipToNext({itemToBeSkipped:e.item.uri,positionMs:(0,Wx.k)(e)??-1,totalContentMs:e.duration??-1}))}})}),a&&(0,lr.jsx)(yl,{onClick:e=>{i.logInteraction(n.seekForwardButtonFactory().hitSeekByTime({msSeekedOffset:e}))}}),!a&&(0,lr.jsx)(pl,{onClick:e=>{const t={[he.zq.REPEAT_NONE]:n.repeatButtonFactory().hitRepeatDisable(),[he.zq.REPEAT_TRACK]:n.repeatButtonFactory().hitRepeatOneEnable(),[he.zq.REPEAT_CONTEXT]:n.repeatButtonFactory().hitRepeatEnable()};i.logInteraction(t[e])}})]})]}),(0,lr.jsx)(qo,{isPreview:e})]})}));var MI=n(11611);const UI="main-nowPlayingBar-container",BI="main-nowPlayingBar-nowPlayingBar",VI="main-nowPlayingBar-isAnonymous",HI="main-nowPlayingBar-enter",GI="main-nowPlayingBar-enterActive",WI="main-nowPlayingBar-enterDone",zI="main-nowPlayingBar-left",KI="main-nowPlayingBar-center",YI="main-nowPlayingBar-right",qI=()=>{const{isAnonymous:e}=(0,$s.v9)(hu.Gg),t=(0,$s.I0)(),n=(0,To.o)(),i=(0,vr.Y)((e=>e),((e,t)=>e?.hasContext===t?.hasContext&&e?.item?.uri===t?.item?.uri)),a=(0,vr.Y)((e=>(0,he.k6)(e?.item??void 0))),s=(0,Ao.g)(),r=(0,MI.Y)(),{isPlayingRemotely:o,connectionStatus:l,remoteDevice:d}=function(){const e=(0,kr.O)();let t,n=!1;return e.connectionStatus===_t.TK.CONNECTING?(n=!0,t=e.connectingDevice):e.connectionStatus===_t.TK.CONNECTED&&(n=!0,t=e.activeDevice),{isPlayingRemotely:n,connectionStatus:e.connectionStatus,remoteDevice:t}}();(0,sr.useEffect)((()=>{s.setForcedShuffle(r)}),[r,s]);const c=(0,sr.useCallback)((e=>{e.stopPropagation(),t((0,Xr.xO)()),n({intent:"signup",type:"click"})}),[t,n]),u=()=>(0,lr.jsx)(zk.DJ.Provider,{value:"now_playing_bar",children:(0,lr.jsxs)("div",{className:e?VI:BI,children:[(0,lr.jsx)("div",{className:zI,children:(0,lr.jsx)(OI,{isRemoteMode:o})}),(0,lr.jsx)("div",{className:KI,children:(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(jI,{isPreview:e})})}),(0,lr.jsx)("div",{className:YI,children:(0,lr.jsx)(iI,{})})]})});return(0,lr.jsx)(ub.fd,{surface:ub.Tg.NOW_PLAYING,children:(0,lr.jsx)(th.ZP,{value:"now-playing-bar",children:(0,lr.jsxs)("footer",{className:UI,"":"now-playing-bar","data-testadtype":"ad-type-"+(a?"ad":"none"),children:[e?(0,lr.jsx)(th.ZP,{value:"preview-bar",children:(0,lr.jsx)(ab,{handleClick:c})}):null,e?(0,lr.jsx)(lv.Z,{in:i?.hasContext??!1,timeout:200,classNames:{enter:HI,enterActive:GI,enterDone:WI},children:u()}):u(),o&&d&&(0,lr.jsx)(cb,{status:l,deviceName:d.name,deviceType:d.type})]})})})};var ZI=n(70631),QI=n(8678),JI=n(37912),$I=n(23600);var XI=n(68776),eT=n(16004);var tT=n(38176),nT=n(78802);const iT=({onChangePermission:e,onRemoveMember:t,onLeave:n,member:i,capabilities:a})=>(0,lr.jsxs)(gd.v,{children:[a.canAdministratePermissions&&"VIEWER"===i.permissionLevel&&(0,lr.jsx)(kd.s,{role:"menuitemradio","aria-checked":!1,onClick:()=>e("CONTRIBUTOR"),leadingIcon:(0,lr.jsx)(tT.h,{iconSize:16}),children:(0,lr.jsx)(xo.D,{variant:"mesto",children:u.ag.get("contextmenu.make-collaborator")})}),a.canAdministratePermissions&&"CONTRIBUTOR"===i.permissionLevel&&(0,lr.jsx)(kd.s,{role:"menuitemradio","aria-checked":!1,onClick:()=>e("VIEWER"),leadingIcon:(0,lr.jsx)(tT.h,{iconSize:16}),children:(0,lr.jsx)(xo.D,{variant:"mesto",children:u.ag.get("contextmenu.make-listener")})}),a.canAdministratePermissions&&(0,lr.jsx)(kd.s,{role:"menuitemradio","aria-checked":!1,onClick:()=>t(),leadingIcon:(0,lr.jsx)(nT.F,{iconSize:16}),children:(0,lr.jsx)(xo.D,{variant:"mesto",children:u.ag.get("contextmenu.remove-user-from-playlist")})}),a.canCancelMembership&&(0,lr.jsx)(kd.s,{role:"menuitemradio","aria-checked":!1,onClick:()=>n(),leadingIcon:(0,lr.jsx)(nT.F,{iconSize:16}),children:(0,lr.jsx)(xo.D,{variant:"mesto",children:u.ag.get("contextmenu.leave-playlist")})})]}),aT="BcnmjYfXOAeitEfgAPl6",sT="TyF75BooCfm5fJnA4XQY",rT="TcErZJbTZpN8HIgWMd5n",oT="BmWdMJcMaW6bsnYoHvO5",lT="A01aXaVEC14dEvpLdH0h",dT="RRgksp2YQ5yCTY3fG8c5",cT="ttg4QuP3hS13nliEPlmS",uT="dfdmOp6sP6kvpppsfnoO",mT="Oxwpqw2lyewx__AmCPlS",pT="V1By35exkhnkgbEeAQXN",gT="_uwvL3Y_Wnj_KZiCTAks",hT="BvQLGIYvKgcZxPTGJnWc",kT="QIWSUTRvc_sCKCXhR1v4",vT="niUTA9FhPwaWPOpzcZOX",fT="uy6zaVvwrdXhU47KjWvA",yT=({uri:e,member:t,capabilities:n,isCurrentUser:i})=>{const a=(0,$s.I0)(),[s,r]=(0,sr.useState)(!1),{changeMemberPermission:o,removeMember:l}=(e=>{const t=(0,$I.z)(),n=(0,sr.useCallback)((async(n,i)=>{await t.setMemberPermission(e,n,i)}),[t,e]),i=(0,sr.useCallback)((async n=>{await t.removeMember(e,n)}),[t,e]),a=(0,sr.useCallback)((async n=>{await t.setBasePermission(e,n)}),[t,e]);return{uri:e,changeMemberPermission:n,removeMember:i,changeBasePermission:a}})(e),d=(0,sr.useCallback)((e=>{t.user&&(o(t.user.username,e),r(!0))}),[o,t.user]),c=(0,sr.useCallback)((()=>{t.user&&(l(t.user.username),r(!0))}),[t.user,l]),m=(0,sr.useCallback)((()=>{a((0,Qs.IF)(e))}),[a,e]),p=!t.isOwner&&(n?.canAdministratePermissions||n?.canCancelMembership&&i);let g="CONTRIBUTOR"===t.permissionLevel?u.ag.get("permissions.collaborator"):u.ag.get("permissions.listener");return t.isOwner&&(g=u.ag.get("permissions.creator")),p&&n?(0,lr.jsx)(yp.y,{renderInline:!0,menu:(0,lr.jsx)(iT,{onChangePermission:d,onRemoveMember:c,onLeave:m,capabilities:n,member:t}),children:(e,t,n)=>(0,lr.jsxs)("button",{className:uo()(kT,vT,{[fT]:s}),onClick:t,ref:n,type:"button","":"permissions-menu",children:[(0,lr.jsx)(xo.D,{variant:"mesto",children:g}),e?(0,lr.jsx)(eT.U,{iconSize:16}):(0,lr.jsx)(pS.i,{iconSize:16})]})}):(0,lr.jsx)(xo.D,{variant:"mesto",className:kT,children:g})},ST=({member:e,playlistUri:t,username:n,capabilities:i,onClose:a})=>{if(!e.user)return null;const s=n===e.user.username,r=s&&e.user.displayName?u.ag.get("permissions.current-user-name",e.user.displayName):e.user.displayName;return(0,lr.jsxs)("div",{className:uT,children:[(0,lr.jsxs)("div",{className:mT,children:[(0,lr.jsx)(CC.q,{label:e.user.displayName,images:e.user.images.map((e=>({url:e.url,width:e.width||null,height:e.height||null}))),width:32,userIconSize:16}),(0,lr.jsxs)("div",{className:pT,children:[(0,lr.jsx)(Pl._P,{menu:(0,lr.jsx)(XI.I,{uri:e.user.uri}),children:(0,lr.jsx)(WN.default,{title:r??e.user.username,to:e.user.uri,dir:"auto",onClick:a,children:(0,lr.jsx)(xo.D,{variant:"mestoBold",children:r})})}),e.songsAdded>0&&(0,lr.jsx)(xo.D,{className:gT,variant:"finale",children:u.ag.get("permissions.songs-added",e.songsAdded)})]})]}),(0,lr.jsx)(yT,{uri:t,member:e,capabilities:i,isCurrentUser:s})]},e.user.uri)};const bT=({isPublicPlaylist:e})=>(0,lr.jsx)("div",{className:lT,children:e?(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(QI.z,{iconSize:16}),(0,lr.jsx)(xo.D,{className:dT,variant:"finale",children:u.ag.get("permissions.public-playlist")})]}):(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(JI.Z,{iconSize:16}),(0,lr.jsx)(xo.D,{className:dT,variant:"finale",children:u.ag.get("permissions.private-playlist")})]})}),_T=({isOpen:e,uri:t,onClose:n})=>{const i=function(e){const t=(0,$I.z)(),[n,i]=(0,sr.useState)(null),a=(0,sr.useCallback)(((e,t)=>{i(e||!t?null:t)}),[]);return(0,sr.useEffect)((()=>t.subscribeToMembers(e,a)),[t,e,a]),n}(t),a=(0,$s.v9)((({session:e})=>e?.user?.id))||null;return i?(0,lr.jsx)(ku.Z,{isOpen:e,onRequestClose:n,contentLabel:u.ag.get("permissions.modal-label"),children:(0,lr.jsxs)("div",{"":"playlist-permissions-modal",className:aT,children:[(0,lr.jsxs)("div",{className:sT,children:[(0,lr.jsxs)("div",{className:rT,children:[(0,lr.jsx)(bT,{isPublicPlaylist:(s=i.basePermissionLevel,"VIEWER"===s||"CONTRIBUTOR"===s)}),(0,lr.jsx)("button",{className:cT,onClick:n,children:(0,lr.jsx)(Rm.k,{iconSize:16,"aria-label":u.ag.get("close")})})]}),(0,lr.jsx)(xo.D,{as:"h1",variant:"alto",children:u.ag.get("permissions.shared-with")})]}),(0,lr.jsx)(KS.U,{className:hT,children:(0,lr.jsx)("div",{className:oT,children:(0,lr.jsx)("div",{children:i.members&&i.members.map((e=>(0,lr.jsx)(ST,{playlistUri:t,member:e,username:a,capabilities:i.capabilities,onClose:n},e.user?.username)))})})})]})}):null;var s},NT=()=>{const e=(0,Xo.W6)(Ns.bM),{isOpen:t,uri:n}=(0,sr.useContext)(nr.vM),i=(0,sr.useContext)(nr.S7),a=(0,sr.useCallback)((()=>{i({type:"close"})}),[i]);return e&&t&&n?(0,lr.jsx)(_T,{isOpen:t,onClose:a,uri:n}):null},ET=new Map;ET.set("ad","€ 9,99"),ET.set("ar","$ 69,00"),ET.set("at","€ 9,99"),ET.set("au","$11.99"),ET.set("be","€ 9,99"),ET.set("bg","4.99 EUR"),ET.set("bo","5.99 USD"),ET.set("br","R$ 16,90"),ET.set("ca","9.99 CAD"),ET.set("ch","Fr. 12.95"),ET.set("cl","$ 3.490,00"),ET.set("co","$ 14.900,00"),ET.set("cr","5.99 USD"),ET.set("cy","6.99 EUR"),ET.set("cz","5.99 EUR"),ET.set("de","9,99 €"),ET.set("dk","kr 99,00"),ET.set("do","5.99 USD"),ET.set("ec","5.99 USD"),ET.set("ee","6.99 EUR"),ET.set("es","9,99 €"),ET.set("fi","9,99 €"),ET.set("fr","9,99 €"),ET.set("uk","£9.99"),ET.set("gr","6.99 EUR"),ET.set("gt","5.99 USD"),ET.set("hk","HK$58.00"),ET.set("hn","5.99 USD"),ET.set("hu","4.99 EUR"),ET.set("id","Rp 49.990"),ET.set("ie","€9.99"),ET.set("is","9.99 EUR"),ET.set("it","€ 9,99"),ET.set("kr","₩10,900"),ET.set("li","12.95 CHF"),ET.set("lt","6.99 EUR"),ET.set("lu","9.99 EUR"),ET.set("lv","6.99 EUR"),ET.set("mc","9.99 EUR"),ET.set("mt","6.99 EUR"),ET.set("mx","$ 99.00"),ET.set("my","RM14.90"),ET.set("ni","5.99 USD"),ET.set("nl","€9,99"),ET.set("no","kr109,00"),ET.set("nz","$14.99"),ET.set("pa","5.99 USD"),ET.set("pe","S/ 18.90"),ET.set("ph","₱129"),ET.set("pl","19,99 zł"),ET.set("pt","6.99 EUR"),ET.set("py","5.99 USD"),ET.set("se","99,00 kr"),ET.set("sg","S$9.90"),ET.set("sk","5.99 EUR"),ET.set("sv","5.99 USD"),ET.set("th","฿129.00"),ET.set("tr","13,99 TL"),ET.set("tw","NT$149.00"),ET.set("us","$9.99"),ET.set("uy","5.99 USD");const xT=new Map;xT.set("ad","€ 0,00"),xT.set("ar","$ 0,00"),xT.set("at","€ 0,00"),xT.set("au","$0.00"),xT.set("be","€ 0,00"),xT.set("bg","0.00 EUR"),xT.set("bo","0.00 USD"),xT.set("br","R$ 0,00"),xT.set("ca","0.00 CAD"),xT.set("ch","Fr. 0.00"),xT.set("cl","$ 0,00"),xT.set("co","$ 0,00"),xT.set("cr","0.00 USD"),xT.set("cy","0.00 EUR"),xT.set("cz","0.00 EUR"),xT.set("de","0,00 €"),xT.set("dk","kr 0,00"),xT.set("do","0.00 USD"),xT.set("ec","0.00 USD"),xT.set("ee","0.00 EUR"),xT.set("es","0,00 €"),xT.set("fi","0,00 €"),xT.set("fr","0,00 €"),xT.set("uk","£0.00"),xT.set("gr","0.00 EUR"),xT.set("gt","0.00 USD"),xT.set("hk","HK$0.00"),xT.set("hn","0.00 USD"),xT.set("hu","0.00 EUR"),xT.set("id","Rp 0.00"),xT.set("ie","€0.00"),xT.set("is","0.00 EUR"),xT.set("it","€ 0,00"),xT.set("li","0.00 CHF"),xT.set("lt","0.00 EUR"),xT.set("lu","0.00 EUR"),xT.set("lv","0.00 EUR"),xT.set("mc","0.00 EUR"),xT.set("mt","0.00 EUR"),xT.set("mx","$ 0.00"),xT.set("my","RM0.00"),xT.set("ni","0.00 USD"),xT.set("nl","€0,00"),xT.set("no","kr0,00"),xT.set("nz","$0.00"),xT.set("pa","0.00 USD"),xT.set("pe","S/ 0.00"),xT.set("ph","₱0.00"),xT.set("pl","0,00 zł"),xT.set("pt","0.00 EUR"),xT.set("py","0.00 USD"),xT.set("se","0,00 kr"),xT.set("sg","S$0.00"),xT.set("sk","0.00 EUR"),xT.set("sv","0.00 USD"),xT.set("th","฿0.00"),xT.set("tr","0,00 TL"),xT.set("tw","NT$0.00"),xT.set("us","$0.00"),xT.set("uy","0.00 USD");const CT="jqvEr4MvCdQ1QA_FSpe7",wT="sRkNI1Gya5aBxtf_vS1S",IT="WShxRrLdX9LzzqlCmWZy",TT="rlMoP29GxtDlHkDK_aci",AT=(0,sr.memo)((function(){const e=(0,$s.I0)(),t=(0,$s.v9)((e=>e.ui.premiumDialog.isOpen)),n=(0,$s.v9)((e=>{const t=(e=>{const t=e.toLowerCase();return{premiumPrice:ET.has(t)?ET.get(t):"99,00 kr",freePrice:xT.has(t)?xT.get(t):"0,00 kr"}})((0,eb.rZ)(e));return t.premiumPrice})),i=(0,$s.v9)(eb.C7),a=(0,sr.useCallback)((()=>e((0,Ku.Tz)())),[e]),{openURLWithSessionTransfer:s}=(0,_g.e)();return(0,lr.jsx)(ku.Z,{isOpen:t,shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1,contentLabel:u.ag.get("premium.dialog.title"),children:(0,lr.jsxs)("div",{className:CT,children:[(0,lr.jsx)("h1",{className:wT,children:u.ag.get("premium.dialog.title")}),(0,lr.jsx)("p",{className:IT,children:u.ag.get("premium.dialog.description",i?3:1)}),(0,lr.jsx)(au.D,{colorSet:"invertedLight",onClick:()=>s(As.Np),children:u.ag.get("premium.dialog.subscribe")}),(0,lr.jsx)(mu.o,{semanticColor:"textBase",onClick:a,children:u.ag.get("user.log-out")}),(0,lr.jsx)("p",{className:TT,children:i?u.ag.get("premium.dialog.disclaimer.noprice"):u.ag.get("premium.dialog.disclaimer",{price:n})})]})})}));var PT=n(79237);const OT={macOS:"https://download.scdn.co/SpotifyInstaller.zip",Windows:"https://download.scdn.co/SpotifySetup.exe"},DT={iOS:"https://app.adjust.com/wp2zrj?adgroup=signup_to_listen&campaign=default&tracker_limit=250000",Android:"https://app.adjust.com/ff0trr?adgroup=signup_to_listen&campaign=default&tracker_limit=250000"},RT="nA6L5ghQWwxyiSLduNyb",LT="CgsDbaLb2DCGHkrw4wiw",FT="qp1xbhJfglEmJAWm6pdy",jT="fFk09sW_YL0Qsk8lYOfD",MT="BDNNVyxsxgQQvGmij9M1",UT="ChX5nojraEtlxQULfJFk",BT="XV07akXqG5L_suY2X8ML",VT="j8qAQ6XAb2YSBUEzUqEV",HT="xZnbvSzpNSY7qnC6X8Rf",GT="FZncbwv9M2sxuY27K8YO",WT=(0,sr.memo)((function(){const e=(0,$s.I0)(),t=(0,$s.v9)((e=>e.ui.signupToListenDialog.isOpen)),n=(0,gS.S)(),i=(0,$s.v9)((e=>e.session.userCountry)),a=(0,$s.v9)((e=>e.features.isPodcastEnabled)),s=(0,To.o)(),r=(()=>{const e=(0,PT.y)();return Object.keys(OT).includes(e)?OT[e]:Object.keys(DT).includes(e)?DT[e]:"https://spotify.com/download"})(),o=(0,el.s4)();(0,sr.useEffect)((()=>{s({intent:"navigate",type:"view"})}),[s]);const l=(0,sr.useCallback)((()=>{const t={category:"in_app_message",action:"click",label:"dismiss",destination_url:"open.spotify.com",os:(0,Y.y)(),country:i,context:window.location.search},n=(0,Qc.x)(t);o.send(n),s({intent:"close",type:"click"}),e((0,Qs.L9)())}),[e,s,o,i]),d=(0,sr.useCallback)((()=>{const t={category:"in_app_message",action:"click",label:"download",destination_url:r,os:(0,Y.y)(),country:i,context:window.location.search},n=(0,Qc.x)(t);o.send(n),s({intent:"download",type:"click"}),e((0,Qs.L9)()),window.open(r,"_self")}),[e,s,r,o,i]);return(0,lr.jsx)(ku.Z,{animated:!0,isOpen:t,className:RT,overlayClassName:LT,contentLabel:u.ag.get("s2l.download_spotify"),onRequestClose:l,children:(0,lr.jsxs)("div",{className:FT,children:[(0,lr.jsxs)("div",{className:jT,children:[(0,lr.jsx)("div",{className:`${UT}`,children:(0,lr.jsx)("img",{className:BT,alt:"Web Player",src:(0,Mo.g)(n?"images/s2l-desktopui-rtl.png":"images/s2l-desktopui-ltr.png")})}),(0,lr.jsxs)("div",{className:MT,children:[(0,lr.jsx)(xo.D,{as:"h1",variant:"canon",className:VT,children:u.ag.get("s2l.download_spotify")}),(0,lr.jsx)(xo.D,{as:"p",semanticColor:"textSubdued",className:HT,children:a?u.ag.get("s2l.play_millions_podcasts"):u.ag.get("s2l.play_millions")}),(0,lr.jsx)(au.D,{onClick:d,children:u.ag.get("s2l.download")})]})]}),(0,lr.jsx)(mu.o,{onClick:l,semanticColor:"textBase",className:GT,children:u.ag.get("s2l.dismiss")})]})})})),zT=(0,sr.memo)((function(){return(0,lr.jsx)(th.ZP,{value:"signup-to-listen",children:(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(WT,{})})})}));var KT=n(35923),YT=n(96490);const qT=({elementRef:e})=>{const{size:t,setSize:n,minMaxRanges:i}=(0,KT.L)();return(0,lr.jsx)(YT.A,{elementRef:e,placement:"inline-end",label:u.ag.get("resize.sidebar"),cssCustomProperty:"--nav-bar-width",onCSSPropertyChange:e=>{n(e)},initialValue:t,ranges:i,decreaseSizeKeyboardCombination:_u.lb.NAVIGATION_BAR_DECREASE_WIDTH,increaseSizeKeyboardCombination:_u.lb.NAVIGATION_BAR_INCREASE_WIDTH})},ZT={},QT=e=>null===e.match(/\/search\/(\w+|\W+){1,}/gi)?e:"search-result",JT=({scrollNodeRef:e,children:t,scrollNodeChildRef:n})=>{const i=(0,sr.useRef)(""),a=(0,sr.useRef)(),s=(0,Qr.TH)(),r=(0,Qr.ur)(),o=(0,sr.useCallback)((()=>{if(!e.current)return;const t=QT(s.pathname),n=ZT[t];if(n&&"POP"===r){const t=Date.now(),i=setInterval((()=>{!e.current||Date.now()>t+3e3?clearInterval(i):e.current.scrollHeight>=n+e.current.offsetHeight&&(e.current.scrollTop=n,clearInterval(i))}),50)}else e.current.scrollTop=0}),[s.pathname,r,e]);(0,sr.useMemo)((()=>{if(!e.current)return;const t=QT(i.current);ZT[t]=e.current.scrollTop,i.current=s.pathname,a.current=void 0}),[s.pathname,e]),(0,sr.useEffect)((()=>{o()}),[s.pathname,o,e]);const l=(0,sr.useMemo)((()=>({scrollNodeRef:e,scrollNodeChildRef:n})),[e,n]);return(0,lr.jsx)(zk.VX.Provider,{value:l,children:t})};var $T=n(46669),XT=n(14291),eA=n(15522);const tA="search-modal-listbox",nA="search-modal-inputContainer",iA="search-modal-searchIcon",aA="search-modal-input",sA=(0,sr.memo)((function(e){const{value:t,onChange:n,onKeyPress:i,hasResults:a,activeResultId:s}=e;return(0,lr.jsxs)("div",{className:nA,children:[(0,lr.jsx)(qf.j,{className:iA,"aria-hidden":!0}),(0,lr.jsx)(xo.D,{as:"input",variant:"ballad",className:aA,value:t,onKeyDown:i,onChange:n,placeholder:u.ag.get("web-player.search-modal.placeholder"),autoFocus:!0,role:"combobox","aria-expanded":a,"aria-controls":tA,"aria-owns":tA,"aria-activedescendant":s})]})})),rA={SearchModalInstructions:"search-modal-searchModalInstructions",hidden:"search-modal-hidden",key:"search-modal-key"},oA=({canOpen:e,canPlay:t,canSelect:n})=>e||t||n?(0,lr.jsxs)("div",{className:rA.SearchModalInstructions,children:[(0,lr.jsx)(mA,{isActive:n,children:(0,lr.jsx)(lA,{})}),(0,lr.jsx)(mA,{isActive:e,children:(0,lr.jsx)(dA,{})}),(0,lr.jsx)(mA,{isActive:t,children:(0,lr.jsx)(cA,{})})]}):null;function lA(){return u.ag.get("web-player.search-modal.instructions.navigate",{keys:(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(uA,{children:"↑"}),(0,lr.jsx)(uA,{children:"↓"})]})})}function dA(){return u.ag.get("web-player.search-modal.instructions.open",{keys:(0,lr.jsx)(uA,{children:"Enter"})})}function cA(){return u.ag.get("web-player.search-modal.instructions.play",{keys:(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(uA,{children:"Shift"}),(0,lr.jsx)(uA,{children:"Enter"})]})})}function uA({children:e}){return(0,lr.jsx)(xo.D,{as:"kbd",variant:"viola",className:rA.key,semanticColor:"textBase",children:e})}function mA({children:e,isActive:t}){return(0,lr.jsx)(xo.D,{as:"p",variant:"viola",semanticColor:"textSubdued",className:uo()({[rA.hidden]:!t}),children:e})}const pA=Spicetify.GraphQL.Definitions["searchModalResults"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"searchModalResults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"numberOfTopResults"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeAudiobooks"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"numberOfTopResults"},value:{kind:"Variable",name:{kind:"Name",value:"numberOfTopResults"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"topResults"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"itemsV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultWithMatchedFields"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultWithMatchedFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TopResultHit"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"matchedFields"}},{kind:"Field",name:{kind:"Name",value:"item"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResult"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResult"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TopResultV2"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultAlbum"}},{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultArtist"}},{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultEpisode"}},{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultGenre"}},{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultPlaylist"}},{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultPodcast"}},{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultTrack"}},{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultUser"}},{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultAudiobook"},directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"includeAudiobooks"}}}]}]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultAlbum"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageSources"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultImageSources"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageURLAndSize"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultImageURLAndSize"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ImageSource"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultArtist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageSources"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultEpisode"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultGenre"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"GenreResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Genre"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageSources"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultPlaylist"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"images"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageSources"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultPodcast"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultTrack"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageSources"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultUser"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"avatar"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageSources"}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"searchModalResultAudiobook"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"searchModalResultImageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]},gA=(0,sr.memo)((function(e){const{query:t,onResults:n,numberOfResults:i}=e,a=(0,gg.k)(),{data:s,error:r,loading:o}=(l={limit:i,numberOfTopResults:i,offset:0,searchTerm:t,includeAudiobooks:!0},d={cacheTime:18e5,staleTime:3e5,enabled:t.trim().length>0&&a},(0,Wt.a)(pA,l,d));var l,d;return(0,sr.useEffect)((()=>{const e=s?.searchV2?.topResults?.itemsV2??[],i=[];for(let t=0;t(0,lr.jsx)(xo.D,{variant:"mesto",semanticColor:"textSubdued",className:kA,children:e}),fA=e=>`search-modal-result-${e}`;var yA=n(96768);const SA="search-modal-resultItem",bA="search-modal-isSelected",_A="search-modal-searchResultTitle",NA="search-modal-entityImage",EA="search-modal-searchResultRow",xA="search-modal-searchResultType",CA=e=>{const{position:t,uri:n,title:i,image:a,color:s,subtitle:r,isSelected:o,onClick:l,tag:d,label:u}=e,m=(0,sr.useRef)(null);(0,sr.useEffect)((()=>{o&&m.current?.scrollIntoView({behavior:"auto",block:"nearest"})}),[o]);const{isActive:p}=(0,po.cR)(n),g=(0,sr.useCallback)((()=>{l({uri:n,position:t})}),[l,t,n]),h={"--position":t};return(0,lr.jsxs)(WN.Link,{ref:m,to:n,className:uo()(SA,{[bA]:o}),role:"option","aria-selected":o,onClick:g,id:fA(n),style:h,tabIndex:-1,children:[(0,lr.jsx)("span",{className:"hidden-visually",children:u}),(0,lr.jsx)("div",{className:NA,"aria-hidden":!0,children:(0,lr.jsx)(yA.x,{images:[{url:a,width:40,height:40}],color:s,isCircular:(0,c.OB)(n)})}),(0,lr.jsxs)("div",{className:EA,"aria-hidden":!0,children:[(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",className:_A,semanticColor:p?"textBrightAccent":"textBase",children:i}),(0,lr.jsx)(xo.D,{as:"p",variant:"mesto",className:_A,semanticColor:"textSubdued",children:r})]}),(0,lr.jsx)("div",{className:xA,"aria-hidden":!0,children:(0,lr.jsx)(vA,{children:d})})]})},wA=e=>{const{results:t,onClick:n,selectedIndex:i}=e;return(0,lr.jsx)(lr.Fragment,{children:t.map(((e,t)=>(0,lr.jsx)(sr.Fragment,{children:IA(e,t,n,i===t)},t)))})};function IA(e,t,n,i){switch(e.__typename){case"Album":{const a=e.artists.items.map((e=>e.profile.name)).join(u.ag.getSeparator());return(0,lr.jsx)(CA,{isSelected:i,position:t,onClick:n,title:e.name,image:e.coverArt?.sources?.[0]?.url??"",color:(0,En.bS)(e.coverArt?.extractedColors),subtitle:a,uri:e.uri,tag:u.ag.get("web-player.search-modal.result.album"),label:u.ag.get("web-player.search-modal.a11y.contentbyartist",{item:e.name,creator:a,type:u.ag.get("web-player.search-modal.result.album")})})}case"Artist":return(0,lr.jsx)(CA,{isSelected:i,position:t,onClick:n,title:e.profile.name,image:e.visuals.avatarImage?.sources?.[0]?.url??"",color:(0,En.bS)(e.visuals.avatarImage?.extractedColors),subtitle:"",uri:e.uri,tag:u.ag.get("web-player.search-modal.result.artist"),label:u.ag.get("web-player.search-modal.a11y.label",{item:e.profile.name,type:u.ag.get("web-player.search-modal.result.artist")})});case"Track":{const a=e.artists.items.map((e=>e.profile.name)).join(u.ag.getSeparator());let s=a;if(e.matchedFields.includes(Ln.$C.Lyrics)){s=`${s} · ${u.ag.get("web-player.search-modal.lyrics-match")}`}return(0,lr.jsx)(CA,{isSelected:i,position:t,onClick:n,title:e.name,image:e.albumOfTrack?.coverArt?.sources?.[0]?.url??"",color:(0,En.bS)(e.albumOfTrack?.coverArt?.extractedColors),subtitle:s,uri:e.uri,tag:u.ag.get("web-player.search-modal.result.track"),label:u.ag.get("web-player.search-modal.a11y.contentbyartist",{item:e.name,creator:a,type:u.ag.get("web-player.search-modal.result.track")})})}case"Playlist":{const a="User"===e.ownerV2.data?.__typename?e.ownerV2.data.name:"",s=e.images.items.find((e=>e.sources));return(0,lr.jsx)(CA,{isSelected:i,position:t,onClick:n,title:e.name,image:s?.sources?.[0].url??"",color:(0,En.bS)(s?.extractedColors),subtitle:a,uri:e.uri,tag:u.ag.get("web-player.search-modal.result.playlist"),label:u.ag.get("web-player.search-modal.a11y.contentbyartist",{item:e.name,creator:a,type:u.ag.get("web-player.search-modal.result.playlist")})})}case"User":return(0,lr.jsx)(CA,{isSelected:i,position:t,onClick:n,title:e.name,image:e.avatar?.sources?.[0]?.url??"",color:(0,En.bS)(e.avatar?.extractedColors),subtitle:"",uri:e.uri,tag:u.ag.get("web-player.search-modal.result.user"),label:u.ag.get("web-player.search-modal.a11y.label",{item:e.name,type:u.ag.get("web-player.search-modal.result.user")})});case"Genre":return(0,lr.jsx)(CA,{isSelected:i,position:t,onClick:n,title:e.name,image:e.image?.sources?.[0]?.url??"",color:(0,En.bS)(e.image?.extractedColors),subtitle:"",uri:e.uri,tag:u.ag.get("web-player.search-modal.result.genre"),label:u.ag.get("web-player.search-modal.a11y.label",{item:e.name,type:u.ag.get("web-player.search-modal.result.genre")})});case"Episode":{const a="Podcast"===e.podcastV2.data.__typename&&e.podcastV2.data.name||void 0,s=[e.releaseDate?.isoString?u.ag.formatDate(new Date(e.releaseDate.isoString)):void 0,a].filter(Boolean).join(" • "),r=a?u.ag.get("web-player.search-modal.a11y.contentbyartist",{item:e.name,creator:a,type:u.ag.get("web-player.search-modal.result.episode")}):e.name;return(0,lr.jsx)(CA,{isSelected:i,position:t,onClick:n,title:e.name,image:e.coverArt?.sources?.[0]?.url??"",color:(0,En.bS)(e.coverArt?.extractedColors),subtitle:s,uri:e.uri,tag:u.ag.get("web-player.search-modal.result.episode"),label:r})}case"Podcast":return(0,lr.jsx)(CA,{isSelected:i,position:t,onClick:n,title:e.name,image:e.coverArt?.sources?.[0]?.url??"",color:(0,En.bS)(e.coverArt?.extractedColors),subtitle:e.publisher?.name??"",uri:e.uri,tag:u.ag.get("web-player.search-modal.result.podcast"),label:u.ag.get("web-player.search-modal.a11y.label",{item:e.name,type:u.ag.get("web-player.search-modal.result.podcast")})});case"Audiobook":return(0,lr.jsx)(CA,{isSelected:i,position:t,onClick:n,title:e.name,image:e.coverArt?.sources?.[0]?.url??"",color:(0,En.bS)(e.coverArt?.extractedColors),subtitle:e.publisher?.name??"",uri:e.uri,tag:u.ag.get("web-player.search-modal.result.audiobook"),label:u.ag.get("web-player.search-modal.a11y.label",{item:e.name,type:u.ag.get("web-player.search-modal.result.audiobook")})});default:return(0,fe.U)(e)}}const TA="search-modal-modalWrapper",AA="search-modal-searchBar",PA="search-modal-hasResults",OA="G8UNZJv4HT1kOIolA_e7",DA="search-modal-emptyStateContainer",RA="search-modal-emptySearchTermContainer",LA="search-modal-modalBase",FA="search-modal-modalAfterOpen",jA="search-modal-modalBeforeClose",MA={modal:{base:LA,afterOpen:FA,beforeClose:jA},overlay:{base:LA,afterOpen:FA,beforeClose:jA}},UA=()=>{const e=(0,Qr.s0)(),t=zu(),{spec:n,logger:i,UBIFragment:a}=(0,Lo.fU)(eA.createDesktopQuickSearchEventFactory,{}),s=(0,Lo.Wi)(n),[r,o]=(0,sr.useState)(""),[l,d]=(0,sr.useState)([]),[m,p]=(0,sr.useState)(0),[g,h]=(0,sr.useState)(!1),k=!(0,gg.k)(),v=(0,sr.useMemo)((()=>(0,c.EC)(r)),[r]),f=v&&v.type!==c.JM.AD,y=(0,sr.useCallback)((e=>{const t=e.target.value;t!==r&&(o(t),p(0),i.logInteraction(n.inputFactory().keyStrokeChangeSearchQuery({searchQueryString:t})))}),[i,r,n]),S=(0,sr.useCallback)((()=>{o(""),t({type:"CLOSE"})}),[t]),b=(0,sr.useCallback)((({uri:e,position:t})=>{i.logInteraction(n.searchResultFactory({position:t}).hitUiNavigate({destination:e})),S()}),[S,i,n]),_=(0,Ao.g)(),N=(0,sr.useCallback)((t=>{const n=t.key;if("ArrowUp"===n)p((e=>Math.max(e-1,0))),t.preventDefault();else if("ArrowDown"===n)p((e=>Math.min(e+1,l.length-1))),t.preventDefault();else if("Enter"===n){if(f)return e(v.toURLPath(!0)),void S();const n=l[m];if(n){const i=(0,c.EC)(n.uri);if(t.shiftKey)VA(i?.type)&&_.play({uri:n.uri},{featureIdentifier:"quick_search",referrerIdentifier:"PlayerStub_UnknownReferrer"});else{const t=i?.toURLPath(!0);t&&(e(t),b({uri:n.uri,position:m}))}}t.preventDefault()}}),[f,S,b,e,_,v,l,m]),E=(0,sr.useCallback)((e=>{h(e.loading),e.query===r&&d(e.results)}),[r]),x=l.length>0,C=l[m],w=C?fA(C.uri):void 0,I=(0,c.EC)(C?.uri),T=VA(I?.type);return(0,lr.jsxs)(a,{spec:n,children:[(0,lr.jsx)(gA,{query:f?"":r,numberOfResults:30,onResults:E}),(0,lr.jsxs)("div",{className:TA,ref:s,children:[(0,lr.jsx)("div",{className:uo()(AA,{[PA]:l.length}),children:(0,lr.jsx)(sA,{value:r,onChange:y,onKeyPress:N,hasResults:x,activeResultId:w})}),(0,lr.jsx)(oA,{canSelect:x&&!f,canPlay:T,canOpen:x||!!f}),r&&!f&&x&&(0,lr.jsx)("div",{className:OA,id:tA,role:"listbox",children:(0,lr.jsx)(wA,{results:l,onClick:b,selectedIndex:m})}),!g&&r&&!x&&(0,lr.jsxs)("div",{className:DA,onClick:S,children:[(0,lr.jsx)(xo.D,{className:RA,as:"h1",variant:"canon",semanticColor:"textBase",children:u.ag.get("search.empty-results-title",r)}),k&&(0,lr.jsx)(xo.D,{as:"p",semanticColor:"textBase",children:u.ag.get("web-player.search-modal.offline")})]})]})]})},BA=()=>{const{isOpen:e}=(()=>{const e=(0,sr.useContext)(Gu);if(!e)throw new Error("useSearchModalState must be used within SearchModalProvider");const[t]=e;return t})(),t=zu(),n=(0,sr.useCallback)((()=>{t({type:"CLOSE"})}),[t]);return e?(0,lr.jsx)(ku.Z,{contentLabel:u.ag.get("web-player.search-modal.title"),isOpen:e,onRequestClose:n,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,animation:MA,children:(0,lr.jsx)(UA,{})}):null};function VA(e){switch(e){case"album":case"artist":case"track":case"playlist":case"playlist-v2":case"episode":case"show":return!0;default:return!1}}const HA={isRightSidebarVisible:!0,isNavBarVisible:!0,isNowPlayingBarVisible:!0,isTopBarVisible:!0,isMainViewExpanded:!1},GA=(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}},WA=({children:e})=>{const[t,n]=(0,sr.useReducer)(GA,HA),i=(0,sr.useMemo)((()=>({...t,resetMainView:()=>n({type:"resetMainView"}),collapseMainView:()=>n({type:"collapseMainView"})})),[t,n]);return(0,lr.jsx)(zk.$8.Provider,{value:i,children:e})};var zA=n(19503),KA=n(38586),YA=n(33946),qA=n(22991),ZA=n(79642),QA=n(19490);function JA(e){const[{backgroundColor:t}]=(0,ar.cl)();return t||e}var $A=n(21718),XA=n(3608);const eP="sp_pfhp",tP="pfhp",nP=()=>{const e=(0,Xe.vQ)(eP),t=(()=>{const e=new URLSearchParams(window.location.search),t=e.get(tP);return t&&(e.delete(tP),window.history.replaceState(null,"",`${window.location.origin}${window.location.pathname}?${e}`)),t})();return t&&t!==e?((0,Xe.pC)({name:eP,value:t,days:30}),t):e},iP=()=>{if("undefined"==typeof window)return!1;return"2c2ccb58-8a92-4713-a1c0-8b43b3090b49"===nP()};function aP(e,t=1,n=0){if(n>t)return 1;let i=(e-n)/(t-n);return Number.isNaN(i)&&(i=1),Math.min(Math.max(i,0),1)}var sP=n(36044),rP=n(78184);const oP=()=>{const e=(0,sr.useRef)(null),{setElementRef:t}=(0,sr.useContext)(sP.E);return(0,sr.useEffect)((()=>{t&&e.current&&t(e.current)}),[t]),(0,lr.jsx)("div",{"":"topbar-content-wrapper",className:rP.Z.topbarContentWrapper,ref:e})};var lP=n(1982),dP=n(73024),cP=n(84334),uP=n(67836);const mP="400ms",pP="main-topBarStatusIndicator-TopBarStatusIndicatorContainer",gP="main-noConnection-button",hP="main-noConnection-isError",kP="main-noConnection-isNotice",vP="main-topBarStatusIndicator-hasTooltip",fP="main-topBarStatusIndicator-tooltipIsError",yP="main-topBarStatusIndicator-enter",SP="main-topBarStatusIndicator-enterActive",bP="main-topBarStatusIndicator-exitActive",_P="main-topBarStatusIndicator-tooltipEnter",NP="main-topBarStatusIndicator-notMinimized",EP="main-topBarStatusIndicator-tooltipEnterActive",xP=(0,sr.memo)((function(e){const{children:t,feedbackType:n,tooltip:i,itemId:a,display:s=!0,minimized:r=!1,spec:o}=e,l=(0,sr.useRef)(null),d=(0,To.o)(),c=(0,Lo.$P)();return(0,lr.jsx)(lv.Z,{in:s,timeout:parseInt(mP,10),unmountOnExit:!0,onEnter:e=>{r||e.classList.add(_P)},onEntered:e=>{r||e.classList.add(EP)},onExited:e=>{r||e.classList.remove(EP)},classNames:{enter:yP,enterActive:SP,exitActive:bP},children:(0,lr.jsx)(th.ZP,{value:a,children:(0,lr.jsx)("div",{className:uo()(pP,{[NP]:!r}),children:(0,lr.jsx)(hb.Nt,{offset:[-2,20],action:"toggle",trigger:"click",content:(0,lr.jsx)(hb.yv,{className:uo()({[fP]:n===gu.nY.ERROR}),children:(0,lr.jsx)("div",{children:i})}),renderInline:!1,children:(0,lr.jsx)("button",{className:uo()(gP,{[vP]:i,[hP]:n===gu.nY.ERROR,[kP]:n===gu.nY.NOTICE}),onClick:()=>{d({intent:"toggle",type:"click"}),o&&c.logInteraction(o.hitUiReveal())},ref:l,"":a,children:t})})})})})})),CP="P8EYxpJkrSRcmY5CFfgZ",wP="oMR8tk4wMj9_exGQeapz",IP="qq3uDmbXwv31FKawHDIg",TP="B64o12iyKiKF4s8uuClS";function AP(e){if(null===e)return null;const t=Math.abs(Date.now()-e.getTime());if(t<1e3)return null;const{hours:n,minutes:i,seconds:a}=(0,uP.P)(t),s=(0,dP.N)({h:n,m:i,s:a});return u.ag.get("authorization-status.retrying",s)}const PP=({retryAt:e})=>{const t=(0,bc.V)(),[n,i]=(0,sr.useState)(AP(e)),a=(0,br.qT)();return(0,sr.useEffect)((()=>{const t=window.setInterval((()=>{i(AP(e))}),500);return()=>{window.clearInterval(t)}}),[e,i]),(0,lr.jsxs)("div",{className:CP,children:[(0,lr.jsx)(xo.D,{as:"p",variant:"cello",children:u.ag.get("authorization-status.title")}),(0,lr.jsx)("span",{className:wP,children:n??u.ag.get("authorization-status.reconnecting")}),(0,lr.jsxs)("div",{className:IP,children:[(0,lr.jsx)(mu.o,{semanticColor:"textBase",buttonSize:lP.z.sm,onClick:()=>{a({type:"close"})},children:u.ag.get("authorization-status.dismiss")}),(0,lr.jsx)(au.D,{className:TP,buttonSize:lP.z.sm,onClick:()=>t.tryAuthorize(),children:u.ag.get("authorization-status.retry")})]})]})},OP=({minimized:e,spec:t})=>{const n=(0,gg.k)(),{isAuthorized:i,retryAt:a}=(0,cP.p)();return(0,Xo.W6)(Ns.Nc)?(0,lr.jsxs)(xP,{feedbackType:gu.nY.ERROR,minimized:e,display:n&&!i,spec:t,tooltip:(0,lr.jsx)(PP,{retryAt:a}),itemId:"authorization-status-indicator",children:[(0,lr.jsx)(hE.l,{iconSize:16}),u.ag.get("authorization-status.badge")]}):null};var DP=n(20707);const RP=({minimized:e,spec:t})=>{const n=!(0,gg.k)();return(0,lr.jsxs)(xP,{feedbackType:gu.nY.NOTICE,minimized:e,display:n,spec:t,tooltip:u.ag.get("offline.callout-disconnected"),itemId:"offline-status-indicator",children:[(0,lr.jsx)(DP.i,{iconSize:16}),u.ag.get("offline.badge")]})};var LP=n(95798),FP=n(87192);const jP=({minimized:e,spec:t})=>{const{isPrivateSession:n}=(0,FP.M)();return(0,lr.jsxs)(xP,{feedbackType:gu.nY.NOTICE,minimized:e,display:n,tooltip:u.ag.get("private-session.callout"),spec:t,itemId:"private-session-indicator",children:[(0,lr.jsx)(LP.W,{iconSize:16}),u.ag.get("private-session.badge")]})},MP=sr.memo((function(e){const{windowSize:t}=e,n=t<=1024,i=(0,sr.useMemo)((()=>e.spec?.privateSessionButtonFactory()),[e.spec]),a=(0,sr.useMemo)((()=>e.spec?.offlineButtonFactory()),[e.spec]),s=(0,sr.useMemo)((()=>e.spec?.authorizationButtonFactory()),[e.spec]);return(0,lr.jsxs)("div",{className:rP.Z.indicators,children:[(0,lr.jsx)(jP,{spec:i,minimized:n}),(0,lr.jsx)(RP,{spec:a,minimized:n}),(0,lr.jsx)(OP,{spec:s,minimized:n})]})}));function UP(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 BP=sr.memo((({logger:e,spec:t})=>{const n=(0,$s.I0)(),[i,a]=(0,sr.useReducer)(UP,{deferredPrompt:void 0,installed:!1,canBeInstalled:!1});(0,sr.useEffect)((()=>{const e=()=>{a({type:"installed"}),n((0,Gs.oT)())},t=e=>{e.preventDefault(),a({type:"before-install",prompt:e})};return window.addEventListener("beforeinstallprompt",t),window.addEventListener("appinstalled",e),()=>{window.removeEventListener("beforeinstallprompt",t),window.removeEventListener("appinstalled",e)}}),[n]);const s=(0,sr.useCallback)((n=>{if(n.preventDefault(),t&&e){const n=t.installPwaButtonFactory().hitInstallApp({appName:"PWA"});e.logInteraction(n)}i.deferredPrompt&&i.deferredPrompt.prompt()}),[t,e,i.deferredPrompt]),{canBeInstalled:r,installed:o}=i;return!r||o?null:(0,lr.jsx)(au.D,{colorSet:"overMedia",buttonSize:"sm",onClick:s,iconLeading:fN.D,children:(0,lr.jsx)(xo.D,{variant:"mestoBold",className:"ellipsis-one-line",children:u.ag.get("pwa.download-app")})})}));var VP=n(88333);const HP=sr.memo((({shouldCalloutPWA:e,spec:t,logger:n})=>{const i=(0,sr.useCallback)((()=>{if(!t||!n)return;const e=t.installAppButtonFactory().hitNavigateToExternalUri({destination:"/download"});n.logInteraction(e)}),[n,t]);return e?(0,lr.jsx)(BP,{logger:n,spec:t}):(0,lr.jsx)(au.D,{colorSet:"overMedia",buttonSize:"sm",href:"/download",iconLeading:fN.D,onClick:i,component:VP.Z,children:(0,lr.jsx)(xo.D,{variant:"mestoBold",className:"ellipsis-one-line",children:u.ag.get("navbar.install-app")})})})),GP="ANONYMOUS_PLAYBACK_HOOK",WP=(e,t)=>{const n=t?.item?.type;e.dispatch((e=>({type:GP,entityType:e}))(n))},zP=e=>(t,n,i)=>{const a=e.getState(),s=a?.ui?.modal,r=((e,t,n,i)=>{const a=((0,Wx.k)(n)??0)>1e4,s=document.hasFocus();return!e&&a&&s&&i&&"now-playing-view"!==t})(t,s,n,i);return r};var KP=n(57314),YP=n(75362);const qP="STORE_DEFERRED_ACTION",ZP="PULL_DEFERRED_ACTION";let QP=function(e){return e.PLAY="play",e.PLAYING="playing",e.USER_INVESTMENT="user-investment",e}({});var JP=n(49663);const $P={START_RADIO:"START_RADIO"},XP={SAVE_TRACK:"SAVE_TRACK",SAVE_EPISODE:"SAVE_EPISODE"},eO={FOLLOW_USER:"FOLLOW_USER"},tO=/(^PLAY_.+|QUEUE_UPDATE)/i,nO={...{[Xr.types.ANONYMOUS_COLLECTION_NAVIGATION]:Xr.types.ANONYMOUS_COLLECTION_NAVIGATION,[Xr.types.ANONYMOUS_LIKED_SONGS_NAVIGATION]:Xr.types.ANONYMOUS_LIKED_SONGS_NAVIGATION,[GP]:GP},...KP.V5},iO=()=>{const e={...nO};return delete e.DEVICE_INFO_CHANGED,delete e.PLAYBACK_CLEAR_DATA,delete e.QUEUE_UPDATE,e},aO=(e,t)=>{if(iO()[t.type]){if((e=>e.type!==GP&&!![KP.V5.PLAYBACK_ERROR].includes(e.type))(t))return!1;const[a,s]=(e=>{const t=iO();switch(e.type){case t.ANONYMOUS_COLLECTION_NAVIGATION:return[!0,{triggerId:aS,triggerAction:e}];case t.ANONYMOUS_LIKED_SONGS_NAVIGATION:return[!0,{triggerId:My,triggerAction:e}];case t.FOLLOW_PLAYLIST:return[!0,{triggerId:JP.J,triggerAction:e}];case t.CREATE_PLAYLIST:return[!0,{triggerId:vy.V,triggerAction:e}];case t.ADD_TO_QUEUE:case GP:return[!0,{triggerId:oO,triggerAction:e}];default:return[!1,null]}})(t),r=tO.test(t.type);if(e.dispatch((n=t,i=r?QP.PLAY:QP.USER_INVESTMENT,{type:qP,storeAction:n,actionIntent:i})),a)rx.y.set((e=>({...e,...s})));else{const n=t.uri||t.contextURI;if(e.dispatch((0,Qs.lJ)(n)),t.type===Ku.VX)return!1}return!0}var n,i;return!1};function sO(e,t){if(e===sn.pT.ADD){if((0,c.wj)(t))return[!0,{triggerId:oO,triggerAction:{type:XP.SAVE_TRACK}}];if((0,c.hn)(t))return[!0,{triggerId:oO,triggerAction:{type:XP.SAVE_EPISODE}}]}return e===ke.zr.PLAY&&(0,c.oi)(t)?[!0,{triggerId:oO,triggerAction:{type:$P.START_RADIO}}]:e===fa.aY.ADD||e===fa.aY.CREATE_PLAYLIST?[!0,{triggerId:vy.V,triggerAction:{type:null}}]:e===YP.BM.FOLLOW_USER?[!0,{triggerId:oO,triggerAction:{type:eO.FOLLOW_USER}}]:[!1,null]}const rO=(e,t,n,i,a)=>s=>{const r=e.getEvents(),o=t.getEvents(),l=n.getEvents(),d=i.getEvents();return r.addListener(ke.rg.ACTION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:a}=(0,hu.Gg)(i);if(!a)return!1;switch(e.action){case ke.zr.PLAY:{const{context:i,options:a}=e,r=function(e){return e.pages&&e.pages.length>0&&e.pages[0].items&&e.pages[0].items.length>0?e.pages[0].items[0]:null}(i);if(r?.type===ve.p.EPISODE&&(s=r,void 0===s.metadata?.anonymousPlaybackAllowed||s.metadata.anonymousPlaybackAllowed))return!1;const o=a?.skipTo?.uri??i.uri;n.storeAction(w.gi,e);const[l,d]=sO(ke.zr.PLAY,o);return l?(rx.y.set((e=>({...e,...d}))),!0):(t.dispatch((0,Qs.lJ)(o)),!0)}case ke.zr.SKIP_TO_NEXT:case ke.zr.SKIP_TO_PREVIOUS:return t.dispatch((0,Qs.lJ)()),!0;default:return!1}var s})(e.data,s,a)&&e.preventDefault()})),o.addListener(sn.EW.OPERATION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:a}=(0,hu.Gg)(i);if(!a)return!1;if(e.operation===sn.pT.ADD){const[i]=e.uris;n.storeAction(w.wH,e);const[a,s]=sO(sn.pT.ADD,i);return a?(rx.y.set((e=>({...e,...s}))),!0):(t.dispatch((0,Qs.lJ)(i)),!0)}return!1})(e.data,s,a)&&e.preventDefault()})),l.addListener(fa.Yt.OPERATION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:a}=(0,hu.Gg)(i);if(!a)return!1;switch(e.operation){case fa.aY.ADD:{const[i]=e.uris;n.storeAction(w.t3,e);const[a,s]=sO(fa.aY.ADD,i);return a?(rx.y.set((e=>({...e,...s}))),!0):(t.dispatch((0,Qs.lJ)(i)),!0)}case fa.aY.CREATE_PLAYLIST:{const[e,n]=sO(fa.aY.CREATE_PLAYLIST,"");return e?(rx.y.set((e=>({...e,...n}))),!0):(t.dispatch((0,Qs.lJ)(null)),!0)}default:return!1}})(e.data,s,a)&&e.preventDefault()})),d.addListener(YP.rA.OPERATION,(e=>{((e,t,n)=>{const i=t.getState(),{isAnonymous:a}=(0,hu.Gg)(i);if(!a)return!1;if(e.operation===YP.BM.FOLLOW_USER){const[i]=e.uris;n.storeAction(w.mZ,e);const[a,s]=sO(YP.BM.FOLLOW_USER,i);return a?(rx.y.set((e=>({...e,...s}))),!0):(t.dispatch((0,Qs.lJ)(i)),!0)}return!1})(e.data,s,a)&&e.preventDefault()})),t=>n=>{const i=s.getState(),{isAnonymous:r}=(0,hu.Gg)(i),o=new URL(location.href).searchParams.has("signupPrompt");if(r){if(!aO(s,n)){switch(n.type){case Xr.types.ANONYMOUS_LOGIN_CLICK:{const t=e.getState();if(function(e){return(0,Lg.o9)(e)===he.PO.PLAYING&&(0,he.iw)(e?.item??void 0)}(t)){const n=function(e,t){if(!e?.item)return null;const n={uri:e.context.uri,pages:[{items:[{type:e.item.type,uri:e.item.uri,uid:e.item.uid,metadata:e.item.metadata,provider:e.item.provider}]}]},i={referrerIdentifier:t.getReferrer(),featureIdentifier:"unknown"},a={seekTo:e.positionAsOfTimestamp??void 0};return{action:ke.zr.PLAY,context:n,origin:i,options:a}}(t,e);n&&a.storeAction(w.gi,n)}setTimeout(Fs.h$,500);break}case Xr.types.ANONYMOUS_SIGNUP_CLICK:setTimeout(Fs.L6,500);break;case Xr.types.ANONYMOUS_PREMIUM_CLICK:setTimeout((()=>{window.location.assign(As.Np)}),500);break;case Ku.VX:o&&s.dispatch((0,Qs.lJ)((0,c.EC)(location.pathname)?.toURI()||"")),((e,t,n,i)=>{let a=!1,s=Date.now(),r=document.querySelector(t);const o=e.getEvents(),l=()=>{s=Date.now()},d=()=>{r||(r=document.querySelector(t),r&&r.addEventListener("scroll",l))},c=({data:e})=>{d();const t=Date.now()-s>1e3;i(a,e,t)&&(a=!0,n(e),o.removeListener(ke.rg.UPDATE,c),r&&r.removeEventListener("scroll",l))};o.addListener(ke.rg.UPDATE,c),d()})(e,".main-view-container .os-viewport-native-scrollbars-invisible",(e=>t=>{WP(e,t)})(s),zP(s))}t(n)}}else t(n)}},oO="loginButton",lO={isCTA:!1,placement:jy.n.bottomLeft,shouldHideOnOutsideClick:({triggerAction:e})=>!e||e.type!==GP,getTitle:()=>u.ag.get("action-trigger.logged-out"),getDescription:({triggerAction:e})=>{switch(e?.type){case KP.V5.ADD_TO_QUEUE:return u.ag.get("action-trigger.logged-out-queue");case $P.START_RADIO:return u.ag.get("action-trigger.logged-out-radio");case XP.SAVE_TRACK:return u.ag.get("action-trigger.log-in-like-action");case eO.FOLLOW_USER:return u.ag.get("action-trigger.log-in-follow-profile");case GP:return"track"===e?.entityType?u.ag.get("action-trigger.logged-out-full-track"):u.ag.get("action-trigger.logged-out-synced");default:return u.ag.get("action-trigger.logged-out-continue")}}},dO=({children:e})=>(0,lr.jsx)(jy.P,{id:oO,options:lO,children:e}),cO=({...e})=>{const t=(0,Xo.W6)(Ns.yA),n=(0,Xo.W6)(Ns.hw),i=(0,Xo.W6)(Ns.Gu),a=(0,Qr.s0)(),{spec:s,logger:r}=(0,Lo.fU)(QA.o,{}),o=(0,sr.useMemo)((()=>s.upgradeButtonFactory()),[s]),l=(0,Lo.Wi)(o),d=(0,sr.useCallback)((()=>{r.logInteraction(o.hitUiNavigate({destination:"spotify:app:premium"}))}),[r,o]),c=()=>{switch(n){case Ns.bU.CONTROL:return u.ag.get("upgrade.button");case Ns.bU.VARIANT_1:return u.ag.get("upgrade.variant1.button");case Ns.bU.VARIANT_2:return u.ag.get("upgrade.variant2.button");case Ns.bU.VARIANT_3:return u.ag.get("upgrade.variant3.button");default:return u.ag.get("upgrade.button")}};return t?(0,lr.jsx)(au.D,{...e,ref:l,buttonSize:"sm",onClick:i?()=>{d(),a("/premium")}:e.onClick,"aria-label":u.ag.get("upgrade.tooltip.title"),title:u.ag.get("upgrade.tooltip.title"),colorSet:"invertedLight",children:c()}):(0,lr.jsx)(Ov.P,{...e,ref:l,buttonSize:"sm",onClick:i?()=>{d(),a("/premium")}:e.onClick,"aria-label":u.ag.get("upgrade.tooltip.title"),title:u.ag.get("upgrade.tooltip.title"),children:c()})};var uO=n(3254),mO=n(76254);const pO="CE17OcVsW2svuK7ebBcx",gO="IAyWaeDamLJLjxuPeVKw",hO="W0bXxvPV_DhyzwdJWRuU",kO=()=>{const{isActive:e,toggle:t}=(0,VE.T)(zg.s.BuddyFeed),{isSupported:n}=(0,Vc.I)().getCapabilities(),i=(0,gg.k)();if(!n)return null;return(0,lr.jsx)(nl._,{label:u.ag.get("offline.feedback-text"),disabled:i,children:(0,lr.jsx)("button",{"aria-label":u.ag.get("buddy-feed.friend-activity"),className:uo()((0,uO.EG)("overMedia"),gO,{[hO]:e}),onClick:()=>{i&&t()},children:e?(0,lr.jsx)(mO.s,{className:pO,iconSize:16}):(0,lr.jsx)(VS.R,{className:pO,iconSize:16})})})};var vO=n(68262);const fO="main-home-homeHeader",yO="main-home-withAds",SO="main-home-isOffline",bO=e=>e.platform,_O=()=>{const{isDesktop:e}=(0,$s.v9)(bO),t=(0,$s.v9)(vO.F7),{productState:n}=(0,$s.v9)(hu.Gg);return e&&"premium"===n?.product&&t},NO=(0,sr.memo)((function(){const e=JA(lE.Sns),t=!(0,gg.k)(),n=_O();return(0,lr.jsx)("div",{className:uo()(fO,{[SO]:t,[yO]:n}),style:{backgroundColor:e}})}));var EO=n(21543),xO=n(3649),CO=n(85564),wO=n(50100);const IO=Spicetify.GraphQL.Definitions["queryWhatsNewFeed"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryWhatsNewFeed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includedContentTypes"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"WhatsNewFeedContentType"}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"onlyUnPlayedItems"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"whatsNewFeedItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"includedContentTypes"},value:{kind:"Variable",name:{kind:"Name",value:"includedContentTypes"}}},{kind:"ObjectField",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"ObjectField",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}},{kind:"ObjectField",name:{kind:"Name",value:"onlyUnPlayedItems"},value:{kind:"Variable",name:{kind:"Name",value:"onlyUnPlayedItems"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"whatsNewFeedItem"}}]}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"offset"}},{kind:"Field",name:{kind:"Name",value:"limit"}},{kind:"Field",name:{kind:"Name",value:"nextOffset"}}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"whatsNewFeedItem"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"WhatsNewFeedItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"content"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"whatsNewFeedAlbum"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeOrChapterResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"whatsNewFeedEpisode"}},{kind:"FragmentSpread",name:{kind:"Name",value:"whatsNewFeedChapter"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"WhatsNewFeedNotificationFeedItem"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"subtitle"}},{kind:"Field",name:{kind:"Name",value:"content"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AlbumResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ArtistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConcertResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Concert"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"venue"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"location"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeOrChapterResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"contents"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}},{kind:"Field",name:{kind:"Name",value:"state"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaTypes"}},{kind:"Field",name:{kind:"Name",value:"restrictions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paywallContent"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}},{kind:"Field",name:{kind:"Name",value:"state"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"audiobookV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"GenreResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MerchResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Merch"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"image"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlaylistResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastOrAudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"authors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"description"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TrackResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"verified"}},{kind:"Field",name:{kind:"Name",value:"username"}}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"state"}},{kind:"Field",name:{kind:"Name",value:"timestamp"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"whatsNewFeedAlbum"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"albumType"},name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"date"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"whatsNewFeedEpisode"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"contents"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}},{kind:"Field",name:{kind:"Name",value:"state"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaTypes"}},{kind:"Field",name:{kind:"Name",value:"restrictions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paywallContent"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PodcastResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"whatsNewFeedChapter"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}},{kind:"Field",name:{kind:"Name",value:"state"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}},{kind:"Field",name:{kind:"Name",value:"precision"}}]}},{kind:"Field",name:{kind:"Name",value:"audiobookV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AudiobookResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}}]}}]}}]},TO=Spicetify.GraphQL.Definitions["whatsNewFeedNewItems"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"whatsNewFeedNewItems"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"whatsNewFeedHasNewItems"}}]}}]},AO=Spicetify.GraphQL.Definitions["SetItemsStateInWhatsNewFeed"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetItemsStateInWhatsNewFeed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"items"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SetItemsStateInWhatsNewFeedInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setItemsStateInWhatsNewFeed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"items"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"WhatsNewFeedPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"state"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}},{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"GenericError"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]};var PO=n(78419);const OO="t93PZphItuM19kPhX7tC",DO="I4p8r1UNjIGk9yv3H2Ms",RO="t794tYAiOJib_IAmmdqq",LO="RJGA3d0jzObTXwoMUH4p",FO="dmF7or26BvPJs5kQtYVH",jO="kwTbLplLLsW6T_LrtR7_";function MO(){const{name:e}=(0,Ot.Y)(IO);return e}const UO=()=>{const{toggle:e,isActive:t}=(0,VE.T)(zg.s.WhatsNewFeed),[n,i]=(0,sr.useState)(!1),{request:a}=(0,sr.useContext)(Pt.Ax),s=(0,Js.useQueryClient)(),{spec:r,logger:o}=(0,Lo.fU)(CO.y,{});(0,sr.useEffect)((()=>{const e=setInterval((async()=>{const e=await(0,wO.J)(a,TO,{});if(e?.data?.whatsNewFeedHasNewItems||!1)if(t)s.refetchQueries(MO()),i(!1);else{const e=r.notificationsBellToggleFactory().notificationsIndicatorFactory().impression();o.logImpression(e),i(!0),s.invalidateQueries(MO())}}),Wt.y/3);return()=>{clearInterval(e)}}),[o,a,r,s,t]);const l=()=>(0,lr.jsxs)("div",{className:LO,children:[(0,lr.jsx)("span",{className:FO,children:u.ag.get("new_releases")}),(0,lr.jsx)(PO.Z,{className:jO})]}),d=(0,sr.useCallback)((()=>{const n=r.notificationsBellToggleFactory().hitUiHide(),a=r.notificationsBellToggleFactory().hitUiReveal();t?o.logInteraction(n):(o.logInteraction(a),i(!1)),e()}),[t,o,r,e]);return(0,lr.jsxs)("button",{"aria-label":u.ag.get("web-player.whats-new-feed.button-label"),className:uo()((0,uO.EG)("overMedia"),DO,{[RO]:t}),onClick:d,children:[t?(0,lr.jsx)(EO.M,{className:OO,iconSize:16}):(0,lr.jsx)(xO.G,{className:OO,iconSize:16}),n&&(0,lr.jsx)(l,{})]})};var BO=n(4055);var VO=n(8511);const HO=()=>{const e=(0,BO.g)(),t=(0,$s.v9)(hu.OA),n=!!(0,Qr.bS)({path:"/search",end:!1}),i=!!(0,Qr.bS)({path:"/collection",end:!1}),a=!!(0,Qr.bS)({path:"/collection/tracks"});return!(e||i&&!a||n)&&t};var GO=n(82146),WO=n(99371),zO=n(67589);function KO(){const e=function(){const e=(0,sr.useContext)(Mc);if(null===e)throw new Error("Trying to use 'UserAPIContext' without 'UserAPIProvider'!");return e}(),[t,n]=(0,sr.useState)(!0),[i,a]=(0,sr.useState)(null),[s,r]=(0,sr.useState)(null);return(0,sr.useEffect)((()=>{let t=!0;return e.getProductState().then((e=>{t&&a(e)})).catch((e=>{t&&r(e)})).finally((()=>{t&&n(!1)})),()=>{t=!1}}),[e]),{isLoading:t,data:i,error:s}}var YO=n(46420),qO=n(51783),ZO=n(13799),QO=n(74263);function JO(e,t){return t?(0,QO.k)(e):(0,ZO.x)(e)}const $O=({divider:e,visible:t})=>{const n=(0,el.s4)(),i=(0,BO.g)(),a=(0,sr.useCallback)((()=>{n.send(JO({category:"masthead",action:"click",label:"download-link",destination_url:As.vF,context:window.location.href,os:(0,Y.y)(),variant:"a"},i))}),[n,i]);return t?(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",href:As.vF,onClick:a,target:"_blank",trailingIcon:(0,lr.jsx)(qO.h,{iconSize:16}),children:u.ag.get("download.download")}):null},XO=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,$s.I0)(),a=(0,sr.useCallback)((()=>{t.logInteraction(n.goToUpgradePlanPageRowFactory().hitNavigateToExternalUri({destination:As.Np})),i((0,VO._)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar"}))}),[i,t,n]);return(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",trailingIcon:(0,lr.jsx)(qO.h,{iconSize:16}),onClick:a,href:As.Np,target:"_blank",children:u.ag.get("navbar.premium")})},eD=({divider:e,visible:t})=>{const n=(0,el.s4)(),i=(0,BO.g)(),a=(0,sr.useCallback)((()=>{n.send(JO({category:"masthead",action:"click",label:"support-link",destination_url:As.YJ,context:window.location.href,os:(0,Y.y)(),variant:"a"},i))}),[n,i]);return t?(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",href:As.YJ,onClick:a,target:"_blank",trailingIcon:(0,lr.jsx)(qO.h,{iconSize:16}),children:u.ag.get("user.support")}):null},tD="8px",nD="main-userWidget-box",iD="Fxnb0xe6bL7I7W8V0p6C",aD="main-userWidget-dropDownMenu",sD="main-userWidget-displayName",rD="main-userWidget-chevron",oD="RfdRTSGwulyQdDepLUTT",lD="main-userWidget-screenReaderOnly",dD="main-userWidget-notificationDot",cD="VdLuku6YQT4tNLT6ojlD",uD="main-userWidget-notificationIndicator",mD="YqPjzOfhtzbCf_QD3P1f",pD="pEG0W4wkbkrOYURhz82H",gD=()=>{const e=(0,$s.v9)((e=>e.platform.isDesktop)),{spec:t,logger:n}=(0,Lo.fU)(YO.createDesktopUserWidgetMenuEventFactory,{});return(0,sr.useEffect)((()=>{n.logImpression(t.impression())}),[n,t]),e?null:(0,lr.jsx)("div",{className:aD,children:(0,lr.jsxs)(gd.v,{children:[(0,lr.jsx)(XO,{ubiSpec:t,ubiLogger:n}),(0,lr.jsx)(eD,{visible:!0}),(0,lr.jsx)($O,{visible:!0})]})})};function hD(e){if(null===e)return null;const t=e["multiuserplan-member-type"],n=parseInt(e["multiuserplan-current-size"]||"1",10);switch(t){case"FAMILY_MANAGER":return{plan:"family",currentSize:n};case"DUO_MANAGER":return{plan:"duo",currentSize:n};default:return null}}const kD=`${As.ci}?utm_source=spotify&utm_medium=menu&utm_campaign=your_account`,vD=({divider:e,ubiLogger:t,ubiSpec:n})=>{const{openURLWithSessionTransfer:i}=(0,_g.e)();return(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",trailingIcon:(0,lr.jsx)(qO.h,{iconSize:16}),onClick:()=>{t.logInteraction(n.goToAccountPageRowFactory().hitUiNavigate({destination:kD})),i(kD)},children:u.ag.get("user.account")})};var fD=n(58658),yD=n(75017);const SD=()=>{const{settings:e}=(0,FN.r)(),t=(0,yD.D)(e.values),{show:n}=(0,$T.C)();return t?(0,lr.jsxs)(fD.W,{displayText:"Debug Tools",children:[(0,lr.jsx)(kd.s,{role:"menuitem",onClick:()=>n(),children:"Debug Window"}),!1,(0,lr.jsx)(kd.s,{role:"menuitem",to:"/debug/locales",children:"Locales"})]}):null},bD=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,$s.I0)(),a=(0,sr.useCallback)((()=>{t.logInteraction(n.logOutRowFactory().hitLogout()),i((0,Ku.Tz)())}),[i,t,n]);return(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",onClick:a,"":"user-widget-dropdown-logout",children:u.ag.get("user.log-out")})},_D=({divider:e,planAttributes:t,ubiSpec:n,ubiLogger:i})=>{const{openURLWithSessionTransfer:a}=(0,_g.e)(),s="duo"===t.plan?"https://www.spotify.com/account/duo/":"https://www.spotify.com/account/family/";return(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",trailingIcon:(0,lr.jsx)(qO.h,{iconSize:16}),onClick:()=>{i.logInteraction(n.goToPlanManagementFactory().hitNavigateToExternalUri({destination:s})),a(s)},children:(0,lr.jsxs)("span",{className:mD,children:["duo"===t.plan?u.ag.get("user.setup-duo"):u.ag.get("user.setup-family"),t.currentSize<=1&&(0,lr.jsx)(PO.Z,{className:dD,name:"dot-icon"})]})})},ND=({visible:e,divider:t,ubiSpec:n,ubiLogger:i})=>{const{isPrivateSession:a,setPrivateSession:s}=(0,FP.M)(),r=(0,sr.useCallback)((()=>{i.logInteraction(n.togglePrivateSessionRowFactory().hitSetSettingField()),s(!a)}),[s,a,i,n]);return e?(0,lr.jsx)(kd.s,{divider:t,role:"menuitemcheckbox","aria-checked":a,onClick:r,children:u.ag.get("user.private-session")}):null},ED="/preferences",xD=({divider:e,ubiLogger:t,ubiSpec:n})=>(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",to:ED,onClick:()=>{t.logInteraction(n.goToSettingsRowFactory().hitUiNavigate({destination:ED}))},children:u.ag.get("user.settings")}),CD=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,WO.g)(),a=(0,sr.useContext)(lc.z),s=(0,sr.useCallback)((()=>{t.logInteraction(n.updateClientRowFactory().hitUiHide()),a.applyUpdate()}),[a,t,n]);return i?.state!==zO.J.UPDATE_READY?null:(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",onClick:s,trailingIcon:(0,lr.jsx)(PO.Z,{className:dD}),"":"user-widget-update-available",children:u.ag.get("user.update-client")})},wD=({divider:e})=>{const t=(0,$s.I0)(),n=(0,sr.useCallback)((e=>{e.preventDefault(),t((0,Qs.$Y)())}),[t]);return(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",trailingIcon:(0,lr.jsx)(PO.Z,{className:cD}),onClick:n,href:"",target:"_blank",children:u.ag.get("user.unable-to-update")})},ID=({divider:e,ubiLogger:t,ubiSpec:n})=>{const i=(0,$s.I0)(),{isDesktop:a,isBrowser:s}=(0,$s.v9)((e=>e.platform)),r=(0,sr.useCallback)((e=>a?`${e}?ref=desktop_loggedin_upgrade_menu`:s?`${e}?ref=web_loggedin_upgrade_menu`:e),[a,s]),o=(0,sr.useCallback)((()=>{t.logInteraction(n.goToUpgradePlanPageRowFactory().hitNavigateToExternalUri({destination:As.Np})),i((0,VO._)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar"}))}),[i,t,n]);return(0,$s.v9)((e=>(0,hu.OA)(e)))?(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",trailingIcon:(0,lr.jsx)(qO.h,{iconSize:16}),onClick:o,href:r(As.Np),target:"_blank",children:u.ag.get("upgrade.tooltip.title")}):null},TD=({divider:e,ubiSpec:t,ubiLogger:n})=>{const i=(0,$s.v9)((e=>e.session.user?.uri)),a=(0,Ao.g)();if(!i)return null;const s=(0,c.EC)(i).toURLPath(!0);return(0,lr.jsx)(kd.s,{divider:e,role:"menuitem",to:s,onClick:()=>{n.logInteraction(t.goToUserProfileRowFactory().hitUiNavigate({destination:s})),a.setReferrer("user_profile")},children:u.ag.get("card.tag.profile")})},AD=()=>{const e=(0,$s.v9)((e=>e.platform.isDesktop)),{spec:t,logger:n}=(0,Lo.fU)(YO.createDesktopUserWidgetMenuEventFactory,{});(0,sr.useEffect)((()=>{n.logImpression(t.impression())}),[n,t]);const i=KO(),a=hD(i.data);return(0,lr.jsx)("div",{"":"user-widget-menu",className:aD,children:(0,lr.jsxs)(gd.v,{children:[(0,lr.jsx)(vD,{ubiSpec:t,ubiLogger:n}),a&&(0,lr.jsx)(_D,{planAttributes:a,ubiSpec:t,ubiLogger:n}),(0,lr.jsx)(TD,{ubiSpec:t,ubiLogger:n}),(0,lr.jsx)(ID,{ubiSpec:t,ubiLogger:n}),(0,lr.jsx)(eD,{visible:iP()}),(0,lr.jsx)($O,{visible:!e&&iP()}),(0,lr.jsx)(ND,{visible:e,ubiSpec:t,ubiLogger:n}),(0,lr.jsx)(xD,{divider:"after",ubiSpec:t,ubiLogger:n}),i?.data?.["client-deprecated"]&&(0,lr.jsx)(wD,{}),(0,lr.jsx)(CD,{ubiSpec:t,ubiLogger:n})," ",e&&(0,lr.jsx)(SD,{}),(0,lr.jsx)(bD,{ubiSpec:t,ubiLogger:n})]})})},PD=()=>(0,lr.jsxs)("div",{className:uD,children:[(0,lr.jsx)("span",{className:lD,children:u.ag.get("user.update-available")}),(0,lr.jsx)(PO.Z,{className:dD})]}),OD=e=>{const t=(0,$s.v9)((e=>e.session.user)),n=(0,WO.g)(),i=(0,Xo.W6)(Ns.yA),a=hD(KO().data),s=!!a&&a.currentSize<=1,r=(0,Tv.jh)();if(!t&&iP())return(0,lr.jsx)(Pl.yj,{offset:[0,parseInt(tD,10)],placement:"bottom-end",menu:(0,lr.jsx)(gD,{}),children:(e,t,n)=>(0,lr.jsx)("button",{className:uo()(nD),type:"button",onClick:t,ref:n,"":"unauth-user-widget-link",children:e?(0,lr.jsx)(Rm.k,{iconSize:16,"aria-hidden":"true"}):(0,lr.jsx)(GO.d,{iconSize:16,"aria-hidden":"true"})})});if(!t)return null;const o=t.display_name||t.id;return(0,lr.jsx)(Pl.yj,{offset:[0,parseInt(tD,10)],placement:"bottom-end",menu:(0,lr.jsx)(AD,{}),children:(a,l,d)=>(0,lr.jsx)(nl._,{label:o,children:i?(0,lr.jsxs)(mu.o,{className:uo()((0,uO.EG)("overMedia"),iD),onClick:t=>{e.onClick?.(t),l(t)},ref:d,"":"user-widget-link",condensedAll:!0,children:[(0,lr.jsx)(CC.q,{label:o,width:t.images.length?24:32,images:t.images,userIconSize:16,testID:"user-widget-avatar",transparent:!0,className:uo()({[pD]:t.images.length})}),(n?.state===zO.J.UPDATE_READY||s)&&(0,lr.jsx)(PD,{})]}):(0,lr.jsxs)("button",{className:uo()(nD,e.className,{[oD]:r===Tv.Uo.LARGE}),type:"button",onClick:t=>{e.onClick?.(t),l(t)},ref:d,"":"user-widget-link",children:[(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(CC.q,{label:o,width:28,images:t.images,userIconSize:16,testID:"user-widget-avatar"}),(0,lr.jsx)(xo.D,{dir:"auto",variant:"mestoBold",className:sD,"":"user-widget-name",children:o}),a?(0,lr.jsx)(eT.U,{className:rD,iconSize:16,"aria-hidden":"true"}):(0,lr.jsx)(pS.i,{className:rD,iconSize:16,"aria-hidden":"true"})]}),(n?.state===zO.J.UPDATE_READY||s)&&(0,lr.jsx)(PD,{})]})})})};var DD=n(87305);const RD=parseInt(DD.Z.MINIMUM_HEADER_HEIGHT,10),LD=()=>{const e=(0,To.o)(),t=(0,$s.I0)(),n="/"===(0,Qr.TH)().pathname,i="/lyrics"===(0,Qr.TH)().pathname,a=_O(),s=JA(),[r,o]=(0,sr.useState)(window.innerWidth),{isNavBarVisible:l}=(()=>{const e=(0,sr.useContext)(zk.$8);if(null===e)throw new Error("Trying to use 'VisibilityContext' without 'VisibilityProvider'!");return e})(),d=(0,Xo.W6)(Ns.yA),c=(0,Xo.W6)(Ns.e8),m=(0,$s.v9)(eb.C7),p=(0,Kg.m)(),g=(0,gg.k)(),{spec:h,logger:k}=(0,Lo.fU)(QA.o,{}),v=(0,BO.g)(),{ref:f,breakpoint:y}=(0,Tv.Db)({[Tv.Uo.MEDIUM]:0,[Tv.Uo.LARGE]:600}),S=(0,sr.useRef)(null),b=(0,sr.useRef)(-1),_=(0,sr.useCallback)((e=>{const t=e.target.scrollTop;let r;r=n?((e,t)=>aP(e,(t?350:80)+at.K1,at.K1))(t,a):void 0===s?aP(t,at.K1):i?0:aP(t,RD,140+at.K1),b.current!==r&&requestAnimationFrame((()=>{S.current&&(S.current.style.opacity=`${r}`)})),b.current=r}),[s,n,i,a]);(0,XA.c)(_,{executeOnceOnStart:!0}),(0,$A.a)((()=>{o(window.innerWidth)}));const N=(0,Qr.TH)(),E=(0,Qr.s0)(),[x,C]=(()=>{const[e,t]=(0,$s.v9)((e=>[e.ui.history.canGoBack,e.ui.history.canGoForward]));return[e,t]})(),w=(0,sr.useCallback)((()=>{k.logInteraction(h.backButtonFactory().hitUiNavigateBack()),E(-1)}),[k,E,h]),I=(0,sr.useCallback)((()=>{k.logInteraction(h.forwardButtonFactory().hitUiNavigateForwardInHistory()),E(1)}),[k,E,h]),T=(0,sr.useCallback)((()=>{t((0,Xr.xO)()),e({intent:"signup",type:"click"})}),[t,e]),A=(0,sr.useCallback)((()=>{t((0,Xr.sX)()),e({intent:"login",type:"click"})}),[t,e]),{openURLWithSessionTransfer:P}=(0,_g.e)(),O=e=>{P(e,"_blank")},D=(0,sr.useMemo)((()=>h.upgradeButtonFactory()),[h]),{shouldShowUpgradeButton:R,onUpgradeClick:L}=((e,t)=>{const n=(0,$s.I0)(),i=HO(),{openURLWithSessionTransfer:a}=(0,_g.e)(),{isDesktop:s,isBrowser:r}=(0,$s.v9)((e=>e.platform)),o=(0,sr.useCallback)((e=>s?`${e}&ref=desktop_loggedin_upgrade_button`:r?`${e}&ref=web_loggedin_upgrade_button`:e),[s,r]);return{shouldShowUpgradeButton:i,onUpgradeClick:(0,sr.useCallback)((()=>{t.logInteraction(e.hitNavigateToExternalUri({destination:o(As.IT)})),a(o(As.IT),"_blank"),n((0,VO._)({action_type:"gtm.upgradeClick",action_intent:"upgrade-dwp",item_id:"dwp-top-bar"}))}),[n,a,o,t,e])}})(D,k),{isDesktop:F,isPWA:j,shouldCalloutPWA:M}=(0,$s.v9)((e=>e.platform)),U=(0,sr.useCallback)((()=>{k.logInteraction(h.profileButtonFactory().hitUiReveal())}),[k,h]),B=0===N.pathname.indexOf("/artist"),V=r<850,H=iP()&&v&&V,G=void 0!==s||!d;return(0,lr.jsx)(Tv.ZU.Provider,{value:y,children:(0,lr.jsxs)("header",{"aria-label":u.ag.get("topBar.label"),className:uo()(rP.Z.container,{[rP.Z.loggedOut]:v&&!B,[rP.Z.rightSidebarVisible]:p!==zg.s.Disabled}),ref:f,children:[(0,lr.jsx)("div",{ref:S,className:rP.Z.background,style:{backgroundColor:s},children:G&&(0,lr.jsx)("div",{className:rP.Z.overlay})}),(0,lr.jsxs)("div",{className:uo()(rP.Z.historyButtons,{[rP.Z.fullscreenHistoryButtons]:!l}),children:[(0,lr.jsx)(nl._,{label:u.ag.get("navbar.go-back"),children:(0,lr.jsx)("button",{"":"top-bar-back-button","aria-label":u.ag.get("navbar.go-back"),disabled:!x,className:`${rP.Z.button}`,onClick:w,children:(0,lr.jsx)(qA.e,{className:rP.Z.icon,iconSize:16})})}),(0,lr.jsx)(nl._,{label:u.ag.get("navbar.go-forward"),children:(0,lr.jsx)("button",{"":"top-bar-forward-button","aria-label":u.ag.get("navbar.go-forward"),disabled:!C,className:`${rP.Z.button} ${rP.Z.forward}`,onClick:I,children:(0,lr.jsx)(ZA.V,{className:rP.Z.icon,iconSize:16})})}),(0,lr.jsx)(Qd,{children:(0,lr.jsx)(nl._,{label:"Toggle mini-player",children:(0,lr.jsx)(_o,{})})})]}),(0,lr.jsx)(oP,{}),(0,lr.jsx)(MP,{windowSize:r}),v&&iP()&&!V?(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(mu.o,{condensed:!0,onClick:()=>O(`${As.IT}&ref=web_loggedout_premium_button`),className:rP.Z.topNavBarLinks,children:u.ag.get("navbar.premium")}),(0,lr.jsx)(mu.o,{condensed:!0,onClick:()=>O(As.YJ),className:rP.Z.topNavBarLinks,children:u.ag.get("user.support")}),(0,lr.jsx)(mu.o,{condensed:!0,onClick:()=>O(As.vF),className:rP.Z.topNavBarLinks,children:u.ag.get("download.download")}),(0,lr.jsx)("div",{className:rP.Z.topNavBarSeparator})]}):(0,lr.jsx)(lr.Fragment,{}),R&&r>=1024&&(0,lr.jsx)(cO,{onClick:L,className:rP.Z.UpgradeButton}),d&&!v&&!m&&!F&&!j&&(0,lr.jsx)(HP,{shouldCalloutPWA:M,logger:k,spec:h}),v&&(0,lr.jsxs)("div",{className:rP.Z.loginButtons,children:[(0,lr.jsx)(mu.o,{className:rP.Z.signupButton,onClick:T,children:u.ag.get("sign_up")}),(0,lr.jsx)(dO,{children:(0,lr.jsx)(au.D,{colorSet:"invertedLight",onClick:A,"":"login-button",children:u.ag.get("login")})})]}),!v&&c&&g&&(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(UO,{})}),!v&&(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(kO,{})}),(!v||H)&&(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(OD,{onClick:U})})]})})},FD="t1hN4Ju87afc5N5fDTnm",jD="zSZOa6QFl1nnqYR7jPu9",MD="KSUTPJtu2PnuTb_RoGQX",UD=({onClose:e,handleRemove:t,primaryButtonText:n,secondaryButtonText:i,primaryButtonLabel:a=n})=>(0,lr.jsxs)("div",{className:MD,children:[(0,lr.jsx)(mu.o,{onClick:e,semanticColor:"textSubdued","aria-label":"Cancel",children:i}),(0,lr.jsx)(au.D,{"aria-label":a,autoFocus:!0,onClick:t,children:n})]}),BD=({onClose:e,primaryButtonText:t,secondaryButtonText:n})=>(0,lr.jsxs)("div",{className:MD,children:[(0,lr.jsx)(mu.o,{onClick:e,semanticColor:"textSubdued",as:"a",href:As.YJ,children:n}),(0,lr.jsx)(au.D,{autoFocus:!0,onClick:e,children:t})]}),VD=()=>{const e=(0,$s.I0)(),t=(0,dI.k)(),n=(0,Tc.c)(),[i,a]=(0,sr.useState)(null),s=(0,sr.useCallback)((()=>{e((0,Qs.hx)())}),[e]),r=(0,sr.useCallback)((async()=>{try{await n.removeAllDownloads(),s(),t(u.ag.get("desktop.settings.storage.downloads.success"))}catch(e){a(e instanceof Error?e:new Error("Error when deleting all downloads."))}}),[s,n,t]);return(0,lr.jsx)(ku.Z,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,overlayClassName:jD,onRequestClose:s,contentLabel:i?u.ag.get("error.generic"):u.ag.get("desktop.settings.storage.downloads.dialog.heading"),isOpen:!0,shouldFocusAfterRender:!1,children:(0,lr.jsxs)("div",{className:uo()("encore-light-theme",FD),children:[(0,lr.jsx)(xo.D,{as:"h2",variant:"canon",semanticColor:"textBase","aria-live":"polite",children:i?u.ag.get("error.generic"):u.ag.get("desktop.settings.storage.downloads.dialog.heading")}),(0,lr.jsx)(xo.D,{as:"p",variant:"mesto",paddingBottom:uu.o78,semanticColor:"textSubdued","aria-live":"polite",children:i?u.ag.get("desktop.settings.storage.downloads.dialog.error"):u.ag.get("desktop.settings.storage.downloads.dialog.text")}),i?(0,lr.jsx)(BD,{onClose:s,primaryButtonText:u.ag.get("desktop.settings.storage.close"),secondaryButtonText:u.ag.get("desktop.settings.storage.help")}):(0,lr.jsx)(UD,{onClose:s,handleRemove:r,primaryButtonLabel:u.ag.get("desktop.settings.storage.downloads.button"),primaryButtonText:u.ag.get("desktop.settings.storage.downloads.remove"),secondaryButtonText:u.ag.get("desktop.settings.storage.cancel")})]})})},HD=()=>{const e=(0,$s.I0)(),t=(0,dI.k)(),n=(0,Tc.c)(),[i,a]=(0,sr.useState)(null),s=(0,sr.useCallback)((()=>{e((0,Qs.Ap)())}),[e]),r=(0,sr.useCallback)((async()=>{try{await n.removeCache(),s(),t(u.ag.get("desktop.settings.storage.cache.success"))}catch(e){a(e instanceof Error?e:new Error("Error when clearing cache."))}}),[n,s,t]);return(0,lr.jsx)(ku.Z,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,overlayClassName:jD,onRequestClose:s,contentLabel:i?u.ag.get("error.generic"):u.ag.get("desktop.settings.storage.cache.dialog.heading"),isOpen:!0,shouldFocusAfterRender:!1,children:(0,lr.jsxs)("div",{className:uo()("encore-light-theme",FD),children:[(0,lr.jsx)(xo.D,{as:"h2",variant:"canon",semanticColor:"textBase","aria-live":"polite",children:i?u.ag.get("error.generic"):u.ag.get("desktop.settings.storage.cache.dialog.heading")}),(0,lr.jsx)(xo.D,{as:"p",variant:"mesto",paddingBottom:uu.o78,semanticColor:"textSubdued","aria-live":"polite",children:i?u.ag.get("desktop.settings.storage.cache.dialog.error"):u.ag.get("desktop.settings.storage.cache.dialog.text")}),i?(0,lr.jsx)(BD,{onClose:s,primaryButtonText:u.ag.get("desktop.settings.storage.close"),secondaryButtonText:u.ag.get("desktop.settings.storage.help")}):(0,lr.jsx)(UD,{onClose:s,handleRemove:r,primaryButtonText:u.ag.get("desktop.settings.storage.cache.button"),secondaryButtonText:u.ag.get("desktop.settings.storage.cancel")})]})})};var GD=n(16623),WD=n(67314);const zD=(0,sr.forwardRef)((({children:e},t)=>{(0,WD.i)();const n=(0,sr.useRef)(null),i=(0,sr.useCallback)((e=>{if(null===e||!n.current)return null;const t=window.getComputedStyle(n.current),i=Number(t.getPropertyValue("--content-spacing").replace("px","").trim())||0,a=Number(t.getPropertyValue("--content-max-width").replace("px","").trim())||0;return Math.min(e,a)-2*i}),[]);return(0,sr.useImperativeHandle)(t,(()=>n.current),[n]),(0,lr.jsx)(GD.M,{containerRef:n,postProcessWidth:i,children:(0,lr.jsx)("main",{ref:n,tabIndex:-1,children:e})})}));var KD=n(90154);const YD="main-yourLibraryX-navItems",qD="main-yourLibraryX-navItem",ZD="main-yourLibraryX-navLink",QD="main-yourLibraryX-navItemOffline",JD="main-yourLibraryX-navLinkActive",$D=()=>{const{isCollapsed:e}=(0,GE.U)(),t=(0,Qr.TH)(),n=!(0,gg.k)(),i=(0,$s.v9)(gy.br),a=u.ag.getUrlLocale(),s=(0,hy.S9)({localeFeatureFlag:i,urlLocale:a,type:"locale"})?`/${As.F0}${a}`:"/";return(0,lr.jsxs)("ul",{className:YD,children:[(0,lr.jsx)("li",{className:uo()(qD,"InvalidDropTarget"),children:(0,lr.jsx)(nl._,{label:e?u.ag.get("view.web-player-home"):null,disabled:!e,placement:"right",children:(0,lr.jsxs)(Wy.O,{to:s,referrer:"home",className:uo()("link-subtle",ZD,{[JD]:"/"===t.pathname}),"aria-label":u.ag.get("view.web-player-home"),children:[(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(Kf.A,{className:"home-icon","aria-hidden":"true"}),(0,lr.jsx)(Yf.v,{className:"home-active-icon","aria-hidden":"true"})]}),!e&&(0,lr.jsx)(xo.D,{variant:"balladBold",children:u.ag.get("view.web-player-home")})]})})}),(0,lr.jsx)("li",{className:uo()(qD,"InvalidDropTarget"),children:(0,lr.jsx)(nl._,{label:n?u.ag.get("offline.feedback-text"):u.ag.get("navbar.search"),disabled:!n&&!e,placement:e?"right":"top",children:(0,lr.jsxs)(Wy.O,{to:"/search",referrer:"search",className:uo()("link-subtle",ZD,{[JD]:t.pathname.startsWith("/search")||"search"===t.state?.pageId,[QD]:n}),onClick:e=>{n&&e.preventDefault()},"aria-label":u.ag.get("navbar.search"),children:[(0,lr.jsx)(qf.j,{className:"search-icon","aria-hidden":"true"}),(0,lr.jsx)(Zf.g,{className:"search-active-icon","aria-hidden":"true"}),!e&&(0,lr.jsx)(Xy,{children:(0,lr.jsx)(xo.D,{variant:"balladBold",children:u.ag.get("navbar.search")})})]})})})]})},XD="main-yourLibraryX-entryPoints",eR="main-yourLibraryX-library",tR=(0,sr.lazy)((async()=>{const{YourLibraryX:e}=await Promise.resolve().then(n.bind(n,51150));return{default:e}})),nR=({npbVideoAdRef:e})=>(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)("div",{className:XD,children:(0,lr.jsx)($D,{})}),(0,lr.jsx)("div",{className:uo()(XD,eR),children:(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(tR,{npbVideoAdRef:e})})})]});var iR=n(5866);const aR="Birkc1At3_PvSndFTJhA",sR="gQOLDNOE4WozDMOB9otg",rR="aqUdMVj2HZBk84cP8EMB",oR="_0HBgqitaWBMPcoQwPZH",lR="Qz17dj68EihlD2uYw2D4",dR=sr.memo((()=>{const{visible:e,setVisible:t}=(0,sr.useContext)(er.O),{spec:n,logger:i}=(0,Lo.fU)(iR.createDesktopFeatureActivationShelfEventFactory,{});(0,sr.useEffect)((()=>{e&&i.logImpression(n.groupSessionsModalFactory().impression())}),[e,i,n]);const a=()=>{i.logInteraction(n.groupSessionsModalFactory().hitUiHide()),t(!1)};return e?(0,lr.jsx)(ku.Z,{animated:!0,isOpen:e,onRequestClose:a,contentLabel:"",children:(0,lr.jsxs)("div",{className:aR,children:[(0,lr.jsx)(xo.D,{as:"h1",variant:"canon",semanticColor:"textBase",children:u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.title")}),(0,lr.jsxs)(xo.D,{className:sR,as:"p",variant:"viola",semanticColor:"textBase",children:[u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.description-1"),(0,lr.jsx)("br",{}),u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.description-2")]}),(0,lr.jsxs)("ol",{className:rR,children:[(0,lr.jsx)(xo.D,{as:"li",semanticColor:"textBase",children:u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.instruction-1")}),(0,lr.jsx)(xo.D,{as:"li",semanticColor:"textBase",children:u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.instruction-2")}),(0,lr.jsx)(xo.D,{as:"li",semanticColor:"textBase",children:u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.instruction-3",{icon:(0,lr.jsx)(kN.Q,{iconSize:16,className:oR})})}),(0,lr.jsx)(xo.D,{as:"li",semanticColor:"textBase",dangerouslySetInnerHTML:{__html:u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.instruction-4")}}),(0,lr.jsx)(xo.D,{as:"li",semanticColor:"textBase",dangerouslySetInnerHTML:{__html:u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.instruction-5")}}),(0,lr.jsx)(xo.D,{as:"li",semanticColor:"textBase",children:u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.instruction-6")})]}),(0,lr.jsx)(xo.D,{className:sR,as:"p",variant:"viola",semanticColor:"textBase",children:u.ag.get("web-player.feature-activation-shelf.group-sessions-modal.description-3")}),(0,lr.jsx)("button",{"aria-label":u.ag.get("close_button_action"),className:lR,onClick:a,children:(0,lr.jsx)(Rm.k,{iconSize:24})})]})}):null})),cR=(0,sr.lazy)((()=>Promise.all([n.e(1814),n.e(4338)]).then(n.bind(n,71429))));function uR(e){const{data:t,error:n,loading:i}=(0,$m.J)(hs.q8.uM),a=!(0,gg.k)(),s=(0,sr.useMemo)((()=>t?.body?.friends||[]),[t?.body?.friends]);return a||i||n?null:(0,lr.jsx)(cR,{className:e.className,initialFriends:s})}var mR=n(9801),pR=n(98928);var gR=n(76160),hR=n(37769),kR=n(82171),vR=n(21840);const fR="CJs8iynYtMiMqyhSr3Mb",yR={marginBlockEnd:0,willChange:"transform, opacity"},SR=({filterId:e,isPrimaryFilter:t,isPlaceholder:n,resetFilterIds:i,toggleFilterId:a,className:s,ChipComponent:r=gR.A,spec:o,innerRef:l,...d})=>{const c=d.selected,u=(0,Lo.$P)(),m=(0,sr.useCallback)((()=>{let t;if(!e)return i(),void(t=o?.hitClearFilter());t=c?o?.hitClearFilter():o?.hitFilter(),t&&u.logInteraction(t),a(e)}),[e,c,i,a,u,o]),p=(0,sr.useCallback)((e=>{e.detail>1||n||m()}),[n,m]);return(0,lr.jsx)(r,{...d,"aria-label":d["aria-label"],className:uo()(s,{[fR]:n}),onClick:p,selectedColorSet:"invertedLight",secondary:c&&!t,style:yR,ref:l})},bR=[{id:Ln.uh.Album,getName:()=>u.ag.get("web-player.whats-new-feed.filters.music")},{id:Ln.uh.Episode,getName:()=>u.ag.get("web-player.whats-new-feed.filters.episodes")},{id:Ln.uh.WhatsNewFeedNotification,getName:()=>u.ag.get("web-player.whats-new-feed.filters.notifications")}],_R=(0,sr.memo)((function({availableFilters:e,selectedFilters:t,toggleFilterId:n,resetFilterIds:i,className:a,spec:s}){const r=!(t||e),o=r?bR:[...t??[],...e??[]],l=(0,sr.useRef)(null),d=(0,Lo.$P)(),c=(0,sr.useCallback)((()=>{(0,vR.Bu)(l.current,l.current?.nextElementSibling instanceof HTMLElement?l.current?.nextElementSibling:null);const e=s.clearFiltersFactory().hitClearFilter();d.logInteraction(e),i()}),[i,d,s]);return 0===o.length?null:(0,lr.jsx)("div",{children:(0,lr.jsxs)(kR.l,{className:a,ariaLabel:u.ag.get("web-player.your-library-x.filter_options"),children:[!!t?.length&&(0,lr.jsx)(SR,{resetFilterIds:c,toggleFilterId:n,ChipComponent:hR.w,"aria-label":u.ag.get("web-player.whats-new-feed.filters.options"),innerRef:l}),o.map(((e,a)=>{const o=t?.includes(e),l=0===a;return(0,lr.jsx)(SR,{filterId:e.id,isPrimaryFilter:l,isPlaceholder:r,resetFilterIds:i,toggleFilterId:n,selected:o,index:a,spec:s.filterChipFactory({identifier:e.id,position:a}),children:e.getName()},e.id)}))]})})}));var NR=n(76084),ER=n(98306),xR=n(9708),CR=n(83747),wR=n(17201),IR=n(48811),TR=n(13655),AR=n(88513),PR=n(67509);const OR=e=>{const[t,n]=(0,sr.useState)(0);function i(i){const a=e.current?.querySelectorAll('button:not([disabled]), [href], input, select, textarea, a,[tabindex]:not([tabindex="-1"])');if(!a)return;a.forEach((e=>{e.setAttribute("tabindex","-1")})),a&&a[0].setAttribute("tabindex","0");let s=t;if(a&&a.length>0)switch(i.key){case"Tab":document.activeElement&&n(0);break;case"ArrowUp":0===s?(i.preventDefault(),s=a.length-1):s-=1,a[s].focus(),n(s);break;case"ArrowDown":i.preventDefault(),s===a.length-1?s=0:s+=1,a[s].focus(),n(s)}}sr.useEffect((()=>{const t=e.current;return t?.addEventListener("keydown",i),()=>{t?.removeEventListener("keydown",i)}}))},DR=e=>{const t=(0,Qr.s0)();return(0,sr.useCallback)((()=>{""!==e&&t(e)}),[e,t])},RR={row:"main-whatsNewFeed-listRow",content:"main-whatsNewFeed-listContent",subtitleLink:"main-whatsNewFeed-listSubtitleLink",imageWrapper:"main-whatsNewFeed-listImageWrapper",explicitIcon:"main-whatsNewFeed-listExplicitIcon",timeAgo:"main-whatsNewFeed-listTimeAgo",playButton:"main-whatsNewFeed-listPlayButton",footer:"main-whatsNewFeed-listFooter",episodeBody:"main-whatsNewFeed-listEpisodeBody",fallbackIcon:"main-whatsNewFeed-listFallbackIcon"};function LR({album:e,onLike:t,onMoreButtonClick:n,onDownloadClick:i,spec:a}){const s=(0,sr.useRef)(null);let r;OR(s),e.date&&(r=(0,lr.jsx)(PR.O,{dateAdded:new Date(e.date.isoString)}));const[o,l]=(0,Uu.Z)(e.uri),d=e.artists?.items.map((e=>e.profile.name)).join(u.ag.getSeparator())||"",m=(0,Lo.$P)(),p=(0,sr.useCallback)((async()=>{if(!o){const t=a.saveButtonFactory().hitLike({itemToBeLiked:e.uri});m.logInteraction(t)}try{await l(!o)}catch{}}),[o,l,e.uri,m,a]),{togglePlay:g,isPlaying:h,isActive:k}=(0,Hy.n)({uri:e.uri},{featureIdentifier:"whats_new_panel"}),v=(0,sr.useCallback)((t=>{let n;t.preventDefault(),k&&!h&&(n=a.playButtonFactory().hitResume({itemToBeResumed:e.uri})),h||k||(n=a.playButtonFactory().hitPlay({itemToBePlayed:e.uri})),h&&(n=a.playButtonFactory().hitPause({itemToBePaused:e.uri})),n&&m.logInteraction(n),g()}),[g,k,h,m,a,e.uri]),f=(0,c.EC)(e.uri);let y="";f&&(y=f.toURLPath(!0));const S=DR(y),b=(0,sr.useCallback)((()=>{const t=a.hitUiNavigate({destination:e.uri});m.logInteraction(t),S()}),[e.uri,a,m,S]),_=(0,sr.useCallback)((n=>{const i=a.saveButtonFactory().hitLike({itemToBeLiked:e.uri}),s=a.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});m.logInteraction(n?i:s),t?.(n)}),[a,m,e.uri,t]),N=(0,sr.useCallback)(((t,n)=>{let s;n===di.mc.ADD?s=a.downloadButtonFactory().hitDownload({itemToDownload:e.uri}):n===di.mc.REMOVE&&(s=a.downloadButtonFactory().hitUiReveal()),s&&m.logInteraction(s),i?.(t,n)}),[e.uri,m,a,i]),E=(0,sr.useCallback)((e=>{n?.(e)}),[n]),x=(0,sr.useCallback)((()=>{const t=a.titleFactory().hitUiNavigate({destination:e.uri});m.logInteraction(t)}),[e.uri,m,a]),C=u.ag.get("tracklist.a11y.play",e.name,d),w=u.ag.get("tracklist.a11y.pause",e.name,d),I=(0,lr.jsx)(NR.g,{lineClamp:1,children:(0,lr.jsx)(WN.default,{to:e.uri,onClick:x,children:e.name})}),T=e.artists?e.artists.items.map(((e,t,n)=>{return(0,lr.jsxs)(sr.Fragment,{children:[(0,lr.jsx)(WN.default,{to:e.uri,className:RR.subtitleLink,onClick:(i=e.uri,()=>{const e=a.subtitleFactory().hitUiNavigate({destination:i});m.logInteraction(e)}),children:e.profile.name}),tt?.item?.uri===e.uri));(0,sr.useEffect)((()=>{t&&(r.current=o)}),[t,o]),(0,sr.useEffect)((()=>{!t&&r.current&&e.duration.totalMilliseconds<=r.current&&a(!0)}),[t,e.duration.totalMilliseconds,a]);const{badges:l}=(0,HR.r)({contentRating:e.contentRating?.label,isPaywalled:s}),d=(0,lr.jsxs)(lr.Fragment,{children:[l.explicit&&(0,lr.jsx)(UR.N,{}),l.paid&&(0,lr.jsx)(GR.g,{}),l.nineteen&&(0,lr.jsx)(BR.X,{size:16})]}),c=(0,lr.jsx)(VR.E,{isPlaying:t,fullyPlayed:i,durationMs:e.duration.totalMilliseconds,resumePositionMs:r.current||e.playedState.playPositionMilliseconds,position:n?o:void 0,compactVariant:!0});return(0,lr.jsxs)("div",{className:RR.episodeBody,children:[d,(0,lr.jsx)(xo.D,{semanticColor:"textSubdued",children:u.ag.get("card.tag.episode")}),(0,lr.jsx)(MR.o,{children:"•"}),o>0&&c]})}function KR({episode:e,podcastName:t,podcastUri:n,onLike:i,onMoreButtonClick:a,onDownloadClick:s,spec:r}){const o=(0,sr.useRef)(null);let l;OR(o),e.releaseDate&&(l=(0,lr.jsx)(PR.O,{dateAdded:new Date(e.releaseDate.isoString)}));const d=(0,Lo.$P)(),[m,p]=(0,Uu.Z)(e.uri),{togglePlay:g,isPlaying:h,isActive:k}=(0,Hy.n)({uri:e.uri},{featureIdentifier:"whats_new_panel"}),[v,f]=(0,sr.useState)(e.playedState.state===Ln.sY.Completed),y=(0,c.EC)(e.uri);let S="";y&&(S=y.toURLPath(!0));const b=DR(S),_=u.ag.get("tracklist.a11y.play",e.name,t),N=u.ag.get("tracklist.a11y.pause",e.name,t),E=(0,sr.useCallback)((()=>{const t=r.hitUiNavigate({destination:e.uri});d.logInteraction(t),b()}),[b,d,r,e.uri]),x=(0,sr.useCallback)((t=>{const n=r.saveButtonFactory().hitLike({itemToBeLiked:e.uri}),a=r.saveButtonFactory().hitRemoveLike({itemNoLongerLiked:e.uri});d.logInteraction(t?n:a),i?.(t)}),[r,d,e.uri,i]),C=(0,sr.useCallback)(((t,n)=>{let i;n===di.mc.ADD?i=r.downloadButtonFactory().hitDownload({itemToDownload:e.uri}):n===di.mc.REMOVE&&(i=r.downloadButtonFactory().hitUiReveal()),i&&d.logInteraction(i),s?.(t,n)}),[d,r,e.uri,s]),w=(0,sr.useCallback)((()=>{const t=r.titleFactory().hitUiNavigate({destination:e.uri});d.logInteraction(t)}),[d,r,e.uri]),I=(0,sr.useCallback)((t=>{let n;t.preventDefault(),k&&!h&&(n=r.playButtonFactory().hitResume({itemToBeResumed:e.uri})),h||k||(n=r.playButtonFactory().hitPlay({itemToBePlayed:e.uri})),h&&(n=r.playButtonFactory().hitPause({itemToBePaused:e.uri})),n&&d.logInteraction(n),g()}),[g,d,r,e.uri,h,k]),T=(0,sr.useCallback)((async()=>{try{await p(!m)}catch{}const t=r.followButtonFactory().hitFollow({itemToBeFollowed:e.uri}),n=r.followButtonFactory().hitUnfollow({itemToBeUnfollowed:e.uri});d.logInteraction(m?n:t)}),[m,p,d,r,e.uri]),A=(0,sr.useCallback)((e=>{a?.(e)}),[a]),P=(0,lr.jsx)(NR.g,{lineClamp:2,children:(0,lr.jsx)(WN.default,{to:e.uri,onClick:w,children:e.name})}),O=(0,lr.jsx)(CR.l,{lineClamp:1,children:(0,lr.jsx)(WN.default,{to:n,className:RR.subtitleLink,onClick:(D=n,()=>{const e=r.subtitleFactory().hitUiNavigate({destination:D});d.logInteraction(e)}),children:t})});var D;const R=(0,lr.jsx)(ER.d,{src:e.coverArt?.sources?.[0]?.url,size:"xl"}),L=(0,lr.jsxs)("div",{className:RR.footer,children:[(0,lr.jsx)(Ih.w,{onClick:x,uri:e.uri}),(0,lr.jsx)(TR.o,{onClick:C,uri:e.uri,isFollowing:m,onFollow:T,size:TR.q.xs}),(0,lr.jsx)(Lo.Nh,{spec:r,children:(0,lr.jsx)(Pl.yj,{menu:(0,lr.jsx)(FR.k,{uri:e.uri,onMarkAsPlayed:f,isPlayed:v}),children:(0,lr.jsx)(qb.z,{onClick:A,size:qb.q.xs})})}),(0,lr.jsx)("div",{className:RR.playButton,children:(0,lr.jsx)(wR.f,{"aria-label":"whats-new-feed-play-button",size:"sm",onClick:I,isPlaying:h,ariaPlayLabel:_,ariaPauseLabel:N,version:wR.u.secondary})})]}),F=(0,lr.jsx)(zR,{episode:e,isPlaying:h,isActive:k,isFullyPlayed:v,setIsFullyPlayed:f});return(0,lr.jsx)(xR.w,{ref:o,pretitle:l,className:RR.row,media:R,title:P,subtitle:O,id:e.uri,variant:"naked",body:F,footer:L,onClick:E,hoverBackgroundColor:"backgroundHighlight"})}function YR({item:e,spec:t}){const n=(0,Qr.s0)(),i=(0,Lo.$P)();if("WhatsNewFeedNotificationFeedItem"!==e.content.__typename)return(0,lr.jsx)(lr.Fragment,{});const a=e.content.content;let s,r,o;s=e.content.title;const l=(0,lr.jsx)("div",{className:RR.fallbackIcon,children:(0,lr.jsx)(xO.G,{})}),d=e.content.image?.sources?.[0]?.url?(0,lr.jsx)(ER.d,{src:e.content.image?.sources?.[0]?.url,size:"xl"}):l,u=e.timestamp?.isoString&&(0,lr.jsx)(PR.O,{dateAdded:new Date(e.timestamp?.isoString)});switch(a?.__typename){case"ArtistResponseWrapper":"Artist"===a.data.__typename&&(s=a.data.profile.name);break;case"ConcertResponseWrapper":"Concert"===a.data.__typename&&(s=a.data.title);break;case"GenreResponseWrapper":r=e.content.subtitle,o=(0,c.EC)(a._uri);break;default:"OtherSpotifyUriType"!==a?.__typename&&"GenericError"!==a?.data.__typename&&"NotFound"!==a?.data.__typename&&"RestrictedContent"!==a?.data.__typename&&(s=a?.data?.name)}const m=o?.toURLPath(!0);return(0,lr.jsx)(xR.w,{pretitle:u,className:RR.row,media:d,title:s,subtitle:undefined,id:e.id,variant:"naked",body:r,footer:undefined,hoverBackgroundColor:"backgroundHighlight",onClick:()=>(e=>{""!==e&&n(e);const a=t.hitUiNavigate({destination:e});i.logInteraction(a)})(m||"")})}function qR({item:e,spec:t}){if("AlbumResponseWrapper"===e.content.__typename){const n=e.content.data;if("Album"===n.__typename)return(0,lr.jsx)(LR,{album:n,spec:t})}if("EpisodeOrChapterResponseWrapper"===e.content.__typename){const n=e.content.data;if("Chapter"===n.__typename)return(0,lr.jsx)(jR,{chapter:n,spec:t});if("Episode"===n.__typename){let e="",i="";return"Podcast"===n.podcastV2.data.__typename&&(e=n.podcastV2.data.name,i=n.podcastV2.data.uri),(0,lr.jsx)(KR,{episode:n,podcastName:e,podcastUri:i,spec:t})}}return"WhatsNewFeedNotificationFeedItem"===e.content.__typename?(0,lr.jsx)(YR,{item:e,spec:t}):(0,lr.jsx)(lr.Fragment,{})}const ZR="main-whatsNewFeed-content",QR="main-whatsNewFeed-listHeader",JR="main-whatsNewFeed-list",$R="NaRE2l7NC4qwYGmtIhLj",XR="efdmucpG0CLVCpc0_cZz",eL=sr.memo((()=>(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(mC.C,{as:"h3",variant:"celloCanon",className:XR,charCount:4,isLoading:!0}),(0,lr.jsx)("div",{className:$R,children:[20,50,25].map(((e,t)=>(0,lr.jsx)(mC.C,{as:"div",variant:"mesto",className:XR,charCount:e,isLoading:!0},`${e}-${t}`)))})]})));var tL=n(45911);const nL={offset:0,limit:50,onlyUnPlayedItems:!1};const iL={[Ln.uh.Album]:{id:Ln.uh.Album,getName:()=>u.ag.get("web-player.whats-new-feed.filters.music"),active:!1},[Ln.uh.Episode]:{id:Ln.uh.Episode,getName:()=>u.ag.get("web-player.whats-new-feed.filters.episodes"),active:!1}},aL=({includedContentTypes:e,spec:t})=>{const{loading:n,data:i,error:a}=(s={...nL,includedContentTypes:e??[]},r={cacheTime:30*Wt.y,staleTime:10*Wt.y},(0,Wt.a)(IO,s,r));var s,r;const{getGraphQLLoader:o}=(0,el.tc)(),l=o();if((0,sr.useEffect)((()=>{if(!i?.whatsNewFeedItems?.items)return;const e=i?.whatsNewFeedItems?.items.filter((e=>e.state===Ln.RR.New)).map((e=>({id:e.id,state:Ln.RR.Seen})));e.length>0&&async function(e,t){await e(AO,{items:t})}(l,{items:e})}),[i?.whatsNewFeedItems?.items,l]),a&&!i?.whatsNewFeedItems?.items)return(0,lr.jsxs)("div",{children:[(0,lr.jsx)(hE.l,{iconSize:16,"aria-hidden":"true"}),(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",children:u.ag.get("error.generic")}),(0,lr.jsx)(xo.D,{as:"p",variant:"ballad",children:u.ag.get("web-player.whats-new-feed.panel.error")})]});if(n)return(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(eL,{}),(0,lr.jsx)(eL,{})]});const d=i?.whatsNewFeedItems?.items;if(!d||0===d.length){const{title:t,message:n}=function(e=[]){return e.includes(Ln.uh.Episode)?{title:u.ag.get("web-player.whats-new-feed.panel.empty-results-podcast.title"),message:u.ag.get("web-player.whats-new-feed.panel.empty-results-podcast.message")}:e.includes(Ln.uh.Album)?{title:u.ag.get("web-player.whats-new-feed.panel.empty-results-music.title"),message:u.ag.get("web-player.whats-new-feed.panel.empty-results-music.message")}:{title:u.ag.get("web-player.whats-new-feed.panel.empty-results-all.title"),message:u.ag.get("web-player.whats-new-feed.panel.empty-results-all.message")}}(e);return(0,lr.jsx)(tL.u,{title:t,message:n,renderInline:!0})}const c=d.findIndex((e=>e.state===Ln.RR.Seen));return(0,lr.jsx)("div",{className:JR,role:"list",children:d.map(((e,n)=>{const i=e.state===Ln.RR.New&&0===n;return(0,lr.jsxs)(sr.Fragment,{children:[i&&(0,lr.jsx)(xo.D,{as:"h3",variant:"celloCanon",className:QR,semanticColor:"textBase",children:u.ag.get("web-player.whats-new-feed.new-section-title")}),e.state===Ln.RR.Seen&&n===c&&(0,lr.jsx)(xo.D,{as:"h3",variant:"celloCanon",className:QR,semanticColor:"textBase",children:u.ag.get("web-player.whats-new-feed.earlier-section-title")}),(0,lr.jsx)(qR,{item:e,spec:t.notificationItemFactory({identifier:e.id,position:n})},e.id)]},e.id)}))})},sL=({className:e})=>{const[t,n]=(0,sr.useState)(iL),{spec:i,logger:a}=(0,Lo.fU)(CO.y,{}),s=Object.values(t),r=s.filter((e=>e.active)),o=r.length>0?[]:s,l=r.map((e=>e.id)),d=(0,sr.useCallback)((e=>{const i={...iL,...t,[t[e]?.id||Ln.uh.Unknown]:{id:t[e]?.id||Ln.uh.Unknown,getName:()=>t[e]?.getName()||"",active:!t[e]?.active}};n(i)}),[t]),c=(0,sr.useCallback)((()=>{n(iL)}),[n]),m=(0,sr.useCallback)((()=>{const e=i.closeButtonFactory().hitUiHide();a.logInteraction(e)}),[a,i]);return(0,sr.useEffect)((()=>{a.logImpression(i.impression())}),[a,i]),(0,lr.jsx)(zk.DJ.Provider,{value:"whats_new_panel",children:(0,lr.jsx)(ex.l,{label:u.ag.get("web-player.whats-new-feed.panel.title"),className:e,children:(0,lr.jsxs)(tx.K,{className:ZR,children:[(0,lr.jsx)(nx.V,{title:u.ag.get("web-player.whats-new-feed.panel.title"),panel:zg.s.WhatsNewFeed,onClose:m}),(0,lr.jsx)(xo.D,{as:"p",semanticColor:"textSubdued",variant:"mesto",children:u.ag.get("web-player.whats-new-feed.panel.subtitle")}),(0,lr.jsx)(_R,{availableFilters:o,toggleFilterId:d,selectedFilters:r,resetFilterIds:c,spec:i.filterChipsFactory()}),(0,lr.jsx)(aL,{includedContentTypes:l,spec:i})]})})})};var rL=n(24066);const oL="NpvPanel_PreAdNpvState",lL=e=>{const t=(0,rL.m)(),n=(0,Xo.W6)(Ns.JI);switch((()=>{const e=(0,mR.W)(),t=(0,pR.B)(),n=!(0,gg.k)(),i=(0,sr.useRef)(t),a=(0,Xo.W6)(Ns.JI),{contextUri:s,timestamp:r=0,isVideo:o}=(0,vr.Y)((e=>({contextUri:e?.context.uri,timestamp:e?.timestamp,isVideo:"audio"!==e?.item?.mediaType})),((e,t)=>e.contextUri===t.contextUri)),l=(0,sr.useRef)(s);(0,sr.useEffect)((()=>{i.current=t}),[t]),(0,sr.useEffect)((()=>{null===s||"invalid_context_uri"===s?e.setPanelState(N.s.Disabled):a&&!n&&i.current&&s!==l.current&&(Date.now()-r<=5e3||o)&&e.setPanelState(N.s.NowPlayingView)}),[e,s,r,a,o,n])})(),(()=>{const e=(0,mR.W)(),t=(0,Xo.W6)(Ns.JI),n=(0,rL.m)(),i=(0,Ic.um)(),{item:a}=(0,vr.Y)((e=>({item:e?.item})));(0,sr.useEffect)((()=>{if(null!==a&&!(0,he.RB)(a)&&t)if((0,he.k6)(a))i.getItem(oL)instanceof em.d&&i.setItem(oL,n),e.setPanelState(N.s.NowPlayingView);else{const t=i.getItem(oL);t instanceof em.d||t instanceof tm.y||(e.setPanelState(t),i.clearItem(oL))}}),[e,a,t,n,i])})(),t){case N.s.BuddyFeed:return(0,lr.jsx)(uR,{className:e.className});case N.s.WhatsNewFeed:return(0,lr.jsx)(sL,{className:e.className});case N.s.Puffin:return null;case N.s.NowPlayingView:return n?(0,lr.jsx)(Mw,{currentPanel:t,className:e.className}):null;default:return Spicetify.Panel?.render()?? null}},dL="ZjyLlDvxh8QqNVY2vMsF",cL="sx8Bf4udHt_kPAnxmGW8",uL="sfaREUmOnuxlr99uOYnS",mL="RTGGeDA2P3rKc6r96vqA",pL="e1NO8ZuDIwSef3E4ppfX",gL="Fo3Fe1PpXtQ3G32BqnwP",hL="aRZZo0b_4ktkI0mPQ7Vw",kL=({name:e,onRename:t})=>{const n=(0,$s.I0)(),[i,a]=(0,sr.useState)(null),s=(0,sr.useCallback)((e=>{null!==e&&a(e)}),[]);(0,sr.useEffect)((()=>{i?.select()}),[i]);const r=()=>{n((0,Qs.TH)())},o=()=>{t(i?.value??""),r()};return(0,lr.jsx)(ku.Z,{contentLabel:u.ag.get("playlist.edit-details.title"),shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:r,shouldFocusAfterRender:!0,isOpen:!0,children:(0,lr.jsxs)("div",{"":"playlist-edit-details-modal",className:dL,children:[(0,lr.jsxs)("div",{className:uL,children:[(0,lr.jsx)(xo.D,{as:"h1",variant:"canon",children:u.ag.get("web-player.your-library-x.rename-folder")}),(0,lr.jsx)("button",{className:mL,onClick:r,children:(0,lr.jsx)(Rm.k,{iconSize:24,"aria-label":u.ag.get("close")})})]}),(0,lr.jsxs)("form",{className:cL,onSubmit:e=>{e.preventDefault(),o()},children:[(0,lr.jsx)("input",{ref:s,type:"text",defaultValue:e,onSubmit:o,className:uo()(pL,gL)}),(0,lr.jsx)("div",{className:hL,children:(0,lr.jsx)(au.D,{colorSet:"invertedLight",type:"submit",children:u.ag.get("save")})})]})]})})};var vL=n(34595);const fL=({uri:e,onConfirm:t,onCancel:n,remoteDeviceInfo:i})=>{const a=(0,Lo.$P)(),s=(0,sr.useMemo)((()=>(0,vL.z)()),[]);(0,sr.useEffect)((()=>{a.logImpression(s.impression())}),[a,s]);const r=(0,$s.I0)();return(0,lr.jsx)(nk.Q,{"aria-label":u.ag.get("web-player.download.remove-download-confirmation-dialog.title"),titleText:u.ag.get("web-player.download.remove-download-confirmation-dialog.title"),descriptionText:i?u.ag.get("web-player.download.remove-download-confirmation-dialog.message-remote",i.deviceName):u.ag.get("web-player.download.remove-download-confirmation-dialog.message"),onConfirm:()=>{t(),r((0,Qs.rV)()),a.logInteraction(i?s.confirmRemoveDownloadButtonFactory().hitRemoveDownloadFromRemoteDevice({itemToRemoveFromDownloads:e,remoteDeviceId:i.deviceId,remoteDeviceType:i.deviceType.toString(),remoteClientPlatform:i.clientPlatform.toString()}):s.confirmRemoveDownloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},onClose:()=>{n(),r((0,Qs.rV)()),a.logInteraction(s.cancelButtonFactory().hitUiHide())},confirmText:u.ag.get("web-player.download.remove-download-confirmation-dialog.confirm-button-text"),confirmLabel:u.ag.get("web-player.download.remove-download-confirmation-dialog.confirm-button-label"),cancelText:u.ag.get("web-player.download.remove-download-confirmation-dialog.cancel-button-text"),allowHTML:!0})};var yL=n(46378),SL=n(81460),bL=n(69898),_L=n(30616);const NL=6e5;let EL=null;const xL=()=>{const{verificationId:e,refetch:t}=(()=>{const[e,t]=(0,sr.useState)(null),n=(0,el.s4)(),{refetch:i}=(0,Js.useQuery)({enabled:!1,queryFn:async()=>{const e=pt.b.getInstance(),{body:t}=await(0,bL.u)(e);return t},onSuccess:e=>{if(!e?.length)return;const i=e[0].id;t(i),n.send((0,yL.x)({id:i,method:"IN_APP_VERIFICATION_V0"}))},onError:e=>{n.send((0,SL.b)({method:"IN_APP_VERIFICATION_V0",error_message:e instanceof _L.m?e.name:null,http_method:"get",http_path:"/verifications"}))}});return{verificationId:e,refetch:i}})();return(0,Br.G)(ke.rg.UPDATE,(n=>{if(e)return;const i="number"==typeof n?.data?.positionAsOfTimestamp&&n.data.positionAsOfTimestamp>=0&&n.data.positionAsOfTimestamp<=1e3;!n?.data?.isPaused&&i&&function(){const e=performance.now();if(EL&&e-ELPromise.all([n.e(1814),n.e(5043)]).then(n.bind(n,15043)))),wL=()=>{const e=(0,Xo.W6)(Ns.nv),[t,n]=(0,sr.useState)(!1),i=xL();return(0,sr.useEffect)((()=>{n(!!i)}),[i]),e&&t?(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(CL,{verificationId:`${i}`})}):null};var IL=n(82452);const TL=()=>{const{spec:e,logger:t}=(0,Lo.fU)(ZC.p,{}),{isActive:n,toggle:i}=(0,VE.T)(zg.s.NowPlayingView),a=(0,$s.I0)(),{setMode:s}=qE();return(0,sr.useEffect)((()=>{const e=e=>{"Escape"===e.key&&s(IL.f.npv)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}}),[a,n,i,s]),(0,lr.jsxs)("div",{className:YE.Controls,children:[(0,lr.jsx)(Wg,{focus:!0,label:u.ag.get("web-player.now-playing-view.minimize.lyrics"),onClick:()=>{s(IL.f.npv),t.logInteraction(e.minimizeCinemaModeButtonFactory().hitUiHide()),t.logImpression(e.minimizeCinemaModeButtonFactory().impression())},children:(0,lr.jsx)(Mg.o,{iconSize:16})}),(0,lr.jsx)(Wg,{focus:!0,label:u.ag.get("web-player.now-playing-view.close.lyrics"),onClick:()=>{s(IL.f.none),t.logInteraction(e.closeLyricsButtonFactory().hitUiHide())},children:(0,lr.jsx)(Rm.k,{iconSize:16})})]})};var AL=n(44472);const PL=()=>{const{mode:e,setMode:t}=qE(),{lyricsCinemaRef:n}=(0,HE.Oh)();!function(){const{pathname:e}=(0,Qr.TH)(),{mode:t,setMode:n}=qE();(0,sr.useEffect)((()=>{t===xk.LyricsMode.cinema&&n(xk.LyricsMode.npv)}),[e])}();const{item:i}=(0,vr.Y)((e=>({item:e?.item?.type})));return e!==xk.LyricsMode.cinema?null:(i&&i===ve.p.TRACK||t(xk.LyricsMode.npv),n.current?a.createPortal((0,lr.jsxs)("div",{className:YE.Container,children:[(0,lr.jsx)(TL,{}),(0,lr.jsx)(KS.U,{className:YE.Content,children:(0,lr.jsx)(AL.Z,{coverTopBar:!0,format:"cinema"})})]}),n.current):(console.error("No container found for cinema video!"),null))},OL=()=>(0,lr.jsx)(Xs.L,{children:(0,lr.jsx)(PL,{})}),DL=(0,sr.memo)((function(){const e=(0,$s.I0)(),t=(0,Fc.zZ)(),n=(0,$s.v9)((e=>e.ui.removeFromLibraryDialog.uri)),[i,a]=(0,Uu.Z)(n??""),[s,r]=(0,sr.useState)("");(0,sr.useEffect)((()=>{(async()=>{const e=(0,c.EC)(n)?.type;switch(e){case c.JM.ALBUM:r(u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-album"));break;case c.JM.ARTIST:r(u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-artist"));break;case c.JM.SHOW:r((0,Ja.l6)(await t.getMetadata(n??""))?u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-audiobook"):u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-show"));break;case c.JM.PLAYLIST:case c.JM.PLAYLIST_V2:r(u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-description-playlist"));break;default:r(u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-title"))}})()}),[t,n]);const o=(0,sr.useCallback)((()=>{e((0,Qs.F1)())}),[e]),l=(0,sr.useCallback)((()=>{n&&i&&(a(!1),o())}),[n,i,a,o]);return(0,lr.jsx)(nk.Q,{"aria-label":`${u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-title")} ${s}`,titleText:u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-title"),descriptionText:s,onConfirm:l,onClose:o,confirmText:u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-confirm-button"),cancelText:u.ag.get("web-player.your-library-x.feedback-remove-from-library-dialog-cancel-button"),allowHTML:!0})}));var RL=n(19709),LL=n(62517);const FL=()=>{const[e,t]=(0,sr.useState)(!1),[n,i]=(0,sr.useState)(""),[a,s]=(0,sr.useState)(""),{pathname:r}=location,o=(0,$s.v9)(eb.rZ),l=(0,BO.g)();(0,sr.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),1100);return()=>{t(!1),clearTimeout(e)}}),[r]);const d=(0,sr.useCallback)((({columnWidth:e,gridGap:t})=>{const n=`${e.toString()}px`,a=`${t.toString()}px`;i(n),s(a)}),[]),c=(0,sr.useCallback)((()=>(0,lr.jsx)(lr.Fragment,{})),[]);return e?(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)("div",{className:"contentSpacing",children:(0,lr.jsx)(LL.T,{render:c,onLayoutChange:d})}),(0,lr.jsx)(RL.VB,{language:u.ag.getSmartlingLocale(),market:o.toLowerCase(),children:(0,lr.jsx)(RL.$_,{hideWebPlayerLink:!0,columnGap:a,columnWidth:n,hideLegalLinks:l})})]}):(0,lr.jsx)(lr.Fragment,{})};var jL=n(73854),ML=n(85735);function UL(e){return(0,lr.jsx)(lr.Fragment,{children:e.children})}const BL="ip1ko2_ZfZPsBx32sxD1",VL=(0,sr.forwardRef)((function({children:e},t){return(0,lr.jsx)("div",{ref:t,className:BL,children:e})})),HL={rootGrid:"Root__top-container",rightSidebarHidden:"Root__top-container--right-sidebar-hidden",hasNoticeBar:"Root__top-container--has-notice-bar","rootGrid-transition-enter":"Root__top-container--transition-enter","rootGrid-transition-exit":"Root__top-container--transition-exit"};function GL({children:e}){const t=(0,Kg.m)(),n=(0,$s.v9)((e=>e.ui.unsupportedBrowser.isOpen));return(0,lr.jsx)("div",{className:uo()(HL.rootGrid,{[HL.hasNoticeBar]:n,[HL.rightSidebarHidden]:t===zg.s.Disabled}),children:e})}const WL=({consumptionCapExplanation:e})=>{const t=(0,$s.I0)(),n=(0,sr.useCallback)((()=>{t((0,Qs.mB)())}),[t]);return(0,lr.jsx)(nk.Q,{"aria-label":e.title,titleText:e.title,descriptionText:e.body,onConfirm:n,onClose:n,confirmText:e.cta,shouldCloseOnEsc:!1,shouldCloseOnOverlayClick:!1})},zL=e=>{const{accessTokenIsSet:t,ui:n,onClose:i,onBrowserNotSupported:a,onCloseFullscreenMode:s,onReachUsableState:r,isVideoSupported:o,isBrowser:l,isDesktop:d,billboardMinimized:c,isAnonymous:h,isDeveloperMode:k,adsEnabled:v,children:f}=e,y=(0,Xo.W6)(Ns.yA,{loadingValue:!1}),S=(0,ML.Y)(),b=(0,sr.useContext)(m.r$);(0,sr.useEffect)((()=>{document.body.classList[y?"add":"remove"]("ylx")}),[y]),(0,sr.useEffect)((()=>{y?b.setTitlebarHeight(YA.H):b.setTitlebarHeight(YA.m)}),[b,y]);const _=n.unsupportedBrowser.isOpen,N=(0,p.ZO)()===g.W.Desktop,E=(0,sr.useRef)(null),x=(0,sr.useRef)(null),C=(0,sr.useRef)(null),w=(0,sr.useRef)(null),I=(0,sr.useRef)(null),T=(0,sr.useRef)(null),A=(0,sr.useRef)(null),P=(0,sr.useRef)(null),O=(0,sr.useRef)(null),D=(0,sr.useRef)(null),R=(0,sr.useRef)(null),L=(0,Qr.TH)(),F=!N&&"/lyrics"!==L.pathname;var j;(e=>{const t=(0,Qr.s0)();(0,sr.useEffect)((()=>{const n=n=>{e&&(3===n.button?t(-1):4===n.button&&t(1))};return document.addEventListener("mouseup",n),()=>{document.removeEventListener("mouseup",n)}}),[e,t])})(N),j=!k,(0,sr.useEffect)((()=>{if(!j)return;const e=e=>{const t=e.target;["INPUT","TEXTAREA"].includes(t.tagName)||e.preventDefault()};return document.addEventListener("contextmenu",e),()=>{document.removeEventListener("contextmenu",e)}}),[j]),(({onBrowserNotSupported:e,onReachUsableState:t})=>{(0,sr.useEffect)((()=>{const n=Z().getParser(window.navigator.userAgent);n.satisfies({chrome:"<62"})||n.satisfies({edge:"<16"})?e(u.ag.get("browser_upgrade_notice",n.getBrowserName())):t("home")}),[e,t])})({onBrowserNotSupported:a,onReachUsableState:r}),zw();const{isCollapsed:M}=(0,GE.U)(),{isExpanded:U}=(0,Ck.o)(),B=U&&M&&y,{handleDrop:V,handleDragStart:H,handleDragEnd:G,handleDragOver:W}=(()=>{const e=(0,sr.useCallback)((e=>{e.preventDefault(),document.body.removeAttribute("data-dragging-type"),document.body.removeAttribute("data-dragging-uri-type")}),[]),t=(0,sr.useCallback)((e=>{document.body.removeAttribute("data-dragging-type"),document.body.removeAttribute("data-dragging-uri-type")}),[]),n=(0,sr.useCallback)((e=>{e.preventDefault()}),[]);return{handleDrop:e,handleDragStart:(0,sr.useCallback)((e=>{e.target instanceof Element&&"true"!==e.target.getAttribute("draggable")&&(e.preventDefault(),e.stopPropagation())}),[]),handleDragEnd:t,handleDragOver:n}})();(0,sr.useEffect)((()=>{window&&window.history&&window.history.scrollRestoration&&(window.history.scrollRestoration="manual")}),[]),(0,sr.useEffect)((()=>{b.notifyReadyStateReached()}),[b]);const z=(0,sr.useMemo)((()=>[(0,lr.jsx)(JT,{scrollNodeRef:O,scrollNodeChildRef:D}),(0,lr.jsx)(sP.y,{}),(0,lr.jsx)(HE.aC,{mainLandmarkRef:E,lyricsCinemaRef:I,topbarRef:P}),(0,lr.jsx)(uf,{}),(0,lr.jsx)(Ig.Z,{}),(0,lr.jsx)(jg,{}),(0,lr.jsx)(Wu,{}),(0,lr.jsx)(WA,{}),(0,lr.jsx)(KA.jg,{}),(0,lr.jsx)(jL.r7,{})]),[]);return(0,lr.jsxs)(Bc,{providers:z,children:[(0,lr.jsxs)("div",{"":"root",className:uo()("Root encore-dark-theme",{"nav-ylx":y}),style:{"--panel-gap":`${S}px`},onDrop:V,onDragOver:W,onDragStart:H,onDragEnd:G,children:[(0,lr.jsx)(bf,{message:n.unsupportedBrowser.isOpen?n.unsupportedBrowser.message:null,allowHTML:!0,onClose:i,isNotSupported:!0}),(0,lr.jsxs)(GL,{children:[(0,lr.jsx)("div",{ref:P,className:"Root__top-bar",children:(0,lr.jsx)(th.ZP,{value:"top-bar",children:(0,lr.jsx)(LD,{})})}),(0,lr.jsxs)("nav",{ref:A,"aria-label":u.ag.get("sidebar.a11y.landmark-label"),className:uo()("Root__nav-bar",{"Root__nav-bar--has-notice-bar":_,hasYLXSidebar:y}),children:[(0,lr.jsx)(th.ZP,{value:"nav-bar",children:y?(0,lr.jsx)(nR,{npbVideoAdRef:x}):(0,lr.jsx)(XS,{ref:x,isAnonymous:h,isBrowser:l})}),(0,lr.jsx)(qT,{elementRef:A})]}),(0,lr.jsx)("div",{ref:C,className:"Root__now-playing-bar",children:(0,lr.jsx)(qI,{})}),(0,lr.jsxs)("div",{className:"Root__main-view",children:[(0,lr.jsxs)("div",{className:"main-view-container",children:[(0,lr.jsx)("div",{className:"under-main-view"}),(0,lr.jsxs)(KS.U,{className:"main-view-container__scroll-node",ref:e=>{e&&!O.current&&(O.current=e.osInstance().getElements().viewport)},options:{sizeAutoCapable:!1},children:[(0,lr.jsx)("div",{className:"main-view-container__scroll-node-child-spacer"}),(0,lr.jsx)("div",{ref:D,className:uo()("main-view-container__scroll-node-child",{"main-view-container__scroll-node-child--is-floating-cover-art-expanded-with-ylx-sidebar":B}),style:{minHeight:"calc(100vh - 64px - 90px - 519px)"},children:(0,lr.jsx)(zD,{ref:E,children:(0,lr.jsxs)(Xs.L,{FallbackComponent:()=>(0,lr.jsx)(ZI.p,{}),onError:e=>(0,Ls.vK)(e,"Root"),children:[f,F&&(0,lr.jsx)("div",{className:"main-view-container__mh-footer-container",children:(0,lr.jsx)(FL,{})})]})})})]}),o&&(0,lr.jsx)(sv,{fullscreenModeRef:T,cinemaModeRef:w,npbVideoAdRef:x,nowPlayingBarRef:C})]}),(0,lr.jsx)(OL,{}),t&&v&&(0,lr.jsx)(ek,{}),d&&(0,lr.jsx)("div",{className:uo()("",{"Root__ads-container-desktop--is-hidden":!c}),children:(0,lr.jsx)(Yh,{})}),(0,lr.jsx)("div",{className:"Root__modal-slot"})]}),(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(lL,{className:"Root__right-sidebar"})}),(0,lr.jsx)("div",{id:"lyrics-cinema",className:"Root__lyrics-cinema",ref:I}),(0,lr.jsxs)(UL,{children:[(0,lr.jsx)(VL,{ref:w}),(0,lr.jsx)(VL,{children:(0,lr.jsx)(mv,{})})]})]}),n.deletePlaylistDialog.isOpen&&(0,lr.jsx)(th.ZP,{value:"delete-playlist-modal",children:(0,lr.jsx)(lk,{})}),n.deleteFolderDialog.isOpen&&(0,lr.jsx)(th.ZP,{value:"delete-folder-modal",children:(0,lr.jsx)(ik,{})}),n.removeFromLibraryDialog.isOpen&&(0,lr.jsx)(th.ZP,{value:"delete-folder-modal",children:(0,lr.jsx)(DL,{})}),n.premiumDialog.isOpen&&(0,lr.jsx)(th.ZP,{value:"premium-modal",children:(0,lr.jsx)(AT,{})}),n.loginToListenDialog.isOpen&&(0,lr.jsx)(th.ZP,{value:"login-to-listen-modal",children:(0,lr.jsx)(zf,{})}),n.signupToListenDialog.isOpen&&(0,lr.jsx)(th.ZP,{value:"signup-to-listen-modal",children:(0,lr.jsx)(zT,{})}),n.improvedSignupPromptDialog.isOpen&&(0,lr.jsx)(Hv,{uri:n.improvedSignupPromptDialog.uri}),n.removeDownloadsDialog.isOpen&&(0,lr.jsx)(VD,{}),n.clearCacheDialog.isOpen&&(0,lr.jsx)(HD,{}),n.renameFolderModal.isOpen&&(0,lr.jsx)(kL,{name:n.renameFolderModal.name,onRename:n.renameFolderModal.handleRename}),n.removeDownloadConfirmationDialog.isOpen&&(0,lr.jsx)(fL,{...n.removeDownloadConfirmationDialog}),n.bookConsumptionCapModal.isOpen&&(0,lr.jsx)(WL,{consumptionCapExplanation:n.bookConsumptionCapModal.consumptionCapExplanation}),(0,lr.jsx)(wL,{}),(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(Sg,{})}),(0,lr.jsx)(sr.Suspense,{fallback:null,children:(0,lr.jsx)(NT,{})}),(0,lr.jsx)(Mh.zs,{}),(0,lr.jsx)(df,{}),(0,lr.jsx)(wf,{}),(0,lr.jsx)(bu,{}),d&&(0,lr.jsx)(Wm,{}),(0,lr.jsx)(Vm,{}),(0,lr.jsx)(zA.K,{languageSelectionModalRef:R}),(0,lr.jsx)(Am,{}),(0,lr.jsx)(kv,{}),(0,lr.jsx)(gv,{}),(0,lr.jsx)(nf,{}),(0,lr.jsx)(Qu,{}),(0,lr.jsx)(XT.h,{}),(0,lr.jsx)(KD.U,{}),(0,lr.jsx)(BA,{}),(0,lr.jsx)(dR,{}),(0,lr.jsx)(wg,{}),n.trackCreditsModal.isOpen&&(0,lr.jsx)(mp,{}),(0,lr.jsx)("div",{ref:R}),(0,lr.jsx)(Xs.L,{onError:e=>{s(),(0,Ls.vK)(e,"FullscreenMode")},children:(0,lr.jsx)(jh,{videoRef:T})})]}),(0,lr.jsx)(hp,{})]})},KL=function({children:e}){const t=(0,Qr.s0)(),n=(0,Qr.TH)(),i=(0,$s.I0)(),a=(0,el.tc)(),{accessToken:s,isAnonymous:r}=(0,$s.v9)((e=>e.session)),o=(0,$s.v9)((e=>e.ui)),l=(0,sr.useContext)(m.r$),d=(0,$s.v9)((e=>e.platform.isDesktop?e.ads.root.adsEnabled:!!e.session.productState&&1===parseInt(e.session.productState.ads,10))),c=(0,$s.v9)((e=>!!e.ads.billboard&&e.ads.billboard.isMinimized)),{isBrowser:u,isDesktop:p,isDeveloperMode:g,isVideoSupported:h}=(0,$s.v9)((e=>e.platform)),k=o.errorPage.isError,v=o.errorPage.name,f=!!s;return(0,sr.useEffect)((()=>{i(Qs.Oy())}),[i]),(0,sr.useEffect)((()=>{l.notifyViewLoaded(n.pathname)}),[l,n.pathname]),(0,sr.useEffect)((()=>{nu({locationSearch:n.search,navigate:t,logDialog:()=>{a.getEventSender().send(tu({os:(0,Y.y)()}))},showDialog:()=>{i(Qs.D8())}})}),[i,n.search,t,a]),(0,sr.useEffect)((()=>{Zc({isPremiumUser:!1,locationSearch:n.search,navigate:t,logNavigation:()=>a.getEventSender().send((0,Yc.t)({category:"open",action:"pageview",label:"login",destination_url:"open.spotify.com",os:(0,Y.y)()})),showDialog:()=>{i(Qs.HU())}})})),k?(0,lr.jsx)(cu,{errorName:v}):(0,lr.jsx)(m.r$.Consumer,{children:t=>(0,lr.jsx)(zL,{billboardMinimized:c,isVideoSupported:h,onReachUsableState:e=>{t.notifyUsableStateReached(e)},accessTokenIsSet:f,ui:o,onClose:()=>{i(Qs.lW())},onBrowserNotSupported:e=>{i(Qs.Id(e))},onCloseFullscreenMode:()=>{i(Qs.oH())},isBrowser:u,isDesktop:p,isAnonymous:r,isDeveloperMode:g,adsEnabled:d,children:e})})};var YL=n(47792),qL=n(50042);const ZL="auth_redirect";function QL(e,t){return t?`spotify:playlist-format:${e}:${t}`:`spotify:playlist-format:${e}`}const JL={uri:null,error:null};function $L(e,t){switch(t.type){case"SUCCESS":return{...e,uri:t.uri};case"FAILURE":return{...e,error:t.error};default:throw new Error}}const XL=({isAnonymous:e,playlistFormatURI:t})=>{const n=(0,sr.useContext)(Dc.ZF),[i,a]=(0,sr.useReducer)($L,JL);if((0,sr.useEffect)((()=>{e&&window.location.hash!==`#${ZL}`?(window.location.hash=ZL,(0,Fs.h$)()):n.resolvePlaylistFormatURI(t).then((e=>a({type:"SUCCESS",uri:e}))).catch((e=>a({type:"FAILURE",error:e})))}),[n,e,t,a]),null!==i.uri){const e=(s=i.uri,(0,c.EC)(s).id);return(0,lr.jsx)(qL.InstrumentedRedirect,{to:`/playlist/${e}`})}var s;return(0,lr.jsx)(Kc.h,{hasError:null!==i.error,errorMessage:u.ag.get("error.not_found.title.playlist"),timeoutInMs:5e3})},eF=sr.memo((function({isAnonymous:e}){const{title:t="",category:n}=(0,Qr.UO)();return(0,lr.jsx)(XL,{isAnonymous:e,playlistFormatURI:QL(t,n)})}));var tF=n(70304),nF=n(87468),iF=n(14556);const aF=(0,sr.lazy)((()=>n.e(8059).then(n.bind(n,73400))));var sF=n(88294);const rF=(0,sr.lazy)((()=>n.e(6923).then(n.bind(n,27848))));function oF(e){const{isShowSponsorsEnabled:t}={isShowSponsorsEnabled:(0,Xo.W6)(Ns.$f)};return{allShowSponsorsRoute:t?(0,lr.jsx)(Qr.AW,{path:(0,sF.D)(tF.j),element:(0,lr.jsx)(rF,{...e})},"all-show-sponsors"):null}}function lF(){const e=(0,Qr.TH)(),t=`/${(0,Qr.UO)()["*"]??""}${e.search}`,n=e.pathname+e.search;return(0,lr.jsx)(Qr.Fg,{to:t===n?`/${e.search}`:t,replace:!0})}var dF=n(78195),cF=n(48178);const uF=()=>{const e=(0,Qr.UO)().playlistId||"",t=(0,$s.v9)(dF.v);return t?(0,lr.jsx)("div",{className:"contentSpacing",children:(0,lr.jsx)(cF.Z,{leavebehinds:t.slice(0,8),playlistId:e})}):null},mF=(0,sr.lazy)((()=>n.e(9540).then(n.bind(n,25678)).then((e=>({default:e.AlbumPrerelease})))));var pF=n(2106);const gF=e=>(0,lr.jsx)(pF.K,{pageId:YL.Wg.PRERELEASE,children:e}),hF=()=>{const{id:e}=(0,Qr.UO)();if(!e)return gF((0,lr.jsx)(Kc.h,{hasError:!0,errorMessage:u.ag.get("error.not_found.title.album")}));const t=(0,c.vo)(e);return gF((0,lr.jsx)(mF,{uri:t.toString()},e))},kF=()=>(0,Xo.W6)(Ns.eQ,{loadingValue:!1})?(0,lr.jsx)(Qr.AW,{path:"/prerelease/:id",element:(0,lr.jsx)(hF,{})},"album-prerelease"):(0,lr.jsx)(Qr.AW,{path:"/prerelease/:id",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/"})},"album-prerelease");var vF=n(18277);const fF=e=>`spotify:cultural-moment:hub:${e}`,yF=sr.lazy((()=>Promise.all([n.e(1814),n.e(8677),n.e(8420)]).then(n.bind(n,52642)))),SF=e=>{const{id:t=""}=(0,Qr.UO)();return(0,lr.jsx)(yF,{uri:fF(t),id:t,...e})},bF=(0,sr.lazy)((()=>Promise.all([n.e(1814),n.e(9694)]).then(n.bind(n,60130)))),_F=(0,sr.lazy)((()=>n.e(1997).then(n.bind(n,40479)))),NF=(0,sr.lazy)((()=>Promise.all([n.e(1814),n.e(8677),n.e(3935),n.e(7704)]).then(n.bind(n,81958)))),EF=(0,sr.lazy)((()=>Promise.all([n.e(1814),n.e(8677),n.e(3935),n.e(5070)]).then(n.bind(n,67273)))),xF=()=>{const{sectionId:e}=(0,Qr.UO)();return(0,lr.jsx)(EF,{uri:`spotify:section:${e}`})},CF=({isDesktop:e,isPremium:t,isOffline:n})=>(0,lr.jsxs)(lr.Fragment,{children:[(0,lr.jsx)(NO,{}),e&&(0,lr.jsx)(bF,{}),e&&t&&n&&(0,lr.jsx)(_F,{}),!n&&(0,lr.jsx)(NF,{})]});var wF=n(49666),IF=n(28133);const TF=sr.lazy((()=>Promise.all([n.e(1814),n.e(2342)]).then(n.bind(n,58566)))),AF=sr.lazy((()=>Promise.resolve().then(n.bind(n,16761)))),PF=sr.lazy((()=>Promise.all([n.e(8549),n.e(730)]).then(n.bind(n,41039)))),OF=sr.lazy((()=>Promise.all([n.e(1814),n.e(8549),n.e(4179)]).then(n.bind(n,89600)))),DF=sr.lazy((()=>Promise.all([n.e(1814),n.e(2499)]).then(n.bind(n,75811)))),RF=sr.lazy((()=>Promise.all([n.e(1814),n.e(708)]).then(n.bind(n,34016)))),LF=sr.lazy((()=>Promise.all([n.e(1814),n.e(7521)]).then(n.bind(n,85015)))),FF=sr.lazy((()=>Promise.all([n.e(1814),n.e(7288)]).then(n.bind(n,64554)))),jF=sr.lazy((()=>Promise.all([n.e(1814),n.e(8387)]).then(n.bind(n,74262)))),MF=sr.lazy((()=>Promise.all([n.e(1814),n.e(6309)]).then(n.bind(n,68940)))),UF=sr.lazy((()=>Promise.all([n.e(1814),n.e(9421),n.e(7553)]).then(n.bind(n,82620)))),BF=sr.lazy((()=>Promise.all([n.e(1814),n.e(4126),n.e(1289)]).then(n.bind(n,68738)))),VF=sr.lazy((()=>Promise.all([n.e(1814),n.e(7379)]).then(n.bind(n,72402)))),HF=sr.lazy((()=>Promise.all([n.e(1814),n.e(5835)]).then(n.bind(n,47698)))),GF=sr.lazy((()=>Promise.all([n.e(1814),n.e(8677),n.e(4126),n.e(3706),n.e(2219)]).then(n.bind(n,29415)))),WF=sr.lazy((()=>Promise.all([n.e(1814),n.e(8677),n.e(3706),n.e(8785)]).then(n.bind(n,53467)))),zF=sr.lazy((()=>Promise.all([n.e(1814),n.e(9421),n.e(3878)]).then(n.bind(n,54191)))),KF=sr.lazy((()=>n.e(7985).then(n.bind(n,10920)))),YF=sr.lazy((()=>Promise.resolve().then(n.bind(n,49666)))),qF=sr.lazy((()=>Promise.all([n.e(1814),n.e(8677),n.e(6450)]).then(n.bind(n,34795)))),ZF=sr.lazy((()=>n.e(9124).then(n.bind(n,88627)))),QF=sr.lazy((()=>Promise.all([n.e(1814),n.e(4126),n.e(5647),n.e(5713)]).then(n.bind(n,67484)))),JF=sr.lazy((()=>Promise.all([n.e(1814),n.e(5647),n.e(3472)]).then(n.bind(n,17264)))),$F=sr.lazy((()=>n.e(6008).then(n.bind(n,17001)))),XF=sr.lazy((()=>n.e(6658).then(n.bind(n,37993)))),ej=sr.lazy((()=>n.e(6025).then(n.bind(n,57421)))),tj=sr.lazy((()=>Promise.resolve().then(n.bind(n,23202)))),nj=sr.lazy((()=>Promise.all([n.e(1814),n.e(8123)]).then(n.bind(n,57583)))),ij=sr.lazy((()=>Promise.all([n.e(1814),n.e(8123)]).then(n.bind(n,90716)))),aj=sr.lazy((()=>n.e(4570).then(n.bind(n,32887)))),sj=sr.lazy((()=>n.e(5525).then(n.bind(n,21072)))),rj=sr.lazy((()=>Promise.all([n.e(1814),n.e(4868)]).then(n.bind(n,75613)))),oj=e=>{const{viewId:t=""}=(0,Qr.UO)(),n=(0,vF.Xh)(t);return t===wF.RECENTLY_PLAYED_VIEW_ID?(0,lr.jsx)(YF,{...e,showAll:!0}):n?(0,lr.jsx)(vF.w2,{id:t}):(0,lr.jsx)(qF,{viewId:t})},lj=()=>{const e=(0,wc.u)();return(0,lr.jsxs)(Qr.Z5,{children:[(0,lr.jsx)(Qr.AW,{path:"tracks",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.COLLECTION_SONGS,children:(0,lr.jsx)(UF,{})})}),(0,lr.jsx)(Qr.AW,{path:"episodes",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.COLLECTION_PODCASTS_EPISODES,children:(0,lr.jsx)(BF,{})})}),(0,lr.jsx)(Qr.AW,{path:"your-episodes",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.COLLECTION_PODCASTS_EPISODES,children:(0,lr.jsx)(BF,{})})}),e.canFetchAllTracks&&(0,lr.jsx)(Qr.AW,{path:"local-files",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.LOCALFILES,children:(0,lr.jsx)(VF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/*",element:(0,lr.jsx)(pF.K,{navigationalRoot:Fy.U.COLLECTION,children:(0,lr.jsx)(MF,{})})})]})},dj=e=>{const{playlistId:t}=(0,Qr.UO)();return(0,sr.createElement)(zF,{...e,key:t})},cj=e=>{const{artistId:t}=(0,Qr.UO)();return(0,sr.createElement)(AF,{...e,key:t})},uj=e=>{const{albumId:t}=(0,Qr.UO)();return(0,sr.createElement)(TF,{...e,key:t})},mj=()=>{const e=(0,Qr.TH)(),t=(0,$s.v9)((e=>e.features.enableShows)),{isDesktop:n,isBrowser:i}=(0,$s.v9)((e=>e.platform)),a=u.ag.getUrlLocale(),s=(0,$s.v9)((e=>e.features.enableI18nLocales)),r=(0,hy.S9)({localeFeatureFlag:Boolean(s),urlLocale:a,type:"locale"}),{isAnonymous:o,productState:l}=(0,$s.v9)(hu.Gg),d="premium"===l?.product,c=!(0,gg.k)();(0,IF.a)();const{allEpisodeSponsorsRoute:m}=function(e={}){return{allEpisodeSponsorsRoute:(0,iF.m)()?(0,lr.jsx)(Qr.AW,{path:(0,nF.e)(tF.yO),element:(0,lr.jsx)(aF,{...e})},"all-episode-sponsors"):null}}(),{allShowSponsorsRoute:p}=oF(),g=(({isDesktop:e,isPremium:t,isOffline:n,withSEOLocales:i})=>[(0,lr.jsx)(Qr.AW,{path:"/",element:(0,lr.jsx)(pF.K,{navigationalRoot:Fy.U.HOME,pageId:YL.Wg.HOME,entityUri:"spotify:app:home",children:(0,lr.jsx)(CF,{isDesktop:e,isPremium:t,isOffline:n})})},"home"),i?As.BK.map((i=>(0,lr.jsx)(Qr.AW,{path:`/${As.F0}${i}`,element:(0,lr.jsx)(pF.K,{navigationalRoot:Fy.U.HOME,pageId:YL.Wg.HOME,entityUri:"spotify:app:home",children:(0,lr.jsx)(CF,{isDesktop:e,isPremium:t,isOffline:n})})},"home-i18n"))):null,(0,lr.jsx)(Qr.AW,{path:"/section/:sectionId",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.HOME_DRILLDOWN,children:(0,lr.jsx)(xF,{})})},"home-section")])({isDesktop:n,isPremium:d,isOffline:c,withSEOLocales:r}),h=(0,_s.WM)(),k=[(0,lr.jsx)(Qr.AW,{path:"/cultural-moment/hub/:id",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.CULTURALMOMENTSHUB,children:(0,lr.jsx)(SF,{})})},"cultural-moment-hub")],v=kF();return(0,lr.jsxs)(Qr.Z5,{children:[(0,lr.jsx)(Qr.AW,{path:"/user/:userId/collection/your-episodes",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/collection/episodes"})}),(0,lr.jsx)(Qr.AW,{path:"/user/:userId/collection/album/:albumId",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/album/:albumId"})}),(0,lr.jsx)(Qr.AW,{path:"/user/:userId/collection/artist/:artistId",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/artist/:artistId/saved"})}),(0,lr.jsx)(Qr.AW,{path:"/user/:userId/playlist/:playlistId",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/playlist/:playlistId"})}),(0,lr.jsx)(Qr.AW,{path:"/browse/genres",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/genre/hub-browse-grid"})}),(0,lr.jsx)(Qr.AW,{path:"/browse/newreleases",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/genre/new-releases-page"})}),(0,lr.jsx)(Qr.AW,{path:"/browse/discover",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/genre/discover-page"})}),(0,lr.jsx)(Qr.AW,{path:"/browse/charts",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/genre/browse-charts-tab"})}),(0,lr.jsx)(Qr.AW,{path:"/browse/featured",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/"})}),(0,lr.jsx)(Qr.AW,{path:"/browse",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/"})}),(0,lr.jsx)(Qr.AW,{path:"/daily-mix-hub-page",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/genre/made-for-x-hub"})}),(0,lr.jsx)(Qr.AW,{path:"/made-for-you-page",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/genre/made-for-x-hub"})}),(0,lr.jsx)(Qr.AW,{path:"/made-for-you",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/genre/made-for-x-hub"})}),(0,lr.jsx)(Qr.AW,{path:"/internal/recs/playlist/:playlistId",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/playlist/:playlistId"})}),(0,lr.jsx)(Qr.AW,{path:"/settings",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/"})}),o?[(0,lr.jsx)(Qr.AW,{path:"/collection/*",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/"})},"collection-redirect"),(0,lr.jsx)(Qr.AW,{path:"/genre/made-for-x-hub",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/"})},"made-for-you-redirect")]:[(0,lr.jsx)(Qr.AW,{path:"/collection",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/collection/playlists"})},"collection-redirect")],g,h,k,v,(0,lr.jsx)(Qr.AW,{path:"/user/:userId/collection",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:{search:e.search,pathname:"/collection/tracks"}})}),(0,lr.jsx)(Qr.AW,{path:"/search/*",element:(0,lr.jsx)(pF.K,{navigationalRoot:Fy.U.SEARCH,children:(0,lr.jsx)(GF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/recent-searches",element:(0,lr.jsx)(pF.K,{navigationalRoot:Fy.U.SEARCH,pageId:YL.Wg.SEARCH_RECENT,children:(0,lr.jsx)(WF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/collection/*",element:(0,lr.jsx)(pF.K,{children:(0,lr.jsx)(lj,{})})}),(0,lr.jsx)(Qr.AW,{path:"/artist/:artistId/*",element:(0,lr.jsx)(pF.K,{children:(0,lr.jsx)(cj,{})})}),(0,lr.jsx)(Qr.AW,{path:"/album/:albumId/*",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.ALBUM,children:(0,lr.jsx)(uj,{})})}),(0,lr.jsx)(Qr.AW,{path:"/playlist-format/:title",element:(0,lr.jsx)(pF.K,{children:(0,lr.jsx)(eF,{isAnonymous:o})})}),(0,lr.jsx)(Qr.AW,{path:"/playlist-format/:title/:category",element:(0,lr.jsx)(pF.K,{children:(0,lr.jsx)(eF,{isAnonymous:o})})}),(0,lr.jsx)(Qr.AW,{path:"/track/:trackId/*",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.TRACK,children:i?(0,lr.jsx)(OF,{}):(0,lr.jsx)(PF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/playlist/:playlistId/see-all-ads",element:(0,lr.jsx)(uF,{})}),(0,lr.jsx)(Qr.AW,{path:"/playlist/:playlistId/*",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.PLAYLIST,children:(0,lr.jsx)(dj,{})})}),(0,lr.jsx)(Qr.AW,{path:"/user/:username/folder/:folderId",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/folder/:folderId"})}),(0,lr.jsx)(Qr.AW,{path:"/folder/:folderId/*",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.COLLECTION_FOLDER,children:(0,lr.jsx)(ZF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/user/:userId/*",element:(0,lr.jsx)(pF.K,{children:(0,lr.jsx)(DF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/genre/corona_news_podcasts",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/genre/corona_news_podcasts-page"})}),(0,lr.jsx)(Qr.AW,{path:"/genre/:viewId",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.GENRE,children:(0,lr.jsx)(oj,{})})}),(0,lr.jsx)(Qr.AW,{path:"/view/:viewId",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.HOME_DRILLDOWN,children:(0,lr.jsx)(oj,{})})}),(0,lr.jsx)(Qr.AW,{path:"/concerts-page",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/concerts"})}),(0,lr.jsx)(Qr.AW,{path:"/concerts/location/:location",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.CONCERTS,children:(0,lr.jsx)(HF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/concerts",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.CONCERTS,children:(0,lr.jsx)(HF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/concert/:concertId",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.CONCERTS_CONCERT,children:(0,lr.jsx)(FF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/queue",element:(0,lr.jsx)(pF.K,{navigationalRoot:Fy.U.NOW_PLAYING_BAR,pageId:YL.Wg.NOWPLAYING_QUEUE,children:(0,lr.jsx)(LF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/history",element:(0,lr.jsx)(pF.K,{navigationalRoot:Fy.U.NOW_PLAYING_BAR,pageId:YL.Wg.NOWPLAYING_HISTORY,children:(0,lr.jsx)(RF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/download",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.DOWNLOAD_DESKTOP,children:(0,lr.jsx)(jF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/lyrics",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.LYRICS,children:(0,lr.jsx)(ej,{format:"fullscreen"})})}),(0,lr.jsx)(Qr.AW,{path:"/preferences",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.SETTINGS,navigationalRoot:Fy.U.SETTINGS,children:(0,lr.jsx)($F,{})})}),(0,lr.jsx)(Qr.AW,{path:"/premium",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.PREMIUM,entityUri:"spotify:app:premium",children:(0,lr.jsx)(rj,{})})}),(0,lr.jsx)(Qr.AW,{path:"/radio/:entity/:id",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/station/:entity/:id"})}),(0,lr.jsx)(Qr.AW,{path:"/station/:entity/:id",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.RADIO_STATION,children:(0,lr.jsx)(tj,{})})}),(0,lr.jsx)(Qr.AW,{path:"/new/playlist",element:(0,lr.jsx)(pF.K,{children:(0,lr.jsx)(KF,{})})}),(0,lr.jsx)(Qr.AW,{path:"/blend/taste-match/:invitationId",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.BLEND_TASTE_MATCH,children:(0,lr.jsx)(nj,{})})}),(0,lr.jsx)(Qr.AW,{path:"/blend/invitation",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.BLEND_INVITATION,children:(0,lr.jsx)(ij,{})})}),(0,lr.jsx)(Qr.AW,{path:"/_pong",element:(0,lr.jsx)(sj,{})}),(0,lr.jsx)(Qr.AW,{path:"/blend/invitation-page",element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.BLEND_INVITATION,children:(0,lr.jsx)(ij,{})})}),(0,lr.jsx)(Qr.AW,{path:"/blend/ci/:playlistId",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/playlist/:playlistId"})}),(0,lr.jsx)(Qr.AW,{path:"/blend/party/:id",element:(0,lr.jsx)(aj,{})}),(0,lr.jsx)(Qr.AW,{path:"/__noul__",element:(0,lr.jsx)(lF,{})}),(0,lr.jsx)(Qr.AW,{path:"/__noul__/*",element:(0,lr.jsx)(lF,{})}),t?[(0,lr.jsx)(Qr.AW,{path:"/browse/podcasts",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/genre/podcasts-web"})},"podcasts"),p,(0,lr.jsx)(Qr.AW,{path:tF.i$,element:(0,lr.jsx)(QF,{})},tF.i$),m,(0,lr.jsx)(Qr.AW,{path:tF.yB,element:(0,lr.jsx)(JF,{})},"episode")]:[(0,lr.jsx)(Qr.AW,{path:"/browse/podcasts",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/"})},"podcasts"),(0,lr.jsx)(Qr.AW,{path:"/show/*",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/"})},"show"),(0,lr.jsx)(Qr.AW,{path:"/episode/*",element:(0,lr.jsx)(qL.InstrumentedRedirect,{to:"/"})},"episode")],As.BK.map((e=>((e,t)=>[(0,lr.jsx)(Qr.AW,{path:`/${As.F0}${t}/track/:trackId`,element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.TRACK,children:e?(0,lr.jsx)(OF,{}):(0,lr.jsx)(PF,{})})},"locale_track"),(0,lr.jsx)(Qr.AW,{path:`/${As.F0}${t}/artist/:artistId/*`,element:(0,lr.jsx)(pF.K,{children:(0,lr.jsx)(cj,{})})},"locale_artist"),(0,lr.jsx)(Qr.AW,{path:`/${As.F0}${t}/album/:albumId`,element:(0,lr.jsx)(pF.K,{pageId:YL.Wg.ALBUM,children:(0,lr.jsx)(TF,{})})},"locale_album")])(i,e))),(0,lr.jsx)(Qr.AW,{path:"/debug/locales",element:(0,lr.jsx)(XF,{})}),!1]})},pj=(0,sr.memo)((function(){return(0,lr.jsx)(KL,{children:(0,lr.jsx)(sr.Suspense,{fallback:(0,lr.jsx)(Kc.h,{hasError:!1,errorMessage:"",loadOffline:(0,p.wW)()}),children:(0,lr.jsx)(mj,{})})})})),gj=({store:e,platform:t})=>{const n=new Js.QueryClient({defaultOptions:{queries:{notifyOnChangeProps:"tracked"}}}),i=[(0,lr.jsx)(_r.WU,{}),(0,lr.jsx)(Nr,{queryClient:n}),(0,lr.jsx)(ar.VG,{}),(0,lr.jsx)(Ur.IW,{}),(0,lr.jsx)(gr,{}),(0,lr.jsx)(lo.y2,{}),(0,lr.jsx)(ro.ME,{}),(0,lr.jsx)(nr.tS,{}),(0,lr.jsx)(br.du,{}),(0,lr.jsx)(xr.ye,{}),(0,lr.jsx)(Er.m9,{}),(0,lr.jsx)(ir.M,{}),(0,lr.jsx)(er.L,{}),(0,lr.jsx)(tr.F,{})];return(0,lr.jsx)(zc,{history:t.getHistory(),children:(0,lr.jsx)(Xs.L,{onError:e=>(0,Ls.vK)(e,"App"),FallbackComponent:Mr,children:(0,lr.jsx)($s.zt,{store:e,children:(0,lr.jsxs)(Wc,{platform:t,children:[(0,lr.jsx)(io,{eventSender:t.getEventSender()}),(0,lr.jsxs)(Bc,{providers:i,children:[(0,lr.jsx)(Wr,{}),(0,lr.jsx)(Sr,{}),(0,lr.jsx)(oo,{apiInstance:t.getRecaptchaLoggerAPI()}),(0,lr.jsx)(pj,{}),(0,lr.jsx)(Jd,{})]})]})})})})},hj={pop:"POP",push:"PUSH",replace:"REPLACE"};function kj(e,t){const n=[];let i=0;return n.push(e.location),e.listen(((e,a)=>{a===hj.push&&(i+=1,n.splice(i),n.push(e)),a===hj.pop&&(i=n.findIndex((t=>t.key===e.key))),a===hj.replace&&n.splice(i,1,e),t(vj(i,n))})),t(vj(i,n)),function(e){if(e.isBrowserBlockerApplied)return;e.isBrowserBlockerApplied=!0;let t="";e.block(((e,n)=>{const i=e.pathname+e.search+e.hash;if(n===hj.push&&t===i)return!1;t=i}))}(e),e}function vj(e,t){return{canGoBack:e>0,canGoForward:e{const t=window.matchMedia("(display-mode: standalone)");t.addEventListener?t.addEventListener("change",(t=>e(t.matches))):t.addListener((t=>e(t.matches)))},yj=(e,t,n)=>{e&&e.mediaSession&&t&&n&&(e.mediaSession.setActionHandler("previoustrack",(()=>n.skipToPrevious())),e.mediaSession.setActionHandler("nexttrack",(()=>n.skipToNext())),e.mediaSession.setActionHandler("play",(()=>n.resume())),e.mediaSession.setActionHandler("pause",(()=>n.pause())))},Sj=e=>{window?.performance?.mark&&e&&window.performance.mark(e)},bj=(e,t,n)=>window?.performance?.measure&&window?.performance?.getEntriesByName&&e&&t&&n?(window.performance.measure(n,e,t),window.performance.getEntriesByName(n)):[];var _j=n(44385),Nj=n(60874);const Ej=e=>!(e.type===QP.PLAY||e.type===QP.PLAYING),xj=e=>!(e.type===QP.PLAY||e.type===QP.USER_INVESTMENT),Cj=e=>t=>n=>i=>{const a=n(i);switch(i.type){case qP:{const{storeAction:t,actionIntent:n}=i;e.storeAction((e=>((e,t)=>{const{type:n}=t;switch(n){case QP.PLAY:return[t];case QP.PLAYING:return[...e.filter(Ej),t];case QP.USER_INVESTMENT:return[...e.filter(xj),t];default:return[t]}})(e,{storeAction:t,type:n})));break}case ZP:{const n=e.pullAction()||null;t.dispatch({type:"PLAY_AT_FIRST_TAP_HAD_DEFERRED_ACTIONS",had:!!n&&n.length>0}),n&&n.forEach((({storeAction:e})=>{t.dispatch(e)}));break}}return a};var wj=n(31715),Ij=n(10427);const Tj="ui.hide_hpto";class Aj{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=Tj;return this.prefs.sub({key:t},(({entries:n})=>e({[t]:!!n[t].bool})))}async hideHpto(){const e=Tj;await this.prefs.set({entries:{[e]:{bool:!0}}})}}class Pj{requestPreviewAd(){return Promise.resolve({})}subscribeToAdsProductState(){return{cancel:()=>{}}}subscribeToPremiumState(){return{cancel:()=>{}}}subscribeToHpto(){return{cancel:()=>{}}}async hideHpto(){}fakeSubscribe(e,t){e(t)}}const Oj={subscription:void 0};function Dj(e){const t=e?.item??void 0;return(0,he.iw)(t)?"audio"===t.mediaType||"mixed"===t.mediaType:!!(0,he.k6)(t)&&t.isPodcastAd}const Rj="SET_AUDIO_AD_INFO",Lj=e=>({type:Rj,info:e});var Fj=n(89606);function jj(e,t){return t?{enableAudioIfNotAlreadyEnabled(){if(!t.getEnabled())return t.enable((t=>e.dispatch(Lj(t))))},disableAudioIfNotAlreadyDisabled(){if(t.getEnabled())return t.disable()}}:{}}function Mj(e,t,n){const i=t.getEvents();return(0,p.wW)()&&i.addListener(ae.r.VOLUME,(({data:{volume:e,isLocal:t}})=>{t&&Fj.gN.logAudioVolume(e)})),t=>{const{enableAudioIfNotAlreadyEnabled:i,disableAudioIfNotAlreadyDisabled:a}=jj(t,e);return t=>async s=>{const r=t(s);switch(s.type){case tv.Hp.ADS_ENABLED:i?.();break;case tv.Hp.ADS_DISABLED:a?.();break;case tv.Hp.LOG_NOW_PLAYING_AD_CLICK:gm(n.getState())&&e.logClick()}return r}}}const Uj=(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()}}},Bj=(e,t)=>{e.getState().ads.vto.isMinimized||(e.dispatch((0,uk.w9)()),t.logEvent(pk.W9.COLLAPSED))};function Vj(e,t,n){return n?{enableVideoTakeoverIfNotAlreadyEnabled(){if(n.getEnabled())return;const i={onCreated(){e.dispatch((0,uk.hX)())},onInfo(t){e.dispatch((0,uk.SY)(t))},onFirstReady(){Uj(e.getState(),t.getState())},onStarted(){},onEnded:()=>{e.dispatch((0,uk.SY)(null)),e.dispatch((0,uk.Vb)())}};return n.enable(i)},disableVideoTakeoverIfNotAlreadyDisabled(){if(n.getEnabled())return n.disable()}}:{}}const Hj=(e,t)=>n=>{const{enableVideoTakeoverIfNotAlreadyEnabled:i,disableVideoTakeoverIfNotAlreadyDisabled:a}=Vj(n,t,e);return s=>async r=>{const o=s(r);switch(r.type){case tv.Hp.ADS_ENABLED:await(i?.());break;case tv.Hp.ADS_DISABLED:await(a?.());break;case uk.Hp.VTO_LOG_EVENT:e.logEvent(r.event,r.eventReason),r.event===pk.W9.CLICKED&&Bj(n,e);break;case tv.Hp.LOG_NOW_PLAYING_AD_CLICK:pm(t.getState())&&(e.logEvent(pk.W9.CLICKED,r.eventReason),Bj(n,e));break;case uk.Hp.VTO_NAVIGATION_CHANGE:Bj(n,e);break;case uk.Hp.MAXIMIZE_VIDEO_AD_VIEW:case uk.Hp.MINIMIZE_VIDEO_AD_VIEW:Uj(n.getState(),t.getState())}return o}};function Gj({store:e,adManagers:t,isDesktop:n,playerAPI:i}){return function({adsEnabled:a=e.getState().ads.root.adsEnabled,playerState:s=i.getState(),isPodcastContent:r=Dj(s)}={}){a!==e.getState().ads.root.adsEnabled&&e.dispatch((a?tv.jj:tv.Iq)());const{enableVideoTakeoverIfNotAlreadyEnabled:o,disableVideoTakeoverIfNotAlreadyDisabled:l}=Vj(e,i,t?.vto.manager),{enableAudioIfNotAlreadyEnabled:d,disableAudioIfNotAlreadyDisabled:c}=jj(e,t?.audio);return Promise.all(n&&(r||a)?[o?.(),d?.()]:[l?.(),c?.()])}}var Wj=n(68762),zj=n(25097),Kj=n(462);const Yj=({history:e,blockedPaths:t,rootApi:n,adManagers:i,isDesktop:a,playerAPI:s})=>r=>{const{handleAdsProductState:o,activateAdsProductStateSubscription:l}=function({rootApi:e,store:t,adManagers:n,isDesktop:i,playerAPI:a,toggleAdManagers:s=Gj({store:t,adManagers:n,isDesktop:i,playerAPI:a})}){async function r({playerState:e=a.getState(),isPodcastContent:t=Dj(e)}={}){return await s({playerState:e,isPodcastContent:t}),function(...[{ads:n}]){return s({adsEnabled:"1"===n,playerState:e,isPodcastContent:t})}}let o=Dj(a.getState());return{handleAdsProductState:r,activateAdsProductStateSubscription:async function(t){const n=Dj(t);return null===t||o!==n?(o=n,Oj.subscription?.cancel(),Oj.subscription=e.subscribeToAdsProductState(await r({playerState:t,isPodcastContent:n}))):Oj.subscription}}}({rootApi:n,store:r,adManagers:i,isDesktop:a,playerAPI:s});return s.getEvents().addListener(ke.rg.UPDATE,(async({data:e})=>{await l(e)})),i=>async a=>{switch(a.type){case Ku.VX:await l(null);break;case Wj.e:n.fakeSubscribe(await o(),a.data)}const d=i(a),c=r.getState();if(!c.ads.root.adsEnabled)return d;const u=c.platform.isDesktop,m=u&&c.ads.billboard.isOpen,p=c.ads.sponsoredPlaylist.isVisible,g=t.includes(e.location.pathname),h=c.ads.leaderboard.isEnabled,k=c.ui.videoPlayer.mode===Yg.B.cinema;switch(g||mm(s.getState())?(m&&r.dispatch(cm()),h&&r.dispatch($h())):!u||h||m||p||k||r.dispatch({type:Qh}),a.type){case mk.Iq.SET_VIDEO_MODE:a.mode===Yg.B.cinema&&r.dispatch($h());break;case nm:r.dispatch($h());break;case Kj.hk:r.dispatch($h()),r.dispatch(cm());break;case zj.Hp.HPTO_PREVIEW_HOME_NAVIGATION:"/"===e.location.pathname||e.push("/");break}return d}};var qj=n(50538);let Zj,Qj;const Jj=({rootApi:e})=>t=>n=>async i=>{const a=n(i);switch(i.type){case Ku.VX:(0,p.ZO)()===g.W.Desktop&&(0,qj.f)({_debugForceRefreshHpto:()=>t.dispatch((0,zj.kH)()),overrideSponsoredPlaylistEndpoint:()=>t.dispatch((0,Kj.z8)())}),Zj||(Zj=e.subscribeToPremiumState((async({catalogue:e})=>{const n="premium"===e;t.dispatch((0,tv.tv)(n))}))),Qj||(Qj=e.subscribeToHpto((e=>t.dispatch((0,tv.Ru)(e["ui.hide_hpto"])))));break;case tv.Hp.ADS_POST_HIDE_HPTO:e.hideHpto();break;case Wj.e:e.fakeSubscribe((async({catalogue:e})=>{const n="premium"===e;t.dispatch((0,tv.tv)(n)),t.dispatch((0,tv.Ru)(!1))}),i.data);break;case tv.Hp.TRIGGER_PREVIEW_AD:e.requestPreviewAd(i.adUriHexId)}return a},$j=(e,t,n)=>i=>a=>async s=>{const r=a(s);switch(s.type){case tv.Hp.ADS_ENABLED:{const a={create:e=>{i.dispatch((e=>({type:nm,data:e}))(e))},canShow:()=>{const e=n.getState();return!("/"===t.location.pathname)&&!(0,Lg.CM)(e)&&!mm(e)},isActive:()=>i.getState().ads.billboard.isOpen,minimize:()=>{i.dispatch({type:lm})},destroy:()=>(i.dispatch(um()),Promise.resolve())};await e.enable(a);break}case tv.Hp.ADS_DISABLED:await e.disable();break;case am:if(i.getState().ads.sponsoredPlaylist.isVisible)return i.dispatch(um()),Promise.resolve();e.minimize();break;case sm:e.adClick();break;case rm:e.onRender();break;case om:e.onError();break;case dm:e.onFinish()}return r};var Xj=n(24558);const eM=(e,t,n,i,a)=>{const s=e?new Aj(Fj.gN,(0,wj.makePrefs)((0,Ij.G)())):new Pj,r=e?["/"]:[];return[Jj({rootApi:s}),(d=n.sponsoredPlaylist,e=>t=>async n=>{const i=t(n);switch(n.type){case tv.Hp.ADS_ENABLED:d.enable((t=>{e.dispatch((0,Kj.uE)(t))}));break;case tv.Hp.ADS_DISABLED:d.disable();break;case Kj.jY:try{const t=await d.requestSponsoredPlaylists();e.dispatch((0,Kj.iN)(t))}catch(t){e.dispatch((0,Kj.Pu)(t instanceof Error?t:new Error("Unknown error object")))}break;case Kj.Gi:try{const t=n.playlistUri,i=await d.requestSponsoredPlaylistAd(t);e.dispatch((0,Kj.Ot)(t,i))}catch(t){e.dispatch((0,Kj.Ud)(t instanceof Error?t:new Error("Unknown error object")))}break;case Kj.Kf:d.logEvent(n.message);break;case Kj.IP:e.dispatch((0,Kj.uE)(null))}return i}),Yj({history:t,blockedPaths:r,rootApi:s,adManagers:n,isDesktop:e,playerAPI:a}),...false?[(l=n.leaderboard,e=>e=>async t=>{const n=e(t);switch(t.type){case tv.Hp.ADS_ENABLED:break;case tv.Hp.ADS_DISABLED:case Jh:l.disableLeaderboard();break;case qh:l.setLeaderboardElement(t.element),l.enableLeaderboard();break;case Zh:l.onNavigationChanged()}return n}),$j(n.billboard,t,a),(o=n.hpto,e=>t=>async n=>{const i=t(n),a=e.getState();switch(n.type){case Ku.VX:o.subscribeToPreview((t=>{e.dispatch((0,zj.bo)(t)),e.dispatch((0,zj.dk)())})),o.onRefresh((async()=>{const t=await o.fetchTemplate();e.dispatch((0,zj.uE)(t)),e.dispatch((0,zj.lb)())}));break;case zj.Hp.HPTO_CONTAINER_MOUNTED:{const t=await o.fetchTemplate();e.dispatch((0,zj.uE)(t)),e.dispatch((0,zj.lb)());break}case zj.Hp.FETCH_CREATIVE:if(a.ads.hpto.preview)break;if(a.ads.hpto.creativeFetchingState===Xj.Y.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{e.dispatch((0,zj.Ir)()),await o.fetchCreative(a.ads.hpto.template).then((t=>{e.dispatch((0,zj._M)(t))}))}catch(t){console.error(t),e.dispatch((0,zj.yg)())}break;case zj.r1:o.viewRendered(n.element);break;case zj.Hp.HPTO_COMPONENT_NEW_AD_RENDERED:o.logViewed();break;case zj.Hp.HPTO_COMPONENT_UNMOUNTED:o.viewDestroyed();break;case tv.Hp.ADS_POST_HIDE_HPTO:o.logEvent("event_collapsed");break;case zj._G:o.logEvent(n.event,n.context);break;case zj.rt:o.logErrorEvent(n.error);break;case zj.Hp.DEBUG_FORCE_REFRESH_HPTO:{const t=await o.fetchTemplate();e.dispatch((0,zj.uE)(t)),e.dispatch((0,zj.lb)());break}}return i}),Mj(n.audio,i,a),Hj(n.vto.manager,a)]:[]];var o,l,d},tM={adsEnabled:!1,isPremium:!1,isHptoHidden:!0},nM=(e=tM,t)=>{switch(t.type){case tv.Hp.ADS_ENABLED:return{...e,adsEnabled:!1};case tv.Hp.ADS_DISABLED:return{...e,adsEnabled:!1};case tv.Hp.ADS_PREMIUM:return{...e,isPremium:!!t.isPremium};case tv.Hp.ADS_HPTO_HIDDEN:return{...e,isHptoHidden:!!t.isHptoHidden};default:return e}},iM={info:null},aM=(e=iM,t)=>t.type===Rj?{...e,info:t.info}:e,sM={isOpen:!1,imageLoaded:!1,isMinimized:!1,data:{}},rM=(e=sM,t)=>{switch(t.type){case nm:return{...e,isOpen:!0,data:t?.data};case im:return{...e,isOpen:!1,isMinimized:!1,imageLoaded:!1};case rm:return{...e,imageLoaded:!0};case lm:case am:return{...e,isMinimized:!0};default:return e}},oM={hptoEnabled:!1,template:null,creative:null,preview:null,creativeFetchingState:Xj.Y.NOT_FETCHING,hptoContainerMounted:!1,enableHptoLocationRefactor:!1,hptoIsStable:!0},lM=(e=oM,t)=>{switch(t.type){case tv.Hp.ADS_ENABLED:return{...e,hptoEnabled:!0};case zj.Hp.HPTO_CONTAINER_MOUNTED:return{...e,hptoContainerMounted:!0,enableHptoLocationRefactor:t.data.enableHptoLocationRefactor};case zj.Hp.HPTO_COMPONENT_UNMOUNTED:return{...e,preview:null,creativeFetchingState:Xj.Y.NOT_FETCHING,creative:t.data.clearCreative?null:e.creative};case zj.Hp.HPTO_CONTAINER_UNMOUNTED:return{...e,hptoContainerMounted:!1};case zj.Hp.GOT_TEMPLATE:return{...e,template:t.data};case zj.Hp.SET_HPTO_PREVIEW:return{...e,preview:t.data};case zj.Hp.GOT_CREATIVE:return{...e,creative:t.data,creativeFetchingState:Xj.Y.FETCHED,hptoIsStable:!0};case zj.Hp.FETCHING_CREATIVE:return{...e,creativeFetchingState:Xj.Y.FETCHING,creative:e.enableHptoLocationRefactor?null:e.creative};case zj.Hp.CREATIVE_FETCH_FAILED:return{...e,creativeFetchingState:Xj.Y.FAILED,hptoIsStable:!1};default:return e}},dM={isEnabled:!1};function cM(e=dM,t){switch(t.type){case Qh:return{...e,isEnabled:!0};case Jh:return{...e,isEnabled:!1};default:return e}}var uM=n(87810);let mM=function(e){return e.NOT_FETCHING="NOT_FETCHING",e.FETCHING="FETCHING",e.FETCHED="FETCHED",e.FAILED="FAILED",e}({});const pM={leavebehinds:[],fetchingState:mM.NOT_FETCHING},gM=(e=pM,t)=>{switch(t.type){case uM.Wi.FETCH_LEAVEBEHINDS:return{...e,leavebehinds:[],fetchingState:mM.FETCHING};case uM.Wi.UPDATE_LEAVEBEHINDS:return{...e,leavebehinds:t.data?t.data:[],fetchingState:mM.FETCHED};case uM.Wi.CLEAR_LEAVEBEHINDS:return{...e,leavebehinds:[],fetchingState:mM.NOT_FETCHING};case uM.Wi.ERROR_FETCHING_LEAVEBEHINDS:return{...e,leavebehinds:[],fetchingState:mM.FAILED};default:return e}},hM={sponsoredPlaylist:new Map,isVisible:!1,previewAd:null};function kM(e=hM,t){switch(t.type){case Kj.i7:return function(e,t){return{...e,sponsoredPlaylist:e.sponsoredPlaylist.set("",t.sponsorships)}}(e,t);case Kj.mr:return function(e,t){return{...e,sponsoredPlaylist:e.sponsoredPlaylist.set(t.playlistUri,t.ad)}}(e,t);case Kj.hk:return{...e,isVisible:!0};case Kj.IP:return{...e,isVisible:!1};case Kj.bQ:return{...e,previewAd:t.previewAd};default:return e}}const vM={isMinimized:!1,isHidden:!0,info:null},fM=(e=vM,t)=>{switch(t.type){case uk.Hp.MINIMIZE_VIDEO_AD_VIEW:return{...e,isMinimized:!0};case uk.Hp.MAXIMIZE_VIDEO_AD_VIEW:return{...e,isMinimized:!1};case uk.Hp.HIDE_VIDEO_AD_VIEW:return{...e,isHidden:!0};case uk.Hp.SHOW_VIDEO_AD_VIEW:return{...e,isHidden:!1};case uk.Hp.VTO_SET_INFO:return{...e,info:t.info};default:return e}},yM=e=>(0,_j.UY)({sponsoredPlaylist:kM,leaderboard:cM,root:nM,...e===g.W.Desktop?{billboard:rM,hpto:lM,vto:fM,audio:aM,musicLeavebehinds:gM}:{}});var SM=n(69036);const bM=JSON.parse('{"spotify:genre:browse-charts-tab":{"backgroundColor":"#8D67AB","imageURI":"https://charts-images.scdn.co/assets/locale_en/regional/weekly/region_global_default.jpg","page":"browse-charts-tab","uri":"spotify:genre:browse-charts-tab"},"spotify:concerts":{"backgroundColor":"#7358FF","imageURI":"https://concerts.spotifycdn.com/images/live-events_category-image.jpg","page":"concerts","uri":"spotify:concerts"},"spotify:genre:2018-page":{"backgroundColor":"#b49bc8","imageURI":"https://t.scdn.co/images/5f16ac10ba584516bc9dea719669b22d.jpeg","page":"2018-page","uri":"spotify:genre:2018-page"},"spotify:genre:2019-page":{"backgroundColor":"#f037a5","imageURI":"https://t.scdn.co/images/045289258446455ab2ca810385f38f77.jpeg","page":"2019-page","uri":"spotify:genre:2019-page"},"spotify:genre:afro-page":{"backgroundColor":"#AF2896","imageURI":"https://i.scdn.co/image/ab67706f0000000293c88c83bcb12b0800281074","page":"afro-page","uri":"spotify:genre:afro-page"},"spotify:genre:amplify-page":{"backgroundColor":"#eb1e32","imageURI":"https://t.scdn.co/images/541c4204fc3c4c2eb70a5fd433c1f778.jpeg","page":"amplify-page","uri":"spotify:genre:amplify-page"},"spotify:genre:arab-page":{"backgroundColor":"#0D73EC","imageURI":"https://i.scdn.co/image/ab67706f000000020c0c507103ed7577e21419f8","page":"arab-page","uri":"spotify:genre:arab-page"},"spotify:genre:arabic-page":{"backgroundColor":"#509bf5","imageURI":"https://t.scdn.co/images/47d9e28592b64a95a60bdbe9ae7fb2c8.jpeg","page":"arabic-page","uri":"spotify:genre:arabic-page"},"spotify:genre:artist_playlists-page":{"backgroundColor":"#1e3264","imageURI":"https://t.scdn.co/images/dbea9fc5c21648fe92ca4b1680f8281b.jpeg","page":"artist_playlists-page","uri":"spotify:genre:artist_playlists-page"},"spotify:genre:arts_entertainment_v2_podcast-page":{"backgroundColor":"#b49bc8","page":"arts_entertainment_v2_podcast-page","uri":"spotify:genre:arts_entertainment_v2_podcast-page"},"spotify:genre:audiobooks-page":{"backgroundColor":"#283ea3","imageURI":"https://t.scdn.co/images/d12a63c60f524516b892974cedac2a67.jpeg","page":"audiobooks-page","uri":"spotify:genre:audiobooks-page"},"spotify:genre:0JQ5DAqbMKFETqK4t8f1n3":{"backgroundColor":"#283ea3","imageURI":"https://i.scdn.co/image/ab67fb8200008e2cd7d76fc8a9096042a317ddb7","page":"0JQ5DAqbMKFETqK4t8f1n3","uri":"spotify:genre:0JQ5DAqbMKFETqK4t8f1n3"},"spotify:genre:blackhistorymonth-page":{"backgroundColor":"#f59b23","imageURI":"https://t.scdn.co/images/cfe7acd7b6624762af294483e0915275.jpeg","page":"blackhistorymonth-page","uri":"spotify:genre:blackhistorymonth-page"},"spotify:genre:blues-page":{"backgroundColor":"#1E3264","imageURI":"https://i.scdn.co/image/ab67706f0000000285c3e89f02770deb7691451c","page":"blues-page","uri":"spotify:genre:blues-page"},"spotify:genre:bollywood-page":{"backgroundColor":"#ff4632","imageURI":"https://t.scdn.co/images/29d2df7525b64ed49889c93d06c9e83b.jpeg","page":"bollywood-page","uri":"spotify:genre:bollywood-page"},"spotify:genre:brazilian-page":{"backgroundColor":"#ffc864","imageURI":"https://t.scdn.co/images/f0dd678dd57645159dc42c106e93b9ca.jpeg","page":"brazilian-page","uri":"spotify:genre:brazilian-page"},"spotify:genre:business_technology_v2_podcast-page":{"backgroundColor":"#ff4632","page":"business_technology_v2_podcast-page","uri":"spotify:genre:business_technology_v2_podcast-page"},"spotify:genre:cantopop-page":{"backgroundColor":"#b49bc8","imageURI":"https://t.scdn.co/images/20768b9d093d4e26aa1335e7a84a782d.jpeg","page":"cantopop-page","uri":"spotify:genre:cantopop-page"},"spotify:genre:chill-page":{"backgroundColor":"#477D95","imageURI":"https://i.scdn.co/image/ab67706f00000002c414e7daf34690c9f983f76e","page":"chill-page","uri":"spotify:genre:chill-page"},"spotify:genre:classical-page":{"backgroundColor":"#8D67AB","imageURI":"https://i.scdn.co/image/ab67706f000000023e0130fcd5d106f1402b4707","page":"classical-page","uri":"spotify:genre:classical-page"},"spotify:genre:colombian-page":{"backgroundColor":"#ff6437","imageURI":"https://t.scdn.co/images/1d06bf244b1943d6a3f3dd53086a9ac6.jpeg","page":"colombian-page","uri":"spotify:genre:colombian-page"},"spotify:genre:comedy-page":{"backgroundColor":"#f037a5","imageURI":"https://t.scdn.co/images/6ea6d5fe357f437ca579cb52c2120aec.jpeg","page":"comedy-page","uri":"spotify:genre:comedy-page"},"spotify:genre:comedy_v2_podcast-page":{"backgroundColor":"#af2896","page":"comedy_v2_podcast-page","uri":"spotify:genre:comedy_v2_podcast-page"},"spotify:genre:country-page":{"backgroundColor":"#E13300","imageURI":"https://i.scdn.co/image/ab67706f00000002a980b152e708b33c6516d848","page":"country-page","uri":"spotify:genre:country-page"},"spotify:genre:danish-page":{"backgroundColor":"#006450","imageURI":"https://t.scdn.co/images/2e04c55407984a579daf147e7cf02bc3.jpeg","page":"danish-page","uri":"spotify:genre:danish-page"},"spotify:genre:dansband-page":{"backgroundColor":"#8c1932","imageURI":"https://t.scdn.co/images/539855dca17c4d4b81338d42a2dc4c0f.jpeg","page":"dansband-page","uri":"spotify:genre:dansband-page"},"spotify:genre:decades-page":{"backgroundColor":"#BA5D07","imageURI":"https://t.scdn.co/images/4c8b58ab42b54296ad5379514d36edac","page":"decades-page","uri":"spotify:genre:decades-page"},"spotify:genre:desi-page":{"backgroundColor":"#E13300","imageURI":"https://i.scdn.co/image/ab67706f00000002cc485e3902f426d5d3e21558","page":"desi-page","uri":"spotify:genre:desi-page"},"spotify:genre:dinner-page":{"backgroundColor":"#BA5D07","imageURI":"https://i.scdn.co/image/ab67706f000000025a051b0271d3e98edfdc4c09","page":"dinner-page","uri":"spotify:genre:dinner-page"},"spotify:genre:discover-page":{"backgroundColor":"#8D67AB","imageURI":"https://t.scdn.co/images/d0fb2ab104dc4846bdc56d72b0b0d785.jpeg","page":"discover-page","uri":"spotify:genre:discover-page"},"spotify:genre:dutch-page":{"backgroundColor":"#ff4632","imageURI":"https://t.scdn.co/images/d968dc9c903b41758a9af78f3e1c8c0e.jpeg","page":"dutch-page","uri":"spotify:genre:dutch-page"},"spotify:genre:edm_dance-page":{"backgroundColor":"#DC148C","imageURI":"https://i.scdn.co/image/ab67706f000000020377baccf69ede3cf1a26eff","page":"edm_dance-page","uri":"spotify:genre:edm_dance-page"},"spotify:genre:educational_v2_podcast-page":{"backgroundColor":"#a0c3d2","page":"educational_v2_podcast-page","uri":"spotify:genre:educational_v2_podcast-page"},"spotify:genre:ellen-page":{"backgroundColor":"#509bf5","imageURI":"https://t.scdn.co/images/ea580b7dfc584f7183037fe66d743817.jpeg","page":"ellen-page","uri":"spotify:genre:ellen-page"},"spotify:genre:family-page":{"backgroundColor":"#af2896","imageURI":"https://t.scdn.co/images/f4393ac2106e4583ac86e2ddd7ae827d.jpeg","page":"family-page","uri":"spotify:genre:family-page"},"spotify:genre:festivals-page":{"backgroundColor":"#1e3264","imageURI":"https://t.scdn.co/images/8cee887fed054786b8b5d57f80af68ab.jpeg","page":"festivals-page","uri":"spotify:genre:festivals-page"},"spotify:genre:focus-page":{"backgroundColor":"#503750","imageURI":"https://i.scdn.co/image/ab67706f00000002e4eadd417a05b2546e866934","page":"focus-page","uri":"spotify:genre:focus-page"},"spotify:genre:francophone-page":{"backgroundColor":"#a0c3d2","imageURI":"https://t.scdn.co/images/e825b23138f7416589d60dc6d2de3e52.jpeg","page":"francophone-page","uri":"spotify:genre:francophone-page"},"spotify:genre:french_variety-page":{"backgroundColor":"#2d46b9","imageURI":"https://t.scdn.co/images/ab71e150e8ac4c179fdcef7267e5453b.jpeg","page":"french_variety-page","uri":"spotify:genre:french_variety-page"},"spotify:genre:funk-page":{"backgroundColor":"#E61E32","imageURI":"https://i.scdn.co/image/ab67706f00000002f16913f0326b9d44bf78fc88","page":"funk-page","uri":"spotify:genre:funk-page"},"spotify:genre:funkbrazil-page":{"backgroundColor":"#2d46b9","imageURI":"https://t.scdn.co/images/d0462afda39e48d4bcb28d6f4802c322.jpeg","page":"funkbrazil-page","uri":"spotify:genre:funkbrazil-page"},"spotify:genre:games_v2_podcast-page":{"backgroundColor":"#509bf5","page":"games_v2_podcast-page","uri":"spotify:genre:games_v2_podcast-page"},"spotify:genre:gaming-page":{"backgroundColor":"#E8115B","imageURI":"https://i.scdn.co/image/ab67706f0000000221a2087747d946f16704b8af","page":"gaming-page","uri":"spotify:genre:gaming-page"},"spotify:genre:hiphop-page":{"backgroundColor":"#ba5d07","imageURI":"https://i.scdn.co/image/ab67706f000000029bb6af539d072de34548d15c","page":"hiphop-page","uri":"spotify:genre:hiphop-page"},"spotify:genre:holidays-page":{"backgroundColor":"#8c1932","imageURI":"https://t.scdn.co/images/8095bb75a61e4623906cb847ae87d9da.jpeg","page":"holidays-page","uri":"spotify:genre:holidays-page"},"spotify:genre:indie_alt-page":{"backgroundColor":"#608108","imageURI":"https://i.scdn.co/image/ab67706f000000025f7327d3fdc71af27917adba","page":"indie_alt-page","uri":"spotify:genre:indie_alt-page"},"spotify:genre:inspirational-page":{"backgroundColor":"#509bf5","imageURI":"https://t.scdn.co/images/393d33c09d7c4142a40fb9bad4852cab.jpeg","page":"inspirational-page","uri":"spotify:genre:inspirational-page"},"spotify:genre:j_tracks-page":{"backgroundColor":"#af2896","imageURI":"https://t.scdn.co/images/1ecbe139948f4144a78971bf5004e1ef.jpeg","page":"j_tracks-page","uri":"spotify:genre:j_tracks-page"},"spotify:genre:jazz-page":{"backgroundColor":"#1E3264","imageURI":"https://i.scdn.co/image/ab67706f00000002d72ef75e14ca6f60ea2364c2","page":"jazz-page","uri":"spotify:genre:jazz-page"},"spotify:genre:karaoke-page":{"backgroundColor":"#ff6437","imageURI":"https://t.scdn.co/images/4f2d757d1c8a4eab80008e9058d0e129.jpeg","page":"karaoke-page","uri":"spotify:genre:karaoke-page"},"spotify:genre:khaleeji-page":{"backgroundColor":"#8c1932","imageURI":"https://t.scdn.co/images/6592b80e053e46af83e46c91cd07c6e6.jpeg","page":"khaleeji-page","uri":"spotify:genre:khaleeji-page"},"spotify:genre:kids-page":{"backgroundColor":"#AF2896","imageURI":"https://i.scdn.co/image/ab67706f000000023b4d1bd8fc061c7b1cb33cb1","page":"kids-page","uri":"spotify:genre:kids-page"},"spotify:genre:kids_family_v2_podcast-page":{"backgroundColor":"#ffc864","page":"kids_family_v2_podcast-page","uri":"spotify:genre:kids_family_v2_podcast-page"},"spotify:genre:kpop-page":{"backgroundColor":"#148A08","imageURI":"https://i.scdn.co/image/ab67706f00000002978b9f4a4f40b430fd0d837e","page":"kpop-page","uri":"spotify:genre:kpop-page"},"spotify:genre:latin-page":{"backgroundColor":"#e1118b","imageURI":"https://t.scdn.co/images/6a48e36b373a4d879a9340076db03a7b","page":"latin-page","uri":"spotify:genre:latin-page"},"spotify:genre:latin_moods-page":{"backgroundColor":"#509bf5","imageURI":"https://t.scdn.co/images/535aeb8b65bf4278bde1b37880f63d48.jpeg","page":"latin_moods-page","uri":"spotify:genre:latin_moods-page"},"spotify:genre:latin_pop_page-page":{"backgroundColor":"#c3f0c8","imageURI":"https://t.scdn.co/images/f576cc1c0d284a3f9decd45cc9c0e332.jpeg","page":"latin_pop_page-page","uri":"spotify:genre:latin_pop_page-page"},"spotify:genre:latin_rock_indie-page":{"backgroundColor":"#eb1e32","imageURI":"https://t.scdn.co/images/e2eae19f603a42cd847adfbdd87ec68b.jpeg","page":"latin_rock_indie-page","uri":"spotify:genre:latin_rock_indie-page"},"spotify:genre:latin_tropical-page":{"backgroundColor":"#ff6437","imageURI":"https://t.scdn.co/images/b7d701904a634d059d36afd4910cc53e.jpeg","page":"latin_tropical-page","uri":"spotify:genre:latin_tropical-page"},"spotify:genre:latin_urban_page-page":{"backgroundColor":"#ffc864","imageURI":"https://t.scdn.co/images/b951da0b1d754316b3f65a70a8a5820b.jpeg","page":"latin_urban_page-page","uri":"spotify:genre:latin_urban_page-page"},"spotify:genre:lifestyle_health_v2_podcast-page":{"backgroundColor":"#f573a0","page":"lifestyle_health_v2_podcast-page","uri":"spotify:genre:lifestyle_health_v2_podcast-page"},"spotify:genre:listening_together-page":{"backgroundColor":"#a0c3d2","imageURI":"https://t.scdn.co/images/ae860aa5e8d24786ab5f1842fd9e1aea.jpeg","page":"listening_together-page","uri":"spotify:genre:listening_together-page"},"spotify:genre:malaypop-page":{"backgroundColor":"#c3f0c8","imageURI":"https://t.scdn.co/images/9916ca60858f4f4497657e7aaa53195d.jpeg","page":"malaypop-page","uri":"spotify:genre:malaypop-page"},"spotify:genre:mandopop-page":{"backgroundColor":"#a0c3d2","imageURI":"https://t.scdn.co/images/a0feab8b3bd64d2a876e0f57be244bc4.jpeg","page":"mandopop-page","uri":"spotify:genre:mandopop-page"},"spotify:genre:metal-page":{"backgroundColor":"#777777","imageURI":"https://i.scdn.co/image/ab67706f0000000285704160b49125ac95099ec8","page":"metal-page","uri":"spotify:genre:metal-page"},"spotify:genre:mexican-page":{"backgroundColor":"#006450","imageURI":"https://t.scdn.co/images/950aa388f0b84e88a71abc111894c85e.jpeg","page":"mexican-page","uri":"spotify:genre:mexican-page"},"spotify:genre:mood-page":{"backgroundColor":"#8D67AB","imageURI":"https://i.scdn.co/image/ab67706f00000002aa93fe4e8c2d24fc62556cba","page":"mood-page","uri":"spotify:genre:mood-page"},"spotify:genre:music_v2_podcast-page":{"backgroundColor":"#af2896","page":"music_v2_podcast-page","uri":"spotify:genre:music_v2_podcast-page"},"spotify:genre:new-releases-page":{"backgroundColor":"#E8115B","imageURI":"https://i.scdn.co/image/ab67706f000000027ea4d505212b9de1f72c5112","page":"new_releases-page","uri":"spotify:genre:new-releases-page"},"spotify:genre:news_politics_v2_podcast-page":{"backgroundColor":"#4b917d","page":"news_politics_v2_podcast-page","uri":"spotify:genre:news_politics_v2_podcast-page"},"spotify:genre:opm-page":{"backgroundColor":"#f573a0","imageURI":"https://t.scdn.co/images/fc0e34ef07ee494a81548532c90193d9.jpeg","page":"opm-page","uri":"spotify:genre:opm-page"},"spotify:genre:party-page":{"backgroundColor":"#AF2896","imageURI":"https://i.scdn.co/image/ab67706f00000002caa115cbdb8cd3d39d67cdc0","page":"party-page","uri":"spotify:genre:party-page"},"spotify:genre:podcasts-web":{"backgroundColor":"#27856A","imageURI":"https://i.scdn.co/image/567158eb895ad26718a814345af0fc43ee785ec5","page":"podcasts-web","uri":"spotify:genre:podcasts-web"},"spotify:genre:pop-page":{"backgroundColor":"#8D67AB","imageURI":"https://t.scdn.co/images/0a74d96e091a495bb09c0d83210910c3","page":"pop-page","uri":"spotify:genre:pop-page"},"spotify:genre:popculture-page":{"backgroundColor":"#f59b23","imageURI":"https://t.scdn.co/images/21a2ccde5f5c42b0858600a19153ce8d.jpeg","page":"popculture-page","uri":"spotify:genre:popculture-page"},"spotify:genre:popindo-page":{"backgroundColor":"#509bf5","imageURI":"https://t.scdn.co/images/a141533c15e746b0989040e6a59488dd.jpeg","page":"popindo-page","uri":"spotify:genre:popindo-page"},"spotify:genre:pride-page":{"backgroundColor":"#509bf5","imageURI":"https://t.scdn.co/images/c9a01586687a45a78c56d9be5aed3c79.jpeg","page":"pride-page","uri":"spotify:genre:pride-page"},"spotify:genre:punjabi-page":{"backgroundColor":"#af2896","imageURI":"https://t.scdn.co/images/fc525ffce9f74e0792b9438ae541a5b1.jpeg","page":"punjabi-page","uri":"spotify:genre:punjabi-page"},"spotify:genre:punk-page":{"backgroundColor":"#1E3264","imageURI":"https://i.scdn.co/image/ab67706f0000000275251d7d488b0fd69e4c50bd","page":"punk-page","uri":"spotify:genre:punk-page"},"spotify:genre:reggae-page":{"backgroundColor":"#006450","imageURI":"https://t.scdn.co/images/46e47036f0ae4608a61c68b65750610f.jpeg","page":"reggae-page","uri":"spotify:genre:reggae-page"},"spotify:genre:rnb-page":{"backgroundColor":"#DC148C","imageURI":"https://i.scdn.co/image/ab67706f000000023c5a4aaf5df054a9beeb3d82","page":"rnb-page","uri":"spotify:genre:rnb-page"},"spotify:genre:rock-page":{"backgroundColor":"#E61E32","imageURI":"https://i.scdn.co/image/ab67706f00000002fe6d8d1019d5b302213e3730","page":"rock-page","uri":"spotify:genre:rock-page"},"spotify:genre:romance-page":{"backgroundColor":"#8C1932","imageURI":"https://i.scdn.co/image/ab67706f0000000213601d4833623a4d6b328e38","page":"romance-page","uri":"spotify:genre:romance-page"},"spotify:genre:roots-page":{"backgroundColor":"#1E3264","imageURI":"https://i.scdn.co/image/ab67706f0000000237df164786f688dd0ccd8744","page":"roots-page","uri":"spotify:genre:roots-page"},"spotify:genre:sertanejo-page":{"backgroundColor":"#c39687","imageURI":"https://t.scdn.co/images/fbfe20a3a90b4fcca73be4495b5e6d5b.jpeg","page":"sertanejo-page","uri":"spotify:genre:sertanejo-page"},"spotify:genre:sessions-page":{"backgroundColor":"#4b917d","imageURI":"https://t.scdn.co/images/ccd24ffb79594628a20a5e52b49c614f.jpeg","page":"sessions-page","uri":"spotify:genre:sessions-page"},"spotify:genre:sleep-page":{"backgroundColor":"#1E3264","imageURI":"https://i.scdn.co/image/ab67706f00000002b70e0223f544b1faa2e95ed0","page":"sleep-page","uri":"spotify:genre:sleep-page"},"spotify:genre:society_v2_podcast-page":{"backgroundColor":"#1e3264","page":"society_v2_podcast-page","uri":"spotify:genre:society_v2_podcast-page"},"spotify:genre:soul-page":{"backgroundColor":"#DC148C","imageURI":"https://i.scdn.co/image/ab67706f000000026e1034ebd7b7c86546c6acca","page":"soul-page","uri":"spotify:genre:soul-page"},"spotify:genre:sports_recreation_v2_podcast-page":{"backgroundColor":"#f59b23","page":"sports_recreation_v2_podcast-page","uri":"spotify:genre:sports_recreation_v2_podcast-page"},"spotify:genre:stories_v2_podcast-page":{"backgroundColor":"#ffc864","page":"stories_v2_podcast-page","uri":"spotify:genre:stories_v2_podcast-page"},"spotify:genre:summer-page":{"backgroundColor":"#ffc864","imageURI":"https://t.scdn.co/images/a2a24668f16c4e9680233a0d7d244a4b.jpeg","page":"summer-page","uri":"spotify:genre:summer-page"},"spotify:genre:tamil-page":{"backgroundColor":"#ffc864","imageURI":"https://t.scdn.co/images/2009b6515219438382ad57192173de13.jpeg","page":"tamil-page","uri":"spotify:genre:tamil-page"},"spotify:genre:telugu-page":{"backgroundColor":"#19e68c","imageURI":"https://t.scdn.co/images/a33f9b9872a84bba9a4e058d4f863915.jpeg","page":"telugu-page","uri":"spotify:genre:telugu-page"},"spotify:genre:test_latin-page":{"backgroundColor":"#ff6437","imageURI":"https://t.scdn.co/images/1d7841c92c504343a391dfa0626fc22c.jpeg","page":"test_latin-page","uri":"spotify:genre:test_latin-page"},"spotify:genre:thai-page":{"backgroundColor":"#ff4632","imageURI":"https://t.scdn.co/images/3b17581553a14deb912e8405bf90890c.jpeg","page":"thai-page","uri":"spotify:genre:thai-page"},"spotify:genre:throwback-page":{"backgroundColor":"#a0c3d2","imageURI":"https://t.scdn.co/images/d320819abf714ae5af0f91482fcd6ad7.jpeg","page":"throwback-page","uri":"spotify:genre:throwback-page"},"spotify:genre:top-podcasts-page":{"backgroundColor":"#509bf5","page":"top-podcasts-page","uri":"spotify:genre:top-podcasts-page"},"spotify:genre:travel-page":{"backgroundColor":"#2D46B9","imageURI":"https://t.scdn.co/images/44cf5615d3244f289fcedefa96b85db9","page":"travel-page","uri":"spotify:genre:travel-page"},"spotify:genre:true-crime_v2_podcast-page":{"backgroundColor":"#503750","page":"true-crime_v2_podcast-page","uri":"spotify:genre:true-crime_v2_podcast-page"},"spotify:genre:videos-page":{"backgroundColor":"#509bf5","imageURI":"https://t.scdn.co/images/d25910c96bba4229adc121480d164bab.jpeg","page":"videos-page","uri":"spotify:genre:videos-page"},"spotify:genre:vietnamese-page":{"backgroundColor":"#c3f0c8","imageURI":"https://t.scdn.co/images/841d524163d94e98b0becfd8c920efde.jpeg","page":"vietnamese-page","uri":"spotify:genre:vietnamese-page"},"spotify:genre:whm-page":{"backgroundColor":"#af2896","imageURI":"https://t.scdn.co/images/9fc209cc8e0e4de1be2ebaf92d4f280e.jpeg","page":"whm-page","uri":"spotify:genre:whm-page"},"spotify:genre:women_s_history_month-page":{"backgroundColor":"#af2896","imageURI":"https://t.scdn.co/images/662aa765ebd94d7a9fab9d5392eb1ca0.jpeg","page":"women_s_history_month-page","uri":"spotify:genre:women_s_history_month-page"},"spotify:genre:word-page":{"backgroundColor":"#f573a0","imageURI":"https://t.scdn.co/images/29bfbe4d5a564bad8f10f9e6d6e654e0.jpeg","page":"word-page","uri":"spotify:genre:word-page"},"spotify:genre:workout-page":{"backgroundColor":"#777777","imageURI":"https://i.scdn.co/image/ab67706f000000029249b35f23fb596b6f006a15","page":"workout-page","uri":"spotify:genre:workout-page"},"spotify:made-for-you":{"backgroundColor":"#a0c3d2","imageURI":"https://t.scdn.co/images/68433b0ee5b5465b8e926c42b84cbcdb.jpeg","page":"made-for-you","uri":"spotify:made-for-you"},"spotify:genre:made-for-x-hub":{"backgroundColor":"#a0c3d2","imageURI":"https://t.scdn.co/images/68433b0ee5b5465b8e926c42b84cbcdb.jpeg","page":"made-for-x-hub","uri":"spotify:genre:made-for-x-hub"},"spotify:radio":{"backgroundColor":"#f573a0","imageURI":"https://t.scdn.co/images/d2d0df1378b24addb9c30eb81b4abc23.jpeg","page":"radio","uri":"spotify:radio"},"spotify:genre:wellness-page":{"backgroundColor":"#a56752","imageURI":"https://i.scdn.co/image/ab67656300005f1ff234909e69a68d92ca0af6ca","page":"wellness-page","uri":"spotify:genre:wellness-page"},"spotify:genre:tv_movies-page":{"backgroundColor":"#AF2896","imageURI":"https://i.scdn.co/image/ab67706f000000026abff8de68c75470ea8f0665","page":"tv_movies-page","uri":"spotify:genre:tv_movies-page"},"spotify:charts:root":{"backgroundColor":"#8D67AB","imageURI":"https://charts-images.scdn.co/assets/locale_en/regional/weekly/region_global_default.jpg","page":"root","uri":"spotify:charts:root"},"spotify:genre:at_home-page":{"backgroundColor":"#477D95","imageURI":"https://i.scdn.co/image/ab67706f00000002ec9d60059aa215a7ba364695","page":"at_home-page","uri":"spotify:genre:at_home-page"},"spotify:genre:thirdparty-page":{"backgroundColor":"#eb1e32","uri":"spotify:genre:thirdparty-page","page":"thirdparty-page","imageURI":"https://t.scdn.co/images/7ef1d6445a684e30bdd78f09507d688c.jpeg"},"spotify:genre:corona_news_podcasts-page":{"backgroundColor":"#509bf5","uri":"spotify:genre:corona_news_podcasts-page","page":"corona_news_podcasts-page","imageURI":"https://i.scdn.co/image/0e121a9a02c17d6703e7c12ba0c704166f9afac9"},"spotify:genre:higher_ground-page":{"backgroundColor":"#a0c3d2","uri":"spotify:genre:higher_ground-page","page":"higher_ground-page","imageURI":"https://i.scdn.co/image/4f26db8239305bef29ef956b331b31407cbf51f9"},"spotify:genre:league_of_legends-page":{"backgroundColor":"#148A08","imageURI":"https://i.scdn.co/image/ab67706f000000025f0ff9251e3cfe641160dc31","page":"league_of_legends-page","uri":"spotify:genre:league_of_legends-page"},"spotify:genre:hw2019-internal-podcasts-page":{"backgroundColor":"#4100F5","imageURI":"https://i.imgur.com/dZQu0Yz.png","page":"hw2019-internal-podcasts-page","uri":"spotify:genre:hw2019-internal-podcasts-pagee"},"spotify:genre:in_the_car-page":{"backgroundColor":"#477D95","imageURI":"https://i.scdn.co/image/ab67706f00000002ffa215be1a4c64e3cbf59d1e","page":"in_the_car-page","uri":"spotify:genre:in_the_car-page"},"spotify:genre:caribbean-page":{"backgroundColor":"#0D73EC","imageURI":"https://i.scdn.co/image/ab67706f00000002a76a2ccb454ff0e1720a51a5","page":"caribbean-page","uri":"spotify:genre:caribbean-page"},"spotify:genre:instrumental-page":{"backgroundColor":"#477D95","imageURI":"https://i.scdn.co/image/ab67706f000000028ed1a5002b96c2ea882541b2","page":"instrumental-page","uri":"spotify:genre:instrumental-page"},"spotify:space:2020-page":{"backgroundColor":"#9cf0e1","imageURI":"https://lineup-images.scdn.co/wrapped-2020-top100_LARGE-en.jpg","page":"2020-page","uri":"spotify:space:2020-page"},"spotify:genre:songwriters-page":{"backgroundColor":"#8C1932","imageURI":"https://i.scdn.co/image/ab676d63000076a0c9657833d9c169782b961c9c","page":"songwriters-page","uri":"spotify:genre:songwriters-page"},"spotify:genre:equal-page":{"backgroundColor":"#148A08","imageURI":"https://i.scdn.co/image/ab67706f0000000284a1ec26f589f0d569805a07","page":"equal-page","uri":"spotify:genre:equal-page"},"spotify:genre:kids_family-page":{"backgroundColor":"#8D67AB","imageURI":"https://t.scdn.co/images/15a38c44c4484cc3a078aaab5bd4e828","page":"kids_family-page","uri":"spotify:genre:kids_family-page"},"spotify:genre:frequency-page":{"backgroundColor":"#0D73EC","imageURI":"https://t.scdn.co/images/4e5db92a959b47548de10712dc4c7c70","page":"frequency-page","uri":"spotify:genre:frequency-page"},"spotify:genre:ambient-page":{"backgroundColor":"#477D95","imageURI":"https://t.scdn.co/images/a45c0978c7784da8b83cadbca8b815d1","page":"ambient-page","uri":"spotify:genre:ambient-page"},"spotify:genre:happier_than_ever-page":{"backgroundColor":"#907255","imageURI":"https://t.scdn.co/images/a5ddeea115874aeeb8923d17f56ced1d","page":"happier_than_ever-page","uri":"spotify:genre:happier_than_ever-page"},"spotify:genre:2021-page":{"backgroundColor":"#d7f27d","imageURI":"https://t.scdn.co/images/6bbcb75a98004dd3b306e0f9ca659318","page":"2021-page","uri":"spotify:genre:2021-page"},"spotify:genre:sanremo-page":{"backgroundColor":"#1d3164","imageURI":"https://t.scdn.co/images/61ad00d872894117a084cb5fbd1e7f12","page":"sanremo-page","uri":"spotify:genre:sanremo-page"},"spotify:genre:0JQ5DAqbMKFPw634sFwguI":{"backgroundColor":"#148A08","imageURI":"https://i.scdn.co/image/ab67706f0000000284a1ec26f589f0d569805a07","page":"0JQ5DAqbMKFPw634sFwguI","uri":"spotify:genre:0JQ5DAqbMKFPw634sFwguI"},"spotify:genre:0JQ5DAqbMKFQ1UFISXj59F":{"backgroundColor":"#8D67AB","imageURI":"https://i.scdn.co/image/ab67706f00000002d3f07aa10d05fb4baab12b94","page":"0JQ5DAqbMKFQ1UFISXj59F","uri":"spotify:genre:0JQ5DAqbMKFQ1UFISXj59F"},"spotify:genre:0JQ5DAqbMKFCfObibaOZbv":{"backgroundColor":"#E8115B","imageURI":"https://i.scdn.co/image/ab67706f0000000221a2087747d946f16704b8af","page":"0JQ5DAqbMKFCfObibaOZbv","uri":"spotify:genre:0JQ5DAqbMKFCfObibaOZbv"},"spotify:genre:0JQ5DAqbMKFLYQVFHcXMae":{"backgroundColor":"#148A08","imageURI":"https://i.scdn.co/image/ab67706f000000025f0ff9251e3cfe641160dc31","page":"0JQ5DAqbMKFLYQVFHcXMae","uri":"spotify:genre:0JQ5DAqbMKFLYQVFHcXMae"},"spotify:genre:0JQ5DAqbMKFCbimwdOYlsl":{"backgroundColor":"#503750","imageURI":"https://i.scdn.co/image/ab67706f00000002e4eadd417a05b2546e866934","page":"0JQ5DAqbMKFCbimwdOYlsl","uri":"spotify:genre:0JQ5DAqbMKFCbimwdOYlsl"},"spotify:genre:0JQ5DAqbMKFCuoRTxhYWow":{"backgroundColor":"#1E3264","imageURI":"https://i.scdn.co/image/ab67706f00000002b70e0223f544b1faa2e95ed0","page":"0JQ5DAqbMKFCuoRTxhYWow","uri":"spotify:genre:0JQ5DAqbMKFCuoRTxhYWow"},"spotify:genre:0JQ5DAqbMKFDkd668ypn6O":{"backgroundColor":"#777777","imageURI":"https://i.scdn.co/image/ab67706f0000000285704160b49125ac95099ec8","page":"0JQ5DAqbMKFDkd668ypn6O","uri":"spotify:genre:0JQ5DAqbMKFDkd668ypn6O"},"spotify:genre:0JQ5DAqbMKFRY5ok2pxXJ0":{"backgroundColor":"#BA5D07","imageURI":"https://i.scdn.co/image/ab67706f000000025a051b0271d3e98edfdc4c09","page":"0JQ5DAqbMKFRY5ok2pxXJ0","uri":"spotify:genre:0JQ5DAqbMKFRY5ok2pxXJ0"},"spotify:genre:0JQ5DAqbMKFEZPnFQSFB1T":{"backgroundColor":"#DC148C","imageURI":"https://i.scdn.co/image/ab67706f000000023c5a4aaf5df054a9beeb3d82","page":"0JQ5DAqbMKFEZPnFQSFB1T","uri":"spotify:genre:0JQ5DAqbMKFEZPnFQSFB1T"},"spotify:genre:0JQ5DAqbMKFRieVZLLoo9m":{"backgroundColor":"#477D95","imageURI":"https://i.scdn.co/image/ab67706f000000028ed1a5002b96c2ea882541b2","page":"0JQ5DAqbMKFRieVZLLoo9m","uri":"spotify:genre:0JQ5DAqbMKFRieVZLLoo9m"},"spotify:genre:0JQ5DAqbMKFAUsdyVjCQuL":{"backgroundColor":"#8C1932","imageURI":"https://i.scdn.co/image/ab67706f0000000213601d4833623a4d6b328e38","page":"0JQ5DAqbMKFAUsdyVjCQuL","uri":"spotify:genre:0JQ5DAqbMKFAUsdyVjCQuL"},"spotify:genre:0JQ5DAqbMKFFoimhOqWzLB":{"backgroundColor":"#8D67AB","imageURI":"https://t.scdn.co/images/15a38c44c4484cc3a078aaab5bd4e828","page":"0JQ5DAqbMKFFoimhOqWzLB","uri":"spotify:genre:0JQ5DAqbMKFFoimhOqWzLB"},"spotify:genre:0JQ5DAqbMKFPrEiAOxgac3":{"backgroundColor":"#8D67AB","imageURI":"https://i.scdn.co/image/ab67706f000000023e0130fcd5d106f1402b4707","page":"0JQ5DAqbMKFPrEiAOxgac3","uri":"spotify:genre:0JQ5DAqbMKFPrEiAOxgac3"},"spotify:genre:0JQ5DAqbMKFxXaXKP7zcDp":{"backgroundColor":"#e1118b","imageURI":"https://t.scdn.co/images/6a48e36b373a4d879a9340076db03a7b","page":"0JQ5DAqbMKFxXaXKP7zcDp","uri":"spotify:genre:0JQ5DAqbMKFxXaXKP7zcDp"},"spotify:genre:0JQ5DAqbMKFSCjnQr8QZ3O":{"backgroundColor":"#8C1932","imageURI":"https://i.scdn.co/image/ab676d63000076a0c9657833d9c169782b961c9c","page":"0JQ5DAqbMKFSCjnQr8QZ3O","uri":"spotify:genre:0JQ5DAqbMKFSCjnQr8QZ3O"},"spotify:genre:0JQ5DAqbMKFObNLOHydSW8":{"backgroundColor":"#0D73EC","imageURI":"https://i.scdn.co/image/ab67706f00000002a76a2ccb454ff0e1720a51a5","page":"0JQ5DAqbMKFObNLOHydSW8","uri":"spotify:genre:0JQ5DAqbMKFObNLOHydSW8"},"spotify:genre:0JQ5DAqbMKFFsW9N8maB6z":{"backgroundColor":"#E61E32","imageURI":"https://i.scdn.co/image/ab67706f00000002f16913f0326b9d44bf78fc88","page":"0JQ5DAqbMKFFsW9N8maB6z","uri":"spotify:genre:0JQ5DAqbMKFFsW9N8maB6z"},"spotify:genre:0JQ5DAqbMKFQVdc2eQoH2s":{"backgroundColor":"#E13300","imageURI":"https://i.scdn.co/image/ab67706f00000002cc485e3902f426d5d3e21558","page":"0JQ5DAqbMKFQVdc2eQoH2s","uri":"spotify:genre:0JQ5DAqbMKFQVdc2eQoH2s"},"spotify:genre:0JQ5DAqbMKFNQ0fGp4byGU":{"backgroundColor":"#AF2896","imageURI":"https://i.scdn.co/image/ab67706f0000000293c88c83bcb12b0800281074","page":"0JQ5DAqbMKFNQ0fGp4byGU","uri":"spotify:genre:0JQ5DAqbMKFNQ0fGp4byGU"},"spotify:genre:0JQ5DAqbMKFAQy4HL4XU2D":{"backgroundColor":"#2D46B9","imageURI":"https://t.scdn.co/images/44cf5615d3244f289fcedefa96b85db9","page":"0JQ5DAqbMKFAQy4HL4XU2D","uri":"spotify:genre:0JQ5DAqbMKFAQy4HL4XU2D"},"spotify:genre:0JQ5DAqbMKFGvOw3O4nLAf":{"backgroundColor":"#148A08","imageURI":"https://i.scdn.co/image/ab67706f00000002978b9f4a4f40b430fd0d837e","page":"0JQ5DAqbMKFGvOw3O4nLAf","uri":"spotify:genre:0JQ5DAqbMKFGvOw3O4nLAf"},"spotify:genre:0JQ5DAqbMKFOzQeOmemkuw":{"backgroundColor":"#AF2896","imageURI":"https://i.scdn.co/image/ab67706f000000026abff8de68c75470ea8f0665","page":"0JQ5DAqbMKFOzQeOmemkuw","uri":"spotify:genre:0JQ5DAqbMKFOzQeOmemkuw"},"spotify:genre:0JQ5DAqbMKFLjmiZRss79w":{"backgroundColor":"#477D95","imageURI":"https://t.scdn.co/images/a45c0978c7784da8b83cadbca8b815d1","page":"0JQ5DAqbMKFLjmiZRss79w","uri":"spotify:genre:0JQ5DAqbMKFLjmiZRss79w"},"spotify:genre:0JQ5DAqbMKFDKyRxRDLIbk":{"backgroundColor":"#8c1932","imageURI":"https://t.scdn.co/images/8095bb75a61e4623906cb847ae87d9da.jpeg","page":"0JQ5DAqbMKFDKyRxRDLIbk","uri":"spotify:genre:0JQ5DAqbMKFDKyRxRDLIbk"},"spotify:genre:0JQ5DAqbMKFIVNxQgRNSg0":{"backgroundColor":"#BA5D07","imageURI":"https://t.scdn.co/images/4c8b58ab42b54296ad5379514d36edac","page":"0JQ5DAqbMKFIVNxQgRNSg0","uri":"spotify:genre:0JQ5DAqbMKFIVNxQgRNSg0"},"spotify:genre:0JQ5DAqbMKFIpEuaCnimBj":{"backgroundColor":"#DC148C","imageURI":"https://i.scdn.co/image/ab67706f000000026e1034ebd7b7c86546c6acca","page":"0JQ5DAqbMKFIpEuaCnimBj","uri":"spotify:genre:0JQ5DAqbMKFIpEuaCnimBj"},"spotify:genre:0JQ5DAqbMKFAXlCG6QvYQ4":{"backgroundColor":"#777777","imageURI":"https://i.scdn.co/image/ab67706f000000029249b35f23fb596b6f006a15","page":"0JQ5DAqbMKFAXlCG6QvYQ4","uri":"spotify:genre:0JQ5DAqbMKFAXlCG6QvYQ4"},"spotify:genre:0JQ5DAqbMKFQiK2EHwyjcU":{"backgroundColor":"#1E3264","imageURI":"https://i.scdn.co/image/ab67706f0000000285c3e89f02770deb7691451c","page":"0JQ5DAqbMKFQiK2EHwyjcU","uri":"spotify:genre:0JQ5DAqbMKFQiK2EHwyjcU"}}'),_M=Object.keys(bM).reduce(((e,t)=>({...e,[t.split(":").reduce(((e,t)=>t),t).replace("-page","")]:{...bM[t]}})),{}),NM=e=>{const t=Object.values(_M).map((e=>e.backgroundColor)).filter(Boolean);return e.map((e=>{const n=e.name,i=e.href.split("/").reduce(((e,t)=>t),""),a=i,s=_M[i.replace("-page","")],r=s&&s.backgroundColor;return{viewId:i,title:n,imageUrl:(s&&s.imageURI)??e.images?.[0]?.url,color:r??t.shift(),ubiId:a}}))},EM={platform:"web",content_limit:20,limit:50},xM={method:"GET",authorize:!0,responseType:"json",rejectNotOk:!0,allowOffline:!0};class CM{constructor(e,t){this.transport=e,this.enableShows=t}async getSearchBrowse(e={},t={}){const n=`https://api.spotify.com/v1/views/browse-page-cx-test?${new URLSearchParams({timestamp:(new Date).toISOString(),...EM,...e}).toString()}`,i=(await this.transport.request(n,xM)).body.content.items.map(this._transformItems),a=(await Promise.all(i)).reduce(((e,{id:t,...n})=>({...e,[t]:{...n}})),{});if(a["browse-grid-mobile"]){a["browse-grid-mobile"].items=this.getHardcodedFeatureCards(t).concat(a["browse-grid-mobile"].items);const e=1,n=a["browse-grid-mobile"].items.findIndex((e=>"0JQ5DAqbMKFETqK4t8f1n3"===e.viewId));if(n>-1&&n!==e){const t=a["browse-grid-mobile"].items[n];a["browse-grid-mobile"].items.splice(n,1),a["browse-grid-mobile"].items.splice(e,0,t)}}return a}getHardcodedFeatureCards(e){const t=[{href:"/genre/made-for-x-hub",title:u.ag.get("browse.made-for-you"),color:"#1E3264",imageUrl:"https://t.scdn.co/images/ea364e99656e46a096ea1df50f581efe",ubiId:YL.Wg.MADE_FOR_YOU},{href:"/genre/browse-charts-tab",title:u.ag.get("browse.charts"),color:"#8D67AB",imageUrl:"https://charts-images.scdn.co/assets/locale_en/regional/weekly/region_global_default.jpg",ubiId:YL.Wg.CHARTS},{href:"/genre/new-releases-page",title:u.ag.get("new_releases"),color:"#E8115B",imageUrl:"https://i.scdn.co/image/ab67706f000000027ea4d505212b9de1f72c5112",ubiId:YL.Wg.BROWSE_NEWRELEASES},{href:"/genre/discover-page",title:this.capitalize(u.ag.get("browse.discover")),color:"#8D67AB",imageUrl:"https://t.scdn.co/images/d0fb2ab104dc4846bdc56d72b0b0d785.jpeg",ubiId:YL.Wg.BROWSE_DISCOVER}];if(e.enableClientXConcertsHub&&t.push({href:"/concerts",title:u.ag.get("browse.live-events"),imageUrl:"https://concerts.spotifycdn.com/images/live-events_category-image.jpg",color:"#7358FF",ubiId:YL.Wg.CONCERTS}),this.enableShows){return[{href:"/genre/podcasts-web",title:this.capitalize(u.ag.get("browse.podcasts")),color:"#27856A",imageUrl:"https://i.scdn.co/image/567158eb895ad26718a814345af0fc43ee785ec5",ubiId:YL.Wg.BROWSE_PODCASTS}].concat(t)}return t}capitalize(e){return e.charAt(0).toLocaleUpperCase()+e.slice(1).toLocaleLowerCase()}async getItemsStyle(){return Object.keys(_M).reduce(((e,t)=>({...e,[t]:{color:_M[t].backgroundColor,imageUrl:_M[t].imageURI}})),{})}_transformItems=async e=>{const t=await this._getNextItems(e.content);return{id:e.id,title:e.name,items:NM(t.items)}};async _getNextItems(e){if(e.next){const t=(await this.transport.request(e.next,xM)).body.content;return this._getNextItems({...t,items:[...e.items,...t.items]})}return e}}let wM=null;function IM(e){return e?function(e){return!e.includes("-page")&&(0,c.QS)(e)===e}(e)?`${e}-page`:e:null}function TM(e){return wM||(wM=new CM((0,$u.k)(),e.features.enableShows),wM)}const AM=e=>t=>n=>{const i=e.getState();switch(n.type){case SM.ul:{const t={enableClientXConcertsHub:n.isClientXConcertsHubEnabled};TM(i).getSearchBrowse((e=>{const t=e.session,n=t?.overrides||{},i=(0,eb.rZ)(e);return{country:n.country||i,locale:n.locale||u.ag.getLocale()}})(i),t).then((t=>{e.dispatch((0,SM.ot)((e=>Object.keys(e).reduce(((t,n)=>{const i=e[n].items.map((e=>({...e,viewId:IM(e.viewId)}))).map((e=>e.title?{...e,title:e.title.replace(/\//g," / ")}:e));return{...t,[n]:{...e[n],items:i}}}),{}))(t)))}),(t=>{e.dispatch((0,SM.bb)(t))}));break}case SM.R$:TM(i).getItemsStyle().then((t=>{e.dispatch((0,SM.RD)((e=>Object.keys(e).reduce(((t,n)=>({...t,[IM(n)]:{...e[n]}})),{}))(t)))})).catch((t=>{e.dispatch((0,SM.Vv)(t))}))}return t(n)},PM={topGenres:null,browseAll:null,allItemsStyle:null};function OM(e=PM,t){switch(t.type){case SM.tk:return{...e,topGenres:t.data&&t.data["top-genres"]||null,browseAll:t.data&&t.data["browse-grid-mobile"]||null};case SM.vj:return{...e,allItemsStyle:t.items};default:return e}}const DM=()=>(0,Xe.vQ)("sp_key"),RM=e=>{const t=(0,$u.k)(),n=(()=>{const e=DM();return setInterval((()=>{e!==DM()&&window.location.reload()}),5e3)})();t.on(d.TransportEvent.LOGGED_OUT,(()=>{clearInterval(n),e()}))},LM=e=>t=>n=>{const i=t(n);switch(n.type){case Ku.VX:RM((()=>e.dispatch({type:Ku.y})));break;case Ku.y:(a=pt.b.getInstance(),a.build().withHost(P.SW).withHostIdentifier("https://open.spotify.com").withPath("/logout").withoutMarket().withoutAuthorization().withEndpointIdentifier("/logout").send()).then((()=>{e.dispatch((0,Ku.ls)()),window.location.assign("/")}),((e,t=!1)=>n=>(console.error(n),e&&e(n),t?Promise.reject(n):Promise.resolve(void 0)))())}var a;return i};var FM=n(68961),jM=n.n(FM),MM=n(8136),UM=n(25032);const BM="urn:x-cast:com.spotify.chromecast.secure.v1";let VM=!1;const HM=()=>window.cast?.framework.CastContext.getInstance(),GM=e=>jM()(e),WM=(e,t)=>{e.send((0,MM.I)(t))},zM=(e,t,n)=>{const i=HM();i&&(i.setOptions({receiverApplicationId:UM.cast.appId,autoJoinPolicy:"page_scoped",androidReceiverCompatible:n}),e.dispatch(Z_(i.getCastState())),i.addEventListener(window.cast?.framework.CastContextEventType.CAST_STATE_CHANGED,(({castState:t})=>e.dispatch(Z_(t)))),i.addEventListener(window.cast?.framework.CastContextEventType.SESSION_STATE_CHANGED,(({sessionState:n,session:i})=>{if(n===window.cast?.framework.SessionState.SESSION_STARTING)WM(t,{step:"transfer_requested"});else if(n===window.cast?.framework.SessionState.SESSION_STARTED){let n=null;i?.getCastDevice()?.friendlyName&&(n=GM(i.getCastDevice().friendlyName)),e.dispatch((a=n,{type:q_.SET_CONNECTING_CAST_DEVICE_ID,deviceId:a})),WM(t,{step:"receiver_app_started"})}var a})))},KM=(e,t,n)=>{if(!window.cast){window.__onGCastApiAvailable=i=>{i&&!VM&&(zM(e,t,n),VM=!0)};const i=document.createElement("script");i.async=!0,i.src="//www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",document.body.appendChild(i)}},YM=()=>{const e=HM();e&&e.requestSession()},qM=async(e,t,n,i)=>{const a=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===a.body)throw new Error("Invalid response from device-auth!");((e,t,n)=>{const i={tokenType:"accesstoken",blob:t.accessToken};e.sendMessage(BM,{type:"addUser",payload:i}),WM(n,{step:"message_from_sender"})})(n,JSON.parse(a.body),i)},ZM=(e,t,n)=>{const i=HM().getCurrentSession();if(null===i)return;i.addMessageListener(BM,((a,s)=>{const r=JSON.parse(s);WM(n,{step:"message_from_receiver"});try{if("getInfoResponse"===r.type){const t=r.payload;qM(t.deviceID,e,i,n)}else if("addUserResponse"===r.type){const e=r.payload;t.dispatch((0,KP.Tu)(e.deviceId))}else if(r.type.endsWith("Error"))throw new Error(r.payload.status)}catch(e){console.error("Failed to transfer playback to Cast device!",e)}})),((e,t)=>{const n=e.getCastDevice(),i={remoteName:n.friendlyName,deviceID:GM(n.friendlyName),deviceAPI_isGroup:n.capabilities.includes(chrome?.cast?.Capability.MULTIZONE_GROUP)};e.sendMessage(BM,{type:"getInfo",payload:i}),WM(t,{step:"message_from_sender"})})(i,n)},QM=(e,t,n,{castState:i})=>{i===window.cast?.framework.CastState.CONNECTED&&ZM(e,t,n)},JM=(e,t,{deviceInfo:n})=>{if(n&&n.is_active&&(0,dE.j)(n.type)){const i=HM()?.getCastState()===window.cast?.framework.CastState.CONNECTED,a=e.getState().playback?.connectingCastDeviceId;i&&n.id===a&&(WM(t,{step:"transfer_finished"}),e.dispatch({type:q_.RESET_CONNECTING_CAST_DEVICE_ID}))}};var $M=n(78950);var XM=n(1627);const eU=e=>t=>n=>async i=>{const a=n(i);switch(i.type){case af.Hp.CHECK_DUPLICATE_TRACKS:{const{playlistUri:n,uris:a,position:r={after:"end"}}=i;try{const{name:i}=await e.getMetadata(n),o=await e.getContents(n);let l=[...a];if((0,c.YF)(a[0])){const e=(0,Pt.PQ)(pt.b.getInstance()),{trackUris:t}=await(0,XM.Z)(a[0],0,e);l=t}const d=o.items.map((e=>e?.uri)),{duplicates:u,newUris:m}=(s=d,l.reduce(((e,t)=>{const n=s.includes(t);return{duplicates:n?[...e.duplicates,t]:e.duplicates,newUris:n?e.newUris:[...e.newUris,t]}}),{duplicates:[],newUris:[]}));0===u.length?e.add(n,l,r):1===l.length?t.dispatch((0,af.Ke)({playlistName:i,playlistUri:n,uri:l[0],position:r})):t.dispatch((0,af.Ke)({playlistName:i,playlistUri:n,uris:l,newUris:m,position:r}))}catch(t){e.add(n,a,r),window.console.error(t)}break}}var s;return a};var tU=n(22372),nU=n(21950);const iU=e=>t=>n=>i=>{const a=n(i),{type:s}=i,{session:r}=t.getState(),{isAnonymous:o}=r;switch(s){case VO.V.LOG_INTERACTION:e.send(o?(0,nU.w)(i.logData):(0,tU.p)(i.logData));break;case Gs.V5.PWA_INSTALL_COMPLETED:{const t={action_type:"unknown",action_intent:"pwa-installed",target_uri:"/pwa-install-confirmation",item_id:"pwa",view_uri:"/unknown",page:"/page"};e.send(o?(0,nU.w)(t):(0,tU.p)(t));break}}return a};var aU=n(96694);const sU={get DEFAULT_PLAYBACK_STUCK(){return u.ag.get("feedback.cant-play-track")},get FORCED_OFFLINE_MODE(){return u.ag.get("feedback.track-not-available-forced-offline")},get CANT_OFFLINE_SYNC_PLAYLIST_IN_OFFLINE_MODE(){return u.ag.get("feedback.cant-offline-sync-playlist-in-offline-mode")},get ARTIST_BANNED_BY_USER(){return u.ag.get("feedback.artist-banned-by-user")},get TRACK_BANNED_BY_USER(){return u.ag.get("feedback.track-banned-by-user")},get REGION_RESTRICTED(){return u.ag.get("feedback.track-not-available-in-region")},get DEFAULT_PLAYER_ERROR(){return u.ag.get("feedback.track-not-available")},get NETWORK_ERROR(){return u.ag.get("feedback.video-playback-network-error")},get PREMIUM_RESTRICTED(){return u.ag.get("feedback.track-exclusive-premium")},get CANT_SKIP_ADS(){return u.ag.get("feedback.cant-skip-ads")},get CANT_PLAY_DURING_ADS(){return u.ag.get("feedback.cant-play-during-ads")},get SKIP_ADS_TO_HEAR_SONG(){return u.ag.get("feedback.skip-ads-to-hear-song")},get SKIP_AFTER_DELAY(){return u.ag.get("feedback.skip-ads-after-delay")},get CAPPING_REACHED(){return u.ag.get("capping.upsell-title")},get VIDEO_GEORESTRICTED(){return u.ag.get("feedback.video-georestricted")},get VIDEO_UNSUPPORTED_CLIENT_VERSION(){return u.ag.get("feedback.video-unsupported-client-version")},get VIDEO_UNSUPPORTED_PLATFORM_VERSION(){return u.ag.get("feedback.video-unsupported-platform-version")},get VIDEO_COUNTRY_RESTRICTED(){return u.ag.get("feedback.video-country-restricted")},get VIDEO_UNAVAILABLE(){return u.ag.get("feedback.video-unavailable")},get VIDEO_CATALOGUE_RESTRICTED(){return u.ag.get("feedback.video-catalogue-restricted")},get VIDEO_PLAYBACK_ERROR(){return u.ag.get("feedback.video-playback-error")},get VIDEO_UNSUPPORTED_KEY_SYSTEM(){return u.ag.get("feedback.video-unsupported-key-system")},get EXPLICIT_CONTENT_FILTERED(){return u.ag.get("feedback.explicit-content-filtered")},get INTERRUPT_PLAYBACK_RESTRICTED(){return u.ag.get("feedback.play-after-ad")}};function rU(e){const t=e?.item??void 0;return(0,he.k6)(t)&&t.isSkippableAd}function oU(e,t){switch(t.code){case Fe.cg.PLAYBACK_STUCK:return sU.DEFAULT_PLAYBACK_STUCK;case Fe.cg.ONE_TRACK_UNPLAYABLE:case Fe.cg.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED:case Fe.cg.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED:return(n=t.reasons).includes(Fe.Su.NOT_AVAILABLE_IN_CURRENT_REGION)?sU.REGION_RESTRICTED:n.includes(Fe.Su.NOT_AVAILABLE_IN_NON_PREMIUM)?sU.PREMIUM_RESTRICTED:n.includes(Fe.Su.NOT_AVAILABLE_OFFLINE)?sU.FORCED_OFFLINE_MODE:n.includes(Fe.Su.USER_CAPPING_REACHED)?sU.CAPPING_REACHED:n.includes(Fe.Su.BANNED_BY_USER_ARTIST)?sU.ARTIST_BANNED_BY_USER:n.includes(Fe.Su.BANNED_BY_USER_TRACK)?sU.TRACK_BANNED_BY_USER:n.includes(Fe.Su.EXPLICIT_CONTENT_FILTERED)?sU.EXPLICIT_CONTENT_FILTERED:sU.DEFAULT_PLAYER_ERROR;case Fe.cg.INTERRUPT_PLAYBACK_RESTRICTED:return sU.INTERRUPT_PLAYBACK_RESTRICTED;case Fe.cg.VIDEO_GEORESTRICTED:return sU.VIDEO_GEORESTRICTED;case Fe.cg.VIDEO_UNSUPPORTED_CLIENT_VERSION:return sU.VIDEO_UNSUPPORTED_CLIENT_VERSION;case Fe.cg.VIDEO_UNSUPPORTED_PLATFORM_VERSION:return sU.VIDEO_UNSUPPORTED_PLATFORM_VERSION;case Fe.cg.VIDEO_COUNTRY_RESTRICTED:return sU.VIDEO_COUNTRY_RESTRICTED;case Fe.cg.VIDEO_UNAVAILABLE:return sU.VIDEO_UNAVAILABLE;case Fe.cg.VIDEO_CATALOGUE_RESTRICTED:return sU.VIDEO_CATALOGUE_RESTRICTED;case Fe.cg.VIDEO_PLAYBACK_ERROR:return sU.VIDEO_PLAYBACK_ERROR;case Fe.cg.VIDEO_UNSUPPORTED_KEY_SYSTEM:return sU.VIDEO_UNSUPPORTED_KEY_SYSTEM;case Fe.cg.PLAY_RESTRICTED:return t.reasons.includes(Fe.Su.AD_DISALLOW)?rU(e)?sU.SKIP_ADS_TO_HEAR_SONG:sU.CANT_SKIP_ADS:null;case Fe.cg.SKIP_TO_NEXT_RESTRICTED:return t.reasons.includes(Fe.Su.AD_DISALLOW)?rU(e)?sU.SKIP_AFTER_DELAY:sU.CANT_PLAY_DURING_ADS:null;case Fe.cg.TIMEOUT:return sU.NETWORK_ERROR;case Fe.cg.SKIP_TO_PREV_RESTRICTED:return t.reasons.includes(Fe.Su.THROTTLED)?null:sU.DEFAULT_PLAYER_ERROR;default:return sU.DEFAULT_PLAYER_ERROR}var n}var lU=n(45522);const dU=(e,t,n,i,a,s,r,o)=>l=>{const d=(e,t)=>t?u.ag.get("offline.feedback-text"):e,m=(e,t)=>t?"offline.feedback-text":e,p=e=>e?gu.nY.NOTICE:gu.nY.ERROR;globalThis.Spicetify.showNotification=(message,isError=false,msTimeout)=>g({message,feedbackType:isError?"ERROR":"NOTICE",msTimeout});const g=(h=l.dispatch,({message:e,errorKey:t,feedbackType:n=gu.nY.NOTICE,msTimeout:i=2500})=>{n===gu.nY.ERROR&&$r("feedback_banner","error",t),(0,lU.T)({hide:()=>h((0,gu.Xe)()),show:()=>h((0,gu.TB)(e,n)),msTimeout:i})});var h;const k=e.getEvents();k.addListener(ke.rg.ERROR,(({data:t})=>{!function(e,t,n){const i=oU(t,n);null!==i&&(0,lU.T)({hide:()=>e.dispatch((0,gu.Xe)()),show:()=>e.dispatch((0,gu.TB)(i)),msTimeout:4e3})}(l,e.getState(),t)})),k.addListener(ke.rg.QUEUE_ACTION_COMPLETE,(e=>{const t=l.getState(),n=t.onlineStatus&&!t.onlineStatus.online;if(e.data.action===ke.FE.ADD)e.data.error?g({message:d(u.ag.get("error.generic"),n),errorKey:m("error.generic",n),feedbackType:p(n),msTimeout:5e3}):g({message:u.ag.get("queue.added-to-queue")})}));t.getEvents().addListener(yi.XL.OPERATION_COMPLETE,(e=>{const t=l.getState(),n=t.onlineStatus&&!t.onlineStatus.online;if(e.data.operation===yi.If.ADD)e.data.error?g({message:d(u.ag.get("error.generic"),n),errorKey:m("error.generic",n),feedbackType:p(n),msTimeout:5e3}):g({message:u.ag.get("feedback.added-to-playlist-generic")})}));a.getEvents().addListener(oa.fv.OPERATION_COMPLETE,(e=>{const t=l.getState(),n=t.session.user,i=t.onlineStatus&&!t.onlineStatus.online;let a;if(e.data.error)g({message:d(u.ag.get("error.generic"),i),errorKey:m("error.generic",i),feedbackType:p(i),msTimeout:5e3});else switch(e.data.operation){case oa.Qd.SET_BASE_PERMISSION:a="VIEWER"===e.data.permissionLevel?u.ag.get("feedback.playlist-made-public"):u.ag.get("feedback.playlist-made-private"),g({message:a});break;case oa.Qd.SET_MEMBER_PERMISSION:a="VIEWER"===e.data.permissionLevel?u.ag.get("feedback.member-made-listener"):u.ag.get("feedback.member-made-contributor"),g({message:a});break;case oa.Qd.REMOVE_MEMBER:a=n?.id===e.data.username?u.ag.get("feedback.left-playlist"):u.ag.get("feedback.removed-member"),g({message:a})}}));i.getEvents().addListener(fa.Yt.OPERATION_COMPLETE,(e=>{const t=l.getState(),n=t.onlineStatus&&!t.onlineStatus.online;if(e.data.error)g({message:d(u.ag.get("error.generic"),n),errorKey:m("error.generic",n),feedbackType:p(n),msTimeout:5e3});else switch(e.data.operation){case fa.aY.ADD:g({message:u.ag.get("feedback.saved-to-your-library")});break;case fa.aY.REMOVE:g({message:u.ag.get("feedback.removed-from-your-library")});break;case fa.aY.MOVE:e.data.showAddConfirmation&&g({message:u.ag.get("feedback.saved-to-your-library")})}}));n.getEvents().addListener(sn.EW.OPERATION_COMPLETE,(async e=>{const t=l.getState(),n=t.onlineStatus&&!t.onlineStatus.online;if(e.data.error)g({message:d(u.ag.get("error.generic"),n),errorKey:m("error.generic",n),feedbackType:p(n),msTimeout:5e3});else switch(e.data.operation){case sn.pT.ADD:{const[t]=e.data.uris,n=(0,c.EC)(t)?.type;if(n===c.JM.TRACK)g({message:u.ag.get("feedback.added-to-your-liked-songs")});else if(n===c.JM.EPISODE)g({message:u.ag.get("feedback.added-to-your-episodes")});else if(n===c.JM.ARTIST)g({message:u.ag.get("web-player.your-library-x.feedback-added-to-your-artists")});else if(n===c.JM.ALBUM)g({message:u.ag.get("web-player.your-library-x.feedback-added-to-your-albums")});else if(n===c.JM.PLAYLIST||n===c.JM.PLAYLIST_V2)g({message:u.ag.get("web-player.your-library-x.feedback-added-to-your-playlists")});else if(n===c.JM.SHOW){const e=await o.getMetadata(t).then(Ja.l6);g(e?{message:u.ag.get("web-player.your-library-x.feedback-added-to-your-audiobooks")}:{message:u.ag.get("web-player.your-library-x.feedback-added-to-your-podcasts-and-shows")})}else g({message:u.ag.get("web-player.your-library-x.feedback-added-to-your-library")});break}case sn.pT.REMOVE:{const[t]=e.data.uris,n=(0,c.EC)(t)?.type;if(n===c.JM.TRACK)g({message:u.ag.get("feedback.removed-from-your-liked-songs")});else if(n===c.JM.EPISODE)g({message:u.ag.get("feedback.removed-from-your-episodes")});else if(n===c.JM.ARTIST)g({message:u.ag.get("web-player.your-library-x.feedback-removed-from-your-artists")});else if(n===c.JM.ALBUM)g({message:u.ag.get("web-player.your-library-x.feedback-removed-from-your-albums")});else if(n===c.JM.PLAYLIST||n===c.JM.PLAYLIST_V2)g({message:u.ag.get("web-player.your-library-x.feedback-removed-from-your-playlists")});else if(n===c.JM.SHOW){const e=await o.getMetadata(t).then(Ja.l6);g(e?{message:u.ag.get("web-player.your-library-x.feedback-removed-from-your-audiobooks")}:{message:u.ag.get("web-player.your-library-x.feedback-removed-from-your-podcasts-and-shows")})}else g({message:u.ag.get("feedback.removed-from-your-library")});break}}}));const v=s.getEvents();v.addListener(aU.c.ENHANCED_WITH_NUM_RECS,(e=>{g({message:u.ag.get("web-player.enhance.feedback.recommended_songs_added",e.data.numRecs)})})),v.addListener(aU.c.RECOMMENDATION_ADDED,(e=>{(0,c.nK)(e.data.uri)&&g({message:u.ag.get("web-player.enhance.feedback.added_recommendation_to_playlist")})})),v.addListener(aU.c.RECOMMENDATION_ADD_FAIL,(()=>{g({message:u.ag.get("web-player.enhance.feedback.something_went_wrong"),feedbackType:gu.nY.ERROR})})),v.addListener(aU.c.RECOMMENDATION_REMOVED,(()=>{g({message:u.ag.get("web-player.enhance.feedback.removed_recommendation")})})),v.addListener(aU.c.RECOMMENDATION_REMOVE_FAIL,(()=>{g({message:u.ag.get("web-player.enhance.feedback.something_went_wrong"),feedbackType:gu.nY.ERROR})})),v.addListener(aU.c.ENHANCE_OFFLINE_FAILURE,(({data:{uri:e}})=>{(0,c.nK)(e)&&g({message:u.ag.get("web-player.enhance.feedback.enhance_playlist_not_possible_offline"),feedbackType:gu.nY.ERROR})}));const f=r.getEvents();return f.addListener(D.zy.ADDED,(e=>{"client"===e.data.source&&"ignoreinrecs"===e.data.set&&g({message:u.ag.get("feedback.exclude-playlist-from-recommendations")})})),f.addListener(D.zy.REMOVED,(e=>{"client"===e.data.source&&"ignoreinrecs"===e.data.set&&g({message:u.ag.get("feedback.include-playlist-in-recommendations")})})),e=>t=>{const n=e(t);if(t.err&&"DUPLICATE_REQUEST_ERROR"===t.err.name)return null;const i=l.getState(),a=i.onlineStatus&&!i.onlineStatus.online;switch(t.type){case Qs.types.COPY_LINK_SUCCESS:g({message:u.ag.get("feedback.link-copied")});break;case KP.V5.PLAYBACK_ERROR:g({message:d(u.ag.get("error.playback"),a),errorKey:m("error.playback",a),feedbackType:p(a),msTimeout:1e4});break;case KP.V5.UNABLE_TO_PLAY_TRACK:g({message:u.ag.get("feedback.unable-to-play")});break;case Gs.V5.PWA_INSTALL_COMPLETED:g({message:u.ag.get("pwa.confirm")});break;case gu.zn:g({message:u.ag.get("feedback.radio.ban-track")});break;case gu.c4:g({message:u.ag.get("feedback.format-list-ban-artist",t.artistName,t.playlistName)});break;case gu.Mn:g({message:u.ag.get("feedback.format-list-ban-track",t.artistName,t.playlistName)});break;case gu.Rm:g({message:u.ag.get("feedback.added-to-your-episodes")});break;case gu.EQ:g({message:u.ag.get("feedback.removed-from-your-episodes")});break;case gu.Jf:g({message:u.ag.get("feedback.playlist-publish")});break;case gu.rp:g({message:u.ag.get("feedback.playlist-unpublish")});break;case gu.xh:g({message:u.ag.get("feedback.block-user")});break;case gu.vx:g({message:u.ag.get("feedback.unblock-user")});break;case Qs.types.EMPLOYEE_PODCASTS_AUTH_SUCCESS:g({message:u.ag.get("feedback.employee-podcast-access")})}return n}},cU=()=>e=>t=>{const n=e(t);if(t.type===VO.V.LOG_INTERACTION){const{logData:e}=t;$r(e.action_type,e.action_intent,e.item_id)}return n};let uU,mU=!1;let pU,gU=[],hU=[];const kU=e=>{try{(0,Rs.sQ)({metric_type:Bs.MetricTypes.COUNTER,what:"harmony-error",value:1,tags:{type:e}})}catch(e){}},vU=(e,t)=>(pU=function(){if(null===pe)throw new Error("Missing `instance`. Have you called `createHarmony` yet?");return pe}(),pU.on(ne.ih.LOCAL_PLAYER_ENABLED,(()=>{const e=(()=>{try{const e=localStorage.getItem(se);if(null===e)return null;const{volume:t}=JSON.parse(e);return t||null}catch(e){return null}})();null!==e&&pU.setVolume(e,"@local");try{Sj("playback_load_end");const e=bj("playback_load_start","playback_load_end","time_to_playback_ready"),[{duration:t}={}]=e;Boolean(t)&&(0,Rs.sQ)({metric_type:Bs.MetricTypes.TIMER,what:"playback-ready",value:Bs.Time.fromMillis(t).asNanos()}).catch((()=>({})))}catch(e){}})),pU.on(ne.ih.AUTHENTICATION_ERROR,(()=>{kU(ne.ih.AUTHENTICATION_ERROR)})),pU.on(ne.ih.UNRECOVERABLE_FAILURE,(({data:t})=>{const n=t.error.message||"";navigator.userAgent.indexOf("Edge")>-1?(e.dispatch(KP.J_()),kU(KP.V5.CDM_ERROR)):t.source===ne.cI.PLAYBACK&&e.dispatch(KP.cJ(t.name,t.source,n)),kU(ne.ih.UNRECOVERABLE_FAILURE)})),pU.on(ne.ih.ERROR,(({data:t})=>{if(t.error.code===ne._j.EME_LICENSE_REQUEST_WIDEVINE_ERROR&&e.dispatch(Qs.jv()),t.error.code===ne._j.MEDIA_DECODING_ERROR&&!mU){const n="media_decoding_error",i=t.source,a=t.error.message||"";e.dispatch(KP.cJ(n,i,a))}const n=t.name||t.error?.name||t.error?.code||"unknown";kU(n)})),pU.on(ne.ih.PLAYER_INITIALIZATION_DONE,(()=>{t.triggerActions(),e.dispatch({type:ZP})})),pU.on(ne.ih.PLAYER_INITIALIZATION_FAILED,(({data:t})=>{if(!navigator.webdriver&&(kU(KP.V5.CDM_ERROR),t.error)){if(t.error.message&&t.error.message.indexOf("0x80004005")>=0)return;e.dispatch(KP.J_())}})),pU.on(ne.ih.MAX_SUBSCRIPTIONS_REACHED,(({data:t})=>{e.dispatch(KP.lY(t.source)),kU(ne.ih.MAX_SUBSCRIPTIONS_REACHED)})),pU.on(ne.ih.PRODUCT_STATE_CHANGED,(()=>{})),pU.on(ne.ih.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===gU.length)try{Sj("playback_load_update"),gU=bj("playback_load_start","playback_load_update","time_to_playback_fetched");const[{duration:e}={}]=gU;Boolean(e)&&(0,Rs.sQ)({metric_type:Bs.MetricTypes.TIMER,what:"playback-fetched",value:Bs.Time.fromMillis(e).asNanos()}).catch((()=>({})))}catch(e){}!e.data.state?.paused&&hU.length})),pU.on(ne.ih.LAST_ACTIVE_DEVICE_INFO_CHANGED,(t=>{const n=t.data.deviceInfo;e.dispatch(KP.$P(n))})),pU.on(ne.ih.PROGRESS,(()=>{mU=!0})),pU),fU=(e,t)=>{const n=e.getState(),{isAnonymous:i}=(0,hu.Gg)(n);return i?null:vU(e,t)},yU="STORE_SEARCH",SU="SEARCH_HISTORY_CLEAR_DATA",bU=()=>({type:SU});var _U=n(21789);const NU=()=>e=>t=>{if(t.type===SU)localStorage.removeItem(_U.J);return e(t)},EU=()=>e=>async t=>{e(t)};function xU(e){return t=>n=>i=>{const a=n(i);switch(i.type){case Ku.y:{e.finalFlush(),t.dispatch((0,KP.Nk)()),t.dispatch(bU());const n=document.getElementById("session");n&&n.remove();break}}return a}}let CU=!1;const wU=(e,t)=>{const n=e.getEvents();return e=>(n.addListener(ke.rg.ACTION,(n=>{const i=e.getState(),a=iu(),s=null!==a&&!1===a?.seen;CU||n.data.action!==ke.zr.PLAY||(CU=!0,s&&(CU=!0,function(e){const t=encodeURIComponent(JSON.stringify({seen:e})),n=iu();null!==n&&n.seen===e||(0,Xe.pC)({name:$c,days:Jc,domain:Xc,value:t})}(!0),t.send(tu({country:i.session.userCountry,os:(0,Y.y)()})),e.dispatch((0,Qs.D8)())))})),e=>t=>e(t))},IU=()=>e=>t=>{const n=e(t);switch(t.type){case Qs.types.ENTER_FULLSCREEN:document.documentElement.classList.add("fullscreen");break;case Qs.types.LEAVE_FULLSCREEN:document.documentElement.classList.remove("fullscreen")}return n},TU={isOpen:!1},AU=(e=TU,t)=>{switch(t.type){case Lm.Hp.SHOW_ABOUT_RECS_MODAL:return{...e,isOpen:!0};case Lm.Hp.HIDE_ABOUT_RECS_MODAL:return{...e,isOpen:!1};default:return e}},PU={isOpen:!1},OU=(e=PU,t)=>{switch(t.type){case Ng.Hp.SHOW_ABOUT_SPOTIFY_MODAL:return{...e,isOpen:!0};case Ng.Hp.HIDE_ABOUT_SPOTIFY_MODAL:return{...e,isOpen:!1};default:return e}},DU={isOpen:!1,uri:"",dialog:void 0},RU=(e=DU,t)=>{switch(t.type){case $v.Hp.SHOW_AGE_RESTRICTION_MODAL:return{...e,isOpen:!0,dialog:t.dialog};case $v.Hp.GET_AGE_RESTRICTION_MODAL:return{...e,uri:t.uri};case $v.Hp.HIDE_AGE_RESTRICTION_MODAL:return{...e,isOpen:!1};default:return e}},LU={isOpen:!1,playlistUri:void 0,uris:void 0,position:void 0,playlistName:void 0,newUris:void 0},FU=(e=LU,t)=>{switch(t.type){case af.Hp.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 af.Hp.HIDE_DUPLICATE_TRACKS_DIALOG:return{...e,isOpen:!1};default:return e}},jU={ads:!1},MU=(e,t)=>(t.type,e||jU),UU={message:null,feedbackType:gu.nY.NOTICE,isHidden:!0},BU=(e=UU,t)=>{switch(t.type){case gu.Gh:return{...e,message:t.message,feedbackType:t.feedbackType||gu.nY.NOTICE,isHidden:!1};case gu.X3:return{...e,isHidden:!0};default:return e}},VU={isOpen:!1},HU=(e=VU,t)=>{switch(t.type){case Eg.Hp.SHOW_LICENSES_MODAL:return{...e,isOpen:!0};case Eg.Hp.HIDE_LICENSES_MODAL:return{...e,isOpen:!1};default:return e}},GU=e=>{const t=(0,p.ZO)();return{isBrowser:t===g.W.Web,isPWA:t===g.W.PWA,isDesktop:t===g.W.Desktop,shouldCalloutPWA:(0,p.bX)(),isDeveloperMode:e.isDeveloperMode,isVideoSupported:e.isVideoSupported}},WU=e=>(t=GU(e),n)=>n.type===Gs.V5.PWA_DISPLAY_MODE_CHANGED?GU(e):t,zU={device:null,castState:"NO_DEVICES_AVAILABLE",connectingCastDeviceId:null,radioStation:{tracks:[]}},KU=(e,t)=>{const n=t.deviceInfo;return n&&isNaN(n.volume)&&(n.volume=0),{...e,device:n}},YU=(e,t)=>({...e,castState:t.castState}),qU=(e,t)=>({...e,connectingCastDeviceId:t.deviceId}),ZU=e=>({...e,connectingCastDeviceId:null}),QU=e=>(localStorage.removeItem(se),{...e}),JU=(()=>{const e={[KP.V5.DEVICE_INFO_CHANGED]:KU,[KP.V5.PLAYBACK_CLEAR_DATA]:QU,[q_.CAST_STATE_CHANGED]:YU,[q_.SET_CONNECTING_CAST_DEVICE_ID]:qU,[q_.RESET_CONNECTING_CAST_DEVICE_ID]:ZU};return(t,n)=>{let i=null;return n.type in e&&(i=e[n.type](i||t,n)),i||t||zU}})(),$U="searchHistory",XU={contexts:(()=>{const e=localStorage.getItem($U);return e?JSON.parse(e).filter((e=>"uri"in e)):[]})()},eB=(e=XU,t)=>{switch(t.type){case yU:{const n=t.uri?((e,t,n,i)=>[{uri:e,name:t,image:n}].concat(i.filter((t=>t.uri!==e))).splice(0,4))(t.uri,t.name,t.image,e.contexts):e.contexts;try{localStorage.setItem($U,JSON.stringify(n))}catch(e){}return{...e,contexts:n}}case SU:return localStorage.removeItem($U),{...e,contexts:[]};default:return e}},tB={},nB=e=>e??tB,iB=(0,_j.UY)({premiumDialog:(e={isOpen:!1},t)=>{switch(t.type){case Wj.A:{const{product:n,country:i,policies:a}=t.data;return"premium"===n&&!a?.opt_in_trial_premium_only_market||"KR"!==i?e:{...e,isOpen:!0}}case Qs.types.HIDE_PREMIUM_MODAL:return{...e,isOpen:!1};case Qs.types.SHOW_PREMIUM_MODAL:return{...e,isOpen:!0};default:return e}},loginToListenDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.HIDE_L2L_MODAL:return{...e,isOpen:!1};case Qs.types.SHOW_L2L_MODAL:return{...e,isOpen:!0};default:return e}},signupToListenDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.HIDE_S2L_MODAL:return{...e,isOpen:!1};case Qs.types.SHOW_S2L_MODAL:return{...e,isOpen:!0};default:return e}},deletePlaylistDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.OPEN_DELETE_PLAYLIST_DIALOG:return{...e,isOpen:!0,uri:t.uri};case Qs.types.CLOSE_DELETE_PLAYLIST_DIALOG:return{...e,isOpen:!1};default:return e}},deleteFolderDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.OPEN_DELETE_FOLDER_DIALOG:return{...e,isOpen:!0,uri:t.uri,onDeleteCallback:t.onDeleteCallback};case Qs.types.CLOSE_DELETE_FOLDER_DIALOG:return{...e,isOpen:!1};default:return e}},removeFromLibraryDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.OPEN_REMOVE_FROM_LIBRARY_DIALOG:return{...e,isOpen:!0,uri:t.uri};case Qs.types.CLOSE_REMOVE_FROM_LIBRARY_DIALOG:return{...e,isOpen:!1};default:return e}},leavePlaylistDialog:(e={isOpen:!1,playlistUri:null},t)=>{switch(t.type){case Qs.types.OPEN_LEAVE_PLAYLIST_DIALOG:return{isOpen:!0,playlistUri:t.playlistUri};case Qs.types.CLOSE_LEAVE_PLAYLIST_DIALOG:return{isOpen:!1,playlistUri:t.playlistUri};default:return e}},blockUserDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.OPEN_BLOCK_USER_DIALOG:return{...e,isOpen:!0,uri:t.uri,name:t.name};case Qs.types.CLOSE_BLOCK_USER_DIALOG:return{...e,isOpen:!1};default:return e}},improvedSignupPromptDialog:(e={uri:null,isOpen:!1},t)=>{switch(t.type){case Qs.types.OPEN_SIGNUP_PROMPT_DIALOG:return{...e,uri:t.uri,isOpen:!0};case Qs.types.CLOSE_SIGNUP_PROMPT_DIALOG:return{...e,isOpen:!1};default:return e}},unsupportedBrowser:(e={message:null,isOpen:!1},t)=>{switch(t.type){case Qs.types.HIDE_UNSUPPORTED_MESSAGE:return{...e,message:null,isOpen:!1};case Qs.types.SHOW_UNSUPPORTED_MESSAGE:return{...e,message:t.message,isOpen:!0};default:return e}},offlineDeviceLimitReachedDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.HIDE_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:return{...e,isOpen:!1};case Qs.types.SHOW_OFFLINE_DEVICE_LIMIT_REACHED_MODAL:return{...e,isOpen:!0};default:return e}},playbackNotSupportedErrorDialog:(e={isOpen:!1,hasOccurred:!1},t)=>{switch(t.type){case Qs.types.HIDE_PLAYBACK_NOT_SUPPORTED_MODAL:return{...e,isOpen:!1};case Qs.types.SHOW_PLAYBACK_NOT_SUPPORTED_MODAL:return{...e,isOpen:!0,hasOccurred:!0};default:return e}},errorPage:(e={isError:!1,name:""},t)=>{switch(t.type){case KP.V5.CDM_ERROR:return{...e,isError:!0,name:"cdmerror"};case KP.V5.HARMONY_MAX_SUBSCRIPTIONS_REACHED:return{...e,isError:!0,name:"max_subscriptions_reached"};default:return e}},fullscreenMode:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.OPEN_FULLSCREEN_MODE:return{isOpen:!0};case Qs.types.CLOSE_FULLSCREEN_MODE:case Qs.types.LEAVE_FULLSCREEN:return{isOpen:!1};default:return e}},nowPlayingCover:(e={forcedExpandedState:xk.NowPlayingCoverStateEnum.none},t)=>t.type===Qs.types.SET_NOW_PLAYING_COVER_FORCED_EXPANDED_STATE?{...e,forcedExpandedState:t.forcedExpandedState}:e,connectDevicePicker:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.CONNECT_DEVICE_PICKER_OPENED:return{...e,isOpen:!0};case Qs.types.CONNECT_DEVICE_PICKER_CLOSED:return{...e,isOpen:!1};default:return e}},connectNudge:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.SHOW_CONNECT_NUDGE:return{...e,isOpen:!0};case Qs.types.HIDE_CONNECT_NUDGE:return{...e,isOpen:!1};default:return e}},videoPlayer:(e={isSubtitlesEnabled:!1,hiddenByUser:!1,mode:Yg.B.none},t)=>{switch(t.type){case qg.Iq.SET_VIDEO_MODE:return{...e,mode:t.mode};case qg.Iq.SET_HIDDEN_BY_USER:return{...e,hiddenByUser:t.hiddenByUser};default:return e}},textDirection:(e={isRTL:!1},t)=>t.type===Ys.SET_RTL_MODE?{...e,isRTL:t.isRTL}:e,history:(e={canGoBack:!1,canGoForward:!1},t)=>t.type===Qs.types.UPDATE_UI_HISTORY_STATE?t.historyState:e,keyboardShortcutsHelpModal:(e={isOpen:!1},t)=>t.type===Qs.types.SET_KEYBOARD_SHORTCUTS_HELP_VISIBILITY?{...e,isOpen:t.isOpen}:e,trackCreditsModal:(e={isOpen:!1,trackUri:""},t)=>t.type===Qs.types.SHOW_TRACK_CREDITS?{...e,isOpen:t.isOpen,trackUri:t.trackUri}:e,removeDownloadsDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.OPEN_REMOVE_DOWNLOADS_DIALOG:return{...e,isOpen:!0};case Qs.types.CLOSE_REMOVE_DOWNLOADS_DIALOG:return{...e,isOpen:!1};default:return e}},clearCacheDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.OPEN_CLEAR_CACHE_DIALOG:return{...e,isOpen:!0};case Qs.types.CLOSE_CLEAR_CACHE_DIALOG:return{...e,isOpen:!1};default:return e}},renameFolderModal:(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}},lyrics:(e={mode:IL.f.none},t)=>t.type===WE.SET_LYRICS_MODE?{...e,mode:t.mode}:e,removeDownloadConfirmationDialog:(e={isOpen:!1},t)=>{switch(t.type){case Qs.types.OPEN_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:return{uri:t.uri,isOpen:!0,onConfirm:t.onConfirm,onCancel:t.onCancel,remoteDeviceInfo:t.remoteDeviceInfo};case Qs.types.CLOSE_REMOVE_DOWNLOAD_CONFIRMATION_DIALOG:return{isOpen:!1};default:return e}},bookConsumptionCapModal:(e={isOpen:!1,consumptionCapExplanation:{title:"",body:"",cta:""}},t)=>{switch(t.type){case Qs.types.OPEN_BOOK_CONSUMPTION_CAP_MODAL:return{...e,isOpen:!0,consumptionCapExplanation:t.consumptionCapExplanation};case Qs.types.CLOSE_BOOK_CONSUMPTION_CAP_MODAL:return{...e,isOpen:!1};default:return e}}}),aB=e=>(0,_j.UY)({playback:JU,session:Ku.cY,ui:iB,feedbackBubble:BU,searchHistory:eB,features:MU,browse:OM,duplicateTracks:FU,ageRestriction:RU,platform:WU(e),ads:yM(e.container),inAppMessaging:Dm,aboutRecs:AU,seoExperiment:nB,...e.container===g.W.Desktop&&{aboutSpotify:OU,licenses:HU}}),sB=_j.qC,rB=(e,t)=>{const{session:n}=e,{platform:i,rootlistApi:a,playlistApi:s,permissionsApi:r,libraryApi:o,playbackApi:l,playerApi:d,followApi:c,showApi:u,actionStoreApi:m,enhanceApi:p,collectionPlatformApi:g}=t,h=Ts(i),k=[];var v,f,y,S,b;return h?k.push((v=t.eventSender,()=>e=>t=>{const n=e(t);return t.type===Ku.y&&v.finalFlush().finally($M.k),n})):(n?.isAnonymous||k.push((e=>t=>n=>i=>{const a=n(i),s=t.getState(),r=s.session;if(i.type in KP.V5){const{hasOccurred:e,isOpen:n}=t.getState().ui.playbackNotSupportedErrorDialog;if(e&&!n)return t.dispatch(Qs.jv()),a}switch(i.type){case Ku.VX:!uU&&r.accessToken&&(uU=fU(t,e),t.getState().features&&t.getState().features.mwp&&window.addEventListener("focus",(()=>{uU&&uU._controller&&!uU._controller._state?uU=fU(t,e):uU.getCurrentState().then((n=>{n||(uU=fU(t,e))}))})));break;case KP.V5.SET_ACTIVE_DEVICE:s.playback.device&&s.playback.device.id===i.id||uU.transfer(i.id)}return a})(m)),k.push(LM),k.push(function(e,t,n){return i=>a=>s=>{switch(s.type){case Ku.VX:KM(i,t,n);break;case q_.TOGGLE_CAST:YM();break;case q_.CAST_STATE_CHANGED:QM(e,i,t,s);break;case KP.V5.DEVICE_INFO_CHANGED:JM(i,t,s)}return a(s)}}(t.transport,t.eventSender,i.enableCastConnect))),[rO(d,o,a,c,m),(b=t.offlineApi,e=>(b.getEvents().addListener(ci.X.ERROR,(t=>{t.data.code===di.jK.DEVICE_LIMIT_REACHED&&e.dispatch((0,Qs.p)())})),e=>async t=>{e(t)})),(S=t.history.push,e=>t=>n=>{const{pathname:i,search:a,hash:s}=window.location,{dispatch:r}=e,o=e.getState(),l=new RegExp(to),{OPEN_SIGNUP_PROMPT_DIALOG:d,CLOSE_SIGNUP_PROMPT_DIALOG:c,UPDATE_UI_HISTORY_STATE:u}=Qs.types,{ANONYMOUS_COLLECTION_NAVIGATION:m,ANONYMOUS_LIKED_SONGS_NAVIGATION:p}=Xr.types;switch(n.type){case d:S({pathname:i,search:a,state:{},hash:to});break;case c:S({pathname:i,search:a,state:{},hash:""});break;case u:(0,eo.G)(o)&&!l.test(s)&&r((0,Qs.dE)());break;case m:case p:S({pathname:n.pathname,search:a,state:{},hash:""})}return t(n)}),Cj(t.deferredAction),...k,...eM(h,t.history,t.adManagers,l,d),(y=t.serviceWorkerMessenger,()=>e=>t=>{const n=e(t);return t.type===Ku.y&&y(t),n}),(f=t.ageRestrictionApi,e=>t=>async n=>{const i=t(n);if(n.type===$v.Hp.GET_AGE_RESTRICTION_MODAL)try{const t=await f.getDialog(n.uri);e.dispatch((0,$v.vQ)(t))}catch{}return i}),eU(s),xU(t.eventSender),IU,dU(d,s,o,a,r,p,g,u),xm(t.history,d),AM,NU,iU(t.eventSender),cU,wU(d,t.eventSender),EU,Nj.Z]};Sj("playback_load_start");const oB=()=>{let e=document.getElementById("main");return e||(e=document.createElement("div"),e.id="main",document.body.appendChild(e)),e};async function lB(e,t){const[n,a]=await Promise.all([e.getUser(),e.getProductState()]);if(null===n||null===a)return;const s=await js.k.hash(n.username);var r;(0,i.e)((e=>{(0,p.ZO)()===g.W.Desktop&&e.setUser({id:s}),e.setTag("product",a.product)})),t.dispatch((r={country:a.country,uri:n.uri,id:n.username,display_name:n.displayName||void 0,images:n.images.map((({url:e,width:t,height:n})=>({url:e,width:t||null,height:n||null}))),product:a.product,policies:{opt_in_trial_premium_only_market:n.optInTrialPremiumOnlyMarket},type:"user"},{type:Wj.A,data:r})),t.dispatch(function(e){return{type:Wj.e,data:e}}(a))}(0,o.hb)(),async function(){if(k()||"1"==={}.DEBUG_SENTRY){const e="xpui_2023-05-11_1683815926051_eb595a6";(0,Ls.j6)("https://de32132fc06e4b28965ecf25332c3a25@sentry.io/114855",e,{sampleRate:.001})}const e=await async function(){const e=(0,p.ZO)();return e===g.W.Desktop?(0,v.J)(e):Cs(e)}(),t=e.getSession(),n=e.getHistory(),h=e.getFeatureFlags(),f=e.getSEOExperiments(),y=e.getControlMessageAPI();(0,i.e)((t=>{Object.keys(h).forEach((e=>{t.setExtra(e,h[e])})),e.container&&t.setTag("container",e.container)})),Ms.setup(),Cg(e.container,e.operatingSystem);const S=e.getEventSender();y.getEvents().addListener("message",(e=>{if(e.data.type===m.O4.NAVIGATION&&e.data.data){const t=(0,c.EC)(e.data.data)?.toURLPath(!0),[i,a]=e.data.data.split("?"),r=new URLSearchParams(a);if(r.has("dlsi")){const e=r.get("dlsi"),n=r.get("si");if(e){const a={link:`${As.Li}${t?.slice(1)}?si=${n}`,entity_uri:i,source:navigator.userAgent,deeplink_session_id:e};S.send((0,s.K)(a))}}t&&n.push(t,{referrer:"deeplink"})}})),function(){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<=ws}()&&!h.mwp&&(window.location.href="https://www.spotify.com");const{recaptchaWebPlayerFraudSiteKey:b,gtmId:_,market:N,locale:E,userCountry:x}=(0,te.Z)("config"),C=Ts(e),w=e.getPlayerAPI(),I=e.getAuthorizationAPI(),T=e.getTransport(),A=await e.getServiceWorkerMessenger(),P=function(e,t){const{platform:n}=t,i=rB(e,t);return(0,_j.MT)(aB(n),e,sB((0,_j.md)(...i)))}({session:t,features:h,seoExperiment:f},{platform:e,history:n,playbackApi:e.getPlaybackAPI(),playerApi:w,rootlistApi:e.getRootlistAPI(),rootlist:e.getRootlistAPI(),playlistApi:e.getPlaylistAPI(),permissionsApi:e.getPlaylistPermissionsAPI(),radioStationAPI:e.getRadioStationAPI(),followApi:e.getFollowAPI(),libraryApi:e.getLibraryAPI(),library:e.getLibraryAPI(),actionStoreApi:e.getActionStoreAPI(),enhanceApi:e.getEnhanceAPI(),collectionPlatformApi:e.getCollectionPlatformAPI(),showApi:e.getShowAPI(),serviceWorkerMessenger:A,offlineApi:e.getOfflineAPI(),remoteConfigResolver:e.getRemoteConfiguration(),transport:T,eventSender:S,adManagers:e.getAdManagers(),deferredAction:Ds(sessionStorage,"ANONYMOUS_DEFERRED_ACTION_KEY"),ageRestrictionApi:new Os(pt.b.getInstance()),data:{recaptchaWebPlayerFraudSiteKey:b}});T.on(d.TransportEvent.ACCESS_TOKEN,(async()=>{const e=I.getTokenProvider(),t=await e({preferCached:!0});null!==t&&(pt.b.setSession(t),P.dispatch((0,Ku.qR)(t)))}));let O=!1;T.on(d.TransportEvent.RECONNECTING,(()=>{O=!0})),T.on(d.TransportEvent.RECONNECTED,(()=>{O=!1})),T.on(d.TransportEvent.AUTHENTICATION_FAILED,(async()=>{if(!O&&!C){const e=I.getTokenProvider(),t=await e({preferCached:!0});null!==t&&t.isAnonymous||P.dispatch((0,Ku.Tz)())}})),(0,Rs.p1)("desktop-web-player",T),function(){Bs.BrowserMetrics.getPageLoadTime().then((e=>{(0,Rs.sQ)({metric_type:Bs.MetricTypes.TIMER,what:"time-to-page-load-nanoseconds",value:(0,Bs.asNanoseconds)(Bs.Time.fromMillis(e).asNanos()),tags:{route:Hs(window.location.pathname)}})})).catch((()=>{})),Bs.BrowserMetrics.getTimeToFirstPaint().then((e=>{(0,Rs.sQ)({metric_type:Bs.MetricTypes.TIMER,what:"time-to-first-paint-nanoseconds",value:(0,Bs.asNanoseconds)(Bs.Time.fromMillis(e).asNanos()),tags:{route:Hs(window.location.pathname)}})})).catch((()=>{})),Bs.BrowserMetrics.getTimeToFirstContentfulPaint().then((e=>{(0,Rs.sQ)({metric_type:Bs.MetricTypes.TIMER,what:"time-to-first-contentful-paint-nanoseconds",value:(0,Bs.asNanoseconds)(Bs.Time.fromMillis(e).asNanos()),tags:{route:Hs(window.location.pathname)}})})).catch((()=>{}));const e=e=>{(0,Rs.sQ)(Bs.BrowserMetrics.getWebVitalsMetric({...e,label:e.name},{route:Hs(window.location.pathname)}))};(0,Us.Fu)(e),(0,Us.mw)(e),(0,Us.NO)(e),(0,Us.Yn)(e),(0,Us.a4)(e),(0,Us.mr)(e)}();const D=u.ag.getLocale();if(P.dispatch((0,Ku.zD)()),P.dispatch(Zs(D)),C){document.documentElement.setAttribute("lang",D)}yj(window.navigator,P.dispatch,w),fj((()=>{P.dispatch((0,Gs.xH)())})),kj(n,(e=>{P.dispatch((0,Qs.x0)(e))})),await lB(e.getUserAPI(),P);const R=oB();(0,Fs.cM)(),(0,a.render)((0,lr.jsx)(gj,{store:P,platform:e}),R),!C&&_&&(0,l.track)({dataLayerPushInitial:!0,googleTagManagerId:_,language:E?.locale,market:N,loggedIn:!t.isAnonymous,oneTrust:Is(),userCountry:x}),e.operatingSystem===g.U.macOS&&window.outerHeight===window.screen.height&&window.outerWidth===window.screen.width&&P.dispatch((0,Qs.rM)()),(0,o.wm)("UI init phase is done for logged-in experience"),t.isAnonymous||S.send((0,r._)({width:window.outerWidth,height:window.outerHeight,mode:0,duration:0}),{flush:!1})}().catch((e=>{(0,Ls.CG)(e),console.error(e);const t=oB();(0,a.render)((0,lr.jsx)(Mr,{}),t)}))},80964:(e,t,n)=>{"use strict";n.d(t,{aK:()=>r,l7:()=>s,qq:()=>a});var i=n(82538);const a=(e,t)=>{const n=e.contextMenuButtonFactory().hitUiReveal();t.logInteraction(n)},s=(e,t,n,a)=>{let s;e===i.mc.ADD?s=t.hitDownload({itemToDownload:a}):e===i.mc.REMOVE?s=t.hitRemoveDownload({itemToRemoveFromDownloads:a}):e===i.mc.NO_PERMISSION&&(s=t.hitUiReveal?.()),s&&n.logInteraction(s)},r=({isPlaying:e,isActive:t,spec:n,logger:i,uri:a})=>{let s;return s=e?n.hitPause({itemToBePaused:a}):t?n.hitResume({itemToBeResumed:a}):n.hitPlay({itemToBePlayed:a}),i.logInteraction(s)}},44743:(e,t,n)=>{"use strict";n.d(t,{gi:()=>i,mZ:()=>r,t3:()=>s,wH:()=>a});const i="player.play",a="library.add",s="rootlist.add",r="follow.user"},29335:(e,t,n)=>{"use strict";n.d(t,{H:()=>r,j:()=>o});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useActionStore must be used within a ActionStoreProvider");return e}},61709:(e,t,n)=>{"use strict";n.d(t,{i:()=>i});const i=e=>"spotify:artist:0LyfQWJT6nXafLPZqxe9Of"!==e.uri},80784:(e,t,n)=>{"use strict";n.d(t,{A5:()=>r,S2:()=>s,VG:()=>c,cl:()=>u});var i=n(59496),a=n(4637);const s=e=>({type:"SET_BACKGROUND_COLOR",color:e}),r=()=>({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},d=(0,i.createContext)(null),c=({children:e})=>{const[t,n]=(0,i.useReducer)(o,l);return(0,a.jsx)(d.Provider,{value:[t,n],children:e})};function u(){const e=(0,i.useContext)(d);if(null===e)throw new Error("Trying to use 'BackgroundColorContext' without 'BackgroundColorProvider'!");return e}},16201:(e,t,n)=>{"use strict";n.d(t,{Y5:()=>a.Y,Zj:()=>s.Z,cl:()=>i.cl});var i=n(80784),a=n(35725),s=n(64826)},35725:(e,t,n)=>{"use strict";n.d(t,{H:()=>o,Y:()=>r});var i=n(59496),a=n(94041),s=n(80784);function r(e,t=a.Sns){const[,n]=(0,s.cl)();return(0,i.useEffect)((()=>(null!==e&&n((0,s.S2)(e)),()=>{n((0,s.A5)())})),[e,n]),e||t}const o=({color:e,fallbackColor:t})=>(r(e,t),null)},64826:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(59496),a=n(94041),s=n(80657),r=n(80784);function o(e=null,t=a.Sns){const[{backgroundColor:n},o]=(0,r.cl)(),l=(0,s.b)(e);return(0,i.useEffect)((()=>(o((0,r.S2)(l)),()=>{o((0,r.A5)())})),[l,o]),n||t}},46895:(e,t,n)=>{"use strict";n.d(t,{dD:()=>r,TQ:()=>p,gs:()=>y,aw:()=>k});var i=n(59496),a=n(4637);const s=(0,i.createContext)({copy:()=>{}}),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t});var o=n(85830),l=n(46997),d=n(48234);const c=50,u=["meta+c"],m=["meta+shift+c"];function p(e){const t=(0,i.useContext)(s),n=(0,o.y1)((()=>{e((e=>t.copy(e)),!1)}),c,{leading:!0,trailing:!1}),a=(0,o.y1)((()=>{e((e=>t.copy(e)),!0)}),c,{leading:!0,trailing:!1});(0,d.x)(u,n),(0,d.x)(m,a),(0,l.eY)(l.O4.COPY,n),(0,l.eY)(l.O4.COPY_ADVANCED,a)}const g=500,h=["meta+v"];function k(e){const t=(0,i.useContext)(s),n=(0,o.y1)((()=>{t.paste().then((t=>e(t)))}),g,{leading:!0,trailing:!1});(0,d.x)(h,n),(0,l.eY)(l.O4.PASTE,n)}const v=50,f=["meta+x"];function y(e){const t=(0,i.useContext)(s),n=(0,o.y1)((()=>{e((e=>t.copy(e)))}),v,{leading:!0,trailing:!1});(0,d.x)(f,n),(0,l.eY)(l.O4.CUT,n)}},24014:(e,t,n)=>{"use strict";n.d(t,{XC:()=>s,yF:()=>o,zy:()=>r});var i=n(88566);const a=["artist","artistban","ban","collection","enhanced","ignoreinrecs","listenlater","show","ylpin"];function s(e){return a.includes(e)}let r=function(e){return e.ADDED="added",e.REMOVED="removed",e}({});class o extends i.r{}},87549:(e,t,n)=>{"use strict";n.d(t,{$:()=>r,s:()=>o});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useCollectionPlatformAPI must be used within a CollectionPlatformAPIProvider");return e}},29931:(e,t,n)=>{"use strict";n.d(t,{P:()=>s});var i=n(59496),a=n(87549);function s(e){const t=(0,a.s)();return{add:(0,i.useCallback)(((...n)=>t.add(e,n)),[t,e]),remove:(0,i.useCallback)(((...n)=>t.remove(e,n)),[t,e]),contains:(0,i.useCallback)(((...n)=>t.contains(e,n)),[t,e]),useContains:(0,i.useCallback)((function(...n){const[a,s]=(0,i.useState)([]);return(0,i.useEffect)((()=>{s((e=>e.length?[]:e));return t.subscribeContains(e,n,s)}),n),a}),[t,e])}}},33946:(e,t,n)=>{"use strict";n.d(t,{H:()=>a,m:()=>i});const i=56,a=42},79711:(e,t,n)=>{"use strict";n.d(t,{z:()=>a});var i=n(53016);class a extends i.vp{}},46997:(e,t,n)=>{"use strict";n.d(t,{O4:()=>d,r$:()=>s,J$:()=>r,sN:()=>c,eY:()=>o,J4:()=>l});var i=n(59496),a=n(4637);const s=(0,i.createContext)({getEvents:()=>{}}),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t});function o(e,t){const n=(0,i.useContext)(s),a=(0,i.useRef)(t);(0,i.useEffect)((()=>{a.current=t})),(0,i.useEffect)((()=>{const t=n.getEvents();function i({data:{type:t,data:n}}){t===e&&a.current(n)}return t.addListener("message",i),()=>{t.removeListener("message",i)}}),[e,n])}function l(e){const t=(0,i.useContext)(s);(0,i.useEffect)((()=>(t.enableMenuItem(e),()=>{t.disableMenuItem(e)})),[t,e])}let d=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}({}),c=function(e){return e.FILTER="enable_filter_item",e}({})},20710:(e,t,n)=>{"use strict";n.d(t,{V:()=>r,b:()=>s});const i=["ar","az","bg","cs_CZ","da","de","ee","el","en","es","es_mx","fi","fp","fr","fr_ca","he","hu","id","it","ja","ko","lt","lv","ms","mt","nb","nl","pl","pt","pt_br","ro","ru","sk","sl","sv","th_TH","tr","vi_VN","zh_HANS","zh_HANT"],a=["af","ar","am","az","be","bg","bn","bs","ca","cr","cs_CZ","da","de","el","en","es","es_419","et","eu","fa","fi","fp","fr","fr_ca","gl","gu","he","hi","hr","hu","hy","id","is","it","ja","ka","kk","km","kn","ko","ky","lo","lt","lv","mk","ml","mn","mr","ms","my","nb","ne","nl","pa","pl","pt","pt_br","ro","ru","si","sk","sl","sq","sr","sv","sw","ta","te","th_TH","tr","ua","ur","uz","vi_VN","zh_HANS","zh_HANT","zh_hk","zu"],s=e=>`images/download-badges/apple/${i.includes(e)?e:"int"}.svg`,r=e=>`images/download-badges/google/${a.includes(e)?e:"int"}.svg`},79452:(e,t,n)=>{"use strict";n.d(t,{t:()=>r});var i=n(88607),a=n(94676),s=n(38345);class r{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?s.PG[e]:e;this.localStorageAPI.setItem(a.V,t),t.filters.forEach((e=>{this.setFilterGain(e.key,e.gain)}))}getPreset(){const e=this.localStorageAPI.getItem(a.V);return e instanceof Error?s.PG.flat:e}subscribeToPresetChange(e){const t=this.localStorageAPI.getEvents(),n=t=>{if(t.data.key===a.V){const n=t.data.value;e(n)}};return t.addListener(i.u.UPDATE,n),()=>{t.removeListener(i.u.UPDATE,n)}}}},94676:(e,t,n)=>{"use strict";n.d(t,{K:()=>i,V:()=>a});const i="audio.equalizer.enabled",a="audio.equalizer.saved_preset"},38345:(e,t,n)=>{"use strict";n.d(t,{PG:()=>o,f8:()=>l,l5:()=>a});var i=n(3802);const a=12,s=[{type:"lowshelf",frequency:60,key:"audio.equalizer.low_shelf_gain_v2",gain:0},{type:"peaking",frequency:150,key:"audio.equalizer.low_peak_gain_v2",gain:0},{type:"peaking",frequency:400,key:"audio.equalizer.low_mid_peak_gain_v2",gain:0},{type:"peaking",frequency:1e3,key:"audio.equalizer.high_mid_peak_gain_v2",gain:0},{type:"peaking",frequency:2400,key:"audio.equalizer.high_peak_gain_v2",gain:0},{type:"highshelf",frequency:15e3,key:"audio.equalizer.high_shelf_gain_v2",gain:0}],r={flat:{gains:[0,0,0,0,0,0],get displayName(){return i.ag.get("equalizer.preset.flat")}},acoustic:{gains:[4.9,3.95,2.15,1.75,3.5,2.15],get displayName(){return i.ag.get("equalizer.preset.acoustic")}},bassBooster:{gains:[4.25,3.5,1.25,0,0,0],get displayName(){return i.ag.get("equalizer.preset.bassBooster")}},bassReducer:{gains:[-4.25,-3.5,-1.25,0,0,0],get displayName(){return i.ag.get("equalizer.preset.bassReducer")}},classical:{gains:[3.75,3,-1.5,-1.5,0,3.75],get displayName(){return i.ag.get("equalizer.preset.classical")}},dance:{gains:[6.55,4.99,1.92,3.65,5.15,0],get displayName(){return i.ag.get("equalizer.preset.dance")}},deep:{gains:[3.55,1.75,2.85,2.5,1.45,-2.15,-3.55,-4.6],get displayName(){return i.ag.get("equalizer.preset.deep")}},electronic:{gains:[3.8,1.2,-2.15,2.25,.85,4.8],get displayName(){return i.ag.get("equalizer.preset.electronic")}},hiphop:{gains:[4.25,1.5,-1,-1,1.5,3],get displayName(){return i.ag.get("equalizer.preset.hiphop")}},jazz:{gains:[3,1.5,-1.5,-1.5,0,3.75],get displayName(){return i.ag.get("equalizer.preset.jazz")}},latin:{gains:[3,0,-1.5,-1.5,-1.5,4.5],get displayName(){return i.ag.get("equalizer.preset.latin")}},loudness:{gains:[4,0,-2,0,-1,1],get displayName(){return i.ag.get("equalizer.preset.loudness")}},lounge:{gains:[-1.5,-.5,4,2.5,0,1],get displayName(){return i.ag.get("equalizer.preset.lounge")}},piano:{gains:[2,0,3,1.5,3.5,3.5],get displayName(){return i.ag.get("equalizer.preset.piano")}},pop:{gains:[-1,0,4,4,2,-1.5],get displayName(){return i.ag.get("equalizer.preset.pop")}},rnb:{gains:[6.92,5.65,-2.19,-1.5,2.32,3.75],get displayName(){return i.ag.get("equalizer.preset.rnb")}},rock:{gains:[4,3,-.5,-1,.5,4.5],get displayName(){return i.ag.get("equalizer.preset.rock")}},smallSpeakers:{gains:[4.25,3.5,1.25,0,-1.25,-4.25],get displayName(){return i.ag.get("equalizer.preset.smallSpeakers")}},spokenWord:{gains:[-.47,0,3.46,4.61,4.84,0],get displayName(){return i.ag.get("equalizer.preset.spokenWord")}},trebleBooster:{gains:[0,0,0,1.25,2.5,5.5],get displayName(){return i.ag.get("equalizer.preset.trebleBooster")}},trebleReducer:{gains:[0,0,0,-1.25,-2.5,-5.5],get displayName(){return i.ag.get("equalizer.preset.trebleReducer")}},vocalBooster:{gains:[-3,-3,3.75,3.75,3,-1.5],get displayName(){return i.ag.get("equalizer.preset.vocalBooster")}}},o=Object.entries(r).reduce(((e,[t,n])=>({...e,[t]:{filters:s.map(((e,t)=>Object.freeze({...e,gain:n.gains[t]}))),key:t,get displayName(){return n.displayName}}})),{});function l(e){return{key:"custom",displayName:i.ag.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})))}}},54059:(e,t,n)=>{"use strict";n.d(t,{f:()=>o,x:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useEqualizerAPI must be used within a EqualizerProvider");return e}},56570:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,Z:()=>s});var i=n(88566);let a=function(e){return e.CONNECTION_STATE_CHANGE="connection_state_change",e}({});class s extends i.r{}},35015:(e,t,n)=>{"use strict";n.d(t,{H:()=>s,e:()=>a});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use FacebookContext without FacebookProvider!");return e}},75362:(e,t,n)=>{"use strict";n.d(t,{BM:()=>a,rA:()=>s,uZ:()=>r});var i=n(88566);let a=function(e){return e.FOLLOW_USER="follow_user",e.UNFOLLOW_USER="unfollow_user",e.IS_FOLLOWING_USER="is_following_user",e}({}),s=function(e){return e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class r extends i.r{emitOperationSync(e,t){return this.emitSync(s.OPERATION,{operation:e,uris:t}).defaultPrevented}emitOperationComplete(e,t,n=null){this.emit(s.OPERATION_COMPLETE,{operation:e,uris:t,error:n})}}},93318:(e,t,n)=>{"use strict";n.d(t,{$:()=>k});var i=n(50346),a=n(59580),s=n(99123),r=n(27555),o=n(4721);const l=50,d="/me/following";async function c(e,t,n,i){const a=i.map((e=>(0,o.C)(e)));return await(0,s.s)(a,(async i=>(await e.build().withHost(r.H).withPath(n).withMethod(t).withQueryParameters({type:"user",ids:i.join(",")}).withEndpointIdentifier(`${n}?type=user&ids={ids}`).withoutMarket().send()).body),l)}async function u(e,t){t.length>0&&await c(e,"PUT",d,t)}async function m(e,t){t.length>0&&await c(e,"DELETE",d,t)}async function p(e,t){if(t.length>0){const n=(await c(e,"GET",`${d}/contains`,t))[0]||[];return t.reduce(((e,t,i)=>{const a=n[i];return e[t]=!!a,e}),{})}return{}}var g=n(75362);const h=Symbol();class k{constructor(e,t){this._builder=e,this._events=new g.uZ,this._cache=t??new a.Ct}getEvents(){return this._events}async isFollowing(e){const t={},n=[];if(this._validateURIs(e),e.forEach((e=>{const i=this._cache.get(e);void 0!==i?t[e]=i:n.push(e)})),n.length>0){const e=await this.executeOperation(g.BM.IS_FOLLOWING_USER,n,p);e!==h?Object.entries(e).forEach((([e,n])=>{this._cache.set(e,n),t[e]=n})):n.forEach((e=>{t[e]=!1}))}return t}async followUsers(e){this._validateURIs(e);await this.executeOperation(g.BM.FOLLOW_USER,e,u)!==h&&e.forEach((e=>{this._cache.set(e,!0)}))}async unfollowUsers(e){this._validateURIs(e);await this.executeOperation(g.BM.UNFOLLOW_USER,e,m)!==h&&e.forEach((e=>{this._cache.set(e,!1)}))}async executeOperation(e,t,n){if(this._events.emitOperationSync(e,t))return h;try{const i=await n(this._builder,t);return this._events.emitOperationComplete(e,t),i}catch(n){throw this._events.emitOperationComplete(e,t,n instanceof Error?n:new Error("Unknown error object")),n}}_validateURIs(e){e.forEach((e=>{if(!(0,i.Kv)(e))throw new Error(`Expected a profile URI, but got ${e}!`)}))}}},43097:(e,t,n)=>{"use strict";n.d(t,{R:()=>r,q:()=>o});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useFollowAPI must be used within a FollowAPIProvider");return e}},8951:(e,t,n)=>{"use strict";n.d(t,{d:()=>s});var i=n(59496),a=n(43097);const s=(e,t)=>{const n=(0,a.q)();(0,i.useEffect)((()=>{const i=n.getEvents();return i.addListener(e,t),()=>{i.removeListener(e,t)}}),[e,n,t])}},95335:(e,t,n)=>{"use strict";n.d(t,{H:()=>l});var i=n(59496),a=n(50346),s=n(43097),r=n(8951),o=n(75362);const l=e=>{const t=(0,s.q)(),[n,l]=(0,i.useState)(!1);if(!(0,a.Kv)(e))throw new Error(`Expected a Spotify uri in format 'spotify:user:***', got "${e}"`);const d=(0,i.useCallback)((i=>i&&!n?t.followUsers([e]):!i&&n?t.unfollowUsers([e]):Promise.resolve()),[t,n,e]);return(0,i.useEffect)((()=>{l(!1),t.isFollowing([e]).then((t=>{l(t[e]??!1)}))}),[t,e]),(0,r.d)(o.rA.OPERATION_COMPLETE,(t=>{t.data.uris.includes(e)&&!t.data.error&&(t.data.operation===o.BM.FOLLOW_USER?l(!0):t.data.operation===o.BM.UNFOLLOW_USER&&l(!1))})),[n,d]}},48234:(e,t,n)=>{"use strict";n.d(t,{x:()=>o});var i=n(59496),a=n(66685),s=n.n(a);const r=new Map;function o(e,t){const n=function(e){const t=r.get(e.toString());if(t)return t;const n=[];return s().bind(e,(()=>n.forEach((e=>e())))),r.set(e.toString(),n),n}(e);(0,i.useEffect)((()=>(n.push(t),()=>{n.splice(n.indexOf(t),1)})),[n,t])}},21085:(e,t,n)=>{"use strict";n.d(t,{N:()=>s,u:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({platformData:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t})},69634:(e,t,n)=>{"use strict";n.d(t,{R:()=>xe});class i{constructor(e,t,n){this.spotifyTransport=e,this.endpoints=t,this.imageSelection=n}getAlbum(e){return this.endpoints.Album.getAlbum(this.spotifyTransport,e).then(this.mapDefaultData)}getArtist(e){return this.endpoints.Artist.getArtist(this.spotifyTransport,e).then(this.mapDefaultData)}getEpisode(e){return this.endpoints.Show.getEpisode(this.spotifyTransport,e).then(this.mapDefaultData).then(this.mapEpisode)}getPlaylist(e){return this.endpoints.Playlist.getPlaylist(this.spotifyTransport,e).then(this.mapDefaultData)}getShow(e){return this.endpoints.Show.getShow(this.spotifyTransport,e).then(this.mapDefaultData)}getTrack(e){return this.endpoints.Track.getTrack(this.spotifyTransport,e).then(this.mapDefaultData).then(this.mapTrack)}mapEpisode=e=>({...e,episodeShowUri:e.show.uri});mapTrack=e=>({...e,smallImage:this.imageSelection(e.album.images||[],{desiredSize:210})});mapDefaultData=({body:e})=>({...e,smallImage:this.imageSelection(e.images||[],{desiredSize:210}),name:e.name,artists:e.artists?e.artists.map((({name:e,uri:t})=>({name:e,uri:t}))):[]})}class a{constructor(e){this.cosmosConnector=e}postEvent(e,t,n){return this.cosmosConnector.postEvent(e,t,n)}addNewSlot(e,t){return this.cosmosConnector.addNewSlot(e,t)}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}}var s=n(89606),r=n(65852);const o="stream";class l{enabled=!1;constructor(e,t){this.audioApi=e,this.getContextAdInfo=t}async enable(e){this.subscription=this.audioApi.cosmosConnector.increaseStreamTime(-100000000000)}async disable(){this.enabled=!1,this.subscription&&this.subscription.cancel()}async logClick(){if(!this.enabled)throw new Error("You have to enable the manager before calling logEvent");const e=await this.getContextAdInfo();if(null===e)return;const{positionMs:t,adId:n}=e;null!==n&&this.audioApi.postEvent(n,"clicked",null!==t?{playback_position:Math.round(t)}:{})}onAdMessage=e=>{if("audio"===e.format&&"play"===e.event){const t="Play"===e.ad?.metadata?.featuredAction,n={buttonMessage:e.ad?.metadata?.buttonMessage,clickUrl:(0,r.p)(e.ad.click_url),isFeaturedActionPlay:t,skippableAdDelaySeconds:parseInt(e.ad?.metadata?.skippable_ad_delay,10)||0};this.onInfoCallback&&this.onInfoCallback(n)}};getEnabled(){return this.enabled}}function d(e){return new l(new a(s.gN),e)}class c{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,n){return this.cosmosConnector.postEvent(e,t,n)}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 u{static listeners=[];static intervalId=null;static previousFocus=!1;static kPollTimeout=500;static reset(){u.listeners=[],u.previousFocus=!1,u.intervalId&&(clearInterval(u.intervalId),u.intervalId=null)}static maybeStartPolling(){null===u.intervalId&&(u.intervalId=setInterval(u.checkFocusState,u.kPollTimeout))}static maybeStopPolling(){u.intervalId&&0===u.listeners.length&&(clearInterval(u.intervalId),u.intervalId=null)}static addFocusListener(e){e.onFocusChanged(document.hasFocus()),u.listeners.push(e),u.maybeStartPolling()}static removeFocusListener(e){u.listeners=u.listeners.filter((t=>t!==e)),u.maybeStopPolling()}static checkFocusState=()=>{const e=document.hasFocus();e!==u.previousFocus&&(u.previousFocus=e,u.listeners.forEach((t=>{t.onFocusChanged(e)})))}}class m{constructor(){this.listeners=[]}addFocusListener(e){this.listeners.push(e),u.addFocusListener(e)}removeFocusListener(e){this.listeners=this.listeners.filter((t=>t!==e)),u.removeFocusListener(e)}removeAllFocusListeners(){this.listeners.forEach((e=>u.removeFocusListener(e))),this.listeners=[]}hasFocus(){return document.hasFocus()}}const p=!0,g=!1,h=[];function k(e,t){const n=b(t);if(-1===n)h.push({fn:t,msInactive:e,isActive:!1});else{const t=h[n];t.msInactive=e,clearTimeout(t.inactiveTimeout),t.inactiveTimeout=setTimeout(t.fn.bind(null,g),t.msInactive)}return v.bind(null,t)}function v(e){const t=b(e);return-1!==t&&(h.splice(t,1),!0)}function f(e){return e.addEventListener("mousemove",S),e.addEventListener("mouseup",S),e.addEventListener("keydown",S),e.addEventListener("scroll",S,!0),y.bind(null,e)}function y(e){e.removeEventListener("mousemove",S),e.removeEventListener("mouseup",S),e.removeEventListener("keydown",S),e.removeEventListener("scroll",S,!0)}function S(){h.forEach((e=>{e.isActive||(e.isActive=!0,e.fn(p)),clearTimeout(e.inactiveTimeout),e.inactiveTimeout=setTimeout((()=>{e.isActive=!1,e.fn(g)}),e.msInactive)}))}function b(e){let t=-1;return h.some(((n,i)=>n.fn===e&&(t=i,!0))),t}const _="billboard",N="foregrounded",E="backgrounded";class x{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=f(window),this.activitySubscription=k(18e4,this.onActivity),await this.billboardApi.addNewSlot(_,"video"),this.subscription=this.billboardApi.subscribeToSlotType(_,this.onAdMessage)),null}async disable(){this.enabled&&(this.resetState(),this.enabled=!1,this.listener=void 0,this.subscription&&this.subscription.cancel(),this.activitySubscription&&this.activitySubscription(),this.disableWindow&&this.disableWindow(),this.focusState.removeAllFocusListeners())}minimize(){clearInterval(this.focusMinimizeTimeoutId),clearInterval(this.minimizeTimeoutId),this.minimizeTimeoutId=window.setTimeout(this.finish,3e4),this.logEvent("collapsed",{msSinceViewed:String((new Date).getTime()-this.viewedTimestamp)})}adClick(){this.logEvent("clicked")}onRender(){this.logEvent(this.focusState.hasFocus()?N:E)}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(_,"now");break;case"play":break;case"discard":this.handleDiscard();break;default:throw new Error(`Unknown core event from ${_} slot: ${e.event}`)}}isPreviewServiceAd(e){return e&&"true"===e.is_preview}resetState(){clearInterval(this.displayTimeoutId),clearInterval(this.retryTimoutId),clearInterval(this.retryDfpTimoutId),clearInterval(this.focusMinimizeTimeoutId),clearInterval(this.minimizeTimeoutId),this.adId=void 0,this.viewedTimestamp=0,this.focusMinimizeTimeoutId=void 0}focusMinimize=()=>{clearInterval(this.focusMinimizeTimeoutId),this.listener&&this.listener.isActive()&&(this.listener.minimize(),this.minimize())};finish=()=>{clearInterval(this.minimizeTimeoutId),this.listener&&this.listener.isActive()&&(this.listener.destroy(),this.logEvent("ended"),this.resetState())};triggerAutoMinimizeIfPossible=()=>{this.listener&&this.listener.isActive()&&!this.focusMinimizeTimeoutId&&(this.focusMinimizeTimeoutId=window.setTimeout(this.focusMinimize,3e4),this.viewedTimestamp=(new Date).getTime(),this.logEvent("viewed"))};async handleApplicationGainedFocus(){if(clearTimeout(this.displayTimeoutId),clearTimeout(this.retryTimoutId),this.listener&&!this.activating){if(this.listener.isActive())return this.logEvent(N),void this.triggerAutoMinimizeIfPossible();this.activating=!0;try{await this.billboardApi.patchTargeting("focus","true"),await this.billboardApi.postToSlot(_,"now")}catch(e){}finally{this.activating=!1}}}async handleApplicationLostFocus(){if(this.listener&&this.listener.isActive())return void this.logEvent(E);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(_,"fetch")):this.retryTimoutId=window.setTimeout((()=>{this.displayBillboard()}),5e3))};async getFocusTimeoutMs(){const e=await this.billboardApi.getSlotConfiguration(_,"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(_)}mapBillboardData(e){const t=e.ad.metadata||{},n={accountUpgrade:t.accountUpgrade,accountUpgradeTracking:t.accountUpgradeTracking,clickUrl:(0,r.p)(e.ad.click_url),companionSrc:"",creativeId:t.creative_id,dummy:e.ad.dummy,id:e.ad.id,isAdaptive:!1,isPreview:"true"===t.is_preview,isValid:!0,lineItemId:t.lineitem_id,mediaSrc:""};switch(e.ad.format){case"banner":n.companionSrc=e.ad.companion_ad&&e.ad.companion_ad.url||"",n.mediaSrc=e.ad.images&&e.ad.images[0]&&e.ad.images[0].url||"";break;case"dummy":break;default:n.isValid=!1}return n}}class C{constructor(e,t,n){this.adsCoreConnector=e,this.webApi=t,this.eventSender=n}getSlot(e){return this.adsCoreConnector.fetchAdForSlot(e).then((e=>{const t=e.display.find((e=>"text/html"===e.mimeType));if(!t)throw Error("No template");return{id:e.adId,adPlaybackId:e.playbackId,media:t.mediaFileText,"mime-type":t.mimeType,height:t.height,width:t.width,bitrate:t.bitrate,duration:t.duration}}))}async logEvent(e){try{await this.eventSender.send(e)}catch(e){}}subscribeToPreview(e){throw new Error("Method not implemented on esperanto yet")}getAlgoPlaylistInfo(e){throw new Error("Method not implemented on esperanto yet")}getAlbum(e){return this.webApi.getAlbum(e)}getArtist(e){return this.webApi.getArtist(e)}getEpisode(e){return this.webApi.getEpisode(e)}getPlaylist(e){return this.webApi.getPlaylist(e)}getShow(e){return this.webApi.getShow(e)}getTrack(e){return this.webApi.getTrack(e)}}var w=n(33334),I=n(50346);class T{constructor(e,t,n,i){this.cosmosConnector=e,this.webApi=t,this.previewParser=n,this.eventSender=i}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){}}getAlgoPlaylistInfo(e){const t={"discover-weekly":"666f726d61740004","release-radar":"666f726d61740000","time-machine":"666f726d6174f00d","summerjams-a":"666f726d6174f011","summerjams-b":"666f726d6174f012","summerjams-c":"666f726d6174f013","friends-weekly":"666f726d6174f119","on-repeat":"666f726d6174f152"};return new Promise((n=>{Object.prototype.hasOwnProperty.call(t,e)?this.cosmosConnector.getSponsoredUris().then((({sponsorships:i})=>{for(let a=0;a{if("available"===t.event&&this.previewParser.isPreviewServiceAd(t.ad)){const n=this.previewParser.parsePreview(t);e({...n})}}))}}class A{parsePreview(e){const t=e.ad,{creative_id:n,id:i,display:a}=t,s={creativeId:parseInt(n,10),gid:i,hpto:JSON.parse(a[0]&&a[0].media||"")},r=s.hpto||s;let o=null;const l=r.html&&-1!==r.html.search(/id="native-elements"/),d=!r.html&&"html"===r["banner-mode"];if(l?o=this.handleNativeEl(r):d&&(o=this.renameImageBannerField(r)),o=o||r,o.bannerMode=o["banner-mode"],!o.bannerMode)throw new TypeError("hpto data looks invalid");const c=this.createInteractiveIframe(o.html);return{...o,adPlaybackId:t.ad_playback_id,loaderFrame:c}}isPreviewServiceAd(e){return e.metadata&&"true"===e.metadata.is_preview}getKeyByValue(e,t){return Object.keys(t).find((n=>t[n]===e))||""}renameImageBannerField(e){return delete e[this.getKeyByValue("html",e)],Object.assign({},e,{"banner-mode":"image"})}handleNativeEl(e){const t=document.implementation.createHTMLDocument("");t.documentElement.innerHTML=e.html;let n="";const i=t.getElementById("native-elements"),a=this.getKeyByValue("html",e);return["data-is-spotlight","data-is-exclusive","data-is-sponsored"].some((e=>(i&&i.hasAttribute(e)&&(n=e),n))),n=n.split("-").pop()||"",delete e[a],Object.assign({},e,{version:2,badge:n,"banner-mode":"native",blurb:i&&i.getAttribute("data-blurb"),"target-uri":i&&i.getAttribute("data-uri"),playBtnUri:i&&i.getAttribute("data-track-override")})}createInteractiveIframe(e){const t=encodeURIComponent(e),n=document.createElement("iframe");return n.className="ad-iframe",n.src=`data:text/html;charset=utf-8,${t}`,n.srcdoc=e,n.scrolling="no",n.marginWidth="0",n.marginHeight="0",n}}class P{constructor({initialStatus:e,onOnlineStatusChange:t}){this.isOnline=e||!0,window.addEventListener("online",(()=>{this.isOnline=!0,t?.(!0)})),window.addEventListener("offline",(()=>{this.isOnline=!1,t?.(!1)})),window.addEventListener("visibilitychange",(()=>{if(document.hidden)return;const e=navigator.onLine;this.isOnline=e,t?.(e)}))}getOnlineStatus(){return this.isOnline}}const O="visible_unknown",D={root:null,rootMargin:"",thresholds:[],observe(){},disconnect(){},takeRecords:()=>[],unobserve(){}};class R{constructor(e={threshold:[0,.5,1]}){this.currentState=O,this.intersectionObserver=D,IntersectionObserver&&(this.intersectionObserver=new IntersectionObserver(this.onObservation,e))}onObservation=e=>{const t=e[0].intersectionRatio;let n=O;1===t?n="visible_100":t>=.5?n="visible_50":t<.5&&(n="visible_0"),n!==this.currentState&&(this.currentState=n,this.callback&&this.callback(this.currentState))};observe(e,t){this.callback=t,this.intersectionObserver.observe(e)}disconnect(){this.intersectionObserver.disconnect()}}var L=n(96481);const F="hpto";class j{timeOfLastViewUpdate=0;refreshCallback=()=>{};visibilityState="";constructor(e,t,n,i,a,s){this.hptoApi=e,this.focusState=t,this.visibilityObserver=n,this.offlineObserver=i,this.appStartupId=a,this.hptoRefactorFlag=s,this.trackingPixelDiv=document.createElement("div"),this.trackingPixelDiv.setAttribute("id","ad-tracking-pixel"),this.trackingPixelDiv.style.display="none",document.body.appendChild(this.trackingPixelDiv),this.hptoRefactorFlag=s,this.appStartupId=a}subscribeToPreview(e){this.hptoApi.subscribeToPreview((async t=>{const n=await this.mapData(t);e(n)}))}onRefresh(e){this.refreshCallback=e}fetchTemplate(){return this.hptoApi.getSlot(F).catch((e=>{throw this.logErrorEvent(`fetch template error: ${e}`),this.logAdEventError("template fetch from ARS failed"),e}))}fetchCreative(e){const t=e.media||"";let n;return new Promise(((i,a)=>{window.addEventListener("message",(function t(s){if("object"==typeof s.data&&"string"==typeof s.data.type){const r=s.data.type.split(":");if("ads"!==r[0]||"hpto"!==r[1])return;if("error"===r[2]||"no-ad"===r[2])a(r[2]);else if("init"===r[2]){const t={...s.data.data.data,loaderFrame:n,adPlaybackId:e.adPlaybackId};i(t)}else a("unsupported hpto message");window.removeEventListener("message",t)}})),this.hptoRefactorFlag||(n=this.createInteractiveIframe(t),n.style.display="none",document.body.appendChild(n))})).then(this.mapData).catch((e=>{throw"no-ad"===e?this.logAdEventError(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.v)({request_type:F,error_message:e});this.hptoApi.logEvent(t)}createTrackingPixelImage=(e,t)=>{const n=document.createElement("img");return n.src=e,n.alt="",n.style.display="none",n.style.height="1px",n.style.width="1px",n.classList.add("pixel",t),n};trackPixelClicked(){if(!this.currentAd)return;const e=this.currentAd.click,t=e?decodeURIComponent(e.replace(/&/g,"&")):null;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"];this.createTrackingList(e,t).map((e=>this.createTrackingPixelImage(e,"view-tracking"))).forEach((e=>{this.trackingPixelDiv.appendChild(e)}))}logViewed(){this.timeOfLastViewUpdate=Date.now(),this.log("event_viewed"),this.trackPixelViewed()}maybeTriggerRefresh(){if(!this.offlineObserver.getOnlineStatus())return;Date.now()-this.timeOfLastViewUpdate>=18e5&&this.focusState.hasFocus()&&("visible_50"===this.visibilityState||"visible_100"===this.visibilityState)&&this.refreshCallback?.()}viewRendered(e){this.timeOfLastViewUpdate=Date.now(),this.focusState.removeAllFocusListeners(),this.focusState.addFocusListener(this),this.visibilityObserver.observe(e,this.onVisibilityChanged)}viewDestroyed(){this.focusState.removeAllFocusListeners(),this.visibilityObserver.disconnect(),this.log("event_unload"),this.currentAd=null}onFocusChanged(e){e?(this.maybeTriggerRefresh(),this.log("event_foregrounded")):this.log("event_backgrounded")}onVisibilityChanged=e=>{const t=this.visibilityState;this.visibilityState=e;"visible_0"===t&&("visible_50"===e||"visible_100"===e)&&this.maybeTriggerRefresh(),this.log(`event_${e}`)};log=(e,t="")=>{if(this.currentAd){const n=(0,L.X)({slot:F,app_startup_id:this.appStartupId,event:e,lineitem_id:String(this.currentAd.lineItemId),creative_id:String(this.currentAd.creativeId),ad_id:String(this.currentAd.creativeId),format:`hpto ${this.currentAd.bannerMode}`,request_id:String(this.currentAd.adPlaybackId),event_source:t?`client-${t}`:"client"});this.hptoApi.logEvent(n)}};logAdEventError=e=>{const t=(0,L.X)({slot:F,app_startup_id:this.appStartupId,event:"event_error",event_reason:e,event_source:"client"});this.hptoApi.logEvent(t)};mapData=async e=>{this.currentAd={...e};let t=e["target-uri"],n=(0,I.EC)(t)?.type,i={episodeShowUri:""},a=e.playBtnUri||t;if("native"===e.bannerMode){const e=await this.hptoApi.getAlgoPlaylistInfo(t);e&&(t=e.uri,a=e.playBtnUri,n=e.uriType),i=await this.getNativeData(t,n)}const s=e.blurb,o=(e.badge||"").toLowerCase(),l=e["background-color"],d=l&&"#"===l[0]?l:`#${l}`,c=e["background-image"],u=(0,r.p)(e["background-url"]),m=u&&u.replace(/&/g,"&"),p="sponsored"===e.nativeHptoType;return{...e,...i,isSponsored:p,uri:i.episodeShowUri||t,uriType:n,badgeType:o,playBtnUri:a,backgroundColor:d,backgroundUrl:u,backgroundImage:c,clickThroughUrl:m,description:s}};createTrackingList(e,t){return e?e.filter(Boolean).map((e=>decodeURIComponent(e.replace(/&/g,"&")))):t?[decodeURIComponent(t.replace(/&/g,"&"))]:[]}createInteractiveIframe(e){const t=encodeURIComponent(e),n=document.createElement("iframe");return n.className="ad-iframe",n.src=`data:text/html;charset=utf-8,${t}`,n.srcdoc=e,n.scrolling="no",n.marginWidth="0",n.marginHeight="0",n}getNativeData(e,t){if(!e||!t)return Promise.reject(`error when getting native data: uri: ${e} uriType: ${t}`);const n=e.split(":").pop();if(!n)return Promise.reject("error when getting native data: id not found");switch(t){case I.JM.SHOW:return this.hptoApi.getShow(n);case I.JM.TRACK:return this.hptoApi.getTrack(n);case I.JM.ALBUM:return this.hptoApi.getAlbum(n);case I.JM.PLAYLIST:case I.JM.PLAYLIST_V2:return this.hptoApi.getPlaylist(n);case I.JM.EPISODE:return this.hptoApi.getEpisode(n);default:return Promise.reject(`error when getting native data ${e} is not valid`)}}}function M({webHptoApi:e},t,n,i,a,r){return new j(a?new C(i,e,t):new T(s.gN,e,new A,t),new m,new R,new P({}),n,r)}var U=n(25899),B=n(85270);const V=2e4,H={displayTimeIntervalMs:V,timeInViewThresholdMs:15e3};class G{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 H}}normalizeConfig(e){if(e){const t={displayTimeIntervalMs:V,timeInViewThresholdMs:15e3};return Object.prototype.hasOwnProperty.call(e,"display_time_interval")&&(t.displayTimeIntervalMs=1e3*e.display_time_interval),t}return H}async getSlot(e){try{const t=await this.cosmosConnector.fetchAdForSlot(e),n=t.display.find((e=>"text/html"===e.mime_type));return{html:n?n.media:t.html,adDisplay:n}}catch(e){throw Error(`Slot Request failed ${e}`)}}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}}const W={"Spotify-App-Version":"WebPlayer","App-Platform":"1.0.0"};class z{constructor(e,t){this.adsApi=e,this.spotifyTransport=t}addSlot(){return Promise.resolve()}getConfig(){return this.adsApi.getAdsManagerConfig(this.spotifyTransport,W).then((e=>e&&e.ok&&e.body?this.normalizeConfig(e.body.leaderboard):H),(e=>{if("DUPLICATE_REQUEST_ERROR"!==e.name)throw e;return H}))}normalizeConfig(e){if(e){const t={displayTimeIntervalMs:V,timeInViewThresholdMs:15e3};return Object.prototype.hasOwnProperty.call(e,"focus_time_elapsed_ms")&&(t.displayTimeIntervalMs=e.focus_time_elapsed_ms),t}return H}getSlot(e){return this.adsApi.getAdsManagerSlot(this.spotifyTransport,e,W).then((t=>{if(t&&t.ok&&t.body)return t.body.pod[e][0];throw Error("Slot Request failed")})).then((e=>{const t=e.display.find((e=>"text/html"===e.mimetype));return{html:e.html,displayAd:t}}))}logEvent(){return Promise.resolve()}subscribeToSlotType(){return{cancel:()=>{}}}}class K{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()}}class Y{constructor(){this.bindedVisibilityHandler=this.handleAppVisibilityChange.bind(this)}onNavigationChanged(){}onlineStateChanged(){}setRefreshDelegate(e){this.delegate=e}async onViewLoaded(){await this.scheduleRefresh(),document.addEventListener("visibilitychange",this.bindedVisibilityHandler)}onViewUnloaded(){document.removeEventListener("visibilitychange",this.bindedVisibilityHandler),this.disableRefresh()}onLeaderboardEnabled(){this.triggerRefresh()}onLeaderboardDisabled(){this.onViewUnloaded()}async handleAppVisibilityChange(e){("function"==typeof e.composedPath&&e.composedPath()&&e.composedPath()[0]||document).hidden?this.disableRefresh():await this.scheduleRefresh()}scheduleRefresh(){return this.delegate.requestConfig().then((e=>{clearTimeout(this.refreshTimeout),this.refreshTimeout=setTimeout(this.triggerRefresh.bind(this),e.displayTimeIntervalMs)}))}disableRefresh(){clearTimeout(this.refreshTimeout)}triggerRefresh(){this.delegate&&this.delegate.refreshLeaderboard()}}var q=n(55530),Z=n.n(q),Q=n(71666);const J="leaderboard";class ${useIframeSrcDoc=!1;fetching=!1;enabled=!1;currentAd={creativeId:null,lineitemId:null};constructor(e={},t,n,i,a,s,r){this.appStartupId=r,this.frameSrc=e.frameSrc,this.useIframeSrcDoc=e.useIframeSrcDoc||!1,this.focusState=i,this.leaderboardApi=t,this.refreshDecisioner=n,this.refreshDecisioner.setRefreshDelegate(this),this.leaderboardWrapper=null,this.eventSender=a,this.history=s,this.appStartupId=r,this.offlineObserver=new P({onOnlineStatusChange:e=>this.refreshDecisioner.onlineStateChanged(e)})}enableLeaderboard(){this.enabled=!0,this.enableLeaderboardMessageHandler(),this.refreshDecisioner.onLeaderboardEnabled(),this.subscription=this.leaderboardApi.subscribeToSlotType(J,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,Q.u)({ad_playback_id:this.adPlaybackId,view_uri:this.history.location.pathname,event:e}));const t=(0,L.X)({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=Z().create().hex,e))).catch((e=>{throw new Error(`LeaderboardManager: cant get slot. ${e}`)}))}async fetchAndDisplayLeaderboard(){if(!this.frameSrc)throw new Error("LeaderboardManager: frameSrc must be specified in options. Point it to a blank page on the same domain.");this.domTarget&&(this.fetching||this.enabled&&(this.fetching=!0,this.requestSlot(J).then((e=>{const t=e.html,n=e.adDisplay&&e.adDisplay.width?e.adDisplay.width:"728",i=e.adDisplay&&e.adDisplay.height?e.adDisplay.height:"90";return this.fetching=!1,this.renderLeaderboard(t,n,i)})).catch((e=>{throw this.fetching=!1,Error(`Slot Request and display failed: ${e}`)}))))}onAdMessage=e=>{if(this.isPreviewServiceAd(e.ad.metadata)){if(!e.ad.display||e.ad.display.length<1)throw new Error(`Unknown core event from ${J} slot: ${e.event}`);const t=e.ad.display[0],n=t.media,i=t&&t.width?t.width:"728",a=t&&t.height?t.height:"90";this.renderLeaderboard(n,i,a)}};isPreviewServiceAd(e){return e&&"true"===e.is_preview}renderLeaderboard(e,t,n){const i=document.createElement("iframe");i.addEventListener("load",this.adFrameLoaded.bind(this,e,i)),i.setAttribute("sandbox",["allow-top-navigation-by-user-activation","allow-forms","allow-modals","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin","allow-scripts",/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?"":"allow-presentation"].join(" ")),i.setAttribute("width",t),i.setAttribute("height",n),i.setAttribute("id","leaderboard-ad-element"),i.setAttribute("src",this.frameSrc),this.useIframeSrcDoc&&i.setAttribute("srcdoc",e),i.setAttribute("tab-index","-1"),this.leaderboardWrapper=document.createElement("div"),this.leaderboardWrapper.setAttribute("aria-hidden","true"),this.leaderboardWrapper.appendChild(i),this.domTarget.innerHTML="",this.domTarget.appendChild(this.leaderboardWrapper)}adFrameLoaded(e,t,n){const i=n.composedPath&&n.composedPath()&&n.composedPath()[0].contentWindow||t.contentWindow;this.refreshDecisioner.onViewLoaded(),this.focusState.addFocusListener(this),this.useIframeSrcDoc||i.postMessage({type:"html",html:e},this.getFrameSrcOrigin());const a=()=>{this.logLeaderboardEvent("event_unload"),this.refreshDecisioner.onViewUnloaded(),this.focusState.removeFocusListener(this),i.removeEventListener("unload",a)};i.addEventListener("unload",a)}getFrameSrcOrigin(){return this.frameSrc.indexOf("http")>-1?this.frameSrc.slice(0,this.frameSrc.indexOf("/","https://".length)):location.origin}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()}}function X(e,t,n,i){const a=new m,r=e?new G(s.gN):new z(B.fi,U.b.getInstance()),o=e?new K(a):new Y;return new $({frameSrc:e?"/blank.html":"/blank",useIframeSrcDoc:e},r,o,a,t,n,i)}class ee{constructor(e){this.eventSender=e}async getSponsoredUris(){return(await s.gN.getSponsoredUris()).sponsorships}getSponsorshipAd(e){return s.gN.getSponsorshipAd(e).catch((e=>{this.eventSender.send((0,w.v)({request_type:"sponsored",error_message:JSON.stringify({reason:e})}))}))}async subscribeToPreview(e){const t="sponsored-playlist";return await s.gN.addNewSlot(t).catch((e=>{this.eventSender.send((0,w.v)({request_type:"sponsored playlist",error_message:JSON.stringify({error:e})}))})),s.gN.subscribeToSlot(`sp://ads/v1/slots/${t}`,(t=>{const n=(new DOMParser).parseFromString(t.ad.display[0].media,"text/html"),i=JSON.parse(n.querySelector('[data-template="sponsored-playlist"]').innerText);e({...i.sponsoredPlaylist,logoUrl:i.sponsoredPlaylist.logo})}))}async logEvent({event:e,ad_format:t,lineitem_id:n,creative_id:i,ad_id:a}){this.eventSender.send((0,L.X)({event:e,format:t,lineitem_id:n,creative_id:i,ad_id:a,event_source:"client"}))}}class te{constructor(e){this.eventSender=e}async getSponsoredUris(){return(await B.OK.getSponsoredPlaylists(U.b.getInstance())).body.sponsorships}async getSponsorshipAd(e){return(await B.OK.getSponsoredPlaylistAd(U.b.getInstance(),e)).body}logEvent(e){return this.eventSender.send((0,L.X)({...e,format:e.ad_format}))}async subscribeToPreview(){return{cancel:()=>{}}}}class ne{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 ie(e,t){const n=e?new ee(t):new te(t);return new ne(n)}class ae{constructor(e){this.cosmosConnector=e}addNewSlot(e,t){return this.cosmosConnector.addNewSlot(e,t)}patchTargeting(e,t){return this.cosmosConnector.patchTargeting(e,t)}subscribeToSlotType(e,t){return this.cosmosConnector.subscribeToSlotType(e,t)}postEvent(e,t,n){return this.cosmosConnector.postEvent(e,t,n)}}class se{constructor(e,t){this.vastEventsTracker=e,this.vtoTracker=t}onResumed(){this.vtoTracker.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 re=n(78476);let oe=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 le{constructor(e){this.trackingCallback=e,this.lastLadderPosition=0,this.isMuted=!1,this.isStarted=!1,this.isPaused=!1,this.volume=-1,this.duration=-1,this.position=-1}getVastEventLadderPosition(e){switch(e){case oe.STARTED:return 1;case oe.FIRST_QUARTILE:return 2;case oe.MIDPOINT:return 3;case oe.THIRD_QUARTILE:return 4;case oe.SKIPPED:case oe.ENDED:case oe.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())}onResumed(){this.isStarted?this.isPaused&&(this.isPaused=!1,this.processEvent(oe.RESUMED)):(this.isStarted=!0,this.processEvent(oe.STARTED))}onPaused(){this.isPaused=!0,this.processEvent(oe.PAUSED)}onVolumeChanged({volume:e}){this.volume=e,this.processEvent(oe.VOLUME_CHANGE),e>0&&this.isMuted?(this.isMuted=!1,this.processEvent(oe.UNMUTED)):0!==e||this.isMuted||(this.isMuted=!0,this.processEvent(oe.MUTED))}onPlaybackEnded({reason:e}){switch(e){case re.xu.REQUESTED:this.processEvent(oe.SKIPPED);break;case re.xu.FATAL_ERROR:case re.xu.NETWORK_ERROR:this.processEvent(oe.ERRORED);break;case re.xu.PLAYED_TO_END:this.processEvent(oe.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(oe.FIRST_QUARTILE),e>=.5&&this.processEvent(oe.MIDPOINT),e>=.75&&this.processEvent(oe.THIRD_QUARTILE)}))}}class de{constructor(e,t){this.listener=e,this.adId=t,this.isStarted=!1,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}}onResumed(){this.isStarted||(this.isStarted=!0,this.listener.onStarted(this.createPayload()))}onVolumeChanged({volume:e}){this.volume=e,this.listener.onStateUpdate(this.createPayload())}onDurationChanged({duration:e}){this.duration=e,this.listener.onStateUpdate(this.createPayload())}onPlaybackCreated({initialConfiguration:e,timeObservable:t}){this.position=e.position,this.volume=e.volume,t.addObserverForPeriodicEvents(.4,(e=>{this.position=e,this.listener.onStateUpdate(this.createPayload())})),this.listener.onCreated(this.createPayload())}onPlaybackEnded({reason:e}){this.listener.onEnded(this.createPayload(),e)}onReady(){this.firstReadyDone||this.listener.onReady(),this.firstReadyDone=!0}}const ce=(e,t)=>n=>"true"===n.metadata?.is_advertisement?new se(new le(e(n.metadata.ad_id)),new de(t,n.metadata.ad_id)):null,ue=e=>(t,n)=>s.gN.postEvent(e,t,{event_data:{clientReportedUserAgent:navigator.userAgent,volume:n.volume.toString(),duration:n.duration.toString()},playback_position:Math.floor(1e3*n.position)});var me=n(78573);function pe(){const e=new me.hf(new m,new ae(s.gN));return{manager:e,factories:[ce(ue,e)]}}class ge{constructor(e,t,n){this.focusState=t,this.setAdStateKey=e,this.focusState.addFocusListener(this),this.history=n,this.history.listen((e=>{this.setAdStateKey("view_uri",e.pathname)}))}onFocusChanged(e){this.setAdStateKey("focus",e?"true":"false")}}function he(e){return new ge(s.gN.setAdStateKey,new m,e)}var ke=n(58985),ve=n(10427),fe=n(71182);const ye=new class{#e=new ke.AdsClient((0,ve.G)());postEvent=fe.postEvent;async fetchAdForSlot(e){const t=(await this.#e.getAds(ke.GetAdsRequest.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]}},Se=(e,{webHptoApi:t},n,i,a,r,o,l)=>()=>({audio:d(a),vto:pe(),hpto:M({webHptoApi:t},i,r,ye,o,l),billboard:new x(new c(s.gN),new m),leaderboard:X(e,i,n,r),sponsoredPlaylist:ie(e,i),...e?{adStateReporter:he(n)}:{}});var be=n(81090),_e=n(22508),Ne=n(4464),Ee=n(27509);function xe(e){const{container:t,hptoRefactorFlag:n,history:a,eventSender:s,appStartupId:r,playerAPI:o,esperantoAdsMigrationFlag:l}=e;return Se(t===be.W.Desktop,{webHptoApi:new i(U.b.getInstance(),{Album:B.dp,Artist:B.xh,Playlist:B.gO,Track:B.fQ,Show:B.di},Ee.o)},a,s,(async()=>{const e=o.getState(),t=e?.item??void 0;return null!==e&&(0,_e.k6)(t)?{positionMs:(0,Ne.k)(e),adId:t.id}:null}),r,l,n)()}},37135:(e,t,n)=>{"use strict";n.d(t,{u:()=>a});var i=n(3802);function a(e,t,n){i.ag.setDictionary(e),i.ag.setLocale(t),i.ag.setUrlLocale(n)}},80588:(e,t,n)=>{"use strict";n.d(t,{d:()=>s});var i=n(25899),a=n(97411);function s(e,t,n,s){(0,a.J)(e),i.b.setLocale(t.locale),i.b.setMarket(t.market),i.b.setSession(t),i.b.setGlobalRequestHeaders([["App-Platform",s],["Spotify-App-Version",n]])}},27998:(e,t,n)=>{"use strict";n.d(t,{J:()=>Zo,q:()=>Yo});var i=n(8927),a=n(38366),s=n(49264),r=n(74583),o=n(31715),l=n(73229),d=n(79221),c=n(16320),u=n(83112),m=n(83477),p=n(3802),g=n(89606),h=n(13889),k=n(56969),v=n(96694);class f extends k.t{constructor(e,t,n,i){super(e,t,n),this._collection_platform=i}async setIsEnhanced(e,t,n){if(!navigator.onLine&&t)return void this.getEvents().emit(v.c.ENHANCE_OFFLINE_FAILURE,{uri:e});t&&(this._getPageShouldEmitEnhancedWithRecs=!0);const i=h.Ht.fromPartial({set:h.hO.ENHANCED,items:[e]});await this._collection_platform[t?"add":"remove"](i),this.getEvents().emit(t?v.c.ENHANCED:v.c.DEHANCED,{uri:e}),this.updatePlayContextIfApplicable(e,n)}async getContextState(e){const t=h.Ht.fromPartial({items:[e],set:h.hO.ENHANCED}),{items:n}=await this._collection_platform.get(t);let i;const a=n?.[0]?.uri===e;return a?(i=n?.[0]?.addTime,{isEnhanced:a,iteration:i}):{isEnhanced:!1,iteration:void 0}}subscribeToContextState(e,t){this.getContextState(e).then((e=>t(null,e)));const n=h.Ht.fromPartial({set:h.hO.ENHANCED,items:[e]});return this._collection_platform.streamContains(n,(async({contains:n})=>{t(null,!0===n?.found?.[0]?await this.getContextState(e):{isEnhanced:!1,iteration:void 0})})).cancel}}var y=n(20455);const S="ui.right_panel_content";class b{constructor(e){this.prefs=e}listeners=[];_lastCachedPanelState=null;getLastCachedPanelState(){return this._lastCachedPanelState}subscribeToPanelState(e){const t=this.prefs.sub({key:S},(({entries:t})=>{const n=t[S]?.number,i=(e=>{switch(e){case y.s.BuddyFeed:return y.s.BuddyFeed;case y.s.NowPlayingView:return y.s.NowPlayingView;case y.s.WhatsNewFeed:return y.s.WhatsNewFeed;case y.s.Puffin:return y.s.Puffin;default:return Spicetify.Panel?.hasPanel?.(e)?e:0;return y.s.Disabled}})(n?parseInt(n,10):y.s.Disabled);this._lastCachedPanelState=i,e(i)}));return this.listeners.push(e),()=>{const n=this.listeners.indexOf(e);-1!==n&&this.listeners.splice(n,1),t.cancel()}}async setPanelState(e=y.s.Disabled){const t={number:e.toString(),bool:void 0,string:void 0};this._lastCachedPanelState=e,this.listeners.forEach((t=>t(e))),await this.prefs.set({entries:{[S]:t}})}}var _=n(27652);class N{cleanActions(){}triggerActions(){}storeAction(){}}class E{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 x=n(24014);const C={artist:h.hO.FOLLOWED_ARTISTS,artistban:h.hO.BANNED_ARTISTS,ban:h.hO.BAN,collection:h.hO.COLLECTION,enhanced:h.hO.ENHANCED,ignoreinrecs:h.hO.IGNOREINRECS,listenlater:h.hO.LISTENLATER,show:h.hO.SHOW,ylpin:h.hO.PINNED_YOUR_LIBRARY};class w{events=new x.yF;constructor(e){this._service=e}getEvents(){return this.events}async add(e,t){await this._service.add(h.Ht.fromPartial({set:C[e],items:t})),this.events.emit(x.zy.ADDED,{set:e,uris:t,source:"client"})}async remove(e,t){await this._service.remove(h.Ht.fromPartial({set:C[e],items:t})),this.events.emit(x.zy.REMOVED,{set:e,uris:t,source:"client"})}async contains(e,t){const n=await this._service.contains(h.Ht.fromPartial({set:C[e],items:t}));return n.contains?n.contains.found:new Array(t.length).fill(!1)}subscribeContains(e,t,n){return this._service.streamContains(h.Ht.fromPartial({set:C[e],items:t}),(({contains:e})=>{n(e?e.found:new Array(t.length).fill(!1))})).cancel}}var I=n(33946),T=n(79711);class A extends T.z{_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 P{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})}getEvents(){return function(e){return new A(e,["sp://messages/v1/container/control","sp://desktop/v1/navigation"])}(this._cosmos)}}var O=n(79452),D=n(38345);const R=2**31-1,L=e=>Math.round(e/D.l5*R).toString();class F extends O.t{constructor(e,t){super(t),this.prefs=e}subscribeToEnabledState(e){return this.prefs.sub({key:"audio.equalizer_v2"},(t=>{const n=!!t.entries["audio.equalizer_v2"].bool;e(n)})).cancel}setEnabledState(e){this.prefs.set({entries:{"audio.equalizer_v2":{bool:e}}})}async setFilterGain(e,t){await this.prefs.set({entries:{[e]:{number:L(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._numListeners++,null===this._subscription&&(this._subscription=this._cosmos.sub(M,(e=>{this.emit(j.D.CONNECTION_STATE_CHANGE,e)})))})),this.onRemoveListener(j.D.CONNECTION_STATE_CHANGE,(()=>{this._numListeners--,null!==this._subscription&&0===this._numListeners&&(this._subscription.cancel(),this._subscription=null)}))}connect(e){return this._cosmos.put(M,e)}disconnect(){return this._cosmos.del(M)}}var B=n(93318),V=n(69634),H=n(80588),G=n(57920);const W=(e,t)=>{const n=e.event_sender_context_information;return[(0,G.UY)({version_code:n.client_version_int,version_string:n.client_version_string}),(0,G.jx)(t),(0,G.IE)(n.installation_id),(0,G.CF)({device_id:n.device_id,device_manufacturer:n.device_manufacturer,device_model:n.device_model,os_version:n.os_version,platform_type:n.platform_type})]},z=(e,t,n,i,a)=>(0,G.mi)({transport:t,suppressPersist:false,context:W(e,n),storagePrefix:n,ownerProvider:i,useOptimizedESS2NA:a});var K=n(44007);const Y=(0,K.v)();async function q(){try{const e=await Y.get("sp://remote-config-overrides/v1/values");return c.VK.fromJSON(e["desktop-ui"]||{})}catch(e){return console.warn(e),c.VK.builder().build()}}const Z=/Spotify\/(?.+)\s/;var Q=n(95357),J=n(67589);const $={"Master Build":"(master)","Release Build":"(release)","PR Build":"(pull request)","Local Build":"(local development)"};class X{constructor(e){this._cosmos=e}async getVersionInfo(){const e=await this._cosmos.get("sp://desktop/v1/version"),t=$[e.build_type]||"Spotify (unknown)";return{containerVersion:e.version,containerBuildType:t,containerPlatform:e.platform,uiVersion:"xpui_2023-05-11_1683815926051_eb595a6",cefVersion:e.cef}}subscribe(e){return this._cosmos.sub("sp://desktop/v1/upgrade/status",(t=>{void 0!==t.pending?e({state:J.J.UPDATE_AVAILABLE,version:t.pending.version}):void 0!==t.downloading?e({state:J.J.UPDATE_PROCESSING,version:t.downloading.version}):void 0!==t.prepared?e({state:J.J.UPDATE_READY,version:t.prepared.version}):e({state:J.J.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 ee=n(59580),te=n(50346),ne=n(58673),ie=n(9374);async function ae(e,t,n){const i=n.tracks.filter((e=>!!e.uri)).slice(1).map((e=>function(e){return(0,te.wj)(e.uri)||(0,te.dB)(e.uri)?{type:ie.p.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:ie.p.ALBUM,uri:e.album_uri??"",name:e.metadata.album_title,images:[{url:e.metadata.image_url}]},artists:[{type:ie.p.ARTIST,uri:e.artist_uri??"",name:e.metadata.artist_name??""}],mediaType:"audio",provider:null,uid:null}:(0,te.hn)(e.uri)?{type:ie.p.EPISODE,uri:e.uri,name:e.metadata.title,duration:{milliseconds:parseInt(e.metadata.duration,10)},images:[{url:e.metadata.image_url}],show:{type:ie.p.SHOW,uri:e.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,ne.f_)(e,t,i)}catch(e){console.error(e)}return{items:i.map((e=>t.get(e.uri)??e))}}const se=e=>(t,n=!1)=>{let i;return(...a)=>{n?n=!1:(clearTimeout(i),i=setTimeout((()=>{e.apply(e,a)}),t))}};var re=n(30916);class oe extends re.k{_subscriptions={[re.G.UPDATE]:null};constructor(e,t,n){super(),this._cosmos=e,this._loader=t,this._cache=n}startListening(){null===this._subscriptions[re.G.UPDATE]&&(this._subscriptions[re.G.UPDATE]=this._cosmos.sub("sp://play-history/v1",se((async e=>{this.emit(re.G.UPDATE,await ae(this._loader,this._cache,e))}))(100,true),(()=>{})))}stopListening(){const e=this._subscriptions[re.G.UPDATE];null!==e&&(e.cancel(),this._subscriptions[re.G.UPDATE]=null)}}class le{_cache=new ee.tp(36e5,3e5);constructor(e,t){this._cosmos=e,this._loader=t,this._events=new oe(this._cosmos,this._loader,this._cache)}async getContents(){const e=await this._cosmos.get("sp://play-history/v1");return ae(this._loader,this._cache,e)}getEvents(){return this._events}getCapabilities(){return{isSupported:!0}}}class de{constructor(e){this._scrobble=e}subscribeToPrivateSession(e){const t=this._scrobble.subIncognitoMode(u.SubIncognitoModeRequest.fromPartial({}),(t=>{e(t.incognitoMode)}));return()=>{t.cancel()}}async setPrivateSession(e){await this._scrobble.putIncognitoMode(u.PutIncognitoModeRequest.fromPartial({incognitoMode:e}))}getCapabilities(){return{isSupported:!0}}}var ce=n(83466),ue=n(89487),me=n(38693);class pe{constructor(e,t,n){this._productState=e,this._playlistAPI=t,this._showAPI=n}async getReportURL(e){return`${(await this._productState.getValues(l.GetValuesRequest.fromPartial({}))).pairs["ugc-abuse-report-url"].replace("{uri}",e)}&platform=desktop&version=1.2.11.916.geb595a67`}isURIReportable(e){return(0,me.gS)(e)}canReportPlaylist(e,t){return(0,me.RH)(this._playlistAPI,e,t)}canReportShow(e){return(0,me.j2)(this._showAPI,e)}}var ge=n(78820),he=n(81409),ke=n(17183),ve=n(29251);function fe(e){return!!e?.uri}async function ye(e,t){const n=await e.getDisplaySegments(function(e){return ke.SegmentsRequest.fromPartial({episodeUris:[e],segmentsPolicy:{playback:!0},trackDecorationPolicy:{trackPolicy:{name:!0,length:!0,playable:!0},albumPolicy:{name:!0,link:!0,covers:!0},artistsPolicy:{name:!0,link:!0}},episodeDecorationPolicy:{episodePolicy:{isMusicAndTalk:!0},showDecorationPolicy:{name:!0,link:!0}}})}(t));if(!n||!n.success||!n.episodeSegments)return[];const i=n.episodeSegments.find((e=>e.episodeUri===t));return i?.segments.map((e=>{switch(e.type){case he.SegmentType.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 he.SegmentType.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 he.SegmentType.UPSELL:case he.SegmentType.UNKNOWN:case he.SegmentType.UNRECOGNIZED:return null;default:return(0,ve._)(e.type),null}})).filter(fe)||[]}class Se{constructor(e){this._client=new ge.DisplaySegmentsServiceClient(e)}getCapabilities(){return{isSupported:!0}}async getSegments(e,t,n){return(await ye(this._client,e)).splice(t,n)}async getArtists(){return await async function(){return[]}()}}class be{incognito=!1;constructor(e){this.scrobble=e,this.scrobble.subIncognitoMode(u.SubIncognitoModeRequest.fromPartial({}),(e=>{this.incognito=e.incognitoMode}))}isIncognito(){return this.incognito}}class _e{constructor(e){this.productStateClient=e,this.rules="",this.productStateClient.subValues(l.SubValuesRequest.fromPartial({}),(e=>{this.rules=e.pairs["streaming-rules"]}))}streamingRules(){return this.rules}}var Ne=n(85989);class Ee{store=[];pendingPromise=!1;emptyQueueResolver=()=>{};paused=!1;constructor(e=!0){this.stopOnError=e}push(e,t){return new Promise(((n,i)=>{this.store.push({action:e,resolve:n,reject:i,preRunCheck:t}),this.pop()}))}unshift(e,t){return new Promise(((n,i)=>{this.store.unshift({action:e,resolve:n,reject:i,preRunCheck:t}),this.pop()}))}pause(){this.paused=!0}async resume(){return this.paused=!1,this.pop()}waitForIdle(){return 0!==this.size()||this.pendingPromise?new Promise((e=>{const t=this.emptyQueueResolver;this.emptyQueueResolver=()=>{t(),e()}})):Promise.resolve()}size(){return this.store.length}clearPendingQueue(){const e=this.size();return this.store=[],e}async pop(){if(this.paused)return!1;if(this.pendingPromise)return!1;const e=this.store.shift();if(!e)return!1;try{if(!e.preRunCheck||e.preRunCheck&&e.preRunCheck()){this.pendingPromise=!0;const t=await e.action();this.pendingPromise=!1,e.resolve(t)}this.pop()}catch(t){this.pendingPromise=!1,e.reject(t),this.stopOnError||this.pop()}return 0!==this.size()||this.pendingPromise||this.emptyQueueResolver(),!0}}var xe=n(23926),Ce=n(52165),we=n(78476);function Ie(e){switch(e){case"unknown":return Ne.VL.PLAY_REASON_UNKNOWN;case"appload":return Ne.VL.PLAY_REASON_APP_LOAD;case"backbtn":return Ne.VL.PLAY_REASON_BACK_BTN;case"clickrow":return Ne.VL.PLAY_REASON_CLICK_ROW;case"clickside":return Ne.VL.PLAY_REASON_CLICK_SIDE;case"endplay":return Ne.VL.PLAY_REASON_END_PLAY;case"fwdbtn":return Ne.VL.PLAY_REASON_FWD_BTN;case"interupted":return Ne.VL.PLAY_REASON_INTERRUPTED;case"logout":return Ne.VL.PLAY_REASON_LOGOUT;case"playbtn":return Ne.VL.PLAY_REASON_PLAY_BTN;case"popup":return Ne.VL.PLAY_REASON_POPUP;case"remote":return Ne.VL.PLAY_REASON_REMOTE;case"songdone":return Ne.VL.PLAY_REASON_SONG_DONE;case"trackdone":return Ne.VL.PLAY_REASON_TRACK_DONE;case"trackerror":return Ne.VL.PLAY_REASON_TRACK_ERROR;case"preview":return Ne.VL.PLAY_REASON_PREVIEW;case"uriopen":return Ne.VL.PLAY_REASON_URI_OPEN;case"backgrounded":return Ne.VL.PLAY_REASON_BACKGROUNDED;case"offline":return Ne.VL.PLAY_REASON_OFFLINE;case"unexpected-exit":return Ne.VL.PLAY_REASON_UNEXPECTED_EXIT;case"unexpected-exit-while-paused":return Ne.VL.PLAY_REASON_UNEXPECTED_EXIT_WHILE_PAUSED;default:throw new Error(`Could not map reason start to PlayReason: ${e}`)}}function Te(e){switch(e){case we.xu.FATAL_ERROR:case we.xu.NETWORK_ERROR:return Ne.VL.PLAY_REASON_TRACK_ERROR;case we.xu.PLAYED_TO_END:return Ne.VL.PLAY_REASON_TRACK_DONE;case we.xu.REQUESTED:case we.xu.SHUTDOWN:return Ne.VL.PLAY_REASON_END_PLAY;default:return(0,ve.U)(e),Ne.VL.UNRECOGNIZED}}function Ae(e){switch(e){case"none":case"":return Ne.lS.STREAMING_RULE_NONE;case"dmca-radio":return Ne.lS.STREAMING_RULE_DMCA_RADIO;case"preview":return Ne.lS.STREAMING_RULE_PREVIEW;case"wifi":return Ne.lS.STREAMING_RULE_WIFI;case"shuffle-mode":return Ne.lS.STREAMING_RULE_SHUFFLE_MODE;default:throw new Error(`Unrecognized StreamingRule ${e}`)}}class Pe extends Error{constructor(e,t,n){super(e),this.reason=e,this.responseStatusCode=t,this.responseReason=n}}class Oe{PERIODIC_STREAM_REPORTING_INTERVAL_IN_SEC=15;SECONDS_TO_MILLISECONDS=1e3;streamHandleTask=async e=>(void 0===this.streamHandle&&Promise.reject("A valid stream handle does not exist"),e.streamHandle=this.streamHandle,e);currentPositionMs=0;playbackSpeed=0;paused=!0;fullscreen=!1;seekInProgress=!1;constructor(e,t,n,i){this.streamReportingService=e,this.requestQueue=t,this.productStateProvider=n,this.eventSender=i}addPeriodicObserver(){void 0===this.periodicEventsObserverToken&&void 0!==this.timeObservable&&(this.periodicEventsObserverToken=this.timeObservable.addObserverForPeriodicEvents(this.PERIODIC_STREAM_REPORTING_INTERVAL_IN_SEC,(e=>{this.seekInProgress||(this.currentPositionMs=Math.round(e*this.SECONDS_TO_MILLISECONDS),this.enqueueStreamProgressRequest())})))}removePeriodicObserver(){void 0!==this.periodicEventsObserverToken&&void 0!==this.timeObservable&&(this.timeObservable.removePeriodicObserver(this.periodicEventsObserverToken),this.periodicEventsObserverToken=void 0)}sendPlaybackError(e,t,n){const i={feature_identifier:this.metadata?.endvideo_feature_identifier,media_url:this.metadata?.endvideo_play_track,session_id:this.playbackIdentity?.sessionId,error_domain:"StreamReportingTracker",error_code:t,error_description:e,error_extra1:n,error_extra2:this.metadata?.playback_id,desktop_ui:this.metadata?.desktop_ui};this.eventSender.send((0,xe.c)(i))}handleStatusResponse(e,t){if(e.statusCode!==Ne.GL.SUCCESS)throw this.streamHandle=void 0,new Pe(`Error returned from StreamReportingService.${t}`,e.statusCode,e.reason)}handleFailure(e){this.requestQueue.clearPendingQueue(),e instanceof Pe?this.sendPlaybackError(e.reason,e.responseStatusCode,e.responseReason):e instanceof Error?this.sendPlaybackError(e.message):this.sendPlaybackError(e)}streamStartedPreRunCheck(){return()=>!!this.streamHandle}enqueueStreamProgressRequest(e=!1){const t=Ne.Mk.fromPartial({currentPosition:this.currentPositionMs.toString(),isPaused:this.paused,isPlayingVideo:!0,isFullscreen:this.fullscreen,playbackSpeed:this.playbackSpeed}),n=()=>this.streamHandleTask(t).then((e=>this.streamReportingService.streamProgress(e))).then((e=>this.handleStatusResponse(e,"StreamProgress"))).catch((e=>this.handleFailure(e)));e?this.requestQueue.unshift(n,this.streamStartedPreRunCheck()):this.requestQueue.push(n,this.streamStartedPreRunCheck())}getHandle(){return this.streamHandle}onPlaybackCreated({playbackIdentity:e,initialConfiguration:t,timeObservable:n}){if(this.playbackSpeed=t.playbackSpeed,this.currentPositionMs=Math.round(t.position*this.SECONDS_TO_MILLISECONDS),this.playbackIdentity=e,this.metadata=e.metadata,!this.metadata)throw new Error("Metadata does not exist on PlaybackIdentity");this.timeObservable=n,this.addPeriodicObserver()}onResumed({position:e}){this.paused=!1,this.currentPositionMs=Math.round(e*this.SECONDS_TO_MILLISECONDS),this.enqueueStreamProgressRequest()}onPaused({position:e}){this.paused=!0,this.currentPositionMs=Math.round(e*this.SECONDS_TO_MILLISECONDS),this.enqueueStreamProgressRequest()}onReady({position:e,streamingType:t},n){if(this.currentPositionMs=Math.round(e*this.SECONDS_TO_MILLISECONDS),!this.playbackIdentity)throw new Error("PlaybackIdentity not found onReady");if(!this.metadata)throw new Error("Metadata not found onReady");const i=Ne.Ce.fromPartial({playbackId:(0,Ce.Wu)(this.metadata.playback_id),playbackStack:Ne.dU.BETAMAX,videoSessionId:this.playbackIdentity.sessionId,playContext:this.metadata.endvideo_play_context,contentUri:this.metadata.endvideo_play_track,provider:this.metadata.endvideo_provider,referrer:this.metadata.endvideo_referrer,streamingRule:Ae(this.productStateProvider.streamingRules()),connectControllerDeviceId:this.metadata.endvideo_gaia_dev_id,pageInstanceId:this.playbackIdentity.metadata?.page_instance_id,interactionId:this.playbackIdentity.metadata?.interaction_id,reasonStart:Ie(this.metadata.endvideo_reason_start),isShuffle:"true"===this.metadata.endvideo_shuffle,isIncognito:this.productStateProvider.isIncognito(),clientOffline:"true"===this.metadata.endvideo_client_offline,mediaId:this.metadata?.["media.manifest_id"],mediaType:Ne.DD.VIDEO,playbackStartTime:n.toString(),startPosition:Math.round(e*this.SECONDS_TO_MILLISECONDS).toString(),isLive:"live"===t,contentIsDownloaded:"offline"===t});this.requestQueue.push((()=>this.streamReportingService.streamStart(i).then((e=>{if(e.status?.statusCode!==Ne.GL.SUCCESS)throw new Pe("Error returned from StreamReportingService.StreamStart",e.status?.statusCode,e.status?.reason);this.streamHandle=e.streamHandle})).catch((e=>this.handleFailure(e)))),(()=>!this.streamHandle))}onSeeking(){this.seekInProgress=!0,this.requestQueue.pause()}onSeeked({fromPosition:e,toPosition:t}){this.currentPositionMs=Math.round(e*this.SECONDS_TO_MILLISECONDS);const n=Ne.LI.fromPartial({fromPosition:Math.round(e*this.SECONDS_TO_MILLISECONDS).toString(),toPosition:Math.round(t*this.SECONDS_TO_MILLISECONDS).toString()});this.requestQueue.unshift((()=>this.streamHandleTask(n).then((e=>this.streamReportingService.streamSeek(e))).then((e=>this.handleStatusResponse(e,"StreamSeek"))).catch((e=>this.handleFailure(e)))),this.streamStartedPreRunCheck()),this.enqueueStreamProgressRequest(!0),this.seekInProgress=!1,this.requestQueue.resume()}onPlaybackEnded({reason:e,position:t}){this.removePeriodicObserver(),this.currentPositionMs=Math.round(t*this.SECONDS_TO_MILLISECONDS),this.enqueueStreamProgressRequest();const n=Ne.OE.fromPartial({reasonEnd:Te(e)});this.requestQueue.push((()=>this.streamHandleTask(n).then((e=>this.streamReportingService.streamEnd(e))).then((e=>this.handleStatusResponse(e,"StreamEnd"))).catch((e=>this.handleFailure(e))).finally((()=>{this.streamHandle=void 0;const e=this.requestQueue.clearPendingQueue();if(e>0)throw new Error(`Cleared ${e} pending tasks after onPlaybackEnded. Once end is received, no additional updates are expected.`)}))),this.streamStartedPreRunCheck())}onFullscreenChanged({fullscreen:e,position:t}){this.fullscreen=e,this.currentPositionMs=Math.round(t*this.SECONDS_TO_MILLISECONDS),this.enqueueStreamProgressRequest()}onPlaybackSpeedChanged({position:e,speed:t}){this.playbackSpeed=t,this.currentPositionMs=Math.round(e*this.SECONDS_TO_MILLISECONDS),this.enqueueStreamProgressRequest()}}const De=(e,t,n)=>i=>i.isRoyaltyMedia?new Oe(new Ne.Dx(e),new Ee,t,n):null;var Re=n(7498);const Le=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}],"schema_version":15}');var Fe=n(59102);let je,Me=!1;const Ue=function e(t){if(!Me){if(je=n(35529),e.enable=je.enable.bind(je),e.disable=je.disable.bind(je),"undefined"!=typeof window&&window.frameElement){const e=window.frameElement.getAttribute("data-debug");e&&je.enable(e)}const t="undefined"!=typeof __spotify&&__spotify.product_state?__spotify.product_state:{},i=t.debugEnable||t.debugenable;i&&je.enable(i),"undefined"!=typeof __spotify&&__spotify.product_state&&"1"===__spotify.product_state["ta-environment"]&&(je.useColors=()=>!1,je.formatters.o=e=>{try{return JSON.stringify(e)}catch(e){return(0,Fe.H)("Unable to stringify object",e),""}}),Me=!0}return je(t)};var Be=n(55872).lW;function Ve({type:e,name:t},n){if(Array.isArray(e)){const i=n[t];if(null===i)return;n[t]={};const a=e.filter((e=>"null"!==e))[0];"object"==typeof a?(n[t]={[a.type]:i},Ve(a,n[t])):n[t][a]="bytes"===a?new Be(i):i}else"bytes"===e&&(n[t]=new Be(n[t]))}const He=(e,t)=>{Ue(`logger:${e.name}`);const n=t.message_name,i=t.message_version,a=Object.assign({},t);if(i!==e.schema_version)throw new Error(`Invalid message version: received Message with message_version ${i} but the Schema requires version ${e.schema_version}`);return{message:n,version:i,fields:e.fields.map((e=>{const t=a[e.name];return void 0===t?e.default:(Ve(e,a),t)})).slice(2)}},Ge=(0,K.v)();const We={schema:Le,create:function({name:e,schema_version:t},n){const i={message_name:e,version:t};Ge.post("",i).then((e=>{e.sequence_number?e.sequence_id?n(null,e.sequence_number,e.sequence_id):n(new Error("pendingLog: sequence_id not present"),null):n(new Error("pendingLog: sequence_number not present"),null)})).catch((e=>{(0,Fe.H)("create error",e,i),n(e,null)}))}.bind(null,Le),update:function(e,t,n,i){const a=function(e,t){const n=He(e,Object.assign({},{message_name:e.name,message_version:e.schema_version},t));return n.fields=n.fields.map((e=>"string"==typeof e?e:null===e?"":JSON.stringify(e))),n}(e,n);a.sequence_number=t,Ge.post("",a).then((()=>{i(null)})).catch((e=>{(0,Fe.H)("update error",e,a),i(e)}))}.bind(null,Le),send:function({name:e},t){const n={sequence_number:t,message_name:e};Ge.post("",n).catch((e=>{(0,Fe.H)("send error",e,n)}))}.bind(null,Le)};var ze=n(42495);const Ke="video.subtitles";class Ye{_hasSubtitleSupport=!1;_hasMinimizeBitrateSupport=!1;_hasPipSupport=!1;_events=new Re.C;_subtitleLanguages=[];_videoCoordinator=null;_offlineCoordinator=null;constructor(e,t,n,i,a,s,r,o,l){this._cosmos=e,this._showService=t,this._productStateService=n,this._scrobbleService=i,this._playbackService=a,this._prefsClient=s,this._resolver=r,this._eventSender=o,this._factories=l,this.initialize()}async initialize(){we.OK.installAll(),this._hasSubtitleSupport=this._resolver.getValue(ze.CJ),this._hasMinimizeBitrateSupport=this._resolver.getValue(ze.Qp),this._hasPipSupport=this._resolver.getValue(ze.ho);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(ze.bw),t=this._resolver.getValue(ze.CJ),n=this._resolver.getValue(ze.sb),i=this._resolver.getValue(ze.Pz),a=this._resolver.getValue(ze.qt),s=this._resolver.getValue(ze.RC),r=this._resolver.getValue(ze.Br),o=this._resolver.getValue(ze.bS),l=this._resolver.getValue(ze.Gx),d=this._resolver.getValue(ze.Ev),c=this._resolver.getValue(ze.r4);return{containerElementClass:"VideoPlayer__container",streaming:{rebufferingGoal:a,autoplayVideoOnLoad:l},adaptiveBitrate:{initialLowBitrate:!0,surfaceBasedResolutionCap:d,maxBitrate:0===c?void 0:c},drm:{vmpEnabled:r},subtitles:{enabled:t},offline:{enabled:e,targetBitrate:n},retry:{attempts:s},minimizeBitrate:{bufferMargin:o},experimental:{filterNegativeDuration:this._resolver.getValue(ze.c9)},analytics:{mux:{enabled:i,token:"2qbjhhcl4u87btjbo7dh8vi2n",appName:"Desktop-X",playerName:"betamax-player-desktop-x"}}}}async getAccessToken(){return this._cosmos.get("sp://auth/v2/token")}async getProductState(){return this._productStateService.getValues(l.GetValuesRequest.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(ze.DX)},n=this._resolver.getValue(ze.lQ),i=this.getAccessToken.bind(this),a=this._productStateService,s=this._scrobbleService,r=this._playbackService,o={factories:[()=>this,...this._factories]},l=this._resolver.getValue(ze.b5),d=this._resolver.getValue(ze.HX),c=this._resolver.getValue(ze.sz),u=await this.getProductState(),m={ads:t,playerConfiguration:e,boomboxAudioSync:l,cosmos:this._cosmos,eventSenderProvider:()=>Promise.resolve(this._eventSender),endVideoLogger:We,getToken:i,playerDependencies:o,productState:u,productStateService:a,widevineVersionSupported:n,scrobbleService:s,playbackService:r,playerPool:{enabled:d,size:c}},p=new we.KH(m);return p.initialize(),p}async createOfflineCoordinator(e){const t={cosmos:this._cosmos,productState:await this.getProductState(),playerConfiguration:e,networkConfiguration:{getAuthorizationHeader:async()=>{const{accessToken:e,tokenType:t}=await this.getAccessToken();return`${t} ${e}`}},show_service:this._showService},n=new we.lA(t);return n.initialize(),n}onManifestLoaded({availableSubtitles:e}){const t=e.map((e=>e.languageTag));this.setSubtitleLanguages(t)}setSubtitleLanguages(e){this._subtitleLanguages=e,this._events.emit(Re.d.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:Ke}),t=e[Ke]?.string;return t&&t.length>0?t:null}catch(e){return null}}async setPreferredSubtitleLanguage(e){await this._prefsClient.set({entries:{[Ke]:{string:e??""},"video.subtitles_cc":{bool:e?.endsWith("-cc")??!1}}})}reportVideoMode(e){this._videoCoordinator?.reportVideoMode(e)}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 qe=n(41836),Ze=n(25899),Qe=n(78950),Je=n(65204),$e=n(72755),Xe=n(71785),et=n(76089);const tt="isTokenUnavailable",nt={baseTime:200,ceiling:9e5,curve:"exponential",jitter:!0};class it{name="desktop-lifecycle-plugin";_authCounter=new Xe.A(nt);_authAttempts=0;_authTimeoutId=null;constructor(e,t){this._transport=e,this._onAuthenticationFailed=t,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)}tryAuthenticate(){this._transport.isAuthenticated()||(null!==this._authTimeoutId&&(window.clearTimeout(this._authTimeoutId),this._authTimeoutId=null),this._transport.authenticate())}onConnected(){this._transport.isAuthenticated()||this._transport.authenticate()}onDisconnected(){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(this._authAttempts,t),console.log("Transport authentication failed, retrying in %.2d seconds...",e/1e3),this._authTimeoutId=window.setTimeout((()=>{this._authTimeoutId=null,this._transport.authenticate()}),e)}onBeforeProcessRequest(e){const{data:t}=e,n=t.options?.metadata?.noRequestTransform;if(n)return;if(this._transport.isAuthenticated())return;this._authAttempts>0&&(t.options?.authorize&&(t.context[tt]=!0),t.options=(0,et.F)(t.options,{authorize:!1}))}onBeforeSendRequest(e){if(e.data.context[tt])throw new Error("Token is currently unavailable.")}attach(e,t){e.addListener($e.TransportEvent.CONNECTED,this.onConnected),e.addListener($e.TransportEvent.DISCONNECTED,this.onDisconnected),e.addListener($e.TransportEvent.AUTHENTICATED,this.onAuthenticated),e.addListener($e.TransportEvent.AUTHENTICATION_FAILED,this.onAuthenticationFailed),t.addListener($e.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest),t.addListener($e.PluginEvent.TRANSPORT_BEFORE_SEND_REQUEST,this.onBeforeSendRequest)}detach(e,t){e.removeListener($e.TransportEvent.CONNECTED,this.onConnected),e.removeListener($e.TransportEvent.DISCONNECTED,this.onDisconnected),e.removeListener($e.TransportEvent.AUTHENTICATED,this.onAuthenticated),e.removeListener($e.TransportEvent.AUTHENTICATION_FAILED,this.onAuthenticationFailed),t.removeListener($e.PluginEvent.TRANSPORT_BEFORE_PROCESS_REQUEST,this.onBeforeProcessRequest),t.removeListener($e.PluginEvent.TRANSPORT_BEFORE_SEND_REQUEST,this.onBeforeSendRequest)}}const at="sp://auth/v2/token";function st(e,t){return(0,Je.k)((async()=>{try{const t=await e.get(at);return function(e){return Object.prototype.hasOwnProperty.call(e,"error")}(t)?null:{accessToken:t.accessToken,accessTokenExpirationTimestampMs:t.expiresAtTime,isAnonymous:!1}}catch(e){return null}}),t)}var rt=n(51818),ot=n(57849);class lt{_events=new rt.a;_state=ot.p;_plugin=null;constructor(e){this._cosmos=e,this._tokenProvider=st(e,this.onTokenChanged.bind(this))}createTransportPlugin(e){return this._plugin=new it(e,this.onAuthenticationFailed.bind(this)),this._plugin}onTokenChanged(e){this._state={isAuthorized:null!==e&&!(0,Je.p)(e),token:e,retryAttempt:null,retryAt:null},this._events.emit(rt.B.UPDATE,this._state)}onAuthenticationFailed(e,t){this._state={isAuthorized:!1,token:null,retryAttempt:e,retryAt:t},this._events.emit(rt.B.UPDATE,this._state)}getCapabilities(){return{canGetSessionTransferURL:!0}}getEvents(){return this._events}getState(){return this._state}getTokenProvider(){return this._tokenProvider}tryAuthorize(){null!==this._plugin&&this._plugin.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 dt=n(17407),ct=n(95866),ut=n(67189);function mt(e){switch(e){case"computer":return ut.Yi.COMPUTER;case"tablet":return ut.Yi.TABLET;case"smartphone":return ut.Yi.SMARTPHONE;case"speaker":return ut.Yi.SPEAKER;case"tv":return ut.Yi.TV;case"avr":return ut.Yi.AVR;case"stb":return ut.Yi.STB;case"audio_dongle":return ut.Yi.AUDIO_DONGLE;case"game_console":return ut.Yi.GAME_CONSOLE;case"cast_video":return ut.Yi.CAST_VIDEO;case"cast_audio":return ut.Yi.CAST_AUDIO;case"automobile":return ut.Yi.AUTOMOBILE;case"smartwatch":return ut.Yi.SMARTWATCH;case"chromebook":return ut.Yi.CHROMEBOOK;case"carthing":return ut.Yi.CarThing;case"homething":return ut.Yi.HomeThing;default:return ut.Yi.UNKNOWN}}function pt(e){switch(e){case"connecting":return ut.uP.CONNECTING;case"incompatible":return ut.uP.INCOMPATIBLE;case"unavailable":return ut.uP.UNAVAILABLE;case"logged_in":return ut.uP.LOGGED_IN;case"not_logged_in":return ut.uP.NOT_LOGGED_IN;case"sleeping":return ut.uP.SLEEPING;case"premium_required":return ut.uP.PREMIUM_REQUIRED;case"not_installed":return ut.uP.NOT_INSTALLED;case"unsupported_uri":return ut.uP.UNSUPPORTED_URI;case"not_authorized":return ut.uP.NOT_AUTHORIZED;case"ad_playing":return ut.uP.AD_PLAYING;case"narration":return ut.uP.NARRATION;case"waking_up":return ut.uP.WAKING_UP;case"timed_out_wakeup":return ut.uP.TIMED_OUT_WAKEUP;default:return ut.uP.UNKNOWN}}const gt=65535;function ht(e){switch(e){case ct.LoginType.CAST:return"cast";case ct.LoginType.CONNECT:return"connect";default:return"unrecognized"}}function kt(e){const t=[];let n;for(const i of e){const e=ht(i.loginType);(0,ut.ms)(e)&&(t.push(e),i.preferred&&(n=e))}return{preferred:n,available:t}}function vt(e){const{localIdentifier:t,connectStateIdentifier:n,name:i,type:a,isGroup:s,isSelf:r,isActive:o,isBeingActivated:l,isDisabled:d,volume:c,hifi:u,brandDisplayName:m,modelDisplayName:p,license:g,state:h,isLocal:k,isZeroconf:v,isWebapp:f,supportsLogout:y,incarnations:S}=e;return{id:t,connectStateId:n,name:i??"",type:mt(a),isGroup:s,isLocal:r,isActive:o,isConnecting:l,isDisabled:d,volume:c/gt,hifiSupport:{fullySupported:!!u?.fullySupported,deviceSupported:!!u?.deviceSupported,userEligible:!!u?.userEligible},brandDisplayName:m,modelDisplayName:p,license:g,currentState:pt(h),isLocalNetwork:k,isZeroconf:v,isWebApp:f,supportsLogout:(b=r,_=y,N=m,E=p,!b&&("spotify"!==N||"web_player"!==E&&"mobile_web_player"!==E)&&_),incarnation:S?kt(S):void 0};var b,_,N,E}function ft(e,t){return t?ut.TK.CONNECTING:e&&!e.isLocal?ut.TK.CONNECTED:ut.TK.NOT_CONNECTED}function yt(e){return{success:e.status===ct.Status.OK}}class St extends dt.M{constructor(e){super(),this.connectServiceClient=e,this.connectServiceClient.state(ct.StateRequest.fromPartial({includeLocalDevice:!0,showOfflineDevicesInCore:!0,showOfflineAmazonDevicesAsOnline:!0}),(({devices:e})=>{e&&e.length>0&&this.emit(dt.F.UPDATE,function(e){let t;t=e?e.map(vt):[];let n=t.find((e=>e.isActive));if(!n){const e=t.findIndex((e=>e.isLocal));-1!==e&&(n={...t[e],isActive:!0},t[e]=n)}const i=t.find((e=>e.isConnecting&&!e.isActive));return{connectionStatus:ft(n,i),activeDevice:n??null,connectingDevice:i??null,devices:t}}(e))}))}}class bt{state=null;constructor(e){this.connectServiceClient=e,this.events=new St(this.connectServiceClient),this.events.addListener(dt.F.UPDATE,(({data:e})=>{this.state=e})),this.initiateLocalDiscovery()}getCapabilities(){return{supportsLocalDiscovery:!0}}getState(){return this.state}getEvents(){return this.events}async initiateLocalDiscovery(){await this.connectServiceClient.startDiscovery(s.bU.fromPartial({}))}async discoverDevices(){await this.connectServiceClient.forceDiscover(s.Qb.fromPartial({}))}createLoggingParams(e){return ct.LoggingParams.fromPartial({interactionIds:[e.interactionId],pageInstanceIds:e.pageInstanceId?[e.pageInstanceId]:void 0})}async pullToLocal(e){await this.connectServiceClient.pull(ct.PullRequest.fromPartial({loggingParams:this.createLoggingParams(e)}))}async transferToRemote(e,t){await this.connectServiceClient.transfer(ct.TransferRequest.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 yt(await this.connectServiceClient.logout(s.iu.fromPartial({connectDeviceIdentifier:e})))}mapIncarnationToLoginType=e=>"cast"===e?ct.LoginType.CAST:"connect"===e?ct.LoginType.CONNECT:ct.LoginType.UNRECOGNIZED;async setPreferredIncarnation(e,t){this.checkDeviceId(e);const n=this.mapIncarnationToLoginType(t);return yt(await this.connectServiceClient.setPreferredZeroconf(ct.SetPreferredZeroconfRequest.fromPartial({deviceId:e.replace("cluster_",""),preferredLoginType:n})))}}const _t="sp://internal/v1/latest_messages";function Nt(e){n.g.window.getCosmosMessages||(n.g.window.getCosmosMessages=()=>async function(e){return await e.get(_t)??[]}(e))}var Et=n(10427),xt=n(41921),Ct=n(36472),wt=n(8191),It=n(28289),Tt=n(66494),At=n(95375),Pt=n(9144);function Ot(e){switch(e){case Ct.XD.ALBUMS:return Pt.YourLibraryFilters_Filter.ALBUM;case Ct.XD.ARTISTS:return Pt.YourLibraryFilters_Filter.ARTIST;case Ct.XD.SHOWS:return Pt.YourLibraryFilters_Filter.SHOW;case Ct.XD.BOOKS:return Pt.YourLibraryFilters_Filter.BOOK;default:throw Error("Invalid library filter!")}}class Dt extends wt.w{_cancellables={[Ct.XD.ALBUMS]:null,[Ct.XD.ARTISTS]:null,[Ct.XD.SHOWS]:null,[Ct.XD.TRACKS]:null,[Ct.XD.EPISODES]:null,[Ct.XD.BOOKS]:null};_containsCancellable=null;constructor(e,t,n,i){super(i),this._your_library=e,this._collection=t,this._listen_later=n}subscribeToUpdates(){for(const e of Object.values(Ct.XD))if(e===Ct.XD.EPISODES){let t;this._cancellables[e]=this._listen_later.streamEpisodes(It.ListenLaterGetEpisodesRequest.fromPartial({updateThrottling:100}),(n=>{t!==n.unfilteredLength&&(this.emit(Ct.EW.UPDATE,{list:e}),t=n.unfilteredLength)}))}else if(e===Ct.XD.TRACKS){let t;this._cancellables[e]=this._collection.streamTrackListMetadata(Tt.v0.fromPartial({updateThrottling:100}),(n=>{t!==n.metadata?.unfilteredLength&&(this.emit(Ct.EW.UPDATE,{list:e}),t=n.metadata?.unfilteredLength)}))}else{const t=Ot(e);this._cancellables[e]=this._your_library.streamAll(At.N6.fromPartial({updateThrottling:100,header:{allPlaylists:!1,totalCount:!0,filters:{filter:[t]}}}),(()=>{this.emit(Ct.EW.UPDATE,{list:e})}))}}unsubscribeFromUpdates(){for(const e of Object.values(Ct.XD)){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(Tt._X.fromPartial({uri:t}),(e=>this.emitUpdateItems(t,e.found)))}}var Rt=n(12741),Lt=n(88664),Ft=n(3959),jt=n(33892),Mt=n.n(jt);let Ut=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_INFORMATION=58]="CONTENT_INFORMATION",e[e.AUDIOBOOK_PRICE=64]="AUDIOBOOK_PRICE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});Mt().util.Long!==Ft.Z&&(Mt().util.Long=Ft.Z,Mt().configure());const Bt={isPaywalled:!1,isUserSubscribed:!1,userExplanation:0},Vt={encode:(e,t=Mt().Writer.create())=>(!0===e.isPaywalled&&t.uint32(8).bool(e.isPaywalled),!0===e.isUserSubscribed&&t.uint32(16).bool(e.isUserSubscribed),0!==e.userExplanation&&t.uint32(24).int32(e.userExplanation),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={...Bt};for(;n.pos>>3){case 1:a.isPaywalled=n.bool();break;case 2:a.isUserSubscribed=n.bool();break;case 3:a.userExplanation=n.int32();break;default:n.skipType(7&e)}}return a},fromPartial(e){const t={...Bt};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}};Mt().util.Long!==Ft.Z&&(Mt().util.Long=Ft.Z,Mt().configure());var Ht=n(84179);const Gt={encode:(e,t=Mt().Writer.create())=>("0"!==e.seconds&&t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={seconds:"0",nanos:0};for(;n.pos>>3){case 1:a.seconds=n.int64().toString();break;case 2:a.nanos=n.int32();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({seconds:Wt(e.seconds)?String(e.seconds):"0",nanos:Wt(e.nanos)?Number(e.nanos):0}),toJSON(e){const t={};return void 0!==e.seconds&&(t.seconds=e.seconds),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){const t={seconds:"0",nanos:0};return t.seconds=e.seconds??"0",t.nanos=e.nanos??0,t}};function Wt(e){return null!=e}Mt().util.Long!==Ft.Z&&(Mt().util.Long=Ft.Z,Mt().configure());const zt={encode:(e,t=jt.Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),void 0!==e.credits&&Kt.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&&Gt.encode(function(e){const t=Math.trunc(e.getTime()/1e3).toString(),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}(e.publish_date),t.uint32(42).fork()).ldelim(),t),decode(e,t){const n=e instanceof jt.Reader?e:new jt.Reader(e);let i=void 0===t?n.len:n.pos+t;const a={uri:"",credits:void 0,edition:"",duration_ms:"0",publish_date:void 0};for(;n.pos>>3){case 1:a.uri=n.string();break;case 2:a.credits=Kt.decode(n,n.uint32());break;case 3:a.edition=n.string();break;case 4:a.duration_ms=n.int64().toString();break;case 5:a.publish_date=Qt(Gt.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromPartial(e){const t={uri:"",credits:void 0,edition:"",duration_ms:"0",publish_date:void 0};return t.uri=e.uri??"",t.credits=void 0!==e.credits&&null!==e.credits?Kt.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}};const Kt={encode(e,t=jt.Writer.create()){for(const n of e.publishers)Yt.encode(n,t.uint32(18).fork()).ldelim();for(const n of e.authors)qt.encode(n,t.uint32(26).fork()).ldelim();for(const n of e.narrators)Zt.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){const n=e instanceof jt.Reader?e:new jt.Reader(e);let i=void 0===t?n.len:n.pos+t;const a={publishers:[],authors:[],narrators:[]};for(;n.pos>>3){case 2:a.publishers.push(Yt.decode(n,n.uint32()));break;case 3:a.authors.push(qt.decode(n,n.uint32()));break;case 4:a.narrators.push(Zt.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromPartial(e){const t={publishers:[],authors:[],narrators:[]};return t.publishers=e.publishers?.map((e=>Yt.fromPartial(e)))||[],t.authors=e.authors?.map((e=>qt.fromPartial(e)))||[],t.narrators=e.narrators?.map((e=>Zt.fromPartial(e)))||[],t}};const Yt={encode:(e,t=jt.Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof jt.Reader?e:new jt.Reader(e);let i=void 0===t?n.len:n.pos+t;const a={name:""};for(;n.pos>>3==2)a.name=n.string();else n.skipType(7&e)}return a},fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const qt={encode:(e,t=jt.Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof jt.Reader?e:new jt.Reader(e);let i=void 0===t?n.len:n.pos+t;const a={name:""};for(;n.pos>>3==2)a.name=n.string();else n.skipType(7&e)}return a},fromPartial(e){const t={name:""};return t.name=e.name??"",t}};const Zt={encode:(e,t=jt.Writer.create())=>(""!==e.name&&t.uint32(18).string(e.name),t),decode(e,t){const n=e instanceof jt.Reader?e:new jt.Reader(e);let i=void 0===t?n.len:n.pos+t;const a={name:""};for(;n.pos>>3==2)a.name=n.string();else n.skipType(7&e)}return a},fromPartial(e){const t={name:""};return t.name=e.name??"",t}};function Qt(e){let t=1e3*Number(e.seconds);return t+=e.nanos/1e6,new Date(t)}jt.util.Long!==Ft.Z&&(jt.util.Long=Ft.Z,jt.configure());const Jt={encode:(e,t=Mt().Writer.create())=>(""!==e.cardHeaderText&&t.uint32(10).string(e.cardHeaderText),""!==e.cardBodyText&&t.uint32(18).string(e.cardBodyText),""!==e.buttonText&&t.uint32(26).string(e.buttonText),""!==e.buttonTarget&&t.uint32(34).string(e.buttonTarget),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={cardHeaderText:"",cardBodyText:"",buttonText:"",buttonTarget:""};for(;n.pos>>3){case 1:a.cardHeaderText=n.string();break;case 2:a.cardBodyText=n.string();break;case 3:a.buttonText=n.string();break;case 4:a.buttonTarget=n.string();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({cardHeaderText:$t(e.cardHeaderText)?String(e.cardHeaderText):"",cardBodyText:$t(e.cardBodyText)?String(e.cardBodyText):"",buttonText:$t(e.buttonText)?String(e.buttonText):"",buttonTarget:$t(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 $t(e){return null!=e}Mt().util.Long!==Ft.Z&&(Mt().util.Long=Ft.Z,Mt().configure());const Xt={},en={encode(e,t=Mt().Writer.create()){for(const n of e.topics)nn.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={...Xt};for(a.topics=[];n.pos>>3==1)a.topics.push(nn.decode(n,n.uint32()));else n.skipType(7&e)}return a},fromJSON(e){const t={...Xt};if(t.topics=[],void 0!==e.topics&&null!==e.topics)for(const n of e.topics)t.topics.push(nn.fromJSON(n));return t},toJSON(e){const t={};return e.topics?t.topics=e.topics.map((e=>e?nn.toJSON(e):void 0)):t.topics=[],t},fromPartial(e){const t={...Xt};if(t.topics=[],void 0!==e.topics&&null!==e.topics)for(const n of e.topics)t.topics.push(nn.fromPartial(n));return t}},tn={uri:"",title:""},nn={encode:(e,t=Mt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.title&&t.uint32(18).string(e.title),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={...tn};for(;n.pos>>3){case 1:a.uri=n.string();break;case 2:a.title=n.string();break;default:n.skipType(7&e)}}return a},fromJSON(e){const t={...tn};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={...tn};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}},an={htmlDescription:""},sn={encode:(e,t=Mt().Writer.create())=>(void 0!==e.header&&on.encode(e.header,t.uint32(10).fork()).ldelim(),""!==e.htmlDescription&&t.uint32(18).string(e.htmlDescription),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={...an};for(;n.pos>>3){case 1:a.header=on.decode(n,n.uint32());break;case 2:a.htmlDescription=n.string();break;default:n.skipType(7&e)}}return a},fromJSON(e){const t={...an};return void 0!==e.header&&null!==e.header?t.header=on.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?on.toJSON(e.header):void 0),void 0!==e.htmlDescription&&(t.htmlDescription=e.htmlDescription),t},fromPartial(e){const t={...an};return void 0!==e.header&&null!==e.header?t.header=on.fromPartial(e.header):t.header=void 0,void 0!==e.htmlDescription&&null!==e.htmlDescription?t.htmlDescription=e.htmlDescription:t.htmlDescription="",t}},rn={},on={encode:(e,t=Mt().Writer.create())=>t,decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={...rn};for(;n.pos({...rn}),toJSON:e=>({}),fromPartial:e=>({...rn})};Mt().util.Long!==Ft.Z&&(Mt().util.Long=Ft.Z,Mt().configure());let ln=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},cn={encode(e,t=Mt().Writer.create()){""!==e.episodeUri&&t.uint32(10).string(e.episodeUri);for(const n of e.playbackSegments)mn.encode(n,t.uint32(18).fork()).ldelim();for(const n of e.embeddedSegments)gn.encode(n,t.uint32(26).fork()).ldelim();!0===e.canUpsell&&t.uint32(32).bool(e.canUpsell),""!==e.albumMosaicUri&&t.uint32(42).string(e.albumMosaicUri);for(const n of e.artists)t.uint32(50).string(n);return 0!==e.durationMs&&t.uint32(56).int32(e.durationMs),t},decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={...dn};for(a.playbackSegments=[],a.embeddedSegments=[],a.artists=[];n.pos>>3){case 1:a.episodeUri=n.string();break;case 2:a.playbackSegments.push(mn.decode(n,n.uint32()));break;case 3:a.embeddedSegments.push(gn.decode(n,n.uint32()));break;case 4:a.canUpsell=n.bool();break;case 5:a.albumMosaicUri=n.string();break;case 6:a.artists.push(n.string());break;case 7:a.durationMs=n.int32();break;default:n.skipType(7&e)}}return a},fromJSON(e){const t={...dn};return t.episodeUri=void 0!==e.episodeUri&&null!==e.episodeUri?String(e.episodeUri):"",t.playbackSegments=(e.playbackSegments??[]).map((e=>mn.fromJSON(e))),t.embeddedSegments=(e.embeddedSegments??[]).map((e=>gn.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?mn.toJSON(e):void 0)):t.playbackSegments=[],e.embeddedSegments?t.embeddedSegments=e.embeddedSegments.map((e=>e?gn.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=>mn.fromPartial(e))),t.embeddedSegments=(e.embeddedSegments??[]).map((e=>gn.fromPartial(e))),t.canUpsell=e.canUpsell??!1,t.albumMosaicUri=e.albumMosaicUri??"",t.artists=(e.artists??[]).map((e=>e)),t.durationMs=e.durationMs??0,t}},un={uri:"",startMs:0,stopMs:0,durationMs:0,type:0,title:"",subtitle:"",imageUrl:"",actionUrl:"",isAbridged:!1},mn={encode:(e,t=Mt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),0!==e.startMs&&t.uint32(16).int32(e.startMs),0!==e.stopMs&&t.uint32(24).int32(e.stopMs),0!==e.durationMs&&t.uint32(32).int32(e.durationMs),0!==e.type&&t.uint32(40).int32(e.type),""!==e.title&&t.uint32(50).string(e.title),""!==e.subtitle&&t.uint32(58).string(e.subtitle),""!==e.imageUrl&&t.uint32(66).string(e.imageUrl),""!==e.actionUrl&&t.uint32(74).string(e.actionUrl),!0===e.isAbridged&&t.uint32(80).bool(e.isAbridged),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={...un};for(;n.pos>>3){case 1:a.uri=n.string();break;case 2:a.startMs=n.int32();break;case 3:a.stopMs=n.int32();break;case 4:a.durationMs=n.int32();break;case 5:a.type=n.int32();break;case 6:a.title=n.string();break;case 7:a.subtitle=n.string();break;case 8:a.imageUrl=n.string();break;case 9:a.actionUrl=n.string();break;case 10:a.isAbridged=n.bool();break;default:n.skipType(7&e)}}return a},fromJSON(e){const t={...un};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 ln.UNKNOWN;case 1:case"TALK":return ln.TALK;case 2:case"MUSIC":return ln.MUSIC;case 3:case"UPSELL":return ln.UPSELL;default:return ln.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 ln.UNKNOWN:return"UNKNOWN";case ln.TALK:return"TALK";case ln.MUSIC:return"MUSIC";case ln.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={...un};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}},pn={uri:"",absoluteStartMs:0,absoluteStopMs:0},gn={encode:(e,t=Mt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),0!==e.absoluteStartMs&&t.uint32(16).int32(e.absoluteStartMs),0!==e.absoluteStopMs&&t.uint32(24).int32(e.absoluteStopMs),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={...pn};for(;n.pos>>3){case 1:a.uri=n.string();break;case 2:a.absoluteStartMs=n.int32();break;case 3:a.absoluteStopMs=n.int32();break;default:n.skipType(7&e)}}return a},fromJSON(e){const t={...pn};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={...pn};return t.uri=e.uri??"",t.absoluteStartMs=e.absoluteStartMs??0,t.absoluteStopMs=e.absoluteStopMs??0,t}};Mt().util.Long!==Ft.Z&&(Mt().util.Long=Ft.Z,Mt().configure());const hn={encode(e,t=Mt().Writer.create()){""!==e.episodeUri&&t.uint32(10).string(e.episodeUri);for(const n of e.transcripts)kn.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={episodeUri:"",transcripts:[]};for(;n.pos>>3){case 1:a.episodeUri=n.string();break;case 2:a.transcripts.push(kn.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON:e=>({episodeUri:vn(e.episodeUri)?String(e.episodeUri):"",transcripts:Array.isArray(e?.transcripts)?e.transcripts.map((e=>kn.fromJSON(e))):[]}),toJSON(e){const t={};return void 0!==e.episodeUri&&(t.episodeUri=e.episodeUri),e.transcripts?t.transcripts=e.transcripts.map((e=>e?kn.toJSON(e):void 0)):t.transcripts=[],t},fromPartial(e){const t={episodeUri:"",transcripts:[]};return t.episodeUri=e.episodeUri??"",t.transcripts=e.transcripts?.map((e=>kn.fromPartial(e)))||[],t}};const kn={encode:(e,t=Mt().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),""!==e.language&&t.uint32(18).string(e.language),!0===e.curated&&t.uint32(24).bool(e.curated),""!==e.cdnUrl&&t.uint32(34).string(e.cdnUrl),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={uri:"",language:"",curated:!1,cdnUrl:""};for(;n.pos>>3){case 1:a.uri=n.string();break;case 2:a.language=n.string();break;case 3:a.curated=n.bool();break;case 4:a.cdnUrl=n.string();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({uri:vn(e.uri)?String(e.uri):"",language:vn(e.language)?String(e.language):"",curated:!!vn(e.curated)&&Boolean(e.curated),cdnUrl:vn(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 vn(e){return null!=e}Mt().util.Long!==Ft.Z&&(Mt().util.Long=Ft.Z,Mt().configure());const fn={encode:(e,t=jt.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&&Gt.encode(bn(e.ratedAt),t.uint32(34).fork()).ldelim(),t),decode(e,t){const n=e instanceof jt.Reader?e:new jt.Reader(e);let i=void 0===t?n.len:n.pos+t;const a={userId:"",showUri:"",rating:0,ratedAt:void 0};for(;n.pos>>3){case 1:a.userId=n.string();break;case 2:a.showUri=n.string();break;case 3:a.rating=n.int32();break;case 4:a.ratedAt=_n(Gt.decode(n,n.uint32()));break;default:n.skipType(7&e)}}return a},fromJSON:e=>({userId:En(e.userId)?String(e.userId):"",showUri:En(e.showUri)?String(e.showUri):"",rating:En(e.rating)?Number(e.rating):0,ratedAt:En(e.ratedAt)?Nn(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 yn={encode:(e,t=jt.Writer.create())=>(0!==e.average&&t.uint32(9).double(e.average),"0"!==e.totalRatings&&t.uint32(16).int64(e.totalRatings),!0===e.showAverage&&t.uint32(24).bool(e.showAverage),t),decode(e,t){const n=e instanceof jt.Reader?e:new jt.Reader(e);let i=void 0===t?n.len:n.pos+t;const a={average:0,totalRatings:"0",showAverage:!1};for(;n.pos>>3){case 1:a.average=n.double();break;case 2:a.totalRatings=n.int64().toString();break;case 3:a.showAverage=n.bool();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({average:En(e.average)?Number(e.average):0,totalRatings:En(e.totalRatings)?String(e.totalRatings):"0",showAverage:!!En(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 Sn={encode:(e,t=jt.Writer.create())=>(void 0!==e.averageRating&&yn.encode(e.averageRating,t.uint32(10).fork()).ldelim(),void 0!==e.rating&&fn.encode(e.rating,t.uint32(18).fork()).ldelim(),!0===e.canRate&&t.uint32(24).bool(e.canRate),t),decode(e,t){const n=e instanceof jt.Reader?e:new jt.Reader(e);let i=void 0===t?n.len:n.pos+t;const a={averageRating:void 0,rating:void 0,canRate:!1};for(;n.pos>>3){case 1:a.averageRating=yn.decode(n,n.uint32());break;case 2:a.rating=fn.decode(n,n.uint32());break;case 3:a.canRate=n.bool();break;default:n.skipType(7&e)}}return a},fromJSON:e=>({averageRating:En(e.averageRating)?yn.fromJSON(e.averageRating):void 0,rating:En(e.rating)?fn.fromJSON(e.rating):void 0,canRate:!!En(e.canRate)&&Boolean(e.canRate)}),toJSON(e){const t={};return void 0!==e.averageRating&&(t.averageRating=e.averageRating?yn.toJSON(e.averageRating):void 0),void 0!==e.rating&&(t.rating=e.rating?fn.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?yn.fromPartial(e.averageRating):void 0,t.rating=void 0!==e.rating&&null!==e.rating?fn.fromPartial(e.rating):void 0,t.canRate=e.canRate??!1,t}};function bn(e){return{seconds:Math.trunc(e.getTime()/1e3).toString(),nanos:e.getTime()%1e3*1e6}}function _n(e){let t=1e3*Number(e.seconds);return t+=e.nanos/1e6,new Date(t)}function Nn(e){return e instanceof Date?e:"string"==typeof e?new Date(e):_n(Gt.fromJSON(e))}function En(e){return null!=e}jt.util.Long!==Ft.Z&&(jt.util.Long=Ft.Z,jt.configure());const xn={encode:(e,t=Mt().Writer.create())=>(0!==e.amount&&t.uint32(9).double(e.amount),""!==e.currency&&t.uint32(18).string(e.currency),""!==e.formattedPrice&&t.uint32(26).string(e.formattedPrice),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={amount:0,currency:"",formattedPrice:""};for(;n.pos>>3){case 1:a.amount=n.double();break;case 2:a.currency=n.string();break;case 3:a.formattedPrice=n.string();break;default:n.skipType(7&e)}}return a},fromPartial(e){const t={amount:0,currency:"",formattedPrice:""};return t.amount=e.amount??0,t.currency=e.currency??"",t.formattedPrice=e.formattedPrice??"",t}};const Cn={encode:(e,t=Mt().Writer.create())=>(void 0!==e.finalPrice&&xn.encode(e.finalPrice,t.uint32(10).fork()).ldelim(),void 0!==e.finalListPrice&&xn.encode(e.finalListPrice,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof Mt().Reader?e:new(Mt().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={finalPrice:void 0,finalListPrice:void 0};for(;n.pos>>3){case 1:a.finalPrice=xn.decode(n,n.uint32());break;case 2:a.finalListPrice=xn.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromPartial(e){const t={finalPrice:void 0,finalListPrice:void 0};return t.finalPrice=void 0!==e.finalPrice&&null!==e.finalPrice?xn.fromPartial(e.finalPrice):void 0,t.finalListPrice=void 0!==e.finalListPrice&&null!==e.finalListPrice?xn.fromPartial(e.finalListPrice):void 0,t}};function wn(e){const t={};return e.forEach((e=>{switch(e.extensionKind){case Ut.PODCAST_SUBSCRIPTIONS:t.podcastSubscription=Vt.decode(e.data);break;case Ut.SHOW_ACCESS:t.showAccess=Ht.j2.decode(e.data);break;case Ut.AUDIOBOOK_SPECIFICS:t.audiobookSpecifics=zt.decode(e.data);break;case Ut.PODCAST_TOPICS:t.podcastTopics=en.decode(e.data);break;case Ut.PODCAST_SEGMENTS:t.podcastSegments=cn.decode(e.data);break;case Ut.HTML_DESCRIPTION:t.htmlDescription=sn.decode(e.data);break;case Ut.PODCAST_RATING:t.rating=Sn.decode(e.data);break;case Ut.CONTENT_INFORMATION:t.contentInformation=Jt.decode(e.data);break;case Ut.EPISODE_TRANSCRIPTS:t.transcripts=hn.decode(e.data);break;case Ut.AUDIOBOOK_PRICE:t.audiobookPrice=Cn.decode(e.data)}})),t}var In=n(93963),Tn=n(65481),An=n(32724),Pn=n(47481);function On(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 Dn(e){return void 0!==e&&e>0?function(e){return new Date(1e3*e)}(e).toISOString():null}function Rn(e){return Dn(e?parseInt(e,10):void 0)}function Ln(e){return{milliseconds:1e3*e}}function Fn(e,t){return e?t===e?null:Rn(e):null}function jn(e){return e?[{url:e,width:300,height:300}]:[]}function Mn(e){const t=e.entityInfo?.pinnable;switch(t){case In.YourLibraryEntityInfo_Pinnable.YES:return Lt.TL.YES;case In.YourLibraryEntityInfo_Pinnable.NO_IN_FOLDER:return Lt.TL.NO_IN_FOLDER;case In.YourLibraryEntityInfo_Pinnable.UNRECOGNIZED:default:return Lt.TL.NO}}function Un(e){return{type:ie.p.ARTIST,uri:e.link,name:e.name}}function Bn(e){return{type:ie.p.ALBUM,name:e.entityInfo?.name??"",artists:e.album?.artistName?[{type:ie.p.ARTIST,name:e.album?.artistName,uri:e.album?.artistUri??""}]:[],images:jn(e.entityInfo?.imageUri),uri:e.entityInfo?.uri??"",pinned:e.entityInfo?.pinned??!1,addedAt:Rn(e.entityInfo?.addTime),lastPlayedAt:Fn(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:Mn(e)}}function Vn(e){return{type:ie.p.ARTIST,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",images:jn(e.entityInfo?.imageUri),pinned:e.entityInfo?.pinned??!1,addedAt:Rn(e.entityInfo?.addTime),lastPlayedAt:Fn(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:Mn(e)}}function Hn(e){return{type:ie.p.SHOW,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",publisher:e.show?.creatorName??"",images:jn(e.entityInfo?.imageUri)}}function Gn(e,t){let n={};e.extension&&(n=wn(e.extension));const i=e.show;return{type:ie.p.EPISODE,uri:e.link,name:e.name,description:e.description,duration:Ln(e.length),timeLeft:Ln(t.isPlayed?0:t.timeLeft),images:On(e.covers),isExplicit:e.isExplicit,languages:[e.language],release:{date:new Date(1e3*parseInt(e.publishDate,10)).toISOString(),precision:"day"},podcastSubscription:{isPaywalled:n.podcastSubscription?.isPaywalled??!1,isUserSubscribed:n.podcastSubscription?.isUserSubscribed??!1},show:{type:ie.p.SHOW,uri:i.link,name:i.name,publisher:i.publisher,images:On(i.covers),mediaType:Rt.E.UNKNOWN},isPlayable:t.isPlayable,is19PlusOnly:e.is19PlusOnly}}function Wn(e){if(void 0===e.episodeMetadata||void 0===e.episodePlayedState)throw new Error("Invalid listen-later cosmos response!");return{...Gn(e.episodeMetadata,e.episodePlayedState)}}function zn(e){return{type:ie.p.ARTIST,uri:e.link,name:e.name}}function Kn(e){return{type:ie.p.ARTIST,uri:e.link,name:e.name}}function Yn(e){return{type:ie.p.ALBUM,uri:e.link,name:e.name,artist:e.artist&&zn(e.artist),images:On(e.covers)}}function qn(e,t){return{type:ie.p.TRACK,uri:e.link,name:e.name,duration:Ln(e.length),album:Yn(e.album),artists:e.artist.map(Kn),discNumber:e.discNumber,trackNumber:e.trackNumber,isExplicit:e.isExplicit,isPlayable:t.isPlayable,isLocal:e.isLocal,is19PlusOnly:e.is19PlusOnly}}function Zn(e){if(void 0===e.trackMetadata||void 0===e.trackPlayState)throw new Error("Invalid collection cosmos shows response!");return{...qn(e.trackMetadata,e.trackPlayState),addedAt:Dn(e.addTime)}}function Qn(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");return{type:ie.p.TRACK,uri:e.trackMetadata.link,name:e.trackMetadata.name,duration:Ln(e.trackMetadata.length),album:Yn(e.trackMetadata.album),artists:e.trackMetadata.artist.map(Kn),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:Dn(e.addTime)}}(e.track)}function Jn(e){return{type:ie.p.AUDIOBOOK,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",authorName:e.book?.authorName??"",images:jn(e.entityInfo?.imageUri),isLocked:e.book?.access===In.YourLibraryBookExtraInfo_Access.LOCKED,pinned:e.entityInfo?.pinned??!1,addedAt:Rn(e.entityInfo?.addTime),lastPlayedAt:Fn(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:Mn(e)}}function $n(e,t){return e.length>=(t?.offset??0)+(t?.limit??0)}function Xn(e,t,n){if(e.error?.includes("filter only available"))throw new Lt.Ik(e.error.match(/^(.*) filter only available/)?.at(1)??e.error);if(e.error?.includes("order only available"))throw new Lt.j2(e.error.match(/^(.*) order only available/)?.at(1)??e.error);if(e.error&&404===e.statusCode&&t?.folderUri)throw new Lt.xX(e.error);const i=t?.folderUri?Pt.YourLibraryFilters_Filter.PLAYLIST:void 0,a=(0,Pn.J5)(t?.filters?.map(Tn.zl)??[]).map(Pn.XT),s=i??(0,Tn.K_)(a.at(0)?.id),r=(0,An.sy)((0,Tn.gD)(t?.sortOrder),s),o=s===Pt.YourLibraryFilters_Filter.PLAYLIST&&r.id===Pt.YourLibrarySortOrder_SortOrder.CUSTOM.toString(),l=!!t?.textFilter;let d,c=e.header?.totalCount??0;if(n){const n=function(e,t,n,i){let a=0;const s=[],r=new Set(i?.expandedFolders??[]),o=e.slice(0),l=Array.from({length:o.length},(()=>0));let d;for(;d=o.shift();){const e=l.shift()??0,c=ei(d,t,e,n);if(s.push(c),e>0&&a++,$n(s,i))break;if(d.folder&&d.entityInfo?.uri&&r.has(d.entityInfo?.uri)){o.unshift(...d.folder.entity);const t=e+1;l.unshift(...Array.from({length:d.folder.entity.length},(()=>t)))}}return{items:s.slice(i?.offset??0,(i?.offset??0)+(i?.limit??0)),numExpandedFolderItemsInChunk:a}}(e.entity,o,l,t);d=n.items,c+=n.numExpandedFolderItemsInChunk}else d=function(e,t,n){return e.map((e=>ei(e,t,void 0,n)))}(e.entity,o,l);return{primaryFilter:(0,Pn.$R)(s)??void 0,passedFilterIds:t?.filters??[],availableFilters:(0,Pn.J5)(e.header?.availableFilters?.filter??[]).map(Pn.XT),selectedFilters:t?.folderUri?(0,Pn.tl)(a):a,availableSortOrders:(0,An.wV)(s),selectedSortOrder:r,limit:t?.limit??e.header?.totalCount??0,offset:t?.offset,items:d,unfilteredTotalLength:e.header?.totalCount??0,totalLength:c,hasUnfilteredItems:!!e.header?.totalCount||!!t?.filters?.length||!!t?.textFilter,hasTextFilter:l,reorderAllowed:o,passedFolderUri:t?.folderUri,openedFolderName:e.header?.folderName,parentFolderUri:e.header?.parentFolderUri}}function ei(e,t,n,i){return e.playlist?function(e,t,n){return{type:ie.p.PLAYLIST,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Mn(e),images:jn(e.entityInfo?.imageUri),owner:{type:ie.p.USER,name:e.playlist?.creatorName??"",uri:e.playlist?.creatorUri??"",id:"",username:"",images:[]},isLoading:e.playlist?.isLoading,folderDepth:n,canAddTo:e.playlist?.canAdd,canReorder:t,addedAt:Rn(e.entityInfo?.addTime),lastPlayedAt:Fn(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e,t,n):e.album?Bn(e):e.artist?Vn(e):e.show?function(e){return{type:ie.p.SHOW,uri:e.entityInfo?.uri??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,publisher:e.show?.creatorName??"",images:jn(e.entityInfo?.imageUri),addedAt:Rn(e.entityInfo?.addTime),lastPlayedAt:Fn(e.entityInfo?.lastPlayed,e.entityInfo?.addTime),canPin:Mn(e)}}(e):e.book?Jn(e):e.folder?function(e,t,n,i=!1){return{type:ie.p.FOLDER,uri:e.entityInfo?.uri??"",rowId:e.folder?.rowId??"",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Mn(e),numberOfFolders:e.folder?.numberOfFolders??0,numberOfPlaylists:e.folder?.numberOfPlaylists??0,folderDepth:n,canReorder:t,isFlattened:i,addedAt:Rn(e.entityInfo?.addTime),lastPlayedAt:Fn(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e,t,n,i):e.likedSongs?function(e){return{type:ie.p.LIKED_SONGS,uri:"spotify:collection:tracks",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Mn(e),images:jn(e.entityInfo?.imageUri),numberOfSongs:e.likedSongs?.numberOfSongs??0,addedAt:Rn(e.entityInfo?.addTime),lastPlayedAt:Fn(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):e.yourEpisodes?function(e){return{type:ie.p.YOUR_EPISODES,uri:"spotify:collection:your-episodes",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Mn(e),images:jn(e.entityInfo?.imageUri),numberOfDownloadedEpisodes:e.yourEpisodes?.numberOfDownloadedEpisodes??0,addedAt:Rn(e.entityInfo?.addTime),lastPlayedAt:Fn(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):e.localFiles?function(e){return{type:ie.p.LOCAL_FILES,uri:"spotify:local-files",name:e.entityInfo?.name??"",pinned:e.entityInfo?.pinned??!1,canPin:Mn(e),images:jn(e.entityInfo?.imageUri),numberOfFiles:e.localFiles?.numberOfFiles??0,addedAt:Rn(e.entityInfo?.addTime),lastPlayedAt:Fn(e.entityInfo?.lastPlayed,e.entityInfo?.addTime)}}(e):null}function ti(e){switch(e){case"album":default:return"album";case"single":return"single";case"compilation":return"compilation";case"ep":return"ep"}}function ni(e){const t=e.map((e=>(0,te.EC)(e))),n=t.map((e=>null!==e?e.type:null)).reduce(((e,t)=>e===t?e:null));if(null===n)throw new Error("Given URIs need to be of the same type!");return{type:n,ids:t.map((e=>e.id))}}var ii=n(53502),ai=n(67188),si=n(94168),ri=n(56868),oi=n(78315);const li="https://misc.scdn.co/liked-songs/liked-songs-300.png",di="https://misc.spotifycdn.com/your-episodes/SE-300.png",ci={offset:0},ui={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:[si.ExtensionKind.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 mi(e,t){return"end"===e.after?{}:e.after?.uri?{afterUri:(0,oi.h)(e.after.uri,t)}:"start"===e.before?{first:!0}:e.before?.uri?{beforeUri:(0,oi.h)(e.before.uri,t)}:{}}class pi{_cache=new Map;constructor(e,t,n,i){this._your_library=e,this._collection=t,this._listen_later=n,this._currentUsername=i,this._events=new Dt(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=ci){const{sort:t,filter:n,offset:i,limit:a}=e;if(void 0!==i&&"number"!=typeof i)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(Bn),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(At.N6.fromPartial({header:{totalCount:!0,skip:i,length:a,filters:{filter:[Pt.YourLibraryFilters_Filter.ALBUM]},textFilter:(0,Pn.Vp)((0,ii.cj)(n)),sortOrder:{sortOrder:(0,An.y0)(t)}}})),i)}async getArtists(e=ci){const{sort:t,filter:n,offset:i,limit:a}=e;if(void 0!==i&&"number"!=typeof i)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(Vn),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(At.N6.fromPartial({header:{totalCount:!0,skip:i,length:a,filters:{filter:[Pt.YourLibraryFilters_Filter.ARTIST]},textFilter:(0,Pn.Vp)((0,ii.cj)(n)),sortOrder:{sortOrder:(0,An.AV)(t)}}})),i)}async getTracks(e=ci){const{sort:t,filter:n,offset:i,limit:a,uri:s}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");const r=(0,te.EC)(s),o=r&&(0,te.HB)(r.id)||void 0,l=Tt.ow.fromPartial({trackPolicy:{collectionPolicy:{isInCollection:!0},trackPolicy:{link:!0,name:!0,playable:!0,length:!0,trackNumber:!0,discNumber:!0,isExplicit:!0,is19PlusOnly:!0},albumPolicy:{decorated:!0,albumPolicy:{link:!0,name:!0,covers:!0}},artistPolicy:{name:!0,link:!0}},addTime:!0,start:i,length:a,filter:(0,Pn.Yo)((0,ii.cj)(n)),sort:t?(0,An.KO)(t):"",id:o});let d;return d=(0,te.EC)(s)?.type===te.JM.ARTIST?await this._collection.getArtistTrackList(l):(0,te.EC)(s)?.type===te.JM.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(Qn),offset:t||0,limit:e.item.length,totalLength:e.unrangedLength,unfilteredTotalLength:e.unfilteredLength}}(d,i)}async getShows(e=ci){const{sort:t,filter:n,offset:i,limit:a}=e;if(void 0!==i&&"number"!=typeof i)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(Hn),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(At.N6.fromPartial({header:{totalCount:!0,skip:i,length:a,filters:{filter:[Pt.YourLibraryFilters_Filter.SHOW]},textFilter:(0,Pn.Vp)((0,ii.cj)(n)),sortOrder:{sortOrder:(0,An.Et)(t)}}})),i)}async getEpisodes(e=ci){const{sort:t,filter:n,offset:i,limit:a}=e;if(void 0!==i&&"number"!=typeof i)throw new Error("Invalid offset! Expected a number.");return function(e,t){return{items:(e.episode||[]).map(Wn),offset:t||0,limit:(e.episode||[]).length,totalLength:e.unrangedLength,unfilteredTotalLength:e.unfilteredLength}}(await this._listen_later.episodes(It.ListenLaterGetEpisodesRequest.fromPartial({...ui,sort:(0,An.G9)(t),filter:(0,Pn.Yo)((0,ii.cj)(n)),start:i,length:a})),i)}async getBooks(e=ci){const{filter:t,sort:n,offset:i,limit:a}=e;if(void 0!==i&&"number"!=typeof i)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(Jn),offset:t||0,limit:e.entity.length,totalLength:e.header?.totalCount??0,unfilteredTotalLength:e.header?.totalCount??0}}(await this._your_library.all(At.N6.fromPartial({header:{totalCount:!0,skip:i,length:a,filters:{filter:[Pt.YourLibraryFilters_Filter.BOOK]},textFilter:(0,Pn.Vp)((0,ii.cj)(t)),sortOrder:{sortOrder:(0,An.Tk)(n)}}})),i)}getEvents(){return this._events}async add(...e){if(!this._events.emitOperationSync(Ct.pT.ADD,e))try{this._events.emitUpdateItems(e,!0),await async function(e,t,n){const{type:i}=ni(n);i===te.JM.EPISODE?await t.add({uris:n}):await e.add({uri:n})}(this._collection,this._listen_later,e),this._events.emitOperationComplete(Ct.pT.ADD,e)}catch(t){throw this._events.emitUpdateItems(e,!1),this._events.emitOperationComplete(Ct.pT.ADD,e,t instanceof Error?t:new Error("Unknown error object")),t}}async remove(...e){if(!this._events.emitOperationSync(Ct.pT.REMOVE,e))try{this._events.emitUpdateItems(e,!1),await async function(e,t,n){const{type:i}=ni(n);i===te.JM.EPISODE?await t.remove({uris:n}):await e.remove({uri:n})}(this._collection,this._listen_later,e),this._events.emitOperationComplete(Ct.pT.REMOVE,e)}catch(t){throw this._events.emitUpdateItems(e,!0),this._events.emitOperationComplete(Ct.pT.REMOVE,e,t instanceof Error?t:new Error("Unknown error object")),t}}async contains(...e){const t=await async function(e,t){return(await e.contains(Tt._X.fromPartial({uri:t}))).found||[]}(this._collection,e);return this._events.emitUpdateItems(e,t),t}containsSync(e){return this._cache.get(e)}async markAsPlayed(e){await this._collection.removeUnplayed({uri:[e]})}async markAsUnPlayed(e){await this._collection.addUnplayed({uri:[e]})}async pin(e,t){const n=await this._your_library.pin(At.oP.fromPartial({uri:(0,oi.h)(e,this._currentUsername),...t&&mi(t,this._currentUsername)}));n.status===ri.PinResponse_PinStatus.PINNED?this._events.emitUpdatePin(e,!0):n.status===ri.PinResponse_PinStatus.NOT_PINNED&&n.hasMaximumPinnedItems&&this._events.emitUpdatePinErrorTooManyPins(e,n.maximumPinnedItems)}async unpin(e){await this._your_library.unPin(At.oP.fromPartial({uri:(0,oi.h)(e,this._currentUsername)})),this._events.emitUpdatePin(e,!1)}async getContents(e){const t=e?.filters?.map(Tn.zl),n=t&&(0,Pn.J5)(t).at(0),i=!!n,a=n===Pt.YourLibraryFilters_Filter.PLAYLIST,s=n===Pt.YourLibraryFilters_Filter.DOWNLOADED,r=!!e?.expandedFolders?.length&&!!!e?.textFilter&&(!i||a||s);let o=e?.offset,l=e?.limit;r&&(o=0,l=(e?.offset??0)+(e?.limit??0));const d=(0,An.sy)((0,Tn.gD)(e?.sortOrder),n),c=e?.filtersPickedByUser??!0,u=(0,te.EC)(e?.folderUri)?.id;let m;u&&""!==u&&(m=Ft.Z.fromString(u,!0,16).toString(10));return Xn(await this._your_library.all(At.N6.fromPartial({header:{length:l,skip:o,textFilter:e?.textFilter,sortOrder:{sortOrder:(0,Tn.gD)(d.id)},filters:{filter:t},totalCount:!0,allPlaylists:!!e?.textFilter,entitiesInFolders:r,filtersPickedByUser:c,folderId:m},pseudoPlaylistConfig:gi(e)})),e,r)}getContentsDownloadedFilterId(){return Pt.YourLibraryFilters_Filter.DOWNLOADED.toString()}getFilterLabel(e){const t=(0,Tn.K_)(e);return void 0!==t?Pt.YourLibraryFilters_Filter[t]?.toLowerCase():e}getSortOrderLabel(e){const t=(0,Tn.gD)(e);return void 0!==t?Pt.YourLibrarySortOrder_SortOrder[t]?.toLowerCase():e}async getAlbum(e){const t=await this._collection.getAlbumView(Tt.H8.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}}}));return(n=t).album&&n.album.albumMetadata?{type:ie.p.ALBUM,uri:n.album.albumMetadata.link,name:n.album.albumMetadata.name,artists:n.album.albumMetadata.artists.map(Un).filter((e=>e.name)),images:On(n.album.albumMetadata.covers),albumType:ti(n.album.albumType),year:n.album.albumMetadata.year,copyrights:(i=n.album.albumMetadata.copyright,i.map((e=>e.includes("℗")?{type:"P",text:e}:{type:"C",text:e}))),items:n.album.track.map(Zn)}:null;var n,i}}function gi(e){return{likedSongs:{label:p.ag.get("shared.library.entity-row.liked-songs.title"),image:li},yourEpisodes:e?.includeYourEpisodes?{label:p.ag.get("shared.library.entity-row.your-episodes.title"),image:di}:void 0,localFiles:e?.includeLocalFiles?{image:"",label:p.ag.get("shared.library.entity-row.local-files.title")}:void 0,newEpisodes:void 0}}var hi=n(13791);function ki(e){return{type:ie.p.ARTIST,uri:e.link,name:e.name}}function vi(e){const t=e.metadata;return{type:ie.p.TRACK,uid:e.rowId,addedAt:(s=e.addTime,new Date(1e3*s)),uri:t.link,name:t.name,album:(i=t.album,{type:ie.p.ALBUM,uri:i.link,name:i.name,artist:i.artist&&ki(i.artist),images:(a=i.covers?.standardLink,a?[{url:a,label:"standard"}]:[])}),artists:t.artist.map(ki),discNumber:t.discNumber,trackNumber:t.trackNumber,duration:(n=1e3*t.length,{milliseconds:n}),isExplicit:!1,isLocal:t.isLocal,isPlayable:t.playable,is19PlusOnly:!1};var n,i,a,s}var fi=n(52249),yi=n(82849),Si=n(88607),bi=n(70556);const _i="showLocalFiles";function Ni(e){switch(e){case fi.Y.UNKNOWN:return hi.G.UNKNOWN;case fi.Y.ITUNES:return hi.G.ITUNES;case fi.Y.DOWNLOADS:return hi.G.DOWNLOADS;case fi.Y.MY_MUSIC:return hi.G.MY_MUSIC;case fi.Y.WINDOWS_MUSIC_LIBRARY:return hi.G.WINDOWS_MUSIC_LIBRARY;case fi.Y.ANDROID_MEDIA_STORE:case fi.Y.UNRECOGNIZED:return hi.G.UNRECOGNIZED;default:return(0,ve._)(e),hi.G.UNRECOGNIZED}}function Ei(e){switch(e){case hi.G.UNKNOWN:return fi.Y.UNKNOWN;case hi.G.ITUNES:return fi.Y.ITUNES;case hi.G.DOWNLOADS:return fi.Y.DOWNLOADS;case hi.G.MY_MUSIC:return fi.Y.MY_MUSIC;case hi.G.WINDOWS_MUSIC_LIBRARY:return fi.Y.WINDOWS_MUSIC_LIBRARY;case hi.G.UNRECOGNIZED:return fi.Y.UNRECOGNIZED;default:return(0,ve._)(e),fi.Y.UNRECOGNIZED}}const xi=e=>{const t=e?.order===yi.As.DESC?1:0;switch(e?.field){case yi.bD.TITLE:return fi.uh.NAME_ASC+t;case yi.bD.ADDED_AT:return fi.uh.ADD_TIME_ASC+t;case yi.bD.ALBUM:return fi.uh.ALBUM_NAME_ASC+t;case yi.bD.ARTIST:return fi.uh.ARTIST_NAME_ASC+t;case yi.bD.DURATION:return fi.uh.LENGTH_ASC+t;default:return fi.uh.NO_SORT}};function Ci(e){switch(e){case fi.g1.NOT_FOUND:throw new Error("Error adding local files folder: Path not found!");case fi.g1.UNKNOWN:case fi.g1.UNRECOGNIZED:throw new Error("Error adding local files folder!");case fi.g1.SUCCESS:case fi.g1.NOT_CHANGED:return Promise.resolve();default:return(0,ve.U)(e)}}const wi={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 Ii{_totalLength=0;constructor(e,t,n){this._cosmos=t,this._localStorageAPI=n,this._client=new fi._X(e),this._events=new bi.L,this._subscribeToTracksUpdates()}getCapabilities(){return{canSort:!0,canFilter:!0,canFetchAllTracks:!0}}getEvents(){return this._events}getIsEnabled(){const e=this._localStorageAPI.getItem(_i);return!(e instanceof Error)&&e}setIsEnabled(e){this._localStorageAPI.setItem(_i,e),this._emitUpdate()}subscribeIsEnabled(e){const t=this._localStorageAPI.getEvents(),n=t=>{t.data.key===_i&&e(t.data.value)};return t.addListener(Si.u.UPDATE,n),()=>t.removeListener(Si.u.UPDATE,n)}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:Ni(e.id)}))),folders:e.folders}}async addFolder(e){Ci((await this._client.addFolder({path:e.path})).result)}async removeFolder(e){Ci((await this._client.removeFolder({path:e.path})).result)}async mutateDefaultSource(e){Ci((await this._client.mutateDefaultSource({id:Ei(e.id),enabled:e.enabled})).result)}async getTracks(e,t){const n=await this._client.getTracks({query:{sortBy:xi(e),textFilter:t??"",range:void 0,minLength:0,removeDuplicateLinks:!1},policy:wi});return void 0!==n.data?n.data.item.map(vi):[]}_subscribeToTracksUpdates(){let e=!0;this._client.subscribeTracks(fi.Jp.fromPartial({query:{range:{start:0,length:0}}}),(t=>{this._totalLength=t.data?.unfilteredLength??0,e?e=!1:this._emitUpdate()}))}_emitUpdate(){this._events.emit(bi.p.UPDATE,{isEnabled:this.getIsEnabled(),totalLength:this._totalLength})}}var Ti=n(95012),Ai=n(50954),Pi=n(7477),Oi=n(88225),Di=n(60259),Ri=n(82538),Li=n(21113);function Fi(e,t){t=t.split(":").map((e=>encodeURIComponent(e))).join(":");const n=(0,te.EC)(t,{parseUnknown:!0});if(null===n)throw new Error(`URI "${t}" is invalid!`);switch(n.type){case te.JM.TRACK:case te.JM.LOCAL:case te.JM.EPISODE:case te.JM.SHOW:case te.JM.PLAYLIST:case te.JM.PLAYLIST_V2:case te.JM.COLLECTION:case te.JM.COLLECTION_ALBUM:case te.JM.COLLECTION_ARTIST:return t;case te.JM.ALBUM:return(0,te.zJ)(e,n.id).toURI();case te.JM.ARTIST:return(0,te.g8)(e,n.id).toURI();default:return console.warn(`URI "${t}" is can not be downloaded!`),null}}function ji(e){const t=(0,te.EC)(e);if(null===t)throw new Error(`URI "${e}" is invalid!`);switch(t.type){case te.JM.ALBUM:case te.JM.ARTIST:case te.JM.TRACK:case te.JM.LOCAL:case te.JM.EPISODE:case te.JM.SHOW:case te.JM.PLAYLIST:case te.JM.PLAYLIST_V2:case te.JM.COLLECTION:return e;case te.JM.COLLECTION_ALBUM:return(0,te.jy)(t.id).toURI();case te.JM.COLLECTION_ARTIST:return(0,te.WN)(t.id).toURI();default:return console.warn(`URI "${e}" is can not be downloaded!`),null}}let Mi=function(e){return e[e.CONTEXT=0]="CONTEXT",e[e.ITEM=1]="ITEM",e[e.UNRECOGNIZED=2]="UNRECOGNIZED",e}({});function Ui(e){const t=(0,te.EC)(e);if(null===t)return Mi.UNRECOGNIZED;switch(t.type){case te.JM.ALBUM:case te.JM.ARTIST:case te.JM.SHOW:case te.JM.PLAYLIST:case te.JM.PLAYLIST_V2:case te.JM.COLLECTION:case te.JM.COLLECTION_ALBUM:case te.JM.COLLECTION_ARTIST:return Mi.CONTEXT;case te.JM.TRACK:case te.JM.EPISODE:return Mi.ITEM;default:return Mi.UNRECOGNIZED}}function Bi(e=!1,t=!1){return n=>(0,te.hn)(n)||e?Ri.PQ.YES:t?Ri.PQ.NO_PERMISSION_HIDE:Ri.PQ.NO_PERMISSION}var Vi=n(87642),Hi=n(99123);var Gi=function(e){return e.ONLINE="online",e.OFFLINE="offline",e.FORCED_OFFLINE="forced_offline",e.RECONNECTING="reconnecting",e}(Gi||{});function Wi(e){switch(e.connection.status){case Gi.ONLINE:return Ri.T1.ONLINE;case Gi.OFFLINE:return Ri.T1.OFFLINE;case Gi.FORCED_OFFLINE:return Ri.T1.FORCED_OFFLINE;case Gi.RECONNECTING:return Ri.T1.RECONNECTING;default:return Ri.T1.OFFLINE}}function zi(e){const t=e?parseInt(e.totalTracks,10):0,n=e?parseInt(e.downloadedTracks,10):0;return{syncing:e?.downloading??!1,percentage:e?.percentComplete??0,totalItems:t,currentItem:Math.min(n+1,t)}}function Ki(e){switch(e){case Oi.Q8.SUCCESS:return Ri.jK.SUCCESS;case Oi.Q8.GENERIC:return Ri.jK.GENERIC;case Oi.Q8.DISK_FULL:return Ri.jK.DISK_FULL;case Oi.Q8.EXPIRED:return Ri.jK.EXPIRED;case Oi.Q8.TOO_MANY_TRACKS:return Ri.jK.TOO_MANY_TRACKS;case Oi.Q8.NOT_ALLOWED:return Ri.jK.NOT_ALLOWED;case Oi.Q8.CONNECTION_DISABLED:return Ri.jK.CONNECTION_DISABLED;case Oi.Q8.DEVICE_LIMIT_REACHED:return Ri.jK.DEVICE_LIMIT_REACHED;case Oi.Q8.UNRECOGNIZED:default:return Ri.jK.UNRECOGNIZED}}const Yi=100,qi=100;function Zi(e){let t=[];return(0,Vi.PP)((n=>{t.forEach((e=>e.cancel())),t=[],(0,Hi.s)(Array.from(n.keys()),(n=>t.push(e(n))),Yi)}),qi)}class Qi extends Li.N{constructor(e,t,n,i,a){super(),this._username=e,this._cosmos=t,this._offline=n,this._productState=i,this._cache=a,this.setupConnectivityEvents(),this.setupErrorEvents(),this.setupCapabilitiesEvents(),this.setupTotalProgressEvents(),this.setupContextProgressEvents(),this.setupContextAndItemAvailabilityEvents()}setupConnectivityEvents(){let e=0,t=null;this.onAddListener(Li.X.UPDATE_CONNECTIVITY,(()=>{1==++e&&(t=this._cosmos.sub("sp://connectivity-manager/v1/connection",(e=>this.emit(Li.X.UPDATE_CONNECTIVITY,{connectivity:Wi(e)}))))})),this.onRemoveListener(Li.X.UPDATE_CONNECTIVITY,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupErrorEvents(){let e=0,t=null;this.onAddListener(Li.X.ERROR,(()=>{1==++e&&(t=this._offline.subscribeError({},(({code:e})=>this.emit(Li.X.ERROR,{code:Ki(e)}))))})),this.onRemoveListener(Li.X.ERROR,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupCapabilitiesEvents(){let e=0,t=null;this.onAddListener(Li.X.UPDATE_CAPABILITIES,(()=>{1==++e&&(t=this._productState.subValues({},(({pairs:e})=>{e.offline&&this.emit(Li.X.UPDATE_CAPABILITIES,{capabilites:{canDownload:Bi("1"===e.offline,"1"===e["streaming-only-premium"])}})})))})),this.onRemoveListener(Li.X.UPDATE_CAPABILITIES,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupTotalProgressEvents(){let e=0,t=null;this.onAddListener(Li.X.UPDATE_TOTAL_PROGRESS,(()=>{1==++e&&(t=this._offline.subscribeTotalProgress({},(({progress:e})=>this.emit(Li.X.UPDATE_TOTAL_PROGRESS,{progress:zi(e)}))))})),this.onRemoveListener(Li.X.UPDATE_TOTAL_PROGRESS,(()=>{0==--e&&(t?.cancel(),t=null)}))}setupContextProgressEvents(){const e=e=>{const t=ji(e.uri);null!==t&&this.emit(Li.X.UPDATE_CONTEXT_PROGRESS,{uri:t,progress:zi(e.progress)})},t=Zi((t=>this._offline.subscribeContextsProgress({uris:t},(({progresses:t})=>t.forEach((t=>e(t)))))));this.onAddListener(Li.X.UPDATE_CONTEXT_PROGRESS,(e=>{const n=Fi(this._username,e.data.options.uri);null!==n&&t.subscribe(n)})),this.onRemoveListener(Li.X.UPDATE_CONTEXT_PROGRESS,(e=>{const n=Fi(this._username,e.data.options.uri);null!==n&&t.unsubscribe(n)}))}setupContextAndItemAvailabilityEvents(){const e=e=>{const t=ji(e.uri);if(null===t)return;const n=function(e){switch(e.state){case Oi.sK.DOWNLOADED:return Ri.Om.YES;case Oi.sK.DOWNLOADING:return Ri.Om.DOWNLOADING;case Oi.sK.WAITING:case Oi.sK.REQUESTED:return Ri.Om.WAITING;case Oi.sK.NOT_DOWNLOADED:case Oi.sK.ERROR:case Oi.sK.UNRECOGNIZED:default:return Ri.Om.NO}}(e);this._cache.set(t,n),this.emit(Li.X.UPDATE_AVAILABILITY,{uri:t,availability:n})},t=Zi((t=>this._offline.subscribeContexts({uris:t},(({contexts:t})=>t.forEach((t=>{void 0!==t.context&&e(t.context)})))))),n=e=>{const t=ji(e.uri);if(null===t)return;const n=function(e){switch(e.state){case Oi.Jt.DOWNLOADED:return Ri.Om.YES;case Oi.Jt.DOWNLOADING:return Ri.Om.DOWNLOADING;case Oi.Jt.WAITING_FOR_REDOWNLOAD:case Oi.Jt.WAITING:case Oi.Jt.WAITING_LIMIT_EXCEEDED:return Ri.Om.WAITING;case Oi.Jt.NOT_DOWNLOADED:case Oi.Jt.ERROR:case Oi.Jt.DOWNLOADED_EXPIRED:case Oi.Jt.UNRECOGNIZED:default:return Ri.Om.NO}}(e);this._cache.set(t,n),this.emit(Li.X.UPDATE_AVAILABILITY,{uri:t,availability:n})},i=Zi((e=>this._offline.subscribeItems({uris:e},(({items:e})=>e.forEach((e=>n(e)))))));this.onAddListener(Li.X.UPDATE_AVAILABILITY,(e=>{const n=Fi(this._username,e.data.options.uri);if(null===n)return;const a=Ui(n);a===Mi.CONTEXT?t.subscribe(n):a===Mi.ITEM&&i.subscribe(n)})),this.onRemoveListener(Li.X.UPDATE_AVAILABILITY,(e=>{const n=Fi(this._username,e.data.options.uri);if(null===n)return;const a=Ui(n);a===Mi.CONTEXT?t.unsubscribe(n):a===Mi.ITEM&&i.unsubscribe(n)}))}}var Ji=n(16470);const $i=(0,n(49288).y)(Oi.sK);function Xi(e){if($i(e))switch(e){case Oi.sK.UNRECOGNIZED:return Ri.Om.NO;case Oi.sK.REQUESTED:case Oi.sK.WAITING:return Ri.Om.WAITING;case Oi.sK.DOWNLOADING:return Ri.Om.DOWNLOADING;case Oi.sK.DOWNLOADED:return Ri.Om.YES;case Oi.sK.ERROR:case Oi.sK.NOT_DOWNLOADED:return Ri.Om.NO;default:return(0,ve._)(e),Ri.Om.NO}return Ri.Om.NO}function ea(e){const t=e.entityInfo;if(void 0===t)return null;const n=(0,te.EC)(t.uri);if(null===n)return null;switch(n.type){case te.JM.ARTIST:case te.JM.COLLECTION_ARTIST:return function(e){return{type:ie.p.ARTIST,uri:ji(e.uri)??"",name:e.name,images:[{url:e.imageUri,label:"standard"}]}}(t);case te.JM.ALBUM:case te.JM.COLLECTION_ALBUM:return function(e,t){return{type:ie.p.ALBUM,uri:ji(e.uri)??"",name:e.name,artists:[{type:ie.p.ARTIST,uri:t?.artistUri??"",name:t?.artistName??""}],images:[{url:e.imageUri,label:"standard"}]}}(t,e.album);case te.JM.SHOW:return function(e,t){return{type:ie.p.SHOW,uri:e.uri,name:e.name,publisher:t?.creatorName??"",images:[{url:e.imageUri,label:"standard"}]}}(t,e.show);case te.JM.PLAYLIST:case te.JM.PLAYLIST_V2:return function(e,t){return{type:ie.p.PLAYLIST,uri:e.uri,name:e.name,creatorName:t?.creatorName??"",images:[{url:e.imageUri,label:"standard"}]}}(t,e.playlist);case te.JM.COLLECTION:return function(e){return{type:e.uri.endsWith("your-episodes")?ie.p.YOUR_EPISODES:ie.p.LIKED_SONGS,uri:e.uri}}(t);default:return null}}var ta=n(28418),na=n(56375);class ia{_cache=new Map;_canDownload=Bi();constructor(e,t,n,i,a,s){this._username=e,this._storage=n,this._offline=i,this._yourLibrary=a,this._productState=s,this._events=new Qi(this._username,t,this._offline,this._productState,this._cache),this._events.addListener(Li.X.UPDATE_CAPABILITIES,(e=>this._canDownload=e.data.capabilites.canDownload))}getCapabilities(){return{canDownload:e=>this._canDownload(e),canRemoteDownload:!0}}getEvents(){return this._events}async getDownloads(){return(await this._yourLibrary.all(At.N6.fromPartial({header:{allPlaylists:!0,filters:{filter:[Pt.YourLibraryFilters_Filter.DOWNLOADED]},length:1e3}}))).entity.map(ea).filter(ta.K)}getAvailabilitySync(e){return this._cache.get(e)??Ri.Om.NO}async getContextForDevices(e){return function({contexts:e,devices:t}){const n=Object.fromEntries(e.map((({device:e,context:t})=>[e?.cacheId,t])));return t.filter((({clientId:e})=>Ri.wk.includes(e))).map((({deviceId:e,cacheId:t,isLocal:i,name:a,type:s,lastSeenAt:r,platform:o})=>({deviceId:e,cacheId:t,deviceType:s,clientPlatform:o,isLocal:i,name:a,type:(0,Ji.t)(s),lastSeenAtMs:r?.getTime()??0,contextDownloadAvailability:Xi(n[t]?.state),contextDownloadPercentage:n[t]?.percentComplete??0})))}(await this._offline.getContextForDevices(na.GetContextForDevicesRequest.fromPartial({uri:e})))}async addDownload(e,t){const n=Fi(this._username,e);null!==n&&await this._offline.addDownload(Oi.db.fromPartial({uri:n,device:t}))}async removeDownload(e,t){const n=Fi(this._username,e);null!==n&&await this._offline.removeDownload(Oi.db.fromPartial({uri:n,device:t}))}async removeAllDownloads(){await this._offline.removeAllDownloads({})}async removeCache(){await this._storage.deleteUnlockedItems({})}async getStatistics(){const e=await this._storage.getStats({});return{currentSizeMB:parseInt(e.currentSize,10),currentLockedSizeMB:parseInt(e.currentLockedSize,10)}}}var aa=n(17816),sa=n(74824);n(91628);class ra{getCurrentDevice(){return Promise.resolve(null)}getDevices(){return Promise.resolve([])}getFiltersEvents(){return null}setCurrentDevice(){return Promise.resolve(void 0)}getSavedDevices(){return[]}}class oa{_info=null;getCapabilities(){return{canChangeVolume:!0,canGetPlaybackInfo:!0,canGetFiles:!0,puffinEnabled:!0}}_isLocal=!1;_isAvailable=!1;_volume=-1;constructor(e,t,n,i,a,s){this._playbackService=e,this._storageService=t,this._builder=n,this._localStorageAPI=i,this._transport=a,this._connectServiceClient=s,this._events=new sa.N,this._filters=new ra,this._playbackService.subPlaybackInfo({},(async e=>{this._info=e,this._events.emit(sa.r.INFO,e)})),this._playbackService.subVolume({},(({volume:e})=>{this._volume=e,this.emitVolume()})),this._connectServiceClient&&this._connectServiceClient.state(ct.StateRequest.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:r.tp.USER,volume:e,connectLoggingParams:void 0})}async raiseVolume(){this._playbackService.raiseVolume({source:r.tp.USER,connectLoggingParams:void 0})}async lowerVolume(){this._playbackService.lowerVolume({source:r.tp.USER,connectLoggingParams:void 0})}async getPlaybackInfo(){return this._info}async getFiles(e){const t=await this._playbackService.getFiles({uri:e});if(t.status!==r.ao.GETFILES_OK)throw new Error(`Failed to get files for URI '${e}'. Error code: ${t.status}`);const n=await Promise.all(t.files.map((({fileId:e})=>this._storageService.getFileRanges({fileId:e,realm:aa.Realm.STREAM}))));return t.files.map(((e,t)=>({...e,byteSize:n[t].byteSizeKnown?Number.parseInt(n[t].byteSize,10):-1,byteRanges:n[t].ranges.map((e=>({fromByte:Number.parseInt(e.fromByte,10),toByte:Number.parseInt(e.toByte,10)})))})))}getVolumeInternal(){return this._isAvailable?this._volume:-1}emitVolume(){this._events.emit(sa.r.VOLUME,{volume:this.getVolumeInternal(),isLocal:this._isLocal})}async getDevices(){return this._filters.getDevices()}async getCurrentDevice(){return this._filters.getCurrentDevice()}async setCurrentDevice(e){return this._filters.setCurrentDevice(e)}getSavedDevices(){return this._filters.getSavedDevices()}getFiltersEvents(){return this._filters.getFiltersEvents()}}var la=n(33782),da=n(22508),ca=n(66842);const ua="sp://core-playlist/v1";function ma(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 pa(e){return{milliseconds:(t=e,n=-1,t?parseInt(t,10):n)};var t,n}function ga(e){return"true"===e?.toLowerCase()}const ha=9;function ka(e,t){if(void 0===e)return[];const n="artist_uri",i="artist_name",a=[{type:t,uri:e[n]??"",name:e[i]??""}];for(let s=1;s<=ha;++s){const r=`${n}:${s}`,o=`${i}:${s}`;if(!e[r]||!e[o])break;a.push({type:t,uri:e[r]??"",name:e[o]??""})}return a}function va(e){return{type:ie.p.ALBUM,uri:e.album_uri??"",name:e.album_title??"",images:ma(e)}}function fa(e){return{type:ie.p.SHOW,uri:e.album_uri??"",name:e.album_title??"",images:ma(e)}}function ya(e){return{type:ie.p.ALBUM,uri:e.album_uri??"",name:e.album_title??"",images:ma(e)}}function Sa(e){return{type:ie.p.AUDIOBOOK,uri:e.album_uri??"",name:e.album_title??"",images:ma(e)}}function ba(e,t){return(0,te.wj)(t.uri)||(0,te.dB)(t.uri)?function(e,t){const n=t.metadata;return{type:ie.p.TRACK,uri:t.uri,uid:t.uid,name:n.title??"",mediaType:n["media.type"]??"audio",duration:pa(n.duration),album:va(n),artists:ka(n,ie.p.ARTIST),isLocal:ga(n.is_local),isExplicit:ga(n.is_explicit),is19PlusOnly:ga(n.is_19_plus),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.album.images}}}(e,t):(0,te.hn)(t.uri)?function(e){return"true"===e.metadata.is_audiobook_chapter}(t)?function(e,t){const n=t.metadata;return{type:ie.p.CHAPTER,uri:t.uri,uid:t.uid,name:n.title??"",mediaType:n["media.type"]??"audio",duration:pa(n.duration),book:Sa(n),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.book.images}}}(e,t):function(e,t){const n=t.metadata;return{type:ie.p.EPISODE,uri:t.uri,uid:t.uid,name:n.title??"",mediaType:n["media.type"]??"audio",duration:pa(n.duration),show:fa(n),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.show.images}}}(e,t):(0,te.mg)(t.uri)?function(e,t){const n=t.metadata,i=ga(n.is_podcast_advertisement),a=n.artist_name??null;return{type:ie.p.AD,uri:t.uri,uid:t.uid,title:n.title??null,advertiser:i?a:n.advertiser??null,url:n.click_url??null,id:n.ad_id??null,mediaType:n["media.type"]??"audio",duration:pa(n.duration),images:ma(n),videoOrientation:n["ad.video_orientation"],isPodcastAd:i,isSkippableAd:ga(n["ad.is_skippable"]),isTestAd:ga(n["ad.is_test"]),provider:e.provider.length>0?e.provider:null,metadata:t.metadata}}(e,t):function(e,t){const n=t.metadata;return{type:ie.p.UNKNOWN,uri:t.uri,uid:t.uid??null,name:n.title??"",mediaType:n["media.type"]??"audio",duration:pa(n.duration),album:ya(n),artists:ka(n,ie.p.ARTIST),provider:e.provider.length>0?e.provider:null,metadata:t.metadata,get images(){return this.album.images}}}(e,t)}const _a={canPause:!0,canResume:!0,canSeek:!0,canSkipPrevious:!0,canSkipNext:!0,canToggleRepeatContext:!0,canToggleRepeatTrack:!0,canToggleShuffle:!0,disallowPausingReasons:[],disallowResumingReasons:[],disallowSeekingReasons:[],disallowSkippingPreviousReasons:[],disallowSkippingNextReasons:[],disallowTogglingRepeatContextReasons:[],disallowTogglingRepeatTrackReasons:[],disallowTogglingShuffleReasons:[],disallowTransferringPlaybackReasons:[]};function Na(e=[]){return e.map((e=>da.Fd.includes(e)?e:"unknown"))}function Ea(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,disallowPausingReasons:Na(e.disallowPausingReasons),disallowResumingReasons:Na(e.disallowResumingReasons),disallowSeekingReasons:Na(e.disallowSeekingReasons),disallowSkippingPreviousReasons:Na(e.disallowSkippingPrevReasons),disallowSkippingNextReasons:Na(e.disallowSkippingNextReasons),disallowTogglingRepeatContextReasons:Na(e.disallowTogglingRepeatContextReasons),disallowTogglingRepeatTrackReasons:Na(e.disallowTogglingRepeatTrackReasons),disallowTogglingShuffleReasons:Na(e.disallowTogglingShuffleReasons),disallowTransferringPlaybackReasons:Na(e.disallowTransferringPlaybackReasons)}}const xa={bitrateLevel:da.M4.UNKNOWN,strategy:da.kZ.UNKNOWN,targetBitrateLevel:da.M4.UNKNOWN,targetBitrateAvailable:!1,hifiStatus:da.dR.NONE};function Ca(e){const t=e=>{switch(e){case la.oW.LOW:return da.M4.LOW;case la.oW.NORMAL:return da.M4.NORMAL;case la.oW.HIGH:return da.M4.HIGH;case la.oW.VERY_HIGH:return da.M4.VERY_HIGH;case la.oW.HIFI:return da.M4.HIFI;default:return da.M4.UNKNOWN}};return{bitrateLevel:t(e.bitrateLevel),strategy:(()=>{switch(e.strategy){case la.dj.BEST_MATCHING:return da.kZ.BEST_MATCHING;case la.dj.BACKEND_ADVISED:return da.kZ.BACKEND_ADVISED;case la.dj.OFFLINED_FILE:return da.kZ.OFFLINED_FILE;case la.dj.CACHED_FILE:return da.kZ.CACHED_FILE;case la.dj.LOCAL_FILE:return da.kZ.LOCAL_FILE;default:return da.kZ.UNKNOWN}})(),targetBitrateLevel:t(e.targetBitrateLevel),targetBitrateAvailable:e.targetBitrateAvailable,hifiStatus:(()=>{switch(e.hifiStatus){case la.Td.UNRECOGNIZED:case la.Td.NONE:default:return da.dR.NONE;case la.Td.OFF:return da.dR.OFF;case la.Td.ON:return da.dR.ON}})()}}function wa({uri:e,url:t,pages:n,metadata:i,restrictions:a}){return void 0!==n?la._y.fromPartial({uri:e,url:t,pages:n.map(Ia),metadata:i,restrictions:Ra(a),isLoading:!1}):la._y.fromPartial({uri:e,url:t??`context://${e}`,metadata:i,isLoading:!0})}function Ia({uri:e,url:t,nextPageUrl:n,items:i,metadata:a}){if(void 0!==t)return la.uF.fromPartial({pageUrl:t,nextPageUrl:n,metadata:{...a,page_uri:e},isLoading:!0});if(void 0!==i)return la.uF.fromPartial({tracks:i.map(Ta),nextPageUrl:n,metadata:a,isLoading:!1});throw new Error("Invalid 'ContextPage' provided! Either 'url' or 'items' needs to be set.")}function Ta(e){return la.nh.fromPartial({uid:e.uid??"",uri:e.uri,metadata:e.metadata??{}})}var Aa=n(89241),Pa=n(78418);function Oa(e){return new Aa.jB(function(e){switch(e){case Pa.ContextPlayerError_ErrorCode.SUCCESS:return Aa.cg.SUCCESS;case Pa.ContextPlayerError_ErrorCode.PLAYBACK_STUCK:return Aa.cg.PLAYBACK_STUCK;case Pa.ContextPlayerError_ErrorCode.PLAYBACK_ERROR:return Aa.cg.PLAYBACK_ERROR;case Pa.ContextPlayerError_ErrorCode.LICENSE_CHANGE:return Aa.cg.LICENSE_CHANGE;case Pa.ContextPlayerError_ErrorCode.PLAY_RESTRICTED:return Aa.cg.PLAY_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.STOP_RESTRICTED:return Aa.cg.STOP_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.UPDATE_RESTRICTED:return Aa.cg.UPDATE_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.PAUSE_RESTRICTED:return Aa.cg.PAUSE_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.RESUME_RESTRICTED:return Aa.cg.RESUME_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.SKIP_TO_PREV_RESTRICTED:return Aa.cg.SKIP_TO_PREV_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.SKIP_TO_NEXT_RESTRICTED:return Aa.cg.SKIP_TO_NEXT_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.SKIP_TO_NON_EXISTENT_TRACK:return Aa.cg.SKIP_TO_NON_EXISTENT_TRACK;case Pa.ContextPlayerError_ErrorCode.SEEK_TO_RESTRICTED:return Aa.cg.SEEK_TO_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.TOGGLE_REPEAT_CONTEXT_RESTRICTED:return Aa.cg.TOGGLE_REPEAT_CONTEXT_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.TOGGLE_REPEAT_TRACK_RESTRICTED:return Aa.cg.TOGGLE_REPEAT_TRACK_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.SET_OPTIONS_RESTRICTED:return Aa.cg.SET_OPTIONS_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.TOGGLE_SHUFFLE_RESTRICTED:return Aa.cg.TOGGLE_SHUFFLE_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.SET_QUEUE_RESTRICTED:return Aa.cg.SET_QUEUE_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.INTERRUPT_PLAYBACK_RESTRICTED:return Aa.cg.INTERRUPT_PLAYBACK_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.ONE_TRACK_UNPLAYABLE:return Aa.cg.ONE_TRACK_UNPLAYABLE;case Pa.ContextPlayerError_ErrorCode.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED:return Aa.cg.ONE_TRACK_UNPLAYABLE_AUTO_STOPPED;case Pa.ContextPlayerError_ErrorCode.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED:return Aa.cg.ALL_TRACKS_UNPLAYABLE_AUTO_STOPPED;case Pa.ContextPlayerError_ErrorCode.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED:return Aa.cg.SKIP_TO_NON_EXISTENT_TRACK_AUTO_STOPPED;case Pa.ContextPlayerError_ErrorCode.QUEUE_REVISION_MISMATCH:return Aa.cg.QUEUE_REVISION_MISMATCH;case Pa.ContextPlayerError_ErrorCode.VIDEO_PLAYBACK_ERROR:return Aa.cg.VIDEO_PLAYBACK_ERROR;case Pa.ContextPlayerError_ErrorCode.VIDEO_GEOGRAPHICALLY_RESTRICTED:return Aa.cg.VIDEO_GEORESTRICTED;case Pa.ContextPlayerError_ErrorCode.VIDEO_UNSUPPORTED_PLATFORM_VERSION:return Aa.cg.VIDEO_UNSUPPORTED_PLATFORM_VERSION;case Pa.ContextPlayerError_ErrorCode.VIDEO_UNSUPPORTED_CLIENT_VERSION:return Aa.cg.VIDEO_UNSUPPORTED_CLIENT_VERSION;case Pa.ContextPlayerError_ErrorCode.VIDEO_UNSUPPORTED_KEY_SYSTEM:return Aa.cg.VIDEO_UNSUPPORTED_KEY_SYSTEM;case Pa.ContextPlayerError_ErrorCode.VIDEO_MANIFEST_DELETED:return Aa.cg.VIDEO_MANIFEST_DELETED;case Pa.ContextPlayerError_ErrorCode.VIDEO_COUNTRY_RESTRICTED:return Aa.cg.VIDEO_COUNTRY_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.VIDEO_UNAVAILABLE:return Aa.cg.VIDEO_UNAVAILABLE;case Pa.ContextPlayerError_ErrorCode.VIDEO_CATALOGUE_RESTRICTED:return Aa.cg.VIDEO_CATALOGUE_RESTRICTED;case Pa.ContextPlayerError_ErrorCode.INVALID:return Aa.cg.INVALID;case Pa.ContextPlayerError_ErrorCode.TIMEOUT:return Aa.cg.TIMEOUT;case Pa.ContextPlayerError_ErrorCode.PLAYBACK_REPORTING_ERROR:return Aa.cg.PLAYBACK_REPORTING_ERROR;case Pa.ContextPlayerError_ErrorCode.UNKNOWN:return Aa.cg.UNKNOWN;case Pa.ContextPlayerError_ErrorCode.UNRECOGNIZED:default:return Aa.cg.UNRECOGNIZED}}(e.code),e.data.reasons?e.data.reasons.split(","):[])}function Da(e){return la.Yr.fromPartial({featureIdentifier:e.featureIdentifier??"",featureVersion:e.featureVersion??"",referrerIdentifier:e.referrerIdentifier??"",viewUri:e.viewURI??"",externalReferrer:e.externalReferrer??""})}function Ra(e){return la.aS.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})}function La(e,{shuffle:t,repeat:n}){const i=la.ST.fromPartial({});return void 0!==t?i.shufflingContext={value:t}:(0,te.RS)(e.uri)&&(i.shufflingContext={value:!1}),void 0!==n?(i.repeatingContext={value:n!==da.zq.REPEAT_NONE},i.repeatingTrack={value:n===da.zq.REPEAT_TRACK}):(0,te.RS)(e.uri)&&(i.repeatingContext={value:!1},i.repeatingTrack={value:!1}),i}function Fa(e,t){return la.Nr.fromPartial({skipTo:void 0!==t.skipTo?(n=t.skipTo,{pageUrl:n.pageURL??"",pageIndex:void 0!==n.pageIndex?{value:n.pageIndex.toString()}:void 0,trackUid:n.uid??"",trackUri:n.uri??"",trackIndex:void 0!==n.index?{value:n.index.toString()}:void 0}):void 0,seekTo:void 0!==t.seekTo?{value:t.seekTo.toString()}:void 0,playerOptionsOverride:La(e,t)});var n}function ja(e){return{feature_identifier:e.featureIdentifier,feature_version:e.featureVersion??"",referrer_identifier:e.referrerIdentifier??"",view_uri:e.viewURI??"",external_referrer:e.externalReferrer??"",device_identifier:""}}function Ma(e,t){const n={},i=function(e,{shuffle:t,repeat:n}){const i={};return void 0!==t?i.shuffling_context=t:(0,te.RS)(e.uri)&&(i.shuffling_context=!1),void 0!==n?(i.repeating_context=n!==da.zq.REPEAT_NONE,i.repeating_track=n===da.zq.REPEAT_TRACK):(0,te.RS)(e.uri)&&(i.repeating_context=!1,i.repeating_track=!1),i}(e,t);0!==Object.keys(i).length&&(n.player_options_override=i);const a=function({skipTo:e}){const{pageURL:t,pageIndex:n,uid:i,uri:a,index:s}=e??{};if(void 0===i&&void 0===a&&void 0===s&&void 0===n&&void 0===t)return;const r={};return void 0!==t&&(r.page_url=t),void 0!==n&&(r.page_index=n),void 0!==i&&(r.track_uid=i),void 0!==a&&(r.track_uri=a),void 0!==s&&(r.track_index=s),r}(t);return void 0!==a&&(n.skip_to=a),void 0!==t.seekTo&&(n.seek_to=t.seekTo),n}var Ua=n(20373),Ba=n(22021);function Va({uri:e,url:t,nextPageUrl:n,items:i,metadata:a}){if(void 0!==t)return Ba.ContextPage.fromPartial({pageUrl:t,nextPageUrl:n,metadata:{...a,page_uri:e},isLoaded:!1});if(void 0!==i)return Ba.ContextPage.fromPartial({tracks:i.map(Ta),nextPageUrl:n,metadata:a,isLoaded:!0});throw new Error("Invalid 'ContextPage' provided! Either 'url' or 'items' needs to be set.")}function Ha({uri:e,url:t,pages:n,metadata:i,restrictions:a}){return void 0!==n?Ua.Context.fromPartial({uri:e,url:t,pages:n.map(Va),metadata:i,restrictions:Ra(a),isLoaded:!0}):Ua.Context.fromPartial({uri:e,url:t??`context://${e}`,metadata:i,isLoaded:!1})}function Ga(e){if(e.error!==la.a4.OK)throw new Error(`Command failed with code '${e.error}' and reasons '${e.reasons}'`);return{}}function Wa(e){return la.yb.fromPartial({commandInitiatedTime:{value:`${Date.now()}`},interactionIds:e?.interactionId?[e.interactionId]:void 0,pageInstanceIds:e?.pageInstanceId?[e.pageInstanceId]:void 0})}async function za(e,t,n,i){return e.setQueue(la.c_.fromPartial({nextTracks:t,prevTracks:n,queueRevision:i,loggingParams:Wa()}))}let Ka=!1;class Ya extends ca.Bc{constructor(e,t){super(),this._client=e;let n=null,i=null;this._client.getState(la.o7.fromPartial({prevTracksCap:{value:"0"},nextTracksCap:{value:`${t}`}}),(e=>{const t=function(e){const t={timestamp:parseInt(e.timestamp,10),context:{uri:e.contextUri,url:e.contextUrl,metadata:e.contextMetadata},index:{pageURI:e.pageMetadata.page_uri??null,pageIndex:void 0!==e.index?.page?parseInt(e.index?.page,10):null,itemIndex:void 0!==e.index?.track?parseInt(e.index?.track,10):null},item:null,shuffle:null,repeat:null,speed:e.playbackSpeed?.value??null,positionAsOfTimestamp:parseInt(e.positionAsOfTimestamp?.value??"0",10),duration:void 0!==e.duration?parseInt(e.duration.value,10):null,hasContext:e.isPlaying&&void 0!==e.track,isPaused:e.isPaused,isBuffering:e.isBuffering,restrictions:void 0!==e.restrictions?Ea(e.restrictions):_a,previousItems:[],nextItems:[],playbackQuality:void 0!==e.playbackQuality?Ca(e.playbackQuality):xa,playbackId:e.playbackId.length>0?(0,Ce.zv)(e.playbackId):null,sessionId:e.sessionId};return void 0!==e.options&&(t.shuffle=e.options.shufflingContext,e.options.repeatingTrack?t.repeat=da.zq.REPEAT_TRACK:e.options.repeatingContext?t.repeat=da.zq.REPEAT_CONTEXT:t.repeat=da.zq.REPEAT_NONE),void 0!==e.track&&void 0!==e.track.contextTrack&&(t.item=ba(e.track,e.track.contextTrack)),e.prevTracks.forEach((e=>{e.contextTrack&&t.previousItems.push(ba(e,e.contextTrack))})),e.nextTracks.forEach((e=>{e.contextTrack&&t.nextItems.push(ba(e,e.contextTrack))})),t}(e);"0"===e.timestamp?null===i&&(i=setTimeout((()=>{this.emit(ca.rg.UPDATE,t)}),500)):(null!==i&&(clearTimeout(i),i=null),this.emit(ca.rg.UPDATE,t),null!==n&&function(e,t){const n=e.contextUri===t.contextUri,i=e.sessionId===t.sessionId,a=(s=e.playbackId,r=t.playbackId,s.byteLength===r.byteLength&&s.every(((e,t)=>e===r[t])));var s,r;const o=t.isPaused,l="0"===t.positionAsOfTimestamp?.value;return n&&i?(o||(Ka=!0),!a&&Ka&&o&&l):(Ka=!1,!1)}(n,e)&&this.emit(ca.rg.CONTEXT_WRAPAROUND,{contextURI:e.contextUri,previousItemURI:n.track?.contextTrack?.uri??null}),n=e)})),this._client.getError(la.vf.fromPartial({}),(e=>{this.emit(ca.rg.ERROR,Oa(e))}))}}var qa=n(5666);class Za{_queue=null;constructor(e,t,n){this._client=e,this._events=t,this.getRepeatMode=n,this._client.getQueue(la.as.fromPartial({}),(e=>{this._queue=e,this._queueState=this.convertQueueState(e,this.getRepeatMode()),this._events.emitQueueUpdate(this._queueState)})),this._queueState=(0,qa.ew)([],this.getRepeatMode())}convertQueueState(e,t){const n=e?.track&&e.track.contextTrack?ba(e.track,e.track.contextTrack):null,i=this._queue?.nextTracks?.filter((e=>e.contextTrack)).map((e=>ba(e,e.contextTrack)))??[],a=n?[n,...i]:i;return(0,qa.ew)(a,t)}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 la.L6.fromPartial({...e,contextTrack:la.nh.fromPartial({...e.contextTrack,metadata:{...e.contextTrack?.metadata,is_queued:"true"}}),provider:"queue"})}createQueueItem(e,t){return la.L6.fromPartial({contextTrack:la.nh.fromPartial({uri:e.uri,metadata:{is_queued:t.toString()}}),provider:t?"queue":"context"})}async addToQueue(e){if(null===this._queue)return;const t=e.map((e=>this.createQueueItem(e,!0))),n=[...this._queue?.nextTracks||[]],i=n.map((e=>e.provider)).lastIndexOf("queue");n.splice(i+1,0,...t),await za(this._client,n,this._queue.prevTracks,this._queue.queueRevision)}async removeFromQueue(e){null!==this._queue&&await za(this._client,this._queue.nextTracks.filter((t=>!e.some((e=>this.isSameItem(e,t))))),this._queue.prevTracks,this._queue.queueRevision)}async clearQueue(){null!==this._queue&&await za(this._client,this._queue.nextTracks.filter((e=>!this.isQueued(e))),this._queue.prevTracks,this._queue.queueRevision)}async reorderQueue(e,t){if(null===this._queue)return;const n=[...this._queue?.nextTracks||[]];await za(this._client,(0,qa.iT)(e,n,t,this.isSameItem,this.isQueued,this.markAsQueued),this._queue.prevTracks,this._queue.queueRevision)}async insertIntoQueue(e,t){if(null===this._queue)return;const n=[...this._queue?.nextTracks||[]];await za(this._client,(0,qa.LT)(e,n,t,this.isSameItem,this.isQueued,this.createQueueItem),this._queue.prevTracks,this._queue.queueRevision)}getQueue(){return this._queueState}getInternalQueue(){return this._queue}}const Qa=e=>(0,te.RS)(e);class Ja{_state=null;forcedShuffle=!1;constructor(e,t,n,i,a){this._cosmos=e,this._prefs=t,this._contextPlayer=n,this._collection=i,this._defaultFeatureVersion=a,this._events=new Ya(this._contextPlayer,50),this._queue=new Za(this._contextPlayer,this._events,(()=>this._state?.repeat??da.zq.REPEAT_NONE)),this._events.addListener(ca.rg.UPDATE,(({data:e})=>{this._state=e,this.forcedShuffle&&e&&!1===e.shuffle&&e.restrictions.canToggleShuffle&&!Qa(e.context.uri)&&this.setShuffle(!0)})),this.referrer="PlayerCore_UnknownReferrer"}setDefaultFeatureVersion(e){void 0===e.featureVersion&&(e.featureVersion=this._defaultFeatureVersion)}getCapabilities(){return{canChangeSpeed:!0,canChangeVolume:!0,canPlayMultipleContextPages:!0,maxNextTracks:50,hasDecoratedQueue:!0}}getEvents(){return this._events}getState(){return this._state}getReferrer(){return this.referrer}setReferrer(e){this.referrer=e}async play(e,t,n={}){let i=n;if(this.forcedShuffle&&!Qa(e.uri)&&(i={...n,shuffle:!0}),this._events.emitPlaySync(e,t,n))return;this.setDefaultFeatureVersion(t);const a=(0,te.nK)(e.uri),s=(0,te.zO)(e.uri)&&!e.uri.endsWith("your-episodes")||(0,te.yF)(e.uri)||(0,te.aE)(e.uri),r=!!e.url;s&&!r?await async function(e,t,n,i){const a=Tt.rI.fromPartial({sort:t.metadata?.[da.sb.LIST_UTIL_SORT],filter:t.metadata?.[da.sb.LIST_UTIL_FILTER],context:Ha(t),preparePlayOptions:Fa(t,i),playOrigin:Da(n),loggingParams:Wa(i.loggingParams)}),s=(0,te.EC)(t.uri);return s?.type===te.JM.COLLECTION_ARTIST?(a.id=s.id,await e.playArtist(a)):s?.type===te.JM.COLLECTION_ALBUM?(a.id=s.id,await e.playAlbum(a)):await e.playTracks(a)}(this._collection,e,t,i):a&&!r?await async function(e,t,n,i){return await e.post(`${ua}/playlist/${t.uri}/play`,{prepare_play_options:Ma(t,i),play_origin:ja(n),...t.metadata?{context_metadata:t.metadata}:{},logging_params:(a=i.loggingParams,{command_initiated_time:Date.now(),interaction_ids:a?.interactionId?[a.interactionId]:[],page_instance_ids:a?.pageInstanceId?[a.pageInstanceId]:[]})});var a}(this._cosmos,e,t,i):await async function(e,t,n,i){return e.play(la.l7.fromPartial({preparePlayRequest:la.vy.fromPartial({context:wa(t),playOrigin:Da(n),options:Fa(t,i)}),loggingParams:Wa(i.loggingParams)})).then(Ga)}(this._contextPlayer,e,t,i)}async pause(){this._events.emitPauseSync()||await async function(e){return e.pause(la.jX.fromPartial({loggingParams:Wa()})).then(Ga)}(this._contextPlayer)}async resume(){this._events.emitResumeSync()||await async function(e){return e.resume(la.$5.fromPartial({loggingParams:Wa()})).then(Ga)}(this._contextPlayer)}async skipToNext(e){this._events.emitSkipToNextSync()||await async function(e,t,n){const i={};return void 0!==n&&t&&(i.track=t.nextTracks.find((e=>(!n.uid||e.contextTrack?.uid===n.uid)&&e.contextTrack?.uri===n.uri))?.contextTrack),e.skipNext(la.t6.fromPartial({...i,loggingParams:Wa()})).then(Ga)}(this._contextPlayer,this._queue.getInternalQueue(),e)}async skipTo(e){this._events.emitSkipToNextSync()||await async function(e,t){const n={track:t};return e.skipNext(la.t6.fromPartial({...n,loggingParams:Wa()})).then(Ga)}(this._contextPlayer,Ta(e))}async skipToPrevious(){this._events.emitSkipToPreviousSync()||await async function(e){return e.skipPrev(la.n.fromPartial({allowSeeking:!0,loggingParams:Wa()})).then(Ga)}(this._contextPlayer)}async seekTo(e){await async function(e,t,n=null){return e.seekTo(la.eS.fromPartial({position:Math.floor(t).toString(),relative:la.RN.BEGINNING,options:{onlyForPlaybackId:n??void 0},loggingParams:Wa()})).then(Ga)}(this._contextPlayer,e,this._state?.playbackId?(0,Ce.Wu)(this._state.playbackId):null)}async seekBy(e){await async function(e,t,n=null){return e.seekTo(la.eS.fromPartial({position:Math.floor(t).toString(),relative:la.RN.CURRENT,options:{onlyForPlaybackId:n??void 0},loggingParams:Wa()})).then(Ga)}(this._contextPlayer,e,this._state?.playbackId?(0,Ce.Wu)(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(la.ed.fromPartial({shufflingContext:t,loggingParams:Wa()})).then(Ga)}(this._contextPlayer,this.forcedShuffle||e)}async setRepeat(e){await async function(e,t){let n=!1,i=!1;switch(t){case da.zq.REPEAT_NONE:n=!1,i=!1;break;case da.zq.REPEAT_CONTEXT:n=!0,i=!1;break;case da.zq.REPEAT_TRACK:n=!0,i=!0}return e.setOptions(la.jx.fromPartial({repeatingTrack:{value:i},repeatingContext:{value:n},loggingParams:Wa()})).then(Ga)}(this._contextPlayer,e)}async setSpeed(e){await async function(e,t){await e.set({entries:{"audio.episode.speed":{number:String(100*t)}}})}(this._prefs,e)}async canPlayEncryptedContent(){return!0}async refreshCurrentContext(){}async updateContext(e,t,n){t&&async function(e,t,n,i){e.updateContext(la.eB.fromPartial({sessionId:t,context:n,loggingParams:Wa(i?.loggingParams)})).then(Ga)}(this._contextPlayer,e,t,n)}async addToQueue(e){if(!this._events.emitQueueActionSync(ca.FE.ADD))try{await this._queue.addToQueue(e),this._events.emitQueueActionComplete(ca.FE.ADD)}catch(e){throw this._events.emitQueueActionComplete(ca.FE.ADD,e instanceof Error?e:new Error("Unknown error object")),e}}async removeFromQueue(e){if(!this._events.emitQueueActionSync(ca.FE.REMOVE))try{await this._queue.removeFromQueue(e),this._events.emitQueueActionComplete(ca.FE.REMOVE)}catch(e){throw this._events.emitQueueActionComplete(ca.FE.REMOVE,e instanceof Error?e:new Error("Unknown error object")),e}}async clearQueue(){if(!this._events.emitQueueActionSync(ca.FE.CLEAR))try{await this._queue.clearQueue(),this._events.emitQueueActionComplete(ca.FE.CLEAR)}catch(e){throw this._events.emitQueueActionComplete(ca.FE.CLEAR,e instanceof Error?e:new Error("Unknown error object")),e}}async reorderQueue(e,t){if(!this._events.emitQueueActionSync(ca.FE.REORDER))try{await this._queue.reorderQueue(e,t),this._events.emitQueueActionComplete(ca.FE.REORDER)}catch(e){throw this._events.emitQueueActionComplete(ca.FE.REORDER,e instanceof Error?e:new Error("Unknown error object")),e}}async insertIntoQueue(e,t){if(!this._events.emitQueueActionSync(ca.FE.INSERT))try{await this._queue.insertIntoQueue(e,t),this._events.emitQueueActionComplete(ca.FE.INSERT)}catch(e){throw this._events.emitQueueActionComplete(ca.FE.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}}var $a=n(16556),Xa=n.n($a),es=n(52645),ts=n(71249),ns=(n(41815),n(8640),n(15792),n(72711),n(70456),n(63192),n(89623),n(67524),n(81708),n(93048),n(57812),n(95583),n(45793),n(66141),n(65689),n(32691),n(43434),n(10853),n(52272),n(73034),n(72599),n(94296),n(13485),n(6894),n(41381),n(46747),n(50614),n(1531),n(54546),n(87074)),is=n(71920),as=n(43249);const ss={},rs={policy:{folder:{rows:!0},playlist:{ownedBySelf:!0},request:ss}},os={policy:{folder:{addTime:!0,rowId:!0,link:!0,name:!0,rows:!0},playlist:{addTime:!0,allows:{insert:!0,remove:!0},canReportAnnotationAbuse:!0,collaborative:!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},request:ss}},ls={policy:{addTime:!0,addedBy:{image:!0,link:!0,name:!0,username:!0},album:{artist:{link:!0,name:!0},link:!0,name:!0,covers:!0},artist:{link:!0,name:!0},covers:!0,description:!0,discNumber:!0,formatListAttributes:!0,is19PlusOnly:!0,isExplicit:!0,isLocal:!0,language:!0,length:!0,link:!0,mediaTypeEnum:!0,name:!0,playable:!0,publishDate:!0,rowId:!0,show:{link:!0,name:!0,publisher:!0,covers:!0},trackNumber:!0,extension:[as.ExtensionKind.PODCAST_SUBSCRIPTIONS]}},ds={policy:{playlist:{allows:{insert:!0,remove:!0},canReportAnnotationAbuse:!0,collaborative:!0,containsEpisodes:!0,containsSpotifyTracks:!0,description:!0,duration:!0,followers:!0,formatListAttributes:!0,formatListType:!0,link:!0,madeFor:{image:!0,link:!0,name:!0,username:!0},name:!0,ownedBySelf:!0,owner:{image:!0,link:!0,name:!0,username:!0},picture:!0,playable:!0,published:!0,totalLength:!0,basePermission:!0,userCapabilities:!0,collaboratingUsers:{count:!0,limit:5,collaborator:{user:{username:!0,link:!0,name:!0,image:!0,thumbnail:!0},numberOfItems:!0,numberOfTracks:!0,numberOfEpisodes:!0,isOwner:!0}}},track:ls.policy,episode:ls.policy}};function cs(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 us(e){return new Date(1e3*e)}function ms(e){return{milliseconds:e}}function ps(e){return{isPaywalled:e.podcastSubscription?.isPaywalled??!1,isUserSubscribed:e.podcastSubscription?.isUserSubscribed??!1}}function gs(e){return{type:ie.p.ARTIST,uri:e.link,name:e.name}}function hs(e){return{type:ie.p.ARTIST,uri:e.link,name:e.name}}function ks(e){return{type:ie.p.ALBUM,uri:e.link,name:e.name,artist:e.artist&&hs(e.artist),images:cs(e.covers)}}function vs(e,t){return{type:ie.p.SHOW,uri:e.link,name:e.name,publisher:e.publisher,images:cs(e.covers),mediaType:t}}function fs(e,t){const n=wn(e.extension);return{type:ie.p.EPISODE,uri:e.link,name:e.name,description:e.description,duration:ms(1e3*e.length),timeLeft:ms(1e3*t.timeLeft),images:cs(e.covers),isExplicit:e.isExplicit,isPlayable:t.isPlayable,languages:[e.language],release:(i=e.publishDate,{date:us(parseInt(i,10)).toISOString(),precision:"day"}),show:vs(e.show,e.mediaTypeEnum),podcastSubscription:ps(n),is19PlusOnly:e.is19PlusOnly};var i}function ys(e,t){if(!e.item)throw new Error("Invalid playlist cosmos response!");return{items:e.item.map((e=>function(e){const t={uid:e.rowId,playIndex:null,addedAt:(n=e.addTime,void 0!==n?us(n).toISOString():null),addedBy:bs(e.addedBy),formatListAttributes:_s(e.formatListAttributes)};var n,i,a;if(void 0!==e.trackMetadata&&void 0!==e.trackPlayState)return{...t,...(i=e.trackMetadata,a=e.trackPlayState,{type:ie.p.TRACK,uri:i.link,name:i.name,album:ks(i.album),artists:i.artist.map(gs),discNumber:i.discNumber,trackNumber:i.trackNumber,duration:ms(1e3*i.length),isExplicit:i.isExplicit,isLocal:i.isLocal,isPlayable:a.isPlayable,is19PlusOnly:i.is19PlusOnly})};if(void 0!==e.episodeMetadata&&void 0!==e.episodePlayState)return{...t,...fs(e.episodeMetadata,e.episodePlayState)};throw new Error("Invalid playlist cosmos response!")}(e))),offset:t||0,limit:e.item.length,totalLength:e.unrangedLength}}function Ss(e){return{type:ie.p.USER,uri:e.link,username:e.username,displayName:e.displayName,images:cs(e)}}function bs(e){return void 0===e||""===e.username?null:Ss(e)}function _s(e){return e.reduce(((e,t)=>(e[t.key]=t.value,e)),{})}function Ns(e){return e.formatListType&&""!==e.formatListType?{type:e.formatListType,attributes:_s(e.formatListAttributes)}:null}function Es(e){return{isOwner:e.isOwner,tracksAdded:e.numberOfItems,user:e.user&&Ss(e.user)}}function xs(e){return{isOwner:e.isOwner,tracksAdded:e.numTracks,user:e.user&&Ss(e.user)}}function Cs(e,t){return t&&t.basePermissionLevel!==ts.PermissionLevel.CONTRIBUTOR?{count:t?.numTotalMembers||0,items:(t?.members||[]).map(xs)}:{count:e?.count||0,items:(e?.collaborator||[]).map(Es)}}function ws(e,t){return{type:ie.p.PLAYLIST,uri:e.link,name:e.name,description:e.description,images:cs(e.pictures),madeFor:bs(e.madeFor),owner:Ss(e.owner),totalLength:t?.totalLength??e.totalLength,unfilteredTotalLength:e.totalLength,totalLikes:t?.totalLikes||null,duration:t?.duration?(r=t.duration,{milliseconds:1e3*parseInt(r,10),isEstimate:!1}):null,isCollaborative:e.collaborative,isLoaded:e.isLoaded,isOwnedBySelf:e.ownedBySelf,isPublished:e.published,hasEpisodes:t?.hasEpisodes||null,hasSpotifyTracks:t?.hasSpotifyTracks||null,hasSpotifyAudiobooks:t?.hasSpotifyAudiobooks||null,canAdd:e.allows.canInsert,canRemove:e.allows.canRemove,canPlay:t?.isPlayable||null,formatListData:Ns(e),canReportAnnotationAbuse:e.canReportAnnotationAbuse,hasDateAdded:(s=e.formatListType,!s||!ns.C.includes(s)),permissions:(n=t?.userCapabilities,i=t?.collaborators,a=t?.basePermission,n||i||a?{canView:!!n?.canView,canAdministratePermissions:n?.canAdministratePermissions||!1,canCancelMembership:n?.canCancelMembership||!1,isPrivate:a?.permissionLevel===ts.PermissionLevel.BLOCKED}:null),collaborators:Cs(t?.collaborators,t?.members)};var n,i,a,s,r}function Is(e){return"notFound"===e.loadState}function Ts(e){return"forbidden"===e.loadState}function As(e){const t=e.playlistMetadata;return Is(t)||Ts(t)?function(e,t){return{type:"placeholder",uri:t.link,addedAt:us(e.addTime),isNotFound:Is(t),isForbidden:Ts(t)}}(e,t):{addedAt:us(e.addTime),...ws(t)}}function Ps(e,t){const n=e.folderMetadata,i=(e.item||[]).map((e=>function(e,t){if(e.folder)return Ps(e.folder,t);if(e.playlist)return As(e.playlist);throw new Error("Invalid playlist cosmos response!")}(e,t)));return i.forEach(t),{type:"folder",addedAt:us(e.addTime),items:i,name:n.name,uri:n.link}}function Os(e){return e===ts.PermissionLevel.BLOCKED?"BLOCKED":e===ts.PermissionLevel.CONTRIBUTOR?"CONTRIBUTOR":e===ts.PermissionLevel.VIEWER?"VIEWER":"UNKNOWN"}function Ds(e){return{canView:e?.canView??!1,canAdministratePermissions:e?.canAdministratePermissions??!1,canEditMetadata:e?.canEditMetadata??!1,canEditItems:e?.canEditItems??!1,canCancelMembership:e?.canCancelMembership??!1}}function Rs(e){return{isFollowed:e.followState===is.FollowState.CAN_BE_UNFOLLOWED,isOwner:e.isOwner,permissionLevel:Os(e.permissionLevel),user:e.user&&Ss(e.user),songsAdded:e.numTracks}}function Ls(e){return e.map(Rs)}var Fs=n(64250),js=n(64107);class Ms extends js.n{_subscriptions=new Map;constructor(e,t,n){super(),this._subAggregator=e,this._endpoint=t,this._policy=n}onBatchChanged(e){this._subscriptions.forEach(((t,n)=>{e.has(n)||(t.cancel(),this._subscriptions.delete(n))})),e.forEach(((e,t)=>{this._subscriptions.has(t)||this._subscriptions.set(t,this._subAggregator.sub(`${this._endpoint}/${encodeURIComponent(t)}?start=0&length=0&updateOnIdenticalResponse=true`,se((()=>{this.emit(Fs.XL.UPDATE,{uri:t})}))(100,true),(()=>{}),this._policy))}))}}var Us=n(7857),Bs=n(11302),Vs=n(23830);function Hs(e){console.error(e)}class Gs{_subscriptions=new Set;constructor(e){this._cosmos=e,this._aggregator=(0,Vi.V4)(this.onBatchChanged.bind(this))}onBatchChanged(e){this._subscriptions.forEach((e=>e.cancel())),this._subscriptions.clear(),e.forEach(((e,t)=>{const n=Vs.c.parse(t);this._subscriptions.add(this._cosmos.sub(n.uri,(t=>{e.forEach((({onSuccess:e})=>e(t)))}),(t=>{e.forEach((({onError:e})=>e(t)))}),n.body,n.headers))}))}sub(e,t,n=Hs,i=null,a={}){const s=new Vs.c(Vs.n.SUB,e,a,i).stringify(),r={onSuccess:t,onError:n};return this._aggregator.subscribe(s,r),{cancel:()=>{this._aggregator.unsubscribe(s,r)}}}}function Ws(e){return new Gs(e)}var zs=n(64717),Ks=n(57174),Ys=n(74744),qs=n(18037),Zs=n(50940);var Qs=n(1754);function Js(e){return Object.prototype.hasOwnProperty.call(e,"uid")}function $s(e){const{before:t,after:n}=e;return"start"===t?{before:"start"}:void 0!==t?{before:Js(t)?t.uid:t.uri}:"end"===n?{after:"end"}:void 0!==n?{after:Js(n)?n.uid:n.uri}:{}}const Xs="sp://core-playlist/v1/playlist",er="?responseFormat=protobufJson";function tr(e){return void 0===e?"":`&start=${e}`}function nr(e){return void 0===e?"":`&length=${e}`}class ir{constructor(e,t){this._cosmos=e,this._builder=t;const n=Ws(e);this._events=function(e){return new Ms(e,"sp://core-playlist/v1/playlist",{policy:{}})}(n)}getCapabilities(){return{canSort:!0,canFilter:!0,canModifyOffline:!0,canMoveMultipleItems:!0,canFetchAllTracks:!0,canDecorateAddedBy:!0,canToggleCollaborative:!0,canHandlePermissions:!0,hasUidsGeneratedFromIndicies:!1}}async getPlaylist(e,t={},n={}){const i=(0,Ks.Y)(n?.sort),a=(0,Ys.x)((0,Zs.cj)(n?.filter)),s=tr(n?.offset??0),r=nr(n?.limit??0);t.withSync&&this._cosmos.post(`${Xs}/${encodeURIComponent(e)}/resync`);try{const n=await this._cosmos.get(`${Xs}/${encodeURIComponent(e)}/${er}${i}${a}${s}${r}`,ds),o=es.playlist_request.Response.fromJSON(n);if(!o.playlist||!o.playlist.playlistMetadata)throw new Error("Invalid playlist cosmos response!");let l;t.hydrateCollaboratorsWithMembers&&(l=es.members_response.PlaylistMembersResponse.fromJSON(await this._cosmos.get("sp://core-playlist/v2/playlist/members",{uri:e})));const d=ws(o.playlist.playlistMetadata,{totalLength:o.unrangedLength,duration:o.duration,totalLikes:o.numFollowers,isPlayable:o.playable,hasEpisodes:o.containsEpisodes,hasSpotifyTracks:o.containsSpotifyTracks,hasSpotifyAudiobooks:void 0,userCapabilities:o.userCapabilities,collaborators:o.collaborators,basePermission:o.basePermission,members:l});return{metadata:d,contents:ys(o)}}catch(t){if(Xa().isHttpError(t)&&403===t.status)return function(e){return{metadata:{type:ie.p.PLAYLIST,uri:e,name:"",description:"",images:[],madeFor:null,owner:{type:ie.p.USER,uri:"",username:"",displayName:"",images:[]},totalLength:0,unfilteredTotalLength:0,totalLikes:null,duration:null,isCollaborative:!1,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);throw t}}async getContents(e,t){const n=(0,Ks.Y)(t?.sort),i=(0,Ys.x)((0,Zs.cj)(t?.filter)),a=tr(t?.offset),s=nr(t?.limit);return ys(es.playlist_request.Response.fromJSON(await this._cosmos.get(`${Xs}/${encodeURIComponent(e)}/rows${er}${n}${i}${a}${s}`,ls)))}async getMetadata(e,t){return(await this.getPlaylist(e,t)).metadata}getEvents(){return this._events}async applyModification(e,t,n=!0){const i=es.modification_request.ModificationRequest.fromPartial(t);Object.keys(i).forEach((e=>{i[e]||delete i[e]}));if(!(await this._cosmos.post(`${Xs}/${encodeURIComponent(e)}${er}`,n?i:t)).success)throw new Error("Failed to apply playlist modification!")}async add(e,t,n){if(!this._events.emitAddSync(e,t))try{await this.applyModification(e,{operation:"add",uris:t,...$s(n)}),this._events.emitAddComplete(e,null,t)}catch(n){throw this._events.emitAddComplete(e,(0,Qs.T)(n),t),n}}async move(e,t,n){if(!this._events.emitMoveSync(e,t))try{await this.applyModification(e,{operation:"move",rows:t.map((e=>e.uid)),...$s(n)}),this._events.emitMoveComplete(e,null,t)}catch(n){throw this._events.emitMoveComplete(e,(0,Qs.T)(n),t),n}}async remove(e,t){if(!this._events.emitRemoveSync(e,t))try{await this.applyModification(e,{operation:"remove",rows:t.map((e=>e.uid))}),this._events.emitRemoveComplete(e,null,t)}catch(n){throw this._events.emitRemoveComplete(e,(0,Qs.T)(n),t),n}}async uploadImage(e){return(0,Us.I)(this._builder,e)}async updateDetails(e,t){if(this._events.emitUpdateSync(e,t))return;let n=null;const i=(0,te.EC)(e).id;t.imageUploadToken&&(n=await(0,Bs.i)(this._builder,i,t.imageUploadToken));const a={};if("name"in t){if(!t.name)throw Error("Can not set empty playlist name!");a.name=t.name}"description"in t&&(a.description=t.description),null!==n?a.picture=(0,Ce.zv)(n):null===t.imageUploadToken&&(a.picture="");try{await this.applyModification(e,{operation:"set",attributes:a},!1),this._events.emitUpdateComplete(e,null,t)}catch(n){throw this._events.emitUpdateComplete(e,(0,Qs.T)(n),t),n}}async setCollaborativeState(e,t){if(!this._events.emitSetCollaborativeSync(e,t))try{await this.applyModification(e,{operation:"set",attributes:{collaborative:t}},!1),this._events.emitSetCollaborativeComplete(e,null,t)}catch(n){throw this._events.emitSetCollaborativeComplete(e,(0,Qs.T)(n),t),n}}async resolvePlaylistFormatURI(e){return(0,zs.J)(this._builder,e)}async getRecommendedTracks(e,t,n){return await(0,qs.A)(this._builder,e,t,n)}async resync(e){this._cosmos.post(`${Xs}/${encodeURIComponent(e)}/resync`)}}var ar=n(4716),sr=n(70506);const rr="sp://core-playlist/v2/playlist";class or{constructor(e,t){this._cosmos=e,this._builder=t,this._events=new sr.Ti}getCapabilities(){return{}}getEvents(){return this._events}async getPermissionGrant(e,t){const n={operation:sr.Qd.GET_PERMISSION_GRANT,uri:e};this._events.emitOperationSync(n);try{const i=await(0,ar.Re)(this._builder,e,t);return this._events.emitOperationComplete(n),i}catch(e){throw this._events.emitOperationComplete(n,e),e}}async claimPermissions(e,t){const n={operation:sr.Qd.CLAIM_PERMISSION,uri:e,token:t};this._events.emitOperationSync(n);try{const i=await(0,ar.jw)(this._builder,e,t);return this._events.emitOperationComplete(n),i}catch(e){throw this._events.emitOperationComplete(n,e),e}}async getMembers(e){const t=es.members_response.PlaylistMembersResponse.fromJSON(await this._cosmos.get(`${rr}/members`,{uri:e}));return{basePermissionLevel:Os(t.basePermissionLevel),capabilities:Ds(t.capabilities),members:Ls(t.members)}}subscribeToMembers(e,t){return this._cosmos.sub(`${rr}/members`,(e=>{const n=es.members_response.PlaylistMembersResponse.fromJSON(e),i={members:Ls(n.members),capabilities:Ds(n.capabilities),basePermissionLevel:Os(n.basePermissionLevel)};t(null,i)}),(e=>{t(e)}),{uri:e}).cancel}async removeMember(e,t){const n={operation:sr.Qd.REMOVE_MEMBER,uri:e,username:t};this._events.emitOperationSync(n);try{await this._cosmos.post(`${rr}/set-member-permission`,{playlist_uri:e,username:t}),this._events.emitOperationComplete(n)}catch(e){throw this._events.emitOperationComplete(n,e),e}}async setMemberPermission(e,t,n){const i={operation:sr.Qd.SET_MEMBER_PERMISSION,uri:e,permissionLevel:n};this._events.emitOperationSync(i);try{await this._cosmos.post(`${rr}/set-member-permission`,{playlist_uri:e,username:t,permission_level:n}),this._events.emitOperationComplete(i)}catch(e){throw this._events.emitOperationComplete(i,e),e}}async getBasePermission(e){return await(0,ar.Du)(this._builder,e)}async setBasePermission(e,t){const n={operation:sr.Qd.SET_BASE_PERMISSION,uri:e,permissionLevel:t};this._events.emitOperationSync(n);try{await this._cosmos.post(`sp://core-playlist/v1/playlist/${encodeURIComponent(e)}/set-base-permission`,{permission_level:t}),this._events.emitOperationComplete(n)}catch(e){throw this._events.emitOperationComplete(n,e),e}}}var lr=n(54455),dr=n(29058),cr=n(37184);class ur extends cr.w{_subscription=null;constructor(e,t,n,i){super(),this._subAggregator=e,this._endpoint=t,this._policy=n,this._contains=i}subscribeToUpdates(){this._subscription=this._subAggregator.sub(`${this._endpoint}?start=0&length=0`,se(this.onUpdate.bind(this))(100,true),(()=>{}),this._policy)}unsubscribeFromUpdates(){null!==this._subscription&&(this._subscription.cancel(),this._subscription=null)}async onUpdate(){this.emit(dr.Yt.UPDATE,null),this.onContainsItems(this._aggregator.getBatch())}async onContainsItems(e){if(e.size>0){const t=Array.from(e.keys()),n=await this._contains(t);this.emitUpdateItems(t,n)}}}var mr=n(15572),pr=n(2170),gr=n(72013);const hr="sp://core-playlist/v1/rootlist",kr="?responseFormat=protobufJson";const vr={[lr.bD.NAME]:"name",[lr.bD.ADDED_AT]:"addTime",[lr.bD.RECENTLY_PLAYED]:"recentlyPlayedRank",[lr.bD.RELEVANCE]:"frecencyScore",[lr.bD.AVAILABLE_OFFLINE]:"availableOffline"},fr={[lr.As.ASC]:"ASC",[lr.As.DESC]:"DESC"};const yr={[lr.R0.TEXT]:"text"},Sr={[lr.pg.CONTAINS]:"contains"};class br{_cache=null;_decorationCache=new ee.Ct(3e5);_inFlightCache=new ee.tL;constructor(e,t){this._cosmos=e,this._builder=t;const n=Ws(e);this._events=function(e,t){return new ur(e,"sp://core-playlist/v1/rootlist",{policy:{folder:{name:!0},playlist:{name:!0,collaborative:!0}}},t)}(n,this.contains.bind(this))}getCapabilities(){return{canSort:!0,canFilter:!0,canModifyOffline:!0}}async getMetadata(){const e=`${hr}${kr}`;return function(e){const t=e.item;let n=0,i=0;for(;t.length>0;){const e=t[0];e.folder?t.push(...e.folder.item):(!0===e.playlist?.playlistMetadata?.ownedBySelf&&n++,i++),t.shift()}return{ownedPlaylistCount:n,playlistCount:i}}(es.rootlist_request.Response.fromJSON(await this._inFlightCache.create(`metadata:${e}`,(()=>this._cosmos.get(e,rs)))).root)}async getContents(e){const t=function(e){if(void 0===e)return"";const t=(0,te.EC)(e);if(!t||t.type!==te.JM.FOLDER)throw new Error("Invalid rootlist folder URI!");return`/${t.id}`}(e?.folderUri),n=function(e){if(!e)return"";const{field:t,order:n}=e,i=vr[t],a=n?fr[n]:"";return`&sort=${encodeURIComponent(`${i} ${a}`.trim())}`}(e?.sort),i=function(e){if(!e?.value)return"";const{field:t,operator:n,value:i}=e,a=yr[t],s=Sr[n];return`&filter=${encodeURIComponent(`${a} ${s} ${encodeURIComponent(i)}`)}`}((0,gr.cj)(e?.filter)),a=(s=e?.offset,void 0===s?"":`&start=${s}`);var s;const r=(o=e?.limit,void 0===o?"":`&length=${o}`);var o;const l=(d=e?.flatten,void 0!==d&&d?"&flattenTree":"");var d;const c=`${hr}${t}${kr}${n}${i}${a}${r}${l}`,u=es.rootlist_request.Response.fromJSON(await this._inFlightCache.create(`contents:${c}`,(()=>this._cosmos.get(c,os)))),m=new Set,p={...Ps(u.root,(e=>{(0,lr.no)(e)&&m.add(e.uri)})),totalItemCount:u.unrangedLength};return this._cache=m,e?.decorateImagesAndOwner&&await(0,pr.H)(this._builder,this._decorationCache,(0,mr.qr)(p)),p}getEvents(){return this._events}onUpdateItems(e,t){if(null!==this._cache){const n=this._cache;e.forEach((e=>t?n.add(e):n.delete(e)))}this._events.emitUpdateItems(e,t)}async applyModification(e,t=!0){const n=es.modification_request.ModificationRequest.fromPartial(e);""===n.before&&delete n.before,""===n.after&&delete n.after;const i=await this._cosmos.post(`${hr}${kr}`,t?n:e);if(!i.success)throw new Error("Failed to apply rootlist modification!");return i}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",playlist:!1,...$s(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){if(this._events.emitCreatePlaylistSync(e,t))return null;try{const n=await this.applyModification({operation:"create",playlist:!0,...$s(t),name:e});return this._events.emitCreatePlaylistComplete(e,t,n.uri),n.uri}catch(n){return this._events.emitCreatePlaylistComplete(e,t,null,(0,Qs.T)(n)),null}}async add(e,t){if(!this._events.emitAddSync(e,t))try{this.onUpdateItems(e,!0),await this.applyModification({operation:"add",uris:e,...$s(t)}),this._events.emitAddComplete(e,t)}catch(n){this.onUpdateItems(e,!1),this._events.emitAddComplete(e,t,(0,Qs.T)(n))}}async move(e,t,n){if(!this._events.emitMoveSync(e,t))try{await this.applyModification({operation:"move",rows:[e.uri],...$s(t)}),this._events.emitMoveComplete(e,t,null,n)}catch(n){this._events.emitMoveComplete(e,t,(0,Qs.T)(n))}}async remove(e){if(this._events.emitRemoveSync(e))return;const t=e.map((e=>e.uri));try{this.onUpdateItems(t,!1),await this.applyModification({operation:"remove",rows:t}),this._events.emitRemoveComplete(e)}catch(n){this.onUpdateItems(t,!0),this._events.emitRemoveComplete(e,(0,Qs.T)(n))}}async contains(e){return(await this._cosmos.post(`${hr}/contains`,{items:e})).found}containsSync(e){return null!==this._cache?this._cache.has(e):void 0}async getPublishedState(e){const t=await this._cosmos.get(`sp://core-playlist/v1/playlist/${encodeURIComponent(e)}?start=0&length=0&responseFormat=protobufJson`),n=es.playlist_request.Response.fromJSON(t);return n.playlist?.playlistMetadata?.published??!1}async setPublishedState(e,t){await this.applyModification({operation:"set",attributes:{published:t},rows:[e]},!1)}}var _r=n(95869),Nr=n(89473);class Er extends ir{constructor(e,t,n,i){super(n,i),this._playlistDataClient=e,this._playlistServiceClient=t}async getPlaylist(e,t,n){const[i,a]=await Promise.all([super.getPlaylist(e,t,n),this._playlistDataClient.get({uri:e,query:_r.$r.fromPartial({supportedPlaceholderTypes:[Nr.LinkType.SHOW],range:{start:n?.offset,length:n?.limit}}),policy:_r.a5.fromPartial({playlist:_r.LM.fromPartial({numberOfItemsPerLinkType:!0})})})]);return{...i,metadata:{...i.metadata,hasSpotifyAudiobooks:!!a.data?.numberOfItemsPerLinkType?.find((({linkType:e})=>e===Nr.LinkType.SHOW))?.numItems}}}}class xr extends or{constructor(e,t,n){super(t,n),this._playlistServiceClient=e}}class Cr extends br{constructor(e,t,n,i){super(n,i),this._rootlistDataClient=e,this._rootlistModificationClient=t}}var wr=n(72971),Ir=n(96154);const Tr=Ir.Dq.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:[Ut.AUDIOBOOK_SPECIFICS]}},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:[Ut.AUDIOBOOK_SPECIFICS]}},collectionTracksPolicy:{link:!0,timestamp:!0}});function Ar(e){return e?[{url:e,label:"standard"}]:[]}class Pr extends wr.sw{_contexts=null;_cancellable=null;constructor(e){super(),this._client=new Ir.HB(e)}getContexts(){return null===this._cancellable&&(this._cancellable=this._client.stream(Tr,(e=>{this._contexts=function(e){const t=new Set;return e.context.map((e=>{if(e.artist){const t=e.artist.artistMetadata;return{type:wr.hn.ARTIST,uri:t?.link??"",name:t?.name??"",images:Ar(t?.portraits?.standardLink),timestampMs:e.artist.addTime}}if(e.album){const t=e.album.albumMetadata,n=new Set;return{type:wr.hn.ALBUM,uri:t?.link??"",name:t?.name??"",images:Ar(t?.covers?.standardLink),artists:t?.artists.map((e=>({uri:e.link,name:e.name}))).filter((e=>!n.has(e.uri)&&n.add(e.uri)))??[],timestampMs:e.album.addTime}}if(e.show){const t=e.show.showMetadata,n=wn(t?.extension??[]);if(void 0!==n.audiobookSpecifics){const i=n.audiobookSpecifics;return{type:wr.hn.AUDIOBOOK,uri:t?.link??"",name:t?.name??"",images:Ar(t?.covers?.standardLink),authors:i.credits?.authors.map((e=>e.name))??[],timestampMs:e.show.addTime}}return{type:wr.hn.SHOW,uri:t?.link??"",name:t?.name??"",images:Ar(t?.covers?.standardLink),publisher:t?.publisher??"",timestampMs:e.show.addTime}}if(e.playlist){const t=e.playlist.playlistMetadata;return{type:wr.hn.PLAYLIST,uri:t?.link??"",name:t?.name??"",description:t?.description??"",images:Ar(t?.pictures?.standardLink),owner:{uri:t?.owner?.link??"",displayName:t?.owner?.displayName??""},timestampMs:e.playlist.addTime}}if(e.track){const t=e.track.trackMetadata;return{type:wr.hn.TRACK,uri:t?.link??"",name:t?.name??"",images:Ar(t?.album?.covers?.standardLink),artists:t?.artist.map((e=>({uri:e.link,name:e.name})))??[],isExplicit:t?.isExplicit??!1,isMOGEFRestricted:t?.is19PlusOnly??!1,timestampMs:e.track.addTime}}if(e.episode){const t=e.episode.showMetadata,n=wn(t?.extension??[]);if(void 0!==n.audiobookSpecifics){const i=n.audiobookSpecifics;return{type:wr.hn.AUDIOBOOK,uri:t?.link??"",name:t?.name??"",images:Ar(t?.covers?.standardLink),authors:i.credits?.authors.map((e=>e.name))??[],timestampMs:e.episode.addTime}}return{type:wr.hn.SHOW,uri:t?.link??"",name:t?.name??"",images:Ar(t?.covers?.standardLink),publisher:t?.publisher??"",timestampMs:e.episode.addTime}}return e.collectionTracks&&(0,te.zO)(e.collectionTracks.link)?e.collectionTracks.link.endsWith("your-episodes")?{type:wr.hn.YOUR_EPISODES,uri:e.collectionTracks.link??"",timestampMs:e.collectionTracks.addTime}:{type:wr.hn.LIKED_SONGS,uri:e.collectionTracks.link??"",timestampMs:e.collectionTracks.addTime}:null})).filter(ta.K).sort(((e,t)=>t.timestampMs-e.timestampMs)).filter((e=>!t.has(e.uri)&&t.add(e.uri)))}(e),this.emit(wr.$f.UPDATE,this._contexts)}))),this._contexts}}var Or=n(23329),Dr=n(66114),Rr=n(73972),Lr=n(26406),Fr=n(56692),jr=n(60606),Mr=n(14681);function Ur(e){return{isPaywalled:e.podcastSubscription?.isPaywalled??!1,isUserSubscribed:e.podcastSubscription?.isUserSubscribed??!1}}function Br(e){return e.is19PlusOnly?{label:Rr.KS.NineteenPlus}:e.isExplicit?{label:Rr.KS.Explicit}:{label:Rr.KS.Unknown}}function Vr(e){return void 0===e?[]:function(...e){return e.filter((({url:e})=>e)).map((({url:e,width:t,height:n})=>({url:e,width:t,height:n})))}({url:e.standardLink,width:300,height:300},{url:e.smallLink,width:64,height:64},{url:e.largeLink,width:640,height:640})}function Hr(e,t){const n=e.length-t.timeLeft;return{playPositionMilliseconds:1e3*n,playPosition:n,state:t.isPlayed?Rr.sY.Completed:Rr.sY.NotStarted}}function Gr(e){const t=1e3*parseInt(e.publishDate,10);return{isoString:new Date(t).toISOString()}}function Wr(e,t){if(!e||!t)throw new Error("Error while constructing chapter metadata");const n=wn(e.extension);return{type:ie.p.CHAPTER,uri:e.link,name:e.name,duration:{milliseconds:1e3*e.length},description:e.description,coverArt:Vr(e.covers)??[],audio:{items:[]},audioPreview:null,htmlDescription:n.htmlDescription?.htmlDescription||"",sharingInfo:null,contentRating:Br(e),playedState:Hr(e,t),book:Kr(e.show),playability:zr(t,n),isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly}}function zr(e,t){const n=!!t?.podcastSubscription?.isPaywalled;return{playable:n?!!t?.podcastSubscription?.isUserSubscribed:e.isPlayable,reason:n?Lr.WY.PaymentRequired:Lr.WY.Unknown}}function Kr(e){return e?{uri:e.link,name:e.name,coverArt:Vr(e.covers)??[],trailer:null}:null}function Yr(e,t){if(!e||!t)throw new Error("Error while constructing episode");const n=wn(e.extension);return{type:ie.p.EPISODE,uri:e.link,name:e.name,description:e.description,htmlDescription:n.htmlDescription?.htmlDescription||"",episodeType:Rr.Wf.Unknown,coverArt:Vr(e.covers)??[],playedState:Hr(e,t),mediaTypes:(a=e,a.mediaTypeEnum===Mr.EpisodeMetadata_MediaType.VODCAST||a.mediaTypeEnum===Mr.EpisodeMetadata_MediaType.VIDEO?[Lr.$_.Audio,Lr.$_.Video]:a.mediaTypeEnum===Mr.EpisodeMetadata_MediaType.AUDIO?[Lr.$_.Audio]:[]),audio:{items:[]},audioPreview:null,sharingInfo:null,segmentsCount:n.podcastSegments?.playbackSegments.length||0,podcast:(i=e.show,i?{uri:i.link,name:i.name,coverArt:Vr(i.covers)??[],trailer:null,showTypes:[]}:null),podcastSubscription:Ur(n),releaseDate:Gr(e),playability:zr(t),contentRating:Br(e),duration:{milliseconds:1e3*e.length},contentInformation:n.contentInformation||null,transcript:n.transcripts?.transcripts||null};var i,a}const qr=e=>{switch(e){case jr.NextBestEpisodeSection_Label.TRAILER:return Lr.it.TRAILER;case jr.NextBestEpisodeSection_Label.CONTINUE_LISTENING:return Lr.it.CONTINUE_LISTENING;case jr.NextBestEpisodeSection_Label.LATEST_PUBLISHED:return Lr.it.LATEST_PUBLISHED;case jr.NextBestEpisodeSection_Label.UP_NEXT:return Lr.it.UP_NEXT;case jr.NextBestEpisodeSection_Label.FIRST_PUBLISHED:return Lr.it.FIRST_PUBLISHED;default:return Lr.it.UNKNOWN}};function Zr(e){if(e?.item)return{type:qr(e.label),data:Yr(e.item.episodeMetadata,e.item.episodePlayState)}}function Qr(e){const t=e.auxiliarySections?.trailerSection?.item,n=t?function(e){const t=e.episodeMetadata,n=e.episodePlayState;if(!t||!n)throw new Error("Error while constructing trailer");return{type:ie.p.EPISODE,uri:t.link,name:t.name,coverArt:Vr(t.covers)??[],audio:{items:[]},audioPreview:null,sharingInfo:null,duration:{milliseconds:1e3*t.length},contentRating:Br(t)}}(t):null,i=e.header?.showMetadata;if(!i)throw new Error("Error while constructing podcast metadata");const a=wn(i.extension);return{type:ie.p.SHOW,uri:i.link,name:i.name,description:i.description||"",htmlDescription:a.htmlDescription?.htmlDescription||"",coverArt:Vr(i.covers)??[],trailer:n,topics:a.podcastTopics?.topics||[],podcastType:(r=i,r.isMusicAndTalk?"SHOW":"PODCAST"),showTypes:[],publisherName:i.publisher,consumptionOrder:(s=i.consumptionOrder,"sequential"===s?"sequential":"episodic"===s?"episodic":"recent"),nextBestEpisode:Zr(e.auxiliarySections?.nextBestEpisodeSection),gatedContentAccessReason:(0,Fr.Y)(a.showAccess?.unlockedBy)};var s,r}function Jr(e,t){return{text:e,type:t}}function $r(e){return!1===e?.isUserMemberOfAtLeastOneGroup}function Xr(e){const t=e.auxiliarySections?.trailerSection?.item,n=t?function(e){const t=e.episodeMetadata,n=e.episodePlayState;if(!t||!n)throw new Error("Error while constructing sample");return{type:ie.p.CHAPTER,uri:t.link,name:t.name,coverArt:Vr(t.covers)??[],audio:{items:[]},audioPreview:null,sharingInfo:null,duration:{milliseconds:1e3*t.length},contentRating:Br(t),isPlayable:e.episodePlayState?.isPlayable??!1}}(t):null,i=e.header?.showMetadata;if(!i)throw new Error("Error while constructing book metadata");const a=wn(i.extension),s=function(e){return e?.audiobookSpecifics?.credits?.narrators.map((e=>e.name))??[]}(a);return{type:ie.p.AUDIOBOOK,uri:i.link,name:i.name,coverArt:Vr(i.covers)??[],authorName:i.publisher,narrators:s,sample:n,htmlDescriptionPlain:a.htmlDescription?.htmlDescription,rating:a?.rating,isExplicit:i.isExplicit,duration:Number(a.audiobookSpecifics?.duration_ms),copyrights:(r=a.audiobookSpecifics?.credits?.publishers?.map((e=>e.name))??[],o=i.copyright,[...r.map((e=>Jr(e,"P"))),...o.map((e=>Jr(e,"C")))]),publishDate:a.audiobookSpecifics?.publish_date,price:a?.audiobookPrice,isLocked:$r(a?.showAccess),consumptionCapExplanation:a.showAccess?.consumptionCapped,gatedContentAccessReason:(0,Fr.Y)(a.showAccess?.unlockedBy)};var r,o}const eo={field:Dr.YG.AVAILABLE,operator:Dr.NK.EQUALS,value:!0};var to=function(e){return e.TITLE="TITLE",e}(to||{});const no={[Dr.YG.AVAILABLE]:Dr.YG.AVAILABLE,[Dr.YG.NAME]:to.TITLE,[Dr.YG.TEXT]:Dr.YG.TEXT,[Dr.YG.ISPLAYED]:Dr.YG.ISPLAYED,[Dr.YG.STARTEDPLAYING]:Dr.YG.STARTEDPLAYING},io={[Dr.YG.AVAILABLE]:["available"],[Dr.YG.TEXT]:["text"],[Dr.YG.NAME]:["name"],[Dr.YG.ISPLAYED]:["isPlayed"],[Dr.YG.STARTEDPLAYING]:["progress"],[to.TITLE]:["title"]},ao={[Dr.NK.CONTAINS]:"contains",[Dr.NK.EQUALS]:"eq",[Dr.NK.NOT_EQUALS]:"!=",[Dr.NK.GREATER_THAN]:">"};function so(e){return e.map((e=>{const{field:t,operator:n,value:i}=e;return`${io[t]} ${ao[n]} ${encodeURIComponent(i)}`})).join(",")}var ro=function(e){return e.ADDED_AT="ADDED_AT",e.DURATION="DURATION",e.TITLE="TITLE",e}(ro||{});const oo={[Dr.ay.PUBLISH_DATE]:ro.ADDED_AT},lo={[Dr.ay.PUBLISH_DATE]:["number","publishDate","name"],[ro.ADDED_AT]:["added_at"],[ro.DURATION]:["duration"],[ro.TITLE]:["title"]};function co(e){return{field:oo[e.field],order:e.order}}function uo(e){const{field:t,order:n}=e;return lo[t].map((e=>n?`${e} ${n}`:e))}var mo=n(95758),po=n(79396),go=n(23062),ho=n(15176);class ko extends ho.T{_subscriptions=new Map;constructor(e){super(),this._show_client=e,this.onAddListener(ho.X.UPDATE_LOCKED_STATE,(e=>{const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(ho.X.UPDATE_LOCKED_STATE,(e=>{const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)})),this._aggregator=(0,Vi.PP)((e=>{this._subscriptions.forEach(((t,n)=>{e.has(n)||(t.cancel(),this._subscriptions.delete(n))})),e.forEach(((e,t)=>{this._subscriptions.has(t)||this._subscriptions.set(t,this._show_client.subDecorate(d.GetDecorateRequest.fromPartial({item:[t],showPolicy:{showPolicy:{extension:[po.ExtensionKind.SHOW_ACCESS]}}}),(e=>{const n=e.response?.show.find((e=>e.link===t));if(!n)return;const i=wn(n.showMetadata?.extension);i.showAccess&&this.emit(ho.X.UPDATE_LOCKED_STATE,{uri:t,isLocked:$r(i.showAccess)})})))}))}))}}const vo=d.ListPolicy.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:[po.ExtensionKind.PODCAST_SUBSCRIPTIONS,po.ExtensionKind.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}),fo=d.HeaderPolicy.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:[po.ExtensionKind.AUDIOBOOK_SPECIFICS,po.ExtensionKind.PODCAST_SUBSCRIPTIONS,po.ExtensionKind.PODCAST_TOPICS,po.ExtensionKind.HTML_DESCRIPTION,po.ExtensionKind.EPISODE_TRANSCRIPTS,po.ExtensionKind.PODCAST_RATING,po.ExtensionKind.AUDIOBOOK_PRICE,po.ExtensionKind.SHOW_ACCESS]}}),yo=d.ListPolicy.fromPartial({episodeCollectionPolicy:{isNew:!0},episodePlayedStatePolicy:{playable:!0,timeLeft:!0,isPlayed:!0},episodePolicy:{name:!0,link:!0,length:!0,publishDate:!0,covers:!0,description:!0,mediaTypeEnum:!0,isExplicit:!0,type:!0,isMusicAndTalk:!0,is19PlusOnly:!0,isBookChapter:!0}}),So=d.ListPolicy.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:[po.ExtensionKind.SHOW_ACCESS,po.ExtensionKind.PODCAST_SEGMENTS,po.ExtensionKind.PODCAST_SUBSCRIPTIONS,po.ExtensionKind.HTML_DESCRIPTION,po.ExtensionKind.CONTENT_WARNING,po.ExtensionKind.EPISODE_TRANSCRIPTS]},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 bo{capabilities={canSort:!0,canFilter:!0,canGetDefaultSort:!0};constructor(e,t){this.remote_configuration=t,this._podcast_paywalls_client=new mo.PodcastPaywallsClient(e),this._show_service_client=new d.ShowServiceClient(e),this._events=new ko(this._show_service_client)}async getMetadata(e){const t=(0,te.EC)(e).id,n=await this._show_service_client.getShow(d.GetShowRequest.fromPartial({showId:t,range:{start:0,limit:1},headerPolicy:fo,listPolicy:yo,sectionsPolicy:{trailerSection:!0,nextBestEpisode:!0}}));if(void 0===n.response||n.status?.code!==d.Status_Code.SUCCESS)throw new Error("Error while getting show metadata");return function(e){const t=e.header?.showMetadata;if(t?.isBook)return Xr(e);if(!t)throw new Error("Error while constructing metadata");return Qr(e)}(n.response)}async getAccessInfo(e){const t=await this._show_service_client.getDecorate(d.GetDecorateRequest.fromPartial({item:[e],showPolicy:{showPolicy:{extension:[po.ExtensionKind.SHOW_ACCESS]}}}));if(void 0===t.response)throw new Error("decorate request error");return function(e){let t={};const n=e.show.map((e=>e.showMetadata?.extension)).filter((e=>null!==e));for(const e of n)if(e&&(t=wn(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}}}(t.response)}async getBookContents(e,t){t.doRefreshSubscription&&await this._podcast_paywalls_client.putShowSubscription(mo.PodcastPaywallsShowSubscriptionRequest.fromPartial({showUri:e}));const n=(0,te.EC)(e).id,i=await this._show_service_client.getShow(d.GetShowRequest.fromPartial({showId:n,range:{start:t.offset,limit:t.limit},listPolicy:vo}));if(void 0===i.response||i.status?.code!==d.Status_Code.SUCCESS)throw new Error("Error while getting show metadata");return function(e,t,n){if(!e.item)throw new Error("Invalid show cosmos response!");const i="number"==typeof t&&"number"==typeof n?t+n:0;return{nextOffset:e.unrangedLengthWr(e.episodeMetadata,e.episodePlayState)))}}(i.response,t.offset,t.limit)}async getContents(e,t){const n=(0,te.EC)(e).id,i=function(e){if(e?.field===Dr.ay.PUBLISH_DATE&&e.order===Dr.i5.ASC)return d.SortOrder.PUBLISH_DATE_ASC;if(e?.field===Dr.ay.PUBLISH_DATE&&e.order===Dr.i5.DESC)return d.SortOrder.PUBLISH_DATE_DESC;return d.SortOrder.CONSUMPTION_ORDER_ASC}(t.sort),a=function(e=[]){return e=e||[],so([...e,eo])}(t.filters),s=await this._show_service_client.getShow(d.GetShowRequest.fromPartial({showId:n,sortOrder:i,filter:a,listPolicy:vo,range:{start:t.offset,limit:t.limit}}));if(void 0===s.response||s.status?.code!==d.Status_Code.SUCCESS)throw new Error(`Error while getting show metadata: ${s.status?.reason}`);return function(e,t,n){if(!e.item)throw new Error("Invalid show cosmos response!");const i="number"==typeof t&&"number"==typeof n?t+n:0;return{nextOffset:e.unrangedLengthYr(e.episodeMetadata,e.episodePlayState)))}}(s.response,t.offset,t.limit)}async getEpisodeOrChapter(e){const t=await this._show_service_client.getDecorate(d.GetDecorateRequest.fromPartial({item:[e],episodePolicy:So}));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 Wr(t.episodeMetadata,t.episodePlayState);if(!t.episodeMetadata)throw new Error("Error while constructing episode");return Yr(t.episodeMetadata,t.episodePlayState)}(t.response)}async checkoutBook(e){return await(0,go.Q)(e)}getPlayerSort(e){return e?uo(co(e)).join(", "):""}getPlayerFilter(e=[]){return so(function(e){return(e=e||[]).map((e=>{const t=no[e.field],n=function(e){return"string"==typeof e.value?`"${e.value}"`:e.value}(e);return{...e,field:t,value:n}}))}(e))}getEvents(){return this._events}}var _o=n(10260),No=n(5734),Eo=n(75702);class xo{constructor(e){this.karaokeServiceClient=new _o.gw(e)}getCapabilities(){return{isSupported:!0}}async setVocalVolume(e){await this.karaokeServiceClient.postVocalVolume({volume:e})}async setStatus(e){await this.karaokeServiceClient.postStatus({status:e===Eo.q.ENABLED?No.KaraokeStatus.ENABLED:No.KaraokeStatus.DISABLED})}async getStatus(){const{status:e}=await this.karaokeServiceClient.getStatus({});return e===No.KaraokeStatus.ENABLED?Eo.q.ENABLED:Eo.q.DISABLED}}var Co=n(30500),wo=n(15440),Io=n(32859);async function To(e,t){const n=(0,wo.f)($e.createBaseTransport,(0,Io.w)(),e);return n.addPlugin(Co.dv,{WebSocket}),n.addPlugin(t),n.connect(),n}var Ao=n(78379);class Po{constructor(e,t){this._cosmos=e,this._product_state=t}async getUser(){const{username:e}=await this._cosmos.get("sp://desktop/v1/session"),t=await async function(e,t){const n={name:t,images:[]};try{const{profiles:i}=await e.get("sp://core-profile/v1/profiles",{usernames:[t]});return i.length>0?i[0]:n}catch(e){return n}}(this._cosmos,e);return{type:ie.p.USER,uri:(0,te.QK)(e).toURI(),username:e,displayName:t.name,images:t.images?.map((e=>({url:e.url,width:e.maxWidth,height:e.maxHeight})))||[],optInTrialPremiumOnlyMarket:!1}}async getProductState(){const{country_code:e,type:t,ads:n,catalogue:i,...a}=(await this._product_state.getValues(l.GetValuesRequest.fromPartial({}))).pairs;return{country:e,product:t,ads:n,catalogue:i,...a}}}var Oo=n(7072);async function Do(e){return await e.get("sp://desktop/v1/platform")}var Ro=n(87786);const Lo=n(85845).L.addMiddleware(Ro._);var Fo=n(85270);const jo="app.player.autoplay";async function Mo(e){const{entries:t}=await e.get({key:jo});return!!t[jo]?.bool}async function Uo(e){return Fo.BC.query(Ze.b.getInstance(),e).then((e=>200===e.status&&e.body?e.body:null))}const Bo=e=>{const t=e?.item?.metadata;return t?{pageInstanceId:t.page_instance_id,interactionId:t.interaction_id}:void 0};var Vo=n(4003);class Ho{constructor(e){this.api=e}subscribeToBuddyActivity(e,t,n){const i=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");let a=null;const s=async()=>{try{const e=await this.getBuddyActivity(t);n(e.body)}catch(e){}return{status:200,status_text:"Ok"}},r=async e=>{await(0,Vo.zm)(this.api,t,e),a=e},o=async e=>{if(a){const n=a;a=null;try{await Promise.all([(0,Vo.wD)(this.api,t,n),r(e)])}catch(e){}}else try{await r(e)}catch(e){}};return e.matchMessages(`hm://presence2/user/${i}`,s),e.on($e.TransportEvent.CONNECTION_ID,(async e=>o(e.data.id))),{cancel:async()=>{e.unmatchMessages(`hm://presence2/user/${i}`,s),a&&(0,Vo.wD)(this.api,t,a)}}}getBuddyActivity(e){return(0,Vo.aj)(this.api,e)}getBuddyFeed(){return(0,Vo.uM)(this.api)}getFacebookFriends(){return(0,Vo.Cs)(this.api)}}let Go=function(e){return e.FACEBOOK="FACEBOOK",e}({});class Wo{constructor(e,t,n){this.cosmos=e,this.buddyFetchApi=t,this.transport=n}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(this.transport,e,t)}async fetchFacebookFriends(){const e=await this.buddyFetchApi.getFacebookFriends();return(e.body?.results||[]).filter((e=>e.indexes.includes(Go.FACEBOOK))).map((({title:e,uri:t,image:n,following:i})=>({title:e,uri:t,image:n,following:i})))}async fetchFriendActivity(e){const t=(0,te.EC)(e[0]).username,n=await this.buddyFetchApi.getBuddyActivity(t);return n.body?[n.body]:[]}}var zo=n(32731),Ko=n(37135);async function Yo(e){return await fetch(`i18n/${e}.json`).then((e=>e.json()))}async function qo(e,t){const n=await async function(e,t){const n=await e();return null!==n?{...n,market:"from_token",locale:t,valid:!0}:{accessToken:"accessToken",accessTokenExpirationTimestampMs:0,isAnonymous:!1,market:"from_token",locale:t,valid:!1}}(e,t);return n}async function Zo(e){navigator.serviceWorker&&navigator.serviceWorker.getRegistrations().then((e=>e.forEach((e=>e.unregister()))));const t=window.navigator.userAgent.match(Z).groups.version,n=navigator.language,k=(0,Oo.nT)(n),v=(0,K.v)(),y=(0,Et.G)();Nt(v);const S=new lt(v),x=S.getTokenProvider(),C=new Po(v,new l.ProductStateClient(y)),[T,A]=await async function(e){try{return[e,await Yo(e)]}catch(t){const n=p.go.en;(0,i.n_)({message:`Attempt to use desired locale '${e}' failed. Using fallback '${n}'.`}),(0,Or.PC)(t);try{return[n,await Yo(n)]}catch(e){throw(0,Or.CG)(e),new Error(`Error when getting fallback translation: ${e}`)}}}(n);(0,Ko.u)(A,T,k);const[O,D,R,L,j,M]=await Promise.all([Do(v),qo(x,T),(0,Qe.B)(),q(),C.getUser(),To(x,(e=>S.createTransportPlugin(e)))]);(0,H.d)(M,D,t,O.app_platform);const G=j?.username||null,W=new Pi.K(G??"anonymous"),Y=z(O,M,"65b708073fc0480ea92a077233ca87bd",(()=>G),!1),J=new Lo({timeout:1e4,clientId:"desktop-ui",transport:M,eventSender:Y,version:t,installationId:O.event_sender_context_information?.installation_id}),$=await J.resolve({username:G}),ee=(0,zo.E)(W),ne=c.VK.merge($,L,ee),ie=c.VK.merge($,L),ae=(0,xt.PQ)(Ze.b.getInstance()),se=(0,xt.QM)(ae),re=new X(v),oe=function(e,t,n){return new Ja(e,(0,o.makePrefs)(t),new la.R3(t),new Tt.Ul(t),n)}(v,y,"xpui_2023-05-11_1683815926051_eb595a6"),me=new s.M$(y),ge=new bt(me),he=function(e,t,n,i){const a=new r.No(e),s=(0,Di.tu)(e);return new oa(a,s,t,n,e,i)}(y,Ze.b.getInstance(),W,me),ke=function(e,t,n){const i=new Di.KQ(n),a=new Oi.BK(n),s=new At.Pn(n),r=new l.ProductStateClient(n);return new ia(e,t,i,a,s,r)}(G??"anonymous",v,y),ve=function(e,t){return new pi(new At.Pn(e),new Tt.Ul(e),new ai.ListenLaterServiceClient(e),t)}(y,G),fe=ne.getValue(ze.C),ye=fe?function(e,t,n){return new Cr(new _r.lc(e),new _r.IB(e),t,n)}(y,v,Ze.b.getInstance()):new br(v,Ze.b.getInstance()),Ne=fe?function(e,t,n){return new Er(new _r.MR(e),new _r.p1(e),t,n)}(y,v,Ze.b.getInstance()):new ir(v,Ze.b.getInstance()),Ee=fe?function(e,t,n){return new xr(new _r.p1(e),t,n)}(y,v,Ze.b.getInstance()):new or(v,Ze.b.getInstance()),xe=new ce.l(Ze.b.getInstance(),ae,oe,!1),Ce=new bo(y,ne),we=new pe(new l.ProductStateClient(y),Ne,Ce),Ie=new Ii(y,v,W),Te=new le(v,se),Ae=new P(v),Pe=new E(v),Oe=new U(v),Re=new B.$(Ze.b.getInstance()),Le=new de(new u.ScrobbleClient(y)),Fe=new Se(y),je=new Pr(y),Me=new Ao.z(m.R.getUBILogger({eventSender:Y,disableAutoBackgroundMonitoring:!0,playContextUriProvider:{getPlayContextUri:()=>oe.getState()?.context.uri??null},playbackIdProvider:{getPlaybackId:()=>oe.getState()?.playbackId??null}}),null!==j),Ue=new N;let Be;if(G&&O.is_developer_mode){const e="lastVisitedLocation",t=W.getItem(e);Be=t instanceof Ti.d||t instanceof Ai.y?(0,a.PP)({initialEntries:void 0}):(0,a.PP)({initialEntries:[encodeURI(t)]}),Be.listen((t=>{W.setItem(e,t.pathname)}))}else Be=(0,a.PP)();ne.getValue(ze.Cd)||function(e,t,n,i){t.getEvents().addListener(ca.rg.CONTEXT_WRAPAROUND,(async({data:{contextURI:a,previousItemURI:s}})=>{if(function(e){return[/^spotify:user:\w+:collection$/,/^spotify:ads?:/,/^spotify:episode:/,/^spotify:local:/,/^spotify:internal:local-files/,/^spotify:series:/,/^spotify:show:/].some((t=>e.match(t)))}(a))return;const r=t.getState();if("true"===r?.context?.metadata?.["disable-autoplay"])return;const o=n.getState();if(!o?.activeDevice?.isLocal)return;const[l,d]=await Promise.all([Mo(e),Uo(a)]);if(!l||null===d)return;const c=(0,te.EC)(s),u=await i.getContext(d,{previousTrackURIs:c&&(0,te.wj)(c)?[c.toString()]:[],isAutoplay:!0}),m={shuffle:!1,repeat:da.zq.REPEAT_NONE,loggingParams:Bo(r)};t.play(u,{featureIdentifier:"infinite-playback",referrerIdentifier:"infinite-playback"},m)}))}((0,o.makePrefs)(y),oe,ge,xe);const Ve=new ue.U,He=ne.getValue(qe.R2),Ge=ee.getValue(qe.IP),We=(await g.gN.getAdState()).app_startup_id.value,Ke=(0,V.R)({container:e,history:Be,eventSender:Y,playerAPI:oe,appStartupId:We,esperantoAdsMigrationFlag:Ge,hptoRefactorFlag:He}),Je=ne.getValue(ze.Lp),$e=De(y,function(e){const t=new _e(new l.ProductStateClient(e)),n=new be(new u.ScrobbleClient(e));return{streamingRules:()=>t.streamingRules(),isIncognito:()=>n.isIncognito()}}(y),Y),Xe=new Ye(v,new d.ShowServiceClient(y),new l.ProductStateClient(y),new u.ScrobbleClient(y),new r.No(y),(0,o.makePrefs)(y),ne,Y,Je?[...Ke.vto.factories,$e]:Ke.vto.factories),et=function(e,t,n,i){return new f(e,t,n,new h.nW(i))}(Ze.b.getInstance(),se,oe,y),tt=new xo(y),nt=function(e){return new w(new h.nW(e))}(y),it=new F((0,o.makePrefs)(y),W),at=new Wo(v,new Ho(Ze.b.getInstance()),M),st=new b((0,o.makePrefs)(y));ne.getValue(qe.yA)?Ae.setTitlebarHeight(I.H):Ae.setTitlebarHeight(I.m);Spicetify.Platform={};Spicetify.Platform["Session"]=D;Spicetify.Platform["Transport"]=M;Spicetify.Platform["EventSender"]=Y;Spicetify.Platform["Translations"]=A;Spicetify.Platform["FeatureFlags"]=R;Spicetify.Platform["History"]=Be;Spicetify.Platform["AdManagers"]=Ke;Spicetify.Platform["RemoteConfiguration"]=ie;Spicetify.Platform["ActionStoreAPI"]=Ue;Spicetify.Platform["AuthorizationAPI"]=S;Spicetify.Platform["ClipboardAPI"]=Pe;Spicetify.Platform["ConnectAPI"]=ge;Spicetify.Platform["ControlMessageAPI"]=Ae;Spicetify.Platform["FacebookAPI"]=Oe;Spicetify.Platform["FollowAPI"]=Re;Spicetify.Platform["GraphQLLoader"]=ae;Spicetify.Platform["LibraryAPI"]=ve;Spicetify.Platform["LocalFilesAPI"]=Ie;Spicetify.Platform["OfflineAPI"]=ke;Spicetify.Platform["PlatformData"]=O;Spicetify.Platform["PlayerAPI"]=Spicetify.Player.origin=oe;Spicetify.Platform["PlayHistoryAPI"]=Te;Spicetify.Platform["PlaylistAPI"]=Ne;Spicetify.Platform["PlaylistPermissionsAPI"]=Ee;Spicetify.Platform["PrivateSessionAPI"]=Le;Spicetify.Platform["RadioStationAPI"]=xe;Spicetify.Platform["RecaptchaLoggerAPI"]=Ve;Spicetify.Platform["RecentlyPlayedAPI"]=je;Spicetify.Platform["ReportAPI"]=we;Spicetify.Platform["RootlistAPI"]=ye;Spicetify.Platform["SegmentsAPI"]=Fe;Spicetify.Platform["ShowAPI"]=Ce;Spicetify.Platform["UpdateAPI"]=re;Spicetify.Platform["UserAPI"]=C;Spicetify.Platform["VideoAPI"]=Xe;Spicetify.Platform["EnhanceAPI"]=et;Spicetify.Platform["SEOExperiments"]=({});Spicetify.Platform["SingAlongAPI"]=tt;Spicetify.Platform["PlaybackAPI"]=he;Spicetify.Platform["UBILogger"]=Me;Spicetify.Platform["CollectionPlatformAPI"]=nt;Spicetify.Platform["LocalStorageAPI"]=W;Spicetify.Platform["EqualizerAPI"]=it;Spicetify.Platform["BuddyFeedAPI"]=at;Spicetify.Platform["PanelAPI"]=st;return!0===ne.getValue(qe.wZ)&&(0,_.HV)(),{version:t,container:e,operatingSystem:(0,Q.L)(),isDeveloperMode:O.is_developer_mode,isVideoSupported:!0,enableCastConnect:!1,getServiceWorkerMessenger:async()=>()=>new Promise((()=>{})),getSession:()=>D,getTransport:()=>M,getEventSender:()=>Y,getTranslations:()=>A,getFeatureFlags:()=>R,getHistory:()=>Be,getAdManagers:()=>Ke,getRemoteConfiguration:()=>ie,getActionStoreAPI:()=>Ue,getAuthorizationAPI:()=>S,getClipboardAPI:()=>Pe,getConnectAPI:()=>ge,getControlMessageAPI:()=>Ae,getFacebookAPI:()=>Oe,getFollowAPI:()=>Re,getGraphQLLoader:()=>ae,getLibraryAPI:()=>ve,getLocalFilesAPI:()=>Ie,getOfflineAPI:()=>ke,getPlatformData:()=>O,getPlayerAPI:()=>oe,getPlayHistoryAPI:()=>Te,getPlaylistAPI:()=>Ne,getPlaylistPermissionsAPI:()=>Ee,getPrivateSessionAPI:()=>Le,getRadioStationAPI:()=>xe,getRecaptchaLoggerAPI:()=>Ve,getRecentlyPlayedAPI:()=>je,getReportAPI:()=>we,getRootlistAPI:()=>ye,getSegmentsAPI:()=>Fe,getShowAPI:()=>Ce,getUpdateAPI:()=>re,getUserAPI:()=>C,getVideoAPI:()=>Xe,getEnhanceAPI:()=>et,getSEOExperiments:()=>({}),getSingAlongAPI:()=>tt,getPlaybackAPI:()=>he,getUBILogger:()=>Me,getCollectionPlatformAPI:()=>nt,getLocalStorageAPI:()=>W,getEqualizerAPI:()=>it,getBuddyFeedAPI:()=>at,getPanelAPI:()=>st}}},61815:(e,t,n)=>{"use strict";n.d(t,{ZO:()=>r,bX:()=>o,c6:()=>s,wW:()=>l});var i=n(95357),a=n(81090);const s=/Spotify\/(?.+)\s/;function r(){if(!!window.navigator.userAgent.match(s))return a.W.Desktop;const e="serviceWorker"in window.navigator,t=window.matchMedia("(display-mode: standalone)").matches,n="Windows"in window;return e&&(t||n)?a.W.PWA:a.W.Web}function o(){const e="serviceWorker"in window.navigator,t=-1!==window.location.search.indexOf("pwa=1"),n=(0,i.L)()===a.U.ChromeOS;return e&&(n||t)}function l(){return r()===a.W.Desktop}},95357:(e,t,n)=>{"use strict";n.d(t,{L:()=>r,y:()=>o});var i=n(19496),a=n.n(i),s=n(81090);function r(){const e=a().parse(window.navigator.userAgent).os.name;return"macOS"===e?s.U.macOS:"Windows"===e?s.U.Windows:"Linux"===e?s.U.Linux:"Chrome OS"===e?s.U.ChromeOS:s.U.Other}function o(){return a().getParser(window.navigator.userAgent).getOSName()||"not_applicable"}},50983:(e,t,n)=>{"use strict";n.d(t,{G:()=>s});var i=n(19496),a=n.n(i);function s(){return"Safari"===a().parse(window.navigator.userAgent).browser.name}},81090:(e,t,n)=>{"use strict";n.d(t,{U:()=>a,W:()=>i});let i=function(e){return e.Web="Web",e.PWA="PWA",e.Desktop="Desktop",e}({}),a=function(e){return e.macOS="macOS",e.Windows="Windows",e.Linux="Linux",e.ChromeOS="ChromeOS",e.Other="Other",e}({})},67589:(e,t,n)=>{"use strict";n.d(t,{J:()=>i});let i=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}({})},18085:(e,t,n)=>{"use strict";n.d(t,{z:()=>i});const i=(0,n(59496).createContext)(null)},99371:(e,t,n)=>{"use strict";n.d(t,{g:()=>s});var i=n(59496),a=n(18085);function s(){const e=(0,i.useContext)(a.z),[t,n]=(0,i.useState)(null);return(0,i.useEffect)((()=>{const{cancel:t}=e.subscribe(n);return t}),[e,n]),t}},30916:(e,t,n)=>{"use strict";n.d(t,{G:()=>a,k:()=>s});var i=n(88566);let a=function(e){return e.UPDATE="update",e}({});class s extends i.r{_numListeners=0;constructor(){super(),this.onAddListener(a.UPDATE,this.onListenerAdded.bind(this)),this.onRemoveListener(a.UPDATE,this.onListenerRemoved.bind(this))}onListenerAdded(){++this._numListeners,this.startListening()}onListenerRemoved(){0==--this._numListeners&&this.stopListening()}}},61922:(e,t,n)=>{"use strict";n.d(t,{Ef:()=>o,nF:()=>c,U5:()=>d});var i=n(59496);const a=new Error("Play History API used without being initialized.\n Did you provide the context in a a parent component?'"),s=(0,i.createContext)({getContents:()=>{throw a}});var r=n(4637);const o=({instance:e,children:t})=>(0,r.jsx)(s.Provider,{value:e,children:t});var l=n(30916);function d(){const e=(0,i.useContext)(s),[t,n]=(0,i.useState)(null),a=(0,i.useCallback)((async()=>n(await e.getContents())),[e]);return function(e,t){const n=(0,i.useContext)(s);(0,i.useEffect)((()=>{const i=n.getEvents();return i.addListener(e,t),()=>{i.removeListener(e,t)}}),[e,t,n])}(l.G.UPDATE,(e=>n(e.data))),(0,i.useEffect)((()=>{a()}),[a]),t}function c(){return(0,i.useContext)(s).getCapabilities().isSupported}},28170:(e,t,n)=>{"use strict";n.d(t,{K:()=>g});var i=n(59496),a=n(89605),s=n(50346),r=n(3802),o=n(47203),l=n(41921),d=n(54485),c=n(86109),u=n(28418),m=n(1627),p=n(19281);function g(){const e=(0,a.s0)(),t=(0,i.useContext)(d.Z),n=(0,i.useContext)(c.B),{request:g}=(0,i.useContext)(l.Ax),h=(0,i.useCallback)((async(e,i)=>{const{name:a,trackUris:s}=await(0,m.Z)(e,0,g),r=await n.createPlaylist(a,i);return r&&await t.add(r,s,{before:"start"}),r}),[t,n,g]),k=(0,i.useCallback)((async(e,i)=>{const a=await(0,m.r)(e[0],g),s=await n.createPlaylist(a,i);return s&&await t.add(s,e,{before:"start"}),s}),[t,n,g]),v=(0,i.useCallback)((async(e,i)=>{const a=await t.getMetadata(e),s=await t.getContents(e,{offset:0,limit:a.totalLength}),r=(0,p.B1)(a.name),o=await n.createPlaylist(r,i);return o&&await t.add(o,s.items.map((e=>e?.uri??null)).filter(u.K),{before:"start"}),o}),[t,n]);return{createPlaylist:(0,i.useCallback)((async(t,i)=>{const{ownedPlaylistCount:a}=await n.getMetadata(),l=r.ag.get("playlist.new-default-name",a+1),d=await n.createPlaylist(l,i??{before:"start"}),c=(0,s.EC)(d);return c&&e(`/playlist/${c.id}`,{state:{referrer:"your_library",navigationalRoot:o.U.CREATE_PLAYLIST,interactionId:t}}),d}),[n,e]),createPlaylistFromAlbum:h,createPlaylistFromTracks:k,createPlaylistFromPlaylist:v}}},1627:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d,r:()=>l});var i=n(50346),a=n(3802);n(72071);const s=Spicetify.GraphQL.Definitions["getAlbumNameAndTracks"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAlbumNameAndTracks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"offset"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"limit"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albumUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"Variable",name:{kind:"Name",value:"offset"}}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"limit"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"track"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nextOffset"}}]}}]}}]}}]}}]}}]},r=Spicetify.GraphQL.Definitions["getEpisodeName"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getEpisodeName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"episodeUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]},o=Spicetify.GraphQL.Definitions["getTrackName"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTrackName"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trackUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}}]};async function l(e,t){const n=a.ag.get("playlist.default_playlist_name");try{if((0,i.hn)(e)){const n=await t(r,{uri:e});if("Episode"===n?.data?.episodeUnionV2?.__typename)return n.data.episodeUnionV2.name}if((0,i.wj)(e)){const n=await t(o,{uri:e});if("Track"===n?.data?.trackUnion?.__typename)return n.data.trackUnion.name}return n}catch{return n}}async function d(e,t,n){const i=await n(s,{uri:e,offset:t,limit:200});if("Album"===i?.data?.albumUnion?.__typename){const{name:a,tracks:s}=i.data.albumUnion,r=s.items.map((e=>e.track.uri));if(s.pagingInfo.nextOffset){if(s.pagingInfo.nextOffset<=t||0===r.length)throw new Error(`Error while requesting ${e} content, unexpected nextOffset`);const i=await d(e,s.pagingInfo.nextOffset,n);return{name:a,trackUris:r.concat(i.trackUris)}}return{name:a,trackUris:r}}throw new Error(`Error while requesting ${e} content`)}},9171:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,i:()=>a});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'PrivateSessionContext' without 'PrivateSessionProvider'!");return e}},87192:(e,t,n)=>{"use strict";n.d(t,{M:()=>r});var i=n(59496),a=n(44358),s=n(9171);function r(){const e=(0,s.E)(),[t,n]=(0,i.useState)(!1),r=(0,a.t)();(0,i.useEffect)((()=>{const t=e.subscribeToPrivateSession((e=>{r()&&n(e)}));return()=>{t()}}),[e,r]);return{isPrivateSession:t,setPrivateSession:(0,i.useCallback)((t=>{e.setPrivateSession(t)}),[e])}}},66155:(e,t,n)=>{"use strict";n.d(t,{B:()=>y});const i=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"}),a=/\p{White_Space}/u,s=/\p{P}/u,r=/\p{sc=Han}/u;function o(e){return null!==e&&a.test(e)}function l(e){return null!==e&&(e<="/"||e>=":"&&e<="@"||"\\"===e||o(e))}function d(e){return null!==e&&s.test(e)}function c(e){return null!==e&&r.test(e)}class u{constructor(e,t,n){if(t<0||n<0||t+n>e.length)throw new RangeError;this.data=e,this.offset=t,this.length=n,this.position=0}static from(e){const t=Array.from(e.normalize("NFC"));return new u(t,0,t.length)}toString(){return this.data.slice(this.offset,this.offset+this.length).join("")}slice(e=0,t=this.length){if(e<0||t>this.length)throw new RangeError;const n=this.offset+e,i=t-e;return new u(this.data,n,i)}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)||d(t));return t}function p(e,t){let n=m(e),a=m(t);if(null===a)return{offset:0,length:0};const s=e.offset+e.position-1;let r=e.offset+e.position;for(;;){if(null===n&&null===a)return{offset:s,length:r-s};if(null===a)return{offset:s,length:r-s};if(null===n)return null;if(0!==i.compare(n,a))return null;r=e.offset+e.position,n=m(e),a=m(t)}}function g(e,t){let n,i,a;do{i=e.position,n=e.nextCodePoint()}while(null!==n&&o(n));if(t?.segmentQuotedStrings&&function(e){return null!==e&&('"'===e||"'"===e)}(n)){const t=n;i=e.position;do{a=e.position,n=e.nextCodePoint()}while(null!==n&&n!==t);return null===n&&i===a?null:e.slice(i,a)}do{if(a=e.position,t?.segmentCJKUnifieIdeographs&&c(n))break;n=e.nextCodePoint()}while(null!==n&&!l(n));return null===n&&i===a?null:e.slice(i,a)}function h(e){return g(e,{segmentQuotedStrings:!0,segmentCJKUnifieIdeographs:!1})}function k(e){return g(e,{segmentQuotedStrings:!1,segmentCJKUnifieIdeographs:!0})}function v(e,t){const n=[];for(let i=k(e);null!==i;i=k(e)){let a=p(i,t.slice());null===a?(a=p(e.slice(i.offset),t.slice()),null===a||n.push(a)):n.push(a)}return n}function f(e,t){return e.offset===t.offset&&e.length===t.length}function y(e,...t){const n=u.from(e),i=[];for(let e=h(n);null!==e;e=h(n)){const n=[];for(let i=0;ie.range.length>0&&n.findIndex((t=>f(e.range,t.range)))===t)))}return i.length>0?i:null}},53809:(e,t,n)=>{"use strict";n.d(t,{B:()=>i});const i={disallowTogglingRepeatContextReasons:["endless_context"],disallowTogglingRepeatTrackReasons:["endless_context"],disallowTogglingShuffleReasons:["endless_context"]}},68591:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,t:()=>o});var i=n(59496),a=n(4637);const s=(0,i.createContext)(void 0),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(!e)throw new Error("useRadioStationAPI must be used within a RadioStationAPIProvider");return e}},34725:(e,t,n)=>{"use strict";n.d(t,{j:()=>o});var i=n(59496),a=n(61740),s=n(6664),r=n(68591);function o(e,t){const n=(0,r.t)(),o=(0,a.I0)();return(0,i.useCallback)((()=>{o((0,s.pu)()),n.banTrack(e,t)}),[n,o,e,t])}},3803:(e,t,n)=>{"use strict";n.d(t,{S:()=>a,t:()=>s});var i=n(50346);function a(e){const t=(0,i.EC)(e);if(null===t)return null;switch(t.type){case i.JM.ARTIST:case i.JM.ALBUM:case i.JM.TRACK:return(0,i.AB)([t.type,t.id]);case i.JM.PLAYLIST:case i.JM.PLAYLIST_V2:return(0,i.AB)(["playlist",t.id]);default:return null}}function s(e){const t=(0,i.EC)(e);if(null===t||t.type!==i.JM.STATION)return null;if(2===t.args?.length){const[e,n]=t.args;switch(e){case i.JM.ARTIST:return(0,i.WN)(n);case i.JM.ALBUM:return(0,i.jy)(n);case i.JM.TRACK:return(0,i.tn)(n);case i.JM.PLAYLIST:case i.JM.PLAYLIST_V2:return(0,i.FW)(n);default:return null}}if(4===t.args?.length){const[e,,n,a]=t.args;if("user"===e&&n===i.JM.PLAYLIST)return(0,i.FW)(a)}return null}},83466:(e,t,n)=>{"use strict";n.d(t,{l:()=>N});var i=n(50346),a=n(53809),s=n(27555),r=n(66842),o=n(22508),l=n(56180),d=n(9374);n(72071);const c=Spicetify.GraphQL.Definitions["fetchTracksForRadioStation"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchTracksForRadioStation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}}]}}]}}]}}]};var u=n(73972);function m(e,t){if("Track"!==t.__typename)return function(e){return{type:d.p.TRACK,uri:e.uri,uid:e.uid,name:e.name,album:{type:d.p.ALBUM,uri:e.album_uri,name:e.metadata.album_title,images:[]},artists:[{type:d.p.ARTIST,uri:e.artist_uri,name:e.metadata.artist_name}],images:[{url:e.metadata.image_url}],duration:{milliseconds:0},mediaType:"audio",isExplicit:"true"===e.metadata.is_explicit,is19PlusOnly:!1,isLocal:!1,metadata:e.metadata,provider:"context"}}(e);if(!t?.albumOfTrack)throw new Error("Error decorating tracks for radio station! No Album for track.");const n=t.albumOfTrack.coverArt?.sources.map((e=>({url:e.url,width:e.width,height:e.height})))??[];return{type:d.p.TRACK,uri:t.uri,uid:e.uid,name:t.name,album:{type:d.p.ALBUM,uri:t.albumOfTrack.uri,name:t.albumOfTrack.name,images:n},artists:t.artists.items.map((e=>({type:d.p.ARTIST,uri:e.uri,name:e.profile.name}))),images:n,duration:{milliseconds:t.duration.totalMilliseconds},mediaType:"audio",isExplicit:t.contentRating?.label===u.KS.Explicit,is19PlusOnly:t.contentRating?.label===u.KS.NineteenPlus,isLocal:!1,metadata:e.metadata,provider:"context"}}async function p(e,t){const n=await e(c,{uris:t.map((e=>e.uri))}),i=n?.data?.tracks;if(i?.length!==t.length)throw new Error("Error decorating tracks for radio station! Mismatch in array sizes.");return t.map(((e,t)=>m(e,i[t])))}var g=n(88566);let h=function(e){return e.BAN="ban",e}({});class k extends g.r{}const v="hm://radio-apollo/v3/tracks/";function f(e){if(null===e)return null;return new URL(e).searchParams.get("salt")??null}function y(e,t,n){const a=[];if(null!==t&&a.push(`salt=${t}`),n.length>0){const e=n.map((e=>(0,i.EC)(e.uri).id)).join(",");a.push(`prev_tracks=${e}`)}return`${v}${e}?${a.join("&")}`}function S(e,t,n){return{uri:e,pages:[{items:n,nextPageUrl:t}],restrictions:a.B}}function b(e,t,n){const i=f(e.context.pages?.[0]?.nextPageUrl??null),{item:a,nextItems:s}=t,r=[...a?[a]:[],...s.slice(0,n)].filter(o.G_),l=y(t.context.uri,i,r),d=S(t.context.uri,l,r);return{...e,context:d,tracks:r}}const _={isAutoplay:!1,previousTrackURIs:[]};class N{_events=new k;constructor(e,t,n,i){this._builder=e,this._loader=t,this._playerAPI=n,this._isAnonymous=i}getCapabilities(){return{canGetStation:!1===this._isAnonymous}}getEvents(){return this._events}async fetchStation(e,t,n=_){const a=e.replace("spotify:station:","spotify:");return(await this._builder.build().withMethod("GET").withHost(s.AA).withPath(`/stations/${a}`).withQueryParameters({count:Math.min(1+t,5),prev_tracks:n.previousTrackURIs.map((e=>(0,i.EC)(e).id)).join(","),autoplay:n?.isAutoplay??!1}).withEndpointIdentifier("/stations/{uri}").send()).body}async createStation(e,t){const n=await this.fetchStation(e,t),i=await p(this._loader,n.tracks),a=function(e,t,n){return{stationURI:e.uri,entityURI:e.titleUri,title:e.title,image:{url:e.imageUri},relatedArtists:e.related_artists.map((e=>({type:d.p.ARTIST,uri:e.artistUri,name:e.artistName,images:[{url:e.imageUri}]}))),context:t,tracks:n}}(n,S(n.uri,n.next_page_url,i),i),s=this._playerAPI.getState();return(0,l.QL)(s,e)?b(a,s,t):a}async getContext(e,t){const{maxNextTracks:n}=this._playerAPI.getCapabilities(),i=await this.fetchStation(e,n,t);return S(i.uri,i.next_page_url,i.tracks.map((e=>({type:d.p.TRACK,uid:e.uid,uri:e.uri,provider:"context"}))))}async getStation(e,t){const n=(0,i.EC)(e);if(null===n||n.type!==i.JM.STATION)throw new Error("Invalid station URI!");const{maxNextTracks:a}=this._playerAPI.getCapabilities();let s=this._playerAPI.getState(),d=await this.createStation(e,a);const c=async({data:n})=>{const i=(0,l.QL)(s,e)!==o.PO.NOT_ACTIVE,r=(0,l.QL)(n,e)!==o.PO.NOT_ACTIVE;var c,u;i===r&&(u=n,null===(c=s)||null===u?c===u:c.item?.uid===u.item?.uid&&c.nextItems.length===u.nextItems.length&&c.nextItems.every(((e,t)=>e.uid===u.nextItems[t]?.uid)))||(r?(d=b(d,n,a),t(d)):i&&(d=await this.createStation(e,a),t(d)),s=n)},u=({data:n})=>{n.stationURI!==e||(0,l.QL)(s,e)||(d=function(e,t,n,i){const a=null!==n?n:e.tracks.filter((e=>e.uri!==t)),s=null!==i?i:f(e.context.pages?.[0]?.nextPageUrl??null),r=y(e.stationURI,s,a),o=S(e.stationURI,r,a);return{...e,context:o,tracks:a}}(d,n.trackURI,n.newTracks,n.newSalt),t(d))},m=this._playerAPI.getEvents(),p=this._events;return m.addListener(r.rg.UPDATE,c),p.addListener(h.BAN,u),[d,{cancel(){m.removeListener(r.rg.UPDATE,c),p.removeListener(h.BAN,u)}}]}async banTrack(e,t){const n=(0,i.EC)(t);if(null===n||n.type!==i.JM.TRACK)throw new Error("Only tracks can be banned from radio stations!");const{maxNextTracks:a}=this._playerAPI.getCapabilities(),r=this._playerAPI.getState();if((0,l.QL)(r,e)){const e=[];e.push((()=>this._playerAPI.removeFromQueue([{uri:t,uid:null}]))),(0,l.oT)(r,t)&&e.push((()=>this._playerAPI.skipToNext())),e.reduce(((e,t)=>e.then(t)),Promise.resolve())}try{const i=await this._builder.build().withMethod("POST").withHost(s.AA).withPath(`/stations/${e}/downs/${n.id}`).withQueryParameters({count:Math.min(1+a,5)}).withEndpointIdentifier("/stations/{stationURI}/downs/{id}").send().then((e=>e.body)),r=f(i.next_page_url),o=await p(this._loader,i.tracks);this._events.emit(h.BAN,{stationURI:e,trackURI:t,newTracks:o,newSalt:r})}catch(n){this._events.emit(h.BAN,{stationURI:e,trackURI:t,newTracks:null,newSalt:null})}}}},89487:(e,t,n)=>{"use strict";n.d(t,{U:()=>i});class i{log(){}}},17761:(e,t,n)=>{"use strict";n.d(t,{P:()=>c,j:()=>u});var i=n(59496),a=n(36844),s=n(16320),r=n(9407),o=n(32731),l=n(4637);const d=(0,i.createContext)(null),c=({children:e,configuration:t})=>{const[n,i]=(0,r.z)(o.r,s.VK.empty().toJSON()),c=s.VK.merge(t,s.VK.fromJSON(n));return(0,l.jsx)(d.Provider,{value:{localConfiguration:c,remoteConfiguration:t,setOverrides:e=>i(s.VK.merge(s.VK.fromJSON(n),e).toJSON()),clearOverrides:()=>i(s.VK.empty().toJSON())},children:(0,l.jsx)(a.jj,{configuration:c,children:e})})};function u(){const e=(0,i.useContext)(d);if(null===e)throw new Error("Please wrap your component in RemoteConfigProviderWithOverrides");return e}},32731:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,r:()=>a});var i=n(16320);const a="remote-config-overrides";function s(e){const t=e.getItem(a);if(t instanceof Error)return i.VK.empty();try{return i.VK.fromJSON(t)}catch(e){return i.VK.empty()}}},61601:(e,t,n)=>{"use strict";n.d(t,{G:()=>s});var i=n(59496);const a=new Error("Report API used without being initialized.\n Did you provide the context in a a parent component?'"),s=(0,i.createContext)({isURIReportable:()=>{throw a},canReportPlaylist:()=>{throw a},getReportURL:()=>{throw a}})},38693:(e,t,n)=>{"use strict";n.d(t,{RH:()=>o,gS:()=>r,j2:()=>l});var i=n(50346),a=n(59102),s=n(26406);const r=e=>(0,i.nK)(e)||(0,i.OB)(e)||(0,i.hn)(e)||(0,i.Kv)(e)||(0,i.RS)(e),o=(e,t,n,i)=>e.getMetadata(t).then((e=>{const t="chart"===e.formatListData?.type;return!(!i&&!e.canReportAnnotationAbuse||t||n===e.owner.uri)})).catch((e=>((0,a.H)(e),!1))),l=(e,t)=>e.getMetadata(t).then(s.l6)},55345:(e,t,n)=>{"use strict";n.d(t,{G:()=>o,s:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)(void 0),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(!e)throw new Error("useSegmentsAPI must be used within a SegmentsAPIProvider");return e}},49921:(e,t,n)=>{"use strict";n.d(t,{k:()=>o});var i=n(59496),a=n(48607),s=n(99948),r=n(4464);function o({episodeUri:e,start:t,stop:n}){const{togglePlay:o,triggerPlay:l,isPlaying:d,isActive:c}=(0,a.n)({uri:e},{featureIdentifier:"episode"}),u=(0,s.Y)((e=>(0,r.k)(e)??0)),m=c&&function(e,t,n){return n>=e&&n{m?o({seekTo:t,loggingParams:e}):l({seekTo:t,loggingParams:e})}),[m,t,o,l]),isPlaying:p,isActive:m}}},23888:(e,t,n)=>{"use strict";n.d(t,{y:()=>f});var i=n(59496),a=n(61740),s=n(89605),r=n(55530),o=n.n(r),l=n(99583),d=n(50346),c=n(3802),u=n(85483),m=n(39669),p=n(30009),g=n(32422),h=n(55760),k=n(95663),v=n(30985);const f=({sharingInfo:e,uri:t,interactionData:n})=>{const r=(0,k.o)(),f=(0,a.I0)(),{pathname:y}=(0,s.TH)(),S=(0,a.v9)(v.br),b=(0,a.v9)(v.yE),_=c.ag.getUrlLocale();let N=e;if(!N?.shareUrl){const e=(0,d.EC)(t),n=e?.type,i=(0,g.S9)({localeFeatureFlag:S,entityFeatureFlag:b,urlLocale:_,entity:n,type:"link"});N=((e,t,n)=>{const i=(0,d.EC)(e)?.toURL(),a=o().create().hex.replace(/-/g,"").substr(0,16),s=(0,d._b)(e).toURL(`${m.Li}${m.F0}${n}/`);return{shareUrl:t&&i?`${s}?si=${a}`:`${i}?si=${a}`,shareId:a}})(t,i,_)}const E=N?.shareUrl||"",x=(0,h.s4)();return{onCopyLink:(0,i.useCallback)((e=>{let i=E;if(e){const t=new URL(E);e.forEach(((e,n)=>t.searchParams.set(n,e))),i=t.toString()}if(r(n),(0,p.v)(i),f((0,u.dC)(i)),N?.shareId){const e=(0,d.EC)(y);x.send((0,l.G)({share_id:N?.shareId,entity_uri:t,destination_id:"copy-link",source_page:e?.type||"",source_page_uri:e?.toURI()||""}))}}),[f,n,y,r,E,N,t,x])}}},98479:(e,t,n)=>{"use strict";n.d(t,{W:()=>a});var i=n(91929);function a(){const{ref:e,inView:t}=(0,i.YD)({initialInView:!1}),{ref:n,inView:a}=(0,i.YD)({initialInView:!1});return{titleRef:e,tracklistRef:n,displayTopBar:!t&&a}}},79923:(e,t,n)=>{"use strict";n.d(t,{Ds:()=>r,I2:()=>o,bl:()=>l,gB:()=>d});var i=n(50346),a=n(3802),s=n(9374);const r={url:"https://t.scdn.co/images/3099b3803ad9496896c43f22fe9be8c4.png",width:300,height:300};function o(e){if(!e)return null;const t=(0,i.wG)(e).toURI();return{type:s.p.LIKED_SONGS,uri:t,images:[r],name:a.ag.get("sidebar.liked_songs")}}function l(e){const t=(0,i.wG)(e??void 0,"your-episodes").toURI();return{type:s.p.YOUR_EPISODES,images:[],name:a.ag.get("sidebar.your_episodes"),uri:t}}function d(){return{type:s.p.LOCAL_FILES,images:[],name:a.ag.get("local-files"),uri:"spotify:collection:local-files"}}},7498:(e,t,n)=>{"use strict";n.d(t,{C:()=>s,d:()=>a});var i=n(88566);let a=function(e){return e.SUBTITLE_LANGUAGES_CHANGED="subtitle_languages_changed",e}({});class s extends i.r{}},45522:(e,t,n)=>{"use strict";let i;function a({show:e,hide:t,msTimeout:n=2500}){i&&clearTimeout(i),e(),i=setTimeout(t,n)}n.d(t,{T:()=>a})},41836:(e,t,n)=>{"use strict";n.d(t,{$f:()=>N,A$:()=>ve,AJ:()=>ue,AL:()=>me,Am:()=>le,B4:()=>fe,C1:()=>Z,CM:()=>ee,Cd:()=>a.Cd,Cz:()=>x,Dz:()=>G,EW:()=>O,FC:()=>d,GE:()=>b,Gu:()=>ke,IP:()=>Ce,JI:()=>q,Jw:()=>v,KK:()=>Ee,KL:()=>Ie,Mk:()=>$,Ml:()=>de,Mm:()=>m,Nc:()=>P,Nm:()=>a.Nm,Oe:()=>B,Ol:()=>Q,QC:()=>h,R2:()=>re,Up:()=>I,Vv:()=>H,Vz:()=>j,WE:()=>L,We:()=>F,XF:()=>a.XF,XP:()=>xe,YC:()=>_e,YS:()=>a.YS,ZU:()=>Y,Zj:()=>f,_c:()=>ye,bM:()=>T,bU:()=>ge,c$:()=>a.c$,cp:()=>g,dE:()=>c,e$:()=>M,e8:()=>se,eQ:()=>Ne,fX:()=>y,hT:()=>ie,hj:()=>be,hw:()=>he,iH:()=>Se,jL:()=>w,k7:()=>we,kI:()=>V,mQ:()=>U,nv:()=>a.nv,oF:()=>S,oo:()=>X,pF:()=>r,q7:()=>oe,qX:()=>pe,rG:()=>u,rS:()=>a.rS,sE:()=>D,sM:()=>a.sM,sm:()=>te,t$:()=>ae,tc:()=>k,tp:()=>a.tp,ty:()=>W,u8:()=>_,uB:()=>A,v8:()=>ne,vW:()=>Te,vp:()=>R,wA:()=>Ae,wZ:()=>ce,wm:()=>K,wy:()=>a.wy,xU:()=>J,y$:()=>C,yA:()=>z,yg:()=>a.yg,yi:()=>p,yr:()=>E,zO:()=>l,zZ:()=>o});var i=n(16320),a=n(42495),s=function(e){return e.WEBAPI="WEBAPI",e.PATHFINDER="PATHFINDER",e}(s||{});let r=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}({});(0,i.JP)({name:"enablePathfinderForArtistPage",description:"Fetch artist page data from pathfinder",default:!1}),(0,i.VL)({name:"podcastMetadataSource",description:"Where to request podcast metadata from",values:s,default:s.WEBAPI});const l=(0,i.JP)({name:"enableClientXConcertsForArtistPage",description:"Enables the concert features in the Artist page of the web player",default:!1}),d=((0,i.z8)({name:"listen_together_max_number_of_participants",description:"The maximum number of participants allowed in a Listen Together session",lower:2,upper:100,default:6}),(0,i.JP)({name:"useOptimizedESS2NA",description:"Enables ESS2NA optimization in Event Sender",default:!1})),c=(0,i.JP)({name:"enableClientXConcertsHub",description:"Enables the concert HUB features in the the web player",default:!0}),u=((0,i.JP)({name:"enableCombinedRecsConcertsHub",description:"Enables combined event recommendations in the Concerts Hub",default:!1}),(0,i.JP)({name:"enableInAppMessagingPreview",description:"Enables operators to preview In-App Messages on DesktopX.",default:!1})),m=(0,i.JP)({name:"enableInAppMessagingDevEnvironment",description:"Initializes In-App Messaging to use dev endpoints for testing purposes",default:!1}),p=(0,i.JP)({name:"enableInAppMessaging",description:"Enables quicksilver in-app messaging modal",default:false}),g=(0,i.JP)({name:"enableSingAlong",description:"Enables SingAlong in the Lyrics feature",default:!1}),h=((0,i.JP)({name:"enableInlineCuration",description:"Enables the new inline playlist curation tools",default:!1}),(0,i.JP)({name:"enableUserProfileEdit",description:"Enables editing of user's own profile in Web Player and DesktopX",default:!1}),(0,i.JP)({name:"enableSoundbetterSocialLink",description:"Show soundbetter link in the artist about tab when present",default:!1})),k=(0,i.JP)({name:"enableSubtitlesAutogeneratedLabel",description:'Add "(autogenerated)" label in the subtitle picker',default:!1}),v=(0,i.VL)({name:"searchVisibilityTest",description:"Test to improve search visibility",values:r,default:r.DEFAULT}),f=(0,i.JP)({name:"enableBlockUsers",description:"Enable block users feature in clientX",default:true}),y=(0,i.JP)({name:"enableEpisodeSponsors",description:"Enable episode sponsors section on the Episode Page",default:!1}),S=(0,i.z8)({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}),b=(0,i.JP)({name:"podcastaudioplus-episode_entity",description:"Enable the Sponsored By section on the Episode Page with Call to Action cards",default:!1}),_=(0,i.JP)({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}),N=(0,i.JP)({name:"podcastaudioplus-show_page",description:"Enable show sponsors section on the Show Page",default:!1}),E=(0,i.JP)({name:"enableArtistLikedSongs",description:"Enable Liked Songs section on Artist page",default:true}),x=(0,i.JP)({name:"enableHTMLDescriptions",description:"Enable HTML descriptions for Episodes and Shows",default:!1}),C=((0,i.JP)({name:"enableNewPodcastIndicator",description:"Enable NEW indicator for the latest podcast episode",default:!1}),(0,i.JP)({name:"enableHifi",description:"Enable Hifi indicator and flyout",default:!1})),w=(0,i.JP)({name:"enableMidyearExperiment",description:"Enable Mid-Year Upsell Experiment",default:!1}),I=(0,i.JP)({name:"enableEnhancePlaylistProd",description:"Enable Enhance Playlist UI and functionality for end-users",default:true}),T=(0,i.JP)({name:"enablePlaylistPermissionsProd",description:"Enable Playlist Permissions flows for Prod",default:true}),A=(0,i.JP)({name:"enableAudiobooks",description:"Enable Audiobooks feature on ClientX",default:true}),P=(0,i.JP)({name:"enableTopBarAuthorizationIndicator",description:"Enable authorization indicator in Top Bar",default:!1}),O=(0,i.JP)({name:"enableDiscographyShelf",description:"Enable a condensed disography shelf on artist pages",default:true}),D=(0,i.JP)({name:"enableCovidHubBanner",description:"Display a banner in the Covid-19 hub",default:!1}),R=(0,i.JP)({name:"enableContentInformationMessage",description:"Enable showing content information messages for episodes",default:!1}),L=((0,i.JP)({name:"enableSearchModal",description:"Enable search modal",default:!1}),(0,i.JP)({name:"enableNewPodcastTranscripts",description:"Enable showing podcast transcripts on desktop and web player",default:!1})),F=(0,i.JP)({name:"enableEnhanceLikedSongs",description:"Enable Enhance Liked Songs UI and functionality",default:true}),j=(0,i.JP)({name:"enableNextBestEpisode",description:"Enable the next best episode block on the show page",default:!1}),M=(0,i.JP)({name:"enableIgnoreInRecommendations",description:"Enable Ignore In Recommendations for desktop and web",default:true}),U=(0,i.JP)({name:"enableLyricsMatch",description:"Enable Lyrics match labels in search results",default:true}),B=(0,i.JP)({name:"enableBrowseViaPathfinder",description:"Fetch Browse data from Pathfinder",default:true}),V=(0,i.JP)({name:"enableStrangerThingsEasterEgg",description:"Enable the Stranger Things upside down Easter Egg",default:!1}),H=(0,i.JP)({name:"enableAlbumReleaseAnniversaries",description:"Enable showing balloons on album release date anniversaries",default:true}),G=(0,i.JP)({name:"enableSearchV3",description:"Enable new Search experience",default:!1}),W=((0,i.JP)({name:"enableGabitoAdEvent",description:"Use Gabito AdEvent instead of Gabo AdEvent",default:!1}),(0,i.JP)({name:"enableCarouselsOnHome",description:"Use carousels on Home",default:true})),z=(0,i.JP)({name:"enableYLXSidebar",description:"Enable Your Library X view of the left sidebar",default:!1}),K=(0,i.JP)({name:"enableYLXStaticImage2Optimizer",description:"Enable Your Library X static image2 optimizer to optimize image urls",default:!1}),Y=(0,i.JP)({name:"enableYLXFullCaching",description:"On desktop enable full caching of ylx data for better performance",default:!1}),q=(0,i.JP)({name:"enableRightSidebar",description:"Enable the view on the right sidebar",default:true}),Z=(0,i.JP)({name:"enableRightSidebarTransitionAnimations",description:"Enable the slide-in/out transition on the right sidebar",default:!1}),Q=(0,i.JP)({name:"enableRightSidebarLyrics",description:"Show lyrics in the right sidebar",default:!1}),J=(0,i.JP)({name:"enableRightSidebarCredits",description:"Show credits in the right sidebar",default:!1}),$=(0,i.JP)({name:"enableRightSidebarExtractedColors",description:"Extract background color based on artwork image",default:!1}),X=(0,i.JP)({name:"enableRightSidebarMerchFallback",description:"Allow merch to fallback to artist level merch if track level does not exist",default:!1}),ee=(0,i.JP)({name:"enableEmployeeLeaderboardArtists",description:"Enable Artist listening Leaderboard for employees",default:!1}),te=(0,i.JP)({name:"enableMiniPlayer",description:"Enable Mini Player",default:!1}),ne=(0,i.JP)({name:"enableEmployeeLeaderboardPlaylist2022",description:"Enable Playlist listening Leaderboard for employees",default:!1}),ie=(0,i.JP)({name:"enableReportAudiobooks",description:"Enable Report action for audiobooks",default:!1}),ae=(0,i.JP)({name:"enableDebugWindowBrowserShortcut",description:"Enable Debug Window browser shortcut to make it useable on Web Player",default:!1}),se=(0,i.JP)({name:"enableWhatsNewFeed",description:"Enable the what's new feed panel",default:!1}),re=(0,i.JP)({name:"enableHptoLocationRefactor",description:"Enable new permanent location for HPTO iframe to HptoHtml.js",default:!1}),oe=(0,i.JP)({name:"enableSilenceTrimmer",description:"Enable silence trimming in podcasts",default:true}),le=(0,i.JP)({name:"enableSmallPlaybackSpeedIncrements",description:"playback speed range from 0.5-3.5 with every 0.1 increment",default:!1}),de=((0,i.JP)({name:"enableSeeMoreArtistMerch",description:"Enable a link on the album merch shelf to the artist store.",default:!1}),(0,i.JP)({name:"enablePuffin",description:"Enables the Puffin feature",default:!1})),ce=(0,i.JP)({name:"enableYourDJ",description:'Enables the "Your DJ" feature',default:!1}),ue=(0,i.JP)({name:"enableShowFollowsSetting",description:"Enable a setting to control if followers and following lists are shown on profile",default:true}),me=(0,i.JP)({name:"enableGatedPodcastSubscriberIndicator",description:"Enable showing label indicating access (Subscriber/Purchased) for gated podcasts in show header",default:!1}),pe=((0,i.JP)({name:"enableVideoMerchandizingShow",description:"Enable video podcast indicator for episodes on Show page",default:!1}),(0,i.JP)({name:"enableVideoMerchandizingSearch",description:"Enable video podcast indicator for episodes on Search results",default:!1}),(0,i.JP)({name:"enableConnectNudge",description:"Enable message which nudges people to connect to a device when available",default:!1}));let ge=function(e){return e.DISABLED="DISABLED",e.CONTROL="CONTROL",e.VARIANT_1="VARIANT_1",e.VARIANT_2="VARIANT_2",e.VARIANT_3="VARIANT_3",e}({});const he=(0,i.VL)({name:"upgradeButtonCopyTest",description:"Test different copy for premium upgrade buttons",values:ge,default:ge.DISABLED}),ke=(0,i.JP)({name:"enablePremiumPage",description:"Enable Premium Page feature to test conversion within the Desktop/Webplayer",default:!1}),ve=(0,i.JP)({name:"enableAttackOnTitanEasterEgg",description:"Enable Attack on Titan Easter egg turning progress bar red when playing official soundtrack",default:!1}),fe=(0,i.JP)({name:"enableCulturalMoments",description:"Enable Cultural Moment pagess",default:!1}),ye=(0,i.JP)({name:"enablePanelSizeCoordination",description:"Enable Panel Size Coordination between the left sidebar, the main view and the right sidebar",default:!1}),Se=(0,i.JP)({name:"enableRemoteDownloads",description:"Enable remote download support through the offline2 system",default:!1}),be=(0,i.JP)({name:"enableFamilyDuoConcertsShelf",description:"Enable new live events hub shelf with concerts recommendations for Family and Duo users",default:!1}),_e=(0,i.JP)({name:"enableFamilyDuoConcertsShelfRendering",description:"Enable rendering of the new live events hub shelf with concerts recommendations for Family and Duo users",default:!1}),Ne=(0,i.JP)({name:"enableAlbumPrerelease",description:"Enable album prerelease pages",default:!1}),Ee=(0,i.JP)({name:"enableYLXTypeaheadSearch",description:"Enable YLX typeahead search letting you start typing a substring and immediately jump to the first matching item",default:!1}),xe=(0,i.JP)({name:"enableDesktopMusicLeavebehinds",description:"Enable music leavebehinds on eligible playlists for desktop",default:!1}),Ce=(0,i.JP)({name:"enableEsperantoMigration",description:"Enable esperanto Migration for Ad Formats",default:!1}),we=(0,i.VL)({name:"enableMandalorianEasterEgg",description:"Enable the Mandalorian easter-egg",values:o,default:o.DISABLED}),Ie=(0,i.JP)({name:"enablePrefetching",description:"Enable prefetching of data for some entity views",default:!1}),Te=((0,i.JP)({name:"enableNewLeaderboardTemplate",description:"Enable new leaderboard v3 template served from ARS",default:!1}),(0,i.JP)({name:"enableNewHptoTemplate",description:"Enable new hpto v3 template served from ARS",default:!1}),(0,i.JP)({name:"enableABP",description:"Enable ABP",default:!1})),Ae=(0,i.JP)({name:"enableUnsupportedBooklistMessage",description:"Enable showing a message that audiobooks in playlists are currently not supported",default:!1})},70304:(e,t,n)=>{"use strict";n.d(t,{hd:()=>o,i$:()=>r,j:()=>a,lc:()=>d,mH:()=>s,yB:()=>c,yO:()=>l});const i=e=>`:${e}`,a=i("showId"),s=e=>`/show/${e}`,r=s(a),o="episodeId",l=i(o),d=e=>`/episode/${e}`,c=d(l)},47146:(e,t,n)=>{"use strict";n.d(t,{C7:()=>a,Vd:()=>s,rZ:()=>i});const i=e=>{let t;return t=e.session.user?e.session.user.country:e.session.market,void 0===t&&e.session.productState&&(t=e.session.productState.country),t},a=e=>"KR"===i(e),s=e=>"RU"===i(e)},30985:(e,t,n)=>{"use strict";n.d(t,{br:()=>r,rH:()=>s,yE:()=>o});var i=n(23055);const a=e=>e.features,s=(0,i.P1)(a,(e=>e?.enableShows||!1)),r=(0,i.P1)(a,(e=>e?.enableI18nLocales||!1)),o=(0,i.P1)(a,(e=>e?.isI18nAdditionalPagesEnabled||!1))},31503:(e,t,n)=>{"use strict";n.d(t,{$2:()=>l,dZ:()=>r,vT:()=>o});var i=n(23055),a=n(9374);const s=e=>e.seoExperiment,r=(0,i.P1)(s,(e=>e?.[a.p.ARTIST_CONCERTS])),o=(0,i.P1)(s,(e=>e?.[a.p.SHOW])),l=(0,i.P1)(s,(e=>e?.[a.p.TRACK]))},82108:(e,t,n)=>{"use strict";n.d(t,{$T:()=>s,A$:()=>d,Gf:()=>o,Gg:()=>i,OA:()=>a,QT:()=>c,VG:()=>r,n5:()=>l});const i=e=>e.session,a=e=>"premium"===e.session?.productState?.catalogue?.toLowerCase(),s=e=>null!==e.session?.productState&&1===parseInt(e.session?.productState?.ads,10),r=e=>"free"===e.session?.productState?.catalogue?.toLowerCase(),o=e=>e.session?.user?.display_name,l=e=>e.session?.user?.id,d=e=>e.session?.user?.images||[],c=e=>"1"===e.session?.productState?.["filter-explicit-content"]},16674:(e,t,n)=>{"use strict";n.d(t,{G:()=>i,Y:()=>a});const i=e=>e.ui.improvedSignupPromptDialog.isOpen,a=e=>e.ui.nowPlayingCover.forcedExpandedState},68762:(e,t,n)=>{"use strict";n.d(t,{A:()=>i,e:()=>a});const i="REQUEST_ME_SUCCESS",a="REQUEST_PRODUCT_STATE_SUCCESS"},4050:(e,t,n)=>{"use strict";n.d(t,{VX:()=>r,y:()=>o,dL:()=>h,zD:()=>u,Tz:()=>m,ls:()=>p,GR:()=>k,cY:()=>_,k9:()=>v,fY:()=>f,qR:()=>g});const i="ACCESS_TOKEN_UPDATE_SUCCESS",a="UPDATE_DISPLAY_NAME_SUCCESS",s="PROFILE_IMAGES_UPDATE_SUCCESS",r="LOAD",o="LOGOUT_REQUEST",l="LOGOUT_SUCCESS",d="SET_COUNTRY_OVERRIDE",c="SET_LOCALE_OVERRIDE";function u(){return{type:r}}function m(){return{type:o}}function p(){return{type:l}}function g(e){return{type:i,authData:e}}function h(e){return{type:a,name:e}}function k(e){return{type:s,images:e}}function v(e){return{type:d,country:e}}function f(e){return{type:c,locale:e}}var y=n(3802),S=n(68762);const b={isAnonymous:!0,accessToken:"",accessTokenExpirationTimestampMs:0,user:null,locale:y.go.en,productState:null,market:"",valid:!1,overrides:null};function _(e=b,t){switch(t.type){case S.A:return{...e,user:t.data};case S.e:return{...e,productState:t.data};case i:return{...e,accessToken:t.authData.accessToken,accessTokenExpirationTimestampMs:t.authData.accessTokenExpirationTimestampMs,isAnonymous:t.authData.isAnonymous,valid:!0};case a:return e.user?{...e,user:{...e.user,display_name:t.name}}:e;case s:return e.user?{...e,user:{...e.user,images:t.images}}:e;case d:return{...e,overrides:{...e.overrides,country:t.country}};case c:return{...e,overrides:{...e.overrides,locale:t.locale}};default:return e}}},3289:(e,t,n)=>{"use strict";n.d(t,{_:()=>s});var i=n(64320),a=n(4637);const s=Spicetify.ReactComponent.TooltipWrapper=({label:e,children:t,renderInline:n,showDelay:s=200,disabled:r,placement:o="top",labelClassName:l})=>(0,a.jsx)(i.Nt,{action:"open",trigger:"hover-or-focus",placement:o,content:r?null:(0,a.jsx)(i.xX,{showDelay:s,className:l,children:(0,a.jsx)("span",{id:"hover-or-focus-tooltip",role:"tooltip",children:e})}),renderInline:n,children:t})},64719:(e,t,n)=>{"use strict";n.d(t,{E:()=>o});var i=n(59496),a=n(30366),s=n(3289),r=n(4637);const o=i.forwardRef((function({onClick:e,ariaLabel:t,standalone:n=!1,tabIndex:i=0,className:o="",icon:l,size:d="md",semanticColor:c,condensed:u,condensedAll:m,disableTooltip:p=!1,testId:g,disabled:h=!1},k){const v=l;return(0,r.jsx)(s._,{label:t,disabled:p,children:(0,r.jsx)(a.o,{"":g,className:o,onClick:e,"aria-label":t,"aria-hidden":n,tabIndex:i,ref:k,iconOnly:v,buttonSize:d,semanticColor:c,condensed:u,condensedAll:m,disabled:h})})}))},60599:(e,t,n)=>{"use strict";n.d(t,{qE:()=>g,ul:()=>p,JM:()=>h});var i=n(59496),a=n(84875),s=n.n(a);const r={PlayButton:"main-playButton-PlayButton",primary:"main-playButton-primary",secondary:"main-playButton-secondary",transparent:"main-playButton-transparent",lockIcon:"main-playButton-lockIcon"};var o=n(3802),l=n(83292),d=n(31538),c=n(37912),u=n(3289),m=n(4637);let p=function(e){return e.primary="primary",e.secondary="secondary",e.transparent="transparent",e}({}),g=function(e){return e[e.xxs=16]="xxs",e[e.xs=32]="xs",e[e.sm=40]="sm",e[e.md=48]="md",e[e.lg=56]="lg",e[e.xl=64]="xl",e}({});const h=i.memo((0,i.forwardRef)((function(e,t){const{onClick:n,isPlaying:i,locked:a,version:h=p.primary,size:k=g.sm,disabled:v=!1,children:f,ariaPauseLabel:y,ariaPlayLabel:S,isLoading:b}=e,_=k===g.lg?24:16,N={"--size":`${k}px`};let E=o.ag.get("play");E=a?o.ag.get("mwp.header.content.unavailable"):i?y??o.ag.get("pause"):S??o.ag.get("play");const x=i?(0,m.jsx)(l.k,{"aria-hidden":!0}):(0,m.jsx)(d.J,{"aria-hidden":!0});return(0,m.jsx)(u._,{label:E,children:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("button",{style:N,className:s()(r.PlayButton,r[h],"encore-bright-accent-set"),onClick:e=>{const{currentTarget:t,detail:i}=e;n(e),i>0&&t&&t.blur()},disabled:v||b,"aria-label":E,ref:t,"":"play-button",children:[x,a&&(0,m.jsx)(c.Z,{color:"black",className:r.lockIcon,iconSize:_})]}),f]})})})))},17201:(e,t,n)=>{"use strict";n.d(t,{u:()=>p,f:()=>g});var i=n(59496),a=n(3802),s=n(31538),r=n(37912),o=n(83292),l=n(79475),d=n(30366);const c="main-playButton-PlayButton";var u=n(3289),m=n(4637);let p=function(e){return e.primary="primary",e.secondary="secondary",e.transparent="transparent",e}({});const g=i.memo((0,i.forwardRef)((function(e,t){const{onClick:n,isPlaying:i,locked:g,version:h=p.primary,size:k="md",disabled:v=!1,children:f,ariaPauseLabel:y,ariaPlayLabel:S,isLoading:b}=e,_=e=>{const{currentTarget:t,detail:i}=e;n(e),i>0&&t&&t.blur()};let N=a.ag.get("play"),E=s.J;g?(N=a.ag.get("mwp.header.content.unavailable"),E=r.Z):i?(N=y??a.ag.get("pause"),E=o.k):N=S??N;return(0,m.jsx)(u._,{label:a.ag.get("play-button.label"),children:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:c,children:(()=>{const e={iconOnly:E,buttonSize:k,onClick:_,disabled:v||b,"aria-label":N,ref:t,"":"play-button"};switch(h){case p.secondary:return(0,m.jsx)(l.D,{...e,colorSet:"invertedLight"});case p.transparent:return(0,m.jsx)(d.o,{...e,semanticColor:"textBase"});default:return(0,m.jsx)(l.D,{...e})}})()}),f]})})})))},69812:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});var i=n(51559),a=n(4637);const s=({children:e,...t})=>(0,a.jsx)(i.x,{...t,action:"toggle",trigger:"click",children:e})},51559:(e,t,n)=>{"use strict";n.d(t,{x:()=>k});var i=n(96848),a=n(87417),s=n(59496),r=n(59737),o=n(4637);const l=({toggleContextMenu:e,children:t})=>(0,o.jsx)(o.Fragment,{children:s.cloneElement(t,{onClick:n=>{t.props.onClick?.(n),e(n)}})}),d=({openContextMenu:e,children:t})=>{const n=(0,i.qT)();return(0,o.jsx)(o.Fragment,{children:s.cloneElement(t,{onFocus:n=>{document.documentElement.classList.contains("no-focus-outline")||(t.props.onFocus?.(n),e(n))},onBlur:e=>{t.props.onBlur?.(e),n({type:"close"})},onMouseEnter:n=>{t.props.onMouseEnter?.(n),e(n)},onMouseLeave:e=>{t.props.onMouseLeave?.(e),n({type:"close"})}})})},c=({openContextMenu:e,children:t})=>{const n=(0,i.qT)(),{isTouching:a}=(0,i.Np)(),r=(0,s.useRef)();return(0,o.jsx)(o.Fragment,{children:s.cloneElement(t,{onContextMenu:n=>{t.props.onContextMenu?.(n),a||e(n),n.stopPropagation()},onTouchStart:e=>{r.current=Date.now(),t.props.onTouchStart?.(e),n({type:"touch",value:!0})},onTouchEnd:i=>{var a;t.props.onTouchEnd?.(i),(a=r.current)&&Date.now()-500>a&&(n({type:"touch",value:!1}),e(i)),document.body.hasAttribute("data-dragging-type")&&document.body.removeAttribute("data-dragging-type"),document.body.hasAttribute("data-dragging-uri-type")&&document.body.removeAttribute("data-dragging-uri-type")}})})},u=(0,s.forwardRef)((function({isOpen:e,handleContextMenu:t,trigger:n,children:i},a){return(0,r.x)(i)?(0,o.jsx)(o.Fragment,{children:i(e,t,a)}):"click"===n?(0,o.jsx)(l,{toggleContextMenu:t,children:i}):"right-click"===n?(0,o.jsx)(c,{openContextMenu:t,children:i}):"hover-or-focus"===n?(0,o.jsx)(d,{openContextMenu:t,children:i}):(0,o.jsx)(o.Fragment,{children:(0,s.cloneElement)(i,{ref:a})})}));var m=n(34643);function p(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 g=n(95019);const h=({children:e,menu:t,action:n="toggle",trigger:s="click",renderInline:r=!1,offset:l=[0,8],placement:d="bottom-start",preventScrollingWhileOpen:c=!0,onShow:h,onHide:k})=>{const v=(0,i.qT)(),f=(0,i.Np)(),y=(0,a.c)({action:n,menu:t}),S=(0,g.ky)();return(0,o.jsx)(m.t,{onClickOutside:()=>{v({type:"close"})},placement:d,trigger:s,offset:l,preventScrollingWhileOpen:c,triggerRef:f.triggerElement??void 0,appendTo:!S||r?void 0:()=>S.body,isOpen:f.isOpen,position:p(f.event),menu:f.menu,onShow:h,onHide:(...e)=>{v({type:"close"}),k?.(...e)},children:(0,o.jsx)(u,{isOpen:f.isOpen,handleContextMenu:y,trigger:s,children:e})})},k=e=>(0,o.jsx)(i.du,{children:(0,o.jsx)(h,{...e})})},54299:(e,t,n)=>{"use strict";n.d(t,{_:()=>s});var i=n(51559),a=n(4637);const s=Spicetify.ReactComponent.RightClickMenu=e=>(0,a.jsx)(i.x,{...e,action:"open",trigger:"right-click"});Spicetify.ReactComponent.ContextMenu=i.x;},1996:(e,t,n)=>{"use strict";n.d(t,{v:()=>p});var i=n(59496),a=n(84875),s=n.n(a),r=n(75563),o=n(21316),l=n(96848),d=n(40576),c=n(14583),u=n(23329),m=n(4637);const p=Spicetify.ReactComponent.Menu=({children:e,onClose:t,getInitialFocusElement:n,...a})=>{const p=(0,l.qT)(),g=(0,i.useCallback)((()=>{t?.(),p({type:"close"})}),[p,t]),h=(0,i.useCallback)((e=>{p({type:"modifierKeyHeld",value:e.altKey||e.ctrlKey})}),[p]);return(0,m.jsx)(d.L,{onError:e=>(0,u.vK)(e,"Menu"),children:(0,m.jsx)(c.m,{children:(0,m.jsx)(r.I_,{className:s()("encore-dark-theme",o.Z.menu),onClose:g,onKeyDown:h,onKeyUp:h,getInitialFocusElement:n,...a,children:e})})})}},78115:(e,t,n)=>{"use strict";n.d(t,{F:()=>d});var i=n(84875),a=n.n(i),s=n(56162),r=n(21316),o=n(75563),l=n(4637);const d=({children:e,divider:t})=>(0,l.jsx)(o._w,{className:r.Z.menuItem,children:(0,l.jsx)(s.D,{className:a()(r.Z.menuHeading,"ellipsis-one-line",{[r.Z.dividerBefore]:"before"===t,[r.Z.dividerAfter]:"after"===t}),variant:"finaleBold",dir:"auto","aria-hidden":!0,children:e})})},99308:(e,t,n)=>{"use strict";n.d(t,{s:()=>g});var i=n(59496),a=n(84875),s=n.n(a),r=n(21316),o=n(96848),l=n(75563),d=n(42750),c=n(37433),u=n(56162),m=n(76191),p=n(4637);const g=Spicetify.ReactComponent.MenuItem=({children:e,disabled:t,divider:n,onClick:a=(()=>{}),leadingIcon:g,trailingIcon:h,elementRef:k,CheckedIcon:v=c.N,...f})=>{const y=(0,o.qT)(),S=(0,i.useRef)(null),b=(0,i.useCallback)((e=>{S.current=e,k&&k(e)}),[k]),{handleMouseEnter:_,handleMouseLeave:N,handleFocus:E}=(0,m.n)(S),x=(0,i.useCallback)((e=>{e.stopPropagation(),a(e),t||y({type:"close"})}),[a,y,t]),C=(0,i.useCallback)((e=>{e.stopPropagation()}),[]);return(0,p.jsx)(d._,{className:r.Z.menuItem,children:(0,p.jsxs)(l.IZ,{className:s()(r.Z.menuItemButton,{[r.Z.disabled]:t,[r.Z.dividerBefore]:"before"===n||"both"===n,[r.Z.dividerAfter]:"after"===n||"both"===n}),"aria-disabled":t,onClick:x,onFocus:E,onMouseEnter:_,onMouseLeave:N,onContextMenu:C,ref:b,...f,children:[g,(0,p.jsx)(u.D,{variant:"mesto",dir:"auto",className:s()("ellipsis-one-line",r.Z.menuItemLabel),children:e}),h,f["aria-checked"]&&v&&(0,p.jsx)(v,{iconSize:16})]})})}},58658:(e,t,n)=>{"use strict";n.d(t,{W:()=>h});var i=n(59496),a=n(21316),s=n(31217),r=n(75563),o=n(84875),l=n.n(o),d=n(42750),c=n(76191),u=n(4637);const m=(0,i.forwardRef)((function({children:e,disabled:t=!1,onClick:n=(()=>{}),setIsOpen:s,onTouchStart:o,outerRef:m,divider:p},g){const{handleMouseEnter:h,handleMouseLeave:k,handleFocus:v}=(0,c.n)(m,s),f=(0,i.useCallback)((e=>{e.stopPropagation(),n(e)}),[n]),y=(0,i.useCallback)((e=>{e.stopPropagation()}),[]);return(0,u.jsx)(d._,{className:a.Z.menuItem,children:(0,u.jsx)(r.IZ,{className:l()(a.Z.menuItemButton,{[a.Z.disabled]:t,[a.Z.dividerBefore]:"before"===p,[a.Z.dividerAfter]:"after"===p}),onClick:f,onFocus:v,onMouseEnter:h,onMouseLeave:k,onTouchStart:o,onContextMenu:y,ref:g,role:"menuitem",children:e})})}));var p=n(16004),g=n(56162);const h=({displayText:e,depth:t=1,children:n,divider:o,placement:l="right-start",onOpenChange:d,onClick:c})=>{const[h,k]=(0,i.useState)(!1),v=(0,i.useRef)(null),f=(0,i.useCallback)((()=>{k((e=>!e))}),[]),y=(0,i.useRef)(d);return y.current=d,(0,i.useEffect)((()=>y.current?.(h)),[h]),(0,u.jsx)(s.ZP,{render:()=>(0,u.jsx)(r.so,{className:a.Z.menu,depth:t,children:n}),offset:[0,0],interactive:!0,visible:h,arrow:!1,animation:!1,placement:l,popperOptions:{modifiers:[{name:"preventOverflow",options:{boundary:document.body,altAxis:!0}},{name:"flip",options:{boundary:document.body}}]},children:(0,u.jsxs)(m,{divider:o,setIsOpen:k,onTouchStart:f,ref:v,outerRef:v,onClick:c,children:[(0,u.jsx)(g.D,{variant:"mesto",dir:"auto",className:"ellipsis-one-line",children:e}),(0,u.jsx)("span",{children:(0,u.jsx)(p.U,{className:a.Z.subMenuIcon,iconSize:16,"aria-hidden":"true"})})]})})}},59200:(e,t,n)=>{"use strict";n.d(t,{_P:()=>s._,xV:()=>i.x,yj:()=>a.y});var i=n(51559),a=n(69812),s=n(54299)},34643:(e,t,n)=>{"use strict";n.d(t,{t:()=>l,x:()=>o});var i=n(59496),a=n(31217);var s=n(98340);var r=n(4637);const o="context-menu",l=({menu:e,onClickOutside:t,children:n,trigger:l,offset:d,placement:c,isOpen:u,preventScrollingWhileOpen:m,triggerRef:p,position:g,onShow:h,onHide:k,appendTo:v})=>{const f=(0,i.useRef)(null),y=(0,i.useRef)(null);((e,t)=>{(0,i.useEffect)((()=>{const n=e=>{t.current&&!t.current.contains(e.target)&&e.preventDefault()};if(e){const e={passive:!1};window.addEventListener("mousewheel",n,e),window.addEventListener("touchmove",n,e)}return()=>{window.removeEventListener("mousewheel",n),window.removeEventListener("touchmove",n)}}),[e,t])})(u&&m,f);const{updateAfterFirstLayout:S,cancel:b}=((e,t)=>{const n=(0,i.useRef)(0),a=(0,i.useCallback)((()=>{cancelAnimationFrame(n.current)}),[]),s=(0,i.useCallback)((()=>{e.current&&0!==e.current?.getBoundingClientRect().width?(t.current?.popperInstance?.update(),cancelAnimationFrame(n.current)):n.current=requestAnimationFrame(s)}),[e,t]);return(0,i.useEffect)((()=>()=>{cancelAnimationFrame(n.current)}),[s]),{updateAfterFirstLayout:s,cancel:a}})(f,y),_=(0,i.useCallback)((e=>{b(),e.reference.removeAttribute("data-context-menu-open"),k()}),[b,k]);return(0,i.useEffect)((()=>{const e=y.current;if(!e||!e.reference||"click"===l)return()=>{};const t=e.reference,n=_.bind(void 0,e);return t.addEventListener("click",n),()=>{t.removeEventListener("click",n)}}),[f,y,_,l]),(0,r.jsxs)(r.Fragment,{children:[n,u&&(0,r.jsx)(a.ZP,{onCreate:e=>{y.current=e},onShow:e=>{S(),e.reference.setAttribute("data-context-menu-open","true"),h?.(e)},onHide:_,visible:u,render:t=>(0,r.jsx)(s.ZP,{value:"contextmenu",children:(0,r.jsx)("div",{ref:f,id:o,"data-placement":t["data-placement"],children:u?e:null})}),arrow:!0,popperOptions:{modifiers:[{name:"preventOverflow",options:{rootBoundary:"viewport",altAxis:!0,padding:10,tether:!1}},{name:"arrow",options:{padding:10}}]},placement:c,onClickOutside:()=>{t?.()},interactive:!0,offset:d,...v?{appendTo:v}:{},reference:p,getReferenceClientRect:"right-click"!==l&&p?null:()=>({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:()=>{}})})]})}},96848:(e,t,n)=>{"use strict";n.d(t,{Np:()=>o,du:()=>u,qT:()=>d});var i=n(59496),a=n(4637);const s={isOpen:!1,modifierKeyHeld:!1,isTouching:!1,menu:null,event:null,triggerElement:null},r=(0,i.createContext)(s);function o(){const e=i.useContext(r);if(void 0===e)throw new Error("useContextMenuState must be used within a ContextMenuProvider");return e}const l=(0,i.createContext)((()=>{}));function d(){const e=i.useContext(l);if(void 0===e)throw new Error("useContextMenuDispatch must be used within a ContextMenuProvider");return e}function c(e,t){switch(t.type){case"open":return{...e,menu:t.menu,isOpen:!0,event:t.event,triggerElement:t.triggerElement};case"toggle":return{...e,isOpen:!e.isOpen,menu:e.isOpen?null:t.menu,event:t.event,triggerElement:t.triggerElement};case"modifierKeyHeld":return{...e,modifierKeyHeld:t.value};case"touch":return{...e,isTouching:t.value};case"close":return{...s};default:throw new Error("Unknown action recieved!")}}const u=({children:e})=>{const[t,n]=(0,i.useReducer)(c,s);return(0,a.jsx)(l.Provider,{value:n,children:(0,a.jsx)(r.Provider,{value:t,children:e})})}},14583:(e,t,n)=>{"use strict";n.d(t,{i:()=>r,m:()=>o});var i=n(59496),a=n(34643),s=n(4637);const r=(0,i.createContext)({registerCloseCallback:()=>{},closeToDepth:()=>{},isOnPathToSubmenu:()=>!1}),o=({children:e})=>{const t=(0,i.useRef)([]),n=(0,i.useRef)(),o=(0,i.useCallback)(((e,i)=>{t.current.push(e),n.current=i}),[]),l=(0,i.useCallback)((e=>{for(n.current=void 0;t.current.length>e;){const e=t.current.pop();e&&e(!1)}}),[]);return(0,s.jsx)(r.Provider,{value:{registerCloseCallback:o,closeToDepth:l,isOnPathToSubmenu:e=>{const t=document.getElementById(a.x);if(!n.current||!t)return!1;const i=Array.from(t.querySelectorAll('[role="menu"]')).sort(((e,t)=>parseInt(e.getAttribute("data-depth")||"0",10)-parseInt(t.getAttribute("data-depth")||"0",10))).pop();if(!i)return!1;const s=i.getBoundingClientRect();let r=s.left;n.current.x>s.right&&(r=s.right);const o=n.current,l=r,d=s.top,c=r,u=s.bottom,m={x:l-o.x,y:d-o.y},p={x:c-o.x,y:u-o.y},g=(e,t)=>e.x*t.y-e.y*t.x,h=(g(e,p)-g(o,p))/g(m,p),k=-1*(g(e,m)-g(o,m))/g(m,p);return h>0&&k>0&&h+k<1}},children:e})}},76191:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});var i=n(59496),a=n(14583);const s=(e,t)=>{const n=(0,i.useRef)(0),{registerCloseCallback:s,closeToDepth:r,isOnPathToSubmenu:o}=(0,i.useContext)(a.i);(0,i.useEffect)((()=>()=>window.clearTimeout(n.current)),[]);const l=(0,i.useCallback)(((e,n)=>{r(e),t&&(s(t,n),t(!0))}),[r,s,t]);return{handleMouseEnter:(0,i.useCallback)((t=>{if(!e.current)return;const i=e.current.closest('[role="menu"]');if(i){const e={x:t.clientX,y:t.clientY},a=o(e),s=parseInt(i.getAttribute("data-depth")||"0",10);a?n.current=window.setTimeout((()=>{l(s,e)}),500):l(s,e)}}),[e,o,l]),handleMouseLeave:(0,i.useCallback)((()=>{window.clearTimeout(n.current),n.current=0}),[]),handleFocus:(0,i.useCallback)((()=>{if(!e.current)return;const t=e.current.closest('[role="menu"]');if(t){const e=parseInt(t.getAttribute("data-depth")||"0",10);l(e,{x:0,y:0})}}),[l,e])}}},59737:(e,t,n)=>{"use strict";function i(e){return"function"==typeof e}n.d(t,{x:()=>i})},87417:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var i=n(59496),a=n(96848);const s=({action:e,menu:t})=>{const n=(0,a.qT)();return(0,i.useCallback)(((i,a)=>{i.persist(),i.preventDefault(),n({type:e,event:i,triggerElement:i.currentTarget,menu:a||t})}),[t,n,e])}},81281:(e,t,n)=>{"use strict";n.d(t,{O:()=>_,K:()=>b});var i=n(59496),a=n(84875),s=n.n(a),r=n(42006),o=n(42531);const l="x-entityImage-xsmall",d="x-entityImage-small",c="x-entityImage-medium",u="x-entityImage-large",m="x-entityImage-square",p="x-entityImage-circle",g="x-entityImage-image",h="x-entityImage-imageContainer",k="x-entityImage-imagePlaceholder",v="x-entityImage-defaultSize";var f=n(4183),y=n(4637);const S=({title:e,type:t,className:n,iconSize:i})=>(0,y.jsx)("div",{"aria-label":e,className:s()(k,n),children:(0,y.jsx)(f.t,{type:t,className:s()({[v]:!i}),iconSize:i})});let b=function(e){return e[e.ROUNDED_CORNERS=0]="ROUNDED_CORNERS",e[e.CIRCLE=1]="CIRCLE",e[e.SQUARE=2]="SQUARE",e}({});const _=(0,i.memo)((function({loadingMode:e="lazy",fadeIn:t=!1,type:n,title:i,images:a=[],shape:k=b.SQUARE,size:v=o.m$.SIZE_56,iconSize:f,className:_,onContextMenu:N=(()=>{}),onTouchStart:E=(()=>{}),onTouchEnd:x=(()=>{}),color:C}){const w=function(e=[]){const t=e.filter((e=>Boolean(e.width))),n=t.filter((e=>e.url&&e.width&&e.width>=o.eM[o.m$.SIZE_56])).sort(((e,t)=>e.width-t.width));return n.length?n:t}(a),I=w[0]?.url??a[0]?.url??"",T=w.map((({url:e,width:t})=>`${e} ${t/2}w, ${e} ${t}w`)).join(", ");return(0,y.jsx)("div",{className:s()(h,_,{[p]:k===b.CIRCLE,[m]:k===b.SQUARE,[l]:o.pj.includes(v),[d]:o.wL.includes(v),[c]:o.VZ.includes(v),[u]:o.B_.includes(v)}),onContextMenu:N,onTouchStart:E,onTouchEnd:x,style:{width:`${o.eM[v]}px`,height:`${o.eM[v]}px`,"--extracted-entity-color":C},children:(0,y.jsx)(r.E,{loading:e,fadeIn:t,src:I,alt:i,ariaHidden:!0,className:s()(g),srcSet:T||void 0,testid:"entity-image",children:(0,y.jsx)(S,{title:i,type:n,iconSize:f})})})}))},42531:(e,t,n)=>{"use strict";n.d(t,{B_:()=>l,VZ:()=>o,eM:()=>a,m$:()=>i,pj:()=>s,wL:()=>r});let i=function(e){return e[e.SIZE_48=0]="SIZE_48",e[e.SIZE_56=1]="SIZE_56",e[e.SIZE_64=2]="SIZE_64",e[e.SIZE_72=3]="SIZE_72",e[e.SIZE_80=4]="SIZE_80",e[e.SIZE_96=5]="SIZE_96",e[e.SIZE_104=6]="SIZE_104",e[e.SIZE_112=7]="SIZE_112",e[e.SIZE_120=8]="SIZE_120",e[e.SIZE_128=9]="SIZE_128",e[e.SIZE_136=10]="SIZE_136",e[e.SIZE_144=11]="SIZE_144",e[e.SIZE_152=12]="SIZE_152",e[e.SIZE_160=13]="SIZE_160",e[e.SIZE_168=14]="SIZE_168",e[e.SIZE_176=15]="SIZE_176",e[e.SIZE_184=16]="SIZE_184",e[e.SIZE_200=17]="SIZE_200",e[e.SIZE_232=18]="SIZE_232",e}({});const a={[i.SIZE_48]:48,[i.SIZE_56]:56,[i.SIZE_64]:64,[i.SIZE_72]:72,[i.SIZE_80]:80,[i.SIZE_96]:96,[i.SIZE_104]:104,[i.SIZE_112]:112,[i.SIZE_120]:120,[i.SIZE_128]:128,[i.SIZE_136]:136,[i.SIZE_144]:144,[i.SIZE_152]:152,[i.SIZE_160]:160,[i.SIZE_168]:168,[i.SIZE_176]:176,[i.SIZE_184]:184,[i.SIZE_200]:200,[i.SIZE_232]:232},s=[i.SIZE_48,i.SIZE_56,i.SIZE_64],r=[i.SIZE_72,i.SIZE_80,i.SIZE_96,i.SIZE_104,i.SIZE_112,i.SIZE_120,i.SIZE_128],o=[i.SIZE_136,i.SIZE_144,i.SIZE_152,i.SIZE_160,i.SIZE_168,i.SIZE_176],l=[i.SIZE_184,i.SIZE_200,i.SIZE_232]},4183:(e,t,n)=>{"use strict";n.d(t,{t:()=>m});var i=n(47425),a=n(45509),s=n(56876),r=n(7142),o=n(74991),l=n(34058),d=n(31925),c=n(9374),u=n(4637);function m({type:e,...t}){let n=s.U;switch(e){case"folder":case c.p.FOLDER:n=i.P;break;case"album":case c.p.ALBUM:n=r.c;break;case"artist":case c.p.ARTIST:n=o.a;break;case"show":case"episode":case c.p.SHOW:case c.p.EPISODE:n=l.J;break;case"user":case c.p.USER:n=d.f;break;case"book":case"audiobook":case c.p.AUDIOBOOK:n=a.P;break;case"playlist":case c.p.PLAYLIST:default:n=s.U}return(0,u.jsx)(n,{"aria-hidden":"true","":e,...t})}},62517:(e,t,n)=>{"use strict";n.d(t,{T:()=>g});var i=n(59496),a=n(84875),s=n.n(a),r=n(92348),o=n(79371),l=n(16623);const d="main-gridContainer-gridContainer",c="main-gridContainer-uniformRowHeight",u="main-gridContainer-fixedWidth";var m=n(22345),p=n(4637);const g=(0,i.memo)((0,i.forwardRef)((function(e,t){const{onUpdate:n,className:a,fixedColumnCount:g=0,rowGap:h,render:k,onLayoutChange:v,testId:f="container",useUniformRowHeight:y=!1}=e,S=(0,i.useRef)(null),b=(0,r.u)(),{getWidth:_}=(0,l.o)();(0,i.useImperativeHandle)(t,(()=>S.current),[S]);const[N,E]=(0,i.useState)({columnCount:-1,columnWidth:-1,minContainerWidth:-1,gridGap:b.COLUMN_GRID_GAP});(0,i.useEffect)((()=>{v?.(N)}),[v,N]);const x=(0,i.useCallback)((e=>{const t=_();if(null===t)return;const{columnWidth:n,columnCount:i,gridGap:a,minContainerWidth:s}=(0,o.Nk)(e,t,b);E({columnCount:i,columnWidth:n,gridGap:a,minContainerWidth:s})}),[b,_]);(0,m.y)({refOrElement:S,observeOnly:"width",observeOnMount:!0,onResize:({width:e})=>{x(e)}}),(0,i.useEffect)((()=>{n&&n()}),[e,N,n]);const C=g>0,w=g||N.columnCount,I={"--column-width":`${N.columnWidth}px`,"--column-count":`${w}`,"--grid-gap":`${N.gridGap}px`,"--min-container-width":`${N.minContainerWidth}px`};return(0,p.jsx)("div",{"":`grid-${f}`,ref:S,className:s()(d,a,{[u]:C,[c]:y}),style:{...I,...h?{gridRowGap:h}:{}},children:k(N)})})))},92348:(e,t,n)=>{"use strict";n.d(t,{q:()=>l,u:()=>d});var i=n(59496),a=n(42495),s=n(33482),r=n(4637);const o=i.createContext((0,s.S)(a.jM.DEFAULT)),l=({children:e,config:t})=>(0,r.jsx)(o.Provider,{value:t,children:e}),d=()=>(0,i.useContext)(o)},33482:(e,t,n)=>{"use strict";n.d(t,{Q:()=>a,S:()=>r});var i=n(42495);let a=function(e){return e.NEW_CARDS="newCards",e}({});const s={[i.jM.DEFAULT]:{MINIMUM_COLUMN_WIDTH:180,TWO_COLUMNS_MAX_WIDTH:500,THREE_COLUMNS_MAX_WIDTH:700,FOUR_COLUMNS_MAX_WIDTH:850,MIN_COLUMNS_COUNT:2,COLUMN_GRID_GAP:24,COLUMN_GRID_GAP_MEDIUM:18,COLUMN_GRID_GAP_SMALL:12},[i.jM.MORE_CARDS]:{MINIMUM_COLUMN_WIDTH:.835*180,TWO_COLUMNS_MAX_WIDTH:417.5,THREE_COLUMNS_MAX_WIDTH:584.5,FOUR_COLUMNS_MAX_WIDTH:709.75,MIN_COLUMNS_COUNT:2,COLUMN_GRID_GAP:24,COLUMN_GRID_GAP_MEDIUM:18,COLUMN_GRID_GAP_SMALL:12},[i.jM.FEWER_CARDS]:{MINIMUM_COLUMN_WIDTH:1.165*180,TWO_COLUMNS_MAX_WIDTH:582.5,THREE_COLUMNS_MAX_WIDTH:815.5,FOUR_COLUMNS_MAX_WIDTH:990.25,MIN_COLUMNS_COUNT:2,COLUMN_GRID_GAP:24,COLUMN_GRID_GAP_MEDIUM:18,COLUMN_GRID_GAP_SMALL:12},[a.NEW_CARDS]:{MINIMUM_COLUMN_WIDTH:180,TWO_COLUMNS_MAX_WIDTH:500,THREE_COLUMNS_MAX_WIDTH:700,FOUR_COLUMNS_MAX_WIDTH:850,MIN_COLUMNS_COUNT:2,COLUMN_GRID_GAP:0,COLUMN_GRID_GAP_MEDIUM:0,COLUMN_GRID_GAP_SMALL:0}},r=e=>s[e]},16623:(e,t,n)=>{"use strict";n.d(t,{M:()=>o,o:()=>l});var i=n(59496),a=n(4637);const s=Symbol("unset"),r=i.createContext(s);function o({children:e,containerRef:t,postProcessWidth:n=(e=>e)}){const s=(0,i.useCallback)((()=>t?.current?n(t.current?.offsetWidth):null),[t,n]),o=(0,i.useMemo)((()=>({getWidth:s,containerRef:t})),[s,t]);return(0,a.jsx)(r.Provider,{value:o,children:e})}const l=()=>{const e=(0,i.useContext)(r);if(e===s)throw new Error("useGridContainerWidth must be used within a GridContainerWidthProvider");return e}},79371:(e,t,n)=>{"use strict";n.d(t,{Nk:()=>s,nf:()=>a});const i=(e,t)=>{const n=((e,t)=>e2===e?t.COLUMN_GRID_GAP_SMALL:3===e?t.COLUMN_GRID_GAP_MEDIUM:t.COLUMN_GRID_GAP)(n,t);return{columnCountMainGrid:n,gapMainGrid:i,columnWidthMainGrid:Math.floor((e-(n-1)*i)/n)}},a=(e,t,n)=>{const{gapMainGrid:a,columnWidthMainGrid:s}=i(e,n);return(s+a)*t-a},s=(e,t,n)=>{const{gapMainGrid:a,columnWidthMainGrid:s}=i(t,n);return{columnWidth:s,gridGap:a,columnCount:Math.round((e+a)/(s+a)),minContainerWidth:(s+a)*n.MIN_COLUMNS_COUNT-a}}},56952:(e,t,n)=>{"use strict";n.d(t,{N:()=>p,k:()=>g});var i=n(59496),a=n(24358);const s=[[/]*>/gi,""],[/<\/iframe>/gi,""],[/]*>/gi,""],[/<\/script>/gi,""],[/srcdoc=/gi,"data-invalid="],[/onerror=/gi,"data-invalid="],[/onload=/gi,"data-invalid="],[/]*>/gi,""],[/<\/form>/gi,""],[/]*>/gi,""],[/<\/input>/gi,""],[/]*>/gi,""],[/<\/link>/gi,""]];function r(e){return["http://","https://","#","/","www","spotify:"].some((t=>e.startsWith(t)))?e:""}var o=n(66721),l=n(66432);const d={icon:"N6RtDuJXe5BkIyhxU13g"};var c=n(56162),u=n(4637);function m(e,t){return e.tagName===t}const p=i.memo((function({source:e="",LinkComponent:t,onTimeStampClick:n,onLinkClick:c}){const p=(0,i.useMemo)((()=>function(e){const{LinkComponent:t,onTimeStampClick:n,onLinkClick:i}=e,s={replace:e=>{if(m(e,"a")&&t)try{return(0,u.jsx)(t,{to:r(e.attribs.href),onClick:i,children:(0,a.du)(e.children)})}catch(e){return null}else{if(m(e,"img")){const{src:t,alt:n,width:i,height:a}=e.attribs;return(0,u.jsx)(o.Ee,{src:t,alt:n,loading:"eager",width:i,height:a,className:d.icon})}if(m(e,"time")&&n)return(0,u.jsx)(l.E,{onClick:n,children:(0,a.du)(e.children)})}return e}};return s}({LinkComponent:t,onTimeStampClick:n,onLinkClick:c})),[t,n,c]),g=(0,i.useMemo)((()=>{return(0,a.ZP)((t=e,s.reduce(((e,t)=>{const[n,i]=t;return e.replace(n,i)}),t)),p);var t}),[e,p]);return(0,u.jsx)(u.Fragment,{children:g})})),g=i.memo((function({source:e="",paragraphClassName:t,variant:n="ballad",LinkComponent:a,onLinkClick:s,onTimeStampClick:r,splitter:o=/\n\n/g}){const l=(0,i.useMemo)((()=>e.split(o).map(((e,i)=>(0,u.jsx)(c.D,{as:"p",className:t,variant:n,children:(0,u.jsx)(p,{source:e,LinkComponent:a,onTimeStampClick:r,onLinkClick:s})},i)))),[e,n,o,t,a,r,s]);return(0,u.jsx)(u.Fragment,{children:l})}))},45265:(e,t,n)=>{"use strict";n.d(t,{P:()=>s,w:()=>r});var i=n(64320),a=n(4637);const s="hover-or-focus-tooltip",r=({label:e,children:t,renderInline:n,showDelay:r,disabled:o,placement:l="top",labelClassName:d})=>(0,a.jsx)(i.Nt,{action:"open",trigger:"hover-or-focus",placement:l,content:o?null:(0,a.jsx)(i.xX,{showDelay:r,className:d,children:(0,a.jsx)("span",{id:s,role:"tooltip",children:e})}),renderInline:n,children:t})},20195:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(3802),a=n(91143),s=n(4637);const r=({size:e=32})=>(0,s.jsx)(a.g,{iconSize:e,title:i.ag.get("download.available-offline"),semanticColor:"textBrightAccent"})},4882:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var i=n(3802),a=n(49513),s=n(4637);const r=({className:e,fullText:t=!1})=>(0,s.jsx)(a.V,{ariaLabel:i.ag.get("card.a11y.explicit"),text:t?i.ag.get("card.a11y.explicit"):"E",className:e})},51783:(e,t,n)=>{"use strict";n.d(t,{h:()=>r});var i=n(94285),a=n(3802),s=n(4637);function r(e){return(0,s.jsx)(i.T,{"aria-label":a.ag.get("a11y.externalLink"),...e})}},90303:(e,t,n)=>{"use strict";n.d(t,{X:()=>s});var i=n(3802),a=n(4637);const s=({size:e=32,className:t})=>(0,a.jsxs)("svg",{role:"img",width:e,height:e,viewBox:"0 0 12 12",className:t,"aria-label":i.ag.get("age.restriction.nineeteen-badge"),children:[(0,a.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,a.jsx)("g",{transform:"scale(0.85) translate(1.1,1.1)",children:(0,a.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"})})]})},42006:(e,t,n)=>{"use strict";n.d(t,{E:()=>p});var i=n(59496),a=n(84875),s=n.n(a);const r="main-image-image",o="main-image-loading",l="main-image-loaded";var d=n(23521),c=n(4637);function u(e){if(null!==e)return e}const m=({children:e,loading:t})=>"lazy"!==t||"undefined"==typeof HTMLImageElement||"loading"in HTMLImageElement.prototype?(0,c.jsx)(c.Fragment,{children:e}):(0,c.jsx)(d.Z,{children:e}),p=(0,i.memo)((function(e){const{ariaHidden:t=!1,testid:n,src:a,alt:d="",radius:p=0,className:g="",srcSet:h,draggable:k=!1,sizes:v,children:f,loading:y,width:S,height:b,fadeIn:_=!1}=e,[N,E]=(0,i.useState)("loading"),x=(0,i.useRef)(null),[C,w]=(0,i.useState)(_);return(0,i.useLayoutEffect)((()=>{_&&x.current?.complete&&w(!1)}),[_]),a&&"error"!==N?(0,c.jsx)(m,{loading:y,children:(0,c.jsx)("img",{"aria-hidden":t,draggable:k,loading:y,src:a,"":n,alt:d,className:s()(r,g,{[o]:C,[l]:"loaded"===N}),style:{borderRadius:p||void 0},srcSet:h,sizes:v,width:u(S),height:u(b),onLoad:()=>E("loaded"),onError:()=>E("error"),ref:x})}):(0,c.jsx)(c.Fragment,{children:f})}))},66721:(e,t,n)=>{"use strict";n.d(t,{Ee:()=>i.E,KO:()=>s,VO:()=>r});var i=n(42006),a=n(59496);let s=function(e){return e[e.loading=0]="loading",e[e.loaded=1]="loaded",e[e.error=2]="error",e}({});function r(e,t){const n=e?s.loading:s.error,[i,r]=(0,a.useState)(n);return(0,a.useEffect)((()=>{const n=()=>{r(s.loaded)},i=()=>{r(s.error)};if(!e)return r(s.error),()=>{};r(s.loading);const a=document.createElement("img");return a.addEventListener("load",n),a.addEventListener("error",i),a.setAttribute("src",e),t&&a.setAttribute("srcSet",t),()=>{a.removeEventListener("load",n),a.removeEventListener("error",i)}}),[e,t]),i}},33971:(e,t,n)=>{"use strict";n.d(t,{C:()=>c});var i=n(59496),a=n(91929),s=n(84875),r=n.n(s);const o="eqw9lvuoZHrkWMTdyTpY",l="lb08f71wES9AQnKx6e0R";var d=n(4637);const c=i.memo((function(e){const{triggerOnInitialLoad:t=!1,onReachBottom:n,showScrollbar:s=!0,horizontalScroll:c=!1,className:u}=e,{ref:m,inView:p}=(0,a.YD)({initialInView:t});return(0,i.useEffect)((()=>{p&&n&&n()}),[p,n]),(0,d.jsxs)("div",{className:r()({[l]:!s,[o]:c},u),"":"infinite-scroll-list",children:[e.children,(0,d.jsx)("div",{ref:m})]})}))},98340:(e,t,n)=>{"use strict";n.d(t,{JL:()=>o,ZP:()=>l});var i=n(21524),a=n(4637);const s=i.H8.Provider,r=i.H8.Consumer,o=({value:e,index:t,children:n})=>(0,a.jsx)(r,{children:i=>{let r=""===i?e:`${i}/${e}`;return"number"==typeof t&&(r=`${r}/${t}`),(0,a.jsx)(s,{value:r,children:n})}}),l=o},23521:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(59496),a=n(91929);const s="VvxVxrxVVFjUD6BNsUub";var r=n(4637);const o=(0,i.memo)((function(e){const{children:t}=e,[n,o]=(0,i.useState)(!1),{ref:l,inView:d}=(0,a.YD)({triggerOnce:!0});return(0,i.useEffect)((()=>{d&&o(!0)}),[d]),(0,r.jsx)("div",{className:n?void 0:s,ref:l,children:n?t:null})}))},40780:(e,t,n)=>{"use strict";n.d(t,{Fg:()=>k,Rd:()=>h,G3:()=>g});var i=n(50346),a=n(59496),s=n(84875),r=n.n(s);const o="Ng3dPPA2_1CFYkzPukjM",l="FCFjIabSYtm65p8kSJO0";var d=n(3802),c=n(45265),u=n(4637);const m=6048e5,p=3e5;function g(e,t,n,a=!1){const s=(0,i.hn)(e),r=function(e){const t=new Date;return!!e&&Math.floor(t.getTime()-Date.parse(e))p}(a,n);return s&&r&&!o}const h=a.memo((function({className:e,label:t}){const n=t||d.ag.get("type.newEpisode");return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.w,{label:n,children:(0,u.jsx)("span",{className:r()(o,e),"aria-label":n})}),t]})})),k=a.memo((function({isMusicAndTalk:e,className:t}){const n=e?d.ag.get("type.newEpisode"):d.ag.get("type.newPodcastEpisode");return(0,u.jsx)(h,{label:n,className:r()(l,t)})}))},49513:(e,t,n)=>{"use strict";n.d(t,{V:()=>o});const i="main-tag-container";var a=n(84875),s=n.n(a),r=n(4637);const o=({text:e,ariaLabel:t=e,title:n=t,className:a})=>(0,r.jsx)("span",{"aria-label":t,className:s()(i,a),title:n,children:e})},66432:(e,t,n)=>{"use strict";n.d(t,{E:()=>l});var i=n(59496);const a="NkWIcfgnWR9AXfikmWai",s="OvmkrxKmI82x4jlgEZG0";var r=n(56162),o=n(4637);const l=i.memo((function({onClick:e,children:t}){return(0,o.jsx)("button",{"":"clickable-timestamp",className:s,onClick:()=>{const n=d(t),i=1e3*n.split(":").reverse().reduce(((e,t,n)=>e+parseInt(t,10)*Math.pow(60,n)),0);e(i)},children:(0,o.jsx)(r.D,{className:a,variant:"ballad",children:t})})}));function d(e){let t="";return i.Children.map(e,(e=>{"string"==typeof e||"number"==typeof e?t+=e:i.isValidElement(e)&&e.props.children&&(t+=d(e.props.children))})),t}},64320:(e,t,n)=>{"use strict";n.d(t,{yv:()=>u,xX:()=>f,Nt:()=>S});var i=n(59496),a=n(84875),s=n.n(a),r=n(34414),o=n(32509);const l="aCtCKL9BxAoHeVZS0uRs",d="QavgDs_52SpJ2rw0LNYz";var c=n(4637);const u=({children:e,className:t,arrowClassName:n,disableAutoFocus:a})=>{const u=(0,i.useRef)(null);return(0,o.H)(),(0,r.K)({ref:a?{current:null}:u,preventScroll:!0}),(0,c.jsxs)("div",{...a&&{tabIndex:-1},ref:u,onClick:e=>{e.stopPropagation()},onContextMenu:e=>{e.stopPropagation()},className:s()(l,t),children:[e,(0,c.jsx)("div",{"data-popper-arrow":"",className:s()(d,n)})]})},m="main-contextMenu-tippy",p="main-contextMenu-tippyEnter",g="main-contextMenu-tippyEnterActive";var h=n(49823),k=n(96848),v=n(95019);const f=({children:e,className:t,showDelay:n=1600})=>{const[a,r]=i.useState(!1),o=(0,k.qT)(),l=(0,v.ky)(),d=(0,i.useRef)(!0);return(0,i.useEffect)((()=>(d.current=!0,()=>{d.current=!1}))),(0,i.useEffect)((()=>{const e=setTimeout((()=>{d.current&&(r(!0),l?.addEventListener("click",t,{once:!0}))}),n);function t(){d.current&&(r(!1),o({type:"close"}),clearTimeout(e))}return()=>{l?.removeEventListener("click",t),clearTimeout(e)}}),[l,n,o]),(0,c.jsx)(h.Z,{in:a,timeout:200,unmountOnExit:!0,classNames:{enter:p,enterActive:g},children:(0,c.jsx)("div",{className:s()(m,t),children:e})})};var y=n(51559);const S=({children:e,content:t,...n})=>(0,c.jsx)(y.x,{renderInline:!0,preventScrollingWhileOpen:!1,placement:"top-start",menu:t,...n,children:e})},98040:(e,t,n)=>{"use strict";n.d(t,{u:()=>l});var i=n(59496),a=n(62517),s=n(4637);const r=({span:e,onInView:t,marginBottom:n,marginTop:a})=>{const r=(0,i.useRef)(null);return(0,i.useEffect)((()=>{if(!window.IntersectionObserver)return()=>{};const e=new window.IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&t()}))}));return r.current&&e.observe(r.current),()=>{e.disconnect()}}),[t]),e<=0?null:(0,s.jsx)("div",{style:{gridColumn:"1/-1",gridRow:`span ${e}`,marginBottom:n,marginTop:a},ref:r,"data-type":"sentinel"},"topSentinel")};var o=n(92348);const l=({renderItems:e,nrItems:t,estimatedItemMaxHeight:n,scrollNodeRef:l,nrRowsOverscan:d=5,initalNrRows:c=5,onGridResize:u})=>{const[m,p]=(0,i.useState)({firstRowToRender:0,nrRows:c+d}),g=(0,i.useRef)(0),h=(0,i.useRef)(null),k=(0,i.useRef)(n),v=(0,o.u)(),f=(0,i.useCallback)((()=>{const e=h.current?.querySelector(':scope > *:not([data-type="sentinel"])');k.current=e?e.getBoundingClientRect().height+v.COLUMN_GRID_GAP:k.current}),[v]),y=(0,i.useCallback)((()=>{const e=l.current;if(!e)return;f();const t=Math.floor((e.scrollTop-g.current)/k.current),n=Math.max(t-d,0),i=Math.ceil(e.offsetHeight/k.current)+2*d;n===m.firstRowToRender&&i===m.nrRows||p({firstRowToRender:n,nrRows:i})}),[d,m,l,f]),S=(0,i.useCallback)((({columnCount:n})=>{if(n<=0)return[null];u&&u(n,k.current);const i=Math.ceil(t/n),a=m.firstRowToRender*n,o=m.firstRowToRender+m.nrRows-1,l=Math.min(t-1,(o+1)*n-1),c=k.current*(d-2);return[(0,s.jsx)(r,{span:m.firstRowToRender,onInView:y,marginBottom:`-${c}px`},`topSentinel-${m.firstRowToRender}`),e(a,l,n),(0,s.jsx)(r,{span:i-o,onInView:y,marginTop:`-${c}px`},"bottomSentinel-"+(i-o))]}),[t,d,u,y,e,m]);return(0,i.useEffect)((()=>{const e=h.current,t=l.current;e&&t&&(g.current=e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)}),[l]),(0,s.jsx)(a.T,{useUniformRowHeight:!0,ref:h,render:S,onLayoutChange:f})}},69040:(e,t,n)=>{"use strict";n.d(t,{V:()=>m});var i=n(59496),a=n(22345);const s="main-rootlist-wrapper",r="main-rootlist-topSentinel",o="main-rootlist-bottomSentinel";var l=n(44358),d=n(4637);const c=(e,t)=>(0,d.jsx)("div",{style:{height:e}},t),u=()=>"undefined"!=typeof window&&"requestIdleCallback"in window,m=({renderRows:e,nrRows:t,rowHeight:n,scrollNodeRef:m,nrRowsOverscan:p=10,renderPlaceholder:g=c})=>{const h=(0,l.t)(),k=(0,i.useRef)(null),v=(0,i.useRef)(null),f=(0,i.useRef)(null),y=(0,i.useRef)(0),[S,b]=(0,i.useState)(u()?0:p),[_,N]=(0,i.useState)(null),[E,x]=(0,i.useState)(0),C=(0,i.useCallback)((()=>{const e=m.current;if(!e)return;const t=Math.ceil(e.offsetHeight/n)+2;x(t)}),[m,n]),w=(0,i.useCallback)((()=>{const e=m.current;if(!e)return;const t=Math.floor((e.scrollTop-y.current-1)/n);N(t)}),[n,m]);(0,i.useEffect)((()=>{u()&&window.requestIdleCallback((()=>{h()&&b(p)}))}),[h,p]),(0,i.useEffect)((()=>{const e=f.current,t=m.current;e&&t&&(y.current=e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)}),[m,f.current?.offsetTop]),(0,i.useEffect)((()=>{if(!window.IntersectionObserver)return()=>{};const e=new window.IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&w()}))}));return k.current&&e.observe(k.current),v.current&&e.observe(v.current),()=>{e.disconnect()}}),[w,_,E,t]),(0,i.useEffect)((()=>{C(),w()}),[C,w]),(0,a.y)({refOrElement:m,observeOnly:"height",onResize:C});const I=(_??0)-S,T=Math.min(null!==_?I+2*S+E-1:-1,t-1),A=Math.max(I,0),P=Math.max(T,-1),O=Math.min(E>0?t*n:0,Math.max(n*(S-2),0)),D=n*A,R=n*t,L=R-n*Math.max(t-(P+1),0);return(0,d.jsxs)("div",{ref:f,className:s,style:{height:`${R}px`,"--row-height":`${n}px`},role:"presentation",children:[(0,d.jsxs)("div",{ref:k,"":"top-sentinel",className:r,style:{height:`${D+O}px`},role:"presentation",children:[g(`calc(100% - ${O}px)`,"top-sentinel"),(0,d.jsx)("div",{style:{height:`${O}px`},role:"presentation"})]}),(0,d.jsx)("div",{style:{transform:`translateY(${D}px)`},role:"presentation",children:e(A,P)}),(0,d.jsxs)("div",{ref:v,"":"bottom-sentinel",className:o,style:{height:`calc(100% - ${L}px + ${O}px)`},role:"presentation",children:[(0,d.jsx)("div",{style:{height:`${O}px`},role:"presentation"}),g(`calc(100% - ${O}px)`,"bottom-sentinel")]})]})}},40115:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o});var i=n(59496);const a=(e,t=0,n={items:[],invalid:!0,id:0})=>({fetchedId:e.fetchedId,items:Array.from({length:e.totalLength}).map(((i,a)=>{const s=n.invalid?void 0:n.items[a]?.value;return{value:a-t in e.items?e.items[a-t]:s,index:a}})),invalid:!1,id:n.id}),s=e=>e.filter((e=>null!==e.value)),r=e=>{e.invalid=!0,e.id++};function o({initialItems:e,nrItems:t,fetch:n,limit:o=0,cacheAllOnInvalidation:l=!1,cacheAllLimit:d=t}){const c=(0,i.useRef)(!1),u=(0,i.useRef)(a({totalLength:t,items:e??[]})),m=(0,i.useRef)(!0),[,p]=(0,i.useState)(0);(0,i.useMemo)((()=>{m.current||r(u.current)}),[n,t]),(0,i.useMemo)((()=>{0===e?.length||m.current||r(u.current)}),[e]);const g=(0,i.useCallback)((async(i,s=o,r=!0,l=!1)=>{if(c.current&&!l&&!u.current.invalid)return;const d=u.current.id;if(n){const e=u.current.invalid;u.current.invalid=!1,c.current=!0;const t=await n(i,s);if(c.current=!1,d!==u.current.id)return;if(0===t.items.length&&0!==t.totalLength&&t.totalLength===u.current.items.length)return;u.current=a(t,i,{...u.current,invalid:e}),t.onCacheSuccess?.(),r&&p((e=>e+1))}else u.current=a({totalLength:t,items:e??[]}),r&&setTimeout((()=>p((e=>e+1))),0)}),[n,e,o,t]),h=(0,i.useCallback)(((e,t,n)=>{const i=s(u.current.items).slice(e,t+1),a=i.filter((e=>u.current.invalid||void 0===e.value)),r=a.at(0)?.index??(u.current.invalid?e:void 0),l=a.at(-1)?.index??(u.current.invalid?t:void 0);return void 0===r||void 0===l||n?.cachedOnly||g(l===t?r:r===e?Math.max(l-o+1,0):r),i.map((e=>e.value))}),[g,o]),k=(0,i.useRef)(!1),v=(0,i.useRef)(!1),f=(0,i.useCallback)((async(e=!1)=>{v.current||(k.current?v.current=!0:(k.current=!0,await g(0,d,e,!0),v.current&&await g(0,d,e,!0),v.current=!1,k.current=!1))}),[d,g]);(0,i.useEffect)((()=>{let e;return l&&(e=setTimeout(f,1e3)),()=>{clearTimeout(e)}}),[f,l]);const y=(0,i.useCallback)((()=>{l?f(!0):(r(u.current),p((e=>e+1)))}),[f,l]);return m.current=!1,{fetchedId:u.current.fetchedId,getItems:h,invalidateCache:y,hasItems:s(u.current.items).some((e=>!!e.value)),nrValidItems:s(u.current.items).length,cacheAll:f}}},42750:(e,t,n)=>{"use strict";n.d(t,{_:()=>r});var i=n(59496),a=n(92199),s=n(4637);const r=({children:e,...t})=>{const n=(0,i.useRef)(null);return(0,a.O)(n),(0,s.jsx)("li",{ref:n,role:"presentation",...t,children:e})}},75563:(e,t,n)=>{"use strict";n.d(t,{I_:()=>g,IZ:()=>v,_w:()=>h._,so:()=>s});var i=n(59496),a=n(4637);const s=i.forwardRef((function({children:e,depth:t=0,...n},i){return(0,a.jsx)("ul",{tabIndex:-1,ref:i,role:"menu","data-depth":t,...n,children:e})}));var r=n(74488),o=n(34414),l=n(21840);const d='a[href], button, input[role="searchbox"]';function c(e,t){if(!e)return void console.error("No menu element found. Canceling moving focus");if(!(0,l.lK)(e))return;const n=e.querySelector('[tabindex="0"]');t===r.N.UP&&(0,l.Bu)(n,m(e,n,r.N.UP)),t===r.N.DOWN&&(0,l.Bu)(n,m(e,n,r.N.DOWN)),t===r.N.RIGHT&&(0,l.Bu)(n,u(n)),t===r.N.LEFT&&(0,l.Bu)(n,function(e){const t=!!e.closest('ul[role="menu"] ul[role="menu"]');if(!t)return null;const n=e.closest('ul[role="menu"]').closest('li[role="presentation"]').querySelector('[role="menuitem"]');return n}(n))}function u(e){if(!e?.hasAttribute("aria-expanded"))return null;const t=e.closest('li[role="presentation"]').querySelector('ul[role="menu"]'),n=t?.querySelector(d);return n??null}function m(e,t,n){const i=t.closest('ul[role="menu"]'),a=t.closest('li[role="presentation"]');if(!i||!a)return t;let s=t;if(n===r.N.UP){const t=i.querySelectorAll(':scope > li[role="presentation"]');let n=a.previousElementSibling;for(document.activeElement===e&&(n=t[t.length-1]);n!==a&&(n||(n=t[t.length-1]),s=n.querySelector(d),!s);)n=n.previousElementSibling}else{let t=a.nextElementSibling;for(document.activeElement===e&&(t=i.querySelector("li"));t!==a&&(t||(t=i.querySelector("li")),s=t.querySelector(d),!s);)t=t.nextElementSibling;s=t.querySelector(d)}return s||t}var p=n(32509);const g=({getInitialFocusElement:e,onKeyDown:t,onClose:n,...d})=>{const m=(0,i.useRef)(null);(0,p.H)(),(0,o.K)({ref:m,getFocusElement:e,onFocus:e=>{(0,l.Bu)(null,e,{preventScroll:!0})}});const g=(0,i.useCallback)((e=>{var i;m.current?.contains(e.target)&&("ArrowUp"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),e.stopPropagation()),"Escape"!==e.key&&"Tab"!==e.key||n?.(),"ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||document.documentElement.classList.remove("no-focus-outline"),"ArrowUp"===e.key&&c(m.current,r.N.UP),"ArrowDown"===e.key&&c(m.current,r.N.DOWN),"ArrowLeft"===e.key&&c(m.current,r.N.LEFT),"ArrowRight"===e.key&&c(m.current,r.N.RIGHT),"Enter"===e.key&&(i=m.current)&&u(i.querySelector('[tabindex="0"]'))&&(e.preventDefault(),c(m.current,r.N.RIGHT)),t?.(e))}),[t,n]);return(0,a.jsx)(s,{ref:m,onKeyDown:g,...d})};var h=n(42750),k=n(33103);const v=(0,i.forwardRef)(((e,t)=>{const n=e.as,{testid:i,...s}=e;return n?(0,a.jsx)(n,{ref:t,...s}):s.href?(0,a.jsx)("a",{ref:t,"":i,...s}):s.to?(0,a.jsx)(k.OL,{ref:t,...s}):(0,a.jsx)("button",{"":i,ref:t,...e})}))},61278:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var i=n(1608),a=n.n(i),s=n(4637);const r=e=>(0,s.jsx)(a(),{...e})},74488:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});let i=function(e){return e.UP="up",e.DOWN="down",e.LEFT="left",e.RIGHT="right",e}({})},34414:(e,t,n)=>{"use strict";n.d(t,{K:()=>a});var i=n(59496);const a=({ref:e,getFocusElement:t,onFocus:n,preventScroll:a,deps:s=[]})=>{const r=(0,i.useRef)(t),o=(0,i.useRef)(n);r.current=t,o.current=n;const l=(0,i.useRef)(null);(0,i.useEffect)((()=>{l.current=document.activeElement;const t=r.current?.(e.current)??e.current;n?o.current?.(t):t?.focus({preventScroll:a})}),s)}},92199:(e,t,n)=>{"use strict";n.d(t,{O:()=>a});var i=n(59496);const a=e=>{(0,i.useEffect)((()=>{if(!e.current)return;Array.from(e.current.querySelectorAll('a:not([tabindex="0"]), button:not([tabindex="0"])')).forEach((e=>e.setAttribute("tabindex","-1")))}))}},32509:(e,t,n)=>{"use strict";n.d(t,{H:()=>a});var i=n(59496);const a=({onRestoreFocus:e,deps:t=[]}={})=>{const n=(0,i.useRef)(null);(0,i.useRef)(e).current=e,(0,i.useEffect)((()=>(n.current=document.activeElement,()=>{e?e?.(n.current):n.current?.focus({preventScroll:!0})})),t)}},21840:(e,t,n)=>{"use strict";function i(e){const t=e.querySelector("a[href], button"),n=e.querySelector('[tabindex="0"]')||t;return!!n&&(n.setAttribute("tabindex","0"),!0)}function a(e,t,{preventScroll:n}={preventScroll:!1}){t&&(e&&(e.tabIndex=-1),t.tabIndex=0,t.focus({preventScroll:n}))}function s(e){return!!e&&!!e.querySelector("a[href], button")}n.d(t,{Bu:()=>a,KX:()=>s,lK:()=>i})},66777:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var i=n(94041),a=n(4637);const s=({color:e=i.Snx,height:t="30",className:n})=>(0,a.jsxs)("svg",{className:n,width:"114",role:"img",height:t,viewBox:"0 0 114 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("title",{id:"spotify-premium-logo-icon",children:"Spotify logo"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.7835 10.7851C37.7835 10.6921 37.86 10.6156 37.9545 10.6156L40.1039 10.6246C41.8485 10.6246 42.849 11.4421 42.849 12.9076C42.849 14.2486 41.745 15.1501 40.1039 15.1501L37.9545 15.1411C37.86 15.1411 37.7835 15.0646 37.7835 14.9701V10.7851ZM40.296 8.11502L35.232 8.10602C35.1375 8.10602 35.061 8.18252 35.061 8.27552V21.8085C35.061 21.903 35.1375 21.9795 35.232 21.9795H37.614C37.707 21.9795 37.7835 21.903 37.7835 21.8085V17.631L40.026 17.64C43.4175 17.64 45.6105 15.759 45.6105 12.81C45.6105 9.95852 43.524 8.11502 40.296 8.11502Z",fill:e}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M58.4025 13.4759C59.9115 13.4759 60.6195 14.6519 60.7964 15.8174H55.956C56.217 14.3879 57.1605 13.4759 58.4025 13.4759ZM58.4218 11.217C55.4805 11.217 53.262 13.5765 53.262 16.704V16.743C53.262 19.911 55.5375 22.2105 58.6725 22.2105C60.264 22.2105 61.599 21.6705 62.6473 20.604C62.718 20.5305 62.8723 20.355 62.9775 20.2335C63.039 20.163 63.0315 20.058 62.961 19.995L61.5795 18.7695C61.5165 18.714 61.4235 18.714 61.362 18.7695C61.212 18.9075 60.957 19.14 60.93 19.161C60.24 19.7115 59.553 19.953 58.7115 19.953C57.2985 19.953 56.268 19.098 55.98 17.7075H63.4305L63.4485 17.4975C63.4663 17.28 63.4831 17.079 63.4831 16.878C63.4831 14.061 61.9185 11.217 58.4218 11.217Z",fill:e}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M76.7895 11.217C75.414 11.217 74.289 11.76 73.3575 12.876C72.7245 11.8035 71.6474 11.217 70.296 11.217C68.8529 11.217 67.968 11.9145 67.356 12.645V11.5995C67.356 11.5065 67.2795 11.43 67.1865 11.43H64.8435C64.749 11.43 64.6724 11.5065 64.6724 11.5995V21.8085C64.6724 21.903 64.749 21.9795 64.8435 21.9795H67.1865C67.2795 21.9795 67.356 21.903 67.356 21.8085V16.0665C67.356 14.622 68.1465 13.6875 69.3675 13.6875C70.5719 13.6875 71.2635 14.5275 71.2635 15.99V21.8085C71.2635 21.903 71.34 21.9795 71.433 21.9795H73.776C73.8705 21.9795 73.9469 21.903 73.9469 21.8085V16.047C73.9469 14.5695 74.6985 13.6875 75.9585 13.6875C77.5245 13.6875 77.8529 14.9505 77.8529 16.0095V21.8085C77.8529 21.903 77.9295 21.9795 78.024 21.9795H80.367C80.4615 21.9795 80.5365 21.903 80.5365 21.8085V15.294C80.5365 12.741 79.1355 11.217 76.7895 11.217Z",fill:e}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M93.0376 17.361C93.0376 18.795 92.2021 19.7205 90.9106 19.7205C89.6131 19.7205 88.8991 18.897 88.8991 17.4V11.5995C88.8991 11.5065 88.8226 11.43 88.7279 11.43H86.3849C86.2921 11.43 86.2156 11.5065 86.2156 11.5995V18.096C86.2156 20.622 87.6736 22.191 90.0211 22.191C91.2421 22.191 92.2321 21.7155 93.0376 20.7405V21.8085C93.0376 21.903 93.1141 21.9795 93.2071 21.9795H95.5501C95.6446 21.9795 95.7211 21.903 95.7211 21.8085V11.5995C95.7211 11.5065 95.6446 11.43 95.5501 11.43H93.2071C93.1141 11.43 93.0376 11.5065 93.0376 11.5995V17.361Z",fill:e}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M109.308 11.217C107.934 11.217 106.808 11.76 105.876 12.876C105.243 11.8035 104.166 11.217 102.815 11.217C101.373 11.217 100.487 11.9145 99.876 12.6435V11.5995C99.876 11.5065 99.7995 11.43 99.705 11.43H97.362C97.269 11.43 97.1925 11.5065 97.1925 11.5995V21.8085C97.1925 21.903 97.269 21.9795 97.362 21.9795H99.705C99.7995 21.9795 99.876 21.903 99.876 21.8085V16.0665C99.876 14.622 100.665 13.6875 101.888 13.6875C103.092 13.6875 103.782 14.5275 103.782 15.99V21.8085C103.782 21.903 103.859 21.9795 103.953 21.9795H106.296C106.389 21.9795 106.466 21.903 106.466 21.8085V16.047C106.466 14.5695 107.217 13.6875 108.477 13.6875C110.045 13.6875 110.373 14.9505 110.373 16.0095V21.8085C110.373 21.903 110.45 21.9795 110.543 21.9795H112.886C112.98 21.9795 113.057 21.903 113.057 21.8085V15.294C113.057 12.741 111.656 11.217 109.308 11.217Z",fill:e}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M52.7354 11.232H52.4204C51.0464 11.2425 49.9229 11.919 49.1909 13.167V11.5995C49.1909 11.5065 49.1144 11.43 49.0199 11.43H46.6769C46.5824 11.43 46.5074 11.5065 46.5074 11.5995V21.8085C46.5074 21.903 46.5824 21.9795 46.6769 21.9795H49.0199C49.1144 21.9795 49.1909 21.903 49.1909 21.8085V17.922C49.1909 15.5085 50.3533 14.106 52.3859 14.0565L52.3889 14.055H52.7354C52.8119 14.055 52.8734 13.9935 52.8734 13.9155V11.3715C52.8734 11.295 52.8119 11.232 52.7354 11.232Z",fill:e}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M84.5339 11.4975H82.2195C82.1265 11.4975 82.05 11.574 82.05 11.667V21.768C82.05 21.8625 82.1265 21.9375 82.2195 21.9375H84.5339C84.6285 21.9375 84.7035 21.8625 84.7035 21.768V11.667C84.7035 11.574 84.6285 11.4975 84.5339 11.4975Z",fill:e}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M83.388 6.8985C82.4715 6.8985 81.7275 7.641 81.7275 8.5575C81.7275 9.4755 82.4715 10.2195 83.388 10.2195C84.306 10.2195 85.0485 9.4755 85.0485 8.5575C85.0485 7.641 84.306 6.8985 83.388 6.8985Z",fill:e}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.8725 13.2975C19.038 10.4265 11.0625 10.1625 6.44685 11.5635C5.7045 11.7885 4.9215 11.37 4.6965 10.629C4.4715 9.88648 4.89 9.10348 5.6325 8.87848C10.9305 7.26898 19.7385 7.58098 25.305 10.884C25.9723 11.28 26.19 12.141 25.7955 12.807C25.3995 13.473 24.5385 13.6935 23.8725 13.2975ZM23.715 17.55C23.376 18.1005 22.656 18.273 22.1055 17.9355C18.075 15.4575 11.9279 14.7405 7.15953 16.188C6.54003 16.374 5.88753 16.026 5.70003 15.408C5.51253 14.79 5.86203 14.1375 6.48003 13.95C11.9279 12.297 18.7005 13.098 23.3295 15.9435C23.88 16.281 24.0525 17.001 23.715 17.55ZM21.8789 21.6345C21.609 22.077 21.0345 22.215 20.5935 21.9465C17.0715 19.794 12.6375 19.3065 7.41602 20.5005C6.91352 20.616 6.41102 20.2995 6.29702 19.797C6.18152 19.293 6.49502 18.792 7.00052 18.678C12.714 17.3715 17.6159 17.934 21.5685 20.349C22.0095 20.619 22.149 21.195 21.8789 21.6345ZM15 0C6.7155 0 0 6.7155 0 15C0 23.2845 6.7155 30 15 30C23.2845 30 30 23.2845 30 15C30 6.7155 23.2845 0 15 0Z",fill:e})]})},24867:(e,t,n)=>{"use strict";n.d(t,{n:()=>d});var i=n(67836);const a="UyzJidwrGk3awngSGIwv";var s=n(84875),r=n.n(s),o=n(73024),l=n(4637);const d=({durationMs:e,className:t,displaySeconds:n})=>{const{hours:s,minutes:d,seconds:c}=(0,i.P)(e);return n=!1!==n&&!s&&c,(0,l.jsx)("span",{className:r()(a,t),children:(0,o.N)({h:s,m:d,s:n?c:0})})}},73024:(e,t,n)=>{"use strict";n.d(t,{N:()=>a});var i=n(3802);function a({h:e,m:t,s:n}){return[e?i.ag.get("time.hours.short",e):"",t?i.ag.get("time.minutes.short",t):"",n?i.ag.get("time.seconds.short",n):""].filter((e=>""!==e)).join(" ")}},44526:(e,t,n)=>{"use strict";n.d(t,{nL:()=>i.n,jC:()=>h,ng:()=>v});var i=n(24867),a=n(67836);const s="poz9gZKE7xqFwgk231J4";var r=n(3802),o=n(84875),l=n.n(o);const d=6e4,c=60*d,u=24*c;function m(e,t){return e-e%t}var p=n(73024),g=n(4637);const h=({durationMs:e,className:t})=>{const n=e>u;let i;var o;i=n?u:m(o=e,o>10*c?c:o>5*c?30*d:o>1*c?15*d:o>30*d?5*d:1*d);const{hours:h,minutes:k}=(0,a.P)(i);if(0===h&&0===k)return null;let v=(0,p.N)({h,m:k,s:0});return v=n?r.ag.get("time.over",v):r.ag.get("time.estimated",v),(0,g.jsx)("span",{className:l()(s,t),children:v})},k="xWm_uA0Co4SXVxaO7wlB",v=({durationMs:e,className:t,displaySeconds:n})=>{const{hours:i,minutes:s,seconds:o}=(0,a.P)(e);n=!1!==n&&!i&&o;const d=(0,p.N)({h:i,m:s,s:n?o:0});return(0,g.jsx)("span",{className:l()(k,t),children:r.ag.get("time.left",d)})}},39669:(e,t,n)=>{"use strict";n.d(t,{BK:()=>S,F0:()=>v,IT:()=>g,Jn:()=>_,Li:()=>s,Np:()=>l,YJ:()=>c,Z2:()=>o,ZW:()=>b,_S:()=>y,ci:()=>r,iz:()=>p,li:()=>d,s_:()=>h,un:()=>f,vF:()=>m,wI:()=>N,z4:()=>u,zL:()=>k});var i=n(3802),a=n(9374);const s="https://open.spotify.com/",r="https://www.spotify.com/account/overview/",o="https://www.spotify.com/logout",l="https://www.spotify.com/premium/",d="https://www.spotify.com/us/purchase/panel/",c="https://support.spotify.com/",u="https://www.spotify.com/legal/cookies-policy/",m="https://spotify.com/download",p="https://support.spotify.com/ru-ru/contact-spotify-legal-form/",g="https://www.spotify.com/premium/?utm_source=app&utm_medium=desktop&utm_campaign=upgrade",h=300,k="/__noul__",v="intl-",f=(new RegExp(`${`/${v}`}([a-zA-Z0-9-]+)`),[i.go.de,i.go.tr,i.go.nl,i.go.it,i.go.pl,i.go.ja]),y=[i.go.id],S=[...y,...f],b=i.go.en,_=[],N=[a.p.ALBUM,a.p.ARTIST,a.p.TRACK],[E]=(f.length>0?f[0]:y[0],i.go.hu,y);i.go.zhCN},21524:(e,t,n)=>{"use strict";n.d(t,{$8:()=>o,DJ:()=>s,H8:()=>a,VX:()=>r});var i=n(59496);const a=(0,i.createContext)(""),s=(0,i.createContext)(null),r=(0,i.createContext)({scrollNodeRef:{current:null},scrollNodeChildRef:{current:null}}),o=(0,i.createContext)({isRightSidebarVisible:!0,isNavBarVisible:!0,isNowPlayingBarVisible:!0,isTopBarVisible:!0,isMainViewExpanded:!1,resetMainView:()=>{},collapseMainView:()=>{}})},95019:(e,t,n)=>{"use strict";n.d(t,{WU:()=>o,ky:()=>d,zY:()=>l});var i=n(59496),a=n(64709),s=n(4637);const r=(0,i.createContext)(null),o=({handle:e,children:t})=>(0,s.jsx)(r.Provider,{value:e??null,children:(0,s.jsx)(a.LC,{target:e?.document?.head,children:t})});function l(){const e=(0,i.useContext)(r);return"undefined"==typeof window?null:e??window}function d(){const e=l();return e?.document??null}},54186:(e,t,n)=>{"use strict";n.d(t,{Uo:()=>i.U,ZU:()=>s,jh:()=>r,Db:()=>o.D});var i=n(41909),a=n(59496);const s=(0,a.createContext)(void 0),r=()=>(0,a.useContext)(s);var o=n(75890)},41909:(e,t,n)=>{"use strict";n.d(t,{U:()=>i});let i=function(e){return e.XSMALL="XSMALL",e.SMALL="SMALL",e.MEDIUM="MEDIUM",e.LARGE="LARGE",e.XLARGE="XLARGE",e}({})},75890:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var i=n(59496),a=n(22345);function s(e){const[t,n]=(0,i.useState)(),s=Object.entries(e).sort(((e,t)=>t[1]-e[1]));return{ref:(0,a.y)({observeOnly:"width",onResize:({width:e})=>{if(void 0===e)return;const i=s.find((([,t])=>e>=t)),a=i&&i[0];a&&a!==t&&n(a)}}),breakpoint:t}}},72802:(e,t,n)=>{"use strict";n.d(t,{a:()=>s});var i=n(59496),a=n(87680);const s=e=>{const t=(0,i.useMemo)((()=>(0,a.O)()?null:window.matchMedia(e)),[e]),[n,s]=(0,i.useState)((()=>!t||t.matches));return(0,i.useEffect)((()=>{if(!t||!t.addEventListener)return()=>{};const e=e=>{s(e.matches)};return t.addEventListener("change",e),()=>{t.removeEventListener("change",e)}}),[t]),n}},66604:(e,t,n)=>{"use strict";n.d(t,{T:()=>a});var i=n(72802);const a=()=>(0,i.a)("(prefers-reduced-motion: reduce)")},56038:(e,t,n)=>{"use strict";n.d(t,{D:()=>a});var i=n(59496);function a(e){const t=(0,i.useRef)();return(0,i.useEffect)((()=>{t.current=e}),[e]),t.current}},21718:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});var i=n(59496),a=n(85830);const s=100;function r(e){const t=(0,a.y1)(e,s,{leading:!0});(0,i.useEffect)((()=>(window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),t.cancel()})),[t])}},22345:(e,t,n)=>{"use strict";n.d(t,{y:()=>d});var i=n(59496),a=n(73023),s=n(87680);function r(e){return!(0,s.O)()&&e instanceof HTMLElement}let o;const l={subscribersByElement:new WeakMap,get resizeObserver(){return o||(o=new a.Z((e=>{Array.isArray(e)&&e.forEach((e=>{const t={width:Math.round(e.contentRect.width),height:Math.round(e.contentRect.height)};(l.subscribersByElement.get(e.target)??new Set).forEach((e=>{e(t)}))}))}))),o}};function d({onResize:e,refOrElement:t,observeOnly:n,observeOnMount:a=!1}){const s=(0,i.useRef)(e);s.current=e;const o=(0,i.useRef)(n);o.current=n;const d=(0,i.useRef)({width:-1,height:-1}),c=(0,i.useCallback)((e=>{if(!s.current)return;const t=d.current.width!==e.width,n=d.current.height!==e.height;("width"===o.current&&t||"height"===o.current&&n||!o.current&&(t||n))&&s.current(e),d.current.width=e.width,d.current.height=e.height}),[]),u=function({refOrElement:e,subscriber:t}){let n=null;const a=(0,i.useRef)(null),s=(0,i.useRef)(null),o=(0,i.useRef)(null),l=(0,i.useRef)(),d=(0,i.useRef)(t);d.current=t;const c=(0,i.useCallback)((()=>{let t=null;s.current?t=s.current:a.current?t=a.current:r(e)&&(t=e),o.current!==t&&(l.current&&(l.current(),l.current=null),o.current=t,t&&d.current&&(l.current=d.current(t)))}),[e]),u=(0,i.useCallback)((e=>{s.current=e,c()}),[c]);return e&&!r(e)&&(n=e),(0,i.useEffect)((()=>{n&&(a.current=n.current),c()}),[n,n?.current,c]),(0,i.useEffect)((()=>()=>{l?.current?.()}),[]),u}({refOrElement:t,subscriber:e=>(a&&c({width:e.offsetWidth,height:e.offsetHeight}),l.subscribersByElement.has(e)||(l.resizeObserver.observe(e),l.subscribersByElement.set(e,new Set)),l.subscribersByElement.get(e)?.add(c),()=>{l.subscribersByElement.get(e)?.delete(c),0===l.subscribersByElement.get(e)?.size&&(l.resizeObserver.unobserve(e),l.subscribersByElement.delete(e))})});return u}},3608:(e,t,n)=>{"use strict";n.d(t,{c:()=>s});var i=n(59496),a=n(21524);function s(e,{executeOnceOnStart:t=!1,disabled:n=!1}={}){const{scrollNodeRef:s}=(0,i.useContext)(a.VX);(0,i.useEffect)((()=>{const i=s.current;if(!n){if(i)return i.addEventListener("scroll",e),t&&i.dispatchEvent(new Event("scroll")),()=>i.removeEventListener("scroll",e);console.error("useScrollNode found no scroll node")}}),[s,e,t,n])}},44358:(e,t,n)=>{"use strict";n.d(t,{t:()=>a});var i=n(59496);function a(){const e=(0,i.useRef)(!1);return(0,i.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),(0,i.useCallback)((()=>e.current),[])}},37180:(e,t,n)=>{"use strict";function i(e,t=document){const{name:n,value:i,days:a,domain:s,secure:r=!0,samesite:o="none"}=e;let l="";if(a){const e=new Date;e.setTime(Date.now()+24*a*60*60*1e3),l=`; expires=${e.toUTCString()}`}else l="";let d=`${n}=${i}${l}; path=/`;s&&s.length&&(d+=`;domain=${s}`),i&&(!0===r&&(d+=";secure"),d+=`;samesite=${o}`),t.cookie=d}function a(e,t=document){try{const n=t.cookie;return n.split(";").map((e=>e.trim().split("="))).reduce(((e,t)=>(e[t[0]]=t[1],e)),{})[e]}catch(e){return null}}function s(e,t=document,n){i({name:e,value:"",days:-1,domain:n},t)}n.d(t,{kT:()=>s,pC:()=>i,vQ:()=>a})},23329:(e,t,n)=>{"use strict";n.d(t,{CG:()=>d,PC:()=>l,j6:()=>u,vK:()=>c});var i=n(8927),a=n(71802),s=n(84258),r=n(58934);const o=["open.spotifycdn.com","xpui.app.spotify.com"],l=e=>{(0,i.Tb)(e),console.error(e)},d=e=>{(0,i.$e)((t=>{t.setTag("FatalError","true"),l(e)}))},c=(e,t)=>{(0,i.$e)((n=>{n.setTag("ErrorBoundary",t),d(e)}))},u=(e,t,n={},l={},d)=>{(0,a.S1)({dsn:e,allowUrls:o,sampleRate:.1,release:t,...n,integrations:[new s.x],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,i.e)((e=>{const t=(0,r.Z)("config").correlationId;t&&e.setUser({id:t}),Object.keys(l).forEach((t=>{e.setExtra(t,l[t])})),""!==document.referrer&&e.setExtra("referrer",document.referrer),d&&e.setTag("container",d)}))}},27509:(e,t,n)=>{"use strict";n.d(t,{m:()=>o,o:()=>r});var i=n(67836),a=n(75207),s=n(87680);const r=(e=[],{desiredSize:t=300,desiredLabel:n=""}={})=>{0===t&&(t=300);const i=!(0,s.O)()&&(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,a.X)(e,{desiredSize:t*i,desiredLabel:n})?.url},o=e=>{if(-1===e||Number.isNaN(e))return"-:--";const{hours:t,minutes:n,seconds:a}=(0,i.P)(e);return`${t>0?`${t}:`:""}${t>0&&n<10?`0${n}`:n}:${a<10?`0${a}`:a}`}},87642:(e,t,n)=>{"use strict";n.d(t,{PP:()=>l,V4:()=>r});class i extends Map{}class a{_batch=new i;_additions=new i;_deletions=new i;_timeoutId=null;constructor(e,t,n,i,a=0){this._onBatch=e,this._onAdd=t,this._onRemove=n,this._onUpdate=i,this._timeout=a}onUpdate(){this._timeoutId=null,this._onUpdate(this._batch,this._additions,this._deletions),this._onBatch(this._batch)}scheduleUpdate(){null===this._timeoutId&&(this._timeoutId=setTimeout(this.onUpdate.bind(this),this._timeout))}getBatch(){return this._batch}subscribe(e,t){this._onAdd(this._additions,e,t),this._onRemove(this._deletions,e,t),this.scheduleUpdate()}unsubscribe(e,t){this._onAdd(this._deletions,e,t),this._onRemove(this._additions,e,t),this.scheduleUpdate()}}class s extends a{}function r(e,t=0){return new s(e,((e,t,n)=>{const i=e.get(t);i?i.add(n):e.set(t,new Set([n]))}),((e,t,n)=>{const i=e.get(t);i&&(i.delete(n),0===i.size&&e.delete(t))}),((e,t,n)=>{n.forEach(((t,n)=>{const i=e.get(n);void 0!==i&&(t.forEach((e=>i.delete(e))),0===i.size&&e.delete(n))})),n.clear(),t.forEach(((t,n)=>{const i=e.get(n);void 0!==i?t.forEach((e=>i.add(e))):e.set(n,t)})),t.clear()}),t)}class o extends a{}function l(e,t=0){return new o(e,((e,t)=>{const n=e.get(t);void 0!==n?e.set(t,n+1):e.set(t,1)}),((e,t)=>{const n=e.get(t);void 0!==n&&(n-1==0?e.delete(t):e.set(t,n-1))}),((e,t,n)=>{n.forEach(((t,n)=>{const i=e.get(n)||0;i-t<=0?e.delete(n):e.set(n,i-t)})),n.clear(),t.forEach(((t,n)=>{const i=e.get(n)||0;e.set(n,i+t)})),t.clear()}),t)}},99123:(e,t,n)=>{"use strict";async function i(e,t,n=50){const i=[];for(let a=0;ai})},23327:(e,t,n)=>{"use strict";n.d(t,{Ie:()=>o,Xb:()=>l,IS:()=>d});var i=n(25899),a=n(27555);const s=async(e,t,n)=>(n??="com.widevine.alpha",(await e.build().withMethod("GET").withHost(a.B8).withPath(`/unauth/episode/${t}/${n}`).withEndpointIdentifier("/unauth/episode/{episodeId}/{keysystem}").send()).body);var r=n(50346);function o(e){return 0===e.showTypes?.length}function l(e,t){return e.uri===t.trailer?.uri}async function d(e,t,n){const a=(0,r.EC)(e.uri),o=await s(i.b.getInstance(),a?.id,t);if("video"===n)return{format:"MANIFEST_ID",mediaType:n,noManifest:!1,fileId:o.video?.[0].manifestId};const l=o.format?.replace(/_(128|256)/,""),d="NONE"!==o.passthrough;return{format:l,mediaType:n??"audio",noManifest:d,resolvedURL:d?o.passthroughUrl:o.url[0],fileId:d?"":o.fileId}}},22669:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});const i={ARTIST:"artist",ALBUM:"album",PLAYLIST:"playlist",TRACK:"track",USER:"user"},a=e=>{const t=e.replace(/\+/g,"%20");return decodeURIComponent(t)},s={Type:i,from:e=>{const t=/^spotify:(.*)$/.exec(e);if(!t)return{type:null,id:null};const n=t[1],s=/([^:]+):([^:]+)/g;let r;const o=[],l=[];for(;r=s.exec(n);){const e=r[1];let t=r[2];e===i.USER&&(t=a(t)),o.push(e),l.push(t)}if(0===o.length)return{type:null,id:null};const d=o.reduce(((e,t,n)=>(e[o[n]]=l[n],e)),{});return{type:o[o.length-1],id:l[l.length-1],...d}}}},25899:(e,t,n)=>{"use strict";n.d(t,{b:()=>b});var i=n(48821),a=n(51761),s=n(30616),r=n(10370);function o(e){return`${e.method}::${e.host}${e.path}::${JSON.stringify(e.queryParameters)}`}function l(e,t,n){try{(0,a.sQ)({metric_type:i.MetricTypes.COUNTER,what:"request-rate",value:1,tags:{endpoint:e,statusCode:t,isFatal:n}}).catch((()=>({})))}catch(e){}}class d extends r.c{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=n=>{t=o(e);let r="unknown",d=!1;if(null!==e.endpointIdentifier&&(d=!0,r=`${e.method} ${e.hostIdentifier||"unknown-host"}::${e.endpointIdentifier}`),n)throw d&&l(r,JSON.stringify(n.status||0),JSON.stringify(0===(e.endpointIdentifier||"").indexOf("/me"))),this.pendingRequests.delete(t),s.m.fromResponse(n,e.method);if(d){l(r,"200","false");const t=Date.now()-(e.startTimestamp||0);!function(e,t,n){try{(0,a.sQ)({metric_type:i.MetricTypes.TIMER,what:"request-duration",value:n,tags:{endpoint:e,statusCode:t}}).catch((()=>({})))}catch(e){}}(r,"200",i.Time.fromMillis(t).asNanos())}this.pendingRequests.delete(t)},e}}var c=n(3787),u=n(45005),m=n(39689),p=n.n(m),g=n(21366),h=n.n(g);const k=p()(u.fetch);async function v(e,t,n=1e4){const i=new(h()),a=i.signal,r=setTimeout((()=>i.abort()),n),o=function(e){return e&&void 0!==e.retries&&e.retries>0?k:u.fetch}(t);return o(e,{...t,signal:a}).then((e=>(clearTimeout(r),e))).catch((i=>{if("AbortError"===i.name)throw new s.V({timeout:n,url:e,method:t?.method??"get"});throw clearTimeout(r),i}))}class f{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}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}async send(){let e;this.postData&&(e=this._headers["Content-Type"]?.startsWith("application/json;charset=UTF-8")?JSON.stringify(this.postData):this.postData);const t=new URLSearchParams(this.queryParameters).toString(),n=i.Timer.start(),r=await v(`${this.url}${t?`?${t}`:""}`,{method:this.method,body:e,credentials:this._includeCredentials?"include":void 0,headers:{"User-Agent":{}.SERVER_UA,"Content-Type":y(this.responseType),...this._headers}},1e4);if((0,a.sQ)({metric_type:i.MetricTypes.TIMER,what:"isomorphic-request-time",value:n.end().nanoseconds,tags:this._endpointIdentifier?{endpoint:this._endpointIdentifier}:{}}),!r.ok)throw s.m.fromResponse(r,this.method||"GET");return{body:"text"===this.responseType?await r.text():await r.json(),status:r.status}}}function y(e){return"text"===e?"text/plain":"application/json"}let S=null;class b{static setSession(e){if(!e)return;const{accessToken:t}=e,n=this.getInstance();n.accessToken=t,t||n.resetPendingRequests()}static setLocale(e){this.getInstance().locale=e}static setGlobalRequestHeaders(e){this.getInstance().globalRequestHeaders=e}static setMarket(e){this.getInstance().market=e}static resetInstance(){S=null}static getInstance(e={}){return S||(S=this.createNew(e)),S}static createNew(e){const{Constructor:t=d,fromServer:n=!1}=e;return new t(n?f:c.e)}}},35344:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a});var i=n(27555);const a=(e,t)=>e.build().withMethod("GET").withHost(i.ZI).withPath(`/dialog/${t}`).withEndpointIdentifier("/dialog/${uri}").withoutMarket().send()},27555:(e,t,n)=>{"use strict";n.d(t,{AA:()=>p,B8:()=>D,Cw:()=>H,Ep:()=>w,FN:()=>I,Gy:()=>S,H:()=>u,Jz:()=>m,KH:()=>j,No:()=>g,OP:()=>F,PQ:()=>_,SW:()=>c,St:()=>V,Tt:()=>f,Uk:()=>v,W7:()=>U,WE:()=>R,XA:()=>r,Y7:()=>G,Z9:()=>A,ZI:()=>b,aj:()=>E,cM:()=>M,f:()=>T,fQ:()=>C,fW:()=>B,fe:()=>k,gH:()=>N,hC:()=>P,lW:()=>O,pd:()=>d,uP:()=>x,vp:()=>h,wI:()=>y,x9:()=>L});var i=n(62884),a=n.n(i);const{WEB_API_URL:s,SPCLIENT_WG_URL:r,PARTNER_API_ENDPOINT:o,ACCOUNTS_HOST:l,EXP_WG_ENDPOINT:d}=a(),c="",u=`${s}/v1`,m=`${r}/melody/v1`,p=`${r}/radio-apollo/v3`,g=`${r}/recently-played/v3`,h=`${r}/sponsoredplaylist/v1`,k=`${r}/playlist/v2`,v=`${r}/inspiredby-mix/v2`,f=`${r}/ads`,y=`${o}/pathfinder/v1`,S=`${r}/autoplay-enabled`,b=`${r}/age-verification/v1`,_=`${r}/concerts`,N=`${d}/cooper`,E=`${r}/collection`,x=`${r}/presence-view`,C=`${r}/presence2`,w=`${r}/find-friends`,I=`${r}/track-credits-view`,T=`${r}/color-lyrics/v2`,A=`${r}/metadata/4`,P=`${r}/user-profile-view/v3`,O=`${r}/campaigns-service/v1`,D=`${r}/soundfinder/v1`,R=`${r}/`,L=`${r}/socialgraph/v2`,F=`${r}/ondemand-selector/v2`,j=`${r}/playlist-permission/v1`,M=`${r}/blend-invitation`,U=`${r}/playlistfreshener`,B=`${r}/spotify.audiobookcashier.v1.AudiobookCashier`,V=`${r}/profile-privacy`,H=`${r}/user-verification-service/v0`,G=`${r}/cultural-moment/v1`},4003:(e,t,n)=>{"use strict";n.d(t,{Cs:()=>r,aj:()=>s,uM:()=>a,wD:()=>l,zm:()=>o});var i=n(27555);const a=e=>e.build().withHost(i.uP).withMethod("GET").withoutMarket().withPath("/v1/buddylist").withJsonContentType().withEndpointIdentifier("/v1/buddylist").send(),s=(e,t)=>e.build().withHost(i.uP).withMethod("GET").withoutMarket().withPath(`/v1/user/${encodeURIComponent(t)}`).withJsonContentType().withEndpointIdentifier("/v1/user").send(),r=e=>e.build().withHost(i.Ep).withMethod("POST").withoutMarket().withPath("/v1/friends").withJsonContentType().withEndpointIdentifier("/v1/friends").send(),o=(e,t,n)=>e.build().withHost(i.fQ).withMethod("POST").withoutMarket().withJsonContentType().withPath(`/sub/user/${encodeURIComponent(t)}/connection_id/${n}`).withEndpointIdentifier("POST:/sub/user/:username/connection_id/:connection_id").send(),l=(e,t,n)=>e.build().withHost(i.fQ).withMethod("DELETE").withoutMarket().withPath(`/sub/user/${encodeURIComponent(t)}/connection_id/${n}`).withEndpointIdentifier("DELETE:/sub/user/:username/connection_id/:connection_id").send()},82710:(e,t,n)=>{"use strict";n.r(t),n.d(t,{checkConcertInCollection:()=>l,fetchLocationQuery:()=>u,getAllConcerts:()=>p,getConcert:()=>s,getConcertsForArtist:()=>d,getConcertsForUser:()=>c,getConcertsHub:()=>m,getPromoRow:()=>g,getSavedConcertsHub:()=>h,saveConcert:()=>r,unsaveConcert:()=>o});var i=n(27555),a=n(3802);function s(e,t){return e.build().withHost(i.PQ).withPath(`/v1/concert/view/${t}`).withQueryParameters({locale:a.ag.getLocale()}).withEndpointIdentifier("/concert/{concertId}").send()}const r=(e,t)=>e.build().withMethod("POST").withHost(i.PQ).withPath(`/v2/concerts/saved/${t}`).withEndpointIdentifier("/concerts/saved/{concertId}").withoutMarket().send(),o=(e,t)=>e.build().withMethod("DELETE").withHost(i.PQ).withPath(`/v2/concerts/saved/${t}`).withEndpointIdentifier("/concerts/saved/{concertId}").withoutMarket().send(),l=(e,t,n)=>e.build().withMethod("POST").withHost(i.aj).withPath("/v2/contains").withHeaders([{key:"content-type",value:"application/json"},{key:"accept",value:"application/json"}]).withBody(JSON.stringify({username:t,set:"concerts",items:[{uri:n}]})).send();function d(e,t,n){return e.build().withHost(i.PQ).withPath(`/v2/concerts/artist/${n}`).withQueryParameters({locale:a.ag.getLocale(),filterByLoc:!1,decorate:!0,...t&&{geohash:t}}).withEndpointIdentifier("concerts/artist/${artistId}").send()}function c(e,t){return e.build().withHost(i.PQ).withPath("/v3/concerts/view").withQueryParameters({locale:a.ag.getLocale(),source:["user","popular","online"],playlists:!1,...t&&{geonameId:t}}).withEndpointIdentifier("/concerts/view").send()}function u(e,t){return e.build().withHost(i.PQ).withPath("/v1/location/suggest").withQueryParameters({q:t}).withEndpointIdentifier("/concerts/location/suggest").send()}function m(e,t,n){const a={};return t&&(a.ip=t),n&&(a.geonameId=n),e.build().withHost(i.PQ).withPath("/v3/concerts/open").withQueryParameters(a).withEndpointIdentifier("/v3/concerts/open").send()}function p(e,t){const n={};return t.page&&(n.page=t.page),t.geonameId&&(n.geonameId=t.geonameId),t.startDate&&(n.startDate=t.startDate),t.endDate&&(n.endDate=t.endDate),e.build().withHost(i.PQ).withPath("/v3/concerts").withQueryParameters(n).withEndpointIdentifier("/v3/concerts").send()}function g(e){return e.build().withHost(i.PQ).withPath("/v3/concerts/view/promoRow").withEndpointIdentifier("/v3/concerts/view/promoRow").send()}function h(e){return e.build().withHost(i.PQ).withPath("/v3/concerts/saved").withEndpointIdentifier("/v3/concerts/saved").send()}},85270:(e,t,n)=>{"use strict";n.d(t,{fi:()=>u,dp:()=>i,xh:()=>a,BC:()=>m,q8:()=>de,LH:()=>ie,cW:()=>v,x2:()=>h,TV:()=>s,Zz:()=>g,gO:()=>r,di:()=>d,OK:()=>c,fQ:()=>o,pH:()=>p,n5:()=>I,kO:()=>l,uC:()=>k});var i={};n.r(i),n.d(i,{getAlbum:()=>y,getAlbumEntityView:()=>_,getAlbumTracks:()=>b,getAlbums:()=>S});var a={};n.r(a),n.d(a,{getArtist:()=>N,getArtistAlbums:()=>x,getArtistTopTracks:()=>C,getArtists:()=>E});var s={};n.r(s),n.d(s,{getGeneric:()=>w});var r={};n.r(r),n.d(r,{addToPlaylist:()=>O,changePlaylistDetails:()=>D,createPlaylist:()=>P,getOnDemandPlaylists:()=>F,getPlaylist:()=>A,getPlaylistPermissionForUser:()=>j,removeFromPlaylist:()=>L,renamePlaylist:()=>R});var o={};n.r(o),n.d(o,{getTrack:()=>M,getTrackEntityView:()=>B,getTracks:()=>U});var l={};n.r(l),n.d(l,{getView:()=>K,getViewRaw:()=>z});var d={};n.r(d),n.d(d,{createCheckoutSession:()=>J,getEpisode:()=>Z,getEpisodes:()=>Q,getShow:()=>Y,getShowEpisodes:()=>q});var c={};n.r(c),n.d(c,{getSponsoredPlaylistAd:()=>X,getSponsoredPlaylists:()=>$});var u={};n.r(u),n.d(u,{getAdsManagerConfig:()=>ee,getAdsManagerSlot:()=>te});var m={};n.r(m),n.d(m,{query:()=>ne});var p={};n.r(p),n.d(p,{V:()=>ae});var g={};n.r(g),n.d(g,{getSEOTrackLyrics:()=>se});var h={};n.r(h),n.d(h,{deleteFeedback:()=>oe,setFeedback:()=>re});var k={};n.r(k),n.d(k,{getEligibility:()=>le});var v={};n.r(v),n.d(v,{D:()=>ce});var f=n(27555);function y(e,t){return e.build().withHost(f.H).withPath(`/albums/${t}`).withEndpointIdentifier("/albums/{albumId}").send()}function S(e,t){return e.build().withHost(f.H).withPath("/albums").withQueryParameters({ids:t.join(",")}).withEndpointIdentifier("/albums?ids={albumIds}").send()}function b(e,t,n){return e.build().withHost(f.H).withPath(`/albums/${t}/tracks`).withQueryParameters(n).withEndpointIdentifier("/albums/{albumId}/tracks").send()}function _(e,t,n){return e.build().withHost(f.XA).withPath(`/album-entity-view/v2/album/${t}`).withQueryParameters(n).withEndpointIdentifier("/album-entity-view/v2/album/{albumId}").send()}function N(e,t){return e.build().withHost(f.H).withPath(`/artists/${t}`).withoutMarket().withEndpointIdentifier("/artists/{artistId}").send()}function E(e,t){return e.build().withHost(f.H).withPath("/artists").withQueryParameters({ids:t.join(",")}).withoutMarket().withEndpointIdentifier("/artists?ids={artistIds}").send()}function x(e,t,n={}){return e.build().withHost(f.H).withPath(`/artists/${t}/albums`).withQueryParameters(n).withoutMarket().withEndpointIdentifier("/artists/{artistId}/albums").send()}function C(e,t){return e.build().withHost(f.H).withPath(`/artists/${t}/top-tracks`).withEndpointIdentifier("/artists/{artistId}/top-tracks").send()}function w(e,t,n,i,a){return e.build().withHost(t).withPath(n).withQueryParameters(i).withoutMarket().withEndpointIdentifier(a).send()}var I=n(42205),T=n(22669);function A(e,t,n={additional_types:"track"}){return e.build().withHost(f.H).withPath(`/playlists/${t}`).withQueryParameters(n).withEndpointIdentifier("/playlists/{playlistId}").send()}function P(e,t,n){return e.build().withMethod("POST").withHost(f.H).withPath(`/users/${encodeURIComponent(t)}/playlists`).withoutMarket().withJsonContentType().withBody({name:n,public:!0}).withEndpointIdentifier("/users/{userId}/playlists").send()}function O(e,t,n,i){const a=T.o.from(t).id;return e.build().withMethod("POST").withHost(f.H).withPath(`/playlists/${a}/tracks`).withJsonContentType().withBody({uris:n,..."number"==typeof i&&{position:i}}).withEndpointIdentifier("/playlists/{playlistId}/tracks").withoutMarket().send()}function D(e,t,n={}){const i=T.o.from(t).id;return e.build().withMethod("PUT").withHost(f.H).withPath(`/playlists/${i}`).withJsonContentType().withBody(n).withEndpointIdentifier("/playlists/{playlistId}").withoutMarket().send()}function R(e,t,n){return D(e,t,{name:n})}function L(e,t,n,i){const a=T.o.from(t).id;return e.build().withMethod("DELETE").withHost(f.H).withPath(`/playlists/${a}/tracks`).withJsonContentType().withBody({tracks:[{positions:[i],uri:n}]}).withEndpointIdentifier("/playlists/{playlistId}/tracks").withoutMarket().send()}function F(e){return e.build().withHost(f.OP).withPath("/select-ondemand-set?format=json").withEndpointIdentifier("/select-ondemand-set").withJsonContentType().withoutMarket().send()}function j(e,t){return e.build().withHost(f.KH).withMethod("GET").withPath(`/playlist/${t}/capabilities`).withEndpointIdentifier("/playlist/{id}/capabilities").withoutMarket().send()}function M(e,t){return e.build().withHost(f.H).withPath(`/tracks/${t}`).withEndpointIdentifier("/tracks/{trackId}").send()}function U(e,t){return e.build().withHost(f.H).withPath("/tracks").withQueryParameters({ids:t.join(",")}).withEndpointIdentifier("/tracks?ids={trackIds}").send()}function B(e,t,n={}){return e.build().withHost(f.XA).withPath(`/track-entity-view/v2/track/${t}`).withQueryParameters(n).withEndpointIdentifier("/track-entity-view/v2/track/{trackId}").send()}const V="web",H=10,G=20,W=12;function z(e,t,n={}){return e.build().withHost(f.H).withPath(`/views/${encodeURIComponent(t)}`).withQueryParameters(n).withLocale(n.locale).withEndpointIdentifier("/views/{viewId}").send()}function K(e,t,n={}){const i=t.match(/ginger-genre-affinity/)?W:G,a=new Date;return e.build().withHost(f.H).withPath(`/views/${encodeURIComponent(t)}`).withQueryParameters({timestamp:new Date(a.getTime()-60*a.getTimezoneOffset()*1e3).toISOString(),platform:V,content_limit:H,limit:i,types:"album,playlist,artist,show",image_style:"gradient_overlay",include_external:"audio",...n}).withLocale(n.locale).withEndpointIdentifier("/views/{viewId}").send()}function Y(e,t,n){return e.build().withHost(f.H).withPath(`/shows/${t}`).withQueryParameters({market:n}).withEndpointIdentifier("shows/{showId}").send()}function q(e,t,n={},i){return e.build().withHost(f.H).withPath(`/shows/${t}/episodes`).withQueryParameters({...n,market:i}).withEndpointIdentifier("shows/{showId}/episodes").send()}function Z(e,t,n){return e.build().withHost(f.H).withPath(`/episodes/${t}`).withQueryParameters({market:n}).withEndpointIdentifier("episodes/{episodeId}").send()}function Q(e,t,n){return e.build().withHost(f.H).withPath("/episodes").withQueryParameters({market:n,ids:t}).withEndpointIdentifier("episodes").send()}function J(e,t){const n="undefined"!=typeof window&&window.navigator&&window.navigator.platform||"";let i=null;return-1!==n.indexOf("Mac")?i="OSX":-1!==n.indexOf("Win")?i="Win32":-1!==n.indexOf("Linux")&&(i="Linux"),e.build().withMethod("POST").withHost(f.fW).withPath("/CheckoutBook").withoutMarket().withBody(JSON.stringify(t)).withEndpointIdentifier("show/{showId}").withHeaders([{key:"App-Platform",value:i??"Browser"}]).send()}const $=e=>e.build().withHost(f.vp).withPath("/sponsored").withEndpointIdentifier("/sponsored").send(),X=(e,t)=>e.build().withHost(f.vp).withPath(`/sponsored/${t}`).withEndpointIdentifier("sponsored/{playlistUri}").send();n(68220);const ee=(e,t)=>e.build().withHost(f.Tt).withPath("/v2/config").withQueryParameters({playload:"",e30:""}).withHeaders(t).withEndpointIdentifier("/v2/config").send(),te=(e,t,n)=>e.build().withHost(f.Tt).withPath(`/v1/ads/${t}`).withQueryParameters({playload:"",e30:""}).withHeaders(n).withEndpointIdentifier("/v1/ads/{slotName}").send();n(35344);function ne(e,t){return e.build().withMethod("GET").withHost(f.Gy).withPath("/query").withQueryParameters({uri:t}).withResponseType("text").withEndpointIdentifier("/query").withoutMarket().send()}var ie=n(82710);const ae=(e,t)=>e.build().withHost(f.FN).withPath(`/v0/experimental/${t}/credits`).withoutMarket().withEndpointIdentifier("/v0/experimental/{trackId}/credits").send(),se=(e,t)=>e.build().withHost(f.f).withPath(`/seo/track/${encodeURIComponent(t)}`).withEndpointIdentifier("/seo/track/{trackId}").send(),re=(e,t,n)=>{const i=t.replace("","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("",n);return e.build().withMethod("POST").withHost(f.WE).withPath(i).withEndpointIdentifier("//feedback/").send()},oe=(e,t,n)=>{const i=t.replace("","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("",n);return e.build().withMethod("DELETE").withHost(f.WE).withPath(i).withEndpointIdentifier("//feedback/").send()},le=e=>e.build().withHost(f.lW).withMethod("GET").withPath("/campaigns/wrapped/consumer/eligible").withEndpointIdentifier("/campaigns/wrapped/").withoutMarket().send();var de=n(4003);const ce=(e,t)=>e.build().withHost(f.Y7).withPath("/hub").withQueryParameters({id:t,userHasRiF:!1}).withoutMarket().withEndpointIdentifier("cultural-moment/hub").send()},68220:(e,t,n)=>{"use strict";n.d(t,{M:()=>a});var i=n(27555);const a=(e,t)=>e.build().withHost(i.Uk).withPath(`/seed_to_playlist/${t}`).withQueryParameters({"response-format":"json"}).withoutMarket().withEndpointIdentifier("/seed_to_playlist/{uri}").send()},42205:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PLATFORM:()=>I,blockUser:()=>H,getFollowers:()=>j,getFollowing:()=>F,getHarmonyProductStateForAnonymousUser:()=>L,getIsBlocked:()=>V,getMe:()=>A,getPlaylists:()=>U,getProductState:()=>R,getProfile:()=>M,getRecentlyPlayedArtists:()=>B,getShowFollows:()=>W,getUser:()=>T,getUserTopArtists:()=>O,getUserTopTracks:()=>D,getUserTopType:()=>P,setShowFollows:()=>z,unblockUser:()=>G});var i=n(4721),a=n(27555);const s={fromJSON:e=>({seconds:r(e.seconds)?String(e.seconds):"0",nanos:r(e.nanos)?Number(e.nanos):0}),toJSON(e){const t={};return void 0!==e.seconds&&(t.seconds=e.seconds),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){const t={seconds:"0",nanos:0};return t.seconds=e.seconds??"0",t.nanos=e.nanos??0,t}};function r(e){return null!=e}const o={fromJSON:e=>({seconds:l(e.seconds)?String(e.seconds):"0",nanos:l(e.nanos)?Number(e.nanos):0}),toJSON(e){const t={};return void 0!==e.seconds&&(t.seconds=e.seconds),void 0!==e.nanos&&(t.nanos=Math.round(e.nanos)),t},fromPartial(e){const t={seconds:"0",nanos:0};return t.seconds=e.seconds??"0",t.nanos=e.nanos??0,t}};function l(e){return null!=e}let d=function(e){return e[e.IMAGE_SIZE_UNSPECIFIED=0]="IMAGE_SIZE_UNSPECIFIED",e[e.IMAGE_SIZE_DEFAULT=1]="IMAGE_SIZE_DEFAULT",e[e.IMAGE_SIZE_SMALL=2]="IMAGE_SIZE_SMALL",e[e.IMAGE_SIZE_LARGE=3]="IMAGE_SIZE_LARGE",e[e.IMAGE_SIZE_XLARGE=4]="IMAGE_SIZE_XLARGE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function c(e){switch(e){case 0:case"IMAGE_SIZE_UNSPECIFIED":return d.IMAGE_SIZE_UNSPECIFIED;case 1:case"IMAGE_SIZE_DEFAULT":return d.IMAGE_SIZE_DEFAULT;case 2:case"IMAGE_SIZE_SMALL":return d.IMAGE_SIZE_SMALL;case 3:case"IMAGE_SIZE_LARGE":return d.IMAGE_SIZE_LARGE;case 4:case"IMAGE_SIZE_XLARGE":return d.IMAGE_SIZE_XLARGE;default:return d.UNRECOGNIZED}}const u={fromJSON:e=>({name:g(e.name)?String(e.name):"",publish_time:g(e.publish_time)?p(e.publish_time):void 0,duration:g(e.duration)?s.fromJSON(e.duration):void 0,uri:g(e.uri)?String(e.uri):"",images:Array.isArray(e?.images)?e.images.map((e=>m.fromJSON(e))):[],stream_count:g(e.stream_count)?String(e.stream_count):"0",explicit:!!g(e.explicit)&&Boolean(e.explicit)}),toJSON(e){const t={};return void 0!==e.name&&(t.name=e.name),void 0!==e.publish_time&&(t.publish_time=e.publish_time.toISOString()),void 0!==e.duration&&(t.duration=e.duration?s.toJSON(e.duration):void 0),void 0!==e.uri&&(t.uri=e.uri),e.images?t.images=e.images.map((e=>e?m.toJSON(e):void 0)):t.images=[],void 0!==e.stream_count&&(t.stream_count=e.stream_count),void 0!==e.explicit&&(t.explicit=e.explicit),t},fromPartial(e){const t={name:"",publish_time:void 0,duration:void 0,uri:"",images:[],stream_count:"0",explicit:!1};return t.name=e.name??"",t.publish_time=e.publish_time??void 0,t.duration=void 0!==e.duration&&null!==e.duration?s.fromPartial(e.duration):void 0,t.uri=e.uri??"",t.images=e.images?.map((e=>m.fromPartial(e)))||[],t.stream_count=e.stream_count??"0",t.explicit=e.explicit??!1,t}};const m={fromJSON:e=>({size:g(e.size)?c(e.size):0,url:g(e.url)?String(e.url):""}),toJSON(e){const t={};return void 0!==e.size&&(t.size=function(e){switch(e){case d.IMAGE_SIZE_UNSPECIFIED:return"IMAGE_SIZE_UNSPECIFIED";case d.IMAGE_SIZE_DEFAULT:return"IMAGE_SIZE_DEFAULT";case d.IMAGE_SIZE_SMALL:return"IMAGE_SIZE_SMALL";case d.IMAGE_SIZE_LARGE:return"IMAGE_SIZE_LARGE";case d.IMAGE_SIZE_XLARGE:return"IMAGE_SIZE_XLARGE";case d.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.size)),void 0!==e.url&&(t.url=e.url),t},fromPartial(e){const t={size:0,url:""};return t.size=e.size??0,t.url=e.url??"",t}};function p(e){return e instanceof Date?e:"string"==typeof e?new Date(e):function(e){let t=1e3*Number(e.seconds);return t+=e.nanos/1e6,new Date(t)}(o.fromJSON(e))}function g(e){return null!=e}const h={fromJSON:e=>({uri:N(e.uri)?String(e.uri):"",name:N(e.name)?String(e.name):"",image_url:N(e.image_url)?String(e.image_url):"",followers_count:N(e.followers_count)?Number(e.followers_count):0,following_count:N(e.following_count)?Number(e.following_count):0,is_following:!!N(e.is_following)&&Boolean(e.is_following),recently_played_artists:Array.isArray(e?.recently_played_artists)?e.recently_played_artists.map((e=>f.fromJSON(e))):[],public_playlists:Array.isArray(e?.public_playlists)?e.public_playlists.map((e=>S.fromJSON(e))):[],total_public_playlists_count:N(e.total_public_playlists_count)?Number(e.total_public_playlists_count):0,is_current_user:!!N(e.is_current_user)&&Boolean(e.is_current_user),is_verified:!!N(e.is_verified)&&Boolean(e.is_verified),edit_profile_disabled:!!N(e.edit_profile_disabled)&&Boolean(e.edit_profile_disabled),report_abuse_disabled:!!N(e.report_abuse_disabled)&&Boolean(e.report_abuse_disabled),has_spotify_name:!!N(e.has_spotify_name)&&Boolean(e.has_spotify_name),has_spotify_image:!!N(e.has_spotify_image)&&Boolean(e.has_spotify_image),color:N(e.color)?Number(e.color):0,is_dismissed:!!N(e.is_dismissed)&&Boolean(e.is_dismissed),user_created_show:N(e.user_created_show)?k.fromJSON(e.user_created_show):void 0,allow_follows:!!N(e.allow_follows)&&Boolean(e.allow_follows),show_follows:!!N(e.show_follows)&&Boolean(e.show_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_following&&(t.is_following=e.is_following),e.recently_played_artists?t.recently_played_artists=e.recently_played_artists.map((e=>e?f.toJSON(e):void 0)):t.recently_played_artists=[],e.public_playlists?t.public_playlists=e.public_playlists.map((e=>e?S.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.user_created_show&&(t.user_created_show=e.user_created_show?k.toJSON(e.user_created_show):void 0),void 0!==e.allow_follows&&(t.allow_follows=e.allow_follows),void 0!==e.show_follows&&(t.show_follows=e.show_follows),t},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,user_created_show:void 0,allow_follows:!1,show_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_following=e.is_following??!1,t.recently_played_artists=e.recently_played_artists?.map((e=>f.fromPartial(e)))||[],t.public_playlists=e.public_playlists?.map((e=>S.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.user_created_show=void 0!==e.user_created_show&&null!==e.user_created_show?k.fromPartial(e.user_created_show):void 0,t.allow_follows=e.allow_follows??!1,t.show_follows=e.show_follows??!1,t}};const k={fromJSON:e=>({episodes:Array.isArray(e?.episodes)?e.episodes.map((e=>u.fromJSON(e))):[],uri:N(e.uri)?String(e.uri):"",total_episode_count:N(e.total_episode_count)?Number(e.total_episode_count):0}),toJSON(e){const t={};return e.episodes?t.episodes=e.episodes.map((e=>e?u.toJSON(e):void 0)):t.episodes=[],void 0!==e.uri&&(t.uri=e.uri),void 0!==e.total_episode_count&&(t.total_episode_count=Math.round(e.total_episode_count)),t},fromPartial(e){const t={episodes:[],uri:"",total_episode_count:0};return t.episodes=e.episodes?.map((e=>u.fromPartial(e)))||[],t.uri=e.uri??"",t.total_episode_count=e.total_episode_count??0,t}};const v={fromJSON:e=>({artists:Array.isArray(e?.artists)?e.artists.map((e=>f.fromJSON(e))):[]}),toJSON(e){const t={};return e.artists?t.artists=e.artists.map((e=>e?f.toJSON(e):void 0)):t.artists=[],t},fromPartial(e){const t={artists:[]};return t.artists=e.artists?.map((e=>f.fromPartial(e)))||[],t}};const f={fromJSON:e=>({uri:N(e.uri)?String(e.uri):"",name:N(e.name)?String(e.name):"",image_url:N(e.image_url)?String(e.image_url):"",followers_count:N(e.followers_count)?Number(e.followers_count):0,is_following:!!N(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},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 y={fromJSON:e=>({public_playlists:Array.isArray(e?.public_playlists)?e.public_playlists.map((e=>S.fromJSON(e))):[],total_public_playlists_count:N(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?S.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},fromPartial(e){const t={public_playlists:[],total_public_playlists_count:0};return t.public_playlists=e.public_playlists?.map((e=>S.fromPartial(e)))||[],t.total_public_playlists_count=e.total_public_playlists_count??0,t}};const S={fromJSON:e=>({uri:N(e.uri)?String(e.uri):"",name:N(e.name)?String(e.name):"",image_url:N(e.image_url)?String(e.image_url):"",followers_count:N(e.followers_count)?Number(e.followers_count):0,owner_name:N(e.owner_name)?String(e.owner_name):"",owner_uri:N(e.owner_uri)?String(e.owner_uri):"",is_following:!!N(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},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 b={fromJSON:e=>({profiles:Array.isArray(e?.profiles)?e.profiles.map((e=>_.fromJSON(e))):[]}),toJSON(e){const t={};return e.profiles?t.profiles=e.profiles.map((e=>e?_.toJSON(e):void 0)):t.profiles=[],t},fromPartial(e){const t={profiles:[]};return t.profiles=e.profiles?.map((e=>_.fromPartial(e)))||[],t}};const _={fromJSON:e=>({uri:N(e.uri)?String(e.uri):"",name:N(e.name)?String(e.name):"",image_url:N(e.image_url)?String(e.image_url):"",followers_count:N(e.followers_count)?Number(e.followers_count):0,following_count:N(e.following_count)?Number(e.following_count):0,is_followed:!!N(e.is_followed)&&Boolean(e.is_followed),is_following:!!N(e.is_following)&&Boolean(e.is_following),is_dismissed:!!N(e.is_dismissed)&&Boolean(e.is_dismissed),is_verified:!!N(e.is_verified)&&Boolean(e.is_verified),color:N(e.color)?Number(e.color):0,allow_follows:!!N(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},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 N(e){return null!=e}var E=n(33892),x=n.n(E);const C={encode:(e,t=x().Writer.create())=>(!0===e.showFollows&&t.uint32(8).bool(e.showFollows),t),decode(e,t){const n=e instanceof x().Reader?e:new(x().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={showFollows:!1};for(;n.pos>>3==1)a.showFollows=n.bool();else n.skipType(7&e)}return a},fromPartial(e){const t={showFollows:!1};return t.showFollows=e.showFollows??!1,t}};const w={encode:(e,t=x().Writer.create())=>(""!==e.username&&t.uint32(10).string(e.username),!0===e.showFollows&&t.uint32(16).bool(e.showFollows),t),decode(e,t){const n=e instanceof x().Reader?e:new(x().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={username:"",showFollows:!1};for(;n.pos>>3){case 1:a.username=n.string();break;case 2:a.showFollows=n.bool();break;default:n.skipType(7&e)}}return a},fromPartial(e){const t={username:"",showFollows:!1};return t.username=e.username??"",t.showFollows=e.showFollows??!1,t}};const I="WEB";function T(e,t){return e.build().withHost(a.H).withPath(`/users/${t}`).withoutMarket().withEndpointIdentifier("/users/{userId}").send()}function A(e){return e.build().withHost(a.H).withPath("/me").withEndpointIdentifier("/me").withoutMarket().send()}function P(e,t,n={}){return e.build().withHost(a.H).withPath(`/me/top/${t}`).withEndpointIdentifier("/me/top/{type}").withQueryParameters(n).withoutMarket().send()}function O(e,t={offset:0,limit:10}){return P(e,"artists",{...t,time_range:"short_term"})}function D(e,t={offset:0,limit:50}){return P(e,"tracks",{...t,time_range:"short_term"})}const R=e=>e.build().withHost(a.Jz).withPath("/product_state").withEndpointIdentifier("/product_state").send(),L=(e,t)=>({ads:"0",catalogue:"premium",country:e,"preferred-locale":t,product:"premium","on-demand":"1"}),F=async(e,t)=>{const n=await e.build().withMethod("GET").withHost(a.hC).withPath(`/profile/${encodeURIComponent((0,i.C)(t))}/following`).withEndpointIdentifier("/profile/{username}/following").send();return b.fromJSON(n.body)},j=async(e,t)=>{const n=await e.build().withMethod("GET").withHost(a.hC).withPath(`/profile/${encodeURIComponent((0,i.C)(t))}/followers`).withEndpointIdentifier("/profile/{username}/followers").send();return b.fromJSON(n.body)},M=async(e,{uri:t,playlists:n=0,artists:s=0,episodes:r=0})=>{const o=await e.build().withHost(a.hC).withPath(`/profile/${encodeURIComponent((0,i.C)(t))}`).withEndpointIdentifier("/profile/{username}").withQueryParameters({playlist_limit:n,artist_limit:s,episode_limit:r}).send();return h.fromJSON(o.body)},U=async(e,{uri:t,offset:n=0,limit:s=200})=>{const r=await e.build().withHost(a.hC).withPath(`/profile/${encodeURIComponent((0,i.C)(t))}/playlists`).withEndpointIdentifier("/profile/{username}/playlists").withQueryParameters({offset:n,limit:s}).send();return y.fromJSON(r.body)},B=async(e,{uri:t,limit:n=10})=>{const s=await e.build().withMethod("GET").withHost(a.hC).withPath(`/profile/${encodeURIComponent((0,i.C)(t))}/artists`).withEndpointIdentifier("/profile/{username}/artists").withQueryParameters({limit:n}).send();return v.fromJSON(s.body)},V=(e,{currentUserUri:t,uri:n})=>e.build().withMethod("GET").withHost(a.x9).withPath("/is_dismissed").withEndpointIdentifier("/is_dismissed").withQueryParameters({source_uri:t,target_uri:n,format:"json"}).send(),H=(e,{currentUserUri:t,uri:n})=>e.build().withMethod("POST").withHost(a.x9).withPath("/dismissed").withEndpointIdentifier("/dismissed").withQueryParameters({source_uri:t,target_uri:n,format:"json"}).send(),G=(e,{currentUserUri:t,uri:n})=>e.build().withMethod("DELETE").withHost(a.x9).withPath("/dismissed").withEndpointIdentifier("/dismissed").withQueryParameters({source_uri:t,target_uri:n,format:"json"}).send(),W=async(e,{uri:t})=>e.build().withHost(a.St).withMethod("GET").withoutMarket().withResponseType("arraybuffer").withPath(`/show-follows/${encodeURIComponent((0,i.C)(t))}`).withEndpointIdentifier("/show-follows/{username}").send().then((e=>C.decode(new Uint8Array(e.body)))),z=async(e,{uri:t,showFollows:n})=>{const s=w.encode(w.fromPartial({username:(0,i.C)(t),showFollows:n}));await e.build().withHost(a.St).withMethod("POST").withoutMarket().withBody(s.finish()).withPath("/show-follows").withEndpointIdentifier("/show-follows").send()}},69898:(e,t,n)=>{"use strict";n.d(t,{h:()=>r,u:()=>s});var i=n(72755),a=n(27555);function s(e){return e.build().withHost(a.Cw).withPath("/verifications/").withEndpointIdentifier("/verifications/").send()}function r(e,t){return e.build().withMethod(i.Method.PUT).withHost(a.Cw).withPath(`/verifications/${t}/`).withEndpointIdentifier("/verifications/{verificationId}/").send()}},30616:(e,t,n)=>{"use strict";n.d(t,{V:()=>a,m:()=>i});class i extends Error{static fromResponse(e,t){return new i({message:e.statusText,url:e.url,method:t,status:e.status,response:e})}constructor(e){const{message:t,url:n,method:i,status:a,response:s}=e;super(t),this.name="HttpResponseError",this.requestUrl=n,this.requestMethod=i,this.status=a,this.response=s}}class a extends i{constructor(e){const{timeout:t,url:n,method:i}=e;super({message:`${i.toUpperCase()} ${n} timed out (${t}ms)`,url:n,method:i,status:503}),this.name="HttpRequestTimeoutError",this.timeout=t}}},10370:(e,t,n)=>{"use strict";let i;n.d(t,{c:()=>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}static setRequestImplementation(e){i=e}getRequestImplementation(){return i}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}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}onBeforeSend(e){}onAfterSend(e){}async send(){const e=new i(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._shouldSendAuthorization&&this._accessToken&&e.addHeader("Authorization",`Bearer ${this._accessToken}`),e.addHeader("Accept","application/json"),this._includeCredentials&&e.includeCredentials(),this._shouldSendGlobalHeaders&&this._globalRequestHeaders.length>0&&this._globalRequestHeaders.forEach((([t,n])=>{e.addHeader(t,n)}));for(let t=0;t(this.onAfterSend(),e))).catch((e=>{throw this.onAfterSend(e),e}))}}var s=n(3787);class r{constructor(e){this._accessToken=null,this._market="",this._locale="",this._globalRequestHeaders=[],this._RequestImplementation=e||s.e}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}}},3787:(e,t,n)=>{"use strict";n.d(t,{e:()=>a});var i=n(97411);class a{constructor(e,t,n){return this.method=e,this.url=t,this.postData=null,this.queryParameters=void 0,this.responseType="json",this._headers={},this._authorize=n,this._includeCredentials=!1,this}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}async send(){const e=(0,i.k)(),t=new URLSearchParams(this.queryParameters).toString(),n=`${this.url}${t?`?${t}`:""}`,a={method:this.method,responseType:this.responseType,headers:this._headers,authorize:this._authorize,rejectNotOk:!0};return this._includeCredentials&&(a.credentials="include"),this.postData&&(this._headers["Content-Type"]?.startsWith("application/json;charset=UTF-8")?a.payload=JSON.stringify(this.postData):a.payload=this.postData),e.request(n,a).then((e=>e)).catch((e=>{throw e}))}}},78950:(e,t,n)=>{"use strict";n.d(t,{B:()=>l,k:()=>o});var i=n(73229),a=n(44007),s=n(10427);const r=(0,a.v)();async function o(){await r.post("sp://desktop/v1/logout")}async function l(){const e=new i.ProductStateClient((0,s.G)());return{enableShows:await e.getValues(i.GetValuesRequest.fromPartial({})).then((e=>"1"===e.pairs["shows-collection"]))}}},51818:(e,t,n)=>{"use strict";n.d(t,{B:()=>a,a:()=>s});var i=n(88566);let a=function(e){return e.UPDATE="update",e}({});class s extends i.r{}},57849:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});const i={isAuthorized:!1,token:null,retryAttempt:null,retryAt:null}},65204:(e,t,n)=>{"use strict";function i(e){return Date.now()>=e.accessTokenExpirationTimestampMs}function a(e,t){let n=null,i=null;return async({preferCached:a=!1}={})=>{if(a&&n)return n;if(i)return i;i=e();try{n=await i,t(n)}finally{i=null}return n}}n.d(t,{k:()=>a,p:()=>i})},87467:(e,t,n)=>{"use strict";n.d(t,{K:()=>a,V:()=>s});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'AuthorizationContext' without 'AuthorizationProvider'!");return e}},84334:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(59496),a=n(51818),s=n(87467);function r(){const e=(0,s.V)(),[t,n]=(0,i.useState)(e.getState());return(0,i.useEffect)((()=>{const t=e.getEvents(),i=a.B.UPDATE,s=e=>{n(e.data)};return t.addListener(i,s),()=>{t.removeListener(i,s)}}),[e]),t}},66490:(e,t,n)=>{"use strict";n.d(t,{e:()=>s});var i=n(59496),a=n(87467);function s(){const e=(0,a.V)(),{canGetSessionTransferURL:t}=e.getCapabilities();return{openURL:(0,i.useCallback)(((e,t="_blank")=>{window.open(e,t)}),[]),openURLWithSessionTransfer:(0,i.useCallback)((async(n,i="_blank")=>{if(t){const t=await e.getSessionTransferURL(n);window.open(t,i)}else window.open(n,i)}),[e,t]),useGetURLWithSessionTransfer:n=>{const[a,s]=(0,i.useState)(n);return(0,i.useEffect)((()=>{t&&async function(){const t=await e.getSessionTransferURL(n);s(t)}()}),[n]),a}}}},59580:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>a,tL:()=>r,tp:()=>s});const i=864e5;class a{_cache=new Map;constructor(e=null){if(this._ttl=e,null!==e&&(e<1||e>i))throw new Error("TTL should be between 1 (1 ms) and 86400000 (1 day).")}isExpired(e){return null!==e.expiry&&e.expiry{this.isExpired(e)&&this._cache.delete(t)}))}}class s extends a{constructor(e,t){super(e),setInterval(this.cleanup.bind(this),t)}}class r extends a{constructor(){super(null)}async deleteOnResolve(e,t){const n=await t;return this.delete(e),n}create(e,t){const n=super.create(e,t);return this.deleteOnResolve(e,n)}set(e,t){super.set(e,this.deleteOnResolve(e,t))}}},7182:(e,t,n)=>{"use strict";n.d(t,{p:()=>w,J:()=>E});var i=n(50346),a=n(94041),s=n(59496),r=(n(72071),n(74913));const o=Spicetify.GraphQL.Definitions["extractedColors"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"extractedColors"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}}]}}]}}]}}]},l=Spicetify.GraphQL.Definitions["extractedColorsAndImageSources"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"extractedColorsAndImageSources"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColors"}},{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}}]},d=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForAlbumEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorAndImageForAlbumEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albumUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColorsAndImageSources"}}]}}]}}]}}]}},...l.definitions,...o.definitions,...r.rD.definitions,...r.rA.definitions]},c=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForArtistEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorAndImageForArtistEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColorsAndImageSources"}}]}}]}}]}}]}}]}},...l.definitions,...o.definitions,...r.rD.definitions,...r.rA.definitions]},u=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForEpisodeEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorAndImageForEpisodeEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"episodeUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColorsAndImageSources"}}]}}]}}]}}]}},...l.definitions,...o.definitions,...r.rD.definitions,...r.rA.definitions]},m=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForPlaylistEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorAndImageForPlaylistEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playlistV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"images"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColorsAndImageSources"}}]}}]}}]}}]}}]}},...l.definitions,...o.definitions,...r.rD.definitions,...r.rA.definitions]},p=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForPodcastEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorAndImageForPodcastEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"podcastUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColorsAndImageSources"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColorsAndImageSources"}}]}}]}}]}}]}},...l.definitions,...o.definitions,...r.rD.definitions,...r.rA.definitions]},g=Spicetify.GraphQL.Definitions["fetchExtractedColorAndImageForTrackEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorAndImageForTrackEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trackUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColorsAndImageSources"}}]}}]}}]}}]}}]}},...l.definitions,...o.definitions,...r.rD.definitions,...r.rA.definitions]},h=Spicetify.GraphQL.Definitions["fetchExtractedColorForAlbumEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorForAlbumEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albumUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Album"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColors"}}]}}]}}]}}]}},...o.definitions]},k=Spicetify.GraphQL.Definitions["fetchExtractedColorForArtistEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorForArtistEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"artistUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Artist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"visuals"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarImage"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColors"}}]}}]}}]}}]}}]}},...o.definitions]},v=Spicetify.GraphQL.Definitions["fetchExtractedColorForEpisodeEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorForEpisodeEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"episodeUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColors"}}]}}]}}]}}]}},...o.definitions]},f=Spicetify.GraphQL.Definitions["fetchExtractedColorForPlaylistEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorForPlaylistEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playlistV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"images"},arguments:[{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColors"}}]}}]}}]}}]}}]}},...o.definitions]},y=Spicetify.GraphQL.Definitions["fetchExtractedColorForPodcastEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorForPodcastEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"podcastUnionV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColors"}}]}}]}}]}}]}},...o.definitions]},S=Spicetify.GraphQL.Definitions["fetchExtractedColorForTrackEntity"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColorForTrackEntity"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uri"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trackUnion"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uri"},value:{kind:"Variable",name:{kind:"Name",value:"uri"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"extractedColors"}}]}}]}}]}}]}}]}},...o.definitions]};var b=n(41921),_=n(75207);const N={artist:k,album:h,episode:v,playlist:f,"playlist-v2":f,show:y,track:S};function E(e,t=a.Sns){const{request:n}=(0,s.useContext)(b.Ax),[r,o]=(0,s.useState)(t);return(0,s.useEffect)((()=>{(async()=>{const t=(0,i.EC)(e);if(!t)return;const a=N[t.type];if(!a)return void console.error(`The entity (${e}) you're trying to use it not supported for this query`);const s=await n(a,{uri:t.toURI()}),{albumUnion:r,artistUnion:l,episodeUnionV2:d,playlistV2:c,podcastUnionV2:u,trackUnion:m}=s?.data||{};I(r)?o(x(r.coverArt)):T(l)?o(x(l.visuals?.avatarImage)):A(d)?o(x(d.coverArt)):P(c)?o(x(c.images?.items?.[0])):O(u)?o(x(u?.coverArt)):D(m)&&o(x(m.albumOfTrack?.coverArt))})()}),[e,n]),r}function x(e){return e?.extractedColors?.colorDark.hex}const C={artist:c,album:d,episode:u,playlist:m,"playlist-v2":m,show:p,track:g};function w(e,t=a.Sns,n){const{request:r}=(0,s.useContext)(b.Ax),[o,l]=(0,s.useState)(t),[d,c]=(0,s.useState)(n),u=(0,s.useCallback)((e=>{const{url:t}=(0,_.X)(e?.sources)||{},n=x(e);t&&c(t),n&&l(n)}),[c]);return(0,s.useEffect)((()=>{(async()=>{const t=(0,i.EC)(e);if(!t)return;const n=C[t.type];if(!n)return void console.error(`The entity (${e}) you're trying to use it not supported for this query`);const a=await r(n,{uri:t.toURI()}),{albumUnion:s,artistUnion:o,episodeUnionV2:l,playlistV2:d,podcastUnionV2:c,trackUnion:m}=a?.data||{};I(s)?u(s.coverArt):T(o)?u(o.visuals.avatarImage):A(l)?u(l.coverArt):P(d)?u(d.images?.items?.[0]):O(c)||function(e){if(!e||0===Object.keys(e).length)return!1;return"Audiobook"===e.__typename}(c)?u(c.coverArt):D(m)&&u(m.albumOfTrack?.coverArt)})()}),[e,r,u]),[d,o]}function I(e){return!!e}function T(e){return!!e}function A(e){return!(!e||0===Object.keys(e).length)&&"Episode"===e.__typename}function P(e){return!!e}function O(e){return!(!e||0===Object.keys(e).length)&&"Podcast"===e.__typename}function D(e){return!!e}},28031:(e,t,n)=>{"use strict";n.d(t,{l:()=>s,S:()=>r});var i=n(84120);n(72071);const a=Spicetify.GraphQL.Definitions["fetchExtractedColors"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchExtractedColors"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extractedColors"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ExtractedColors"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"colorRaw"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}},{kind:"Field",name:{kind:"Name",value:"colorDark"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}},{kind:"Field",name:{kind:"Name",value:"colorLight"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hex"}},{kind:"Field",name:{kind:"Name",value:"isFallback"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]};function s(e){return i.Il.fromHex(e)}async function r(e,t){Array.isArray(t)||(t=[t]);const n=await e(a,{uris:t}),{extractedColors:i}=n?.data||{};if(!i)throw new Error("Failed to fetch multiple extracted colors!");return i.map((e=>"ExtractedColors"!==e.__typename?null:{colorRaw:s(e.colorRaw.hex),colorDark:s(e.colorDark.hex),colorLight:s(e.colorLight.hex),isFallback:e.colorRaw.isFallback&&e.colorDark.isFallback&&e.colorLight.isFallback}))}},40332:(e,t,n)=>{"use strict";n.d(t,{EC:()=>d,ab:()=>l});var i=n(94041),a=n(28031),s=n(59580),r=n(87680);const o=new s.Ct,l={colorRaw:(0,a.l)(i.Sns),colorDark:(0,a.l)(i.Sns),colorLight:(0,a.l)(i.Sns)};async function d(e,t){Array.isArray(t)||(t=[t]);const i=await Promise.all(t.map((e=>o.get(e))));if(i.every((e=>!!e)))return i;try{const i=await(0,a.S)(e,t),s=await function(e,t){const i=t.map((async(t,i)=>{if(t&&!t.isFallback)return t;if(""===e[i])return l;if(!(0,r.O)()){const{extractColors:t}=await Promise.all([n.e(1814),n.e(1005)]).then(n.bind(n,1005));return t(e[i])}return l}));return Promise.all(i)}(t,i);return s.forEach(((e,n)=>{o.set(t[n],Promise.resolve(e))})),s}catch{if(!(0,r.O)()){const{extractColors:e}=await Promise.all([n.e(1814),n.e(1005)]).then(n.bind(n,1005));return Promise.all(t.map((t=>{const n=e(t);return o.set(t,n),n})))}return Promise.resolve([l])}}},80657:(e,t,n)=>{"use strict";n.d(t,{b:()=>d});var i=n(59496),a=n(94041),s=n(84120),r=n(40332),o=n(41921),l=n(9102);function d(e=null,t=a.Sns,n="colorRaw"){const{request:d}=(0,i.useContext)(o.Ax),{data:c}=(0,l.useQuery)(["extracted-color",e],(()=>e?(0,r.EC)(d,e):null),{cacheTime:864e5,staleTime:216e5,enabled:!!e});return c?.at(0)?.[n].toCSS(s.jT.HEX)??t}},76144:(e,t,n)=>{"use strict";n.d(t,{j:()=>i});let i=function(e){return e[e.HEX=0]="HEX",e[e.HEXA=1]="HEXA",e[e.RGB=2]="RGB",e[e.RGBA=3]="RGBA",e[e.HSL=4]="HSL",e[e.HSLA=5]="HSLA",e}({})},84120:(e,t,n)=>{"use strict";n.d(t,{jT:()=>i.j,Il:()=>g,bS:()=>h});var i=n(76144);function a(e,t,n=1e-6){return Math.abs(e-t)[a-f\d]{2})(?[a-f\d]{2})(?[a-f\d]{2})(?[a-f\d]{2})?$/i.exec(e),n=t?.groups?.r,i=t?.groups?.g,a=t?.groups?.b,s=t?.groups?.a;if(void 0===n||void 0===i||void 0===a)throw new Error(`Invalid hex color code "${e}"`);return{r:n,g:i,b:a,a:s}}function l(e){const{a:t}=o(e);if(!t)return 1;return function(e,t,n){const i=e.toLocaleString("en",{useGrouping:!1,minimumFractionDigits:t,maximumFractionDigits:n});return Number(i)}(parseInt(t,16)/255,0,2)}const d=.07,c=.02;function u(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function m({rgb:{r:e,g:t,b:n}}){return.2126*u(e/255)+.7152*u(t/255)+.0722*u(n/255)}function p(e,t){const n=m(e),i=m(t);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)}class g{constructor(e,t,n,i=1){this.rgb=e,this.hsl=t,this.hsv=n,this.a=i}static BLACK=g.fromRGB({r:0,g:0,b:0});static WHITE=g.fromRGB({r:255,g:255,b:255});static fromRGB(e,t){if(e.r<0||e.g<0||e.b<0||e.r>255||e.g>255||e.b>255||t&&t<0||t&&t>1)throw Error(`Invalid RGB color: ${JSON.stringify(e)}, alpha: ${t}`);const n=function({r:e,g:t,b:n}){const i=e/255,s=t/255,r=n/255,o=Math.max(i,s,r),l=Math.min(i,s,r),d=o-l;let c;const u=(o+l)/2,m=o;c=a(d,0)?0:a(m,i)?60*(0+(s-r)/d):a(m,s)?60*(2+(r-i)/d):60*(4+(i-s)/d),c%=360,c<0&&(c+=360);const p=0===u||1===u?0:(m-u)/Math.min(u,1-u);return{h:Math.round(c),s:p,l:u}}(e),i=function({r:e,g:t,b:n}){const i=e/255,s=t/255,r=n/255,o=Math.max(i,s,r),l=o-Math.min(i,s,r);let d;const c=o;d=a(l,0)?0:a(c,i)?60*(0+(s-r)/l):a(c,s)?60*(2+(r-i)/l):60*(4+(i-s)/l),d%=360,d<0&&(d+=360);const u=0===c?0:l/c;return{h:Math.round(d),s:u,v:c}}(e);return new g(e,n,i,t)}static fromHex(e,t){const n=function(e){const{r:t,g:n,b:i}=o(e);return{r:parseInt(t,16),g:parseInt(n,16),b:parseInt(i,16)}}(e),i=l(e);return g.fromRGB(n,t??i)}static fromHSV(e,t){const n=function({h:e,s:t,v:n}){const i=n*t,a=e/60,s=i*(1-Math.abs(a%2-1));let r;r=a>=0&&a<=1?[i,s,0]:a>1&&a<=2?[s,i,0]:a>2&&a<=3?[0,i,s]:a>3&&a<=4?[0,s,i]:a>4&&a<=5?[s,0,i]:a>5&&a<=6?[i,0,s]:[0,0,0];const o=n-i;return{r:Math.round(255*(r[0]+o)),g:Math.round(255*(r[1]+o)),b:Math.round(255*(r[2]+o))}}(e);return g.fromRGB(n,t)}static fromHSL(e,t){const n=function({h:e,s:t,l:n}){const i=(1-Math.abs(2*n-1))*t,a=e/60,s=i*(1-Math.abs(a%2-1));let r;r=a>=0&&a<=1?[i,s,0]:a>1&&a<=2?[s,i,0]:a>2&&a<=3?[0,i,s]:a>3&&a<=4?[0,s,i]:a>4&&a<=5?[s,0,i]:a>5&&a<=6?[i,0,s]:[0,0,0];const o=n-i/2;return{r:Math.round(255*(r[0]+o)),g:Math.round(255*(r[1]+o)),b:Math.round(255*(r[2]+o))}}(e);return g.fromRGB(n,t)}static fromCSS(e,t){const n=function(e,t){const n=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(n){const[e,i,a,s]=n.slice(1),r=t??parseFloat(s);return g.fromRGB({r:parseInt(e,10),g:parseInt(i,10),b:parseInt(a,10)},Number.isNaN(r)?void 0:r)}return null}(e,t);if(n)return n;const i=function(e,t){const n=e.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(n){const e=n[1];return g.fromHex(e,t)}return null}(e,t);if(i)return i;const a=function(e,t){const n=e.match(/^hsla?\((\d+),\s*(\d+)%,\s*(\d+)%(?:,\s*(\d*(?:\.\d+)?))?\)$/);if(n){const[e,i,a,s]=n.slice(1),r=t??parseFloat(s);return g.fromHSL({h:parseInt(e,10),s:parseInt(i,10)/100,l:parseInt(a,10)/100},Number.isNaN(r)?void 0:r)}return null}(e,t);if(a)return a;throw new Error(`Invalid or unsupported CSS color: ${e}`)}toCSS(e){switch(e){case i.j.HEX:return`#${s((t=this).rgb.r)}${s(t.rgb.g)}${s(t.rgb.b)}`;case i.j.HEXA:return function(e){return`#${s(e.rgb.r)}${s(e.rgb.g)}${s(e.rgb.b)}${s(Math.floor(255*e.a))}`}(this);case i.j.RGB:return function(e){return`rgb(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b})`}(this);case i.j.RGBA:return function(e){return`rgba(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b}, ${e.a})`}(this);case i.j.HSL:return function(e){const{h:t,s:n,l:i}=e.hsl;return`hsl(${t}, ${r(n)}, ${r(i)})`}(this);case i.j.HSLA:return function(e){const{h:t,s:n,l:i}=e.hsl;return`hsla(${t}, ${r(n)}, ${r(i)}, ${e.a})`}(this);default:throw new Error("Invalid or unsupported CSSColorFormat!")}var t}contrastAdjust(e,t=4.5){let n=g.BLACK;return"light"===e&&(n=g.WHITE),function(e,t,n){if(t!==g.BLACK&&t!==g.WHITE)throw new Error("Only supports contrast calculation between black and white.");let i=p(e,t);if(i>=n)return e;let a=e.hsv.v,s=t===g.WHITE?-1*c:c,r=Number.MAX_VALUE,o=null;for(let t=0;t<100&&r>d&&a>=0&&a<=1;t++){a=Math.min(a+s,1),o=g.fromHSV({h:e.hsv.h,s:e.hsl.s,v:a}),i=p(o,g.WHITE);const t=Math.round(10*Math.abs(i-n))/10;t>r&&(s*=-.5),r=t}return null===o?e:o}(this,n,t)}toString(){return`${this.rgb.r},${this.rgb.g},${this.rgb.b},${this.a}`}stringify(){return JSON.stringify(this)}static parse(e){const{rgb:t,hsl:n,hsv:i,a}=JSON.parse(e);return new g(t,n,i,a)}}function h(e){if(!e?.colorDark.isFallback)return e?.colorDark.hex}},17407:(e,t,n)=>{"use strict";n.d(t,{F:()=>a,M:()=>s});var i=n(88566);let a=function(e){return e.UPDATE="update",e}({});class s extends i.r{}},60430:(e,t,n)=>{"use strict";n.d(t,{D:()=>s,h:()=>a});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'ConnectContext' without 'ConnectProvider'!");return e}},76126:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var i=n(59496),a=n(60430);function s(e,t){const n=(0,i.useRef)(t),s=(0,a.D)();n.current=t,(0,i.useEffect)((()=>{const t=s.getEvents(),i=e=>n.current(e);return t.addListener(e,i),()=>{t.removeListener(e,i)}}),[e,s])}},83682:(e,t,n)=>{"use strict";n.d(t,{$:()=>l,O:()=>d});var i=n(59496),a=n(17407),s=n(67189),r=n(60430),o=n(76126);const l={connectionStatus:s.TK.NOT_CONNECTED,activeDevice:null,connectingDevice:null,devices:[]};function d(){const e=(0,r.D)(),[t,n]=(0,i.useState)(e.getState());return(0,o.l)(a.F.UPDATE,(e=>n(e.data))),null===t?l:t}},67189:(e,t,n)=>{"use strict";n.d(t,{TK:()=>i,Yi:()=>a,ms:()=>o,uP:()=>s});let i=function(e){return e.NOT_CONNECTED="not_connected",e.CONNECTING="connecting",e.CONNECTED="connected",e}({}),a=function(e){return e.UNKNOWN="unknown",e.COMPUTER="computer",e.TABLET="tablet",e.SMARTPHONE="smartphone",e.SPEAKER="speaker",e.TV="tv",e.AVR="avr",e.STB="stb",e.AUDIO_DONGLE="audio_dongle",e.GAME_CONSOLE="game_console",e.CAST_VIDEO="cast_video",e.CAST_AUDIO="cast_audio",e.AUTOMOBILE="automobile",e.SMARTWATCH="smartwatch",e.CHROMEBOOK="chromebook",e.CarThing="carthing",e.HomeThing="homething",e}({}),s=function(e){return e.CONNECTING="connecting",e.INCOMPATIBLE="incompatible",e.UNAVAILABLE="unavailable",e.LOGGED_IN="logged_in",e.NOT_LOGGED_IN="not_logged_in",e.SLEEPING="sleeping",e.PREMIUM_REQUIRED="premium_required",e.NOT_INSTALLED="not_installed",e.UNSUPPORTED_URI="unsupported_uri",e.NOT_AUTHORIZED="not_authorized",e.UNKNOWN="unknown",e.AD_PLAYING="ad_playing",e.NARRATION="narration",e.WAKING_UP="waking_up",e.TIMED_OUT_WAKEUP="timed_out_wakeup",e}({});const r=["cast","connect"];function o(e){return Boolean(r.find((t=>t===e)))}},59102:(e,t,n)=>{"use strict";n.d(t,{H:()=>a,yN:()=>s});const i=!1;function a(...e){r((()=>{console.error(...e)}))}function s(...e){r((()=>{console.warn(...e)}))}function r(e){i&&e()}},47613:(e,t,n)=>{"use strict";n.d(t,{G:()=>a,P:()=>s});var i=n(23830);function a(e){return Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})}class s{constructor(e,t){this.resolver=e,this.requestFactory=t}head(e,t){return this.resolve(i.n.HEAD,e,null,t).then((e=>e.headers))}get(e,t,n){return this.resolve(i.n.GET,e,t,n).then((e=>e.body))}post(e,t=null,n){return this.resolve(i.n.POST,e,t,n).then((e=>e.body))}put(e,t,n){return this.resolve(i.n.PUT,e,t,n).then((e=>e.body))}del(e,t,n){return this.resolve(i.n.DELETE,e,t,n).then((e=>e.body))}patch(e,t,n){return this.resolve(i.n.PATCH,e,t,n).then((e=>e.body))}sub(e,t,n=(e=>{console.error(e)}),a=null,s={}){const r=this.requestFactory(i.n.SUB,e,s,a);return this.resolver.resolve(r,(e=>t(e.body)),n)}postSub(e,t=null,n,a=(e=>{console.error(e)})){const s=this.requestFactory(i.n.SUB,e,{},t);return this.resolver.resolve(s,(e=>n(e.body)),a)}request(e,t,n=null,i){return this.resolve(e,t,n,i)}resolve(e,t,n=null,i={}){return new Promise(((a,s)=>{const r=this.requestFactory(e,t,i,n);this.resolver.resolve(r,a,s)}))}}},44007:(e,t,n)=>{"use strict";n.d(t,{v:()=>d});var i=n(47613),a=n(23830);class s{constructor(e,t,n){this.status=e,this.headers=(0,i.G)(t),this.body=this.parseBody(n)}static isSuccessStatus(e){return e>=200&&e<=299}static parse(e){const t=JSON.parse(e),n=this.isSuccessStatus(t.status)&&t.body?t.body:"";return new s(t.status,t.headers||{},n)}parseBody(e){return""!==e?JSON.parse(e):{}}}var r=n(16556),o=n.n(r);class l{constructor(e,t){this.send=e,this.cancel=t}resolve(e,t,n){const i=this.send({request:e.stringify(),persistent:e.method===a.n.SUB,onSuccess:i=>this.onSuccess(e,i,t,n),onFailure:(t,i)=>this.onFailure(e,t,i,n)});return{cancel:()=>{this.cancel(i)}}}onSuccess(e,t,n,i){try{const a=s.parse(t);if(s.isSuccessStatus(a.status))n(a);else{i(o()(a.status,`${e.method} request to ${e.uri} failed with status code ${a.status}`))}}catch(t){const n=t instanceof Error?t.message:"(unknown error object)";i(new Error(`${e.method} request to ${e.uri} failed with exception '${n}'`))}}onFailure(e,t,n,i){i(new Error(`${e.method} request to ${e.uri} request failed with error code ${t} (${n})`))}}function d(){const e=function(){const e=n.g.window||{};return new l(e.sendCosmosRequest,e.cancelCosmosRequest)}(),t=(...e)=>new a.c(...e);return new i.P(e,t)}},23830:(e,t,n)=>{"use strict";n.d(t,{c:()=>s,n:()=>a});var i=n(47613);let a=function(e){return e.DELETE="DELETE",e.GET="GET",e.HEAD="HEAD",e.POST="POST",e.PUT="PUT",e.SUB="SUB",e.PATCH="PATCH",e}({});class s{constructor(e,t,n,a){this.uri=t,this.headers=(0,i.G)(n),this.body=this.stringifyBody(a||""),this.method=e}stringify(){return JSON.stringify({headers:this.headers,body:this.body,method:this.method,uri:this.uri})}stringifyBody(e){return"string"!=typeof e?JSON.stringify(e):e}static parse(e){const t=JSON.parse(e);return new s(t.method,t.uri,t.headers,t.body)}}},67565:(e,t,n)=>{"use strict";n.d(t,{Tg:()=>i,fd:()=>c,$e:()=>a,ae:()=>v});let i=function(e){return e.ALBUM="album",e.ARTIST="artist",e.TRACK="track",e.PLAYLIST="playlist",e.NOW_PLAYING="now_playing",e}({}),a=function(e){return e.STAR_WARS="star_wars",e.MANDALORIAN="mandalorian",e}({});var s=n(59496),r=n(72102),o=n(28418),l=n(4637);const d=(0,s.createContext)(null),c=({children:e,surface:t,uris:n})=>{const i=(0,r.NY)((()=>({surface:t,uris:n?.filter(o.K)??[]})),[t,n]);return(0,l.jsx)(d.Provider,{value:i,children:e})};var u=n(50346);const m={[a.STAR_WARS]:[(0,u._b)("spotify:playlist:37i9dQZF1DXaUaRhCgtpCo"),(0,u._b)("spotify:playlist:69BOXIItwwyxTgdz6flzvU"),(0,u._b)("spotify:playlist:37i9dQZF1DWUgUvAPAFxdh")],[a.MANDALORIAN]:[(0,u._b)("spotify:album:4xFmHg5dYvaqmn9ZNQpjWL"),(0,u._b)("spotify:album:4AOyNiCYswORQsTLxyGYQ4"),(0,u._b)("spotify:album:5r9JMvwLPm2HNY5WgBZ8Q7"),(0,u._b)("spotify:album:43PIYGro37xm0Y8iXMP5Pc"),(0,u._b)("spotify:album:249DL9DzLAZRyxkpOa5w5w"),(0,u._b)("spotify:album:71GgO9VtkVN2grqmpZo4Y2"),(0,u._b)("spotify:album:4PMsqnolvUGyj1ZRxE1aki"),(0,u._b)("spotify:album:4UbdaOH1jy1l9EG9vLFCle"),(0,u._b)("spotify:album:2NxNzw1ohPc2Hhjaq2j3tW"),(0,u._b)("spotify:album:4xUXCZfINYIV1DdZKomeVx"),(0,u._b)("spotify:album:2JtB7K4gMmfC7Ow9Y4pz4b"),(0,u._b)("spotify:album:3wuE2JeCx2Vmvk7b1c9fnI"),(0,u._b)("spotify:playlist:37i9dQZF1DWTEvftu9yFoF")]};function p(e,t){if(null===t)return null;for(const[n,i]of e)if(i.some((e=>(0,u.U4)(t,e))))return n;return null}function g(e){const t=Object.entries(m),n=Array.isArray(e)?e:[e];for(const e of n){const n=p(t,e);if(null!==n)return n}return null}var h=n(99948),k=n(22508);function v(){const e=(0,s.useContext)(d),t=(0,h.Y)((e=>e?.context.uri??null)),n=(0,h.Y)((e=>{const t=e?.item??void 0;return(0,k.G_)(t)?t.album.uri:null}));if(null===e)return{surface:null,isViewingVariant:null,isPlayingVariant:null};const{surface:i,uris:a}=e;return{surface:i,isViewingVariant:g(a),isPlayingVariant:g([t,n])}}},71166:(e,t,n)=>{"use strict";n.d(t,{TB:()=>s,cd:()=>l,iZ:()=>o,IM:()=>d});const i=432;var a=n(58934);const s=(e,t,n)=>(n&&e.searchParams.set("t",n.toString()),t&&(e.searchParams.has("utm_source")||e.searchParams.set("utm_source",t)),e.searchParams.has("utm_medium")||e.searchParams.set("utm_medium",function(){let e;if("undefined"==typeof window)return!1;if(void 0!==window.orientation)switch(window.orientation){case 0:case 180:e=window.screen.width;break;default:e=window.screen.height}else{const t=window.screen.orientation&&window.screen.orientation.type||window.screen.msOrientation||"";if(0===t.indexOf("portrait"))e=window.screen.width;else{if(0!==t.indexOf("landscape"))return!1;e=window.screen.height}}return e<=i}()?"mobile":"desktop"),e);function r(e,t=!0){const n=new URL("undefined"!=typeof location&&location.href?location.href:"https://open.spotify.com");let i=null;if(e){const a=e.toURL();i=new URL(a),t&&n.searchParams.forEach(((e,t)=>{i.searchParams.set(t,e)}))}else i=n,t||(i.search="");i.searchParams.delete("nd"),i.searchParams.delete("fallback"),i.searchParams.set("go","1");const s=(0,a.Z)("config");return"string"==typeof s?.correlationId&&i.searchParams.append("sp_cid",s.correlationId),i}function o(e,t){const n=r(e,t);return n.searchParams.set("fallback","getapp"),n}function l(e,t){const n=r(e,t);return n.searchParams.set("fallback","download"),n}function d(){return new URL(`https://www.spotify.com/download${window.location.search}`)}},88566:(e,t,n)=>{"use strict";n.d(t,{r:()=>a});var i=n(53016);class a{constructor(e=new i.vp){this._emitter=e,this._emitter=e||new i.vp}addListener(e,t,n){return this._emitter.addListener(e,t,n),this}removeListener(e,t,n){return this._emitter.removeListener(e,t,n),this}onAddListener(e,t){return this._emitter.onAddListener(e,t),this}onRemoveListener(e,t){return this._emitter.onRemoveListener(e,t),this}emit(e,t){return this._emitter.emit(e,t)}emitSync(e,t){return this._emitter.emitSync(e,t)}}},10427:(e,t,n)=>{"use strict";n.d(t,{G:()=>s});var i=n(52165);class a{constructor(e,t){this.send=e,this.cancel=t}callSingle(e){return new Promise(((t,n)=>{this.call(e,!1,t,n)}))}callStream(e,t){return this.call(e,!0,t,(e=>{throw e}))}call(e,t,n,a){const s=this.send({request:JSON.stringify({method:t?"SUB":"POST",uri:(r=e.service,o=e.method,`sp://esperanto/${r}/${o}`),headers:{"Esperanto-Encoding":"base64"},body:(0,i.US)(e.payload)}),persistent:t,onSuccess:t=>{const s=JSON.parse(t);200!==s.status?a(new Error(`${e.service}.${e.method} failed with ${s.status} ${s.body}`)):n((0,i.dN)(s.body))},onFailure:(t,n)=>{a(new Error(`${e.service}.${e.method} failed with code: ${n}`))}});var r,o;const l=this.cancel;return{cancel(){l(s)}}}}function s(){return function(){const e=n.g.window||{};return new a(e.sendCosmosRequest,e.cancelCosmosRequest)}()}},18634:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i=(0,n(59496).createContext)({request:()=>{throw new Error("GraphQL Context not initialized with Request object")}})},49258:(e,t,n)=>{"use strict";n.d(t,{Y:()=>s});var i=n(4377);function a(e){return"OperationDefinition"===e.kind}function s(e){const t=e.definitions.filter(a);if(0===t.length)throw new Error("No GraphQL operation definition found in document!");if(t.length>1)throw new Error("Too many GraphQL operation definitions found in document! Expected exactly one.");const[n]=t;if(void 0===n.name)throw new Error("Nameless GraphQL operations are not supported!");return{type:n.operation,name:n.name.value,body:(0,i.S)(e)}}},41921:(e,t,n)=>{"use strict";n.d(t,{Ax:()=>d.A,$C:()=>u,QM:()=>p,PQ:()=>o});var i=n(27555),a=n(58116),s=n(30616),r=n(49258);Spicetify.GraphQL.Handler=o;function o(e){Spicetify.GraphQL.Context??=e;return async(t,n,o={})=>{const d=(0,r.Y)(t);if("subscription"===d.type)throw new Error("GraphQL subscriptions are not supported!");const c=await async function(e,t,n,r={}){const o=await async function(e){const t=await a.k.hash(e.body);return{persistedQuery:{version:1,sha256Hash:t}}}(t);try{let a;return a="mutation"===t.type?await async function(e,t,n,a,s){const{name:r}=t;return e.build().withHost(i.wI).withMethod("POST").withoutMarket().withPath("/query").withJsonContentType().withBody({variables:n,operationName:r,extensions:a}).withQueryParameters({...s}).withEndpointIdentifier(`/query/${r}`).send()}(e,t,n,o,r):await async function(e,t,n,a,s){const{name:r}=t;return e.build().withHost(i.wI).withMethod("GET").withoutMarket().withPath("/query").withJsonContentType().withQueryParameters({operationName:r,variables:JSON.stringify(n),extensions:JSON.stringify(a),...s}).withEndpointIdentifier(`/query/${r}`).send()}(e,t,n,o,r),a.body?.errors?.some((e=>"PersistedQueryNotFound"===e.message))?l(e,t,n,o,r):a}catch(i){const a=405;if(i instanceof s.m&&i.status===a)return l(e,t,n,o,r);throw i}}(e,d,n,o);return c.body}}async function l(e,t,n,a,s){const{name:r,body:o}=t;return e.build().withHost(i.wI).withMethod("POST").withoutMarket().withPath("/query").withJsonContentType().withBody({operationName:r,variables:n,query:o,extensions:a}).withQueryParameters({...s}).withEndpointIdentifier(`/query/${r}`).send()}var d=n(18634),c=n(4637);const u=({request:e,children:t})=>(0,c.jsx)(d.A.Provider,{value:{request:e},children:t}),m=50;function p(e,t=m){return async(n,i,a,s)=>{const r=[],o=Math.max(...a.map((e=>i[e]?.length??0)));for(let l=0;l{o[e]=o[e]?.slice(l,l+t)})),void 0!==s?r.push(e(n,o,s)):r.push(e(n,o))}return(await Promise.all(r)).map((e=>{if(null===e||void 0!==e.errors||null===e.data)throw new Error("GraphQL batched query failed!");return e.data}))}}},50100:(e,t,n)=>{"use strict";async function i(e,t,n){try{const i=await e(t,n);return i?.errors?Promise.reject(i?.errors):i}catch(e){return e instanceof Error?Promise.reject([{message:e.message}]):Promise.reject(null)}}n.d(t,{J:()=>i})},72071:(e,t,n)=>{"use strict";n.d(t,{a:()=>d,y:()=>l});var i=n(59496),a=n(9102),s=n(18634),r=n(49258),o=n(50100);const l=6e4;function d(e,t,n){const{request:l}=(0,i.useContext)(s.A),{type:d,name:c}=(0,r.Y)(e),u="query"===d,m=u&&n?.cacheTime?n?.cacheTime:0,p=u&&n?.staleTime?n?.staleTime:0,g=[c,t],{data:h,isLoading:k,error:v}=(0,a.useQuery)(g,(async()=>(0,o.J)(l,e,t)),{cacheTime:m,staleTime:p,enabled:n?.enabled});return{data:h?.data??null,extensions:h?.extensions,error:v??null,loading:k}}},88664:(e,t,n)=>{"use strict";n.d(t,{Ik:()=>o,TL:()=>a,WF:()=>r,f9:()=>s,j2:()=>l,xX:()=>d});var i=n(50346);n(53502);let a=function(e){return e[e.YES=0]="YES",e[e.NO_IN_FOLDER=1]="NO_IN_FOLDER",e[e.NO=2]="NO",e}({});const s=[i.JM.ALBUM,i.JM.ARTIST,i.JM.PLAYLIST_V2,i.JM.SHOW,i.JM.FOLDER],r=[i.JM.PLAYLIST_V2,i.JM.FOLDER];class o extends Error{constructor(e){super(`"${e}" is not a valid YLX filter.`),Object.setPrototypeOf(this,o.prototype)}}class l extends Error{constructor(e){super(`"${e}" is not a valid YLX sort order.`),Object.setPrototypeOf(this,l.prototype)}}class d extends Error{constructor(e){super(`${e}`),Object.setPrototypeOf(this,d.prototype)}}},36472:(e,t,n)=>{"use strict";n.d(t,{EN:()=>o,EW:()=>r,Sv:()=>l,XD:()=>a,pT:()=>s});var i=n(88566);let a=function(e){return e.ALBUMS="albums",e.ARTISTS="artists",e.SHOWS="shows",e.TRACKS="tracks",e.EPISODES="episodes",e.BOOKS="books",e}({}),s=function(e){return e.ADD="add",e.REMOVE="remove",e}({}),r=function(e){return e.UPDATE="update",e.UPDATE_ITEM="update_item",e.UPDATE_PIN="update_pin",e.UPDATE_PIN_ERROR="update_pin_error",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({}),o=function(e){return e[e.TOO_MANY_PINS=0]="TOO_MANY_PINS",e[e.NO_PIN_IN_FOLDER=1]="NO_PIN_IN_FOLDER",e}({});class l extends i.r{}},53502:(e,t,n)=>{"use strict";n.d(t,{R0:()=>i,cj:()=>s,pg:()=>a});let i=function(e){return e.TEXT="TEXT",e}({}),a=function(e){return e.CONTAINS="CONTAINS",e}({});function s(e){if(e)return"string"==typeof e?{field:i.TEXT,operator:a.CONTAINS,value:e.trim()}:e}},87843:(e,t,n)=>{"use strict";n.d(t,{As:()=>i,VN:()=>d,_1:()=>a,aW:()=>r,hx:()=>o,lY:()=>s,yW:()=>l});let i=function(e){return e.ASC="ASC",e.DESC="DESC",e}({}),a=function(e){return e.NAME="NAME",e.ARTIST_NAME="ARTIST_NAME",e.ALBUM_NAME="ALBUM_NAME",e.ADDED_AT="ADDED_AT",e}({}),s=function(e){return e.NAME="NAME",e.ARTIST_NAME="ARTIST_NAME",e.ADDED_AT="ADDED_AT",e}({}),r=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}({}),d=function(e){return e.NAME="NAME",e.ADDED_AT="ADDED_AT",e}({})},8191:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var i=n(87642),a=n(36472);class s extends a.Sv{_numListeners=0;constructor(e){super(),this._cache=e,this._aggregator=(0,i.PP)(this.onBatchChanged.bind(this),100),this.onAddListener(a.EW.UPDATE,(()=>{1==++this._numListeners&&this.subscribeToUpdates()})),this.onRemoveListener(a.EW.UPDATE,(()=>{0==--this._numListeners&&this.unsubscribeFromUpdates()})),this.onAddListener(a.EW.UPDATE_ITEM,(e=>{1==++this._numListeners&&this.subscribeToUpdates(),this._aggregator.subscribe(e.data.options.uri)})),this.onRemoveListener(a.EW.UPDATE_ITEM,(e=>{0==--this._numListeners&&this.unsubscribeFromUpdates(),this._aggregator.unsubscribe(e.data.options.uri)}))}emitUpdateItems(e,t){Array.isArray(t)?e.forEach(((e,n)=>{this._cache.set(e,t[n]),this.emit(a.EW.UPDATE_ITEM,{uri:e,isInLibrary:t[n]})})):e.forEach((e=>{this._cache.set(e,t),this.emit(a.EW.UPDATE_ITEM,{uri:e,isInLibrary:t})}))}emitUpdatePin(e,t){this.emit(a.EW.UPDATE_PIN,{uri:e,isPinned:t})}emitUpdatePinErrorTooManyPins(e,t){this.emit(a.EW.UPDATE_PIN_ERROR,{reason:a.EN.TOO_MANY_PINS,uri:e,maximumPinnedItems:t})}emitOperationSync(e,t){return this.emitSync(a.EW.OPERATION,{operation:e,uris:t}).defaultPrevented}emitOperationComplete(e,t,n=null){this.emit(a.EW.OPERATION_COMPLETE,{operation:e,uris:t,error:n})}}},78315:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var i=n(50346);function a(e,t){if(t){if("spotify:collection:tracks"===e)return(0,i.wG)(t).toURI();if("spotify:collection:your-episodes"===e)return(0,i.wG)(t,"your-episodes").toURI()}return"spotify:collection:local-files"===e?"spotify:local-files":e}},47481:(e,t,n)=>{"use strict";n.d(t,{$R:()=>N,IC:()=>f,J5:()=>b,Vp:()=>v,XT:()=>y,Yo:()=>k,tl:()=>_});var i=n(22508),a=n(53502),s=n(88664),r=n(9144),o=n(29251),l=n(3802),d=n(9374),c=n(65481);const u={[a.R0.TEXT]:"text"},m={[a.pg.CONTAINS]:"contains"};function p(e){const{field:t,operator:n,value:i}=e;if(t!==a.R0.TEXT||n!==a.pg.CONTAINS)throw new Error("Invalid filter params!");return`${u[t]} ${m[n]} ${encodeURIComponent(i)}`}const g={[a.R0.TEXT]:"text"},h={[a.pg.CONTAINS]:"=^#"};function k(e){return void 0===e?"":p(e)}function v(e){return void 0===e?"":e.value}function f(e,t){if(void 0===t)return;const n=function(e){const{field:t,operator:n,value:i}=e;if(t!==a.R0.TEXT||n!==a.pg.CONTAINS)throw new Error("Invalid filter params!");return`${g[t]} ${h[n]} "${i}"`}(t),s=p(t);e.url=`context://${e.uri}?filter=${encodeURIComponent(s)}`,e.metadata=e.metadata??{},e.metadata[i.sb.FILTERING_PREDICATE]=n,e.metadata[i.sb.LIST_UTIL_FILTER]=s}function y(e){const t=e?.toString()??"";switch(e){case r.YourLibraryFilters_Filter.ALBUM:return{id:t,name:l.ag.get("shared.library.filter.album")};case r.YourLibraryFilters_Filter.ARTIST:return{id:t,name:l.ag.get("shared.library.filter.artist")};case r.YourLibraryFilters_Filter.PLAYLIST:return{id:t,name:l.ag.get("shared.library.filter.playlist")};case r.YourLibraryFilters_Filter.SHOW:return{id:t,name:l.ag.get("shared.library.filter.show")};case r.YourLibraryFilters_Filter.BOOK:return{id:t,name:l.ag.get("shared.library.filter.book")};case r.YourLibraryFilters_Filter.DOWNLOADED:return{id:t,name:l.ag.get("shared.library.filter.downloaded")};case r.YourLibraryFilters_Filter.BY_YOU:return{id:t,name:l.ag.get("shared.library.filter.by-you")};case r.YourLibraryFilters_Filter.BY_SPOTIFY:return{id:t,name:l.ag.get("shared.library.filter.by-spotify")};case r.YourLibraryFilters_Filter.UNPLAYED:return{id:t,name:l.ag.get("shared.library.filter.unplayed")};case r.YourLibraryFilters_Filter.IN_PROGRESS:return{id:t,name:l.ag.get("shared.library.filter.in-progress")};case r.YourLibraryFilters_Filter.WRITABLE:case r.YourLibraryFilters_Filter.UNRECOGNIZED:return{id:t,name:r.YourLibraryFilters_Filter[e]};default:throw(0,o._)(e),new s.Ik(`${e}`)}}const S={[r.YourLibraryFilters_Filter.PLAYLIST]:0,[r.YourLibraryFilters_Filter.SHOW]:1,[r.YourLibraryFilters_Filter.BOOK]:2,[r.YourLibraryFilters_Filter.ALBUM]:3,[r.YourLibraryFilters_Filter.ARTIST]:4,[r.YourLibraryFilters_Filter.BY_YOU]:5,[r.YourLibraryFilters_Filter.BY_SPOTIFY]:6,[r.YourLibraryFilters_Filter.IN_PROGRESS]:7,[r.YourLibraryFilters_Filter.UNPLAYED]:8,[r.YourLibraryFilters_Filter.DOWNLOADED]:9,[r.YourLibraryFilters_Filter.WRITABLE]:-1,[r.YourLibraryFilters_Filter.UNRECOGNIZED]:-1};function b(e){return e.filter((e=>-1!==S[e])).sort(((e,t)=>S[e]-S[t]))}function _(e){return e.filter((({id:e})=>![r.YourLibraryFilters_Filter.PLAYLIST].includes((0,c.zl)(e))))}function N(e){switch(e){case r.YourLibraryFilters_Filter.ALBUM:return d.p.ALBUM;case r.YourLibraryFilters_Filter.ARTIST:return d.p.ARTIST;case r.YourLibraryFilters_Filter.PLAYLIST:return d.p.PLAYLIST;case r.YourLibraryFilters_Filter.SHOW:return d.p.SHOW;case r.YourLibraryFilters_Filter.BOOK:return d.p.AUDIOBOOK;case r.YourLibraryFilters_Filter.DOWNLOADED:return"downloaded";default:return null}}},32724:(e,t,n)=>{"use strict";n.d(t,{AV:()=>d,Et:()=>g,G9:()=>k,KO:()=>u,R4:()=>p,Tk:()=>v,sy:()=>y,wV:()=>S,y0:()=>l});var i=n(22508),a=n(87843),s=n(9144),r=n(29251),o=n(3802);function l(e){if(void 0===e)return;const{field:t}=e;if(t===a.lY.NAME)return s.YourLibrarySortOrder_SortOrder.NAME;if(t===a.lY.ARTIST_NAME)return s.YourLibrarySortOrder_SortOrder.CREATOR;if(t===a.lY.ADDED_AT)return s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED;throw new Error("Invalid album sort params!")}function d(e){if(void 0===e)return;const{field:t}=e;if(t===a.hx.NAME)return s.YourLibrarySortOrder_SortOrder.NAME;if(t===a.hx.ADDED_AT)return s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED;throw new Error("Invalid artist sort params!")}var c=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}(c||{});function u({field:e,order:t}){switch(e){case a._1.NAME:return t===a.As.ASC?c.TRACK_NAME_ASC:c.TRACK_NAME_DESC;case a._1.ARTIST_NAME:return t===a.As.ASC?c.TRACK_ARTIST_NAME_ASC:c.TRACK_ARTIST_NAME_DESC;case a._1.ALBUM_NAME:return t===a.As.ASC?c.TRACK_ALBUM_NAME_ASC:c.TRACK_ALBUM_NAME_DESC;case a._1.ADDED_AT:return t===a.As.ASC?c.TRACK_ADDED_AT_ASC:c.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[i.sb.SORTING_CRITERIA]=function({field:e,order:t}){switch(e){case a._1.NAME:return t===a.As.ASC?m.TRACK_NAME_ASC:m.TRACK_NAME_DESC;case a._1.ARTIST_NAME:return t===a.As.ASC?m.TRACK_ARTIST_NAME_ASC:m.TRACK_ARTIST_NAME_DESC;case a._1.ALBUM_NAME:return t===a.As.ASC?m.TRACK_ALBUM_NAME_ASC:m.TRACK_ALBUM_NAME_DESC;case a._1.ADDED_AT:return t===a.As.ASC?m.TRACK_ADDED_AT_ASC:m.TRACK_ADDED_AT_DESC;default:throw new Error("Invalid track sort params!")}}(t),e.metadata[i.sb.LIST_UTIL_SORT]=u(t))}function g(e){if(void 0===e)return;const{field:t}=e;if(t===a.aW.NAME)return s.YourLibrarySortOrder_SortOrder.NAME;if(t===a.aW.ADDED_AT)return s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED;throw new Error("Invalid show sort params!")}var h=function(e){return e.EPISODE_NAME_ASC="name ASC",e.EPISODE_ADDED_AT_DESC="addTime DESC,name",e.SHOW_NAME_ASC="show.name ASC,addTime ASC",e}(h||{});function k(e){return void 0===e?"":function({field:e,order:t}){if(e===a.yW.NAME&&t===a.As.ASC)return h.EPISODE_NAME_ASC;if(e===a.yW.ADDED_AT&&t===a.As.DESC)return h.EPISODE_ADDED_AT_DESC;if(e===a.yW.SHOW_NAME&&t===a.As.ASC)return h.SHOW_NAME_ASC;throw new Error("Invalid episode sort params!")}(e)}function v(e){if(void 0!==e){if(e===a.VN.NAME)return s.YourLibrarySortOrder_SortOrder.NAME;if(e===a.VN.ADDED_AT)return s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED;throw new Error("Invalid book sort params!")}}function f(e){return S(e)?.[0]}function y(e,t){const n=e?.toString()??"";switch(e){case s.YourLibrarySortOrder_SortOrder.CREATOR:return{id:n,name:t===s.YourLibraryFilters_Filter.BOOK?o.ag.get("shared.library.sort-by.author"):o.ag.get("shared.library.sort-by.creator")};case s.YourLibrarySortOrder_SortOrder.CUSTOM:return{id:n,name:o.ag.get("shared.library.sort-by.custom")};case s.YourLibrarySortOrder_SortOrder.NAME:return{id:n,name:o.ag.get("shared.library.sort-by.name")};case s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED:return{id:n,name:o.ag.get("shared.library.sort-by.recently-added")};case s.YourLibrarySortOrder_SortOrder.RECENTLY_PLAYED:return{id:n,name:o.ag.get("shared.library.sort-by.recently-played")};case s.YourLibrarySortOrder_SortOrder.RECENTLY_PLAYED_OR_ADDED:return{id:n,name:o.ag.get("shared.library.sort-by.recently-played-or-added")};case s.YourLibrarySortOrder_SortOrder.RECENTLY_UPDATED:return{id:n,name:o.ag.get("shared.library.sort-by.recently-updated")};case s.YourLibrarySortOrder_SortOrder.RELEVANCE:return{id:n,name:o.ag.get("shared.library.sort-by.relevance")};case s.YourLibrarySortOrder_SortOrder.UNRECOGNIZED:case void 0:return f(t);default:return(0,r._)(e),f(t)}}function S(e){let t=[];switch(e){case s.YourLibraryFilters_Filter.ALBUM:case s.YourLibraryFilters_Filter.DOWNLOADED:case s.YourLibraryFilters_Filter.WRITABLE:case s.YourLibraryFilters_Filter.BY_YOU:case s.YourLibraryFilters_Filter.BY_SPOTIFY:case s.YourLibraryFilters_Filter.UNPLAYED:case s.YourLibraryFilters_Filter.IN_PROGRESS:case s.YourLibraryFilters_Filter.UNRECOGNIZED:case s.YourLibraryFilters_Filter.BOOK:t=[s.YourLibrarySortOrder_SortOrder.RECENTLY_PLAYED_OR_ADDED,s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED,s.YourLibrarySortOrder_SortOrder.NAME,s.YourLibrarySortOrder_SortOrder.CREATOR];break;case s.YourLibraryFilters_Filter.SHOW:t=[s.YourLibrarySortOrder_SortOrder.RECENTLY_PLAYED_OR_ADDED,s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED,s.YourLibrarySortOrder_SortOrder.NAME,s.YourLibrarySortOrder_SortOrder.CREATOR,s.YourLibrarySortOrder_SortOrder.RECENTLY_UPDATED];break;case s.YourLibraryFilters_Filter.PLAYLIST:t=[s.YourLibrarySortOrder_SortOrder.RECENTLY_PLAYED_OR_ADDED,s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED,s.YourLibrarySortOrder_SortOrder.NAME,s.YourLibrarySortOrder_SortOrder.CREATOR,s.YourLibrarySortOrder_SortOrder.CUSTOM];break;case s.YourLibraryFilters_Filter.ARTIST:t=[s.YourLibrarySortOrder_SortOrder.RECENTLY_PLAYED_OR_ADDED,s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED,s.YourLibrarySortOrder_SortOrder.NAME];break;case void 0:t=[s.YourLibrarySortOrder_SortOrder.RECENTLY_PLAYED_OR_ADDED,s.YourLibrarySortOrder_SortOrder.RECENTLY_ADDED,s.YourLibrarySortOrder_SortOrder.NAME,s.YourLibrarySortOrder_SortOrder.CREATOR];break;default:(0,r._)(e)}return t.map((t=>y(t,e)))}},65481:(e,t,n)=>{"use strict";function i(e){return Number(e)}function a(e){return e?i(e):void 0}function s(e){return e?function(e){return Number(e)}(e):void 0}n.d(t,{K_:()=>a,gD:()=>s,zl:()=>i})},46164:(e,t,n)=>{"use strict";n.d(t,{H:()=>i});const i=(0,n(59496).createContext)(null)},46843:(e,t,n)=>{"use strict";n.d(t,{I:()=>r});var i=n(32724),a=n(47481),s=n(53502);function r(e,t,n){const r={uri:e};return(0,i.R4)(r,t),(0,a.IC)(r,(0,s.cj)(n)),r}},66632:(e,t,n)=>{"use strict";n.d(t,{y:()=>u,Z:()=>c});var i=n(59496),a=n(46164),s=n(86109),r=n(50346),o=n(36472),l=n(29058);function d(e,t){const n=(0,i.useContext)(a.H),d=(0,i.useContext)(s.B);(0,i.useEffect)((()=>function(e,t,n,i){const a=(0,r.EC)(n)?.type;switch(a){case r.JM.ALBUM:case r.JM.ARTIST:case r.JM.SHOW:case r.JM.TRACK:case r.JM.EPISODE:{const t=e.getEvents(),a=e=>{e.data.uri===n&&i(e.data.isInLibrary)};return t.addListener(o.EW.UPDATE_ITEM,a,{uri:n}),()=>{t.removeListener(o.EW.UPDATE_ITEM,a,{uri:n})}}case r.JM.PLAYLIST:case r.JM.PLAYLIST_V2:{const e=t.getEvents(),a=e=>{e.data.uri===n&&i(e.data.isInRootlist)};return e.addListener(l.Yt.UPDATE_ITEM,a,{uri:n}),()=>{e.removeListener(l.Yt.UPDATE_ITEM,a,{uri:n})}}default:return()=>{}}}(n,d,e,t)),[n,d,e,t])}function c(e,t=!1){const n=(0,i.useContext)(a.H),o=(0,i.useContext)(s.B),[l,c]=(0,i.useState)(function(e,t,n){const i=(0,r.EC)(n)?.type;switch(i){case r.JM.ALBUM:case r.JM.ARTIST:case r.JM.SHOW:case r.JM.TRACK:case r.JM.EPISODE:return e.containsSync(n);case r.JM.PLAYLIST:case r.JM.PLAYLIST_V2:return t.containsSync(n)}}(n,o,e)||t),u=(0,i.useCallback)((async t=>{await async function(e,t,n,i){const a=(0,r.EC)(n)?.type;switch(a){case r.JM.ALBUM:case r.JM.ARTIST:case r.JM.SHOW:case r.JM.EPISODE:case r.JM.TRACK:i?e.add(n):e.remove(n);break;case r.JM.PLAYLIST:case r.JM.PLAYLIST_V2:i?t.add([n],{before:"start"}):t.remove([{uri:n}])}}(n,o,e,t)}),[e,n,o]);return d(e,c),[l,u]}function u(){return(0,i.useContext)(a.H)}},74150:(e,t,n)=>{"use strict";n.d(t,{MY:()=>u,j$:()=>m});var i=n(59496),a=n(36472),s=n(46164),r=n(79041),o=n(72102),l=n(53016);const d=a.EW.UPDATE;function c(e,t){const n=(0,i.useContext)(s.H),[a,o]=(0,i.useState)(null),c=(0,i.useCallback)((async i=>{e===i.data.list&&o(await t(n))}),[n,e,t]);return(0,i.useEffect)((()=>{c(new l.B(d,{list:e}))}),[c,e]),(0,r.b)(d,c),a}function u(e){return c(a.XD.TRACKS,(0,o.jP)((t=>t.getTracks(e)),[e]))}function m(e){return c(a.XD.EPISODES,(0,o.jP)((t=>t.getEpisodes(e)),[e]))}},79041:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var i=n(59496),a=n(46164);function s(e,t){const n=(0,i.useContext)(a.H);(0,i.useEffect)((()=>{const i=n.getEvents();return i.addListener(e,t),()=>{i.removeListener(e,t)}}),[e,t,n])}},13791:(e,t,n)=>{"use strict";n.d(t,{G:()=>a,b:()=>i});const i="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}({})},70556:(e,t,n)=>{"use strict";n.d(t,{L:()=>s,p:()=>a});var i=n(88566);let a=function(e){return e.UPDATE="update",e}({});class s extends i.r{}},89039:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var i=n(59496);const a=new Error("Local files API used without being initialized.\n Did you provide the context in a a parent component?'"),s=(0,i.createContext)({getCapabilities:()=>{throw a},getTracks:()=>{throw a},getScannerStatus:()=>{throw a},getSources:()=>{throw a},mutateDefaultSource:()=>{throw a},addFolder:()=>{throw a},removeFolder:()=>{throw a}})},11685:(e,t,n)=>{"use strict";n.d(t,{h:()=>s,u:()=>o});var i=n(89039),a=n(4637);const s=({instance:e,children:t})=>(0,a.jsx)(i.t.Provider,{value:e,children:t});var r=n(59496);function o(){return(0,r.useContext)(i.t).getCapabilities()}},39097:(e,t,n)=>{"use strict";n.d(t,{I:()=>a});var i=n(94972);function a(){return(0,i.S)()[0]}},94972:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var i=n(59496),a=n(89039);function s(){const e=(0,i.useContext)(a.t),[t,n]=(0,i.useState)(e.getIsEnabled());(0,i.useEffect)((()=>{const t=e.subscribeIsEnabled(n);return()=>t()}),[e]);return[t,(0,i.useCallback)((t=>e.setIsEnabled(t)),[e])]}},7477:(e,t,n)=>{"use strict";n.d(t,{K:()=>l});var i=n(23329),a=n(95012);class s extends Error{constructor(){super("Local storage quota exceeded."),Object.setPrototypeOf(this,s.prototype)}}var r=n(50954),o=n(88607);class l{items={};constructor(e){this.namespace=e,this._events=new o.q,this.listenToStorageEvents()}createNamespacedKey(e){return`${this.namespace}:${e}`}parseLocalStorageValue(e,t){try{const n=JSON.parse(t);return this.items[e]=n,n}catch(n){return console.error(`Failed to parse value ${t} for key ${e}`),new r.y(t)}}listenToStorageEvents(){window.addEventListener("storage",(e=>{const{key:t,newValue:n,oldValue:i}=e;if(null!==t&&null!==n&&t.startsWith(this.namespace)&&n!==i){const e=this.parseLocalStorageValue(t,n);this.items[t]=e,this._events.emit(o.u.UPDATE,{key:t.replace(`${this.namespace}:`,""),value:e})}}))}getEvents(){return this._events}getItem(e){const t=this.createNamespacedKey(e),n=this.items[t];if(t in this.items)return n;const i=window.localStorage.getItem(t);return null===i?new a.d(e):this.parseLocalStorageValue(t,i)}setItem(e,t){const n=this.createNamespacedKey(e),a=JSON.stringify(t);if(window.localStorage.getItem(n)!==a){this.items[n]=t;try{window.localStorage.setItem(n,a),this._events.emitSync(o.u.UPDATE,{key:e,value:t})}catch{console.error("LocalStorage quota exceeded (no space left)"),(0,i.PC)(new s)}}}clearItem(e){const t=this.createNamespacedKey(e);window.localStorage.removeItem(t),delete this.items[t]}}},29514:(e,t,n)=>{"use strict";n.d(t,{os:()=>r,um:()=>o});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useLocalStorageAPI must be used within a LocalStorageProvider");return e}},88607:(e,t,n)=>{"use strict";n.d(t,{q:()=>s,u:()=>a});var i=n(88566);let a=function(e){return e.UPDATE="update",e}({});class s extends i.r{}},95012:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});class i extends Error{constructor(e){super(`"${e}" not found in local storage.`),Object.setPrototypeOf(this,i.prototype)}}},50954:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});class i extends Error{constructor(e){super(`Failed to JSON.parse value "${e}"`),Object.setPrototypeOf(this,i.prototype)}}},9407:(e,t,n)=>{"use strict";n.d(t,{z:()=>o});var i=n(59496),a=n(72102),s=n(29514),r=n(88607);const o=(e,t)=>{const n=(0,s.um)(),o=(0,i.useRef)(n.getItem(e)),[l,d]=(0,i.useState)(o.current instanceof Error?t:o.current),c=(0,i.useCallback)((t=>{o.current=t,n.setItem(e,t)}),[e,n]);return(0,a.KW)((()=>{o.current instanceof Error&&c(t)}),[t,c]),(0,i.useEffect)((()=>{const t=n.getEvents(),i=t=>{t.data.key===e&&(o.current=t.data.value,d(t.data.value))},a=n.getItem(e);return a instanceof Error||d(a),t.addListener(r.u.UPDATE,i),()=>{t.removeListener(r.u.UPDATE,i)}}),[e,n]),[l,c]}},84179:(e,t,n)=>{"use strict";n.d(t,{j2:()=>r,t:()=>s});var i=n(33892),a=n.n(i);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 r={encode(e,t=a().Writer.create()){void 0!==e.none&&d.encode(e.none,t.uint32(10).fork()).ldelim(),void 0!==e.legacy&&l.encode(e.legacy,t.uint32(18).fork()).ldelim(),void 0!==e.basic&&o.encode(e.basic,t.uint32(26).fork()).ldelim(),void 0!==e.upsellLink&&c.encode(e.upsellLink,t.uint32(34).fork()).ldelim(),void 0!==e.engagement&&u.encode(e.engagement,t.uint32(50).fork()).ldelim(),void 0!==e.multiPass&&p.encode(e.multiPass,t.uint32(74).fork()).ldelim(),void 0!==e.consumptionCapped&&m.encode(e.consumptionCapped,t.uint32(106).fork()).ldelim(),void 0!==e.prompt&&h.encode(e.prompt,t.uint32(42).fork()).ldelim(),!0===e.isUserMemberOfAtLeastOneGroup&&t.uint32(64).bool(e.isUserMemberOfAtLeastOneGroup),t.uint32(82).fork();for(const n of e.unlockedBy)t.int32(n);return t.ldelim(),t},decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={none:void 0,legacy:void 0,basic:void 0,upsellLink:void 0,engagement:void 0,multiPass:void 0,consumptionCapped:void 0,prompt:void 0,isUserMemberOfAtLeastOneGroup:!1,unlockedBy:[]};for(;n.pos>>3){case 1:if(10!=e)break;s.none=d.decode(n,n.uint32());continue;case 2:if(18!=e)break;s.legacy=l.decode(n,n.uint32());continue;case 3:if(26!=e)break;s.basic=o.decode(n,n.uint32());continue;case 4:if(34!=e)break;s.upsellLink=c.decode(n,n.uint32());continue;case 6:if(50!=e)break;s.engagement=u.decode(n,n.uint32());continue;case 9:if(74!=e)break;s.multiPass=p.decode(n,n.uint32());continue;case 13:if(106!=e)break;s.consumptionCapped=m.decode(n,n.uint32());continue;case 5:if(42!=e)break;s.prompt=h.decode(n,n.uint32());continue;case 8:if(64!=e)break;s.isUserMemberOfAtLeastOneGroup=n.bool();continue;case 10:if(80==e){s.unlockedBy.push(n.int32());continue}if(82==e){const e=n.uint32()+n.pos;for(;n.posr.fromPartial(e??{}),fromPartial(e){const t={none:void 0,legacy:void 0,basic:void 0,upsellLink:void 0,engagement:void 0,multiPass:void 0,consumptionCapped:void 0,prompt:void 0,isUserMemberOfAtLeastOneGroup:!1,unlockedBy:[]};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?l.fromPartial(e.legacy):void 0,t.basic=void 0!==e.basic&&null!==e.basic?o.fromPartial(e.basic):void 0,t.upsellLink=void 0!==e.upsellLink&&null!==e.upsellLink?c.fromPartial(e.upsellLink):void 0,t.engagement=void 0!==e.engagement&&null!==e.engagement?u.fromPartial(e.engagement):void 0,t.multiPass=void 0!==e.multiPass&&null!==e.multiPass?p.fromPartial(e.multiPass):void 0,t.consumptionCapped=void 0!==e.consumptionCapped&&null!==e.consumptionCapped?m.fromPartial(e.consumptionCapped):void 0,t.prompt=void 0!==e.prompt&&null!==e.prompt?h.fromPartial(e.prompt):void 0,t.isUserMemberOfAtLeastOneGroup=e.isUserMemberOfAtLeastOneGroup??!1,t.unlockedBy=e.unlockedBy?.map((e=>e))||[],t}};const o={encode:(e,t=a().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),t),decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:""};for(;n.pos>>3){case 1:if(10!=e)break;s.title=n.string();continue;case 2:if(18!=e)break;s.body=n.string();continue;case 3:if(26!=e)break;s.cta=n.string();continue}if(4==(7&e)||0==e)break;n.skipType(7&e)}return s},create:e=>o.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:""};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t}};const l={encode:(e,t=a().Writer.create())=>t,decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={};for(;n.posl.fromPartial(e??{}),fromPartial:e=>({})};const d={encode:(e,t=a().Writer.create())=>t,decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={};for(;n.posd.fromPartial(e??{}),fromPartial:e=>({})};const c={encode:(e,t=a().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),""!==e.url&&t.uint32(34).string(e.url),t),decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:"",url:""};for(;n.pos>>3){case 1:if(10!=e)break;s.title=n.string();continue;case 2:if(18!=e)break;s.body=n.string();continue;case 3:if(26!=e)break;s.cta=n.string();continue;case 4:if(34!=e)break;s.url=n.string();continue}if(4==(7&e)||0==e)break;n.skipType(7&e)}return s},create:e=>c.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 u={encode:(e,t=a().Writer.create())=>(""!==e.header&&t.uint32(10).string(e.header),""!==e.title&&t.uint32(18).string(e.title),""!==e.body&&t.uint32(26).string(e.body),""!==e.cta&&t.uint32(34).string(e.cta),""!==e.dismiss&&t.uint32(42).string(e.dismiss),""!==e.actionType&&t.uint32(50).string(e.actionType),""!==e.bodySecondary&&t.uint32(58).string(e.bodySecondary),t),decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={header:"",title:"",body:"",cta:"",dismiss:"",actionType:"",bodySecondary:""};for(;n.pos>>3){case 1:if(10!=e)break;s.header=n.string();continue;case 2:if(18!=e)break;s.title=n.string();continue;case 3:if(26!=e)break;s.body=n.string();continue;case 4:if(34!=e)break;s.cta=n.string();continue;case 5:if(42!=e)break;s.dismiss=n.string();continue;case 6:if(50!=e)break;s.actionType=n.string();continue;case 7:if(58!=e)break;s.bodySecondary=n.string();continue}if(4==(7&e)||0==e)break;n.skipType(7&e)}return s},create:e=>u.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 m={encode:(e,t=a().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),t),decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:""};for(;n.pos>>3){case 1:if(10!=e)break;s.title=n.string();continue;case 2:if(18!=e)break;s.body=n.string();continue;case 3:if(26!=e)break;s.cta=n.string();continue}if(4==(7&e)||0==e)break;n.skipType(7&e)}return s},create:e=>m.fromPartial(e??{}),fromPartial(e){const t={title:"",body:"",cta:""};return t.title=e.title??"",t.body=e.body??"",t.cta=e.cta??"",t}};const p={encode(e,t=a().Writer.create()){""!==e.title&&t.uint32(10).string(e.title),""!==e.soaDescription&&t.uint32(18).string(e.soaDescription);for(const n of e.soaPartner)g.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",soaDescription:"",soaPartner:[]};for(;n.pos>>3){case 1:if(10!=e)break;s.title=n.string();continue;case 2:if(18!=e)break;s.soaDescription=n.string();continue;case 3:if(26!=e)break;s.soaPartner.push(g.decode(n,n.uint32()));continue}if(4==(7&e)||0==e)break;n.skipType(7&e)}return s},create:e=>p.fromPartial(e??{}),fromPartial(e){const t={title:"",soaDescription:"",soaPartner:[]};return t.title=e.title??"",t.soaDescription=e.soaDescription??"",t.soaPartner=e.soaPartner?.map((e=>g.fromPartial(e)))||[],t}};const g={encode:(e,t=a().Writer.create())=>(""!==e.displayName&&t.uint32(10).string(e.displayName),""!==e.linkUrl&&t.uint32(18).string(e.linkUrl),""!==e.logoUrl&&t.uint32(26).string(e.logoUrl),t),decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={displayName:"",linkUrl:"",logoUrl:""};for(;n.pos>>3){case 1:if(10!=e)break;s.displayName=n.string();continue;case 2:if(18!=e)break;s.linkUrl=n.string();continue;case 3:if(26!=e)break;s.logoUrl=n.string();continue}if(4==(7&e)||0==e)break;n.skipType(7&e)}return s},create:e=>g.fromPartial(e??{}),fromPartial(e){const t={displayName:"",linkUrl:"",logoUrl:""};return t.displayName=e.displayName??"",t.linkUrl=e.linkUrl??"",t.logoUrl=e.logoUrl??"",t}};const h={encode:(e,t=a().Writer.create())=>(""!==e.title&&t.uint32(10).string(e.title),""!==e.body&&t.uint32(18).string(e.body),""!==e.cta&&t.uint32(26).string(e.cta),""!==e.url&&t.uint32(34).string(e.url),t),decode(e,t){const n=e instanceof a().Reader?e:a().Reader.create(e);let i=void 0===t?n.len:n.pos+t;const s={title:"",body:"",cta:"",url:""};for(;n.pos>>3){case 1:if(10!=e)break;s.title=n.string();continue;case 2:if(18!=e)break;s.body=n.string();continue;case 3:if(26!=e)break;s.cta=n.string();continue;case 4:if(34!=e)break;s.url=n.string();continue}if(4==(7&e)||0==e)break;n.skipType(7&e)}return s},create:e=>h.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}}},82538:(e,t,n)=>{"use strict";n.d(t,{Om:()=>r,PQ:()=>s,T1:()=>a,jK:()=>l,mc:()=>o,wk:()=>i});const i=["9a8d2f0ce77a4e248bb71fefcb557637","407d482703b9480899f54656c3ed7728","58bd3c95768941ea9eb4350aaa033eb3","65b708073fc0480ea92a077233ca87bd"];let a=function(e){return e.ONLINE="online",e.OFFLINE="offline",e.FORCED_OFFLINE="forced_offline",e.RECONNECTING="reconnecting",e}({}),s=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}({}),r=function(e){return e.NO="no",e.YES="yes",e.DOWNLOADING="downloading",e.WAITING="waiting",e}({}),o=function(e){return e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE",e[e.NO_PERMISSION=2]="NO_PERMISSION",e}({}),l=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}({})},21113:(e,t,n)=>{"use strict";n.d(t,{N:()=>s,X:()=>a});var i=n(88566);let a=function(e){return e.UPDATE_CONNECTIVITY="update_connectivity",e.UPDATE_CAPABILITIES="update_capabilities",e.UPDATE_TOTAL_PROGRESS="update_total_progress",e.UPDATE_CONTEXT_PROGRESS="update_context_progress",e.UPDATE_AVAILABILITY="update_availability",e.ERROR="error",e}({});class s extends i.r{}},16470:(e,t,n)=>{"use strict";n.d(t,{t:()=>l});var i=n(49288),a=n(29251),s=n(67189),r=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}(r||{});const o=(0,i.y)(r);function l(e){if(o(e))switch(e){case r.Unknown:return s.Yi.UNKNOWN;case r.Computer:return s.Yi.COMPUTER;case r.Tablet:return s.Yi.TABLET;case r.Smartphone:return s.Yi.SMARTPHONE;case r.Speaker:return s.Yi.SPEAKER;case r.TV:return s.Yi.TV;case r.AVR:return s.Yi.AVR;case r.STB:return s.Yi.STB;case r.AudioDongle:return s.Yi.AUDIO_DONGLE;case r.GameConsole:return s.Yi.GAME_CONSOLE;case r.CastVideo:return s.Yi.CAST_VIDEO;case r.CastAudio:return s.Yi.CAST_AUDIO;case r.Automobile:return s.Yi.AUTOMOBILE;case r.Smartwatch:return s.Yi.SMARTWATCH;case r.Chromebook:return s.Yi.CHROMEBOOK;case r.UnknownSpotifyHardware:return s.Yi.UNKNOWN;case r.CarThing:return s.Yi.CarThing;case r.HomeThing:return s.Yi.HomeThing;default:return(0,a._)(e),s.Yi.UNKNOWN}return s.Yi.UNKNOWN}},49873:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,c:()=>s});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'OfflineContext' without 'OfflineProvider'!");return e}},43064:(e,t,n)=>{"use strict";n.d(t,{_:()=>o});var i=n(59496),a=n(21113),s=n(98647),r=n(49873);function o(e){const t=(0,r.c)(),[n,o]=(0,i.useState)(t.getAvailabilitySync(e)),l=a.X.UPDATE_AVAILABILITY,d=(0,i.useCallback)((t=>{t.data.uri===e&&o(t.data.availability)}),[e]);return(0,s.z)(l,d,{uri:e}),n}},93309:(e,t,n)=>{"use strict";n.d(t,{_:()=>l});var i=n(59496),a=n(49873),s=n(43064),r=n(21113),o=n(98647);function l(e){const t=(0,a.c)(),n=function(e){const t=(0,a.c)(),[n,s]=(0,i.useState)(t.getCapabilities().canDownload(e)),l=r.X.UPDATE_CAPABILITIES,d=(0,i.useCallback)((t=>s(t.data.capabilites.canDownload(e))),[e]);return(0,o.z)(l,d),n}(e);return{capability:n,availability:(0,s._)(e),addDownload:(0,i.useCallback)((()=>t.addDownload(e)),[t,e]),removeDownload:(0,i.useCallback)((()=>t.removeDownload(e)),[t,e])}}},13339:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(59496),a=n(21113),s=n(98647);function r(e){const[t,n]=(0,i.useState)({syncing:!1,percentage:0,totalItems:0,currentItem:0}),r=a.X.UPDATE_CONTEXT_PROGRESS,o=(0,i.useCallback)((t=>{t.data.uri===e&&n(t.data.progress)}),[e]);return(0,s.z)(r,o,{uri:e}),t}},63815:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var i=n(59496),a=n(21113),s=n(98647);function r(){const[e,t]=(0,i.useState)({syncing:!1,percentage:0,totalItems:0,currentItem:0}),n=a.X.UPDATE_TOTAL_PROGRESS,r=(0,i.useCallback)((e=>t(e.data.progress)),[]);return(0,s.z)(n,r),e}},98647:(e,t,n)=>{"use strict";n.d(t,{z:()=>r});var i=n(59496),a=n(49873),s=n(72102);function r(e,t,n){const r=(0,a.c)(),o=(0,s.NY)((()=>n),[n]);(0,i.useEffect)((()=>{const n=r.getEvents();return n.addListener(e,t,o),()=>{n.removeListener(e,t,o)}}),[e,t,o,r])}},58934:(e,t,n)=>{"use strict";n.d(t,{K:()=>a,Z:()=>i});n(20464);function i(e,t={}){try{const n=document.getElementById(e);return n?JSON.parse(n.innerHTML):t}catch{return t}}function a(e,t={}){try{const i=document.getElementById(e);return i?JSON.parse((n=i.innerHTML,decodeURIComponent(Array.prototype.map.call(atob(n),(function(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`})).join("")))):t}catch{return t}var n}},1634:(e,t,n)=>{"use strict";n.d(t,{ZO:()=>s,wW:()=>r});n(79237);var i=n(33354);const a=/Spotify\/(?.+)\s/;function s(){if(!!window.navigator.userAgent.match(a))return i.W.Desktop;const e="serviceWorker"in window.navigator,t=window.matchMedia("(display-mode: standalone)").matches,n="Windows"in window;return e&&(t||n)?i.W.PWA:i.W.Web}function r(){return s()===i.W.Desktop}},79237:(e,t,n)=>{"use strict";n.d(t,{y:()=>s});var i=n(19496),a=n.n(i);n(33354);function s(){return a().getParser(window.navigator.userAgent).getOSName()||"not_applicable"}},33354:(e,t,n)=>{"use strict";n.d(t,{W:()=>i});let i=function(e){return e.Web="Web",e.PWA="PWA",e.Desktop="Desktop",e}({})},74824:(e,t,n)=>{"use strict";n.d(t,{N:()=>s,r:()=>a});var i=n(88566);let a=function(e){return e.VOLUME="volume",e.INFO="info",e}({});class s extends i.r{}},3442:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,f:()=>s});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'PlaybackContext' without 'PlaybackProvider'!");return e}},90773:(e,t,n)=>{"use strict";n.d(t,{_:()=>s});var i=n(59496),a=n(3442);function s(e,t){const n=(0,i.useRef)(t),s=(0,a.f)();n.current=t,(0,i.useEffect)((()=>{const t=s.getEvents(),i=e=>n.current(e);return t.addListener(e,i),()=>{t.removeListener(e,i)}}),[e,s])}},58673:(e,t,n)=>{"use strict";n.d(t,{f_:()=>u});var i=n(50346),a=n(73972),s=n(9603),r=n(9374),o=n(29251);n(72071);const l=Spicetify.GraphQL.Definitions["decorateContextEpisodesOrChapters"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"decorateContextEpisodesOrChapters"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"episodes"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"mediaTypes"}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"mediaTypes"}},{kind:"Field",name:{kind:"Name",value:"audiobookV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"authors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]}}]}}]},d=Spicetify.GraphQL.Definitions["decorateContextTracks"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"decorateContextTracks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tracks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Track"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"artists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"10"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"profile"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"albumOfTrack"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}}]}}]}}]}}]};function c(e){const t=e??[];return t.length>1?"mixed":0===t.length||t[0]===a.$_.Audio?"audio":t[0]===a.$_.Video?"video":"audio"}async function u(e,t,n){const u=Array.from(new Set(n.map((e=>e.uri)).filter((e=>!t.has(e))))),m=u.filter((e=>(0,i.wj)(e))),p=u.filter((e=>(0,i.hn)(e))),[g,h]=await Promise.all([m.length>0?e(d,{uris:m},["uris"]):Promise.resolve([]),p.length>0?e(l,{uris:p},["uris"]):Promise.resolve([])]);return[...g.reduce(((e,t)=>e.concat(t.tracks??[])),[]),...h.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:r.p.TRACK,uri:e.uri,name:e.name,mediaType:"audio",duration:{milliseconds:e.duration.totalMilliseconds},album:{type:r.p.ALBUM,uri:e.albumOfTrack?.uri??"",name:e.albumOfTrack?.name??"",images:e.albumOfTrack?.coverArt?.sources.map((e=>(0,s.Bi)(e)))??[]},artists:e.artists.items.map((e=>({type:r.p.ARTIST,uri:e.uri,name:e.profile.name}))),isLocal:!1,isExplicit:e.contentRating?.label===a.KS.Explicit,is19PlusOnly:e.contentRating?.label===a.KS.NineteenPlus,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:r.p.EPISODE,uri:e.uri,name:e.name??"",mediaType:c(e.mediaTypes),duration:{milliseconds:e.duration.totalMilliseconds},show:{type:r.p.SHOW,uri:t.uri??"",name:t.name??"",images:t.coverArt?.sources.map((e=>(0,s.Bi)(e)))??[]},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:r.p.CHAPTER,uri:e.uri,name:e.name??"",mediaType:c(e.mediaTypes),duration:{milliseconds:e.duration.totalMilliseconds},book:{type:r.p.AUDIOBOOK,uri:t.uri??"",name:t.name??"",images:t.coverArt?.sources.map((e=>(0,s.Bi)(e)))??[]},get images(){return this.book.images},uid:null,provider:null}}(e):((0,o._)(e),null))).forEach((e=>{null!==e&&t.set(e.uri,e)})),n.map((e=>({...e,...t.get(e.uri),uid:e.uid,provider:e.provider})))}},89241:(e,t,n)=>{"use strict";n.d(t,{Su:()=>s,cg:()=>a,jB:()=>o,lu:()=>l});let i=function(e){return e[e.TRANSIENT=0]="TRANSIENT",e[e.PERSISTENT=1]="PERSISTENT",e}({}),a=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.UNKNOWN="unknown",e.UNRECOGNIZED="unrecognized",e}({}),s=function(e){return e.AD_DISALLOW="ad_disallow",e.AGE_RESTRICTION_FILTERED="age_restriction_filtered",e.ALREADY_PAUSED="already_paused",e.ALREADY_PLAYING="already_playing",e.BANNED_BY_USER_TRACK="banned_by_user/track",e.BANNED_BY_USER_ALBUM="banned_by_user/album",e.BANNED_BY_USER_ARTIST="banned_by_user/artist",e.CONTEXT_PLAYER_DISALLOW="context_player_disallow",e.ENDLESS_CONTEXT="endless_context",e.EXPLICIT_CONTENT_FILTERED="explicit_content_filtered",e.LOCAL_FILE_BAD_FORMAT="local_file_bad_format",e.LOCAL_FILE_DRM_PROTECTED="local_file_drm_protected",e.LOCAL_FILE_NOT_FOUND="local_file_not_found",e.MFT_DISALLOW="mft_disallow",e.MFT_DISALLOW_MISSING_TRAC="mft_disallow_missing_trac",e.NEWS_SET_TRACK_FILTERED="news_set_track_filtered",e.NO_NEXT_TRACK="no_next_track",e.NO_PREV_TRACK="no_prev_track",e.NO_SPECIFIC_TRACK="no_specific_track",e.NOT_AVAILABLE="not_available",e.NOT_AVAILABLE_BY_ARTIST_BAN="not_available_by_artist_ban",e.NOT_AVAILABLE_IN_CURRENT_REGION="not_available_in_current_region",e.NOT_AVAILABLE_IN_NON_PREMIUM="not_available_in_non_premium",e.NOT_AVAILABLE_OFFLINE="not_available_offline",e.NOT_AVAILABLE_ON_MOBILE_NETWORK="not_available_on_mobile_network",e.NOT_PAUSED="not_paused",e.NOT_PLAYING_CONTEXT="not_playing_context",e.NOT_PLAYING_LOCALLY="not_playing_locally",e.NOT_PLAYING_TRACK="not_playing_track",e.OFFLINE_CAPPING_REACHED="offline_capping_reached",e.PLAYER_CONTEXT_DISALLOW="player_context_disallow",e.PROTOCOL_LIMITATIONS="protocol_limitations",e.PROTOCOL_LIMITIATIONS="protocol_limitiations",e.THROTTLED="throttled",e.UNKNOWN="unknown",e.UNSUPPORTED_FILE_FORMAT="unsupported_file_format",e.USER_CAPPING_REACHED="user_capping_reached",e.USER_STREAMING_DISALLOWED="user_streaming_disallowed",e}({});class r extends Error{constructor(e,t,n,i=undefined){super(r.getMessage(t,n,i)),this.type=e,this.code=t,this.reasons=n,this.cause=i}static getMessage(e,t,n=undefined){return t.length>0?`Code '${e}' with reasons '${t.join(", ")}'`:void 0!==n?`Code '${e}' with cause '${n.name}: ${n.message}'`:`Code '${e}'`}}class o extends r{constructor(e,t,n=undefined){super(i.TRANSIENT,e,t,n)}}class l extends r{constructor(e,t,n=undefined){super(i.PERSISTENT,e,t,n)}}},66842:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>o,FE:()=>r,rg:()=>a,zr:()=>s});var i=n(88566);let a=function(e){return e.UPDATE="update",e.ERROR="error",e.ACTION="action",e.QUEUE_ACTION="queue_action",e.QUEUE_ACTION_COMPLETE="queue_action_complete",e.QUEUE_UPDATE="queue_update",e.CONTEXT_WRAPAROUND="context_wraparound",e}({}),s=function(e){return e.PLAY="play",e.PAUSE="pause",e.RESUME="resume",e.SKIP_TO_NEXT="skipToNext",e.SKIP_TO_PREVIOUS="skipToPrevious",e}({}),r=function(e){return e.ADD="add",e.REMOVE="remove",e.CLEAR="clear",e.INSERT="insert",e.REORDER="reorder",e}({});class o extends i.r{emitPlaySync(e,t,n){const{defaultPrevented:i}=this.emitSync(a.ACTION,{action:s.PLAY,context:e,origin:t,options:n});return i}emitPauseSync(){const{defaultPrevented:e}=this.emitSync(a.ACTION,{action:s.PAUSE});return e}emitResumeSync(){const{defaultPrevented:e}=this.emitSync(a.ACTION,{action:s.RESUME});return e}emitSkipToNextSync(){const{defaultPrevented:e}=this.emitSync(a.ACTION,{action:s.SKIP_TO_NEXT});return e}emitSkipToPreviousSync(){const{defaultPrevented:e}=this.emitSync(a.ACTION,{action:s.SKIP_TO_PREVIOUS});return e}emitQueueActionSync(e){const{defaultPrevented:t}=this.emitSync(a.QUEUE_ACTION,{action:e});return t}emitQueueActionComplete(e,t=null){this.emit(a.QUEUE_ACTION_COMPLETE,{action:e,error:t})}emitQueueUpdate(e){this.emit(a.QUEUE_UPDATE,e)}}},37409:(e,t,n)=>{"use strict";n.d(t,{E:()=>a,g:()=>s});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'PlayerContext' without 'PlayerProvider'!");return e}},48607:(e,t,n)=>{"use strict";n.d(t,{n:()=>u});var i=n(59496),a=n(29251),s=n(37409),r=n(22508),o=n(30301);function l(e,t,n,i,s,o){switch(t){case r.PO.NOT_ACTIVE:o?o():e.play(n,i,s);break;case r.PO.PLAYING:e.pause();break;case r.PO.PAUSED:e.resume();break;default:(0,a.U)(t)}}function d(e,t,n,a,s){const r=(0,i.useRef)(s);r.current=s;const{playbackStatus:d,isActive:c,isPlaying:u}=(0,o.sS)({contextURI:t.current.uri,...a.current,...s}),m=(0,i.useCallback)(((i,s)=>{s?s():e.play(t.current,n.current,{...i,skipTo:{...a.current,...r.current}})}),[e,t,n,a]),p=(0,i.useCallback)(((i,s)=>{l(e,d,t.current,n.current,{...i,skipTo:{...a.current,...r.current}},s)}),[e,d,t,n,a]);return{playbackStatus:d,isActive:c,isPlaying:u,triggerPlay:m,togglePlay:p}}function c(e,t,n,a){const[s,r]=function(e,t,n){return e.getCapabilities().canPlayMultipleContextPages||void 0===n.pageURI?[t,n]:[{current:{uri:n.pageURI,metadata:t.current.metadata}},{pageURI:n.pageURI,pageIndex:0}]}(e,t,a),c=(0,i.useRef)(r);c.current=r;const{playbackStatus:u,isActive:m,isPlaying:p}=(0,o.T6)({contextURI:s.current.uri,pageIndex:r.pageIndex,pageURI:r.pageURI}),g=(0,i.useMemo)((()=>d.bind(null,e,s,n,c)),[e,s,n]),h=(0,i.useCallback)(((t,i)=>{i?i():e.play(s.current,n.current,{...t,skipTo:c.current})}),[e,s,n]),k=(0,i.useCallback)(((t,i)=>{l(e,u,s.current,n.current,{...t,skipTo:c.current},i)}),[e,u,s,n]);return{playbackStatus:u,isActive:m,isPlaying:p,triggerPlay:h,togglePlay:k,usePlayContextItem:g}}function u(e,t){const n=(0,s.g)(),a={...t,referrerIdentifier:t.referrerIdentifier??n.getReferrer()},r=(0,i.useRef)(e),u=(0,i.useRef)(a);r.current=e,u.current=a;const{playbackStatus:m,isActive:p,isPlaying:g}=(0,o.cR)(e.uri),h=(0,i.useMemo)((()=>c.bind(null,n,r,u)),[n]),k=(0,i.useMemo)((()=>d.bind(null,n,r,u,{current:null})),[n]),v=(0,i.useCallback)(((e,t)=>{n.play(t??r.current,u.current,e)}),[n]),f=(0,i.useCallback)(((e,t)=>{l(n,m,t??r.current,u.current,e)}),[n,m]);return{playbackStatus:m,isActive:p,isPlaying:g,triggerPlay:v,togglePlay:f,usePlayContextPage:h,usePlayContextItem:k}}},46642:(e,t,n)=>{"use strict";n.d(t,{G:()=>s});var i=n(59496),a=n(37409);function s(e,t){const n=(0,i.useRef)(t),s=(0,a.g)();n.current=t,(0,i.useEffect)((()=>{const t=s.getEvents(),i=e=>n.current(e);return t.addListener(e,i),()=>{t.removeListener(e,i)}}),[e,s])}},91048:(e,t,n)=>{"use strict";n.d(t,{B:()=>c,z:()=>d});var i=n(59496),a=n(4464),s=n(99948),r=n(95019);const o=()=>!0;function l(e,t=o,n){const a=(0,r.zY)(),l=(0,s.Y)((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)),[d,c]=(0,i.useState)(n(l)??0),[u,m]=(0,i.useState)(null),p=(0,i.useRef)(t);return p.current=t,(0,i.useEffect)((()=>{(null===l||p.current(l))&&c(n(l)??0)}),[l,n]),(0,i.useEffect)((()=>{l?.isPaused||l?.isBuffering||m(null)}),[l?.timestamp,l?.isPaused,l?.isBuffering]),(0,i.useEffect)((()=>{let t=!0;if(null===l||!l.hasContext||l.isPaused||!p.current(l))return()=>{};c(n(l)??0);const i=a?.setInterval((()=>{if(t){const e=n(l);c(e??0)}}),e);return()=>{t=!1,null!==i&&a?.clearInterval(i)}}),[a,l,e,n]),[u??d,m]}function d(e,t=o){return l(e,t,a.k)}function c(e,t=o){return l(e,t,a.l)}},30301:(e,t,n)=>{"use strict";n.d(t,{$o:()=>d,IK:()=>u,T6:()=>l,cR:()=>o,sS:()=>c});var i=n(24976),a=n(56180),s=n(99948);function r(e){const t=(0,s.Y)(e);return{playbackStatus:t,isActive:t!==i.P.NOT_ACTIVE,isPlaying:t===i.P.PLAYING}}function o(e){return r((t=>(0,a.QL)(t,e)))}function l(e){return r((t=>(0,a.xy)(t,e)))}function d(e){return r((t=>(0,a.oT)(t,e)))}function c(e){return r((t=>(0,a.Gt)(t,e)))}function u(){return r((e=>(0,a.o9)(e)))}},97134:(e,t,n)=>{"use strict";n.d(t,{W:()=>o});var i=n(59496),a=n(66842),s=n(37409),r=n(46642);function o(){const e=(0,s.g)(),[t,n]=(0,i.useState)(e.getQueue());return(0,r.G)(a.rg.QUEUE_UPDATE,(e=>n(e.data))),t}},99948:(e,t,n)=>{"use strict";n.d(t,{Y:()=>o});var i=n(59496),a=n(66842),s=n(37409),r=n(46642);function o(e,t=((e,t)=>e===t)){const n=(0,s.g)().getState(),[o,l]=(0,i.useState)(e(n));return(0,r.G)(a.rg.UPDATE,(n=>{const i=e(n.data);t(o,i)||l(i)})),o}},72933:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});var i=n(22508),a=n(99948),s=n(87527);function r(){return(0,a.Y)((e=>({uri:e?.context.uri??null,description:e?.context.metadata?.[i.sb.CONTEXT_DESCRIPTION]??null})),s.V)}},66932:(e,t,n)=>{"use strict";n.d(t,{l:()=>a,s:()=>i});let i=function(e){return e.CONTEXT_DESCRIPTION="context_description",e.IS_AUDIOBOOK="is_audiobook",e.REPORTING_URI="reporting.uri",e.FILTERING_PREDICATE="filtering.predicate",e.SORTING_CRITERIA="sorting.criteria",e.LIST_UTIL_FILTER="list_util_filter",e.LIST_UTIL_SORT="list_util_sort",e}({}),a=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}({})},267:(e,t,n)=>{"use strict";n.d(t,{G:()=>a});var i=n(9374);function a(e){return e?.type===i.p.TRACK}},24976:(e,t,n)=>{"use strict";n.d(t,{P:()=>i});let i=function(e){return e[e.NOT_ACTIVE=0]="NOT_ACTIVE",e[e.PLAYING=1]="PLAYING",e[e.PAUSED=2]="PAUSED",e}({})},22508:(e,t,n)=>{"use strict";n.d(t,{M4:()=>g,kZ:()=>h,sb:()=>i.s,dR:()=>k,Fd:()=>p,PO:()=>u.P,zq:()=>m,F3:()=>c,k6:()=>s,G7:()=>r,iw:()=>o,G_:()=>l.G,RB:()=>d});var i=n(66932),a=n(9374);function s(e){return e?.type===a.p.AD}function r(e){return e?.type===a.p.CHAPTER}function o(e){return e?.type===a.p.EPISODE}var l=n(267);function d(e){return e?.type===a.p.UNKNOWN}const c={type:a.p.UNKNOWN,uri:"",uid:"",name:"",images:[],mediaType:"audio",duration:{milliseconds:-1},album:{type:a.p.ALBUM,uri:"",name:"",images:[]},artists:[{type:a.p.ARTIST,uri:"",name:""}],provider:null};var u=n(24976);let m=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}({});const p=["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"];let g=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.HIFI=5]="HIFI",e}({}),h=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}({}),k=function(e){return e[e.NONE=0]="NONE",e[e.OFF=1]="OFF",e[e.ON=2]="ON",e}({})},4464:(e,t,n)=>{"use strict";function i(e,t){if(null===e||null===t||null===e.duration)return null;const{timestamp:n,duration:i,speed:a,hasContext:s,isPaused:r,isBuffering:o}=e;if(!s||r||o)return t;const l=(Date.now()-n)*(a??0);return Math.min(t+l,i)}function a(e){return i(e,e?.positionAsOfTimestamp??null)}function s(e){const t=parseInt(e?.item?.metadata?.["segment.position_as_of_timestamp"]??"",10),n=e?.positionAsOfTimestamp??null;return i(e,isNaN(t)?n:t)}n.d(t,{k:()=>a,l:()=>s})},56180:(e,t,n)=>{"use strict";n.d(t,{CM:()=>k,Gt:()=>h,QL:()=>m,o9:()=>u,oT:()=>g,xy:()=>p});var i=n(50346),a=n(22508),s=n(9374),r=n(29251),o=n(66932);function l(e,t){const n=(0,i.EC)(e,{parseUnknown:!0}),a=(0,i.EC)(t,{parseUnknown:!0});return!(!n||!a)&&((0,i.U4)(n,a)??!1)}function d(e){return"queue"===e?.provider}function c(e,t){if(null===e)return!1;switch(e.type){case s.p.TRACK:if(l(e.album.uri,t)||l(e.uri,t))return!0;break;case s.p.EPISODE:if(l(e.show.uri,t)||l(e.uri,t))return!0;break;case s.p.CHAPTER:if(l(e.book.uri,t)||l(e.uri,t))return!0;break;case s.p.AD:case s.p.UNKNOWN:break;default:(0,r.U)(e)}return!1}function u(e){return null!==e&&e.hasContext?e.isPaused?a.PO.PAUSED:a.PO.PLAYING:a.PO.NOT_ACTIVE}function m(e,t){return null===e?a.PO.NOT_ACTIVE:(!d(e.item)&&(n=e.item,"autoplay"!==n?.provider)||c(e.item,t??null))&&(l(e.context.uri,t??null)||l(e.index?.pageURI??null,t??null)||l(e.item?.uri??null,e.context.uri??null)&&c(e.item,t??null))?u(e):a.PO.NOT_ACTIVE;var n}function p(e,{contextURI:t,pageIndex:n,pageURI:i}){if(null===e)return a.PO.NOT_ACTIVE;if(d(e.item)&&!c(e.item,i??null))return a.PO.NOT_ACTIVE;if(l(e.context.uri,t??null)){if(s=e.index.pageIndex??null,r=n??null,null!==s&&null!==r&&s===r)return u(e);if(l(e.index.pageURI??null,i??null))return u(e)}var s,r;return l(e.context.uri,i??null)?u(e):a.PO.NOT_ACTIVE}function g(e,t){return null===e?a.PO.NOT_ACTIVE:l(e.item?.uri??null,t??null)?u(e):a.PO.NOT_ACTIVE}function h(e,t){if(null===e)return a.PO.NOT_ACTIVE;let n=function(e,t){if(!d(e.item))return a.PO.NOT_ACTIVE;const{item:n}=e;if(l(n.uri,t.uri??null)){if(c(n,t.contextURI??null))return u(e);if(c(n,t.pageURI??null))return u(e)}return a.PO.NOT_ACTIVE}(e,t);return n!==a.PO.NOT_ACTIVE?n:(n=m(e,t.contextURI),n===a.PO.NOT_ACTIVE&&(n=m(e,t.pageURI),n===a.PO.NOT_ACTIVE)?a.PO.NOT_ACTIVE:void 0!==t.uid?e.item?.uid===t.uid?n:a.PO.NOT_ACTIVE:void 0!==t.uri?e.item?.uri===t.uri||e.item?.metadata&&e.item.metadata[o.l.PARENT_EPISODE_URI]===t.uri?n:a.PO.NOT_ACTIVE:void 0!==t.index&&e.index.itemIndex===t.index?n:a.PO.NOT_ACTIVE)}function k(e){const t=e?.item??void 0;if((0,a.G_)(t)||(0,a.iw)(t)||(0,a.k6)(t)){return("video"===t.mediaType||"mixed"===t.mediaType)&&e?.playbackQuality.strategy!==a.kZ.OFFLINED_FILE}return!1}},5666:(e,t,n)=>{"use strict";n.d(t,{LT:()=>r,ew:()=>o,iT:()=>s});var i=n(22508),a=n(9374);function s(e,t,n,i,a,s){const r=t.find((e=>i(n.after||n.before,e)));if(!r)return t;const o=[];e.forEach((e=>{const n=t.find((t=>i(e,t)));n&&o.push(n)}));const l=t.filter((e=>!o.includes(e))),d=o.map((e=>a(r)?s(e):e)),c=r?l.indexOf(r):0;return n.after?l.splice(c+1,0,...d):l.splice(c,0,...d),l}function r(e,t,n,i,a,s){const r=t.find((e=>i(n.after||n.before,e)));if(!r)return t;const o=e.map((e=>s(e,a(r)))),l=t.indexOf(r);return n.after?t.splice(l+1,0,...o):t.splice(l,0,...o),t}function o(e,t){if(0===e.length)return{current:null,queued:[],nextUp:[]};const n=t===i.zq.REPEAT_CONTEXT?2:1,s=[];let r=0;const o=e[0];for(let t=1;t=n)break;const u=o.startsWith("spotify:meta:"),m=i!==a.p.UNKNOWN&&d;u||c||"true"===l||m||s.push(e[t])}const l=s.findIndex((({provider:e})=>"queue"!==e));return{current:o,queued:-1===l?s:s.slice(0,l),nextUp:-1===l?[]:s.slice(l)}}},82849:(e,t,n)=>{"use strict";n.d(t,{As:()=>l,JF:()=>r,MW:()=>s,bD:()=>o,tl:()=>a});var i=n(9374);n(50940);let a=function(e){return e.DOWN="DOWN",e.UP="UP",e.EQUAL="EQUAL",e.NEW="NEW",e}({});function s(e){return e.type===i.p.TRACK}function r(e){return e.type===i.p.EPISODE}let o=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}({}),l=function(e){return e.ASC="ASC",e.DESC="DESC",e}({})},64250:(e,t,n)=>{"use strict";n.d(t,{If:()=>a,XL:()=>s,qR:()=>r});var i=n(88566);let a=function(e){return e.ADD="add",e.MOVE="move",e.REMOVE="remove",e.UPDATE="update",e.SET_COLLABORATIVE="set_collaborative",e}({}),s=function(e){return e.UPDATE="update",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class r extends i.r{}},50940:(e,t,n)=>{"use strict";n.d(t,{R0:()=>i,cj:()=>s,pg:()=>a});let i=function(e){return e.TEXT="TEXT",e}({}),a=function(e){return e.CONTAINS="CONTAINS",e}({});function s(e){if(e)return"string"==typeof e?{field:i.TEXT,operator:a.CONTAINS,value:e.trim()}:e}},70506:(e,t,n)=>{"use strict";n.d(t,{Qd:()=>a,Ti:()=>r,fv:()=>s});var i=n(88566);let a=function(e){return e.CLAIM_PERMISSION="claim_permission",e.REMOVE_MEMBER="remove_member",e.SET_MEMBER_PERMISSION="set_member_permission",e.SET_BASE_PERMISSION="set_base_permission",e.GET_PERMISSION_GRANT="get_permission_grant",e}({}),s=function(e){return e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class r extends i.r{emitOperationSync(e){return this.emitSync(s.OPERATION,e).defaultPrevented}emitOperationComplete(e,t=null){this.emit(s.OPERATION_COMPLETE,{...e,error:t})}}},54455:(e,t,n)=>{"use strict";n.d(t,{As:()=>o,R0:()=>i.R0,bD:()=>r,lU:()=>a,no:()=>s,pg:()=>i.pg});var i=n(72013);function a(e){return"folder"===e.type}function s(e){return"playlist"===e.type}let r=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}({})},29058:(e,t,n)=>{"use strict";n.d(t,{Yt:()=>s,aY:()=>a,l3:()=>r});var i=n(88566);let a=function(e){return e.ADD="add",e.MOVE="move",e.REMOVE="remove",e.CREATE_PLAYLIST="create_playlist",e}({}),s=function(e){return e.UPDATE="update",e.UPDATE_ITEM="update_item",e.OPERATION="operation",e.OPERATION_COMPLETE="operation_complete",e}({});class r extends i.r{}},72013:(e,t,n)=>{"use strict";n.d(t,{R0:()=>i,cj:()=>s,pg:()=>a});let i=function(e){return e.TEXT="TEXT",e}({}),a=function(e){return e.CONTAINS="CONTAINS",e}({});function s(e){if(e)return"string"==typeof e?{field:i.TEXT,operator:a.CONTAINS,value:e.trim()}:e}},2802:(e,t,n)=>{"use strict";n.d(t,{D:()=>l});var i=n(7187),a=n(76076),s=n(52165);function r(e){return t=e,Object.prototype.hasOwnProperty.call(t,"uid")?{itemId:(0,s.Wu)(e.uid)}:{};var t}function o(e){const{before:t,after:n}=e;return"start"===t?{addFirst:!0}:void 0!==t?{addBeforeItem:{uri:(0,a.u)(t.uri),attributes:r(t)}}:"end"===n?{addLast:!0}:void 0!==n?{addAfterItem:{uri:(0,a.u)(n.uri),attributes:r(n)}}:{}}class l{_ops=[];_needsBaseRevision=!1;add(e,t,n=Date.now()){return this._ops.push({kind:i.Sh.ADD,add:{...o(t),items:e.map((e=>({uri:e,attributes:{timestamp:n.toString()}})))}}),this}addByIndex(e,t,n,a=Date.now()){var s,r;return this._needsBaseRevision=!0,this._ops.push({kind:i.Sh.ADD,add:{...(s=e,r=t,0===s?{addFirst:!0}:s>=r?{addLast:!0}:{fromIndex:s}),items:n.map((e=>({uri:e,attributes:{timestamp:a.toString()}})))}}),this}removeByIndex(e,t=1){return this._needsBaseRevision=!0,this._ops.push({kind:i.Sh.REM,rem:{fromIndex:e,length:t}}),this}remove(e){return this._ops.push({kind:i.Sh.REM,rem:{itemsAsKey:!0,items:e.map((e=>({uri:e.uri})))}}),this}move(e,t){return this._ops.push({kind:i.Sh.MOV,mov:{items:e.map((e=>({uri:e.uri,attributes:r(e)}))),...o(t)}}),this}moveByIndex(e,t,n=1){return this._needsBaseRevision=!0,this._ops.push({kind:i.Sh.MOV,mov:{fromIndex:e,toIndex:t,length:n}}),this}updateListAttributes(e){return this._ops.push({kind:i.Sh.UPDATE_LIST_ATTRIBUTES,updateListAttributes:e}),this}updateItemAttributes(e){return this._ops.push({kind:i.Sh.UPDATE_ITEM_ATTRIBUTES,updateItemAttributes:e}),this}buildDelta(){return{ops:this._ops,info:{source:{client:i.rf.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:[]}}}},64107:(e,t,n)=>{"use strict";n.d(t,{n:()=>s});var i=n(87642),a=n(64250);class s extends a.qR{constructor(){super(),this._aggregator=(0,i.PP)(this.onBatchChanged.bind(this)),this.onAddListener(a.XL.UPDATE,(e=>{const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(a.XL.UPDATE,(e=>{const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)}))}emitAddSync(e,t){return this.emitSync(a.XL.OPERATION,{operation:a.If.ADD,uri:e,items:t}).defaultPrevented}emitMoveSync(e,t){return this.emitSync(a.XL.OPERATION,{operation:a.If.MOVE,uri:e,items:t}).defaultPrevented}emitRemoveSync(e,t){return this.emitSync(a.XL.OPERATION,{operation:a.If.REMOVE,uri:e,items:t}).defaultPrevented}emitUpdateSync(e,t){return this.emitSync(a.XL.OPERATION,{operation:a.If.UPDATE,uri:e,details:t}).defaultPrevented}emitSetCollaborativeSync(e,t){return this.emitSync(a.XL.OPERATION,{operation:a.If.SET_COLLABORATIVE,uri:e,isCollaborative:t}).defaultPrevented}emitAddComplete(e,t=null,n=[]){this.emit(a.XL.OPERATION_COMPLETE,{operation:a.If.ADD,uri:e,uris:n,error:t})}emitMoveComplete(e,t=null,n=[]){this.emit(a.XL.OPERATION_COMPLETE,{operation:a.If.MOVE,uri:e,items:n,error:t})}emitRemoveComplete(e,t=null,n=[]){this.emit(a.XL.OPERATION_COMPLETE,{operation:a.If.REMOVE,uri:e,items:n,error:t})}emitUpdateComplete(e,t=null,n={}){this.emit(a.XL.OPERATION_COMPLETE,{operation:a.If.UPDATE,uri:e,details:n,error:t})}emitSetCollaborativeComplete(e,t=null,n=!1){this.emit(a.XL.OPERATION_COMPLETE,{operation:a.If.SET_COLLABORATIVE,uri:e,isCollaborative:n,error:t})}}},4716:(e,t,n)=>{"use strict";n.d(t,{Du:()=>l,Re:()=>r,jw:()=>o});var i=n(27555),a=n(1754);const s=6048e5;async function r(e,t,n,r=s){const o=(0,a.v)(t);return(await e.build().withHost(i.KH).withMethod("POST").withPath(`/playlist/${o}/permission-grant`).withEndpointIdentifier("/playlist/{id}/permission-grant").withJsonContentType().withBody({permission:{permissionLevel:n},ttlMs:r}).withoutMarket().send()).body}async function o(e,t,n){const s=(0,a.v)(t);return(await e.build().withHost(i.KH).withMethod("POST").withPath(`/playlist/${s}/permission-grant/token/${n}/claim`).withEndpointIdentifier("/playlist/{id}/permission-grant/token/{token}/claim").withJsonContentType().withoutMarket().send()).body}async function l(e,t){const n=(0,a.v)(t);return(await e.build().withHost(i.KH).withMethod("GET").withPath(`/playlist/${n}/permission/base`).withEndpointIdentifier("/playlist/{id}/permission/base").withoutMarket().send()).body}},37184:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var i=n(29058),a=n(87642);class s extends i.l3{_numListeners=0;constructor(){super(),this._aggregator=(0,a.PP)(this.onContainsItems.bind(this)),this.onAddListener(i.Yt.UPDATE,(()=>{1==++this._numListeners&&this.subscribeToUpdates()})),this.onRemoveListener(i.Yt.UPDATE,(()=>{0==--this._numListeners&&this.unsubscribeFromUpdates()})),this.onAddListener(i.Yt.UPDATE_ITEM,(e=>{1==++this._numListeners&&this.subscribeToUpdates();const{uri:t}=e.data.options;this._aggregator.subscribe(t)})),this.onRemoveListener(i.Yt.UPDATE_ITEM,(e=>{0==--this._numListeners&&this.unsubscribeFromUpdates();const{uri:t}=e.data.options;this._aggregator.unsubscribe(t)}))}emitUpdateItems(e,t){e.forEach(((e,n)=>{this.emit(i.Yt.UPDATE_ITEM,{uri:e,isInRootlist:Array.isArray(t)?t[n]:t})}))}emitCreatePlaylistSync(e,t){return this.emitSync(i.Yt.OPERATION,{operation:i.aY.CREATE_PLAYLIST,name:e,position:t}).defaultPrevented}emitAddSync(e,t){return this.emitSync(i.Yt.OPERATION,{operation:i.aY.ADD,uris:e,position:t}).defaultPrevented}emitMoveSync(e,t,n=!1){return this.emitSync(i.Yt.OPERATION,{operation:i.aY.MOVE,item:e,position:t,showAddConfirmation:n}).defaultPrevented}emitRemoveSync(e){return this.emitSync(i.Yt.OPERATION,{operation:i.aY.REMOVE,items:e}).defaultPrevented}emitCreatePlaylistComplete(e,t,n=null,a=null){this.emit(i.Yt.OPERATION_COMPLETE,{operation:i.aY.CREATE_PLAYLIST,name:e,position:t,uri:n,error:a})}emitAddComplete(e,t,n=null){this.emit(i.Yt.OPERATION_COMPLETE,{operation:i.aY.ADD,uris:e,position:t,error:n})}emitMoveComplete(e,t,n=null,a=!1){this.emit(i.Yt.OPERATION_COMPLETE,{operation:i.aY.MOVE,item:e,position:t,error:n,showAddConfirmation:a})}emitRemoveComplete(e,t=null){this.emit(i.Yt.OPERATION_COMPLETE,{operation:i.aY.REMOVE,items:e,error:t})}}},15572:(e,t,n)=>{"use strict";n.d(t,{cm:()=>S,r_:()=>E,ub:()=>x,fK:()=>N,qr:()=>_,BW:()=>v,UC:()=>k});var i=n(50346),a=n(54455),s=n(28418),r=n(9374),o=n(52165);function l(e){return e?new Date(parseInt(e,10)):null}function d(e){return{type:r.p.USER,uri:(0,i.QK)(e).toURI(),username:e,displayName:null,images:[]}}function c(e,t){if(void 0!==e)return e.map((e=>e.url??null)).filter(s.K).map((e=>({url:e})));if(void 0!==t){return[{url:`https://i.scdn.co/image/${(0,o.zv)(t)}`}]}return[]}function u(e,t,n){const i=n.attributes;return{type:"folder",uri:e,name:t,addedAt:l(i?.timestamp),items:[]}}function m(e,t,n){const i=t.attributes,a=n.attributes;if(!(t.uri&&n.ownerUsername&&i&&a))return function(e){const t=e.attributes;return{type:"placeholder",uri:e.uri??"",addedAt:l(t?.timestamp),isNotFound:!0,isForbidden:!1}}(t);const s=d(n.ownerUsername),o=function(e){return void 0===e?null:d(e)}(a.formatAttributes?.find((e=>"madeFor.username"===e.key))?.value),u=e===s.username,m=a.collaborative??!1,p=i.public??!1,g=u,h=u;return{type:r.p.PLAYLIST,addedAt:l(i.timestamp),uri:t.uri,name:a.name??"",description:a.description??"",totalLength:n.length??0,unfilteredTotalLength:n.length??0,totalLikes:null,duration:null,images:c(a.pictureSize,a.picture),owner:s,madeFor:o,isCollaborative:m,isLoaded:!0,isOwnedBySelf:u,isPublished:p,hasEpisodes:null,hasSpotifyTracks:null,hasSpotifyAudiobooks:null,canAdd:g,canRemove:h,canPlay:null,formatListData:null,canReportAnnotationAbuse:!1,hasDateAdded:!0,permissions:null,collaborators:null}}var p=n(76076);function g(e){const t=e;return"folder"===t.type&&void 0!==t.hash&&void 0!==t.rawItemCount}function h(e,t){const n=e.contents?.items?.[t];return void 0===n?null:(0,i.EC)(n.uri,{parseUnknown:!0})}function k(e,t){const n=h(e,t);return null!==n&&(n.type===i.JM.UNKNOWN&&"start-group"===n.args?.[0]&&3===n.args.length)}function v(e,t){const n=h(e,t);return null!==n&&(n.type===i.JM.UNKNOWN&&"end-group"===n.args?.[0]&&2===n.args.length)}function f(e,t){return{type:"folder",uri:e,name:"",addedAt:new Date(0),items:[],hash:"0000000000000000",rawItemCount:0,...t}}function y(e,t,n,i){return{...u((0,p.on)(e,t,n),n,i),hash:t,rawItemCount:1}}class S{stack=[];seen=[];constructor(e){this.username=e;const t=(0,p.on)(e,"0000000000000000","");this.root=f(t)}build(e){const t=e.contents,n=t?.items||[],a=t?.metaItems||[];for(let e=0;e0?this.stack[this.stack.length-1]:this.root}onPlaylist(e){this.peek().items.push(e)}onStartGroup(e){this.peek().items.push(e),this.stack.push(e),this.seen.push(e.hash)}onEndGroup(e){const t=this.stack.findIndex((t=>t.hash===e));-1!==t&&(this.stack.length=t)}hasSeen(e){return-1!==this.seen.indexOf(e)}increaseRawItemCount(){this.root.rawItemCount++;for(let e=0;e0;){const e=i.pop();for(const a of e.items)g(a)&&i.push(a),t(a)&&n.push(a)}return n}function _(e){return b(e,(e=>(0,a.no)(e)))}function N(e){return f(e.uri,{items:_(e)})}function E(e,t){const n=(0,i.EC)(t),a=b(e,(e=>(0,p.U4)(n,(0,i.EC)(e.uri))));return a.length>0?a[0]:null}function x(e,t){const n=(0,i.EC)(t);return b(e,(e=>(0,p.U4)(n,(0,i.EC)(e.uri)))).at(0)??null}},2170:(e,t,n)=>{"use strict";n.d(t,{H:()=>l});var i=n(41921);n(72071);const a=Spicetify.GraphQL.Definitions["decoratePlaylists"]={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"decoratePlaylists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"uris"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playlistsV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"uris"},value:{kind:"Variable",name:{kind:"Name",value:"uris"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Playlist"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"images"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"ownerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"username"}}]}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]};var s=n(99123);const r=50;function o(e){return null===e.owner.displayName||0===e.images.length}async function l(e,t,n){try{for(let e=0;e!t.has(e.uri))),d=await async function(e,t){const n=(0,i.PQ)(e);return{playlistsV2:(await(0,s.s)(t,(async e=>{const t=await n(a,{uris:e}),{errors:i,data:s}=t||{};if(!s?.playlistsV2)throw i&&i.length>0?new Error(`GraphQL error: ${i[0].message}`):new Error("Unknown GraphQL error!");return s}),r)).reduce(((e,t)=>e.concat(t.playlistsV2||[])),[])}}(e,l.map((e=>e.uri))),c=d.playlistsV2;for(let e=0;e0&&(n.images=a.items[0].sources.map((({url:e,width:t,height:n})=>({url:e,width:t||void 0,height:n||void 0})))),t.set(e,{owner:n.owner,images:n.images})}}}catch(e){window.console.error(e)}}},76076:(e,t,n)=>{"use strict";n.d(t,{Cl:()=>l,HS:()=>p,N4:()=>d,U4:()=>c,on:()=>o,qd:()=>s,u:()=>h});var i=n(50346),a=n(52165);function s(e){const t=new Uint8Array(e);return window.crypto.getRandomValues(t),(0,a.zv)(t)}function r(e){const t=e.replace(/\s+/g," ");return encodeURIComponent(t).replace(/%20/g,"+")}function o(e,t,n){return`${(0,i.ir)(e,t).toURI()}:${r(n)}`}function l(e){const t=(0,i.EC)(e,{parseUnknown:!0});return null!==t&&t.type===i.JM.UNKNOWN&&void 0!==t.args&&"start-group"===t.args[0]&&t.args.length>=2&&t.args.length<=3}function d(e){const t=(0,i.EC)(e,{parseUnknown:!0});return null!==t&&t.type===i.JM.UNKNOWN&&void 0!==t.args&&"end-group"===t.args[0]&&2===t.args.length}function c(e,t){const n=(0,i.EC)(e,{parseUnknown:!0}),a=(0,i.EC)(t,{parseUnknown:!0});return null!==n&&null!==a&&(n.type===i.JM.FOLDER&&a.type===i.JM.FOLDER?n.id===a.id:l(n)&&l(a)||d(n)&&d(a)?n.args[0]===a.args[0]:n.type===i.JM.FOLDER&&l(a)?n.id===a.args[1]:l(n)&&a.type===i.JM.FOLDER?n.args[1]===a.id:(0,i.U4)(n,a))}function u(e,t){return void 0!==t?`spotify:start-group:${e}:${r(t)}`:`spotify:start-group:${e}`}function m(e){return`spotify:end-group:${e}`}function p(e={}){const{name:t,folderUri:n,hash:i=(n?g(n):s(8))}=e;return[u(i,t),m(i)]}function g(e){const t=(0,i.EC)(e);if(null===t||t.type!==i.JM.FOLDER)throw new Error("Failed to parse folder URI!");return t.id}function h(e){try{return u(g(e))}catch{return e}}},87074:(e,t,n)=>{"use strict";n.d(t,{C:()=>i});const i=["daily-mix","my-mix","car-mix","personalized-podcasts"]},18037:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(50346),a=n(62884),s=n.n(a);const{SPCLIENT_WG_URL:r}=s(),o=`${r}/playlistextender`,l=async(e,t,n,a)=>{const s=await e.build().withMethod("POST").withHost(o).withPath("/extendp/").withEndpointIdentifier("/extendp/").withJsonContentType().withBody({playlistURI:t,trackSkipIDs:n||[],numResults:a||10}).withoutMarket().send();return s.body?s.body.recommendedTracks.map((e=>{const{id:t,album:{id:n},artists:a}=e,s=(0,i.tn)(t).toURI(),r=(0,i.jy)(n).toURI(),o=a.map((({id:e,name:t})=>({id:e,name:t,uri:(0,i.WN)(e).toURI()})));return{...e,uri:s,album:{...e.album,uri:r},artists:o,isMOGEFRestricted:!!e.contentRating?.find((e=>"KR"===e.country&&e.tag.includes("MOGEF-19+")))}})):[]}},64717:(e,t,n)=>{"use strict";n.d(t,{J:()=>a});var i=n(27555);async function a(e,t){const n=await e.build().withHost(i.fe).withMethod("GET").withPath(`/resolve-uri/${encodeURIComponent(t)}`).withEndpointIdentifier("/resolve-uri/{uri}").withoutMarket().send(),{resolvedPlaylists:a}=n.body;if(a.length>0)return a[0].uri;throw new Error("Error resolving playlist format URI!")}},7187:(e,t,n)=>{"use strict";n.d(t,{B3:()=>i.B3,Sh:()=>i.Sh,_c:()=>i._c,hA:()=>i.hA,ow:()=>i.ow,pS:()=>a,rf:()=>i.rf,vY:()=>i.vY});var i=n(12101),a=n(81595)},11302:(e,t,n)=>{"use strict";n.d(t,{b:()=>l,i:()=>d});var i=n(50346),a=n(7187),s=n(2802),r=n(27555),o=n(52165);async function l(e,t,n){let o=null;const l=(0,i.EC)(t).id;n.imageUploadToken&&(o=await d(e,l,n.imageUploadToken));const c={},u=[];if(null!==o?c.picture=o:null===n.imageUploadToken&&u.push(a._c.LIST_PICTURE),"name"in n){if(!n.name)throw Error("Can not set empty playlist name!");c.name=n.name}if("description"in n&&(c.description=n.description),0===Object.keys(c).length&&0===u.length)return;const m=(new s.D).updateListAttributes({newAttributes:{values:c,noValue:u}}).buildListChanges(),p=a.ow.toJSON(m);return await e.build().withMethod("POST").withHost(r.fe).withPath(`/playlist/${l}/changes`).withEndpointIdentifier("/playlist/{id}/changes").withoutMarket().withJsonContentType().withBody(p).send()}async function d(e,t,n){const i=await e.build().withEndpointIdentifier("playlist/${id}/register-image").withHost(r.fe).withMethod("POST").withPath(`/playlist/${t}/register-image`).withJsonContentType().withBody({uploadToken:n}).withoutMarket().send();if(!i.body)throw new Error("No image id from registration!");return(0,o.dN)(i.body.picture)}},7857:(e,t,n)=>{"use strict";n.d(t,{I:()=>a});const i="https://image-upload.spotify.com/v4";async function a(e,t){const n=await e.build().withEndpointIdentifier("image-upload/v4/playlist").withHost(i).withMethod("POST").withPath("/playlist").withBody(t).withoutGlobalHeaders().withHeaders([{key:"Content-Type",value:"image/jpeg"}]).withoutMarket().send();if(!n.body)throw new Error("No upload token recieved");return n.body.uploadToken}},1754:(e,t,n)=>{"use strict";n.d(t,{T:()=>s,v:()=>a});var i=n(50346);function a(e){const t=(0,i.EC)(e);return t?t.id:""}function s(e){return e instanceof Error?e:new Error("Unknown error!")}},74744:(e,t,n)=>{"use strict";n.d(t,{I:()=>c,x:()=>d});var i=n(22508),a=n(50940);const s={[a.R0.TEXT]:"text"},r={[a.pg.CONTAINS]:"contains"};const o={[a.R0.TEXT]:"text"},l={[a.pg.CONTAINS]:"=^#"};function d(e){return e?.value?`&filter=${encodeURIComponent(function(e){const{field:t,operator:n,value:i}=e;if(t!==a.R0.TEXT||n!==a.pg.CONTAINS)throw new Error("Invalid filter params!");return`${s[t]} ${r[n]} ${encodeURIComponent(i)}`}(e))}`:""}function c(e,t){void 0!==t?.value&&(e.metadata||={},e.metadata[i.sb.FILTERING_PREDICATE]=function(e){const{field:t,operator:n,value:i}=e;if(t!==a.R0.TEXT||n!==a.pg.CONTAINS)throw new Error("Invalid filter params!");return`${o[t]} ${l[n]} "${i}"`}(t))}},57174:(e,t,n)=>{"use strict";n.d(t,{R:()=>l,Y:()=>o});var i=n(22508),a=n(82849);const s={[a.bD.TITLE]:["name","originalIndex"],[a.bD.ADDED_BY]:["addedByDisplayName","originalIndex"],[a.bD.ADDED_AT]:["addTime","album.name","album.artist.name","discNumber","trackNumber","originalIndex"],[a.bD.ARTIST]:["artist.name","album.name","discNumber","trackNumber","originalIndex"],[a.bD.ALBUM]:["album.name","discNumber","trackNumber","originalIndex"],[a.bD.DURATION]:["length","album.name","discNumber","trackNumber","originalIndex"]};const r={[a.bD.TITLE]:["title","original_index"],[a.bD.ADDED_BY]:["added_by","original_index"],[a.bD.ADDED_AT]:["added_at","album_title","album_artist_name","album_disc_number","album_track_number","original_index"],[a.bD.ARTIST]:["artist_name","album_title","album_disc_number","album_track_number","original_index"],[a.bD.ALBUM]:["album_title","album_disc_number","album_track_number","original_index"],[a.bD.DURATION]:["duration","album_title","album_disc_number","album_track_number","original_index"]};function o(e){return void 0===e?"":`&sort=${encodeURIComponent(function(e){const{field:t,order:n}=e,i=s[t];if(void 0===i||n!==a.As.ASC&&n!==a.As.DESC)throw new Error("Invalid sort params!");return i.map(((e,t)=>n?`${e} ${t>0?a.As.ASC:n}`:e)).join(",")}(e))}`}function l(e,t){void 0!==t&&(e.metadata||={},e.metadata[i.sb.SORTING_CRITERIA]=function(e){const{field:t,order:n}=e,i=r[t];if(void 0===i||n!==a.As.ASC&&n!==a.As.DESC)throw new Error("Invalid sort params!");return i.map(((e,t)=>n?`${e} ${t>0?a.As.ASC:n}`:e)).join(",")}(t))}},54485:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i=(0,n(59496).createContext)({getCapabilities:()=>{},getMetadata:()=>{},getContents:()=>{},add:()=>{},move:()=>{},remove:()=>{},setCollaborativeState:()=>{},getEvents:()=>{}})},23600:(e,t,n)=>{"use strict";n.d(t,{N:()=>r,z:()=>o});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("usePlaylistPermissionsAPI must be used within a PlaylistPermissionsProvider");return e}},86109:(e,t,n)=>{"use strict";n.d(t,{B:()=>i});const i=(0,n(59496).createContext)(null)},62134:(e,t,n)=>{"use strict";n.d(t,{U:()=>r});var i=n(57174),a=n(74744),s=n(50940);function r(e,t,n){const r={uri:e};return(0,i.R)(r,t),(0,a.I)(r,(0,s.cj)(n)),r}},68640:(e,t,n)=>{"use strict";n.d(t,{ZF:()=>i.Z,NC:()=>r.N,ry:()=>s,BS:()=>o.B,xY:()=>l,ET:()=>p,Yv:()=>g,rZ:()=>c.r,Cu:()=>v.C,Rt:()=>f,lh:()=>k.l,iu:()=>h.i});n(7187);var i=n(54485),a=n(4637);const s=({instance:e,children:t})=>(0,a.jsx)(i.Z.Provider,{value:e,children:t});var r=n(23600),o=n(86109);const l=({instance:e,children:t})=>(0,a.jsx)(o.B.Provider,{value:e,children:t});var d=n(59496),c=n(831),u=n(9102),m=n(72102);const p=(e,t)=>{const n=(0,d.useContext)(i.Z),a=(0,u.useQueryClient)(),s=(0,d.useRef)(t?.withSync),r=(0,m.jP)((()=>["usePlaylistMetadata",e,t]),[t,e]),{data:o}=(0,u.useQuery)(r(),(()=>n.getMetadata(e,{...t,withSync:s.current})),{cacheTime:36e5,keepPreviousData:!0}),l=(0,d.useCallback)((()=>{s.current=!1,a.invalidateQueries(r())}),[a,r]);return(0,c.r)(e,l),o??null};function g(e){const t=(0,d.useContext)(i.Z),n=(0,r.z)();return{addItems:(0,d.useCallback)(((n,i)=>t.add(e,n,i)),[e,t]),moveItems:(0,d.useCallback)(((n,i)=>t.move(e,n,i)),[e,t]),removeItems:(0,d.useCallback)((n=>t.remove(e,n)),[e,t]),setCollaborativeState:(0,d.useCallback)((n=>t.setCollaborativeState(e,n)),[e,t]),updateDetails:(0,d.useCallback)((n=>t.updateDetails(e,n)),[e,t]),uploadImage:(0,d.useCallback)((e=>t.uploadImage(e)),[t]),setPrivateState:(0,d.useCallback)((t=>n.setBasePermission(e,t?"BLOCKED":"VIEWER")),[n,e]),removeMember:(0,d.useCallback)((t=>n.removeMember(e,t)),[n,e])}}var h=n(78689),k=n(44740),v=n(67458);function f(){const e=(0,d.useContext)(o.B),[t,n]=(0,d.useState)(null),i=(0,d.useCallback)((async()=>n(await e.getMetadata())),[e]);return(0,d.useEffect)((()=>{i()}),[i]),(0,h.i)(i),t}},12799:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c,s:()=>u});var i=n(59496),a=n(54485),s=n(831),r=n(9102),o=n(72102);const l=(e,t,n)=>["usePlaylist",e,t,n],d=(e,t,n,i,a)=>()=>e.getPlaylist(t,{...i,withSync:n},a),c=(e,t,n)=>{const c=(0,i.useContext)(a.Z),u=(0,r.useQueryClient)(),m=(0,i.useRef)(t?.withSync),p=(0,o.jP)((()=>l(e,t,n)),[e,t,n]),{data:g}=(0,r.useQuery)(p(),d(c,e,m.current,t,n),{cacheTime:36e5,keepPreviousData:!0}),h=(0,i.useCallback)((()=>{m.current=!1,u.invalidateQueries(p())}),[u,p]);return(0,s.r)(e,h),g??null},u=(e,t,n)=>{const s=(0,i.useContext)(a.Z),o=(0,r.useQueryClient)();return(0,i.useCallback)((()=>{const i=l(e,t,n),a=d(s,e,!1,t,n);o.prefetchQuery(i,a)}),[s,n,t,o,e])}},14709:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var i=n(59496),a=n(86109),s=n(78689);function r(e){const t=(0,i.useContext)(a.B),[n,r]=(0,i.useState)(void 0),o=(0,i.useCallback)((()=>{t.getPublishedState(e).then(r)}),[t,e]);return(0,i.useEffect)(o,[o]),(0,s.i)(o),n}},831:(e,t,n)=>{"use strict";n.d(t,{r:()=>r});var i=n(59496),a=n(64250),s=n(54485);function r(e,t){const n=(0,i.useContext)(s.Z);(0,i.useEffect)((()=>{const i=n.getEvents(),s=n=>{n.data.uri===e&&t(n)};return i.addListener(a.XL.UPDATE,s,{uri:e}),()=>{i.removeListener(a.XL.UPDATE,s,{uri:e})}}),[n,e,t])}},36747:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var i=n(59496),a=n(86109);function s(){return(0,i.useContext)(a.B)}},67458:(e,t,n)=>{"use strict";n.d(t,{C:()=>o});var i=n(59496),a=n(86109),s=n(78689),r=n(9102);function o(e){const t=(0,i.useContext)(a.B),n=(0,r.useQueryClient)(),o=["rootlist-contents",e];return(0,s.i)((()=>n.invalidateQueries({queryKey:o},{cancelRefetch:!0}))),(0,r.useQuery)(o,(()=>t.getContents(e)),{cacheTime:864e5,staleTime:0}).data}},44740:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var i=n(59496),a=n(86109);function s(){const e=(0,i.useContext)(a.B);return{createFolder:(0,i.useCallback)(((t,n)=>e.createFolder(t,n)),[e]),createPlaylist:(0,i.useCallback)(((t,n)=>e.createPlaylist(t,n)),[e]),moveFolder:(0,i.useCallback)(((t,n)=>e.moveFolder(t,n)),[e]),removeFolder:(0,i.useCallback)((t=>e.removeFolder(t)),[e]),renameFolder:(0,i.useCallback)(((t,n)=>e.renameFolder(t,n)),[e]),addPlaylists:(0,i.useCallback)(((t,n)=>e.add(t,n)),[e]),movePlaylists:(0,i.useCallback)(((t,n)=>e.move(t,n)),[e]),removePlaylists:(0,i.useCallback)((t=>e.remove(t)),[e]),containsPlaylists:(0,i.useCallback)((t=>e.contains(t)),[e]),setPublishedState:(0,i.useCallback)(((t,n)=>e.setPublishedState(t,n)),[e])}}},78689:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var i=n(59496),a=n(29058),s=n(86109);function r(e){const t=(0,i.useContext)(s.B);(0,i.useEffect)((()=>{const n=t.getEvents();return n.addListener(a.Yt.UPDATE,e),()=>{n.removeListener(a.Yt.UPDATE,e)}}),[e,t])}},6385:(e,t,n)=>{"use strict";function i(e){return e.isCollaborative||e.isLoaded&&!e.isOwnedBySelf&&e.canAdd}n.d(t,{c:()=>i})},9637:(e,t,n)=>{"use strict";n.d(t,{V:()=>s});var i=n(9374);function a(e){return{url:e.url,width:e.width||void 0,height:e.height||void 0}}function s(e){return{type:i.p.USER,uri:e.uri,username:e.id,displayName:e?.display_name||null,images:e?.images?.map(a)||[]}}},72971:(e,t,n)=>{"use strict";n.d(t,{$f:()=>s,hn:()=>a,sw:()=>r});var i=n(88566);let a=function(e){return e.ARTIST="artist",e.ALBUM="album",e.SHOW="show",e.AUDIOBOOK="audiobook",e.PLAYLIST="playlist",e.RADIO="radio",e.LIKED_SONGS="liked_songs",e.YOUR_EPISODES="your_episodes",e.TRACK="track",e}({}),s=function(e){return e.UPDATE="update",e}({});class r extends i.r{}},15144:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,Y:()=>s});var i=n(59496);const a=(0,i.createContext)(null);function s(){const e=(0,i.useContext)(a);if(null===e)throw new Error("Trying to use 'RecentlyPlayedContext' without 'RecentlyPlayedProvider'!");return e}},51761:(e,t,n)=>{"use strict";n.d(t,{p1:()=>o,sQ:()=>l});var i=n(48821),a=n(34630);let s;function r({isAnonymous:e,transport:t,tokenProvider:n}){const{DEBUG_SEMANTIC_METRICS:s}={};if("1"===s)return[new i.ConsoleReporter];if(!t&&!n)throw new Error("[SemanticMetricsHelper] An instance of either transport or tokenProvider is required!");let r={environment:"undefined"!=typeof window?"browser":"nodejs"};return e||(r={...r,getToken:async e=>{if(n){const t=await(0,a.V)(n);e(await t())}else t&&e(t.getLastToken())}}),[(0,i.createUniversalReporter)(r),..."2"===s?[new i.ConsoleReporter]:[]]}function o(e,t,n=!1){const{sendMetric:a}=(0,i.createSemanticMetrics)({key:e,dev:!"production"?.startsWith("prod")&&!0,reporter:r({transport:t,isAnonymous:n})});s=a}async function l(e){if(!s)throw new Error("Invalid call to sendMetric before initSemanticMetrics.");return e.tags||(e.tags={}),"slingshot"in e.tags||(e.tags.slingshot="1"==={}.IS_SLINGSHOT?"true":"false"),s(e)}},66114:(e,t,n)=>{"use strict";n.d(t,{NK:()=>r,YG:()=>s,ay:()=>i,i5:()=>a});let i=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}({}),r=function(e){return e.CONTAINS="CONTAINS",e.EQUALS="EQUALS",e.NOT_EQUALS="NOT_EQUALS",e.GREATER_THAN="GREATER_THAN",e}({})},15176:(e,t,n)=>{"use strict";n.d(t,{T:()=>s,X:()=>a});var i=n(88566);let a=function(e){return e.UPDATE_LOCKED_STATE="update_locked_state",e}({});class s extends i.r{}},23062:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s});var i=n(85270),a=n(10370);async function s(e){const{body:t}=await i.di.createCheckoutSession(new a.c,e),{redirectToUrl:n}=t;if(!new URL(n).hostname.endsWith(".spotify.com"))throw new Error("Unknown URL host");window.location.assign(n)}},56692:(e,t,n)=>{"use strict";n.d(t,{S:()=>r,Y:()=>s});var i=n(84179),a=n(73972);function s(e){return void 0===e||0===e.length?null:e.some((e=>[i.t.OAP_OTP,i.t.AUDIOBOOK_DIRECT_SALES].includes(e)))?"OTP":e.some((e=>[i.t.OAP_LINKING,i.t.ANCHOR_PAYWALL].includes(e)))?"SUBSCRIPTION":1===e?.length&&e.at(0)===i.t.ABP?"ABP":"OTHER"}function r(e){return e?.length?e.some((e=>e&&[a.t.OapOtp,a.t.AudiobookDirectSales].includes(e)))?"OTP":e.some((e=>e&&[a.t.OapLinking,a.t.AnchorPaywall].includes(e)))?"SUBSCRIPTION":1===e?.length&&e?.at(0)===a.t.Abp?"ABP":"OTHER":null}},74913:(e,t,n)=>{"use strict";n.d(t,{TS:()=>s,Zl:()=>r,rA:()=>i,rD:()=>a});const i=Spicetify.GraphQL.Definitions["imageURLAndSize"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"imageURLAndSize"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ImageSource"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]},a=Spicetify.GraphQL.Definitions["imageSources"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"imageSources"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"imageURLAndSize"}}]}}]}}]},s=Spicetify.GraphQL.Definitions["audioItems"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"audioItems"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AudioPage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"format"}},{kind:"Field",name:{kind:"Name",value:"fileId"}}]}}]}}]},r=Spicetify.GraphQL.Definitions["creator"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"creator"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"avatar"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"height"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}}]}}]}}]}}]}},24377:(e,t,n)=>{"use strict";n.d(t,{Kg:()=>l,NF:()=>r,Rr:()=>s,Sz:()=>i,Vn:()=>o,n0:()=>a});const i=Spicetify.GraphQL.Definitions["episodeTrailerUri"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"episodeTrailerUri"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EpisodeResponseWrapper"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}}]},a=Spicetify.GraphQL.Definitions["podcastEpisode"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"podcastEpisode"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"contents"}},{kind:"Field",name:{kind:"Name",value:"htmlDescription"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"creator"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"creator"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"audio"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"audioItems"}}]}},{kind:"Field",name:{kind:"Name",value:"audioPreview"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"format"}}]}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}},{kind:"Field",name:{kind:"Name",value:"state"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaTypes"}},{kind:"Field",name:{kind:"Name",value:"restrictions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paywallContent"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}},{kind:"Field",name:{kind:"Name",value:"unplayabilityReasons"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareUrl"}},{kind:"Field",name:{kind:"Name",value:"shareId"}}]}},{kind:"Field",name:{kind:"Name",value:"podcastV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"trailerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"episodeTrailerUri"}}]}},{kind:"Field",name:{kind:"Name",value:"showTypes"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"segments"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"segments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"20"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"contentInformation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"buttonTarget"}},{kind:"Field",name:{kind:"Name",value:"buttonText"}},{kind:"Field",name:{kind:"Name",value:"cardBodyText"}},{kind:"Field",name:{kind:"Name",value:"cardHeaderText"}}]}},{kind:"Field",name:{kind:"Name",value:"transcripts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"cdnUrl"}},{kind:"Field",name:{kind:"Name",value:"language"}}]}}]}}]}}]},s=Spicetify.GraphQL.Definitions["podcastMetadataV2"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"podcastMetadataV2"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Podcast"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"saved"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"htmlDescription"}},{kind:"Field",name:{kind:"Name",value:"contentType"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}},{kind:"Field",name:{kind:"Name",value:"unplayabilityReasons"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaType"}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareUrl"}},{kind:"Field",name:{kind:"Name",value:"shareId"}}]}},{kind:"Field",name:{kind:"Name",value:"trailerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"podcastEpisode"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"episodesV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContextEpisodePage"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"entity"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Episode"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"creator"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"creator"}}]}}]}}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"showTypes"}},{kind:"Field",name:{kind:"Name",value:"musicAndTalk"}},{kind:"Field",name:{kind:"Name",value:"topics"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"5"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"nextBestEpisodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"item"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"FragmentSpread",name:{kind:"Name",value:"podcastEpisode"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"score"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"accessInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isUserMemberOfAtLeastOneGroup"}},{kind:"Field",name:{kind:"Name",value:"unlockedBy"}}]}}]}}]},r=Spicetify.GraphQL.Definitions["minimalAudiobook"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"minimalAudiobook"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sources"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"width"}},{kind:"Field",name:{kind:"Name",value:"height"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"trailerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"showTypes"}}]}}]},o=Spicetify.GraphQL.Definitions["audiobookChapter"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"audiobookChapter"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"htmlDescription"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"audio"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"audioItems"}}]}},{kind:"Field",name:{kind:"Name",value:"audioPreview"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"format"}}]}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"releaseDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"playedState"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playPositionMilliseconds"}},{kind:"Field",name:{kind:"Name",value:"state"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaTypes"}},{kind:"Field",name:{kind:"Name",value:"restrictions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"paywallContent"}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}},{kind:"Field",name:{kind:"Name",value:"unplayabilityReasons"}}]}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareUrl"}},{kind:"Field",name:{kind:"Name",value:"shareId"}}]}},{kind:"Field",name:{kind:"Name",value:"audiobookV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"minimalAudiobook"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"availableMarkets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"countryCode"}}]}}]}}]}}]},l=Spicetify.GraphQL.Definitions["audiobookMetadataV2"]={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"audiobookMetadataV2"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Audiobook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"uri"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"saved"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"htmlDescription"}},{kind:"Field",name:{kind:"Name",value:"htmlDescriptionPlain"}},{kind:"Field",name:{kind:"Name",value:"authors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"narrators"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"coverArt"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"imageSources"}}]}},{kind:"Field",name:{kind:"Name",value:"contentRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"label"}}]}},{kind:"Field",name:{kind:"Name",value:"publisher"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}},{kind:"Field",name:{kind:"Name",value:"publishDate"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isoString"}}]}},{kind:"Field",name:{kind:"Name",value:"copyright"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"5"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"}},{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"text"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"rating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"canRate"}},{kind:"Field",name:{kind:"Name",value:"averageRating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"average"}},{kind:"Field",name:{kind:"Name",value:"showAverage"}},{kind:"Field",name:{kind:"Name",value:"totalRatings"}}]}},{kind:"Field",name:{kind:"Name",value:"rating"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rating"}},{kind:"Field",name:{kind:"Name",value:"userId"}},{kind:"Field",name:{kind:"Name",value:"showUri"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"price"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"finalListPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"formattedPrice"}},{kind:"Field",name:{kind:"Name",value:"amount"}}]}},{kind:"Field",name:{kind:"Name",value:"finalPrice"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currency"}},{kind:"Field",name:{kind:"Name",value:"formattedPrice"}},{kind:"Field",name:{kind:"Name",value:"amount"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"playability"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"playable"}},{kind:"Field",name:{kind:"Name",value:"reason"}},{kind:"Field",name:{kind:"Name",value:"unplayabilityReasons"}}]}},{kind:"Field",name:{kind:"Name",value:"mediaType"}},{kind:"Field",name:{kind:"Name",value:"sharingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shareUrl"}},{kind:"Field",name:{kind:"Name",value:"shareId"}}]}},{kind:"Field",name:{kind:"Name",value:"trailerV2"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"_uri"}},{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Chapter"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"audiobookChapter"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"showTypes"}},{kind:"Field",name:{kind:"Name",value:"topics"},arguments:[{kind:"Argument",name:{kind:"Name",value:"offset"},value:{kind:"IntValue",value:"0"}},{kind:"Argument",name:{kind:"Name",value:"limit"},value:{kind:"IntValue",value:"5"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"items"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"uri"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"duration"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalMilliseconds"}}]}},{kind:"Field",name:{kind:"Name",value:"accessInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accessExplanation"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ConsumptionCappedAccessExplanation"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"body"}},{kind:"Field",name:{kind:"Name",value:"actionText"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"isUserMemberOfAtLeastOneGroup"}},{kind:"Field",name:{kind:"Name",value:"unlockedBy"}}]}}]}}]}},6353:(e,t,n)=>{"use strict";n.d(t,{Y:()=>s});var i=n(59496),a=n(15176);const s=(0,i.createContext)({capabilities:{canFilter:!1,canSort:!1,canGetDefaultSort:!1},getMetadata:()=>Promise.reject(),getContents:()=>Promise.reject(),getBookContents:()=>Promise.reject(),getEpisodeOrChapter:()=>Promise.reject(),getPlayerSort:()=>"",getPlayerFilter:()=>"",getAccessInfo:()=>Promise.reject(),checkoutBook:()=>Promise.reject(),getEvents:()=>new a.T})},29662:(e,t,n)=>{"use strict";n.d(t,{E0:()=>s,ZM:()=>l,ye:()=>d,zZ:()=>o.z});var i=n(6353),a=n(4637);const s=function(e){const{instance:t,children:n}=e;return(0,a.jsx)(i.Y.Provider,{value:t,children:n})};var r=n(59496),o=n(47393);function l(e,t,n){const i=(0,o.z)(),{canSort:a}=i.capabilities,s=(0,r.useCallback)((async(a,s)=>i.getContents(e,{offset:a,limit:s,sort:t,filters:n})),[i,e,t,n]),l=(0,r.useCallback)((async(t,n)=>i.getContents(e,{offset:t,limit:n})),[i,e]);return a?s:l}function d(e){const t=(0,o.z)(),[n,i]=(0,r.useState)(null);return(0,r.useEffect)((()=>{!async function(){try{const n=await t.getAccessInfo(e);i(n)}catch(e){console.error(e),i(void 0)}}()}),[t,e]),n}},52315:(e,t,n)=>{"use strict";n.d(t,{I:()=>r});var i=n(9102),a=n(47393);const s=3e5;function r(e){const t=(0,a.z)(),{data:n,isError:r}=(0,i.useQuery)(["useEpisodeOrChapter",e],(()=>t.getEpisodeOrChapter(e)),{cacheTime:s,retry:(e,t)=>!t});return n||r?{isError:r,episodeOrChapter:n}:null}},47393:(e,t,n)=>{"use strict";n.d(t,{z:()=>s});var i=n(59496),a=n(6353);function s(){return(0,i.useContext)(a.Y)}},98432:(e,t,n)=>{"use strict";n.d(t,{l:()=>u});var i=n(9102),a=n(9374),s=n(47393),r=n(26406),o=n(59496),l=n(6353),d=n(15176);const c=3e5;function u(e){const t=(0,s.z)(),n=(0,i.useQueryClient)(),u=(0,o.useCallback)((()=>["useShowMetadata",e]),[e]),{data:m,error:p}=(0,i.useQuery)(u(),(()=>t.getMetadata(e)),{cacheTime:c,refetchOnWindowFocus:!1,retry:(e,t)=>t.message!==r.xr.RestrictedContent&&e<3}),g=(0,o.useCallback)((()=>{m&&n.invalidateQueries(u())}),[m,u,n]);return function(e,t,n){const i=(0,o.useContext)(l.Y),a=(0,o.useRef)(t);(0,o.useEffect)((()=>{const t=i.getEvents(),s=t=>{t.data.uri===e&&t.data.isLocked!==a.current&&(a.current=t.data.isLocked,n(t))};return t.addListener(d.X.UPDATE_LOCKED_STATE,s,{uri:e}),()=>{t.removeListener(d.X.UPDATE_LOCKED_STATE,s,{uri:e})}}),[i,e,n])}(e,m?.type===a.p.AUDIOBOOK&&m.isLocked,g),p?{data:null,error:p}:{data:m??null}}},19932:(e,t,n)=>{"use strict";n.d(t,{l:()=>g});var i=n(3959),a=n(33892),s=n.n(a);let r=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 r.UNKNOWN;case 1:case"PLAINTEXT_CONTENT":return r.PLAINTEXT_CONTENT;case 2:case"MUSIC_TRACK":return r.MUSIC_TRACK;default:return r.UNRECOGNIZED}}const l={encode(e,t=s().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 n of e.sections)d.encode(n,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 n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={version:"",episodeUri:"",publishedAt:"",sections:[],language:"",curated:!1};for(;n.pos>>3){case 1:a.version=n.string();break;case 2:a.episodeUri=n.string();break;case 3:a.publishedAt=n.string();break;case 4:a.sections.push(d.decode(n,n.uint32()));break;case 5:a.language=n.string();break;case 6:a.curated=n.bool();break;default:n.skipType(7&e)}}return a},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=>d.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?d.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=>d.fromPartial(e)))||[],t.language=e.language??"",t.curated=e.curated??!1,t}};const d={encode:(e,t=s().Writer.create())=>(0!==e.type&&t.uint32(8).int32(e.type),0!==e.startMs&&t.uint32(16).int32(e.startMs),void 0!==e.plaintextContent&&c.encode(e.plaintextContent,t.uint32(26).fork()).ldelim(),void 0!==e.musicTrack&&u.encode(e.musicTrack,t.uint32(50).fork()).ldelim(),""!==e.title&&t.uint32(34).string(e.title),void 0!==e.fallback&&c.encode(e.fallback,t.uint32(42).fork()).ldelim(),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={type:0,startMs:0,plaintextContent:void 0,musicTrack:void 0,title:"",fallback:void 0};for(;n.pos>>3){case 1:a.type=n.int32();break;case 2:a.startMs=n.int32();break;case 3:a.plaintextContent=c.decode(n,n.uint32());break;case 6:a.musicTrack=u.decode(n,n.uint32());break;case 4:a.title=n.string();break;case 5:a.fallback=c.decode(n,n.uint32());break;default:n.skipType(7&e)}}return a},fromJSON:e=>({type:m(e.type)?o(e.type):0,startMs:m(e.startMs)?Number(e.startMs):0,plaintextContent:m(e.plaintextContent)?c.fromJSON(e.plaintextContent):void 0,musicTrack:m(e.musicTrack)?u.fromJSON(e.musicTrack):void 0,title:m(e.title)?String(e.title):"",fallback:m(e.fallback)?c.fromJSON(e.fallback):void 0}),toJSON(e){const t={};return void 0!==e.type&&(t.type=function(e){switch(e){case r.UNKNOWN:return"UNKNOWN";case r.PLAINTEXT_CONTENT:return"PLAINTEXT_CONTENT";case r.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?c.toJSON(e.plaintextContent):void 0),void 0!==e.musicTrack&&(t.musicTrack=e.musicTrack?u.toJSON(e.musicTrack):void 0),void 0!==e.title&&(t.title=e.title),void 0!==e.fallback&&(t.fallback=e.fallback?c.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?c.fromPartial(e.plaintextContent):void 0,t.musicTrack=void 0!==e.musicTrack&&null!==e.musicTrack?u.fromPartial(e.musicTrack):void 0,t.title=e.title??"",t.fallback=void 0!==e.fallback&&null!==e.fallback?c.fromPartial(e.fallback):void 0,t}};const c={encode(e,t=s().Writer.create()){for(const n of e.plaintext)t.uint32(10).string(n);return t},decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={plaintext:[]};for(;n.pos>>3==1)a.plaintext.push(n.string());else n.skipType(7&e)}return a},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 u={encode:(e,t=s().Writer.create())=>(""!==e.uri&&t.uint32(10).string(e.uri),t),decode(e,t){const n=e instanceof s().Reader?e:new(s().Reader)(e);let i=void 0===t?n.len:n.pos+t;const a={uri:""};for(;n.pos>>3==1)a.uri=n.string();else n.skipType(7&e)}return a},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===r.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 g(e){try{const t=await fetch(e,{});if(t.ok&&t.body){const e=await t.arrayBuffer(),n=l.decode(new Uint8Array(e));return n.sections.map(p)}return null}catch(e){return null}}s().util.Long!==i.Z&&(s().util.Long=i.Z,s().configure())},26406:(e,t,n)=>{"use strict";n.d(t,{$_:()=>a,Ey:()=>c,WY:()=>r,it:()=>l,l6:()=>d,sY:()=>s,xr:()=>o});var i=n(9374);let 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}({}),r=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}({}),o=function(e){return e.RestrictedContent="Restricted content",e.Generic="Error while requesting the show metadata",e}({}),l=function(e){return e.UNKNOWN="unknown",e.TRAILER="trailer",e.CONTINUE_LISTENING="continue-listening",e.LATEST_PUBLISHED="latest-published",e.UP_NEXT="up-next",e.FIRST_PUBLISHED="first-published",e}({});function d(e){return e.type===i.p.AUDIOBOOK}function c(e){return e.type===i.p.CHAPTER}},6555:(e,t,n)=>{"use strict";n.d(t,{ld:()=>u,sV:()=>m,YS:()=>h,XU:()=>S,om:()=>c,rB:()=>N});var i=n(3802),a=n(73972),s=n(9603),r=n(9374),o=n(26406);const l="recent";var d=n(56692);function c(e){return{totalCount:e.totalCount,nextOffset:e.pagingInfo.nextOffset,items:e.items.map((e=>"Episode"!==e.entity.data.__typename?null:h(e.entity.data)))}}function u(e,t){return{totalCount:e.totalCount,nextOffset:e.pagingInfo.nextOffset,items:e.items.map((e=>"Chapter"===e.entity.data.__typename?k(e.entity.data,t):null))}}function m(e,t){return"Chapter"===e.__typename?k(e,t):h(e)}function p(e){switch(e){case a.Ku.AgeRestricted:return o.WY.AgeRestricted;case a.Ku.CatalogueRestricted:return o.WY.CatalogueRestricted;case a.Ku.CountryRestricted:return o.WY.CountryRestricted;case a.Ku.Explicit:return o.WY.Explicit;case a.Ku.PaymentRequired:return o.WY.PaymentRequired;case a.Ku.Playable:return o.WY.Playable;case a.Ku.Unavailable:default:return o.WY.Unavailable}}function g(e,t=!1){return{playable:!t&&e.playable,reason:t?o.WY.Anonymous:p(e.reason)}}function h(e){const t="Podcast"!==(n=e.podcastV2).data.__typename?null:{uri:n.data.uri,name:n.data.name,coverArt:n.data.coverArt?.sources||[],trailer:(i=n.data.trailerV2,("Episode"===i?.data.__typename?{uri:i.data.uri}:null)||null),showTypes:(n.data.showTypes||[]).filter(v)};var n,i;const a=(0,s.w$)(e?.restrictions,e.playability);return{type:r.p.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:(o=e.releaseDate,o?{isoString:o.isoString}:null),playedState:e.playedState,playability:g(e.playability),audioPreview:e.audioPreview,sharingInfo:e.sharingInfo,duration:{milliseconds:e.duration.totalMilliseconds},contentRating:e.contentRating,segmentsCount:0,podcastSubscription:a,contentInformation:e.contentInformation,transcript:e.transcripts?.items||null};var o}function k(e,t){return{type:r.p.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:g(e.playability,t),book:b(e.audiobookV2),isExplicit:e.contentRating?.label===a.KS.Explicit,is19PlusOnly:e.contentRating?.label===a.KS.NineteenPlus}}function v(e){return!!e}function f(e){return Boolean(e)}function y(e){const t=e.nextBestEpisodes.items.sort(((e,t)=>t.score-e.score)),n=t[0]?.item.data;if("Episode"!==n?.__typename)return;let i;const s="Episode"===e.trailerV2?.data.__typename?e.trailerV2.data.uri:null;return i=n.uri===s?o.it.TRAILER:n.playedState.state===a.sY.InProgress?o.it.CONTINUE_LISTENING:o.it.UP_NEXT,{type:i,data:h(n)}}function S(e){const t="Episode"===e.trailerV2?.data.__typename?(n=e.trailerV2.data,{type:r.p.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}):null;var n;return{type:r.p.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:l,nextBestEpisode:y(e),gatedContentAccessReason:(0,d.S)(e?.accessInfo?.unlockedBy)}}function b(e){if("Audiobook"!==e.data.__typename)return null;const t=e.data;return{uri:t.uri,name:t.name,coverArt:t.coverArt?.sources||[],trailer:(n=t,"Chapter"===n.trailerV2?.data.__typename?{uri:n.trailerV2.data.uri}:null)};var n}function _(e){return"ConsumptionCappedAccessExplanation"===e?.accessInfo?.accessExplanation?.__typename?{title:e.accessInfo.accessExplanation.title||"",body:e.accessInfo.accessExplanation.body||"",cta:e.accessInfo.accessExplanation.actionText||""}:null}function N(e,t){return"Audiobook"===e.__typename?function(e,t){return{type:r.p.AUDIOBOOK,uri:e.uri,name:e.name,coverArt:e.coverArt?.sources??[],narrators:e.narrators?.map((e=>e?.name)).filter(f)??[],sample:"Chapter"===e.trailerV2?.data.__typename?(c=e.trailerV2.data,{type:r.p.CHAPTER,uri:c.uri,name:c.name,coverArt:c.coverArt?.sources||[],audio:c.audio,audioPreview:c.audioPreview,sharingInfo:c.sharingInfo,duration:{milliseconds:c.duration.totalMilliseconds},contentRating:c.contentRating,isPlayable:c.playability.playable}):null,htmlDescription:e.htmlDescription??"",htmlDescriptionPlain:e.htmlDescriptionPlain??"",authorName:e.authors?.map((e=>e?.name)).filter(Boolean).join(i.ag.getSeparator())??"",rating:e.rating,isExplicit:e.contentRating?.label===a.KS.Explicit,duration:e.duration?.totalMilliseconds??0,copyrights:e.publisher?(n=e.publisher.name,s=e.copyright,[(o=n,l="P",{text:o,type:l}),...s.items]):[],publishDate:e.publishDate?new Date(e.publishDate.isoString):null,price:e.price,isLocked:!!t||!1===e.accessInfo?.isUserMemberOfAtLeastOneGroup,consumptionCapExplanation:_(e),gatedContentAccessReason:(0,d.S)(e.accessInfo?.unlockedBy)};var n,s,o,l,c}(e,t):S(e)}},75702:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,q:()=>a});let i=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}({})},56217:(e,t,n)=>{"use strict";n.d(t,{$:()=>o,E:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)(null),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(null===e)throw new Error("useSingAlongAPI must be used within a SingAlongAPIProvider");return e}},6444:(e,t,n)=>{"use strict";n.d(t,{Kw:()=>r,OT:()=>s,Od:()=>o,T5:()=>c,Zs:()=>u,cT:()=>d,mK:()=>l,nW:()=>m});var i=n(73972),a=n(48811);const s=({albumArtists:e,albumName:t,albumType:n,shouldLocalize:s,i18n:r})=>{if(!n||!t||!e)return"";const o=n!==i.VZ.Ep?(e=>e.charAt(0).toUpperCase()+e.toLowerCase().slice(1))(n):n,l=(0,a.R)(n),d=`${t} - ${o} by ${e} | Spotify`,c=r.get("i18n.meta.album.title",t,l,e);return s?c:d},r=({artistName:e})=>e?`${e} | Spotify`:"",o=({showOrAudiobookName:e,type:t,isVideoPodcastShowTitleTagEnabled:n=!1})=>e?n&&"Podcast"===t?`${e} | Video ${t} on Spotify`:`${e} | ${t} on Spotify`:"",l=({episodeOrChapterName:e,showOrAudiobookName:t,type:n})=>e&&t?`${e} - ${t} | ${n} on Spotify`:"",d=({genreName:e})=>e?`${e} | Spotify`:"",c=({playlistName:e,userName:t,isSpotifyOwned:n=!1})=>{if(!e||!t)return"";return`${e}${n?"":` - playlist by ${t}`} | ${n?"Spotify Playlist":"Spotify"}`},u=({i18n:e,trackArtistsList:t,trackName:n,shouldLocalize:i})=>{if(!t||!n)return"";const a=`${n} - song and lyrics by ${t} | Spotify`,s=e.get("i18n.meta.track-lyrics.title",n,t);return i?s:a},m=({i18n:e,shouldLocalize:t})=>{const n=e.get("i18n.meta.home.title");return t?n:"Spotify - Web Player: Music for everyone"}},97411:(e,t,n)=>{"use strict";n.d(t,{J:()=>a,k:()=>s});let i=null;function a(e){i=e}function s(){if(null===i)throw new Error("Missing `instance`. Have you called `setTransportInstance` yet?");return i}},34630:(e,t,n)=>{"use strict";function i(e){return async()=>{const t=await e();if(null===t)throw new Error("Token is currently unavailable.");const{accessToken:n,accessTokenExpirationTimestampMs:i}=t;return[n,Math.floor(((i||0)-Date.now())/1e3)]}}n.d(t,{V:()=>i})},15440:(e,t,n)=>{"use strict";n.d(t,{f:()=>s});var i=n(34630);const a={disconnectBeforeUnload:!0,reconnectionRetries:3,requestMode:"fetch"};function s(e,t,n,s={}){return e({providers:{endpoints:t,token:(0,i.V)(n)},...a,...s})}},32859:(e,t,n)=>{"use strict";n.d(t,{w:()=>l});var i=n(33024);const a="https://apresolve.spotify.com/",s="https://api.spotify.com/";var r=function(e){return e.DEALER="dealer",e.WEBGATE="spclient",e}(r||{});const o=3e3;function l({timeout:e=o}={}){const t=function(e){const t=`${a}?type=${r.DEALER}&type=${r.WEBGATE}`;return async()=>{const n=new AbortController,i=setTimeout((()=>n.abort()),e);let a;try{const e=await fetch(t,{signal:n.signal});clearTimeout(i),a=await e.json()}catch(t){if(n.signal.aborted)throw new Error(`x-resolve request timed out after ${e} ms`);throw t}if(!Array.isArray(a[r.DEALER])||!Array.isArray(a[r.WEBGATE])||0===a[r.DEALER].length||0===a[r.WEBGATE].length)throw new Error("x-resolve responded with incomplete results");const o=a[r.DEALER][0],l=a[r.WEBGATE][0];return{dealer:`wss://${o.replace(/:443$/,"")}`,webgate:`https://${l.replace(/:443$/,"")}`,webapi:s}}}(e),n=(0,i.Q)({});return async function(e){try{return await t(e)}catch(t){return console.error("Failed to resolve endpoints via x-resolve. Using fallbacks!",t),await n(e)}}}},76089:(e,t,n)=>{"use strict";function i(e,t={}){return void 0===e?t:{...e,...t}}n.d(t,{F:()=>i})},78379:(e,t,n)=>{"use strict";n.d(t,{z:()=>a});var i=n(5822);class a{constructor(e,t){this.ubiLogger=e,this.isAuthenticated=t}logInteraction(e){const t=this.isAuthenticated?this.ubiLogger.logInteraction.bind(this.ubiLogger):this.ubiLogger.logNonAuthInteraction.bind(this.ubiLogger),n=this.ubiLogger.getPageInstanceId()??void 0;if("ui_navigate"!==e.actionName){return{interactionId:t(e),pageInstanceId:n}}const i=this.formatUiNavigateEvent(e),a=t(i);return this.interaction={id:a,event:i},{interactionId:a,pageInstanceId:n}}logImpression(e){return this.isAuthenticated?this.ubiLogger.logImpression(e):this.ubiLogger.logNonAuthImpression(e)}logNavigation(e){this.isAuthenticated&&(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:n}=this.interaction,i=t.actionParameterNames?.findIndex((e=>"destination"===e));if(void 0===i||-1===i)return;const a=t.actionParameterValues?.[i];if(a&&a===e)return n}formatUiNavigateEvent=e=>{const t=e.actionParameterNames?.findIndex((e=>"destination"===e));return void 0===t||-1===t?e:{...e,actionParameterValues:e.actionParameterValues?.map(((e,n)=>n!==t?e:(0,i.S)(e)??""))}}}},29984:(e,t,n)=>{"use strict";n.d(t,{$:()=>o,d:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)(void 0),r=({value:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(void 0===e)throw new Error("useUBIEventLocation() must be used within a UBIEventLocationContextProvider");return e}},94005:(e,t,n)=>{"use strict";n.d(t,{N:()=>r});var i=n(59496),a=n(29984),s=n(4637);const r=i.memo((function({spec:e,children:t}){const n=(0,i.useMemo)((()=>e?.getAbsoluteLocation()??null),[e]);return(0,s.jsx)(a.d,{value:n,children:t})}))},62551:(e,t,n)=>{"use strict";n.d(t,{Pr:()=>d,m9:()=>l});var i=n(59496),a=n(28336),s=n(12330),r=n(4637);const o=(0,i.createContext)(void 0),l=({children:e})=>{const t=(0,s.$)(),n=(0,i.useMemo)((()=>new a.W(t)),[t]);return(0,r.jsx)(o.Provider,{value:n,children:e})},d=()=>(0,i.useContext)(o)},12330:(e,t,n)=>{"use strict";n.d(t,{$:()=>o,a:()=>r});var i=n(59496),a=n(4637);const s=(0,i.createContext)(void 0),r=({instance:e,children:t})=>(0,a.jsx)(s.Provider,{value:e,children:t}),o=()=>{const e=(0,i.useContext)(s);if(void 0===e)throw new Error("useUBILogger() must be used within a UBILoggerContextProvider");return e}},96170:(e,t,n)=>{"use strict";n.d(t,{d0:()=>i.d,Nh:()=>c.N,aH:()=>a.a,Wi:()=>d,$P:()=>a.$,fU:()=>s.f});var i=n(29984),a=n(12330),s=n(15342),r=n(59496),o=n(62551),l=n(72102);const d=e=>{const t=(0,o.Pr)(),n=(0,r.useRef)(null),i=(0,r.useMemo)((()=>e?.impression()),[e]);return(0,l.KW)((()=>{if(n.current&&t&&i){return t.addToObservableEntities({impression:()=>i,element:n.current})||void 0}}),[t,i]),(0,r.useCallback)((e=>{n.current=e}),[])};var c=n(94005)},45118:(e,t,n)=>{"use strict";n.d(t,{T:()=>s});var i=n(15342),a=n(56084);const s=e=>(0,i.f)(a.M,{data:{uri:e}})},15342:(e,t,n)=>{"use strict";n.d(t,{f:()=>l});var i=n(59496),a=n(72102),s=n(29984),r=n(12330),o=n(94005);const l=(e,t)=>{const n=(0,r.$)(),l=(0,s.$)(),d=(0,a.NY)((()=>({...t,parentAbsoluteLocation:t.parentAbsoluteLocation??l})),[t,l]);return{spec:(0,i.useMemo)((()=>e(d)),[e,d]),logger:n,UBIFragment:o.N}}},5822:(e,t,n)=>{"use strict";n.d(t,{S:()=>s});var i=n(50346);const a=new Set([i.JM.ALBUM,i.JM.ARTIST,i.JM.PLAYLIST,i.JM.PLAYLIST_V2,i.JM.TRACK,i.JM.EPISODE,i.JM.SHOW,i.JM.LOCAL_TRACK]),s=e=>{const t=(0,i.EC)(e);if(!t)return;if((0,i.Ue)(t))return a.has(t.id)?t.toString().replace(":app:",":"):t.toString();if(a.has(t.type))return t.toString();const n=t.args||t.query&&[t.query]||t.category&&[t.category]||void 0,s=(0,i.vU)(t.type,n);return s?.toString()??void 0}},4721:(e,t,n)=>{"use strict";n.d(t,{C:()=>a});var i=n(50346);function a(e){const t=(0,i.EC)(e);if(null===t||void 0===t.username)throw new Error("Invalid URI or URI does not contain username!");return t.username}},26849:(e,t,n)=>{"use strict";n.d(t,{S:()=>a,p:()=>i});const i=e=>`/genre/${e}`,a=e=>{const t=e.split("/");return t[t.length-1]}},19154:(e,t,n)=>{"use strict";n.d(t,{bC:()=>o,ge:()=>l,k1:()=>a});var i=n(3802);const a={[i.go.en]:{displayName:"English",displayNameEn:"English"},[i.go.af]:{displayName:"Afrikaans",displayNameEn:"Afrikaans"},[i.go.am]:{displayName:"አማርኛ",displayNameEn:"Amharic"},[i.go.ar]:{displayName:"العَرَبِيَّة",displayNameEn:"Arabic",isRTL:!0},[i.go.arEG]:{displayName:"عربي مصري",displayNameEn:"Arabic (Egypt)",isRTL:!0},[i.go.arMA]:{displayName:"عربي مغربي",displayNameEn:"Arabic (Morocco)",isRTL:!0},[i.go.arSA]:{displayName:"عربي سعودي",displayNameEn:"Arabic (Saudi Arabia)",isRTL:!0},[i.go.az]:{displayName:"Azərbaycanca",displayNameEn:"Azerbaijani"},[i.go.bg]:{displayName:"Български",displayNameEn:"Bulgarian"},[i.go.bho]:{displayName:"भोजपुरी",displayNameEn:"Bhojpuri"},[i.go.bn]:{displayName:"বাংলা",displayNameEn:"Bengali"},[i.go.bs]:{displayName:"Bosanski",displayNameEn:"Bosnian"},[i.go.ca]:{displayName:"Català",displayNameEn:"Catalan"},[i.go.cs]:{displayName:"Čeština",displayNameEn:"Czech"},[i.go.da]:{displayName:"Dansk",displayNameEn:"Danish"},[i.go.de]:{displayName:"Deutsch",displayNameEn:"German"},[i.go.el]:{displayName:"Eλληνικά",displayNameEn:"Greek"},[i.go.enGB]:{displayName:"English (United Kingdom)",displayNameEn:"English (United Kingdom)"},[i.go.es]:{displayName:"Español de España",displayNameEn:"European Spanish"},[i.go.esAR]:{displayName:"Español (Argentina)",displayNameEn:"Spanish (Argentina)"},[i.go.esMX]:{displayName:"Español (México)",displayNameEn:"Spanish (Mexico)"},[i.go.es419]:{displayName:"Español de Latinoamérica",displayNameEn:"Latin American Spanish"},[i.go.et]:{displayName:"Eesti",displayNameEn:"Estonian"},[i.go.eu]:{displayName:"Euskara",displayNameEn:"Basque"},[i.go.fa]:{displayName:"فارسی",displayNameEn:"Persian",isRTL:!0},[i.go.fi]:{displayName:"Suomeksi",displayNameEn:"Finnish"},[i.go.fil]:{displayName:"Filipino",displayNameEn:"Filipino"},[i.go.fr]:{displayName:"Français",displayNameEn:"French"},[i.go.frCA]:{displayName:"Français Canadien",displayNameEn:"Canadian French"},[i.go.gl]:{displayName:"Galego",displayNameEn:"Galician"},[i.go.gu]:{displayName:"ગુજરાતી",displayNameEn:"Gujarati"},[i.go.he]:{displayName:"עברית",displayNameEn:"Hebrew",isRTL:!0},[i.go.hi]:{displayName:"हिन्दी",displayNameEn:"Hindi"},[i.go.hr]:{displayName:"Hrvatski",displayNameEn:"Croatian"},[i.go.hu]:{displayName:"Magyar",displayNameEn:"Hungarian"},[i.go.id]:{displayName:"Bahasa Indonesia",displayNameEn:"Indonesian"},[i.go.is]:{displayName:"Íslenska",displayNameEn:"Icelandic"},[i.go.it]:{displayName:"Italiano",displayNameEn:"Italian"},[i.go.ja]:{displayName:"日本語",displayNameEn:"Japanese"},[i.go.kn]:{displayName:"ಕನ್ನಡ",displayNameEn:"Kannada"},[i.go.ko]:{displayName:"한국어",displayNameEn:"Korean"},[i.go.lt]:{displayName:"Lietuvių",displayNameEn:"Lithuanian"},[i.go.lv]:{displayName:"Latviešu",displayNameEn:"Latvian"},[i.go.mk]:{displayName:"Македонски",displayNameEn:"Macedonian"},[i.go.ml]:{displayName:"മലയാളം",displayNameEn:"Malayalam"},[i.go.mr]:{displayName:"मराठी",displayNameEn:"Marathi"},[i.go.ms]:{displayName:"Melayu",displayNameEn:"Malay"},[i.go.nb]:{displayName:"Norsk",displayNameEn:"Norwegian"},[i.go.ne]:{displayName:"नेपाली",displayNameEn:"Nepali"},[i.go.nl]:{displayName:"Nederlands",displayNameEn:"Dutch"},[i.go.or]:{displayName:"ଓଡ଼ିଆ",displayNameEn:"Odia"},[i.go.paIN]:{displayName:"ਪੰਜਾਬੀ",displayNameEn:"Punjabi"},[i.go.paPK]:{displayName:"پنجابی",displayNameEn:"Punjabi",isRTL:!0},[i.go.pl]:{displayName:"Polski",displayNameEn:"Polish"},[i.go.ptBR]:{displayName:"Português do Brasil",displayNameEn:"Brazilian Portuguese"},[i.go.ptPT]:{displayName:"Português",displayNameEn:"European Portuguese"},[i.go.ro]:{displayName:"Română",displayNameEn:"Romanian"},[i.go.ru]:{displayName:"Русский",displayNameEn:"Russian"},[i.go.sk]:{displayName:"Slovenčina",displayNameEn:"Slovak"},[i.go.sl]:{displayName:"Slovenski",displayNameEn:"Slovenian"},[i.go.sr]:{displayName:"Srpski",displayNameEn:"Serbian"},[i.go.sv]:{displayName:"Svenska",displayNameEn:"Swedish"},[i.go.sw]:{displayName:"Kiswahili",displayNameEn:"Swahili"},[i.go.ta]:{displayName:"தமிழ்",displayNameEn:"Tamil"},[i.go.te]:{displayName:"తెలుగు",displayNameEn:"Telugu"},[i.go.th]:{displayName:"ภาษาไทย",displayNameEn:"Thai"},[i.go.tr]:{displayName:"Türkçe",displayNameEn:"Turkish"},[i.go.uk]:{displayName:"Українська",displayNameEn:"Ukrainian"},[i.go.ur]:{displayName:"اردو",displayNameEn:"Urdu",isRTL:!0},[i.go.vi]:{displayName:"Tiếng Việt",displayNameEn:"Vietnamese"},[i.go.zhCN]:{displayName:"简体中文",displayNameEn:"Simplified Chinese"},[i.go.zhHK]:{displayName:"繁體中文 (香港)",displayNameEn:"Chinese (Traditional) Hong Kong"},[i.go.zhTW]:{displayName:"中文",displayNameEn:"Traditional Chinese"},[i.go.zu]:{displayName:"IsiZulu",displayNameEn:"Zulu"}},s=[i.go.en,i.go.af,i.go.am,i.go.ar,i.go.az,i.go.bg,i.go.bho,i.go.bn,i.go.ca,i.go.cs,i.go.da,i.go.de,i.go.el,i.go.es,i.go.es419,i.go.et,i.go.fa,i.go.fi,i.go.fil,i.go.fr,i.go.frCA,i.go.gu,i.go.he,i.go.hi,i.go.hr,i.go.hu,i.go.id,i.go.is,i.go.it,i.go.ja,i.go.kn,i.go.ko,i.go.lt,i.go.lv,i.go.ml,i.go.mr,i.go.ms,i.go.nb,i.go.ne,i.go.nl,i.go.or,i.go.paIN,i.go.paPK,i.go.pl,i.go.ptBR,i.go.ptPT,i.go.ro,i.go.ru,i.go.sk,i.go.sl,i.go.sr,i.go.sv,i.go.sw,i.go.ta,i.go.te,i.go.th,i.go.tr,i.go.uk,i.go.ur,i.go.vi,i.go.zhCN,i.go.zhTW,i.go.zu],r=[i.go.arEG,i.go.arMA,i.go.arSA,i.go.bs,i.go.enGB,i.go.esAR,i.go.esMX,i.go.eu,i.go.gl,i.go.zhHK,i.go.mk],o=[...s],l=[...s]},73972:(e,t,n)=>{"use strict";n.d(t,{$C:()=>g,$_:()=>d,Cl:()=>f,KS:()=>o,Ku:()=>k,Le:()=>v,Mw:()=>h,RR:()=>b,VQ:()=>l,VZ:()=>i,Wf:()=>u,Yk:()=>a,bm:()=>p,dm:()=>m,p2:()=>s,sY:()=>c,t:()=>y,uh:()=>S,xN:()=>r});let i=function(e){return e.Album="ALBUM",e.Audiobook="AUDIOBOOK",e.Compilation="COMPILATION",e.Ep="EP",e.Podcast="PODCAST",e.Single="SINGLE",e.Unknown="UNKNOWN",e}({}),a=function(e){return e.Autobiography="AUTOBIOGRAPHY",e.Biography="BIOGRAPHY",e}({}),s=function(e){return e.Album="ALBUM",e.Artist="ARTIST",e.Concert="CONCERT",e.Episode="EPISODE",e.ExclusiveMerch="EXCLUSIVE_MERCH",e.Merch="MERCH",e.Other="OTHER",e.Playlist="PLAYLIST",e.Podcast="PODCAST",e.Track="TRACK",e}({}),r=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}({}),o=function(e){return e.Explicit="EXPLICIT",e.NineteenPlus="NINETEEN_PLUS",e.None="NONE",e.Unknown="UNKNOWN",e}({}),l=function(e){return e.Day="DAY",e.Hour="HOUR",e.Minute="MINUTE",e.Month="MONTH",e.Year="YEAR",e}({}),d=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),c=function(e){return e.Completed="COMPLETED",e.InProgress="IN_PROGRESS",e.NotStarted="NOT_STARTED",e}({}),u=function(e){return e.Episode="EPISODE",e.PodcastEpisode="PODCAST_EPISODE",e.Unknown="UNKNOWN",e}({}),m=function(e){return e.LikedSongs="LIKED_SONGS",e.YourEpisodes="YOUR_EPISODES",e}({}),p=function(e){return e.Facebook="FACEBOOK",e.Instagram="INSTAGRAM",e.Other="OTHER",e.Soundbetter="SOUNDBETTER",e.Twitter="TWITTER",e.Wikipedia="WIKIPEDIA",e}({}),g=function(e){return e.Description="DESCRIPTION",e.Guest="GUEST",e.Host="HOST",e.Lyrics="LYRICS",e.Name="NAME",e.UnknownField="UNKNOWN_FIELD",e}({}),h=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}({}),k=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}({}),v=function(e){return e.AfterUid="AFTER_UID",e.BeforeUid="BEFORE_UID",e.BottomOfPlaylist="BOTTOM_OF_PLAYLIST",e.TopOfPlaylist="TOP_OF_PLAYLIST",e}({}),f=function(e){return e.Audio="AUDIO",e.Mixed="MIXED",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({}),y=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}({}),S=function(e){return e.Album="ALBUM",e.Episode="EPISODE",e.Unknown="UNKNOWN",e.WhatsNewFeedNotification="WHATS_NEW_FEED_NOTIFICATION",e}({}),b=function(e){return e.Hidden="HIDDEN",e.New="NEW",e.Seen="SEEN",e.Unknown="UNKNOWN",e}({})},9603:(e,t,n)=>{"use strict";n.d(t,{p_:()=>C,BH:()=>k,Bq:()=>o,Pv:()=>u,jv:()=>S,Bi:()=>p,NS:()=>m,LO:()=>y,D:()=>l,w$:()=>b,dR:()=>c,x7:()=>f,GD:()=>_,Cf:()=>x,mQ:()=>N,U2:()=>w,R7:()=>s,sW:()=>a,Rn:()=>g,wY:()=>I});var i=n(73972);function a(e){return e?.label===i.KS.Explicit}function s(e){return e?.label===i.KS.NineteenPlus}var r=n(29251);function o(e,t=null){if(null===e){return(t??new Date(0)).toISOString()}return e.isoString}function l(e){return null===e?null:o(e)}function d(e){const t=e?.precision;switch(t){case i.VQ.Minute:case i.VQ.Hour:case i.VQ.Day:return"day";case i.VQ.Month:return"month";case i.VQ.Year:case void 0:return"year";default:return(0,r.U)(t)}}function c(e,t=null){return{date:o(e,t),precision:d(e)}}function u(e){return{milliseconds:e.totalMilliseconds}}function m(e){return null!==e?e.sources.map(p):[]}function p(e){return{url:e.url,width:e.width,height:e.height}}function g(e){return e?.playable??!1}var h=n(9374);function k(e){return e.items.map((({uri:e,profile:{name:t}})=>({type:h.p.ARTIST,uri:e,name:t})))}var v=n(12741);function f(e){switch(e){case i.Cl.Audio:return v.E.AUDIO;case i.Cl.Video:return v.E.VIDEO;case i.Cl.Mixed:return v.E.MIXED;case i.Cl.Unknown:return v.E.UNKNOWN;default:return(0,r.U)(e)}}function y(e){return null!==e?[e.code]:[]}function S(e){return{type:h.p.SHOW,uri:e.uri,name:e.name,publisher:e.publisher?.name??"",images:m(e.coverArt),mediaType:f(e.mediaType)}}function b(e,t){const n=e?.paywallContent??!1,a=t.reason;return{isPaywalled:n,isUserSubscribed:n&&a!==i.Ku.PaymentRequired}}function _(e,t){return{milliseconds:e.totalMilliseconds-t.playPositionMilliseconds}}function N(e){return e.items.map((({uri:e,profile:{name:t}})=>({type:h.p.ARTIST,uri:e,name:t})))}function E({items:e}){if(0===e.length)return{type:h.p.ARTIST,uri:"",name:""};const{uri:t,profile:{name:n}}=e[0];return{type:h.p.ARTIST,uri:t,name:n}}function x(e){return{type:h.p.ALBUM,uri:e.uri,name:e.name,images:m(e.coverArt),artist:E(e.artists)}}function C(e,t,n){if(null!==e&&e.__typename!==t)throw new Error(n||`${e} is not a "${t}"`)}function w(e,t){try{!function(e){if(null===e)throw new Error(`${e} is \`null\``)}(e);const n=t.split(".");let i=e;for(;n.length;){i=i[n.shift()]}return function(e){if(e.message)throw new Error(`${e} is a \`PathfinderError\``)}(i),i}catch{throw new Error(`Could not get "${t}"!`)}}function I(e,t,n){try{return w(e,t)}catch{return n}}},42495:(e,t,n)=>{"use strict";n.d(t,{Br:()=>f,C:()=>Z,CJ:()=>k,Cd:()=>B,DX:()=>y,Ev:()=>x,F3:()=>K,Gx:()=>E,HX:()=>w,Lp:()=>A,NC:()=>$,Nm:()=>q,OC:()=>X,Pz:()=>v,Qp:()=>_,RC:()=>b,Ro:()=>U,Uk:()=>D,WS:()=>F,Wp:()=>c,XF:()=>j,Xf:()=>L,YS:()=>J,Zn:()=>Q,b5:()=>g,bS:()=>N,bw:()=>m,c$:()=>O,c9:()=>V,dq:()=>R,es:()=>W,ho:()=>T,iU:()=>P,jM:()=>H,lQ:()=>p,nv:()=>z,qt:()=>S,r4:()=>C,rS:()=>a,sM:()=>l,sb:()=>h,sz:()=>I,tp:()=>Y,wy:()=>M,yg:()=>G});var i=n(16320);let a=function(e){return e.DISABLED="DISABLED",e.TWO_USER="TWO_USER",e.MULTI_USER="MULTI_USER",e}({}),s=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT="variant",e}({}),r=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT="variant",e}({}),o=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT="variant",e}({}),l=function(e){return e.DEFAULT="default",e.VARIANTA="varianta",e.VARIANTB="variantb",e}({}),d=function(e){return e.DEFAULT="default",e.VARIANTA="varianta",e.VARIANTB="variantb",e}({}),c=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT_UI="variant_ui",e.VARIANT_DATA="variant_data",e}({}),u=function(e){return e.DEFAULT="default",e.CONTROL="control",e.VARIANT="variant",e}({});(0,i.JP)({name:"exampleOfSharedPropertyThatDoesNotExist",description:"Example of enabling a propoerty that is shared between Desktop, Mobile and Embed",default:!1});const m=(0,i.JP)({name:"enableOfflineVideoDev",description:"Enables Spotify videos to be offlined on DesktopX. Used during feature development",default:!1}),p=(0,i.JP)({name:"betamaxWidevineVersionSupported",description:"true if the version of widevine used is still supported.",default:!0}),g=(0,i.JP)({name:"betamaxBoomboxAudioSync",description:"true if video/audio sync is enabled (experimental).",default:!1}),h=(0,i.z8)({name:"betamaxOfflineTargetBitrate",description:"targetBitrate to use when offlining. The closest to this bitrate to this is used.",default:12e5,lower:1e3,upper:1e9}),k=(0,i.JP)({name:"enableBetamaxSdkSubtitlesDesktopX",description:"Enables subtitles setting and rendering subtitles on the betamax SDK on DesktopX",default:!1}),v=(0,i.JP)({name:"enableBetamaxSdkMuxDesktopXDev",description:"Enables MUX library for development on Desktop X",default:!1}),f=((0,i.JP)({name:"enableVideoOnVideoSaiDev",description:"Enables video-on-video SAI on videos Desktop X. Used during feature development",default:!1}),(0,i.JP)({name:"enableBetamaxSdkVmp",description:"Enables client-side widevine VMP (verified media path) on betamax SDK.",default:!1})),y=(0,i.JP)({name:"enableBetamaxSdkVideoOnVideoSai",description:"Enables video-on-video SAI on videos Desktop X",default:!1}),S=(0,i.z8)({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}),b=(0,i.z8)({name:"betamaxSdkRetryAttempts",description:"The number of times to retry on network",default:2,upper:100,lower:1}),_=(0,i.JP)({name:"betamaxSdkDataSaverV2",description:"Enables the data saver feature on betamax SDK (linked to the video show/hide controls and close video window)",default:!1}),N=(0,i.z8)({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,i.JP)({name:"betamaxVideoAutoplay",description:"Enables an alternative method for video autoplay to address Mux metrics",default:!1}),x=(0,i.JP)({name:"enableBetamaxSdkSurfaceBasedResolutionCap",description:"Enables surface-based resolution cap for adaptive video on betamax SDK",default:!1}),C=(0,i.z8)({name:"betamaxSdkMaxBitrate",description:"Sets the max bitrate cap for adaptive video on betamax SDK (0=disabled)",default:0,upper:1e8,lower:0}),w=(0,i.JP)({name:"enableBetamaxSdkPlayerPool",description:"Enables player pool for betamax SDK",default:!1}),I=(0,i.z8)({name:"betamaxSdkPlayerPoolSize",description:"Sets the player pool size, should it be enabled",default:20,upper:100,lower:0}),T=(0,i.JP)({name:"enableVideoPip",description:"Enables desktop picture-in-picture surface using betamax SDK.",default:!1}),A=(0,i.JP)({name:"enableStreamReportingTracker3",description:"Enables use of the StreamReporting module for video playback",default:!0}),P=(0,i.JP)({name:"showWrappedBanner",description:"Show Wrapped banner on wrapped genre page",default:!1}),O=(0,i.VL)({name:"enableBlendInvitation",description:"Enable users to join Blends through client-web",values:a,default:a.DISABLED}),D=((0,i.JP)({name:"enableLibraryGraphQL",description:"Use the `LibraryGraphQL` implementation using Pathfinder instead of Web API",default:!1}),(0,i.JP)({name:"enableLibraryGraphQLV2",description:"Use the `LibraryGraphQLExperimental` implementation to give some traffic to the YLX backend",default:!1})),R=(0,i.JP)({name:"enableSubtitlesUsingHarmony",description:"Enable subtitles using Harmony",default:!1}),L=(0,i.JP)({name:"enableUriLinks",description:"Enable the `uri_link` type in Web API /views",default:!1}),F=((0,i.VL)({name:"enableI18nRoutes",description:"Enable internationalized routes for all locales in EXPERIMENTAL_INTERNATIONALIZED_LOCALES.",values:s,default:s.DEFAULT}),(0,i.JP)({name:"enableCastConnect",description:"Enable Google's new Cast Connect feature for Android TV from Web Player's Cast Sender implementation",default:!1})),j=((0,i.JP)({name:"enableNewEpisodes",description:"Enable the new episodes view",default:!1}),(0,i.VL)({name:"merchVariantExperiment",description:"Merch shelf re-ordering experiment on Artist Profile Page(A/B/C test)",values:l,default:l.DEFAULT})),M=((0,i.VL)({name:"OnTourVariantExperiment",description:"On Tour shelf re-ordering experiment on Artist Page(A/B/C test)",values:d,default:d.DEFAULT}),(0,i.JP)({name:"enableMerchOnAlbum",description:"Enable merch shelf view on album page",default:!1}),(0,i.JP)({name:"enablePickAndShuffle",description:"Enable pick and shuffle",default:!1})),U=((0,i.JP)({name:"enableNewTicketingSection",description:"Enable New Ticketing section on Concert Event Pages",default:!1}),(0,i.JP)({name:"enableEqualizer",description:"Enable audio equalizer for Desktop and Web Player",default:true})),B=(0,i.JP)({name:"enableCoreAutoplay",description:"Enable autoplay initiated by the core player rather than a local implementation",default:!1}),V=((0,i.JP)({name:"enableAlbumAndTrackCanonicals",description:"Add rel canonical tags for SEO to non-canonical album and track entity pages",default:!1}),(0,i.JP)({name:"betamaxFilterNegativeDuration",description:"Remove updates to esperanto for duration that is negative",default:!0}));let H=function(e){return e.DEFAULT="DEFAULT",e.MORE_CARDS="MORE_CARDS",e.FEWER_CARDS="FEWER_CARDS",e}({});const G=(0,i.VL)({name:"contentDensity",description:"Change the number of cards that are shown in a gridcontainer",values:H,default:H.DEFAULT}),W=(0,i.VL)({name:"enableRTPFeaturedArtists",description:"Enable featured artists rich data on track page",values:r,default:r.DEFAULT}),z=((0,i.VL)({name:"enableRTPTrackCredits",description:"Enable track credits on track page",values:o,default:o.DEFAULT}),(0,i.JP)({name:"enableUserFraudVerification",description:"Enable user fraud verification",default:!1})),K=((0,i.JP)({name:"enableUserFraudVerificationRequest",description:"Enable the IAV component make api requests",default:!0}),(0,i.VL)({name:"enableRichAlbumPage",description:"Enable the rich album page that has more content",values:c,default:c.DEFAULT})),Y=(0,i.JP)({name:"enableConcertsInterested",description:"Enable Save & Retrieve feature for concerts",default:!1}),q=((0,i.VL)({name:"enableI18nAdditionalPages",description:"Enable additional internationalized pages beyond initial pages.",values:u,default:u.DEFAULT}),(0,i.JP)({name:"enableUserFraudSignals",description:"Enable user fraud signals",default:!1})),Z=(0,i.JP)({name:"enablePlaylistEsperanto",description:"Use the PlaylistEsperanto implementation of the Playlist API",default:!1});let Q=function(e){return e.DEFAULT="default",e.CONTROL="control",e.CANONICAL_TOP_POSITION="canonical-top-position",e.CANONICAL_BOTTOM_POSITION="canonical-bottom-position",e.ORGANIC_TOP_POSITION="organic-top-position",e.ORGANIC_BOTTOM_POSITION="organic-bottom-position",e}({});const J=(0,i.VL)({name:"enableTrackInternalLinkRecommender",description:"Enable internal link recommender component for track entity pages",values:Q,default:Q.DEFAULT}),$=(0,i.JP)({name:"enableConcertsForThisIsPlaylist",description:"Enable Tour Card on This is Playlist",default:!1}),X=(0,i.JP)({name:"enableConcertsNearYou",description:"Enable Concerts Near You Playlist",default:!1})},62144:(e,t,n)=>{"use strict";n.d(t,{n:()=>i});const i={ALBUM:"ALBUM",AUDIOBOOK:"AUDIOBOOK",EP:"EP",COMPILATION:"COMPILATION",PODCAST:"PODCAST",SINGLE:"SINGLE",UNKNOWN:"UNKNOWN"}},50075:()=>{},81202:()=>{},96042:(e,t,n)=>{"use strict"},9374:(e,t,n)=>{"use strict";n.d(t,{p:()=>i});let i=function(e){return e.AD="ad",e.ALBUM="album",e.ARTIST="artist",e.ARTIST_CONCERTS="artist-concerts",e.AUDIOBOOK="audiobook",e.CHAPTER="chapter",e.EPISODE="episode",e.PODCAST_SHORT="podcast-short",e.GENRE="genre",e.VIEW="view",e.PLAYLIST="playlist",e.PLAYLISTV2="playlist-v2",e.RADIO="radio",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}({})},12741:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});let i=function(e){return e[e.UNKNOWN=-1]="UNKNOWN",e[e.MIXED=0]="MIXED",e[e.AUDIO=1]="AUDIO",e[e.VIDEO=2]="VIDEO",e}({})},28246:(e,t,n)=>{"use strict";n.d(t,{LyricsMode:()=>a.LyricsMode,NowPlayingCoverStateEnum:()=>a.NowPlayingCoverStateEnum,albumType:()=>r.n});var i=n(81202);n.o(i,"LyricsMode")&&n.d(t,{LyricsMode:function(){return i.LyricsMode}}),n.o(i,"NowPlayingCoverStateEnum")&&n.d(t,{NowPlayingCoverStateEnum:function(){return i.NowPlayingCoverStateEnum}}),n.o(i,"albumType")&&n.d(t,{albumType:function(){return i.albumType}});var a=n(93308);n.o(a,"albumType")&&n.d(t,{albumType:function(){return a.albumType}});n(96042);var s=n(50075);n.o(s,"albumType")&&n.d(t,{albumType:function(){return s.albumType}});var r=n(62144)},27946:()=>{},93308:(e,t,n)=>{"use strict";n.d(t,{LyricsMode:()=>i.f,NowPlayingCoverStateEnum:()=>i.y});var i=n(82452),a=n(27946);n.o(a,"albumType")&&n.d(t,{albumType:function(){return a.albumType}})},82452:(e,t,n)=>{"use strict";n.d(t,{f:()=>a,y:()=>i});let i=function(e){return e.expanded="expanded",e.collapsed="collapsed",e.none="none",e}({}),a=function(e){return e.none="none",e.npv="npv",e.cinema="cinema",e}({})},28418:(e,t,n)=>{"use strict";function i(e){return null!==e}n.d(t,{K:()=>i})},49288:(e,t,n)=>{"use strict";n.d(t,{y:()=>i});const i=e=>t=>Object.values(e).includes(t)},82998:(e,t,n)=>{"use strict";n.d(t,{E:()=>C,$:()=>x});var i=n(75252),a=n(59496);const s="wIA_5Ypq0rltNPeZQpM4",r="Swi6YtNEFCCVz8l4y75v",o="pklLPOhfigdytL9bPoth",l="sb24Y8kdMZInJ8aI8dXT";var d=n(4637);class c extends a.PureComponent{static defaultProps={current:0,max:1};render(){const{ariaValueText:e,max:t,current:n}=this.props,i=t&&n?100*Math.min(1,n/t):0,a={transform:`translateX(-${100-i}%)`},c=e||`${Math.round(i)}%`;return(0,d.jsxs)("div",{className:s,role:"progressbar",tabIndex:0,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":t,"aria-valuetext":c,children:[(0,d.jsx)("div",{className:r}),(0,d.jsx)("div",{className:o,children:(0,d.jsx)("div",{"":"progressBarFg",className:l,style:a})})]})}}const u=c,m="qfYkuLpETFW3axnfMntO",p="jOd7lbjiyc_kvRJaAbeL",g="_q93agegdE655O5zPz6l",h="z7Yl7CIT1AB0y91f_moh",k="iLIlkUcfIq56KncGtX7u",v="nV50yZ6BR_TIuWP3l7b1",f="qLjIx_SzBEpDRA_q7kxQ";var y=n(56162),S=n(37433),b=n(3802),_=n(84875),N=n.n(_),E=n(44526);let x=function(e){return e[e.LARGE=0]="LARGE",e[e.SMALL=1]="SMALL",e}({});const C=e=>{const{resumePositionMs:t=0,releaseDate:n,isPlaying:a,fullyPlayed:s,durationMs:r,size:o=x.SMALL,position:l=t,compactVariant:c=!1}=e;return(0,d.jsxs)("div",{className:N()(m,{[p]:o===x.LARGE}),children:[n?(0,d.jsx)(y.D,{as:"p",variant:"mesto",className:g,children:(0,i.rL)((0,i.RX)(n))}):null,(()=>{if(s&&!a)return(0,d.jsxs)("div",{className:k,children:[(0,d.jsx)(y.D,{as:"p",variant:"mesto",className:h,children:b.ag.get("episode.played")}),(0,d.jsx)(S.N,{iconSize:16,className:f,"aria-hidden":"true"})]});if(l>0||a){const e=Math.ceil(Math.max(r-l,0));return(0,d.jsx)("div",{className:k,children:(0,d.jsx)(y.D,{as:"p",variant:"mesto",className:h,children:(0,d.jsx)(E.ng,{durationMs:e,displaySeconds:!c&&void 0})})})}return(0,d.jsx)(y.D,{as:"p",variant:"mesto",className:g,children:(0,d.jsx)(E.nL,{durationMs:r,displaySeconds:!c&&void 0})})})(),!s&&l>0||a?(0,d.jsx)("div",{className:v,children:(0,d.jsx)(u,{current:l,max:r,isEnabled:!1})}):null]})}},35526:(e,t,n)=>{"use strict";n.d(t,{h$:()=>d,L6:()=>c,cM:()=>u});var i=n(1634);var a=n(33354),s=n(39669);const r=()=>(0,i.ZO)()===a.W.PWA||"1"===function(e){try{return window?.google_optimize?.get(e)}catch(e){return}}("u7gmg4jBRTOUMmTZNyEx9w"),o=()=>{if(r())return`${location.origin}/auth_redirect`;if(/iphone|ipod|ipad/i.test(navigator.userAgent)||/android/i.test(navigator.userAgent)){const e=new URL(window.location.href);return e.pathname=`${s.zL}${e.pathname}`,e.toString()}return window.location.href},l=(e,t,n)=>{var i;n&&(e+=`&${i=n,Object.keys(i).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(i[e]).replace(/%7C/g,"|")}`)).join("&")}`),r()?((e,t)=>{const n=void 0!==window.screenLeft?window.screenLeft:window.screenX,i=void 0!==window.screenTop?window.screenTop:window.screenY,a=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width,s=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height,r=a/window.screen.availWidth,o=(a-t.width)/2/r+n,l=(s-t.height)/2/r+i,d=window.open(e,void 0,`scrollbars=${t.scrollbars?"yes":"no"},\n toolbar=${t.toolbar?"yes":"no"},\n width=${t.width/r},\n height=${t.height/r},\n top=${l},\n left=${o}`);d?.focus&&d.focus()})(e,t):window.location.assign(e)},d=e=>{const t=`https://accounts.spotify.com/login?continue=${encodeURIComponent(o())}`;l(t,{width:500,height:824,toolbar:!1,scrollbars:!0},e)},c=e=>{const t=`https://www.spotify.com/signup?forward_url=${encodeURIComponent(o())}`;l(t,{width:500,height:824,toolbar:!1,scrollbars:!0},e)},u=()=>{window.addEventListener("storage",(e=>{"login_success"===e.key&&(window.focus(),window.localStorage.removeItem("login_success"),window.location.reload())}))}},75207:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});const i=(e,{desiredSize:t=Number.MAX_SAFE_INTEGER,desiredHeight:n=t,desiredWidth:i=t,desiredLabel:a=""}={})=>{if(!e||e.length<=0)return;if(a){const[t]=e.filter((e=>e.label===a));if(t)return t}if(1===e.length)return e[0];const[s]=e.map((e=>{const t=[(e.width||0)*(e.height||0),n*i];return{ratio:Math.max(...t)/Math.min(...t),image:e}})).sort(((e,t)=>e.ratio-t.ratio));return s.image}},29251:(e,t,n)=>{"use strict";function i(e,t){throw new Error(t??`Unexpectedly hit unreachable code! Unhandled discriminated union member: ${JSON.stringify(e)}`)}function a(e,t){try{i(e,t)}catch(e){console.error(e)}}n.d(t,{U:()=>i,_:()=>a})},94033:(e,t,n)=>{"use strict";n.d(t,{r:()=>s});var i=n(73972),a=n(82538);const s=({downloadAvailability:e,isExplicit:t,isMOGEFRestricted:n,contentRating:s,isPaywalled:r,isEnhanced:o})=>{let l=0;const d={download:!1,explicit:!1,nineteen:!1,paid:!1,enhanced:!1};return e===a.Om.YES&&(d.download=!0,l++),(t&&!n||s===i.KS.Explicit)&&(d.explicit=!0,l++),(n||s===i.KS.NineteenPlus)&&(d.nineteen=!0,l++),r&&(d.paid=!0,l++),o&&(d.enhanced=!0,l++),{badges:d,hasBadges:l>0}}},52165:(e,t,n)=>{"use strict";n.d(t,{US:()=>r,Wu:()=>s,dN:()=>o,zv:()=>a});var i=n(33892);function a(e){return Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")}function s(e){if(e.length%2!=0)throw new Error("Invalid encoding!");const t=e.length/2,n=new Array(t);for(let i=0,a=0;i{"use strict";n.d(t,{J:()=>i});const i=e=>e.substring(e.indexOf("."))},30009:(e,t,n)=>{"use strict";async function i(e,t=document.body){if("clipboard"in navigator)try{if("string"==typeof e)return await navigator.clipboard.writeText(e);if(navigator.clipboard.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":e.then((e=>new Blob([e],{type:"text/plain"})))})]);const t=await e;return await navigator.clipboard.writeText(t)}catch(e){}if(null===t)throw new Error("Node is null, copy cannot be performed.");let n="";n="string"==typeof e?e:await e;const i=document.createElement("textarea");return i.value=n,i.setAttribute("readonly",""),i.style.position="absolute",i.style.left="-9999px",t.appendChild(i),i.select(),document.execCommand("copy"),t.removeChild(i),Promise.resolve()}n.d(t,{v:()=>i})},75252:(e,t,n)=>{"use strict";n.d(t,{BI:()=>s,FO:()=>o,RX:()=>a,rL:()=>r});var i=n(3802);const a=e=>new Date(e),s=(e,t,n)=>{const i=6e4*e.getTimezoneOffset(),a=n??{weekday:"long",year:"numeric",month:"long",day:"numeric"};return new Date(e.valueOf()+i).toLocaleDateString(t,a)},r=(e,t=i.ag)=>(new Date).getUTCFullYear()===e.getUTCFullYear()?t.formatDate(e,{month:"short",day:"numeric",timeZone:"UTC"}):t.formatDate(e,{month:"short",year:"numeric",timeZone:"UTC"}),o=e=>i.ag.formatDate(e,{weekday:"short"})},67836:(e,t,n)=>{"use strict";function i(e){const t=Math.floor(e/1e3),n=Math.floor(t/60),i=Math.floor(n/60),a=60*i,s=n-a;return{hours:i,minutes:s,seconds:t-60*a-60*s}}n.d(t,{P:()=>i})},43438:(e,t,n)=>{"use strict";function i(e){return e?e.reduce(((e,t)=>(t.releases.items[0]&&e.push(t.releases.items[0]),e)),[]):[]}n.d(t,{B$:()=>r,GJ:()=>a,Hr:()=>i,qo:()=>s});const a=e=>`spotify:app:artist:${e}`,s=e=>`spotify:artist:${e}`,r=(e,t,n)=>({artists:[{uri:t,name:n}],images:e.coverArt?.sources||[],name:e.name,uri:e.uri,year:e.date?.year,type:e.type,sharingInfo:e.sharingInfo})},48811:(e,t,n)=>{"use strict";n.d(t,{R:()=>s});var i=n(3802),a=n(62144);function s(e){switch(e){case a.n.SINGLE:return i.ag.get("single");case a.n.EP:return i.ag.get("ep");case a.n.COMPILATION:return i.ag.get("compilation");case a.n.ALBUM:default:return i.ag.get("album")}}},58116:(e,t,n)=>{"use strict";function i(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);const t=new Uint8Array(e.length);for(let n=0;ns});const a=async function(e){const t=i(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map((e=>e.toString(16).padStart(2,"0"))).join("")};class s{static encode=i;static hash=a}},7072:(e,t,n)=>{"use strict";n.d(t,{ac:()=>s,is:()=>r,nT:()=>o});var i=n(3802),a=n(39669);const s=(e,t=!0)=>{const n=t?"/":"";if(!e)return"";const i=e.split("/");return i[1].includes(a.F0)?`${n}${i.slice(2).join("/")}`:e},r=(e,t,n=!0)=>{const i=n?"/":"";return e?t&&t!==a.ZW?`${i}${a.F0}${t}${e}`:e:""},o=e=>{const t={[String(i.go.paIN)]:i.go.paIN,[String(i.go.paPK)]:i.go.paPK,[String(i.go.zhCN)]:i.go.zhCN,[String(i.go.zhTW)]:i.go.zhTW,[String(i.go.zhHK)]:i.go.zhHK};return e?t[e]??e.substring(0,2):a.ZW}},32422:(e,t,n)=>{"use strict";n.d(t,{S9:()=>o,fd:()=>l});var i=n(39669);const a=(e,t)=>((e,t)=>{const n=i.un.some((t=>t===e));return(void 0===t||t)&&n})(e,t)||(e=>i._S.some((t=>t===e)))(e),s=(e,t)=>{const n=""===e;return t.some((t=>t===e))||n},r=(e,t)=>{const n=s(e,i.Jn)&&t,a=s(e,i.wI);return n||a},o=({localeFeatureFlag:e,entityFeatureFlag:t,urlLocale:n,entity:i,type:s})=>{switch(s){case"locale":return a(n,e);case"route":return r(i,t);case"link":return a(n,e)&&r(i,t);default:return!1}},l=e=>["/",...i.BK.map((e=>`/${i.F0}${e}`))].includes(e)},87680:(e,t,n)=>{"use strict";n.d(t,{O:()=>i});const i=()=>"undefined"==typeof window},47563:(e,t,n)=>{"use strict";n.d(t,{qV:()=>r,xU:()=>l,l3:()=>o});let i=function(e){return e.UNAUTH_LYRICS="track-lyrics-unauth-1.0",e.RTP_AND_LYRICS_HOLDOUT="rtp-and-lyrics-holdout",e.RALPH_AND_ITL="ralph-itl-seo-test-1.0",e.ARTIST_CONCERTS_METADATA="artist-concerts-metadata-1.0",e.ALBUM_CANONICALS="album-canonical",e.TRACK_CANONICALS="track-canonical",e.VIDEO_PODCAST_SHOW_TITLE_TAG="podcast-video-title-tag",e.RTP_FEATURED_ARTISTS="rtp-v21",e}({}),a=function(e){return e.CONTROL="0",e.VARIANT="1",e}({});const s=({treatment:e,entityId:t,experimentId:n,treatmentVariation:i})=>{if(e&&e[t]){const a=e[t];return a.experimentId===n&&a.treatment===i}return!1},r=(e,t)=>s({treatment:e,entityId:t,experimentId:i.ARTIST_CONCERTS_METADATA,treatmentVariation:a.VARIANT}),o=(e,t)=>s({treatment:e,entityId:t,experimentId:i.VIDEO_PODCAST_SHOW_TITLE_TAG,treatmentVariation:a.VARIANT}),l=(e,t)=>s({treatment:e,entityId:t,experimentId:i.RTP_FEATURED_ARTISTS,treatmentVariation:a.VARIANT})},87527:(e,t,n)=>{"use strict";function i(e,t){const n=e?Object.keys(e):[],i=t?Object.keys(t):[];return n.length===i.length&&n.every((n=>Object.prototype.hasOwnProperty.call(t,n)&&e[n]===t[n]))}n.d(t,{V:()=>i})},60557:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={container:"main-downloadClient-actionContainer"}},26758:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={card:"main-card-card",cardLink:"main-card-cardLink",type:"main-card-type",draggable:"main-card-draggable",imageContainer:"main-card-imageContainer",cardMetadata:"main-card-cardMetadata",DownloadStatusIndicator:"main-card-DownloadStatusIndicator",PlayButtonContainer:"main-card-PlayButtonContainer",PlayButtonContainerVisible:"main-card-PlayButtonContainerVisible"}},79765:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={imageWrapper:"main-cardImage-imageWrapper",image:"main-cardImage-image",imagePlaceholder:"main-entityHeader-imagePlaceholder",circular:"main-cardImage-circular",withWavesWrapper:"main-card-withWavesWrapper",withWaves:"main-card-withWaves",hero:"main-card-hero"}},59242:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={addToPlaylistTitle:"main-contextMenu-addToPlaylistTitle",addToPlaylistSubtitle:"main-contextMenu-addToPlaylistSubtitle"}},61571:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={filterPlaylistSearch:"main-contextMenu-filterPlaylistSearch"}},24337:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={filterPlaylistSearchContainer:"main-contextMenu-filterPlaylistSearchContainer"}},87305:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",navBarMinWidth:"120px",navBarWidth:"232px",navBarMaxWidth:"384px",MINIMUM_HEADER_HEIGHT:"250px",IMAGE_SIZE:"192px",IMAGE_SIZE_BIG:"232px",BACKGROUND_HEIGHT_PERCENTAGE:"40vh",container:"main-entityHeader-container",nonWrapped:"main-entityHeader-nonWrapped",withBackgroundImage:"main-entityHeader-withBackgroundImage",smallHeader:"main-entityHeader-smallHeader",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",imageContainer:"main-entityHeader-imageContainer",image:"main-entityHeader-image",shadow:"main-entityHeader-shadow",imagePlaceholder:"main-entityHeader-imagePlaceholder",wavesBackground:"main-entityHeader-wavesBackground",roundedCorners:"main-entityHeader-roundedCorners",circle:"main-entityHeader-circle",detailsText:"main-entityHeader-detailsText",uppercase:"main-entityHeader-uppercase",metaData:"main-entityHeader-metaData",creatorWrapper:"main-entityHeader-creatorWrapper",creatorButton:"main-entityHeader-creatorButton",metaDataText:"main-entityHeader-metaDataText",metaDataAuthor:"main-entityHeader-metaDataAuthor",newEntriesIndicator:"main-entityHeader-newEntriesIndicator",divider:"main-entityHeader-divider",subtitle:"main-entityHeader-subtitle",subtitleButton:"main-entityHeader-subtitleButton",gradient:"main-entityHeader-gradient"}},20688:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={navBarMinWidth:"120px",navBarWidth:"232px",navBarMaxWidth:"384px",navBar:"main-navBar-navBar",banner:"main-navBar-banner",logo:"main-navBar-logo",entryPoints:"main-navBar-entryPoints",downloadItem:"main-navBar-downloadItem",navBarItem:"main-navBar-navBarItem",premiumNavItem:"main-navBar-premiumNavItem",navBarLinkActive:"main-navBar-navBarLinkActive",navBarItemDropTarget:"main-navBar-navBarItemDropTarget",navBarLink:"main-navBar-navBarLink",premiumLink:"main-navBar-premiumLink"}},57968:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={shelf:"main-shelf-shelf",header:"main-shelf-header",subHeader:"main-shelf-subHeader",topRow:"main-shelf-topRow",titleWrapper:"main-shelf-titleWrapper",title:"main-shelf-title",seeAll:"main-shelf-seeAll",shelfGrid:"main-shelf-shelfGrid",showAll:"main-shelf-showAll",skeletonShelf:"main-shelf-skeletonShelf"}},78184:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",container:"main-topBar-container",indicators:"main-noConnection",background:"main-topBar-background",overlay:"main-topBar-overlay",loggedOut:"main-topBar-loggedOut",fullscreenHistoryButtons:"main-topBar-fullscreenHistoryButtons",historyButtons:"main-topBar-historyButtons",icon:"main-topBar-icon",button:"main-topBar-button",forward:"main-topBar-forward",topbarContentWrapper:"main-topBar-topbarContentWrapper",topbarContent:"main-topBar-topbarContent",topNavBarLinks:"main-topBar-topNavBarLinks",topNavBarSeparator:"main-topBar-topNavBarSeperator",loginButtons:"main-topBar-loginButtons",signupButton:"main-topBar-signupButton",UpgradeButton:"main-topBar-UpgradeButton",contentArea:"main-topBar-contentArea",rightSidebarVisible:"main-topBar-rightSidebarVisible"}},24280:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",TRACKLIST_ROW_HEIGHT:"56px",TRACKLIST_HEADER_HEIGHT:"36px",trackList:"main-trackList-trackList",indexable:"main-trackList-indexable",trackListRowGrid:"main-trackList-trackListRowGrid",rowSectionVariable:"main-trackList-rowSectionVariable",concertTrackList:"main-trackList-concertTrackList",trackListHeader:"main-trackList-trackListHeader",trackListHeaderRow:"main-trackList-trackListHeaderRow",trackListHeaderStuck:"main-trackList-trackListHeaderStuck",trackListRow:"main-trackList-trackListRow",isPreviousRowSelected:"main-trackList-isPreviousRowSelected",isNextRowSelected:"main-trackList-isNextRowSelected",dropTargetBefore:"main-trackList-dropTargetBefore",dropTargetAfter:"main-trackList-dropTargetAfter",rowHeartButton:"main-trackList-rowHeartButton",rowFeedbackButton:"main-trackList-rowFeedbackButton",rowMoreButton:"main-trackList-rowMoreButton",disabled:"main-trackList-disabled",rowPlayPauseButton:"main-trackList-rowImagePlayButton",rowSubTitle:"main-trackList-rowSubTitle",rowSectionEnd:"main-trackList-rowSectionEnd",text:"main-trackList-text",number:"main-trackList-number",icon:"main-trackList-icon",playingIcon:"main-trackList-playingIcon",rowChartStatus:"main-trackList-icon",selected:"main-trackList-selected",rowMarker:"main-trackList-rowMarker",active:"main-trackList-active",rowTitle:"main-trackList-rowTitle",rowSectionIndex:"main-trackList-rowSectionIndex",rowSectionStart:"main-trackList-rowSectionStart",showDisabledAsEnabled:"main-trackList-showDisabledAsEnabled",playsHeader:"main-trackList-playsHeader",column:"main-trackList-column",sortable:"main-trackList-sortable",arrow:"main-trackList-arrow",durationHeader:"main-trackList-durationHeader",actionsHeader:"main-trackList-actionsHeader",rowMainContent:"main-trackList-rowMainContent",facepile:"main-trackList-facepile",rowBadges:"main-trackList-rowBadges",rowDuration:"main-trackList-rowDuration",nineteen:"main-trackList-nineteen",enhanced:"main-trackList-enhanced",rowMarkerChartStatus:"main-trackList-rowMarkerChartStatus",statusChangeDown:"main-trackList-statusChangeDown",statusChangeUp:"main-trackList-statusChangeUp",statusChangeNew:"main-trackList-statusChangeNew",rowImageWithPlay:"main-trackList-rowImageWithPlay",rowImagePlayPauseButton:"main-trackList-rowImagePlayPauseButton",rowImagePlayPauseButtonPlaying:"main-trackList-rowImagePlayPauseButtonPlaying",rowPlayCount:"main-trackList-rowPlayCount",rowImage:"main-trackList-rowImage",rowImageVideo:"main-trackList-rowImageVideo",rowImageFallback:"main-trackList-rowImageFallback",rowPlayPauseIcon:"main-trackList-rowPlayPauseIcon",placeholder:"main-trackList-placeholder",placeholderIndex:"main-trackList-placeholderIndex",placeholderStart:"main-trackList-placeholderStart",placeholderStartWithCoverImage:"main-trackList-placeholderStartWithCoverImage",placeholderEnd:"main-trackList-placeholderEnd",placeholderVariable:"main-trackList-placeholderVariable",discTitle:"main-trackList-discTitle",discRow:"main-trackList-discRow",addedBy:"main-trackList-addedBy",facepileAvatar:"main-trackList-facepileAvatar",delayedVisibility:"main-trackList-delayedVisibility",eventDate:"main-trackList-eventDate",eventTicketIcon:"main-trackList-eventTicketIcon",talkIcon:"main-trackList-talkIcon",talkSegmentDuration:"main-trackList-talkSegmentDuration",notificationDot:"main-trackList-notificationDot"}},55796:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={artistOverviewContent:"artist-artistAbout-artistOverviewContent",artistOverviewContainer:"artist-artistAbout-artistOverviewContainer",popularTracks:"artist-artistAbout-popularTracks",artistShelfSpacer:"artist-artistAbout-artistShelfSpacer",sideBlock:"artist-artistAbout-sideBlock",popularTracksBlock:"artist-artistAbout-popularTracksBlock",about:"artist-artistAbout-about",events:"artist-artistAbout-events",merch:"artist-artistAbout-merch",merchSmall:"artist-artistAbout-merchSmall",overview:"artist-artistAbout-overview",heading:"artist-artistAbout-heading",merchShelfContent:"artist-artistAbout-merchShelfContent",container:"artist-artistAbout-container",content:"artist-artistAbout-content",backgroundImage:"artist-artistAbout-backgroundImage",bio:"artist-artistAbout-bio",artistGridContainer:"artist-artistAbout-artistGridContainer",image:"artist-artistAbout-image",columnContainer:"artist-artistAbout-columnContainer",bioContainer:"artist-artistAbout-bioContainer",statsContainer:"artist-artistAbout-statsContainer",stats:"artist-artistAbout-stats",postedBy:"artist-artistAbout-postedBy",postedByAvatar:"artist-artistAbout-postedByAvatar",avatar:"artist-artistAbout-avatar",modal:"artist-artistAbout-modal",scrollbars:"artist-artistAbout-scrollbars",close:"artist-artistAbout-close",modalBase:"artist-artistAbout-modalBase",modalAfterOpen:"artist-artistAbout-modalAfterOpen",modalBeforeClose:"artist-artistAbout-modalBeforeClose",rank:"artist-artistAbout-rank",cityBlock:"artist-artistAbout-cityBlock"}},63071:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={artistOverviewContent:"artist-artistOverview-artistOverviewContent",artistOverviewContainer:"artist-artistOverview-artistOverviewContainer",popularTracks:"artist-artistOverview-popularTracks",artistShelfSpacer:"artist-artistOverview-artistShelfSpacer",sideBlock:"artist-artistOverview-sideBlock",popularTracksBlock:"artist-artistOverview-popularTracksBlock",about:"artist-artistOverview-about",events:"artist-artistOverview-events",merch:"artist-artistOverview-merch",merchSmall:"artist-artistOverview-merchSmall",overview:"artist-artistOverview-overview",heading:"artist-artistOverview-heading",merchShelfContent:"artist-artistOverview-merchShelfContent"}},33122:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={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"}},3426:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={container:"main-buddyFeed-container",panelTransition:"main-buddyFeed-panelTransition",scrollBarContainer:"main-buddyFeed-scrollBarContainer",header:"main-buddyFeed-header",closeContainer:"main-buddyFeed-closeContainer",content:"main-buddyFeed-content",titleContainer:"main-buddyFeed-titleContainer",link:"main-buddyFeed-link",closeButton:"main-buddyFeed-closeButton",actions:"main-buddyFeed-actions"}},52566:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={coverContainer:"main-yourEpisodes-coverContainer",yourEpisodesCard:"main-yourEpisodes-yourEpisodesCard",coverIcon:"main-yourEpisodes-coverIcon"}},21316:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});const i={menu:"main-contextMenu-menu",menuHeading:"main-contextMenu-menuHeading",menuItemButton:"main-contextMenu-menuItemButton",disabled:"main-contextMenu-disabled",subMenuIcon:"main-contextMenu-subMenuIcon",menuItem:"main-contextMenu-menuItem",dividerBefore:"main-contextMenu-dividerBefore",dividerAfter:"main-contextMenu-dividerAfter",menuItemLabel:"main-contextMenu-menuItemLabel"}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={id:e,loaded:!1,exports:{}};return s[e].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}o.m=s,o.amdO={},e=[],o.O=(t,n,i,a)=>{if(!n){var s=1/0;for(c=0;c=a)&&Object.keys(o.O).every((e=>o.O[e](n[l])))?n.splice(l--,1):(r=!1,a0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[n,i,a]},o.F={},o.E=e=>{Object.keys(o.F).map((t=>{o.F[t](e)}))},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,i){if(1&i&&(e=this(e)),8&i)return e;if("object"==typeof e&&e){if(4&i&&e.__esModule)return e;if(16&i&&"function"==typeof e.then)return e}var a=Object.create(null);o.r(a);var s={};t=t||[null,n({}),n([]),n(n)];for(var r=2&i&&e;"object"==typeof r&&!~t.indexOf(r);r=n(r))Object.getOwnPropertyNames(r).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,o.d(a,s),a},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,n)=>(o.f[n](e,t),t)),[])),o.u=e=>(({682:"xpui-routes-enhanced-playlist",708:"xpui-routes-play-history-page",730:"xpui-routes-track",1289:"xpui-routes-collection-episodes",1997:"xpui-routes-offline-browse",2219:"xpui-routes-search",2342:"xpui-routes-album",2499:"xpui-routes-profile",3472:"xpui-routes-episode",3817:"browse-v2",3878:"xpui-routes-playlist",4179:"xpui-routes-track-v2",4246:"collection-music-download",4338:"xpui-routes-buddy-feed",4570:"xpui-routes-blend-party",4868:"xpui-routes-premium-page",5070:"home-v2-section",5194:"dev-playground",5320:"xpui-debug-window-contents",5457:"playlist-leavebehinds",5525:"xpui-routes-health-check",5713:"xpui-routes-show",5835:"xpui-routes-collection-concerts",6008:"xpui-desktop-routes-settings",6025:"xpui-routes-lyrics",6309:"xpui-routes-collection",6450:"xpui-routes-view",6658:"debug-locales",6923:"xpui-routes-all-show-sponsors",7288:"xpui-routes-concert",7379:"xpui-routes-collection-local-files",7405:"xpui-routes-enhanced-context",7427:"concerts-on-tour-playlist-card",7521:"xpui-routes-queue-page",7553:"xpui-routes-collection-songs",7704:"home-v2",7985:"xpui-routes-create-playlist",7994:"xpui-desktop-modals",8059:"xpui-routes-all-episode-sponsors",8123:"xpui-routes-blend",8228:"xpui-feature-activation-shelf",8387:"xpui-routes-download-page",8420:"xpui-routes-cultural-moment-hub",8785:"xpui-routes-recent-searches",9124:"xpui-routes-folder",9439:"xpui-routes-web-settings",9540:"xpui-routes-album-prerelease",9694:"home-hpto"}[e]||e)+".js"),o.miniCssF=e=>(({682:"xpui-routes-enhanced-playlist",708:"xpui-routes-play-history-page",1289:"xpui-routes-collection-episodes",1997:"xpui-routes-offline-browse",2219:"xpui-routes-search",2342:"xpui-routes-album",2499:"xpui-routes-profile",3472:"xpui-routes-episode",3817:"browse-v2",3878:"xpui-routes-playlist",4179:"xpui-routes-track-v2",4338:"xpui-routes-buddy-feed",4868:"xpui-routes-premium-page",5070:"home-v2-section",5320:"xpui-debug-window-contents",5713:"xpui-routes-show",5835:"xpui-routes-collection-concerts",6309:"xpui-routes-collection",6450:"xpui-routes-view",7288:"xpui-routes-concert",7379:"xpui-routes-collection-local-files",7405:"xpui-routes-enhanced-context",7427:"concerts-on-tour-playlist-card",7521:"xpui-routes-queue-page",7553:"xpui-routes-collection-songs",7704:"home-v2",7994:"xpui-desktop-modals",8123:"xpui-routes-blend",8228:"xpui-feature-activation-shelf",8387:"xpui-routes-download-page",8420:"xpui-routes-cultural-moment-hub",8785:"xpui-routes-recent-searches",9124:"xpui-routes-folder",9540:"xpui-routes-album-prerelease",9694:"home-hpto"}[e]||e)+".css"),o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i={},a="client-web:",o.l=(e,t,n,s)=>{if(i[e])i[e].push(t);else{var r,l;if(void 0!==n)for(var d=document.getElementsByTagName("script"),c=0;c{r.onerror=r.onload=null,clearTimeout(p);var a=i[e];if(delete i[e],r.parentNode&&r.parentNode.removeChild(r),a&&a.forEach((e=>e(n))),t)return t(n)},p=setTimeout(m.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=m.bind(null,r.onerror),r.onload=m.bind(null,r.onload),l&&document.head.appendChild(r)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.p="/",(()=>{if("undefined"!=typeof document){var e=e=>new Promise(((t,n)=>{var i=o.miniCssF(e),a=o.p+i;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),i=0;i{var s=document.createElement("link");s.rel="stylesheet",s.type="text/css",s.onerror=s.onload=n=>{if(s.onerror=s.onload=null,"load"===n.type)i();else{var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+o+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=r,l.request=o,s.parentNode&&s.parentNode.removeChild(s),a(l)}},s.href=t,n?n.parentNode.insertBefore(s,n.nextSibling):document.head.appendChild(s)})(e,a,null,t,n)})),t={9764:0};o.f.miniCss=(n,i)=>{t[n]?i.push(t[n]):0!==t[n]&&{682:1,708:1,722:1,1289:1,1744:1,1997:1,2219:1,2342:1,2499:1,2845:1,2941:1,3472:1,3696:1,3817:1,3878:1,4073:1,4089:1,4179:1,4338:1,4868:1,5037:1,5043:1,5070:1,5160:1,5320:1,5713:1,5835:1,6309:1,6450:1,7288:1,7379:1,7405:1,7427:1,7521:1,7553:1,7704:1,7994:1,8123:1,8228:1,8387:1,8420:1,8785:1,9124:1,9540:1,9694:1}[n]&&i.push(t[n]=e(n).then((()=>{t[n]=0}),(e=>{throw delete t[n],e})))}}})(),(()=>{var e={9764:0};o.f.j=(t,n)=>{var i=o.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else if(682!=t){var a=new Promise(((n,a)=>i=e[t]=[n,a]));n.push(i[2]=a);var s=o.p+o.u(t),r=new Error;o.l(s,(n=>{if(o.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.src;r.message="Loading chunk "+t+" failed.\n("+a+": "+s+")",r.name="ChunkLoadError",r.type=a,r.request=s,i[1](r)}}),"chunk-"+t,t)}else e[t]=0},o.F.j=t=>{if((!o.o(e,t)||void 0===e[t])&&682!=t){e[t]=null;var n=document.createElement("link");o.nc&&n.setAttribute("nonce",o.nc),n.rel="prefetch",n.as="script",n.href=o.p+o.u(t),document.head.appendChild(n)}},o.O.j=t=>0===e[t];var t=(t,n)=>{var i,a,[s,r,l]=n,d=0;if(s.some((t=>0!==e[t]))){for(i in r)o.o(r,i)&&(o.m[i]=r[i]);if(l)var c=l(o)}for(t&&t(n);d{[1814,8677,4126,3706,2219,9694,1997].map(o.E)}),5);var l=o.O(void 0,[1814],(()=>o(14204)));l=o.O(l)})(); //# sourceMappingURL=xpui.js.map //# SpotX was here