PageSourceSearch

https://murf.ai/static/js/495.12a5516c.chunk.js

js murf.ai collected 2026-10-01 08:33:43 UTC 15,931 bytes, 5 lines download raw bytes

1"use strict";
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]="d57a07a1-7f76-5018-a4d6-25d828e663df")}catch(e){}}();
3(self.webpackChunkmurf_web=self.webpackChunkmurf_web||[]).push([[495],{80495:(e,o,n)=>{n.d(o,{z_:()=>A,bf:()=>U,eC:()=>R,Ay:()=>T});var i=n(65043),l=n(14556),t=n(37939),a=n(69864),r=n(49019),s=n(96679),d=n(93076),u=n(29313),c=n(52777),v=n(91688),S=n(38846),I=n(36664),N=n(52348),p=n(10881),E=n(52271),g=n(48088),G=n(95737),O=n(32943),m=n(57546),_=n(79358);const h=["nestle"];var L=n(3090),f=n(98694);const A={LOGIN:"LOGIN",CREATE_ACCOUNT:"CREATE_ACCOUNT",RESET_PASSWORD:"RESET_PASSWORD",SIGN_IN_WITH_SSO:"SIGN_IN_WITH_SSO"},U={LOGIN:"login",CREATE_ACCOUNT:"createAccount",RESET_PASSWORD:"resetPassword",SIGN_IN_WITH_SSO:"signInWithSSO"},P={EMAIL_LOGIN:"EMAIL_LOGIN",EMAIL_SIGNUP:"EMAIL_SIGNUP",FB_LOGIN:"FB_LOGIN",FB_SIGNUP:"FB_SIGNUP",GOGL_LOGIN:"GOGL_LOGIN",GOGL_SIGNUP:"GOGL_SIGNUP",LNKDN_LOGIN:"LNKDN_LOGIN",LNKDN_SIGNUP:"LNKDN_SIGNUP",SSO_LOGIN:"SSO_LOGIN",SSO_SIGNUP:"SSO_SIGNUP",MICROSOFT_LOGIN:"MICROSOFT_LOGIN",SLACK_LOGIN:"SLACK_LOGIN"},R={EMAIL_LOGIN:"E-mail",EMAIL_SIGNUP:"E-mail",FB_LOGIN:"Facebook",FB_SIGNUP:"Facebook",GOGL_LOGIN:"Google",GOGL_SIGNUP:"Google",LNKDN_LOGIN:"LinkedIn",LNKDN_SIGNUP:"LinkedIn",SSO_LOGIN:"SSO",SSO_SIGNUP:"SSO",SLACK_LOGIN:"Slack",SLACK_SIGNUP:"Slack",MICROSOFT_LOGIN:"Microsoft",MICROSOFT_SIGNUP:"Microsoft"},y=(e,o)=>{const{EVENT_PARAMS:n}=a._w;r.ANALYTICS.getGA4Data().then((i=>{const{sessionId:l,clientId:t}=i;_.JM.recordSignupEnrichment({authUser:e,body:{email:null===e||void 0===e?void 0:e.email,userId:null===e||void 0===e?void 0:e.uid,clientId:t,sessionId:l,emailType:(0,s.gPR)(null===e||void 0===e?void 0:e.email)?a.IO.BUSINESS:a.IO.PERSONAL,signupMethod:o,timeStamp:new Date}}).then((i=>{var l;(null===i||void 0===i||null===(l=i.data)||void 0===l?void 0:l.responseCode)!==d.NF.SUCCESS&&r.ReactGA.eventGA4(a._w.EVENT_NAME,{[n.EMAIL_DOMAIN]:(0,s.zNn)(null===e||void 0===e?void 0:e.email),[n.EMAIL_TYPE]:(0,s.gPR)(null===e||void 0===e?void 0:e.email)?a.IO.BUSINESS:a.IO.PERSONAL,[n.SIGNUP_METHOD]:o,[n.TIMESTAMP]:new Date})})).catch((i=>{r.ReactGA.eventGA4(a._w.EVENT_NAME,{[n.EMAIL_DOMAIN]:(0,s.zNn)(null===e||void 0===e?void 0:e.email),[n.EMAIL_TYPE]:(0,s.gPR)(null===e||void 0===e?void 0:e.email)?a.IO.BUSINESS:a.IO.PERSONAL,[n.SIGNUP_METHOD]:o,[n.TIMESTAMP]:new Date})}))}))},C=(e,o,n,i,l)=>{var t;let a=null!==(t=JSON.parse(localStorage.getItem(s.wIh)))&&void 0!==t?t:{};const r=!!localStorage.getItem(d.BD.USER_STATE);(0,L.w)(e,o);const{EMAIL_SIGNUP:u,FB_SIGNUP:c,GOGL_SIGNUP:v,LNKDN_SIGNUP:S,MICROSOFT_LOGIN:I,SLACK_LOGIN:N}=P;if([u,c,v,S,I,N].includes(n)){var p,E,g,G;const o={};r&&(o.source="canva",o.medium="app store"),(0,s.ENR)(d.No.SIGN_UP_SUCCESS,{"Sign Up Method":R[n]||"unavailable","One Tap":!1,Invited:!(null===a||void 0===a||!a.inviteLink),...o},(()=>{}),!0),(0,s.sxq)(d.No.SIGN_UP_SUCCESS,{"Sign Up Method":R[n]||"unavailable","One Tap":!1,Invited:!(null===a||void 0===a||!a.inviteLink),...o}),(0,f.$)({authUser:null!==e&&void 0!==e?e:null===l||void 0===l?void 0:l.user,userId:null!==(p=null===e||void 0===e?void 0:e.uid)&&void 0!==p?p:null===l||void 0===l||null===(E=l.user)||void 0===E?void 0:E.uid,workspaceId:i,actionCategory:d.Hq.SIGNUP,actionType:d.Og.SIGNUP_SUCCESS,description:"Successfully signedup from IP"}),null===(g=(G=window).lintrk)||void 0===g||g.call(G,"track",{conversion_id:d.YM.LINKEDIN_INSIGHT_TAG.SIGNUP_SUCCESS})}},T=e=>{var o;let{setFirebaseActionStatus:n,newsLetterCheckbox:a,setLoginErrorMessage:L}=e;const A=(0,l.wA)(),U=(0,i.useContext)(t.ZJ),T=(0,v.useHistory)(),w=(0,v.useLocation)(),{query:D,getAllUtmParams:M}=(0,m.A)(),k=D.get("source"),b=M(),F=(0,i.useContext)(t.l7),{from:B}=w.state||{from:void 0},W=(0,l.d4)((e=>e.userState)),J=null!==(o=JSON.parse(localStorage.getItem(s.wIh)))&&void 0!==o?o:void 0,K=!!(0,O.qg)(d.BD.USER_STATE),H=(0,i.useRef)(!1),$=(0,i.useRef)(!1),x=(0,i.useRef)(!1),z=function(e,o){var n;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"BUSINESS"===o&&e&&e!==d.hs.DONE&&!(null!==(n=[P.SSO_LOGIN,P.SSO_SIGNUP])&&void 0!==n&&n.includes(i))},q=(0,i.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const o=(0,s.$TG)(k);if(J)T.push(J.inviteLink);else if(window.mobileCheck())if(null!==e&&void 0!==e&&e.signedUpFromMobile){if(z(null===e||void 0===e?void 0:e.icpFlow,null===e||void 0===e?void 0:e.emailType))return T.replace(`/user/onboarding?${b}`);T.push("/user/select-workspace")}else(0,s.HlG)();
3else{if(o===d.CN.WINDOWS_PLUGIN||o===d.CN.PPT_PLUGIN)return;if(console.log(`redirect called with ${B}`),z(null===e||void 0===e?void 0:e.icpFlow,null===e||void 0===e?void 0:e.emailType))return T.replace(`/user/onboarding?${b}`);if(B&&w.pathname!==B){var n;let[e,o]=B.split("?");null!==e&&void 0!==e&&e.startsWith("/studio/pronunciation-library")&&(o="");let i=new URLSearchParams(b||"");if(null!==(n=o)&&void 0!==n&&n.length){const e=new URLSearchParams(o);for(const[o,n]of e.entries())i.set(o,n)}return void(window.location.href=`${e}${i.size?"?"+i.toString():""}`)}T.replace(`/studio?${b}`)}}),[T,B,J,w.pathname,k,null===F||void 0===F?void 0:F.emailVerified]),Q=async e=>{let{promptType:o,firebaseResult:n}=e;const i=U.getAdditionalUserInfo(n),l=(0,s.$TG)(k);if(i.isNewUser)a||c.r.updateEmailPrefs(n.user,{unsubscribed:!0}),A((0,u.p4)({authUser:n.user})).then((e=>{C(F,e.payload.user,o,e.payload.activeWorkspaceId,n),y(n.user,o)})).catch((e=>{W.createdAt?(C(F,W,o,W.activeWorkspaceId,n),y(n.user,o)):(0,s.ENR)(d.No.USER_STATE_FAILURE,{uid:n.user.uid})})),A((0,u.t0)({authUser:n.user})).then((e=>{var n,i,l,t,a,r,d,u,c,v,S,I;(0,s.WHo)("user_signup",{category:"user",action:"signup",label:"user_signup",value:1,employeeSize:null!==(n=null===e||void 0===e||null===(i=e.payload)||void 0===i?void 0:i.employeeSize)&&void 0!==n?n:"unknown",companyName:null!==(l=null===e||void 0===e||null===(t=e.payload)||void 0===t?void 0:t.companyName)&&void 0!==l?l:"unknown",emailType:null!==(a=null===e||void 0===e||null===(r=e.payload)||void 0===r?void 0:r.emailType)&&void 0!==a?a:"unknown",country:null!==(d=null===e||void 0===e||null===(u=e.payload)||void 0===u?void 0:u.country)&&void 0!==d?d:"unknown",isEducational:null!==(c=null===e||void 0===e||null===(v=e.payload)||void 0===v?void 0:v.isEducational)&&void 0!==c?c:"unknown"}),z(null===e||void 0===e||null===(S=e.payload)||void 0===S?void 0:S.icpFlow,null===e||void 0===e||null===(I=e.payload)||void 0===I?void 0:I.emailType,o)&&($.current=!0)})).catch((()=>{$.current=!1})).finally((()=>{((e,o,n,i)=>{if(e)T.push(e.inviteLink);else if(o)T.replace("/studio/canva-connect");else if(new URLSearchParams(window.location.search).get("prepare_id")){const e=new URLSearchParams(window.location.search);T.replace(`/studio/oauth/consent?${e.toString()}`)}else{if(n===d.CN.WINDOWS_PLUGIN||n===d.CN.PPT_PLUGIN)return;i?T.push(`/user/icp-info?${b}`):T.push(`/studio?${b}`)}})(J,K,l,$.current)}));else{const e={};K&&(e.source="canva",e.medium="app store"),(0,s.ENR)(d.No.LOGIN_SUCCESS,{"Sign In Method":R[o],"One Tap":!1,Invited:!(null===J||void 0===J||!J.inviteLink),...e},(()=>{}),!0),Promise.allSettled([A((0,u.p4)({authUser:n.user})),A((0,u.t0)({authUser:n.user}))]).then((e=>{var o,i,l;const t="fulfilled"===e[0].status?e[0].value:{},a="fulfilled"===e[1].status?e[1].value:{},r=null===t||void 0===t||null===(o=t.payload)||void 0===o?void 0:o.activeWorkspaceId;(0,f.$)({authUser:null===n||void 0===n?void 0:n.user,userId:null===n||void 0===n||null===(i=n.user)||void 0===i?void 0:i.uid,workspaceId:r,actionCategory:d.Hq.LOGIN,actionType:d.Og.LOGIN_SUCCESS,description:"Successfully logged in from IP"}),q({...(null===t||void 0===t||null===(l=t.payload)||void 0===l?void 0:l.user)||{},...null===a||void 0===a?void 0:a.payload})}))}},V=function(e,o){x.current=!0,n("PROCESSING"),U.doSignInWithEmailAndPassword(e,o).then((e=>{A((0,u.p4)({authUser:e.user})).then((o=>{var n,i,l;r.ReactGA.setUser(null===(n=e.user)||void 0===n?void 0:n.uid);const t={};var a;(K&&(t.source="canva",t.medium="app store"),(0,s.ENR)(d.No.LOGIN_SUCCESS,{"Sign In Method":R[P.EMAIL_LOGIN],"One Tap":!1,Invited:!(null===J||void 0===J||!J.inviteLink),...t},(()=>{}),!0),(0,f.$)({authUser:null===e||void 0===e?void 0:e.user,userId:null===e||void 0===e||null===(i=e.user)||void 0===i?void 0:i.uid,workspaceId:null===o||void 0===o||null===(l=o.payload)||void 0===l?void 0:l.activeWorkspaceId,actionCategory:d.Hq.LOGIN,actionType:d.Og.LOGIN_SUCCESS,description:"Successfully logged in from IP"}),null!==J&&void 0!==J&&J.inviteLink)?T.push(null===J||void 0===J?void 0:J.inviteLink):q(null===o||void 0===o||null===(a=o.payload)||void 0===a?void 0:a.user)})).catch((e=>{console.log(e),(0,N.Qg)("Invalid credentials. If you've forgotten your password, please click on 'Forgot Password' to reset it.")})).finally((()=>{n("DONE")}))})).catch((e=>{n("DONE"),L({intent:S.J.DANGER,icon:I.ffn,message:r.FIREBASE.errorToString(e)})}))};return{googleLogin:function(){x.current=!0,n("PROCESSING"),U.doSignInWithGoogle().then((e=>{var o;r.ReactGA.setUser(null===(o=e.user)||void 0===o?void 0:o.uid),Q({promptType:P.GOGL_SIGNUP,firebaseResult:e})})).catch((e=>{n("DONE"),console.error(e),L({intent:S.J.DANGER,icon:I.ffn,message:r.FIREBASE.errorToString(e)})}))},redirect:q,fbLogin:function(){x.current=!0,n("PROCESSING"),U.doSignInWithFacebook().then((e=>{var o;r.ReactGA.setUser(null===(o=e.user)||void 0===o?void 0:o.uid),Q({promptType:P.FB_LOGIN,firebaseResult:e})})).catch((e=>{n("DONE"),L({intent:S.J.DANGER,icon:I.ffn,message:r.FIREBASE.errorToString(e)})}))},microsoftLogin:()=>{x.current=!0,n("PROCESSING"),U.doSignInWithMicrosoft().then((e=>{var o;r.ReactGA.setUser(null===(o=e.user)||void 0===o?void 0:o.uid),Q({promptType:P.MICROSOFT_LOGIN,firebaseResult:e})})).catch((e=>{n("DONE"),L({intent:S.J.DANGER,icon:I.ffn,message:r.FIREBASE.errorToString(e)})}))}
3,signInWithSSO:async e=>(x.current=!0,n("PROCESSING"),c.r.signInWithSSO(e).then((e=>{if("SUCCESS"!==e.data.responseCode)return L({intent:S.J.DANGER,icon:I.ffn,message:"SSO is not enabled for this domain"}),Promise.reject("Error");{var o,n,i;let t=!1;var l;if(null!==e&&void 0!==e&&null!==(o=e.data)&&void 0!==o&&o.extra)t=h.includes(null===e||void 0===e||null===(l=e.data)||void 0===l?void 0:l.extra.toLowerCase());if("OIDC"===(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.authType))return U.doOidcLogin(e.data.extra,t).then((e=>{var o;r.ReactGA.setUser(null===(o=e.user)||void 0===o?void 0:o.uid),Q({promptType:P.SSO_SIGNUP,firebaseResult:e})})).catch((e=>(console.error(e),L({intent:S.J.DANGER,icon:I.ffn,message:r.FIREBASE.errorToString(e)}),Promise.reject(e))));if("SAML"===(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.authType))return U.doSamlLogin(e.data.extra,t).then((e=>{var o;r.ReactGA.setUser(null===(o=e.user)||void 0===o?void 0:o.uid),Q({promptType:P.SSO_SIGNUP,firebaseResult:e})})).catch((e=>(console.error(e),L({intent:S.J.DANGER,icon:I.ffn,message:r.FIREBASE.errorToString(e)}),Promise.reject(e))));(0,N.Qg)("Something went wrong, please try again.")}})).finally((()=>n("DONE")))),resetPassword:e=>(n("PROCESSING"),c.r.resetPassword(e).then((e=>{var o,n,i;if("SUCCESS"!==(null===(o=e.data)||void 0===o?void 0:o.responseCode))return L({intent:S.J.DANGER,icon:I.ffn,message:(null===(n=e.data)||void 0===n?void 0:n.responseMessage)||"Something went wrong, please try again."}),Promise.reject(e);L({intent:S.J.SUCCESS,icon:I.Uft,message:(null===(i=e.data)||void 0===i?void 0:i.responseMessage)||"An email with instruction to reset your password has been sent. It may take a minute to reach."})})).catch((e=>{var o,n,i,l;console.error(e),L({intent:S.J.DANGER,icon:I.ffn,message:(null===e||void 0===e||null===(o=e.response)||void 0===o||null===(n=o.data)||void 0===n?void 0:n.responseMessage)||(null===e||void 0===e||null===(i=e.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.message)||"Failed to send password reset email. Please try again."})})).finally((()=>n("DONE")))),createAccount:(e,o,i)=>{x.current=!0,n("PROCESSING"),c.r.validateEmail(e,void 0).then((i=>{var l,t,v;return A(p.b_.actions.updateBouncerData({bouncerStatus:i.data.bouncerStatus,reason:i.data.reason,domainProvider:i.data.domainProvider})),"SUCCESS"===i.data.responseCode?(H.current=!0,x.current=!0,U.doCreateUserWithEmailAndPassword(e,o).then((e=>{A((0,u.p4)({authUser:e.user})).then((o=>{a||c.r.updateEmailPrefs(e.user,{unsubscribed:!0}),c.r.sendVerificationEmail(e.user).then((()=>{var n,i;H.current=!1,x.current=!1,C(F,W,P.EMAIL_SIGNUP,o.payload.activeWorkspaceId,e),y(e.user,P.EMAIL_SIGNUP),A((0,u.t0)({authUser:e.user})).then((e=>{var o,n,i,l,t,a,r,d,u,c;(0,s.WHo)("user_signup",{category:"user",action:"signup",label:"user_signup",value:1,employeeSize:null!==(o=null===e||void 0===e||null===(n=e.payload)||void 0===n?void 0:n.employeeSize)&&void 0!==o?o:"unknown",companyName:null!==(i=null===e||void 0===e||null===(l=e.payload)||void 0===l?void 0:l.companyName)&&void 0!==i?i:"unknown",emailType:null!==(t=null===e||void 0===e||null===(a=e.payload)||void 0===a?void 0:a.emailType)&&void 0!==t?t:"unknown",country:null!==(r=null===e||void 0===e||null===(d=e.payload)||void 0===d?void 0:d.country)&&void 0!==r?r:"unknown",isEducational:null!==(u=null===e||void 0===e||null===(c=e.payload)||void 0===c?void 0:c.isEducational)&&void 0!==u?u:"unknown"})})),r.ReactGA.setUser(null===(n=e.user)||void 0===n?void 0:n.uid),(0,N.Te)(`Verification link sent to ${null===e||void 0===e||null===(i=e.user)||void 0===i?void 0:i.email}`)})).catch((e=>{(0,N.Qg)("Failed to send verification email, try again."),console.log("email fail",e)})).finally((()=>{var e;n("DONE"),null!==(e=(0,O.qg)(d.BD.USER_TOKEN))&&void 0!==e&&e.length||T.push("/user/onboarding")}))})).catch((e=>{console.log("dispatch",e),n("DONE"),L({intent:S.J.DANGER,icon:I.ffn,message:"Failed fetching User data, please try again."})}))})).catch((i=>{var l;n("DONE"),i.code===(null===r.FIREBASE||void 0===r.FIREBASE||null===(l=r.FIREBASE.AuthErrorCodes)||void 0===l?void 0:l.EMAIL_EXISTS)?V(e,o):L({intent:S.J.DANGER,icon:I.ffn,message:r.FIREBASE.errorToString(i)})})).finally((()=>{H.current=!1,x.current=!1}))):[...Object.keys(g.M)].includes(null===i||void 0===i||null===(l=i.data)||void 0===l?void 0:l.responseCode)?(n("DONE"),L({intent:S.J.DANGER,icon:I.ffn,message:null===i||void 0===i||null===(t=i.data)||void 0===t||null===(v=t.responseMessage)||void 0===v?void 0:v.replace(/EMAIL/g,e)}),Promise.resolve()):void(0,N.Qg)("Something went wrong, please contact support.")})).catch((e=>{var o,i,l;n("DONE"),L({intent:S.J.DANGER,icon:I.ffn,message:401===(null===e||void 0===e||null===(o=e.response)||void 0===o?void 0:o.status)?null===e||void 0===e||null===(i=e.response)||void 0===i||null===(l=i.data)||void 0===l?void 0:l.message:"Failed to validate your email. Contact [email protected] for help."})}))},passwordLogin:V,slackLogin:()=>{x.current=!0,U.doSignInWithSlack().then((e=>{var o;r.ReactGA.setUser(null===(o=e.user)||void 0===o?void 0:o.uid),Q({promptType:P.SLACK_LOGIN,firebaseResult:e})})).catch((e=>{n("DONE"),console.error(e),(0,N.Qg)("Something went wrong signing you in."),L({intent:S.J.DANGER,icon:I.ffn,message:r.FIREBASE.errorToString(e)})}))},isNewUser:H.current,cancelAuthPageRedirect:x.current,logoutUser:async()=>
3{if(!U)return null;try{return await _.JM.recordLogout(F),localStorage.removeItem(d.iE.HUBSPOT_CHAT_TOKEN),localStorage.removeItem(G.i),U.doSignOut().then((()=>{r.ReactGA.setUser(void 0),A(p.b_.actions.logout()),A(p.s2.actions.logout()),A(p.hd.actions.logout()),A(E.A.actions.logout())}))}catch(e){return(0,N.Qg)("Something went wrong"),null}}}}}}]);
4//# sourceMappingURL=495.12a5516c.chunk.js.map
5//# debugId=d57a07a1-7f76-5018-a4d6-25d828e663df

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.