"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3523],{10934:function(e,r,t){t.d(r,{Z:function(){return l}});var n=t(59423);/**
 * @license lucide-react v0.390.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=(...e)=>e.filter((e,r,t)=>!!e&&t.indexOf(e)===r).join(" ");/**
 * @license lucide-react v0.390.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.390.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,n.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:t=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...d},u)=>(0,n.createElement)("svg",{ref:u,...a,width:r,height:r,stroke:e,strokeWidth:i?24*Number(t)/Number(r):t,className:o("lucide",s),...d},[...c.map(([e,r])=>(0,n.createElement)(e,r)),...Array.isArray(l)?l:[l]])),l=(e,r)=>{let t=(0,n.forwardRef)(({className:t,...a},l)=>(0,n.createElement)(s,{ref:l,iconNode:r,className:o(`lucide-${i(e)}`,t),...a}));return t.displayName=`${e}`,t}},49194:function(e,r,t){t.d(r,{Z:function(){return n}});/**
 * @license lucide-react v0.390.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let n=(0,t(10934).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},19837:function(e,r,t){t.d(r,{Z:function(){return b}});var n=t(7211),i=t(54550),o=t(21638),a=t(90915),s=t(94096),l=t(61371),c=t(61235),d=t(11518),u=t(32780),f=t(13282),m=t(85524);let h=l.z.object({email:l.z.string({required_error:"Your email is required"}).min(1,{message:"Your email is required"})}),p=l.z.object({email:l.z.string({required_error:"Your email is required"}).min(1,{message:"Your email is required"}),acceptTerms:l.z.boolean({required_error:"You must accept the terms and conditions and privacy policy"}).refine(e=>!0===e,{message:"You must accept the terms and conditions and privacy policy"})}),x=()=>{let e=(0,o.createClientComponentClient)();return(0,c.u)({mutationFn:async r=>{let{email:t,mode:n}=r,{error:i}=await e.auth.signInWithOtp({email:t,options:{shouldCreateUser:"register"===n,emailRedirectTo:window.location.origin+"/login-redirect"}});if(i){if("Signups not allowed for otp"===i.message)throw Error("We couldn't find an account for this email address. Have you signed up yet?");throw i}}})};function b(e){let{mode:r}=e,t=(0,s.cI)({resolver:(0,i.F)(h),mode:"onChange"}),o=x(),l=(0,s.cI)({resolver:(0,i.F)(p),mode:"onChange"}),c=e=>{o.mutate({email:e.email,mode:r})},b=e=>{o.mutate({...e,mode:r})};return(0,n.jsxs)(n.Fragment,{children:["login"===r&&(0,n.jsx)(f.l0,{...t,children:(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),t.handleSubmit(b)()},children:[(0,n.jsx)(f.Wi,{control:t.control,name:"email",render:e=>{let{field:r}=e;return(0,n.jsxs)(f.xJ,{className:"mb-4",children:[(0,n.jsx)(f.lX,{children:"Your Email"}),(0,n.jsx)(f.NI,{children:(0,n.jsx)(m.I,{disabled:o.isSuccess,...r})}),(0,n.jsx)(f.zG,{})]})}}),!o.isSuccess&&(0,n.jsxs)(d.z,{disabled:o.isLoading,className:"w-full",type:"submit",children:[o.isLoading&&(0,n.jsx)("div",{className:"mr-3 h-6 w-6",children:(0,n.jsx)(a.I,{})}),"Sign in with Email"]})]})}),"register"===r&&(0,n.jsx)(f.l0,{...l,children:(0,n.jsxs)("form",{onSubmit:e=>{e.preventDefault(),l.handleSubmit(c)()},children:[(0,n.jsx)(f.Wi,{control:l.control,name:"email",render:e=>{let{field:r}=e;return(0,n.jsxs)(f.xJ,{className:"mb-4",children:[(0,n.jsx)(f.lX,{children:"Your Email"}),(0,n.jsx)(f.NI,{children:(0,n.jsx)(m.I,{disabled:o.isSuccess,...r})}),(0,n.jsx)(f.zG,{})]})}}),(0,n.jsx)(f.Wi,{control:l.control,name:"acceptTerms",render:e=>{let{field:r}=e;return(0,n.jsxs)(f.xJ,{children:[(0,n.jsxs)("span",{className:"mt-4 flex flex-row items-start space-x-3 space-y-0",children:[(0,n.jsx)(f.NI,{children:(0,n.jsx)(u.X,{disabled:o.isSuccess,checked:r.value,onCheckedChange:r.onChange})}),(0,n.jsx)("div",{className:"space-y-1 leading-none",children:(0,n.jsxs)(f.lX,{className:"font-normal text-gray-600",children:["I agree to the"," ",(0,n.jsx)("a",{className:"cursor-pointer font-semibold text-primary hover:underline",target:"_blank",href:"https://www.goheather.io/website-terms",children:"Terms and Conditions"})," ","and"," ",(0,n.jsx)("a",{className:"cursor-pointer font-semibold text-primary hover:underline",target:"_blank",href:"https://www.goheather.io/privacy-policy",children:"Privacy Policy"}),"."]})})]}),(0,n.jsx)(f.zG,{})]})}}),!o.isSuccess&&(0,n.jsxs)(d.z,{disabled:o.isLoading,className:"mt-6 w-full",type:"submit",children:[o.isLoading&&(0,n.jsx)("div",{className:"mr-3 h-6 w-6",children:(0,n.jsx)(a.I,{})}),"Create an account"]})]})}),!o.isSuccess&&(0,n.jsx)("div",{className:"mt-4 rounded-sm border bg-gray-100 p-2 text-sm text-gray-600",children:"We will email you a magic link for a password-free experience"}),o.isSuccess&&(0,n.jsxs)("div",{className:"mt-4 rounded-sm border border-green-900 bg-green-100 p-2 text-sm text-gray-600",children:[(0,n.jsx)("span",{className:"font-bold",children:"Check your inbox!"}),(0,n.jsx)("br",{}),(0,n.jsx)("span",{children:"We sent you an email with a link to access your account"}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Can’t find your code? Check your spam folder!"]})]})}},32780:function(e,r,t){t.d(r,{X:function(){return E}});var n=t(7211),i=t(59423),o=t(36193),a=t(42473),s=t(12828),l=t(74294),c=t(26880),d=t(95395),u=t(21118),f=t(30375),m=t(30892);let h="Checkbox",[p,x]=(0,s.b)(h),[b,g]=p(h),v=(0,i.forwardRef)((e,r)=>{let{__scopeCheckbox:t,name:n,checked:s,defaultChecked:d,required:u,disabled:f,value:h="on",onCheckedChange:p,...x}=e,[g,v]=(0,i.useState)(null),y=(0,a.e)(r,e=>v(e)),N=(0,i.useRef)(!1),C=!g||!!g.closest("form"),[E=!1,I]=(0,c.T)({prop:s,defaultProp:d,onChange:p}),z=(0,i.useRef)(E);return(0,i.useEffect)(()=>{let e=null==g?void 0:g.form;if(e){let r=()=>I(z.current);return e.addEventListener("reset",r),()=>e.removeEventListener("reset",r)}},[g,I]),(0,i.createElement)(b,{scope:t,state:E,disabled:f},(0,i.createElement)(m.WV.button,(0,o.Z)({type:"button",role:"checkbox","aria-checked":j(E)?"mixed":E,"aria-required":u,"data-state":k(E),"data-disabled":f?"":void 0,disabled:f,value:h},x,{ref:y,onKeyDown:(0,l.M)(e.onKeyDown,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,l.M)(e.onClick,e=>{I(e=>!!j(e)||!e),C&&(N.current=e.isPropagationStopped(),N.current||e.stopPropagation())})})),C&&(0,i.createElement)(w,{control:g,bubbles:!N.current,name:n,value:h,checked:E,required:u,disabled:f,style:{transform:"translateX(-100%)"}}))}),y=(0,i.forwardRef)((e,r)=>{let{__scopeCheckbox:t,forceMount:n,...a}=e,s=g("CheckboxIndicator",t);return(0,i.createElement)(f.z,{present:n||j(s.state)||!0===s.state},(0,i.createElement)(m.WV.span,(0,o.Z)({"data-state":k(s.state),"data-disabled":s.disabled?"":void 0},a,{ref:r,style:{pointerEvents:"none",...e.style}})))}),w=e=>{let{control:r,checked:t,bubbles:n=!0,...a}=e,s=(0,i.useRef)(null),l=(0,d.D)(t),c=(0,u.t)(r);return(0,i.useEffect)(()=>{let e=s.current,r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(l!==t&&r){let i=new Event("click",{bubbles:n});e.indeterminate=j(t),r.call(e,!j(t)&&t),e.dispatchEvent(i)}},[l,t,n]),(0,i.createElement)("input",(0,o.Z)({type:"checkbox","aria-hidden":!0,defaultChecked:!j(t)&&t},a,{tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function j(e){return"indeterminate"===e}function k(e){return j(e)?"indeterminate":e?"checked":"unchecked"}var N=t(49194),C=t(54064);let E=i.forwardRef((e,r)=>{let{className:t,...i}=e;return(0,n.jsx)(v,{ref:r,className:(0,C.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...i,children:(0,n.jsx)(y,{className:(0,C.cn)("flex items-center justify-center text-current"),children:(0,n.jsx)(N.Z,{className:"h-4 w-4"})})})});E.displayName=v.displayName},13282:function(e,r,t){t.d(r,{NI:function(){return x},Wi:function(){return u},l0:function(){return c},lX:function(){return p},pf:function(){return b},xJ:function(){return h},zG:function(){return g}});var n=t(7211),i=t(59423),o=t(48586),a=t(94096),s=t(54064),l=t(88083);let c=a.RV,d=i.createContext({}),u=e=>{let{...r}=e;return(0,n.jsx)(d.Provider,{value:{name:r.name},children:(0,n.jsx)(a.Qr,{...r})})},f=()=>{let e=i.useContext(d),r=i.useContext(m),{getFieldState:t,formState:n}=(0,a.Gc)(),o=t(e.name,n);if(!e)throw Error("useFormField should be used within <FormField>");let{id:s}=r;return{id:s,name:e.name,formItemId:"".concat(s,"-form-item"),formDescriptionId:"".concat(s,"-form-item-description"),formMessageId:"".concat(s,"-form-item-message"),...o}},m=i.createContext({}),h=i.forwardRef((e,r)=>{let{className:t,...o}=e,a=i.useId();return(0,n.jsx)(m.Provider,{value:{id:a},children:(0,n.jsx)("div",{ref:r,className:(0,s.cn)("space-y-2",t),...o})})});h.displayName="FormItem";let p=i.forwardRef((e,r)=>{let{className:t,...i}=e,{error:o,formItemId:a}=f();return(0,n.jsx)(l._,{ref:r,className:(0,s.cn)(o&&"text-destructive",t),htmlFor:a,...i})});p.displayName="FormLabel";let x=i.forwardRef((e,r)=>{let{...t}=e,{error:i,formItemId:a,formDescriptionId:s,formMessageId:l}=f();return(0,n.jsx)(o.g7,{ref:r,id:a,"aria-describedby":i?"".concat(s," ").concat(l):"".concat(s),"aria-invalid":!!i,...t})});x.displayName="FormControl";let b=i.forwardRef((e,r)=>{let{className:t,...i}=e,{formDescriptionId:o}=f();return(0,n.jsx)("p",{ref:r,id:o,className:(0,s.cn)("text-sm text-muted-foreground",t),...i})});b.displayName="FormDescription";let g=i.forwardRef((e,r)=>{let{className:t,children:i,...o}=e,{error:a,formMessageId:l}=f(),c=a?String(null==a?void 0:a.message):i;return c?(0,n.jsx)("p",{ref:r,id:l,className:(0,s.cn)("text-sm font-medium text-destructive",t),...o,children:c}):null});g.displayName="FormMessage"},85524:function(e,r,t){t.d(r,{I:function(){return a}});var n=t(7211),i=t(59423),o=t(54064);let a=i.forwardRef((e,r)=>{let{className:t,type:i,...a}=e;return(0,n.jsx)("input",{type:i,className:(0,o.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:r,...a})});a.displayName="Input"},88083:function(e,r,t){t.d(r,{_:function(){return c}});var n=t(7211),i=t(59423),o=t(66261),a=t(99245),s=t(54064);let l=(0,a.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=i.forwardRef((e,r)=>{let{className:t,...i}=e;return(0,n.jsx)(o.f,{ref:r,className:(0,s.cn)(l(),t),...i})});c.displayName=o.f.displayName},15420:function(e,r,t){t.r(r),t.d(r,{Separator:function(){return s}});var n=t(7211),i=t(59423),o=t(29494),a=t(54064);let s=i.forwardRef((e,r)=>{let{className:t,orientation:i="horizontal",decorative:s=!0,...l}=e;return(0,n.jsx)(o.f,{ref:r,decorative:s,orientation:i,className:(0,a.cn)("shrink-0 bg-border","horizontal"===i?"h-[1px] w-full":"h-full w-[1px]",t),...l})});s.displayName=o.f.displayName},29494:function(e,r,t){t.d(r,{f:function(){return d}});var n=t(36193),i=t(59423),o=t(30892);let a="horizontal",s=["horizontal","vertical"],l=(0,i.forwardRef)((e,r)=>{let{decorative:t,orientation:s=a,...l}=e,d=c(s)?s:a;return(0,i.createElement)(o.WV.div,(0,n.Z)({"data-orientation":d},t?{role:"none"}:{"aria-orientation":"vertical"===d?d:void 0,role:"separator"},l,{ref:r}))});function c(e){return s.includes(e)}l.propTypes={orientation(e,r,t){let n=e[r],i=String(n);return n&&!c(n)?Error(`Invalid prop \`orientation\` of value \`${i}\` supplied to \`${t}\`, expected one of:
  - horizontal
  - vertical

Defaulting to \`${a}\`.`):null}};let d=l},95395:function(e,r,t){t.d(r,{D:function(){return i}});var n=t(59423);function i(e){let r=(0,n.useRef)({value:e,previous:e});return(0,n.useMemo)(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}},21118:function(e,r,t){t.d(r,{t:function(){return o}});var n=t(59423),i=t(95498);function o(e){let[r,t]=(0,n.useState)(void 0);return(0,i.b)(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});let r=new ResizeObserver(r=>{let n,i;if(!Array.isArray(r)||!r.length)return;let o=r[0];if("borderBoxSize"in o){let e=o.borderBoxSize,r=Array.isArray(e)?e[0]:e;n=r.inlineSize,i=r.blockSize}else n=e.offsetWidth,i=e.offsetHeight;t({width:n,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}t(void 0)},[e]),r}}}]);
//# sourceMappingURL=3523-ca8e1dad72c7a5f6.js.map