PageSourceSearch

https://chickingcustomerwebapp.vercel.app/_next/static/chunks/page…/editProfileForm-95822c9f593f9902.js

js chickingcustomerwebapp.vercel.app collected 2026-10-03 05:16:48 UTC 9,405 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="92d4c4e8-6d09-411b-98fb-bbec048a987f",e._sentryDebugIdIdentifier="sentry-dbid-92d4c4e8-6d09-411b-98fb-bbec048a987f")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4816],{96170:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/editProfileForm",function(){return r(30459)}])},41263:function(e,t,r){"use strict";var n=r(85893),a=r(45697),o=r.n(a),s=r(92590),l=r(93232),i=r.n(l);let c=e=>{let{children:t,label:r,type:a="button",disabled:o=!1,isLoading:l=!1,className:c="",onClick:d,...u}=e;return(0,n.jsxs)("button",{type:a,disabled:o||l,className:"".concat(i().btn," ").concat(c),onClick:d,...u,"data-sentry-component":"Button","data-sentry-source-file":"index.jsx",children:[r?(0,n.jsx)("span",{children:r}):t,l&&(0,n.jsx)("span",{className:i()["loader-container"],children:(0,n.jsx)(s.Z,{})})]})};
1t.Z=c,c.propTypes={children:o().node,label:o().string,type:o().string,disabled:o().bool,isLoading:o().bool,className:o().string,onClick:o().func}},92590:function(e,t,r){"use strict";var n=r(85893),a=r(39473),o=r.n(a);t.Z=()=>(0,n.jsxs)("div",{className:o()["lds-roller"],"data-sentry-component":"ButtonLoader","data-sentry-source-file":"ButtonLoader.jsx",children:[(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{})]})},30459:function(e,t,r){"use strict";r.r(t);var n=r(85893),a=r(13294),o=r(16310),s=r(93908),l=r(9198),i=r.n(l);r(81042);var c=r(67294),d=r(76234),u=r(98555),m=r(44173),p=r(45697),f=r.n(p),h=r(14640),b=r(45007),v=r(46958),y=r(41263),N=r(11163),g=r.n(N);let x=[{value:"MALE",label:"male"},{value:"FEMALE",label:"female"},{value:"OTHER",label:"other"}],_=e=>o.Ry().shape({firstName:o.Z_().required(e("firstNameError")).max(16,e("firstNameMaxLengthError")),lastName:o.Z_().required(e("lastNameError")).max(16,e("lastNameMaxLengthError")),email:o.Z_().email(e("invalidEmail")).matches(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,e("invalidEmail"))}),j=e=>{var t;let{editEnabled:r,setEditEnabled:o}=e,l=(0,h.useTranslations)("profile"),p=null===(t=(0,b.v9)(e=>e.auth))||void 0===t?void 0:t.auth,[f,N]=(0,c.useState)((null==p?void 0:p.dob)?new Date(p.dob):null),j=(0,b.I0)(),w={firstName:(null==p?void 0:p.firstName)||"",lastName:(null==p?void 0:p.lastName)||"",dob:(0,u.q3)(null==p?void 0:p.dob)||null,gender:(null==p?void 0:p.gender)||null,email:(null==p?void 0:p.email)||""},C=e=>{let t={};return Object.keys(e).forEach(r=>{["email","gender"].includes(r)?t[r]=e[r]||null:null!==e[r]&&""!==e[r]&&(t[r]=e[r])}),f&&(t.dob=(0,u.hm)(f)),t},E=async(e,t)=>{try{let t=await (0,d.Nq)(C(e));if(200!==t.code)throw Error(t.message);m.Am.success(l("successMessage"));let r={...p,...t.data};o(!1),j((0,v.A3)(r))}catch(e){console.error("error",e),m.Am.error(l("errorMessage"))}finally{t(!1)}};return(0,n.jsx)(a.J9,{initialValues:w,validationSchema:_(l),onSubmit:(e,t)=>{let{setSubmitting:r}=t;E(e,r)},"data-sentry-element":"Formik","data-sentry-component":"EditProfileForm","data-sentry-source-file":"editProfileForm.jsx",children:e=>{var t;let{isSubmitting:c,setFieldValue:d}=e;return(0,n.jsxs)(a.l0,{className:"settingsSection ".concat(r?"":"disabledField"),children:[(0,n.jsxs)("div",{className:"rowGroup",children:[(0,n.jsxs)("div",{className:"formGroup",children:[(0,n.jsxs)("label",{htmlFor:"firstName",children:[l("firstName"),(0,n.jsx)("span",{children:"*"})]}),(0,n.jsx)(a.gN,{type:"text",name:"firstName",className:"formControl",placeholder:l("enter_First_Name"),maxLength:"16",onChange:e=>{let t=e.target.value.replace(/[^a-zA-Z0-9_' .-]/g,"");d("firstName",t.charAt(0).toUpperCase()+t.slice(1))}}),(0,n.jsx)(a.Bc,{name:"firstName",component:"div",className:"error-message"})]}),(0,n.jsxs)("div",{className:"formGroup",children:[(0,n.jsxs)("label",{htmlFor:"lastName",children:[l("lastName"),(0,n.jsx)("span",{children:"*"})]}),(0,n.jsx)(a.gN,{type:"text",name:"lastName",className:"formControl",placeholder:l("enter_Last_Name"),maxLength:"16",onChange:e=>{let t=e.target.value.replace(/[^a-zA-Z0-9_' .-]/g,"");d("lastName",t.charAt(0).toUpperCase()+t.slice(1))}}),(0,n.jsx)(a.Bc,{name:"lastName",component:"div",className:"error-message"})]})]}),(0,n.jsxs)("div",{className:"rowGroup",children:[(0,n.jsxs)("div",{className:"formGroup",children:[(0,n.jsx)("label",{htmlFor:"dateOfBirth",children:l("dateOfBirth")}),(0,n.jsx)(i(),{selected:f,onChange:e=>{N(e),d("dob",(0,u.q3)(e))},placeholderText:l("dd_mm_yyyy"),dateFormat:"dd MMMM yyyy",className:(null===(t=g().locale)||void 0===t?void 0:t.startsWith("ar"))?"formControl takeAwayAr":"formControl",maxDate:(0,s.e)(new Date,12),minDate:(0,s.e)(new Date,99),showYearDropdown:!0,dropdownMode:"select",scrollableYearDropdown:!0,yearDropdownItemNumber:100,onKeyDown:e=>{("Backspace"===e.key||"Delete"===e.key)&&e.preventDefault()},onFocus:e=>e.target.blur()}),(0,n.jsx)(a.Bc,{name:"dob",component:"div",className:"error-message"})]}),(0,n.jsxs)("div",{className:"formGroup",children:[(0,n.jsx)("label",{htmlFor:"gender",children:l("gender")}),(0,n.jsxs)(a.gN,{name:"gender",component:"select",className:"formControl",children:[(0,n.jsx)("option",{value:"",selected:(null==p?void 0:p.gender)===null,children:l("selectGender")}),x.map(e=>{let{value:t,label:r}=e;return(0,n.jsx)("option",{value:t,children:l(r)},t)}
1)]}),(0,n.jsx)(a.Bc,{name:"gender",component:"div",className:"error-message"})]})]}),(0,n.jsxs)("div",{className:"formGroup",children:[(0,n.jsx)("label",{htmlFor:"email",children:l("email")}),(0,n.jsx)(a.gN,{type:"text",name:"email",className:"formControl",placeholder:l("enter_Email")}),(0,n.jsx)(a.Bc,{name:"email",component:"div",className:"error-message"})]}),(0,n.jsxs)("div",{className:"btn-group",children:[(0,n.jsx)("button",{className:"close-btn",onClick:()=>o(!1),children:l("cancel")}),(0,n.jsx)(y.Z,{type:"submit",className:"primary-btn",isLoading:c,disabled:c,children:l("save")})]})]})}})};j.propTypes={editEnabled:f().bool,setEditEnabled:f().func},t.default=j},85208:function(e,t,r){"use strict";r.d(t,{Y:function(){return s}});var n=r(77004),a=r(92359),o=r(35537);let s=async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en";try{let o=(0,n.V1)(a.wk,e),s=l(t,r);return(await o(s)).data}catch(t){throw o.Tb(t,{tags:{feature:"cloud-function-call"}}),console.error("Error calling cloud function ".concat(e),t),t}},l=(e,t)=>
1{let r={};return r.body=e,r.headers={"Accept-Language":t},r}},98555:function(e,t,r){"use strict";r.d(t,{$B:function(){return u},XY:function(){return m},fm:function(){return c},h$:function(){return i},hm:function(){return s},q3:function(){return a},up:function(){return d},us:function(){return l},vs:function(){return p},xD:function(){return o}});var n=r(86828);let a=e=>e?(0,n.WU)(new Date(e),"dd MMMM yyyy"):"",o=e=>e?(0,n.WU)(new Date(e),"dd-MM-yyyy"):"",s=e=>e?(0,n.WU)(new Date(e),"yyyy-MM-dd"):"",l=e=>e?(0,n.WU)(new Date(e),"hh:mm a"):"",i=(e,t)=>[e?e.charAt(0).toUpperCase():"",t?t.charAt(0).toUpperCase():""],c=e=>{var t;return"string"!=typeof e?"":null==e?void 0:null===(t=e.split(" ").map(e=>{var t;return(null==e?void 0:e.charAt(0).toUpperCase())+(null==e?void 0:null===(t=e.slice(1))||void 0===t?void 0:t.toLowerCase())}))||void 0===t?void 0:t.join(" ")},d=e=>"".concat("https://cdn.chickinghub.com","/web-app/assets/").concat(e),u=e=>(null==e?void 0:e.startsWith("https://firebasestorage.googleapis.com/v0/b/".concat("chicking-uae-1555747198194.firebasestorage.app","/o/")))?e.replace("https://firebasestorage.googleapis.com/v0/b/".concat("chicking-uae-1555747198194.firebasestorage.app","/o/"),"https://cdn.chickinghub.com/"):e,m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return e&&!Number.isNaN(e)?Number(e).toFixed(t):e},p=(e,t)=>e&&t&&!(e<=t)?Math.min(Math.round((e-t)/e*100),99):0},76234:function(e,t,r){"use strict";r.d(t,{EO:function(){return i},Mu:function(){return p},Nq:function(){return d},Ny:function(){return c},b9:function(){return m},h8:function(){return u}});var n=r(85208),a=r(98737),o=r(36596),s=r(69799);let l=e=>t=>(0,n.Y)(e,t).catch(t=>{throw console.error("Error in ".concat(e,":"),t),t}),i=e=>{let{uid:t}=e;return(0,a.Me)(o.s.customers,t).catch(e=>{throw console.error("Error in isNewUser:",e),e})},c=l(s.Z.createCustomer),d=l(s.Z.updateCustomer),u=l(s.Z.deleteCustomer),m=l(s.Z.sendOtp),p=l(s.Z.verifyOtp)},69799:function(e,t){"use strict";t.Z={createCustomer:"api-accounts-createCustomer",getNearestStore:"api-store-nearByStore",nearByStores:"api-store-nearByStores",updateCustomer:"api-accounts-updateCustomer",deleteCustomer:"api-accounts-deleteCustomer",sendOtp:"api-accounts-sendOtp",verifyOtp:"api-accounts-verifyOtp"}},93232:function(e){e.exports={btn:"button_btn__8WMhP","loader-container":"button_loader-container__KXSRU",secondary:"button_secondary__Mn__I",outline:"button_outline__l2Brq"}},39473:function(e){e.exports={"loader-container":"loader_loader-container__jU_jF","lds-ripple":"loader_lds-ripple__nyAVf","lds-roller":"loader_lds-roller___jPyU"}}},function(e){e.O(0,[2982,5537,5923,5024,8220,2888,9774,179],function(){return e(e.s=96170)}),_N_E=e.O()}]);
2//# sourceMappingURL=editProfileForm-95822c9f593f9902.js.map

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.