PageSourceSearch

https://www.musicbed.com/assets/LoginForm-BK5kj3sE.js

js musicbed.com collected 2026-10-01 09:02:27 UTC 6,674 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]="c73cb002-f46a-5806-8fe2-5c94e59860a7")}catch(e){}}();
3import{j as t,a,n as ee}from"./query-client-Db26lpf9.js";import{r as te,a as I,i as m}from"./stores-DPZvQfR-.js";import{r as re,L as R}from"./chunk-62JRHF6Z-DtXrgJCW.js";import{b as oe}from"./baseForm-DkFqeBCw.js";import{r as h}from"./route-AmP_6kEa.js";import{C as P}from"./CircleLoader-Ds8Osl6b.js";import{C as ae}from"./Checkbox-CfBUwseT.js";import{s as ne,l as ie}from"./auth-CZIFUzJ4.js";import{m as se}from"./md5-Bc3ame6T.js";import{I as E}from"./Input-DIIBimYn.js";import{u as ce,a as le}from"./useAppleLogin-av01y2-4.js";import{C as me}from"./index-CoIOmlle.js";import{l as de,R as ge}from"./logger-DcaoYym_.js";import{u as ue}from"./useQuery-C6kw4oxN.js";import{u as pe}from"./setPrototypeOf-BrNA50qD.js";import{u as fe}from"./usePosthogAnalytics-BXOftGwB.js";import{g as he,i as _e}from"./googleIdentity-BtNyI9NC.js";import{g as U,s as ye,c as xe}from"./oAuthRedirect-Bb7k2RgW.js";import{F as i,L as B}from"./link-Co5YQs_9.js";import{T as _,B as Le}from"./button-BMs0znqD.js";import{S as j}from"./separator-Bd8edKFI.js";import{S as Fe}from"./stack-DnyKiET0.js";var we={name:"1r0yqr6",styles:"margin-top:10px"},be={name:"m5fsd4",styles:"margin-top:14px;text-align:center"},Ce={name:"c3m7y8",styles:"min-height:311px"},Se={name:"c3m7y8",styles:"min-height:311px"};function y(D){const{baseFormErrorCallback:d,baseFormSubmissionCallback:O,baseFormSuccessCallback:z,fieldDirties:x,fieldErrors:L,fieldValues:g,formState:q,hideLinks:F,onInputChange:u,onSuccess:w,resetPlayer:G,setModals:Q,reloadAfterQuickRegistration:M,googleButtonProps:N,appleButtonProps:H,oneTapSurface:K}=D,{user:{data:p,refetchUser:b}}=pe(),V=p.checkedAuthentication&&!p.username&&!p.email,C=ue(),S=new me,{trackRegistration:W}=fe();async function $(o){o.preventDefault(),f()}const f=async(o,n={service:"google"})=>{var c,k,v,A;O();let e;if(o)try{let r,l;l=await ne({credential:o,service:n.service,first_name:n.first_name,last_name:n.last_name}),r=l.registration;const T=await b();e=T.data;const Z=await he((c=T.data)==null?void 0:c.email);r&&(W(),de({event:ge,hashed_email:Z}))}catch(r){if(console.log({error:r}),ee(r),((v=(k=r.data)==null?void 0:k.data)==null?void 0:v.challenge)==="password_confirmation")return S.set("musicbed.challenge_token",r.data.data.challenge_token,{maxAge:60*60*1}),S.set("musicbed.challenge_token_service",n.service,{maxAge:60*60*1}),te(h("linkAccount",{challenge:r.data.data.challenge_token}));d(r.data.errors);return}else try{e=await ie(g),U()&&(e=(await b()).data)}catch(r){const l={login:r.data.errors};d(l);return}const s=U();if(s&&ye(e)){xe(),window.location.href=s;return}if(e!=null&&e.email&&window.ire("identify",{customerId:e!=null&&e.id?e.id.toString():"",customerEmail:se(e.email)}),_e({id:e==null?void 0:e.id,email:e==null?void 0:e.email,persona:(A=e==null?void 0:e.license_persona)==null?void 0:A.entity}),G(),M){window.location.reload();return}C.setQueryData(I.only.queryKey,{...e,checkedAuthentication:!0}),C.invalidateQueries({queryKey:I.accountOrganizations.queryKey}),Q({showQuickRegistrationModalAfterFirstSong:!1}),z(),w&&w()},{GoogleButton:J}=ce({onSuccess:f,oneTapSurface:V?K:void 0,buttonProps:{width:332,...N}}),{AppleButton:X}=le({onSuccess:o=>{var n,e,s,c;return f(o.authorization.id_token,{service:"apple",first_name:(e=(n=o.user)==null?void 0:n.name)==null?void 0:e.firstName,last_name:(c=(s=o.user)==null?void 0:s.name)==null?void 0:c.lastName})},onError:o=>{d({apple:o})},buttonProps:{width:332,...H}});function Y(){switch(q){case"initial":return a("form",{onSubmit:$,style:{width:"100%",textAlign:"left",marginTop:30},"data-cy":"_LoginForm_form",children:[a("div",{style:{display:"grid",rowGap:12},"data-cy":"_LoginForm_div",children:[t(E,{label:"Email",name:"login",type:"text",onChange:u,defaultValue:g.login,errorMessage:L.login,invalid:L.login,isDirty:x.login,"data-cy":"_LoginForm_Input2"}),t(E,{label:"Password",name:"password",type:"password",onChange:u,defaultValue:g.password,isDirty:x.password,"data-cy":"_LoginForm_Input2_3"})]}),a(i,{justifyContent:"space-between",alignItems:"center",css:we,"data-cy":"_LoginForm_Flex",children:[a(i,{justifyContent:"start",alignItems:"center","data-cy":"_LoginForm_Flex_5",children:[t(ae,{id:"remember",name:"remember",type:"checkbox",onChange:u,"data-cy":"_LoginForm_Checkbox"}),t(_,{fontSize:"12px",lineHeight:"100%",color:"text.secondary",ml:"8px","data-cy":"_LoginForm_Text",children:"Remember me"})]}),!F&&t(B,{asChild:!0,fontSize:"12px",textDecor:"underline",color:"text.secondary","data-cy":"_LoginForm_Link",children:t(R,{to:h("forgotPassword"),"data-cy":"_LoginForm_RouterLink",children:"Forgot Password"})})]}),a(i,{direction:"column",alignItems:"center",css:be,"data-cy":"_LoginForm_Flex",children:[t(Le,{id:"Login",type:"submit",w:"full",variant:"filled",h:"48px","data-cy":"_LoginForm_Button",children:"Login"}),a(i,{margin:"32px 0",width:"100%",justifyContent:"center",alignItems:"center","data-cy":"_LoginForm_Flex",children:[t(j,{borderColor:"border.default",flex:1,h:"1px","data-cy":"_LoginForm_Separator"}),t(_,{color:"text-color",fontSize:"12px",fontWeight:"500",bg:"surface",my:"-7px",w:"33px","data-cy":"_LoginForm_Text",children:"OR"}),t(j,{borderColor:"border.default",h:"1px",flex:1,"data-cy":"_LoginForm_Separator"})]}),a(Fe,{w:"full",rowGap:"16px","data-cy":"_LoginForm_Stack",children:[t(J,{"data-cy":"_LoginForm_GoogleButton"}),t(X,{"data-cy":"_LoginForm_AppleButton"})]}),!F&&a(_,{fontSize:"14px",color:"text.secondary",lineHeight:"100%",mt:"40px","data-cy":"_LoginForm_Text",children:["Don't have an account?","  ",t(B,{asChild:!0,fontSize:"14px",color:"text.secondary",textDecor:"underline","data-cy":"_LoginForm_Link",children:t(R,{to:h("register"),"data-cy":"_LoginForm_RouterLink",children:"Create Free Account"})})]})]})]});case"processing":return t(i,{justifyContent:"center",alignItems:"center",css:Ce,"data-cy":"_LoginForm_Flex",children:t(P,{"data-cy":"_LoginForm_CircleLoader"})});case"success":return t(i,{justifyContent:"center",alignItems:"center",css:Se,"data-cy":"_LoginForm_Flex",children:t(P,{"data-cy":"_LoginForm_CircleLoader"})})}}return t(re.Fragment,{children:Y()})}y.propTypes={forgot_password_endpoint:m.string,setUser:m.func,onSuccess:m.func.isRequired,oneTapSurface:m.string};y.defaultProps={inputNames:{login:null,password:null,remember:null}};const We=oe(y);export{We as L};
4
5//# debugId=c73cb002-f46a-5806-8fe2-5c94e59860a7

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.