1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[48849],{9700:(e,a,t)=>{t.d(a,{ModeSwitcher:()=>f});var s=t(84755),r=t(24525),c=t(66598),l=t(71473),n=t(38442),i=t(22688),o=t(11283),d=t(5586),u=t(81631),m=t(88019);function f(e){var a;let{className:t}=e;if(!(null===(a=l.u.ui.mode)||void 0===a?void 0:a.enableSwitch))return null;let{setTheme:f}=(0,m.D)(),h=(0,u.c)("Common.mode");return(0,s.jsxs)(c.rI,{children:[(0,s.jsx)(c.ty,{asChild:!0,children:(0,s.jsxs)(r.$,{variant:"ghost",size:"sm",className:(0,n.cn)("size-8 p-0.5 border border-border rounded-full cursor-pointer",t),children:[(0,s.jsx)(i.A,{className:"rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,s.jsx)(o.A,{className:"absolute rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,s.jsx)("span",{className:"sr-only",children:h("label")})]})}),(0,s.jsxs)(c.SQ,{align:"end",children:[(0,s.jsxs)(c._2,{onClick:()=>f("light"),className:"cursor-pointer",children:[(0,s.jsx)(i.A,{className:"mr-2 size-4"}),(0,s.jsx)("span",{children:h("light")})]}),(0,s.jsxs)(c._2,{onClick:()=>f("dark"),className:"cursor-pointer",children:[(0,s.jsx)(o.A,{className:"mr-2 size-4"}),(0,s.jsx)("span",{children:h("dark")})]}),(0,s.jsxs)(c._2,{onClick:()=>f("system"),className:"cursor-pointer",children:[(0,s.jsx)(d.A,{className:"mr-2 size-4"}),(0,s.jsx)("span",{children:h("system")})]})]})]})}},12561:(e,a,t)=>{t.d(a,{y:()=>l});var s=t(69038),r=t(82600),c=t(36858);let l=(0,r.M)({baseURL:(0,c.$_)(),plugins:[(0,s.px)(),(0,s.Zn)()]})},36858:(e,a,t)=>{t.d(a,{$_:()=>r,lx:()=>l,zM:()=>c});var s=t(77828);function r(){return window.location.origin.replace(/\/+$/,"")}t(55131);function c(e,a){var t;if(!((t=a)&&t!==s.DT.defaultLocale&&"default"!==t))return e;try{let t=new URL(e),s=t.searchParams.get("callbackURL");if(s&&!s.match(new RegExp("^/".concat(a,"(/|$)")))){let e=s.startsWith("/")?"/".concat(a).concat(s):"/".concat(a,"/").concat(s);t.searchParams.set("callbackURL",e)}return t.toString()}catch(a){return console.warn("Failed to parse URL for locale insertion:",e,a),e}}function l(e){return"https://dashboard.stripe.com/customers/".concat(e)}},39125:(e,a,t)=>{t.d(a,{u:()=>j});var s=t(84755),r=t(93722),c=t(66598),l=t(90751),n=t(83197),i=t(1560),o=t(31512),d=t(81631),u=t(71473),m=t(43896),f=t(12561),h=t(33069),v=t(435),g=t(75652),x=t(93559),p=t(30692),k=t(41588);function b(){if(!u.u.credits.enableCredits)return null;let e=(0,d.c)("Marketing.avatar"),a=(0,m.tx)(),{data:t=0,isLoading:r}=(0,x.JB)();return(0,s.jsxs)("div",{className:"flex items-center justify-between cursor-pointer w-full",onClick:()=>{a.push(l.BV.SettingsCredits)},children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2.5",children:[(0,s.jsx)(p.A,{className:"h-4 w-4"}),(0,s.jsx)("p",{className:"text-sm",children:e("credits")})]}),(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)("p",{className:"text-sm font-medium",children:r?(0,s.jsx)(k.A,{className:"h-4 w-4 animate-spin"}):t.toLocaleString()})})]})}function j(e){let{user:a}=e,t=(0,d.c)(),x=function(){let e=(0,d.c)("Marketing.avatar");return[{title:e("dashboard"),href:l.BV.Dashboard,icon:(0,s.jsx)(n.A,{className:"size-4 shrink-0"})},{title:e("billing"),href:l.BV.SettingsBilling,icon:(0,s.jsx)(i.A,{className:"size-4 shrink-0"})},{title:e("settings"),href:l.BV.SettingsProfile,icon:(0,s.jsx)(o.A,{className:"size-4 shrink-0"})}]}(),p=(0,m.tx)(),[k,j]=(0,v.useState)(!1),y=async()=>{await f.y.signOut({fetchOptions:{onSuccess:()=>{console.log("sign out success"),p.replace("/")},onError:e=>{console.error("sign out error:",e),g.o.error(t("Common.logoutFailed"))}}})};return(0,s.jsxs)(c.rI,{open:k,onOpenChange:j,children:[(0,s.jsx)(c.ty,{children:(0,s.jsx)(r.H,{name:a.name,image:a.image,className:"size-8 border cursor-pointer"})}),(0,s.jsxs)(c.SQ,{align:"end",children:[(0,s.jsx)("div",{className:"flex items-center justify-start gap-2 p-2",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-1 leading-none",children:[(0,s.jsx)("p",{className:"font-medium",children:a.name}),(0,s.jsx)("p",{className:"w-[200px] truncate text-sm text-muted-foreground",children:a.email})]})}),(0,s.jsx)(c.mB,{}),u.u.credits.enableCredits&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c._2,{className:"cursor-pointer",children:(0,s.jsx)(b,{})}),(0,s.jsx)(c.mB,{})]}),x.map(e=>(0,s.jsx)(c._2,{className:"cursor-pointer",onClick:()=>{e.href&&p.push(e.href)},children:(0,s.jsxs)("div",{className:"flex items-center space-x-2.5",children:[e.icon?e.icon:null,(0,s.jsx)("p",{className:"text-sm",children:e.title})]})}
1,e.title)),(0,s.jsx)(c.mB,{}),(0,s.jsx)(c._2,{className:"cursor-pointer",onSelect:async e=>{e.preventDefault(),j(!1),y()},children:(0,s.jsxs)("div",{className:"flex items-center space-x-2.5",children:[(0,s.jsx)(h.A,{className:"size-4"}),(0,s.jsx)("p",{className:"text-sm",children:t("Common.logout")})]})})]})]})}},43896:(e,a,t)=>{t.d(a,{XO:()=>c,iN:()=>i,tx:()=>o});var s=t(14863),r=t(77828);let{Link:c,getPathname:l,redirect:n,usePathname:i,useRouter:o}=(0,s.A)(r.DT)},47030:(e,a,t)=>{t.d(a,{D:()=>c});var s=t(97417),r=t(75331);let c=(0,s.v)()((0,r.Zr)(e=>({currentLocale:"",setCurrentLocale:a=>e(()=>({currentLocale:a}))}),{name:"locale-storage",partialize:e=>({currentLocale:e.currentLocale})}))},50441:(e,a,t)=>{t.d(a,{Q:()=>r});var s=t(5919);let r=(0,s.createServerReference)("7f8fd48b5d665a6751154d47532d812d226ba9c204",s.callServer,void 0,s.findSourceMapURL,"getCreditBalanceAction")},65901:(e,a,t)=>{t.d(a,{default:()=>g});var s=t(84755),r=t(24525),c=t(66598),l=t(71473),n=t(43896),i=t(77828),o=t(38442),d=t(47030),u=t(51689),m=t(95252),f=t(81631),h=t(76205),v=t(435);function g(e){let{className:a}=e;if(!(Object.keys(l.u.i18n.locales).length>1))return null;let t=(0,n.tx)(),g=(0,n.iN)(),x=(0,h.useParams)(),p=(0,m.Ym)(),{currentLocale:k,setCurrentLocale:b}=(0,d.D)(),[j,y]=(0,v.useTransition)(),N=(0,f.c)("Common");(0,v.useEffect)(()=>{b(p)},[p,b]);let S=e=>{e!==p&&(b(e),document.cookie="".concat(i.gB,"=").concat(e,"; path=/; max-age=").concat(31536e3),y(()=>{t.replace({pathname:g,params:x},{locale:e})}))};return(0,s.jsxs)(c.rI,{children:[(0,s.jsx)(c.ty,{asChild:!0,children:(0,s.jsxs)(r.$,{variant:"ghost",size:"sm",disabled:j,className:(0,o.cn)("size-8 p-0.5 border border-border rounded-full cursor-pointer",a),children:[(0,s.jsx)(u.A,{className:"size-3"}),(0,s.jsx)("span",{className:"sr-only",children:N("language")})]})}),(0,s.jsx)(c.SQ,{align:"end",children:Object.entries(l.u.i18n.locales).map(e=>{let[a,t]=e;return(0,s.jsxs)(c._2,{onClick:()=>S(a),disabled:j||a===p,className:"cursor-pointer",children:[t.flag&&(0,s.jsx)("span",{className:"mr-2 text-md",children:t.flag}),(0,s.jsx)("span",{className:"text-sm",children:t.name}),a===p&&(0,s.jsx)("span",{className:"ml-auto text-xs",children:"â"})]},a)})})]})}},77828:(e,a,t)=>{t.d(a,{DT:()=>o,YZ:()=>l,gB:()=>i});var s=t(71473),r=t(20021);let c=s.u.i18n.defaultLocale,l=Object.keys(s.u.i18n.locales),n=new Set([c]),i=(Object.entries(s.u.i18n.locales).filter(e=>{let[a,t]=e;return n.has(a)||!0===t.indexable}).map(e=>{let[a]=e;return a}),"NEXT_LOCALE"),o=(0,r.A)({locales:l,defaultLocale:c,localeDetection:!1,localeCookie:{name:i,maxAge:31536e3},localePrefix:"as-needed"})},90751:(e,a,t)=>{t.d(a,{BV:()=>c,l4:()=>l});var s,r=t(71473),c=function(e){return e.Root="/",e.FAQ="/#faq",e.Features="/#features",e.Pricing="/pricing",e.Blog="/blog",e.Docs="/docs",e.About="/about",e.Contact="/contact",e.Waitlist="/waitlist",e.Changelog="/changelog",e.Roadmap="https://mksaas.link/roadmap",e.CookiePolicy="/cookie",e.PrivacyPolicy="/privacy",e.TermsOfService="/terms",e.Login="/auth/login",e.Register="/auth/register",e.AuthError="/auth/error",e.ForgotPassword="/auth/forgot-password",e.ResetPassword="/auth/reset-password",e.Dashboard="/dashboard",e.MyCreations="/my-creations",e.AdminUsers="/admin/users",e.SettingsProfile="/settings/profile",e.SettingsBilling="/settings/billing",e.SettingsCredits="/settings/credits",e.SettingsSecurity="/settings/security",e.SettingsNotifications="/settings/notifications",e.AIText="/ai/text",e.AIImage="/ai/image",e.AIChat="/ai/chat",e.AIVideo="/ai/video",e.AIAudio="/ai/audio",e.MagicuiBlocks="/magicui",e.HeroBlocks="/blocks/hero-section",e.LogoCloudBlocks="/blocks/logo-cloud",e.FeaturesBlocks="/blocks/features",e.IntegrationsBlocks="/blocks/integrations",e.ContentBlocks="/blocks/content",e.StatsBlocks="/blocks/stats",e.TeamBlocks="/blocks/team",e.TestimonialsBlocks="/blocks/testimonials",e.CallToActionBlocks="/blocks/call-to-action",e.FooterBlocks="/blocks/footer",e.PricingBlocks="/blocks/pricing",e.ComparatorBlocks="/blocks/comparator",e.FAQBlocks="/blocks/faqs",e.LoginBlocks="/blocks/login",e.SignupBlocks="/blocks/sign-up",e.ForgotPasswordBlocks="/blocks/forgot-password",e.ContactBlocks="/blocks/contact",e}({});let l=null!==(s=r.u.routes.defaultLoginRedirect)&&void 0!==s?s:"/dashboard"},90850:(e,a,t)=>{t.d(a,{Avatar:()=>l,AvatarFallback:()=>i,AvatarImage:()=>n});var s=t(84755);t(435);var r=t(87154),c=t(38442);function l(e){let{className:a,...t}=e;
1return(0,s.jsx)(r.bL,{"data-slot":"avatar",className:(0,c.cn)("relative flex size-8 shrink-0 overflow-hidden rounded-full",a),...t})}function n(e){let{className:a,...t}=e;return(0,s.jsx)(r._V,{"data-slot":"avatar-image",className:(0,c.cn)("aspect-square size-full",a),...t})}function i(e){let{className:a,...t}=e;return(0,s.jsx)(r.H4,{"data-slot":"avatar-fallback",className:(0,c.cn)("bg-muted flex size-full items-center justify-center rounded-full",a),...t})}},93559:(e,a,t)=>{t.d(a,{m8:()=>p,JB:()=>h,G4:()=>v,A7:()=>k,UD:()=>x,qh:()=>g});var s=t(5919);let r=(0,s.createServerReference)("7f37a1b5896e5637339a74e3448462d8cd28a97b14",s.callServer,void 0,s.findSourceMapURL,"consumeCreditsAction"),c=(0,s.createServerReference)("7ffc8d325740f80fcd25171d061cc638a6685ecf70",s.callServer,void 0,s.findSourceMapURL,"dailyCheckinAction");var l=t(50441);let n=(0,s.createServerReference)("7f41820830545cefe1b7b4a9f1c82521840c400200",s.callServer,void 0,s.findSourceMapURL,"getCreditStatsAction"),i=(0,s.createServerReference)("7ff8adf47e515aaeca66fcc3067d80fad4ec57557c",s.callServer,void 0,s.findSourceMapURL,"getCreditTransactionsAction"),o=(0,s.createServerReference)("7f2a5359ed2eee2f6d39e41262723bfbd941cc4699",s.callServer,void 0,s.findSourceMapURL,"getDailyCheckinStatusAction");var d=t(72724),u=t(95860),m=t(28745);let f={all:["credits"],balance:()=>[...f.all,"balance"],stats:()=>[...f.all,"stats"],dailyCheckinStatus:()=>[...f.all,"daily-checkin-status"],transactions:()=>[...f.all,"transactions"],transactionsList:e=>[...f.transactions(),e]};function h(){return(0,d.I)({queryKey:f.balance(),queryFn:async()=>{var e;console.log("Fetching credit balance...");let a=await (0,l.Q)();if(!(null==a?void 0:null===(e=a.data)||void 0===e?void 0:e.success))throw Error("Failed to fetch credit balance");return console.log("Credit balance fetched:",a.data.credits),a.data.credits||0}})}function v(){return(0,d.I)({queryKey:f.stats(),queryFn:async()=>{var e;console.log("Fetching credit stats...");let a=await n();if(!(null==a?void 0:null===(e=a.data)||void 0===e?void 0:e.success))throw Error("Failed to fetch credit stats");return console.log("Credit stats fetched:",a.data.data),a.data.data}})}function g(){return(0,d.I)({queryKey:f.dailyCheckinStatus(),queryFn:async()=>{var e;let a=await o();if(!(null==a?void 0:null===(e=a.data)||void 0===e?void 0:e.success))throw Error("Failed to fetch check-in status");return a.data.data}})}function x(){let e=(0,u.jE)();return(0,m.n)({mutationFn:async()=>{var e;let a=await c();if(!(null==a?void 0:null===(e=a.data)||void 0===e?void 0:e.success))throw Error("Daily check-in failed");return a.data.data},onSuccess:()=>{e.invalidateQueries({queryKey:f.balance()}),e.invalidateQueries({queryKey:f.stats()}),e.invalidateQueries({queryKey:f.transactions()}),e.invalidateQueries({queryKey:f.dailyCheckinStatus()})}})}function p(){let e=(0,u.jE)();return(0,m.n)({mutationFn:async e=>{var a;let{amount:t,description:s}=e,c=await r({amount:t,description:s});if(!(null==c?void 0:null===(a=c.data)||void 0===a?void 0:a.success))throw Error("Failed to consume credits");return c.data},onSuccess:()=>{e.invalidateQueries({queryKey:f.balance()}),e.invalidateQueries({queryKey:f.stats()})}})}function k(e,a,t,s){return(0,d.I)({queryKey:f.transactionsList({pageIndex:e,pageSize:a,search:t,sorting:s}),queryFn:async()=>{var r,c,l;let n=await i({pageIndex:e,pageSize:a,search:t,sorting:s});if(!(null==n?void 0:null===(r=n.data)||void 0===r?void 0:r.success))throw Error("Failed to fetch credit transactions");return{items:(null===(c=n.data.data)||void 0===c?void 0:c.items)||[],total:(null===(l=n.data.data)||void 0===l?void 0:l.total)||0}}})}},93722:(e,a,t)=>{t.d(a,{H:()=>l});var s=t(84755),r=t(90850),c=t(25684);function l(e){let{name:a,image:t,...l}=e;return(0,s.jsxs)(r.Avatar,{...l,children:[(0,s.jsx)(r.AvatarImage,{alt:a,title:a,src:null!=t?t:void 0}),(0,s.jsxs)(r.AvatarFallback,{children:[(0,s.jsx)("span",{className:"sr-only",children:a}),(0,s.jsx)(c.A,{className:"size-4"})]})]})}},94552:(e,a,t)=>{t.d(a,{E:()=>c});var s=t(84755),r=t(38442);function c(e){let{className:a,...t}=e;return(0,s.jsx)("div",{"data-slot":"skeleton",className:(0,r.cn)("bg-muted animate-pulse rounded-md",a),...t})}}}]);
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.