PageSourceSearch

https://www.tubenxt.com/assets/Checkout-BMmTt7ci.js

js tubenxt.com collected 2026-10-02 01:47:28 UTC 26,654 bytes, 1 lines download raw bytes

1import{G as r,j as n,c as e,ad as s,d as l,ae as a,P as i}from"./index-BivhYt2x.js";import{b as d,u as t,k as o}from"./vendor-uAoOi1mV.js";import{T as c}from"./TabGroup-DH5QaPLy.js";import{u as m,a as u,C as x,b as h,c as f,S as p,E as w,l as v}from"./cvv-Dhm1177b.js";import{C as g}from"./chevron-down-B9PCiPiN.js";import"./createLucideIcon-BplJULf_.js";function j(n){return r({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M331.3 308.7L278.6 256l52.7-52.7c6.2-6.2 6.2-16.4 0-22.6-6.2-6.2-16.4-6.2-22.6 0L256 233.4l-52.7-52.7c-6.2-6.2-15.6-7.1-22.6 0-7.1 7.1-6 16.6 0 22.6l52.7 52.7-52.7 52.7c-6.7 6.7-6.4 16.3 0 22.6 6.4 6.4 16.4 6.2 22.6 0l52.7-52.7 52.7 52.7c6.2 6.2 16.4 6.2 22.6 0 6.3-6.2 6.3-16.4 0-22.6z"},child:[]},{tag:"path",attr:{d:"M256 76c48.1 0 93.3 18.7 127.3 52.7S436 207.9 436 256s-18.7 93.3-52.7 127.3S304.1 436 256 436c-48.1 0-93.3-18.7-127.3-52.7S76 304.1 76 256s18.7-93.3 52.7-127.3S207.9 76 256 76m0-28C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z"},child:[]}]})(n)}const b=({channels:r,selected:e,setSelected:s,addChannel:l})=>{const[a,i]=d.useState(!1),t=d.useRef(null);return d.useEffect(()=>{const r=r=>{t.current&&!t.current.contains(r.target)&&i(!1)};return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[a]),n.jsxs("div",{ref:t,className:"relative w-64",children:[n.jsxs("button",{onClick:()=>i(r=>!r),className:"w-full flex items-center justify-between border border-gray-300 rounded-md px-3 py-2 bg-white hover:bg-gray-50",children:[n.jsx("div",{className:"flex items-center space-x-2",children:e?n.jsxs(n.Fragment,{children:[n.jsx("img",{src:e.pictureURL,alt:e.channelName,className:"w-6 h-6 rounded-full",referrerPolicy:"no-referrer"}),n.jsx("span",{className:"truncate",children:e.channelName})]}):n.jsx("span",{children:"Select Channel"})}),n.jsx(g,{className:"w-4 h-4"})]}),a&&n.jsxs("div",{className:"absolute mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg z-50",children:[n.jsx("ul",{className:"max-h-56 overflow-y-auto",children:r.map(r=>n.jsxs("li",{onClick:()=>(s(r),void i(!1)),className:"flex items-center space-x-2 p-2 hover:bg-gray-100 cursor-pointer",children:[n.jsx("img",{src:null==r?void 0:r.pictureURL,alt:null==r?void 0:r.channelName,className:"w-6 h-6 rounded-full",referrerPolicy:"no-referrer"}),n.jsx("span",{className:"truncate",children:null==r?void 0:r.channelName})]},r.id))}),n.jsx("div",{className:"border-t border-gray-200  bg-gray-50 text-center flex ",children:n.jsx("button",{onClick:()=>l(),className:"w-full p-2 text-sm font-medium text-blue-600 hover:text-blue-700 hover:bg-blue-100 cursor-pointer",children:"+ Add Channel"})})]})]})};function y({mbc:r}){const[s,l]=d.useState(!1);return n.jsxs(n.Fragment,{children:[!s&&n.jsx("div",{className:"fixed inset-0 bg-black/10 z-[1000]"}),n.jsx("div",{className:e("absolute inset-0 flex items-center justify-center z-[2000]",s&&"hidden"),children:n.jsxs("div",{id:"msgContainer",className:"flex flex-col m-auto  w-[500px] gap-3 z-[2000] bg-white border border-slate-400 rounded-lg overflow-hidden absolute",children:[n.jsxs("div",{className:"flex p-4 bg-sky-100 text-sky-600 place-items-center text-lg",children:[n.jsx("div",{className:"w-1/2",id:"msgTitle",children:r.title}),n.jsx("div",{id:"btnCloseMsgContainer",className:" ml-auto cursor-pointer",onClick:()=>{l(!0)},children:n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24",className:"fill-red-500",children:n.jsx("path",{d:"M256-213.847 213.847-256l224-224-224-224L256-746.153l224 224 224-224L746.153-704l-224 224 224 224L704-213.847l-224-224-224 224Z"})})})]}),n.jsx("div",{className:"flex justify-center m-[15px] mb-[25px]",children:n.jsx("div",{id:"msgTxt",children:r.message})})]})})]})}function N({setErrMsg:r,validateChannel:e}){const{appLoginInfo:a,setSubscriptionResult:i}
1=d.useContext(s),[o,c]=d.useState(),[w,v]=d.useState(!1),g=t(),j=m(),b=u(),N={showIcon:!0,style:{base:{fontSize:"16px",color:"#333","::placeholder":{color:"#a0a0a0"}},invalid:{color:"#e53e3e"}}};return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"\r\n          flex\r\n          w-full\r\n          min-w-0\r\n          flex-col\r\n          rounded-md\r\n          bg-white\r\n        ",children:[n.jsxs("div",{className:"\r\n            flex\r\n            w-full\r\n            min-w-0\r\n            flex-col\r\n          ",children:[n.jsxs("div",{children:["Card number",n.jsx("span",{className:"text-red-500",children:"*"})]}),n.jsx("div",{className:"\r\n              w-full\r\n              min-w-0\r\n              rounded-sm\r\n              border-2\r\n              p-2\r\n            ",children:n.jsx(x,{options:N})})]}),n.jsxs("div",{className:"\r\n            mt-2\r\n            flex\r\n            w-full\r\n            min-w-0\r\n            flex-col\r\n            gap-3\r\n\r\n            sm:flex-row\r\n          ",children:[n.jsxs("div",{className:"\r\n              flex\r\n              w-full\r\n              min-w-0\r\n              flex-col\r\n\r\n              sm:w-1/2\r\n            ",children:[n.jsxs("div",{children:["Expiration",n.jsx("span",{className:"text-red-500",children:"*"})]}),n.jsx("div",{className:"\r\n                w-full\r\n                min-w-0\r\n                rounded-sm\r\n                border-2\r\n                p-2\r\n              ",children:n.jsx(h,{options:N})})]}),n.jsxs("div",{className:"\r\n              flex\r\n              w-full\r\n              min-w-0\r\n              flex-col\r\n\r\n              sm:w-1/2\r\n            ",children:[n.jsxs("div",{children:["CVC",n.jsx("span",{className:"text-red-500",children:"*"})]}),n.jsxs("div",{className:"\r\n                flex\r\n                w-full\r\n                min-w-0\r\n                flex-row\r\n                items-center\r\n                rounded-sm\r\n                border-2\r\n              ",children:[n.jsx("div",{className:"\r\n                  m-2\r\n                  min-w-0\r\n                  flex-1\r\n                ",children:n.jsx(f,{options:N})}),n.jsx(p,{className:"\r\n                  mr-2\r\n                  size-9\r\n                  shrink-0\r\n                  fill-gray-400\r\n\r\n                  hover:fill-gray-500\r\n                "})]})]})]}),n.jsx("div",{className:"\r\n            my-3\r\n            flex\r\n            w-full\r\n            justify-center\r\n          ",children:n.jsx("button",{type:"button",disabled:!j||w,onClick:async()=>{var n,s,d,t,o,m,u;const h=e();try{if(!h||""==(null==h?void 0:h.channelId))return;if(!j||!b)return;v(!0),r("");const e=b.getElement(x),{error:f,paymentMethod:p}=await j.createPaymentMethod({type:"card",card:e});if(f)return r(f.message||"Failed to create payment method"),void v(!1);const w={PaymentMethodId:p.id,PricingId:h.pricingId,ChannelId:h.echannelId,ChannelGId:h.echannelGId,RefundId:h.refundId,PromoCode:h.promoCode},y=await l.post("/api/payment/createsubscription",w,{headers:{Authorization:`${null==a?void 0:a.token}`}});if("success"==(null==(n=null==y?void 0:y.data)?void 0:n.status)){if(0==(null==(d=null==(s=null==y?void 0:y.data)?void 0:s.data)?void 0:d.errorCode))i(y.data.data),g("../checkout/ordersummary");else if(3e3==(null==(o=null==(t=null==y?void 0:y.data)?void 0:t.data)?void 0:o.errorCode)){const{error:r,paymentIntent:n}=await j.handleNextAction({clientSecret:y.data.data.piClientSecret});r||(i(y.data.data),g("../checkout/ordersummary"))}else if(6e3==(null==(u=null==(m=null==y?void 0:y.data)?void 0:m.data)?void 0:u.errorCode)){const r={message:y.data.data.errorMsg,title:"Error"};c(r)}}else{const r={message:y.data.data.errorMsg,title:"Error"};c(r)}}catch(f){r(f.message||"Payment failed")}finally{v(!1)}},className:"\r\n              mt-3\r\n              w-full\r\n              cursor-pointer\r\n              rounded-full\r\n              border\r\n              bg-indigo-600\r\n              px-6\r\n              py-2\r\n              text-white\r\n              shadow-2xl\r\n              shadow-indigo-500/50\r\n              drop-shadow-2xl\r\n\r\n              disabled:cursor-not-allowed\r\n              disabled:opacity-60\r\n\r\n              sm:w-auto\r\n            ",children:w?n.jsxs("div",{className:"\r\n                  z-40\r\n                  flex\r\n                  items-center\r\n                  justify-center\r\n                  gap-3\r\n                ",children:[n.jsx("div",{className:"\r\n                    size-6\r\n                    animate-spin\r\n                    rounded-full\r\n                    border-4\r\n                    border-white\r\n                    border-t-transparent\r\n                  "}),n.jsx("span",{children:"Processing"})]}
1):"Pay and Subscribe"})})]}),o&&n.jsx(y,{mbc:o})]})}function C({refund:r}){const[e,s]=d.useState(!1);return n.jsxs("div",{id:"yc-RefundSection",className:"\r\n        flex\r\n        w-full\r\n        min-w-0\r\n        flex-col\r\n      ",children:[n.jsxs("div",{className:"\r\n          flex\r\n          w-full\r\n          min-w-0\r\n          flex-col\r\n          gap-2\r\n          py-2\r\n          pr-2\r\n\r\n          sm:flex-row\r\n          sm:items-center\r\n        ",children:[n.jsx("div",{className:"\r\n            shrink-0\r\n            font-medium\r\n\r\n            sm:w-32\r\n            sm:font-normal\r\n          ",children:"Refund Amount"}),n.jsxs("div",{className:"yc-RefundAmount min-w-0 break-words",children:[r.currencySymbol,r.refundAmount]}),n.jsx("div",{onClick:()=>{s(!e)},className:"\r\n            w-fit\r\n            cursor-pointer\r\n            text-blue-500\r\n            underline\r\n          ",children:e?"Hide details":"View details"})]}),e&&n.jsxs("div",{id:"yc-RefundDetail",className:"\r\n            mt-3\r\n            flex\r\n            w-full\r\n            min-w-0\r\n            flex-col\r\n            bg-slate-100\r\n          ",children:[n.jsxs("div",{className:"\r\n              flex\r\n              min-w-0\r\n              flex-col\r\n              gap-1\r\n              border-t-2\r\n              p-3\r\n\r\n              sm:flex-row\r\n              sm:gap-6\r\n              sm:pl-6\r\n            ",children:[n.jsx("div",{className:"\r\n                shrink-0\r\n                font-medium\r\n\r\n                sm:w-48\r\n                sm:font-normal\r\n              ",children:"Original Amount"}),n.jsxs("div",{id:"yc-OriginalAmount",className:"min-w-0 break-words",children:[r.currencySymbol,r.originalAmount]})]}),n.jsxs("div",{className:"\r\n              flex\r\n              min-w-0\r\n              flex-col\r\n              gap-1\r\n              border-t-2\r\n              p-3\r\n\r\n              sm:flex-row\r\n              sm:gap-6\r\n              sm:pl-6\r\n            ",children:[n.jsx("div",{className:"\r\n                shrink-0\r\n                font-medium\r\n\r\n                sm:w-48\r\n                sm:font-normal\r\n              ",children:"License used period"}),n.jsx("div",{id:"yc-UsedPeriod",className:"min-w-0 break-words",children:`${r.monthsUsed} Month ${r.daysUsed} Days`})]}),n.jsxs("div",{className:"\r\n              flex\r\n              min-w-0\r\n              flex-col\r\n              gap-1\r\n              border-t-2\r\n              p-3\r\n\r\n              sm:flex-row\r\n              sm:gap-6\r\n              sm:pl-6\r\n            ",children:[n.jsx("div",{className:"\r\n                shrink-0\r\n                font-medium\r\n\r\n                sm:w-48\r\n                sm:font-normal\r\n              ",children:"Used charge"}),n.jsx("div",{id:"yc-UsedCharge",className:"min-w-0 break-words",children:r.usedCharge})]}),n.jsxs("div",{className:"\r\n              flex\r\n              min-w-0\r\n              flex-col\r\n              gap-1\r\n              border-t-2\r\n              p-3\r\n\r\n              sm:flex-row\r\n              sm:gap-6\r\n              sm:pl-6\r\n            ",children:[n.jsx("div",{className:"\r\n                shrink-0\r\n                font-medium\r\n\r\n                sm:w-48\r\n                sm:font-normal\r\n              ",children:"Total refund"}),n.jsx("div",{className:"yc-RefundAmount min-w-0 break-words",children:r.refundAmount})]})]})]})}function k(){const{appLoginInfo:r,upgradeChannel:m}=d.useContext(s),[u,x]=d.useState("0"),[h,f]=d.useState([]),[p,g]=d.useState([]),[y,k]=d.useState(null),[S,I]=d.useState(void 0),[T,P]=d.useState(),[A,z]=d.useState(null),[E,L]=d.useState(null),[O,q]=d.useState(!1),[M,F]=d.useState(!1),[R,$]=d.useState(""),[U,B]=d.useState(),G=d.useRef(null),Y=t(),Z=[{key:"1",text:"Monthly",additionalElement:n.jsx(n.Fragment,{})},{key:"2",text:"Yearly",additionalElement:n.jsx(n.Fragment,{})}],{selectedPricingId:V}=o(),_=a({flow:"auth-code",include_granted_scopes:!1,scope:"https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile openid",onSuccess:async n=>{const e=n.code,s=await l.post("/api/Dashboard/AddChannel",JSON.stringify({code:e}),{headers:{"Content-Type":"application/json",Authorization:`${null==r?void 0:r.token}`}});f(s.data)},onError:r=>{}}),D=()=>{P(void 0),I(void 0)};return d.useEffect(()=>{E&&"Trial"!=(null==E?void 0:E.licenseType)&&"Basic"!=(null==E?void 0:E.licenseType)?l.get("/api/Payment/CalculateRefundForChannel",{params:{channelId:null==E?void 0:E.echannelId},headers:{Authorization:`${null==r?void 0:r.token}`}}).then(r=>{B(r.data)}).catch(()=>{}).finally(()=>{}):B(void 0)},[E]),d.useEffect(()=>{(async()=>{try{const n=(await l.get("/api/Payment/GetPublishableKey",{headers:{Authorization:`${null==r?void 0:r.token}`}})).data.publishableKey;z(v(n))}catch(n){}})()},[null==r?void 0:r.token]),d.useEffect(()=>{q(!0),l.get("/api/Checkout/GetInitialData",{params:{PricingId:V},headers:{Authorization:`${null==r?void 0:r.token}`}}).then(r=>{var n;const e=r.data;f(e.associatedChannels),g(e.licensePricing);const s=e.licensePricing.find(r=>r.pricingId==V);if(k(s||null),x(String(s.periodId)),m){const r=null==(n=e.associatedChannels)?void 0:n.find(r=>r.channelId===(null==m?void 0:m.channelId));L(r)}}).catch(r=>{}).finally(()=>{q(!1)})},[]),d.useEffect(()=>{D();const r=null==p?void 0:p.find(r=>r.periodId==parseInt(u));k(r||null)},[u]),n.jsxs("div",{className:"\r\n        relative\r\n        m-3\r\n        flex\r\n        w-[calc(100%-1.5rem)]\r\n        min-w-0\r\n        max-w-2xl\r\n        flex-col\r\n        rounded-md\r\n        border-2\r\n        bg-white\r\n        px-3\r\n        pb-3\r\n        text-[15px]\r\n\r\n        sm:w-full\r\n      ",children:[n.jsx(i,{title:"TubeNXT Checkout – Complete Your Subscription",description:"Securely complete your TubeNXT subscription purchase. Cho
1ose your plan, enter payment details, and start growing your YouTube channel with AI tools and analytics.",keywords:"TubeNXT checkout, subscription purchase, payment, plan selection, YouTube tools"}),O&&n.jsx("div",{className:"\r\n            absolute\r\n            inset-0\r\n            z-40\r\n            flex\r\n            items-center\r\n            justify-center\r\n            bg-white/50\r\n          ",children:n.jsx("div",{className:"\r\n              size-10\r\n              animate-spin\r\n              rounded-full\r\n              border-4\r\n              border-blue-500\r\n              border-t-transparent\r\n            "})}),n.jsxs("div",{className:"\r\n          flex\r\n          min-w-0\r\n          flex-col\r\n          gap-1\r\n          py-3\r\n\r\n          sm:flex-row\r\n          sm:items-center\r\n          sm:gap-0\r\n        ",children:[n.jsx("div",{className:"\r\n            shrink-0\r\n            font-medium\r\n\r\n            sm:w-36\r\n            sm:font-normal\r\n          ",children:"License Type"}),n.jsxs("div",{className:"\r\n            flex\r\n            min-w-0\r\n            flex-wrap\r\n            items-center\r\n            gap-3\r\n          ",children:[n.jsx("div",{className:"min-w-0 break-words",children:y&&y.licenseType}),n.jsx("div",{onClick:()=>Y("../plan"),className:"\r\n              cursor-pointer\r\n              text-blue-600\r\n              underline\r\n            ",children:"Change"})]})]}),n.jsxs("div",{className:"\r\n          flex\r\n          min-w-0\r\n          flex-col\r\n          gap-2\r\n          border-t-2\r\n          py-3\r\n\r\n          sm:flex-row\r\n          sm:gap-0\r\n        ",children:[n.jsx("div",{className:"\r\n            shrink-0\r\n            font-medium\r\n\r\n            sm:w-36\r\n            sm:font-normal\r\n          ",children:"Billing"}),n.jsxs("div",{className:"\r\n            flex\r\n            min-w-0\r\n            flex-1\r\n            flex-col\r\n            gap-3\r\n          ",children:[n.jsx("div",{className:"w-fit max-w-full",children:n.jsx(c,{selectedTab:u,setSelectedTab:x,tabs:Z})}),n.jsx("div",{className:"\r\n              w-full\r\n              min-w-0\r\n              break-words\r\n            ",dangerouslySetInnerHTML:{__html:(null==y?void 0:y.pricingOfferText)||""}})]})]}),n.jsxs("div",{className:"\r\n          flex\r\n          min-w-0\r\n          flex-col\r\n          gap-2\r\n          border-t-2\r\n          py-3\r\n\r\n          sm:flex-row\r\n          sm:flex-wrap\r\n          sm:gap-0\r\n        ",children:[n.jsxs("div",{className:"\r\n            shrink-0\r\n            font-medium\r\n\r\n            sm:w-36\r\n            sm:font-normal\r\n          ",children:["Channel",n.jsx("span",{className:"text-red-500",children:"*"})]}),n.jsxs("div",{className:"\r\n            flex\r\n            min-w-0\r\n            flex-1\r\n            flex-col\r\n            gap-3\r\n\r\n            sm:flex-row\r\n            sm:items-center\r\n            sm:gap-4\r\n          ",children:[n.jsx("div",{className:e("flex w-full min-w-0 flex-row sm:w-auto",M&&(null==E?void 0:E.upgradeOrder)>=(null==y?void 0:y.upgradeOrder)?"rounded-md border-2 border-red-500":""),children:n.jsx("div",{className:"w-full min-w-0",children:n.jsx(b,{addChannel:()=>{_()},selected:(null==E?void 0:E.upgradeOrder)<(null==y?void 0:y.upgradeOrder)?E:void 0,setSelected:L,channels:h.filter(r=>(null==r?void 0:r.upgradeOrder)<(null==y?void 0:y.upgradeOrder)&&!r.licenseUpgradeInprogress)})})}),(null==E?void 0:E.upgradeOrder)<(null==y?void 0:y.upgradeOrder)&&n.jsx("a",{href:`https://www.youtube.com/channel/${E.channelId}`,target:"_blank",rel:"noreferrer",className:"\r\n                flex\r\n                h-[36px]\r\n                w-full\r\n                shrink-0\r\n                items-center\r\n                justify-center\r\n                rounded-full\r\n                border\r\n                bg-blue-200\r\n                px-3\r\n                text-blue-700\r\n\r\n                sm:w-auto\r\n              ",children:"View Channel"})]})]}),(null==E?void 0:E.upgradeOrder)<(null==y?void 0:y.upgradeOrder)&&U&&n.jsx("div",{className:"\r\n              flex\r\n              min-w-0\r\n              flex-row\r\n              items-start\r\n              border-t-2\r\n              py-3\r\n            ",children:n.jsx(C,{refund:U})}),n.jsxs("div",{className:"\r\n          flex\r\n          min-w-0\r\n          flex-col\r\n          gap-2\r\n          border-t-2\r\n          py-3\r\n\r\n          sm:flex-row\r\n          sm:items-start\r\n          sm:gap-0\r\n        ",children:[n.jsxs("div",{className:"\r\n            flex\r\n            shrink-0\r\n            flex-col\r\n\r\n            sm:w-36\r\n          ",children:[n.jsx("div",{className:"\r\n              font-medium\r\n\r\n              sm:w-36\r\n              sm:font-normal\r\n            ",children:"Amount"}),n.jsxs("div",{className:"text-[12px]",children:["Billed"," ",y&&(1==y.periodId?"monthly":y.currencySymbol+(S?null==T?void 0:T.yearlyPrice:y.price)+" annually")]})]}),n.jsxs("div",{className:"\r\n            flex\r\n            min-w-0\r\n            flex-wrap\r\n            items-center\r\n            gap-2\r\n\r\n            sm:gap-0\r\n          ",children:[n.jsxs("div",{className:"relative w-fit",children:[n.jsxs("div",{className:(S?"text-gray-400":"text-black")+" font-medium",children:[null==y?void 0:y.currencySymbol,y&&(1==y.periodId?y.price:y.price/12).toFixed(2)," ","/ ",n.jsx("span",{className:"text-[12px]",children:"Month"})]}),S&&n.jsx("div",{className:"\r\n                  absolute\r\n                  left-0\r\n                  top-1/2\r\n                  w-full\r\n                  border-t-2\r\n                  border-red-500\r\n                "})]}),S&&n.jsxs("div",{className:"\r\n                flex\r\n                items-center\r\n                font-semibold\r\n                text-green-700\r\n\r\n                sm:ml-4\r\n              ",children:[null==y?void 0:y.currencySymbol,y&&n.jsxs(n.Fragment,{children:[1===y.periodId?null==T?void 0:T.monthlyPrice:((null==T?void 0:T.yearlyPrice)??0).toFixed(2)," ","/ ",n.jsx("span",{className:"text-[12px]",children:"Month"})]})]})]})]}),n.jsxs("div",{className:"\r\n          flex\r\n          min-w-0\r\n          flex-col\r\n          gap-2\r\n          py-3\r\n\r\n          sm:flex-row\r\n          sm:items-center\r\n          sm:gap-0\r\n        ",children:[n.jsx("div",{className:"\r\n            shrink-0\r\n            font-medium\r\n\r\n            sm:w-36\r\n            sm:font-normal\r\n          ",children:"Promo code"}),!S&&n.jsxs("div",{className:"\r\n              w-full\r\n              min-w-0\r\n\r\n              sm:w-auto\r\n              sm:flex-1\r\n            ",children:[n.jsxs("div",{className:"\r\n                flex\r\n                h-9\r\n                w-full\r\n                min-w-0\r\n                items-center\r\n                rounded-full\r\n                border\r\n                px-[2px]\r\n              ",children:[n.jsx("input",{ref:G,id:"tg-PromoCode",type:"text",className:"\r\n                  h-7\r\n                  min-w-0\r\n                  flex-1\r\n                  rounded-full\r\n                  border-none\r\n                  pl-3\r\n                  outline-0\r\n\r\n                  focus:ring-0\r\n                "}),n.jsx("button",{id:"btnApply",type:"button",className:"\r\n                  h-7\r\n                  shrink-0\r\n                  cursor-pointer\r\n                  rounded-full\r\n                  border\r\n                  bg-blue-200\r\n                  px-4\r\n                  py-2\r\n                  leading-[9px]\r\n                  text-blue-700\r\n                ",onClick:()=>{var n;l.post("/api/Payment/ValidatePromoCode",{PricingId:V,PromoCode:null==(n=G.current)?void 0:n.value},{headers:{Authorization:`${null==r?void 0:r.token}`}}).then(r=>{var n;const e=r.data;if(""!=e.promoCode&&e.promoCode.toLowerCase()==(null==(n=G.current)?void 0:n.value.toLowerCase().trim())){I(!0);const r=(100-e.percentOff)/100,n={monthlyPrice:0,yearlyPrice:0,promoCode:e.promoCode};n.monthlyPrice=Number((r*((null==y?void 0:y.price)/12)).toFixed(2)),n.yearlyPrice=r*y.price.toFixed(2),P(n)}else I(!1)}).catch(r=>{})},children:"Apply"})]}),void 0!==S&&!S&&n.jsx("div",{className:"mt-1 text-red-500",children:"Invalid promo code"})]}),S&&n.jsxs("div",{className:"\r\n              flex\r\n              w-fit\r\n              max-w-full\r\n              flex-row\r\n              items-center\r\n              gap-3\r\n              rounded-full\r\n              border-2\r\n              px-4\r\n              py-1\r\n            ",children:[n.jsx("div",{className:"min-w-0 break-all",children:null==T?void 0:T.promoCode}),n.jsx(j,{className:"\r\n                size-5\r\n                shrink-0\r\n                cursor-pointer\r\n                fill-red-300\r\n              ",onClick:D})]})]}),n.jsxs("div",{className:"\r\n          flex\r\n          min-w-0\r\n          flex-col\r\n          gap-1\r\n          border-t-2\r\n          py-3\r\n\r\n          sm:flex-row\r\n          sm:items-center\r\n          sm:gap-0\r\n        ",children:[n.jsx("div",{className:"\r\n            shrink-0\r\n            font-semibold\r\n\r\n            sm:w-36\r\n          ",children:"Amount due today"}),n.jsx("div",{className:"\r\n            min-w-0\r\n            break-words\r\n            text-lg\r\n            font-semibold\r\n            text-orange-500\r\n\r\n            sm:pl-6\r\n          ",children:y&&y.currencySymbol+y.price.toFixed(2)})]}),n.jsx("div",{className:"w-full min-w-0",children:A?n.jsx(w,{stripe:A,children:n.jsx(N,{setErrMsg:$,validateChannel:()=>{if(E)return(null==E?void 0:E.upgradeOrder)>=(null==y?void 0:y.upgradeOrder)?(F(!0),void $("Channel required. please select or add one")):(F(!1),E.pricingId=null==y?void 0:y.pricingId,E.refundId=0,E.promoCode=null==T?void 0:T.promoCode,E)}})}):n.jsx("div",{children:"Loading Stripe..."})}),n.jsxs("div",{id:"cardErrorph",className:e("\n            mb-3\n            flex\n            min-w-0\n            items-start\n            justify-center\n            px-2\n            text-red-500\n\n            sm:items-center\n          ",""==R?"hidden":""),children:[n.jsx("svg",{className:"\r\n            mt-0.5\r\n            size-[18px]\r\n            shrink-0\r\n            fill-red-400\r\n\r\n            sm:mt-0\r\n          ",xmlns:"http://www.w3.org/2000/svg",height:"18",viewBox:"0 -960 960 960",width:"18",children:n.jsx("path",{d:"M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240Zm40 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q
1-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"})}),n.jsx("div",{id:"cardError",className:"\r\n            ml-2\r\n            min-w-0\r\n            break-words\r\n          ",children:R})]}),n.jsx("div",{className:"\r\n          flex\r\n          w-full\r\n          min-w-0\r\n          text-[10px]\r\n        ",children:n.jsx("span",{className:"\r\n            w-full\r\n            break-words\r\n            text-center\r\n            leading-relaxed\r\n          ",children:"Once your initial payment is processed, our service begins immediately. All purchases are final. Your subscription auto-renews, but you can cancel anytime at no extra cost. Just do so at least 24 hours before the current term ends. Your access remains until the end of the term upon cancellation."})})]})}export{k as default};

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.