PageSourceSearch

https://techmalak.com/assets/js/index-DSKrGXs5.js

js techmalak.com collected 2026-10-02 11:36:08 UTC 20,039 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/WalletLinkModal-CydGne78.js","assets/js/main-BAIDKsXP.js","assets/js/router-vendor-CWJHlMW2.js","assets/js/ui-vendor-79KRc7km.js","assets/styles/main-BqXpmVWe.css","assets/js/supabase-ChmS9u1C.js","assets/js/navigation-core-CwpbfqzB.js","assets/js/navigation-segments-BLLpR-_G.js","assets/js/_commonjs-dynamic-modules-UGqcA2bN.js","assets/js/walletImportVenues-DIF8ACbj.js","assets/js/chains-Dsre_kE6.js","assets/js/formatPnl-fcrXyklZ.js","assets/js/BetaBadge-B9Z9D_83.js"])))=>i.map(i=>d[i]);
2import{l as L,c as R,t as P,j as e,_ as T}from"./main-BAIDKsXP.js";import{a as m,R as B}from"./router-vendor-CWJHlMW2.js";import{P as I}from"./index-BXc4z8jl.js";import{B as z}from"./index-D6OA3law.js";import{s as H}from"./supabase-ChmS9u1C.js";import{e as j}from"./exchangeBrand-BZvgFE8x.js";import{u as O}from"./useUserProfile-DcQ8wdh3.js";import{a as V}from"./chartTheme-BRKLbCg_.js";import{c as A}from"./createLucideIcon-5EWP_jOb.js";import{R as W}from"./refresh-cw-zJQiciAF.js";import{T as K}from"./trending-up-l4JXOJ6g.js";import{T as Y}from"./trending-down-DlCjgWK2.js";import{C as U}from"./circle-alert-C_agg2tn.js";import{L as q}from"./link-2-BVpJ86_u.js";import{C as G}from"./chevron-down-Wcaag-w7.js";import"./ui-vendor-79KRc7km.js";import"./identity-CIUYPcfS.js";import"./react-BgCe5Mdt.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"ff56b36242effd0e9dcdb28859c444eb007b4e5a"};var n=new t.Error().stack;
2n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="6a926322-8427-4e16-9e50-f24c348a34eb",t._sentryDebugIdIdentifier="sentry-dbid-6a926322-8427-4e16-9e50-f24c348a34eb")}catch{}})();const Z=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],J=A("chevron-up",Z);const Q=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],X=A("layout-grid",Q);const ee=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],te=A("list",ee);const se=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],M=A("wallet",se),S=t=>`color-mix(in srgb, ${t} 10%, transparent)`;async function ae(){const{data:t,error:n}=await H.functions.invoke("portfolio-balances");if(n)throw L.error("Portfolio fetch error:",n),R(n,{context:"portfolio-balances-fetch"}),new Error("Something went wrong on our end — our engineer has been notified.");return t}function re(t,n){const i=new Map;for(const a of t){const d=i.get(a.asset);d?(d.totalBalance+=a.balance,d.totalUsdValue+=a.usdValue,d.sources.push({exchange:a.exchangeSource,accountType:a.accountType,balance:a.balance,usdValue:a.usdValue})):i.set(a.asset,{asset:a.asset,totalBalance:a.balance,totalUsdValue:a.usdValue,price:a.price,change24h:a.change24h,sources:[{exchange:a.exchangeSource,accountType:a.accountType,balance:a.balance,usdValue:a.usdValue}],allocationPercent:0})}const s=Array.from(i.values());for(const a of s)a.allocationPercent=n>0?a.totalUsdValue/n*100:0;return s.sort((a,d)=>d.totalUsdValue-a.totalUsdValue),s}function D(t){switch(t){case"bitget":return{displayName:"Bitget",color:j.bitget,bgColor:S(j.bitget)};case"bybit":return{displayName:"Bybit",color:j.bybit,bgColor:S(j.bybit)};case"kraken":return{displayName:"Kraken",color:j.kraken,bgColor:S(j.kraken)};case"kucoin":return{displayName:"KuCoin",color:j.kucoin,bgColor:S(j.kucoin)};case"coinbase":return{displayName:"Coinbase",color:j.coinbase,bgColor:S(j.coinbase)};default:return{displayName:t,color:P[2],bgColor:S(P[2])}}}const E={USD:"$",CAD:"C$"};function $(t,n="USD",i=1){const s=t*i,a=E[n];return Math.abs(s)>=1e6?`${a}${(s/1e6).toFixed(2)}M`:Math.abs(s)>=1e3?`${a}${s.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:Math.abs(s)>=1?`${a}${s.toFixed(2)}`:`${a}${s.toFixed(4)}`}function ne(t,n="USD",i=1){const s=t*i,a=E[n];return s>=1e3?`${a}${s.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:s>=1?`${a}${s.toFixed(2)}`:s>=.01?`${a}${s.toFixed(4)}`:`${a}${s.toFixed(8)}`}function _(t){return t>=1e3?t.toLocaleString("en-US",{maximumFractionDigits:2}):t>=1?t.toFixed(4):t>=.001?t.toFixed(6):t.toFixed(8)}const le=m.lazy(()=>T(()=>import("./WalletLinkModal-CydGne78.js").then(t=>t.gg),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])));function oe({holdings:t}){const n=t.slice(0,8),i=t.slice(8).reduce((o,x)=>o+x.totalUsdValue,0),s=[...n];i>0&&s.push({asset:"Other",totalBalance:0,totalUsdValue:i,price:0,change24h:0,sources:[],allocationPercent:t.slice(8).reduce((o,x)=>o+x.allocationPercent,0)});const a=s.reduce((o,x)=>o+x.totalUsdValue,0);if(a===0)return null;const d=70,b=90,f=90;let N=-90;const w=s.map((o,x)=>{const r=o.totalUsdValue/a*360,h=N,p=N+r;N=p;const l=h*Math.PI/180,c=p*Math.PI/180,u=b+d*Math.cos(l),k=f+d*Math.sin(l),v=b+d*Math.cos(c),g=f+d*Math.sin(c),C=r>180?1:0,F=`M ${b} ${f} L ${u} ${k} A ${d} ${d} 0 ${C} 1 ${v} ${g} Z`;return e.jsx("path",{d:F,fill:V[x%V.length],opacity:.85},o.asset)});return e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("svg",{width:"180",height:"180",viewBox:"0 0 180 180",children:[w,e.jsx("circle",{cx:b,cy:f,r:"45",className:"fill-bg-2"})]}),e.jsx("div",{className:"flex flex-col gap-1.5",children:s.map((o,x)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("div",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:V[x%V.length]}}),e.jsx("span",{className:"text-text-2 font-medium",children:o.asset}),e.jsxs("span",{className:"text-text-3",children:[o.allocationPercent.toFixed(1),"%"]})]},o.asset))})]})}function ce({holdings:t,viewMode:n,currency:i,rate:s}){const[a,d]=m.useState("usdValue"),[b,f]=m.useState("desc"),[N,w]=m.useState(null),o=m.useMemo(()=>{const r=[...t];return r.sort((h,p)=>{let l,c;switch(a){case"asset":l=h.asset,c=p.asset;break;case"balance":l=h.totalBalance,c=p.totalBalance;break;case"price":l=h.price,c=p.price;break;case"change24h":l=h.change24h,c=p.change24h;break;case"usdValue":l=h.totalUsdValue,c=p.totalUsdValue;break}return typeof l=="string"?b==="asc"?l.localeCompare(c):c.localeCompare(l):b==="asc"?l-c:c-l}),r},[t,a,b]);function x(r){a===r?f(h=>h==="asc"?"desc":"asc"):(d(r),f("desc"))}const y=({col:r})=>a!==r?null:b==="asc"?e.jsx(J,{className:"w-3 h-3 inline ml-0.5"}):e.jsx(G,{className:"w-3 h-3 inline ml-0.5"});return e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border/50 text-text-3",children:[e.jsxs("th",{className:"text-left py-3 px-4 font-medium cursor-pointer select-none",onClick:()=>x("asset"),children:["Asset ",e.jsx(y,{col:"asset"})]}),e.jsxs("th",{className:"text-right py-3 px-4 font-medium cursor-pointer select-none",onClick:()=>x("balance"),children:["Balance ",e.jsx(y,{col:"balance"})]}),e.jsxs("th",{className:"text-right py-3 px-4 font-medium cursor-pointer select-none",onClick:()=>x("price"),children:["Price ",e.jsx(y,{col:"price"})]}),e.jsxs("th",{className:"text-right py-3 px-4 font-medium cursor-pointer select-none",onClick:()=>x("change24h"),children:["24h ",e.jsx(y,{col:"change24h"})]}),e.jsxs("th",{className:"text-right py-3 px-4 font-medium cursor-pointer select-none",onClick:()=>x("usdValue"),children:["Value (",i,") ",e.jsx(y,{col:"usdValue"})]}),e.jsx("th",{className:"text-right py-3 px-4 font-medium",children:"Allocation"}),n==="flat"&&e.jsx("th",{className:"text-right py-3 px-4 font-medium",children:"Source"})]})}),e.jsx("tbody",{children:o.map(r=>{const h=N===r.asset,p=r.sources.length>1;return e.jsxs(B.Fragment,{children:[e.jsxs("tr",{className:`border-b border-border/50 hover:bg-panel-hi/30 transition-colors ${p?"cursor-pointer":""}`,onClick:()=>p&&w(h?null:r.asset),children:[e.jsx("td",{className:"py-3 px-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-semibold text-text font-jetbrains",children:r.asset}),p&&e.jsx(z,{color:"neutral",className:"text-tiny px-1.5 py-0",children:r.sources.length})]})}),e.jsx("td",{className:"text-right py-3 px-4 text-text-2 font-jetbrains",children:_(r.totalBalance)}),e.jsx("td",{className:"text-right py-3 px-4 text-text-2 font-jetbrains",children:r.price>0?ne(r.price,i,s):"—"}),e.jsx("td",{className:"text-right py-3 px-4 font-jetbrains",children:e.jsxs("span",{className:r.change24h>0?"text-pos":r.change24h<0?"text-neg":"text-text-3",children:[r.change24h>0?"+":"",r.change24h.toFixed(2),"%"]})}),e.jsx("td",{className:"text-right py-3 px-4 text-text font-semibold font-jetbrains",children:$(r.totalUsdValue,i,s)}),e.jsx("td",{className:"text-right py-3 px-4",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx("div",{className:"w-16 bg-bg-2/50 rounded-full h-1.5",children:e.jsx("div",{className:"bg-brand-primary h-1.5 rounded-full",style:{width:`${Math.min(r.allocationPercent,100)}%`}})}),e.jsxs("span",{className:"text-text-3 text-xs w-12 text-right",children:[r.allocationPercent.toFixed(1),"%"]})]})}),n==="flat"&&e.jsx("td",{className:"text-right py-3 px-4",children:e.jsx("div",{className:"flex items-center justify-end gap-1",children:r.sources.map((l,c)=>{const u=D(l.exchange);return e.jsx("span",{className:"text-tiny px-1.5 py-0.5 rounded",style:{backgroundColor:u.bgColor,color:u.color},children:u.displayName},c)})})})]}),h&&p&&e.jsx("tr",{children:e.jsx("td",{colSpan:n==="flat"?7:6,className:"bg-bg-2/20 px-8 py-2",children:e.jsx("div",{className:"flex flex-col gap-1",children:r.sources.map((l,c)=>{const u=D(l.exchange);return e.jsxs("div",{className:"flex items-center justify-between text-xs text-text-3",children:[e.jsxs("span",{style:{color:u.color},children:[u.displayName," (",l.accountType,")"]}),e.jsxs("span",{className:"font-jetbrains",children:[_(l.balance)," → ",$(l.usdValue,i,s)]})]},c)})})})})]},r.asset)})})]})})}function ie({exchanges:t,currency:n,rate:i}){return e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:t.map(s=>{const a=D(s.exchange);return e.jsxs("div",{className:"rounded-xl border border-border/50 bg-panel/30 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"font-poppins font-semibold text-text",children:a.displayName}),e.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:s.error?"var(--color-neg)":"var(--color-pos)"}})]}),e.jsx("div",{className:"text-lg font-bold text-text font-jetbrains mb-1",children:$(s.totalUsdValue,n,i)}),e.jsxs("div",{className:"text-xs text-text-3",children:[s.holdings.length," asset",s.holdings.length!==1?"s":"",s.lastSyncAt&&e.jsxs(e.Fragment,{children:[" · Synced ",new Date(s.lastSyncAt).toLocaleDateString()]})]}),s.error&&e.jsxs("div",{className:"mt-2 flex items-center gap-1 text-xs text-error",children:[e.jsx(U,{className:"w-3 h-3"}),e.jsx("span",{className:"truncate",children:s.error})]}),!s.error&&s.errors&&s.errors.length>0&&e.jsxs("div",{className:"mt-2 flex items-center gap-1 text-xs text-warning",children:[e.jsx(U,{className:"w-3 h-3"}),e.jsx("span",{children:"Some account types couldn't be queried"})]})]},s.connectionId)})})}function de({onLinkWallet:t}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl bg-panel/50 border border-border/50 flex items-center justify-center mb-4",children:e.jsx(M,{className:"w-8 h-8 text-text-3"})}),e.jsx("h3",{className:"text-lg font-poppins font-semibold text-text-2 mb-2",children:"Connect Your Holdings"}),e.jsx("p",{className:"text-text-3 text-sm max-w-sm mb-6",children:"Connect an exchange to see your balances, or link a wallet to track its tokens and NFTs. Everything here is read-only — we never request permission to move your assets or make transactions."}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-3",children:[e.jsxs("a",{href:"/trading-journal?tab=connections",className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-lg bg-brand-primary text-white text-sm font-medium hover:bg-brand-hover transition-colors",children:[e.jsx(q,{className:"w-4 h-4"}),"Connect Exchange"]}),e.jsxs("button",{type:"button",onClick:t,className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border border-border/70 bg-panel/40 text-text-2 text-sm font-medium hover:bg-panel-hi/50 hover:border-border-hi transition-colors",children:[e.jsx(M,{className:"w-4 h-4"}),"Link a Wallet"]})]})]})}function xe(){return e.jsxs("div",{className:"space-y-6 animate-pulse",children:[e.jsxs("div",{className:"rounded-xl border border-border/50 bg-panel/30 p-6",children:[e.jsx("div",{className:"h-4 w-32 bg-panel-hi rounded mb-3"}),e.jsx("div",{className:"h-10 w-48 bg-panel-hi rounded mb-2"}),e.jsx("div",{className:"h-4 w-24 bg-panel-hi rounded"})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[...Array(4)].map((t,n)=>e.jsxs("div",{className:"rounded-xl border border-border/50 bg-panel/30 p-4",children:[e.jsx("div",{className:"h-4 w-20 bg-panel-hi rounded mb-3"}),e.jsx("div",{className:"h-6 w-28 bg-panel-hi rounded mb-2"}),e.jsx("div",{className:"h-3 w-16 bg-panel-hi rounded"})]},n))}),e.jsx("div",{className:"rounded-xl border border-border/50 bg-panel/30 p-4",children:[...Array(6)].map((t,n)=>e.jsxs("div",{className:"flex items-center gap-4 py-3 border-b border-border/50",children:[e.jsx("div",{className:"h-4 w-12 bg-panel-hi rounded"}),e.jsx("div",{className:"h-4 w-20 bg-panel-hi rounded ml-auto"}),e.jsx("div",{className:"h-4 w-16 bg-panel-hi rounded"}),e.jsx("div",{className:"h-4 w-16 bg-panel-hi rounded"})]},n))})]})}function Ae(){const[t,n]=m.useState(null),[i,s]=m.useState(!0),[a,d]=m.useState(!1),[b,f]=m.useState(null),[N,w]=m.useState("flat"),[o,x]=m.useState("USD"),[y,r]=m.useState(!1),{profile:h,updateProfile:p}=O();m.useEffect(()=>{h?.base_currency==="CAD"&&x("CAD")},[h?.base_currency]);const l=o==="CAD"?t?.exchangeRates?.CAD??1:1,c=m.useCallback(async(g=!1)=>{try{g?d(!0):s(!0),f(null);const C=await ae();n(C)}catch(C){f(C instanceof Error?C.message:"Failed to load portfolio")}finally{s(!1),d(!1)}},[]);m.useEffect(()=>{c()},[c]);const u=m.useMemo(()=>t?re(t.allHoldings,t.totalUsdValue):[],[t]),k=e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-brand-primary/10 border border-brand-primary/20 flex items-center justify-center",children:e.jsx(M,{className:"w-5 h-5 text-brand-primary"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl font-poppins font-bold text-text",children:"Portfolio"}),e.jsx("p",{className:"text-xs text-text-3",children:t?.lastRefreshedAt?`Updated ${new Date(t.lastRefreshedAt).toLocaleTimeString()}`:"Across all connected exchanges"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex items-center gap-0.5 bg-bg-2 rounded-lg p-0.5 border border-border",children:["USD","CAD"].map(g=>e.jsx("button",{onClick:()=>{x(g),p({base_currency:g}).catch(console.error)},className:`tap-target-mobile px-2.5 py-1.5 rounded-md text-xs font-mono font-medium transition-colors ${o===g?"bg-brand-primary text-white shadow-sm":"text-text-3 hover:text-text-2"}`,children:g},g))}),e.jsxs("button",{onClick:()=>r(!0),title:"Link a wallet to track its tokens and NFTs (read-only)",className:"tap-target-mobile inline-flex items-center gap-2 px-3 py-2 rounded-lg border border-border bg-panel/50 text-text-2 text-sm hover:bg-panel-hi/50 transition-colors",children:[e.jsx(M,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Link a Wallet"})]}),e.jsxs("button",{onClick:()=>c(!0),disabled:a,className:"tap-target-mobile inline-flex items-center gap-2 px-3 py-2 rounded-lg border border-border bg-panel/50 text-text-2 text-sm hover:bg-panel-hi/50 transition-colors disabled:opacity-50",children:[e.jsx(W,{className:`w-4 h-4 ${a?"animate-spin":""}`}),"Refresh"]})]})]});let v;if(i)v=e.jsxs("div",{className:"p-4 md:p-6 max-w-7xl mx-auto",children:[k,e.jsx(xe,{})]});else if(b)v=e.jsxs("div",{className:"p-4 md:p-6 max-w-7xl mx-auto",children:[k,e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx(U,{className:"w-10 h-10 text-error mb-3"}),e.jsx("p",{className:"text-text-2 mb-4",children:b}),e.jsx("button",{onClick:()=>c(),className:"px-4 py-2 rounded-lg bg-brand-primary text-white text-sm hover:bg-brand-hover transition-colors",children:"Try Again"})]})]});else if(!t||t.exchanges.length===0)v=e.jsxs("div",{className:"p-4 md:p-6 max-w-7xl mx-auto",children:[k,e.jsx(de,{onLinkWallet:()=>r(!0)})]});else{const g=t.change24hPercent>0;
2v=e.jsxs("div",{className:"p-4 md:p-6 max-w-7xl mx-auto space-y-6",children:[k,e.jsxs("div",{className:"rounded-xl border border-border/50 bg-gradient-to-br from-panel/60 to-bg-2/60 p-6",children:[e.jsx("p",{className:"text-sm text-text-3 mb-1 font-medium",children:"Total Portfolio Value"}),e.jsxs("div",{className:"flex items-end gap-4 flex-wrap",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-text font-jetbrains tracking-tight",children:$(t.totalUsdValue,o,l)}),e.jsxs("div",{className:`flex items-center gap-1 text-sm font-medium ${g?"text-pos":"text-neg"}`,children:[g?e.jsx(K,{className:"w-4 h-4"}):e.jsx(Y,{className:"w-4 h-4"}),e.jsxs("span",{children:[g?"+":"",$(t.change24hUsd,o,l)," (",g?"+":"",t.change24hPercent.toFixed(2),"%)"]}),e.jsx("span",{className:"text-text-3 font-normal ml-1",children:"24h"})]})]})]}),e.jsx(ie,{exchanges:t.exchanges,currency:o,rate:l}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"rounded-xl border border-border/50 bg-panel/30 p-5",children:[e.jsx("h3",{className:"text-sm font-poppins font-semibold text-text-2 mb-4",children:"Allocation"}),u.length>0?e.jsx(oe,{holdings:u}):e.jsx("p",{className:"text-text-3 text-sm",children:"No holdings to display"})]}),e.jsxs("div",{className:"lg:col-span-2 rounded-xl border border-border/50 bg-panel/30 p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h3",{className:"text-sm font-poppins font-semibold text-text-2",children:["Holdings",e.jsxs("span",{className:"text-text-3 font-normal ml-2",children:[u.length," asset",u.length!==1?"s":""]})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-bg-2 rounded-lg p-0.5",children:[e.jsx("button",{onClick:()=>w("flat"),className:`tap-target-mobile-overlay p-1.5 rounded-md transition-colors ${N==="flat"?"bg-panel-hi text-text-2":"text-text-3 hover:text-text-2"}`,title:"Flat view",children:e.jsx(te,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:()=>w("grouped"),className:`tap-target-mobile-overlay p-1.5 rounded-md transition-colors ${N==="grouped"?"bg-panel-hi text-text-2":"text-text-3 hover:text-text-2"}`,title:"Grouped view",children:e.jsx(X,{className:"w-3.5 h-3.5"})})]})]}),u.length>0?e.jsx(ce,{holdings:u,viewMode:N,currency:o,rate:l}):e.jsx("p",{className:"text-text-3 text-sm py-8 text-center",children:"No holdings found across your exchanges"})]})]})]})}return e.jsxs("div",{className:"min-h-screen bg-bg-page relative overflow-hidden",children:[e.jsx(I,{}),e.jsx("div",{className:"relative z-10",children:v}),y&&e.jsx(m.Suspense,{fallback:null,children:e.jsx(le,{isOpen:y,onClose:()=>r(!1),onSuccess:()=>r(!1)})})]})}export{Ae as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.