PageSourceSearch

https://web.pgmanager.in/static/js/6773.6d8bfb14.chunk.js

js pgmanager.in collected 2026-09-24 15:03:43 UTC 21,584 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkpg_manager=self.webpackChunkpg_manager||[]).push([[6773],{66773:(e,n,t)=>{t.r(n),t.d(n,{default:()=>Ae});var r=t(61889),s=t(20883),l=t(72791),o=t(47047),i=t(57621),a=t(89891),d=t(81918),c=t(94721),u=t(68870),x=t(50533),h=t(13400),g=t(97639),f=t(41286),p=t(36314),j=t(20890),m=t(93044),Z=t(5519),C=t(80007),b=t(15626),v=t(62240),k=t(11087),w=t(62014),y=t(80184);const S=()=>{s.k.info("ProfileCard mounting...");const[e,n]=(0,l.useState)(null),[t,r]=(0,l.useState)(!1),S=(0,l.useCallback)((e=>{s.k.debug("ProfileCard getProfileData..."),r(!0),(0,b.j3)({signal:e.signal,backgroundRequest:!0}).then((e=>{let{response:t={},error:s}=e;"canceled"!==(null===s||void 0===s?void 0:s.message)&&(r(!1),n({...(null===t||void 0===t?void 0:t.userDetails)||{},mobile:null===t||void 0===t?void 0:t.mobile,active:null===t||void 0===t?void 0:t.active}))}))}),[]);return(0,l.useEffect)((()=>{s.k.debug("ProfileCard Mounted");const e=new AbortController;return S(e),()=>{s.k.debug("ProfileCard Unmounted"),e.abort()}}),[S]),e?(0,y.jsxs)(i.Z,{children:[(0,y.jsxs)(u.Z,{sx:{p:2,display:"flex",alignItems:"center"},columnGap:1,children:[(0,y.jsx)(m.Z,{variant:"rounded",src:null,
1sx:{width:50,height:50}}),(0,y.jsxs)(p.Z,{columnGap:2,width:"100%",direction:"column",children:[(0,y.jsxs)(j.Z,{fontWeight:700,children:[e.firstName," ",e.lastName]}),(0,y.jsxs)(j.Z,{variant:"body2",color:"secondary",children:[(0,y.jsx)(v.Z,{sx:{color:Z.Z[500],verticalAlign:"middle",fontSize:"1rem"}})," ",e.mobile]})]}),(0,y.jsx)(x.Z,{component:k.rU,to:w.Z6.PROFILE,children:(0,y.jsx)(h.Z,{sx:{border:`1px solid ${Z.Z[200]}`},children:(0,y.jsx)(g.Z,{title:"Update profile",placement:"top",children:(0,y.jsx)(f.Z,{sx:{fontSize:18}})})})})]}),(0,y.jsx)(c.Z,{}),(0,y.jsxs)(p.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{px:2,py:1},children:[(0,y.jsx)(d.Z,{label:null!==e&&void 0!==e&&e.active?"Account active":"Inactive account",sx:{color:C.Z[900],backgroundColor:e.active?C.Z[100]:Z.Z[500]}}),(0,y.jsx)(a.Z,{checked:(null===e||void 0===e?void 0:e.active)||!1,disabled:!0})]})]}):t?(0,y.jsxs)(i.Z,{children:[(0,y.jsxs)(u.Z,{sx:{p:2,display:"flex",alignItems:"center"},columnGap:1,children:[(0,y.jsx)(o.Z,{variant:"rounded",width:70,height:50}),(0,y.jsxs)(p.Z,{columnGap:2,width:"100%",direction:"column",children:[(0,y.jsx)(o.Z,{variant:"text",width:150}),(0,y.jsx)(o.Z,{variant:"text",width:100})]}),(0,y.jsx)(o.Z,{variant:"circular",width:50,height:35})]}),(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(c.Z,{}),(0,y.jsxs)(p.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{px:2,py:1},children:[(0,y.jsx)(o.Z,{variant:"rounded",width:100,height:20}),(0,y.jsx)(o.Z,{variant:"text",width:30,height:15})]})]})]}):null};var R=t(95193),W=t(24518),P=t(61486),A=t(82165),I=t(6895);var M=t(64416),T=t(76450),B=t(4378),G=t(3928),z=t(48550),E=t(63466),D=t(73745),K=t(52739),F=t(57482),Y=t(35552),q=t(71198),N=t(62129);const U=[100,200,500,1e3],O=e=>{let{refreshWallet:n}=e;s.k.info("[AddMoney] mounting...");const[t,o]=(0,l.useState)(!1),[i,a]=(0,l.useState)(null),{enqueueSnackbar:c}=(0,Y.Ds)(),[u,x]=(0,l.useState)(500),{data:{email:h,mobile:g,name:f}={}}=(0,l.useContext)(q.Vo);function j(e){s.k.debug("[BuySMSCredits] payment gateway success handler called"),Z(e),"function"===typeof n&&setTimeout(n,1e3)}function m(e){s.k.debug("[BuySMSCredits] payment gateway  failure handler called"),Z(e)}function Z(e){a({...e})}const C=(0,l.useCallback)((()=>{a(null)}),[]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(K.Z,{sx:{position:"absolute",zIndex:1},open:t,children:(0,y.jsx)(F.Z,{color:"primary",sx:{position:"absolute",width:"100%",top:0,left:0}})}),(0,y.jsx)(r.ZP,{container:!0,alignItems:"center",rowSpacing:2,children:i?(0,y.jsx)(r.ZP,{item:!0,xs:12,children:(0,y.jsx)(N.Z,{txnData:i,reset:C})}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(r.ZP,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12,children:(0,y.jsx)(z.Z,{value:u,margin:"normal",type:"number",onWheel:e=>e.target.blur(),label:"Amount",onChange:e=>x(e.target.value),fullWidth:!0,InputProps:{startAdornment:(0,y.jsx)(E.Z,{position:"start",children:(0,y.jsx)(D.Z,{})})}})}),(0,y.jsx)(r.ZP,{children:(0,y.jsx)(p.Z,{direction:"row",gap:1,mt:1,children:U.map((e=>(0,y.jsx)(d.Z,{sx:{borderRadius:2,fontSize:16},color:"primary",label:(0,T.xG)(e).replace(".00",""),onClick:()=>x(e),variant:e===u?"contained":"outlined"},e)))})}),(0,y.jsx)(r.ZP,{mt:2,item:!0,xs:12,sm:12,md:12,lg:12,xl:12,textAlign:"center",children:(0,y.jsxs)(W.Z,{onClick:function(){s.k.debug("[AddMoney]:{onProceedBtnClick} fetch gateway details..."),a(null),o(!0),async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return I.R.GET({url:"/ep/wallet/payment",params:e},n)}({amount:u},{backgroundRequest:!0}).then((e=>{let{response:n,error:t}=e;if(t)return o(!1),c(null===t||void 0===t?void 0:t.message,{variant:"error"});setTimeout((()=>o(!1)),6e3),n&&(0,T.z8)({...n,email:h,mobile:g,name:f},j,m)}))},disabled:!u,variant:"contained",children:["Proceed to add ",(0,T.xG)(u)]})})]})})]})},V=(0,l.memo)(O);var L=t(39504),X=t(61617),_=t(91027),$=t(82460);const H=e=>{let{pageRef:n}=e;s.k.debug("[WalletTransactions] mounting");const[t,o]=(0,l.useState)(null),i=(0,l.useCallback)((()=>{s.k.debug("[WalletCard]:{getWalletInfo} fetching data");const e=new AbortController;return async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return I.R.GET({url:"/ep/wallet/transactions"},e)}({signal:e.signal,pageRef:n}).then((e=>{let{response:n,error:t}=e;"canceled"!==(null===t||void 0===t?void 0:t.message)&&(t&&o({}),o(n))})),e}),[n]);return(0,l.useEffect)((()=>{s.k.debug("[WalletTransactions] mounted");const e=i();return()=>{null===e||void 0===e||e.abort(),s.k.debug("[WalletCard] unmounted")}}),[i]),t?0===(null===t||void 0===t?void 0:t.lenght)?(0,y.jsx)(Q,{}):(0,y.jsx)(r.ZP,{container:!0,spacing:2,children:t.map((e=>(0,y.jsx)(ee,{data:e},e.id)))}):null},J=(0,l.memo)(H);function Q(){return(0,y.jsxs)(r.ZP,{container:!0,justifyContent:"center",alignItems:"center",sx:{p:5},direction:"column",children:[(0,y.jsx)(D.Z,{sx:{color:$.Z[50],fontSize:80,mb:1}}),(0,y.jsx)(j.Z,{variant:"h5",color:"grey",children:"No data available"})]})}function ee(e){let{data:n}=e;const{openingBalance:t,amount:s,type:l,closingBalance:o,description:a,createdOn:d}=n,c="CREDIT"===l;return(0,y.jsx)(r.ZP,{item:!0,xs:12,children:(0,y.jsx)(i.Z,{sx:{backgroundColor:c?C.Z[50]:$.Z[50],borderRadius:2}
1,elevation:0,children:(0,y.jsxs)(L.Z,{sx:{pb:"12px !important",p:1.5},children:[(0,y.jsxs)(p.Z,{gap:1,direction:"row",justifyContent:"space-between",flexGrow:1,flexWrap:"wrap",alignItems:"center",children:[(0,y.jsx)(p.Z,{p:.5,sx:{backgroundColor:c?C.Z[400]:$.Z[400],borderRadius:2},children:c?(0,y.jsx)(_.Z,{sx:{color:"#fff",fontSize:"2rem"}}):(0,y.jsx)(X.Z,{sx:{color:"#fff",fontSize:"2rem"}})}),(0,y.jsxs)(p.Z,{gap:1,direction:"row",justifyContent:"space-between",flexGrow:1,flexWrap:"wrap",alignItems:"center",children:[(0,y.jsxs)(p.Z,{children:[(0,y.jsx)(j.Z,{variant:"subtitle2",children:a}),(0,y.jsxs)(j.Z,{variant:"caption",color:C.Z[600],children:["Opening balance: ",(0,y.jsx)("strong",{children:(0,T.xG)(t)})]})]}),(0,y.jsxs)(u.Z,{textAlign:"right",children:[(0,y.jsx)(j.Z,{variant:"caption",color:Z.Z[700],children:c?"Credited":"Debited"}),(0,y.jsx)(j.Z,{variant:"h6",fontWeight:900,color:c?C.Z[900]:$.Z[900],children:(0,T.xG)(s)})]})]})]}),(0,y.jsxs)(p.Z,{gap:1,direction:"row",justifyContent:"space-between",flexGrow:1,flexWrap:"wrap",alignItems:"flex-end",mt:1,children:[(0,y.jsx)(j.Z,{variant:"caption",color:Z.Z[500],children:d}),(0,y.jsx)(u.Z,{children:(0,y.jsxs)(j.Z,{variant:"caption",color:$.Z[400],children:["Closing balance: ",(0,y.jsx)("strong",{children:(0,T.xG)(o)})]})})]})]})})})}var ne=t(78148);const te=e=>{let{pageRef:n}=e;const[t,r]=(0,l.useState)(null),[o,a]=(0,l.useState)(!1),d=(0,l.useCallback)((()=>{s.k.debug("[WalletCard]:{getWalletInfo} fetching data");const e=new AbortController;return async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return I.R.GET({url:"/ep/wallet"},e)}({signal:e.signal,backgroundRequest:!0}).then((e=>{let{response:n,error:t}=e;"canceled"!==(null===t||void 0===t?void 0:t.message)&&(t&&r({}),r(n))})),e}),[]);(0,l.useEffect)((()=>{s.k.debug("[WalletCard] mounted");const e=d();return()=>{null===e||void 0===e||e.abort(),s.k.debug("[WalletCard] unmounted")}}),[d]);const c=(0,l.useCallback)((()=>{a(!1)}),[]),x=(0,l.useCallback)((()=>{d()}),[d]),{walletCreated:h,walletBalance:g}=t||{};return(0,y.jsx)(i.Z,{elevation:0,sx:{borderRadius:4,borderWidth:1,borderColor:B.Z[100],backgroundColor:B.Z[50]},variant:"outlined",children:t?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(p.Z,{p:2,backgroundColor:"#fdfdfd",borderRadius:4,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(j.Z,{fontWeight:500,fontSize:12,variant:"body2",color:B.Z[400],children:"PG Manager Wallet"}),h?(0,y.jsx)(j.Z,{variant:"h5",fontWeight:800,children:(0,T.xG)(g)}):(0,y.jsx)(le,{refreshWallet:x,pageRef:n})]}),(0,y.jsx)(A.Z,{color:"primary",fontSize:"large",sx:{fontSize:"3rem"}})]}),h?(0,y.jsxs)(p.Z,{p:1,direction:"row",justifyContent:"space-between",children:[(0,y.jsx)(W.Z,{onClick:()=>a(!0),color:"primary",startIcon:(0,y.jsx)(P.Z,{}),children:"Topup"}),(0,y.jsx)(se,{})]}):null,(0,y.jsx)(G.Z,{isFullScreen:!1,maxWidth:"xs",onModalClose:c,open:o,title:"Add Money to Wallet",handleClose:c,disableDialogActions:!0,showCloseIcon:!0,disableEscapeKeyDown:!0,preventBackdropClickClose:!0,children:(0,y.jsx)(V,{closeModal:c,refreshWallet:x})})]}):(0,y.jsx)(u.Z,{p:2,children:(0,y.jsx)(M.C,{rows:4})})})},re=(0,l.memo)(te);function se(){const[e,n]=(0,l.useState)(!1),t=(0,R.Z)((e=>e.breakpoints.up("sm"))),r=(0,l.useCallback)((()=>{n(!1)}),[]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(W.Z,{color:"secondary",sx:{opacity:.75},onClick:()=>n(!0),children:"Transactions"}),(0,y.jsx)(G.Z,{isFullScreen:!t,maxWidth:"xs",onModalClose:r,open:e,title:"Wallet Transactions",handleClose:r,disableDialogActions:!0,showCloseIcon:!!t,children:(0,y.jsx)(ne.Z,{children:(0,y.jsx)(J,{closeModal:r})})})]})}function le(e){let{refreshWallet:n,pageRef:t}=e;const r=(0,Y.Ds)();return(0,y.jsxs)(p.Z,{mt:1,children:[(0,y.jsx)(j.Z,{fontWeight:500,variant:"subtitle2",children:"Would like to activate?"}),(0,y.jsx)(W.Z,{variant:"tonal",onClick:function(){(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return I.R.POST({url:"/ep/wallet"},e)})({pageRef:t}).then((e=>{let{error:t}=e;if("canceled"!==(null===t||void 0===t?void 0:t.message))return t?r(null===t||void 0===t?void 0:t.message,{variant:"error"}):void n()}))},children:"Activate"})]})}var oe=t(8301),ie=t(50427),ae=t(10390),de=t(98400);const ce=e=>{let{isPurchaseCredtsAllowed:n}=e;const[t,r]=(0,l.useState)(null),[o,a]=(0,l.useState)(!1),d=(0,l.useCallback)((()=>{s.k.debug("[SMSCreditsCard]:{getInfo} fetching data");const e=new AbortController;return(0,ae.yu)({signal:e.signal,backgroundRequest:!0}).then((e=>{let{response:n,error:t}=e;"canceled"!==(null===t||void 0===t?void 0:t.message)&&(t&&r({}),r(n))})),e}),[]);(0,l.useEffect)((()=>{s.k.debug("[SMSCreditsCard] mounted");const e=d();return()=>{null===e||void 0===e||e.abort(),s.k.debug("[SMSCreditsCard] unmounted")}}),[d]);const c=(0,l.useCallback)((()=>{a(!1)}),[]),x=(0,l.useCallback)((()=>{d()}),[d]),{credits:h}=t||{};return(0,y.jsx)(i.Z,{elevation:0,sx:{borderRadius:4,borderWidth:1,borderColor:ie.Z[100],backgroundColor:ie.Z[50]},variant:"outlined",children:t?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(p.Z,{p:2,backgroundColor:"#fdfdfd",borderRadius:4,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(j.Z,{fontWeight:500,fontSize:12,variant:"body2",color:ie.Z[600],children:"SMS Credits"}),(0,y.jsx)(j.Z,{variant:"h5",fontWeight:800,children:h})]}),(0,y.jsx)(oe.Z,{color:"info",fontSize:"large",sx:{fontSize:"3rem"}})]}),(0,y.jsxs)(p.Z,{p:1,direction:"row",justifyContent:"space-between",children:[n?(0,y.jsx)(W.Z,{onClick:()=>a(!0),color:"info",startIcon:(0,y.jsx)(P.Z,{}),children:"Buy Credits"}
1):null,(0,y.jsx)(de.Z,{openModal:o,onModalClose:c,refreshCredits:x})]})]}):(0,y.jsx)(u.Z,{p:2,children:(0,y.jsx)(M.C,{rows:4})})})},ue=(0,l.memo)(ce);var xe=t(6409),he=t(56138),ge=t(52036);const fe=e=>{let{isPurchaseCredtsAllowed:n}=e;const[t,r]=(0,l.useState)(null),[o,a]=(0,l.useState)(!1),d=(0,l.useCallback)((()=>{s.k.debug("[WhatsAppCreditsCard]:{getInfo} fetching data");const e=new AbortController;return(0,ge.hy)({signal:e.signal,backgroundRequest:!0}).then((e=>{let{response:n,error:t}=e;"canceled"!==(null===t||void 0===t?void 0:t.message)&&(t&&r({}),r(n))})),e}),[]);(0,l.useEffect)((()=>{s.k.debug("[WhatsAppCreditsCard] mounted");const e=d();return()=>{null===e||void 0===e||e.abort(),s.k.debug("[WhatsAppCreditsCard] unmounted")}}),[d]);const c=(0,l.useCallback)((()=>{a(!1)}),[]),x=(0,l.useCallback)((()=>{d()}),[d]),{credits:h}=t||{};return(0,y.jsx)(i.Z,{elevation:0,sx:{borderRadius:4,borderWidth:1,borderColor:C.Z[100],backgroundColor:C.Z[50]},variant:"outlined",children:t?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(p.Z,{p:2,backgroundColor:"#fdfdfd",borderRadius:4,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(j.Z,{fontWeight:500,fontSize:12,variant:"body2",color:C.Z[600],children:"WhatsApp Credits"}),(0,y.jsx)(j.Z,{variant:"h5",fontWeight:800,children:h})]}),(0,y.jsx)(xe.Z,{color:"success",fontSize:"large",sx:{fontSize:"3rem"}})]}),(0,y.jsxs)(p.Z,{p:1,direction:"row",justifyContent:"space-between",children:[n?(0,y.jsx)(W.Z,{onClick:()=>a(!0),color:"success",startIcon:(0,y.jsx)(P.Z,{}),children:"Buy Credits"}):null,(0,y.jsx)(he.Z,{openModal:o,onModalClose:c,refreshCredits:x})]})]}):(0,y.jsx)(u.Z,{p:2,children:(0,y.jsx)(M.C,{rows:4})})})},pe=(0,l.memo)(fe);var je=t(36655),me=t(4934),Ze=t(83631),Ce=t(65018),be=t(26450);async function ve(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return I.R.GET({url:"/ep/kyc/plans"},e)}function ke(e){let{pageRef:n,paymentMode:t,refreshCredits:o}=e;s.k.info("[BuyKYCCredits] mounting...");const[a,c]=(0,l.useState)(null),{updateAppContext:x}=(0,l.useContext)(q.Il),{data:{email:h,mobile:g,name:f}={}}=(0,l.useContext)(q.Vo),[m,C]=(0,l.useState)(null),{enqueueSnackbar:b}=(0,Y.Ds)(),v=(0,l.useCallback)((()=>{s.k.debug("[BuyKYCCredits]:{getPlans} fetch plans..."),c(null),C(null);const e=new AbortController;return ve({signal:e.signal,pageRef:n}).then((e=>{let{response:n={},error:t}=e;if("canceled"!==(null===t||void 0===t?void 0:t.message))return t?b(null===t||void 0===t?void 0:t.message,{variant:"error"}):void C(n)})),e}),[b,n]),k=(0,l.useCallback)((()=>{c(null)}),[]);function w(e,n){s.k.debug("[BuyKYCCredits]:{onBuyBtnClick} fetch gateway details..."),async function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return I.R.GET({url:`/ep/kyc/${e}/purchase`,params:n},t)}(e,{source:"web",medium:t}).then((e=>{let{response:r,error:s}=e;if(s)return b(null===s||void 0===s?void 0:s.message,{variant:"error"});if(r)if("wallet"===t){c({STATUS:"TXN_SUCCESS",ORDERID:"Paid from PG Manager wallet",TXNID:"Not applicable",TXNAMOUNT:n}),o()}else(0,T.z8)({...r,email:h,mobile:g,name:f},S,R)}))}function S(e){s.k.debug("[BuyKYCCredits] payment gateway success handler called"),P(e),"function"===typeof o&&o()}function R(e){s.k.debug("[BuyKYCCredits] payment gateway  failure handler called"),P(e)}function P(e){c({...e})}(0,l.useEffect)((()=>{s.k.debug("[BuyKYCCredits] mounted"),k();const e=v();return()=>{e.abort(),s.k.debug("[BuyKYCCredits] unmounted")}}),[v,k,x]);const{credits:A,plans:M=[]}=m||{};return m?(0,y.jsxs)(r.ZP,{container:!0,justifyContent:{xs:"center",md:"center"},spacing:4,p:1,children:[!a&&m?(0,y.jsxs)(r.ZP,{container:!0,item:!0,xs:12,spacing:1,justifyContent:{xs:"center",md:"left"},children:[(0,y.jsxs)(r.ZP,{item:!0,xs:12,children:[(0,y.jsx)(d.Z,{label:(0,y.jsxs)(j.Z,{fontSize:14,children:["Remaining Credits: ",(0,y.jsx)("b",{children:A})]}),variant:"outlined",color:"info"}),(0,y.jsx)(j.Z,{variant:"subtitle1",mt:2,textAlign:"center",fontWeight:700,color:Z.Z[700],gutterBottom:!0,children:"Choose a plan that suits your needs."})]}),(0,y.jsxs)(r.ZP,{container:!0,item:!0,xs:12,spacing:2,justifyContent:{xs:"center",md:"left"},children:[M.map((e=>{let{name:n,id:t,credits:s,amount:l}=e;return(0,y.jsxs)(r.ZP,{item:!0,xs:12,children:[(0,y.jsx)(d.Z,{label:n,size:"small",sx:{ml:1,borderBottomLeftRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:3,borderTopRightRadius:3,backgroundColor:"Solo"===n?Ce.Z[400]:Ce.Z[100],fontWeight:800,mb:"-4px"}}),(0,y.jsx)(i.Z,{sx:{borderRadius:2,backgroundColor:"Solo"===n?be.Z[50]:me.Z[50]}
1,elevation:0,children:(0,y.jsxs)(p.Z,{direction:"row",spacing:1,flexGrow:1,justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",children:[(0,y.jsx)(u.Z,{p:1,backgroundColor:"Solo"===n?be.Z[700]:me.Z[800],minWidth:120,children:(0,y.jsxs)(j.Z,{textAlign:"center",my:1,variant:"h6",color:"#fff",children:[(0,T.xG)(l).replace(".00",""),(0,y.jsx)("sup",{style:{color:$.Z[100]},children:"*"})]})}),(0,y.jsxs)(p.Z,{p:1,justifyContent:"center",children:[(0,y.jsxs)(j.Z,{fontWeight:600,fontSize:16,variant:"subtitle2",children:[s," ",(0,y.jsx)("small",{style:{color:Z.Z[700]},children:"KYC requests"})]}),(0,y.jsxs)(j.Z,{variant:"caption",color:"Solo"===n?be.Z[700]:me.Z[500],children:[(0,T.xG)(Math.round(parseFloat(l)/parseFloat(s)).toFixed(2)),"/request "]})]}),(0,y.jsx)(u.Z,{p:1,textAlign:"center",children:(0,y.jsx)(W.Z,{onClick:()=>w(t,l),color:"Solo"===n?"success":"tertiary",children:"Buy"})})]})})]},t)})),(0,y.jsxs)(j.Z,{p:1,variant:"caption",mt:1,display:"block",color:$.Z[700],children:[(0,y.jsx)("sup",{children:"*"}),"GST is applicable"]})]})]}):null,a?(0,y.jsx)(r.ZP,{item:!0,xs:12,children:(0,y.jsx)(N.Z,{txnData:a,reset:k})}):null]}):null}function we(e){let{openModal:n,onModalClose:t,refreshCredits:r}=e;const s=(0,R.Z)((e=>e.breakpoints.up("sm")));return(0,y.jsx)(G.Z,{isFullScreen:!s,maxWidth:"xs",onModalClose:t,open:n,title:"Buy KYC Credits",handleClose:t,disableDialogActions:!0,showCloseIcon:!!s,disableEscapeKeyDown:!0,preventBackdropClickClose:!0,children:(0,y.jsx)(Ze.Z,{children:(0,y.jsx)(ne.Z,{children:(0,y.jsx)(ke,{closeModal:t,refreshCredits:r})})})})}const ye=(0,l.memo)(we),Se=e=>{let{isPurchaseCredtsAllowed:n}=e;const[t,r]=(0,l.useState)(null),[o,a]=(0,l.useState)(!1),d=(0,l.useCallback)((()=>{s.k.debug("[KycCreditsCard]:{getInfo} fetching data");const e=new AbortController;return ve({signal:e.signal,backgroundRequest:!0}).then((e=>{let{response:n,error:t}=e;"canceled"!==(null===t||void 0===t?void 0:t.message)&&(t&&r({}),r(n))})),e}),[]);(0,l.useEffect)((()=>{s.k.debug("[KycCreditsCard] mounted");const e=d();return()=>{null===e||void 0===e||e.abort(),s.k.debug("[KycCreditsCard] unmounted")}}),[d]);const c=(0,l.useCallback)((()=>{a(!1)}),[]),x=(0,l.useCallback)((()=>{d()}),[d]),{credits:h}=t||{};return(0,y.jsx)(i.Z,{elevation:0,sx:{borderRadius:4,borderWidth:1,borderColor:me.Z[100],backgroundColor:me.Z[50]},variant:"outlined",children:t?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(p.Z,{p:2,backgroundColor:"#fdfdfd",borderRadius:4,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,y.jsxs)(u.Z,{children:[(0,y.jsx)(j.Z,{fontWeight:500,fontSize:12,variant:"body2",color:me.Z[600],children:"KYC Credits"}),(0,y.jsx)(j.Z,{variant:"h5",fontWeight:800,children:h})]}),(0,y.jsx)(je.Z,{fontSize:"large",sx:{color:me.Z[700],fontSize:"3rem"}})]}),(0,y.jsxs)(p.Z,{p:1,direction:"row",justifyContent:"space-between",children:[n?(0,y.jsx)(W.Z,{onClick:()=>a(!0),sx:{color:me.Z[500],":hover,:focus":{backgroundColor:me.Z[100]}},startIcon:(0,y.jsx)(P.Z,{}),children:"Buy Credits"}):null,(0,y.jsx)(ye,{openModal:o,onModalClose:c,refreshCredits:x})]})]}):(0,y.jsx)(u.Z,{p:2,children:(0,y.jsx)(M.C,{rows:4})})})},Re=(0,l.memo)(Se),We=e=>{let{pageRef:n}=e;const{permissionStates:t={}}=(0,l.useContext)(q.Il),{data:{isOwner:s}={}}=(0,l.useContext)(q.Vo),{isViewWhatsAppCreditsAllowed:o,isViewSMSCreditsAllowed:i,isViewKYCCreditsAllowed:a,isPurchaseWhatsAppCreditsAllowed:d,isPurchaseKYCCreditsAllowed:c,isPurchaseSMSCreditsAllowed:u}=t;return(0,y.jsxs)(y.Fragment,{children:[s?(0,y.jsx)(r.ZP,{item:!0,xs:10,sm:6,md:6,lg:4,xl:3,children:(0,y.jsx)(re,{pageRef:n})}):null,i?(0,y.jsx)(r.ZP,{item:!0,xs:10,sm:6,md:6,lg:4,xl:3,children:(0,y.jsx)(ue,{isPurchaseCredtsAllowed:u})}):null,o?(0,y.jsx)(r.ZP,{item:!0,xs:10,sm:6,md:6,lg:4,xl:3,children:(0,y.jsx)(pe,{isPurchaseCredtsAllowed:d})}):null,a?(0,y.jsx)(r.ZP,{item:!0,xs:10,sm:6,md:6,lg:4,xl:3,children:(0,y.jsx)(Re,{isPurchaseCredtsAllowed:c})}):null]})},Pe=(0,l.memo)(We),Ae=e=>{let{pageRef:n}=e;return s.k.info("MyAccount mounting..."),(0,y.jsxs)(r.ZP,{container:!0,justifyContent:{xs:"center",sm:"flex-start"},direction:"row",spacing:2,children:[(0,y.jsx)(r.ZP,{item:!0,xs:10,sm:6,md:6,lg:4,xl:3,children:(0,y.jsx)(S,{})}),(0,y.jsx)(Pe,{pageRef:n})]})}},15626:(e,n,t)=>{t.d(n,{Cp:()=>s,VD:()=>i,ck:()=>o,j3:()=>l});var r=t(6895);async function s(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.R.PUT({url:"/user/changePassword",params:e},n)}async function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.R.GET({url:"/user"},e)}async function o(e,n){return r.R.PUT({url:"/user",body:e},n)}async function i(){return r.R.DELETE({url:"/user"})}}}]);
2//# sourceMappingURL=6773.6d8bfb14.chunk.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.