(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1128],{141:e=>{e.exports=function(e,t){return e>t}},7512:(e,t,n)=>{"use strict";n.d(t,{A:()=>eb});var i=n(37876),r=n(26875),o=n(14232),l=n(33884),c=n(35972),a=n(4166);let s={src:"/_next/static/media/secure-payment.24624943.webp",height:128,width:286,blurDataURL:"data:image/webp;base64,UklGRj4AAABXRUJQVlA4IDIAAADQAQCdASoIAAQAAkA4JZwCdAEf/83+BAD++UBfok++SakxlrvuYPjf1VIWyZEB45TAAA==",blurWidth:8,blurHeight:4},d={src:"/_next/static/media/secure-ssl-payment.ec254ed3.webp",height:128,width:345,blurDataURL:"data:image/webp;base64,UklGRmoAAABXRUJQVlA4WAoAAAAQAAAABwAAAgAAQUxQSBkAAAAAHTwAAAAAAACQyW90YXB7YX2/Uk5QUElLAFZQOCAqAAAAkAEAnQEqCAADAAJAOCWkAALnUAwQAP6F4aTev58SmEXSlH9P+gT/AAAA",blurWidth:8,blurHeight:3};var p=n(12039);let A={src:"/_next/static/media/info.ee0dbd1b.webp",height:64,width:64,blurDataURL:"data:image/webp;base64,UklGRp4AAABXRUJQVlA4WAoAAAAQAAAABwAABwAAQUxQSEEAAAAAACmgoaGiKQAppw8AAA+nKaIPAEhHAA+goQAALi4AAKGhAABQUAAAoaAPAEpKAA+iKacPAAAPpykAKaKhoaApAABWUDggNgAAANABAJ0BKggACAACQDglqAJ0ugEt/A9QAP7x/9/87UO1Y1R/8NBB/bR+Of8zgvlwa6LCeAAAAA==",blurWidth:8,blurHeight:8};var h=n(59319),x=n(14732),u=n(99397),g=n(87581),m=n(81332),f=n(28688),y=n(99308),w=n(47204),b=n(56047),v=n(21555),j=n(62920),I=n(29359),C=n(35402),S=n(64320),P=n(71278),k=n(70780),E=n(9097),N=n(5241),T=n(20624),Q=n.n(T),B=n(70670),U=n.n(B),D=n(52094),R=n(98684);let _=R.Ay.div.withConfig({componentId:"sc-baee8b42-0"})(["display:flex;width:360px;min-height:505px;flex-direction:column;align-items:center;flex-shrink:0;border-radius:12px;border:1px solid ",";background:rgba(0,0,0,0.05);backdrop-filter:blur(60px);max-width:100%;&.landscape{height:100%;width:100%;min-height:380px;border:none;align-self:baseline;border-radius:0px;}&.jpHomePage{border:none;}"],e=>{let{theme:t}=e;return t.colors.white10}),H=R.Ay.div.withConfig({componentId:"sc-baee8b42-1"})(["display:flex;padding:11px 12px 11px 20px;justify-content:space-between;align-items:center;align-self:stretch;background:",";color:",";border-radius:12px 12px 0px 0px;&.landscape{border-radius:0px;}&.jpHomePage{border:1px solid ",";}i{cursor:pointer;padding:4px;border-radius:6px;&:hover{background:",";}}"],e=>{let{theme:t}=e;return t.colors.white20},e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.white10},e=>{let{theme:t}=e;return t.colors.white10}),L=R.Ay.div.withConfig({componentId:"sc-baee8b42-2"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px 20px;width:100%;gap:20px;&.landscape{border-radius:0px;flex-direction:row;padding:24px;gap:40px;height:100%;}&.small{overflow:auto;}button{height:56px;width:100%;}"]),J=R.Ay.div.withConfig({componentId:"sc-baee8b42-3"})(["display:flex;flex-direction:row;align-items:center;gap:12px;width:100%;color:",";&.landscape{h3{font-size:20px;font-weight:600;line-height:150%;}}&.paymentTypes{flex-direction:column;text-align:center;}&.row{flex-direction:row;}.now-bux-img{width:32px;height:32px;}.now-prime-img{width:56px;height:56px;}"," &.purchase-now-bux.landscape{flex-direction:column;gap:0;}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{paymentInProgress:t}=e;return t?(0,R.AH)(["justify-content:center;div{flex:unset;}"]):(0,R.AH)(["div{flex:1;}"])}),W=R.Ay.div.withConfig({componentId:"sc-baee8b42-4"})(["display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;color:",";&.landscape{border-radius:24px;border:1px solid ",";padding:16px;}"],e=>{let{theme:t}=e;return t.colors.caution},e=>{let{theme:t}=e;return t.colors.white10}),O=R.Ay.div.withConfig({componentId:"sc-baee8b42-5"})(["display:flex;flex-direction:column;flex:1;"]),z=R.Ay.div.withConfig({componentId:"sc-baee8b42-6"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;flex:1 0 0;align-self:stretch;color:",";align-items:flex-start;margin-bottom:16px;"],e=>{let{theme:t}=e;return t.colors.white}),M=R.Ay.div.withConfig({componentId:"sc-baee8b42-7"})(["display:flex;padding:7px 12px;justify-content:space-between;align-items:center;align-self:stretch;border-radius:4px;border:1px solid ",";gap:8px;cursor:pointer;img{width:48px;height:28px;margin:4px 0px;}p{flex:1;}&.selected{border:1px solid ",";background:",";}"],e=>{let{theme:t}=e;return t.colors.white10},e=>{let{theme:t}=e;return t.colors.ascent},e=>{let{theme:t}=e;return t.colors.white10}),V=R.Ay.div.withConfig({componentId:"sc-baee8b42-8"})(["background:rgba(255,255,255,0.1);height:1px;width:100%;"]),X=R.Ay.div.withConfig({componentId:"sc-baee8b42-9"})(["display:flex;flex-direction:row;gap:6px;color:",";align-items:center;justify-content:center;width:100%;div{margin:0px;}"],e=>{let{theme:t}=e;return t.colors.white}),F=R.Ay.div.withConfig({componentId:"sc-baee8b42-10"})(["display:flex;flex-direction:column;align-items:center;gap:8px;color:",";&.landscape{max-width:320px;align-self:center;}h3{font-size:20px;font-weight:700;}p{color:",";text-align:center;}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.white70}),Y=R.Ay.div.withConfig({componentId:"sc-baee8b42-11"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;align-self:center;width:128px;height:128px;color:",";svg{position:absolute;top:0;left:0;width:128px;height:128px;transform:translate(12px,-17px) rotateZ(-90deg);overflow:visible;}&.landscape-modal{justify-content:flex-start;svg{width:95px;height:95px;}}"],e=>{let{theme:t}=e;return t.colors.white}),G=R.Ay.div.withConfig({componentId:"sc-baee8b42-12"})(["display:flex;flex-direction:column;align-items:center;gap:8px;color:",";margin-top:8px;"],e=>{let{theme:t}=e;return t.colors.white}),q=R.Ay.div.withConfig({componentId:"sc-baee8b42-13"})(["display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;row-gap:0px;a{text-decoration:none;}"]),K=(0,R.i7)(["0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}"]),Z=R.Ay.img.withConfig({componentId:"sc-baee8b42-14"})(["animation:"," 1s linear infinite;align-self:center;width:72px;height:72px;margin:24px 0px;"],K),$=R.Ay.div.withConfig({componentId:"sc-baee8b42-15"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:12px;align-self:stretch;color:",";align-items:flex-start;margin-bottom:24px;height:156px;overflow-y:scroll;padding-right:4px;&::-webkit-scrollbar{display:block;width:4px;}::-webkit-scrollbar-thumb{background:",";border-radius:10px;}"],e=>{let{theme:t}=e;return t.colors.white},e=>{let{theme:t}=e;return t.colors.white20}),ee=R.Ay.div.withConfig({componentId:"sc-baee8b42-16"})(["display:flex;align-items:center;justify-content:center;gap:12px;opacity:0.6;align-self:normal;"]),et=R.Ay.img.withConfig({componentId:"sc-baee8b42-17"})(["height:32px;mix-blend-mode:lighten;"]),en=R.Ay.div.withConfig({componentId:"sc-baee8b42-18"})(["display:flex;gap:8px;color:",";"],e=>{let{theme:t}=e;return t.colors.caution});R.Ay.ul.withConfig({componentId:"sc-baee8b42-19"})(["color:",";padding-inline-start:16px;margin:0px;"],e=>{let{theme:t}=e;return t.colors.caution});let ei=R.Ay.div.withConfig({componentId:"sc-baee8b42-20"})(["display:flex;gap:16px;justify-content:center;flex-direction:column;&.landscape{width:50%;height:100%;}"]),er=R.Ay.div.withConfig({componentId:"sc-f01145ab-0"})(["display:flex;align-items:center;cursor:pointer;border:1px solid ",";width:20px;height:20px;border-radius:50%;img{width:21px;height:21px;}"],e=>{let{theme:t}=e;return t.colors.white50}),eo=e=>{let{selected:t}=e;return(0,i.jsx)(er,{children:t&&(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,i.jsx)("circle",{cx:"10.2348",cy:"10.2353",r:"10.4",fill:"#B3D661"}),(0,i.jsx)("path",{d:"M5.4679 9.96527L8.5368 13.3842C8.68912 13.5539 8.95501 13.5539 9.10733 13.3842L15.4346 6.33532",stroke:"white",strokeWidth:"1.51667",strokeLinecap:"round",strokeLinejoin:"round"})]})})},el={src:"/_next/static/media/cloudy-error.9a98e7de.webp",height:439,width:512,blurDataURL:"data:image/webp;base64,UklGRrwAAABXRUJQVlA4WAoAAAAQAAAABwAABgAAQUxQSDkAAAABYFNbW5uPDRHMzBym7iYncxTEQZxl7EVG71VEREwAEFH8cukZABVm1xqQ+PpN+r+h/OtEum7b1joAVlA4IFwAAAAQAgCdASoIAAcAAkA4JbACdAaTA2kFgLeAAP715m4ejeDvSx8x9dJdC8ktMJNJ5mffOgivkvzohTjCsz0vZDtMpX0Yf5kXqkHvs+E229KoiIwAyH2NqBn8j5AAAA==",blurWidth:8,blurHeight:7},ec=R.Ay.div.withConfig({componentId:"sc-28f4bfb2-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;height:446px;width:100%;gap:32px;&.landscape{flex-direction:row;height:100%;}h3{color:",";font-size:24px;line-height:28px;font-weight:700;}"],e=>{let{theme:t}=e;return t.colors.white}),ea=R.Ay.img.withConfig({componentId:"sc-28f4bfb2-1"})(["width:128px;height:110px;"]),es=R.Ay.div.withConfig({componentId:"sc-28f4bfb2-2"})(["display:flex;flex-direction:column;align-items:center;width:100%;flex:1;"]),ed=R.Ay.div.withConfig({componentId:"sc-28f4bfb2-3"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;p{color:",";}h3{font-size:20px;}"],e=>{let{theme:t}=e;return t.colors.white70}),ep=R.Ay.div.withConfig({componentId:"sc-28f4bfb2-4"})(["margin:0px 16px;"]),eA=(0,R.Ay)(l.M5).attrs({as:"span"}).withConfig({componentId:"sc-28f4bfb2-5"})(["color:",";.link{color:",";cursor:pointer;}"],e=>{let{theme:t}=e;return t.colors.white70},e=>{let{theme:t}=e;return t.colors.link}),eh=R.Ay.div.withConfig({componentId:"sc-28f4bfb2-6"})(["display:flex;flex-direction:column;align-items:center;gap:20px;"]),ex=R.Ay.div.withConfig({componentId:"sc-28f4bfb2-7"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:32px;width:100%;&.landscape{width:50%;}"]),eu={cancel:{titleImg:el,titleText:"cancelTransaction",errorDesc:"confirmCancellation"},timeout:{titleImg:el,titleText:"paymentIncomplete",errorDesc:"paymentIncompleteDesc"},failure:{titleImg:{src:"/_next/static/media/cloudy-sad.10d3dc46.webp",height:513,width:512,blurDataURL:"data:image/webp;base64,UklGRr4AAABXRUJQVlA4WAoAAAAQAAAABwAABwAAQUxQSDQAAAABYBVJVqNHMoMQChs4QwhYSAIeIjJ/l09DREwA/NQxKABh2nFUI+zxavfbTm9ZOkQsXsInVlA4IGQAAACQAgCdASoIAAgAAkA4JbACdAYZfqAH6gGp+yljUAD+8uXdV9/KnNvCw1zLVsSioyQ9sSXsZK5/HUZ1zLQ/GX2/8rJhC+oqQOHuYtqfYa+WYZwV8dccKoXZX+Y+7QpI8+620WAA",blurWidth:8,blurHeight:8},titleText:"paymentFailed",errorDesc:"paymentFailedDesc"}},eg=e=>{let{type:t,onClose:n,onNoCancellation:a,orderNo:s,orientation:d}=e,{t:p}=(0,r.B)(),A=eu[t],h=(0,b.Fr)()&&!(0,b.v1)()&&!(0,b.bh)(),[x,u]=(0,o.useState)(d===C.QB.landscape&&h);return(0,o.useEffect)(()=>{u(d===C.QB.landscape&&h)},[d]),(0,i.jsxs)(ec,{className:"".concat(x?"landscape":""),children:[(0,i.jsxs)(ex,{className:"".concat(x?"landscape":""),children:[(0,i.jsx)(es,{children:(0,i.jsx)(ea,{src:(0,c._w)(A.titleImg),alt:"error"})}),(0,i.jsxs)(ed,{children:[(0,i.jsx)(l.IT,{children:p(A.titleText)}),(0,i.jsx)(l.Dp,{children:p(A.errorDesc)})]}),"failure"===t&&(0,i.jsxs)(ed,{children:[(0,i.jsx)(l.IT,{style:{fontSize:"16",fontWeight:"600"},children:p("orderNo")}),(0,i.jsx)(l.Dp,{children:s})]})]}),(0,i.jsx)(ex,{children:(0,i.jsxs)(eh,{children:["cancel"!==t&&(0,i.jsxs)(ep,{children:[(0,i.jsx)(eA,{children:p("reachOutIfCharged")}),(0,i.jsxs)(eA,{style:{color:f.JX.colors.link},children:[" ",(0,i.jsx)("a",{className:"link",href:"mailto:store-support@nowgg.fun",target:"_blank",rel:"noreferrer",children:"store-support@now.gg"})]})]}),(0,i.jsx)(g.$,{variant:"primary",size:"xlarge",onClick:n,children:p("cancel"===t?"confirm":"close")}),"cancel"===t&&(0,i.jsx)(g.$,{variant:"primaryOutline",size:"xlarge",onClick:a,children:p("dontCancel")})]})})]})};var em=n(31483);let ef=R.Ay.div.withConfig({componentId:"sc-e21ec3c7-0"})(["display:flex;padding:0px 8px 32px 8px;flex-direction:column;align-items:center;gap:8px;align-self:stretch;border-bottom:1px solid ",";p{color:",";}button{max-width:190px;}"],e=>{let{theme:t}=e;return t.colors.white10},e=>{let{theme:t}=e;return t.colors.ascent}),ey=e=>{let{url:t}=e,{t:n}=(0,r.B)();return(0,i.jsxs)(ef,{children:[(0,i.jsx)(l.M5,{children:n("noPaymentPage")}),(0,i.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",style:{width:"auto",textDecoration:"none"},children:(0,i.jsxs)(g.$,{variant:"primary",size:"medium",disabled:""===t,children:[n("showPaymentScreen"),(0,i.jsx)("img",{alt:"",loading:"lazy",src:(0,c._w)(em.A),width:16,height:16})]})})]})};var ew=function(e,t,n,i){return new(n||(n=Promise))(function(r,o){function l(e){try{a(i.next(e))}catch(e){o(e)}}function c(e){try{a(i.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(l,c)}a((i=i.apply(e,t||[])).next())})};let eb=e=>{let{product:t,onFailure:n,source:T,paymentsToken:B,paymentsGuid:R,paymentOptions:K,orientation:er,isLandscapeModal:el,isNowBuxPaymentFlow:ec=!1,handlePurchaseNowBuxSuccess:ea=e=>{},nowBuxPaymentDetails:es,subscriptionId:ed}=e,{t:ep}=(0,r.B)(),[eA,eh]=(0,o.useState)(),[ex,eu]=(0,o.useState)(!0),em=104*Math.PI,[ef,eb]=(0,o.useState)(599),ev=(0,o.useRef)(599);ev.current=ef;let[ej,eI]=(0,o.useState)(!1),[eC,eS]=(0,o.useState)(""),[eP,ek]=(0,o.useState)("".concat(parseInt("".concat(ef/60),10)," : ").concat(ef%60<10?"0":"").concat(ef%60)),eE=(0,o.useRef)(),[eN,eT]=(0,o.useState)(""),eQ=(0,S.wA)(),eB=(0,S.d4)(e=>e.play.paymentAppId),eU=(0,S.d4)(e=>e.play.nowPremiumSubscriptionActive),[eD,eR]=(0,o.useState)("");(0,b.Fr)()&&!(0,b.v1)()&&(0,b.bh)();let[e_,eH]=(0,o.useState)(((er===C.QB.landscape?U()([window.innerHeight,window.innerWidth]):Q()([window.innerHeight,window.innerWidth]))||window.innerHeight)-56),eL=(0,S.d4)(e=>e.play.paymentInProgress),eJ=()=>{eH(((er===C.QB.landscape?U()([window.innerHeight,window.innerWidth]):Q()([window.innerHeight,window.innerWidth]))||window.innerHeight)-56)},eW=e=>{if(!P.A.getState().play.paymentInProgress)return null;let t="Your Payment won't be completed";return e.returnValue=t,e.preventDefault(),t};(0,o.useEffect)(()=>((0,N.sx)("PaymentMethodSelectionDisplayed",{nowPassSource:T,planType:t.type}),window.addEventListener("resize",eJ),window.addEventListener("orientationchange",eJ),window.addEventListener("beforeunload",eW),()=>{window.removeEventListener("resize",eJ),window.removeEventListener("orientationchange",eJ),window.removeEventListener("beforeunload",eW)}),[]),(0,o.useEffect)(()=>{eJ()},[er]),(0,o.useEffect)(()=>{!eA&&K.length>0&&eh(K[0])},[K]);let eO=(e,n)=>{let i="".concat(I.Ay.appInfo.paymentBaseRedirectHost,"/user/payment/iappay.html#&").concat(new URLSearchParams({payType:"".concat((null==eA?void 0:eA.id)||0),payName:"".concat((null==eA?void 0:eA.payType)||0),productId:"".concat(t.productId),orderNo:e,countryCode:I.Ay.countryCode||"IN",CountryRegionCode:I.Ay.countryCode||"IN",postalCode:"OTHERS",subscriptionId:n,guid:R||"",appid:t.appId,inGameId:"null",deviceType:(0,b.el)().feDeviceType,platform:"cloud"}).toString());eT(i),window.open(i,"_blank","noopener")},ez=e=>ew(void 0,void 0,void 0,function*(){var n,i;if(eb(e=>e-1),ev.current%10==0){let r;try{if((r=yield v.A.pollPaymentStatus({},{appId:I.Ay.appInfo.appId,channel:"nowgg_cloud",orderNo:e,timestamp:Date.now(),token:B})).success&&r.data.INAPP_PURCHASE_STATUS)if(eE.current&&clearInterval(eE.current),r.data.INAPP_PURCHASE_STATUS.toString()===j.WM_.success){if(ec)return void ea(e);(0,b.Vv)(!1);let o=yield(0,E._T)({productId:t.productId,orderNumber:e,purchaseToken:null==(i=null==(n=null==r?void 0:r.data)?void 0:n.INAPP_PURCHASE_DATA)?void 0:i.purchaseToken,token:B});if(o.status===C.wD.Success)(0,b.Vv)(!0),eQ({type:k.A.NOWPREMIUM_SUBSCRIPTION_STATUS,payload:{nowPremiumSubscriptionActive:!0,showSubscriptionEnabledModal:!0,showSubscriptionModal:!1,paymentInProgress:!1}}),(0,E.vS)(o.subscriptionInfo);else throw Error("confirmSubscription API error: ".concat(JSON.stringify(o)))}else r.data.INAPP_PURCHASE_STATUS.toString()===j.WM_.fail&&(eS("failure"),eI(!0))}catch(e){(0,h.Ay)(Error("pollPaymentStatus or confirmSubscription API error: ".concat(e)),{error:e})}}}),eM=()=>{ec?ew(void 0,void 0,void 0,function*(){var e;try{let n;if(eL||eU||!ed)return;(0,N.sx)("PayNowClicked",{nowPassSource:T,planType:t.type,paymentProvider:null==eA?void 0:eA.payType}),eQ({type:k.A.SET_PAYMENT_STATUS,payload:{paymentInProgress:!0}});try{if(!(n=yield(0,D.el)(t,B,(null==eA?void 0:eA.id)||0,(null==es?void 0:es.nowbuxDiff)||"")).success){if(1607===n.code&&(yield(0,E.O2)(eB,B)))return;throw Error("success false: ".concat(n))}}catch(e){throw Error("createNowBuxOrder API error: ".concat(e))}eO(null==(e=null==n?void 0:n.data)?void 0:e.orderNo,ed),eE.current=setInterval(()=>{var e;ez(null==(e=null==n?void 0:n.data)?void 0:e.orderNo)},1e3)}catch(e){(0,h.Ay)(Error("initiateNowBuxPurchase failed: ".concat(e)),{error:e})}}):ew(void 0,void 0,void 0,function*(){var e,n,i,r;if(!P.A.getState().play.paymentInProgress&&!P.A.getState().play.nowPremiumSubscriptionActive){(0,N.sx)("PayNowClicked",{nowPassSource:T,planType:t.type,paymentProvider:null==eA?void 0:eA.payType}),eQ({type:k.A.SET_PAYMENT_STATUS,payload:{paymentInProgress:!0}});try{let o,l=(0,b.PG)("np",18).toLowerCase();try{if((o=yield v.A.createOrder({},{appId:eB,channelName:"nowgg_cloud",channel:"nowgg_cloud",countryRegionCode:"OTHERS",countryCode:I.Ay.countryCode||"IN",payType:(null==eA?void 0:eA.id)||0,postalCode:"OTHERS",productId:t.productId,timestamp:Date.now(),token:B,developerPayload:l})).success)(0,N.sx)(j.BeU,{payType:"".concat((null==eA?void 0:eA.id)||0),payName:"".concat((null==eA?void 0:eA.payType)||0),productId:"".concat(t.productId),orderNo:null==(e=null==o?void 0:o.data)?void 0:e.orderNo,countryCode:I.Ay.countryCode||"IN",CountryRegionCode:I.Ay.countryCode||"IN",postalCode:"OTHERS",guid:R||"",appid:t.appId,deviceType:(0,b.el)().feDeviceType,paymentsToken:B,paymentsGuid:R,subscriptionId:l}),eR(null==(n=null==o?void 0:o.data)?void 0:n.orderNo);else{if(1607===o.code&&(yield(0,E.O2)(eB,B)))return;throw Error("createOrder API error: ".concat(JSON.stringify(o)))}}catch(e){throw Error("createOrder API error: ".concat(e))}let{status:c,subscriptionInfo:a}=(yield(0,D.pf)(t,B,null==(i=null==o?void 0:o.data)?void 0:i.orderNo,l))||{};if(c===C.pE.SubscriptionAlreadyInitiated&&a&&(yield(0,E.O2)(null==a?void 0:a.subscriptionAppId,B)))return;eO(null==(r=null==o?void 0:o.data)?void 0:r.orderNo,l),eE.current=setInterval(()=>{var e;ez(null==(e=null==o?void 0:o.data)?void 0:e.orderNo)},1e3)}catch(e){(0,h.Ay)(Error("Exception in Payment popup"),{error:e})}}})};return(0,o.useEffect)(()=>{ek("".concat(parseInt("".concat(ef/60),10)," : ").concat(ef%60<10?"0":"").concat(ef%60)),0===ef&&(eE.current&&clearInterval(eE.current),eI(!0),eS("timeout"))},[ef]),(0,i.jsxs)(_,{className:"".concat(el?"landscape":""," ").concat((null===I.Ay||void 0===I.Ay?void 0:I.Ay.isJpHomePage)?"jpHomePage":""),children:[(0,i.jsxs)(H,{className:"".concat(el?"landscape":""," ").concat((null===I.Ay||void 0===I.Ay?void 0:I.Ay.isJpHomePage)?"jpHomePage":""),children:[(0,i.jsx)("img",{src:(0,c._w)(x.A),alt:"",style:{width:"128px",height:"34px"}}),!eL&&(0,i.jsx)(u.A,{name:"cross-thin",size:16,onClick:()=>{eS("cancel"),eI(!0)}})]}),(0,i.jsx)(L,{className:"".concat(el?"landscape":""," ").concat(e_<330?"small":""),children:ej?(0,i.jsx)(eg,{type:eC,onNoCancellation:()=>{eI(!1)},onClose:()=>{eI(!1),eQ({type:k.A.SET_PAYMENT_STATUS,payload:{paymentInProgress:!1}}),n()},orderNo:eD,orientation:er}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ei,{className:"".concat(el?"landscape":""),children:[(el&&!eL||!el)&&(0,i.jsxs)(W,{className:"".concat(el?"landscape":""),children:[(0,i.jsxs)(J,{paymentInProgress:eL,className:"\n ".concat(ec?"purchase-now-bux":""," \n ").concat(el?"landscape paymentTypes":""," \n ").concat(e_<330?"row":"","\n "),children:[ec?(0,i.jsx)("img",{className:"now-bux-img",height:"32px",src:(0,c._w)(p.A),alt:""}):(0,i.jsx)("img",{className:"now-prime-img",src:(0,c._w)(w.A),alt:""}),(0,i.jsxs)(O,{children:[ec?(0,i.jsxs)(l.e,{children:[null==es?void 0:es.nowbuxDiff," ","nowBux"]}):(0,i.jsx)(l.e,{children:ep("nowPrime")}),!ec&&(0,i.jsx)(l.M5,{style:{textTransform:"capitalize"},children:"".concat(ep(t.type)," ").concat(ep("pass"))})]}),!eL&&(0,i.jsx)(l.EW,{children:ec?"".concat(null==es?void 0:es.symbol).concat(null==es?void 0:es.nowbuxDiffLocalPrice):"".concat(t.currencySymbol).concat(t.offerPrice)})]}),!eL&&(0,i.jsx)(l.E2,{style:el?{}:{alignSelf:"baseline",marginLeft:60},children:ep((null===I.Ay||void 0===I.Ay?void 0:I.Ay.isJpHomePage)?"cancelToRefund":"subscriptionNotAutoRenew")})]}),!el&&(0,i.jsx)(V,{}),eL?(0,i.jsxs)(i.Fragment,{children:[!el&&(0,i.jsxs)(F,{children:[(0,i.jsx)(l.IT,{children:ep("paymentPending")}),(0,i.jsx)(l.Dp,{children:ep("completePayment")})]}),el&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(J,{paymentInProgress:eL,className:"".concat(el?"landscape":""),children:[(0,i.jsx)("img",{src:(0,c._w)(w.A),alt:""}),(0,i.jsxs)(O,{children:[(0,i.jsx)(l.e,{children:ep("nowPrime")}),(0,i.jsx)(l.M5,{style:{textTransform:"capitalize"},children:"".concat(ep(t.type)," ").concat(ep("pass"))})]}),!eL&&(0,i.jsx)(l.EW,{children:"".concat(t.currencySymbol).concat(t.offerPrice)})]}),(0,i.jsx)(V,{})]}),(0,i.jsxs)(Y,{className:"".concat(el?"landscape-modal":""),children:[(0,i.jsx)(l.EW,{children:eP}),(0,i.jsx)(l.Dp,{children:ep("mins")}),(0,i.jsx)("svg",{children:(0,i.jsx)("circle",{cx:52,cy:52,r:52,fill:"none",stroke:f.JX.colors.white30,strokeWidth:12})}),(0,i.jsx)("svg",{children:(0,i.jsx)("circle",{strokeDasharray:em,strokeDashoffset:em-ef/599*em,r:52,cx:52,cy:52,fill:"none",stroke:f.JX.colors.ascent,strokeWidth:12})})]}),el&&(0,i.jsxs)(F,{className:"".concat(el?"landscape":""),children:[(0,i.jsx)(l.IT,{children:ep("paymentPending")}),(0,i.jsx)(l.Dp,{children:ep("completePayment")})]}),!el&&(0,i.jsx)(ey,{url:eN}),!el&&(0,i.jsxs)(G,{children:[(0,i.jsx)(l.E2,{style:{color:"#FA832D"},children:ep("pleaseDontCloseTab")}),(0,i.jsxs)(q,{children:[(0,i.jsx)(y.A,{}),(0,i.jsx)(l.fI,{children:ep("checkingStatus")})]}),(0,i.jsxs)(q,{children:[(0,i.jsx)(l.M5,{children:ep("contact")}),(0,i.jsx)("a",{href:"mailto:support@now.gg",children:(0,i.jsx)(l.M5,{style:{color:f.JX.colors.link},children:"support@now.gg"})}),(0,i.jsx)(l.M5,{children:ep("help")})]})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(z,{children:[!el&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Dp,{style:{color:f.JX.colors.white},children:ep("paymentMethods")}),(0,i.jsx)($,{children:K.length>0?K.map(e=>{var t,n;let r=null==(n=null==(t=e.name)?void 0:t.toLowerCase())?void 0:n.replaceAll(" ",""),o=ep(r)!==r;return(0,i.jsxs)(M,{onClick:()=>eh(e),className:eA!==e?"":"selected",children:[(0,i.jsx)("img",{src:e.logo,alt:""}),(0,i.jsx)(l.M5,{children:o?ep(r):e.name}),(0,i.jsx)(eo,{selected:eA===e})]})}):(0,i.jsx)(Z,{alt:"".concat(ep("roundLoader")),src:(0,c._w)(a.A)})})]}),(0,i.jsxs)(ee,{children:[(0,i.jsx)(et,{src:(0,c._w)(s)}),(0,i.jsx)(et,{src:(0,c._w)(d)})]})]}),!el&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(X,{children:[(0,i.jsx)(m.oV,{onChange:e=>eu(e.target.checked),checked:ex,children:(0,i.jsx)(l.E2,{children:ep("termsAccepted")})}),(0,i.jsx)(l.N_,{style:{fontSize:12,flex:1},target:"_blank",rel:"noopener noreferrer",href:"https://now.gg/terms-and-privacy.html#terms",children:ep("termsOfUse")})]}),(0,i.jsx)(g.$,{variant:"primary",disabled:!ex||eU||!eA,size:"xlarge",onClick:eM,children:ec?"".concat(ep("pay")," \n ").concat(null==es?void 0:es.symbol).concat(null==es?void 0:es.nowbuxDiffLocalPrice):"".concat(ep("pay")," ").concat(t.currencySymbol).concat(t.offerPrice)})]}),(0,i.jsxs)(en,{children:[(0,i.jsx)("img",{src:(0,c._w)(A),alt:ep("info"),width:16,height:16}),(0,i.jsx)(l.E2,{children:ep("redirectForPayment")})]})]})]}),el&&(0,i.jsx)(ei,{className:"".concat(el?"landscape":""),children:eL?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ey,{url:eN}),(0,i.jsxs)(G,{children:[(0,i.jsx)(l.E2,{style:{color:"#FA832D"},children:ep("pleaseDontCloseTab")}),(0,i.jsxs)(q,{children:[(0,i.jsx)(y.A,{}),(0,i.jsx)(l.fI,{children:ep("checkingStatus")})]}),(0,i.jsxs)(q,{children:[(0,i.jsx)(l.M5,{children:ep("contact")}),(0,i.jsx)("a",{href:"mailto:support@now.gg",children:(0,i.jsx)(l.M5,{style:{color:f.JX.colors.link},children:"support@now.gg"})}),(0,i.jsx)(l.M5,{children:ep("help")})]})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.Dp,{style:{color:f.JX.colors.white},children:ep("paymentMethods")}),(0,i.jsx)($,{children:K.length>0?K.map(e=>(0,i.jsxs)(M,{onClick:()=>eh(e),className:eA!==e?"":"selected",children:[(0,i.jsx)("img",{src:e.logo,alt:""}),(0,i.jsx)(l.M5,{children:e.name}),(0,i.jsx)(eo,{selected:eA===e})]})):(0,i.jsx)(Z,{alt:"".concat(ep("roundLoader")),src:(0,c._w)(a.A)})}),(0,i.jsxs)(X,{children:[(0,i.jsx)(m.oV,{onChange:e=>eu(e.target.checked),checked:ex,children:(0,i.jsx)(l.E2,{children:ep("termsAccepted")})}),(0,i.jsx)(l.N_,{style:{fontSize:12,flex:1},target:"_blank",rel:"noopener noreferrer",href:"https://now.gg/terms-and-privacy.html#terms",children:ep("termsOfUse")})]}),(0,i.jsx)(g.$,{variant:"primary",disabled:!ex||eU||!eA,size:"xlarge",onClick:eM,children:ec?"".concat(ep("pay")," \n ").concat(null==es?void 0:es.symbol).concat(null==es?void 0:es.nowbuxDiffLocalPrice):"".concat(ep("pay")," ").concat(t.currencySymbol).concat(t.offerPrice)})]})})]})})]})}},12039:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/now-bux-icon-3.8f36fd75.webp",height:38,width:39,blurDataURL:"data:image/webp;base64,UklGRq4AAABXRUJQVlA4WAoAAAAQAAAABwAABwAAQUxQSDsAAAABYFtbW5N3qKlDDTWbYE5bO4Iz6AAe8g4RoTZtA8aeUi4BORwG8E+M74q4Y4zxU/aP1ct19KG/gAyHBgBWUDggTAAAABACAJ0BKggACAACQDglsAJ0ugADGhs4f+AA/vYkywKLxXvtaczRnOz7jez1bsg5BXLQrH/0YkPxAPb6z/8qJ3bP+r3A1YEJzLSgAAA=",blurWidth:8,blurHeight:8}},20624:(e,t,n)=>{var i=n(29257),r=n(141),o=n(27148);e.exports=function(e){return e&&e.length?i(e,o,r):void 0}},31483:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/redirect-arrow.e966dafd.webp",height:64,width:65,blurDataURL:"data:image/webp;base64,UklGRnoAAABXRUJQVlA4WAoAAAAQAAAABwAABwAAQUxQSDQAAAABYBPbVpxbsvuAjoqSwUjmO8imAUtZdEVCwENETABztYhIGqxfBwjv+fNPLR3U1Rhk8JE5VlA4ICAAAAAwAQCdASoIAAgAAkA4JaQAA3AA/vqCFaWCLWn34AAAAA==",blurWidth:8,blurHeight:8}},47204:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});let i={src:"/_next/static/media/now-premium-symbol.f6322625.webp",height:73,width:73,blurDataURL:"data:image/webp;base64,UklGRrwAAABXRUJQVlA4WAoAAAAQAAAABwAABwAAQUxQSDQAAAABYBRJkqLxsfsC1fyiO1PMZGFRRERMALD+/3sK5I4xxpu42LRH69ham2kZvFQLBsSHQSAAVlA4IGIAAAAQAgCdASoIAAgAAkA4JbACdAEegm7FtxoAAP7PbAiVU+f/dp9rQLBk3PmTzglv2EiWGKenOkzxLmXLJkkwytGNS/EFNzyHMyitOytOjv/M97zv/NkfjXb5T2Dax3vNqUgAAA==",blurWidth:8,blurHeight:8}},93437:(e,t,n)=>{"use strict";n.d(t,{A:()=>A});var i=n(14232),r=n(29359),o=n(5241),l=n(64320),c=n(62920),a=n(21555),s=n(71278),d=n(52094),p=n(9097);let A=function(e){let{source:t}=e,[n,A]=(0,i.useState)(!1),h=(0,l.d4)(e=>e.play.availableNowPasses),[x,u]=(0,i.useState)(h[0]),[g,m]=(0,i.useState)(""),[f,y]=(0,i.useState)(""),[w,b]=(0,i.useState)([]),v=(0,l.d4)(e=>e.play.paymentAppId),j=(0,l.wA)();(0,i.useEffect)(()=>{(0,o.sx)("NowPassPlanViewed",{nowPassSource:t}),h.length<1&&j(d.w$)},[]),(0,i.useEffect)(()=>{(null==h?void 0:h.length)>1&&u(h[0])},[null==h?void 0:h.length]),(0,i.useEffect)(()=>{if(v){var e,t,n,i;e=this,t=void 0,n=void 0,i=function*(){var e;let t,n=s.A.getState().play.paymentAppId;try{if(!(t=yield(0,p.mw)(n)).success)throw Error("silenceCallback API error: ".concat(JSON.stringify(t)));m(t.data.token),y(t.data.guid)}catch(e){throw Error("silenceCallback API error: ".concat(e))}let i=yield a.A.payTypeSupportedList({},Object.assign({appId:n,channelName:"nowgg_cloud",clientType:5,countryRegionCode:"OTHERS",countryCode:r.Ay.countryCode||"US",flag:2,token:t.data.token,useType:2,channel:"nowgg_cloud"},(null===r.Ay||void 0===r.Ay?void 0:r.Ay.isJpHomePage)&&(null==(e=h[0])?void 0:e.category)==="subscription"?{type:"subs"}:{}));i.success&&b(i.data.data)},new(n||(n=Promise))(function(r,o){function l(e){try{a(i.next(e))}catch(e){o(e)}}function c(e){try{a(i.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(l,c)}a((i=i.apply(e,t||[])).next())})}},[v]);let I=(0,i.useCallback)(e=>{u(e),A(!0),(0,o.sx)(c.g30,{planType:e.type,nowPassSource:t})},[t]);return{setShowPaymentModal:A,selectedPass:x,paymentsToken:g,paymentsGuid:f,paymentOptions:w,handleSubscriptionPlanClicked:I,showPaymentModal:n,availableNowPasses:h}}}}]); //# sourceMappingURL=1128.24a7e9ee93b19836.js.map