PageSourceSearch

https://therealfeel.ai/_next/static/chunks/pages/apidocs/upgradev2-8b5ba3dacab112ce.js

js therealfeel.ai collected 2026-10-05 12:49:54 UTC 21,941 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2084],{5907:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/apidocs/upgradev2",function(){return t(38557)}])},33625:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a={src:"/_next/static/media/realFeelLogo.d346f7de.svg",height:22,width:175,blurWidth:0,blurHeight:0}},34885:(e,s,t)=>{"use strict";t.d(s,{Ag:()=>i,FD:()=>g,IC:()=>d,WC:()=>m,Y0:()=>n,_8:()=>x,_F:()=>v,cI:()=>f,jK:()=>u,m7:()=>o,nf:()=>r,p0:()=>p,uA:()=>c,zA:()=>h});var a=t(99744),l=t(38248);let n=async()=>{let e=(0,l.getCookie)("accessToken"),s=(0,l.getCookie)("userRole");return(await a.FE.get("/bussiness/retrieveProductAndPrices?isBusinessUser=".concat("memberUser"!=s),{headers:{Authorization:"Bearer ".concat(e)}})).data.data},i=async()=>(await a.FE.get("public/retrieveProductAndPrices")).data.data,r=async e=>{let s=(0,l.getCookie)("userRole");return(await a.FE.post("/bussiness/createBusinessCheckoutSession",{...e,isBusinessUser:"memberUser"!=s})).data},o=async e=>{let s=(0,l.getCookie)("userRole");return(await a.FE.post("/bussiness/createCheckoutSessionForCanceledUser",{...e,isBusinessUser:"memberUser"!=s})).data},d=async e=>{let s=(0,l.getCookie)("userRole");return(await a.FE.post("/bussiness/upgradeSubscription",{...e,isBusinessUser:"memberUser"!=s})).data},c=async e=>{let s=(0,l.getCookie)("userRole");return(await a.FE.post("/bussiness/handleCheckoutCompletion",{...e,isBusinessUser:"memberUser"!=s})).data},u=async e=>{let s=(0,l.getCookie)("userRole");return(await a.FE.post("/bussiness/retrieveSessionDetails",{...e,isBusinessUser:"memberUser"!=s})).data},m=async e=>{let s=(0,l.getCookie)("userRole");return(await a.FE.post("/bussiness/cancelSubscription",{...e,isBusinessUser:"memberUser"!=s})).data},x=async()=>{let e=(0,l.getCookie)("userRole");return(await a.FE.post("/bussiness/createSetupIntentForCardUpdate",{isBusinessUser:"memberUser"!==e})).data},p=async()=>{let e=(0,l.getCookie)("userRole");return(await a.FE.post("subscription/createSetupIntentForCardUpdate",{isBusinessUser:"memberUser"!=e})).data},h=async e=>{let s=(0,l.getCookie)("userRole");return(await a.FE.post("/bussiness/updateNewCardDetails",{...e,isBusinessUser:"memberUser"!=s})).data},f=async e=>{let s=(0,l.getCookie)("userRole");return(await a.FE.post("subscription/updateNewCardDetails",{...e,isBusinessUser:"memberUser"!=s})).data},g=async e=>{try{return(await a.FE.post("bussiness/getSubscriptionPreview",e)).data}catch(e){var s,t;throw{...e,apiEndpoint:"GetSubscriptionPreviews",timestamp:new Date().toISOString(),userMessage:(null==e||null==(t=e.response)||null==(s=t.data)?void 0:s.message)||"Failed to get subscription preview"}}},v=async e=>{try{return(await a.FE.post("/bussiness/upgradeSubscription",e)).data}catch(e){var s,t;throw{...e,apiEndpoint:"UpgradeSubscription",timestamp:new Date().toISOString(),userMessage:(null==e||null==(t=e.response)||null==(s=t.data)?void 0:s.message)||"Failed to upgrade subscription"}}}},38557:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var a=t(37876),l=t(14232),n=t(89099),i=t(67914),r=t(91647),o=t(54587),d=t.n(o),c=t(33625),u=t(3198),m=t(34885),x=t(38248),p=t(54958),h=t(54336);function f(){var e,s,t,o,f,g,v,b,w,j,y,N,P,k,C,S,U,E,A,F,G,I;let D=(0,n.useRouter)(),[R,B]=(0,l.useState)(null),[T,_]=(0,l.useState)(""),[Y,O]=(0,l.useState)(!1),[M,q]=(0,l.useState)(!1),[z,K]=(0,l.useState)(!1),[L,$]=(0,l.useState)(null),[W,H]=(0,l.useState)(!1),[X,J]=(0,l.useState)(!1),[Q,V]=(0,l.useState)(""),[Z,ee]=(0,l.useState)(!1),[es,et]=(0,l.useState)("pending");(0,l.useEffect)(()=>{{let e=localStorage.getItem("upgradeInfo");if(e)try{let s=JSON.parse(e);B(s)}catch(e){console.error("Error parsing upgradeInfo:",e)}}},[]);let{price:ea,addOnChoice:el,addOnPrice:en,selectedPlan:ei,priceId:er,addonPriceId:eo}=R||{},ed=(0,x.getCookie)("userRole"),ec={newPriceId:er,isAddon:"yes"===el,addonPriceId:"yes"===el?eo:null,isBusinessUser:ed="memberUser"!==ed},{data:eu,isLoading:em,isError:ex,error:ep}=(0,i.I)({queryKey:["subscriptionPreview",ec],queryFn:()=>(0,m.FD)(ec),enabled:!!(er&&R),staleTime:3e5,cacheTime:6e5});return((0,l.useEffect)(()=>{eu&&console.log("Subscription Preview Data:",eu),ex&&console.error("Subscription Preview Error:",ep)},[eu,ex,ep]),M||T.length,em)?(0,a.jsx)("div",{className:"min-h-screen bg-green-800 flex items-center justify-center",children:(0,a.jsxs)("div",{className:"flex flex-col items-center space-y-6",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-20 h-20 border-4 border-white/20 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-0 w-20 h-20 border-4 border-white border-t-transparent roun
1ded-full animate-spin"})]}),(0,a.jsxs)("div",{className:"text-center space-y-3",children:[(0,a.jsx)("h2",{className:"text-white text-2xl font-Golos font-semibold animate-pulse",children:"Fetching Your Credits"}),(0,a.jsx)("p",{className:"text-[#9cb68e] text-lg font-Golos",children:"Retrieving your credit details from Stripe."}),(0,a.jsxs)("div",{className:"flex items-center justify-center space-x-1",children:[(0,a.jsx)("div",{className:"w-2 h-2 bg-white rounded-full animate-bounce"}),(0,a.jsx)("div",{className:"w-2 h-2 bg-white rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,a.jsx)("div",{className:"w-2 h-2 bg-white rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})]})]})}):(0,a.jsxs)("div",{className:"flex items-start flex-col sm:flex-row pb-10 sm:pb-0",children:[(0,a.jsx)("div",{className:"flex flex-col h-auto sm:min-h-screen w-full items-start gap-6 pt-8 sm:pt-16 flex-2 self-stretch bg-green-800 xl:pl-[200px]",children:(0,a.jsxs)("div",{className:"flex flex-col items-start self-stretch gap-6 sm:gap-10 p-4 sm:p-7 w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-6",children:[(0,a.jsx)(d(),{className:"cursor-pointer",src:r.A,width:24,height:24,alt:"upgrade",style:{color:"white"},onClick:()=>D.back()}),(0,a.jsx)(d(),{src:c.A,width:175,height:22,alt:"upgrade"})]}),(0,a.jsx)("p",{className:"-mt-[15px] sm:-mt-[30px] text-[#9cb68e] text-[16px] sm:text-[18px]",children:"Subscribe to The Real Feel Company and 1 more"}),(0,a.jsx)("div",{className:"flex -mt-[20px] sm:-mt-[40px] gap-2 items-center justify-center",children:(()=>{let e="yes"===el?ea+en:ea;return!(!isNaN(e)&&null!=e)||em?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"relative",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"text-[32px] sm:text-[48px] text-white font-normal font-Golos",children:"$"}),(0,a.jsx)("div",{className:"flex items-center ml-1",children:(0,a.jsx)("div",{className:"animate-pulse",children:(0,a.jsx)("div",{className:"h-12 sm:h-12 w-24 sm:w-32 bg-white/20 rounded-lg flex items-center justify-center",children:(0,a.jsxs)("div",{className:"flex space-x-1",children:[(0,a.jsx)("div",{className:"w-1 h-6 bg-white/40 rounded animate-pulse"}),(0,a.jsx)("div",{className:"w-1 h-6 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.1s"}}),(0,a.jsx)("div",{className:"w-1 h-6 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.2s"}}),(0,a.jsx)("div",{className:"w-1 h-6 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.3s"}})]})})})})]})}),(0,a.jsxs)("p",{className:"text-[#9cb68e] leading-5",children:[(0,a.jsx)("span",{children:"per"})," ",(0,a.jsx)("br",{})," ",(0,a.jsx)("span",{children:"month"})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"text-[32px] sm:text-[48px] text-white font-normal font-Golos",children:(0,u.Bp)(e)}),(0,a.jsxs)("p",{className:"text-[#9cb68e] leading-5",children:[(0,a.jsx)("span",{children:"per"})," ",(0,a.jsx)("br",{})," ",(0,a.jsx)("span",{children:"month"})]})]})})()}),(0,a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,a.jsxs)("div",{className:"left flex-1",children:[(0,a.jsx)("h1",{className:"text-white text-[17px] font-normal font-Golos",children:"The Real Feel Company"}),(0,a.jsx)("p",{className:"text-[#9cb68e] text-[14px] font-normal font-Golos",children:"API access plans for businesses Billed monthly"})]}),(0,a.jsx)("div",{className:"right w-32 text-right",children:isNaN(ea)||null==ea||em?(0,a.jsxs)("div",{className:"flex items-center justify-end",children:[(0,a.jsx)("span",{className:"text-white text-[17px] font-normal font-Golos mr-1",children:"$"}),(0,a.jsx)("div",{className:"animate-pulse",children:(0,a.jsx)("div",{className:"h-5 w-12 bg-white/20 rounded flex items-center justify-center",children:(0,a.jsxs)("div",{className:"flex space-x-0.5",children:[(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse"}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.1s"}}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.2s"}}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.3s"}})]})})})]}):(0,a.jsx)("h1",{className:"text-white text-[17px] font-normal font-Golos",children:(0,u.Bp)(ea)})})]}),"yes"==el&&(0,a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,a.jsxs)("div",{className:"left flex-1",children:[(0,a.jsx)("h1",{className:"text-white text-[17px] font-normal font-Golos",children:"The Real Feel Company"}),(0,a.jsx)("p",{className:"text-[#9cb68e] text-[14px] font-normal font-Golos",children:"API access plans for businesses Billed monthly"})]}),(0,a.jsx)("div",{className:"right w-32 text-right",children:isNaN(en)||null==en||em?(0,a.jsxs)("div",{className:"flex items-center justify-end",children:[(0,a.jsx)("span",{className:"text-white text-[17px] font-normal font-Golos mr-1",children:"$"}),(0,a.jsx)("div",{className:"animate-pulse",children:(0,a.jsx)("div",{className:"h-5 w-12 bg-white/20 rounded flex items-center justify-center",children:(0,a.jsxs)("div",{className:"flex space-x-0.5",children:[(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse"}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.1s"}}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.2s"}}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.3s"}})]})})})]}):(0,a.jsx)("h1",{className:"text-white text-[17px] font-normal font-Golos",children:(0,u.Bp)(en)})})]}
1),(0,a.jsx)("div",{className:"border-t border-b border-[#9cb68e]/30 py-4",children:(0,a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,a.jsxs)("div",{className:"left flex-1",children:[(0,a.jsx)("h1",{className:"text-white text-[17px] font-normal font-Golos",children:"Subtotal"}),(0,a.jsx)("p",{className:"text-[#9cb68e] opacity-0 text-[14px] font-normal font-Golos",children:"API access plans for businesses Billed monthly"})]}),(0,a.jsx)("div",{className:"right w-32 text-right",children:(()=>{let e="yes"===el?ea+en:ea;return!(!isNaN(e)&&null!=e)||em?(0,a.jsxs)("div",{className:"flex items-center justify-end",children:[(0,a.jsx)("span",{className:"text-white text-[17px] font-normal font-Golos mr-1",children:"$"}),(0,a.jsx)("div",{className:"animate-pulse",children:(0,a.jsx)("div",{className:"h-5 w-12 bg-white/20 rounded flex items-center justify-center",children:(0,a.jsxs)("div",{className:"flex space-x-0.5",children:[(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse"}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.1s"}}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.2s"}}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.3s"}})]})})})]}):(0,a.jsx)("h1",{className:"text-white text-[17px] font-normal font-Golos",children:(0,u.Bp)(e)})})()})]})}),(null==eu||null==(e=eu.proration)?void 0:e.creditAmount)>0&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex justify-between items-start max-w-[443.500px] w-full",children:[(0,a.jsxs)("div",{className:"left flex-1",children:[(0,a.jsx)("h1",{className:"text-[#9cb68e] text-[15px] font-normal font-Golos",children:"Credit from previous plan"}),(0,a.jsxs)("div",{className:"bg-[#9cb68e]/10 border border-[#9cb68e]/30 rounded-lg p-2 mt-2 flex items-start gap-2 max-w-[400px]",children:[(0,a.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:(0,a.jsx)("svg",{className:"w-3 h-3 text-[#9cb68e]",fill:"currentColor",viewBox:"0 0 20 20",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),(0,a.jsxs)("p",{className:"text-[#9cb68e] text-[12px] font-normal font-Golos leading-relaxed",children:["Unused credit from ",null==eu||null==(t=eu.currentPlanDetails)||null==(s=t.mainPlan)?void 0:s.name," plan"]})]})]}),(0,a.jsx)("div",{className:"right w-32 text-right",children:(0,a.jsxs)("h1",{className:"text-[#9cb68e] text-[17px] font-normal font-Golos",children:["-","$"+(null==eu||null==(o=eu.proration)?void 0:o.creditAmount)]})})]})}),(0,a.jsxs)("div",{className:"flex justify-between items-start pt-3",children:[(0,a.jsxs)("div",{className:"left flex-1",children:[(0,a.jsx)("h1",{className:"text-white text-[17px] font-normal font-Golos",children:"Total due today"}),(0,a.jsx)("p",{className:"text-[#9cb68e] opacity-0 text-[14px] font-normal font-Golos",children:"API access plans for businesses Billed monthly"})]}),(0,a.jsx)("div",{className:"right w-32 text-right",children:(()=>{var e;let s="yes"===el?ea+en:ea;return!(!isNaN(s)&&null!=s)||em?(0,a.jsxs)("div",{className:"flex items-center justify-end",children:[(0,a.jsx)("span",{className:"text-white text-[17px] font-normal font-Golos mr-1",children:"$"}),(0,a.jsx)("div",{className:"animate-pulse",children:(0,a.jsx)("div",{className:"h-5 w-12 bg-white/20 rounded flex items-center justify-center",children:(0,a.jsxs)("div",{className:"flex space-x-0.5",children:[(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse"}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.1s"}}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.2s"}}),(0,a.jsx)("div",{className:"w-0.5 h-3 bg-white/40 rounded animate-pulse",style:{animationDelay:"0.3s"}})]})})})]}):(0,a.jsx)("h1",{className:"text-white text-[17px] font-normal font-Golos",children:(0,u.I3)(null==eu||null==(e=eu.proration)?void 0:e.immediateCharge)})})()})]})]})}),(0,a.jsx)("div",{className:"flex flex-col h-auto sm:min-h-screen w-full items-start flex-2 self-stretch gap-8 px-8 md:px-[100px] pt-14 sm:pt-[140px] pb-0 bg-black-0",children:(0,a.jsxs)("div",{className:"w-full justify-center",children:[(0,a.jsx)("h2",{className:"text-2xl font-Golos font-bold mb-5 ",children:"Confirm Your Plan Change"}),(0,a.jsx)("p",{className:"text-base font-Golos mb-5",children:"The new API plan and subscription will take effect immediately. Any remaining credit from your previous plan's monthly charge will be applied to the first month of your new plan. Your current API usage will carry over to your new usage count, and your billing cycle will remain unchanged."}),em&&(0,a.jsx)("div",{className:"mb-4 p-4 bg-gray-100 rounded",children:(0,a.jsx)("p",{className:"text-gray-600",children:"Loading subscription preview..."})}),ex&&(0,a.jsx)("div",{className:"mb-4 p-4 bg-red-100 border border-red-300 rounded-lg",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex-shrink-0",children:(0,a.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,a.jsxs)("div",{className:"ml-3",children:[(0,a.jsxs)("h3",{className:"text-sm font-medium text-red-800",children:[(null==ep||null==(f=ep.response)?void 0:f.status)===400&&"Invalid Request",(null==ep||null==(g=ep.response)?void 0:g.status)===401&&"Authentication Required",(null==ep||null==(v=ep.response)?void 0:v.status)===403&&"Access Denied",(null==ep||null==(b=ep.response)?void 0:b.status)===404&&"Subscription Not Found",(null==ep||null==(w=ep.response)?void 0:w.status)===409&&"Subscription Conflict",(null==ep||null==(j=ep.response)?void 0:j.status)===422&&"Invalid Data",(null==ep||null==(y=ep.response)?void 0:y.status)===429&&"Too Many Requests",(null==ep||null==(N=ep.response)?void 0:N.status)>=500&&"Server Error",!(null==ep?void 0:ep.response)&&"Network Error",!(null==ep||null==(P=ep.response)?void 0:P.status)&&"Unknown Error"]}),(0,a.jsxs)("div",{className:"mt-2 text-sm text-red-700",children:[(null==ep||null==(k=ep.response)?void 0:k.status)===400&&"Please check your subscription details and try again.",(null==ep||null==(C=ep.response)?void 0:C.status)===401&&"Please log in again and try.",(null==ep||null==(S=ep.response)?void 0:S.status)===403&&"You don't have permission to view subscription details.",(null==ep||null==(U=ep.response)?void 0:U.status)===404&&"Your subscription could not be found. Please refresh the page.",(null==ep||null==(E=ep.response)?void 0:E.status)===409&&"There's a conflict with your current subscription.",(null==ep||null==(A=ep.response)?void 0:A.status)===422&&"Invalid subscription data. Please check your plan selection.",(null==ep||null==(F=ep.response)?void 0:F.status)===429&&"Too many requests. Please wait a moment and try again.",(null==ep||null==(G=ep.response)?void 0:G.status)>=500&&"Server error. Our team has been notified. Please try again later.",!(null==ep?void 0:ep.response)&&"Please check your internet connection and try again.",!(null==ep||null==(I=ep.response)?void 0:I.status)&&"An unexpected error occurred. Please contact support."]}
1),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)("button",{onClick:()=>window.location.reload(),className:"text-sm bg-red-100 text-red-800 px-3 py-1 rounded hover:bg-red-200 transition-colors",children:"Retry"})})]})]})}),(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsx)("button",{onClick:()=>{if(!(null==eu?void 0:eu.previewToken))return void console.error("No preview token available");console.log("[Upgrade] Showing loading animation for 5 seconds"),H(!0),console.log("[Upgrade] Starting API call immediately"),et("loading");let e={previewToken:eu.previewToken,planType:eu.newPlanDetails.mainPlan.name,isBusinessUser:ed};console.log("Upgrading subscription with payload:",e),(0,m._F)(e).then(e=>{console.log("Upgrade successful:",e),$(e),V((null==e?void 0:e.message)||"Your subscription has been upgraded successfully."),(null==e?void 0:e.apiKey)&&""!==e.apiKey.trim()?et("success"):et("error")}).catch(e=>{var s,t,a,l,n,i,r,o;console.error("Upgrade failed:",e),ee(!0),et("error");let d="There was an error processing your upgrade. Please contact support.";(null==e||null==(s=e.response)?void 0:s.status)===400?d="Invalid request. Please check your subscription details and try again.":(null==e||null==(t=e.response)?void 0:t.status)===401?d="Authentication failed. Please log in again and try.":(null==e||null==(a=e.response)?void 0:a.status)===403?d="You don't have permission to perform this action. Please contact support.":(null==e||null==(l=e.response)?void 0:l.status)===404?d="Subscription not found. Please refresh the page and try again.":(null==e||null==(n=e.response)?void 0:n.status)===409?d="There's a conflict with your current subscription. Please contact support.":(null==e||null==(i=e.response)?void 0:i.status)===422?d="Invalid subscription data. Please check your plan selection and try again.":(null==e||null==(r=e.response)?void 0:r.status)===429?d="Too many requests. Please wait a moment and try again.":(null==e||null==(o=e.response)?void 0:o.status)>=500?d="Server error. Our team has been notified. Please try again later or contact support.":(null==e?void 0:e.code)!=="NETWORK_ERROR"&&(null==e?void 0:e.response)||(d="Network error. Please check your internet connection and try again."),V(d)}),setTimeout(()=>{console.log("[Upgrade] Loading complete, showing success modal"),H(!1),J(!0),K(!0)},5e3)},className:"bg-green-800 text-white py-3 mt-2 px-6 font-Golos font-bold rounded-sm",disabled:em||!(null==eu?void 0:eu.previewToken),children:em?"Getting Your remaining credit details":"Confirm Your Plan Change"})})]})}),W&&(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-60 flex items-center justify-center z-50 backdrop-blur-sm",children:(0,a.jsx)("div",{className:"bg-white rounded-2xl p-8 max-w-md mx-4 shadow-2xl border border-green-100",children:(0,a.jsx)(h.A,{paymentMessage:"Processing your payment...",message:"Please wait while we complete your transaction",duration:5})})}),X&&(0,a.jsx)(p.Q,{isAccessAPIUser:!0,tokenToCopy:"error"===es?(0,a.jsx)("div",{className:"text-red-500 font-semibold",children:"Error generating API key"}):"success"===es?null==L?void 0:L.apiKey:(0,a.jsx)("div",{className:"animate-pulse",children:"Generating API Key..."}),isOpen:z,isUpgrade:!0,title:"Subscription Upgraded Successfully!",message:Q,buttonText:"Continue",onClose:()=>{K(!1),$(null),H(!1),J(!1),V(""),ee(!1),ed?D.push("/businessuser/profilesettings/"):D.push("/memberuser/profilesettings/")},isGeneratingMessage:"error"===es?"Error generating API key":"Your API Key is being generated. Please wait..."})]})}},91647:(e,s,t)=>{"use strict";t.d(s,{A:()=>a});let a={src:"/_next/static/media/arrow_back.0f81012a.svg",height:24,width:24,blurWidth:0,blurHeight:0}}},e=>{var s=s=>e(e.s=s);e.O(0,[3775,7594,8782,8743,7914,3198,4348,636,6593,8792],()=>s(5907)),_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.