mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
2 lines
13 KiB
JavaScript
Executable File
2 lines
13 KiB
JavaScript
Executable File
"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[7660],{79630:(e,a,s)=>{s.d(a,{S:()=>o});var t=s(41978),r=s(43830),c=s(27968),i=s(11808),n=s(21441);const l="nHCJskDZVlmDhNNS9Ixv";var d=s(86070);const o=({isPremium:e})=>{const a=(0,t.wA)();return(0,d.jsx)("div",{className:l,children:e?(0,d.jsx)(r.$,{size:"small",colorSet:"overMedia",onClick:()=>a((0,n.On)()),children:i.Ru.get("ad-formats.hideAnnouncements")}):(0,d.jsx)(c.v,{colorSet:"overMedia",children:i.Ru.get("ad-formats.sponsored")})})}},17584:(e,a,s)=>{s.d(a,{z:()=>k});var t=s(30758),r=s(97500),c=s.n(r),i=s(41978),n=s(78039),l=s(46189),d=s(4973),o=s(27834),h=s(82097),u=s(62413);const m="utUDWsORU96S7boXm2Aq",g="cpBP3znf6dhHLA2dywjy",x="G7JYBeU1c2QawLyFs5VK",v="vYl1kgf1_R18FCmHgdw2",j="vZkc6VwrFz0EjVBuHGmx";var p=s(86070);const k=(0,n.H)((({children:e,fetchingState:a,hideHpto:s},r)=>{const n=(0,i.d4)(d.Dr),k=(0,u.A)(),b=(0,i.wA)(),f=(0,t.useRef)(null);(0,t.useEffect)((()=>(f.current&&b((0,l.$t)(f.current)),()=>{b((0,l.IH)(!0))})),[b]),(0,t.useEffect)((()=>{a===o.C.FETCHED&&b((0,l.bW)())}),[a,b]);const N=(0,t.useCallback)((e=>{b((0,l.yF)(e.message))}),[b]);return(0,p.jsx)(h.s,{onError:N,children:(0,p.jsx)("div",{"data-testid":"hpto-parent-container",className:c()(m,"contentSpacing",{[g]:k,[x]:a===o.C.FAILED||!n||s}),children:(0,p.jsx)("div",{"data-testid":"test-hpto-ref",ref:e=>{f.current=e,"function"==typeof r?r(e):r&&(r.current=e)},className:c()(v,{[j]:a===o.C.FETCHING||s}),children:e})})})}))},34017:(e,a,s)=>{s.d(a,{Z:()=>u});var t=s(30758),r=s(41978),c=s(79630),i=s(46189),n=s(4973),l=s(59996);const d="iVAZDcTm1XGjxwKlQisz",o="_I_1HMbDnNlNAaViEnbp";var h=s(86070);const u=({isPremium:e,backgroundColor:a,backgroundImage:s,backgroundUrl:u,bannerMode:m,html:g})=>{const x=(0,r.wA)(),[v,j]=(0,t.useState)(!1),p=(0,r.d4)(n.$F)?.media,k=g||p;return(0,t.useEffect)((()=>{"html"===m&&j(!0)}),[m]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l.N,{draggable:!1,to:u||"",className:d,onClick:()=>{u&&x((0,i.i2)("event_clicked"))},style:{backgroundColor:a,backgroundImage:v?`url(${s})`:"none",backgroundSize:"cover"},children:(0,h.jsx)("iframe",{"data-testid":"html-hpto-iframe",className:o,srcDoc:k,scrolling:"no",marginWidth:0,marginHeight:0,style:{display:v?"":"none"},"aria-hidden":!0})}),(0,h.jsx)(c.S,{isPremium:e})]})}},42384:(e,a,s)=>{s.d(a,{L:()=>h});var t=s(30758),r=s(41978),c=s(79630),i=s(46189),n=s(59996);const l="xXj7eFQ8SoDKYXy6L3E1",d="F68SsPm8lZFktQ1lWsQz";var o=s(86070);const h=({isPremium:e,backgroundColor:a,backgroundImage:s,clickThroughUrl:h})=>{(0,t.useEffect)((()=>{if(!s)throw Error("[Image HPTO] Missing background image")}),[s]);const u=(0,r.wA)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.N,{"data-testid":"hpto-image",draggable:!1,onClick:()=>{u((0,i.i2)("event_clicked"))},className:l,style:{backgroundColor:a},to:h,children:(0,o.jsx)("img",{draggable:!1,className:d,alt:"",src:s})}),(0,o.jsx)(c.S,{isPremium:e})]})}},40854:(e,a,s)=>{s.d(a,{E:()=>ce});var t=s(97500),r=s.n(t),c=s(20886),i=s(41978),n=s(12783),l=s(61544),d=s(11808),o=s(79630),h=s(46189),u=s(30758),m=s(43830),g=s(49217),x=s(70675),v=s(39796),j=s(88778),p=s(17202),k=s(58345),b=s(98582),f=s(49350),N=s(40440),y=s(38916),C=s(48100),w=s(45346),S=s(42116),V=s(62720),A=s(42582);const M="x8e0kqJPS0bM4dVK7ESH",R="gZ2Nla3mdRREDCwybK6X",z="SChMe0Tert7lmc5jqH01",E="AwF4EfqLOIJ2xO7CjHoX",F="UlkNeRDFoia4UDWtrOr4",I="k_RKSQxa2u5_6KmcOoSw",_="_mWmycP_WIvMNQdKoAFb",B="O3UuqEx6ibrxyOJIdpdg",H="akCwgJVf4B4ep6KYwrk5",L="bIA4qeTh_LSwQJuVxDzl",P="ajr9pah2nj_5cXrAofU_",T="gvn0k6QI7Yl_A0u46hKn",D="obTnuSx7ZKIIY1_fwJhe",Q="IiLMLyxs074DwmEH4x5b",U="RJjM91y1EBycwhT_wH59",K="mxn5B5ceO2ksvMlI1bYz",O="l8wtkGVi89_AsA3nXDSR",W="Th1XPPdXMnxNCDrYsnwb",Y="SJMBltbXfqUiByDAkUN_",J="Nayn_JfAUsSO0EFapLuY",X="YqlFpeC9yMVhGmd84Gdo",$="HksuyUyj1n3aTnB4nHLd",q="DT8FJnRKoRVWo77CPQbQ";var Z=s(86070);const G=(e,a)=>{switch(e){case l.NQ.ALBUM:case l.NQ.TRACK:case l.NQ.EPISODE:case l.NQ.PLAYLIST:return a?d.Ru.get("ad-formats.remove"):d.Ru.get("ad-formats.save");default:return a?d.Ru.get("unfollow"):d.Ru.get("follow")}},ee=({playBtnUri:e,uri:a,uriType:s})=>{const t=(0,i.wA)(),[c,n]=(0,V.A)(a),o=(0,w.W)(),M="SMALL"===(0,S.y)()?"small":"medium",{togglePlay:R,isPlaying:z}=(0,A.P)({uri:e},{featureIdentifier:"hpto"}),E=(0,u.useCallback)((()=>{R(),t((0,h.i2)("event_clicked","ne-play-button"))}),[t,R]),F=(0,u.useCallback)((async()=>{try{await n(!c)}catch{(0,h.yF)(`invalid button uri type ${a}`)}o({targetUri:a,intent:c?"unsave":"save",type:"click"})}),[c,n,a,o]),I=(0,u.useCallback)((()=>{t((0,h.i2)("event_clicked","ne-more-button"))}),[t]);let _=null;return _=(0,l._T)(a)?(0,Z.jsx)(j.h,{uri:a}):(0,l.ec)(a)?(0,Z.jsx)(p.t,{uri:a}):(0,l.tb)(a)?(0,Z.jsx)(N.W,{uri:a}):(0,l.WB)(a)?(0,Z.jsx)(y.H,{uri:a}):(0,l.U_)(a)?(0,Z.jsx)(C.P,{uri:a}):(0,l.gH)(a)?(0,Z.jsx)(k.b,{uri:a}):(0,l.Pk)(a)?(0,Z.jsx)(f.A,{uri:a}):(0,Z.jsx)(b.h,{uri:a}),(0,Z.jsxs)("div",{className:W,"data-testid":"hpto-native-buttons",children:[(0,Z.jsx)(m.$,{onClick:E,size:M,children:z?d.Ru.get("pause"):d.Ru.get("play")}),(0,Z.jsx)(g.n,{className:r()({[q]:c}),onClick:F,size:M,children:G(s,c)}),(0,Z.jsx)(v.b,{menu:_,children:(0,Z.jsx)(x.e,{onClick:I,size:M,className:Y})})]})},ae=({className:e})=>(0,Z.jsx)("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:"150",height:"20",viewBox:"0 0 147 20",children:(0,Z.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,Z.jsx)("path",{fill:"#FFF",d:"M70 5H71V16H70z"}),(0,Z.jsxs)("g",{children:[(0,Z.jsx)("path",{fill:"#84BD00",d:"M10.001.045C4.489.045.02 4.49.02 9.975c0 5.486 4.469 9.932 9.981 9.932 5.513 0 9.981-4.446 9.981-9.931 0-5.485-4.468-9.931-9.981-9.931"}),(0,Z.jsx)("path",{fill:"#000",d:"M15.544 10.6C12.463 8.717 7.956 8.186 4.33 9.28a.775.775 0 00-.519.967.78.78 0 00.972.515c3.173-.958 7.263-.483 9.945 1.158a.78.78 0 001.07-.255.772.772 0 00-.255-1.065"}),(0,Z.jsx)("path",{fill:"#000",d:"M16.858 7.251c-3.704-2.187-9.565-2.393-13.09-1.328A.928.928 0 104.31 7.7c3.07-.927 8.378-.752 11.595 1.149a.936.936 0 001.28-.325.926.926 0 00-.327-1.273"}),(0,Z.jsx)("path",{fill:"#000",d:"M14.372 13.518c-2.63-1.6-5.892-1.972-9.694-1.107a.618.618 0 10.277 1.206c3.474-.79 6.424-.467 8.768.958a.624.624 0 00.855-.206.617.617 0 00-.206-.851"})]}),(0,Z.jsxs)("g",{fill:"#FFF",transform:"translate(25 5)",children:[(0,Z.jsx)("path",{d:"M3.806 4.194C2.23 3.822 1.95 3.56 1.95 3.013c0-.518.493-.867 1.226-.867.711 0 1.416.265 2.156.81a.104.104 0 00.146-.023l.77-1.073a.102.102 0 00-.02-.139C5.347 1.023 4.357.684 3.199.684 1.496.684.307 1.694.307 3.14c0 1.55 1.026 2.099 2.799 2.522 1.508.344 1.763.632 1.763 1.147 0 .57-.515.924-1.343.924-.92 0-1.672-.306-2.511-1.025a.109.109 0 00-.076-.025.103.103 0 00-.071.036L.005 7.734a.1.1 0 00.01.142 5.18 5.18 0 003.476 1.318c1.834 0 3.02-.991 3.02-2.525 0-1.297-.784-2.014-2.705-2.475"}),(0,Z.jsx)("path",{d:"M10.661 2.656c-.795 0-1.447.31-1.985.944v-.714a.103.103 0 00-.103-.102H7.16a.103.103 0 00-.103.102v7.935c0 .057.046.102.103.102h1.412a.103.103 0 00.103-.102V8.316c.538.597 1.19.889 1.985.889 1.478 0 2.973-1.125 2.973-3.274 0-2.15-1.495-3.275-2.973-3.275zm1.332 3.275c0 1.094-.682 1.858-1.659 1.858-.965 0-1.693-.798-1.693-1.858s.728-1.858 1.693-1.858c.961 0 1.659.78 1.659 1.858z"}),(0,Z.jsx)("path",{d:"M17.468 2.656c-1.903 0-3.393 1.449-3.393 3.298 0 1.83 1.48 3.263 3.37 3.263 1.91 0 3.405-1.444 3.405-3.286 0-1.836-1.485-3.275-3.382-3.275zm0 5.145c-1.012 0-1.775-.804-1.775-1.87 0-1.07.737-1.847 1.752-1.847 1.019 0 1.787.804 1.787 1.87 0 1.07-.742 1.847-1.764 1.847z"}),(0,Z.jsx)("path",{d:"M24.913 2.784H23.36v-1.57a.103.103 0 00-.104-.103h-1.411a.103.103 0 00-.104.102v1.57h-.679a.103.103 0 00-.102.103v1.2c0 .056.046.102.102.102h.68v3.104c0 1.254.63 1.89 1.876 1.89.507 0 .927-.103 1.323-.325a.102.102 0 00.052-.089V7.626a.102.102 0 00-.049-.087.104.104 0 00-.1-.004 1.797 1.797 0 01-.83.197c-.452 0-.654-.203-.654-.659V4.188h1.553a.103.103 0 00.103-.102v-1.2a.103.103 0 00-.103-.102"}),(0,Z.jsx)("path",{d:"M30.326 2.79v-.193c0-.567.22-.82.714-.82.294 0 .53.057.795.145.033.01.067.005.093-.014a.101.101 0 00.043-.083V.648a.102.102 0 00-.073-.098 3.916 3.916 0 00-1.173-.166c-1.305 0-1.994.726-1.994 2.098v.296h-.678a.103.103 0 00-.104.102v1.206c0 .056.047.102.104.102h.678v4.788c0 .056.046.102.103.102h1.412a.103.103 0 00.103-.102V4.188h1.319l2.019 4.787c-.23.502-.455.603-.762.603-.25 0-.511-.074-.779-.219a.107.107 0 00-.082-.007.104.104 0 00-.061.055l-.479 1.038a.1.1 0 00.045.132 3 3 0 001.507.381c1.043 0 1.62-.48 2.127-1.771l2.45-6.258a.1.1 0 00-.011-.095.103.103 0 00-.085-.044h-1.47a.104.104 0 00-.098.068L34.483 7.11l-1.649-4.254a.103.103 0 00-.096-.066h-2.412"}),(0,Z.jsx)("path",{d:"M27.188 2.784h-1.412a.103.103 0 00-.103.102v6.09c0 .056.046.102.103.102h1.412a.103.103 0 00.103-.102v-6.09a.103.103 0 00-.103-.102"}),(0,Z.jsx)("path",{d:"M26.49.011c-.56 0-1.014.448-1.014 1 0 .554.454 1.002 1.013 1.002.56 0 1.013-.448 1.013-1.001 0-.553-.454-1-1.013-1"}),(0,Z.jsx)("path",{d:"M38.858 4.742a.984.984 0 01-.994-.983c0-.538.44-.987 1-.987a.984.984 0 11-.006 1.97zm.005-1.872c-.509 0-.894.4-.894.89 0 .489.382.884.889.884.509 0 .894-.4.894-.89a.876.876 0 00-.889-.884zm.22.985l.281.389h-.237l-.253-.357h-.217v.357h-.198V3.213h.465c.242 0 .401.122.401.329 0 .169-.098.272-.242.313zm-.167-.465h-.26v.326h.26c.129 0 .206-.063.206-.163 0-.107-.077-.163-.206-.163z"})]}),(0,Z.jsx)("path",{fill:"#FFF",d:"M79.9 13.12c1.8 0 2.37-1.03 2.37-1.89 0-2.49-4-1.55-4-3.26 0-.72.67-1.23 1.56-1.23.75 0 1.43.26 1.91.84l.38-.42c-.52-.59-1.26-.94-2.26-.94-1.21 0-2.19.69-2.19 1.78 0 2.33 4 1.31 4 3.27 0 .57-.39 1.33-1.76 1.33-.95 0-1.65-.47-2.08-.97l-.37.43c.51.62 1.34 1.06 2.44 1.06zm6.61-.12v-2.77h1.93c1.27 0 2.01-.9 2.01-1.95 0-1.05-.73-1.95-2.01-1.95h-2.5V13h.57zm1.87-3.29h-1.87V6.85h1.87c.88 0 1.47.59 1.47 1.43s-.59 1.43-1.47 1.43zm8.56 3.41c1.95 0 3.24-1.5 3.24-3.45 0-1.95-1.29-3.45-3.24-3.45-1.96 0-3.24 1.5-3.24 3.45 0 1.95 1.28 3.45 3.24 3.45zm0-.52c-1.62 0-2.64-1.25-2.64-2.93 0-1.7 1.02-2.93 2.64-2.93 1.6 0 2.64 1.23 2.64 2.93 0 1.68-1.04 2.93-2.64 2.93zm8.94.4V6.85h2.18v-.52h-4.94v.52h2.18V13h.58zm9.46 0v-.52h-3.23V6.33h-.57V13h3.8zm4.11 0V6.33h-.57V13h.57zm7.09.13c1.05 0 1.94-.45 2.53-1.11V9.69h-3.09v.51h2.52v1.6c-.37.37-1.07.81-1.96.81-1.57 0-2.78-1.22-2.78-2.94 0-1.74 1.21-2.93 2.78-2.93.85 0 1.61.37 2.08.93l.43-.31c-.61-.7-1.41-1.14-2.51-1.14-1.87 0-3.38 1.39-3.38 3.45 0 2.06 1.51 3.46 3.38 3.46zM138.2 13V6.33h-.58v2.98h-4.23V6.33h-.57V13h.57V9.83h4.23V13h.58zm6.23 0V6.85h2.18v-.52h-4.94v.52h2.18V13h.58z"})]})});var se=s(59996);const te=e=>{switch(e){case l.NQ.ALBUM:return d.Ru.get("card.tag.album");case l.NQ.TRACK:return d.Ru.get("card.tag.track");case l.NQ.ARTIST:return d.Ru.get("card.tag.artist");case l.NQ.EPISODE:return d.Ru.get("card.tag.episode");case l.NQ.SHOW:return d.Ru.get("card.tag.show");case l.NQ.PLAYLIST:case l.NQ.PLAYLIST_V2:return d.Ru.get("card.tag.playlist");default:return""}},re=(e,a)=>"spotlight"===e?(0,Z.jsx)(ae,{className:D}):"exclusive"===e?(0,Z.jsx)("p",{dir:"auto",className:r()(D,Q),children:d.Ru.get("ad-formats.exclusive")}):(0,Z.jsx)(n.E,{as:"p",dir:"auto",variant:"bodySmallBold",semanticColor:"textBase",className:D,children:te(a)}),ce=({name:e,uri:a,playBtnUri:s,description:t,smallImage:l,isSponsored:u,backgroundImage:m,sponsoredLogo:g,uriType:x,logoBlurb:v,isPremium:j,artists:p,badgeType:k})=>{const b=(0,i.wA)(),f=p.length>0,N=!j&&u,y=(0,c.decode)(t);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("div",{"data-testid":"hpto-native",className:r()(u?R:M,{[F]:u}),children:[u&&(0,Z.jsx)("div",{className:I,children:(0,Z.jsxs)("div",{children:[(0,Z.jsx)(n.E,{as:"p",variant:"marginalBold",className:T,semanticColor:"textBase",children:d.Ru.get("ad-formats.presentedBy")}),(0,Z.jsx)("img",{draggable:!1,className:L,src:g,alt:""}),(0,Z.jsx)(n.E,{as:"p",semanticColor:"textBase",variant:"bodySmall",className:P,children:v})]})}),(0,Z.jsx)("div",{className:u?E:z,children:(0,Z.jsx)(se.N,{"data-testid":"ne-image-link-test",onClick:()=>{b((0,h.i2)("event_clicked","ne-image-link"))},className:H,to:a,children:(0,Z.jsx)("img",{className:B,alt:"",src:l})})}),(0,Z.jsxs)("div",{className:_,children:[re(k,x),(0,Z.jsx)(n.E,{as:"a",variant:"titleLarge","data-testid":"ne-name-link-test",onClick:()=>{b((0,h.i2)("event_clicked","ne-name-link"))},href:a,dir:"auto",semanticColor:"textBase",className:u?K:U,children:e}),f&&(0,Z.jsx)("div",{children:p.map(((e,s)=>(0,Z.jsxs)("span",{children:[s?d.Ru.getSeparator():"",(0,Z.jsx)(n.E,{as:"a",semanticColor:"textBase",variant:"bodyMedium","data-testid":`ne-attrib-link-${s}-test`,onClick:()=>{b((0,h.i2)("event_clicked","ne-attrib-link"))},draggable:!1,href:e.uri,children:e.name})]},`${a}-${s}`)))}),(0,Z.jsx)(n.E,{variant:"bodyMedium",dir:"auto",className:O,semanticColor:"textBase",children:y}),(0,Z.jsx)(ee,{playBtnUri:s,uri:a,uriType:x})]})]}),(0,Z.jsx)("div",{draggable:!1,className:r()(u?X:J,{[$]:!u}),style:{backgroundImage:`url(${m})`}}),!N&&(0,Z.jsx)(o.S,{isPremium:j})]})}},98582:(e,a,s)=>{s.d(a,{h:()=>h});var t=s(30758),r=s(11808),c=s(66416),i=s(65183),n=s(96264),l=s(95302),d=s(6576),o=s(86070);const h=t.memo((function({uri:e}){const{spec:a}=(0,d.o)(e);return(0,o.jsx)(l.pZ,{value:"generic",children:(0,o.jsx)(c.W,{children:(0,o.jsx)(n.h,{divider:"before",children:(0,o.jsx)(i.m,{spec:a,uri:e,displayText:r.Ru.get("context-menu.copy-generic-link")})})})})}))}}]);
|
|
//# sourceMappingURL=7660.js.map
|