PageSourceSearch

https://autycom.com/_next/static/chunks/pages/[channel]/[locale]/account/preferences-0b775a65b8c3f5b3.js

js autycom.com collected 2026-10-07 23:30:52 UTC 8,634 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8038],{2980:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[channel]/[locale]/account/preferences",function(){return a(1454)}])},8212:function(e,s,a){"use strict";a.d(s,{p:function(){return t.p}});var t=a(276)},5661:function(e,s,a){"use strict";a.d(s,{Z:function(){return i}});var t=a(7458),r=a(4517),l=a(2983),o=a(6052),n=a(1541),d=a(3975);function i(e){let{label:s,error:a,type:i,multiline:c,register:u,name:m,className:p,placeholder:f,rightIcon:x,inputMode:h,maxLength:g,options:w,rules:v}=e,[N,b]=(0,l.useState)(!1),j=()=>{b(!1)},M=()=>{b(!0)},P=(0,r.default)("block w-full rounded border border-input bg-field px-4 text-[14px] text-foreground appearance-none placeholder:text-subtle focus:outline-none focus:ring-0 focus:border-primary-turquoise focus:bg-card peer disabled:text-subtle",a&&"border-destructive focus:border-destructive");return(0,t.jsxs)("div",{className:(0,r.default)("flex flex-col gap-2",p),children:[(0,t.jsx)("label",{className:"text-[13px] font-semibold leading-[160%] text-foreground",children:s}),w?(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("select",{id:s,defaultValue:"",className:(0,r.default)(P,"h-[52px] pr-11 cursor-pointer"),...null==u?void 0:u(m,v),children:[(0,t.jsx)("option",{value:"",disabled:!0,children:f}),w.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,t.jsx)(d.v4,{className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-subtle"})]}):c?(0,t.jsx)("textarea",{rows:4,placeholder:f,className:(0,r.default)(P,"py-3"),...null==u?void 0:u(m,v)}):(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("input",{id:s,multiple:c,type:N?"text":i,placeholder:f,inputMode:h,maxLength:g,className:(0,r.default)(P,"h-[52px]",("password"===i||x)&&"pr-11"),...null==u?void 0:u(m,v)}),"password"===i&&(0,t.jsx)(t.Fragment,{children:N?(0,t.jsx)(o.Z,{onClick:j,className:"w-6 h-6 absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer"}):(0,t.jsx)(n.Z,{onClick:M,className:"w-6 h-6 absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer"})}),x&&"password"!==i&&(0,t.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-subtle pointer-events-none",children:x})]}),(0,t.jsx)("span",{className:"text-[10px] text-destructive",children:a})]})}},1454:function(e,s,a){"use strict";a.r(s),a.d(s,{__N_SSG:function(){return g},default:function(){return w}});var t=a(7458),r=a(3445),l=a(8212),o=a(2174),n=a(717),d=a(5661),i=a(6259),c=a(2983),u=a(4003);function m(e){let{title:s,description:a,children:r}=e;return(0,t.jsxs)("section",{className:"rounded border border-border bg-card p-6 md:p-8",children:[(0,t.jsx)("h2",{className:"text-[18px] font-bold leading-[140%] text-foreground",children:s}),(0,t.jsx)("p",{className:"mt-1 text-[13px] leading-[160%] text-subtle",children:a}),(0,t.jsx)("div",{className:"mt-[22px]",children:r})]})}function p(){let e=(0,r.Z)(),[s]=(0,n.Oa5)({}),[a,l]=(0,c.useState)(""),{register:p,handleSubmit:f,setError:x}=(0,o.cI)(),h=f(async a=>{if(a.newPassword!==a.newPasswordRepeat)x("newPasswordRepeat",{message:e.formatMessage(u.s.accountPasswordMismatch)});else{var t,r,o,n;let d=await s({variables:{newPassword:a.newPassword,oldPassword:a.oldPassword}}),i=(null===(t=d.data)||void 0===t?void 0:null===(r=t.passwordChange)||void 0===r?void 0:r.errors)||[];i.length>0?i.forEach(e=>x(e.field,{message:e.message||""})):(null===(o=d.data)||void 0===o?void 0:null===(n=o.passwordChange)||void 0===n?void 0:n.user)&&(l(e.formatMessage(u.s.accountPasswordChangedSuccess)),setTimeout(()=>{l("")},3e3))}});return(0,t.jsx)(m,{title:e.formatMessage(u.s.accountChangePasswordHeading),description:e.formatMessage(u.s.accountChangePasswordSubtitle),children:(0,t.jsxs)("form",{method:"post",onSubmit:h,className:"grid gap-4 md:grid-cols-2",children:[(0,t.jsx)("div",{className:"md:col-span-2",children:(0,t.jsx)(d.Z,{label:e.formatMessage(u.s.oldPasswordFieldLabel),placeholder:e.formatMessage(u.s.accountOldPasswordPlaceholder),type:"password",name:"oldPassword",register:e=>p(e,{required:!0})})}),(0,t.jsx)(d.Z,{label:e.formatMessage(u.s.newPasswordFieldLabel),placeholder:e.formatMessage(u.s.accountNewPasswordPlaceholder),type:"password",name:"newPassword",register:e=>p(e,{required:!0})}),(0,t.jsx)(d.Z,{label:e.formatMessage(u.s.newPasswordRepeatedFieldLabel),placeholder:e.formatMessage(u.s.accountRepeatPasswordPlaceholder),type:"password",name:"newPasswordRepeat",register:e=>p(e,{required:!0})}),(0,t.jsxs)("div",{className:"md:col-span-2",children:[(0,t.jsx)(i.z,{ariaLabel:e.formatMessage(u.s.accountChangePasswordHeading),variant:"gradient",size:"sm",className:"h-12 w-full px-7 md:w-auto",type:"submit",children:e.formatMessage(u.s.accountChangePasswordHeading)}),!!a&&(0,t.jsx)("p",{className:"mt-3 text-[13px] font-semibold text-primary-turquoise",children:a})]})]})})}var f=function(e){let{firstName:s,lastName:a,onSuccess:l}=e,p=(0,r.Z)(),[f]=(0,n.$ft)(),[x,h]=(0,c.useState)(""),{register:g,handleSubmit:w,setError:v}=(0,o.cI)({defaultValues:{firstName:s,lastName:a}}),N=w(async e=>{var s,a;let t=await f({variables:{firstName:e.firstName,lastName:e.lastName}}),r=(null===(s=t.data)||void 0===s?void 0:null===(a=s.accountUpdate)||void 0===a?void 0:a.errors)||[];r.length>
10?r.forEach(e=>v(e.field,{message:e.message||""})):(h(p.formatMessage(u.s.accountNameUpdated)),l(),setTimeout(()=>{h("")},3e3))});return(0,t.jsx)(m,{title:p.formatMessage(u.s.accountChangeNameHeading),description:p.formatMessage(u.s.accountChangeNameSubtitle),children:(0,t.jsxs)("form",{method:"post",onSubmit:N,className:"grid gap-4 md:grid-cols-2",children:[(0,t.jsx)(d.Z,{label:p.formatMessage(u.s.firstNameField),placeholder:p.formatMessage(u.s.accountFirstNamePlaceholder),type:"text",name:"firstName",register:e=>g(e,{required:!0})}),(0,t.jsx)(d.Z,{label:p.formatMessage(u.s.addressFormLastNameLabel),placeholder:p.formatMessage(u.s.accountLastNamePlaceholder),type:"text",name:"lastName",register:e=>g(e,{required:!0})}),(0,t.jsxs)("div",{className:"md:col-span-2",children:[(0,t.jsx)(i.z,{ariaLabel:p.formatMessage(u.s.accountUpdateNameButton),variant:"gradient",size:"sm",className:"h-12 w-full px-7 md:w-auto",type:"submit",children:p.formatMessage(u.s.accountUpdateNameButton)}),!!x&&(0,t.jsx)("p",{className:"mt-3 text-[13px] font-semibold text-primary-turquoise",children:x})]})]})})},x=a(9828);function h(){var e,s,a,l;let o=(0,r.Z)(),{user:n,refetch:d}=(0,x.a)(),i="".concat(null!==(e=null==n?void 0:n.firstName)&&void 0!==e?e:""," ").concat(null!==(s=null==n?void 0:n.lastName)&&void 0!==s?s:"").trim();return(0,t.jsxs)("div",{className:"flex flex-col gap-[22px]",children:[(0,t.jsxs)("div",{className:"rounded bg-hero-gradient px-6 py-7 md:px-8",children:[(0,t.jsx)("h1",{className:"text-[21px] font-bold leading-[130%] text-white md:text-[24px]",children:o.formatMessage(u.s.accountWelcomeTitle,{name:i||(null==n?void 0:n.email)})}),(0,t.jsx)("p",{className:"mt-2 text-[13.5px] leading-[160%] text-white/80",children:o.formatMessage(u.s.accountWelcomeSubtitle)})]}),(0,t.jsx)(f,{firstName:null!==(a=null==n?void 0:n.firstName)&&void 0!==a?a:"",lastName:null!==(l=null==n?void 0:n.lastName)&&void 0!==l?l:"",onSuccess:d}),(0,t.jsx)(p,{})]})}var g=!0,w=h;h.getLayout=function(e){return(0,t.jsx)(l.p,{children:e})}},1541:function(e,s,a){"use strict";var t=a(2983);let r=t.forwardRef(function(e,s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"}))});s.Z=r},6052:function(e,s,a){"use strict";var t=a(2983);let r=t.forwardRef(function(e,s){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}))});s.Z=r}},function(e){e.O(0,[2174,276,9774,2888,179],function(){return e(e.s=2980)}),_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.