1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[929],{3828:function(e,s,t){let i=t(7294),l=i.forwardRef(function({title:e,titleId:s,...t},l){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":s},t),e?i.createElement("title",{id:s},e):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z"}))});e.exports=l},8622:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/home/dashboard/account",function(){return t(4355)}])},3379:function(e,s,t){"use strict";t.d(s,{JZ:function(){return n},TC:function(){return u},V0:function(){return x},eN:function(){return o},jJ:function(){return i},je:function(){return d},m:function(){return c},sW:function(){return a},tf:function(){return p},zM:function(){return l}});let i=5,l=3,n={NONE:"NONE",TRANSCRIPT:"TRANSCRIPT",SEARCH_CHAT:"SEARCH_CHAT",SUMMARY_KEYNOTES:"SUMMARY_KEYNOTES",MINDMAP:"MINDMAP",STEPBYSTEP:"STEPBYSTEP",BLOGPOST:"BLOGPOST"},r=e=>(e-e%60)/60,o=e=>{let s=r(e);return s>0?s:1},a=e=>{let s=r(e),t=s>l-1?s:l;return(t-t%l)/l},c=e=>{let s=o(e);return 1*s},d=e=>{let s=o(e);return s*i},u=3,p=[{productId:"v4yo26o7jpoqelfr5gfqqwd7",priceUSD:"5.99",credits:200},{productId:"bwstt0bm17u8zt5fg5v93017",priceUSD:"10.99",credits:400}
1,{productId:"cid7j158njd9gfdcyubr3c31",priceUSD:"18.99",credits:800},{productId:"avm3spm6ismu97sz16xs43s0",priceUSD:"33.99",credits:1500}],x=[{productId:"klrl2upio6fn2pkjvs96x8rs",priceUSD:"11.99",credits:550,isMostPopular:!1,title:"Basic",description:"Get started with our basic package and receive 550 credits to complete your operations."},{productId:"b41h94aozpjhjslphmmsrlas",priceUSD:"21.99",credits:1100,isMostPopular:!0,title:"Standard",description:"Upgrade to our standard package and receive double the credits, giving you more flexibility to complete your operations."},{productId:"mosjmfpuhggpz4ekh2c8hljk",priceUSD:"43.99",credits:2450,isMostPopular:!1,title:"Premium",description:"Take your operations to the next level with our premium package, offering even more credits for your needs."},{productId:"m7gxoypmb2mbw8nrli7qvfmd",priceUSD:"87.99",credits:5200,isMostPopular:!1,title:"Business",description:"For those with high-volume needs, our business package offers the most credits at the best value to power through your operations."}]},5022:function(e,s,t){"use strict";var i=t(5893),l=t(6010);let n=e=>{let{similarity:s,size:t="2.5rem",className:n=""}=e;return(0,i.jsxs)("div",{className:(0,l.Z)("radial-progress select-none text-xs",n),style:{"--value":Math.round(100*s),"--size":t},children:[Math.round(100*s),"%"]})};s.Z=n},4355:function(e,s,t){"use strict";t.r(s);var i=t(5893),l=t(8709),n=t(2326),r=t(3379),o=t(5022),a=t(3990),c=t(6736),d=t(6494),u=t(6963),p=t(3828),x=t(6010),m=t(381),f=t.n(m),h=t(3299),b=t(9008),v=t.n(b),j=t(1163),w=t(7294);let N=()=>{var e,s,t,m,b,N,y,g,P,T,C;let E=(0,j.useRouter)(),[S,A]=(0,w.useState)(!1),{data:M,status:k}=(0,h.useSession)(),Z=null==M?void 0:M.user,I=null==Z?void 0:null===(e=Z.subscription)||void 0===e?void 0:e.expiresAt;f().relativeTimeThreshold("d",33);let U=f()(I).fromNow(),_=f()(I).format("MMMM Do YYYY, [at] h:mm a"),D=async()=>{try{A(!0);let e=await fetch("/api/payment/stripe/generateCustomerPortalUrl",{method:"POST"}),s=await e.json();(null==s?void 0:s.ok)&&(null==s?void 0:s.portalUrl)&&E.push(null==s?void 0:s.portalUrl)}catch(t){}finally{A(!1)}},R=null==Z?void 0:null===(s=Z.subscription)||void 0===s?void 0:s.status;return(0,i.jsxs)(a.Z,{children:[(0,i.jsx)(v(),{children:(0,i.jsx)("title",{children:"My Account - DeepTube.ai"})}),(0,i.jsx)(n.Z,{children:(0,i.jsx)("div",{className:"divider divider-vertical",children:(0,i.jsxs)("span",{className:"w-full whitespace-pre-wrap text-center text-xl font-medium",children:["Welcome back ",(0,i.jsx)("span",{className:"font-semibold",children:null==Z?void 0:Z.name}),(0,i.jsx)("br",{}),null==Z?void 0:Z.email]})})}),(0,i.jsxs)(n.Z,{className:"font-medium",children:[(null==Z?void 0:Z.subscription)&&(0,i.jsx)(l.Z,{className:"",children:(0,i.jsxs)("div",{className:"min-h-12 flex w-full flex-row flex-wrap items-center justify-between gap-4 px-2",children:[(0,i.jsx)("span",{className:"flex-1 font-semibold",children:"Credits Balance"}),(0,i.jsx)(o.Z,{similarity:Z.subscription.credits/Z.subscription.creditAmount,size:"3.2rem",className:"!text-sm font-bold"}),(0,i.jsxs)("div",{className:"flex flex-1 flex-row items-center justify-end",children:[(0,i.jsx)("span",{className:"font-bold",children:Z.subscription.credits}),(0,i.jsx)(c.Z,{className:"ml-1 h-5 w-5"})]})]})}),(null==Z?void 0:Z.subscription)&&(0,i.jsx)(l.Z,{className:"",children:(0,i.jsxs)("div",{className:"min-h-12 flex w-full flex-row flex-wrap items-center justify-between gap-4 px-2",children:[(0,i.jsx)("span",{className:"flex-1 font-semibold",children:"Current Subscription"}),(0,i.jsxs)("div",{className:"rounded-box mx-auto flex flex-row flex-wrap items-center gap-2 bg-base-200 px-4 py-2 text-center font-bold",children:[(0,i.jsxs)("span",{className:"mx-auto w-fit",children:[Z.subscription.planTitle," Plan"]}),(0,i.jsxs)("span",{className:"rounded-box mx-auto flex w-fit flex-row items-center gap-2 bg-base-300 px-2 py-1 text-sm font-semibold",children:[(0,i.jsx)("div",{className:(0,x.Z)("h-4 w-4 rounded-full","ACTIVE"===R&&"bg-success","CANCELED"===R&&"bg-error")}),"ACTIVE"===R&&"Active"||"CANCELED"===R&&"Canceled"]})]}),(0,i.jsxs)("div",{className:"flex flex-1 flex-row flex-wrap items-center justify-end gap-y-4",children:[(0,i.jsx)("button",{type:"button",className:"btn opacity-50 transition-opacity hover:opacity-100",onClick:()=>E.push("/dashboard/shop"),children:(null==Z?void 0:null===(t=Z.subscription)||void 0===t?void 0:t.nextPeriodPlanTitle)&&(null==Z?void 0:null===(m=Z.subscription)||void 0===m?void 0:m.nextPeriodPlanTitle)!==(null==Z?void 0:null===(b=Z.subscription)||void 0===b?void 0:b.planTitle)||(null==Z?void 0:null===(N=Z.subscription)||void 0===N?void 0:N.status)==="CANCELED"?"Reactivate":"Update Plan"}),(0,i.jsxs)("div",{className:"ml-4 flex flex-none flex-row flex-nowrap items-center",children:[(0,i.jsx)("span",{className:"font-bold",children:Z.subscription.creditAmount}),(0,i.jsx)(c.Z,{className:"ml-1 h-5 w-5"}),(0,i.jsx)("span",{className:"ml-1 font-medium",children:"/ month"})]})]})]})}),!(null==Z?void 0:Z.subscription)&&(0,i.jsx)(l.Z,{className:"",children:(0,i.jsxs)("div",{className:"min-h-12 flex w-full flex-row flex-wrap items-center justify-between gap-4 px-2",children:[(0,i.jsx)("span",{className:"flex-1 font-semibold",children:"Current Subscription"}),(0,i.jsx)("div",{className:"rounded-box mx-auto flex flex-row items-center gap-2 bg-base-200 px-4 py-2 font-bold",children:"Not Subscribed"}),(0,i.jsxs)("div",{className:"flex flex-1 flex-row flex-wrap items-center justify-end gap-y-4",children:[(0,i.jsx)("button",{type:"button",className:"btn opacity-50 transition-opacity hover:opacity-100",onClick:()=>E.push("/dashboard/shop"),children:"Get Started"}),(0,i.jsxs)("div",{className:"ml-4 flex flex-none flex-row flex-nowrap items-center",children:[(0,i.jsx)("span",{className:"font-bold",children:"0"}),(0,i.jsx)(c.Z,{className:"ml-1 h-5 w-5"}),(0,i.jsx)("span",{className:"ml-1 font-medium",children:"/ month"})]})]})]})}),(null==Z?void 0:Z.subscription)&&(null==Z?void 0:null===(y=Z.subscription)||void 0===y?void 0:y.nextPeriodPlanTitle)&&(null==Z?void 0:null===(g=Z.subscription)||void 0===g?void 0:g.nextPeriodPlanTitle)!==(null==Z?void 0:null===(P=Z.subscription)||void 0===P?void 0:P.planTitle)&&(null==Z?void 0:Z.subscription.status)==="ACTIVE"&&(0,i.jsx)(l.Z,{className:"",children:(0,i.jsxs)("div",{className:"min-h-12 flex w-full flex-row flex-wrap items-center justify-between gap-4 px-2",children:[(0,i.jsx)("span",{className:"flex-1 font-semibold",children:"Next Plan"}),(0,i.jsxs)("div",{className:"rounded-box mx-auto flex flex-row items-center gap-2 bg-base-200 px-4 py-2 font-bold",children:[Z.subscription.nextPeriodPlanTitle," Plan"]}),(0,i.jsxs)("div",{className:"flex flex-1 flex-row flex-wrap items-center justify-end gap-y-4",children:[(0,i.jsx)("button",{type:"button",className:"btn opacity-50 transition-opacity hover:opacity-100",onClick:()=>E.push("/dashboard/shop"),children:"Update Plan"}),(0,i.jsxs)("div",{className:"ml-4 flex flex-none flex-row flex-nowrap items-center",children:[(0,i.jsx)("span",{className:"font-bold",children:null===(T=r.V0.find(e=>{var s;return e.title===(null==Z?void 0:null===(s=Z.subscription)||void 0===s?void 0:s.nextPeriodPlanTitle)}))||void 0===T?void 0:T.credits}),(0,i.jsx)(c.Z,{className:"ml-1 h-5 w-5"}),(0,i.jsx)("span",{className:"ml-1 font-medium",children:"/ month"})]})]})]})}),(null==Z?void 0:Z.subscription)&&(0,i.jsx)(l.Z,{className:"",children:(0,i.jsxs)("div",{className:"min-h-12 flex w-full flex-row flex-wrap items-center justify-between gap-4 px-2",children:[(0,i.jsx)("span",{className:"flex-1 font-semibold",children:(null==Z?void 0:null===(C=Z.subscription)||void 0===C?void 0:C.status)==="ACTIVE"?"Credits Renewal":"Credits Expiration"}),(0,i.jsx)("div",{className:"rounded-box mx-auto bg-base-200 px-4 py-2 font-medium",children:U}),(0,i.jsx)("span",{className:"flex flex-1 flex-row justify-end text-center font-semibold",children:_})]})}),(0,i.jsx)(l.Z,{className:"",children:(0,i.jsxs)("div",{className:"min-h-12 flex w-full flex-row flex-wrap items-center justify-between gap-4 px-2",children:[(0,i.jsx)("span",{className:"w-fit font-semibold",children:"Reserve Credits"}),(0,i.jsxs)("div",{className:"ml-auto flex flex-row flex-wrap items-center justify-end gap-y-4",children:[(0,i.jsxs)("button",{type:"button",className:"btn flex flex-row items-center gap-2 opacity-50 transition-opacity hover:opacity-100",onClick:()=>E.push("/dashboard/shop"),children:[(0,i.jsx)(u,{className:"h-5 w-5"}),"Add More"]}),(0,i.jsxs)("div",{className:"ml-4 flex flex-row flex-nowrap items-center",children:[(0,i.jsx)("span",{className:"font-bold",children:null==Z?void 0:Z.credits}),(0,i.jsx)(d.Z,{className:"ml-1 h-5 w-5"})]})]})]})})]}),(0,i.jsx)(n.Z,{className:"font-medium",children:(0,i.jsx)(l.Z,{className:"",children:(0,i.jsxs)("div",{className:"min-h-12 flex w-full flex-row flex-wrap items-center justify-between gap-4 px-2",children:[(0,i.jsx)("span",{className:"font-semibold",children:"Manage Billing and Payment Methods"}),(0,i.jsxs)("button",{type:"button",className:(0,x.Z)("btn flex h-fit w-fit flex-row flex-wrap items-center gap-2 py-2 opacity-50 transition-opacity hover:opacity-100",S&&"loading"),onClick:D,children:[!S&&(0,i.jsx)(p,{className:"h-5 w-5"}),"Customer Portal"]})]})})})]})};s.default=N}},function(e){e.O(0,[885,6,981,514,450,774,888,179],function(){return e(e.s=8622)}),_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.