1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9613],{62023:function(e,t,r){"use strict";r.d(t,{Z:function(){return Z}});var n=r(63366),a=r(87462),i=r(67294),s=r(86010),o=r(94780),l=r(90948),d=r(71657),c=r(1588),u=r(34867);function x(e){return(0,u.Z)("MuiCardActions",e)}(0,c.Z)("MuiCardActions",["root","spacing"]);var p=r(85893);let m=["disableSpacing","className"],f=e=>{let{classes:t,disableSpacing:r}=e;return(0,o.Z)({root:["root",!r&&"spacing"]},x,t)},h=(0,l.ZP)("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})(({ownerState:e})=>(0,a.Z)({display:"flex",alignItems:"center",padding:8},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})),g=i.forwardRef(function(e,t){let r=(0,d.Z)({props:e,name:"MuiCardActions"}),{disableSpacing:i=!1,className:o}=r,l=(0,n.Z)(r,m),c=(0,a.Z)({},r,{disableSpacing:i}),u=f(c);return(0,p.jsx)(h,(0,a.Z)({className:(0,s.Z)(u.root,o),ownerState:c,ref:t},l))});var Z=g},78445:function(e,t,r){"use strict";r.d(t,{Z:function(){return S}});var n=r(63366),a=r(87462),i=r(67294),s=r(86010),o=r(94780),l=r(15861),d=r(71657),c=r(90948),u=r(1588),x=r(34867);function p(e){return(0,x.Z)("MuiCardHeader",e)}let m=(0,u.Z)("MuiCardHeader",["root","avatar","action","content","title","subheader"]);var f=r(85893);let h=["action","avatar","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"],g=e=>{let{classes:t}=e;return(0,o.Z)({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},p,t)},Z=(0,c.ZP)("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>(0,a.Z)({[`& .${m.title}`]:t.title,[`& .${m.subheader}`]:t.subheader},t.root)})({display:"flex",alignItems:"center",padding:16}),v=(0,c.ZP)("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),j=(0,c.ZP)("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),b=(0,c.ZP)("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto"}),y=i.forwardRef(function(e,t){let r=(0,d.Z)({props:e,name:"MuiCardHeader"}),{action:i,avatar:o,className:c,component:u="div",disableTypography:x=!1,subheader:p,subheaderTypographyProps:m,title:y,titleTypographyProps:S}=r,I=(0,n.Z)(r,h),C=(0,a.Z)({},r,{component:u,disableTypography:x}),k=g(C),w=y;null==w||w.type===l.Z||x||(w=(0,f.jsx)(l.Z,(0,a.Z)({variant:o?"body2":"h5",className:k.title,component:"span",display:"block"},S,{children:w})));let R=p;return null==R||R.type===l.Z||x||(R=(0,f.jsx)(l.Z,(0,a.Z)({variant:o?"body2":"body1",className:k.subheader,color:"text.secondary",component:"span",display:"block"},m,{children:R}))),(0,f.jsxs)(Z,(0,a.Z)({className:(0,s.Z)(k.root,c),as:u,ref:t,ownerState:C},I,{children:[o&&(0,f.jsx)(v,{className:k.avatar,ownerState:C,children:o}),(0,f.jsxs)(b,{className:k.content,ownerState:C,children:[w,R]}),i&&(0,f.jsx)(j,{className:k.action,ownerState:C,children:i})]}))});var S=y},18987:function(e,t,r){"use strict";r.d(t,{Z:function(){return v}});var n=r(63366),a=r(87462),i=r(67294),s=r(86010),o=r(94780),l=r(59773),d=r(90948),c=r(71657),u=r(1588),x=r(34867);function p(e){return(0,x.Z)("MuiListItemAvatar",e)}
1(0,u.Z)("MuiListItemAvatar",["root","alignItemsFlexStart"]);var m=r(85893);let f=["className"],h=e=>{let{alignItems:t,classes:r}=e;return(0,o.Z)({root:["root","flex-start"===t&&"alignItemsFlexStart"]},p,r)},g=(0,d.ZP)("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})(({ownerState:e})=>(0,a.Z)({minWidth:56,flexShrink:0},"flex-start"===e.alignItems&&{marginTop:8})),Z=i.forwardRef(function(e,t){let r=(0,c.Z)({props:e,name:"MuiListItemAvatar"}),{className:o}=r,d=(0,n.Z)(r,f),u=i.useContext(l.Z),x=(0,a.Z)({},r,{alignItems:u.alignItems}),p=h(x);return(0,m.jsx)(g,(0,a.Z)({className:(0,s.Z)(p.root,o),ownerState:x,ref:t},d))});var v=Z},39482:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/subscription/success",function(){return r(74300)}])},41176:function(e,t){"use strict";t.Z={src:"/_next/static/media/SuccessImage.e15c69d3.svg",height:248,width:396,blurWidth:0,blurHeight:0}},74300:function(e,t,r){"use strict";r.r(t);var n=r(85893),a=r(2734),i=r(98396),s=r(99226),o=r(66242),l=r(78445),d=r(15861),c=r(44267),u=r(67294),x=r(67340),p=r(11163),m=r(67218),f=r(7631),h=r(51049),g=r(45013),Z=r(25675),v=r.n(Z),j=r(41176),b=r(10575),y=r(28615);let S=()=>{let e=(0,p.useRouter)(),{refreshSubscription:t}=(0,m.a)(),r=e.query.productId,a=e.query.sessionId,i=Number(e.query.currentPeriodEnd);return(u.useEffect(()=>()=>{t()},[]),a)?(0,n.jsx)(I,{sessionId:a}):r?(0,n.jsx)(C,{productId:r,currentPeriodEnd:i}):e.back()},I=e=>{var t;let{sessionId:r}=e,x=(0,f.m)(),g=(0,p.useRouter)(),{user:Z}=(0,m.a)(),[y,S]=u.useState(),I=(0,a.Z)(),C=(0,i.Z)(I.breakpoints.up("md"),{defaultMatches:!0});return u.useEffect(()=>{let e=async()=>{if(r)try{let t=await x.stripe.stripeSessionDetail(r);if(!t.ok){var e;throw Error(null===(e=t.error)||void 0===e?void 0:e.detail)}S(t.data)}catch(e){console.error({err:e})}};e()},[r,x.stripe]),(0,n.jsx)(s.Z,{height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:(0,n.jsxs)(s.Z,{maxWidth:C?"1120px":"100%",marginBottom:4,marginTop:C?20:12,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",id:"HEJ",children:[(0,n.jsx)(v(),{src:b.Z,alt:"StudyCafe Logo"}),(0,n.jsx)(s.Z,{maxWidth:"100%",sx:{},children:(0,n.jsxs)(o.Z,{sx:{padding:20,background:"transparent",boxShadow:"none",display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,n.jsx)(l.Z,{title:(0,n.jsx)(d.Z,{sx:{fontSize:"32px",fontWeight:"800",textAlign:"center"},children:"Grattis!"}),sx:{textTransform:"none"}}),(0,n.jsx)(d.Z,{variant:"body1",sx:{textAlign:"center",fontSize:"32px",fontWeight:"500",maxWidth:"470px"},children:"Ditt konto \xe4r nu klart och du kan b\xf6rja studera."}),(0,n.jsx)(v(),{src:j.Z,alt:"StudyCafe success images"}),(0,n.jsxs)(c.Z,{children:[y&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.Z,{children:["Kvittot skickas till ",null===(t=y.customerDetails)||void 0===t?void 0:t.email]}),(0,n.jsxs)(s.Z,{children:["Total: ",(y.amountTotal/100).toFixed(2)," sek"]}),(0,n.jsxs)(s.Z,{children:["Referens: ",y.invoiceId]})]}),(0,n.jsx)(h.KM,{sx:{marginTop:4,width:"350px",height:"50px",backgroundColor:I.palette.green[700],borderRadius:"10px"},onClick:()=>g.push("/dashboard"),children:"B\xf6rja studera"})]})]})})]})})},C=e=>{let{productId:t,currentPeriodEnd:r}=e,x=(0,p.useRouter)(),[m,f]=u.useState(),g=(0,a.Z)(),Z=(0,i.Z)(g.breakpoints.up("md"),{defaultMatches:!0});return(u.useEffect(()=>{let e=y.bm.find(e=>e.productId===Number(t));f(e)},[]),m)?(0,n.jsx)(s.Z,{height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:(0,n.jsxs)(s.Z,{maxWidth:Z?"1120px":"100%",marginBottom:4,marginTop:Z?20:12,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",id:"HEJ",children:[(0,n.jsx)(v(),{src:b.Z,alt:"StudyCafe Logo"}),(0,n.jsx)(s.Z,{maxWidth:"100%",sx:{},children:(0,n.jsxs)(o.Z,{sx:{padding:20,background:"transparent",boxShadow:"none",display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,n.jsx)(l.Z,{title:(0,n.jsx)(d.Z,{sx:{fontSize:"32px",fontWeight:"800",textAlign:"center"},children:r?"Din prenumeration kommer att \xe4ndras den ".concat(new Date(1e3*r).toLocaleDateString("sv-SE",{year:"numeric",month:"short",day:"numeric"})):"Din prenumeration \xe4r \xe4ndrad"}),sx:{textTransform:"none"}}),(0,n.jsx)(s.Z,{sx:{textAlign:"center",fontSize:"32px",fontWeight:"500",maxWidth:"470px"},children:(0,n.jsx)(y.pC,{title:m.title,price:m.price,description:m.description,features:m.features,isHighlighted:!1,index:1,productId:m.productId})}),(0,n.jsx)(c.Z,{children:(0,n.jsx)(h.KM,{sx:{marginTop:4,width:"350px",height:"50px",backgroundColor:g.palette.green[700],borderRadius:"10px"},onClick:()=>
1x.push("/dashboard"),children:"Forts\xe4tt studera"})})]})})]})}):null};S.getLayout=e=>(0,n.jsx)(x.Z,{children:e}),S.acl={action:g.H.Read,subject:g.D.GeneralPage},t.default=S}},function(e){e.O(0,[6886,8615,9774,2888,179],function(){return e(e.s=39482)}),_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.