PageSourceSearch

https://carpartplanet.com/_next/static/chunks/pages/change-password-8ce449e118c71cd5.js

js carpartplanet.com collected 2026-10-06 15:13:19 UTC 9,380 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];if(null!=a)for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:cpp-front":!0});var r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="07062945-e6dd-4c18-93b0-5f6296324358",e._sentryDebugIdIdentifier="sentry-dbid-07062945-e6dd-4c18-93b0-5f6296324358")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5125],{95477:function(e,r,a){"use strict";var t=a(87462),n=a(45987),s=a(67294),o=a(86010),i=a(1591),l=a(93871),d=s.forwardRef(function(e,r){var a=e.classes,i=e.className,d=e.color,c=void 0===d?"primary":d,u=e.disableShrink,m=e.size,p=void 0===m?40:m,w=e.style,f=e.thickness,h=void 0===f?3.6:f,g=e.value,v=void 0===g?0:g,y=e.variant,P=void 0===y?"indeterminate":y,b=(0,n.Z)(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),Z={},x={},k={};if("determinate"===P||"static"===P){var C=2*Math.PI*((44-h)/2);Z.strokeDasharray=C.toFixed(3),k["aria-valuenow"]=Math.round(v),Z.strokeDashoffset="".concat(((100-v)/100*C).toFixed(3),"px"),x.transform="rotate(-90deg)"}return s.createElement("div",(0,t.Z)({className:(0,o.Z)(a.root,i,"inherit"!==c&&a["color".concat((0,l.Z)(c))],{determinate:a.determinate,indeterminate:a.indeterminate,static:a.static}[P]),style:(0,t.Z)({width:p,height:p},x,w),ref:r,role:"progressbar"},k,b),s.createElement("svg",{className:a.svg,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44)},s.createElement("circle",{className:(0,o.Z)(a.circle,void 0!==u&&u&&a.circleDisableShrink,{determinate:a.circleDeterminate,indeterminate:a.circleIndeterminate,static:a.circleStatic}[P]),style:Z,cx:44,cy:44,r:(44-h)/2,fill:"none",strokeWidth:h})))});r.Z=(0,i.Z)(function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}},{name:"MuiCircularProgress",flip:!1})(d)},63529:function(e,r,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/change-password",function(){return a(57661)}])},34048:function(e,r,a){"use strict";a.d(r,{I:function(){return f}});var t=a(68602),n=a(64436),s=a(30585),o=a(96394),i=a(41120),l=a(39803),d=a(94184),c=a.n(d),u=a(67294),m=a(57333);let p=(0,i.Z)(e=>({content:{margin:8},input:{boxSizing:"border-box",borderRadius:4,position:"relative",fontSize:16,height:40,padding:"8px 12px",transition:e.transitions.create(["border-color","box-shadow"]),fontFamily:e.typography.fontFamily},label:{fontSize:20,fontWeight:600,"& span":{fontSize:20,color:"#CD3F4C"},whiteSpace:"nowrap"},labelError:{color:"yellow"},labelOutlined:{"&marginDense":{transform:"translate(0, 1.5px) scale(0.75)"}},marginDense:{transform:"translate(0, 1.5px) scale(0.75)"},errorInput:{"& input":{borderColor:"#CD3F4C","&:focus, &:hover":{borderColor:"#CD3F4C",boxShadow:"0 0 0 1px #CD3F4C"}}},formHelper:{paddingTop:5},root:{"label + &":{marginTop:e.spacing(3)}}})),w=e=>{let{inputRef:r,onChange:a,...n}=e;return(0,t.tZ)(m.Z,{...n,getInputRef:r,onValueChange:e=>{a({target:{name:n.name,value:e.value}})},thousandSeparator:!0})},f=e=>{let{id:r,label:a="",value:i="",isDisabled:d,errorText:m,onBlur:f,helpText:h,isError:g,onKeyDown:v,isRequired:y,isMultiline:P,minRows:b,maxRows:Z,isFormat:
1x,placeholder:k,className:C,onChange:D,...N}=e,_=p(),E=(0,u.useRef)(null);return(0,t.BX)(n.Z,{fullWidth:!0,className:c()(_.content),onBlur:f,children:[(0,t.tZ)(o.Z,{shrink:!0,htmlFor:r,classes:{root:_.label,error:_.labelError},required:y,error:g,children:a}),(0,t.tZ)(l.Z,{className:C,id:r,placeholder:k||a,margin:"dense",variant:"outlined",value:i,onKeyDown:v,inputRef:E,disabled:d,error:g,fullWidth:!0,classes:{root:_.root},InputProps:{multiline:P,minRows:b,maxRows:Z,classes:{input:_.input,error:_.errorInput},...x&&{inputComponent:w}},inputProps:N,onChange:D,"aria-label":a,"data-border":!1}),(g&&m||h)&&(0,t.tZ)(s.Z,{id:r,error:g,className:_.formHelper,children:g?m:h})]})}},57661:function(e,r,a){"use strict";a.r(r),a.d(r,{default:function(){return k}});var t=a(68602),n=a(50319),s=a(282),o=a(95477),i=a(41749),l=a(79895),d=a(41120),c=a(22318),u=a(82580),m=a(11163),p=a(79613),w=a(74231),f=a(34048),h=a(97162),g=a(31699),v=a(82729),y=a(17283);function P(){let e=(0,v._)(["\n  mutation ChangePassword($email: String!, $oldPassword: String!, $newPassword: String!) {\n    changePassword(email: $email, oldPassword: $oldPassword, newPassword: $newPassword) {\n      success\n      message\n    }\n  }\n"]);return P=function(){return e},e}let b=(0,y.ZP)(P()),Z=(0,d.Z)(e=>({container:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",padding:e.spacing(3)},paper:{padding:e.spacing(4),maxWidth:500,width:"100%"},title:{marginBottom:e.spacing(3),textAlign:"center"},form:{width:"100%"},textField:{marginBottom:e.spacing(2)},button:{marginTop:e.spacing(2),width:"100%"},loadingContainer:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:e.spacing(2)},description:{marginBottom:e.spacing(3),textAlign:"center",color:e.palette.text.secondary}})),x=w.Ry().shape({oldPassword:w.Z_().required("Please enter your current password"),newPassword:w.Z_().required("Please enter a new password").min(6,"Password must be at least 6 characters"),confirmPassword:w.Z_().required("Please confirm your new password").oneOf([w.iH("newPassword")],"Passwords must match")});function k(){let e=Z(),r=(0,m.useRouter)(),{enqueueSnackbar:a}=(0,p.Ds)(),d=(0,g.R)(),[w,{loading:v}]=(0,n.D)(b),y=(null==d?void 0:d.primaryEmailAddress)||"",P=(0,u.TA)({initialValues:{oldPassword:"",newPassword:"",confirmPassword:""},validationSchema:x,enableReinitialize:!0,onSubmit:async e=>{var r,t,n,s;if(!y){a("Email address is required",{variant:"error"});return}try{let{data:n}=await w({variables:{email:y,oldPassword:e.oldPassword,newPassword:e.newPassword}});(null==n?void 0:null===(r=n.changePassword)||void 0===r?void 0:r.success)?(a(n.changePassword.message||"Password changed successfully",{variant:"success"}),await fetch("/api/auth/clear-token",{method:"POST",credentials:"include"}).catch(()=>{}),setTimeout(()=>{window.location.href="/login"},1500)):a((null==n?void 0:null===(t=n.changePassword)||void 0===t?void 0:t.message)||"Failed to change password",{variant:"error"})}catch(r){let e=(null==r?void 0:null===(n=r.graphQLErrors)||void 0===n?void 0:null===(s=n[0])||void 0===s?void 0:s.message)||(null==r?void 0:r.message)||"Failed to change password";a(e,{variant:"error"})}}}),{values:k,errors:C,touched:D,handleChange:N,handleBlur:_,handleSubmit:E}=P;return(0,t.BX)(t.HY,{children:[(0,h.E)(),(0,t.tZ)(i.Z,{container:!0,className:e.container,children:(0,t.BX)(l.Z,{className:e.paper,elevation:3,children:[(0,t.tZ)(c.Z,{variant:"h4",className:e.title,children:"Change Password"}),y&&(0,t.BX)(c.Z,{variant:"body2",className:e.description,children:["Changing password for: ",y]}),(0,t.BX)("form",{className:e.form,onSubmit:E,children:[(0,t.tZ)("div",{className:e.textField,children:(0,t.tZ)(f.I,{name:"oldPassword",id:"oldPassword",label:"Current Password",type:"password",value:k.oldPassword,onChange:N,onBlur:_,isError:!!(C.oldPassword&&D.oldPassword),errorText:C.oldPassword,isRequired:!0})}),(0,t.tZ)("div",{className:e.textField,children:(0,t.tZ)(f.I,{name:"newPassword",id:"newPassword",label:"New Password",type:"password",value:k.newPassword,onChange:N,onBlur:_,isError:!!(C.newPassword&&D.newPassword),errorText:C.newPassword,isRequired:!0})}),(0,t.tZ)("div",{className:e.textField,children:(0,t.tZ)(f.I,{name:"confirmPassword",id:"confirmPassword",label:"Confirm New Password",type:"password",value:k.confirmPassword,onChange:N,onBlur:_,isError:!!(C.confirmPassword&&D.confirmPassword),errorText:C.confirmPassword,isRequired:!0})}),(0,t.tZ)(s.Z,{type:"submit",variant:"contained",color:"primary",className:e.button,disabled:v||!y,children:v?(0,t.tZ)("div",{className:e.loadingContainer,children:(0,t.tZ)(o.Z,{size:24})}):"Change Password"}),(0,t.tZ)(s.Z,{type:"button",variant:"outlined",className:e.button,onClick:()=>r.back(),disabled:v,style:{marginTop:8},children:"Cancel"})]})]})})]})}}},function(e){e.O(0,[9803,2580,4231,7333,7162,9774,2888,179],function(){return e(e.s=63529)}),_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.