PageSourceSearch

https://auth.compose.finance/_next/static/chunks/pages/en/login/set_password-0d72b4668a501350.js

js compose.finance collected 2026-10-04 06:56:59 UTC 15,472 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9383],{43523:function(e,r,t){"use strict";t.d(r,{M:function(){return f}});var o=t(67294),s=t(64761),a=t(48427),n=(0,t(56817).k)((e,{inline:r})=>({root:{display:r?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}})),i=t(64523),l=Object.defineProperty,d=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,r,t)=>r in e?l(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,__spreadValues=(e,r)=>{for(var t in r||(r={}))c.call(r,t)&&__defNormalProp(e,t,r[t]);if(d)for(var t of d(r))u.call(r,t)&&__defNormalProp(e,t,r[t]);return e},__objRest=(e,r)=>{var t={};for(var o in e)c.call(e,o)&&0>r.indexOf(o)&&(t[o]=e[o]);if(null!=e&&d)for(var o of d(e))0>r.indexOf(o)&&u.call(e,o)&&(t[o]=e[o]);return t};let p=(0,o.forwardRef)((e,r)=>{let t=(0,s.N4)("Center",{},e),{inline:a,className:l,unstyled:d,variant:c}=t,u=__objRest(t,["inline","className","unstyled","variant"]),{classes:p,cx:f}=n({inline:a},{name:"Center",unstyled:d,variant:c});return o.createElement(i.x,__spreadValues({ref:r,className:f(p.root,l)},u))});p.displayName="@mantine/core/Center";let f=(0,a.F)(p)},73193:function(e,r,t){"use strict";t.d(r,{W:function(){return L}});var o=t(67294),s=t(83051),a=t(15851),n=t(96768),i=t(64761),l=t(14258),d=t(56817),c=t(35227),u=Object.defineProperty,p=Object.defineProperties,f=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,r,t)=>r in e?u(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,__spreadValues=(e,r)=>{for(var t in r||(r={}))h.call(r,t)&&__defNormalProp(e,t,r[t]);if(g)for(var t of g(r))b.call(r,t)&&__defNormalProp(e,t,r[t]);return e},__spreadProps=(e,r)=>p(e,f(r)),w=(0,d.k)((e,{rightSectionWidth:r},{size:t})=>({visibilityToggle:{},input:{position:"relative",overflow:"hidden"},innerInput:__spreadProps(__spreadValues(__spreadValues({},e.fn.fontStyles()),e.fn.cover(0)),{backgroundColor:"transparent",border:`${(0,n.h)(1)} solid transparent`,borderLeftWidth:0,borderRightWidth:0,boxSizing:"border-box",display:"block",width:`calc(100% - ${(0,n.h)(r)})`,paddingLeft:`calc(${(0,l.a)({size:t,sizes:c.J})}  / 3)`,fontSize:(0,l.a)({size:t,sizes:e.fontSizes}),height:`calc(${(0,l.a)({size:t,sizes:c.J})} - ${(0,n.h)(2)})`,lineHeight:`calc(${(0,l.a)({size:t,sizes:c.J})} - ${(0,n.h)(4)})`,color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,"&::-ms-reveal, &::-ms-clear":{display:"none"},"&:focus":{outline:0},"&:disabled":{cursor:"not-allowed",pointerEvents:"none",backgroundColor:"dark"===e.colorScheme?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"&::placeholder":__spreadProps(__spreadValues({},e.fn.placeholderStyles()),{opacity:1}),"&[data-invalid]":{color:e.fn.variant({variant:"filled",color:"red"}).background,"&::placeholder":{opacity:1,color:e.fn.variant({variant:"filled",color:"red"}).background}},"&[data-with-icon]":{paddingLeft:(0,l.a)({size:t,sizes:c.J})}})})),_=t(12756),m=t(49834),y=t(94151),v=Object.defineProperty,x=Object.defineProperties,P=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,PasswordInput_defNormalProp=(e,r,t)=>r in e?v(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,PasswordInput_spreadValues=(e,r)=>{for(var t in r||(r={}))C.call(r,t)&&PasswordInput_defNormalProp(e,t,r[t]);if(j)for(var t of j(r))S.call(r,t)&&PasswordInput_defNormalProp(e,t,r[t]);return e},PasswordInput_spreadProps=(e,r)=>x(e,P(r)),__objRest=(e,r)=>{var t={};for(var o in e)C.call(e,o)&&0>r.indexOf(o)&&(t[o]=e[o]);if(null!=e&&j)for(var o of j(e))0>r.indexOf(o)&&S.call(e,o)&&(t[o]=e[o]);return t};let O={xs:(0,n.h)(22),sm:(0,n.h)(26),md:(0,n.h)(28),lg:(0,n.h)(32),xl:(0,n.h)(40)},I={xs:(0,n.h)(12),sm:(0,n.h)(15),md:(0,n.h)(17),lg:(0,n.h)(19),xl:(0,n.h)(21)},N={xs:(0,n.h)(28),sm:(0,n.h)(32),md:(0,n.h)(34),lg:(0,n.h)(44),xl:(0,n.h)(54)},k={size:"sm",toggleTabIndex:-1,visibilityToggleIcon:({reveal:e,size:r})=>
1o.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:r,height:r}},o.createElement("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})),__staticSelector:"PasswordInput"},L=(0,o.forwardRef)((e,r)=>{let t=(0,i.N4)("PasswordInput",k,e),{radius:n,disabled:d,size:c,toggleTabIndex:u,className:p,id:f,label:g,error:h,required:b,style:v,icon:x,description:P,wrapperProps:j,classNames:C,styles:S,variant:L,visibilityToggleIcon:E,__staticSelector:z,sx:T,labelProps:V,descriptionProps:M,errorProps:R,unstyled:D,visibilityToggleLabel:Z,withAsterisk:q,inputContainer:B,iconWidth:W,inputWrapperOrder:$,visible:F,defaultVisible:A,onVisibilityChange:H}=t,K=__objRest(t,["radius","disabled","size","toggleTabIndex","className","id","label","error","required","style","icon","description","wrapperProps","classNames","styles","variant","visibilityToggleIcon","__staticSelector","sx","labelProps","descriptionProps","errorProps","unstyled","visibilityToggleLabel","withAsterisk","inputContainer","iconWidth","inputWrapperOrder","visible","defaultVisible","onVisibilityChange"]),U=(0,l.a)({size:c,sizes:N}),{classes:J}=w({rightSectionWidth:U},{name:"PasswordInput",classNames:C,styles:S,unstyled:D,size:c,variant:L}),X=(0,s.M)(f),{systemStyles:G,rest:Y}=(0,_.x)(K),[Q,ee]=(0,a.C)({value:F,defaultValue:A,finalValue:!1,onChange:H}),toggleVisibility=()=>ee(!Q),er=o.createElement(m.A,{className:J.visibilityToggle,tabIndex:u,radiu
1s:n,size:(0,l.a)({size:c,sizes:O}),"aria-hidden":!Z,"aria-label":Z,unstyled:D,onMouseDown:e=>{e.preventDefault(),toggleVisibility()},onKeyDown:e=>{" "===e.key&&(e.preventDefault(),toggleVisibility())}},o.createElement(E,{reveal:Q,size:(0,l.a)({size:c,sizes:I})}));return o.createElement(y.I.Wrapper,PasswordInput_spreadValues(PasswordInput_spreadValues({required:b,id:X,label:g,error:h,description:P,size:c,className:p,style:v,classNames:C,styles:S,__staticSelector:z,sx:T,errorProps:R,descriptionProps:M,labelProps:V,unstyled:D,withAsterisk:q,inputWrapperOrder:$,inputContainer:B,variant:L},G),j),o.createElement(y.I,{component:"div",error:h,icon:x,size:c,classNames:PasswordInput_spreadProps(PasswordInput_spreadValues({},C),{input:J.input}),styles:S,radius:n,disabled:d,__staticSelector:z,rightSectionWidth:U,rightSection:!d&&er,variant:L,unstyled:D,iconWidth:W},o.createElement("input",PasswordInput_spreadValues({type:Q?"text":"password",required:b,"data-invalid":!!h||void 0,"data-with-icon":!!x||void 0,className:J.innerInput,disabled:d,id:X,ref:r},Y))))});L.displayName="@mantine/core/PasswordInput"},59417:function(e,r,t){"use strict";t.d(r,{G:function(){return useDebouncedState}});var o=t(67294);function useDebouncedState(e,r,t={leading:!1}){let[s,a]=(0,o.useState)(e),n=(0,o.useRef)(null),i=(0,o.useRef)(!0),clearTimeout=()=>window.clearTimeout(n.current);return(0,o.useEffect)(()=>clearTimeout,[]),[s,e=>{clearTimeout(),i.current&&t.leading?a(e):n.current=window.setTimeout(()=>{i.current=!0,a(e)},r),i.current=!1}]}},71298:function(e,r,t){"use strict";function px(e){return"number"==typeof e?e:"string"==typeof e?e.includes("px")?Number(e.replace("px","")):e.includes("rem")?16*Number(e.replace("rem","")):Number(e):NaN}t.d(r,{px:function(){return px}})},17010:function(e,r,t){"use strict";t.d(r,{Z:function(){return o}});var o=(0,t(30853).Z)("info-circle","IconInfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]])},4528:function(e,r,t){"use strict";t.d(r,{Z:function(){return o}});var o=(0,t(30853).Z)("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]])},54827:function(e,r,t){"use strict";t.d(r,{Z:function(){return o}});var o=(0,t(30853).Z)("phone","IconPhone",[["path",{d:"M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2",key:"svg-0"}]])},62705:function(e,r,t){var o=t(55639).Symbol;e.exports=o},44239:function(e,r,t){var o=t(62705),s=t(89607),a=t(2333),n=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":n&&n in Object(e)?s(e):a(e)}},31957:function(e,r,t){var o="object"==typeof t.g&&t.g&&t.g.Object===Object&&t.g;e.exports=o},89607:function(e,r,t){var o=t(62705),s=Object.prototype,a=s.hasOwnProperty,n=s.toString,i=o?o.toStringTag:void 0;e.exports=function(e){var r=a.call(e,i),t=e[i];try{e[i]=void 0;var o=!0}catch(e){}var s=n.call(e);return o&&(r?e[i]=t:delete e[i]),s}},2333:function(e){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},55639:function(e,r,t){var o=t(31957),s="object"==typeof self&&self&&self.Object===Object&&self,a=o||s||Function("return this")();e.exports=a},51584:function(e,r,t){var o=t(44239),s=t(37005);e.exports=function(e){return!0===e||!1===e||s(e)&&"[object Boolean]"==o(e)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},27715:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/en/login/set_password",function(){return t(32874)}])},12822:function(e,r,t){"use strict";t.d(r,{o:function(){return formatErrors}});var o=t(85893);function formatErrors(e){if(!e)return{};let r={};for(let t in e){let s=e[t];Array.isArray(s)?r[t]=(0,o.jsx)(o.Fragment,{children:s.map((e,r)=>(0,o.jsx)("div",{children:e},r))}):r[t]=s}return r}t(67294)},5957:function(e,r,t){"use strict";t.d(r,{x:function(){return apiLogout}});var o=t(11163),s=t.n(o),a=t(1448);let apiLogout=()=>(0,a.j0)("/api/v1/logout",{}).then(e=>{e.ok?e.json().then(e=>{e.redirect_to?window.location.href=e.redirect_to:window.location.href="/"}):s().reload()})},72614:function(e,r,t){"use strict";t.d(r,{H:function(){return apiUpdatePassword}});var o=t(1448);let apiUpdatePassword=e=>(0,o.j0)("/api/fe/v1/update_password",e).then(e=>e.ok?{success:!0}:400===e.status?e.json().then(e=>(0,o.Nr)({current_password:e.current_password,password:e.password})):404===e.status?{success:!1,error_type:"incorrect_password"}:(0,o.xo)())},28279:function(e,r,t){"use strict";t.d(r,{$:function(){return useLogoutHandler}});var o=t(5957),s=t(70781);let useLogoutHandler=()=>{let{posthogClient:e}=(0,s.r)(),handleLogout=async()=>{e&&e.reset(),await (0,o.x)()};return handleLogout}},32874:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return x},default:function(){return set_password}});
1var o=t(85893),s=t(67841),a=t(97564),n=t(95117),i=t(73193),l=t(20966),d=t(77248),c=t(33575),u=t(11163),p=t(67294),f=t(12822),g=t(1448),h=t(72614),b=t(40423),w=t(31908),_=t(80061),m=t(54070),Deprecated_DeprecatedSetPasswordPage=e=>{let{pageConfig:r,form:t,areButtonsDisabled:i,isLoading:d,handleLogout:c,handleSubmit:u}=e;return(0,o.jsx)(w.ZP,{pageConfig:r,pageTitle:"Login",title:"Update your password",children:(0,o.jsxs)("form",{onSubmit:t.onSubmit(u),children:[(0,o.jsxs)(a.K,{children:[r.user_has_password&&(0,o.jsx)(_.o,{variant:m.kI.LoginDeprecated,"aria-label":"Old password",label:(0,o.jsx)(n.x,{size:"lg",children:"Enter your old password:"}),type:"password",...t.getInputProps("current_password")}),(0,o.jsx)(_.o,{variant:m.kI.LoginDeprecated,"aria-label":"New password",label:(0,o.jsx)(n.x,{size:"lg",children:"Enter your new password:"}),type:"password",...t.getInputProps("password")})]}),(0,o.jsxs)(a.K,{children:[(0,o.jsx)(s.z,{variant:m.Bq.LoginPrimary,type:"submit",fullWidth:!0,disabled:i,mt:"xl",children:d?(0,o.jsx)(l.a,{color:m.xR.LoginSuccessButtonColor,size:"sm"}):"Continue"}),(0,o.jsx)(s.z,{fullWidth:!0,variant:m.Bq.LoginOutline,disabled:i,onClick:c,children:"Logout"})]})]})})},y=t(28279),v=t(95427),x=!0,set_password=e=>{let{pageConfig:r}=e,{classes:t}=(0,v.fc)(),_=(0,u.useRouter)(),x=(0,y.$)(),[P,j]=(0,p.useState)(!1),C=(0,d.c)({initialValues:{current_password:"",password:""}}),handleSubmit=async e=>{j(!0);let o={password:e.password};r.user_has_password&&(o.current_password=e.current_password);let s=await (0,h.H)(o);s.success?(c.N9.show({title:"Success",message:"Password successfully set",color:m.xR.LoginSuccessButtonColor,classNames:t}),await _.push("/login")):("incorrect_password"===s.error_type?C.setFieldError("current_password","Incorrect password"):"bad_request"===s.error_type?C.setErrors((0,f.o)(s.field_to_errors)):c.N9.show({title:"Error",message:g.aK,color:m.xR.ErrorButtonColor,classNames:t}),j(!1))},S=r.use_deprecated_login_ui,O=r.theme.login_ui_theme===b.gq.Frameless,I=r.theme.login_ui_theme===b.gq.Frame,N=r.theme.login_ui_theme===b.gq.SplitScreen,k=O?m.kI.LoginFrameless:m.kI.Login;return S?(0,o.jsx)(Deprecated_DeprecatedSetPasswordPage,{pageConfig:r,form:C,areButtonsDisabled:P,isLoading:P,handleLogout:x,handleSubmit:handleSubmit}):(0,o.jsx)(w.ZP,{pageConfig:r,pageTitle:"Login",title:r.user_has_password?"Update your password":"Set a password",bottomChild:(0,o.jsx)(s.z,{fullWidth:!I,variant:N?m.Bq.LoginSubtlePrimary:m.Bq.LoginFramelessSubtlePrimary,disabled:P,onClick:x,children:"Log out"}),children:(0,o.jsxs)("form",{onSubmit:C.onSubmit(handleSubmit),children:[(0,o.jsxs)(a.K,{children:[r.user_has_password&&(0,o.jsx)(n.x,{children:"Your existing password has expired."}),r.user_has_password&&(0,o.jsx)(i.W,{required:!0,withAsterisk:!1,variant:k,"aria-label":"Old password",label:"Enter your old password:",...C.getInputProps("current_password")}),(0,o.jsx)(i.W,{required:!0,withAsterisk:!1,variant:k,"aria-label":"New password",label:"Enter your new password:",...C.getInputProps("password")})]}),(0,o.jsx)(s.z,{variant:m.Bq.LoginPrimary,type:"submit",fullWidth:!0,disabled:P,mt:"lg",children:P?(0,o.jsx)(l.a,{color:m.xR.LoginSuccessButtonColor,size:"sm"}):"Continue"})]})})}}},function(e){e.O(0,[3972,7248,9748,9774,2888,179],function(){return e(e.s=27715)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.