"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[375],{10375:(e,t,a)=>{a.r(t),a.d(t,{EPISODE_SPONSOR_NOW_PLAYING_BAR_HAT_CALL_TO_ACTION_BUTTON_TEST_ID:()=>S,EPISODE_SPONSOR_NOW_PLAYING_BAR_HAT_WRAPPER_TEST_ID:()=>p,EpisodeSponsorNowPlayingBarHatWrapper:()=>N,default:()=>b});var n=a(67294),o=a.n(n),r=a(94184),d=a.n(r),l=a(85404),s=a(94613),i=a(87772),c=a(85392);function u({adEvent:e,ad:t}){const a=function({adEvent:e,ad:t}){return(0,n.useMemo)((()=>{var a,n;return null===(a=("true"===(null==e?void 0:e.ad.metadata.useAdvertiserImage)?null==e||null===(n=e.ad.cover_art)||void 0===n?void 0:n.find((({url:e})=>e)):void 0)||(null==t?void 0:t.images.find((({url:e})=>e))))||void 0===a?void 0:a.url}),[e,t])}({adEvent:e,ad:t}),[o,r]=(0,n.useState)(),d=(0,n.useMemo)((()=>o instanceof Error||null==o?void 0:o.colorDark.toCSS(i.j.RGB)),[o]);return(0,n.useEffect)((function(){r(void 0),a&&(0,c.b)(a).then(r).catch((()=>r(new Error("color not extracted successfully for episode NPB hat"))))}),[a]),{extractedColor:d}}const m="KBWjEPwPWicEtomdeiQs",v="coMbiwYB6lxQzLWA6nWG",E="G4GY06xd0E2ykUuFqSRh",f="c2Zkum6BT3Rk002Qm3of",_="RjFjCFusDtSD_UHF5Fma",p="episode-sponsor-now-playing-bar-hat-wrapper",S="episode-sponsor-now-playing-bar-hat-call-to-action-button";function N({adEvent:e,hidingHat:t,ad:a,postClickEvent:n}){const{extractedColor:r}=u({adEvent:e,ad:a}),{tagline:i,buttonMessage:c}=e.ad.metadata,N="true"===e.ad.metadata.useClickURL?e.ad.click_url:void 0;return o().createElement("div",{className:d()(r?v:m,{[E]:t}),style:{backgroundColor:r},"data-testid":p},o().createElement(s.S,{className:f},i),c&&N&&o().createElement("div",{className:_},o().createElement(l.K,{href:N,"data-testid":S,onClick:n},c)))}const b=N},85404:(e,t,a)=>{a.d(t,{K:()=>f});var n=a(67154),o=a.n(n),r=a(6479),d=a.n(r),l=a(67294),s=a.n(l),i=a(94184),c=a.n(i),u=a(99450),m=a(28760);const v="G8b_VGQSxRwZSatAhUTd",E=["children","data-testid","className"];function f(e){let{children:t,"data-testid":a,className:n}=e,r=d()(e,E);return s().createElement("div",{className:c()(v,n),"data-testid":a},s().createElement(u.D,o()({},r,{buttonSize:r.buttonSize||u.D.sm}),s().createElement(m.Dy,{variant:"mestoBold"},t)))}},94613:(e,t,a)=>{a.d(t,{S:()=>u});var n=a(67154),o=a.n(n),r=a(67294),d=a.n(r),l=a(94184),s=a.n(l),i=a(28760);const c="eaiLXk0FzOrdfkM6O8jp";function u(e){return d().createElement(i.Dy,o()({},e,{variant:e.variant||"mesto",className:s()(c,e.className)}))}}}]);
//# sourceMappingURL=375.js.map