dotfiles/.config/spicetify/Extracted/Themed/xpui/xpui-routes-episode.js

2 lines
18 KiB
JavaScript
Raw Normal View History

2024-07-11 00:01:49 +05:30
"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[3472],{47998:(e,t,i)=>{i.d(t,{o:()=>n});var s=i(36844),a=i(41836);function n(){return{version:(0,s.W6)(a.GE)?2:1}}},22315:(e,t,i)=>{i.d(t,{p:()=>u,q:()=>r.q});var s=i(59496),a=i(61740),n=i(66632),r=i(13655),o=i(6664),l=i(95663),c=i(4637);const d=s.memo((function({uri:e,size:t=r.q.md,className:i,onClick:d,showUpsell:u}){const[p,m]=(0,n.Z)(e),h=(0,a.I0)(),g=(0,l.o)(),x=(0,s.useCallback)((()=>{g({targetUri:e,intent:p?"remove-from-library":"add-to-library",type:"click"}),m(!p),h(p?(0,o.SS)():(0,o.kK)())}),[g,e,p,m,h]);return(0,c.jsx)(r.o,{className:i,isFollowing:p,onFollow:x,onClick:d,uri:e,size:t,showUpsell:u})})),u=s.memo((function(e){return(0,c.jsx)(d,{...e})}))},17264:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ht});var s=i(59496),a=i(89605),n=i(36844),r=i(91399),o=i(47792),l=i(50346),c=i(3802),d=i(91703),u=i(92009),p=i(23627),m=i(63082),h=i(47998),g=i(14556),x=i(4637);const y=(0,s.lazy)((()=>i.e(9248).then(i.bind(i,49248)))),b="Episode page";function k(e){const t=(0,g.m)(),i=(0,h.o)();return t?(0,x.jsx)(s.Suspense,{fallback:!0,children:(0,x.jsx)(y,{reason:b,...i,...e})}):null}const C="dpN5ViPOceUWNB5EQPHN",j="vBcxPq3E2okwgXOkVPEM",P="HCCBXwdFvq6omWW2hR0N",T="bJOPO5Zo7dpjSVDwEpSw",f="TXdDDpokVTyJzDEDWHHf",I="HaSbtEVJnxBsaJ5SRi0M",v="YldGldlfaI9myEGXQf9g",S="qJHVIpJn1vLPWsAKfTEZ",E="wSIzjkVlr0Zdy7di2vRm",U="hYS_K1NATGyWt6tCSRqQ",D="hVVaM4pF9arpQ8Nvn2a1",w="zf0Eac1LugsHUacz74Zf",N="TnNaqxbaI0hzhBQZ7wE0",R="zSw1lG1TNe_xm6KTqtCv",L="MlEQDkXnjdKKJueJ9kkB",B="jg0xlyD1yjh0DPNG6eOg",M="QiHXpFb4dLZNOFe5gpp3";var F=i(56162),A=i(34223),O=i(96170),z=i(79475),H=i(41836),$=i(88333);const W=({cardHeaderText:e,cardBodyText:t,buttonText:i,buttonTarget:s})=>(0,n.W6)(H.vp)?(0,x.jsxs)("div",{className:v,children:[(0,x.jsxs)("div",{className:S,children:[(0,x.jsx)(F.D,{variant:"balladBold",semanticColor:"textBase",children:e}),(0,x.jsx)(F.D,{semanticColor:"textBase",children:t})]}),(0,x.jsx)(z.D,{buttonSize:"sm",colorSet:"invertedLight",href:(0,l.EC)(s).toURLPath(!0),component:$.Z,children:i})]}):null,_=({areHTMLDescriptionsEnabled:e,contentInformation:t,description:i,hasDescription:a,htmlDescription:n,onExpanded:r,onTimeStampClick:o,playability:l,showHeader:d=!0,spec:u})=>{const p=(0,O.$P)(),m=(a||t)&&d,h=(0,s.useCallback)((e=>{const t=u.readMoreButtonFactory();p.logInteraction(e?t.hitUiReveal():t.hitUiHide()),r?.()}),[u,p,r]);return(0,x.jsxs)(x.Fragment,{children:[m&&(0,x.jsx)(F.D,{as:"h2",variant:"canon",semanticColor:"textBase",className:P,children:c.ag.get("episode.description-title")}),t&&(0,x.jsx)(W,{cardHeaderText:t.cardHeaderText,cardBodyText:t.cardBodyText,buttonText:t.buttonText,buttonTarget:t.buttonTarget}),a&&(0,x.jsx)(A.o,{className:j,onTimeStampClick:o,maxLines:4,onExpanded:h,content:(i||"").trim(),htmlContent:e&&n?n:void 0,enableTimestamps:l.playable})]})};var K=i(84875),q=i.n(K),Z=i(91929),V=i(84588),J=i(78780),G=i(17096),Q=i(34553),Y=i(21524),X=function(e){return e.DESCRIPTION="description",e.TRANSCRIPT="transcript",e}(X||{});const ee=s.memo((function({transcriptSections:e,descriptionContent:t,transcriptContent:i,spec:a}){const n=(0,O.$P)(),[r,o]=(0,s.useState)(X.DESCRIPTION),{scrollNodeRef:l}=s.useContext(Y.VX),{ref:d,inView:u}=(0,Z.YD)({threshold:[1],root:l.current,rootMargin:`-${Q.K1+1}px 100000px 0px 100000px`}),p=(0,s.useRef)(null),m=(0,s.useCallback)((e=>{p.current=e,d(e)}),[d]);return(0,s.useEffect)((()=>{const e=p.current?.parentElement?.offsetTop,t=l?.current;if(!e||!t)return;const i=e-Q.K1;t.scrollTop>i&&t.scrollTo({top:i})}),[l,r]),(0,x.jsx)(V.l,{list:(0,x.jsxs)(J.F,{className:q()(L,{[B]:!u}),ref:m,children:[(0,x.jsx)(G.c,{label:c.ag.get("web-player.episode.description"),sentenceCase:!0,active:r===X.DESCRIPTION,onClick:()=>{const e=a.tabsFactory().descriptionTabButtonFactory().hitUiReveal();n.logInteraction(e),o(X.DESCRIPTION)},className:q()(M,{[E]:r===X.DESCRIPTION})}),(0,x.jsx)(G.c,{label:c.ag.get("web-player.episode.transcript"),sentenceCase:!0,disabled:null===e,active:r===X.TRANSCR
//# sourceMappingURL=xpui-routes-episode.js.map