{"version":3,"file":"Outseta.DvMHUt3D.mjs","names":["user","useState"],"sources":["https:/framerusercontent.com/modules/zvKnh8BMUIeAAa6RJvDO/DJHWjYxkK6G3k9VvLvT5/Outseta.js"],"sourcesContent":["//@ts-ignore\nimport{jsx as _jsx}from\"react/jsx-runtime\";//@ts-ignore\nimport{useEffect,useState}from\"react\";const OUTSETA_TOKEN_COOKIE=\"ara_outseta_access_token\";const OUTSETA_TOKEN_COOKIE_DOMAIN=\".almeidaracingacademy.com\";const OUTSETA_TOKEN_COOKIE_MAX_AGE_SECONDS=60*60*12;const setOutsetaAccessTokenCookie=token=>{if(typeof window===\"undefined\")return;const hostname=window.location.hostname||\"\";const isPrimaryDomain=hostname.endsWith(\"almeidaracingacademy.com\");const safeToken=token||\"\";let cookie=`${OUTSETA_TOKEN_COOKIE}=${encodeURIComponent(safeToken)}; Path=/; SameSite=Lax; Secure`;if(isPrimaryDomain){cookie+=`; Domain=${OUTSETA_TOKEN_COOKIE_DOMAIN}`;}if(!safeToken){cookie+=\"; Max-Age=0\";}else{cookie+=`; Max-Age=${OUTSETA_TOKEN_COOKIE_MAX_AGE_SECONDS}`;}document.cookie=cookie;};const PLAN_UIDS={Free:\"LmJ48p9P\",Gold:\"aWxroqQV\",Motorsports:\"Rm8agVQ4\",Platinum:\"MQvbNRQY\",MRC:\"7maRGMQE\",RCC:\"496rpB9X\"};const PLAN_ADDITIONAL_UIDS={Free:[\"7ma20jQE\",\"yW1RYPmB\",\"VmA7Ka9a\"],Gold:[\"aWxrMAQV\",\"rm0R4Y9X\",\"1Qpbk3WE\",\"49EN6LW7\",\"z9MPlGQ4\",\"wmjM2ZWV\",\"MQvbNRQY\",\"yWobJY9D\",\"DmwbeyW4\",\"yW1RwymB\",\"VmA7r49a\",\"gWKY4eQp\",\"z9MPXKQ4\"],Motorsports:[\"z9MPlGQ4\",\"wmjM2ZWV\",\"MQvbNRQY\",\"yWobJY9D\",\"DmwbeyW4\",\"yW1RwymB\",\"VmA7r49a\",\"gWKY4eQp\",\"z9MPXKQ4\"],MRC:[\"7ma20jQE\",\"aWxrMAQV\",\"DmwbeyW4\",\"VmA7Ka9a\",\"1Qpbk3WE\",\"yW1RwymB\"],RCC:[\"yW1RYPmB\",\"rm0R4Y9X\",\"yWobJY9D\",\"VmA7Ka9a\",\"1Qpbk3WE\",\"yW1RwymB\"],Platinum:[\"yWobJY9D\",\"DmwbeyW4\",\"yW1RwymB\",\"VmA7r49a\",\"gWKY4eQp\",\"z9MPXKQ4\"]};const PLAN_UID_BUNDLES=Object.keys(PLAN_UIDS).reduce((acc,key)=>{const typedKey=key;const extras=PLAN_ADDITIONAL_UIDS[typedKey]??[];acc[typedKey]=[PLAN_UIDS[typedKey],...extras];return acc;},{});const PLAN_NAME_LOOKUP=Object.keys(PLAN_UIDS).reduce((acc,key)=>{acc[key.toLowerCase()]=key;return acc;},{});const PLAN_UID_ALIAS_LOOKUP=Object.entries(PLAN_UID_BUNDLES).reduce((acc,[planKey,uids])=>{uids.forEach(uid=>{acc[uid]=planKey;});return acc;},{});const ALL_PLAN_UIDS=new Set(Object.values(PLAN_UID_BUNDLES).flatMap(uids=>uids));const PAID_PLAN_KEYS=[\"Gold\",\"Motorsports\",\"Platinum\",\"MRC\",\"RCC\"];const PAID_PLAN_UIDS=PAID_PLAN_KEYS.flatMap(planKey=>PLAN_UID_BUNDLES[planKey]);const PAID_PLAN_UID_SET=new Set(PAID_PLAN_UIDS);const PLAN_KEY_TO_FLAG={Free:\"HasFreePlan\",Gold:\"HasGoldPlan\",Motorsports:\"HasMotorsportsPlan\",Platinum:\"HasPlatinumPlan\",MRC:\"HasMRCPlan\",RCC:\"HasRCCPlan\"};const PLAN_UID_TO_FLAG=Object.entries(PLAN_UID_BUNDLES).reduce((acc,[planKey,uids])=>{const flagKey=PLAN_KEY_TO_FLAG[planKey];if(!flagKey)return acc;uids.forEach(uid=>{acc[uid]=flagKey;});return acc;},{});const extractAddonUids=account=>{if(!account)return[];const results=new Set;const collectUid=value=>{if(typeof value===\"string\"){const trimmed=value.trim();if(trimmed.length>0){results.add(trimmed);}}};const collectFromMaybeArray=maybeArray=>{if(!Array.isArray(maybeArray))return;maybeArray.forEach(item=>{collectUid(item?.AddOn?.Uid);collectUid(item?.Addon?.Uid);collectUid(item?.Uid);});};collectFromMaybeArray(account.AddOns);collectFromMaybeArray(account.AccountAddOns);collectFromMaybeArray(account.SubscriptionAddOns);const collectFromSubscription=subscription=>{if(!subscription)return;collectFromMaybeArray(subscription.SubscriptionAddOns);};collectFromSubscription(account.CurrentSubscription);collectFromSubscription(account.LatestSubscription);collectFromSubscription(account.PrimarySubscription);if(Array.isArray(account.Subscriptions)){account.Subscriptions.forEach(collectFromSubscription);}return Array.from(results);};const derivePlanFlags=(planUid,addonUids)=>{const current=planUid?.trim()||\"\";const addonSet=new Set(addonUids.map(uid=>typeof uid===\"string\"?uid.trim():\"\").filter(uid=>uid.length>0));const hasUid=uid=>current===uid||addonSet.has(uid);const hasPlanKey=planKey=>PLAN_UID_BUNDLES[planKey]?.some(hasUid)??false;const hasAnyPlan=current.length>0||addonSet.size>0;const hasAnyPaidPlan=PAID_PLAN_UIDS.some(hasUid);return{HasAnyPlan:hasAnyPlan,HasAnyPaidPlan:hasAnyPaidPlan,HasFreePlan:hasPlanKey(\"Free\"),HasGoldPlan:hasPlanKey(\"Gold\"),HasMotorsportsPlan:hasPlanKey(\"Motorsports\"),HasPlatinumPlan:hasPlanKey(\"Platinum\"),HasMRCPlan:hasPlanKey(\"MRC\"),HasRCCPlan:hasPlanKey(\"RCC\"),CurrentPlanUid:current||undefined,CurrentAddOnUids:addonUids.length>0?Array.from(addonSet):undefined};};const applyPlanFlags=(target,planUid,addonUids)=>{if(!target)return;const flags=derivePlanFlags(planUid,addonUids);Object.assign(target,flags);};/////////////////// Button Overrides\nexport function withRegisterPopup(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,\"data-o-anonymous\":\"1\",\"data-o-auth\":\"1\",\"data-mode\":\"popup\",\"data-widget-mode\":\"register\"});};}export function asLoginPopupButton(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,\"data-o-anonymous\":\"1\",\"data-o-auth\":\"1\",\"data-mode\":\"popup\",\"data-widget-mode\":\"login\"});};}export function asProfilePopupButton(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,\"data-o-authenticated\":\"1\",\"data-o-profile\":\"1\",\"data-mode\":\"popup\"});};}export function asLogoutButton(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,\"data-o-authenticated\":\"1\",\"data-o-logout-link\":\"1\"});};}/////////////////// Visibility Overrides\nexport function showForAuthenticated(Component){return props=>{const user=useUser();const nextProps={...props,\"data-o-authenticated\":\"1\"};return renderWithVisibility(Component,nextProps,!!user);};}export function showForAnonymous(Component){return props=>{const user=useUser();const nextProps={...props,\"data-o-anonymous\":\"1\"};return renderWithVisibility(Component,nextProps,!user);};}/////////////////// Visibility Overrides Based on Linked Accounts\n/////////// Visibility Overrides Based on Plan Uid\n/////// Instruction\n// 1. Find the plan uid on the plan page in Outseta\n// 2. Replace aWxYEbmV in function name with the plan uid\n// 3. Replace the aWxYEbmV value of validPlanUid with the plan uid\n// Duplicate function for additional plan uids\nconst resolvePlanUid=identifier=>{if(typeof identifier!==\"string\")return null;const trimmed=identifier.trim();if(!trimmed)return null;const byNameKey=PLAN_NAME_LOOKUP[trimmed.toLowerCase()];if(byNameKey){return PLAN_UIDS[byNameKey];}if(ALL_PLAN_UIDS.has(trimmed)){return trimmed;}return trimmed;};const userHasPlanOrAddon=(targetUser,planUid)=>{if(!targetUser||!planUid)return false;const normalizedPlanUid=planUid.trim();if(!normalizedPlanUid)return false;const planKey=PLAN_UID_ALIAS_LOOKUP[normalizedPlanUid];const flagKey=PLAN_UID_TO_FLAG[normalizedPlanUid];if(flagKey&&targetUser[flagKey]){return true;}const matchesCurrentPlan=uid=>typeof targetUser.CurrentPlanUid===\"string\"&&targetUser.CurrentPlanUid.trim()===uid;if(planKey){const identifiers=PLAN_UID_BUNDLES[planKey];if(identifiers.some(matchesCurrentPlan)){return true;}if(Array.isArray(targetUser.CurrentAddOnUids)){const addOnUids=targetUser.CurrentAddOnUids;return identifiers.some(uid=>addOnUids.some(candidate=>typeof candidate===\"string\"&&candidate.trim()===uid));}return false;}if(matchesCurrentPlan(normalizedPlanUid)){return true;}if(Array.isArray(targetUser.CurrentAddOnUids)){return targetUser.CurrentAddOnUids.some(uid=>typeof uid===\"string\"&&uid.trim()===normalizedPlanUid);}return false;};/////////// Show For Plans Helper & Functions (OR logic - show if user has ANY of the plans)\nconst createShowForPlans=(planIdentifiers,label)=>{const targetPlanUids=planIdentifiers.map(planId=>resolvePlanUid(planId)).filter(uid=>Boolean(uid));return Component=>{return props=>{try{const user=useUser();if(!user)return hideComponent(Component,props);if(targetPlanUids.length===0){log(\"showForPlans invalid plan identifiers\",label);return hideComponent(Component,props);}const hasAny=targetPlanUids.some(uid=>userHasPlanOrAddon(user,uid));return renderWithVisibility(Component,props,hasAny);}catch(error){const message=error instanceof Error?error.message:String(error);log(\"error in showForPlans\",label,message);return hideComponent(Component,props);}};};};// Single plan visibility\nexport function showForFreePlan(Component){return createShowForPlans([PLAN_UIDS.Free],\"Free\")(Component);}export function showForGoldPlan(Component){return createShowForPlans([PLAN_UIDS.Gold],\"Gold\")(Component);}export function showForMotorsportsPlan(Component){return createShowForPlans([PLAN_UIDS.Motorsports],\"Motorsports\")(Component);}export function showForPlatinumPlan(Component){return createShowForPlans([PLAN_UIDS.Platinum],\"Platinum\")(Component);}export function showForMRCPlan(Component){return createShowForPlans([PLAN_UIDS.MRC],\"MRC\")(Component);}export function showForRCCPlan(Component){return createShowForPlans([PLAN_UIDS.RCC],\"RCC\")(Component);}// Multi-plan visibility (OR logic)\nexport function showForLegacyPlan(Component){return createShowForPlans([PLAN_UIDS.MRC,PLAN_UIDS.RCC],\"Legacy\")(Component);}export function showForGoldMRC(Component){return createShowForPlans([PLAN_UIDS.Gold,PLAN_UIDS.MRC],\"Gold+MRC\")(Component);}export function showForGoldRCC(Component){return createShowForPlans([PLAN_UIDS.Gold,PLAN_UIDS.RCC],\"Gold+RCC\")(Component);}export function showForGoldLegacy(Component){return createShowForPlans([PLAN_UIDS.Gold,PLAN_UIDS.MRC,PLAN_UIDS.RCC],\"Gold+Legacy\")(Component);}const createShowWithoutPlan=(planIdentifier,label,allowAnonymous=false)=>{const targetPlanUid=resolvePlanUid(planIdentifier);return Component=>{return props=>{try{const user=useUser();if(!user){return renderWithVisibility(Component,props,allowAnonymous);}if(!targetPlanUid){log(\"showWithoutPlan invalid plan identifier\",planIdentifier);return renderWithVisibility(Component,props,true);}const shouldShow=!userHasPlanOrAddon(user,targetPlanUid);return renderWithVisibility(Component,props,shouldShow);}catch(error){const message=error instanceof Error?error.message:String(error);log(\"error in showWithoutPlan\",label,message);return hideComponent(Component,props);}};};};const createShowWithoutPlans=(planIdentifiers,label,allowAnonymous=false)=>{const targetPlanUids=planIdentifiers.map(planId=>resolvePlanUid(planId)).filter(uid=>Boolean(uid));return Component=>{return props=>{try{const user=useUser();if(!user){return renderWithVisibility(Component,props,allowAnonymous);}if(targetPlanUids.length===0){log(\"showWithoutPlans invalid plan identifiers\",label);return renderWithVisibility(Component,props,true);}const hasAny=targetPlanUids.some(uid=>userHasPlanOrAddon(user,uid));return renderWithVisibility(Component,props,!hasAny);}catch(error){const message=error instanceof Error?error.message:String(error);log(\"error in showWithoutPlans\",label,message);return hideComponent(Component,props);}};};};export function showWithoutFreePlan(Component){return createShowWithoutPlan(PLAN_UIDS.Free,\"Free\")(Component);}export function showWithoutGoldPlan(Component){return createShowWithoutPlan(PLAN_UIDS.Gold,\"Gold\")(Component);}export function showWithoutMotorsportsPlan(Component){return createShowWithoutPlan(PLAN_UIDS.Motorsports,\"Motorsports\")(Component);}export function showWithoutPlatinumPlan(Component){return createShowWithoutPlan(PLAN_UIDS.Platinum,\"Platinum\")(Component);}export function showWithoutMRCPlan(Component){return createShowWithoutPlan(PLAN_UIDS.MRC,\"MRC\")(Component);}export function showWithoutRCCPlan(Component){return createShowWithoutPlan(PLAN_UIDS.RCC,\"RCC\")(Component);}export function showWithoutPaidPlan(Component){return createShowWithoutPlans([PLAN_UIDS.Gold,PLAN_UIDS.Motorsports,PLAN_UIDS.Platinum],\"Paid\")(Component);}export function showWithoutAnonGoldPlan(Component){return createShowWithoutPlan(PLAN_UIDS.Gold,\"Gold\",true)(Component);}export function showWithoutAnonMotorsportsPlan(Component){return createShowWithoutPlan(PLAN_UIDS.Motorsports,\"Motorsports\",true)(Component);}export function showWithoutAnonPlatinumPlan(Component){return createShowWithoutPlan(PLAN_UIDS.Platinum,\"Platinum\",true)(Component);}export function showWithoutAnonPaidPlan(Component){return createShowWithoutPlans([PLAN_UIDS.Gold,PLAN_UIDS.Motorsports,PLAN_UIDS.Platinum],\"Paid\",true)(Component);}export function showWithoutGoldMRC(Component){return createShowWithoutPlans([PLAN_UIDS.Gold,PLAN_UIDS.MRC],\"Gold+MRC\",false)(Component);}export function showWithoutGoldRCC(Component){return createShowWithoutPlans([PLAN_UIDS.Gold,PLAN_UIDS.RCC],\"Gold+RCC\",false)(Component);}export function showWithoutGoldLegacy(Component){return createShowWithoutPlans([PLAN_UIDS.Gold,PLAN_UIDS.MRC,PLAN_UIDS.RCC],\"Gold+Legacy\",false)(Component);}/////////// Visibility Based on an Account Custom Property\n/////// Instruction\n// 1. Give the function as useful name\n// 2. Replace the \"PARTY\" value of validPropertyValue with the uppercase version of the value you want\n// 3. Replace MyCustomAccountProperty with the system name of your custom account property\n// Duplicate the functions for additional account properties and/or values\nexport function showForPartyAccounts(Component){const validPropertyValue=\"PARTY\";return props=>{try{const user=useUser();const value=user&&user[\"Account.MyCustomAccountProperty\"]?.toUpperCase();return renderWithVisibility(Component,props,value===validPropertyValue);}catch(error){log(\"error in showForPartyPlan\",validPropertyValue,error.message);return hideComponent(Component,props);}};}/////////// Visibility Based on an Person Custom Property\n/////// Instruction\n// 1. Give the function a useful name\n// 2. Replace the \"PARTY\" value of validPropertyValue with the uppercase version of the value you want\n// 3. Replace MyCustomPersonProperty with the system name of your custom person property\n// Duplicate the functions for additional account properties and/or values\nexport function showForPartyPeople(Component){const validPropertyValue=\"PARTY\";return props=>{try{const user=useUser();const value=user&&user[\"MyCustomPersonProperty\"]?.toUpperCase();return renderWithVisibility(Component,props,value===validPropertyValue);}catch(error){log(\"error in showForPartyPeople\",validPropertyValue,error.message);return hideComponent(Component,props);}};}export function showForLeagueSignedUp(Component){return props=>{try{const user=useUser();const rawValue=user?.AcademyLeague;const isSignedUp=rawValue===true;return renderWithVisibility(Component,props,isSignedUp);}catch(error){const message=error instanceof Error?error.message:String(error);log(\"error in showForLeagueSignedUp\",message);return hideComponent(Component,props);}};}export function showWithoutLeagueSignedUp(Component){return props=>{try{const user=useUser();const rawValue=user?.AcademyLeague;const isSignedUp=rawValue===true;return renderWithVisibility(Component,props,!isSignedUp);}catch(error){const message=error instanceof Error?error.message:String(error);log(\"error in showWithoutLeagueSignedUp\",message);return hideComponent(Component,props);}};}let user=null;const listeners=new Set;let ensureAccessTokenPromise=null;let clearLockedLessonPromise=null;let lastClearedPlanUid=null;let lastFetchedPlanUid=null;const LOCKED_LESSON_FIELDS=[\"LastLockedLessonSlug\",\"LastLockedLessonPath\",\"LastLockedLessonTitle\"];// Update this set if you introduce additional \"free\" or non-upgrade plans that should *not* trigger locked-lesson clearing.\nconst LOCKED_METADATA_EXCLUDED_PLAN_UIDS=new Set([PLAN_UIDS.Free]);const collectLockedLessonFields=currentUser=>{if(!currentUser)return[];return LOCKED_LESSON_FIELDS.filter(field=>{const value=currentUser[field];return typeof value===\"string\"&&value.length>0;});};const ensureLockedLessonMetadataCleared=async(reason,currentPlanUid,previousPlanUid)=>{if(clearLockedLessonPromise)return clearLockedLessonPromise;if(!user)return;if(!currentPlanUid)return;if(LOCKED_METADATA_EXCLUDED_PLAN_UIDS.has(currentPlanUid))return;if(currentPlanUid===previousPlanUid&&lastClearedPlanUid===currentPlanUid)return;const fieldsToClear=collectLockedLessonFields(user);if(fieldsToClear.length===0)return;const updateFn=user.update;if(typeof updateFn!==\"function\"){console.warn(\"[Outseta] Cannot clear locked lesson metadata; update() unavailable\");return;}const payload=fieldsToClear.reduce((acc,field)=>{acc[field]=\"\";return acc;},{});clearLockedLessonPromise=(async()=>{try{await updateFn(payload);fieldsToClear.forEach(field=>{user[field]=\"\";});if(currentPlanUid){lastClearedPlanUid=currentPlanUid;}window.__outsetaCurrentUser=user;log(\"cleared locked lesson metadata\",reason,fieldsToClear);}catch(error){console.error(\"[Outseta] Failed to clear locked lesson metadata\",reason,error);}})().finally(()=>{clearLockedLessonPromise=null;});return clearLockedLessonPromise;};const ensureAccessToken=async reason=>{if(typeof window===\"undefined\")return null;const outseta=getOutseta();if(!outseta)return null;if(window.__outsetaAccessToken){setOutsetaAccessTokenCookie(window.__outsetaAccessToken);return window.__outsetaAccessToken;}const directToken=outseta.accessToken?.access_token;if(directToken){window.__outsetaAccessToken=directToken;setOutsetaAccessTokenCookie(directToken);return directToken;}if(!ensureAccessTokenPromise){ensureAccessTokenPromise=(async()=>{try{if(typeof outseta.getAccessToken===\"function\"){const result=await outseta.getAccessToken();if(result){const token=typeof result===\"string\"?result:result.access_token;if(token){window.__outsetaAccessToken=token;setOutsetaAccessTokenCookie(token);return token;}}}}catch(error){console.error(\"ensureAccessToken getAccessToken failed\",reason,error);}try{const stored=localStorage.getItem(\"Outseta.nocode.accessToken\");if(stored){const parsed=JSON.parse(stored);const token=parsed?.access_token||parsed;if(token){window.__outsetaAccessToken=token;setOutsetaAccessTokenCookie(token);return token;}}}catch(error){console.error(\"ensureAccessToken localStorage failed\",reason,error);}return window.__outsetaAccessToken||null;})().finally(()=>{ensureAccessTokenPromise=null;});}return ensureAccessTokenPromise;};const fetchUser=async event=>{try{log(\"fetch user\",event);const outseta=getOutseta();if(!outseta)return;const previousPlanUid=lastFetchedPlanUid;const userObject=await outseta.getUser();user=flattenObject(userObject);const rawPlan=user[\"Account.CurrentSubscription.Plan.Uid\"];const currentPlanUid=typeof rawPlan===\"string\"&&rawPlan.trim().length>0?rawPlan.trim():null;const addonUids=extractAddonUids(userObject?.Account);lastFetchedPlanUid=currentPlanUid;applyPlanFlags(user,currentPlanUid,addonUids);window.__outsetaCurrentUser=user;await ensureAccessToken(`fetchUser:${event}`);await ensureLockedLessonMetadataCleared(`fetchUser:${event}`,currentPlanUid,previousPlanUid);log(\"fetch user fulfilled\",event,userObject,user);notifyListeners();}catch(error){console.error(\"fetch user failed\",error);}};const clearUser=event=>{user=null;window.__outsetaCurrentUser=undefined;window.__outsetaAccessToken=undefined;setOutsetaAccessTokenCookie(null);lastClearedPlanUid=null;lastFetchedPlanUid=null;// Possible race condition that an earlier\nlog(\"cleared user\",event);notifyListeners();};const notifyListeners=()=>{listeners.forEach(listener=>listener(user));};export const subscribe=listener=>{listeners.add(listener);return()=>listeners.delete(listener);};export const getUser=()=>user;export const getAccessToken=()=>{if(typeof window===\"undefined\")return null;if(window.__outsetaAccessToken){setOutsetaAccessTokenCookie(window.__outsetaAccessToken);return window.__outsetaAccessToken;}const sdkToken=window.Outseta?.accessToken?.access_token;if(sdkToken){window.__outsetaAccessToken=sdkToken;setOutsetaAccessTokenCookie(sdkToken);return sdkToken;}ensureAccessToken(\"getAccessToken\");return null;};export const getAccessTokenAsync=(reason=\"getAccessTokenAsync\")=>{return ensureAccessToken(reason);};export const refreshAccessToken=async(reason=\"refreshAccessToken\")=>{if(typeof window===\"undefined\")return null;const outseta=getOutseta();if(!outseta)return null;// Clear cached token so the SDK is forced to re-fetch / refresh\nwindow.__outsetaAccessToken=undefined;try{if(typeof outseta.getAccessToken===\"function\"){const result=await outseta.getAccessToken();if(result){const token=typeof result===\"string\"?result:result.access_token;if(token){window.__outsetaAccessToken=token;setOutsetaAccessTokenCookie(token);return token;}}}}catch(error){console.error(\"refreshAccessToken SDK failed\",reason,error);}// Fallback: check if SDK updated its own accessToken object\nconst sdkToken=outseta.accessToken?.access_token;if(sdkToken){window.__outsetaAccessToken=sdkToken;setOutsetaAccessTokenCookie(sdkToken);return sdkToken;}// Last resort: localStorage\ntry{const stored=localStorage.getItem(\"Outseta.nocode.accessToken\");if(stored){const parsed=JSON.parse(stored);const token=parsed?.access_token||parsed;if(token){window.__outsetaAccessToken=token;setOutsetaAccessTokenCookie(token);return token;}}}catch{}return null;};// Expose module globally so other code files can access the shared user state\nif(typeof window!==\"undefined\"){window.__outsetaFramerModule={subscribe,getUser,getAccessToken,getAccessTokenAsync,refreshAccessToken};}// Listen to global events that might change the user\nconst outsetaFetchUserEvents=[\"accessToken.set\",\"profile.update\",\"account.update\"];outsetaFetchUserEvents.forEach(event=>{getOutseta()?.on(event,()=>fetchUser(event));});// Listen to global events that should clear the user\nconst outsetaClearUserEvents=[\"logout\"];outsetaClearUserEvents.forEach(event=>{getOutseta()?.on(event,()=>clearUser(event));});function patchOutseta(){if(typeof window===\"undefined\")return;const outseta=window[\"Outseta\"];if(!outseta||window.__outsetaPatched)return;window.__outsetaPatched=true;const originalSetAccessToken=outseta.setAccessToken?.bind(outseta);if(originalSetAccessToken){outseta.setAccessToken=async(token,...rest)=>{window.__outsetaAccessToken=token;setOutsetaAccessTokenCookie(token);const result=await originalSetAccessToken(token,...rest);// Ensure user state syncs after token changes\nfetchUser(\"accessToken.set\");return result;};}ensureAccessToken(\"patchOutseta\");const originalLogout=outseta.logout?.bind(outseta);if(originalLogout){outseta.logout=async(...args)=>{window.__outsetaAccessToken=undefined;window.__outsetaCurrentUser=undefined;setOutsetaAccessTokenCookie(null);return originalLogout(...args);};}}if(typeof window!==\"undefined\"){patchOutseta();const patchInterval=setInterval(()=>{if(window.__outsetaPatched){clearInterval(patchInterval);}else{patchOutseta();}},500);}/////////////////// User Hook\nexport function useUser(){const[user,setUser]=useState(getUser());useEffect(()=>{const updateData=newData=>setUser(newData);const unsubscribe=subscribe(updateData);return()=>{unsubscribe();};},[]);return user;}function getOutseta(){if(window&&window[\"Outseta\"]){return window[\"Outseta\"];}else if(window){alert(`We're sorry, but it seems that Outseta is missing. Please reach out to the owner of ${window.location.hostname} to let them know. Thank you for your understanding 🙏`);}else{// Rendering on the server\n}}/////////////////// Helpers\nfunction withProperty(property,Component){return props=>{const user=useUser();if(!user)return null;return /*#__PURE__*/_jsx(Component,{...props,text:user[property]});};}function withImageProperty(property,Component){return props=>{const user=useUser();if(!user)return null;const imageSrc=user[property];log(\"avatar source\",user[property]);if(imageSrc){return /*#__PURE__*/_jsx(Component,{...props,background:{...props.background,src:imageSrc,srcSet:undefined}});}else if(props.background?.src){// Component has image set, use as fallback\nreturn /*#__PURE__*/_jsx(Component,{...props});}else{// Component has no image set, remove\nreturn null;}};}function log(...props){getOutseta()?.debug(\"outseta.framer.override.user\",...props);}function flattenObject(obj,parent=\"\",res={}){for(let key in obj){let propName=parent?`${parent}.${key}`:key;if(Array.isArray(obj[key])){obj[key].forEach((item,index)=>{flattenObject(item,`${propName}[${index}]`,res);});}else if(typeof obj[key]===\"object\"&&obj[key]!==null){flattenObject(obj[key],propName,res);}else{res[propName]=obj[key];}}return res;}function renderWithVisibility(Component,props,isVisible){if(isVisible)return /*#__PURE__*/_jsx(Component,{...props});return hideComponent(Component,props);}function hideComponent(Component,props){const{style,...rest}=props;return /*#__PURE__*/_jsx(Component,{...rest,style:{...style??{},display:\"none\",opacity:0,pointerEvents:\"none\",visibility:\"hidden\",position:\"absolute\",width:0,height:0,overflow:\"hidden\",margin:0,padding:0,border:\"none\",clip:\"rect(0,0,0,0)\"}});}\nexport const __FramerMetadata__ = {\"exports\":{\"showForGoldMRC\":{\"type\":\"reactHoc\",\"name\":\"showForGoldMRC\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutGoldRCC\":{\"type\":\"reactHoc\",\"name\":\"showWithoutGoldRCC\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutPlatinumPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutPlatinumPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForGoldLegacy\":{\"type\":\"reactHoc\",\"name\":\"showForGoldLegacy\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getAccessToken\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutMotorsportsPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutMotorsportsPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForGoldPlan\":{\"type\":\"reactHoc\",\"name\":\"showForGoldPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForFreePlan\":{\"type\":\"reactHoc\",\"name\":\"showForFreePlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getAccessTokenAsync\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForMRCPlan\":{\"type\":\"reactHoc\",\"name\":\"showForMRCPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutAnonMotorsportsPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutAnonMotorsportsPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForGoldRCC\":{\"type\":\"reactHoc\",\"name\":\"showForGoldRCC\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForMotorsportsPlan\":{\"type\":\"reactHoc\",\"name\":\"showForMotorsportsPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForPartyPeople\":{\"type\":\"reactHoc\",\"name\":\"showForPartyPeople\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutGoldLegacy\":{\"type\":\"reactHoc\",\"name\":\"showWithoutGoldLegacy\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutFreePlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutFreePlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForRCCPlan\":{\"type\":\"reactHoc\",\"name\":\"showForRCCPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutAnonPlatinumPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutAnonPlatinumPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutGoldMRC\":{\"type\":\"reactHoc\",\"name\":\"showWithoutGoldMRC\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useUser\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutRCCPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutRCCPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForPlatinumPlan\":{\"type\":\"reactHoc\",\"name\":\"showForPlatinumPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutLeagueSignedUp\":{\"type\":\"reactHoc\",\"name\":\"showWithoutLeagueSignedUp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutMRCPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutMRCPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getUser\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"subscribe\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutAnonGoldPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutAnonGoldPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutPaidPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutPaidPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"asLoginPopupButton\":{\"type\":\"reactHoc\",\"name\":\"asLoginPopupButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForAnonymous\":{\"type\":\"reactHoc\",\"name\":\"showForAnonymous\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutAnonPaidPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutAnonPaidPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForLeagueSignedUp\":{\"type\":\"reactHoc\",\"name\":\"showForLeagueSignedUp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForLegacyPlan\":{\"type\":\"reactHoc\",\"name\":\"showForLegacyPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"refreshAccessToken\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRegisterPopup\":{\"type\":\"reactHoc\",\"name\":\"withRegisterPopup\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForAuthenticated\":{\"type\":\"reactHoc\",\"name\":\"showForAuthenticated\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"asProfilePopupButton\":{\"type\":\"reactHoc\",\"name\":\"asProfilePopupButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"asLogoutButton\":{\"type\":\"reactHoc\",\"name\":\"asLogoutButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showForPartyAccounts\":{\"type\":\"reactHoc\",\"name\":\"showForPartyAccounts\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showWithoutGoldPlan\":{\"type\":\"reactHoc\",\"name\":\"showWithoutGoldPlan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Outseta.map"],"mappings":"uIAGqkB,SAAgB,GAAe,EAAU,CAAC,MAAO,IAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,uBAAuB,IAAI,qBAAqB,IAAI,CAAC,CAChuB,SAAgB,GAAqB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAMA,EAAK,GAAS,CAAuD,OAAO,EAAqB,EAAlE,CAAC,GAAG,EAAM,uBAAuB,IAAI,CAAiD,CAAC,CAACA,EAAK,EAAI,SAAgB,GAAiB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAMA,EAAK,GAAS,CAAmD,OAAO,EAAqB,EAA9D,CAAC,GAAG,EAAM,mBAAmB,IAAI,CAAiD,CAACA,EAAK,EAS7X,SAAgB,GAAgB,EAAU,CAAC,OAAO,EAAmB,CAAC,EAAU,KAAK,CAAC,OAAO,CAAC,EAAU,CAAE,SAAgB,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