(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4928],{83860:function(e,t,r){"use strict";r.r(t),r.d(t,{Page:function(){return I},__N_SSP:function(){return U},default:function(){return M}});var n=r(37288),o=r(95235),i=r(20406),c=r(81333),s=r(82841),u=r.n(s),a=r(2784),l=r(53510),f=r(14503),d=r(47866),h=r(47401),p=r(78994),m=r(35323),g=r(14444),b=r(44889),j=r(70295),y=r(56940),v=r(50809),$=r(30195),O=r(63955),x=r(91550),P=r(82217),w=r(84021),S=r(29644),C=r(99186),A=r(71796),k=r(58793),Z=r(52322);function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach(function(t){(0,o.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var F=$.z.object({countrycode:w._P.countrycode,phone:w._P.text.min(1).max(20)}),W=function(){var e,t=(0,O.cI)(),r=S.h.auth.signInWithOtp.useMutation(),o=(0,v.t)(),s=(0,k.eC)(),$=(0,c.Z)(s,1)[0].redirectUri,E=(0,f.Py)(),W=(0,a.useState)(),z=W[0],T=W[1],L=(0,a.useState)(!1),_=L[0],N=L[1],U=S.h.challenge.getChallenge.useMutation({retry:!1}).mutateAsync,I=S.h.challenge.validateSignature.useMutation({retry:!1}).mutateAsync,M=(e=(0,i.Z)(u().mark(function e(){var t,r,n,i,c,s,a,l;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),e.prev=1,e.next=4,U();case 4:return t=e.sent,r=[],e.next=8,(0,A.t)(t.challenge,r);case 8:return i=(n=e.sent).encodedWebAuthnSig,c=n.accountName,s=n.keySlot,(l=new Uint8Array((a=(0,j.nr)(i)).length+1))[0]=s,l.set(a,1),e.next=18,I({recoveryType:x.w.WEBAUTHN,signature:(0,y.ci)(l),challengeId:t.id,identifier:"".concat(c,".").concat(s)});case 18:o.push(null!=$?$:"/"),e.next=24;break;case 21:e.prev=21,e.t0=e.catch(1),E.show((0,C.j)(e.t0),{preset:"error",isUrgent:!0,duration:1e7});case 24:return e.prev=24,N(!1),e.finish(24);case 27:case"end":return e.stop()}},e,null,[[1,21,24,27]])})),function(){return e.apply(this,arguments)});function H(){return(H=(0,i.Z)(u().mark(function e(n){var o,i,c,s;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.phone,i=n.countrycode,e.next=3,r.mutateAsync({phone:o,countrycode:i,captchaToken:z}).catch(function(e){return console.error("Couldn't send OTP",e),b.ss,{error:{message:e.message}}});case 3:(c=e.sent.error)&&(s=c.message.toLowerCase(),t.setError("phone",{type:"custom",message:s}));case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}return(0,a.useEffect)(function(){return function(){return E.hide()}},[E]),(0,Z.jsx)(O.RV,D(D({},t),{},{children:t.formState.isSubmitSuccessful?(0,Z.jsx)(P.W,{phone:"".concat(t.getValues().countrycode).concat(t.getValues().phone),onSuccess:function(){o.push("/")}}):(0,Z.jsx)(w.LH,{form:t,schema:F,onSubmit:function(e){return H.apply(this,arguments)},defaultValues:{phone:"",countrycode:""},formProps:{flex:1},props:{countrycode:{size:"$3"},phone:{"aria-label":"Phone number","$theme-dark":{borderBottomColor:"$green10Dark"},"$theme-light":{borderBottomColor:"$green9Light"},fontFamily:"$mono",fontVariant:["tabular-nums"],fontSize:"$7",fontWeight:"400",borderWidth:0,borderBottomWidth:2,borderRadius:"$0",width:"100%",backgroundColor:"transparent",color:"$color12",outlineColor:"transparent",theme:"green",focusStyle:{borderBottomColor:"$green3Light"},fieldsetProps:{f:1}}},renderAfter:function(e){var t=e.submit;return(0,Z.jsxs)(n.FA,{jc:"center",ai:"center",mt:"$4",children:[(0,Z.jsx)(n.sL,{f:1,mt:"0",jc:"space-between",$sm:{jc:"center",height:"100%"},ai:"center",children:(0,Z.jsx)(d.M,{disabled:!z,onPress:function(){return t()},br:"$3",bc:"$green9Light",$sm:{w:"100%"},$gtMd:{mt:"0",als:"flex-end",mx:0,ml:"auto",w:"$10",h:"$3.5"},children:(0,Z.jsx)(h.oD,{size:"$2",padding:"unset",ta:"center",margin:"unset",col:"black",children:"/SIGN UP"})})}),(0,Z.jsx)(n.FA,{pos:"relative",pb:"$size.1",w:"100%",maw:"$size.22",children:(0,Z.jsxs)(n.sL,{jc:"center",ai:"center",mt:"$4",gap:"$1",children:[(0,Z.jsx)(p.n,{size:"$2",color:"$color11",children:"Already have an account?"}),(0,Z.jsx)(d.M,{onPress:M,disabled:_,unstyled:!0,children:(0,Z.jsx)(h.oD,{color:"$color11",size:"$2",textDecorationLine:"underline",children:_?"Signing in...":"Sign in"})})]})}),(0,Z.jsx)(n.FA,{pt:"$4",children:(0,Z.jsx)(l.Nc,{siteKey:"0x4AAAAAAAeYs2vTjNq4lanE",onSuccess:function(e){T(e)}})})]})},children:function(e){var t=e.countrycode,r=e.phone;return(0,Z.jsxs)(n.FA,{gap:"$5",jc:"center",$sm:{f:1},children:[(0,Z.jsx)(m.M,{color:"$color12",children:"CREATE YOUR ACCOUNT"}),(0,Z.jsx)(g.H3,{lineHeight:28,"$platform-web":{fontFamily:"$mono"},"$theme-light":{col:"$gray10Light"},"$theme-dark":{col:"$olive"},fontWeight:"300",$sm:{size:"$5"},children:"Sign up with your phone number."}),(0,Z.jsxs)(n.FA,{gap:"$4",children:[(0,Z.jsx)(p.n,{color:"$color12",size:"$1",fontWeight:"500",children:"Your Phone"}),(0,Z.jsxs)(n.sL,{gap:"$5",children:[t,r]})]})]})}})}))},z=function(){return(0,Z.jsx)(n.FA,{h:"100%",jc:"center",ai:"center",f:1,children:(0,Z.jsx)(W,{})})},T=r(97729),L=r.n(T),_=r(15340),N=r(24869),U=!0,I=function(e){var t=e.images,r=(0,a.useContext)(N.v),n=r.carouselImages,o=r.setCarouselImages;return(0,a.useEffect)(function(){0===n.length&&o(t)},[o,n,t]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(L(),{children:[(0,Z.jsx)("title",{children:"Send | Sign Up"}),(0,Z.jsx)("meta",{name:"description",content:"Future Cash. Sign up for Send."},"desc")]}),(0,Z.jsx)(z,{})]})};I.getLayout=function(e){return(0,Z.jsx)(_.g,{children:e})};var M=I},91550:function(e,t,r){"use strict";r.d(t,{w:function(){return o}});var n,o=((n={}).EOA="EOA",n.WEBAUTHN="Passkey",n)},24869:function(e,t,r){"use strict";r.d(t,{m:function(){return i},v:function(){return o}});var n=r(2784),o=(0,n.createContext)({carouselImages:[],setCarouselImages:function(){},carouselProgress:0,setCarouselProgress:function(){}});function i(){var e=(0,n.useContext)(o);if(!e)throw Error("useAuthCarouselContext must be used within a AuthCarouselContextProvider");return e}},82217:function(e,t,r){"use strict";r.d(t,{W:function(){return y}});var n=r(20406),o=r(82841),i=r.n(o),c=r(98813),s=r(37288),u=r(47866),a=r(47401),l=r(35323),f=r(14444),d=r(78994),h=r(84021),p=r(19578),m=r(63955),g=r(30195),b=r(52322),j=g.z.object({token:h._P.text}),y=function(e){var t=e.phone,r=e.onSuccess,o=e.type,g=void 0===o?"sms":o,y=(0,p.$)(),v=(0,m.cI)();function $(){return($=(0,n.Z)(i().mark(function e(n){var o,c,s,u,a;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.token,e.next=3,y.auth.verifyOtp({phone:t,token:o,type:g});case 3:s=(c=e.sent).error,u=c.data,s?(a=null==s?void 0:s.message.toLowerCase(),v.setError("token",{type:"custom",message:a})):r(u);case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}return(0,b.jsx)(c.n,{children:(0,b.jsx)(h.LH,{form:v,schema:j,onSubmit:function(e){return $.apply(this,arguments)},defaultValues:{token:""},props:{token:{"aria-label":"One-time Password","$theme-dark":{borderBottomColor:"$green10Dark"},"$theme-light":{borderBottomColor:"$green9Light"},borderWidth:0,borderBottomWidth:2,borderRadius:"$0",width:"100%",backgroundColor:"transparent",color:"$color12",fontFamily:"$mono",fontVariant:["tabular-nums"],fontWeight:"400",fontSize:"$7",$sm:{w:"60%"},textContentType:"oneTimeCode",autoComplete:"one-time-code",outlineColor:"transparent",theme:"green",autoFocus:!0,fieldsetProps:{f:1},focusStyle:{borderBottomColor:"$green3Light"}}},renderAfter:function(e){var t=e.submit;return(0,b.jsx)(s.sL,{f:1,mt:"0",jc:"space-between",$sm:{jc:"center",height:"100%"},ai:"center",children:(0,b.jsx)(u.M,{onPress:function(){return t()},br:"$3",bc:"$green9Light",$sm:{w:"100%"},$gtMd:{mt:"0",als:"flex-end",mx:0,ml:"auto",w:"$10.5",h:"$3.5"},children:(0,b.jsx)(a.oD,{size:"$1",padding:"unset",ta:"center",margin:"unset",col:"black",children:"VERIFY ACCOUNT"})})})},children:function(e){var t=e.token;return(0,b.jsxs)(s.FA,{gap:"$5",jc:"center",$sm:{f:1},children:[(0,b.jsx)(l.M,{color:"$color12",children:"VERIFY ACCOUNT"}),(0,b.jsx)(f.H3,{lineHeight:28,"$platform-web":{fontFamily:"$mono"},"$theme-light":{col:"$gray10Light"},"$theme-dark":{col:"$olive"},fontWeight:"300",$sm:{size:"$5"},children:"Enter verification code"}),(0,b.jsxs)(s.FA,{gap:"$4",children:[(0,b.jsx)(d.n,{color:"$color12",size:"$1",fontWeight:"500",children:"Your Code"}),t]})]})}})})}},15340:function(e,t,r){"use strict";r.d(t,{g:function(){return h}});var n=r(95235),o=r(47590),i=r(26358),c=r(37288),s=r(25975),u=r(23442),a=r(20527),l=r(52322);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e){var t=e.children,r=(0,o.W)();return(0,l.jsx)(i.W,{height:"100%",safeAreaPadding:r&&"y",children:(0,l.jsxs)(c.FA,{ai:"center",f:1,pt:"$7",children:[(0,l.jsx)(s.e,d(d({},(0,a.n)({href:"/"})),{},{mx:"auto",position:"absolute",top:"$6",children:(0,l.jsx)(u.g,{size:"$6",color:"$color12"})})),(0,l.jsx)(c.FA,{pt:"$14",mt:"$10",children:t})]})})}},58793:function(e,t,r){"use strict";r.d(t,{SY:function(){return D},eC:function(){return L},nX:function(){return b},v4:function(){return d},xs:function(){return S}});var n=r(81333),o=r(96529),i=r(24091),c=(0,i.X)(),s=c.useParam,u=c.useParams,a=function(){var e=s("nav"),t=(0,n.Z)(e,2);return[t[0],t[1]]},l=function(){var e=s("token"),t=(0,n.Z)(e,2);return[t[0],t[1]]},f=function(){var e=s("search"),t=(0,n.Z)(e,2);return[t[0],t[1]]},d=function(){var e=u().setParams,t=a(),r=(0,n.Z)(t,1)[0],o=l(),i=(0,n.Z)(o,1)[0],c=f();return[{nav:r,token:i,search:(0,n.Z)(c,1)[0]},e]},h=(0,i.X)(),p=h.useParam,m=h.useParams,g=function(){var e=p("distribution",{initial:void 0,parse:function(e){return Number(e)}}),t=(0,n.Z)(e,2);return[t[0],t[1]]},b=function(){var e=m().setParams,t=g();return[{distribution:(0,n.Z)(t,1)[0]},e]},j=(0,i.X)(),y=j.useParam,v=j.useParams,$=function(){var e=y("idType",{initial:void 0,parse:function(e){return e}}),t=(0,n.Z)(e,2);return[t[0],t[1]]},O=function(){var e=y("recipient"),t=(0,n.Z)(e,2);return[t[0],t[1]]},x=function(){var e=y("amount"),t=(0,n.Z)(e,2);return[t[0],t[1]]},P=function(){var e=y("sendToken",{initial:o.rTN[o.bMK.id]}),t=(0,n.Z)(e,2);return[t[0],t[1]]},w=function(){var e=y("note"),t=(0,n.Z)(e,2);return[t[0],t[1]]},S=function(){var e=v().setParams,t=$(),r=(0,n.Z)(t,1)[0],o=O(),i=(0,n.Z)(o,1)[0],c=x(),s=(0,n.Z)(c,1)[0],u=P(),a=(0,n.Z)(u,1)[0],l=w();return[{idType:r,recipient:i,amount:s,sendToken:a,note:(0,n.Z)(l,1)[0]},e]},C=(0,i.X)(),A=C.useParam,k=C.useParams,Z=function(){var e=A("sendid"),t=(0,n.Z)(e,2);return[t[0],t[1]]},E=function(){var e=A("tag"),t=(0,n.Z)(e,2);return[t[0],t[1]]},D=function(){var e=k().setParams,t=Z(),r=(0,n.Z)(t,1)[0],o=E();return[{sendid:r,tag:(0,n.Z)(o,1)[0]},e]},F=(0,i.X)(),W=F.useParam,z=F.useParams,T=function(){var e=W("redirectUri",{initial:void 0,parse:function(e){var t;if(void 0!==e&&!e.includes("/auth/"))return Array.isArray(e)?decodeURIComponent(null!==(t=e[0])&&void 0!==t?t:""):decodeURIComponent(e)}}),t=(0,n.Z)(e,2);return[t[0],t[1]]},L=function(){var e=z().setParams,t=T();return[{redirectUri:(0,n.Z)(t,1)[0]},e]}},99186:function(e,t,r){"use strict";r.d(t,{j:function(){return n}});var n=function(e){return e.message.startsWith("The operation either timed out or was not allowed")?"Passkey Authentication Failed":e.message}},35323:function(e,t,r){"use strict";r.d(t,{M:function(){return l}});var n=r(95235),o=r(82269),i=r(14444),c=r(52322),s=["fontSize","fontWeight","lineHeight"];function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l=function(e){var t=e.fontSize,r=(e.fontWeight,e.lineHeight),n=(0,o.Z)(e,s);return(0,c.jsx)(i.H1,a(a({fontSize:void 0===t?64:t,lineHeight:void 0===r?57:r},n),{},{children:n.children}))}},47866:function(e,t,r){"use strict";r.d(t,{M:function(){return m}});var n=r(95235),o=r(82269),i=r(63955),c=r(47401),s=r(97119),u=r(27318),a=r(44826),l=r(52322),f=["children","theme"];function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){(0,n.Z)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var p=function(){try{return(0,i.cl)().isSubmitting}catch(e){return console.log(e),!1}},m=function(e){var t=e.children,r=e.theme,n=(0,o.Z)(e,f),i=p();return(0,l.jsx)(c.zx,h(h({testID:"SubmitButton",accessible:!0,"aria-busy":i,iconAfter:(0,l.jsx)(s.GJ,{children:(0,l.jsx)(u.M,{children:i?(0,l.jsx)(a.$,{color:"$color12",opacity:1,y:0,animation:"quick",enterStyle:{opacity:0,y:4},exitStyle:{opacity:0,y:4}},"loading-spinner"):null})}),disabled:i,theme:void 0===r?"green":r},n),{},{children:i?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(c.oD,{children:t})}))}},34561:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/sign-up",function(){return r(83860)}])}},function(e){e.O(0,[6425,9527,6887,5325,4466,7087,2888,9774,179],function(){return e(e.s=34561)}),_N_E=e.O()}]);