PageSourceSearch

https://firmapp-backend.netlify.app/_next/static/chunks/pages/reset-password-42795a8ac97c5527.js

js firmapp-backend.netlify.app collected 2026-10-03 10:45:41 UTC 12,954 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8006],{16099:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reset-password",function(){return t(79154)}])},20921:function(e,r,t){"use strict";var s=t(85893);r.Z=function(e){var r=e.className;return(0,s.jsx)("div",{className:"".concat(r," w-8 h-8 overflow-hidden"),children:(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",style:{margin:"auto",background:"transparent",display:"block"},width:"100%",height:"100%",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:(0,s.jsx)("circle",{cx:"50",cy:"50",r:"32",strokeWidth:"8",stroke:"currentColor",strokeDasharray:"50.26548245743669 50.26548245743669",fill:"none",strokeLinecap:"round",children:(0,s.jsx)("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",keyTimes:"0;1",values:"0 50 50;360 50 50"})})})})}},46122:function(e,r,t){"use strict";t.d(r,{Z:function(){return a}});var s=t(85893),n=t(20921);function a(e){var r,t,a,i;return(0,s.jsxs)("label",{htmlFor:null!==(r=e.id)&&void 0!==r?r:e.name,className:"block text-sm font-medium",children:[(0,s.jsx)("span",{className:"px-1 text-slate-600",children:e.label}),!!e.required&&(0,s.jsx)("span",{className:"text-xs",children:"*"}),(0,s.jsxs)("div",{className:"relative mt-1",children:[(0,s.jsx)("input",{id:null!==(t=e.id)&&void 0!==t?t:e.name,autoComplete:e.name,className:"\n            block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm\n            ".concat(!!e.invalid&&"border-red-400 focus:border-red-400 focus:ring-red-400","\n          "),name:e.name,placeholder:null!==(a=e.placeholder)&&void 0!==a?a:"",type:null!==(i=e.inputType)&&void 0!==i?i:"text",value:e.value||"",onChange:function(r){return t=r.target.value,void("function"===typeof e.onChange&&e.onChange(t));var t},onBlur:function(r){return t=r.target.value,void("function"===typeof e.onBlur&&e.onBlur(t));var t}}),!!e.loading&&(0,s.jsx)(n.Z,{className:"absolute right-1 top-[50%] translate-y-[-50%] text-slate-200"})]}),!!e.error&&(0,s.jsx)("p",{className:"px-1 mt-1 text-xs font-normal text-red-600",children:e.error})]})}},76678:function(e,r,t){"use strict";function s(){var e,r,t=(e=["\n  mutation userActivation($id: String!, $password: String, $activation_code: String) {\n    userActivation(\n      id: $id,\n      password: $password,\n      activation_code: $activation_code\n    ) {\n      id,\n      email,\n      first_name,\n      last_name\n    }\n  }\n"],r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}})));return s=function(){return t},t}t.d(r,{L:function(){return n}});var n=(0,t(17283).Ps)(s())},89731:function(e,r,t){"use strict";function s(){var e,r,t=(e=["\n  query userHasActivationCode($id: String!, $activation_code: String) {\n    userHasActivationCode(\n      id: $id,\n      activation_code: $activation_code\n    ) {\n      id,\n      email,\n      first_name,\n      last_name\n    }\n  }\n"],r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}})));return s=function(){return t},t}t.d(r,{_:function(){return n}});var n=(0,t(17283).Ps)(s())},79154:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSG:function(){return S},default:function(){return k}});var s=t(85893),n=t(67294),a=t(69911),i=t(34051),o=t.n(i),l=t(97568),d=t(87536),u=t(2418),c=t.n(u),f=t(7885),p=t(46122),m=t(76678),v=t(11163),x=t(89731),h=t(20921);function g(e,r,t,s,n,a,i){try{var o=e[a](i),l=o.value}catch(d){return void t(d)}o.done?r(l):Promise.resolve(l).then(s,n)}function b(e){return function(){var r=this,t=arguments;return new Promise((function(s,n){var a=e.apply(r,t);function i(e){g(a,s,n,i,o,"next",e)}function o(e){g(a,s,n,i,o,"throw",e)}i(void 0)}))}}function w(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function j(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},s=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}
1)))),s.forEach((function(r){w(e,r,t[r])}))}return e}function y(e,r){if(null==e)return{};var t,s,n=function(e,r){if(null==e)return{};var t,s,n={},a=Object.keys(e);for(s=0;s<a.length;s++)t=a[s],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)t=a[s],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}t(34155).env.DONT_USE_ENCRYPTION;function _(){var e,r,t,a=(0,l.$G)(["usersresetpassword"]).t,i=(0,d.cI)(),u=i.control,g=i.handleSubmit,w=i.setError,_=(i.watch,(0,n.useState)(!1)),N=_[0],S=_[1],k=(0,n.useState)(!1),O=k[0],q=k[1],C=(0,n.useState)((null===(e=v.default.query)||void 0===e?void 0:e.uid)?v.default.query.uid.toString():""),P=C[0],A=(C[1],(0,n.useState)(!!(null===(r=v.default.query)||void 0===r?void 0:r.reset))),E=A[0],T=(A[1],(0,n.useState)((null===(t=v.default.query)||void 0===t?void 0:t.ac)?v.default.query.ac.toString():"")),$=T[0],Z=(T[1],(0,n.useState)("")),z=Z[0],I=Z[1],L=(0,n.useState)(""),B=L[0],D=L[1],F=(0,n.useState)(!0),H=F[0],Q=(F[1],(0,n.useState)(!0)),Y=Q[0],R=(Q[1],(0,n.useState)(!1)),X=R[0],G=R[1],M=(0,n.useState)(!1),U=M[0],K=(M[1],(0,n.useState)(!1)),V=(K[0],K[1]),W=(0,n.useState)(!1),J=W[0],ee=W[1],re=function(){var e=b(o().mark((function e(r){var t,s,n,i,l,d,u,p,v;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V(!0),t=r.password,s=r.password_repeat,n=r.activation_code,i=r.user_id,t===s){e.next=6;break}return w("password_repeat",{type:"equal",message:a("usersresetpassword.fields.password_repeat.error.equal")}),V(!1),e.abrupt("return");case 6:return e.prev=6,e.next=10,f.Z.mutate({mutation:m.L,variables:{id:P||i,password:c().hashSync(t,10),activation_code:$||n}});case 10:if((null===(v=e.sent.data)||void 0===v||null===(l=v.userActivation)||void 0===l?void 0:l.id)&&(null===v||void 0===v||null===(d=v.userActivation)||void 0===d?void 0:d.first_name)&&(null===v||void 0===v||null===(u=v.userActivation)||void 0===u?void 0:u.email)&&(null===v||void 0===v||null===(p=v.userActivation)||void 0===p?void 0:p.last_name)){e.next=14;break}return ee(!0),e.abrupt("return");case 14:q(!0),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(6),V(!1),setTimeout((function(){alert(a("usersresetpassword.com_error"))}),300);case 21:case"end":return e.stop()}}),e,null,[[6,17]])})));return function(r){return e.apply(this,arguments)}}();return(0,n.useEffect)((function(){var e=function(){var e=b(o().mark((function e(){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.Z.query({query:x._,variables:{id:P||"",activation_code:$||""}});case 3:r=e.sent.data,G(null!=(null===r||void 0===r?void 0:r.userHasActivationCode)),S(!0),e.next=14;break;case 8:e.prev=8,e.t0=e.catch(0),console.group("query USER_HAS_ACTIVATION_CODE"),console.log(e.t0),console.groupEnd(),alert(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}();e().catch(console.error)}),[]),(0,s.jsx)("div",{className:"flex min-h-full ".concat(U?"overflow-hidden max-h-screen":""),children:(0,s.jsx)("div",{className:"flex flex-col flex-1 justify-center py-6 px-2 sm:px-6 sm:py-12",children:(0,s.jsxs)("div",{className:"mx-auto w-full max-w-sm lg:w-96",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex gap-4 items-end",children:[(0,s.jsx)("img",{className:"w-auto h-12",src:"/images/logo.png",alt:"Your Company"}),(0,s.jsx)("img",{className:"w-auto h-12",src:"/images/registration_firmapp_logo.png",alt:"Your Company"})]}),(0,s.jsxs)("h2",{className:"mt-6 text-3xl font-bold tracking-tight text-gray-900",children:[E&&(0,s.jsx)("span",{children:a("usersresetpassword.page-title")}),!E&&(0,s.jsx)("span",{children:a("usersresetpassword.activation-page-title")})]})]}),E&&!O&&N&&X&&(0,s.jsx)("div",{className:"sm:mt-8",children:(0,s.jsxs)("form",{className:"flex flex-col gap-4 mt-2",onSubmit:g(re),children:[(0,s.jsx)("h2",{className:"mt-4 mb-4 text-2xl font-bold tracking-tight text-gray-900",children:a("usersresetpassword.new-password")}),(0,s.jsx)(d.Qr,{control:u,name:"user_id",render:function(e){e.field.ref;
1var r=e.fieldState,t=r.invalid,n=r.error,i=y(e.field,["ref"]);return(0,s.jsxs)(s.Fragment,{children:[""===P&&(0,s.jsx)(p.Z,j({value:P,label:a("usersresetpassword.fields.user_id.label"),invalid:!1,error:null===n||void 0===n?void 0:n.message,required:!0},i)),P&&(0,s.jsxs)("label",{htmlFor:"user_id",className:"block text-sm font-medium hidden",children:[(0,s.jsx)("span",{className:"px-1 text-slate-600",children:a("usersresetpassword.fields.user_id.label")}),(0,s.jsx)("span",{className:"text-xs",children:"*"}),(0,s.jsx)("div",{className:"relative mt-1",children:(0,s.jsx)("input",{autoComplete:"user_id",className:"\n                            block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 placeholder-gray-400 shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm\n                            ".concat(!!t&&"border-red-400 focus:border-red-400 focus:ring-red-400","\n                          "),id:"user_id",disabled:!0,name:"user_id",type:"text",value:P})})]})]})},rules:{required:{value:!P,message:a("usersresetpassword.fields.password_repeat.error.required")}}}),(0,s.jsx)(d.Qr,{control:u,name:"activation_code",render:function(e){var r=e.field;return(0,s.jsx)("input",j({type:"hidden",id:"activation_code",name:"activation_code"},r,{value:$}))}}),(0,s.jsx)(d.Qr,{control:u,name:"password",render:function(e){e.field.ref;
1var r=e.fieldState,t=r.invalid,n=r.error,i=y(e.field,["ref"]);return(0,s.jsx)(p.Z,j({value:z,onChange:function(e){I(e)},inputType:"password",label:a("usersresetpassword.fields.password.label"),invalid:t,error:null===n||void 0===n?void 0:n.message,required:!0},i))},rules:{required:{value:!0,message:a("usersresetpassword.fields.password.error.required")}}}),(0,s.jsx)(d.Qr,{control:u,name:"password_repeat",render:function(e){e.field.ref;var r=e.fieldState,t=r.invalid,n=r.error,i=y(e.field,["ref"]);return(0,s.jsx)(p.Z,j({value:B,onChange:function(e){D(e)},inputType:"password",label:a("usersresetpassword.fields.password_repeat.label"),invalid:t,error:null===n||void 0===n?void 0:n.message,required:!0},i))},rules:{required:{value:!0,message:a("usersresetpassword.fields.password_repeat.error.required")}}}),(0,s.jsx)("div",{className:Y?"hidden":"text-xs text-red-600 ml-1",children:a("usersresetpassword.fields.password_repeat.error.strong")}),(0,s.jsx)("div",{className:H?"hidden":"text-xs text-red-600 ml-1",children:a("usersresetpassword.fields.password_repeat.error.equal")}),(0,s.jsx)("div",{className:"flex justify-between items-center mt-6",children:(0,s.jsx)("button",{className:"inline-flex justify-center items-center py-2 px-4 text-sm font-medium text-white rounded-md border border-transparent shadow-sm sm:w-auto focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:outline-none bg-boni-blue hover:bg-boni-gold disabled:bg-slate-100 disabled:text-slate-300",type:"submit",children:a("usersresetpassword.buttons.send")})}),(0,s.jsx)("div",{className:J?"text-xs text-red-600 ml-1":"hidden",children:a("usersresetpassword.error.fail")})]})}),!E&&(0,s.jsx)("h3",{className:"mt-6 text-2xl font-bold tracking-tight text-gray-900",children:(0,s.jsx)("span",{children:a("usersresetpassword.error.no_reset_param")})}),O&&(0,s.jsx)("div",{className:"mt-8",children:(0,s.jsxs)("div",{className:"mt-6",children:[(0,s.jsx)("h2",{className:"mt-6 mb-6 text-2xl font-bold tracking-tight text-gray-900",children:a("usersresetpassword.success.h2")}),(0,s.jsx)("p",{children:a("usersresetpassword.success.p1")}),(0,s.jsx)("br",{}),(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:"/auth/signin",className:"underline",children:"zum Adminbackend"})}),(0,s.jsx)("br",{}),(0,s.jsx)("p",{children:a("usersresetpassword.success.p2")}),(0,s.jsx)("br",{})]})}),N&&!X&&(0,s.jsx)("div",{className:"mt-8",children:(0,s.jsx)("div",{className:"mt-6 mb-6 tracking-tight text-gray-900",children:(0,s.jsx)(l.cC,{i18nKey:"usersresetpassword.error.no_code",ns:"usersresetpassword",components:{resetLink:(0,s.jsx)("a",{href:"https://firmapp-backend.netlify.app/reset",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline"})}})})}),!N&&(0,s.jsx)(h.Z,{className:"h-14 w-14 mx-auto my-4"})]})})})}var N=function(){var e=(0,n.useState)("Test");e[0],e[1];return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(_,{})})};N.getLayout=function(e){return(0,s.jsx)(a.Z,{children:e})};var S=!0,k=N}},function(e){e.O(0,[2418,7536,9774,2888,179],(function(){return r=16099,e(e.s=r);var r}));var r=e.O();_N_E=r}]);

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.