PageSourceSearch

https://www.icaniwill.fi/_next/static/chunks/blocks/ResetPassword.b36710a079433209.js

js icaniwill.fi collected 2026-09-26 09:36:18 UTC 8,751 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[582],{628:(e,t,r)=>{r.r(t),r.d(t,{default:()=>E});var o,a,n,s,l,i,c,d=r(32228),p=r(63857),u=r(66284),v=r(14232),h=r(46842),m=r(64573),A=r(77215),g=r(25702),f=r(39745),y=r(3801),x=r(57380),j=r(28350),b=r(98089),w=r(66685),C=r(96284),S=r(64665),O=r(37876);function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach(function(t){(0,u.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var k="blocks/ResetPassword/ResetPassword.jsx",P={["#".concat(S.KN)]:{display:"flex",alignItems:"center",justifyContent:"center"}},R=(0,h.Ay)("section",{target:"eevzqim2"})({name:"1ng5xxr",styles:"display:flex;align-items:center;justify-content:center;padding:0 var(--cia-container-spacing);margin:var(--cia-section-spacing) 0"}),I=(0,h.Ay)(x.A,{target:"eevzqim1"})(e=>{var{theme:t}=e;return z(z({},t.mixins.verticalRhythm(3)),{},{maxWidth:t.breakpoints.values.sm,textAlign:"center"})},""),L=(0,h.Ay)("h1",{target:"eevzqim0"})(e=>{var{theme:t}=e;return z(z({},t.typography.h3),{},{margin:0,[t.breakpoints.up("md")]:z({},t.typography.h1)})},""),N={default:"Could not reset your password.",passwordMismatch:"The provided passwords do not match"},W={password:"",confirmPassword:""};function E(){var e,{t}=(0,b.s9)(),{resetCustomerPassword:r}=(0,b.Oj)(),[u,h]=v.useState(!1),[x,S]=v.useState(""),[M,z]=v.useState(!1),E=v.useCallback((e=(0,p.A)(function*(e){try{h(!0),S("");var{password:t,confirmPassword:o}=e;if(t!==o){S(N.passwordMismatch),h(!1);return}var a=new URLSearchParams(window.location.search),n=a.get("i"),s=a.get("id"),l=yield r(n,s,t);if(l.errors){var i=N[(0,C.Io)(l.errors)[0]]||N.default;S(i)}else z(!0)}catch(e){console.error(e),S(N.default)}h(!1)}),function(t){return e.apply(this,arguments)}),[r]);return(0,O.jsxs)(R,{children:[o||(o=(0,O.jsx)(m.A,{styles:P})),(0,O.jsx)(j.A,{initialValues:W,onSubmit:E,children:(0,O.jsxs)(I,{children:[(0,O.jsx)(L,{children:t(k)(a||(a=(0,d.A)(["Reset account"])))}),M&&(0,O.jsxs)(v.Fragment,{children:[(0,O.jsx)(A.A,{children:t(k)(n||(n=(0,d.A)(["Your account has been reset, you're now signed in."])))}),(0,O.jsx)(g.A,{variant:"contained",component:w.Wk,href:"/",children:t(k)(s||(s=(0,d.A)(["Back to homepage"])))})]}),!M&&(0,O.jsxs)(v.Fragment,{children:[(0,O.jsx)(w.zK,{label:t(k)(l||(l=(0,d.A)(["New password"]))),name:"password",type:"password",required:!0}),(0,O.jsx)(w.zK,{label:t(k)(i||(i=(0,d.A)(["Confirm password"]))),name:"confirmPassword",type:"password",required:!0}),(0,O.jsx)(y.A,{loading:u,color:"primary",variant:"contained",type:"submit",fullWidth:!0,children:t(k)(c||(c=(0,d.A)(["Reset account"])))}),x&&(0,O.jsx)(f.A,{severity:"error",children:x})]})]})})]})}},39745:(e,t,r)=>{r.d(t,{A:()=>I});var o=r(40670),a=r(44501),n=r(14232),s=r(31678),l=r(4697),i=r(97613),c=r(46842),d=r(70311),p=r(76419),u=r(33662),v=r(39399),h=r(47951),m=r(45879);function A(e){return(0,m.Ay)("MuiAlert",e)}var g=(0,h.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),f=r(32206),y=r(29831),x=r(37876);let j=(0,y.A)((0,x.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),b=(0,y.A)((0,x.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),w=(0,y.A)((0,x.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),C=(0,y.A)((0,x.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined");var S=r(56346),O=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","
1slots","variant"],M=(0,c.Ay)(v.A,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{var{ownerState:r}=e;return[t.root,t[r.variant],t["".concat(r.variant).concat((0,u.A)(r.color||r.severity))]]}})(e=>{var{theme:t}=e,r="light"===t.palette.mode?i.e$:i.a,o="light"===t.palette.mode?i.a:i.e$;return(0,a.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(e=>{var[,t]=e;return t.main&&t.light}).map(e=>{var[a]=e;return{props:{colorSeverity:a,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert["".concat(a,"Color")]:r(t.palette[a].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(a,"StandardBg")]:o(t.palette[a].light,.9),["& .".concat(g.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(a,"IconColor")]}:{color:t.palette[a].main}}}}),...Object.entries(t.palette).filter(e=>{var[,t]=e;return t.main&&t.light}).map(e=>{var[o]=e;return{props:{colorSeverity:o,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert["".concat(o,"Color")]:r(t.palette[o].light,.6),border:"1px solid ".concat((t.vars||t).palette[o].light),["& .".concat(g.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(o,"IconColor")]}:{color:t.palette[o].main}}}}),...Object.entries(t.palette).filter(e=>{var[,t]=e;return t.main&&t.dark}).map(e=>{var[r]=e;return{props:{colorSeverity:r,variant:"filled"},style:(0,a.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(r,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(r,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[r].dark:t.palette[r].main,color:t.palette.getContrastText(t.palette[r].main)})}})]})}),z=(0,c.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),k=(0,c.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),P=(0,c.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),R={success:(0,x.jsx)(j,{fontSize:"inherit"}),warning:(0,x.jsx)(b,{fontSize:"inherit"}),error:(0,x.jsx)(w,{fontSize:"inherit"}),info:(0,x.jsx)(C,{fontSize:"inherit"})};let I=n.forwardRef(function(e,t){var r=(0,d.b)({props:e,name:"MuiAlert"}),{action:n,children:i,className:c,closeText:v="Close",color:h,components:m={},componentsProps:g={},icon:y,iconMapping:j=R,onClose:b,role:w="alert",severity:C="success",slotProps:I={},slots:L={},variant:N="standard"}=r,W=(0,o.A)(r,O),E=(0,a.A)({},r,{color:h,severity:C,variant:N,colorSeverity:h||C}),B=(e=>{var{variant:t,color:r,severity:o,classes:a}=e,n={root:["root","color".concat((0,u.A)(r||o)),"".concat(t).concat((0,u.A)(r||o)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,l.A)(n,A,a)})(E),q={slots:(0,a.A)({closeButton:m.CloseButton,closeIcon:m.CloseIcon},L),slotProps:(0,a.A)({},g,I)},[H,T]=(0,p.A)("closeButton",{elementType:f.A,externalForwardedProps:q,ownerState:E}),[D,F]=(0,p.A)("closeIcon",{elementType:S.A,externalForwardedProps:q,ownerState:E});return(0,x.jsxs)(M,(0,a.A)({role:w,elevation:0,ownerState:E,className:(0,s.A)(B.root,c),ref:t},W,{children:[!1!==y?(0,x.jsx)(z,{ownerState:E,className:B.icon,children:y||j[C]||R[C]}):null,(0,x.jsx)(k,{ownerState:E,className:B.message,children:i}),null!=n?(0,x.jsx)(P,{ownerState:E,className:B.action,children:n}):null,null==n&&b?(0,x.jsx)(P,{ownerState:E,className:B.action,children:(0,x.jsx)(H,(0,a.A)({size:"small","aria-label":v,title:v,color:"inherit",onClick:b},T,{children:(0,x.jsx)(D,(0,a.A)({fontSize:"small"},F))}))}):null]}))})},56346:(e,t,r)=>{r.d(t,{A:()=>n}),r(14232);var o=r(29831),a=r(37876);let n=(0,o.A)((0,a.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")}}]);

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.