PageSourceSearch

https://prezi.com/gts/assets/SignupSuccessPage-m-FwKB3a.js

js prezi.com collected 2026-10-01 06:54:58 UTC 11,407 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2f641bea-90ec-5fec-98fa-57a4b18d8ed9")}catch(e){}}();
3import{p as n,a as p,w as oe,t as ae,x as ce}from"./chunk-6CSD65Y2-B1itBIr7.js";import{a as X,B as le,N as de}from"./urls-DPgNEeBo.js";import{a as f}from"./js.cookie-ffZRf3WA.js";import{u as B,F as K}from"./index-Bz1PfHhP.js";import{k as ue,u as M,T,b as pe,e as J,a as ge}from"./useAuthentication-CLRgDrwx.js";import{S as x}from"./segmentation-VBJzqbv9.js";import{a0 as me}from"./debug-build-DZTAeZWY.js";import{P as G}from"./PageContainer-Bypc-IIL.js";import{a as D,S,P as H,B as I,C as he}from"./Alert-D_Gp_Jj6.js";import{a as j,P as $}from"./tokenNames-BQlMYsLQ.js";import{T as fe}from"./TextField-Bc4TyHuH.js";import{af as Se,a as Ee}from"./WebJs-Bi3rN4iC.js";import{L as V,a as q}from"./stripe-q6q_FEjx.js";import{k as N,l as ee,n as xe,o as Te,r as Ce,p as we,q as te,m as be,I as ve,c as _e,d as ye}from"./getSignupRedirectUrl-DKn5YN1Y.js";import{u as Ae}from"./index-BhBU5Olk.js";import"./BasicLoader-UExmHg6E.js";import"./Footer-ozbU_O_W.js";import"./ClickableLogo-Ch87Euay.js";import"./MenuItem-CdmxN-_E.js";import"./index-CUrvO0bF.js";import"./localization-D9JJsKTg.js";import"./i18next-Dr-n2FDM.js";import"./Link-Bw0fQ46_.js";import"./mutation-BrGbbvEe.js";import"./AccordionSummary-DfMUdQxQ.js";import"./Trans-BGfVrFFv.js";import"./UserMenu-DNoIxFRk.js";import"./Protector-Colg3XkH.js";import"./setupAxiosInterceptors-BiVKNcR5.js";import"./Select-DDMseBXm.js";import"./useFormControl-CzOGADFf.js";import"./isMuiElement-By8R6WSe.js";import"./localStorageKeys-D78wDBvO.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"07582a1c079b3d2c0271fb6bcf1385f85e070f84"}}catch{}})();const Ie=ue(n.jsx("path",{d:"M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1M9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m11 15H4v-2h16zm0-5H4V8h5.08L7 10.83 8.62 12 12 7.4l3.38 4.6L17 10.83 14.92 8H20z"})),Pe=[x.EDUCATOR,x.EDUCATION,x.STUDENT,x.EDUCATION_ELEMENTARY,x.EDUCATION_MIDDLE,x.EDUCATION_HIGH,x.EDUCATION_COLLEGE,x.EDUCATION_GRADUATE,x.EDUCATION_OTHER,x.STUDENT_OTHER],Re=({onComplete:s,variant:e="basic",licenseName:i})=>{const{t:r}=M(),{palette:o}=D(),c=e==="paidTrial",d=c?r("pages.signupSuccess.defaultContent.paidTrial.trialStarted",{licenseName:i??""}):r("pages.signupSuccess.defaultContent.subtitle"),C=r(c?"pages.signupSuccess.defaultContent.paidTrial.trialFeatures":"pages.signupSuccess.defaultContent.body"),v=r(c?"pages.signupSuccess.defaultContent.paidTrial.tryNewFeatures":"pages.signupSuccess.defaultContent.getStarted");return n.jsxs(S,{alignItems:"center",spacing:2,sx:{width:"100%"},children:[n.jsx(T,{variant:"h4",fontWeight:600,textAlign:"center",color:o.common.white,children:r("pages.signupSuccess.defaultContent.congratulations")}),n.jsx(H,{elevation:0,sx:{border:1,borderColor:o.divider,borderRadius:3,p:5,width:"500px",maxWidth:"100%"},children:n.jsxs(S,{spacing:2,children:[n.jsx(T,{children:d}),n.jsx(T,{children:C}),n.jsx(I,{onClick:s,children:v})]})})]})},Le=({guestPreziOid:s})=>{const{t:e}=M(),{palette:i}=D();return n.jsxs(S,{alignItems:"center",spacing:2,sx:{width:"100%"},children:[n.jsx(T,{variant:"h4",fontWeight:600,textAlign:"center",color:i.common.white,children:e("pages.signupSuccess.mobileContent.heading")}),n.jsx(H,{elevation:0,sx:{border:1,borderColor:i.divider,borderRadius:3,p:5,width:"500px",maxWidth:"100%"},children:n.jsxs(S,{spacing:2,children:[n.jsx(T,{children:e("pages.signupSuccess.mobileContent.body")}),n.jsx(T,{variant:"body2",color:"text.secondary",children:e("pages.signupSuccess.mobileContent.warning")}),n.jsx(I,{component:"a",href:`/p/${s}/`,children:e("pages.signupSuccess.mobileContent.previewPresentation")}),n.jsx(I,{variant:"outlined",component:"a",href:"/dashboard/",children:e("pages.signupSuccess.mobileContent.goToDashboard")})]})})]})},Ne=async()=>(await J(X.get(`${le}/api/v2/gts/referrerToken`,{withCredentials:!0}))).data.referrerToken,je=()=>pe({queryKey:["referrerToken"],queryFn:Ne,staleTime:900*1e3,retry:!1}),Oe=async s=>{const e=f.get(j),i=e?`/signup/send-team-invite/?referral_token=${e}
3`:"/signup/send-team-invite/";await J(X.post(i,{emails:s},{headers:{"X-CSRFToken":f.get("csrftoken")??""}}))},Y=9,Ue=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Z=s=>Ue.test(s),L=()=>({email:"",touched:!1}),ke=({onComplete:s,promoteTeamCreationUrl:e,isReferrerPresent:i=!1})=>{const{t:r}=M(),[o,c]=p.useState([L(),L(),L()]),[d,C]=p.useState(!1),[v,g]=p.useState(!1),[m,w]=p.useState("compose"),{palette:E}=D(),l=m!=="compose",P=o.some(({email:t})=>t.length)&&o.filter(({email:t})=>t.length).every(({email:t})=>Z(t)),b=()=>o.filter(({email:t})=>t.length).map(({email:t})=>t),O=()=>[...new Set(b())];p.useEffect(()=>{const t=f.get($);if(t)try{const a=JSON.parse(t).emails;c(a.slice(0,Y).map(u=>({email:u,touched:!0}))),w("restored")}catch(a){me(a)}},[]),p.useEffect(()=>{o.every(({email:t})=>t.length)&&o.length<Y&&c(t=>[...t,L()]),o.length>3&&!o.slice(-2).some(({email:t})=>t.length)&&c(t=>t.slice(0,t.length-1)),o.length<3&&c(t=>{const a=[...t];for(;a.length<3;)a.push(L());return a})},[o]);const F=async()=>{C(!0),g(!1);const t=O();try{return await Oe(t),!0}catch{return g(!0),!1}finally{C(!1)}},z=async t=>{l&&await F(),f.remove(j),m!=="compose"&&f.remove($),s(t)},U=()=>{g(!1),w("team")},A=()=>{const t=O();f.set($,JSON.stringify({emails:t}),{expires:7});const a=Math.min(Math.max(t.length+1,2),20),[u,h]=e.split("?"),_=new URLSearchParams(h);_.set("userCount",String(a)),Se({email_count:t.length}),f.remove(j),window.location.href=`${u}?${_.toString()}`},k=(t,a)=>c(u=>u.map((h,_)=>_===t?{email:a,touched:h.touched}:h)),R=t=>c(a=>a.map((u,h)=>h===t?{email:u.email,touched:!0}:u));return n.jsxs(S,{alignItems:"center",spacing:2,sx:{width:"100%"},children:[n.jsxs(S,{alignItems:"center",spacing:1,children:[n.jsx(T,{variant:"h4",fontWeight:600,textAlign:"center",color:E.common.white,children:r(l?"pages.signupSuccess.inviteForm.headingSecondPage":"pages.signupSuccess.inviteForm.heading")}),n.jsx(T,{textAlign:"center",color:E.common.white,children:r(l?"pages.signupSuccess.inviteForm.subtitleSecondPage":"pages.signupSuccess.inviteForm.subtitle")})]}),n.jsx(H,{elevation:0,sx:{border:1,borderColor:E.divider,borderRadius:3,p:5,width:"500px",maxWidth:"100%"},children:n.jsxs(S,{spacing:2,children:[(l?o.filter(({email:t})=>t.length):o).map(({email:t,touched:a},u)=>{const h=a&&t.length>0&&!Z(t);return n.jsx(fe,{type:"email",placeholder:r("pages.signupSuccess.inviteForm.emailPlaceholder"),value:t,disabled:d||l,error:h,helperText:h?r("pages.signupSuccess.inviteForm.invalidEmail"):void 0,onChange:_=>k(u,_.target.value),onBlur:()=>R(u)},u)}),v&&n.jsx(T,{variant:"body2",color:"error",children:r("pages.signupSuccess.inviteForm.error")}),i&&n.jsxs(S,{direction:"row",spacing:1,alignItems:"center",p:1,children:[n.jsx(Ie,{fontSize:"small"}),n.jsx(T,{variant:"caption",children:r("pages.signupSuccess.inviteForm.referralMessage")})]}),l&&n.jsx(I,{disabled:d||!P,onClick:A,children:r("pages.signupSuccess.inviteForm.createATeam")}),!l&&n.jsx(I,{disabled:d||!P,onClick:U,children:r("pages.signupSuccess.inviteForm.inviteToPrezi")})]})}),n.jsx(I,{onClick:t=>{z(t)},children:d?n.jsx(he,{size:24}):r(l?"pages.signupSuccess.inviteForm.makeATeamLater":"pages.signupSuccess.inviteForm.skipArrow")})]})},ne=new Set(["next","embedded","csrfmiddlewaretoken"]),Me=(s,e)=>{try{new URL(s,"https://x").searchParams.forEach((i,r)=>{ne.has(r)||e.set(r,i)})}catch{}},se=(s,e)=>sessionStorage.getItem(ve)==="true"?!0:_e(s,e),De=(s,e)=>se(s,e)||N(s),Fe=(s,e,i)=>{const r=s.size>0?`?${s.toString()}`:"",o=ee(r,e),c=s.get("next");let d=c?Ce(c,o):De(s,i)?o?we():te():"/dashboard/";try{const g=new URL(d,"https://x"),m=g.searchParams.get("after_segmentation_url");if(m){g.searchParams.delete("after_segmentation_url"),Me(m,g.searchParams);const w=d.indexOf("#"),E=w>=0?d.slice(w):"";d=g.pathname+g.search+E}}catch{}const C=new URLSearchParams;s.forEach((g,m)=>{ne.has(m)||C.set(m,g)});const v=C.toString();return v?be(d,`?${v}`):d},re=()=>window.location.search.includes("embedded=1"),ze=s=>{try{const e=new URL(s,window.location.origin);if(!e.searchParams.has("copy-presentation")||e.searchParams.has("csrfmiddlewaretoken"))return s;const i=f.get("csrftoken");
3return i?(e.searchParams.set("csrfmiddlewaretoken",i),e.pathname+e.search):s}catch{return s}},We=s=>{const i=!!s&&Pe.includes(s)?q.EDU_TEAMS:q.TEAMS;return`/gts${de.TEAM_BUY_NOW}?category=${i}`},Q=s=>e=>{ye(),re()&&window.parent&&!(e.ctrlKey||e.metaKey)?(window.parent.postMessage({type:"EMBEDDED_PREZI_WINDOW_MESSAGE",navigateToUrl:s},window.location.origin),e.preventDefault()):window.location.href=s},Ge=()=>{const{t:s}=M(),[e]=ae(),{pathname:i}=ce(),r=D(),o=Ae(r.breakpoints.down("tablet")),{data:c}=je(),d=!!c,{user:C,isLoading:v}=ge(),g=We(C?.occupation),{shouldRender:m,isLoading:w}=B(K.NEW_STACK_INVITE_TEAM),{shouldRender:E,isLoading:l}=B(K.CRAFT_AI_MASTER),P=p.useMemo(()=>{if(N(e))return!0;if(l)return!1;const y=e.size>0?`?${e.toString()}`:"";return ee(y,E)},[l,E,e]),b=p.useMemo(()=>{const y=N(e);return l&&!y?"":ze(Fe(e,E,i))},[l,E,i,e]),O=!!f.get("is_coming_from_ai_prompt_google_one_tap"),F=b.includes("/p/create-prezi/"),z=P&&se(e,i)&&!e.get("next"),U=o&&!e.get("next"),[A]=p.useState(xe),k=!!A&&!o,R=!!A&&o,t=e.get("license_category"),a=t&&t in V?t:void 0,u=e.get("trial_days"),h=!!a&&!!u&&Number(u)>0,_=a?s(V[a]):void 0,W=O||F||z||U||k||h,ie=()=>U&&!P?te("?trigger=home-page"):k?`/p/edit/${A}/`:b;if(p.useEffect(()=>{new URLSearchParams(window.location.search).get("org_id")&&Ee?.({buy_now_page:"SUCCESS"})},[]),p.useEffect(()=>{!w&&(N(e)||!l)&&b&&!m&&!W&&!R&&(re()&&window.parent?window.parent.postMessage({type:"EMBEDDED_PREZI_WINDOW_MESSAGE",navigateToUrl:b},window.location.origin):window.location.href=b)},[w,l,m,W,R,b,e]),p.useEffect(()=>{c&&f.set(j,c)},[c]),p.useEffect(()=>{f.get("open_prezi")&&Te()},[]),p.useEffect(()=>{const y=()=>f.remove(j);return window.addEventListener("beforeunload",y),()=>window.removeEventListener("beforeunload",y)},[]),w||l&&!N(e))return null;if(R)return n.jsx(G,{authRedirect:"/login",authRedirectToOldStack:!0,children:n.jsx(S,{alignItems:"center",maxWidth:700,width:"100%",py:3,pb:8,children:n.jsx(Le,{guestPreziOid:A})})});if(W){const y=ie();return n.jsx(G,{authRedirect:"/login",authRedirectToOldStack:!0,children:n.jsx(S,{alignItems:"center",maxWidth:700,width:"100%",py:3,pb:8,children:n.jsx(Re,{onComplete:Q(y),variant:h?"paidTrial":"basic",licenseName:_})})})}return!m||v?null:n.jsx(G,{authRedirect:"/login",authRedirectToOldStack:!0,children:n.jsx(S,{alignItems:"center",maxWidth:700,width:"100%",py:3,pb:8,children:n.jsx(ke,{onComplete:Q(b),promoteTeamCreationUrl:g,isReferrerPresent:d})})})},wt=oe(Ge);export{wt as default};
4
5//# debugId=2f641bea-90ec-5fec-98fa-57a4b18d8ed9

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.