dotfiles/.config/spicetify/Extracted/Raw/xpui/xpui-routes-premium-page.js

2 lines
14 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([[4868],{75613:(e,n,t)=>{t.r(n),t.d(n,{default:()=>Fe});var a=t(59496),i=t(94716),s=t(3802),o=t(96170),r=t(84875),l=t.n(r),d=t(91929),c=t(67353),m=t(5153);const f="POL2MEn4kYvvhOfLsg0r",u="tGegSRxI7iLscjOezFfw",h="cVkF9UmUxF_89Q1pcUFS",p="RUQ0KeNlKc47sIZUr2ED",b="dLo0jrUD6hWn4kzbBOFm",_="oNgy3yKSOHI7KTpQJ1xJ",x="vTyWYlhrqCiKKKiGcTo8",y="WNzIvGMAnUhnZVlXsJJW",w="FGbrgB0DUj2wsUM9ACxp",E="ShjUoZcnXBRAwzptB42a",T="NRAlsO_QA8qpg_K2hswA",j="eCiEDXVKutfSeGT8XqGT",v="ZH4_Li3IiGysnYCQtQdW",g="wUrmLCaGCvSO51jcjHhe",N="u7oKAIw5c11Ss7QxopQx";var I=t(4637);const R="PREMIUM_TIER",S=({tiers:e,benefitLabel:n})=>(0,I.jsx)("thead",{className:x,children:(0,I.jsxs)("tr",{children:[(0,I.jsx)("th",{className:l()(E,T),children:n}),e.map(((e,n)=>(0,I.jsx)("th",{className:E,children:(0,I.jsx)("div",{className:l()(p,e.id===R?_:b),dangerouslySetInnerHTML:{__html:e.name}})},n)))]})}),k=({benefit:e,index:n,comparisonItemList:t})=>{const[i,s]=(0,a.useState)(!1);return(0,I.jsxs)("tr",{className:y,style:{"--animationDelay":100*n+"ms"},onMouseOver:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:()=>s(!1),children:[(0,I.jsxs)("td",{className:l()(j),children:[(0,I.jsx)("span",{children:e.name}),(0,I.jsx)("div",{className:l()(N,{[u]:i}),children:i&&(0,I.jsx)(c.u,{colorSet:"invertedLight",children:e.description})})]}),t.map((e=>(0,I.jsx)("td",{className:v,children:(0,I.jsx)("div",{className:l()(g,{[w]:e.id===R}),children:e.is_benefit_present?(0,I.jsx)(m.K,{className:h,iconSize:32}):"-"})},e.id)))]})},D=({tableData:e,spec:n})=>{const{ref:t,inView:i}=(0,d.YD)(),s=(0,a.useCallback)((n=>e.comparison.find((e=>e.benefit_id===n))),[e.comparison]),r=(0,a.useMemo)((()=>n?.comparisonTableFactory()),[n]),c=(0,o.Wi)(r);return(0,I.jsx)("div",{className:l()(f,{[u]:i}),ref:t,children:(0,I.jsxs)("table",{ref:c,children:[(0,I.jsx)(S,{tiers:e.tier,benefitLabel:e.benefit_label_text}),(0,I.jsx)("tbody",{children:e.benefit.map(((e,n)=>{const t=s(e.benefit_id);return t?(0,I.jsx)(k,{index:n,benefit:e,comparisonItemList:t.tier_benefit},e.name):null}))})]})})};var C=t(56162),L=t(79475),F=t(94285),M=t(63082),U=t(65735),P=t(66490);const O="akdMqUKXxdAp0FCJzDCT",A="mLrfUuFeF2k3BIxJimkY",W="RpNlq57TSskxD3Ra6Yfg",z="AzZBnbf197O9XdTTmoi3",B="_vt32jjXyqbFifhAeVbS",Y="YQQwMcVNQIqsmNu0DgMW",Q="dpOre1_sqBw8b5hkncRz",G=({data:e,refToStoreFront:n})=>{const{spec:t,logger:s}=(0,o.fU)(i.r,{data:{identifier:"Hero"}}),r=(0,a.useMemo)((()=>t.heroContainerFactory({identifier:""})),[t]),l=(0,o.Wi)(r),{openURLWithSessionTransfer:d}=(0,P.e)(),c="https://www.spotify.com/us/purchase/offer/default-trial-1m/?country=US",m=(0,a.useCallback)((e=>{d(c,"_blank"),e.preventDefault(),s.logInteraction(r.heroCheckoutButtonFactory().hitNavigateToExternalUri({destination:c}))}),[r,s,d]),f=(0,a.useCallback)((e=>{n?.current&&n?.current.scrollIntoView({behavior:"smooth",block:"start"}),e.preventDefault(),s.logInteraction(r.heroViewPlansButtonFactory().hitQuickScroll())}),[r,s,n]);return(0,I.jsxs)("div",{className:O,ref:l,children:[(0,I.jsx)("div",{className:A,children:(0,I.jsx)(C.D,{as:"p",color:"var(--spice-text)",semanticColor:"textBase",dangerouslySetInnerHTML:{__html:e.tagline}})}),(0,I.jsx)("div",{className:W,children:(0,I.jsxs)("div",{className:z,"data-testid":"premium-hero",children:[(0,I.jsx)(C.D,{as:"h1",variant:"altoBrio",color:"var(--spice-text)",semanticColor:"textBase",style:{fontSize:"48px"},children:e.header}),(0,I.jsx)(C.D,{as:"p",variant:"finale",color:"var(--spice-text)",semanticColor:"textBase",style:{fontSize:"18px"},children:e.subheader}),(0,I.jsxs)("div",{className:Y,children:[(0,I.jsxs)(L.D,{colorSet:"invertedLight",className:Q,onClick:m,children:[e.cta[0].text,(0,I.jsx)(F.T,{style:{marginLeft:"4px"}})]}),(0,I.jsx)(M.P,{style:{borderColor:"white"},className:Q,onClick:f,children:e.cta[1].text})]}),(0,I.jsxs)(C.D,{as:"p",variant:"finale",color:"var(--spice-text)",semanticColor:"textBase",style:{fontSize:"12px"},children:[(0,I.jsx)(U.h,{href:e.legalTermsLin
//# sourceMappingURL=xpui-routes-premium-page.js.map