1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1999,6044,9452],{2673:e=>{e.exports={scroller:"edgeToEdgeScroller_scroller__a4IK_",train:"edgeToEdgeScroller_train__3Q400"}},6497:e=>{e.exports={root:"ActivateGiftCard_root__ut1H8",backgroundWrapper:"ActivateGiftCard_backgroundWrapper__6kMxK",mainContent:"ActivateGiftCard_mainContent__qtW8v",illustration:"ActivateGiftCard_illustration__2L_Q1",buttonContainer:"ActivateGiftCard_buttonContainer__BI3q_",buttonLink:"ActivateGiftCard_buttonLink__bAUYU",genericTitle:"ActivateGiftCard_genericTitle__O5TYc",form:"ActivateGiftCard_form__BlD1S",messageBox:"ActivateGiftCard_messageBox__MN08d"}},13888:e=>{e.exports={content:"ActivateGiftCardPage_content__ncbX3",footer:"ActivateGiftCardPage_footer__DAaWI"}},19366:e=>{e.exports={content:"ActivateGiftcardModalContent_content__wUQFB"}},20865:(e,t,a)=>{"use strict";a.d(t,{Ze:()=>m,b0:()=>u,c0:()=>d,v8:()=>c,yq:()=>s});var r=a(98720),i=a(3305),n=a(89654),l=a(51143),o=a(35951);let s={album:(e,t,a)=>({userEmail:e,scope:o.B.Album,albumIdOrIcpn:t,trackId:a}),albumRelatedAlbums:(e,t,a)=>({...s.album(e,t),subscope:o.B.RelatedAlbums,sort:a?.sort,listenedBefore:a?.listenedBefore}),albumRelatedContributors:(e,t,a,r,i)=>({...s.album(e,t),subscope:o.B.RelatedContributors,type:a,limit:r,sort:i?.sort,followedBefore:i?.followedBefore}),albumPlaylists:(e,t)=>({userEmail:e,scope:o.B.AlbumPlaylists,albumIdOrIcpn:t})},c=(e,t,a)=>{let{api:o}=(0,n.gf)(),{user:c}=(0,l.IE)();return(0,r.I)({queryKey:[s.album(c?.email,e,t)],queryFn:"number"==typeof e?()=>o.getAlbumById(e):"string"==typeof e?()=>o.getAlbumByIcpn(e):void 0!==t?()=>o.getAlbumByTrackId(t):i.hT,...a})},d=(e,t)=>{let{api:a}=(0,n.gf)(),{user:i}=(0,l.IE)();return(0,r.I)({queryKey:[s.albumPlaylists(i?.email,e)],queryFn:()=>a.getAlbumPlaylists(e),enabled:t})},u=(e,t)=>{let{api:a}=(0,n.gf)(),{user:o}=(0,l.IE)();return(0,r.I)({queryKey:[s.albumRelatedAlbums(o?.email,e,t)],queryFn:e?()=>a.getAlbumRelatedAlbums(e,{sort:t?.sort,listened_before:t?.listenedBefore}):i.hT})},m=(e,t,a,o)=>{let{api:c}=(0,n.gf)(),{user:d}=(0,l.IE)();return(0,r.I)({queryKey:[s.albumRelatedContributors(d?.email,e,t,a,o)],queryFn:e?()=>c.getAlbumRelatedContributors(e,{type:t,limit:a,sort:o?.sort,followed_before:o?.followedBefore}):i.hT})}},24138:e=>{e.exports={image:"ActivateAlbumGiftcardSuccess_image__qBx2k",albumTitle:"ActivateAlbumGiftcardSuccess_albumTitle__itPQc"}},37016:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>L});var r=a(80263),i=a(70719),n=a(13463),l=a(53239),o=a(12556),s=a(94386),c=a(64011),d=a(22269),u=a(136),m=a(78852),h=a(65963),f=a(84001),g=a(61469),v=a(82762),x=a(80916),p=a(89367),b=a(79273),j=a(33064),_=a(7570),y=a(20865),A=a(24575),E=a(22392),C=a(3154),w=a(89654),T=a(51143);let S={ALBUM_ALREADY_PURCHASED:"The album has already been purchased",ALBUM_REMOVED:"The album has been removed from Volumo",ALREADY_REDEEMED:"The gift card has already been redeemed",NEED_SIGNUP:"You need to sign up to activate the gift card",OUTDATED:"The gift card is outdated",REJECTED:"The gift card cannot be redeemed",NOT_PAID:"The gift card has not been paid for"};var k=a(6497),K=a.n(k);let R=()=>{let e=(0,g.useRouter)(),{t}=(0,n.c3)(),{isLoggedIn:a}=(0,T.IE)(),{isAboveSm:k}=(0,o.yU)(),[R,N]=(0,l.useState)(),G=(0,y.v8)(R),[B,F]=(0,l.useState)(),P=(0,l.useRef)(null),I=(()=>{let{api:e}=(0,w.gf)(),{refetch:t}=(0,T.ag)();return(0,A.n)({mutationFn:async t=>{let{code:a,params:r}=t;return await e.activateGiftcard(a,r)},onSuccess(){t()},onError:()=>{}})})(),L=(()=>{let{api:e}=(0,w.gf)(),{refetch:t}=(0,T.ag)();return(0,A.n)({mutationFn:async t=>{let{code:a,params:r}=t;return e.activateAlbumGiftcard(a,r)},onSuccess(){t()},onError:()=>{}})})(),M=I.error||L.error,W=(0,l.useCallback)((t,a)=>{if(t.code){let r=encodeURIComponent((0,h.aN)(t.code," \r\n "));"VA"===r.slice(0,2)?L.mutate({code:r,params:{validate:a}},{onSuccess:t=>{e.push({pathname:`${i.KW.Album}/${t.album_id}`,query:{[_.cZ]:"1"}})}}):I.mutate({code:r,params:{validate:a}},{onSuccess:e=>{F(e.amount)}})}},[I,L]),{openAuthModal:D}=(0,b.As)(),q=(0,l.useCallback)(()=>{W({code:P.current?.values.code},!1)},[W]);return(0,l.useEffect)(()=>{!a&&e.query.code&&D({type:"loginOrCreateAccount",giftCardCode:e.query.code,onSuccess:q})},[]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:K().root,children:(0,r.jsx)("div",{className:K().backgroundWrapper,children:(0,r.jsxs)("div",{className:K().mainContent,children:[(0,r.jsx)(m.K,{mt:3}),(0,r.jsx)("h1",{className:K().genericTitle,children:t("Activate gift card")}),(0,r.jsx)(m.K,{mt:3}),(0,r.jsx)(f.l1,{enableReinitialize:!0,initialStatus:(0,c.iE)(I.error),initialValues:{code:e.query.code},innerRef:P,validationSchema:v.Ik().shape({code:v.Yj().required(t("Required"))}),onSubmit:e=>W(e,!a),children:e=>{let{errors:i,handleChange:n,handleBlur:l,status:o,touched:c,values:h}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:K().form,children:(0,r.jsxs)(f.lV,{children:[(0,r.jsx)(d.k,{autoFocus:!0,error:c.code&&(i.code||o?.code),label:t("Enter code"),name:"code",placeholder:"XXXXXXXXXXXXX",required:!0,reserveErrorSpace:!0,textAlign:"center",value:h.code,onBlur:l,onChange:n}),(0,r.jsx)(m.K,{mt:3}),(0,r.jsx)(s.$,{disabled:!h.code,fullWidth:!0,loading:I.isPending||L.isPending,type:"submit",children:a?t("Activate"):t("Check for validity")})]})}),(0,r.jsx)(m.K,{mt:4}),a?null:(0,r.jsxs)(u.p,{className:K().messageBox,type:"info",children:[t("You must be logged in before you could activate a gift\xa0card code."),(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)("div",{className:K().buttonContainer,children:(0,r.jsx)(p.H,{onAuthSuccess:h.code?q:void 0})})]})]})}}),(0,r.jsx)(m.K,{mt:14}
1),(0,r.jsx)("img",{alt:t("Gift card illustration"),className:K().illustration,src:`${j.Z4.basePath}/static/images/giftcard-${k?"desktop":"mobile"}.jpg`})]})})}),(0,r.jsx)(x.b,{album:G?.data??void 0,amount:B,error:M?(e=>{if(!(0,E.KE)(e))return"Unknown error";if(e.response?.status===C.Hv.NotFound)return"The gift card has not been found";let t=e.response?.body?.error_code;return t?S[t]??"Unknown error":t})(M):void 0,open:!!R||!!B||!!M,validation:!a,onCloseAttempt:()=>{N(void 0),F(void 0),I.reset(),L.reset()}})]})};var N=a(42173),G=a(7060),B=a(62017),F=a(13888),P=a.n(F);let I=()=>{let{t:e}=(0,n.c3)(),t=(0,l.useMemo)(()=>({title:e("Activate your gift card")}),[e]);return(0,r.jsxs)(B.s,{className:P().content,children:[(0,r.jsx)(N.t,{baseCanonicalUrl:i.KW.ActivateGiftcard,fields:t,pageName:"giftcardActivate"}),(0,r.jsx)(R,{})]})};I.displayName="ActivateGiftCardPage",I.getConfig=()=>({noQuickSettings:!0,themeName:"dark"}),I.renderInLayout=(e,t)=>(0,r.jsx)(G.Y,{footerClassName:P().footer,fullWidth:!0,noQuickSettings:t.pageConfig?.noQuickSettings,children:e});let L=I},42173:(e,t,a)=>{"use strict";a.d(t,{t:()=>g});var r=a(80263),i=a(8650),n=a(61528),l=a(13463),o=a(65963),s=a(27518),c=a.n(s),d=a(61469),u=a(53239),m=a(13380),h=a(8259),f=a(18067);let g=e=>{let{baseCanonicalUrl:t,children:a,fields:s,microdata:g,noHreflang:v,noOtherLocales:x,pageName:p,robots:b}=e,{cookieData:j}=(0,m.iT)(),{defaultLocale:_,locale:y,supportedLocales:A}=(0,l.c3)(),{asPath:E}=(0,d.useRouter)(),C=x?void 0:A?.filter(e=>e!==y&&i.Y[e]&&!i.Y[e].uncrawlable),w=(0,f.Z)({fields:s,locale:y,pageName:p,path:E}),T=t&&y&&y!==_&&!v?`/${y}${t}`:t,S=(0,o.j)(T?.startsWith("/")?(0,h.MX)(T):T,"/"),k=y&&i.Y[y]?.uncrawlable?"none":b;return(0,u.useEffect)(()=>{j.hasDebugSet&&console.debug(["Canonical URL: %s","Metaplaceholders: %O","Microdata: %O","Page name: %s","Title: %s","H1: %s","Description: %s","Image: %s"].join(o.Dg),S,s,g,p,w.title,w.h1Title,w.metaTagValues.description,w.metaTagValues["og:image"])},[j.hasDebugSet,S,s,g,p,w.title,w.h1Title,w.metaTagValues.description,w.metaTagValues["og:image"]]),(0,r.jsxs)(c(),{children:[k&&(0,r.jsx)("meta",{content:k,name:"robots"}),(0,r.jsx)("title",{children:w.title}),Object.entries(w.metaTagValues).map((e,t)=>{let[a,i]=e;return i?(0,r.jsx)("meta",{content:i,name:a},t):null}),S&&(0,r.jsx)("link",{href:S,hrefLang:v?void 0:y,rel:"canonical"}),void 0===t||v?null:C?.map(e=>(0,r.jsx)("link",{href:(0,o.j)((0,h.MX)(e===_?t:`/${e}${t}`),"/"),hrefLang:e,rel:"alternate"},e)),void 0===t||v?null:(0,r.jsx)("link",{href:(0,o.j)((0,h.MX)(t),"/"),hrefLang:"x-default",rel:"alternate"}),g&&(0,r.jsx)(n.AZ,{data:g}),a]})}},61528:(e,t,a)=>{"use strict";a.d(t,{vS:()=>o,AZ:()=>n,bE:()=>l,Oq:()=>s});var r=a(80263),i=a(53239);let n=e=>{let{data:t}=e,a=(0,i.useMemo)(()=>JSON.stringify(t).replace(/</g,"\\u003c"),[t]);return(0,r.jsx)("script",{dangerouslySetInnerHTML:{__html:a},type:"application/ld+json"})},l="https://schema.org/",o="https://schema.org/DigitalFormat",s=e=>{if(e)return{"@context":l,"@type":"BreadcrumbList",itemListElement:e.map((e,t)=>({"@type":"ListItem",position:t+1,item:{"@id":e?.href??void 0,name:e.text,image:e.image,"@type":e.type,description:e.description}}))}}},78233:e=>{e.exports={image:"ActivateBalanceGiftcardSuccess_image__L_xJM"}},80916:(e,t,a)=>{"use strict";a.d(t,{b:()=>I});var r,i,n,l,o=a(80263),s=a(43391),c=a(53239),d=a(70719),u=a(94386),m=a(97930),h=a(136),f=a(93349),g=a(78852),v=a(50016),x=a(13463);function p(){return(p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(null,arguments)}let b=e=>c.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",width:120,height:120,fill:"none",viewBox:"0 0 120 120"},e),r||(r=c.createElement("g",{clipPath:"url(#activate-giftcard-success_svg__a)"},c.createElement("path",{fill:"#00886C",fillRule:"evenodd",d:"M60 0v120c33.137 0 60-26.863 60-60S93.137 0 60 0",clipRule:"evenodd"}),c.createElement("circle",{cx:60,cy:60,r:38,fill:"#00CD7F"}),c.createElement("circle",{cx:60,cy:60,r:16,fill:"#fff"}),c.createElement("path",{stroke:"#00CD7F",strokeLinecap:"round",strokeWidth:2,d:"m54 60 4 4 8-8"}))),i||(i=c.createElement("defs",null,c.createElement("clipPath",{id:"activate-giftcard-success_svg__a"},c.createElement("path",{fill:"#fff",d:"M0 0h120v120H0z"})))));var j=a(59329),_=a(24138),y=a.n(_);let A=e=>{let{album:t,validation:a,onCloseAttempt:r}=e,{t:i}=(0,x.c3)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:y().image,children:(0,o.jsx)(b,{})}),(0,o.jsx)(g.K,{mt:4}),(0,o.jsx)(v.V,{align:"center",component:"h1",variant:"h2",children:(0,o.jsx)("div",{children:i(a?"G
1ift card is valid!":"Congratulations!")})}),(0,o.jsx)(g.K,{mt:2}),(0,o.jsx)(v.V,{align:"center",component:"h2",variant:"body1",children:a?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{children:i("After activating your\xa0gift\xa0card, this album will be added to the list of purchased items and will be available for download at any time")}),(0,o.jsx)(g.K,{mt:2}),(0,o.jsx)(j.R,{album:t,contextPath:"in-modal",eagerLoading:!0,preview:!0})]}):(0,o.jsx)("div",{children:i("The gift card has been activated and the album {albumTitle} has been received successfully. It is now available for you to download at any time. You can find it in {downloadsLink}",void 0,{albumTitle:(0,o.jsx)("span",{className:y().albumTitle,children:t.title},"albumTitle"),downloadsLink:(0,o.jsx)(f.W,{href:d.KW.Downloads,children:i("My downloads")},"downloadsLink")})})}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.K,{mt:2}),(0,o.jsxs)(h.p,{fullWidth:!0,type:"info",children:[i("You must be logged in before you could activate a\xa0gift\xa0card code."),(0,o.jsx)("br",{})]})]}),(0,o.jsx)(g.K,{mt:2}),(0,o.jsxs)(m.xA,{columns:"1fr 1fr",horizontalSpacing:2,children:[(0,o.jsx)(u.$,{href:d.KW.ActivateGiftcard,muted:!0,children:i(a?"Close":"Activate another card")}),(0,o.jsx)(u.$,{href:a?d.KW.Root:void 0,onClick:r,children:i(a?"Go to Home page":"Close")})]}),(0,o.jsx)(g.K,{mt:4})]})};var E=a(77148),C=a(78233),w=a.n(C);let T=e=>{let{amount:t,validation:a,onCloseAttempt:r}=e,{t:i}=(0,x.c3)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:w().image,children:(0,o.jsx)(b,{})}),(0,o.jsx)(g.K,{mt:4}),(0,o.jsx)(v.V,{align:"center",component:"h1",variant:"h2",children:(0,o.jsx)("div",{children:i(a?"Your gift card is valid!":"Congratulations!")})}),(0,o.jsx)(g.K,{mt:2}),(0,o.jsx)(v.V,{align:"center",component:"h2",variant:"body1",children:a?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{children:i("After activating your\xa0gift\xa0card, the balance of your account on Volumo will increase by {amount}",void 0,{amount:(0,E.vv)(t)})}),(0,o.jsx)("div",{children:i("Go explore your music library or activate another gift\xa0card")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{children:i("After activating your\xa0gift\xa0card, the balance of your account on Volumo was topped up by {amount}",void 0,{amount:(0,E.vv)(t)})}),(0,o.jsx)("div",{children:i("Go explore your music library or activate another gift\xa0card")})]})}),a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.K,{mt:2}),(0,o.jsxs)(h.p,{fullWidth:!0,type:"info",children:[i("You must be logged in before you could activate a gift\xa0card code."),(0,o.jsx)("br",{})]})]}),(0,o.jsx)(g.K,{mt:2}),(0,o.jsxs)(m.xA,{columns:"1fr 1fr",horizontalSpacing:2,children:[(0,o.jsx)(u.$,{muted:!0,onClick:r,children:i(a?"Close":"Activate another card")}),(0,o.jsx)(u.$,{href:d.KW.Root,children:i("Go to Home page")})]}),(0,o.jsx)(g.K,{mt:4})]})};function S(){return(S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(null,arguments)}let k=e=>c.createElement("svg",S({xmlns:"http://www.w3.org/2000/svg",width:120,height:120,fill:"none",viewBox:"0 0 120 120"},e),n||(n=c.createElement("g",{clipPath:"url(#activate-giftcard-error_svg__a)"},c.createElement("path",{fill:"#FFDE1A",fillRule:"evenodd",d:"M60 0v120c33.137 0 60-26.863 60-60S93.137 0 60 0",clipRule:"evenodd"}),c.createElement("circle",{cx:60,cy:60,r:38,fill:"#EB1C2B"}),c.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M60 76c8.837 0 16-7.163 16-16s-7.163-16-16-16-16 7.163-16 16 7.163 16 16 16m-4-18a2 2 0 1 0-4 0 2 2 0 0 0 4 0m10-2a2 2 0 1 1 0 4 2 2 0 0 1 0-4M54.706 68.364a7 7 0 0 1 9.9 0 1 1 0 0 0 1.414-1.414 9 9 0 0 0-12.728 0 1 1 0 0 0 1.414 1.414",clipRule:"evenodd"}))),l||(l=c.createElement("defs",null,c.createElement("clipPath",{id:"activate-giftcard-error_svg__a"},c.createElement("path",{fill:"#fff",d:"M0 0h120v120H0z"})))));var K=a(51143),R=a(91556),N=a.n(R);let G=e=>{let{error:t}=e,{t:a}=(0,x.c3)(),{isLoggedIn:r}=(0,K.IE)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:N().image,children:(0,o.jsx)(k,{})}),(0,o.jsx)(g.K,{mt:4}),(0,o.jsx)(v.V,{align:"center",component:"h1",variant:"h2",children:(0,o.jsx)("div",{children:a("Something went wrong!")})}),(0,o.jsx)(g.K,{mt:2}),(0,o.jsxs)(v.V,{align:"center",component:"h2",variant:"body1",children:[(0,o.jsx)("div",{children:t}),(0,o.jsx)("div",{children:a("Enter another code or try to enter this one again")})]}),!r&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.K,{mt:2}),(0,o.jsxs)(h.p,{fullWidth:!0,type:"info",children:[a("You must be logged in before you could activate a\xa0gift\xa0card code."),(0,o.jsx)("br",{})]})]}),(0,o.jsx)(g.K,{mt:2}),(0,o.jsxs)(m.xA,{columns:"1fr 1fr",horizontalSpacing:2,children:[(0,o.jsx)(u.$,{href:d.KW.ActivateGiftcard,children:a("Try again")}),(0,o.jsx)(u.$,{href:d.KW.Root,muted:!0,children:a("Go to Home page")})]}),(0,o.jsx)(g.K,{mt:4})]})};var B=a(19366),F=a.n(B);let P=e=>{let{album:t,amount:a,error:r,validation:i,onCloseAttempt:n}=e;return(0,o.jsx)(s.$m,{children:(0,o.jsx)("div",{className:F().content,children:r?(0,o.jsx)(G,{error:r}):t?(0,o.jsx)(A,{album:t,validation:i,onCloseAttempt:n}):(0,o.jsx)(T,{amount:a,validation:i,onCloseAttempt:n})})})},I=e=>{let{open:t,album:a,amount:r,error:i,validation:n,onCloseAttempt:l}=e;return(0,o.jsx)(s.aF,{open:t,openStateHash:"activate-giftcard",onCloseAttempt:l,children:(0,o.jsx)(P,{album:a,amount:r,error:i,validation:n,onCloseAttempt:l})})}},89367:(e,t,a)=>{"use strict";a.d(t,{H:()=>c});var r=a(80263),i=a(94386),n=a(97930),l=a(13463);a(53239);var o=a(79273),s=a(11182);let c=e=>{let{className:t,wrap:a,onAuthSuccess:c,onClick:d}=e,{t:u}=(0,l.c3)(),{hasEverLoggedIn:m,openAuthModal:h}=(0,o.As)(),{traceUiEvent:f}=(0,s.vs)();return(0,r.jsxs)(n.xA,{className:t,columns:a?"1fr":"1fr 1fr",horizontalSpacing:2,verticalSpacing:2,children:[(0,r.jsx)(i.$,{fullWidth:!0,muted:!m&&"inPopup",size:"big",onClick:()=>{h({type:"login",onSuccess:c}),d?.()},children:u("Log in")}
1),(0,r.jsx)(i.$,{"data-test-id":"create_account",fullWidth:!0,muted:!!m&&"inPopup",size:"big",onClick:async()=>{h({type:"createAccount",onSuccess:c}),f("open_create_account_auth_modal_click2"),d?.()},children:u("Sign up")})]})}},91556:e=>{e.exports={image:"ActivateGiftcardError_image__H6Xhs"}},97383:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/gift-card/activate",function(){return a(37016)}])}},e=>{e.O(0,[4001,7236,2762,8288,5720,7874,4802,5599,7095,9711,9960,5711,4207,3129,1090,9329,636,6593,8792],()=>e(e.s=97383)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.