1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7967],{2791:(e,r,t)=>{t.d(r,{H1:()=>a,H6:()=>c,JR:()=>s,OR:()=>i,lZ:()=>l,uL:()=>d});let a="980964971272022",s=()=>{window.fbq("track","PageView")},n=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;window.fbq("track",e,r,t?{eventID:t}:void 0)},o=()=>crypto.randomUUID(),i=()=>{var e,r,t,a;return{fbp:null!=(t=null==(e=document.cookie.match(/_fbp=([^;]+)/))?void 0:e[1])?t:"",fbc:null!=(a=null==(r=document.cookie.match(/_fbc=([^;]+)/))?void 0:r[1])?a:""}},l=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"USD",t=o();return n("Subscribe",{value:e,currency:r.toUpperCase(),predicted_ltv:12*e},t),{eventId:t}},c=()=>{let e=o();return n("CompleteRegistration",{value:0,currency:"USD"},e),{eventId:e}},d=function(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"USD",a=null!=r?r:o();return n("Purchase",{value:e,currency:t.toUpperCase()},a),{eventId:a}}},7059:(e,r,t)=>{t.d(r,{A:()=>l});var a=t(95155),s=t(70532),n=t(57828),o=t(12115);let i=(0,o.forwardRef)((e,r)=>{let{label:t,error:i,className:l="",...c}=e,[d,u]=(0,o.useState)(!1);return(0,a.jsxs)("div",{className:"form-group",children:[t&&(0,a.jsx)("label",{htmlFor:c.id||c.name,children:t}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{...c,ref:r,type:d?"text":"password",className:"pr-10 ".concat(l)}),(0,a.jsx)("button",{type:"button",onClick:()=>u(!d),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-500 hover:text-gray-700","aria-label":d?"Hide password":"Show password",disabled:c.disabled,children:d?(0,a.jsx)(s.A,{className:"w-4 h-4"}):(0,a.jsx)(n.A,{className:"w-4 h-4"})})]}),i&&(0,a.jsx)("div",{className:"text-red-500 text-sm mt-1",children:i})]})});i.displayName="PasswordInput";let l=i},57375:(e,r,t)=>{t.d(r,{G6:()=>i,Hh:()=>n,Jv:()=>o,Ku:()=>c,f3:()=>d,q:()=>l,wz:()=>u});var a=t(2791),s=t(76295);let n=async function(e){let r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],t=arguments.length>2?arguments[2]:void 0;if("email"in e){let n="".concat(e.email.split("@")[0].substring(0,14)).concat(Math.trunc(1e5*Math.random())),o=await fetch("".concat("https://ynlkuautkksbcjyeqkgd.supabase.co","/functions/v1/signup"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e.email,password:e.password,username:n,...t?{referral_code:t}:{}})}),i=await o.json();if(i.error)throw Error(i.error);if(!r)return{username:n};{let r=await s.N.auth.setSession({access_token:i.token,refresh_token:i.refresh_token}),{eventId:t}=(0,a.H6)();fetch("/api/auth/track-registration",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e.email,meta_event_id:t})}).catch(e=>console.error("CompleteRegistration CAPI error:",e));try{let e=localStorage.getItem("yap-gig-user-id");e&&(await fetch("/api/gigrewards/link",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(i.token)},body:JSON.stringify({gigUserId:e,questCode:"AN001"})})).ok&&(localStorage.removeItem("yap-gig-user-id"),localStorage.removeItem("yap-gig-quest-code"))}catch(e){console.error("[GigRewards] signup quest error:",e)}return r.data}}throw Error("Missing email field")},o=async e=>{if("email"in e){let r=await s.N.auth.signInWithPassword(e),t=r.data;if(r.error){let r=await fetch("".concat("https://ynlkuautkksbcjyeqkgd.supabase.co","/functions/v1/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({identifier:e.email,password:e.password})}),a=await r.json();if(a.error)throw Error("string"==typeof a.error?a.error:a.error.message);t=(await s.N.auth.setSession({access_token:a.token,refresh_token:a.refresh_token})).data}return t}throw Error("Missing email field")},i=async e=>{let r=e&&"/"!==e?"".concat(window.location.origin,"/auth/callback?next=").concat(encodeURIComponent(e)):"".concat(window.location.origin,"/auth/callback"),{error:t}=await s.N.auth.signInWithOAuth({provider:"google",options:{redirectTo:r}});if(t)throw t},l=async e=>{let{data:r,error:t}=await s.N.auth.getUser(e);if(t||!r.user)throw console.log(t),Error("Invalid or expired token");return{user:r.user}},c=async e=>{let r="".concat(window.location.origin,"/?reset-password=true"),{error:t}=await s.N.auth.resetPasswordForEmail(e,{redirectTo:r});if(t)throw Error(t.message)},d=async(e,r)=>{if(r){let t=await fetch("".concat("https://ynlkuautkksbcjyeqkgd.supabase.co","/functions/v1/password-recovery/reset-password"),{method:"POST",headers:{Authorization:"Bearer "+r,"Content-Type":"application/json"},body:JSON.stringify({new_password:e})}),a=await t.json();if(200!==t.status)throw Error(a.error||"Failed to update password");return a}let{error:t}=await s.N.auth.updateUser({password:e});if(t)throw Error(t.message||"Failed to update password");return{success:!0}};async function u(e){let{data:r}=await s.N.schema("public").from("profiles").select().eq("email",e).maybeSingle().throwOnError();return r}},98457:(e,r,t)=>{t.d(r,{E:()=>s,H:()=>n});var a=t(76295);async function s(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50;try{var s;let n=a.N.from("referrals").select("referrer_user_id").not("referrer_user_id","is",null);e&&(n=n.gte("created_at",e)),r&&(n=n.lte("created_at",r));let{data:o,error:i}=await n;if(i)return console.error("Error fetching referral leaderboard:",i),[];let l=new Map;for(let e of o){let r=e.referrer_user_id;l.set(r,(l.get(r)||0)+1)}let c=Array.from(l.entries()).sort((e,r)=>r[1]-e[1]).slice(0,t);if(0===c.length)return[];let d=c.map(e=>{let[r]=e;return r}),{data:u}=await a.N.schema("public").from("profiles").select("id, username, email").in("id",d),h=new Map(null!=(s=null==u?void 0:u.map(e=>[e.id,e]))?s:[]);return c.map(e=>{var r,t;let[a,s]=e,n=h.get(a);return{referrerUserId:a,referralCount:s,username:null!=(r=null==n?void 0:n.username)?r:null,email:null!=(t=null==n?void 0:n.email)?t:""}})}catch(e){return console.error("Error in getLeaderboard:",e),[]}}async function n(e,r){try{let{data:t,error:s}=await a.N.schema("public").from("profiles").select("id").eq("username",r).single();if(s||!t)return{success:!1,error:"Invalid referral code"};let n=t.id;if(n===e)return{success:!1,error:"Cannot refer yourself"};let{error:o}=await a.N.from("referrals").insert({referee_user_id:e,referrer_user_id:n});if(o)return console.error("Error setting user referral:",o),{success:!1,error:o.message};return{success:!0}}catch(e){return console.error("Error in setUserReferral:",e),{success:!1,error:"Internal error"}}}},99819:(e,r,t)=>{t.d(r,{K4:()=>c,R7:()=>i,Z8:()=>d,Z9:()=>u,jR:()=>l});let a=["Failed to fetch","NetworkError","network request failed"],s=/^(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&*()_+?><.])(?=.*[0-9]).{8,}$/,n=/[~!@#$%^&*()_+?><.]/,o=[{match:e=>e.startsWith("UnsafePassword"),error:"The password must be at least 8 characters long, and contain lowercase, uppercase, numeric, and special characters"},{match:e=>e.includes("User is not a tester!"),error:"User is not an authorized tester"},{match:e=>e.includes("has already been used")||e.includes("already exists")||e.includes("already registered"),error:"An account with this email already exists. Please sign in instead."},{match:e=>e.startsWith("InvalidEmail")||e.includes("invalid"),error:"Please enter a valid email address."},{match:e=>e.startsWith("InvalidUsername"),error:"Your email address contains characters that are not supported. Please use a different email."},{match:e=>e.includes("User not found"),error:"Session expired. Please try again."},{match:e=>a.some(r=>e.includes(r)),error:"Network error. Please check your connection and try again."}];function i(e){var r,t,a;let s=null!=(t=null==e?void 0:e.message)?t:"";return null!=(a=null==(r=o.find(e=>{let{match:r}=e;return r(s)}))?void 0:r.error)?a:"Failed to create account. Please try again."}function l(e){var r;let t=null!=(r=null==e?void 0:e.message)?r:"";return t.includes("User is not a tester!")?"User is not an authorized tester":a.some(e=>t.includes(e))?"Network error. Please check your connection and try again.":"Invalid email or password. Please try again."}function c(e){var r;let t=String(null!=(r=null==e?void 0:e.message)?r:"").toLowerCase();return t.includes("already registered")||t.includes("already exists")||t.includes("identity already linked")?"This email already has an account. Sign in with email/password, then link Google from account settings.":a.some(e=>t.includes(e.toLowerCase()))?"Network error. Please check your connection and try again.":"Google sign-in failed. Please try again."}function d(e){return e.length<8?"Password must be at least 8 characters long":/[a-z]/.test(e)?/[A-Z]/.test(e)?/\d/.test(e)?n.test(e)?s.test(e)?null:"Password does not meet the required format":"Password must include at least one special character":"Password must include at least one number":"Password must include at least one uppercase letter":"Password must include at least one lowercase letter"}function u(e){if(!e||e.length<3)return null;let r=[];return(e.length<8&&r.push("at least 8 characters"),/[a-z]/.test(e)||r.push("lowercase"),/[A-Z]/.test(e)||r.push("uppercase"),/\d/.test(e)||r.push("number"),n.test(e)||r.push("special character"),r.length>0)?{text:"Add ".concat(r.join(", ")),isValid:!1}:s.test(e)?{text:"Password meets requirements",isValid:!0}
1:{text:"Password format is invalid",isValid:!1}}}}]);
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.