@clerk/ui 1.0.0-snapshot.v20251203203405 → 1.0.0-snapshot.v20251204143242
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{browser/207_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → 207_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +1 -1
- package/dist/{browser/360_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → 360_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +1 -1
- package/dist/573_ui_87d4d5_1.0.0-snapshot.v20251204143242.js +1 -0
- package/dist/{browser/970_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → 970_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +1 -1
- package/dist/ClerkUi.js +2 -2
- package/dist/Components.js.map +1 -1
- package/dist/{browser/blankcaptcha_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → blankcaptcha_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +1 -1
- package/dist/{browser/checkout_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → checkout_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +2 -2
- package/dist/components/OrganizationProfile/InviteMembersScreen.js +4 -11
- package/dist/components/OrganizationProfile/InviteMembersScreen.js.map +1 -1
- package/dist/components/OrganizationProfile/OrganizationMembers.js +3 -6
- package/dist/components/OrganizationProfile/OrganizationMembers.js.map +1 -1
- package/dist/components/OrganizationProfile/OrganizationMembersTabInvitations.js +51 -56
- package/dist/components/OrganizationProfile/OrganizationMembersTabInvitations.js.map +1 -1
- package/dist/components/OrganizationProfile/OrganizationMembersTabRequests.js +51 -56
- package/dist/components/OrganizationProfile/OrganizationMembersTabRequests.js.map +1 -1
- package/dist/components/OrganizationSwitcher/OrganizationSwitcherPopover.js +4 -39
- package/dist/components/OrganizationSwitcher/OrganizationSwitcherPopover.js.map +1 -1
- package/dist/components/SignIn/AlternativeMethods.js +4 -1
- package/dist/components/SignIn/AlternativeMethods.js.map +1 -1
- package/dist/components/SignIn/SignInFactorOne.js +11 -5
- package/dist/components/SignIn/SignInFactorOne.js.map +1 -1
- package/dist/components/SignIn/SignInFactorOnePasswordCard.js +24 -14
- package/dist/components/SignIn/SignInFactorOnePasswordCard.js.map +1 -1
- package/dist/components/SignIn/SignInFactorTwoCodeForm.js +8 -3
- package/dist/components/SignIn/SignInFactorTwoCodeForm.js.map +1 -1
- package/dist/components/SignIn/SignInSocialButtons.js +18 -2
- package/dist/components/SignIn/SignInSocialButtons.js.map +1 -1
- package/dist/components/SignIn/SignInStart.js +10 -0
- package/dist/components/SignIn/SignInStart.js.map +1 -1
- package/dist/components/devPrompts/KeylessPrompt/use-revalidate-environment.js +1 -1
- package/dist/components/devPrompts/KeylessPrompt/use-revalidate-environment.js.map +1 -1
- package/dist/{browser/createorganization_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → createorganization_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +1 -1
- package/dist/customizables/parseAppearance.d.ts +1 -1
- package/dist/customizables/parseAppearance.d.ts.map +1 -1
- package/dist/customizables/parseAppearance.js +5 -5
- package/dist/customizables/parseAppearance.js.map +1 -1
- package/dist/customizables/parseVariables.js +10 -13
- package/dist/customizables/parseVariables.js.map +1 -1
- package/dist/elements/ClipboardInput.js +0 -1
- package/dist/elements/ClipboardInput.js.map +1 -1
- package/dist/elements/PasswordInput.js +3 -2
- package/dist/elements/PasswordInput.js.map +1 -1
- package/dist/elements/contexts/index.js.map +1 -1
- package/dist/foundations/colors.js +2 -2
- package/dist/foundations/colors.js.map +1 -1
- package/dist/foundations/defaultFoundations.d.ts +157 -157
- package/dist/foundations/typography.js +4 -4
- package/dist/foundations/typography.js.map +1 -1
- package/dist/hooks/useFetch.js +1 -0
- package/dist/hooks/useFetch.js.map +1 -1
- package/dist/{browser/impersonationfab_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → impersonationfab_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/appearance.d.ts +3 -63
- package/dist/internal/appearance.d.ts.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/{browser/keylessPrompt_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → keylessPrompt_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +1 -1
- package/dist/lazyModules/components.d.ts +20 -20
- package/dist/{browser/organizationlist_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → organizationlist_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +1 -1
- package/dist/organizationprofile_ui_87d4d5_1.0.0-snapshot.v20251204143242.js +1 -0
- package/dist/organizationswitcher_ui_87d4d5_1.0.0-snapshot.v20251204143242.js +1 -0
- package/dist/signin_ui_87d4d5_1.0.0-snapshot.v20251204143242.js +1 -0
- package/dist/signup_ui_87d4d5_1.0.0-snapshot.v20251204143242.js +1 -0
- package/dist/{browser/taskChooseOrganization_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → taskChooseOrganization_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +1 -1
- package/dist/themes/createTheme.d.ts +2 -3
- package/dist/themes/createTheme.d.ts.map +1 -1
- package/dist/themes/createTheme.js +2 -2
- package/dist/themes/createTheme.js.map +1 -1
- package/dist/themes/dark.d.ts +0 -1
- package/dist/themes/dark.d.ts.map +1 -1
- package/dist/themes/dark.js +3 -2
- package/dist/themes/dark.js.map +1 -1
- package/dist/themes/experimental.d.ts +3 -0
- package/dist/themes/experimental.js +4 -0
- package/dist/themes/index.d.ts +1 -3
- package/dist/themes/index.js +1 -3
- package/dist/themes/neobrutalism.d.ts +0 -1
- package/dist/themes/neobrutalism.js +2 -2
- package/dist/themes/neobrutalism.js.map +1 -1
- package/dist/themes/shadcn.d.ts +0 -1
- package/dist/themes/shadcn.d.ts.map +1 -1
- package/dist/themes/shadcn.js +4 -3
- package/dist/themes/shadcn.js.map +1 -1
- package/dist/themes/shadesOfPurple.d.ts +0 -1
- package/dist/themes/shadesOfPurple.js +3 -3
- package/dist/themes/shadesOfPurple.js.map +1 -1
- package/dist/themes/simple.d.ts +2 -3
- package/dist/themes/simple.d.ts.map +1 -1
- package/dist/themes/simple.js +3 -3
- package/dist/themes/simple.js.map +1 -1
- package/dist/ui-common_ui_87d4d5_1.0.0-snapshot.v20251204143242.js +139 -0
- package/dist/ui.browser.js +3 -0
- package/dist/utils/extractCssLayerNameFromAppearance.js +4 -6
- package/dist/utils/extractCssLayerNameFromAppearance.js.map +1 -1
- package/dist/utils/usernameUtils.js +2 -0
- package/dist/utils/usernameUtils.js.map +1 -1
- package/package.json +8 -3
- package/dist/browser/646_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/browser/organizationprofile_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/browser/organizationswitcher_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/browser/signin_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/browser/signup_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js +0 -1
- package/dist/browser/ui-common_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js +0 -139
- package/dist/browser/ui.browser.js +0 -3
- package/dist/components/OrganizationProfile/BillingWidget.js +0 -39
- package/dist/components/OrganizationProfile/BillingWidget.js.map +0 -1
- package/dist/components/OrganizationProfile/MembershipWidget.js +0 -58
- package/dist/components/OrganizationProfile/MembershipWidget.js.map +0 -1
- package/dist/elements/Gauge.js +0 -82
- package/dist/elements/Gauge.js.map +0 -1
- package/dist/icons/billing.js +0 -35
- package/dist/icons/billing.js.map +0 -1
- /package/dist/{browser/217_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → 217_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/444_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → 444_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/apiKeys_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → apiKeys_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/copy-api-key-modal_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → copy-api-key-modal_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/enableOrganizationsPrompt_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → enableOrganizationsPrompt_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/framework_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → framework_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/oauthConsent_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → oauthConsent_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/onetap_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → onetap_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/op-api-keys-page_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → op-api-keys-page_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/op-billing-page_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → op-billing-page_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/op-plans-page_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → op-plans-page_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/payment-attempt-page_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → payment-attempt-page_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/planDetails_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → planDetails_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/prefetchorganizationlist_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → prefetchorganizationlist_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/pricingTable_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → pricingTable_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/revoke-api-key-modal_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → revoke-api-key-modal_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/sessionTasks_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → sessionTasks_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/statement-page_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → statement-page_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/subscriptionDetails_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → subscriptionDetails_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/up-api-keys-page_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → up-api-keys-page_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/up-billing-page_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → up-billing-page_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/up-plans-page_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → up-plans-page_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/useravatar_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → useravatar_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/userbutton_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → userbutton_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/userprofile_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → userprofile_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/userverification_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → userverification_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/vendors_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → vendors_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
- /package/dist/{browser/waitlist_ui_9c3cc3_1.0.0-snapshot.v20251203203405.js → waitlist_ui_87d4d5_1.0.0-snapshot.v20251204143242.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["10"],{9090:function(e,t,r){r.d(t,{n:()=>o});var n=r(4518),i=r(5170),a=r(2861);let o=e=>{let{onBackLinkClick:t}=e;return(0,n.Y)(i.J,{cardTitle:(0,a.G)("signIn.alternativeMethods.getHelp.title"),cardSubtitle:(0,a.G)("signIn.alternativeMethods.getHelp.content"),onBackLinkClick:t})}},579:function(e,t,r){let n,i;r.r(t),r.d(t,{SignIn:()=>tI,SignInModal:()=>t_});var a,o=r(4518),s=r(8909),l=r(5074),c=r(5873),d=r(4),u=r(5350),h=r(5577),p=r(4607),f=r(7896),g=r(7607),m=r(4096),I=r(7831),_=r(2265),S=r(4132),v=r(4692);let w=()=>Promise.all([r.e("545"),r.e("666"),r.e("472")]).then(r.bind(r,8480)),b=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpVerifyPhone}))),k=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpVerifyEmail}))),Y=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpStart}))),C=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpSSOCallback}))),A=(0,l.lazy)(()=>w().then(e=>({default:e.SignUpContinue})));var F=r(2950),y=r(6088),U=r(3269),P=r(2454),E=r(6153),D=r(4468),M=r(3990),L=r(8640),T=r(6324),G=r(7697),R=r(78),B=r(2861),z=r(8272),O=r(8920),$=r(8282),N=r(9426),Z=r(4964);let x=(0,U.dm)(()=>{let e=(0,T.n)(),t=(0,U.f0)(),{navigate:r}=(0,Z.r)(),n=(0,N.p)(),{userSettings:{passwordSettings:i}}=(0,G.O)(),{t:a,locale:s}=(0,R._)(),c="needs_new_password"===e.status&&"reset_password_email_code"!==e.firstFactorVerification.strategy&&"reset_password_phone_code"!==e.firstFactorVerification.strategy;l.useEffect(()=>{c&&t.setError(a((0,B.G)("signIn.resetPassword.requiredMessage")))},[]);let d=(0,L.tJ)("password","",{type:"password",label:(0,B.G)("formFieldLabel__newPassword"),isRequired:!0,validatePassword:!0,buildErrorMessage:e=>(0,M.C5)(e,{t:a,locale:s,passwordSettings:i})}),u=(0,L.tJ)("confirmPassword","",{type:"password",label:(0,B.G)("formFieldLabel__confirmPassword"),isRequired:!0}),h=(0,L.tJ)("signOutOfOtherSessions","",{type:"checkbox",label:(0,B.G)("formFieldLabel__signOutOfOtherSessions"),defaultChecked:!0}),{setConfirmPasswordFeedback:p,isPasswordMatch:f}=(0,$.Z)({passwordField:d,confirmPasswordField:u}),g=async()=>{d.clearFeedback(),u.clearFeedback();try{let{status:t,createdSessionId:i}=await e.resetPassword({password:d.value,signOutOfOtherSessions:h.checked});switch(t){case"complete":if(i){let e=new URLSearchParams;return e.set("createdSessionId",i),r(`../reset-password-success?${e.toString()}`)}return console.error((0,F.s)(t,n));case"needs_second_factor":return r("../factor-two");default:return console.error((0,F.s)(t,n))}}catch(e){return(0,D.H4)(e,[d,u],t.setError)}};return(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.Y)(E.Y.Root,{showLogo:!0,children:(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.resetPassword.title")})}),(0,o.Y)(y.Z.Alert,{children:t.error}),(0,o.Y)(z.fv,{elementDescriptor:O.$z.main,gap:8,children:(0,o.FD)(P.l.Root,{onSubmit:g,onBlur:()=>{d.value&&p(u.value)},gap:8,children:[(0,o.FD)(z.fv,{gap:6,children:[(0,o.Y)("input",{readOnly:!0,"data-testid":"hidden-identifier",id:"identifier-field",name:"identifier",value:e.identifier||"",style:{display:"none"}}),(0,o.Y)(P.l.ControlRow,{elementId:d.id,children:(0,o.Y)(P.l.PasswordInput,{...d.props,isRequired:!0,autoFocus:!0})}),(0,o.Y)(P.l.ControlRow,{elementId:u.id,children:(0,o.Y)(P.l.PasswordInput,{...u.props,onChange:e=>(e.target.value&&p(e.target.value),u.props.onChange(e))})}),!c&&(0,o.Y)(P.l.ControlRow,{elementId:h.id,children:(0,o.Y)(P.l.Checkbox,{...h.props})})]}),(0,o.FD)(z.fv,{gap:3,children:[(0,o.Y)(P.l.SubmitButton,{isDisabled:!f,localizationKey:(0,B.G)("signIn.resetPassword.formButtonPrimary")}),(0,o.Y)(y.Z.Action,{elementId:"alternativeMethods",children:(0,o.Y)(y.Z.ActionLink,{elementDescriptor:O.$z.backLink,localizationKey:(0,B.G)("backButton"),onClick:()=>r("../")})})]})]})})]}),(0,o.Y)(y.Z.Footer,{})]})});var K=r(9107),W=r(6488);let V=(0,U.dm)(()=>{let e=(0,U.f0)();return(0,K.h)(),(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.Y)(E.Y.Root,{showLogo:!0,children:(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.resetPassword.title")})}),(0,o.Y)(y.Z.Alert,{children:e.error}),(0,o.FD)(z.fv,{elementDescriptor:O.$z.main,gap:8,children:[(0,o.Y)(z.EY,{localizationKey:(0,B.G)("signIn.resetPassword.successMessage")}),(0,o.Y)(W.s,{direction:"row",center:!0,children:(0,o.Y)(z.y$,{size:"xl",colorScheme:"primary",elementDescriptor:O.$z.spinner})})]})]}),(0,o.Y)(y.Z.Footer,{})]})});var q=r(2531),H=r(750),J=r(9345),j=r(656),X=r(9599),Q=r(9366),ee=r(6932),et=r(1052),er=r(2540);let en=(0,j.SY)((0,U.dm)(()=>{let e=(0,U.f0)(),{userProfileUrl:t}=(0,G.O)().displayConfig,{afterSignInUrl:r,path:n,signInUrl:i,taskUrl:a}=(0,d.r)(),{navigateAfterSignOut:s}=(0,X.g)(),{handleSignOutAllClicked:l,handleSessionClicked:c,signedInSessions:u,handleAddAccountClicked:h}=(0,er.u)({taskUrl:a,navigateAfterSignOut:s,afterSwitchSessionUrl:r,userProfileUrl:t,signInUrl:n??i,user:void 0});return(0,o.Y)(p.n.Part,{part:"accountSwitcher",children:(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{sx:e=>({padding:`${e.space.$8} ${e.space.$none} ${e.space.$none}`}),children:[(0,o.FD)(E.Y.Root,{children:[(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.accountSwitcher.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.accountSwitcher.subtitle")})]}),(0,o.Y)(y.Z.Alert,{children:e.error}),(0,o.Y)(z.fv,{elementDescriptor:O.$z.main,gap:8,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100}),children:(0,o.FD)(q.En,{role:"menu",children:[u.map(e=>(0,o.Y)(H.P,{onClick:c(e),sx:e=>({height:e.sizes.$16,justifyContent:"flex-start",borderRadius:0}),icon:Q.A,children:(0,o.Y)(J.c,{user:e.user,sx:{width:"100%"}})},e.id)),(0,o.Y)(q.rc,{elementDescriptor:O.$z.accountSwitcherActionButton,elementId:O.$z.accountSwitcherActionButton.setId("addAccount"),iconBoxElementDescriptor:O.$z.accountSwitcherActionButtonIconBox,iconBoxElementId:O.$z.accountSwitcherActionButtonIconBox.setId("addAccount"),iconElementDescriptor:O.$z.accountSwitcherActionButtonIcon,iconElementId:O.$z.accountSwitcherActionButtonIcon.setId("addAccount"),icon:ee.A,label:(0,B.G)("signIn.accountSwitcher.action__addAccount"),onClick:h,iconSx:e=>({width:e.sizes.$9,height:e.sizes.$6}),iconBoxSx:e=>({minHeight:e.sizes.$9,minWidth:e.sizes.$6,alignItems:"center"}),spinnerSize:"md"})]})})]}),(0,o.Y)(y.Z.Footer,{sx:e=>({">:first-of-type":{padding:`${e.space.$1}`,width:"100%"}}),children:(0,o.Y)(y.Z.Action,{sx:{width:"100%",">:first-of-type":{width:"100%",borderBottomWidth:0}},children:(0,o.Y)(et.ww,{handleSignOutAllClicked:l,elementDescriptor:O.$z.accountSwitcherActionButton,elementId:O.$z.accountSwitcherActionButton.setId("signOutAll"),iconBoxElementDescriptor:O.$z.accountSwitcherActionButtonIconBox,iconBoxElementId:O.$z.accountSwitcherActionButtonIconBox.setId("signOutAll"),iconElementDescriptor:O.$z.accountSwitcherActionButtonIcon,iconElementId:O.$z.accountSwitcherActionButtonIcon.setId("signOutAll"),label:(0,B.G)("signIn.accountSwitcher.action__signOutAll"),actionSx:e=>({padding:`${e.space.$2} ${e.space.$2}`})})})})]})})}));var ei=r(5170),ea=r(6980),eo=r(3474),es=r(8738),el=r(29),ec=r(6505),ed=r(2216),eu=r(8144),eh=r(4421),ep=r(1051),ef=r(2181),eg=r(743),em=r(6889),eI=r(3610),e_=r(2166),eS=r(44),ev=r(9236),ew=r(8051),eb=r(5715);let ek=l.memo(e=>{let t=(0,s.ho)(),{navigate:r}=(0,Z.r)(),n=(0,U.f0)(),{displayConfig:i}=(0,G.O)(),a=(0,d.r)(),l=(0,T.n)(),c=(0,ew.uP)(a,i.signInUrl),u=a.afterSignInUrl||"/",h="popup"===a.oauthFlow||"auto"===a.oauthFlow&&(0,eS.C)(),{onAlternativePhoneCodeProviderClick:p,...f}=e,g=e=>(0,eI.$R)(e)&&e.errors.find(e=>e.code===e_.c.SESSION_EXISTS)?t.setActive({session:t.client.lastActiveSessionId,navigate:async({session:e})=>{await a.navigateOnSetActive({session:e,redirectUrl:a.afterSignInUrl})}}):(0,D.H4)(e,[],n.setError);return(0,o.Y)(eb.V,{...f,showLastAuthenticationStrategy:!0,idleAfterDelay:!h,oauthCallback:e=>{if(h){let t=window.open("about:blank","","width=600,height=800"),r=setInterval(()=>{(!t||t.closed)&&(clearInterval(r),n.setIdle())},500);return l.authenticateWithPopup({strategy:e,redirectUrl:c,redirectUrlComplete:u,popup:t,oidcPrompt:a.oidcPrompt}).catch(e=>g(e))}return l.authenticateWithRedirect({strategy:e,redirectUrl:c,redirectUrlComplete:u,oidcPrompt:a.oidcPrompt}).catch(e=>g(e))},web3Callback:e=>t.authenticateWithWeb3({customNavigate:r,redirectUrl:u,signUpContinueUrl:a.isCombinedFlow?"create/continue":a.signUpContinueUrl,strategy:e,secondFactorUrl:"factor-two"}).catch(e=>(0,ev.f)(e,n.setError)),alternativePhoneCodeCallback:e=>{p?.(e)}})});var eY=r(5763);function eC(){let e=(0,T.n)();return e.supportedFirstFactors?.find(({strategy:e})=>(0,eY.Kw)(e))}var eA=r(9090);let eF=e=>((e,t)=>{let[r,n]=l.useState(!1),i=l.useCallback(()=>n(e=>!e),[n]);return r?(0,o.Y)(eA.n,{onBackLinkClick:i}):(0,o.Y)(e,{...t,onHavingTroubleClick:i})})(ey,{...e}),ey=e=>{let{onBackLinkClick:t,onHavingTroubleClick:r,onFactorSelected:n,mode:i="default"}=e,a=(0,U.f0)(),s=eC(),{supportedFirstFactors:l}=(0,T.n)(),{firstPartyFactors:c,hasAnyStrategy:d}=(0,eo.y)({filterOutFactor:e?.currentFactor,supportedFirstFactors:l}),u=function(e){switch(e){case"forgot":return"forgotPasswordMethods";case"pwned":return"passwordPwnedMethods";case"passwordCompromised":return"passwordCompromisedMethods";default:return"alternativeMethods"}}(i),h=function(e){switch(e){case"forgot":return(0,B.G)("signIn.forgotPasswordAlternativeMethods.title");case"pwned":return(0,B.G)("signIn.passwordPwned.title");case"passwordCompromised":return(0,B.G)("signIn.passwordCompromised.title");default:return(0,B.G)("signIn.alternativeMethods.title")}}(i),f=function(e){switch(e){case"forgot":case"pwned":return!0;default:return!1}}(i);return(0,o.Y)(p.n.Part,{part:u,children:(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:h}),!f&&"passwordCompromised"!==i&&(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.alternativeMethods.subtitle")})]}),(0,o.Y)(y.Z.Alert,{children:a.error}),(0,o.FD)(z.so,{direction:"col",elementDescriptor:O.$z.main,gap:6,children:[f&&s&&(0,o.Y)(z.$n,{localizationKey:eU(s),elementDescriptor:O.$z.alternativeMethodsBlockButton,isDisabled:a.isLoading,onClick:()=>{a.setError(void 0),n(s)}}),f&&d&&(0,o.Y)(ec.c,{dividerText:(0,B.G)("signIn.forgotPasswordAlternativeMethods.label__alternativeMethods")}),(0,o.FD)(z.fv,{gap:4,children:[d&&(0,o.FD)(z.so,{elementDescriptor:O.$z.alternativeMethods,direction:"col",gap:2,children:[(0,o.Y)(ek,{enableWeb3Providers:!0,enableOAuthProviders:!0,enableAlternativePhoneCodeProviders:!1}),c&&c.map((e,t)=>{var r;return(0,o.Y)(es.X,{leftIcon:(r=e,({email_link:eu.A,email_code:eh.A,phone_code:ep.A,reset_password_email_code:ef.A,reset_password_phone_code:ef.A,password:eg.A,passkey:em.A})[r.strategy]),textLocalizationKey:eU(e),elementDescriptor:O.$z.alternativeMethodsBlockButton,textElementDescriptor:O.$z.alternativeMethodsBlockButtonText,arrowElementDescriptor:O.$z.alternativeMethodsBlockButtonArrow,textVariant:"buttonLarge",isDisabled:a.isLoading,onClick:()=>{a.setError(void 0),n(e)}},t)})]}),t&&(0,o.Y)(el.E,{boxElementDescriptor:O.$z.backRow,linkElementDescriptor:O.$z.backLink,onClick:t})]})]})]}),(0,o.Y)(y.Z.Footer,{children:(0,o.FD)(y.Z.Action,{elementId:"havingTrouble",children:[(0,o.Y)(y.Z.ActionText,{localizationKey:(0,B.G)("signIn.alternativeMethods.actionText")}),(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.alternativeMethods.actionLink"),onClick:r})]})})]})})};function eU(e){switch(e.strategy){case"email_link":return(0,B.G)("signIn.alternativeMethods.blockButton__emailLink",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"email_code":return(0,B.G)("signIn.alternativeMethods.blockButton__emailCode",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"phone_code":return(0,B.G)("signIn.alternativeMethods.blockButton__phoneCode",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"password":return(0,B.G)("signIn.alternativeMethods.blockButton__password");case"passkey":return(0,B.G)("signIn.alternativeMethods.blockButton__passkey");case"reset_password_email_code":case"reset_password_phone_code":return(0,B.G)("signIn.forgotPasswordAlternativeMethods.blockButton__resetPassword");default:throw Error(`Invalid sign in strategy: "${e.strategy}"`)}}var eP=r(5653);function eE(e){let t=(0,U.f0)(),{setActive:r,__internal_navigateWithError:n}=(0,s.ho)(),i=(0,N.p)(),{afterSignInUrl:a,navigateOnSetActive:o}=(0,d.r)(),{authenticateWithPasskey:c}=(0,T.n)();return(0,l.useEffect)(()=>()=>{eP.sv.abort()},[]),(0,l.useCallback)(async(...s)=>{try{let t=await c(...s);switch(t.status){case"complete":return r({session:t.createdSessionId,navigate:async({session:e})=>{await o({session:e,redirectUrl:a})}});case"needs_second_factor":return e();default:return console.error((0,F.s)(t.status,i))}}catch(r){let{flow:e}=s[0]||{};if((0,eI.Cm)(r)&&("passkey_operation_aborted"===r.code||"autofill"===e&&"passkey_retrieval_cancelled"===r.code))return;if((0,eI._d)(r))return n("..",r.errors[0]);(0,D.H4)(r,[],t.setError)}},[])}function eD(e){return!!e?.length&&e.filter(e=>"enterprise_sso"===e.strategy&&"enterpriseConnectionId"in e&&"enterpriseConnectionName"in e).length>1}var eM=r(1652),eL=r(7912);let eT=e=>{let t=(0,T.n)(),r=(0,U.f0)(),{navigate:n}=(0,Z.r)(),{afterSignInUrl:i,navigateOnSetActive:a}=(0,d.r)(),{setActive:l}=(0,s.ho)(),c=(0,N.p)(),u=(0,s.ho)(),h=e.factor.channel,p="verified"===t.firstFactorVerification.status&&e.factorAlreadyPrepared;return(0,o.Y)(eL.j,{cardTitle:e.cardTitle,cardSubtitle:e.cardSubtitle,inputLabel:e.inputLabel,resendButton:e.resendButton,onCodeEntryFinishedAction:(r,o,s)=>{t.attemptFirstFactor({strategy:e.factor.strategy,code:r}).then(async e=>{switch(await o(),e.status){case"complete":return l({session:e.createdSessionId,navigate:async({session:e})=>{await a({session:e,redirectUrl:i})}});case"needs_second_factor":return n("../factor-two");case"needs_new_password":return n("../reset-password");default:return console.error((0,F.s)(e.status,c))}}).catch(e=>(0,eI._d)(e)?u.__internal_navigateWithError("..",e.errors[0]):s(e))},onResendCodeClicked:()=>{p||t.prepareFirstFactor({...e.factor,channel:h}).then(()=>e.onFactorPrepare()).catch(e=>(0,D.H4)(e,[],r.setError))},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:t.userData.imageUrl,alternativeMethodsLabel:(0,B.G)("footerActionLink__alternativePhoneCodeProvider"),onShowAlternativeMethodsClicked:()=>{r.setError(void 0),e.onChangePhoneCodeChannel({...e.factor,channel:void 0})},showAlternativeMethods:!0,onIdentityPreviewEditClicked:()=>n("../"),onBackLinkClicked:e.onBackLinkClicked})},eG=e=>(0,o.Y)(p.n.Part,{part:"phoneCode",children:(0,o.Y)(eT,{...e,cardTitle:(0,B.G)("signIn.alternativePhoneCodeProvider.title",{provider:(0,eM.y)(e.factor.channel)?.name||""}),cardSubtitle:(0,B.G)("signIn.alternativePhoneCodeProvider.subtitle"),inputLabel:(0,B.G)("signIn.alternativePhoneCodeProvider.formTitle"),resendButton:(0,B.G)("signIn.alternativePhoneCodeProvider.resendButton")})}),eR=e=>{let t=(0,T.n)(),r=(0,U.f0)(),{navigate:n}=(0,Z.r)(),{afterSignInUrl:i,navigateOnSetActive:a}=(0,d.r)(),{setActive:c}=(0,s.ho)(),u=(0,N.p)(),h=(0,s.ho)(),p="verified"===t.firstFactorVerification.status&&e.factorAlreadyPrepared,g=(0,l.useMemo)(()=>{let t=e.factor,r=t.strategy;return"emailAddressId"in t&&(r+=`_${t.emailAddressId}`),"phoneNumberId"in t&&(r+=`_${t.phoneNumberId}`),"channel"in t&&t.channel&&(r+=`_${t.channel}`),{name:"signIn.prepareFirstFactor",factorKey:r}},[e.factor.strategy,"emailAddressId"in e.factor?e.factor.emailAddressId:void 0,"phoneNumberId"in e.factor?e.factor.phoneNumberId:void 0,"channel"in e.factor?e.factor.channel:void 0]);return(0,f.s)(p?void 0:()=>t?.prepareFirstFactor(e.factor),g,{staleTime:100,onSuccess:()=>e.onFactorPrepare(),onError:e=>(0,D.H4)(e,[],r.setError)}),(0,o.Y)(eL.j,{cardTitle:e.cardTitle,cardSubtitle:e.cardSubtitle,inputLabel:e.inputLabel,resendButton:e.resendButton,onCodeEntryFinishedAction:(r,o,s)=>{t.attemptFirstFactor({strategy:e.factor.strategy,code:r}).then(async e=>{switch(await o(),e.status){case"complete":return c({session:e.createdSessionId,navigate:async({session:e})=>{await a({session:e,redirectUrl:i})}});case"needs_second_factor":return n("../factor-two");case"needs_new_password":return n("../reset-password");default:return console.error((0,F.s)(e.status,u))}}).catch(e=>(0,eI._d)(e)?h.__internal_navigateWithError("..",e.errors[0]):s(e))},onResendCodeClicked:()=>{p||t.prepareFirstFactor(e.factor).then(()=>e.onFactorPrepare()).catch(e=>(0,D.H4)(e,[],r.setError))},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:t.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked,showAlternativeMethods:e.showAlternativeMethods,onIdentityPreviewEditClicked:()=>n("../"),onBackLinkClicked:e.onBackLinkClicked})},eB=e=>(0,o.Y)(p.n.Part,{part:"emailCode",children:(0,o.Y)(eR,{...e,cardTitle:(0,B.G)("signIn.emailCode.title"),cardSubtitle:(0,B.G)("signIn.emailCode.subtitle"),inputLabel:(0,B.G)("signIn.emailCode.formTitle"),resendButton:(0,B.G)("signIn.emailCode.resendButton")})});var ez=r(2027),eO=r(4979),e$=r(2992);let eN=e=>{let{t}=(0,R._)(),r=(0,U.f0)(),n=(0,T.n)(),i=(0,d.r)(),{signInUrl:a}=i,{navigate:c}=(0,Z.r)(),{afterSignInUrl:u}=(0,d.r)(),{setActive:h}=(0,s.ho)(),{startEmailLinkFlow:f,cancelEmailLinkFlow:g}=(0,e$.u)(n),[m,I]=l.useState(!1),_=(0,s.ho)();l.useEffect(()=>{S()},[]);let S=()=>{f({emailAddressId:e.factor.emailAddressId,redirectUrl:(0,ew.lA)({ctx:i,baseUrl:a,intent:"sign-in"})}).then(e=>v(e)).catch(e=>{if((0,eI._d)(e))return _.__internal_navigateWithError("..",e.errors[0]);(0,D.H4)(e,[],r.setError)})},v=async e=>{let n=e.firstFactorVerification;"expired"===n.status?r.setError(t((0,B.G)("formFieldError__verificationLinkExpired"))):n.verifiedFromTheSameClient()?I(!0):await w(e)},w=async e=>"complete"===e.status?h({session:e.createdSessionId,redirectUrl:u}):"needs_second_factor"===e.status?c("../factor-two"):void 0;return m?(0,o.Y)(eO.$,{title:(0,B.G)("signIn.emailLink.verifiedSwitchTab.titleNewTab"),subtitle:(0,B.G)("signIn.emailLink.verifiedSwitchTab.subtitleNewTab"),status:"verified_switch_tab"}):(0,o.Y)(p.n.Part,{part:"emailLink",children:(0,o.Y)(ez._,{cardTitle:(0,B.G)("signIn.emailLink.title"),cardSubtitle:(0,B.G)("signIn.emailLink.subtitle"),formTitle:(0,B.G)("signIn.emailLink.formTitle"),formSubtitle:(0,B.G)("signIn.emailLink.formSubtitle"),resendButton:(0,B.G)("signIn.emailLink.resendButton"),onResendCodeClicked:()=>{g(),S()},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:n.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked})})};var eZ=r(7420);let ex=(0,U.dm)((n=(a=()=>{let e=(0,d.r)(),{displayConfig:t}=(0,G.O)(),r=(0,s.ho)().client.signIn;if(!eD(r.supportedFirstFactors))return null;let n=r.supportedFirstFactors.map(e=>({id:e.enterpriseConnectionId,name:e.enterpriseConnectionName}));return(0,o.Y)(p.n.Part,{part:"enterpriseConnections",children:(0,o.Y)(eZ.l,{title:(0,B.G)("signIn.enterpriseConnections.title"),subtitle:(0,B.G)("signIn.enterpriseConnections.subtitle"),onClick:n=>{let i=(0,ew.uP)(e,t.signInUrl),a=e.afterSignInUrl||"/";return r.authenticateWithRedirect({strategy:"enterprise_sso",redirectUrl:i,redirectUrlComplete:a,oidcPrompt:e.oidcPrompt,continueSignIn:!0,enterpriseConnectionId:n})},enterpriseConnections:n})})}).displayName||a.name||"Component",a.displayName=n,(i=e=>{let t=(0,T.n)(),r=(0,d.r)();return(0,j.RE)(a,()=>!eD(t.supportedFirstFactors),({clerk:e})=>r.signInUrl||e.buildSignInUrl(),"There are no enterprise connections available to sign-in. Clerk is redirecting to the `signInUrl` instead.")(e)}).displayName=`withEnterpriseConnectionsGuard(${n})`,i)),eK=e=>(0,o.Y)(p.n.Part,{part:"resetPassword",children:(0,o.Y)(eR,{...e,showAlternativeMethods:!1,cardTitle:(0,B.G)("signIn.forgotPassword.title"),inputLabel:(0,B.G)("signIn.forgotPassword.formTitle"),resendButton:(0,B.G)("signIn.forgotPassword.resendButton")})});var eW=r(196);let eV=e=>{let{onShowAlternativeMethodsClick:t}=e,r=(0,U.f0)(),n=(0,T.n)(),{navigate:i}=(0,Z.r)(),[a,s]=l.useState(!1),c=l.useCallback(()=>s(e=>!e),[s]),d=eE(()=>i("../factor-two"));return a?(0,o.Y)(eA.n,{onBackLinkClick:c}):(0,o.Y)(p.n.Part,{part:"password",children:(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(z.In,{elementDescriptor:O.$z.passkeyIcon,icon:em.A,sx:e=>({color:e.colors.$neutralAlpha500,marginInline:"auto",paddingBottom:e.sizes.$1,width:e.sizes.$12,height:e.sizes.$12})}),(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.passkey.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.passkey.subtitle")}),(0,o.Y)(eW.$,{identifier:n.identifier,avatarUrl:n.userData.imageUrl,onClick:()=>i("../")})]}),(0,o.Y)(y.Z.Alert,{children:r.error}),(0,o.FD)(z.so,{direction:"col",elementDescriptor:O.$z.main,gap:4,children:[(0,o.Y)(P.l.Root,{onSubmit:e=>(e.preventDefault(),d()),gap:8,children:(0,o.Y)(P.l.SubmitButton,{hasArrow:!0})}),(0,o.Y)(y.Z.Action,{elementId:t?"alternativeMethods":"havingTrouble",children:(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)(t?"footerActionLink__useAnotherMethod":"signIn.alternativeMethods.actionLink"),onClick:t||c})})]})]}),(0,o.Y)(y.Z.Footer,{})]})})},eq=e=>{let{onShowAlternativeMethodsClick:t,onPasswordError:r}=e,n=l.useRef(null),i=(0,U.f0)(),{setActive:a}=(0,s.ho)(),c=(0,T.n)(),{afterSignInUrl:u,navigateOnSetActive:h}=(0,d.r)(),f=(0,N.p)(),g=(e=>{let{onForgotPasswordMethodClick:t,onShowAlternativeMethodsClick:r}=e,n=eC(),i=(0,L.tJ)("password","",{type:"password",label:(0,B.G)("formFieldLabel__password"),placeholder:(0,B.G)("formFieldInputPlaceholder__password")});return{...i,props:{...i.props,actionLabel:n||r?(0,B.G)("formFieldAction__forgotPassword"):"",onActionClicked:t||r||(()=>null)}}})(e),{navigate:m}=(0,Z.r)(),[I,_]=l.useState(!1),S=l.useCallback(()=>_(e=>!e),[_]),v=(0,s.ho)();return I?(0,o.Y)(eA.n,{onBackLinkClick:S}):(0,o.Y)(p.n.Part,{part:"password",children:(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.password.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.password.subtitle")}),(0,o.Y)(eW.$,{identifier:c.identifier,avatarUrl:c.userData.imageUrl,onClick:()=>{m("../")}})]}),(0,o.Y)(y.Z.Alert,{children:i.error}),(0,o.FD)(z.so,{direction:"col",elementDescriptor:O.$z.main,gap:4,children:[(0,o.FD)(P.l.Root,{onSubmit:e=>{e.preventDefault(),c.attemptFirstFactor({strategy:"password",password:g.value}).then(e=>{switch(e.status){case"complete":return a({session:e.createdSessionId,navigate:({session:e})=>{h({session:e,redirectUrl:u})}});case"needs_second_factor":return m("../factor-two");default:return console.error((0,F.s)(e.status,f))}}).catch(e=>{if((0,eI._d)(e))return v.__internal_navigateWithError("..",e.errors[0]);if(r){if((0,eI.Au)(e)){i.setError({...e.errors[0],code:"form_password_pwned__sign_in"}),r("pwned");return}if((0,eI.qY)(e)){i.setError({...e.errors[0],code:"form_password_compromised__sign_in"}),r("compromised");return}}(0,D.H4)(e,[g],i.setError),setTimeout(()=>n.current?.focus(),0)})},gap:8,children:[(0,o.Y)("input",{readOnly:!0,id:"identifier-field",name:"identifier",value:c.identifier||"",style:{display:"none"}}),(0,o.Y)(P.l.ControlRow,{elementId:g.id,children:(0,o.Y)(P.l.PasswordInput,{...g.props,ref:n,autoFocus:!0})}),(0,o.Y)(P.l.SubmitButton,{hasArrow:!0})]}),(0,o.Y)(y.Z.Action,{elementId:t?"alternativeMethods":"havingTrouble",children:(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)(t?"signIn.password.actionLink":"signIn.alternativeMethods.actionLink"),onClick:t||S})})]})]}),(0,o.Y)(y.Z.Footer,{})]})})},eH=e=>(0,o.Y)(p.n.Part,{part:"phoneCode",children:(0,o.Y)(eR,{...e,cardTitle:(0,B.G)("signIn.phoneCode.title"),cardSubtitle:(0,B.G)("signIn.phoneCode.subtitle"),inputLabel:(0,B.G)("signIn.phoneCode.formTitle"),resendButton:(0,B.G)("signIn.phoneCode.resendButton")})}),eJ=e=>{if(!e)return"";let t=e.strategy;return"emailAddressId"in e&&(t+=e.emailAddressId),"phoneNumberId"in e&&(t+=e.phoneNumberId),"channel"in e&&(t+=e.channel),t},ej=(0,j.RL)((0,j.SY)((0,U.dm)(function(){let{__internal_setActiveInProgress:e}=(0,s.ho)(),t=(0,T.n)(),{preferredSignInStrategy:r}=(0,G.O)().displayConfig,n=t.supportedFirstFactors,i=(0,Z.r)(),a=(0,U.f0)(),{supportedFirstFactors:c,firstFactorVerification:d}=(0,T.n)(),u=l.useRef(""),[{currentFactor:h},p]=l.useState(()=>{let e=(0,eY.xf)(n,t.identifier,r);return e?.strategy==="phone_code"&&d.channel&&"sms"!==d.channel&&(e.channel=d.channel),{currentFactor:e,prevCurrentFactor:void 0}}),{hasAnyStrategy:f}=(0,eo.y)({filterOutFactor:h,supportedFirstFactors:c}),[g,m]=l.useState(()=>!h||!(0,eY.Cm)(h)),I=eC(),[_,S]=l.useState(!1),[v,w]=l.useState(null);if(l.useEffect(()=>{e||("needs_identifier"===t.status||null===t.status)&&i.navigate("../")},[e]),!h)return t.status?(0,o.Y)(ei.J,{cardTitle:(0,B.G)("signIn.noAvailableMethods.title"),cardSubtitle:(0,B.G)("signIn.noAvailableMethods.subtitle"),message:(0,B.G)("signIn.noAvailableMethods.message")}):(0,o.Y)(ea.B,{});let b=f?()=>m(e=>!e):void 0,k=()=>S(e=>!e),Y=()=>{u.current=eJ(h)},C=e=>{p(t=>({currentFactor:e,prevCurrentFactor:t.currentFactor}))};if(eD(t.supportedFirstFactors))return(0,o.Y)(ex,{});if(g||_){let e=(0,eY.Cm)(h),t=g?b:k;return(0,o.Y)(eF,{mode:_?"pwned"===v?"pwned":"compromised"===v?"passwordCompromised":"forgot":"default",onBackLinkClick:e?()=>{a.setError(void 0),w(null),t?.()}:void 0,onFactorSelected:e=>{C(e),t?.()},currentFactor:h})}if(!h)return(0,o.Y)(ea.B,{});switch(h?.strategy){case"passkey":return(0,o.Y)(eV,{onFactorPrepare:Y,onShowAlternativeMethodsClick:b});case"password":return(0,o.Y)(eq,{onForgotPasswordMethodClick:I?k:b,onShowAlternativeMethodsClick:b,onPasswordError:e=>{w(e),k()}});case"email_code":return(0,o.Y)(eB,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b});case"phone_code":if(h.channel&&"sms"!==h.channel)return(0,o.Y)(eG,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onChangePhoneCodeChannel:C});return(0,o.Y)(eH,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b});case"email_link":return(0,o.Y)(eN,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b});case"reset_password_phone_code":return(0,o.Y)(eK,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b,onBackLinkClicked:()=>{p(e=>({currentFactor:e.prevCurrentFactor,prevCurrentFactor:e.currentFactor})),k()},cardSubtitle:(0,B.G)("signIn.forgotPassword.subtitle_phone")});case"reset_password_email_code":return(0,o.Y)(eK,{factorAlreadyPrepared:u.current===eJ(h),onFactorPrepare:Y,factor:h,onShowAlternativeMethodsClicked:b,onBackLinkClicked:()=>{p(e=>({currentFactor:e.prevCurrentFactor,prevCurrentFactor:e.currentFactor})),k()},cardSubtitle:(0,B.G)("signIn.forgotPassword.subtitle_email")});default:return(0,o.Y)(ea.B,{})}})));var eX=r(8289);let eQ=e=>{let[t,r]=l.useState(!1),n=l.useCallback(()=>r(e=>!e),[r]);return t?(0,o.Y)(eA.n,{onBackLinkClick:n}):(0,o.Y)(e0,{onBackLinkClick:e.onBackLinkClick,onFactorSelected:e.onFactorSelected,onHavingTroubleClick:n})},e0=e=>{let{onHavingTroubleClick:t,onFactorSelected:r,onBackLinkClick:n}=e,i=(0,U.f0)(),{supportedSecondFactors:a}=(0,T.n)();return(0,o.Y)(p.n.Part,{part:"alternativeMethods",children:(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.alternativeMethods.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.alternativeMethods.subtitle")})]}),(0,o.Y)(y.Z.Alert,{children:i.error}),(0,o.FD)(z.fv,{elementDescriptor:O.$z.main,gap:3,children:[(0,o.Y)(z.fv,{gap:2,children:a&&a.sort(eX.Wy).map((e,t)=>(0,o.Y)(es.X,{textLocalizationKey:function(e){switch(e.strategy){case"phone_code":return(0,B.G)("signIn.alternativeMethods.blockButton__phoneCode",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"totp":return(0,B.G)("signIn.alternativeMethods.blockButton__totp");case"backup_code":return(0,B.G)("signIn.alternativeMethods.blockButton__backupCode");case"email_code":return(0,B.G)("signIn.alternativeMethods.blockButton__emailCode",{identifier:(0,ed.u)(e.safeIdentifier)||""});case"email_link":return(0,B.G)("signIn.alternativeMethods.blockButton__emailLink",{identifier:(0,ed.u)(e.safeIdentifier)||""});default:throw Error(`Invalid sign in strategy: "${e.strategy}"`)}}(e),elementDescriptor:O.$z.alternativeMethodsBlockButton,textElementDescriptor:O.$z.alternativeMethodsBlockButtonText,arrowElementDescriptor:O.$z.alternativeMethodsBlockButtonArrow,isDisabled:i.isLoading,onClick:()=>r(e)},t))}),(0,o.Y)(y.Z.Action,{elementId:"alternativeMethods",children:n&&(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("backButton"),onClick:e.onBackLinkClick})})]})]}),(0,o.Y)(y.Z.Footer,{children:(0,o.FD)(y.Z.Action,{elementId:"havingTrouble",children:[(0,o.Y)(y.Z.ActionText,{localizationKey:(0,B.G)("signIn.alternativeMethods.actionText")}),(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.alternativeMethods.actionLink"),onClick:t})]})})]})})},e1=e=>{let{onShowAlternativeMethodsClicked:t}=e,r=(0,T.n)(),{afterSignInUrl:n,navigateOnSetActive:i}=(0,d.r)(),{setActive:a}=(0,s.ho)(),{navigate:l}=(0,Z.r)(),c=(0,N.p)(),u=(0,U.f0)(),h=(0,L.tJ)("code","",{type:"text",label:(0,B.G)("formFieldLabel__backupCode"),isRequired:!0}),p=(0,s.ho)(),f=e=>(0,eY.Kw)(e.firstFactorVerification?.strategy)&&e.firstFactorVerification?.status==="verified";return(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.backupCodeMfa.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:f(r)?(0,B.G)("signIn.forgotPassword.subtitle"):(0,B.G)("signIn.backupCodeMfa.subtitle")})]}),(0,o.Y)(y.Z.Alert,{children:u.error}),(0,o.Y)(z.fv,{elementDescriptor:O.$z.main,gap:8,children:(0,o.FD)(P.l.Root,{onSubmit:e=>(e.preventDefault(),r.attemptSecondFactor({strategy:"backup_code",code:h.value}).then(e=>{if("complete"!==e.status)return console.error((0,F.s)(e.status,c));if(f(e)&&e.createdSessionId){let t=new URLSearchParams;return t.set("createdSessionId",e.createdSessionId),l(`../reset-password-success?${t.toString()}`)}return a({session:e.createdSessionId,navigate:async({session:e})=>{await i({session:e,redirectUrl:n})}})}).catch(e=>{if((0,eI._d)(e))return p.__internal_navigateWithError("..",e.errors[0]);(0,D.H4)(e,[h],u.setError)})),children:[(0,o.Y)(P.l.ControlRow,{elementId:h.id,children:(0,o.Y)(P.l.PlainInput,{...h.props,autoFocus:!0,onActionClicked:t})}),(0,o.FD)(z.fv,{gap:3,children:[(0,o.Y)(P.l.SubmitButton,{hasArrow:!0}),(0,o.Y)(y.Z.Action,{elementId:"alternativeMethods",children:t&&(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("footerActionLink__useAnotherMethod"),onClick:t})})]})]})})]}),(0,o.Y)(y.Z.Footer,{})]})},e6=e=>(0,eY.Kw)(e.firstFactorVerification?.strategy)&&e.firstFactorVerification?.status==="verified",e4=e=>{let t=(0,G.O)(),r=(0,T.n)(),n=(0,U.f0)(),{afterSignInUrl:i,navigateOnSetActive:a}=(0,d.r)(),{setActive:c}=(0,s.ho)(),{navigate:u}=(0,Z.r)(),h=(0,N.p)(),p=(0,s.ho)(),f=(0,l.useMemo)(()=>{let e=Object.values(t.userSettings.attributes).some(e=>e.used_for_second_factor);return"new"===r.clientTrustState&&!e},[r.clientTrustState,t.userSettings.attributes]);l.useEffect(()=>{e.factorAlreadyPrepared||g?.()},[]);let g=e.prepare?()=>e.prepare?.().then(()=>e.onFactorPrepare()).catch(e=>{if((0,eI._d)(e))return p.__internal_navigateWithError("..",e.errors[0]);(0,D.H4)(e,[],n.setError)}):void 0;return(0,o.Y)(eL.j,{cardTitle:e.cardTitle,cardSubtitle:e6(r)?(0,B.G)("signIn.forgotPassword.subtitle"):e.cardSubtitle,cardNotice:f?(0,B.G)("signIn.newDeviceVerificationNotice"):void 0,resendButton:e.resendButton,inputLabel:e.inputLabel,onCodeEntryFinishedAction:(t,n,o)=>{r.attemptSecondFactor({strategy:e.factor.strategy,code:t}).then(async e=>{if(await n(),"complete"!==e.status)return console.error((0,F.s)(e.status,h));if(e6(e)&&e.createdSessionId){let t=new URLSearchParams;return t.set("createdSessionId",e.createdSessionId),u(`../reset-password-success?${t.toString()}`)}return c({session:e.createdSessionId,navigate:async({session:e})=>{await a({session:e,redirectUrl:i})}})}).catch(e=>(0,eI._d)(e)?p.__internal_navigateWithError("..",e.errors[0]):o(e))},onResendCodeClicked:g,safeIdentifier:"safeIdentifier"in e.factor?e.factor.safeIdentifier:void 0,profileImageUrl:r.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked,children:e6(r)&&(0,o.Y)(z.EY,{localizationKey:(0,B.G)("signIn.resetPasswordMfa.detailsLabel"),colorScheme:"secondary"})})},e2=e=>{let t=(0,T.n)();return(0,o.Y)(p.n.Part,{part:"emailCode2Fa",children:(0,o.Y)(e4,{...e,cardTitle:(0,B.G)("signIn.emailCodeMfa.title"),cardSubtitle:(0,B.G)("signIn.emailCodeMfa.subtitle"),inputLabel:(0,B.G)("signIn.emailCodeMfa.formTitle"),resendButton:(0,B.G)("signIn.emailCodeMfa.resendButton"),prepare:()=>{let{emailAddressId:r,strategy:n}=e.factor;return t.prepareSecondFactor({emailAddressId:r,strategy:n})}})})},e9=e=>{let{t}=(0,R._)(),r=(0,U.f0)(),n=(0,T.n)(),i=(0,d.r)(),{signInUrl:a}=i,{afterSignInUrl:c}=(0,d.r)(),{setActive:u}=(0,s.ho)(),{startEmailLinkFlow:h,cancelEmailLinkFlow:f}=(0,e$.u)(n),[g,m]=l.useState(!1),I=(0,s.ho)();l.useEffect(()=>{_()},[]);let _=()=>{h({emailAddressId:e.factor.emailAddressId,redirectUrl:(0,ew.lA)({ctx:i,baseUrl:a,intent:"sign-in"})}).then(e=>S(e)).catch(e=>{if((0,eI._d)(e))return I.__internal_navigateWithError("..",e.errors[0]);(0,D.H4)(e,[],r.setError)})},S=async e=>{let n=e.secondFactorVerification;"expired"===n.status?r.setError(t((0,B.G)("formFieldError__verificationLinkExpired"))):n.verifiedFromTheSameClient()?m(!0):await u({session:e.createdSessionId,redirectUrl:c})};return g?(0,o.Y)(eO.$,{title:(0,B.G)("signIn.emailLink.verifiedSwitchTab.titleNewTab"),subtitle:(0,B.G)("signIn.emailLink.verifiedSwitchTab.subtitleNewTab"),status:"verified_switch_tab"}):(0,o.Y)(p.n.Part,{part:"emailLink",children:(0,o.Y)(ez._,{cardTitle:(0,B.G)("signIn.emailLinkMfa.title"),cardSubtitle:(0,B.G)("signIn.emailLinkMfa.subtitle"),cardNotice:"new"===n.clientTrustState?(0,B.G)("signIn.newDeviceVerificationNotice"):void 0,formSubtitle:(0,B.G)("signIn.emailLinkMfa.formSubtitle"),resendButton:(0,B.G)("signIn.emailLinkMfa.resendButton"),onResendCodeClicked:()=>{f(),_()},safeIdentifier:e.factor.safeIdentifier,profileImageUrl:n.userData.imageUrl,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked})})},e5=e=>{let t=(0,T.n)();return(0,o.Y)(p.n.Part,{part:"phoneCode2Fa",children:(0,o.Y)(e4,{...e,cardTitle:(0,B.G)("signIn.phoneCodeMfa.title"),cardSubtitle:(0,B.G)("signIn.phoneCodeMfa.subtitle"),inputLabel:(0,B.G)("signIn.phoneCodeMfa.formTitle"),resendButton:(0,B.G)("signIn.phoneCodeMfa.resendButton"),prepare:()=>{let{phoneNumberId:r,strategy:n}=e.factor;return t.prepareSecondFactor({phoneNumberId:r,strategy:n})}})})},e8=e=>(0,o.Y)(p.n.Part,{part:"totp2Fa",children:(0,o.Y)(e4,{...e,cardTitle:(0,B.G)("signIn.totpMfa.title"),cardSubtitle:(0,B.G)("signIn.totpMfa.subtitle"),inputLabel:(0,B.G)("signIn.totpMfa.formTitle")})}),e7=e=>{if(!e)return"";let t=e.strategy;return"phoneNumberId"in e&&(t+=e.phoneNumberId),t},e3=(0,j.RL)((0,j.SY)((0,U.dm)(function(){let e=(0,T.n)().supportedSecondFactors,t=l.useRef(""),[r,n]=l.useState(()=>(0,eY.R5)(e)),[i,a]=l.useState(!r),s=()=>a(e=>!e),c=()=>{t.current=e7(r)};if(!r)return(0,o.Y)(ea.B,{});if(i)return(0,o.Y)(eQ,{onBackLinkClick:s,onFactorSelected:e=>{n(e),s()}});let d=t.current===e7(r);switch(r?.strategy){case"phone_code":return(0,o.Y)(e5,{factorAlreadyPrepared:d,onFactorPrepare:c,factor:r,onShowAlternativeMethodsClicked:s});case"totp":return(0,o.Y)(e8,{factorAlreadyPrepared:d,onFactorPrepare:c,factor:r,onShowAlternativeMethodsClicked:s});case"backup_code":return(0,o.Y)(e1,{onShowAlternativeMethodsClicked:s});case"email_code":return(0,o.Y)(e2,{factorAlreadyPrepared:d,onFactorPrepare:c,factor:r,onShowAlternativeMethodsClicked:s});case"email_link":return(0,o.Y)(e9,{factorAlreadyPrepared:d,onFactorPrepare:c,factor:r,onShowAlternativeMethodsClicked:s});default:return(0,o.Y)(ea.B,{})}})));var te=r(6126);let tt=(0,j.RL)((0,j.SY)(te.F));var tr=r(4670),tn=r(2620),ti=r(6760),ta=r(958),to=r(1959),ts=r(6142),tl=r(4901),tc=r(2229),td=r(9835);let tu=e=>{let{handleSubmit:t,phoneNumberFormState:r,onUseAnotherMethod:n,phoneCodeProvider:i}=e,{providerToDisplayData:a,strategyToDisplayData:s}=(0,td.k)(),l=i.name,c=i.channel,d=(0,U.f0)();return(0,o.Y)(y.Z.Root,{children:(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,showDivider:!0,children:[(0,o.Y)(z.fv,{center:!0,children:(0,o.Y)(z._V,{src:a[c]?.iconUrl,alt:`${s[c].name} logo`,sx:e=>({width:e.sizes.$7,height:e.sizes.$7,maxWidth:"100%",marginBottom:e.sizes.$6})})}),(0,o.Y)(E.Y.Title,{localizationKey:(0,B.G)("signIn.start.alternativePhoneCodeProvider.title",{provider:l})}),(0,o.Y)(E.Y.Subtitle,{localizationKey:(0,B.G)("signIn.start.alternativePhoneCodeProvider.subtitle",{provider:l})})]}),(0,o.Y)(y.Z.Alert,{children:d.error}),(0,o.Y)(z.so,{direction:"col",elementDescriptor:O.$z.main,gap:6,children:(0,o.FD)(P.l.Root,{onSubmit:t,gap:8,children:[(0,o.Y)(z.fv,{gap:6,children:(0,o.Y)(P.l.ControlRow,{elementId:"phoneNumber",children:(0,o.Y)(P.l.PhoneInput,{...r.props,label:(0,B.G)("signIn.start.alternativePhoneCodeProvider.label",{provider:l}),isRequired:!0,isOptional:!1,actionLabel:void 0,onActionClicked:void 0})})}),(0,o.FD)(z.fv,{center:!0,children:[(0,o.Y)(ts.j,{}),(0,o.Y)(z.fv,{gap:6,sx:{width:"100%"},children:(0,o.Y)(P.l.SubmitButton,{hasArrow:!0,localizationKey:(0,B.G)("formButtonPrimary")})})]}),(0,o.Y)(z.fv,{center:!0,children:(0,o.Y)(z.$n,{variant:"link",colorScheme:"neutral",onClick:n,localizationKey:(0,B.G)("signIn.start.alternativePhoneCodeProvider.actionLink")})})]})})]})})},th=e=>!!e.supportedFirstFactors?.length&&e.supportedFirstFactors.every(e=>"enterprise_sso"===e.strategy),tp=({field:e})=>{let[t,r]=(0,l.useState)(!1),n=(0,l.useRef)(null),i=!!(t||e?.value);return((0,l.useLayoutEffect)(()=>{let e=setInterval(()=>{if(n?.current){let t="onAutoFillStart"===window.getComputedStyle(n.current,":autofill").animationName||!!n.current?.matches("*:-webkit-autofill");t&&(r(t),clearInterval(e))}},500);return()=>{clearInterval(e)}},[]),(0,l.useEffect)(()=>{e?.value&&""!==e.value&&r(!1)},[e?.value]),e)?(0,o.Y)(P.l.ControlRow,{elementId:e.id,sx:i?void 0:{position:"absolute",opacity:0,height:0,pointerEvents:"none",marginTop:"-1rem"},children:(0,o.Y)(P.l.PasswordInput,{...e.props,ref:n,tabIndex:i?void 0:-1})}):null},tf=(0,j.RL)((0,j.SY)((0,U.dm)(function(){let e=(0,U.f0)(),t=(0,s.ho)(),n=(0,tl.m)(),{displayConfig:i,userSettings:a,authConfig:c}=(0,G.O)(),u=(0,T.n)(),{navigate:h}=(0,Z.r)(),f=(0,d.r)(),{afterSignInUrl:g,signUpUrl:m,waitlistUrl:I,isCombinedFlow:_,navigateOnSetActive:S}=f,v=(0,N.p)(),w=(0,tc.F)(),b=(0,l.useMemo)(()=>(0,to.E9)(a.enabledFirstFactorIdentifiers),[a.enabledFirstFactorIdentifiers]),k=a.alternativePhoneCodeChannels,{isWebAuthnAutofillSupported:Y}=(()=>{let[e,t]=(0,l.useState)(!1),{navigate:r}=(0,Z.r)(),n=eE(()=>r("factor-two")),{userSettings:i}=(0,G.O)(),{passkeySettings:a,attributes:o}=i;return(0,l.useEffect)(()=>{async function e(){let e=await (0,tn.nn)();t(e),e&&await n({flow:"autofill"})}a.allow_autofill&&o.passkey?.enabled&&e()},[]),{isWebAuthnAutofillSupported:e}})(),C=eE(()=>h("factor-two")),A=(0,tn.Bz)(),M=!!f.initialValues?.phoneNumber&&!(f.initialValues.emailAddress||f.initialValues.username)&&b.includes("phone_number"),[R,$]=(0,l.useState)(M?"phone_number":b[0]||""),[x,K]=(0,l.useState)(!1),W=(0,tr.n)("__clerk_ticket")||"",V=(0,tr.n)("__clerk_status")||"",q=a.enabledFirstFactorIdentifiers,H=a.web3FirstFactors,J=a.authenticatableSocialStrategies,j=a.instanceIsPasswordBased,{currentIdentifier:X,nextIdentifier:Q}=(0,to.ZN)(b,R),ee=(0,L.tJ)("password","",{type:"password",label:(0,B.G)("formFieldLabel__password"),placeholder:(0,B.G)("formFieldInputPlaceholder__password")}),[et,er]=(0,l.useState)(null),en=a.alternativePhoneCodeChannels.length>0,ei=f.initialValues||{},eo=(0,l.useMemo)(()=>({email_address:ei.emailAddress,email_address_username:ei.emailAddress||ei.username,username:ei.username,phone_number:ei.phoneNumber}),[f.initialValues]),es=!!J.length||!!H.length||!!k.length,[el,ec]=(0,l.useState)(!(0,ta.X)()&&!es),ed=(0,L.tJ)("identifier",eo[R]||"",{...X,isRequired:!0,transformer:e=>e.trim()}),eu=(0,L.tJ)("identifier",eo.phone_number||"",{...X,isRequired:!0}),eh="phone_number"===R?eu:ed;(0,l.useLayoutEffect)(()=>{if(eh.value.startsWith("+")&&b.includes("phone_number")&&"phone_number"!==R&&!x){var e;e=eh.value,ed.setValue(eo[R]||""),eu.setValue(e),$("phone_number"),ec(!0),K(!0)}},[eh.value,b]),(0,l.useEffect)(()=>{if(W){if("sign_up"===V){let e=new URLSearchParams;W&&e.set("__clerk_ticket",W),h(_?"create":m,{searchParams:e});return}n.setLoading(),e.setLoading(),u.create({strategy:"ticket",ticket:W}).then(e=>{switch(e.status){case"needs_first_factor":if(!th(e)||eD(e.supportedFirstFactors))return h("factor-one");return ef();case"needs_second_factor":return h("factor-two");case"complete":return(0,tr.r)("__clerk_ticket"),t.setActive({session:e.createdSessionId,navigate:async({session:e})=>{await S({session:e,redirectUrl:g})}});default:return void console.error((0,F.s)(e.status,v))}}).catch(e=>eg(e)).finally(()=>{th(u)||(n.setIdle(),e.setIdle())})}},[]),(0,l.useEffect)(()=>{!async function(){let t=u?.firstFactorVerification?.error;if(t){switch(t.code){case e_.c.NOT_ALLOWED_TO_SIGN_UP:case e_.c.OAUTH_ACCESS_DENIED:case e_.c.NOT_ALLOWED_ACCESS:case e_.c.SAML_USER_ATTRIBUTE_MISSING:case e_.c.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:case e_.c.USER_LOCKED:case e_.c.EXTERNAL_ACCOUNT_NOT_FOUND:case e_.c.SIGN_UP_MODE_RESTRICTED:case e_.c.SIGN_UP_MODE_RESTRICTED_WAITLIST:case e_.c.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:case e_.c.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:case e_.c.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:case e_.c.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:case e_.c.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:case e_.c.CAPTCHA_INVALID:case e_.c.FRAUD_DEVICE_BLOCKED:case e_.c.FRAUD_ACTION_BLOCKED:case e_.c.SIGNUP_RATE_LIMIT_EXCEEDED:case e_.c.USER_BANNED:e.setError(t);break;default:e.setError("Unable to complete action at this time. If the problem persists please contact support.")}await u.create({})}}()},[]);let ep=async(...e)=>{let r=et?.channel||(0,eY.oj)(e,c.preferredChannels,"identifier");if(r){let t=()=>{};e.push({id:"strategy",value:"phone_code",clearFeedback:t,setValue:t,onChange:t,setError:t}),e.push({id:"channel",value:r,clearFeedback:t,setValue:t,onChange:t,setError:t})}try{var n;let r,i,o=await (i=u.create(((!(r=(n=e).some(e=>"password"===e.name&&!!e.value))||a.enterpriseSSO.enabled)&&(n=n.filter(e=>"password"!==e.name)),{...(0,L.mK)(n),...r&&!a.enterpriseSSO.enabled&&{strategy:"password"}})),i.then(t=>{if(!a.enterpriseSSO.enabled)return t;let r=e.find(e=>"password"===e.name)?.value;return!r||t.supportedFirstFactors?.some(e=>"enterprise_sso"===e.strategy)?t:t.attemptFirstFactor({strategy:"password",password:r})}));switch(o.status){case"needs_identifier":o.supportedFirstFactors?.some(e=>"enterprise_sso"===e.strategy)&&await ef();break;case"needs_first_factor":if(!th(o)||eD(o.supportedFirstFactors))return h("factor-one");return ef();case"needs_second_factor":return h("factor-two");case"complete":return t.setActive({session:o.createdSessionId,navigate:async({session:e})=>{await S({session:e,redirectUrl:g})}});default:return void console.error((0,F.s)(o.status,v))}}catch(e){return eg(e)}},ef=async()=>{let e=(0,ew.uP)(f,i.signInUrl),t=f.afterSignInUrl||"/";return u.authenticateWithRedirect({strategy:"enterprise_sso",redirectUrl:e,redirectUrlComplete:t,oidcPrompt:f.oidcPrompt,continueSignIn:!0})},eg=async n=>{if(!n.errors)return;let o=n.errors.find(e=>e.code===e_.c.INVALID_STRATEGY_FOR_USER||e.code===e_.c.FORM_PASSWORD_INCORRECT||e.code===e_.c.FORM_PASSWORD_PWNED),s=n.errors.find(e=>e.code===e_.c.SESSION_EXISTS),l=n.errors.find(e=>"identifier_already_signed_in"===e.code),d=n.errors.find(e=>e.code===e_.c.INVITATION_ACCOUNT_NOT_EXISTS||e.code===e_.c.FORM_IDENTIFIER_NOT_FOUND);if(o)await ep(eh);else if(s)await t.setActive({session:t.client.lastActiveSessionId,navigate:async({session:e})=>{await S({session:e,redirectUrl:g})}});else if(l){let e=l.meta.sessionId;await t.setActive({session:e,navigate:async({session:e})=>{await S({session:e,redirectUrl:g})}})}else if(_&&d){let n=(0,eY.UY)(eh);if(a.signUp.mode===e_.f.WAITLIST)return h(t.buildWaitlistUrl("emailAddress"===n?{initialValues:{[n]:eh.value}}:{}));t.client.signUp[n]=eh.value;let o=(0,ew.uP)(f,i.signUpUrl),s=f.afterSignUpUrl||"/";return function({identifierAttribute:e,identifierValue:t,signUpMode:n,navigate:i,organizationTicket:a,afterSignUpUrl:o,clerk:s,handleError:l,redirectUrl:c,redirectUrlComplete:d,passwordEnabled:u,navigateOnSetActive:h,alternativePhoneCodeChannel:p}){var f,g;if(n===e_.f.WAITLIST)return i(s.buildWaitlistUrl("emailAddress"===e?{initialValues:{[e]:t}}:{}));s.client.signUp[e]=t;let m=new URLSearchParams;return(a&&m.set("__clerk_ticket",a),u||(f=s.client.signUp,g=e,f.optionalFields.filter(e=>!(e.startsWith("oauth_")||e.startsWith("web3_"))&&"enterprise_sso"!==e&&"password"!==e&&("phoneNumber"!==g||"phone_number"!==e)).length>0)||"emailAddress"!==e&&"phoneNumber"!==e)?i("create",{searchParams:m}):s.client.signUp.create({[e]:t,...p?{strategy:"phone_code",channel:p}:{}}).then(async e=>(await Promise.all([r.e("545"),r.e("666"),r.e("472")]).then(r.bind(r,8722)).then(e=>e.completeSignUpFlow))({signUp:e,verifyEmailPath:"create/verify-email-address",verifyPhonePath:"create/verify-phone-number",handleComplete:()=>s.setActive({session:e.createdSessionId,navigate:async({session:e})=>{await h({session:e,redirectUrl:o})}}),navigate:i,redirectUrl:c,redirectUrlComplete:d})).catch(e=>l(e))}({afterSignUpUrl:f.afterSignUpUrl||"/",clerk:t,handleError:t=>(0,D.H4)(t,[eh,ee],e.setError),identifierAttribute:n,identifierValue:eh.value,navigate:h,organizationTicket:W,signUpMode:a.signUp.mode,redirectUrl:o,redirectUrlComplete:s,navigateOnSetActive:S,passwordEnabled:a.attributes.password?.required??!1,alternativePhoneCodeChannel:et?.channel||(0,eY.iy)(c.preferredChannels,n,eh.value)})}else(0,D.H4)(n,[eh,ee],e.setError)},em=async e=>(e.preventDefault(),ep(eh,ee)),eI=(0,l.useMemo)(()=>({tel:P.l.PhoneInput,password:P.l.PasswordInput,text:P.l.PlainInput,email:P.l.PlainInput})[eh.type],[eh.type]);if(n.isLoading||"sign_up"===V)return(0,o.Y)(ea.B,{});let{action:eS,validLastAuthenticationStrategies:ev,...eb}=eh.props,eC=t.client?.lastAuthenticationStrategy,eA=!!eC&&w>1&&ev?.has(eC);return(0,o.Y)(p.n.Part,{part:"start",children:et?(0,o.Y)(tu,{handleSubmit:em,phoneNumberFormState:eu,onUseAnotherMethod:()=>{er(null)},phoneCodeProvider:et}):(0,o.FD)(y.Z.Root,{children:[(0,o.FD)(y.Z.Content,{children:[(0,o.FD)(E.Y.Root,{showLogo:!0,children:[(0,o.Y)(E.Y.Title,{localizationKey:_?(0,B.G)("signIn.start.titleCombined"):(0,B.G)("signIn.start.title")}),(0,o.Y)(E.Y.Subtitle,{localizationKey:_?(0,B.G)("signIn.start.subtitleCombined"):(0,B.G)("signIn.start.subtitle"),sx:{"&:empty":{display:"none"}}})]}),(0,o.Y)(y.Z.Alert,{children:e.error}),(0,o.FD)(z.fv,{elementDescriptor:O.$z.main,gap:6,children:[(0,o.FD)(ti.U,{children:[es&&(0,o.Y)(ek,{enableWeb3Providers:!0,enableOAuthProviders:!0,enableAlternativePhoneCodeProviders:en,onAlternativePhoneCodeProviderClick:e=>{er((0,eM.y)(e)||null)}}),q.length?(0,o.FD)(P.l.Root,{onSubmit:em,gap:8,children:[(0,o.FD)(z.fv,{gap:6,children:[(0,o.Y)(P.l.ControlRow,{elementId:eh.id,children:(0,o.Y)(eI,{actionLabel:Q?.action,onActionClicked:()=>{$(e=>b[(b.indexOf(e)+1)%b.length]),ec(!0),K(!1)},...eb,autoFocus:el,autoComplete:Y?"webauthn":void 0,isLastAuthenticationStrategy:eA})}),(0,o.Y)(tp,{field:j?ee:void 0})]}),(0,o.FD)(z.fv,{center:!0,children:[(0,o.Y)(ts.j,{}),(0,o.Y)(P.l.SubmitButton,{hasArrow:!0})]})]}):null]}),!q.length&&(0,o.Y)(ts.j,{}),a.attributes.passkey?.enabled&&a.passkeySettings.show_sign_in_button&&A&&(0,o.Y)(y.Z.Action,{elementId:"usePasskey",children:(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.start.actionLink__use_passkey"),onClick:()=>C({flow:"discoverable"})})})]})]}),(0,o.FD)(y.Z.Footer,{children:[a.signUp.mode===e_.f.PUBLIC&&!_&&(0,o.FD)(y.Z.Action,{elementId:"signIn",children:[(0,o.Y)(y.Z.ActionText,{localizationKey:(0,B.G)("signIn.start.actionText")}),(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.start.actionLink"),to:t.buildUrlWithAuth(m)})]}),a.signUp.mode===e_.f.WAITLIST&&(0,o.FD)(y.Z.Action,{elementId:"signIn",children:[(0,o.Y)(y.Z.ActionText,{localizationKey:(0,B.G)("signIn.start.actionText__join_waitlist")}),(0,o.Y)(y.Z.ActionLink,{localizationKey:(0,B.G)("signIn.start.actionLink__join_waitlist"),to:t.buildUrlWithAuth(I)})]})]})]})})})));function tg(){let e=(0,s.ho)();return l.useEffect(()=>{e.redirectToSignIn()},[]),null}function tm(){let e=(0,d.r)(),t=(0,u.X)();return(0,o.Y)(p.n.Root,{flow:"signIn",children:(0,o.FD)(I.d,{children:[(0,o.Y)(_.q,{path:"factor-one",children:(0,o.Y)(ej,{})}),(0,o.Y)(_.q,{path:"factor-two",children:(0,o.Y)(e3,{})}),(0,o.Y)(_.q,{path:"reset-password",children:(0,o.Y)(x,{})}),(0,o.Y)(_.q,{path:"reset-password-success",children:(0,o.Y)(V,{})}),(0,o.Y)(_.q,{path:"sso-callback",children:(0,o.Y)(tt,{signUpUrl:e.signUpUrl,signInUrl:e.signInUrl,signInForceRedirectUrl:e.afterSignInUrl,signUpForceRedirectUrl:e.afterSignUpUrl,continueSignUpUrl:e.signUpContinueUrl,transferable:e.transferable,firstFactorUrl:"../factor-one",secondFactorUrl:"../factor-two",resetPasswordUrl:"../reset-password"})}),(0,o.Y)(_.q,{path:"choose",children:(0,o.Y)(en,{})}),(0,o.Y)(_.q,{path:"verify",children:(0,o.Y)(c.Y,{redirectUrlComplete:e.afterSignInUrl,redirectUrl:"../factor-two"})}),e.isCombinedFlow&&(0,o.FD)(_.q,{path:"create",children:[(0,o.Y)(_.q,{path:"verify-email-address",canActivate:e=>!!e.client.signUp.emailAddress,children:(0,o.Y)(k,{})}),(0,o.Y)(_.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,o.Y)(b,{})}),(0,o.Y)(_.q,{path:"sso-callback",children:(0,o.Y)(C,{signUpUrl:t.signUpUrl,signInUrl:t.signInUrl,signUpForceRedirectUrl:t.afterSignUpUrl,signInForceRedirectUrl:t.afterSignInUrl,secondFactorUrl:t.secondFactorUrl,continueSignUpUrl:"../continue",verifyEmailAddressUrl:"../verify-email-address",verifyPhoneNumberUrl:"../verify-phone-number"})}),(0,o.Y)(_.q,{path:"verify",children:(0,o.Y)(c.M,{redirectUrlComplete:t.afterSignUpUrl,verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number",continuePath:"../continue"})}),(0,o.FD)(_.q,{path:"continue",children:[(0,o.Y)(_.q,{path:"verify-email-address",canActivate:e=>!!e.client.signUp.emailAddress,children:(0,o.Y)(k,{})}),(0,o.Y)(_.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,o.Y)(b,{})}),(0,o.Y)(_.q,{index:!0,children:(0,o.Y)(A,{})})]}),(0,o.Y)(_.q,{path:"tasks",children:(0,o.Y)(m.JJ,{redirectUrlComplete:e.afterSignUpUrl})}),(0,o.Y)(_.q,{index:!0,children:(0,o.Y)(Y,{})})]}),(0,o.Y)(_.q,{path:"tasks",children:(0,o.Y)(m.JJ,{redirectUrlComplete:e.afterSignInUrl})}),(0,o.Y)(_.q,{index:!0,children:(0,o.Y)(tf,{})}),(0,o.Y)(_.q,{children:(0,o.Y)(tg,{})})]})})}tm.displayName="SignIn";let tI=(0,h.Z)(function(){let e=(0,d.r)(),t={componentName:"SignUp",emailLinkRedirectUrl:e.emailLinkRedirectUrl,ssoCallbackUrl:e.ssoCallbackUrl,forceRedirectUrl:e.signUpForceRedirectUrl,fallbackRedirectUrl:e.signUpFallbackRedirectUrl,signInUrl:e.signInUrl,unsafeMetadata:e.unsafeMetadata,...(0,v.C)({routing:e?.routing,path:e?.path})};return((e=!1)=>(0,f.s)(e?w:void 0,"preloadComponent",{staleTime:1/0}))(e.isCombinedFlow),(0,g.Z)(),(0,o.Y)(u.g.Provider,{value:t,children:(0,o.Y)(tm,{})})}),t_=e=>{let t={signUpUrl:`/${S.I}/sign-up`,waitlistUrl:`/${S.I}/waitlist`,...e};return(0,o.Y)(_.q,{path:"sign-in",children:(0,o.Y)(d.Q.Provider,{value:{componentName:"SignIn",...t,routing:"virtual",mode:"modal"},children:(0,o.Y)("div",{children:(0,o.Y)(tI,{...t,routing:"virtual"})})})})}},5763:function(e,t,r){r.d(t,{Cm:()=>u,Kw:()=>f,R5:()=>h,UY:()=>g,iy:()=>I,oj:()=>m,xf:()=>c}),r(1044);var n=r(2620),i=r(7651),a=r(1959),o=r(8289);let s=e=>t=>"safeIdentifier"in t&&t.safeIdentifier===e;function l(e){if((0,n.Bz)()){let t=e.find(({strategy:e})=>"passkey"===e);if(t)return t}return null}function c(e,t,r){return e&&0!==e.length?r===a._o.Password?function(e,t){let r=l(e);if(r)return r;let n=e.sort(o.Kn)[0];return"password"===n.strategy?n:e.find(s(t))||n||null}(e,t):function(e,t){let r=l(e);if(r)return r;let n=e.sort(o.Ih),i=n.find(s(t));if(i)return i;let a=n[0];return"email_link"===a.strategy?a:e.find(s(t))||a||null}(e,t):null}let d=["passkey","email_code","password","phone_code","email_link"];function u(e){return!!e&&d.includes(e.strategy)}function h(e){if(!e||0===e.length)return null;let t=e.find(e=>"totp"===e.strategy);if(t)return t;let r=e.find(e=>"phone_code"===e.strategy);return r||e[0]}let p=["reset_password_phone_code","reset_password_email_code"],f=e=>!!e&&p.includes(e);function g(e){let t;return"tel"===e.type?"phoneNumber":(t=e.value,/^\S+@\S+\.\S+$/.test(t))?"emailAddress":"username"}let m=(e,t,r)=>{if(!t)return null;let n=e.find(e=>"strategy"===e.id)?.value;if(n&&"phone_code"!==n)return null;let a=e.find(e=>e.id===r)?.value;if(!a||!a?.startsWith("+"))return null;let o=(0,i.TV)(a,t);return"sms"===o?null:o},I=(e,t,r)=>{if(!e||!t||"phoneNumber"!==t||!r||!r?.startsWith("+"))return null;let n=(0,i.TV)(r,e);return"sms"===n?null:n}},4:function(e,t,r){r.d(t,{Q:()=>g,r:()=>m});var n=r(2166),i=r(8380),a=r(5580),o=r(4173),s=r(8909),l=r(5993),c=r(5074),d=r(8051),u=r(7697),h=r(2366),p=r(4964),f=r(2117);let g=(0,c.createContext)(null),m=()=>{let e=(0,c.useContext)(g),{navigate:t,basePath:r,startPath:m}=(0,p.r)(),{displayConfig:I,userSettings:_}=(0,u.O)(),{queryParams:S,queryString:v}=(0,p.r)(),w=_.signUp.mode,b=(0,h.II)(),k=(0,s.ho)();if(null===e||"SignIn"!==e.componentName)throw Error("Clerk: useSignInContext called outside of the mounted SignIn component.");let Y="restricted"!==w&&!!(!b.signUpUrl&&b.signInUrl&&!(0,l.s)(b.signInUrl))&&!1!==e.withSignUp||e.withSignUp||!1,{componentName:C,mode:A,...F}=e,y=(0,c.useMemo)(()=>(0,f.tf)(v,n.u),[]),U=new i.n(b,{...F,signInFallbackRedirectUrl:F.signInFallbackRedirectUrl||F.fallbackRedirectUrl,signInForceRedirectUrl:F.signInForceRedirectUrl||F.forceRedirectUrl},S,A);delete F.fallbackRedirectUrl,delete F.forceRedirectUrl;let P=k.buildUrlWithAuth(U.getAfterSignInUrl()),E=k.buildUrlWithAuth(U.getAfterSignUpUrl()),D="path"===F.routing&&F.path||b.signInUrl||I.signInUrl,M=Y?"path"===F.routing&&F.path||b.signUpUrl||I.signUpUrl:F.signUpUrl||b.signUpUrl||I.signUpUrl,L=F.waitlistUrl||b.waitlistUrl||I.waitlistUrl,T=U.getPreservedSearchParams();D=(0,o.kZ)({base:D,hashSearchParams:[S,T]},{stringify:!0}),M=(0,o.kZ)({base:M,hashSearchParams:[S,T]},{stringify:!0}),L=(0,o.kZ)({base:L,hashSearchParams:[S,T]},{stringify:!0});let G=U.toSearchParams().toString(),R=(0,d.aQ)({routing:F.routing,baseUrl:M,authQueryString:G,path:F.path,endpoint:Y?"/create"+d.Vu:d.Vu}),B=(0,d.aQ)({routing:F.routing,baseUrl:M,authQueryString:G,path:F.path,endpoint:Y?"/create"+d.aB:d.aB});Y&&(M=(0,o.kZ)({base:D,hashPath:"/create",hashSearchParams:[S,T]},{stringify:!0}));let z=(0,o.kZ)({base:M,hashPath:"/continue"},{stringify:!0}),O=async({session:e,redirectUrl:n})=>{let i=e.currentTask;if(!i)return t(n);let o=(0,a.ru)(i);return t(`/${r+m+(Y?"/create"+o:o)}`)},$=k.session?.currentTask?k.__internal_getOption("taskUrls")?.[k.session?.currentTask.key]??(0,d.aQ)({routing:F.routing,baseUrl:D,authQueryString:G,path:F.path,endpoint:Y?"/create"+(0,a.ru)(k.session?.currentTask):(0,a.ru)(k.session?.currentTask)}):null;return{...F,transferable:F.transferable??!0,oauthFlow:F.oauthFlow||"auto",componentName:C,signUpUrl:M,signInUrl:D,waitlistUrl:L,afterSignInUrl:P,afterSignUpUrl:E,emailLinkRedirectUrl:R,ssoCallbackUrl:B,navigateAfterSignIn:()=>t(P),signUpContinueUrl:z,queryParams:S,initialValues:{...F.initialValues,...y},authQueryString:G,isCombinedFlow:Y,navigateOnSetActive:O,taskUrl:$}}},9599:function(e,t,r){r.d(t,{g:()=>a});var n=r(8909),i=r(4964);let a=()=>{let{navigate:e}=(0,i.r)(),t=(0,n.ho)();return{navigateAfterSignOut:()=>e(t.buildAfterSignOutUrl()),navigateAfterMultiSessionSingleSignOutUrl:()=>e(t.buildAfterMultiSessionSingleSignOutUrl()),afterSignOutUrl:t.buildAfterSignOutUrl(),afterMultiSessionSingleSignOutUrl:t.buildAfterMultiSessionSingleSignOutUrl()}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["472"],{5763:function(e,r,t){t.d(r,{Cm:()=>u,Kw:()=>m,R5:()=>p,UY:()=>f,iy:()=>b,oj:()=>g,xf:()=>d}),t(1044);var i=t(2620),n=t(7651),a=t(1959),l=t(8289);let s=e=>r=>"safeIdentifier"in r&&r.safeIdentifier===e;function o(e){if((0,i.Bz)()){let r=e.find(({strategy:e})=>"passkey"===e);if(r)return r}return null}function d(e,r,t){return e&&0!==e.length?t===a._o.Password?function(e,r){let t=o(e);if(t)return t;let i=e.sort(l.Kn)[0];return"password"===i.strategy?i:e.find(s(r))||i||null}(e,r):function(e,r){let t=o(e);if(t)return t;let i=e.sort(l.Ih),n=i.find(s(r));if(n)return n;let a=i[0];return"email_link"===a.strategy?a:e.find(s(r))||a||null}(e,r):null}let c=["passkey","email_code","password","phone_code","email_link"];function u(e){return!!e&&c.includes(e.strategy)}function p(e){if(!e||0===e.length)return null;let r=e.find(e=>"totp"===e.strategy);if(r)return r;let t=e.find(e=>"phone_code"===e.strategy);return t||e[0]}let h=["reset_password_phone_code","reset_password_email_code"],m=e=>!!e&&h.includes(e);function f(e){let r;return"tel"===e.type?"phoneNumber":(r=e.value,/^\S+@\S+\.\S+$/.test(r))?"emailAddress":"username"}let g=(e,r,t)=>{if(!r)return null;let i=e.find(e=>"strategy"===e.id)?.value;if(i&&"phone_code"!==i)return null;let a=e.find(e=>e.id===t)?.value;if(!a||!a?.startsWith("+"))return null;let l=(0,n.TV)(a,r);return"sms"===l?null:l},b=(e,r,t)=>{if(!e||!r||"phoneNumber"!==r||!t||!t?.startsWith("+"))return null;let i=(0,n.TV)(t,e);return"sms"===i?null:i}},8480:function(e,r,t){t.r(r),t.d(r,{SignUp:()=>eI,SignUpContinue:()=>H,SignUpModal:()=>eY,SignUpSSOCallback:()=>er,SignUpVerifyEmail:()=>eS,SignUpVerifyPhone:()=>ey,SignUpStart:()=>em});var i=t(4518),n=t(8909),a=t(5074),l=t(7607),s=t(5873),o=t(5350),d=t(5577),c=t(4607),u=t(4096),p=t(7831),h=t(2265),m=t(4132),f=t(6088),g=t(3269),b=t(6153),_=t(6980),U=t(6760),v=t(4468),A=t(8640),S=t(4557),k=t(7697),y=t(6324),C=t(4),P=t(78),I=t(2861),Y=t(8272),N=t(8920),w=t(4964),F=t(2454),E=t(2689),q=t(6580),R=t(6142),G=t(7591);let L=e=>{let{handleSubmit:r,fields:t,formState:n,canToggleEmailPhone:a,onlyLegalAcceptedMissing:l=!1,handleEmailPhoneToggle:s}=e,{showOptionalFields:o}=(0,q.K)().parsedLayout,d=e=>("emailAddress"===e||"phoneNumber"===e)&&a?!!t[e]:!!t[e]&&(o||t[e]?.required);return(0,i.FD)(F.l.Root,{onSubmit:r,gap:8,children:[!l&&(0,i.FD)(Y.fv,{gap:6,children:[(d("firstName")||d("lastName"))&&(0,i.FD)(F.l.ControlRow,{elementId:"name",sx:{[G.g.sm]:{flexWrap:"wrap"}},children:[d("firstName")&&(0,i.Y)(F.l.PlainInput,{...n.firstName.props,isRequired:t.firstName?.required,isOptional:!t.firstName?.required}),d("lastName")&&(0,i.Y)(F.l.PlainInput,{...n.lastName.props,isRequired:t.lastName?.required,isOptional:!t.lastName?.required})]}),d("username")&&(0,i.Y)(F.l.ControlRow,{elementId:"username",children:(0,i.Y)(F.l.PlainInput,{...n.username.props,isRequired:t.username?.required,isOptional:!t.username?.required})}),d("emailAddress")&&(0,i.Y)(F.l.ControlRow,{elementId:"emailAddress",children:(0,i.Y)(F.l.PlainInput,{...n.emailAddress.props,isRequired:t.emailAddress?.required,isOptional:!t.emailAddress?.required,isDisabled:t.emailAddress?.disabled,actionLabel:a?(0,I.G)("signUp.start.actionLink__use_phone"):void 0,onActionClicked:a?()=>s("phoneNumber"):void 0})}),d("phoneNumber")&&(0,i.Y)(F.l.ControlRow,{elementId:"phoneNumber",children:(0,i.Y)(F.l.PhoneInput,{...n.phoneNumber.props,isRequired:t.phoneNumber?.required,isOptional:!t.phoneNumber?.required,actionLabel:a?(0,I.G)("signUp.start.actionLink__use_email"):void 0,onActionClicked:a?()=>s("emailAddress"):void 0})}),d("password")&&(0,i.Y)(F.l.ControlRow,{elementId:"password",children:(0,i.Y)(F.l.PasswordInput,{...n.password.props,isRequired:t.password?.required,isOptional:!t.password?.required})})]}),(0,i.FD)(Y.fv,{center:!0,children:[(0,i.Y)(R.j,{}),(0,i.FD)(Y.fv,{gap:6,sx:{width:"100%"},children:[d("legalAccepted")&&(0,i.Y)(F.l.ControlRow,{elementId:"legalAccepted",children:(0,i.Y)(E.d,{...n.legalAccepted.props,isRequired:t.legalAccepted?.required})}),(0,i.Y)(F.l.SubmitButton,{hasArrow:!0,localizationKey:(0,I.G)("formButtonPrimary")})]})]})]})};var T=t(1044);let D=["emailAddress","phoneNumber","username","firstName","lastName","password","ticket","legalAccepted"];function B(e){return D.reduce((r,t)=>{let i=function(e,r){switch(e){case"emailAddress":return function({attributes:e,hasTicket:r,hasEmail:t,activeCommIdentifierType:i,isProgressiveSignUp:n}){if(n){if(!((!r||r&&t)&&e.email_address?.enabled)||O(e,n)&&"emailAddress"!==i)return;let{emailShouldBeRequired:a}=Z(e);return{required:a,disabled:!!r&&!!t}}if((!r||r&&t)&&e.email_address?.enabled&&e.email_address?.used_for_first_factor&&"emailAddress"===i)return{required:!0,disabled:!!r&&!!t}}(r);case"phoneNumber":return function({attributes:e,hasTicket:r,activeCommIdentifierType:t,isProgressiveSignUp:i}){if(i){if(!e.phone_number?.enabled||O(e,i)&&"phoneNumber"!==t)return;let{phoneShouldBeRequired:r}=Z(e);return{required:r}}if(!r&&e.phone_number?.enabled&&e.phone_number.used_for_first_factor&&"phoneNumber"===t)return{required:!0}}(r);case"password":var t=r.attributes;if(t.password?.enabled&&t.password.required)return{required:!!t.password?.required};return;case"ticket":var i=r.hasTicket;if(i)return{required:!0};return;case"legalAccepted":var n=r.legalConsentRequired;if(n)return{required:!0};return;case"username":case"firstName":case"lastName":var a=e,l=r.attributes;let s=(0,T.C8)(a);if(l[s]?.enabled)return{required:l[s]?.required};return;default:return}}(t,e);return i&&(r[t]=i),r},{})}let M=(e,r,t)=>{if(t?.emailAddress)return"emailAddress";if(t?.phoneNumber)return"phoneNumber";if(O(e,r))return"emailAddress";let{email_address:i,phone_number:n}=e;return(i?.enabled&&r?i.required:i?.used_for_first_factor)?"emailAddress":(n?.enabled&&r?n.required:n?.used_for_first_factor)?"phoneNumber":null};function O(e,r){let{email_address:t,phone_number:i}=e;return!!(r?t?.enabled&&i?.enabled&&!t.required&&!i.required:t?.used_for_first_factor&&i?.used_for_first_factor)}let x={mirrorServer:[e=>!e.passwordRequired,e=>e.email.required||e.phone.required||e.username.required&&e.username.firstFactor],none:[e=>!e.email.enabled&&!e.phone.enabled&&!e.username.enabled],email:[e=>e.email.enabled&&!e.phone.enabled&&!e.username.enabled,e=>e.email.enabled&&!e.email.required&&e.phone.enabled&&!e.phone.required,e=>e.username.firstFactor&&!e.username.required&&e.email.enabled&&!e.email.required,e=>e.username.required&&!e.username.firstFactor&&e.email.enabled&&e.phone.enabled],phone:[e=>e.phone.enabled&&!e.email.required&&!e.phone.required,e=>e.username.firstFactor&&!e.username.required&&e.phone.enabled&&!e.phone.required,e=>e.phone.firstFactor&&!e.email.firstFactor&&!e.username.firstFactor,e=>e.username.required&&!e.username.firstFactor&&e.phone.enabled&&e.email.enabled,e=>!e.email.enabled&&e.phone.enabled&&e.username.enabled],username:[e=>e.username.enabled&&e.username.firstFactor&&!e.email.enabled&&!e.phone.enabled,e=>e.username.required&&!e.username.firstFactor&&e.email.enabled&&e.phone.enabled]};function Z(e){let r={passwordRequired:!!(e.password?.enabled&&e.password.required),email:{enabled:!!e.email_address?.enabled,required:!!e.email_address?.required,firstFactor:!!e.email_address?.used_for_first_factor},phone:{enabled:!!e.phone_number?.enabled,required:!!e.phone_number?.required,firstFactor:!!e.phone_number?.used_for_first_factor},username:{enabled:!!e.username?.enabled,required:!!e.username?.required,firstFactor:!!e.username?.used_for_first_factor}},t=e=>x[e].some(e=>e(r));if(t("mirrorServer"))return{emailShouldBeRequired:r.email.required,phoneShouldBeRequired:r.phone.required,usernameShouldBeRequired:r.username.required};if(t("none"))return{emailShouldBeRequired:!1,phoneShouldBeRequired:!1,usernameShouldBeRequired:!1};let i=t("email"),n=t("phone"),a=t("username");return!r.passwordRequired||i||n||a?{emailShouldBeRequired:i,phoneShouldBeRequired:n,usernameShouldBeRequired:a}:{emailShouldBeRequired:!0,phoneShouldBeRequired:!1,usernameShouldBeRequired:!1}}var V=t(44),K=t(9236),z=t(5715);let W=a.memo(e=>{let r=(0,n.ho)(),{navigate:t}=(0,w.r)(),a=(0,g.f0)(),l=(0,o.X)(),s=(0,y.B)(),d=l.ssoCallbackUrl,c=l.afterSignUpUrl||"/",u="popup"===l.oauthFlow||"auto"===l.oauthFlow&&(0,V.C)(),{continueSignUp:p=!1,onAlternativePhoneCodeProviderClick:h,...m}=e;return(0,i.Y)(z.V,{...m,showLastAuthenticationStrategy:!1,idleAfterDelay:!u,oauthCallback:r=>{if(u){let t=window.open("about:blank","","width=600,height=800"),i=setInterval(()=>{(!t||t.closed)&&(clearInterval(i),a.setIdle())},500);return s.authenticateWithPopup({strategy:r,redirectUrl:d,redirectUrlComplete:c,popup:t,continueSignUp:p,unsafeMetadata:l.unsafeMetadata,legalAccepted:e.legalAccepted,oidcPrompt:l.oidcPrompt}).catch(e=>(0,v.H4)(e,[],a.setError))}return s.authenticateWithRedirect({continueSignUp:p,redirectUrl:d,redirectUrlComplete:c,strategy:r,unsafeMetadata:l.unsafeMetadata,legalAccepted:e.legalAccepted,oidcPrompt:l.oidcPrompt}).catch(e=>(0,v.H4)(e,[],a.setError))},web3Callback:i=>r.authenticateWithWeb3({customNavigate:t,redirectUrl:c,signUpContinueUrl:"continue",unsafeMetadata:l.unsafeMetadata,strategy:i,legalAccepted:e.legalAccepted}).catch(e=>(0,K.f)(e,a.setError)),alternativePhoneCodeCallback:e=>{h?.(e)}})});var $=t(1687);let H=(0,g.dm)(function(){let e=(0,g.f0)(),r=(0,n.ho)(),{navigate:t}=(0,w.r)(),{displayConfig:l,userSettings:s}=(0,k.O)(),{attributes:d,usernameSettings:u}=s,{t:p,locale:h}=(0,P._)(),{afterSignUpUrl:m,signInUrl:F,unsafeMetadata:E,initialValues:q={},isCombinedFlow:R,navigateOnSetActive:G}=(0,o.X)(),T=(0,y.B)(),D=!!a.useContext(C.Q),x=!!(R&&D),Z=s.signUp.progressive,[V,K]=a.useState(M(d,s.signUp.progressive)),z=(0,o.X)(),H={firstName:(0,A.tJ)("firstName",q.firstName||"",{type:"text",label:(0,I.G)("formFieldLabel__firstName"),placeholder:(0,I.G)("formFieldInputPlaceholder__firstName")}),lastName:(0,A.tJ)("lastName",q.lastName||"",{type:"text",label:(0,I.G)("formFieldLabel__lastName"),placeholder:(0,I.G)("formFieldInputPlaceholder__lastName")}),emailAddress:(0,A.tJ)("emailAddress",q.emailAddress||T.emailAddress||"",{type:"email",label:(0,I.G)("formFieldLabel__emailAddress"),placeholder:(0,I.G)("formFieldInputPlaceholder__emailAddress")}),username:(0,A.tJ)("username",q.username||"",{type:"text",label:(0,I.G)("formFieldLabel__username"),placeholder:(0,I.G)("formFieldInputPlaceholder__username"),transformer:e=>e.trim(),buildErrorMessage:e=>(0,S.Z)(e,{t:p,locale:h,usernameSettings:u})}),phoneNumber:(0,A.tJ)("phoneNumber",q.phoneNumber||"",{type:"tel",label:(0,I.G)("formFieldLabel__phoneNumber"),placeholder:(0,I.G)("formFieldInputPlaceholder__phoneNumber")}),password:(0,A.tJ)("password","",{type:"password",label:(0,I.G)("formFieldLabel__password"),placeholder:(0,I.G)("formFieldInputPlaceholder__password"),validatePassword:!0}),legalAccepted:(0,A.tJ)("legalAccepted","",{type:"checkbox",label:"",defaultChecked:!1,isRequired:s.signUp.legal_consent_enabled||!1})},J=(0,a.useMemo)(()=>T.missingFields&&1===T.missingFields.length&&"legal_accepted"===T.missingFields[0]&&T.unverifiedFields&&0===T.unverifiedFields.length,[T.missingFields,T.unverifiedFields]);if((0,a.useEffect)(()=>{T.id||!0===r.__internal_setActiveInProgress||t(l.signUpUrl)},[]),!T.id)return(0,i.Y)(_.B,{});let X=!!H.emailAddress.value,j=T.verifications?.externalAccount?.status=="verified",Q=B({attributes:d,hasEmail:X,activeCommIdentifierType:V,signUp:T,isProgressiveSignUp:Z,legalConsentRequired:s.signUp.legal_consent_enabled});!function(e,r){if(r){let t=!!r.emailAddress,i=r.verifications?.emailAddress?.status==="verified",n=r.verifications?.phoneNumber?.status==="verified",a=r.verifications?.externalAccount?.status==="verified",l=r.verifications?.web3Wallet?.status==="verified",s=null!==r.legalAcceptedAt;t&&i&&delete e.emailAddress,n&&delete e.phoneNumber,(a||l)&&delete e.password,r.firstName&&delete e.firstName,r.lastName&&delete e.lastName,r.username&&delete e.username,s&&delete e.legalAccepted,Object.entries(e).forEach(([r,t])=>{t&&!t.required&&delete e[r]})}}(Q,T);let ee=s.authenticatableSocialStrategies,er=async i=>{i.preventDefault();let n=Object.entries(Q).reduce((e,[r,t])=>[...e,...t&&H[r]?[H[r]]:[]],[]);E&&n.push({id:"unsafeMetadata",value:E});let a=!!n.find(e=>"emailAddress"===e.id)?.value,l=!!n.find(e=>"phoneNumber"===e.id)?.value;return T.missingFields.includes("email_address")&&T.missingFields.includes("phone_number")&&!a&&!l&&O(d,Z)&&(n.push(H.emailAddress),n.push(H.phoneNumber)),e.setLoading(),e.setError(void 0),T.update((0,A.mK)(n)).then(e=>(0,$.A)({signUp:e,verifyEmailPath:"./verify-email-address",verifyPhonePath:"./verify-phone-number",handleComplete:()=>r.setActive({session:e.createdSessionId,navigate:async({session:e})=>{await G({session:e,redirectUrl:m})}}),navigate:t,oidcPrompt:z.oidcPrompt})).catch(r=>(0,v.H4)(r,n,e.setError)).finally(()=>e.setIdle())},et=O(d,Z),ei=!j&&ee.length>0,en=J?(0,I.G)("signUp.legalConsent.continue.title"):(0,I.G)("signUp.continue.title"),ea=J?(0,I.G)("signUp.legalConsent.continue.subtitle"):(0,I.G)("signUp.continue.subtitle");return(0,i.Y)(c.n.Part,{part:"complete",children:(0,i.FD)(f.Z.Root,{children:[(0,i.FD)(f.Z.Content,{children:[(0,i.FD)(b.Y.Root,{showLogo:!0,children:[(0,i.Y)(b.Y.Title,{localizationKey:en}),(0,i.Y)(b.Y.Subtitle,{localizationKey:ea})]}),(0,i.Y)(f.Z.Alert,{children:e.error}),(0,i.Y)(Y.so,{direction:"col",elementDescriptor:N.$z.main,gap:8,children:(0,i.FD)(U.U,{children:[ei&&!J&&(0,i.Y)(W,{enableOAuthProviders:ei,enableWeb3Providers:!1,enableAlternativePhoneCodeProviders:!1,continueSignUp:!0}),(0,i.Y)(L,{handleSubmit:er,fields:Q,formState:H,onlyLegalAcceptedMissing:J,canToggleEmailPhone:et,handleEmailPhoneToggle:e=>{O(d,Z)&&K(e)}})]})})]}),(0,i.Y)(f.Z.Footer,{children:x?null:(0,i.FD)(f.Z.Action,{elementId:"signUp",children:[(0,i.Y)(f.Z.ActionText,{localizationKey:(0,I.G)("signUp.continue.actionText")}),(0,i.Y)(f.Z.ActionLink,{localizationKey:(0,I.G)("signUp.continue.actionLink"),to:x?"../../":r.buildUrlWithAuth(F)})]})})]})})});var J=t(656),X=t(7420),j=t(7896);let Q=(0,J.Ai)((0,g.dm)(()=>{let e=(0,n.ho)(),r=(0,o.X)(),t=e.client.signUp,{data:a,isLoading:l}=(0,j.s)(t?.__experimental_getEnterpriseConnections,{signUpId:t.id});return l||a?.length?(0,i.Y)(c.n.Part,{part:"enterpriseConnections",children:a?.length?(0,i.Y)(X.l,{title:(0,I.G)("signUp.enterpriseConnections.title"),subtitle:(0,I.G)("signUp.enterpriseConnections.subtitle"),onClick:e=>{let i=r.ssoCallbackUrl,n=r.afterSignUpUrl||"/";return t.authenticateWithRedirect({strategy:"enterprise_sso",redirectUrl:i,redirectUrlComplete:n,continueSignUp:!0,enterpriseConnectionId:e})},enterpriseConnections:a}):l?(0,i.Y)(_.B,{}):null}):null}));var ee=t(6126);let er=(0,J.p)((0,J.Ai)(ee.F));var et=t(1652),ei=t(3610),en=t(2166),ea=t(4670),el=t(3990),es=t(4901),eo=t(5763),ed=t(9426),ec=t(2782);let eu=()=>{let e=(0,n.ho)(),r=(0,g.f0)(),{navigate:t}=(0,w.r)(),{signInUrl:a,waitlistUrl:l}=(0,o.X)(),s=(0,ed.p)(),{userSettings:d}=(0,k.O)(),{mode:c}=d.signUp,u=async()=>{await t(e.buildUrlWithAuth(l))},p=c===en.f.RESTRICTED?(0,I.G)("signUp.restrictedAccess.subtitle"):(0,I.G)("signUp.restrictedAccess.subtitleWaitlist");return(0,i.FD)(f.Z.Root,{children:[(0,i.FD)(f.Z.Content,{children:[(0,i.FD)(b.Y.Root,{showLogo:!0,children:[(0,i.Y)(Y.In,{icon:ec.A,sx:e=>({margin:"auto",width:e.sizes.$10,height:e.sizes.$10})}),(0,i.Y)(b.Y.Title,{localizationKey:(0,I.G)("signUp.restrictedAccess.title")}),(0,i.Y)(b.Y.Subtitle,{localizationKey:p})]}),(0,i.Y)(f.Z.Alert,{children:r.error}),c===en.f.RESTRICTED&&s&&(0,i.Y)(Y.so,{direction:"col",gap:4,children:(0,i.Y)(Y.$n,{localizationKey:(0,I.G)("signUp.restrictedAccess.blockButton__emailSupport"),onClick:()=>{window.location.href=`mailto:${s}`}})}),c===en.f.WAITLIST&&(0,i.Y)(Y.so,{direction:"col",gap:4,children:(0,i.Y)(Y.$n,{localizationKey:(0,I.G)("signUp.restrictedAccess.blockButton__joinWaitlist"),onClick:u})})]}),(0,i.Y)(f.Z.Footer,{children:(0,i.FD)(f.Z.Action,{elementId:"signUp",children:[(0,i.Y)(f.Z.ActionText,{localizationKey:(0,I.G)("signUp.restrictedAccess.actionText")}),(0,i.Y)(f.Z.ActionLink,{localizationKey:(0,I.G)("signUp.restrictedAccess.actionLink"),to:e.buildUrlWithAuth(a)})]})})]})};var ep=t(9835);let eh=e=>{let{handleSubmit:r,fields:t,formState:n,onUseAnotherMethod:a,phoneCodeProvider:l}=e,{providerToDisplayData:s,strategyToDisplayData:o}=(0,ep.k)(),d=l.name,c=l.channel,u=(0,g.f0)();return(0,i.Y)(f.Z.Root,{children:(0,i.FD)(f.Z.Content,{children:[(0,i.FD)(b.Y.Root,{showLogo:!0,showDivider:!0,children:[(0,i.Y)(Y.fv,{center:!0,children:(0,i.Y)(Y._V,{src:s[l.channel]?.iconUrl,alt:`${o[c].name} logo`,sx:e=>({width:e.sizes.$7,height:e.sizes.$7,maxWidth:"100%",marginBottom:e.sizes.$6})})}),(0,i.Y)(b.Y.Title,{localizationKey:(0,I.G)("signUp.start.alternativePhoneCodeProvider.title",{provider:d})}),(0,i.Y)(b.Y.Subtitle,{localizationKey:(0,I.G)("signUp.start.alternativePhoneCodeProvider.subtitle",{provider:d})})]}),(0,i.Y)(f.Z.Alert,{children:u.error}),(0,i.Y)(Y.so,{direction:"col",elementDescriptor:N.$z.main,gap:6,children:(0,i.FD)(F.l.Root,{onSubmit:r,gap:8,children:[(0,i.Y)(Y.fv,{gap:6,children:(0,i.Y)(F.l.ControlRow,{elementId:"phoneNumber",children:(0,i.Y)(F.l.PhoneInput,{...n.phoneNumber.props,label:(0,I.G)("signUp.start.alternativePhoneCodeProvider.label",{provider:d||""}),isRequired:!0,isOptional:!1,actionLabel:void 0,onActionClicked:void 0})})}),(0,i.FD)(Y.fv,{center:!0,children:[(0,i.Y)(R.j,{}),(0,i.FD)(Y.fv,{gap:6,sx:{width:"100%"},children:[!!t.legalAccepted&&t.legalAccepted?.required&&(0,i.Y)(F.l.ControlRow,{elementId:"legalAccepted",children:(0,i.Y)(E.d,{...n.legalAccepted.props,isRequired:t.legalAccepted?.required})}),(0,i.Y)(F.l.SubmitButton,{hasArrow:!0,localizationKey:(0,I.G)("formButtonPrimary")})]})]}),(0,i.Y)(Y.fv,{center:!0,children:(0,i.Y)(Y.$n,{variant:"link",colorScheme:"neutral",onClick:a,localizationKey:(0,I.G)("signUp.start.alternativePhoneCodeProvider.actionLink")})})]})})]})})},em=(0,J.p)((0,J.Ai)((0,g.dm)(function(){let e=(0,g.f0)(),r=(0,n.ho)(),t=(0,es.m)(),l=(0,y.B)(),{showOptionalFields:s}=(0,q.K)().parsedLayout,{userSettings:d,authConfig:u}=(0,k.O)(),{navigate:p}=(0,w.r)(),{attributes:h}=d,{setActive:m}=(0,n.ho)(),F=(0,o.X)(),E=!!a.useContext(C.Q),{afterSignUpUrl:G,signInUrl:T,unsafeMetadata:D,navigateOnSetActive:x}=F,Z=!!(F.isCombinedFlow&&E),[V,K]=a.useState(()=>M(h,d.signUp.progressive,{phoneNumber:F.initialValues?.phoneNumber===null?void 0:F.initialValues?.phoneNumber,emailAddress:F.initialValues?.emailAddress===null?void 0:F.initialValues?.emailAddress,...Z?{emailAddress:l.emailAddress,phoneNumber:l.phoneNumber}:{}})),{t:z,locale:H}=(0,P._)(),J=F.initialValues||{},[X,j]=a.useState(null),[Q,ee]=a.useState(!1),{userSettings:{passwordSettings:er,usernameSettings:ed}}=(0,k.O)(),{mode:ec}=d.signUp,ep={firstName:(0,A.tJ)("firstName",l.firstName||J.firstName||"",{type:"text",label:(0,I.G)("formFieldLabel__firstName"),placeholder:(0,I.G)("formFieldInputPlaceholder__firstName")}),lastName:(0,A.tJ)("lastName",l.lastName||J.lastName||"",{type:"text",label:(0,I.G)("formFieldLabel__lastName"),placeholder:(0,I.G)("formFieldInputPlaceholder__lastName")}),emailAddress:(0,A.tJ)("emailAddress",l.emailAddress||J.emailAddress||"",{type:"email",label:(0,I.G)("formFieldLabel__emailAddress"),placeholder:(0,I.G)("formFieldInputPlaceholder__emailAddress")}),username:(0,A.tJ)("username",l.username||J.username||"",{type:"text",label:(0,I.G)("formFieldLabel__username"),placeholder:(0,I.G)("formFieldInputPlaceholder__username"),transformer:e=>e.trim(),buildErrorMessage:e=>(0,S.Z)(e,{t:z,locale:H,usernameSettings:ed})}),phoneNumber:(0,A.tJ)("phoneNumber",l.phoneNumber||J.phoneNumber||"",{type:"tel",label:(0,I.G)("formFieldLabel__phoneNumber"),placeholder:(0,I.G)("formFieldInputPlaceholder__phoneNumber")}),legalAccepted:(0,A.tJ)("legalAccepted","",{type:"checkbox",label:"",defaultChecked:!1,isRequired:d.signUp.legal_consent_enabled||!1}),password:(0,A.tJ)("password","",{type:"password",label:(0,I.G)("formFieldLabel__password"),placeholder:(0,I.G)("formFieldInputPlaceholder__password"),validatePassword:!0,buildErrorMessage:e=>(0,el.C5)(e,{t:z,locale:H,passwordSettings:er})}),ticket:(0,A.tJ)("ticket",(0,ea.n)("__clerk_ticket")||(0,ea.n)("__clerk_invitation_token")||"")},em=!!ep.ticket.value,ef=!!(l.id&&null!==l.status&&((0,ea.n)("__clerk_ticket")||(0,ea.n)("__clerk_invitation_token"))),eg=!!ep.emailAddress.value,eb=d.signUp.progressive,e_=d.signUp.legal_consent_enabled,eU=F.oidcPrompt,ev=B({attributes:h,hasTicket:em||ef,hasEmail:eg,activeCommIdentifierType:V,isProgressiveSignUp:eb,legalConsentRequired:e_});a.useLayoutEffect(()=>{ep.ticket.value&&(t.setLoading(),e.setLoading(),l.create({strategy:"ticket",ticket:ep.ticket.value}).then(e=>{ep.emailAddress.setValue(e.emailAddress||""),"missing_requirements"===e.status&&ee(!0);let r=F.ssoCallbackUrl,t=F.afterSignUpUrl||"/";return(0,$.A)({signUp:e,redirectUrl:r,redirectUrlComplete:t,verifyEmailPath:"verify-email-address",verifyPhonePath:"verify-phone-number",continuePath:"continue",handleComplete:()=>((0,ea.r)("__clerk_ticket"),(0,ea.r)("__clerk_invitation_token"),m({session:e.createdSessionId,navigate:async({session:e})=>{await x({session:e,redirectUrl:G})}})),navigate:p,oidcPrompt:eU})}).catch(r=>{ep.ticket.setValue(""),(0,v.H4)(r,[],e.setError)}).finally(()=>{l.missingFields.some(e=>"enterprise_sso"===e)||(t.setIdle(),e.setIdle())}))},[]),a.useEffect(()=>{!async function(){let r=l.verifications.externalAccount.error;if(r){switch(r.code){case en.c.NOT_ALLOWED_TO_SIGN_UP:case en.c.OAUTH_ACCESS_DENIED:case en.c.NOT_ALLOWED_ACCESS:case en.c.SAML_USER_ATTRIBUTE_MISSING:case en.c.OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:case en.c.USER_LOCKED:case en.c.ENTERPRISE_SSO_USER_ATTRIBUTE_MISSING:case en.c.ENTERPRISE_SSO_EMAIL_ADDRESS_DOMAIN_MISMATCH:case en.c.ENTERPRISE_SSO_HOSTED_DOMAIN_MISMATCH:case en.c.SAML_EMAIL_ADDRESS_DOMAIN_MISMATCH:case en.c.ORGANIZATION_MEMBERSHIP_QUOTA_EXCEEDED_FOR_SSO:case en.c.CAPTCHA_INVALID:case en.c.FRAUD_DEVICE_BLOCKED:case en.c.FRAUD_ACTION_BLOCKED:case en.c.SIGNUP_RATE_LIMIT_EXCEEDED:case en.c.USER_BANNED:e.setError(r);break;default:e.setError("Unable to complete action at this time. If the problem persists please contact support.")}await l.create({})}}()},[]);let eA=async r=>{r.preventDefault();let t=Object.entries(ev).reduce((e,[r,t])=>(e.push(...t&&ep[r]?[ep[r]]:[]),e),[]);if(D&&t.push({id:"unsafeMetadata",value:D}),ev.ticket||ef){let e=()=>{};if(t.push({id:"strategy",value:"ticket",clearFeedback:e,setValue:e,onChange:e,setError:e}),!ep.ticket.value&&ef){let r=(0,ea.n)("__clerk_ticket")||(0,ea.n)("__clerk_invitation_token");r&&t.push({id:"ticket",value:r,clearFeedback:e,setValue:e,onChange:e,setError:e})}}let i=X?.channel||(0,eo.oj)(t,u.preferredChannels,"phoneNumber");if(i){let e=()=>{};t.push({id:"strategy",value:"phone_code",clearFeedback:e,setValue:e,onChange:e,setError:e}),t.push({id:"channel",value:i,clearFeedback:e,setValue:e,onChange:e,setError:e})}let n=!!t.find(e=>"emailAddress"===e.id)?.value,a=!!t.find(e=>"phoneNumber"===e.id)?.value;!n&&!a&&O(h,eb)&&(t.push(ep.emailAddress),t.push(ep.phoneNumber)),e.setLoading(),e.setError(void 0);let s=F.ssoCallbackUrl,o=F.afterSignUpUrl||"/";return(ev.ticket||ef?l.upsert((0,A.mK)(t)):l.create((0,A.mK)(t))).then(e=>(0,$.A)({signUp:e,verifyEmailPath:"verify-email-address",verifyPhonePath:"verify-phone-number",handleComplete:()=>m({session:e.createdSessionId,navigate:async({session:e})=>{await x({session:e,redirectUrl:G})}}),navigate:p,redirectUrl:s,redirectUrlComplete:o,oidcPrompt:eU})).catch(r=>(0,ei.$R)(r)&&r.errors?.[0]?.code==="enterprise_connection_id_is_required_with_multiple_connections"?p("./enterprise-connections"):(0,v.H4)(r,t,e.setError)).finally(()=>e.setIdle())};if(t.isLoading)return(0,i.Y)(_.B,{});let eS=O(h,eb),ek=Object.entries(ev).filter(([e,r])=>s||r?.required),ey=function(e){let{authenticatableSocialStrategies:r,web3FirstFactors:t}=e;return e.hasValidAuthFactor||!r.length&&!t.length}(d)&&ek.length>0,eC=(!(em||ef)||Q)&&d.authenticatableSocialStrategies.length>0,eP=!(em||ef)&&d.web3FirstFactors.length>0,eI=!(em||ef)&&d.alternativePhoneCodeChannels.length>0;return ec===en.f.PUBLIC||em||ef?(0,i.Y)(c.n.Part,{part:"start",children:X?(0,i.Y)(eh,{handleSubmit:eA,fields:ev,formState:ep,onUseAnotherMethod:()=>{j(null)},phoneCodeProvider:X}):(0,i.FD)(f.Z.Root,{children:[(0,i.FD)(f.Z.Content,{children:[(0,i.FD)(b.Y.Root,{showLogo:!0,children:[(0,i.Y)(b.Y.Title,{localizationKey:Z?(0,I.G)("signUp.start.titleCombined"):(0,I.G)("signUp.start.title")}),(0,i.Y)(b.Y.Subtitle,{localizationKey:Z?(0,I.G)("signUp.start.subtitleCombined"):(0,I.G)("signUp.start.subtitle")})]}),(0,i.Y)(f.Z.Alert,{children:e.error}),(0,i.FD)(Y.so,{direction:"col",elementDescriptor:N.$z.main,gap:6,children:[(0,i.FD)(U.U,{children:[(eC||eP||eI)&&(0,i.Y)(W,{enableOAuthProviders:eC,enableWeb3Providers:eP,enableAlternativePhoneCodeProviders:eI,onAlternativePhoneCodeProviderClick:e=>{j((0,et.y)(e)||null)},continueSignUp:Q,legalAccepted:!!ep.legalAccepted.checked||void 0}),ey&&(0,i.Y)(L,{handleSubmit:eA,fields:ev,formState:ep,canToggleEmailPhone:eS,handleEmailPhoneToggle:e=>{O(h,eb)&&K(e)}})]}),!ey&&(0,i.Y)(R.j,{})]})]}),(0,i.Y)(f.Z.Footer,{children:(0,i.FD)(f.Z.Action,{elementId:"signUp",children:[(0,i.Y)(f.Z.ActionText,{localizationKey:(0,I.G)("signUp.start.actionText")}),(0,i.Y)(f.Z.ActionLink,{localizationKey:(0,I.G)("signUp.start.actionLink"),to:Z?"../":r.buildUrlWithAuth(T)})]})})]})}):(0,i.Y)(eu,{})})));var ef=t(7912);let eg=e=>{let{afterSignUpUrl:r,navigateOnSetActive:t,isCombinedFlow:l}=(0,o.X)(),{setActive:s}=(0,n.ho)(),{navigate:d}=(0,w.r)(),c=!!(a.useContext(C.Q)&&l);return(0,i.Y)(ef.j,{cardTitle:e.cardTitle,cardSubtitle:e.cardSubtitle,resendButton:e.resendButton,onCodeEntryFinishedAction:(i,n,a)=>{e.attempt(i).then(async e=>(await n(),(0,$.A)({signUp:e,verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number",continuePath:"../continue",handleComplete:()=>s({session:e.createdSessionId,navigate:async({session:e})=>{await t({session:e,redirectUrl:r})}}),navigate:d}))).catch(e=>a(e))},onResendCodeClicked:e.prepare,safeIdentifier:e.safeIdentifier,onIdentityPreviewEditClicked:()=>d(c?"../../":"../",{searchParams:(0,ea.t)()}),alternativeMethodsLabel:e.alternativeMethodsLabel,onShowAlternativeMethodsClicked:e.onShowAlternativeMethodsClicked,showAlternativeMethods:e.showAlternativeMethods})},eb=()=>{let e=(0,y.B)(),r=(0,g.f0)(),t=e.verifications.emailAddress.status,n=!e.status||"verified"===t;return(0,j.s)(n?void 0:()=>e.prepareEmailAddressVerification({strategy:"email_code"}),{name:"prepare",strategy:"email_code",number:e.emailAddress},{staleTime:100,onError:e=>(0,v.H4)(e,[],r.setError)}),(0,i.Y)(c.n.Part,{part:"emailCode",children:(0,i.Y)(eg,{cardTitle:(0,I.G)("signUp.emailCode.title"),cardSubtitle:(0,I.G)("signUp.emailCode.subtitle"),inputLabel:(0,I.G)("signUp.emailCode.formSubtitle"),resendButton:(0,I.G)("signUp.emailCode.resendButton"),prepare:()=>{if(!n)return e.prepareEmailAddressVerification({strategy:"email_code"}).catch(e=>(0,v.H4)(e,[],r.setError))},attempt:r=>e.attemptEmailAddressVerification({code:r}),safeIdentifier:e.emailAddress})})};var e_=t(2027),eU=t(4979),ev=t(2992);let eA=()=>{let{t:e}=(0,P._)(),r=(0,y.B)(),t=(0,o.X)(),{afterSignUpUrl:l,navigateOnSetActive:s}=t,d=(0,g.f0)(),{navigate:u}=(0,w.r)(),{setActive:p}=(0,n.ho)(),[h,m]=a.useState(!1),{startEmailLinkFlow:f,cancelEmailLinkFlow:b}=(0,ev.u)(r);a.useEffect(()=>{_()},[]);let _=()=>f({redirectUrl:t.emailLinkRedirectUrl}).then(e=>U(e)).catch(e=>{(0,v.H4)(e,[],d.setError)}),U=async r=>{let t=r.verifications.emailAddress;"expired"===t.status?d.setError(e((0,I.G)("formFieldError__verificationLinkExpired"))):t.verifiedFromTheSameClient()?m(!0):await (0,$.A)({signUp:r,continuePath:"../continue",verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number",handleComplete:()=>p({session:r.createdSessionId,navigate:async({session:e})=>{await s({session:e,redirectUrl:l})}}),navigate:u})};return h?(0,i.Y)(eU.$,{title:(0,I.G)("signUp.emailLink.verifiedSwitchTab.title"),subtitle:(0,I.G)("signUp.emailLink.verifiedSwitchTab.subtitleNewTab"),status:"verified_switch_tab"}):(0,i.Y)(c.n.Part,{part:"emailLink",children:(0,i.Y)(e_._,{cardTitle:(0,I.G)("signUp.emailLink.title"),cardSubtitle:(0,I.G)("signUp.emailLink.subtitle"),formTitle:(0,I.G)("signUp.emailLink.formTitle"),formSubtitle:(0,I.G)("signUp.emailLink.formSubtitle"),resendButton:(0,I.G)("signUp.emailLink.resendButton"),onResendCodeClicked:()=>{b(),_()},safeIdentifier:r.emailAddress})})},eS=(0,g.dm)(()=>{let{userSettings:e}=(0,k.O)(),{attributes:r}=e;return r.email_address?.verifications?.includes("email_link")?(0,i.Y)(eA,{}):(0,i.Y)(eb,{})}),ek=(0,g.dm)(()=>{let e=(0,y.B)(),r=(0,g.f0)(),t=e.verifications.phoneNumber.channel,n=e.verifications.phoneNumber.status,a=!e.status||"verified"===n,l=!!t&&"sms"!==t,s=l?t:void 0;(0,j.s)(a||l?void 0:()=>e.preparePhoneNumberVerification({strategy:"phone_code",channel:void 0}),{name:"signUp.preparePhoneNumberVerification",strategy:"phone_code",number:e.phoneNumber},{staleTime:100,onError:e=>(0,v.H4)(e,[],r.setError)});let o=(0,I.G)("signUp.phoneCode.title"),d=(0,I.G)("signUp.phoneCode.subtitle"),u=(0,I.G)("signUp.phoneCode.resendButton");if(l){let e=(0,et.y)(t)?.name;o=(0,I.G)("signUp.alternativePhoneCodeProvider.title",{provider:e||""}),d=(0,I.G)("signUp.alternativePhoneCodeProvider.subtitle",{provider:e||""}),u=(0,I.G)("signUp.alternativePhoneCodeProvider.resendButton")}return r.isLoading?(0,i.Y)(_.B,{}):(0,i.Y)(c.n.Part,{part:"phoneCode",children:(0,i.Y)(eg,{cardTitle:o,cardSubtitle:d,resendButton:u,prepare:()=>{if(!a)return e.preparePhoneNumberVerification({strategy:"phone_code",channel:s}).catch(e=>(0,v.H4)(e,[],r.setError))},attempt:r=>e.attemptPhoneNumberVerification({code:r}),safeIdentifier:e.phoneNumber,alternativeMethodsLabel:l?(0,I.G)("footerActionLink__alternativePhoneCodeProvider"):void 0,onShowAlternativeMethodsClicked:l?()=>{r.setLoading(),r.setError(void 0),e.preparePhoneNumberVerification({strategy:"phone_code",channel:void 0}).catch(e=>(0,v.H4)(e,[],r.setError)).finally(()=>r.setIdle())}:void 0,showAlternativeMethods:!!l||void 0})})}),ey=()=>(0,i.Y)(ek,{});function eC(){let e=(0,n.ho)();return a.useEffect(()=>{e.redirectToSignUp()},[]),null}function eP(){(0,l.Z)();let e=(0,o.X)();return(0,i.Y)(c.n.Root,{flow:"signUp",children:(0,i.FD)(p.d,{children:[(0,i.Y)(h.q,{path:"verify-email-address",canActivate:e=>!!e.client.signUp.emailAddress,children:(0,i.Y)(eS,{})}),(0,i.Y)(h.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,i.Y)(ey,{})}),(0,i.Y)(h.q,{path:"sso-callback",children:(0,i.Y)(er,{signUpUrl:e.signUpUrl,signInUrl:e.signInUrl,signUpForceRedirectUrl:e.afterSignUpUrl,signInForceRedirectUrl:e.afterSignInUrl,secondFactorUrl:e.secondFactorUrl,continueSignUpUrl:"../continue",verifyEmailAddressUrl:"../verify-email-address",verifyPhoneNumberUrl:"../verify-phone-number"})}),(0,i.Y)(h.q,{path:"verify",children:(0,i.Y)(s.M,{redirectUrlComplete:e.afterSignUpUrl,verifyEmailPath:"../verify-email-address",verifyPhonePath:"../verify-phone-number"})}),(0,i.FD)(h.q,{path:"continue",children:[(0,i.Y)(h.q,{path:"verify-email-address",canActivate:e=>!!e.client.signUp.emailAddress,children:(0,i.Y)(eS,{})}),(0,i.Y)(h.q,{path:"verify-phone-number",canActivate:e=>!!e.client.signUp.phoneNumber,children:(0,i.Y)(ey,{})}),(0,i.Y)(h.q,{index:!0,children:(0,i.Y)(H,{})})]}),(0,i.Y)(h.q,{path:"tasks",children:(0,i.Y)(u.JJ,{redirectUrlComplete:e.afterSignUpUrl})}),(0,i.Y)(h.q,{path:"enterprise-connections",children:(0,i.Y)(Q,{})}),(0,i.Y)(h.q,{index:!0,children:(0,i.Y)(em,{})}),(0,i.Y)(h.q,{children:(0,i.Y)(eC,{})})]})})}eP.displayName="SignUp";let eI=(0,d.Z)(eP),eY=e=>{let r={signInUrl:`/${m.I}/sign-in`,waitlistUrl:`/${m.I}/waitlist`,...e};return(0,i.Y)(h.q,{path:"sign-up",children:(0,i.Y)(o.g.Provider,{value:{componentName:"SignUp",...r,routing:"virtual",mode:"modal"},children:(0,i.Y)("div",{children:(0,i.Y)(eI,{...r,routing:"virtual"})})})})}},8722:function(e,r,t){t.d(r,{completeSignUpFlow:()=>i.A});var i=t(1687)},4:function(e,r,t){t.d(r,{Q:()=>f,r:()=>g});var i=t(2166),n=t(8380),a=t(5580),l=t(4173),s=t(8909),o=t(5993),d=t(5074),c=t(8051),u=t(7697),p=t(2366),h=t(4964),m=t(2117);let f=(0,d.createContext)(null),g=()=>{let e=(0,d.useContext)(f),{navigate:r,basePath:t,startPath:g}=(0,h.r)(),{displayConfig:b,userSettings:_}=(0,u.O)(),{queryParams:U,queryString:v}=(0,h.r)(),A=_.signUp.mode,S=(0,p.II)(),k=(0,s.ho)();if(null===e||"SignIn"!==e.componentName)throw Error("Clerk: useSignInContext called outside of the mounted SignIn component.");let y="restricted"!==A&&!!(!S.signUpUrl&&S.signInUrl&&!(0,o.s)(S.signInUrl))&&!1!==e.withSignUp||e.withSignUp||!1,{componentName:C,mode:P,...I}=e,Y=(0,d.useMemo)(()=>(0,m.tf)(v,i.u),[]),N=new n.n(S,{...I,signInFallbackRedirectUrl:I.signInFallbackRedirectUrl||I.fallbackRedirectUrl,signInForceRedirectUrl:I.signInForceRedirectUrl||I.forceRedirectUrl},U,P);delete I.fallbackRedirectUrl,delete I.forceRedirectUrl;let w=k.buildUrlWithAuth(N.getAfterSignInUrl()),F=k.buildUrlWithAuth(N.getAfterSignUpUrl()),E="path"===I.routing&&I.path||S.signInUrl||b.signInUrl,q=y?"path"===I.routing&&I.path||S.signUpUrl||b.signUpUrl:I.signUpUrl||S.signUpUrl||b.signUpUrl,R=I.waitlistUrl||S.waitlistUrl||b.waitlistUrl,G=N.getPreservedSearchParams();E=(0,l.kZ)({base:E,hashSearchParams:[U,G]},{stringify:!0}),q=(0,l.kZ)({base:q,hashSearchParams:[U,G]},{stringify:!0}),R=(0,l.kZ)({base:R,hashSearchParams:[U,G]},{stringify:!0});let L=N.toSearchParams().toString(),T=(0,c.aQ)({routing:I.routing,baseUrl:q,authQueryString:L,path:I.path,endpoint:y?"/create"+c.Vu:c.Vu}),D=(0,c.aQ)({routing:I.routing,baseUrl:q,authQueryString:L,path:I.path,endpoint:y?"/create"+c.aB:c.aB});y&&(q=(0,l.kZ)({base:E,hashPath:"/create",hashSearchParams:[U,G]},{stringify:!0}));let B=(0,l.kZ)({base:q,hashPath:"/continue"},{stringify:!0}),M=async({session:e,redirectUrl:i})=>{let n=e.currentTask;if(!n)return r(i);let l=(0,a.ru)(n);return r(`/${t+g+(y?"/create"+l:l)}`)},O=k.session?.currentTask?k.__internal_getOption("taskUrls")?.[k.session?.currentTask.key]??(0,c.aQ)({routing:I.routing,baseUrl:E,authQueryString:L,path:I.path,endpoint:y?"/create"+(0,a.ru)(k.session?.currentTask):(0,a.ru)(k.session?.currentTask)}):null;return{...I,transferable:I.transferable??!0,oauthFlow:I.oauthFlow||"auto",componentName:C,signUpUrl:q,signInUrl:E,waitlistUrl:R,afterSignInUrl:w,afterSignUpUrl:F,emailLinkRedirectUrl:T,ssoCallbackUrl:D,navigateAfterSignIn:()=>r(w),signUpContinueUrl:B,queryParams:U,initialValues:{...I.initialValues,...Y},authQueryString:L,isCombinedFlow:y,navigateOnSetActive:M,taskUrl:O}}},5350:function(e,r,t){t.d(r,{X:()=>g,g:()=>f});var i=t(2166),n=t(8380),a=t(5580),l=t(4173),s=t(8909),o=t(5993),d=t(5074),c=t(8051),u=t(7697),p=t(2366),h=t(4964),m=t(2117);let f=(0,d.createContext)(null),g=()=>{let e=(0,d.useContext)(f),{navigate:r,basePath:t,startPath:g}=(0,h.r)(),{displayConfig:b,userSettings:_}=(0,u.O)(),{queryParams:U,queryString:v}=(0,h.r)(),A=_.signUp.mode,S=(0,p.II)(),k=(0,s.ho)(),y="restricted"!==A&&!!(!S.signUpUrl&&S.signInUrl&&!(0,o.s)(S.signInUrl)&&"public"===A),C=(0,d.useMemo)(()=>(0,m.tf)(v,i.d),[]);if(!e||"SignUp"!==e.componentName)throw Error("Clerk: useSignUpContext called outside of the mounted SignUp component.");let{componentName:P,mode:I,...Y}=e,N=new n.n(S,{...Y,signUpFallbackRedirectUrl:Y.signUpFallbackRedirectUrl||Y.fallbackRedirectUrl,signUpForceRedirectUrl:Y.signUpForceRedirectUrl||Y.forceRedirectUrl},U,I);delete Y.fallbackRedirectUrl,delete Y.forceRedirectUrl;let w=k.buildUrlWithAuth(N.getAfterSignUpUrl()),F=k.buildUrlWithAuth(N.getAfterSignInUrl()),E="path"===Y.routing&&Y.path||S.signUpUrl||b.signUpUrl,q=Y.signInUrl||S.signInUrl||b.signInUrl,R=Y.waitlistUrl||S.waitlistUrl||b.waitlistUrl,G=N.getPreservedSearchParams();q=(0,l.kZ)({base:q,hashSearchParams:[U,G]},{stringify:!0}),E=(0,l.kZ)({base:E,hashSearchParams:[U,G]},{stringify:!0}),R=(0,l.kZ)({base:R,hashSearchParams:[U,G]},{stringify:!0});let L=N.toSearchParams().toString(),T=Y.emailLinkRedirectUrl??(0,c.aQ)({routing:Y.routing,baseUrl:E,authQueryString:L,path:Y.path,endpoint:y?"/create"+c.Vu:c.Vu}),D=Y.ssoCallbackUrl??(0,c.aQ)({routing:Y.routing,baseUrl:E,authQueryString:L,path:Y.path,endpoint:y?"/create"+c.aB:c.aB}),B=(0,l.kZ)({base:q,hashPath:"/factor-two"},{stringify:!0}),M=async({session:e,redirectUrl:i})=>{let n=e.currentTask;if(!n)return r(i);let l=(0,a.ru)(n);return r(`/${t+g+l}`)},O=k.session?.currentTask?k.__internal_getOption("taskUrls")?.[k.session?.currentTask.key]??(0,c.aQ)({routing:Y.routing,baseUrl:q,authQueryString:L,path:Y.path,endpoint:(0,a.ru)(k.session?.currentTask)}):null;return{...Y,oauthFlow:Y.oauthFlow||"auto",componentName:P,signInUrl:q,signUpUrl:E,waitlistUrl:R,secondFactorUrl:B,afterSignUpUrl:w,afterSignInUrl:F,emailLinkRedirectUrl:T,ssoCallbackUrl:D,navigateAfterSignUp:()=>r(w),queryParams:U,initialValues:{...Y.initialValues,...C},authQueryString:L,isCombinedFlow:y,navigateOnSetActive:M,taskUrl:O}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["723"],{3689:function(e,t,n){n.d(t,{l_:()=>i,mu:()=>a});let a={userMemberships:{infinite:!0},userInvitations:{infinite:!0},userSuggestions:{infinite:!0,status:["pending","accepted"]}},i=(e,t,n)=>{if(void 0===t)return[{data:[e],total_count:1}];let a=t?.[t.length-1]?.total_count||1;return t.map(t=>{if(void 0===t)return t;let i=t.data.map(t=>t.id===e.id?{...e}:t);return{...t,data:i,total_count:"negative"===n?a-1:a}})}},9024:function(e,t,n){n.r(t),n.d(t,{TaskChooseOrganization:()=>L});var a=n(4518),i=n(8909),r=n(5074),o=n(9599),s=n(5577),l=n(4607),c=n(8272),u=n(8920),g=n(2861),d=n(6088),h=n(3269),p=n(8691),z=n(2227),m=n(179),k=n(3610),f=n(2223),C=n(72),O=n(3689),_=n(1616),b=n(78),S=n(2531),U=n(6153),$=n(9001),Y=n(4468);let w=e=>{let t=(0,h.f0)(),{ref:n,userMemberships:i,userSuggestions:r,userInvitations:o}=(0,z.f)(),s=i?.isLoading||o?.isLoading||r?.isLoading,l=i?.hasNextPage||o?.hasNextPage||r?.hasNextPage,p=o.data?.filter(e=>!!e),m=r.data?.filter(e=>!!e);return(0,a.FD)(a.FK,{children:[(0,a.FD)(U.Y.Root,{showLogo:!0,sx:e=>({padding:`${e.space.$none} ${e.space.$8}`}),children:[(0,a.Y)(U.Y.Title,{localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.title")}),(0,a.Y)(U.Y.Subtitle,{localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.subtitle")})]}),(0,a.Y)(d.Z.Alert,{sx:e=>({margin:`${e.space.$none} ${e.space.$8}`}),children:t.error}),(0,a.Y)(c.fv,{elementDescriptor:u.$z.main,children:(0,a.Y)(C.os,{elementDescriptor:u.$z.taskChooseOrganizationPreviewItems,children:(0,a.FD)(S.En,{role:"menu",children:[(i.count||0)>0&&i.data?.map(e=>(0,a.Y)(y,{...e},e.id)),!i.hasNextPage&&p?.map(e=>(0,a.Y)(x,{...e},e.id)),!i.hasNextPage&&!o.hasNextPage&&m?.map(e=>(0,a.Y)(v,{...e},e.id)),(l||s)&&(0,a.Y)(C.JF,{ref:n}),(0,a.Y)(I,{onCreateOrganizationClick:()=>{t.setError(void 0),e.onCreateOrganizationClick()}})]})})})]})},y=e=>{let{user:t}=(0,i.Jd)(),n=(0,h.f0)(),{navigateOnSetActive:r}=(0,_.z1)(),{redirectUrlComplete:o}=(0,_.u3)(),{isLoaded:s,setActive:l}=(0,i.D_)(),{t:c}=(0,b._)();return s?(0,a.Y)(C.SH,{elementDescriptor:u.$z.taskChooseOrganizationPreviewButton,onClick:()=>{let a;return a=e.organization,n.runAsync(async()=>{try{await l({organization:a,navigate:async({session:e})=>{await r?.({session:e,redirectUrlComplete:o})}})}catch(e){if(!(0,k.$R)(e))return void(0,Y.H4)(e,[],n.setError);switch(e.errors?.[0]?.code){case"organization_not_found_or_unauthorized":case"not_a_member_in_organization":t?.createOrganizationEnabled?n.setError(c((0,g.G)("unstable__errors.organization_not_found_or_unauthorized"))):n.setError(c((0,g.G)("unstable__errors.organization_not_found_or_unauthorized_with_create_organization_disabled")));break;default:(0,Y.H4)(e,[],n.setError)}}})},children:(0,a.Y)($.Q,{elementId:"taskChooseOrganization",mainIdentifierSx:C.Vc,organization:e.organization})}):null},x=e=>{let t=(0,h.f0)(),{getOrganization:n}=(0,i.ho)(),[o,s]=(0,r.useState)(null),{userInvitations:l}=(0,i.D_)({userInvitations:O.mu.userInvitations});return o?(0,a.Y)(y,{organization:o}):(0,a.Y)(C.zJ,{organizationData:e.publicOrganizationData,elementId:"taskChooseOrganization",elementDescriptor:u.$z.taskChooseOrganizationPreviewItem,children:(0,a.Y)(C.D3,{isLoading:t.isLoading,onClick:()=>t.runAsync(async()=>[await e.accept(),await n(e.publicOrganizationData.id)]).then(([e,t])=>{l?.setData?.(t=>(0,O.l_)(e,t,"negative")),s(t)}).catch(e=>(0,Y.H4)(e,[],t.setError)),localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.action__invitationAccept")})})},v=(0,h.dm)(e=>{let t=(0,h.f0)(),{userSuggestions:n}=(0,i.D_)({userSuggestions:O.mu.userSuggestions});return(0,a.Y)(C.zJ,{organizationData:e.publicOrganizationData,elementId:"taskChooseOrganization",elementDescriptor:u.$z.taskChooseOrganizationPreviewItem,children:"accepted"===e.status?(0,a.Y)(c.EY,{colorScheme:"secondary",localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.suggestionsAcceptedLabel")}):(0,a.Y)(C.D3,{onClick:()=>t.runAsync(e.accept).then(e=>n?.setData?.(t=>(0,O.l_)(e,t))).catch(e=>(0,Y.H4)(e,[],t.setError)),isLoading:t.isLoading,localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.action__suggestionsAccept")})})}),I=({onCreateOrganizationClick:e})=>(0,a.Y)(f._,{elementDescriptor:u.$z.taskChooseOrganizationCreateOrganizationActionButton,label:(0,g.G)("taskChooseOrganization.chooseOrganization.action__createOrganization"),onClick:e,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,padding:`${e.space.$5} ${e.space.$5}`}),iconSx:e=>({width:e.sizes.$9,height:e.sizes.$6})});var D=n(7697),P=n(2454),A=n(1475),F=n(3549),T=n(5485),R=n(8640);let G=e=>{let t=(0,h.f0)(),{navigateOnSetActive:n}=(0,_.z1)(),{redirectUrlComplete:r}=(0,_.u3)(),{createOrganization:o,isLoaded:s,setActive:l}=(0,i.D_)({userMemberships:O.mu.userMemberships}),{organizationSettings:c}=(0,D.O)(),u=(0,R.tJ)("name","",{type:"text",label:(0,g.G)("taskChooseOrganization.createOrganization.formFieldLabel__name"),placeholder:(0,g.G)("taskChooseOrganization.createOrganization.formFieldInputPlaceholder__name")}),d=(0,R.tJ)("slug","",{type:"text",label:(0,g.G)("taskChooseOrganization.createOrganization.formFieldLabel__slug"),placeholder:(0,g.G)("taskChooseOrganization.createOrganization.formFieldInputPlaceholder__slug")}),p=!c.slug.disabled,z=async e=>{if(e.preventDefault(),s)try{let e={name:u.value};p&&(e.slug=d.value);let t=await o(e);await l({organization:t,navigate:async({session:e})=>{await n?.({session:e,redirectUrlComplete:r})}})}catch(e){(0,Y.H4)(e,[u,d],t.setError)}},m=e=>{d.setValue(e)},k=!u.value||!s;return(0,a.FD)(a.FK,{children:[(0,a.FD)(U.Y.Root,{showLogo:!0,sx:e=>({padding:`${e.space.$none} ${e.space.$8}`}),children:[(0,a.Y)(U.Y.Title,{localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.title")}),(0,a.Y)(U.Y.Subtitle,{localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.subtitle")})]}),(0,a.Y)(F.M,{sx:e=>({padding:`${e.space.$none} ${e.space.$10} ${e.space.$8}`}),children:(0,a.FD)(P.l.Root,{onSubmit:z,children:[(0,a.Y)(P.l.ControlRow,{elementId:u.id,children:(0,a.Y)(P.l.PlainInput,{...u.props,onChange:e=>{u.setValue(e.target.value),m((0,T.e)(e.target.value))},isRequired:!0,autoFocus:!0,ignorePasswordManager:!0})}),p&&(0,a.Y)(P.l.ControlRow,{elementId:d.id,children:(0,a.Y)(P.l.PlainInput,{...d.props,onChange:e=>m(e.target.value),isRequired:!0,pattern:"^(?=.*[a-z0-9])[a-z0-9\\-]+$",ignorePasswordManager:!0})}),(0,a.FD)(A.c,{sx:()=>({flexDirection:"column"}),children:[(0,a.Y)(P.l.SubmitButton,{block:!0,isDisabled:k,localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.formButtonSubmit")}),e.onCancel&&(0,a.Y)(P.l.ResetButton,{localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.formButtonReset"),onClick:e.onCancel})]})]})})]})},E=(0,h.dm)(e=>{let[t,n]=(0,r.useState)(e.initialFlow);return"create"===t?(0,a.Y)(G,{onCancel:"choose"===e.initialFlow?()=>n("choose"):void 0}):(0,a.Y)(w,{onCreateOrganizationClick:()=>n("create")})}),L=(0,s.Z)((0,m.d)((0,h.dm)(()=>{let{signOut:e}=(0,i.ho)(),{user:t}=(0,i.Jd)(),{session:n}=(0,i.wV)(),{userMemberships:r,userSuggestions:s,userInvitations:h}=(0,z.f)(),{otherSessions:m}=(0,p.z)({user:t}),{navigateAfterSignOut:k,navigateAfterMultiSessionSingleSignOutUrl:f}=(0,o.g)(),C=r?.isLoading||h?.isLoading||s?.isLoading,O=!!(r?.count||h?.count||s?.count),_=t?.primaryEmailAddress?.emailAddress??t?.username;return(0,a.Y)(l.n.Root,{flow:"taskChooseOrganization",children:(0,a.Y)(l.n.Part,{part:"chooseOrganization",children:(0,a.FD)(d.Z.Root,{children:[(0,a.Y)(d.Z.Content,{sx:e=>({padding:`${e.space.$8} ${e.space.$none} ${e.space.$none}`,gap:e.space.$7}),children:C?(0,a.Y)(c.so,{direction:"row",align:"center",justify:"center",sx:e=>({height:"100%",minHeight:e.sizes.$100}),children:(0,a.Y)(c.y$,{size:"lg",colorScheme:"primary",elementDescriptor:u.$z.spinner})}):(0,a.Y)(E,{initialFlow:O?"choose":"create"})}),(0,a.Y)(d.Z.Footer,{children:(0,a.FD)(d.Z.Action,{elementId:"signOut",gap:2,justify:"center",sx:()=>({width:"100%"}),children:[_&&(0,a.Y)(d.Z.ActionText,{truncate:!0,localizationKey:(0,g.G)("taskChooseOrganization.signOut.actionText",{identifier:_})}),(0,a.Y)(d.Z.ActionLink,{sx:()=>({flexShrink:0}),onClick:()=>0===m.length?e(k):e(f,{sessionId:n?.id}),localizationKey:(0,g.G)("taskChooseOrganization.signOut.actionLink")})]})})]})})})}),"choose-organization"))},179:function(e,t,n){n.d(t,{d:()=>o});var a=n(2049),i=n(656),r=n(1616);let o=(e,t)=>{let n=e.displayName||e.name||"Component";e.displayName=n;let o=n=>{let o=(0,r.z1)();return(0,i.RE)(e,e=>!e.session?.currentTask||e.session.currentTask.key!==t&&!e.__internal_setActiveInProgress,({clerk:e})=>e.session?o.redirectUrlComplete??e.buildAfterSignInUrl():e.buildSignInUrl(),a.A.cannotRenderComponentWhenTaskDoesNotExist)(n)};return o.displayName=`withTaskGuard(${n})`,o}},1616:function(e,t,n){n.d(t,{O_:()=>g,lY:()=>l,pq:()=>u,qx:()=>o,u3:()=>c,z1:()=>s});var a=n(5580),i=n(5074),r=n(4964);let o=(0,i.createContext)(null),s=()=>{let e=(0,i.useContext)(o),{navigate:t,basePath:n,startPath:s}=(0,r.r)();if(null===e)throw Error("Clerk: useSessionTasksContext called outside of the mounted SessionTasks component.");let l=async({session:e,redirectUrlComplete:i})=>{let r=e.currentTask;if(!r)return t(i);let o=(0,a.ru)(r);return t(`/${n+s+o}`)};return{...e,navigateOnSetActive:l}},l=(0,i.createContext)(null),c=()=>{let e=(0,i.useContext)(l);if(null===e)throw Error("Clerk: useTaskChooseOrganizationContext called outside of the mounted TaskChooseOrganization component.");return e},u=(0,i.createContext)(null),g=()=>{let e=(0,i.useContext)(u);if(null===e)throw Error("Clerk: useTaskResetPasswordContext called outside of the mounted TaskResetPassword component.");return e}},4:function(e,t,n){n.d(t,{Q:()=>z,r:()=>m});var a=n(922),i=n(8380),r=n(5580),o=n(4173),s=n(8909),l=n(5993),c=n(5074),u=n(8051),g=n(7697),d=n(2366),h=n(4964),p=n(2117);let z=(0,c.createContext)(null),m=()=>{let e=(0,c.useContext)(z),{navigate:t,basePath:n,startPath:m}=(0,h.r)(),{displayConfig:k,userSettings:f}=(0,g.O)(),{queryParams:C,queryString:O}=(0,h.r)(),_=f.signUp.mode,b=(0,d.II)(),S=(0,s.ho)();if(null===e||"SignIn"!==e.componentName)throw Error("Clerk: useSignInContext called outside of the mounted SignIn component.");let U="restricted"!==_&&!!(!b.signUpUrl&&b.signInUrl&&!(0,l.s)(b.signInUrl))&&!1!==e.withSignUp||e.withSignUp||!1,{componentName:$,mode:Y,...w}=e,y=(0,c.useMemo)(()=>(0,p.tf)(O,a.u),[]),x=new i.n(b,{...w,signInFallbackRedirectUrl:w.signInFallbackRedirectUrl||w.fallbackRedirectUrl,signInForceRedirectUrl:w.signInForceRedirectUrl||w.forceRedirectUrl},C,Y);delete w.fallbackRedirectUrl,delete w.forceRedirectUrl;let v=S.buildUrlWithAuth(x.getAfterSignInUrl()),I=S.buildUrlWithAuth(x.getAfterSignUpUrl()),D="path"===w.routing&&w.path||b.signInUrl||k.signInUrl,P=U?"path"===w.routing&&w.path||b.signUpUrl||k.signUpUrl:w.signUpUrl||b.signUpUrl||k.signUpUrl,A=w.waitlistUrl||b.waitlistUrl||k.waitlistUrl,F=x.getPreservedSearchParams();D=(0,o.kZ)({base:D,hashSearchParams:[C,F]},{stringify:!0}),P=(0,o.kZ)({base:P,hashSearchParams:[C,F]},{stringify:!0}),A=(0,o.kZ)({base:A,hashSearchParams:[C,F]},{stringify:!0});let T=x.toSearchParams().toString(),R=(0,u.aQ)({routing:w.routing,baseUrl:P,authQueryString:T,path:w.path,endpoint:U?"/create"+u.Vu:u.Vu}),G=(0,u.aQ)({routing:w.routing,baseUrl:P,authQueryString:T,path:w.path,endpoint:U?"/create"+u.aB:u.aB});U&&(P=(0,o.kZ)({base:D,hashPath:"/create",hashSearchParams:[C,F]},{stringify:!0}));let E=(0,o.kZ)({base:P,hashPath:"/continue"},{stringify:!0}),L=async({session:e,redirectUrl:a})=>{let i=e.currentTask;if(!i)return t(a);let o=(0,r.ru)(i);return t(`/${n+m+(U?"/create"+o:o)}`)},K=S.session?.currentTask?S.__internal_getOption("taskUrls")?.[S.session?.currentTask.key]??(0,u.aQ)({routing:w.routing,baseUrl:D,authQueryString:T,path:w.path,endpoint:U?"/create"+(0,r.ru)(S.session?.currentTask):(0,r.ru)(S.session?.currentTask)}):null;return{...w,transferable:w.transferable??!0,oauthFlow:w.oauthFlow||"auto",componentName:$,signUpUrl:P,signInUrl:D,waitlistUrl:A,afterSignInUrl:v,afterSignUpUrl:I,emailLinkRedirectUrl:R,ssoCallbackUrl:G,navigateAfterSignIn:()=>t(v),signUpContinueUrl:E,queryParams:C,initialValues:{...w.initialValues,...y},authQueryString:T,isCombinedFlow:U,navigateOnSetActive:L,taskUrl:K}}},9599:function(e,t,n){n.d(t,{g:()=>r});var a=n(8909),i=n(4964);let r=()=>{let{navigate:e}=(0,i.r)(),t=(0,a.ho)();return{navigateAfterSignOut:()=>e(t.buildAfterSignOutUrl()),navigateAfterMultiSessionSingleSignOutUrl:()=>e(t.buildAfterMultiSessionSingleSignOutUrl()),afterSignOutUrl:t.buildAfterSignOutUrl(),afterMultiSessionSingleSignOutUrl:t.buildAfterMultiSessionSingleSignOutUrl()}}}}]);
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["723"],{3689:function(e,t,n){n.d(t,{l_:()=>i,mu:()=>a});let a={userMemberships:{infinite:!0},userInvitations:{infinite:!0},userSuggestions:{infinite:!0,status:["pending","accepted"]}},i=(e,t,n)=>{if(void 0===t)return[{data:[e],total_count:1}];let a=t?.[t.length-1]?.total_count||1;return t.map(t=>{if(void 0===t)return t;let i=t.data.map(t=>t.id===e.id?{...e}:t);return{...t,data:i,total_count:"negative"===n?a-1:a}})}},9024:function(e,t,n){n.r(t),n.d(t,{TaskChooseOrganization:()=>L});var a=n(4518),i=n(8909),r=n(5074),o=n(9599),s=n(5577),l=n(4607),c=n(8272),u=n(8920),g=n(2861),d=n(6088),h=n(3269),p=n(8691),z=n(2227),m=n(179),k=n(3610),f=n(2223),C=n(72),O=n(3689),_=n(1616),b=n(78),S=n(2531),U=n(6153),$=n(9001),Y=n(4468);let w=e=>{let t=(0,h.f0)(),{ref:n,userMemberships:i,userSuggestions:r,userInvitations:o}=(0,z.f)(),s=i?.isLoading||o?.isLoading||r?.isLoading,l=i?.hasNextPage||o?.hasNextPage||r?.hasNextPage,p=o.data?.filter(e=>!!e),m=r.data?.filter(e=>!!e);return(0,a.FD)(a.FK,{children:[(0,a.FD)(U.Y.Root,{showLogo:!0,sx:e=>({padding:`${e.space.$none} ${e.space.$8}`}),children:[(0,a.Y)(U.Y.Title,{localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.title")}),(0,a.Y)(U.Y.Subtitle,{localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.subtitle")})]}),(0,a.Y)(d.Z.Alert,{sx:e=>({margin:`${e.space.$none} ${e.space.$8}`}),children:t.error}),(0,a.Y)(c.fv,{elementDescriptor:u.$z.main,children:(0,a.Y)(C.os,{elementDescriptor:u.$z.taskChooseOrganizationPreviewItems,children:(0,a.FD)(S.En,{role:"menu",children:[(i.count||0)>0&&i.data?.map(e=>(0,a.Y)(y,{...e},e.id)),!i.hasNextPage&&p?.map(e=>(0,a.Y)(x,{...e},e.id)),!i.hasNextPage&&!o.hasNextPage&&m?.map(e=>(0,a.Y)(v,{...e},e.id)),(l||s)&&(0,a.Y)(C.JF,{ref:n}),(0,a.Y)(I,{onCreateOrganizationClick:()=>{t.setError(void 0),e.onCreateOrganizationClick()}})]})})})]})},y=e=>{let{user:t}=(0,i.Jd)(),n=(0,h.f0)(),{navigateOnSetActive:r}=(0,_.z1)(),{redirectUrlComplete:o}=(0,_.u3)(),{isLoaded:s,setActive:l}=(0,i.D_)(),{t:c}=(0,b._)();return s?(0,a.Y)(C.SH,{elementDescriptor:u.$z.taskChooseOrganizationPreviewButton,onClick:()=>{let a;return a=e.organization,n.runAsync(async()=>{try{await l({organization:a,navigate:async({session:e})=>{await r?.({session:e,redirectUrlComplete:o})}})}catch(e){if(!(0,k.$R)(e))return void(0,Y.H4)(e,[],n.setError);switch(e.errors?.[0]?.code){case"organization_not_found_or_unauthorized":case"not_a_member_in_organization":t?.createOrganizationEnabled?n.setError(c((0,g.G)("unstable__errors.organization_not_found_or_unauthorized"))):n.setError(c((0,g.G)("unstable__errors.organization_not_found_or_unauthorized_with_create_organization_disabled")));break;default:(0,Y.H4)(e,[],n.setError)}}})},children:(0,a.Y)($.Q,{elementId:"taskChooseOrganization",mainIdentifierSx:C.Vc,organization:e.organization})}):null},x=e=>{let t=(0,h.f0)(),{getOrganization:n}=(0,i.ho)(),[o,s]=(0,r.useState)(null),{userInvitations:l}=(0,i.D_)({userInvitations:O.mu.userInvitations});return o?(0,a.Y)(y,{organization:o}):(0,a.Y)(C.zJ,{organizationData:e.publicOrganizationData,elementId:"taskChooseOrganization",elementDescriptor:u.$z.taskChooseOrganizationPreviewItem,children:(0,a.Y)(C.D3,{isLoading:t.isLoading,onClick:()=>t.runAsync(async()=>[await e.accept(),await n(e.publicOrganizationData.id)]).then(([e,t])=>{l?.setData?.(t=>(0,O.l_)(e,t,"negative")),s(t)}).catch(e=>(0,Y.H4)(e,[],t.setError)),localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.action__invitationAccept")})})},v=(0,h.dm)(e=>{let t=(0,h.f0)(),{userSuggestions:n}=(0,i.D_)({userSuggestions:O.mu.userSuggestions});return(0,a.Y)(C.zJ,{organizationData:e.publicOrganizationData,elementId:"taskChooseOrganization",elementDescriptor:u.$z.taskChooseOrganizationPreviewItem,children:"accepted"===e.status?(0,a.Y)(c.EY,{colorScheme:"secondary",localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.suggestionsAcceptedLabel")}):(0,a.Y)(C.D3,{onClick:()=>t.runAsync(e.accept).then(e=>n?.setData?.(t=>(0,O.l_)(e,t))).catch(e=>(0,Y.H4)(e,[],t.setError)),isLoading:t.isLoading,localizationKey:(0,g.G)("taskChooseOrganization.chooseOrganization.action__suggestionsAccept")})})}),I=({onCreateOrganizationClick:e})=>(0,a.Y)(f._,{elementDescriptor:u.$z.taskChooseOrganizationCreateOrganizationActionButton,label:(0,g.G)("taskChooseOrganization.chooseOrganization.action__createOrganization"),onClick:e,sx:e=>({borderTopWidth:e.borderWidths.$normal,borderTopStyle:e.borderStyles.$solid,borderTopColor:e.colors.$borderAlpha100,padding:`${e.space.$5} ${e.space.$5}`}),iconSx:e=>({width:e.sizes.$9,height:e.sizes.$6})});var D=n(7697),P=n(2454),A=n(1475),F=n(3549),T=n(5485),R=n(8640);let G=e=>{let t=(0,h.f0)(),{navigateOnSetActive:n}=(0,_.z1)(),{redirectUrlComplete:r}=(0,_.u3)(),{createOrganization:o,isLoaded:s,setActive:l}=(0,i.D_)({userMemberships:O.mu.userMemberships}),{organizationSettings:c}=(0,D.O)(),u=(0,R.tJ)("name","",{type:"text",label:(0,g.G)("taskChooseOrganization.createOrganization.formFieldLabel__name"),placeholder:(0,g.G)("taskChooseOrganization.createOrganization.formFieldInputPlaceholder__name")}),d=(0,R.tJ)("slug","",{type:"text",label:(0,g.G)("taskChooseOrganization.createOrganization.formFieldLabel__slug"),placeholder:(0,g.G)("taskChooseOrganization.createOrganization.formFieldInputPlaceholder__slug")}),p=!c.slug.disabled,z=async e=>{if(e.preventDefault(),s)try{let e={name:u.value};p&&(e.slug=d.value);let t=await o(e);await l({organization:t,navigate:async({session:e})=>{await n?.({session:e,redirectUrlComplete:r})}})}catch(e){(0,Y.H4)(e,[u,d],t.setError)}},m=e=>{d.setValue(e)},k=!u.value||!s;return(0,a.FD)(a.FK,{children:[(0,a.FD)(U.Y.Root,{showLogo:!0,sx:e=>({padding:`${e.space.$none} ${e.space.$8}`}),children:[(0,a.Y)(U.Y.Title,{localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.title")}),(0,a.Y)(U.Y.Subtitle,{localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.subtitle")})]}),(0,a.Y)(F.M,{sx:e=>({padding:`${e.space.$none} ${e.space.$10} ${e.space.$8}`}),children:(0,a.FD)(P.l.Root,{onSubmit:z,children:[(0,a.Y)(P.l.ControlRow,{elementId:u.id,children:(0,a.Y)(P.l.PlainInput,{...u.props,onChange:e=>{u.setValue(e.target.value),m((0,T.e)(e.target.value))},isRequired:!0,autoFocus:!0,ignorePasswordManager:!0})}),p&&(0,a.Y)(P.l.ControlRow,{elementId:d.id,children:(0,a.Y)(P.l.PlainInput,{...d.props,onChange:e=>m(e.target.value),isRequired:!0,pattern:"^(?=.*[a-z0-9])[a-z0-9\\-]+$",ignorePasswordManager:!0})}),(0,a.FD)(A.c,{sx:()=>({flexDirection:"column"}),children:[(0,a.Y)(P.l.SubmitButton,{block:!0,isDisabled:k,localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.formButtonSubmit")}),e.onCancel&&(0,a.Y)(P.l.ResetButton,{localizationKey:(0,g.G)("taskChooseOrganization.createOrganization.formButtonReset"),onClick:e.onCancel})]})]})})]})},E=(0,h.dm)(e=>{let[t,n]=(0,r.useState)(e.initialFlow);return"create"===t?(0,a.Y)(G,{onCancel:"choose"===e.initialFlow?()=>n("choose"):void 0}):(0,a.Y)(w,{onCreateOrganizationClick:()=>n("create")})}),L=(0,s.Z)((0,m.d)((0,h.dm)(()=>{let{signOut:e}=(0,i.ho)(),{user:t}=(0,i.Jd)(),{session:n}=(0,i.wV)(),{userMemberships:r,userSuggestions:s,userInvitations:h}=(0,z.f)(),{otherSessions:m}=(0,p.z)({user:t}),{navigateAfterSignOut:k,navigateAfterMultiSessionSingleSignOutUrl:f}=(0,o.g)(),C=r?.isLoading||h?.isLoading||s?.isLoading,O=!!(r?.count||h?.count||s?.count),_=t?.primaryEmailAddress?.emailAddress??t?.username;return(0,a.Y)(l.n.Root,{flow:"taskChooseOrganization",children:(0,a.Y)(l.n.Part,{part:"chooseOrganization",children:(0,a.FD)(d.Z.Root,{children:[(0,a.Y)(d.Z.Content,{sx:e=>({padding:`${e.space.$8} ${e.space.$none} ${e.space.$none}`,gap:e.space.$7}),children:C?(0,a.Y)(c.so,{direction:"row",align:"center",justify:"center",sx:e=>({height:"100%",minHeight:e.sizes.$100}),children:(0,a.Y)(c.y$,{size:"lg",colorScheme:"primary",elementDescriptor:u.$z.spinner})}):(0,a.Y)(E,{initialFlow:O?"choose":"create"})}),(0,a.Y)(d.Z.Footer,{children:(0,a.FD)(d.Z.Action,{elementId:"signOut",gap:2,justify:"center",sx:()=>({width:"100%"}),children:[_&&(0,a.Y)(d.Z.ActionText,{truncate:!0,localizationKey:(0,g.G)("taskChooseOrganization.signOut.actionText",{identifier:_})}),(0,a.Y)(d.Z.ActionLink,{sx:()=>({flexShrink:0}),onClick:()=>0===m.length?e(k):e(f,{sessionId:n?.id}),localizationKey:(0,g.G)("taskChooseOrganization.signOut.actionLink")})]})})]})})})}),"choose-organization"))},179:function(e,t,n){n.d(t,{d:()=>o});var a=n(2049),i=n(656),r=n(1616);let o=(e,t)=>{let n=e.displayName||e.name||"Component";e.displayName=n;let o=n=>{let o=(0,r.z1)();return(0,i.RE)(e,e=>!e.session?.currentTask||e.session.currentTask.key!==t&&!e.__internal_setActiveInProgress,({clerk:e})=>e.session?o.redirectUrlComplete??e.buildAfterSignInUrl():e.buildSignInUrl(),a.A.cannotRenderComponentWhenTaskDoesNotExist)(n)};return o.displayName=`withTaskGuard(${n})`,o}},1616:function(e,t,n){n.d(t,{O_:()=>g,lY:()=>l,pq:()=>u,qx:()=>o,u3:()=>c,z1:()=>s});var a=n(5580),i=n(5074),r=n(4964);let o=(0,i.createContext)(null),s=()=>{let e=(0,i.useContext)(o),{navigate:t,basePath:n,startPath:s}=(0,r.r)();if(null===e)throw Error("Clerk: useSessionTasksContext called outside of the mounted SessionTasks component.");let l=async({session:e,redirectUrlComplete:i})=>{let r=e.currentTask;if(!r)return t(i);let o=(0,a.ru)(r);return t(`/${n+s+o}`)};return{...e,navigateOnSetActive:l}},l=(0,i.createContext)(null),c=()=>{let e=(0,i.useContext)(l);if(null===e)throw Error("Clerk: useTaskChooseOrganizationContext called outside of the mounted TaskChooseOrganization component.");return e},u=(0,i.createContext)(null),g=()=>{let e=(0,i.useContext)(u);if(null===e)throw Error("Clerk: useTaskResetPasswordContext called outside of the mounted TaskResetPassword component.");return e}},4:function(e,t,n){n.d(t,{Q:()=>z,r:()=>m});var a=n(2166),i=n(8380),r=n(5580),o=n(4173),s=n(8909),l=n(5993),c=n(5074),u=n(8051),g=n(7697),d=n(2366),h=n(4964),p=n(2117);let z=(0,c.createContext)(null),m=()=>{let e=(0,c.useContext)(z),{navigate:t,basePath:n,startPath:m}=(0,h.r)(),{displayConfig:k,userSettings:f}=(0,g.O)(),{queryParams:C,queryString:O}=(0,h.r)(),_=f.signUp.mode,b=(0,d.II)(),S=(0,s.ho)();if(null===e||"SignIn"!==e.componentName)throw Error("Clerk: useSignInContext called outside of the mounted SignIn component.");let U="restricted"!==_&&!!(!b.signUpUrl&&b.signInUrl&&!(0,l.s)(b.signInUrl))&&!1!==e.withSignUp||e.withSignUp||!1,{componentName:$,mode:Y,...w}=e,y=(0,c.useMemo)(()=>(0,p.tf)(O,a.u),[]),x=new i.n(b,{...w,signInFallbackRedirectUrl:w.signInFallbackRedirectUrl||w.fallbackRedirectUrl,signInForceRedirectUrl:w.signInForceRedirectUrl||w.forceRedirectUrl},C,Y);delete w.fallbackRedirectUrl,delete w.forceRedirectUrl;let v=S.buildUrlWithAuth(x.getAfterSignInUrl()),I=S.buildUrlWithAuth(x.getAfterSignUpUrl()),D="path"===w.routing&&w.path||b.signInUrl||k.signInUrl,P=U?"path"===w.routing&&w.path||b.signUpUrl||k.signUpUrl:w.signUpUrl||b.signUpUrl||k.signUpUrl,A=w.waitlistUrl||b.waitlistUrl||k.waitlistUrl,F=x.getPreservedSearchParams();D=(0,o.kZ)({base:D,hashSearchParams:[C,F]},{stringify:!0}),P=(0,o.kZ)({base:P,hashSearchParams:[C,F]},{stringify:!0}),A=(0,o.kZ)({base:A,hashSearchParams:[C,F]},{stringify:!0});let T=x.toSearchParams().toString(),R=(0,u.aQ)({routing:w.routing,baseUrl:P,authQueryString:T,path:w.path,endpoint:U?"/create"+u.Vu:u.Vu}),G=(0,u.aQ)({routing:w.routing,baseUrl:P,authQueryString:T,path:w.path,endpoint:U?"/create"+u.aB:u.aB});U&&(P=(0,o.kZ)({base:D,hashPath:"/create",hashSearchParams:[C,F]},{stringify:!0}));let E=(0,o.kZ)({base:P,hashPath:"/continue"},{stringify:!0}),L=async({session:e,redirectUrl:a})=>{let i=e.currentTask;if(!i)return t(a);let o=(0,r.ru)(i);return t(`/${n+m+(U?"/create"+o:o)}`)},K=S.session?.currentTask?S.__internal_getOption("taskUrls")?.[S.session?.currentTask.key]??(0,u.aQ)({routing:w.routing,baseUrl:D,authQueryString:T,path:w.path,endpoint:U?"/create"+(0,r.ru)(S.session?.currentTask):(0,r.ru)(S.session?.currentTask)}):null;return{...w,transferable:w.transferable??!0,oauthFlow:w.oauthFlow||"auto",componentName:$,signUpUrl:P,signInUrl:D,waitlistUrl:A,afterSignInUrl:v,afterSignUpUrl:I,emailLinkRedirectUrl:R,ssoCallbackUrl:G,navigateAfterSignIn:()=>t(v),signUpContinueUrl:E,queryParams:C,initialValues:{...w.initialValues,...y},authQueryString:T,isCombinedFlow:U,navigateOnSetActive:L,taskUrl:K}}},9599:function(e,t,n){n.d(t,{g:()=>r});var a=n(8909),i=n(4964);let r=()=>{let{navigate:e}=(0,i.r)(),t=(0,a.ho)();return{navigateAfterSignOut:()=>e(t.buildAfterSignOutUrl()),navigateAfterMultiSessionSingleSignOutUrl:()=>e(t.buildAfterMultiSessionSingleSignOutUrl()),afterSignOutUrl:t.buildAfterSignOutUrl(),afterMultiSessionSingleSignOutUrl:t.buildAfterMultiSessionSingleSignOutUrl()}}}}]);
|
|
@@ -17,7 +17,7 @@ interface CreateClerkThemeParams extends DeepPartial<Theme>, Pick<BaseTheme, 'cs
|
|
|
17
17
|
theme: InternalTheme;
|
|
18
18
|
}) => Elements);
|
|
19
19
|
}
|
|
20
|
-
declare const
|
|
20
|
+
declare const createTheme: (themeParams: CreateClerkThemeParams) => {
|
|
21
21
|
__type: "prebuilt_appearance";
|
|
22
22
|
/**
|
|
23
23
|
* Optional name for the theme, used for telemetry and debugging.
|
|
@@ -31,12 +31,11 @@ declare const experimental_createTheme: (themeParams: CreateClerkThemeParams) =>
|
|
|
31
31
|
theme: InternalTheme;
|
|
32
32
|
}) => Elements);
|
|
33
33
|
theme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
34
|
-
baseTheme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
35
34
|
layout?: _clerk_ui_internal0.Layout | undefined;
|
|
36
35
|
variables?: _clerk_ui_internal0.Variables | undefined;
|
|
37
36
|
captcha?: _clerk_ui_internal0.CaptchaAppearanceOptions | undefined;
|
|
38
37
|
cssLayerName?: string | undefined;
|
|
39
38
|
};
|
|
40
39
|
//#endregion
|
|
41
|
-
export {
|
|
40
|
+
export { createTheme };
|
|
42
41
|
//# sourceMappingURL=createTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTheme.d.ts","names":[],"sources":["../../src/themes/createTheme.ts"],"sourcesContent":[],"mappings":";;;;;;UAOU,sBAAA,SAA+B,YAAY,QAAQ,KAAK;;;AAFd;;EAEc,IAAA,CAAA,EAAA,MAAA;EAUrD;;;EAV4B,QAAA,CAAA,EAU5B,QAV4B,GAAA,CAAA,CAAA,MAAA,EAAA;IAAoB,KAAA,EAUlB,aAVkB;EAAI,CAAA,EAAA,GAUF,QAVE,CAAA;AAajE;
|
|
1
|
+
{"version":3,"file":"createTheme.d.ts","names":[],"sources":["../../src/themes/createTheme.ts"],"sourcesContent":[],"mappings":";;;;;;UAOU,sBAAA,SAA+B,YAAY,QAAQ,KAAK;;;AAFd;;EAEc,IAAA,CAAA,EAAA,MAAA;EAUrD;;;EAV4B,QAAA,CAAA,EAU5B,QAV4B,GAAA,CAAA,CAAA,MAAA,EAAA;IAAoB,KAAA,EAUlB,aAVkB;EAAI,CAAA,EAAA,GAUF,QAVE,CAAA;AAajE;AAAyC,cAA5B,WAA4B,EAAA,CAAA,WAAA,EAAA,sBAAA,EAAA,GAAA;EAH5B,MAAA,EAAA,qBAAA;EAA8B;;;;;;;;aAA9B;WAA8B;QAAoB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/themes/createTheme.ts
|
|
2
|
-
const
|
|
2
|
+
const createTheme = (themeParams) => {
|
|
3
3
|
return {
|
|
4
4
|
...themeParams,
|
|
5
5
|
__type: "prebuilt_appearance"
|
|
@@ -7,5 +7,5 @@ const experimental_createTheme = (themeParams) => {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { createTheme };
|
|
11
11
|
//# sourceMappingURL=createTheme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTheme.js","names":[],"sources":["../../src/themes/createTheme.ts"],"sourcesContent":["// Temp way to import the type. We will clean this up when we extract\n// theming into its own package\nimport type { DeepPartial } from '@clerk/shared/types';\nimport type { BaseTheme, Elements, Theme } from '@clerk/ui/internal';\n\nimport type { InternalTheme } from '../foundations';\n\ninterface CreateClerkThemeParams extends DeepPartial<Theme>, Pick<BaseTheme, 'cssLayerName'> {\n /**\n * Optional name for the theme, used for telemetry and debugging.\n * @example 'shadcn', 'neobrutalism', 'custom-dark'\n */\n name?: string;\n\n /**\n * {@link Theme.elements}\n */\n elements?: Elements | ((params: { theme: InternalTheme }) => Elements);\n}\n\nexport const
|
|
1
|
+
{"version":3,"file":"createTheme.js","names":[],"sources":["../../src/themes/createTheme.ts"],"sourcesContent":["// Temp way to import the type. We will clean this up when we extract\n// theming into its own package\nimport type { DeepPartial } from '@clerk/shared/types';\nimport type { BaseTheme, Elements, Theme } from '@clerk/ui/internal';\n\nimport type { InternalTheme } from '../foundations';\n\ninterface CreateClerkThemeParams extends DeepPartial<Theme>, Pick<BaseTheme, 'cssLayerName'> {\n /**\n * Optional name for the theme, used for telemetry and debugging.\n * @example 'shadcn', 'neobrutalism', 'custom-dark'\n */\n name?: string;\n\n /**\n * {@link Theme.elements}\n */\n elements?: Elements | ((params: { theme: InternalTheme }) => Elements);\n}\n\nexport const createTheme = (themeParams: CreateClerkThemeParams) => {\n // Placeholder method that might hande more transformations in the future\n return {\n ...themeParams,\n __type: 'prebuilt_appearance' as const,\n };\n};\n"],"mappings":";AAoBA,MAAa,eAAe,gBAAwC;AAElE,QAAO;EACL,GAAG;EACH,QAAQ;EACT"}
|
package/dist/themes/dark.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ declare const dark: {
|
|
|
9
9
|
theme: InternalTheme;
|
|
10
10
|
}) => Elements);
|
|
11
11
|
theme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
12
|
-
baseTheme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
13
12
|
layout?: Layout | undefined;
|
|
14
13
|
variables?: Variables | undefined;
|
|
15
14
|
captcha?: CaptchaAppearanceOptions | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dark.d.ts","names":[],"sources":["../../src/themes/dark.ts"],"sourcesContent":[],"mappings":";;;;cAEa;;;
|
|
1
|
+
{"version":3,"file":"dark.d.ts","names":[],"sources":["../../src/themes/dark.ts"],"sourcesContent":[],"mappings":";;;;cAEa;;;aAuBX,QAAA;IAvBW,KAuBX,eAAA;EAAA,CAAA,EAAA,WAAA,CAAA"}
|
package/dist/themes/dark.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createTheme } from "./createTheme.js";
|
|
2
2
|
|
|
3
3
|
//#region src/themes/dark.ts
|
|
4
|
-
const dark =
|
|
4
|
+
const dark = createTheme({
|
|
5
5
|
name: "dark",
|
|
6
6
|
variables: {
|
|
7
7
|
colorBackground: "#212126",
|
|
@@ -16,6 +16,7 @@ const dark = experimental_createTheme({
|
|
|
16
16
|
providerIcon__apple: { filter: "invert(1)" },
|
|
17
17
|
providerIcon__github: { filter: "invert(1)" },
|
|
18
18
|
providerIcon__okx_wallet: { filter: "invert(1)" },
|
|
19
|
+
providerIcon__vercel: { filter: "invert(1)" },
|
|
19
20
|
activeDeviceIcon: {
|
|
20
21
|
"--cl-chassis-bottom": "#d2d2d2",
|
|
21
22
|
"--cl-chassis-back": "#e6e6e6",
|
package/dist/themes/dark.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dark.js","names":[],"sources":["../../src/themes/dark.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"dark.js","names":[],"sources":["../../src/themes/dark.ts"],"sourcesContent":["import { createTheme } from './createTheme';\n\nexport const dark = createTheme({\n name: 'dark',\n variables: {\n colorBackground: '#212126',\n colorNeutral: 'white',\n colorPrimary: '#ffffff',\n colorPrimaryForeground: 'black',\n colorForeground: 'white',\n colorInputForeground: 'white',\n colorInput: '#26262B',\n },\n elements: {\n providerIcon__apple: { filter: 'invert(1)' },\n providerIcon__github: { filter: 'invert(1)' },\n providerIcon__okx_wallet: { filter: 'invert(1)' },\n providerIcon__vercel: { filter: 'invert(1)' },\n activeDeviceIcon: {\n '--cl-chassis-bottom': '#d2d2d2',\n '--cl-chassis-back': '#e6e6e6',\n '--cl-chassis-screen': '#e6e6e6',\n '--cl-screen': '#111111',\n },\n },\n});\n"],"mappings":";;;AAEA,MAAa,OAAO,YAAY;CAC9B,MAAM;CACN,WAAW;EACT,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,wBAAwB;EACxB,iBAAiB;EACjB,sBAAsB;EACtB,YAAY;EACb;CACD,UAAU;EACR,qBAAqB,EAAE,QAAQ,aAAa;EAC5C,sBAAsB,EAAE,QAAQ,aAAa;EAC7C,0BAA0B,EAAE,QAAQ,aAAa;EACjD,sBAAsB,EAAE,QAAQ,aAAa;EAC7C,kBAAkB;GAChB,uBAAuB;GACvB,qBAAqB;GACrB,uBAAuB;GACvB,eAAe;GAChB;EACF;CACF,CAAC"}
|
package/dist/themes/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { experimental_createTheme } from "./createTheme.js";
|
|
2
1
|
import { dark } from "./dark.js";
|
|
3
2
|
import { shadesOfPurple } from "./shadesOfPurple.js";
|
|
4
3
|
import { neobrutalism } from "./neobrutalism.js";
|
|
5
4
|
import { shadcn } from "./shadcn.js";
|
|
6
|
-
|
|
7
|
-
export { dark, experimental__simple, experimental_createTheme, neobrutalism, shadcn, shadesOfPurple };
|
|
5
|
+
export { dark, neobrutalism, shadcn, shadesOfPurple };
|
package/dist/themes/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { experimental_createTheme } from "./createTheme.js";
|
|
2
1
|
import { dark } from "./dark.js";
|
|
3
2
|
import { shadesOfPurple } from "./shadesOfPurple.js";
|
|
4
3
|
import { neobrutalism } from "./neobrutalism.js";
|
|
5
4
|
import { shadcn } from "./shadcn.js";
|
|
6
|
-
import { experimental__simple } from "./simple.js";
|
|
7
5
|
|
|
8
|
-
export { dark,
|
|
6
|
+
export { dark, neobrutalism, shadcn, shadesOfPurple };
|
|
@@ -9,7 +9,6 @@ declare const neobrutalism: {
|
|
|
9
9
|
theme: InternalTheme;
|
|
10
10
|
}) => Elements);
|
|
11
11
|
theme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
12
|
-
baseTheme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
13
12
|
layout?: Layout | undefined;
|
|
14
13
|
variables?: Variables | undefined;
|
|
15
14
|
captcha?: CaptchaAppearanceOptions | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createTheme } from "./createTheme.js";
|
|
2
2
|
|
|
3
3
|
//#region src/themes/neobrutalism.ts
|
|
4
4
|
const buttonStyle = {
|
|
@@ -18,7 +18,7 @@ const shadowStyle = {
|
|
|
18
18
|
boxShadow: "3px 3px 0px #000",
|
|
19
19
|
border: "2px solid #000"
|
|
20
20
|
};
|
|
21
|
-
const neobrutalism =
|
|
21
|
+
const neobrutalism = createTheme({
|
|
22
22
|
name: "neobrutalism",
|
|
23
23
|
simpleStyles: true,
|
|
24
24
|
variables: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"neobrutalism.js","names":[],"sources":["../../src/themes/neobrutalism.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"neobrutalism.js","names":[],"sources":["../../src/themes/neobrutalism.ts"],"sourcesContent":["import { createTheme } from './createTheme';\n\nconst buttonStyle = {\n boxShadow: '3px 3px 0px #000',\n border: '2px solid #000',\n '&:focus': {\n boxShadow: '4px 4px 0px #000',\n border: '2px solid #000',\n transform: 'scale(1.01)',\n },\n '&:active': {\n boxShadow: '2px 2px 0px #000',\n transform: 'translate(1px)',\n },\n};\n\nconst shadowStyle = {\n boxShadow: '3px 3px 0px #000',\n border: '2px solid #000',\n};\n\nexport const neobrutalism = createTheme({\n name: 'neobrutalism',\n //@ts-expect-error not public api\n simpleStyles: true,\n variables: {\n colorPrimary: '#DF1B1B',\n colorShimmer: 'rgba(255,255,255,0.64)',\n fontWeight: {\n normal: 500,\n medium: 600,\n bold: 700,\n },\n },\n elements: {\n cardBox: {\n boxShadow: '7px 7px 0px #000',\n border: '3px solid #000',\n },\n card: {\n borderRadius: '0',\n },\n headerSubtitle: { color: '#212126' },\n alternativeMethodsBlockButton: buttonStyle,\n socialButtonsIconButton: {\n ...buttonStyle,\n },\n selectButton: {\n ...buttonStyle,\n ...shadowStyle,\n transition: 'all 0.2s ease-in-out',\n '&:focus': {\n boxShadow: '4px 4px 0px #000',\n border: '2px solid #000',\n transform: 'scale(1.01)',\n },\n },\n socialButtonsBlockButton: { ...buttonStyle, color: '#212126' },\n profileSectionPrimaryButton: buttonStyle,\n profileSectionItem: { color: '#212126' },\n avatarImageActionsUpload: buttonStyle,\n menuButton: shadowStyle,\n menuList: shadowStyle,\n formButtonPrimary: buttonStyle,\n navbarButton: buttonStyle,\n formFieldAction: {\n fontWeight: '700',\n },\n formFieldInput: {\n ...shadowStyle,\n transition: 'all 0.2s ease-in-out',\n '&:focus': {\n boxShadow: '4px 4px 0px #000',\n border: '2px solid #000',\n transform: 'scale(1.01)',\n },\n '&:hover': {\n ...shadowStyle,\n transform: 'scale(1.01)',\n },\n },\n table: shadowStyle,\n tableHead: {\n color: '#212126',\n },\n dividerLine: {\n background: '#000',\n },\n dividerText: {\n fontWeight: '700',\n color: '#212126',\n },\n footer: {\n background: '#fff',\n '& div': {\n color: '#212126',\n },\n },\n footerActionText: {\n color: '#212126',\n },\n footerActionLink: {\n fontWeight: '700',\n borderBottom: '3px solid',\n '&:focus': {\n boxShadow: 'none',\n },\n },\n actionCard: {\n ...shadowStyle,\n },\n badge: {\n border: '1px solid #000',\n background: '#fff',\n color: '#212126',\n },\n },\n});\n"],"mappings":";;;AAEA,MAAM,cAAc;CAClB,WAAW;CACX,QAAQ;CACR,WAAW;EACT,WAAW;EACX,QAAQ;EACR,WAAW;EACZ;CACD,YAAY;EACV,WAAW;EACX,WAAW;EACZ;CACF;AAED,MAAM,cAAc;CAClB,WAAW;CACX,QAAQ;CACT;AAED,MAAa,eAAe,YAAY;CACtC,MAAM;CAEN,cAAc;CACd,WAAW;EACT,cAAc;EACd,cAAc;EACd,YAAY;GACV,QAAQ;GACR,QAAQ;GACR,MAAM;GACP;EACF;CACD,UAAU;EACR,SAAS;GACP,WAAW;GACX,QAAQ;GACT;EACD,MAAM,EACJ,cAAc,KACf;EACD,gBAAgB,EAAE,OAAO,WAAW;EACpC,+BAA+B;EAC/B,yBAAyB,EACvB,GAAG,aACJ;EACD,cAAc;GACZ,GAAG;GACH,GAAG;GACH,YAAY;GACZ,WAAW;IACT,WAAW;IACX,QAAQ;IACR,WAAW;IACZ;GACF;EACD,0BAA0B;GAAE,GAAG;GAAa,OAAO;GAAW;EAC9D,6BAA6B;EAC7B,oBAAoB,EAAE,OAAO,WAAW;EACxC,0BAA0B;EAC1B,YAAY;EACZ,UAAU;EACV,mBAAmB;EACnB,cAAc;EACd,iBAAiB,EACf,YAAY,OACb;EACD,gBAAgB;GACd,GAAG;GACH,YAAY;GACZ,WAAW;IACT,WAAW;IACX,QAAQ;IACR,WAAW;IACZ;GACD,WAAW;IACT,GAAG;IACH,WAAW;IACZ;GACF;EACD,OAAO;EACP,WAAW,EACT,OAAO,WACR;EACD,aAAa,EACX,YAAY,QACb;EACD,aAAa;GACX,YAAY;GACZ,OAAO;GACR;EACD,QAAQ;GACN,YAAY;GACZ,SAAS,EACP,OAAO,WACR;GACF;EACD,kBAAkB,EAChB,OAAO,WACR;EACD,kBAAkB;GAChB,YAAY;GACZ,cAAc;GACd,WAAW,EACT,WAAW,QACZ;GACF;EACD,YAAY,EACV,GAAG,aACJ;EACD,OAAO;GACL,QAAQ;GACR,YAAY;GACZ,OAAO;GACR;EACF;CACF,CAAC"}
|
package/dist/themes/shadcn.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ declare const shadcn: {
|
|
|
9
9
|
theme: InternalTheme;
|
|
10
10
|
}) => Elements);
|
|
11
11
|
theme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
12
|
-
baseTheme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
13
12
|
layout?: Layout | undefined;
|
|
14
13
|
variables?: Variables | undefined;
|
|
15
14
|
captcha?: CaptchaAppearanceOptions | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadcn.d.ts","names":[],"sources":["../../src/themes/shadcn.ts"],"sourcesContent":[],"mappings":";;;;cAEa;;;
|
|
1
|
+
{"version":3,"file":"shadcn.d.ts","names":[],"sources":["../../src/themes/shadcn.ts"],"sourcesContent":[],"mappings":";;;;cAEa;;;aAqCX,QAAA;IArCW,KAqCX,eAAA;EAAA,CAAA,EAAA,WAAA,CAAA"}
|
package/dist/themes/shadcn.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createTheme } from "./createTheme.js";
|
|
2
2
|
|
|
3
3
|
//#region src/themes/shadcn.ts
|
|
4
|
-
const shadcn =
|
|
4
|
+
const shadcn = createTheme({
|
|
5
5
|
name: "shadcn",
|
|
6
6
|
cssLayerName: "components",
|
|
7
7
|
variables: {
|
|
@@ -31,7 +31,8 @@ const shadcn = experimental_createTheme({
|
|
|
31
31
|
button: { "&[data-variant=\"solid\"]::after": { display: "none" } },
|
|
32
32
|
providerIcon__apple: "dark:invert",
|
|
33
33
|
providerIcon__github: "dark:invert",
|
|
34
|
-
providerIcon__okx_wallet: "dark:invert"
|
|
34
|
+
providerIcon__okx_wallet: "dark:invert",
|
|
35
|
+
providerIcon__vercel: "dark:invert"
|
|
35
36
|
}
|
|
36
37
|
});
|
|
37
38
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadcn.js","names":[],"sources":["../../src/themes/shadcn.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"shadcn.js","names":[],"sources":["../../src/themes/shadcn.ts"],"sourcesContent":["import { createTheme } from './createTheme';\n\nexport const shadcn = createTheme({\n name: 'shadcn',\n cssLayerName: 'components',\n variables: {\n colorBackground: 'var(--card)',\n colorDanger: 'var(--destructive)',\n colorForeground: 'var(--card-foreground)',\n colorInput: 'var(--input)',\n colorInputForeground: 'var(--card-foreground)',\n colorModalBackdrop: 'var(--color-black)',\n colorMuted: 'var(--muted)',\n colorMutedForeground: 'var(--muted-foreground)',\n colorNeutral: 'var(--foreground)',\n colorPrimary: 'var(--primary)',\n colorPrimaryForeground: 'var(--primary-foreground)',\n colorRing: 'var(--ring)',\n fontWeight: {\n normal: 'var(--font-weight-normal)',\n medium: 'var(--font-weight-medium)',\n semibold: 'var(--font-weight-semibold)',\n bold: 'var(--font-weight-semibold)',\n },\n },\n elements: {\n input: 'bg-transparent dark:bg-input/30',\n cardBox: 'shadow-sm border',\n popoverBox: 'shadow-sm border',\n button: {\n '&[data-variant=\"solid\"]::after': {\n display: 'none',\n },\n },\n providerIcon__apple: 'dark:invert',\n providerIcon__github: 'dark:invert',\n providerIcon__okx_wallet: 'dark:invert',\n providerIcon__vercel: 'dark:invert',\n },\n});\n"],"mappings":";;;AAEA,MAAa,SAAS,YAAY;CAChC,MAAM;CACN,cAAc;CACd,WAAW;EACT,iBAAiB;EACjB,aAAa;EACb,iBAAiB;EACjB,YAAY;EACZ,sBAAsB;EACtB,oBAAoB;EACpB,YAAY;EACZ,sBAAsB;EACtB,cAAc;EACd,cAAc;EACd,wBAAwB;EACxB,WAAW;EACX,YAAY;GACV,QAAQ;GACR,QAAQ;GACR,UAAU;GACV,MAAM;GACP;EACF;CACD,UAAU;EACR,OAAO;EACP,SAAS;EACT,YAAY;EACZ,QAAQ,EACN,oCAAkC,EAChC,SAAS,QACV,EACF;EACD,qBAAqB;EACrB,sBAAsB;EACtB,0BAA0B;EAC1B,sBAAsB;EACvB;CACF,CAAC"}
|
|
@@ -9,7 +9,6 @@ declare const shadesOfPurple: {
|
|
|
9
9
|
theme: InternalTheme;
|
|
10
10
|
}) => Elements);
|
|
11
11
|
theme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
12
|
-
baseTheme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
13
12
|
layout?: Layout | undefined;
|
|
14
13
|
variables?: Variables | undefined;
|
|
15
14
|
captcha?: CaptchaAppearanceOptions | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createTheme } from "./createTheme.js";
|
|
2
2
|
import { dark } from "./dark.js";
|
|
3
3
|
|
|
4
4
|
//#region src/themes/shadesOfPurple.ts
|
|
5
|
-
const shadesOfPurple =
|
|
5
|
+
const shadesOfPurple = createTheme({
|
|
6
6
|
name: "shadesOfPurple",
|
|
7
|
-
|
|
7
|
+
theme: dark,
|
|
8
8
|
variables: {
|
|
9
9
|
colorBackground: "#3f3c77",
|
|
10
10
|
colorPrimary: "#f8d80d",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadesOfPurple.js","names":[],"sources":["../../src/themes/shadesOfPurple.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"shadesOfPurple.js","names":[],"sources":["../../src/themes/shadesOfPurple.ts"],"sourcesContent":["import { createTheme } from './createTheme';\nimport { dark } from './dark';\n\nexport const shadesOfPurple = createTheme({\n name: 'shadesOfPurple',\n theme: dark,\n variables: {\n colorBackground: '#3f3c77',\n colorPrimary: '#f8d80d',\n colorPrimaryForeground: '#38375f',\n colorInputForeground: '#a1fdfe',\n colorShimmer: 'rgba(161,253,254,0.36)',\n },\n});\n"],"mappings":";;;;AAGA,MAAa,iBAAiB,YAAY;CACxC,MAAM;CACN,OAAO;CACP,WAAW;EACT,iBAAiB;EACjB,cAAc;EACd,wBAAwB;EACxB,sBAAsB;EACtB,cAAc;EACf;CACF,CAAC"}
|
package/dist/themes/simple.d.ts
CHANGED
|
@@ -2,19 +2,18 @@ import { BaseTheme, CaptchaAppearanceOptions, Elements, Layout, Variables } from
|
|
|
2
2
|
import { InternalTheme } from "../foundations/defaultFoundations.js";
|
|
3
3
|
|
|
4
4
|
//#region src/themes/simple.d.ts
|
|
5
|
-
declare const
|
|
5
|
+
declare const simple: {
|
|
6
6
|
__type: "prebuilt_appearance";
|
|
7
7
|
name?: string;
|
|
8
8
|
elements?: Elements | ((params: {
|
|
9
9
|
theme: InternalTheme;
|
|
10
10
|
}) => Elements);
|
|
11
11
|
theme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
12
|
-
baseTheme?: (BaseTheme | BaseTheme[]) | undefined;
|
|
13
12
|
layout?: Layout | undefined;
|
|
14
13
|
variables?: Variables | undefined;
|
|
15
14
|
captcha?: CaptchaAppearanceOptions | undefined;
|
|
16
15
|
cssLayerName?: string | undefined;
|
|
17
16
|
};
|
|
18
17
|
//#endregion
|
|
19
|
-
export {
|
|
18
|
+
export { simple };
|
|
20
19
|
//# sourceMappingURL=simple.d.ts.map
|