1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[252],{5919:function(e,t,r){"use strict";var a=r(1491);t.Z=void 0;var s=a(r(5791)),n=r(1527),i=(0,s.default)((0,n.jsx)("path",{d:"M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"}),"KeyboardBackspace");t.Z=i},8559:function(e,t,r){"use strict";r.d(t,{Z:function(){return I}});var a=r(1833),s=r(795),n=r(959),i=r(5924),l=r(3409),o=r(7254),c=r(1217),u=r(2618),m=r(128),d=r(956),p=r(442);function h(e){return(0,p.Z)("MuiCircularProgress",e)}(0,d.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var x=r(1527);let g=["className","color","disableShrink","size","style","thickness","value","variant"],f=e=>e,v,j,y,Z,k=(0,o.F4)(v||(v=f` 2 0% { 3 transform: rotate(0deg); 4 } 5 6 100% { 7 transform: rotate(360deg); 8 } 9`)),b=(0,o.F4)(j||(j=f` 10 0% { 11 stroke-dasharray: 1px, 200px; 12 stroke-dashoffset: 0; 13 } 14 15 50% { 16 stroke-dasharray: 100px, 200px; 17 stroke-dashoffset: -15px; 18 } 19 20 100% { 21 stroke-dasharray: 100px, 200px; 22 stroke-dashoffset: -125px; 23 } 24`)),C=e=>{let{classes:t,variant:r,color:a,disableShrink:s}=e,n={root:["root",r,`color${(0,c.Z)(a)}`],svg:["svg"],circle:["circle",`circle${(0,c.Z)(r)}`,s&&"circleDisableShrink"]};return(0,l.Z)(n,h,t)},P=(0,m.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,c.Z)(r.color)}`]]}})(({ownerState:e,theme:t})=>(0,s.Z)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>"indeterminate"===e.variant&&(0,o.iv)(y||(y=f` 25 animation: ${0} 1.4s linear infinite; 26 `),k)),S=(0,m.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),w=(0,m.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.circle,t[`circle${(0,c.Z)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>(0,s.Z)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,o.iv)(Z||(Z=f` 27 animation: ${0} 1.4s ease-in-out infinite; 28 `),b)),T=n.forwardRef(function(e,t){let r=(0,u.Z)({props:e,name:"MuiCircularProgress"}),{className:n,color:l="primary",disableShrink:o=!1,size:c=40,style:m,thickness:d=3.6,value:p=0,variant:h="indeterminate"}=r,f=(0,a.Z)(r,g),v=(0,s.Z)({},r,{color:l,disableShrink:o,size:c,thickness:d,value:p,variant:h}),j=C(v),y={},Z={},k={};if("determinate"===h){let e=2*Math.PI*((44-d)/2);y.strokeDasharray=e.toFixed(3),k["aria-valuenow"]=Math.round(p),y.strokeDashoffset=`${((100-p)/100*e).toFixed(3)}px`,Z.transform="rotate(-90deg)"}return(0,x.jsx)(P,(0,s.Z)({className:(0,i.Z)(j.root,n),style:(0,s.Z)({width:c,height:c},Z,m),ownerState:v,ref:t,role:"progressbar"},k,f,{children:(0,x.jsx)(S,{className:j.svg,ownerState:v,viewBox:"22 22 44 44",children:(0,x.jsx)(w,{className:j.circle,style:y,ownerState:v,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})})}))});var I=T},9045:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/payment",function(){return r(9874)}])},7324:function(e,t,r){"use strict";var a=r(1527),s=r(8306),n=r(9229),i=r(2145),l=r(4153);t.Z=e=>{let t=t=>{let r=(0,s.v9)(e=>e.auth),o=(0,s.v9)(e=>e.profile);return"authenticating"!==r.status&&(o.user||"loading"!==o.status)?"authenticated"===r.status&&r.token?o.user&&!1===o.user.isProfileComplete?(0,a.jsx)(l.default,{}):(0,a.jsx)(e,{...t}):(0,a.jsx)(i.default,{}):(0,a.jsx)(n.default,{})};return e.getInitialProps&&(t.getInitialProps=e.getInitialProps),t}},9229:function(e,t,r){"use strict";r.r(t);var a=r(1527),s=r(415),n=r.n(s),i=r(8559),l=r(3930),o=r(2951),c=r(2328),u=r(139);t.default=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n(),{children:(0,a.jsx)("title",{children:"Loading"})}),(0,a.jsx)(l.Z,{sx:{p:{xs:"0",md:"0 1rem"},pb:"3rem"},children:(0,a.jsx)(o.Z,{children:(0,a.jsx)(c.Z,{sx:{height:"calc(90vh - 4rem)",p:"3rem 1rem"},children:(0,a.jsx)(u.Z,{sx:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},children:(0,a.jsx)(i.Z,{sx:{color:"var(--primaryColor)",display:"block",margin:"auto"}})})})})})]})},2145:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return y}});var a=r(1527),s=r(415),n=r.n(s),i=r(8306),l=r(959),o=r(1355),c=r(6576),u=r(3930),m=r(2951),d=r(2328),p=r(4422),h=r(8559),x=r(9923),g=r(9066),f=r(9651),v=r(1080),j=e=>{let{...t}=e,r=(0,i.v9)(e=>e.auth),s=(0,i.I0)(),n=(0,o.useRouter)(),[u,m]=(0,l.useState)(""),[d,j]=(0,l.useState)(""),{enqueueSnackbar:y}=(0,c.Ds)(),Z=async e=>{if(e.preventDefault(),!u||""===u){y("Email is required",{variant:"error"});return}if("sentOtp"===r.status||"loginFailed"===r.status){if(!d||""===d){y("OTP is required",{variant:"error"});return}let e={email:u.trim(),otp:d.trim()},t=(0,p.or)(s,e);await t}else{let e={sendToEmail:!0,email:u.trim()},t=(0,p.CQ)(s,e);await t}};return(0,a.jsxs)(x.Z,{onSubmit:e=>Z(e),sx:{mt:"2rem",mb:"2rem",...t.sx},children:[(0,a.jsx)("h3",{style:{margin:"0 auto",textAlign:"center",fontWeight:"600"},children:"Login"}),(0,a.jsxs)(v.Z,{sx:{gridTemplateColumns:"1fr",gap:"0.25rem",mt:"2rem"},children:[(0,a.jsx)("small",{style:{marginLeft:"0.25rem",fontWeight:"500"},children:"Email"}),(0,a.jsx)(g.Z,{children:(0,a.jsx)("input",{type:"email",placeholder:"Enter Email Address",name:"phone",value:u,onChange:e=>m(e.target.value)})})]}),(0,a.jsxs)(v.Z,{sx:{gridTemplateColumns:"1fr",gap:"0.25rem",mt:"1rem",display:"sentOtp"===r.status||"login"===r.status||"loginFailed"===r.status?"grid":"none",visibility:"sentOtp"===r.status||"login"===r.status||"loginFailed"===r.status?"visible":"hidden",opacity:"sentOtp"===r.status||"login"===r.status||"loginFailed"===r.status?"1":"0"},children:[(0,a.jsx)("small",{style:{marginLeft:"0.25rem",fontWeight:"500"},children:"OTP"}),(0,a.jsx)(g.Z,{children:(0,a.jsx)("input",{type:"number",placeholder:"6 digit OTP",name:"otp",value:d,maxLength:6,onChange:e=>j(e.target.value)})})]}),"sendingOtp"===r.status||"login"===r.status?(0,a.jsx)(h.Z,{sx:{display:"block",margin:"0 auto",marginTop:"2rem",color:"var(--primaryColor)"}}):(0,a.jsx)("input",{type:"submit",value:"sentOtp"===r.status?"Verify OTP":"Login",style:{margin:"0 auto",marginTop:"2rem",display:"login"===r.status||"sendingOtp"===r.status?"none":"block",visibility:"sendingOtp"===r.status||"login"===r.status?"hidden":"visible",opacity:"sendingOtp"===r.status||"login"===r.status?"0":"1"},className:"app__filled_btn"}),(0,a.jsxs)(f.Z,{sx:{alignItems:"center",justifyContent:"center",mt:"2rem"},children:[(0,a.jsx)("p",{children:"Not registered yet?"}),(0,a.jsx)("button",{type:"button",className:"app__text_btn",onClick:()=>n.push("/register"),children:"Register Now"})]})]})},y=()=>{let e=(0,i.v9)(e=>e.auth),t=(0,i.I0)(),r=(0,o.useRouter)(),{enqueueSnackbar:s}=(0,c.Ds)();return(0,l.useEffect)(()=>
28{if("authenticated"===e.status&&e.token){let e=r.query.returnUrl||"/dashboard";r.replace(e),s("Login successful",{variant:"success"})}return"sentOtp"===e.status&&s("OTP sent successfully",{variant:"success"}),()=>{}},[r,e.status,e.token,s]),(0,l.useEffect)(()=>(null!==e.error&&(s(e.error,{variant:"error"}),(0,p.Rt)(t)),()=>{}),[e.error,s,t]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n(),{children:(0,a.jsx)("title",{children:"Login - RefTrack"})}),(0,a.jsx)(u.Z,{sx:{pb:"3rem"},children:(0,a.jsx)(m.Z,{children:(0,a.jsx)(d.Z,{sx:{p:"3rem 1rem",pb:"0",minHeight:"calc(90vh - 4rem)",alignItems:"center",justifyContent:"center"},children:(0,a.jsx)(j,{})})})})]})}},9874:function(e,t,r){"use strict";let a;r.r(t),r.d(t,{default:function(){return _}});var s=r(1527),n=r(415),i=r.n(n),l=r(7324),o=r(3930),c=r(2951),u=r(2328),m=r(9747),d=r(959);let p="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var h={randomUUID:p};let x=new Uint8Array(16);function g(){if(!a&&!(a="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(x)}let f=[];for(let e=0;e<256;++e)f.push((e+256).toString(16).slice(1));var v=function(e,t,r){if(h.randomUUID&&!t&&!e)return h.randomUUID();e=e||{};let a=e.random||(e.rng||g)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=a[e];return t}return function(e,t=0){return(f[e[t+0]]+f[e[t+1]]+f[e[t+2]]+f[e[t+3]]+"-"+f[e[t+4]]+f[e[t+5]]+"-"+f[e[t+6]]+f[e[t+7]]+"-"+f[e[t+8]]+f[e[t+9]]+"-"+f[e[t+10]]+f[e[t+11]]+f[e[t+12]]+f[e[t+13]]+f[e[t+14]]+f[e[t+15]]).toLowerCase()}(a)},j=r(8306),y=r(6576),Z=r(3669),k=r(8559),b=r(9923),C=r(9066),P=r(1080),S=r(139),w=r(9651);let T=[{title:"Select",value:"select"},{title:"Credit/Debit Card",value:"CC"},{title:"Netbanking",value:"NB"},{title:"UPI",value:"UPI"},{title:"Wallet",value:"CASH"}],I=[{title:"Pack of 10",price:"10000",credits:"10"},{title:"Pack of 20",price:"15000",credits:"20"}],L="https://merito-server.cyclic.app/api/v1";var N=()=>{let e=(0,j.v9)(e=>e.auth),{enqueueSnackbar:t}=(0,y.Ds)(),[r,a]=(0,d.useState)(""),[n,i]=(0,d.useState)(""),[l,o]=(0,d.useState)(I[0].price),[c,m]=(0,d.useState)(""),[p,h]=(0,d.useState)(""),[x,g]=(0,d.useState)(""),[f,N]=(0,d.useState)(""),[_,O]=(0,d.useState)(I[0].credits),[D,E]=(0,d.useState)(I[0].title),[F,R]=(0,d.useState)(""),[U,W]=(0,d.useState)(""),[M,$]=(0,d.useState)(!1),A="".concat(L,"/reftrack/payment/success?token=").concat(e.token,"&txnId=").concat(n,"&amount=").concat(l),B="".concat(L,"/reftrack/payment/failure?token=").concat(e.token),H=e=>{let t=e.target.name,r=e.target.value;"firstname"===t&&m(r),"lastname"===t&&h(r),"email"===t&&g(r),"phone"===t&&N(r)};return(0,d.useEffect)(()=>(n&&""!==n&&null!==n||(()=>{let e=v(),t="txn-".concat(e);i(t)})(),()=>{}),[n]),(0,d.useEffect)(()=>{let r=async()=>{if(!e.token)return;let r={"Content-Type":"application/json",Authorization:"Bearer ".concat(e.token)};$(!0),Z.Z.post("".concat(L,"/reftrack/payment/hash"),{productinfo:D,firstname:c,amount:l,email:x,txnId:n},{headers:r}).then(e=>{$(!1),200===e.status?(R(e.data.hash),a(e.data.key)):t(e.data.message,{variant:"error"})}).catch(e=>{$(!1),t(e,{variant:"error"})})};n&&""!==n&&l&&""!==l&&parseInt(l)>0&&c&&""!==c&&x&&""!==x&&D&&""!==D&&f&&""!==f&&10===f.length&&r()},[l,x,c,f,D,n,e.token,t]),(0,s.jsx)(u.Z,{sx:{p:"2rem 1rem",minHeight:"80vh",alignItems:"center",justifyContent:"center"},children:(0,s.jsxs)(b.Z,{action:"https://secure.payu.in/_payment",method:"post",encType:"multipart/form-data",children:[(0,s.jsx)("input",{hidden:!0,name:"key",value:r}),(0,s.jsx)("input",{hidden:!0,name:"txnid",value:n}),(0,s.jsx)("input",{hidden:!0,name:"productinfo",value:D}),(0,s.jsx)("input",{hidden:!0,name:"surl",value:A}),(0,s.jsx)("input",{hidden:!0,name:"furl",value:B}),(0,s.jsx)("input",{hidden:!0,name:"hash",value:F}),(0,s.jsxs)(P.Z,{sx:{gridTemplateColumns:"1fr",gap:"0.25rem"},children:[(0,s.jsx)("small",{style:{marginLeft:"0.25rem",fontWeight:"500"},children:"Credit Pack"}),(0,s.jsx)(C.Z,{children:(0,s.jsx)("select",{name:"amount",value:l,onCh
28ange:e=>{o(e.target.value);let t=I.find(t=>t.price===e.target.value);E(t.title),O(t.credits)},children:I.map((e,t)=>(0,s.jsx)("option",{value:e.price,children:e.title},"price-".concat(t)))})})]}),(0,s.jsxs)(P.Z,{sx:{gridTemplateColumns:"1fr",gap:"0.25rem",mt:"1rem"},children:[(0,s.jsx)("small",{style:{marginLeft:"0.25rem",fontWeight:"500"},children:"First Name"}),(0,s.jsx)(C.Z,{children:(0,s.jsx)("input",{type:"text",placeholder:"First Name",name:"firstname",value:c,onChange:H})})]}),(0,s.jsxs)(P.Z,{sx:{gridTemplateColumns:"1fr",gap:"0.25rem",mt:"1rem"},children:[(0,s.jsx)("small",{style:{marginLeft:"0.25rem",fontWeight:"500"},children:"Last Name"}),(0,s.jsx)(C.Z,{children:(0,s.jsx)("input",{type:"text",placeholder:"Last Name",name:"lastname",value:p,onChange:H})})]}),(0,s.jsxs)(P.Z,{sx:{gridTemplateColumns:"1fr",gap:"0.25rem",mt:"1rem"},children:[(0,s.jsx)("small",{style:{marginLeft:"0.25rem",fontWeight:"500"},children:"Email"}),(0,s.jsx)(C.Z,{children:(0,s.jsx)("input",{type:"email",placeholder:"Email",name:"email",value:x,onChange:H})})]}),(0,s.jsxs)(P.Z,{sx:{gridTemplateColumns:"1fr",gap:"0.25rem",mt:"1rem"},children:[(0,s.jsx)("small",{style:{marginLeft:"0.25rem",fontWeight:"500"},children:"Phone"}),(0,s.jsx)(C.Z,{children:(0,s.jsx)("input",{type:"number",placeholder:"Phone Number (10 digits)",name:"phone",value:f,maxLength:10,onChange:H})})]}),(0,s.jsxs)(P.Z,{sx:{gridTemplateColumns:"1fr",gap:"0.25rem",mt:"1rem"},children:[(0,s.jsx)("small",{style:{marginLeft:"0.25rem",fontWeight:"500"},children:"Payment Options"}),(0,s.jsx)(C.Z,{children:(0,s.jsx)("select",{name:"pg",required:!0,value:U,onChange:e=>{W(e.target.value)},children:T.map((e,t)=>(0,s.jsx)("option",{value:e.value,children:e.title},"item-".concat(t)))})})]}),(0,s.jsxs)(S.Z,{sx:{mt:"1.5rem",width:"100%",borderTop:"1px solid var(--primaryColor30)",borderBottom:"1px solid var(--primaryColor30)",p:"1rem 0.25rem",transition:"all 0.4s ease",animation:"drop-in 500ms ease 300ms backwards",display:l?"flex":"none",visibility:l?"visible":"hidden",opacity:l?"1":"0"},children:[D?(0,s.jsxs)(w.Z,{sx:{alignItems:"center",justifyContent:"space-between",transition:"all 0.4s ease",animation:"drop-in 500ms ease 300ms backwards"},children:[(0,s.jsx)("p",{style:{color:"var(--textColorLight)"},children:"Pack:"}),(0,s.jsx)("p",{children:D})]}):null,l?(0,s.jsxs)(w.Z,{sx:{alignItems:"center",justifyContent:"space-between",mt:"0.5rem",transition:"all 0.4s ease",animation:"drop-in 500ms ease 300ms backwards"},children:[(0,s.jsx)("p",{style:{color:"var(--textColorLight)"},children:"Credits:"}),(0,s.jsx)("p",{children:_})]}):null,(0,s.jsxs)(w.Z,{sx:{alignItems:"center",justifyContent:"space-between",mt:"0.5rem",transition:"all 0.4s ease",animation:"drop-in 500ms ease 300ms backwards"},children:[(0,s.jsx)("p",{style:{color:"var(--textColorLight)"},children:"Price:"}),(0,s.jsxs)("p",{children:["â¹",Number(l).toLocaleString("en-IN")]})]})]}),M?(0,s.jsx)(k.Z,{sx:{display:"block",margin:"0 auto",marginTop:"2rem",color:"var(--primaryColor)"}}):(0,s.jsx)("input",{type:"submit",value:"Proceed To Pay",disabled:!F,style:{opacity:F?1:.5,cursor:F?"pointer":"default",margin:"0 auto",marginTop:"2rem"},className:"app__filled_btn"})]})})},_=(0,l.Z)(()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i(),{children:(0,s.jsx)("title",{children:"Payment - OfferVault"})}),(0,s.jsx)(o.Z,{children:(0,s.jsxs)(c.Z,{children:[(0,s.jsx)(u.Z,{sx:{p:"1rem",pt:{lg:"2rem"},pb:"0"},children:(0,s.jsx)(m.Z,{title:"Payment",sx:{mb:"0"}})}),(0,s.jsx)(N,{})]})})]}))}},function(e){e.O(0,[153,774,888,179],function(){return e(e.s=9045)}),_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.