{"version":3,"file":"CompassChatForMain.CPVE7iCX.mjs","names":["React.useState","React.useMemo","React.useState","React.useRef","_Fragment","React.useState","React.useRef","React.useCallback","__esmMin","init_ssg_sandbox_shims","ne","init_npm_react_dom_18_3_1","l","_e","Ha","pe","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","de","window","init_framer_BWFVvmND","RenderTarget","ControlType","addPropertyControls","KlyroAuthProvider","init_KlyroSupabase_1_3OjW6g","KlyroDesktopNotice","isCanvas","isDesktop","setIsDesktop","update","props","accent","background","cardBackground","textColor","secondaryColor","font","openUrl","url","buttonBase","arrow","init_DesktopPlatformUnavailable","isKlyroNativeApp","HideInKlyroNativeApp","Component","init_KlyroNativeVisibility","getImageSrc","image","getImageSrcSet","getImageAlt","readExact","raw","EXACT_KEY","writeExact","profile","seedFromLegacy","current","SECTIONS","section","sources","LEGACY_SOURCE_KEY","settings","BACKGROUND_KEY","next","source","writeLegacyNumber","writeLegacySource","choice","getAuth","KlyroAuth","data","saveCloud","accessToken","userId","background_selection","BACKGROUND_SUPABASE_URL","BACKGROUND_PUBLISHABLE_KEY","loadCloud","response","rows","value","isPlatinum","sub","KLYRO_PLATINUM_PRICE_ID","preload","BackgroundImageSetting","images","image1","image2","image3","image4","image5","image6","image7","image8","image9","image10","image11","image12","image13","image14","image15","setSection","setProfile","platinum","setPlatinum","menuOpen","setMenuOpen","menuVisible","setMenuVisible","message","setMessage","syncing","setSyncing","saveSequence","closeTimer","alive","cloud","premium","local","merged","previousOverflow","onKey","event","closeMenu","choose","imageNumber","src","LABELS","SECTION_LABELS","sequence","error","openMenu","active","activeSrc","selectedCount","item","surface","inputBackground","borderColor","imageRadius","renderTile","number","index","selected","locked","buttonColor","selectedBackground","imageHeight","bodySize","inputSize","radius","titleSize","buttonRadius","buttonTextColor","init_BackgroundImageSetting","readDataCache","entry","klyroCacheStore","key","ageMs","maxAgeMs","writeDataCache","getCachedData","cached","options","pending","request","loader","invalidateDataCache","prefix","compassCacheKey","n","x","money","prettyDate","d","emptyCompass","extractAmount","dollar","text","plain","includesAny","words","word","responseFor","s","paycheck","topCategory","amount","analyze","debtPlan","payFirst","affordability","spending","paycheckPlan","paycheckIntent","credit","subs","bills","wealth","cards","card","ranked","a","b","aApr","bApr","totalDebt","sum","totalMinimums","lines","apr","minimum","missingApr","answer","first","reasons","to29","cash","obligations","baseBuffer","afterPurchase","afterBuffer","direction","second","paycheckAmount","planned","remaining","uncoveredBills","availableAfterBills","knownMinimums","cashBufferTarget","allocatable","savingsTarget","extraDebt","spendingLeft","uncovered","safeRemaining","target","util","balance","limit","high","subscriptions","monthly","normalized","top","coverage","urgent","r","KlyroCompassBottomChat","setData","setCards","setSubscriptions","loading","setLoading","loadError","setLoadError","mounted","setMounted","isOpen","setIsOpen","visible","setVisible","draft","setDraft","thinking","setThinking","messages","setMessages","scrollRef","textareaRef","refreshInFlight","refresh","run","sessionData","getSession","force","COMPASS_CACHE_TTL","bundle","compassR","cardsR","liabilitiesR","subsR","supabase","f","legacy","compass","liabilities","liab","row","events","onChange","onFocus","name","ask","question","prompt","userMessage","prev","resolve","result","runAction","action","clearChat","innerRadius","goldColor","smallSize","dangerColor","QUICK_PROMPTS","klyroCacheGlobal","init_CompassChatForMain"],"sources":["https:/framerusercontent.com/modules/b7ROqpW3CvES2ekqvrcA/adTy6AunvweDBnH75DQI/DesktopPlatformUnavailable.js","https:/framerusercontent.com/modules/vf3NSIjvII7KSBoyWcpS/vQIZB4yALHHCsKlJWTcs/KlyroNativeVisibility.js","https:/framerusercontent.com/modules/66odsMM0HrDut6kDdoEm/achuY2IXIkKanm9867Bd/BackgroundImageSetting.js","https:/framerusercontent.com/modules/OGPBsYxhedfnoKCyiZLk/sxPSig30aPW1pPTyzOi0/CompassChatForMain.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";export default function KlyroDesktopNotice(props){const isCanvas=RenderTarget.current()===RenderTarget.canvas;const[isDesktop,setIsDesktop]=React.useState(true);React.useEffect(()=>{if(isCanvas)return;const update=()=>{setIsDesktop(window.innerWidth>=props.desktopBreakpoint);};update();window.addEventListener(\"resize\",update);return()=>{window.removeEventListener(\"resize\",update);};},[props.desktopBreakpoint,isCanvas]);/*\n     * In Framer's canvas we always render the component\n     * so it remains editable.\n     *\n     * On the published site it only appears at or above\n     * the configured desktop breakpoint.\n     */if(!isCanvas&&!isDesktop){return null;}const accent=props.accent||\"#DCC77A\";const background=props.background||\"#070709\";const cardBackground=props.cardBackground||\"#111114\";const textColor=props.textColor||\"#FFFFFF\";const secondaryColor=props.secondaryColor||\"#A7A7AD\";const font=\"Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif\";const openUrl=url=>{if(!url)return;try{window.open(url,\"_blank\",\"noopener,noreferrer\");}catch{window.location.href=url;}};/*\n     * BUTTON STYLE\n     */const buttonBase={appearance:\"none\",WebkitAppearance:\"none\",width:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:16,padding:\"16px 18px\",border:\"1px solid rgba(255,255,255,.09)\",borderRadius:16,background:\"#19191D\",color:textColor,fontFamily:font,cursor:\"pointer\",textAlign:\"left\",transition:\"transform .18s ease, background .18s ease, border-color .18s ease\",boxSizing:\"border-box\"};const arrow=/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{color:accent,fontSize:20,lineHeight:1,flexShrink:0},children:\"↗\"});return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",width:\"100%\",minHeight:\"100vh\",boxSizing:\"border-box\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"64px 32px\",background,color:textColor,fontFamily:font,overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{position:\"absolute\",width:700,height:700,left:\"50%\",top:\"50%\",transform:\"translate(-50%, -50%)\",borderRadius:\"50%\",background:`radial-gradient(circle, ${accent}12 0%, transparent 68%)`,pointerEvents:\"none\"}}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",maxWidth:980,display:\"grid\",gridTemplateColumns:\"minmax(0, 1.35fr) minmax(320px, .85fr)\",gap:44,alignItems:\"center\",zIndex:1},children:[/*#__PURE__*/_jsxs(\"section\",{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"inline-flex\",alignItems:\"center\",gap:8,marginBottom:18,color:accent,fontSize:11,fontWeight:800,letterSpacing:\".13em\",textTransform:\"uppercase\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{width:8,height:8,borderRadius:\"50%\",background:accent,boxShadow:`0 0 18px ${accent}`}}),props.eyebrow]}),/*#__PURE__*/_jsx(\"h1\",{style:{margin:\"0 0 20px\",maxWidth:650,color:textColor,fontSize:\"clamp(42px, 5vw, 70px)\",fontWeight:800,lineHeight:1.02,letterSpacing:\"-0.055em\"},children:props.title}),/*#__PURE__*/_jsx(\"p\",{style:{maxWidth:650,margin:\"0 0 17px\",color:secondaryColor,fontSize:17,lineHeight:1.65,fontWeight:450},children:props.description}),/*#__PURE__*/_jsx(\"p\",{style:{maxWidth:620,margin:0,color:\"#74747B\",fontSize:13,lineHeight:1.6},children:props.secondaryText})]}),/*#__PURE__*/_jsxs(\"section\",{style:{width:\"100%\",boxSizing:\"border-box\",padding:24,background:cardBackground,border:\"1px solid #2D2D32\",borderRadius:24,boxShadow:\"0 30px 90px rgba(0,0,0,.35)\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:20},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:18,fontWeight:750,color:textColor,letterSpacing:\"-0.025em\"},children:\"Continue with Klyro\"}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:7,color:secondaryColor,fontSize:12,lineHeight:1.55},children:\"Use the Klyro mobile app or open Klyro from your phone.\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:10},children:[props.showIos&&/*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:()=>openUrl(props.iosUrl),style:buttonBase,children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:13,minWidth:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:42,height:42,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0,background:\"#242428\",border:\"1px solid #34343A\",borderRadius:13,fontSize:23},children:\"\"}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:14,fontWeight:700},children:props.iosLabel}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:2,color:secondaryColor,fontSize:11},children:\"iPhone & iPad\"})]})]}),arrow]}),props.showAndroid&&/*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:()=>openUrl(props.androidUrl),style:buttonBase,children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:13,minWidth:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:42,height:42,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0,background:\"#242428\",border:\"1px solid #34343A\",borderRadius:13,color:accent},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"22\",height:\"22\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.7\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M6 10h12v8a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-8Z\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M8 10a4 4 0 0 1 8 0\"}),/*#__PURE__*/_jsx(\"path\",{d:\"m8 5-1.5-2\"}),/*#__PURE__*/_jsx(\"path\",{d:\"m16 5 1.5-2\"}),/*#__PURE__*/_jsx(\"circle\",{cx:\"9.5\",cy:\"8\",r:\".6\",fill:\"currentColor\",stroke:\"none\"}),/*#__PURE__*/_jsx(\"circle\",{cx:\"14.5\",cy:\"8\",r:\".6\",fill:\"currentColor\",stroke:\"none\"})]})}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:14,fontWeight:700},children:props.androidLabel}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:2,color:secondaryColor,fontSize:11},children:\"Android phones & tablets\"})]})]}),arrow]}),props.showWeb&&/*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:()=>openUrl(props.mobileWebUrl),style:buttonBase,children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:13,minWidth:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:42,height:42,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0,background:\"#242428\",border:\"1px solid #34343A\",borderRadius:13,color:accent},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"21\",height:\"21\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.7\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"rect\",{x:\"7\",y:\"2\",width:\"10\",height:\"20\",rx:\"2\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M10 18h4\"})]})}),/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:14,fontWeight:700},children:props.webLabel}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:2,color:secondaryColor,fontSize:11},children:\"Open Klyro from your mobile browser\"})]})]}),arrow]})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:8,marginTop:20,paddingTop:17,borderTop:\"1px solid rgba(255,255,255,.07)\",color:\"#77777E\",fontSize:11,lineHeight:1.5},children:[/*#__PURE__*/_jsx(\"span\",{style:{width:7,height:7,flexShrink:0,borderRadius:\"50%\",background:accent,boxShadow:`0 0 12px ${accent}90`}}),\"Desktop reconstruction in progress\"]})]})]}),isCanvas&&/*#__PURE__*/_jsxs(\"div\",{style:{position:\"absolute\",left:20,bottom:20,padding:\"8px 11px\",borderRadius:10,background:\"#18181C\",border:\"1px solid #34343A\",color:\"#88888F\",fontSize:10},children:[\"Desktop-only notice \\xb7 hidden below \",props.desktopBreakpoint,\"px\"]})]});}/*\n * DEFAULTS\n */KlyroDesktopNotice.defaultProps={eyebrow:\"KLYRO\",title:\"Klyro is moving forward.\",description:\"Our current desktop experience is being retired while we rebuild Klyro for desktop as a new native React experience. For now, please continue using Klyro on iOS, Android, or from your mobile browser.\",secondaryText:\"Your Klyro account and financial data remain available through our mobile experiences while the new desktop platform is under development.\",iosLabel:\"Download for iOS\",androidLabel:\"Download for Android\",webLabel:\"Use Klyro on mobile web\",iosUrl:\"\",androidUrl:\"\",mobileWebUrl:\"https://klyrobank.com\",showIos:true,showAndroid:true,showWeb:true,desktopBreakpoint:768,accent:\"#DCC77A\",background:\"#070709\",cardBackground:\"#111114\",textColor:\"#FFFFFF\",secondaryColor:\"#A7A7AD\"};/*\n * FRAMER CONTROLS\n */addPropertyControls(KlyroDesktopNotice,{eyebrow:{type:ControlType.String,title:\"Label\",defaultValue:\"KLYRO\"},title:{type:ControlType.String,title:\"Title\",displayTextArea:true},description:{type:ControlType.String,title:\"Description\",displayTextArea:true},secondaryText:{type:ControlType.String,title:\"Footer Text\",displayTextArea:true},iosLabel:{type:ControlType.String,title:\"iOS Label\",defaultValue:\"Download for iOS\"},iosUrl:{type:ControlType.Link,title:\"iOS Link\"},showIos:{type:ControlType.Boolean,title:\"Show iOS\",defaultValue:true},androidLabel:{type:ControlType.String,title:\"Android Label\",defaultValue:\"Download for Android\"},androidUrl:{type:ControlType.Link,title:\"Android Link\"},showAndroid:{type:ControlType.Boolean,title:\"Show Android\",defaultValue:true},webLabel:{type:ControlType.String,title:\"Web Label\",defaultValue:\"Use Klyro on mobile web\"},mobileWebUrl:{type:ControlType.Link,title:\"Mobile Web Link\"},showWeb:{type:ControlType.Boolean,title:\"Show Web\",defaultValue:true},desktopBreakpoint:{type:ControlType.Number,title:\"Desktop Width\",defaultValue:768,min:600,max:1600,step:1,unit:\"px\"},accent:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#DCC77A\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#070709\"},cardBackground:{type:ControlType.Color,title:\"Panel\",defaultValue:\"#111114\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#FFFFFF\"},secondaryColor:{type:ControlType.Color,title:\"Secondary\",defaultValue:\"#A7A7AD\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KlyroDesktopNotice\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DesktopPlatformUnavailable.map","import{jsx as _jsx}from\"react/jsx-runtime\";/**\n * Hides a Framer layer whenever Klyro is running\n * inside the native Capacitor iOS application.\n *\n * Native app detection:\n *   <html data-klyro-native=\"ios\">\n */function isKlyroNativeApp(){if(typeof document===\"undefined\")return false;return document.documentElement.getAttribute(\"data-klyro-native\")===\"ios\";}export function HideInKlyroNativeApp(Component){return props=>{if(isKlyroNativeApp()){return null;}return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"HideInKlyroNativeApp\":{\"type\":\"reactHoc\",\"name\":\"HideInKlyroNativeApp\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./KlyroNativeVisibility.map","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{createPortal}from\"react-dom\";import{addPropertyControls,ControlType}from\"framer\";// @ts-ignore Framer resolves this versioned project module during build\nimport KlyroAuthProvider from\"https://framer.com/m/KlyroSupabase-1-3OjW6g.js@k91yqY1apNU4tENaBCZa\";const KlyroAuth=KlyroAuthProvider;/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 390\n */const EXACT_KEY=\"klyro-background-exact-v1\";const BACKGROUND_KEY=\"klyro-background-images\";const LEGACY_SOURCE_KEY=\"klyro-background-source-cache-v2\";const KLYRO_PLATINUM_PRICE_ID=\"price_1U6cZuF5RwP2PclK8FBJJJNq\";const BACKGROUND_SUPABASE_URL=\"https://zsqioztrkxzxqckwzjac.supabase.co\";const BACKGROUND_PUBLISHABLE_KEY=\"sb_publishable_7PweHqQ-lVGesYTBpoTLpw_MGhdtQL8\";const SECTIONS=[\"utilization\",\"payments\",\"profile\",\"insights\"];const SECTION_LABELS={utilization:\"Home\",payments:\"Payments\",profile:\"Profile\",insights:\"Insights\"};const LABELS=[\"Image 1\",\"Image 2\",\"Image 3\",\"Image 4\",\"Image 5\",\"Image 6\",\"Image 7\",\"Image 8\",\"Image 9\",\"Image 10\",\"Haunted Manor\",\"Pumpkin Glow\",\"Witching Hour\",\"Ghostly Fog\",\"Midnight Graveyard\"];function getImageSrc(image){if(!image)return\"\";return typeof image===\"string\"?image:image.src||\"\";}function getImageSrcSet(image){if(!image||typeof image===\"string\")return undefined;return image.srcSet||undefined;}function getImageAlt(image){if(!image||typeof image===\"string\")return\"\";return image.alt||\"\";}function readExact(){if(typeof window===\"undefined\")return{};try{const raw=JSON.parse(localStorage.getItem(EXACT_KEY)||\"{}\");return raw&&typeof raw===\"object\"?raw:{};}catch{return{};}}function writeExact(profile){try{localStorage.setItem(EXACT_KEY,JSON.stringify(profile));}catch{}}function seedFromLegacy(){const current=readExact();if(SECTIONS.some(section=>current[section]?.src))return current;try{const sources=JSON.parse(localStorage.getItem(LEGACY_SOURCE_KEY)||\"{}\");const settings=JSON.parse(localStorage.getItem(BACKGROUND_KEY)||\"{}\");const next={...current};SECTIONS.forEach(section=>{const source=sources?.[section];if(!source?.src)return;const raw=settings?.[section];const image=typeof raw===\"object\"?Number(raw?.image)||Number(source.image)||1:Number(raw)||Number(source.image)||1;next[section]={image:Math.max(1,Math.min(15,image)),src:String(source.src),srcSet:source.srcSet||undefined,alt:source.alt||\"\",updatedAt:Number(source.updatedAt)||Date.now()};});writeExact(next);return next;}catch{return current;}}function writeLegacyNumber(section,image){try{const raw=JSON.parse(localStorage.getItem(BACKGROUND_KEY)||\"{}\");const next={...raw&&typeof raw===\"object\"?raw:{},[section]:image};localStorage.setItem(BACKGROUND_KEY,JSON.stringify(next));}catch{}}function writeLegacySource(section,choice){try{const raw=JSON.parse(localStorage.getItem(LEGACY_SOURCE_KEY)||\"{}\");const next={...raw&&typeof raw===\"object\"?raw:{},[section]:choice};localStorage.setItem(LEGACY_SOURCE_KEY,JSON.stringify(next));}catch{}}async function getAuth(){try{const{data}=await KlyroAuth.getSession();return{accessToken:data.session?.access_token??\"\",userId:data.session?.user?.id??\"\"};}catch{return{accessToken:\"\",userId:\"\"};}}async function saveCloud(profile){const{accessToken,userId}=await getAuth();if(!accessToken||!userId)return;const background_selection={};SECTIONS.forEach(section=>{const choice=profile[section];if(!choice?.src)return;background_selection[section]={image:choice.image,src:choice.src,...choice.srcSet?{srcSet:choice.srcSet}:{},...choice.alt?{alt:choice.alt}:{}};});const response=await fetch(BACKGROUND_SUPABASE_URL+\"/rest/v1/user_settings?user_id=eq.\"+encodeURIComponent(userId),{method:\"PATCH\",headers:{apikey:BACKGROUND_PUBLISHABLE_KEY,Authorization:\"Bearer \"+accessToken,\"Content-Type\":\"application/json\",Prefer:\"return=minimal\"},body:JSON.stringify({background_selection,updated_at:new Date().toISOString()})});if(!response.ok)throw new Error(\"Profile background sync failed\");}async function loadCloud(){const{accessToken,userId}=await getAuth();if(!accessToken||!userId)return null;const response=await fetch(BACKGROUND_SUPABASE_URL+\"/rest/v1/user_settings?select=background_selection&user_id=eq.\"+encodeURIComponent(userId)+\"&limit=1\",{headers:{apikey:BACKGROUND_PUBLISHABLE_KEY,Authorization:\"Bearer \"+accessToken},cache:\"no-store\"});if(!response.ok)return null;const rows=await response.json();const raw=Array.isArray(rows)?rows[0]?.background_selection||{}:{};const next={};SECTIONS.forEach(section=>{const value=raw?.[section];if(!value||typeof value!==\"object\"||!value.src)return;next[section]={image:Math.max(1,Math.min(15,Number(value.image)||1)),src:String(value.src),srcSet:value.srcSet||undefined,alt:value.alt||\"\",updatedAt:Date.now()};});return next;}async function isPlatinum(){try{const{accessToken,userId}=await getAuth();if(!accessToken||!userId)return false;const response=await fetch(BACKGROUND_SUPABASE_URL+\"/rest/v1/subscriptions?select=status,stripe_price_id&user_id=eq.\"+encodeURIComponent(userId)+\"&limit=1\",{headers:{apikey:BACKGROUND_PUBLISHABLE_KEY,Authorization:\"Bearer \"+accessToken},cache:\"no-store\"});if(!response.ok)return false;const rows=await response.json();const sub=Array.isArray(rows)?rows[0]:null;return Boolean((sub?.status===\"active\"||sub?.status===\"trialing\")&&sub?.stripe_price_id===KLYRO_PLATINUM_PRICE_ID);}catch{return false;}}function preload(choice){try{const image=new Image;image.decoding=\"async\";image.fetchPriority=\"high\";if(choice.srcSet)image.srcset=choice.srcSet;image.src=choice.src;}catch{}}export default function BackgroundImageSetting(props){const{background,textColor,secondaryColor,borderColor,inputBackground,selectedBackground,buttonColor,buttonTextColor,radius,imageRadius,buttonRadius,titleSize,bodySize,inputSize,imageHeight,padding,image1,image2,image3,image4,image5,image6,image7,image8,image9,image10,image11,image12,image13,image14,image15}=props;const images=React.useMemo(()=>[image1,image2,image3,image4,image5,image6,image7,image8,image9,image10,image11,image12,image13,image14,image15],[image1,image2,image3,image4,image5,image6,image7,image8,image9,image10,image11,image12,image13,image14,image15]);const[section,setSection]=React.useState(\"utilization\");const[profile,setProfile]=React.useState(()=>seedFromLegacy());const[platinum,setPlatinum]=React.useState(false);const[menuOpen,setMenuOpen]=React.useState(false);const[menuVisible,setMenuVisible]=React.useState(false);const[message,setMessage]=React.useState(\"\");const[syncing,setSyncing]=React.useState(false);const saveSequence=React.useRef(0);const closeTimer=React.useRef(null);React.useEffect(()=>{let alive=true;const boot=async()=>{const[cloud,premium]=await Promise.all([loadCloud().catch(()=>null),isPlatinum().catch(()=>false)]);if(!alive)return;setPlatinum(premium);// Existing local choices remain immediate and authoritative.\nif(cloud){const local=readExact();const merged={...cloud,...local};writeExact(merged);setProfile(merged);}};void boot();return()=>{alive=false;};},[]);React.useEffect(()=>{if(!menuOpen)return;const previousOverflow=document.body.style.overflow;document.body.style.overflow=\"hidden\";const onKey=event=>{if(event.key===\"Escape\")closeMenu();};window.addEventListener(\"keydown\",onKey);return()=>{document.body.style.overflow=previousOverflow;window.removeEventListener(\"keydown\",onKey);};},[menuOpen]);React.useEffect(()=>()=>{if(closeTimer.current)clearTimeout(closeTimer.current);},[]);function choose(imageNumber){if(imageNumber>10&&!platinum){setMessage(\"Seasonal backgrounds require Klyro Platinum.\");return;}const image=images[imageNumber-1];const src=getImageSrc(image);if(!src){setMessage(`${LABELS[imageNumber-1]} is not configured.`);return;}const choice={image:imageNumber,src,srcSet:getImageSrcSet(image),alt:getImageAlt(image),updatedAt:Date.now()};// Keep the exact source and legacy readers in sync before networking.\nconst next={...readExact(),[section]:choice};writeExact(next);writeLegacyNumber(section,imageNumber);writeLegacySource(section,choice);setProfile(next);preload(choice);window.dispatchEvent(new CustomEvent(\"klyroExactBackgroundChanged\",{detail:{section,choice}}));try{localStorage.setItem(\"klyro-background-exact-pulse\",String(Date.now()));}catch{}setMessage(`${SECTION_LABELS[section]} background saved`);setSyncing(true);const sequence=++saveSequence.current;void saveCloud(next).then(()=>{if(sequence===saveSequence.current)setSyncing(false);}).catch(error=>{console.warn(\"Background is saved locally; cloud sync failed:\",error);if(sequence===saveSequence.current){setSyncing(false);setMessage(\"Saved on this device. Cloud sync is unavailable right now.\");}});}function openMenu(){if(closeTimer.current)clearTimeout(closeTimer.current);setMenuOpen(true);requestAnimationFrame(()=>requestAnimationFrame(()=>setMenuVisible(true)));}function closeMenu(){setMenuVisible(false);if(closeTimer.current)clearTimeout(closeTimer.current);closeTimer.current=setTimeout(()=>setMenuOpen(false),220);}const active=profile[section];const activeSrc=active?.src||\"\";const selectedCount=SECTIONS.filter(item=>profile[item]?.src).length;const font=\"Inter, -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif\";const surface={background:inputBackground,border:`1px solid ${borderColor}`,borderRadius:Math.max(12,imageRadius)};function renderTile(image,index){const number=index+1;const src=getImageSrc(image);const selected=active?.image===number&&active?.src===src&&!!src;const locked=number>10&&!platinum;return /*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:()=>choose(number),\"aria-label\":`${LABELS[index]}${locked?\", Platinum required\":\"\"}${selected?\", selected\":\"\"}`,\"aria-pressed\":selected,style:{...surface,padding:5,minWidth:0,color:textColor,textAlign:\"left\",fontFamily:font,cursor:\"pointer\",borderColor:selected?buttonColor:borderColor,background:selected?selectedBackground:inputBackground,boxShadow:selected?`0 0 0 1px ${buttonColor} inset`:\"none\",transition:\"border-color .2s, background .2s, transform .2s\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",height:imageHeight,overflow:\"hidden\",borderRadius:Math.max(9,imageRadius-5),background:\"#19191B\"},children:[src?/*#__PURE__*/_jsx(\"img\",{src:src,srcSet:getImageSrcSet(image),alt:\"\",loading:\"lazy\",decoding:\"async\",draggable:false,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\",filter:locked?\"brightness(.48)\":\"none\"}}):/*#__PURE__*/_jsx(\"div\",{style:{height:\"100%\",display:\"grid\",placeItems:\"center\",color:secondaryColor,fontSize:Math.max(11,bodySize)},children:\"Add an image in Framer\"}),(locked||selected)&&/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",top:8,right:8,padding:\"5px 8px\",borderRadius:999,background:\"rgba(10,10,10,.76)\",color:selected?buttonColor:\"#F3F0E7\",fontWeight:750,fontSize:10,letterSpacing:\".03em\"},children:selected?\"✓ Active\":\"✦ Platinum\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:7,padding:\"10px 5px 5px\",fontSize:Math.max(11,inputSize),fontWeight:selected?750:600},children:[/*#__PURE__*/_jsx(\"span\",{style:{overflow:\"hidden\",textOverflow:\"ellipsis\",whiteSpace:\"nowrap\"},children:LABELS[index]}),/*#__PURE__*/_jsx(\"span\",{style:{color:selected?buttonColor:secondaryColor,fontSize:12},children:selected?\"✓\":\"↗\"})]})]},number);}return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",boxSizing:\"border-box\",padding,borderRadius:radius,background,border:`1px solid ${borderColor}`,color:textColor,fontFamily:font},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:13},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:49,height:49,flexShrink:0,overflow:\"hidden\",borderRadius:15,border:`1px solid ${borderColor}`,background:inputBackground,display:\"grid\",placeItems:\"center\"},children:profile.utilization?.src?/*#__PURE__*/_jsx(\"img\",{src:profile.utilization.src,alt:\"\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}}):/*#__PURE__*/_jsx(\"span\",{style:{color:buttonColor,fontSize:22},children:\"✦\"})}),/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,minWidth:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{color:buttonColor,fontSize:Math.max(10,bodySize),fontWeight:750,letterSpacing:\".11em\",textTransform:\"uppercase\"},children:\"Appearance\"}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:3,fontSize:Math.max(15,titleSize),fontWeight:700},children:\"Backgrounds\"}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:3,color:secondaryColor,fontSize:Math.max(11,bodySize)},children:selectedCount?`${selectedCount} of 4 pages personalized`:\"Personalize your Klyro pages\"})]}),/*#__PURE__*/_jsx(\"span\",{style:{color:secondaryColor,fontSize:18},children:\"›\"})]}),/*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:openMenu,style:{width:\"100%\",minHeight:43,marginTop:15,borderRadius:buttonRadius,border:`1px solid ${borderColor}`,background:inputBackground,color:textColor,fontFamily:font,fontSize:Math.max(12,bodySize),fontWeight:700,cursor:\"pointer\"},children:[\"Manage backgrounds\",\" \",/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{color:buttonColor,marginLeft:5},children:\"↗\"})]})]}),menuOpen&&typeof document!==\"undefined\"&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{onMouseDown:event=>{if(event.target===event.currentTarget)closeMenu();},style:{position:\"fixed\",inset:0,zIndex:2147483647,display:\"grid\",placeItems:\"center\",padding:\"max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom))\",boxSizing:\"border-box\",background:\"rgba(4,5,7,.76)\",backdropFilter:\"blur(18px)\",WebkitBackdropFilter:\"blur(18px)\",opacity:menuVisible?1:0,transition:\"opacity .22s ease\"},children:/*#__PURE__*/_jsxs(\"div\",{role:\"dialog\",\"aria-modal\":\"true\",\"aria-label\":\"Choose Klyro backgrounds\",style:{width:\"min(100%, 720px)\",maxHeight:\"min(92dvh, 820px)\",display:\"flex\",flexDirection:\"column\",overflow:\"hidden\",borderRadius:Math.max(22,radius),border:`1px solid ${borderColor}`,background,color:textColor,fontFamily:font,boxShadow:\"0 30px 90px rgba(0,0,0,.48)\",transform:menuVisible?\"translateY(0) scale(1)\":\"translateY(14px) scale(.98)\",transition:\"transform .22s ease\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"flex-start\",gap:12,padding:\"20px 20px 14px\",borderBottom:`1px solid ${borderColor}`},children:[/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,minWidth:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{color:buttonColor,textTransform:\"uppercase\",letterSpacing:\".12em\",fontSize:Math.max(10,bodySize),fontWeight:800},children:\"Klyro appearance\"}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:6,fontWeight:750,fontSize:Math.max(23,titleSize+7)},children:\"Choose a background\"}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:5,color:secondaryColor,fontSize:Math.max(12,bodySize),lineHeight:1.45},children:\"Each page can have its own look.\"})]}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:closeMenu,\"aria-label\":\"Close background picker\",style:{flexShrink:0,width:36,height:36,borderRadius:999,border:`1px solid ${borderColor}`,background:inputBackground,color:textColor,fontSize:21,cursor:\"pointer\"},children:\"\\xd7\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:{overflowY:\"auto\",overscrollBehavior:\"contain\",WebkitOverflowScrolling:\"touch\",padding:\"18px 20px 24px\"},children:[/*#__PURE__*/_jsx(\"div\",{role:\"tablist\",\"aria-label\":\"Page\",style:{display:\"grid\",gridTemplateColumns:\"repeat(4, minmax(0, 1fr))\",gap:6,padding:4,borderRadius:16,background:inputBackground,border:`1px solid ${borderColor}`},children:SECTIONS.map(item=>/*#__PURE__*/_jsx(\"button\",{type:\"button\",role:\"tab\",\"aria-selected\":section===item,onClick:()=>{setSection(item);setMessage(\"\");},style:{minWidth:0,minHeight:37,borderRadius:12,border:section===item?`1px solid ${buttonColor}`:\"1px solid transparent\",background:section===item?selectedBackground:\"transparent\",color:section===item?buttonColor:secondaryColor,fontFamily:font,fontSize:11,fontWeight:700,cursor:\"pointer\"},children:SECTION_LABELS[item]},item))}),/*#__PURE__*/_jsxs(\"div\",{style:{...surface,display:\"flex\",alignItems:\"center\",gap:13,marginTop:16,padding:10},children:[/*#__PURE__*/_jsx(\"div\",{style:{flexShrink:0,width:57,height:57,borderRadius:12,overflow:\"hidden\",background:\"#171719\",display:\"grid\",placeItems:\"center\",color:buttonColor,fontSize:20},children:activeSrc?/*#__PURE__*/_jsx(\"img\",{src:activeSrc,alt:\"\",style:{width:\"100%\",height:\"100%\",objectFit:\"cover\"}}):\"✦\"}),/*#__PURE__*/_jsxs(\"div\",{style:{minWidth:0},children:[/*#__PURE__*/_jsxs(\"div\",{style:{fontSize:12,fontWeight:750},children:[SECTION_LABELS[section],\" background\"]}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:4,color:secondaryColor,fontSize:11},children:activeSrc?LABELS[(active?.image||1)-1]||\"Custom image\":\"Choose an image below\"})]}),activeSrc&&/*#__PURE__*/_jsx(\"span\",{style:{marginLeft:\"auto\",color:buttonColor,fontSize:11,fontWeight:750},children:\"Active\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"baseline\",justifyContent:\"space-between\",gap:8,margin:\"22px 0 11px\"},children:[/*#__PURE__*/_jsx(\"strong\",{style:{fontSize:15},children:\"Everyday collection\"}),/*#__PURE__*/_jsx(\"span\",{style:{color:secondaryColor,fontSize:11},children:\"10 styles\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(2, minmax(0, 1fr))\",gap:10},children:images.slice(0,10).map((image,index)=>renderTile(image,index))}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"baseline\",justifyContent:\"space-between\",gap:8,margin:\"24px 0 11px\"},children:[/*#__PURE__*/_jsx(\"strong\",{style:{fontSize:15},children:\"Seasonal collection\"}),/*#__PURE__*/_jsx(\"span\",{style:{color:buttonColor,fontSize:11,fontWeight:700},children:platinum?\"Platinum unlocked\":\"✦ Klyro Platinum\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(2, minmax(0, 1fr))\",gap:10},children:images.slice(10).map((image,index)=>renderTile(image,index+10))})]}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:12,padding:\"13px 20px max(13px, env(safe-area-inset-bottom))\",borderTop:`1px solid ${borderColor}`},children:[/*#__PURE__*/_jsx(\"span\",{role:\"status\",\"aria-live\":\"polite\",style:{minWidth:0,color:message.includes(\"unavailable\")||message.includes(\"require\")?\"#E9BA83\":secondaryColor,fontSize:11,lineHeight:1.4},children:syncing?\"Saving across devices…\":message||\"Changes apply immediately\"}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:closeMenu,style:{flexShrink:0,padding:\"10px 16px\",borderRadius:buttonRadius,border:0,background:buttonColor,color:buttonTextColor,fontFamily:font,fontSize:12,fontWeight:750,cursor:\"pointer\"},children:\"Done\"})]})]})}),document.body)]});}BackgroundImageSetting.defaultProps={background:\"rgba(20,20,22,0.94)\",textColor:\"#FFFFFF\",secondaryColor:\"#AAAAAA\",borderColor:\"#363636\",inputBackground:\"rgba(255,255,255,0.05)\",selectedBackground:\"rgba(185,178,99,0.10)\",buttonColor:\"#B9B263\",buttonTextColor:\"#1B1A15\",radius:24,imageRadius:24,buttonRadius:24,titleSize:17,bodySize:12,inputSize:12,imageHeight:110,padding:18,image1:null,image2:null,image3:null,image4:null,image5:null,image6:null,image7:null,image8:null,image9:null,image10:null,image11:null,image12:null,image13:null,image14:null,image15:null};addPropertyControls(BackgroundImageSetting,{background:{type:ControlType.Color,title:\"Background\"},textColor:{type:ControlType.Color,title:\"Text\"},secondaryColor:{type:ControlType.Color,title:\"Secondary\"},borderColor:{type:ControlType.Color,title:\"Border\"},inputBackground:{type:ControlType.Color,title:\"Tile BG\"},selectedBackground:{type:ControlType.Color,title:\"Selected BG\"},buttonColor:{type:ControlType.Color,title:\"Gold\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\"},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:40},imageRadius:{type:ControlType.Number,title:\"Image Radius\",min:0,max:30},buttonRadius:{type:ControlType.Number,title:\"Button Radius\",min:0,max:30},titleSize:{type:ControlType.Number,title:\"Title Size\",min:8,max:30},bodySize:{type:ControlType.Number,title:\"Body Size\",min:6,max:20},inputSize:{type:ControlType.Number,title:\"Image Text\",min:7,max:20},imageHeight:{type:ControlType.Number,title:\"Image Height\",min:40,max:200,step:5},padding:{type:ControlType.Number,title:\"Padding\",min:0,max:40},image1:{type:ControlType.ResponsiveImage,title:\"Image 1\"},image2:{type:ControlType.ResponsiveImage,title:\"Image 2\"},image3:{type:ControlType.ResponsiveImage,title:\"Image 3\"},image4:{type:ControlType.ResponsiveImage,title:\"Image 4\"},image5:{type:ControlType.ResponsiveImage,title:\"Image 5\"},image6:{type:ControlType.ResponsiveImage,title:\"Image 6\"},image7:{type:ControlType.ResponsiveImage,title:\"Image 7\"},image8:{type:ControlType.ResponsiveImage,title:\"Image 8\"},image9:{type:ControlType.ResponsiveImage,title:\"Image 9\"},image10:{type:ControlType.ResponsiveImage,title:\"Image 10\"},image11:{type:ControlType.ResponsiveImage,title:\"Halloween \\xb7 Haunted Manor\"},image12:{type:ControlType.ResponsiveImage,title:\"Halloween \\xb7 Pumpkin Glow\"},image13:{type:ControlType.ResponsiveImage,title:\"Halloween \\xb7 Witching Hour\"},image14:{type:ControlType.ResponsiveImage,title:\"Halloween \\xb7 Ghostly Fog\"},image15:{type:ControlType.ResponsiveImage,title:\"Halloween \\xb7 Midnight Graveyard\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BackgroundImageSetting\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BackgroundImageSetting.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// @ts-ignore Framer resolves this versioned project module during build\nimport KlyroAuthProvider from\"https://framer.com/m/KlyroSupabase-1-3OjW6g.js@k91yqY1apNU4tENaBCZa\";const{supabase,getSession}=KlyroAuthProvider;const klyroCacheGlobal=globalThis;const klyroCacheStore=klyroCacheGlobal.__klyroSharedDataCacheV1||(klyroCacheGlobal.__klyroSharedDataCacheV1={entries:new Map,inflight:new Map});function readDataCache(key,maxAgeMs=Infinity){const entry=klyroCacheStore.entries.get(key);if(!entry)return null;const ageMs=Math.max(0,Date.now()-entry.writtenAt);return{data:entry.data,ageMs,fresh:ageMs<=maxAgeMs};}function writeDataCache(key,value){klyroCacheStore.entries.set(key,{data:value,writtenAt:Date.now()});return value;}async function getCachedData(key,loader,options={}){const cached=readDataCache(key,options.ttlMs??Infinity);if(!options.force&&cached?.fresh)return cached.data;const pending=klyroCacheStore.inflight.get(key);if(!options.force&&pending)return pending;const request=loader().then(value=>writeDataCache(key,value)).finally(()=>klyroCacheStore.inflight.delete(key));klyroCacheStore.inflight.set(key,request);return request;}function invalidateDataCache(prefix){if(!prefix){klyroCacheStore.entries.clear();return;}for(const key of klyroCacheStore.entries.keys()){if(key.startsWith(prefix))klyroCacheStore.entries.delete(key);}}const COMPASS_CACHE_TTL=2*60*1e3;function compassCacheKey(userId){return`insights:compass:v1:${userId}`;}const QUICK_PROMPTS=[\"Analyze my finances\",\"What should I pay first?\",\"Build my debt payoff plan\",\"Can I afford $500?\",\"Why did my spending change?\",\"How much should I save?\",\"Plan my next paycheck\",\"Improve my credit\"];function n(value){const x=Number(value);return Number.isFinite(x)?x:0;}function money(value){return n(value).toLocaleString(undefined,{style:\"currency\",currency:\"USD\",maximumFractionDigits:0});}function prettyDate(value){if(!value)return\"—\";const d=new Date(`${value}T12:00:00`);if(Number.isNaN(d.getTime()))return value;return d.toLocaleDateString(undefined,{month:\"short\",day:\"numeric\"});}function emptyCompass(){return{score:100,status:{name:\"Loading\",description:\"Connecting to Klyro intelligence.\"},focus:\"Updating Compass\",focusDescription:\"Klyro is analyzing your financial state.\",snapshot:{utilization:0,totalBalance:0,totalLimit:0,nextPaycheck:null,currentCreditScore:null,cashBalance:0,investmentValue:0,estimatedNetWorth:0,spend30:0,spendPrior30:0,spendChange:null,next30Obligations:0,investmentChange30:null,connectedAccounts:0,topSpendingCategories:[],membershipMonthly:0,paymentPlanOutstanding:0},recommendations:[]};}function extractAmount(text){const dollar=text.match(/\\$\\s*([\\d,]+(?:\\.\\d{1,2})?)/);if(dollar)return Number(dollar[1].replace(/,/g,\"\"));const plain=text.match(/\\b([\\d,]+(?:\\.\\d{1,2})?)\\s*(?:dollars?|bucks?)\\b/i);if(plain)return Number(plain[1].replace(/,/g,\"\"));return null;}function includesAny(text,words){return words.some(word=>text.includes(word));}function responseFor(raw,data,cards,subscriptions){const text=raw.toLowerCase().trim();const s=data.snapshot;const paycheck=s.nextPaycheck;const topCategory=s.topSpendingCategories?.[0];const amount=extractAmount(raw);const analyze=includesAny(text,[\"analyze\",\"analyse\",\"how am i doing\",\"financial health\",\"overview\",\"status\"])||text===\"help\";const debtPlan=includesAny(text,[\"debt payoff plan\",\"payoff plan\",\"debt plan\",\"avalanche\",\"snowball\",\"plan my debt\"]);const payFirst=includesAny(text,[\"pay first\",\"card first\",\"debt first\",\"which card\",\"pay off\",\"highest apr\",\"debt strategy\"]);const affordability=includesAny(text,[\"afford\",\"buy\",\"purchase\",\"spend $\",\"can i spend\"]);const spending=includesAny(text,[\"spending\",\"spend change\",\"spending change\",\"spending up\",\"spent more\",\"expenses\"]);const paycheckPlan=includesAny(text,[\"plan my next paycheck\",\"paycheck plan\",\"allocate my paycheck\",\"split my paycheck\",\"how should i use my paycheck\",\"what should i do with my next paycheck\",\"budget my paycheck\"]);const paycheckIntent=includesAny(text,[\"save\",\"paycheck\",\"next check\",\"next paycheck\",\"set aside\"]);const credit=includesAny(text,[\"credit\",\"utilization\",\"score\",\"lower utilization\",\"improve my credit\"]);const subs=includesAny(text,[\"subscription\",\"subscriptions\",\"membership\",\"cancel\",\"recurring\"]);const bills=includesAny(text,[\"bill\",\"bills\",\"due\",\"obligation\",\"upcoming payment\"]);const wealth=includesAny(text,[\"investment\",\"investments\",\"wealth\",\"net worth\",\"portfolio\"]);if(debtPlan){const active=cards.filter(card=>card.balance>0);if(!active.length){return{text:\"I do not see any tracked revolving card balances to build a payoff plan from right now.\",actions:[{label:\"Review Payments\",kind:\"navigate\",value:\"/klyro-app/payments\",tone:\"neutral\"}]};}const ranked=[...active].sort((a,b)=>{if(a.overdue!==b.overdue)return a.overdue?-1:1;const aApr=a.apr??-1;const bApr=b.apr??-1;if(aApr!==bApr)return bApr-aApr;if(a.utilization!==b.utilization)return b.utilization-a.utilization;return a.balance-b.balance;});const totalDebt=ranked.reduce((sum,card)=>sum+card.balance,0);const totalMinimums=ranked.reduce((sum,card)=>sum+(card.minimumDue??0),0);const lines=ranked.slice(0,5).map((card,index)=>{const apr=card.apr==null?\"APR unavailable\":`${card.apr.toFixed(2)}% APR`;const minimum=card.minimumDue==null?\"minimum unavailable\":`${money(card.minimumDue)} minimum`;return`${index+1}. ${card.name} — ${money(card.balance)} balance \\xb7 ${apr} \\xb7 ${minimum}`;});const missingApr=ranked.some(card=>card.apr==null);let answer=`Here is the payoff order I would use for your tracked card debt.\n\n${lines.join(\"\\n\")}\n\nTracked revolving debt: ${money(totalDebt)}.`;if(totalMinimums>0)answer+=` Combined known minimums are about ${money(totalMinimums)}.`;answer+=`\n\nStrategy: keep every required minimum current, then direct extra payment money to #1. When that balance is cleared, roll that payment into #2.`;if(missingApr)answer+=` Some cards do not have APR data yet, so those positions use utilization and balance as fallback signals.`;return{text:answer,actions:[{label:\"Plan Payments\",kind:\"navigate\",value:\"/klyro-app/payments\",tone:\"gold\"},{label:\"Which card first?\",kind:\"ask\",value:\"What should I pay first?\",tone:\"neutral\"},{label:\"Improve utilization\",kind:\"ask\",value:\"Improve my credit\",tone:\"neutral\"}]};}if(payFirst){if(!cards.length){return\"I don't have enough card-level data to rank your debt yet. Add your cards to Klyro or match them to Plaid, then ask me again.\";}const ranked=[...cards].sort((a,b)=>{if(a.overdue!==b.overdue)return a.overdue?-1:1;const aApr=a.apr??-1;const bApr=b.apr??-1;if(aApr!==bApr)return bApr-aApr;if(a.utilization!==b.utilization)return b.utilization-a.utilization;return b.balance-a.balance;});const first=ranked[0];const next=ranked[1];const reasons=[];if(first.overdue)reasons.push(\"it is marked overdue\");if(first.apr!=null)reasons.push(`its purchase APR is ${first.apr.toFixed(2)}%`);if(first.utilization>=30)reasons.push(`its utilization is about ${Math.round(first.utilization)}%`);const to29=first.limit>0?Math.max(0,first.balance-first.limit*.29):0;let answer=`I would prioritize ${first.name}.`;if(reasons.length)answer+=` The main reason is that ${reasons.join(\", \")}.`;answer+=` Its tracked balance is ${money(first.balance)}`;if(first.minimumDue!=null)answer+=` and the minimum due is ${money(first.minimumDue)}`;if(first.dueDate)answer+=` by ${prettyDate(first.dueDate)}`;answer+=\".\";if(to29>0)answer+=` Paying about ${money(to29)} would bring this card near 29% utilization.`;if(next)answer+=` After that, ${next.name} is the next card I would review.`;return{text:answer,actions:[{label:\"Build payoff plan\",kind:\"ask\",value:\"Build my debt payoff plan\",tone:\"gold\"},{label:\"Open Payments\",kind:\"navigate\",value:\"/klyro-app/payments\",tone:\"neutral\"}]};}if(affordability){if(amount==null){return`Tell me the amount you are considering, for example \"Can I afford $500?\" I will compare it with your connected cash and upcoming obligations.`;}const cash=n(s.cashBalance);const obligations=n(s.next30Obligations);const baseBuffer=Math.max(250,obligations*.2);const afterObligations=cash-obligations;const afterPurchase=afterObligations-amount;const afterBuffer=afterPurchase-baseBuffer;if(cash<=0&&s.connectedAccounts<=0){return`I can evaluate a ${money(amount)} purchase once Klyro has a connected cash account. Right now I do not have enough cash-balance data to make that calculation.`;}if(afterPurchase<0){return`Based on the data Klyro tracks, I would not treat a ${money(amount)} purchase as comfortably affordable right now. You have about ${money(cash)} in connected cash and roughly ${money(obligations)} in tracked obligations over the next 30 days. After those obligations and the purchase, you would be short by about ${money(Math.abs(afterPurchase))}.`;}if(afterBuffer<0){return`A ${money(amount)} purchase appears possible, but it would leave a thin buffer. After roughly ${money(obligations)} of tracked 30-day obligations, the purchase would leave about ${money(afterPurchase)} in connected cash. Compass would prefer keeping at least about ${money(baseBuffer)} available as a planning buffer.`;}return`A ${money(amount)} purchase appears manageable based on the data Klyro currently tracks. You have about ${money(cash)} in connected cash and roughly ${money(obligations)} in tracked obligations over the next 30 days. After the purchase and those obligations, about ${money(afterPurchase)} would remain.`;}if(spending){if(s.spend30<=0){return\"I do not have enough recent Plaid spending data to explain a spending change yet.\";}let answer=`Your tracked spending over the last 30 days is about ${money(s.spend30)}.`;if(s.spendChange!=null){const direction=s.spendChange>=0?\"higher\":\"lower\";answer+=` That is about ${Math.abs(Math.round(s.spendChange))}% ${direction} than the prior 30 days.`;}if(topCategory){answer+=` Your largest recent category is ${topCategory.category.toLowerCase()} at about ${money(topCategory.amount)}.`;}const second=s.topSpendingCategories?.[1];if(second){answer+=` The next largest is ${second.category.toLowerCase()} at about ${money(second.amount)}.`;}return answer;}if(paycheckPlan){if(!paycheck){return{text:\"I do not see a future paycheck in the current Compass state. Add or detect your next paycheck first, then I can build the allocation plan.\",actions:[{label:\"Open Payments\",kind:\"navigate\",value:\"/klyro-app/payments\",tone:\"gold\"}]};}const paycheckAmount=n(paycheck.amount);const planned=n(paycheck.totals?.allocated);const remaining=n(paycheck.totals?.remaining);const uncoveredBills=n(paycheck.totals?.uncoveredBillTotal);if(paycheckAmount<=0){return\"Your next paycheck is missing an amount, so I cannot build a reliable allocation plan yet.\";}if(remaining<0){return{text:`Your next paycheck is ${money(paycheckAmount)}, but current allocations exceed it by about ${money(Math.abs(remaining))}. I would not add savings or extra debt payments yet. First reduce or move existing allocations until the paycheck is back above zero.`,actions:[{label:\"Review Payments\",kind:\"navigate\",value:\"/klyro-app/payments\",tone:\"gold\"},{label:\"Analyze finances\",kind:\"ask\",value:\"Analyze my finances\",tone:\"neutral\"}]};}const availableAfterBills=Math.max(0,remaining-uncoveredBills);// Known minimum card payments due soon. This is intentionally conservative:\n// only liabilities with an explicit minimum are included.\nconst knownMinimums=cards.reduce((sum,card)=>sum+(card.minimumDue!=null?Math.max(0,card.minimumDue):0),0);const cashBufferTarget=Math.max(100,Math.min(paycheckAmount*.1,availableAfterBills*.25));let allocatable=Math.max(0,availableAfterBills-knownMinimums-cashBufferTarget);// Savings gets up to 15% of paycheck, but not more than 35% of allocatable cash.\nconst savingsTarget=Math.max(0,Math.min(paycheckAmount*.15,allocatable*.35));allocatable=Math.max(0,allocatable-savingsTarget);// Debt extra gets most of the remaining discretionary amount when revolving debt exists.\nconst debtExists=cards.some(card=>card.balance>0);const extraDebt=debtExists?Math.max(0,allocatable*.7):0;const spendingLeft=Math.max(0,allocatable-extraDebt);const planLines=[`Paycheck: ${money(paycheckAmount)}`,planned>0?`Already allocated: ${money(planned)}`:null,uncoveredBills>0?`Uncovered bills: ${money(uncoveredBills)}`:null,knownMinimums>0?`Known card minimums: ${money(knownMinimums)}`:null,`Cash buffer: ${money(cashBufferTarget)}`,savingsTarget>0?`Savings: ${money(savingsTarget)}`:null,extraDebt>0?`Extra debt payment: ${money(extraDebt)}`:null,`Flexible spending left: ${money(spendingLeft)}`].filter(Boolean);let answer=`Here is a conservative allocation plan for your next tracked paycheck:\n\n${planLines.join(\"\\n\")}\n\n`;if(extraDebt>0){const ranked=[...cards].filter(card=>card.balance>0).sort((a,b)=>{if(a.overdue!==b.overdue)return a.overdue?-1:1;const aApr=a.apr??-1;const bApr=b.apr??-1;if(aApr!==bApr)return bApr-aApr;if(a.utilization!==b.utilization)return b.utilization-a.utilization;return b.balance-a.balance;});if(ranked[0]){answer+=`I would direct the extra debt amount to ${ranked[0].name} first. `;}}if(knownMinimums===0&&cards.some(card=>card.balance>0)){answer+=\"I do not have minimum-payment data for all of your cards, so keep any required minimums current before following the savings or extra-debt amounts. \";}answer+=\"This plan is based only on the obligations and balances Klyro currently tracks.\";return{text:answer,actions:[{label:\"Open Payments\",kind:\"navigate\",value:\"/klyro-app/payments\",tone:\"gold\"},{label:\"Build debt payoff plan\",kind:\"ask\",value:\"Build my debt payoff plan\",tone:\"neutral\"},{label:\"How much should I save?\",kind:\"ask\",value:\"How much should I save?\",tone:\"neutral\"}]};}if(paycheckIntent){if(!paycheck){return\"I do not see a future paycheck in the current Compass state. Once a paycheck is detected or added, I can calculate how much is safe to set aside.\";}const remaining=n(paycheck.totals?.remaining);const paycheckAmount=n(paycheck.amount);const uncovered=n(paycheck.totals?.uncoveredBillTotal);const safeRemaining=Math.max(0,remaining-uncovered);const target=Math.max(0,Math.min(safeRemaining*.5,paycheckAmount*.2));if(remaining<0){return`I would not set aside additional savings from your next ${money(paycheckAmount)} paycheck yet. It is currently over-allocated by about ${money(Math.abs(remaining))}. Cover the planned obligations first, then rebuild a savings amount from what remains.`;}if(target<=0){return`Your next paycheck is ${money(paycheckAmount)} and about ${money(remaining)} remains after current allocations. Because the remaining margin is tight, I would preserve it as a cash buffer instead of assigning more to savings right now.`;}return`Your next tracked paycheck is ${money(paycheckAmount)} and about ${money(remaining)} remains after current allocations. A conservative starting point would be around ${money(target)} to savings, while keeping the rest available for uncovered bills and buffer.`;}if(credit){const util=n(s.utilization);const balance=n(s.totalBalance);const limit=n(s.totalLimit);const to29=limit>0?Math.max(0,balance-limit*.29):0;let answer=`Your tracked overall card utilization is about ${Math.round(util)}%.`;if(util>=30){answer+=` Bringing balances down by roughly ${money(to29)} would move the tracked total near 29%.`;}else if(limit>0){answer+=\" That is already below the 30% threshold Compass monitors.\";}const high=[...cards].sort((a,b)=>b.utilization-a.utilization)[0];if(high&&high.utilization>=30){answer+=` The card putting the most pressure on utilization is ${high.name} at about ${Math.round(high.utilization)}%.`;}if(s.currentCreditScore!=null)answer+=` Your latest score tracked in Klyro is ${s.currentCreditScore}.`;return answer;}if(subs){if(!subscriptions.length){const monthly=n(s.membershipMonthly);if(monthly>0){return`Klyro currently tracks about ${money(monthly)} per month in memberships. I do not have enough subscription-level Plaid detail in this session to identify a specific one to cut.`;}return\"I do not see active recurring subscription candidates right now.\";}const normalized=subscriptions.map(x=>({...x,monthly:x.frequency.toLowerCase().includes(\"year\")?x.amount/12:x.frequency.toLowerCase().includes(\"week\")?x.amount*52/12:x.amount}));normalized.sort((a,b)=>b.monthly-a.monthly);const top=normalized.slice(0,3);const total=normalized.reduce((sum,x)=>sum+x.monthly,0);return`Your detected recurring subscriptions add up to about ${money(total)} per month. The largest I see are ${top.map(x=>`${x.name} (${money(x.monthly)}/mo equivalent)`).join(\", \")}. I would review the largest one you use least before cutting smaller subscriptions.`;}if(bills){const obligations=n(s.next30Obligations);const cash=n(s.cashBalance);const coverage=obligations>0?cash/obligations:null;let answer=`Klyro tracks about ${money(obligations)} in obligations over the next 30 days.`;if(coverage!=null&&cash>0){answer+=` Connected cash is about ${money(cash)}, which is roughly ${Math.round(coverage*100)}% coverage.`;}const urgent=data.recommendations.filter(r=>r.type===\"bill\"||r.type===\"cashflow\");if(urgent[0])answer+=` The first item I would review is: ${urgent[0].title}.`;return answer;}if(wealth){let answer=`Your current tracked financial picture shows about ${money(s.cashBalance)} in connected cash and ${money(s.investmentValue)} in connected investments.`;answer+=` Compass estimates tracked net worth at about ${money(s.estimatedNetWorth)}.`;if(s.investmentChange30!=null){answer+=` Your connected investment value is approximately ${Math.abs(s.investmentChange30).toFixed(1)}% ${s.investmentChange30>=0?\"higher\":\"lower\"} versus the available 30-day comparison.`;}answer+=\" This estimate only includes assets and debts Klyro can currently see.\";return answer;}if(analyze||text.length<3){const top=data.recommendations.slice(0,3);let answer=`Your Compass score is ${data.score}/100 and your current focus is \"${data.focus}\". ${data.focusDescription}`;answer+=` You have about ${money(s.cashBalance)} in connected cash, ${money(s.next30Obligations)} in tracked 30-day obligations, and overall card utilization of about ${Math.round(s.utilization)}%.`;if(top.length){answer+=` The main things Compass would address next are: ${top.map(x=>x.title).join(\"; \")}.`;}return answer;}return`I can answer questions about the financial data Klyro tracks. Try asking \"What should I pay first?\", \"Build my debt payoff plan\", \"Can I afford $500?\", \"Why did my spending change?\", \"How much should I save?\", \"Improve my credit\", or \"Plan my next paycheck.\"`;}export default function KlyroCompassBottomChat(props){const{buttonBackground,buttonBorderColor,buttonTextColor,buttonSecondaryColor,buttonRadius,buttonBorderWidth,buttonScoreSize,buttonLabelSize,menuBackground,closeBackground,closeColor,closeSize,cardBackground,textColor,secondaryColor,borderColor,goldColor,positiveColor,warningColor,dangerColor,innerRadius,titleSize,bodySize,smallSize,contentPadding}=props;const[data,setData]=React.useState(emptyCompass());const[cards,setCards]=React.useState([]);const[subscriptions,setSubscriptions]=React.useState([]);const[loading,setLoading]=React.useState(true);const[loadError,setLoadError]=React.useState(\"\");const[mounted,setMounted]=React.useState(false);const[isOpen,setIsOpen]=React.useState(false);const[visible,setVisible]=React.useState(false);const[draft,setDraft]=React.useState(\"\");const[thinking,setThinking]=React.useState(false);const[messages,setMessages]=React.useState([{id:\"welcome\",role:\"compass\",text:\"Ask me about your Klyro finances. I can analyze your data, rank card debt, build payoff plans, test purchases, and allocate your next paycheck — without generative AI.\",createdAt:Date.now()}]);const scrollRef=React.useRef(null);const textareaRef=React.useRef(null);const refreshInFlight=React.useRef(null);React.useEffect(()=>setMounted(true),[]);const refresh=React.useCallback(async(force=false)=>{if(refreshInFlight.current)return refreshInFlight.current;const run=(async()=>{try{setLoadError(\"\");const{data:sessionData}=await getSession();const userId=sessionData.session?.user?.id;/*\n                 Supabase may need a moment to restore the session when the\n                 page mounts. That is a normal loading state, not a failure.\n                 klyroAuthChanged below retries this refresh automatically.\n                */if(!userId){setLoadError(\"\");return;}const key=compassCacheKey(userId);const cached=!force?readDataCache(key,COMPASS_CACHE_TTL):null;if(!cached?.fresh)setLoading(true);const bundle=await getCachedData(key,async()=>{const[compassR,cardsR,liabilitiesR,subsR]=await Promise.all([supabase.functions.invoke(\"financial-state-v2\",{body:{}}),supabase.from(\"user_cards\").select(\"id,card_id,balance,credit_limit,nickname,plaid_account_id,card_catalog(name)\").eq(\"user_id\",userId).order(\"sort_order\",{ascending:true}),supabase.from(\"plaid_credit_liabilities\").select(\"account_id,purchase_apr,minimum_payment_amount,next_payment_due_date,is_overdue,credit_limit\").eq(\"user_id\",userId),supabase.from(\"plaid_recurring_streams\").select(\"stream_id,merchant_name,description,amount,frequency,predicted_next_date,status,dismissed,imported_membership_id\").eq(\"user_id\",userId).eq(\"dismissed\",false)]);if(compassR.error)throw compassR.error;if(!compassR.data?.success){throw new Error(compassR.data?.message||\"Klyro financial state could not update.\");}return{financial:compassR.data,cardRows:cardsR.error?[]:cardsR.data||[],liabilityRows:liabilitiesR.error?[]:liabilitiesR.data||[],subscriptionRows:subsR.error?[]:subsR.data||[]};},{ttlMs:COMPASS_CACHE_TTL,force});const f=bundle.financial;const legacy=f.legacy||{};const compass=f.compass||{};setData({score:n(compass.score),status:compass.status||{name:\"Compass\",description:\"Financial state updated.\"},focus:String(compass.focus||\"Stay organized\"),focusDescription:String(compass.focusDescription||\"Keep Klyro updated.\"),snapshot:{utilization:n(f.credit?.utilization),totalBalance:n(f.credit?.totalDebt),totalLimit:n(f.credit?.totalLimit),nextPaycheck:f.income?.nextPaycheck||null,currentCreditScore:legacy.credit?.currentScore==null?null:n(legacy.credit.currentScore),cashBalance:n(f.cash?.current),investmentValue:n(f.investments?.total),estimatedNetWorth:n(f.netWorth?.estimated),spend30:n(f.spending?.last30Days),spendPrior30:n(f.spending?.prior30Days),spendChange:f.spending?.changePercent==null?null:n(f.spending.changePercent),next30Obligations:n(f.obligations?.next30Days),investmentChange30:f.investments?.change30Percent==null?null:n(f.investments.change30Percent),connectedAccounts:n(f.accounts?.connectedCount),topSpendingCategories:Array.isArray(f.spending?.topCategories)?f.spending.topCategories.map(x=>({category:String(x.category||\"Other\"),amount:n(x.amount)})):[],membershipMonthly:n(legacy.memberships?.summary?.monthlyEquivalent),paymentPlanOutstanding:n(f.credit?.paymentPlanDebt)},recommendations:Array.isArray(compass.recommendations)?compass.recommendations:[]});const liabilities=new Map(bundle.liabilityRows.map(x=>[String(x.account_id),x]));setCards(bundle.cardRows.map(row=>{const liab=row.plaid_account_id?liabilities.get(String(row.plaid_account_id)):null;const balance=n(row.balance);const limit=n(liab?.credit_limit??row.credit_limit);return{id:String(row.id),name:row.nickname||row.card_catalog?.name||row.card_id||\"Card\",balance,limit,utilization:limit>0?balance/limit*100:0,apr:liab?.purchase_apr==null?null:n(liab.purchase_apr),minimumDue:liab?.minimum_payment_amount==null?null:n(liab.minimum_payment_amount),dueDate:liab?.next_payment_due_date||null,overdue:liab?.is_overdue===true,plaidAccountId:row.plaid_account_id||null};}));setSubscriptions(bundle.subscriptionRows.filter(x=>x.status!==\"CANCELLED\"&&x.status!==\"cancelled\").map(x=>({id:String(x.stream_id),name:x.merchant_name||x.description||\"Subscription\",amount:n(x.amount),frequency:String(x.frequency||\"monthly\"),nextDate:x.predicted_next_date||null})));}catch(error){console.error(\"[Compass Chat] refresh failed\",error);setLoadError(error?.message||\"Compass could not load.\");}finally{setLoading(false);refreshInFlight.current=null;}})();refreshInFlight.current=run;return run;},[]);React.useEffect(()=>{void refresh(false);const events=[\"klyroFinancialStateChanged\",\"klyroPaymentHistoryChanged\",\"klyroBalancesSaved\",\"klyroLimitsSaved\",\"klyroPrimaryCardsChanged\",\"klyroCustomBillsChanged\",\"klyroCreditScoreChanged\",\"klyroSignupBonusChanged\",\"klyroInvestmentsChanged\",\"klyroPlaidAccountsChanged\",\"klyroDefaultPaycheckChanged\",\"klyroPaydayChanged\",\"klyroAuthChanged\"];const onChange=()=>{invalidateDataCache(\"insights:compass:v1:\");void refresh(true);};const onFocus=()=>void refresh(false);events.forEach(name=>window.addEventListener(name,onChange));window.addEventListener(\"focus\",onFocus);return()=>{events.forEach(name=>window.removeEventListener(name,onChange));window.removeEventListener(\"focus\",onFocus);};},[refresh]);React.useEffect(()=>{window.setTimeout(()=>{scrollRef.current?.scrollTo({top:scrollRef.current.scrollHeight,behavior:\"smooth\"});},50);},[messages,thinking]);async function ask(prompt){const question=String(prompt??draft).trim();if(!question||thinking)return;const userMessage={id:`u-${Date.now()}`,role:\"user\",text:question,createdAt:Date.now()};setMessages(prev=>[...prev,userMessage]);setDraft(\"\");setThinking(true);try{if(loading)await refresh();await new Promise(resolve=>window.setTimeout(resolve,220));const result=responseFor(question,data,cards,subscriptions);const answer=typeof result===\"string\"?{text:result,actions:undefined}:result;setMessages(prev=>[...prev,{id:`c-${Date.now()}`,role:\"compass\",text:answer.text,actions:answer.actions,createdAt:Date.now()}]);}catch(error){setMessages(prev=>[...prev,{id:`e-${Date.now()}`,role:\"compass\",text:\"I could not refresh your Klyro financial state right now. Try again in a moment.\",createdAt:Date.now()}]);}finally{setThinking(false);window.setTimeout(()=>textareaRef.current?.focus(),50);}}function runAction(action){if(action.kind===\"ask\"){ask(action.value);return;}if(action.value.startsWith(\"/\")){window.location.assign(action.value);}}function clearChat(){setMessages([{id:`welcome-${Date.now()}`,role:\"compass\",text:\"Conversation cleared. Ask me what you want to understand about your Klyro finances.\",createdAt:Date.now()}]);}return /*#__PURE__*/_jsxs(\"div\",{className:\"klyro-compass-bottom-chat\",style:{position:\"relative\",width:\"100%\",height:\"100%\",minWidth:0,minHeight:0,maxWidth:\"100%\",maxHeight:\"100%\",overflowX:\"hidden\",zIndex:1,display:\"grid\",gridTemplateRows:\"auto minmax(0,1fr) auto\",overflow:\"hidden\",boxSizing:\"border-box\",border:`1px solid ${borderColor}`,borderBottom:\"none\",borderRadius:`${Math.max(18,innerRadius+8)}px`,background:\"#0A0A0D\",color:textColor,boxShadow:\"0 -18px 50px rgba(0,0,0,.38)\",fontFamily:\"-apple-system,BlinkMacSystemFont,'SF Pro Text',sans-serif\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{padding:\"10px 12px\",borderBottom:`1px solid ${borderColor}`,background:\"#0A0A0D\",display:\"flex\",alignItems:\"center\",gap:8,minWidth:0,width:\"100%\",maxWidth:\"100%\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:36,height:36,borderRadius:13,border:`1px solid ${goldColor}55`,background:`${goldColor}12`,display:\"grid\",placeItems:\"center\",color:goldColor,fontSize:13,fontWeight:800,flexShrink:0},children:loading?\"…\":data.score}),/*#__PURE__*/_jsxs(\"div\",{style:{minWidth:0,flex:\"1 1 0%\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:Math.max(13,titleSize-4),fontWeight:720,letterSpacing:\"-.03em\",whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\"},children:\"Klyro Compass\"}),/*#__PURE__*/_jsxs(\"div\",{style:{marginTop:2,fontSize:smallSize,color:secondaryColor,whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\"},children:[data.focus,\" \\xb7 always available\"]})]}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:clearChat,style:{border:`1px solid ${borderColor}`,borderRadius:999,background:\"rgba(255,255,255,.035)\",color:secondaryColor,minHeight:30,padding:\"0 8px\",flexShrink:0,fontFamily:\"inherit\",fontSize:smallSize,cursor:\"pointer\"},children:\"Clear\"})]}),/*#__PURE__*/_jsxs(\"div\",{ref:scrollRef,style:{minWidth:0,minHeight:0,width:\"100%\",maxWidth:\"100%\",overflowY:\"auto\",overflowX:\"hidden\",WebkitOverflowScrolling:\"touch\",padding:\"12px\",boxSizing:\"border-box\",background:\"#0A0A0D\"},children:[loadError&&/*#__PURE__*/_jsx(\"div\",{style:{marginBottom:10,padding:\"8px 10px\",borderRadius:12,border:`1px solid ${dangerColor}55`,color:dangerColor,fontSize:smallSize},children:loadError}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:9,width:\"100%\",maxWidth:\"100%\",minWidth:0},children:[messages.map(message=>/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:message.role===\"user\"?\"flex-end\":\"flex-start\",minWidth:0},children:/*#__PURE__*/_jsxs(\"div\",{style:{width:\"fit-content\",maxWidth:\"min(88%, 100%)\",minWidth:0,padding:\"10px 12px\",borderRadius:message.role===\"user\"?\"16px 16px 5px 16px\":\"16px 16px 16px 5px\",border:message.role===\"user\"?`1px solid ${goldColor}55`:`1px solid ${borderColor}`,background:message.role===\"user\"?`${goldColor}14`:cardBackground,color:textColor,fontSize:bodySize+1,lineHeight:1.5,whiteSpace:\"pre-wrap\",overflowWrap:\"anywhere\",wordBreak:\"break-word\",boxSizing:\"border-box\"},children:[/*#__PURE__*/_jsx(\"div\",{children:message.text}),message.role===\"compass\"&&message.actions&&message.actions.length>0&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexWrap:\"wrap\",gap:6,marginTop:9,paddingTop:8,borderTop:`1px solid ${borderColor}`},children:message.actions.map((action,index)=>/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>runAction(action),style:{minHeight:30,padding:\"0 10px\",borderRadius:999,border:action.tone===\"gold\"?`1px solid ${goldColor}88`:`1px solid ${borderColor}`,background:action.tone===\"gold\"?`${goldColor}18`:\"rgba(255,255,255,.04)\",color:action.tone===\"gold\"?goldColor:textColor,fontFamily:\"inherit\",fontSize:smallSize,fontWeight:650,cursor:\"pointer\"},children:action.label},`${message.id}-${index}`))})]})},message.id)),thinking&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:\"flex-start\"},children:/*#__PURE__*/_jsx(\"div\",{style:{padding:\"9px 12px\",borderRadius:\"16px 16px 16px 5px\",border:`1px solid ${borderColor}`,background:cardBackground,color:secondaryColor,fontSize:bodySize},children:\"Compass is calculating…\"})})]})]}),/*#__PURE__*/_jsxs(\"div\",{style:{padding:`9px 10px calc(9px + env(safe-area-inset-bottom))`,borderTop:`1px solid ${borderColor}`,background:\"#0A0A0D\",boxSizing:\"border-box\",width:\"100%\",maxWidth:\"100%\",minWidth:0,overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"div\",{className:\"klyro-bottom-quick-prompts\",style:{display:\"flex\",gap:6,width:\"100%\",maxWidth:\"100%\",minWidth:0,overflowX:\"auto\",overflowY:\"hidden\",paddingBottom:7,scrollbarWidth:\"none\"},children:QUICK_PROMPTS.map(prompt=>/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>ask(prompt),disabled:thinking,style:{flexShrink:0,minHeight:28,padding:\"0 9px\",borderRadius:999,border:`1px solid ${borderColor}`,background:\"rgba(255,255,255,.03)\",color:secondaryColor,fontFamily:\"inherit\",fontSize:smallSize,cursor:thinking?\"default\":\"pointer\"},children:prompt},prompt))}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"minmax(0,1fr) 42px\",gap:7,alignItems:\"end\",width:\"100%\",minWidth:0},children:[/*#__PURE__*/_jsx(\"textarea\",{ref:textareaRef,value:draft,onChange:event=>setDraft(event.target.value.slice(0,400)),onKeyDown:event=>{if(event.key===\"Enter\"&&!event.shiftKey){event.preventDefault();ask();}},placeholder:\"Ask Compass…\",rows:1,style:{width:\"100%\",minHeight:42,maxHeight:94,resize:\"none\",boxSizing:\"border-box\",borderRadius:14,border:`1px solid ${borderColor}`,background:\"rgba(255,255,255,.045)\",color:textColor,outline:\"none\",padding:\"11px 12px\",fontFamily:\"inherit\",fontSize:bodySize+2,lineHeight:1.4}}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",onClick:()=>ask(),disabled:!draft.trim()||thinking,style:{width:42,height:42,border:\"none\",borderRadius:14,background:goldColor,color:\"#080808\",fontFamily:\"inherit\",fontSize:18,fontWeight:850,cursor:!draft.trim()||thinking?\"default\":\"pointer\",opacity:!draft.trim()||thinking?.45:1},children:\"↑\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:6,textAlign:\"center\",color:secondaryColor,fontSize:Math.max(7,smallSize-1),lineHeight:1.35},children:\"Compass uses Klyro rules and your tracked financial data.\"})]}),/*#__PURE__*/_jsx(\"style\",{children:`\n                .klyro-compass-bottom-chat,\n                .klyro-compass-bottom-chat * {\n                    box-sizing: border-box;\n                }\n                .klyro-bottom-quick-prompts::-webkit-scrollbar {\n                    display: none;\n                }\n                textarea::placeholder {\n                    color: rgba(255,255,255,.42);\n                }\n                .klyro-compass-bottom-chat {\n                    width: 100% !important;\n                    height: 100% !important;\n                    min-width: 0 !important;\n                    min-height: 0 !important;\n                    max-width: 100% !important;\n                    max-height: 100% !important;\n                    overflow: hidden !important;\n                }\n                @media (max-width: 620px) {\n                    .klyro-compass-bottom-chat {\n                        border-radius: 22px !important;\n                    }\n                }\n\n                @media (max-width: 360px) {\n                    .klyro-compass-bottom-chat {\n                        border-radius: 18px !important;\n                    }\n\n                    .klyro-compass-bottom-chat button {\n                        max-width: 100%;\n                    }\n\n                    .klyro-compass-bottom-chat textarea {\n                        min-width: 0 !important;\n                        max-width: 100% !important;\n                    }\n                }\n            `})]});}KlyroCompassBottomChat.defaultProps={buttonBackground:\"rgba(10,10,13,.86)\",buttonBorderColor:\"#363636\",buttonTextColor:\"#FFFFFF\",buttonSecondaryColor:\"#AAAAAA\",buttonRadius:24,buttonBorderWidth:1,buttonScoreSize:22,buttonLabelSize:7,menuBackground:\"rgba(7,7,10,.96)\",closeBackground:\"rgba(255,255,255,.08)\",closeColor:\"#FFFFFF\",closeSize:42,cardBackground:\"rgba(255,255,255,.035)\",textColor:\"#FFFFFF\",secondaryColor:\"#AAAAAA\",borderColor:\"#363636\",goldColor:\"#B9B263\",positiveColor:\"#82C99A\",warningColor:\"#D9B76B\",dangerColor:\"#D96B6B\",innerRadius:16,titleSize:22,bodySize:10,smallSize:8,contentPadding:18};addPropertyControls(KlyroCompassBottomChat,{buttonBackground:{type:ControlType.Color,title:\"Button BG\"},buttonBorderColor:{type:ControlType.Color,title:\"Button Border\"},buttonTextColor:{type:ControlType.Color,title:\"Score Color\"},buttonSecondaryColor:{type:ControlType.Color,title:\"Label Color\"},buttonRadius:{type:ControlType.Number,title:\"Button Radius\",min:0,max:60},buttonBorderWidth:{type:ControlType.Number,title:\"Border Width\",min:0,max:8},buttonScoreSize:{type:ControlType.Number,title:\"Score Size\",min:12,max:40},buttonLabelSize:{type:ControlType.Number,title:\"Label Size\",min:6,max:16},menuBackground:{type:ControlType.Color,title:\"Menu BG\"},closeBackground:{type:ControlType.Color,title:\"Close BG\"},closeColor:{type:ControlType.Color,title:\"Close\"},closeSize:{type:ControlType.Number,title:\"Close Size\",min:28,max:70},cardBackground:{type:ControlType.Color,title:\"Card BG\"},textColor:{type:ControlType.Color,title:\"Text\"},secondaryColor:{type:ControlType.Color,title:\"Secondary\"},borderColor:{type:ControlType.Color,title:\"Border\"},goldColor:{type:ControlType.Color,title:\"Gold\"},positiveColor:{type:ControlType.Color,title:\"Positive\"},warningColor:{type:ControlType.Color,title:\"Warning\"},dangerColor:{type:ControlType.Color,title:\"Danger\"},innerRadius:{type:ControlType.Number,title:\"Card Radius\",min:0,max:50},titleSize:{type:ControlType.Number,title:\"Title Size\",min:12,max:40},bodySize:{type:ControlType.Number,title:\"Body\",min:7,max:20},smallSize:{type:ControlType.Number,title:\"Small\",min:6,max:18},contentPadding:{type:ControlType.Number,title:\"Menu Padding\",min:10,max:50}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KlyroCompassBottomChat\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CompassChatForMain.map"],"mappings":"A,yTAAsJ,SAAwB6B,EAAmB,EAAM,CAAC,IAAMC,EAASN,EAAa,QAAQ,IAAIA,EAAa,OAAY,CAACO,EAAUC,GAAchC,EAAe,EAAI,EAM9S,GANgTmB,MAAoB,CAAC,GAAGW,EAAS,OAAO,IAAMG,MAAW,CAACD,EAAaV,EAAO,YAAYY,EAAM,iBAAiB,CAAE,EAAoD,OAAlDD,EAAO,EAAEX,EAAO,iBAAiB,SAASW,CAAM,MAAY,CAACX,EAAO,oBAAoB,SAASW,CAAM,CAAE,CAAE,EAAE,CAACC,EAAM,kBAAkBJ,CAAQ,CAAC,EAMjjB,CAACA,GAAU,CAACC,EAAW,OAAO,KAAM,IAAMI,EAAOD,EAAM,QAAQ,UAAgBE,EAAWF,EAAM,YAAY,UAAgBG,EAAeH,EAAM,gBAAgB,UAAgBI,EAAUJ,EAAM,WAAW,UAAgBK,EAAeL,EAAM,gBAAgB,UAAgBM,EAAK,kEAAwEC,EAAQ,GAAK,CAAC,GAAIC,EAAW,GAAG,CAACpB,EAAO,KAAKoB,EAAI,SAAS,qBAAqB,CAAE,MAAM,CAAC,EAAO,SAAS,KAAK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