1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3872],{17271:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});var a=t(37876),r=t(77328),n=t.n(r),i=t(89099),o=t(35162);let l=e=>{let{hrefToMainPage:s=!1,isChooseDiet:t=!1}=e,r=(0,i.useRouter)();return(0,a.jsx)(n(),{children:(0,a.jsx)("link",{href:s?(0,o.$z)(r.asPath):t?(0,o.A_)(r.asPath):(0,o.$i)(r.asPath),rel:"canonical"})})}},28048:(e,s,t)=>{"use strict";t.d(s,{C:()=>n});var a=t(14232),r=t(89099);let n=()=>{let[e,s]=(0,a.useState)(""),t=(0,r.useRouter)().query,n="urlToken"in t||"token"in t;if((0,a.useEffect)(()=>{let e=()=>{s(window.location.hash.slice(1))};return window.addEventListener("hashchange",e),e(),()=>{window.removeEventListener("hashchange",e)}},[]),!n&&e)return e;if(n){let{token:e="",urlToken:s=""}=t;if(e)return e;if(s)return s}return null}},35162:(e,s,t)=>{"use strict";t.d(s,{$i:()=>a,$z:()=>r,A_:()=>n,KF:()=>i});let a=e=>{let s=new URL(e,"https://dietly.pl");return"".concat(s.origin).concat(s.pathname)},r=e=>new URL(e,"https://dietly.pl").origin,n=e=>{let s=new URL(e,"https://dietly.pl"),t=s.search.includes("konfigurator"),a=s.search.includes("nowe-zamowienie"),r="".concat(t||a?"?":"").concat(t?"konfigurator":"").concat(a?"nowe-zamowienie":"");return"".concat(s.origin).concat(s.pathname).concat(r)},i=e=>{let s=new URL(e,"https://dietly.pl");return(s.pathname.endsWith("/0")||s.pathname.endsWith("/1"))&&(s.pathname=s.pathname.slice(0,-2)),"".concat(s.origin).concat(s.pathname)}},42353:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/resetuj-haslo",function(){return t(48587)}])},48587:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>y});var a=t(37876),r=t(14232),n=t(88992),i=t(25815),o=t(70917),l=t(16806),c=t(51320),d=t(52276),u=t(84371);let{usePostResetPasswordMutation:m}=t(9379).a.injectEndpoints({endpoints:e=>({postResetPassword:e.mutation({query:e=>{let{data:s,token:t}=e;return{body:s,method:"PATCH",url:"/open/reset-password?token=".concat(t)}}})})});var h=t(8825),w=t(43062),p=t(48230),x=t.n(p),g=t(89099);let f=e=>{var s;let{token:t}=e,[r,{isLoading:p=!1}]=m(),f=(0,g.useRouter)(),{formState:{errors:j},handleSubmit:b,register:v,watch:y}=(0,n.mN)({defaultValues:{newPassword:"",confirmPassword:""}}),P=y("newPassword"),N=!!(null==j?void 0:j.newPassword),k=async()=>{let e=await r({data:P.trim(),token:t});"data"in e&&((0,w.l)("PomyÅlnie zresetowano hasÅo",h.l.Success),await f.push("/logowanie")),"error"in e&&(0,w.l)("Nie udaÅo siÄ zresetowaÄ hasÅa. Spr\xf3buj jeszcze raz",h.l.Error)};return(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)(x(),{className:"text-md mb-8 flex items-center font-medium text-gray-500",href:"/logowanie",children:[(0,a.jsx)(u.gc,{className:"mr-2",icon:d.cU$}),"Anuluj"]}),(0,a.jsxs)("form",{onSubmit:b(k),children:[(0,a.jsx)("h1",{className:"mb-4 text-3xl font-medium text-gray-500",children:"Zresetuj swoje hasÅo"}),(0,a.jsx)(l.K,{containerClass:"spacer-top-12",disabled:p,hasError:N,label:"Nowe hasÅo",name:"newPassword",passwordInput
1:!0,register:v,required:!0,type:"password",validation:o.in}),(0,a.jsx)(c.A,{hasPasswordError:N,isSidebar:!0,password:P}),(0,a.jsx)(l.K,{containerClass:"spacer-top-12",disabled:p,errorMsg:null==j||null==(s=j.confirmPassword)?void 0:s.message,label:"Potwierdź nowe hasÅo",name:"confirmPassword",passwordInput:!0,register:v,required:!0,type:"password",validation:{validate:e=>e===P||"HasÅa muszÄ
byÄ takie same",required:"Potwierdzenie hasÅa jest wymagane"}}),(0,a.jsx)("div",{className:"display-flex spacer-top-40",children:(0,a.jsx)(i.default,{colorPrimary:!0,containerClass:"spacer-right-8",disabled:p,isLoading:p,label:p?"ResetujÄ":"Zresetuj hasÅo",sizeMedium:!0,type:"submit"})})]})]})};var j=t(28048),b=t(17271);let v=()=>{let[e,s]=(0,r.useState)(""),t=(0,j.C)();return(0,r.useEffect)(()=>{t&&s("".concat(t))},[t]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.A,{}),(0,a.jsx)("section",{className:"flex min-h-screen flex-col items-center justify-center bg-[url('/new-login-background.png')] bg-cover bg-center p-4 sm:p-8",children:(0,a.jsx)("div",{className:"w-full max-w-[480px] rounded-lg bg-white",children:(0,a.jsx)(f,{token:e})})})]})},y=()=>(0,a.jsx)(v,{})},51320:(e,s,t)=>{"use strict";t.d(s,{A:()=>o});var a=t(37876),r=t(87133),n=t(84371),i=t(6164);let o=e=>{let{hasPasswordError:s,isSidebar:t=!1,password:o}=e,l=function(e){let s=e.trim();return[{id:"password-length",boolean:s.length>=12,message:"min. 12 znak\xf3w"},{id:"lowercase-letter",boolean:/[a-z]/.test(s),message:"maÅa litera"},{id:"uppercase-letter",boolean:/[A-Z]/.test(s),message:"wielka litera"},{id:"digit",boolean:/\d/.test(s),message:"cyfra"}]}(o);return(0,a.jsx)("div",{className:(0,i.F)("mb-2 mt-[-4px] flex flex-row gap-2 pl-2 text-[11px] text-gray-600",{"mt-2":t}),children:l.map(e=>(0,a.jsxs)("div",{className:(0,i.F)("flex flex-row items-center gap-1",{"text-success":e.boolean,"text-error":!e.boolean&&s}),id:e.id,children:[(0,a.jsx)(n.gc,{icon:e.boolean?r.e68:r.GRI,size:"sm"}),(0,a.jsx)("p",{children:e.message})]},e.message))})}}},e=>{e.O(0,[8992,8956,636,6593,8792],()=>e(e.s=42353)),_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.