(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1549],{70798:(e,t,r)=>{Promise.resolve().then(r.bind(r,83336))},89785:(e,t,r)=>{"use strict";r.d(t,{default:()=>c});var a=r(95155),s=r(76046),l=r(94936),i=r(59989),o=r(63836),n=r(32562),d=r(54190),u=r(21945);function c(e){var t,r,c,b;let{children:h,redirectParams:v={},...m}=e,{push:f}=(0,s.useRouter)(),g=(0,s.useSearchParams)(),{data:p}=(0,n.g)(),x=(0,i.A)(),w={...v};for(let e of u.o)g.has(e)&&(w[e]=g.get(e));async function y(){try{let e=await fetch("/api/auth/google",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({redirectTo:(0,d.B)(w)})}),{data:t}=await e.json();if(!(null==t?void 0:t.url))throw Error("No url returned");f(t.url)}catch(e){console.error(e)}}return(0,a.jsxs)(a.Fragment,{children:[!!(null==p?void 0:null===(r=p.data)||void 0===r?void 0:null===(t=r.user)||void 0===t?void 0:t.id)&&(0,a.jsx)(l.T,{color:"secondary",onPress:x,...m,children:null!=h?h:"Sign out"}),!(null==p?void 0:null===(b=p.data)||void 0===b?void 0:null===(c=b.user)||void 0===c?void 0:c.id)&&(0,a.jsxs)(l.T,{onPress:y,color:"primary",...m,children:[(0,a.jsx)(o.A,{}),null!=h?h:"Sign in"]})]})}},83336:(e,t,r)=>{"use strict";r.d(t,{default:()=>v});var a=r(95155),s=r(43463),l=r(17281),i=r(77803),o=r(94936),n=r(48173),d=r.n(n),u=r(89785),c=r(5387),b=r(2970);function h(){var e,t,r,s;let{data:n}=(0,c.t)();return(0,a.jsxs)("div",{className:"relative w-full h-screen",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:'\n            image-set(\n              url("/imgs/hero.webp") type("image/webp"),\n              url("/imgs/hero.jpg") type("image/jpeg")\n            )\n          '}}),(0,a.jsx)("div",{className:"absolute inset-0 bg-black bg-opacity-40"}),(0,a.jsx)(l.Z,{className:"w-full h-full bg-transparent",children:(0,a.jsxs)(i.U,{className:"relative z-10 flex flex-col justify-center items-center p-8 text-center",children:[(0,a.jsx)("h1",{className:"text-6xl font-bold text-white mb-4 shadow-text capitalize",children:"Your only limit is you"}),(0,a.jsx)("h2",{className:"text-3xl text-white mb-8 shadow-text capitalize",children:"Start your day with Jiu-Jitsu @ 6:00 AM ☕"}),!(null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.id)&&(0,a.jsx)(u.default,{size:"lg",className:"font-bold py-8 uppercase text-xl",iconProps:{className:"mr-2 -ml-1 w-6 h-6"},children:"Join the community"}),!!(null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.id)&&!(null==n?void 0:null===(r=n.data)||void 0===r?void 0:r.enabled)&&(0,a.jsx)(o.T,{as:d(),href:b.vU,color:"secondary",size:"lg",className:"font-bold py-8 uppercase text-xl",children:"Join the community"}),!(null==n?void 0:null===(s=n.data)||void 0===s?void 0:s.id)&&(0,a.jsx)("div",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 text-center",children:(0,a.jsx)("p",{className:"text-white bg-black bg-opacity-50 px-4 py-2 rounded-full",children:"New? Request an invite to access our private Telegram group."})})]})})]})}function v(){return(0,a.jsx)("div",{className:(0,s.A)(["flex","flex-1","flex-col","items-center","justify-start","h-screen-nav","-mt-12"]),children:(0,a.jsx)(h,{})})}},21945:(e,t,r)=>{"use strict";r.d(t,{o:()=>a});let a=["invite","redirect","ext","newsletter"]},2970:(e,t,r)=>{"use strict";r.d(t,{AU:()=>c,Bi:()=>b,Cm:()=>l,Mt:()=>x,Om:()=>u,Q1:()=>d,QX:()=>a,Tn:()=>v,VP:()=>i,XM:()=>g,bv:()=>n,cu:()=>s,hy:()=>h,p2:()=>m,uL:()=>f,vU:()=>o,w1:()=>p});let a="/",s="/terms-of-service",l="/privacy-policy",i="/account/invites",o="/signup",n="/admin/dashboard",d="/telegram",u="/api/ai/chatbot",c="".concat(n,"/accounts"),b="".concat(n,"/templates"),h="".concat(n,"/payments"),v="".concat(n,"/reports"),m="".concat(n,"/developers"),f="".concat(n,"/data"),g="".concat(n,"/settings"),p="".concat(n,"/changelog"),x="".concat(n,"/invites")},59989:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var a=r(76046),s=r(9233),l=r(83005),i=r(38452);function o(){let e=(0,i.A)(),{refresh:t}=(0,a.useRouter)();return async function(){let{error:r}=await e.auth.signOut(),a=(0,l.A)();r||(await a.setQueryData(s.$.all,void 0),await a.invalidateQueries({queryKey:s.$.all}),t()),console.error("SignOut error",r)}}},63836:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(95155);function s(e){return(0,a.jsx)("svg",{className:"mr-2 -ml-1 w-4 h-4","aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"google",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 488 512",height:"2em",width:"2em",...e,children:(0,a.jsx)("path",{fill:"currentColor",d:"M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"})})}},32562:(e,t,r)=>{"use strict";r.d(t,{g:()=>o});var a=r(93233),s=r(9233),l=r(38452);async function i(){let e=(0,l.A)();return await e.auth.getUser()}function o(e){return(0,a.useQuery)({queryKey:s.$.auth(),queryFn:i,...e})}},5387:(e,t,r)=>{"use strict";r.d(t,{t:()=>o});var a=r(93233),s=r(38452);let l={all:["session"],auth:()=>[...l.all,"auth"],user:()=>[...l.all,"user"]};async function i(){let e=(0,s.A)();return await e.from("users").select("*").single()}function o(e){return(0,a.useQuery)({queryKey:l.user(),queryFn:i,...e})}},9233:(e,t,r)=>{"use strict";r.d(t,{$:()=>a});let a={all:["session"],auth:()=>[...a.all,"auth"],user:()=>[...a.all,"user"]}},83005:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(13223);let s=()=>new a.E},38452:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let a=(0,r(95382).createBrowserClient)("https://yrxwpvxzxbmhgfzfvstf.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlyeHdwdnh6eGJtaGdmemZ2c3RmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjkxOTcyMDgsImV4cCI6MjA0NDc3MzIwOH0.w76YxsnEHi21CxbpSilBl0j-EmYPd-h2FjddBWphLl8");function s(){return a}},54190:(e,t,r)=>{"use strict";function a(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=window)||void 0===e?void 0:e.location))return;let r="".concat(window.location.origin,"/api/auth/callback");try{let e=new URL(r);try{let r=new URL((null==t?void 0:t.redirect)&&"string"==typeof t.redirect?t.redirect:window.location.href);if(r.origin!==window.location.origin)throw t.redirect="",delete t.redirect,Error("Invalid redirect url");e.searchParams.set("redirect",r.href),delete t.redirect}catch(e){console.error("Error generating redirect url: ",e)}return Object.entries(t).forEach(t=>{let[r,a]=t;e.searchParams.set(r,String(a))}),e.toString()}catch(e){console.error("Error generating callback url: ",e)}return r}r.d(t,{B:()=>a})},17281:(e,t,r)=>{"use strict";r.d(t,{Z:()=>k});var a=r(80117),s=r(71354),l=r(2877),i=(0,s.tv)({slots:{base:["flex","flex-col","relative","overflow-hidden","h-auto","outline-none","text-foreground","box-border","bg-content1",...l.zb],header:["flex","p-3","z-10","w-full","justify-start","items-center","shrink-0","overflow-inherit","color-inherit","subpixel-antialiased"],body:["relative","flex","flex-1","w-full","p-3","flex-auto","flex-col","place-content-inherit","align-items-inherit","h-auto","break-words","text-left","overflow-y-auto","subpixel-antialiased"],footer:["p-3","h-auto","flex","w-full","items-center","overflow-hidden","color-inherit","subpixel-antialiased"]},variants:{shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},radius:{none:{base:"rounded-none",header:"rounded-none",footer:"rounded-none"},sm:{base:"rounded-small",header:"rounded-t-small",footer:"rounded-b-small"},md:{base:"rounded-medium",header:"rounded-t-medium",footer:"rounded-b-medium"},lg:{base:"rounded-large",header:"rounded-t-large",footer:"rounded-b-large"}},fullWidth:{true:{base:"w-full"}},isHoverable:{true:{base:"data-[hover=true]:bg-content2 dark:data-[hover=true]:bg-content2"}},isPressable:{true:{base:"cursor-pointer"}},isBlurred:{true:{base:["bg-background/80","dark:bg-background/20","backdrop-blur-md","backdrop-saturate-150"]}},isFooterBlurred:{true:{footer:["bg-background/10","backdrop-blur","backdrop-saturate-150"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:"",false:{base:"transition-transform-background motion-reduce:transition-none"}}},compoundVariants:[{isPressable:!0,class:"data-[pressed=true]:scale-[0.97] tap-highlight-transparent"}],defaultVariants:{radius:"lg",shadow:"md",fullWidth:!1,isHoverable:!1,isPressable:!1,isDisabled:!1,isFooterBlurred:!1}}),o=r(12115),n=r(67093),d=r(97262),u=r(57010),c=r(13201),b=r(35130),h=r(84725),v=r(5582),m=r(49163),f=r(55078),g=r(46611),p=r(33138),x=r(83517),w=r(65858),y=r(39867),j=r(95155),N=(0,v.Rf)((e,t)=>{let{children:r,context:s,Component:l,isPressable:N,disableAnimation:k,disableRipple:C,getCardProps:P,getRippleProps:I}=function(e){var t,r,a,s;let l=(0,h.o)(),[y,j]=(0,v.rE)(e,i.variantKeys),{ref:N,as:k,children:C,onClick:P,onPress:I,autoFocus:E,className:A,classNames:z,allowTextSelectionOnPress:B=!0,...D}=y,S=(0,x.zD)(N),J=k||(e.isPressable?"button":"div"),M="string"==typeof J,O=null!=(r=null!=(t=e.disableAnimation)?t:null==l?void 0:l.disableAnimation)&&r,F=null!=(s=null!=(a=e.disableRipple)?a:null==l?void 0:l.disableRipple)&&s,H=(0,m.$)(null==z?void 0:z.base,A),{onClear:R,onPress:U,ripples:T}=(0,w.k)(),$=(0,o.useCallback)(e=>{F||O||!S.current||U(e)},[F,O,S,U]),{buttonProps:q,isPressed:Q}=(0,b.l)({onPress:(0,n.c)(I,$),elementType:k,isDisabled:!e.isPressable,onClick:P,allowTextSelectionOnPress:B,...D},S),{hoverProps:W,isHovered:Z}=(0,c.M)({isDisabled:!e.isHoverable,...D}),{isFocusVisible:_,isFocused:L,focusProps:V}=(0,u.o)({autoFocus:E}),X=(0,o.useMemo)(()=>i({...j,disableAnimation:O}),[(0,f.t6)(j),O]),Y=(0,o.useMemo)(()=>({slots:X,classNames:z,disableAnimation:O,isDisabled:e.isDisabled,isFooterBlurred:e.isFooterBlurred,fullWidth:e.fullWidth}),[X,z,e.isDisabled,e.isFooterBlurred,O,e.fullWidth]),K=(0,o.useCallback)(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ref:S,className:X.base({class:H}),tabIndex:e.isPressable?0:-1,"data-hover":(0,g.sE)(Z),"data-pressed":(0,g.sE)(Q),"data-focus":(0,g.sE)(L),"data-focus-visible":(0,g.sE)(_),"data-disabled":(0,g.sE)(e.isDisabled),...(0,d.v)(e.isPressable?{...q,...V,role:"button"}:{},e.isHoverable?W:{},(0,p.$)(D,{enabled:M}),(0,p.$)(t))}},[S,X,H,M,e.isPressable,e.isHoverable,e.isDisabled,Z,Q,_,q,V,W,D]),G=(0,o.useCallback)(()=>({ripples:T,onClear:R}),[T,R]);return{context:Y,domRef:S,Component:J,classNames:z,children:C,isHovered:Z,isPressed:Q,disableAnimation:O,isPressable:e.isPressable,isHoverable:e.isHoverable,disableRipple:F,handlePress:$,isFocusVisible:_,getCardProps:K,getRippleProps:G}}({...e,ref:t});return(0,j.jsxs)(l,{...P(),children:[(0,j.jsx)(a.u,{value:s,children:r}),N&&!k&&!C&&(0,j.jsx)(y.j,{...I()})]})});N.displayName="NextUI.Card";var k=N},77803:(e,t,r)=>{"use strict";r.d(t,{U:()=>d});var a=r(80117),s=r(5582),l=r(83517),i=r(49163),o=r(95155),n=(0,s.Rf)((e,t)=>{var r;let{as:s,className:n,children:d,...u}=e,c=(0,l.zD)(t),{slots:b,classNames:h}=(0,a.f)(),v=(0,i.$)(null==h?void 0:h.body,n);return(0,o.jsx)(s||"div",{ref:c,className:null==(r=b.body)?void 0:r.call(b,{class:v}),...u,children:d})});n.displayName="NextUI.CardBody";var d=n},80117:(e,t,r)=>{"use strict";r.d(t,{f:()=>s,u:()=>a});var[a,s]=(0,r(89583).q)({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"})}},e=>{var t=t=>e(e.s=t);e.O(0,[5013,8253,4936,5927,3233,5382,1028,3223,8441,1517,7358],()=>t(70798)),_N_E=e.O()}]);