1"use strict";(self.webpackChunkcom_komoot=self.webpackChunkcom_komoot||[]).push([["12778"],{75420:function(e,t,i){i.r(t),i.d(t,{IconCompass:function(){return l}});var r=i(62887),n=i(3865),a=i(54381);const l=({...e})=>{const t=(0,r.Z)(e);return(0,a.jsxs)(n.x,{"aria-hidden":"true",role:"presentation",as:"svg",width:"1em",height:"1em",viewBox:"0 0 74 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,a.jsx)("path",{d:"M59.2834 13.3149L46.9532 18.521L49.5179 21.0857L51.5126 23.0804L54.0773 25.6451L59.2834 13.3149Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M14.0902 59.2834L26.4204 54.0773L23.8557 51.5126L21.861 49.5179L19.2963 46.9532L14.0902 59.2834Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M14.0902 13.3149L26.4204 18.521L23.8557 21.0857L21.861 23.0804L19.2963 25.6451L14.0902 13.3149Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M59.2834 59.2834L46.9532 54.0773L49.5179 51.5126L51.5126 49.5179L54.0773 46.9532L59.2834 59.2834Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M45.8574 28.1426L68 37L45.8564 45.8564L37 68L28.1426 45.8574L6 37L28.1436 28.1416L37.001 6L45.8574 28.1426Z",fill:"currentColor"})]})}},50298:function(e,t,i){i.r(t),i.d(t,{IconHalfSun:function(){return l}});var r=i(62887),n=i(3865),a=i(54381);const l=({...e})=>{const t=(0,r.Z)(e);return(0,a.jsx)(n.x,{"aria-hidden":"true",role:"presentation",as:"svg",width:"1em",height:"1em",viewBox:"0 0 74 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,a.jsx)("path",{d:"M39.8984 20.7363V39.1748L48.9873 23.4336L49.1191 23.2051L49.3467 23.3369L53.915 25.9736L54.1426 26.1055L54.0107 26.334L44.9219 42.0762L60.666 32.9883L60.8936 32.8564L61.0254 33.085L63.6631 37.6523L63.7949 37.8809L63.5664 38.0127L47.8242 47.1006H66.2637V52.8994H7.73633V47.1006H26.1758L10.4336 38.0098L10.2051 37.8779L10.3369 37.6494L12.9746 33.082L13.1064 32.8535L13.334 32.9854L29.0771 42.0732L19.9893 26.3311L19.8574 26.1035L20.085 25.9717L24.6533 23.334L24.8809 23.2021L25.0127 23.4307L34.1006 39.1719L34.0986 21V20.7363H39.8984Z",fill:"currentColor"})})}},88263:function(e,t,i){i.r(t),i.d(t,{IconPeaks:function(){return l}});var r=i(62887),n=i(3865),a=i(54381);const l=({...e})=>{const t=(0,r.Z)(e);return(0,a.jsx)(n.x,{"aria-hidden":"true",role:"presentation",as:"svg",width:"1em",height:"1em",viewBox:"0 0 130 130",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,a.jsx)("path",{d:"M62.3033 25.533C63.0301 24.3673 63.9065 22.4451 65.4635 23.9559C70.5217 33.2687 76.3075 42.2313 81.233 51.6141C81.2972 51.7369 81.3213 51.8796 81.3199 52.0164L86.6744 43.9676C87.2572 43.4534 88.0922 43.5023 88.6373 44.0682L123.761 104.881C123.94 106.163 122.86 106.603 121.75 106.62L102.7 106.533V106.6H93.7818L76.1119 74.6951C75.716 73.9806 74.6876 73.9807 74.2916 74.6951L66.6783 88.4422L52.9303 66.4871C52.5113 65.8179 51.5279 65.8399 51.1412 66.5281L37.6998 90.4783L28.693 106.739C22.4473 106.785 16.2096 106.781 10.0279 106.624C9.54595 106.611 8.90174 106.657 8.50058 106.628C7.38123 106.548 6.57676 106.124 6.50253 104.903L38.1939 49.3172C39.7117 47.2216 40.8319 49.2536 41.7193 50.6316C42.85 52.3899 43.6072 54.3974 44.8707 56.0662C44.8931 55.8288 45.0106 55.6164 45.1266 55.4139C50.744 45.5655 56.3308 35.1144 62.3033 25.533Z",fill:"currentColor"})})}},18013:function(e,t,i){i.r(t),i.d(t,{default:function(){return W}});var r=i(73749),n=i(47729),a=i(86436),l=i(28718),s=i(92615),c=i(3865),o=i(46285),d=i(98799),x=i(34768),h=i(89383),p=i(45368),u=i(32223),m=i(72869),g=i(10227),f=i(33640),j=i(50298),b=i(75420),v=i(88263),w=i(89281),L=i(54381);const y=()=>(0,L.jsxs)(c.x,{display:["none","block"],"aria-hidden":"true",sx:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:0,pointerEvents:"none"},children:[(0,L.jsx)(o.Ee,{src:"/images/account/new/now-turn-right.webp",width:348,loading:"eager",sizes:["15vw"],alt:"",sx:{position:"absolute",left:0,top:"8%",maxWidth:["200px","260px","320px"]}}),(0,L.jsx)(d.Ht,{alignItems:"center",gap:3,sx:{transform:"rotate(-5deg)",position:"absolute",right:"40px",top:"10%"},children:(0,L.jsx)(v.IconPeaks,{size:95,color:"iconPurpleDefault",sx:{flexShrink:0}})}),(0,L.jsxs)(c.x,{sx:{position:"absolute",bottom:"20%",left:40,transform:"rotate(-7.833deg)"},children:[(0,L.jsx)(j.IconHalfSun,{size:30,color:"iconAcidGreenDefault",sx:{dis
1play:"block"}}),(0,L.jsx)(b.IconCompass,{size:17,color:"iconAccentDefault",sx:{transform:"translate(20px, -4px) rotate(14.405deg)",display:"block"}})]}),(0,L.jsx)(o.Ee,{src:"/images/account/new/three-peaks-of-lavaredo.webp",width:355,loading:"eager",sizes:["15vw"],alt:"",sx:{position:"absolute",right:0,bottom:"18%",maxWidth:["200px","260px","320px"]}})]}),_=({children:e})=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(c.x,{sx:{position:"relative",minHeight:"100vh",backgroundColor:"surfaceFillCreamDefault",display:"flex",alignItems:"flex-start",justifyContent:"center",px:[4,5,8],py:8,pt:["10vh","12vh"],overflow:"hidden"},children:[(0,L.jsx)(y,{}),(0,L.jsx)(c.x,{sx:{position:"relative",zIndex:1,width:"100%",display:"flex",justifyContent:"center"},children:e})]}),(0,L.jsx)(w.Z,{hideColumns:!0})]}),C=({children:e})=>(0,L.jsx)(x.Z,{elevation:1,bg:"surfaceFillWhiteDefault",sx:{width:"100%",maxWidth:"520px",borderRadius:"l",p:[6,8]},children:(0,L.jsx)(d.Ht,{gap:6,alignX:"center",sx:{textAlign:"center",width:"100%"},children:e})}),k=({name:e,avatar:t,size:i=64})=>{const r=e?.charAt(0)?.toUpperCase()||"?";return(0,L.jsx)(c.x,{sx:{width:`${i}px`,height:`${i}px`,borderRadius:"rounded",backgroundColor:"surfaceFillGreySubtle",border:"1px solid",borderColor:"borderDefaultDefault",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden"},children:t?(0,L.jsx)(c.x,{as:"img",src:t.replace("{width}",""+2*i).replace("{height}",""+2*i).replace("{crop}","true"),alt:e||"",sx:{width:"100%",height:"100%",objectFit:"cover"}}):(0,L.jsx)(h.x,{sx:{variant:"textStyles.heading04medium",color:"textPrimaryDefault"},children:r})})},A=({children:e})=>(0,L.jsx)(h.x,{as:"h1",sx:{variant:"textStyles.heading02medium",color:"textPrimaryDefault",m:0},children:e}),D=({children:e})=>(0,L.jsx)(h.x,{sx:{variant:"textStyles.label02regular",color:"textSecondaryDefault",maxWidth:"440px"},children:e}),P=()=>{const{useTranslate:e}=(0,f.A)(),t=e("views/FamilyPlanAccept");return(0,L.jsx)(p.H,{label:t("tag_family_plan_invite"),backgroundColor:"surfaceFillOrangeSubtle",textColor:"textOrangeDefault"})},S=({token:e,invite:t})=>{const{useTranslate:i}=(0,f.A)(),r=i("views/FamilyPlanAccept"),n=`/signin?redirect=${encodeURIComponent(`/family-plan/accept?t=${e}`)}&skipDevicePrompt=1`;return(0,L.jsxs)(C,{children:[(0,L.jsx)(P,{}),(0,L.jsxs)(d.gq,{gap:3,alignY:"center",children:[(0,L.jsx)(k,{name:t.ownerName,avatar:t.ownerAvatar,size:56}),(0,L.jsxs)(d.Ht,{sx:{textAlign:"left"},children:[(0,L.jsx)(h.x,{sx:{variant:"textStyles.label03bold",color:"textPrimaryDefault"},children:t.ownerName}),(0,L.jsx)(h.x,{sx:{variant:"textStyles.label04regular",color:"textSecondaryDefault"},children:r("invited_you")})]})]}),(0,L.jsxs)(d.Ht,{gap:2,alignX:"center",children:[(0,L.jsx)(A,{children:r("logged_out_title")}),(0,L.jsx)(D,{children:r("logged_out_body")})]}),(0,L.jsxs)(d.Ht,{gap:3,alignX:"stretch",sx:{width:"100%"},children:[(0,L.jsx)(u.c,{href:n,size:"big",label:r("sign_in_and_accept")}),(0,L.jsxs)(h.x,{sx:{variant:"textStyles.label04regular",color:"textSecondaryDefault"},children:[r("no_account")," ",(0,L.jsx)(m.h,{href:n,sx:{color:"iconGreenDefault",fontWeight:"bold"},children:r("sign_up")})]})]})]})},H=({invite:e,onAccept:t,onDecline:i,isAccepting:r})=>{const{useTranslate:n}=(0,f.A)(),a=n("views/FamilyPlanAccept");return(0,L.jsxs)(C,{children:[(0,L.jsx)(P,{}),(0,L.jsx)(k,{name:e.ownerName,avatar:e.ownerAvatar,size:72}),(0,L.jsxs)(d.Ht,{gap:2,alignX:"center",children:[(0,L.jsx)(A,{children:e.ownerName?a("eligible_title_with_name",{name:e.ownerName}):a("eligible_title")}),(0,L.jsx)(D,{children:a("eligible_body")})]}),(0,L.jsxs)(d.gq,{gap:3,sx:{width:"100%"},children:[(0,L.jsx)(c.x,{sx:{flex:1},children:(0,L.jsx)(u.c,{variant:"ghost",size:"big",width:"100%",onClick:i,disabled:r,label:a("decline")})}),(0,L.jsx)(c.x,{sx:{flex:1},children:(0,L.jsx)(u.c,{size:"big",width:"100%",onClick:t,isLoading:r,label:a(r?"accepting":"accept_invite")})})]})]})},z=({invite:e})=>{const{useTranslate:t}=(0,f.A)(),i=t("views/FamilyPlanAccept");return(0,L.jsxs)(C,{children:[(0,L.jsxs)(d.Ht,{gap:2,alignX:"center",children:[(0,L.jsx)(A,{children:i("already_premium_title")}),(0,L.jsx)(D,{children:i("already_premium_body")})]}),(0,L.jsxs)(d.gq,{gap:3,alignY:"center",sx:{width:"100%",borderRadius:"m",border:"1px solid",borderColor:"borderDefaultDefault",p:4,textAlign:"left"},children:[(0,L.jsx)(k,{name:e?.ownerName,avatar:e?.ownerAvatar,size:40}),(0,L.jsxs)(d.Ht,{sx:{flex:1},children:[(0,L.jsx)(h.x,{sx:{variant:"textStyles.label03bold",color:"textPrimaryDefault"},children:e?.ownerName?i("invite_from_name",{name:e.ownerName}):i("already_premium_invite_label")}),(0,L.jsx)(h.x,{sx:{variant:"textStyles.label04regular",color:"textSecondary
1Default"},children:i("already_premium_invite_sub")})]})]}),(0,L.jsx)(d.Ht,{gap:3,alignX:"stretch",sx:{width:"100%",maxWidth:"280px"},children:(0,L.jsx)(u.c,{size:"big",href:"/",label:i("got_it")})})]})},I=({ownerName:e})=>{const{useTranslate:t}=(0,f.A)(),i=t("views/FamilyPlanAccept");return(0,L.jsxs)(C,{children:[(0,L.jsx)(c.x,{as:"img",src:"/images/invite/illustration-success.png",alt:"",sx:{width:"200px",maxWidth:"100%",height:"auto"}}),(0,L.jsx)(p.H,{label:i("premium_family_badge"),backgroundColor:"badgePremiumDefault",textColor:"surfaceFillWhiteDefault"}),(0,L.jsxs)(d.Ht,{gap:2,alignX:"center",children:[(0,L.jsx)(A,{children:i("accepted_title")}),(0,L.jsx)(D,{children:e?i("accepted_body_with_name",{name:e}):i("accepted_body")})]}),(0,L.jsxs)(d.Ht,{gap:3,alignX:"stretch",sx:{width:"100%",maxWidth:"280px"},children:[(0,L.jsx)(u.c,{size:"big",href:"/",label:i("start_exploring")}),(0,L.jsx)(u.c,{variant:"ghost",size:"big",href:"/premium",label:i("discover_premium")})]})]})},F=()=>{const{useTranslate:e}=(0,f.A)(),t=e("views/FamilyPlanAccept");return(0,L.jsxs)(C,{children:[(0,L.jsx)(A,{children:t("declined_title")}),(0,L.jsx)(D,{children:t("declined_body")}),(0,L.jsxs)(d.Ht,{gap:3,alignX:"stretch",sx:{width:"100%",maxWidth:"280px"},children:[(0,L.jsx)(u.c,{size:"big",href:"/",label:t("back_to_komoot")}),(0,L.jsx)(u.c,{variant:"ghost",size:"big",href:"/premium",label:t("discover_premium")})]})]})},N=()=>{const{useTranslate:e}=(0,f.A)(),t=e("views/FamilyPlanAccept");return(0,L.jsxs)(C,{children:[(0,L.jsx)(A,{children:t("expired_title")}),(0,L.jsx)(D,{children:t("expired_body")}),(0,L.jsx)(u.c,{variant:"ghost",size:"big",href:"/",label:t("back_to_komoot")})]})};var Z=({token:e})=>{const t=(0,l.Ye)(),i=(0,s.Sm)(),[c,o]=(0,r.useState)(null),[d,x]=(0,r.useState)(!0),[h,p]=(0,r.useState)(),[u,m]=(0,r.useState)(null),f=(0,r.useRef)(!1),j=(0,r.useRef)(!1);(0,r.useEffect)((()=>{e?n.mA.get("/v007/family-plan/validate-invite",{params:{t:e}}).then((e=>{o(e.data),e.data.ownerName&&p(e.data.ownerName)})).catch((e=>{a.kg.error({code:"family-plan-validate",error:e}),o({valid:!1})})).finally((()=>x(!1))):x(!1)}),[e]);const b=c?.familyId;(0,r.useEffect)((()=>{d||!c||j.current||(j.current=!0,i.trackUserAction(s.ff.familyPlanAcceptDisplayed(h,t.isLoggedIn,b)))}),[d,c,h,t.isLoggedIn,i,b]);const v=(0,r.useCallback)((async()=>{if(!f.current){f.current=!0,m("accepting"),i.trackUserAction(s.ff.familyPlanAcceptClicked(h,b));try{const t=await n.mA.post("/v007/family-plan/accept",{token:e});p(t.data.ownerName),m("accepted"),i.trackUserAction(s.ff.familyPlanAcceptSucceeded(t.data.ownerName,t.data.familyId??b,t.data.inviteId))}catch(t){const r=t?.response?.status;if(401===r)return void(window.location.href=`/signin?redirect=${encodeURIComponent(`/family-plan/accept?t=${e}`)}&skipDevicePrompt=1`);409===r?(i.trackUserAction(s.ff.familyPlanAcceptFailed(h,"already_premium",b)),m(null)):(a.kg.error({code:"family-plan-accept",error:t}),i.trackUserAction(s.ff.familyPlanAcceptFailed(h,r?`http_${r}`:"unknown",b)),m("expired"))}finally{f.current=!1}}}),[e,h,i,b]),w=(0,r.useCallback)((()=>{i.trackUserAction(s.ff.familyPlanAcceptDeclined(h,b)),m("declined")}),[h,i,b]);return d?(0,L.jsx)(_,{children:(0,L.jsx)(g.T,{size:9})}):"accepted"===u?(0,L.jsx)(_,{children:(0,L.jsx)(I,{ownerName:h})}):"declined"===u?(0,L.jsx)(_,{children:(0,L.jsx)(F,{})}):"expired"===u?(0,L.jsx)(_,{children:(0,L.jsx)(N,{})}):e&&c?.valid?t.isLoggedIn?t.hasPremium&&"accepting"!==u?(0,L.jsx)(_,{children:(0,L.jsx)(z,{invite:c})}):(0,L.jsx)(_,{children:(0,L.jsx)(H,{invite:c,onAccept:v,onDecline:w,isAccepting:"accepting"===u})}):(0,L.jsx)(_,{children:(0,L.jsx)(S,{token:e,invite:c})}):(0,L.jsx)(_,{children:(0,L.jsx)(N,{})})};function W(e,t){e.react.setPage(Z,e.props),t()}}}]);
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.