"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5928],{62019:function(e,n,s){var t=s(26042),l=s(69396),a=s(99534),i=s(828),o=s(85893),r=s(67294),c=s(57333),d=s(73135),u=s(5434),m=s(86896);n.Z=function(e){var n=e.title,s=e.error,f=e.required,h=e.isboldTitile,p=(0,a.Z)(e,["title","error","required","isboldTitile"]);(0,d.c)("CustomInput");var x=(0,t.Z)({},p).name,g=(0,m.Z)(),j=(0,i.Z)((0,r.useState)(g.formatMessage({id:"Required"})),2),v=j[0],N=j[1],b=function(e){var n=e.target,s=n.name,t=n.value;switch(console.log(t.trim().length,"valuevalue"),s){case"fullName":t.length>=3&&t.length<=30?N("Done"):N(g.formatMessage({id:"Required"}));break;case"contactPhone":12==t.trim().length?N("Done"):N(g.formatMessage({id:"Required"}));break;default:t.length,N("")}p.onChange(e)};return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"position-relative",children:[(0,o.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,o.jsx)("label",{className:"".concat(h?"ck-input-title":""),children:n}),f&&(0,o.jsx)("span",{className:"text-danger ck-input-error",children:"Done"==v?(0,o.jsx)("div",{className:"tick-icon-wrapper",children:(0,o.jsx)(u.vB0,{className:"tick-icon"})}):v})]}),["contactPhone","alternatePhone","recepientNumber","phone"].includes(x)?(0,o.jsx)(c.HH,(0,l.Z)((0,t.Z)({},p),{onChange:b})):(0,o.jsx)("input",(0,l.Z)((0,t.Z)({},p),{onChange:b})),s&&(0,o.jsx)("div",{className:"c-alert",children:s})]})})}},97624:function(e,n,s){var t=s(85893),l=(s(67294),s(73135)),a=s(39625),i=s(59441),o=s(86896);n.Z=function(e){var n=e.loadingText,s=void 0===n?"loading":n;(0,l.c)("Loading");var r,c=(0,o.Z)(),d=(0,i.rV)(),u=d.headerType,m=d.headerImages,f=d.headerVideo;return"image"===u&&"1"===(null===m||void 0===m?void 0:m.logo_navber)?r=null===m||void 0===m?void 0:m.navbar_logo_link:"video"===u&&"1"===(null===f||void 0===f?void 0:f.logo_navber)&&(r=null===f||void 0===f?void 0:f.navbar_logo_link),(0,t.jsx)("div",{className:"laoding_page",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(a.Z,{column:"col-md-2 col-2 order-md-2 order-1 px-0 px-md-1 top-header-logo",bg:!0,logoUrl:r}),(0,t.jsx)("p",{className:"mt-5",children:c.formatMessage({id:s})})]})})}},51003:function(e,n,s){s.d(n,{Z:function(){return A}});var t=s(85893),l=s(67294),a=s(14924),i=s(26042),o=s(69396),r=s(828),c=s(45155),d=s(89583),u=s(50450),m=s(41248),f=s(73455),h=s(86896),p=function(){var e=(0,m.v9)((function(e){return e.settings.userModalToShow})),n=(0,m.I0)(),s=(0,h.Z)(),p=(0,r.Z)((0,l.useState)({email:"",password:""}),2),x=p[0],g=p[1];(0,l.useEffect)((function(){console.log("userModalToShow",e)}),[e]);var j=function(e){g((function(n){return(0,o.Z)((0,i.Z)({},n),(0,a.Z)({},e.target.name,e.target.value))}))};return(0,t.jsx)(u.u_,{isOpen:"login_by_email"===e,centered:!0,children:(0,t.jsx)(u.fe,{children:(0,t.jsxs)("div",{className:"profile-detail d-flex flex-column p-2",children:[(0,t.jsxs)("div",{className:"d-flex justify-content-between mb-3 align-items-end",children:[(0,t.jsx)("h3",{className:"mb-0 text-center fs-6",children:"Login to you Account"}),(0,t.jsx)(u.zx,{color:"secondary",onClick:function(){n((0,f.EK)(null))},size:"sm",children:(0,t.jsx)(c.nfZ,{size:15,fill:"white",stroke:"white",className:"path-stroke-white"})})]}),(0,t.jsx)("div",{className:"profile-form w-100",children:(0,t.jsxs)(u.l0,{onSubmit:function(e){e.preventDefault(),n((0,f.EK)(null))},children:[(0,t.jsxs)(u.X2,{className:"d-flex justify-content-center",children:[(0,t.jsx)(u.JX,{lg:"12",sm:"12",className:"pb-2 pb-lg-0",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(u.__,{for:"email",className:"mt-1",children:s.formatMessage({id:"emailAddress"})}),(0,t.jsx)(u.II,{placeholder:"Enter your email address",name:"email",type:"email",id:"email",value:x.email,onChange:j})]})}),(0,t.jsx)(u.JX,{lg:"12",sm:"12",className:"pb-2 pb-lg-0",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(u.__,{for:"email",className:"mt-1",children:s.formatMessage({id:"password"})}),(0,t.jsx)(u.II,{placeholder:"Enter your password",name:"password",type:"password",id:"password",value:x.password,onChange:j})]})})]}),(0,t.jsx)(u.X2,{className:"d-flex justify-content-center mt-4",children:(0,t.jsx)(u.JX,{sm:"12",lg:"12",className:"d-flex justify-content-center w-100",children:(0,t.jsx)(u.zx,{size:"md",color:"indolj-primary w-100 rounded-pill",type:"submit",children:s.formatMessage({id:"login"})})})}),(0,t.jsx)("p",{className:"text-divider",children:(0,t.jsx)("span",{children:s.formatMessage({id:"or"})})}),(0,t.jsxs)(u.X2,{className:"d-flex justify-content-center mt-2",children:[(0,t.jsx)(u.JX,{sm:"4",lg:"4",className:"d-flex justify-content-center",children:(0,t.jsx)(u.zx,{size:"md",color:"primary",className:"third-party-login-button",type:"button",onClick:function(){},children:(0,t.jsx)(d.tBk,{size:"1.5rem"})})}),(0,t.jsx)(u.JX,{sm:"4",lg:"4",className:"d-flex justify-content-center",children:(0,t.jsx)(u.zx,{size:"md",color:"danger",className:"third-party-login-button",type:"button",onClick:function(){},children:(0,t.jsx)(d.ldW,{size:"1.5rem"})})}),(0,t.jsx)(u.JX,{sm:"4",lg:"4",className:"d-flex justify-content-center",children:(0,t.jsx)(u.zx,{size:"md",color:"indolj-primary",className:"third-party-login-button",type:"button",onClick:function(){n((0,f.EK)("login_by_phone"))},children:(0,t.jsx)(d.DNl,{size:"1.5rem"})})})]})]})})]})})})},x=s(67555),g=s.n(x),j=s(83415),v=s(11163),N=s(70893),b=s(29408),y=s(62019),_=function(){var e=(0,m.v9)((function(e){return e.settings.userModalToShow})),n=(0,m.I0)(),s=(0,r.Z)((0,l.useState)(!1),2),a=s[0],i=s[1],o=(0,N.xQ)().apiUrl,d=(0,v.useRouter)().asPath,p=(0,h.Z)(),x=(0,r.Z)((0,l.useState)(""),2),_=x[0],S=x[1],w=(0,j.Mf)("merchantId");(0,l.useEffect)((function(){var e=(0,j.Mf)("profilePhoneNum");if(e&&"200679"===w){var n=e.slice(0,2);"92"==n?e=0+e.slice(2):"+9"==n&&(e=0+e.slice(3)),e.includes("-")||(e=e.slice(0,4)+"-"+e.slice(4))}S(e)}),[]);return(0,t.jsx)(u.u_,{isOpen:"login_by_phone"===e,centered:!0,children:(0,t.jsxs)(u.fe,{toggle:!1,children:[(0,t.jsx)("div",{id:"recaptcha-container"}),(0,t.jsxs)("div",{className:"profile-detail d-flex flex-column p-2",children:[(0,t.jsxs)("div",{className:"d-flex justify-content-between mb-3 align-items-end",children:[(0,t.jsxs)("h3",{className:"mb-0",children:[p.formatMessage({id:"enter"})," ",p.formatMessage({id:"your"})," ",p.formatMessage({id:"mobileNo"})]}),"/guestcheckout"===d?null:(0,t.jsx)(u.zx,{color:"secondary",onClick:function(){n((0,f.EK)(null))},size:"sm",children:(0,t.jsx)(c.nfZ,{size:15,fill:"white",stroke:"white",className:"path-stroke-white"})})]}),(0,t.jsx)("div",{className:"profile-form w-100",children:(0,t.jsxs)(u.l0,{onSubmit:function(e){e.preventDefault(),n((0,f.vi)(_));var s=_;if("0"===s.charAt(0)){var t=s.replace(/[^0-9]/g,"");s="92"+t.slice(1)}i(!0),(0,b.hC)(s,o).then((function(e){1==e.code?(console.log("loading => response:",e),localStorage.setItem("cust_phone_number",s),localStorage.setItem("profilePhoneNum",s),localStorage.setItem("otp_details",JSON.stringify(e.details)),n((0,f.EK)("otp")),i(!1)):(localStorage.setItem("cust_phone_number",s),localStorage.setItem("profilePhoneNum",s),n((0,f.EK)("register")),i(!1))}))},children:[(0,t.jsx)(u.X2,{className:"d-flex justify-content-center",children:(0,t.jsx)(u.JX,{lg:"12",sm:"12",className:"pb-2 pb-lg-0",children:"200679"===w?(0,t.jsx)(y.Z,{title:"Mobile Number",className:"grey-fields mobile_inputsa full-width mt-2",placeholder:"03xx-xxxxxxx",format:"####-#######",type:"tel",name:"phone",value:_,id:"recepientNumber",autoComplete:"off",onChange:function(e){var n=e.target.value;S(n)}}):(0,t.jsxs)("div",{children:[(0,t.jsx)(u.__,{for:"phone",className:"mt-1 mb-3",style:{fontSize:".9rem"},children:"Please confirm your country code and enter your mobile number"}),(0,t.jsx)(g(),{inputProps:{name:"phone",required:!0,minLength:12},value:_,onChange:function(e){return S(e)},inputStyle:{width:"100%"},onFocus:function(){_&&"92"!==_||S("923")},placeholder:"923000000000",countryCodeEditable:!1})]})})}),(0,t.jsx)(u.X2,{className:"200679"===w?"d-flex justify-content-center":"d-flex justify-content-center mt-4",children:(0,t.jsx)(u.JX,{sm:"12",lg:"12",className:"d-flex justify-content-center w-100",children:(0,t.jsx)(u.zx,{size:"md",color:"indolj-primary w-100 rounded-pill",type:"submit",children:a?(0,t.jsx)(u.$j,{size:"sm"}):"Login"})})}),"/guestcheckout"!==d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-divider",children:(0,t.jsx)("span",{children:p.formatMessage({id:"or"})})}),(0,t.jsx)(u.X2,{className:"d-flex justify-content-center mt-2",children:(0,t.jsx)(u.JX,{sm:"12",lg:"12",className:"d-flex justify-content-center w-100",children:(0,t.jsx)(u.zx,{size:"md",color:"indolj-primary-inverted bg-white w-100 rounded-pill",type:"button",onClick:function(){n((0,f.EK)(null))},children:p.formatMessage({id:"Order as Guest"})})})})]}):null]})})]})]})})},S=s(71470),w=(s(91259),s(67672),function(){var e=(0,m.v9)((function(e){return e.settings.userModalToShow})),n=(0,m.I0)(),s=(0,h.Z)(),a=(0,N.xQ)().apiUrl,d=(0,v.useRouter)().asPath,p=(0,r.Z)((0,l.useState)({otp:null}),2),x=p[0],g=p[1],y=(0,r.Z)((0,l.useState)(45),2),_=y[0],w=y[1],M=(0,r.Z)((0,l.useState)(!1),2),k=M[0],I=M[1],Z=(0,r.Z)((0,l.useState)(!1),2),C=Z[0],T=Z[1],z=(0,r.Z)((0,l.useState)(!1),2),E=z[0],P=z[1],X=(0,j.AK)("otp_details");(0,l.useEffect)((function(){if("otp"===e){w(45);var n=setInterval((function(){w((function(e){var s=e-1;return 0==s?(clearInterval(n),0):s}))}),1e3);return function(){clearInterval(n)}}}),[e]);return(0,t.jsx)(u.u_,{isOpen:"otp"===e,centered:!0,children:(0,t.jsxs)(u.fe,{children:[(0,t.jsx)("div",{id:"recaptcha-container"}),(0,t.jsxs)("div",{className:"profile-detail d-flex flex-column p-2",children:[(0,t.jsxs)("div",{className:"d-flex justify-content-between mb-3 align-items-start",children:[(0,t.jsx)("h3",{className:"mb-0 fw-bold",children:s.formatMessage({id:"Please enter the verification code"})}),"/guestcheckout"!==d?(0,t.jsx)(u.zx,{color:"secondary",onClick:function(){n((0,f.EK)(null))},size:"sm",children:(0,t.jsx)(c.nfZ,{size:15,fill:"white",stroke:"white",className:"path-stroke-white"})}):null]}),(0,t.jsx)("div",{className:"profile-form w-100",children:(0,t.jsxs)(u.l0,{onSubmit:function(e){e.preventDefault(),T(!0),null===X||void 0===X||X.otp,null===X||void 0===X||X.divider,x.otp?(0,b.DT)((0,j.Mf)("cust_phone_number"),a,x.otp).then((function(e){var s;e&&1===e.code?(T(!1),localStorage.setItem("userDetails",JSON.stringify(e.details.user)),localStorage.setItem("otp_details",JSON.stringify(e.details)),n((0,f.av)(e.details.user)),n((0,f.nf)(!0)),n((0,f.OK)(null===(s=e.details)||void 0===s?void 0:s.addressBook)),localStorage.setItem("isLoggedIn",!0),n((0,f.EK)("verified")),g((0,o.Z)((0,i.Z)({},x),{otp:null}))):(I(!0),T(!1),setTimeout((function(){I(!1)}),3e3))})).catch((function(e){I(!0),T(!1),console.log(e),setTimeout((function(){I(!1)}),3e3)})):(I(!0),T(!1),setTimeout((function(){I(!1)}),3e3))},children:[(0,t.jsx)(u.X2,{className:"d-flex justify-content-center",children:(0,t.jsx)(u.JX,{lg:"12",sm:"12",className:"pb-2 pb-lg-0",children:(0,t.jsxs)("div",{children:[k?(0,t.jsxs)(u.__,{for:"otp",className:"mt-1",children:[s.formatMessage({id:"invalid"})," OTP"]}):null,(0,t.jsxs)("div",{className:"otp-wrapper",children:[(0,t.jsx)(S.Z,{inputStyle:"otp-input ".concat(k?"otp-error":""),value:x.otp,onChange:function(e){g((function(n){return(0,o.Z)((0,i.Z)({},n),{otp:e})}))},numInputs:6,separator:(0,t.jsx)("span",{})}),(0,t.jsx)("div",{className:"m-2 h-100 d-flex justify-content-center align-items-center",style:{right:"0.5rem"},children:_>0?(0,t.jsxs)("span",{children:["(",_,")"]}):(0,t.jsx)("span",{className:"pointer text-primary text-small",onClick:function(){return function(){if(P(!0),(0,b.hC)((0,j.Mf)("cust_phone_number"),a).then((function(e){1==e.code?(localStorage.setItem("otp_details",JSON.stringify(e.details)),P(!1)):P(!1)})),"otp"===e){w(45);var n=setInterval((function(){w((function(e){var s=e-1;return 0==s?(clearInterval(n),0):s}))}),1e3)}}()},children:E?(0,t.jsx)(u.$j,{size:"sm"}):"".concat(s.formatMessage({id:"resend"})," OTP")})})]})]})})}),(0,t.jsx)(u.X2,{className:"verify_button d-flex justify-content-center mt-4",children:(0,t.jsx)(u.JX,{sm:"10",lg:"10",className:"d-flex justify-content-center w-100",children:(0,t.jsx)(u.zx,{size:"md",color:"indolj-primary w-100 rounded-pill",type:"submit",children:C?(0,t.jsx)(u.$j,{size:"sm"}):"".concat(s.formatMessage({id:"verify"})," OTP")})})})]})})]})]})})}),M=s(47568),k=s(70655),I=s(82175),Z=s(9198),C=s.n(Z),T=s(16310),z=s(22920),E=s(77561),P=s(30381),X=s.n(P),J=s(59441),O={fullName:"",email:"",phone:(0,j.Mf)("profilePhoneNum"),dob:""},D=T.Ry({fullName:T.Z_().min(3).max(24).required("Please Enter Full Name"),email:T.Z_().email().required("Please Enter Email"),phone:T.Z_().matches(/^((\\+[1-9]{1,4}[ \\-]*)|(\\([0-9]{2,3}\\)[ \\-]*)|([0-9]{2,4})[ \\-]*)*?[0-9]{3,4}?[ \\-]*[0-9]{3,4}?$/,"Phone Number is not valid"),dob:T.hT().max(new Date,"Date of Birth cannot be in the future").required("Please Enter Date of Birth")}),K=function(){var e,n,s=(0,m.v9)((function(e){return e.settings.userModalToShow})),a=(0,m.v9)((function(e){return e.settings.userPhoneNumber})),i=(0,r.Z)((0,l.useState)(null),2),o=i[0],d=(i[1],(0,r.Z)((0,l.useState)(!1),2)),p=d[0],x=d[1],b=(0,r.Z)((0,l.useState)(!1),2),y=b[0],_=b[1],S=(0,J.rV)().setting,w=(0,h.Z)();(0,l.useEffect)((function(){R({target:{name:"phone",value:a}})}),[s]);var Z=(0,N.xQ)().apiUrl,T=(0,m.I0)(),P=(0,v.useRouter)().asPath,K=(0,I.TA)({initialValues:O,validationSchema:D,onSubmit:function(e,n){L(e,n)}}),U=K.values,q=K.errors,A=K.touched,R=K.handleChange,F=K.handleSubmit,L=function(){var e=(0,M.Z)((function(e,n){var s,t,l,a,i,o,r;return(0,k.__generator)(this,(function(c){switch(c.label){case 0:if(console.log("values.fullName",e),s=e.fullName.split(" ")[0],!(t=e.fullName.split(" ")[1]))return x(!0),setTimeout((function(){x(!1)}),3e3),[2];_(!0),Z+"MobileSignup?json=1",l={json:"1"},c.label=1;case 1:return c.trys.push([1,3,,4]),a={first_name:s,last_name:t,email_address:e.email,contact_phone:"+"+e.phone,dob:X()(e.dob).format("YYYY-MM-DD"),merchant_id:(0,j.Mf)("merchantId")},[4,(0,E.P)("POST",Z,"MobileSignup",JSON.stringify(a),l)];case 2:return(i=c.sent())&&1===i.code?(console.log("loading => axios MobileSignup success",i),z.Am.success(i.msg,{position:"top-center",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,progress:!1,theme:"colored"}),o={data:i},_(!1),console.log("loading => response:",o),n.resetForm(),T((0,f.EK)("login_by_phone"))):(_(!1),z.Am.error("".concat(response.data.msg," ").concat(w.formatMessage({id:"pleaseLogin"})),{position:"top-center",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,progress:!1,theme:"colored"}),_(!1)),[3,4];case 3:return r=c.sent(),_(!1),z.Am.error(w.formatMessage({id:"someError"}),{position:"top-center",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,progress:!1,theme:"colored"}),console.log("loading => axios MobileSignup error",r),[3,4];case 4:return[2]}}))}));return function(n,s){return e.apply(this,arguments)}}();return(0,t.jsx)(u.u_,{isOpen:"register"===s,centered:!0,className:"".concat(s?"modal-open":""),children:(0,t.jsxs)(u.fe,{children:[(0,t.jsx)("div",{id:"recaptcha-container"}),(0,t.jsxs)("div",{className:"profile-detail d-flex flex-column p-4",children:[(0,t.jsxs)("div",{className:"d-flex justify-content-end mb-3 align-items-end",children:[(0,t.jsx)("h3",{className:"fw-bolder text-center col",children:w.formatMessage({id:"register"})}),"/guestcheckout"===P?null:(0,t.jsx)(u.zx,{color:"secondary",onClick:function(){T((0,f.EK)(null))},size:"sm",children:(0,t.jsx)(c.nfZ,{size:15,className:"path-stroke-white"})})]}),(0,t.jsx)("div",{className:"profile-form w-100",children:(0,t.jsxs)(u.l0,{onSubmit:F,children:[(0,t.jsxs)(u.X2,{className:"d-flex justify-content-center",children:[(0,t.jsx)(u.JX,{lg:"12",sm:"12",className:"pb-1 pb-lg-0",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(u.__,{for:"fullName",className:"mt-2 mx-1 mb-1",children:[w.formatMessage({id:"fullName"}),(0,t.jsx)("span",{className:"text-danger text-small",children:"*"})]}),(0,t.jsx)(u.II,{placeholder:"".concat(w.formatMessage({id:"enter"}),' intl.formatMessage({ id: "fullName" })'),type:"text",name:"fullName",id:"fullName",value:U.fullName,onChange:R}),q.fullName&&A.fullName?(0,t.jsxs)("p",{className:"text-danger text-small p-0 m-0",children:[" ","*",q.fullName," "]}):p?(0,t.jsxs)("p",{className:"text-danger text-small p-0 m-0",children:[" ","*Full Name is required"]}):null]})}),(0,t.jsx)(u.JX,{lg:"12",sm:"12",className:"pb-2 pb-lg-0",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(u.__,{for:"email",className:"mt-3 mx-1 mb-1",children:[w.formatMessage({id:"emailAddress"}),(0,t.jsx)("span",{className:"text-danger text-small",children:"*"})]}),(0,t.jsx)(u.II,{placeholder:"".concat(w.formatMessage({id:"enter"})," ").concat(w.formatMessage({id:"emailAddress"})),name:"email",type:"email",id:"email",value:U.email,onChange:R}),q.email&&A.email?(0,t.jsxs)("p",{className:"text-danger text-small p-0 m-0",children:[" ","*",q.email," "]}):null]})}),(0,t.jsx)(u.JX,{lg:"12",sm:"12",className:"pb-2 pb-lg-0",children:(0,t.jsxs)("div",{className:"w-100",children:[(0,t.jsxs)(u.__,{for:"email",className:"mt-3 mx-1 mb-1",children:[w.formatMessage({id:"dob"}),(0,t.jsx)("span",{className:"text-danger text-small",children:"*"})]}),(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(C(),{selected:U.dob,onChange:function(e){R({target:{name:"dob",value:e}})},showYearDropdown:!0,maxDate:new Date,peekNextMonth:!0,dropdownMode:"select",className:"rounded dob_input w-full",dateFormat:"yyyy-MM-dd",wrapperClassName:"datepicker",popperPlacement:"top"})}),q.dob&&A.dob?(0,t.jsxs)("p",{className:"text-danger text-small p-0 m-0",children:[" ","*",q.dob," "]}):null]})}),(0,t.jsx)(u.JX,{lg:"12",sm:"12",className:"pb-2 pb-lg-0",children:(0,t.jsxs)("div",{children:[(0,t.jsxs)(u.__,{for:"phone",className:"mt-3 mx-1 mb-1",children:[w.formatMessage({id:"mobileNo"}),(0,t.jsx)("span",{className:"text-danger text-small",children:"*"})]}),(0,t.jsx)(g(),{inputProps:{name:"phone",required:!0,minLength:12},country:(null===S||void 0===S||null===(e=S.options)||void 0===e?void 0:e.admin_country_set)?null===S||void 0===S||null===(n=S.options)||void 0===n?void 0:n.admin_country_set.toLowerCase():"sa",name:"phone",countryCodeEditable:!1,inputStyle:{width:"100%"},placeholder:"923000000000",value:U.phone,id:"phone",onChange:function(e){return R({target:{name:"phone",value:e}})},onFocus:function(){0!==U.phone.length&&"92"!==U.phone||R({target:{name:"phone",value:"923"}})}}),q.phone&&A.phone?(0,t.jsxs)("p",{className:"text-danger text-small p-0 m-0",children:[" ","*",q.phone," "]}):o?(0,t.jsx)("p",{className:"text-danger text-small p-0 m-0",children:o}):null]})})]}),(0,t.jsx)(u.X2,{className:"d-flex justify-content-center mt-3",children:(0,t.jsx)(u.JX,{sm:"12",lg:"12",className:"d-flex justify-content-center w-100",children:(0,t.jsx)(u.zx,{size:"md",color:"indolj-primary w-100 rounded-pill",type:"submit",children:y?(0,t.jsx)(u.$j,{size:"sm"}):w.formatMessage({id:"register"})})})})]})})]}),(0,t.jsx)("div",{className:"profile-delete d-flex justify-content-center align-items-center mb-4",children:(0,t.jsxs)("h6",{className:"m-0 p-0 fw-bold pointer text-decoration-underline",onClick:function(){T((0,f.EK)("login_by_phone"))},children:[w.formatMessage({id:"already have an account"}),"?"]})})]})})},U=s(8193),q=(s(46299),s(6158),function(){var e=(0,m.v9)((function(e){return e.settings.userModalToShow})),n=(0,m.I0)(),s=(0,j.AK)("otp_details"),a=(0,N.xQ)().apiUrl,i=(0,h.Z)();(0,l.useEffect)((function(){setTimeout((function(){n((0,f.EK)(null))}),1500)}),[]);!function(){var e=(0,M.Z)((function(){var e,t,l,i,o,r,c,d,u,m,h;return(0,k.__generator)(this,(function(p){switch(p.label){case 0:t={json:"1",client_token:null===s||void 0===s||null===(e=s.user)||void 0===e?void 0:e.token,merchant_id:(0,j.Mf)("merchantId")},p.label=1;case 1:return p.trys.push([1,3,,4]),[4,(0,E.P)("GET",a,"GetUserProfile",null,t)];case 2:return(l=p.sent())&&1===l.code&&(console.log("loading => axios GetUserProfile success",l),m={data:l},console.log("loading => user profile response:",m),(null===m||void 0===m||null===(i=m.data)||void 0===i||null===(o=i.details)||void 0===o?void 0:o.offers)&&(null===m||void 0===m||null===(r=m.data)||void 0===r||null===(c=r.details)||void 0===c?void 0:c.offers)&&localStorage.setItem("offers",JSON.stringify(null===m||void 0===m||null===(d=m.data)||void 0===d||null===(u=d.details)||void 0===u?void 0:u.offers)),setTimeout((function(){n((0,f.EK)(null))}),1e3)),[3,4];case 3:return h=p.sent(),console.log("loading => axios GetUserProfile error",h),[3,4];case 4:return[2]}}))}))}();return(0,t.jsx)(u.u_,{isOpen:"verified"===e,centered:!0,children:(0,t.jsx)(u.fe,{children:(0,t.jsx)(u.X2,{children:(0,t.jsx)(u.JX,{md:"12",children:(0,t.jsxs)(u.X2,{className:"flex-column",children:[(0,t.jsx)(u.JX,{sm:"12",md:"12",className:"text-center",children:(0,t.jsx)("span",{className:"text-success text-bold fs-2",children:(0,t.jsx)(U.mny,{})})}),(0,t.jsx)(u.JX,{sm:"12",md:"12",className:"text-center",children:(0,t.jsxs)("span",{className:"text-success text-bold fs-2",children:["OTP ",i.formatMessage({id:"verified"})]})})]})})})})})}),A=function(){var e=(0,m.v9)((function(e){return e.settings.userModalToShow}));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_,{}),(0,t.jsx)(p,{}),(0,t.jsx)(K,{}),(0,t.jsx)(w,{}),"verified"===e?(0,t.jsx)(q,{}):null]})}},12243:function(e,n,s){s.d(n,{fy:function(){return d},l:function(){return c},pf:function(){return u}});var t=s(26042),l=s(11163),a=s(41248),i=s(15279),o=s(70893),r=s(56351),c=function(){var e=(0,a.v9)((function(e){return e.settings.deliveryType})),n=(0,o.xQ)().apiUrl,s=(0,a.v9)((function(e){return e.settings.staticSettings.setting})),t=(0,a.v9)((function(e){return e.settings.isEasypaisa})),l="undefined"!==typeof localStorage?localStorage.getItem("authToken"):"";if(console.log("loading => getEnabledPayments authToken",l),n&&s){var c={baseUrl:n,api_version:null===s||void 0===s?void 0:s.api_version,merchantId:"undefined"!==typeof localStorage&&localStorage.getItem("merchantId")?localStorage.getItem("merchantId"):"",branchId:(0,r.Vx)(e),deliveryType:e,authToken:l};return t&&(c.easypaisa_miniapp=1),(0,i.sW)(c,{skip:!("undefined"!==typeof localStorage&&localStorage.getItem("merchantId"))})}return{isLoading:!0,isError:!1,data:null}},d=function(e){var n,s,c=(0,o.xQ)(),d=c.apiUrl,u=c.domain,m=(0,l.useRouter)(),f=(0,l.useRouter)().query,h=f.dineinmenu,p=f.reload,x=f.branch_id,g=f.cat_key,j=f.bogo_user_id,v=f.restaurant_slug,N=m.locale,b=(0,a.v9)((function(e){return e.settings.deliveryType})),y=(0,a.v9)((function(e){return e.settings.staticSettings.setting})),_=e,S=(0,t.Z)({baseUrl:d,api_version:null===y||void 0===y?void 0:y.api_version,authToken:_,apiType:"StructuredMenu"},"undefined"!==typeof localStorage&&localStorage.getItem("slug")?{slug:localStorage.getItem("slug")?localStorage.getItem("slug"):v}:{slug:v},u?{domain:u}:{},p?{reload:1}:{},g?{cat_key:g}:{},j?{bogo_user_id:j}:{},h?(0,t.Z)({dineinmenu:1},x?{branch_id:x}:"undefined"!==typeof localStorage?{branch_id:(0,r.Vx)(b)}:{}):{},"en"!==N?{locale:N}:{});return(null===S||void 0===S||null===(n=S.slug)||void 0===n?void 0:n.includes("menu"))?("undefined"!==typeof localStorage&&(null===localStorage||void 0===localStorage||localStorage.clear()),void(null===window||void 0===window||null===(s=window.location)||void 0===s||s.reload())):(0,i.ir)(S)},u=function(e){var n=(0,o.xQ)(),s=n.apiUrl,t=n.domain,r=(0,l.useRouter)().query.reload,c=(0,a.v9)((function(e){return e.settings.staticSettings.setting})),d=e,u={baseUrl:s,api_version:null===c||void 0===c?void 0:c.api_version,apiType:"GetMerchantTaxClasses",authToken:d,slug:"undefined"!==typeof localStorage&&localStorage.getItem("slug")?localStorage.getItem("slug"):"",domain:t,reload:r};return(0,i.yb)(u)}}}]);