PageSourceSearch

https://bags.fm/_next/static/chunks/9549-2a70db707118818c.js

js bags.fm collected 2026-09-25 19:09:32 UTC 30,213 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9549],{765:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(95155);r(12115);var l=r(1258),n=r(84732);let s=function(e){let{onClick:t,...r}=e,{redirectToLogin:s}=(0,n._)();return(0,a.jsx)(l.default,{onClick:e=>{try{null==t||t(e)}finally{s({setRedirectPath:!1})}},label:"log in",containerClass:"w-auto",textClass:"text-md",variant:"primary",...r})}},4702:(e,t,r)=>{r.d(t,{A:()=>m});var a=r(95155);r(12115);var l=r(63933),n=r(59434),s=r(14097),o=r(78639),i=r(61038),u=r(30068),d=r(74133);let c=function(e){let{className:t}=e;return(0,a.jsx)(s.ClientOnly,{children:(0,a.jsxs)("div",{className:(0,n.cn)("flex w-full flex-col gap-y-5",t),children:[(0,a.jsx)(d.default,{}),(0,a.jsx)(o.default,{}),(0,a.jsx)(i.default,{}),(0,a.jsx)(u.default,{})]})})},m=function(e){let{onClose:t}=e;return(0,a.jsx)(l.default,{onClose:t,className:"max-w-md",title:"Swap Settings",children:(0,a.jsx)(c,{className:"mt-2"})})}},30068:(e,t,r)=>{r.d(t,{default:()=>m});var a=r(95155),l=r(12115),n=r(13353),s=r(59434),o=r(56376),i=r(36388),u=r(35932),d=r(6863);let c=[i.rU.NORMAL,i.rU.FAST,i.rU.TURBO],m=function(){let[e,t]=(0,n.fp)(i.Xe),r=(0,l.useCallback)(r=>{r!==e&&(t(r),(0,u.sx)(d.qY.SWAP_SETTING_CHANGED,{setting:"transaction_speed",transactionSpeed:r}))},[e,t]);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-y-2",children:[(0,a.jsx)("span",{className:"text-bags-foreground/40 text-[11px] font-bold tracking-wider uppercase",children:"Priority fee"}),(0,a.jsx)("div",{className:"border-bags-border grid grid-cols-3 gap-1 rounded-xl border p-1",children:c.map(t=>(0,a.jsx)("button",{type:"button",onClick:()=>r(t),"aria-pressed":e===t,className:(0,s.cn)("cursor-pointer rounded-lg py-2 text-sm font-semibold transition-colors",e===t?"bg-bags-foreground/15 text-bags-foreground":"text-bags-foreground/50 hover:text-bags-foreground"),children:o.w[t]},t))})]})}},50280:(e,t,r)=>{r.d(t,{A:()=>_});var a=r(95155),l=r(12115),n=r(59434),s=r(50696),o=r(61935),i=r(90163),u=r(81485),d=r(51584),c=r(22600),m=r(20130),b=r(381),g=r(58832),p=r(13353),x=r(31973),f=r(66758),h=r(765),v=r(4702),y=r(35932),w=r(6863),N=r(93331);function k(e){return e.isGreaterThanOrEqualTo(1e6)?"".concat(e.dividedBy(1e6).toFixed(2),"M"):e.isGreaterThanOrEqualTo(1e3)?"".concat(e.dividedBy(1e3).toFixed(2),"K"):e.isGreaterThanOrEqualTo(1)?e.toFixed(2):e.toFixed(4)}function j(e){let{icon:t,symbol:r}=e;return(0,a.jsxs)("div",{className:"border-bags-border bg-bags-foreground/[0.06] flex shrink-0 items-center gap-1.5 rounded-full border py-1.5 pr-3 pl-1.5",children:[t&&(0,a.jsx)(f.A,{src:t,alt:r,size:20,rounded:"full"}),(0,a.jsx)("span",{className:"text-bags-foreground text-sm font-bold",children:r})]})}let _=function(e){var t,r,f,_,C,S;let{tokenAddress:T,tokenSymbol:A,initialMode:P=s.zP.BUY,tokenPriceUsd:E}=e,[F,D]=(0,l.useState)(P),[U,R]=(0,l.useState)(""),[q,M]=(0,l.useState)(!1),[B]=(0,p.fp)(x.Bv),{data:O}=(0,i.E5)({tokenAddress:T}),{balance:L}=(0,d.FR)(T),{balance:I}=(0,d.FR)(c.Yb),{data:G}=(0,u.Xe)(c.Yb),{data:Y}=(0,u.Xe)(T),H=null!=(C=null==G?void 0:G.usdPrice)?C:0,W=(0,N.V7)(E,null==Y?void 0:Y.usdPrice),z=F===s.zP.BUY,V=(null==O||null==(t=O.swapToken)?void 0:t.symbol)||(null==O||null==(r=O.cryptoToken)?void 0:r.symbol)||A,K=null!=(S=null==O||null==(f=O.swapToken)?void 0:f.decimals)?S:null==O||null==(_=O.cryptoToken)?void 0:_.decimals,$=z?"SOL":V,X=z?null==G?void 0:G.icon:null==Y?void 0:Y.icon,J=z?H:W,Q=z?I:L,Z=z?V:"SOL",ee=z?null==Y?void 0:Y.icon:null==G?void 0:G.icon,et=(0,l.useCallback)(()=>{let e=z?s.zP.SELL:s.zP.BUY;(0,y.sx)(w.qY.TRADE_MODE_SWITCHED,{mode:e===s.zP.BUY?"buy":"sell",tokenAddress:T}),D(e),R("")},[z,T]),er=(0,l.useCallback)(e=>{let t=e.target.value;(""===t||/^\d*\.?\d*$/.test(t))&&R(t)},[]),ea=(0,l.useCallback)(()=>{let e=new m.A(Q||0);if(e.isNaN()||e.isLessThanOrEqualTo(0))return;let t=z?9:Math.min(null!=K?K:9,9);R(e.decimalPlaces(t,m.A.ROUND_DOWN).toFixed())},[Q,z,K]),el=(0,l.useMemo)(()=>{if(!U)return"";let e=new m.A(U);return e.isNaN()||e.isLessThanOrEqualTo(0)?"":e.toFixed()},[U]),en=!!el,es=(0,l.useMemo)(()=>!!el&&new m.A(el).isGreaterThan(Q),[el,Q]),{payUsd:eo,receiveDisplay:ei,receiveUsd:eu}=(0,l.useMemo)(()=>{let e=new m.A(el||0);if(e.isNaN()||e.isLessThanOrEqualTo(0)||!J)return{payUsd:0,receiveDisplay:"",receiveUsd:0};let t=e.multipliedBy(J);return z?W?{payUsd:t.toNumber(),receiveDisplay:k(t.dividedBy(W)),receiveUsd:t.toNumber()}:{payUsd:t.toNumber(),receiveDisplay:"",receiveUsd:0}:H?{payUsd:t.toNumber(),receiveDisplay:t.dividedBy(H).toFixed(4),receiveUsd:t.toNumber()}:{payUsd:t.toNumber(),receiveDisplay:"",receiveUsd:0}},[el,z,J,W,H]),ed=z?"".concat(new m.A(I).toFixed(2)," SOL"):"".concat(k(new m.A(L||0))," ").concat(V),ec=(0,l.useCallback)(()=>{R("")},[]),em=(0,l.useCallback)(()=>{(0,y.sx)(w.qY.SWAP_SETTINGS_OPENED,{source:"quick_trade"}),M(!0)},[]),eb=(0,l.useCallback)(()=>{(0,y.sx)(w.qY.TRADE_BUTTON_CLICKED,{side:(0,w.hY)(F),tokenAddress:T,...V?{tokenSymbol:V}:{},amount:el,network:"solana",source:"web_swap_widget",signedIn:!1})},[F,T,V,el]),eg=(0,l.useMemo)(()=>es?"Insufficient ".concat($," balance"):"".concat(z?"Buy":"Sell"," $").concat(V),[es,z,$,V]),ep=!en||es||null==K;return(0,a.jsxs)("div",{className:"border-bags-border bg-bags-surface shadow-bags-inset flex flex-col gap-y-3 rounded-2xl border-2 p-4",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"border-bags-border bg-bags-foreground
1/[0.03] rounded-2xl border p-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-bags-foreground/40 text-[11px] font-bold tracking-wider uppercase",children:"You pay"}),(0,a.jsxs)("div",{className:"flex items-center gap-x-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:em,"aria-label":"Swap settings",className:"text-bags-foreground/40 hover:text-bags-foreground cursor-pointer transition-colors",children:(0,a.jsx)(b.A,{size:13})}),(0,a.jsxs)("span",{className:"text-bags-foreground/40 text-[11px] font-medium",children:["Balance \xb7 ",(0,a.jsx)("span",{className:"text-bags-foreground/60",children:ed})]}),B&&(0,a.jsx)("button",{type:"button",onClick:ea,className:"text-bags-green hover:text-bags-green/80 cursor-pointer text-[11px] font-bold uppercase transition-colors",children:"Max"})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("input",{type:"text",inputMode:"decimal",value:U,onChange:er,placeholder:"0",className:"text-bags-foreground placeholder:text-bags-foreground/25 min-w-0 flex-1 bg-transparent text-3xl font-black tracking-tight tabular-nums outline-none"}),(0,a.jsx)(j,{icon:X,symbol:$})]}),(0,a.jsx)("div",{className:"mt-1 h-4",children:eo>0&&(0,a.jsxs)("span",{className:"text-bags-foreground/40 text-[11px] font-medium",children:["≈ $",eo.toLocaleString("en-US",{maximumFractionDigits:2})]})})]}),(0,a.jsx)("div",{className:"z-10 -my-3 flex justify-center",children:(0,a.jsx)("button",{type:"button",onClick:et,"aria-label":z?"Switch to sell":"Switch to buy",className:(0,n.cn)("border-bags-background bg-bags-grey-extra-dark text-bags-foreground/70 hover:text-bags-foreground","flex size-10 cursor-pointer items-center justify-center rounded-xl border-4 transition-colors active:scale-95"),children:(0,a.jsx)(g.A,{size:16,strokeWidth:2.5})})}),(0,a.jsxs)("div",{className:"border-bags-border bg-bags-foreground/[0.03] rounded-2xl border p-4",children:[(0,a.jsx)("div",{className:"mb-2 flex items-center justify-between",children:(0,a.jsx)("span",{className:"text-bags-foreground/40 text-[11px] font-bold tracking-wider uppercase",children:"You receive"})}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-bags-foreground min-w-0 flex-1 truncate text-3xl font-black tracking-tight tabular-nums",children:ei||"0"}),(0,a.jsx)(j,{icon:ee,symbol:Z})]}),(0,a.jsx)("div",{className:"mt-1 h-4",children:eu>0&&(0,a.jsxs)("span",{className:"text-bags-foreground/40 text-[11px] font-medium",children:["≈ $",eu.toLocaleString("en-US",{maximumFractionDigits:2})]})})]})]}),B?(0,a.jsx)(o.A,{label:eg,textClass:"text-base font-black text-black",containerClass:"py-3.5 rounded-2xl",className:(0,n.cn)(ep?"bg-bags-foreground/10":z?"bg-bags-green enabled:hover:bg-bags-green/90":"bg-bags-red enabled:hover:bg-bags-red/90"),type:F,tokenAddress:T,amount:el,disabled:ep,tokenSymbol:V,tokenDecimals:null!=K?K:0,onBeforeExecute:ec,source:"web_swap_widget"}):(0,a.jsx)(h.A,{variant:"white",containerClass:"py-3.5 rounded-2xl",textClass:"text-base font-black",onClick:eb}),q&&(0,a.jsx)(v.A,{onClose:()=>M(!1)})]})}},50950:(e,t,r)=>{r.d(t,{F:()=>n});var a=r(35932),l=r(6863);function n(e){(0,a.sx)(l.qY.CHART_LOAD_FAILED,{reason:e.reason,...e.tokenAddress?{tokenAddress:e.tokenAddress}:{},...e.network?{network:e.network}:{},...e.surface?{surface:e.surface}:{}})}},56376:(e,t,r)=>{r.d(t,{v:()=>s,w:()=>n});var a=r(36388),l=r(50696);let n={[a.rU.NORMAL]:"Normal",[a.rU.FAST]:"High",[a.rU.TURBO]:"Extra high"},s={[l.bq.AUTO]:"Auto",[l.bq.JUPITER]:"Jupiter",[l.bq.TITAN]:"Titan"}},60386:(e,t,r)=>{r.d(t,{d:()=>n});var a=r(81335),l=r(98796);function n(e){let{positions:t,claimScope:r,onClaimSuccess:n,...s}=e,{handleClaimAll:o,isClaimingAll:i}=(0,l.r)({positions:t,claimScope:r}),{execute:u}=(0,a.t)({action:o,onSuccess:n,...s});return{handleClaimAll:u,isClaimingAll:i}}},61038:(e,t,r)=>{r.d(t,{default:()=>x});var a=r(95155),l=r(12115),n=r(20130),s=r(13353),o=r(89917),i=r(59434),u=r(36388),d=r(35932),c=r(6863);let m=/^\d*\.?\d{0,2}
1$/,b=[1e3,2e3,3e3],g=e=>new n.A(e).dividedBy(100).toFixed(),p=e=>(0,i.cn)("cursor-pointer rounded-lg py-2 text-sm font-semibold transition-colors",e?"bg-bags-foreground/15 text-bags-foreground":"text-bags-foreground/50 hover:text-bags-foreground"),x=function(){let[e,t]=(0,s.fp)(u.mp),r=-1!==e&&!b.includes(e),[x,f]=(0,l.useState)(()=>r?g(e):""),[h,v]=(0,l.useState)(!1),y=h||""!==x,w=-1===e&&!y,N=(0,l.useCallback)(()=>{f(""),v(!1),-1!==e&&(t(-1),(0,d.sx)(c.qY.SWAP_SETTING_CHANGED,{setting:"slippage",slippageBps:"auto"}))},[e,t]),k=(0,l.useCallback)(r=>{f(""),v(!1),r!==e&&(t(r),(0,d.sx)(c.qY.SWAP_SETTING_CHANGED,{setting:"slippage",slippageBps:r}))},[e,t]),j=(0,l.useCallback)(e=>{let t=e.target.value;(""===t||m.test(t))&&f(t)},[]),_=(0,l.useCallback)(()=>{v(!1);let a=new n.A(x);if(a.isNaN()||a.isLessThanOrEqualTo(0))return void f(r?g(e):"");let l=n.A.min(n.A.max(a,.1),50).multipliedBy(100).integerValue(n.A.ROUND_HALF_UP).toNumber();f(b.includes(l)?"":g(l)),l!==e&&(t(l),(0,d.sx)(c.qY.SWAP_SETTING_CHANGED,{setting:"slippage",slippageBps:l}))},[x,e,r,t]),C=(0,l.useCallback)(e=>{"Enter"===e.key&&e.currentTarget.blur()},[]);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-y-2",children:[(0,a.jsx)("span",{className:"text-bags-foreground/40 text-[11px] font-bold tracking-wider uppercase",children:"Max Slippage"}),(0,a.jsxs)("div",{className:"border-bags-border grid grid-cols-5 gap-1 rounded-xl border p-1",children:[(0,a.jsx)("button",{type:"button",onClick:N,"aria-pressed":w,className:p(w),children:"Auto"}),b.map(t=>{let r=e===t&&!y;return(0,a.jsxs)("button",{type:"button",onClick:()=>k(t),"aria-pressed":r,className:(0,i.cn)(p(r),"tabular-nums"),children:[g(t),"%"]},t)}),h?(0,a.jsxs)("label",{className:"bg-bags-foreground/15 flex min-w-0 cursor-text items-center rounded-lg px-2 py-2",children:[(0,a.jsx)("input",{type:"text",inputMode:"decimal",value:x,autoFocus:!0,onFocus:e=>e.currentTarget.select(),onChange:j,onBlur:_,onKeyDown:C,placeholder:"0.5","aria-label":"Custom slippage percentage",className:"text-bags-foreground placeholder:text-bags-foreground/25 w-full min-w-0 bg-transparent text-right text-sm font-semibold tabular-nums outline-none"}),(0,a.jsx)("span",{className:"text-bags-foreground/60 pl-0.5 text-sm font-semibold",children:"%"})]}):""!==x?(0,a.jsxs)("button",{type:"button",onClick:()=>v(!0),"aria-pressed":!0,className:(0,i.cn)(p(!0),"tabular-nums"),children:[x,"%"]}):(0,a.jsx)("button",{type:"button",onClick:()=>v(!0),"aria-label":"Set custom slippage",className:(0,i.cn)(p(!1),"flex items-center justify-center"),children:(0,a.jsx)(o.A,{size:13})})]})]})}},63182:(e,t,r)=>{r.d(t,{Je:()=>a,Km:()=>l,Pq:()=>i,QH:()=>u,qt:()=>n,r8:()=>s,xE:()=>o});let a=r(87358).env.NEXT_PUBLIC_TRADING_VIEW_CHARTING_URL,l=[{label:"1m",value:"1"},{label:"15m",value:"15"},{label:"30m",value:"30"},{label:"1h",value:"60"},{label:"4h",value:"240"},{label:"1d",value:"1D"},{label:"1w",value:"1W"}],n=l.map(e=>e.value),s="1",o=[{label:"1s",value:"1S"},{label:"1m",value:"1"},{label:"15m",value:"15"},{label:"30m",value:"30"},{label:"1h",value:"60"},{label:"1d",value:"1D"}],i=o.map(e=>e.value);function u(e,t){return t.includes(e)?e:s}},66897:(e,t,r)=>{r.d(t,{A:()=>F});var a=r(95155),l=r(12115),n=r(13353),s=r(81485),o=r(76033),i=r(64310),u=r(63182),d=r(31973),c=r(20843),m=r(63903),b=r(98039),g=r(98653),p=r(50950);let x=u.Pq,f=new Set,h={"1S":1,1:60,3:180,5:300,15:900,30:1800,60:3600,240:14400,"1D":86400,D:86400,"1W":86400,W:86400},v={"1s":172800,"1m":604800,"3m":1209600,"5m":2592e3,"15m":7776e3,"30m":15552e3,"1h":31536e3,"4h":63072e3,"1d":15768e4},y=e=>{var t;return"1W"===e||"W"===e||"1D"===e||"D"===e?"1d":null!=(t=({"1S":"1s",1:"1m",3:"3m",5:"5m",15:"15m",30:"30m",60:"1h",240:"4h"})[e])?t:"1h"},w=(e,t,r,a)=>{let l=Math.floor(Date.now()/1e3),n=Math.min(t,l),s=l-v[r];if(n<=s)return null;let o=Math.max(e,s,n-5e3*a);return o>=n?null:{from:o,to:n}},N=(e,t)=>{let r=[];for(let a of e)[a.time,a.open,a.high,a.low,a.close].every(Number.isFinite)&&(0!==a.tradeCount||a.volume>0)&&r.push({time:1e3*a.time,open:a.open*t,high:a.high*t,low:a.low*t,close:a.close*t,...Number.isFinite(a.volume)?{volume:a.volume}:{}});return r.sort((e,t)=>
1e.time-t.time)},k=e=>{let t=null;return e.map(e=>{let r=null!=t?t:e.open;return t=e.close,{...e,open:r,high:Math.max(e.high,r),low:Math.min(e.low,r)}})},j=e=>Number.isFinite(e)&&e>=1e3?1:100,_=e=>{let{tokenAddress:t,poolKey:r,symbol:a,priceMultiplier:l,marketCap:n,onLastClose:s,liveSource:o="nats"}=e,u=new Map,v=new Map,_=(null==a?void 0:a.trim())?a.toUpperCase():"TOKEN",C=Number.isFinite(l)&&l>0?l:1,S=async function(e,a,l){var n;let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=y(e),u=w(a,l,o,null!=(n=h[e])?n:3600);if(!u)return[];let d=r?await (0,i.HJ)(r,o,u.from,u.to):await (0,i.Mb)(t,o,u.from,u.to,s);d.error&&!f.has(t)&&(f.add(t),(0,p.F)({reason:d.error,tokenAddress:t,network:"solana"}));let c="price"===d.valueType?C:1;return k(N(d.candles,c))};return{onReady:e=>{setTimeout(()=>e({supported_resolutions:x,supports_marks:!1,supports_timescale_marks:!1,supports_time:!0}),0)},searchSymbols:(e,t,r,a)=>a([]),resolveSymbol:(e,t)=>{let r={name:_,description:"".concat(_," Market Cap (USD)"),ticker:_,type:"crypto",session:"24x7",exchange:"Bags",listed_exchange:"Bags",timezone:"Etc/UTC",format:"volume",pricescale:j(null!=n?n:0),minmov:1,has_empty_bars:!1,has_intraday:!0,has_seconds:!0,seconds_multipliers:["1"],has_weekly_and_monthly:!1,supported_resolutions:x,volume_precision:2,data_status:"streaming"};setTimeout(()=>t(r),0)},getBars:async(e,t,r,a,l)=>{try{let e=await S(t,r.from,r.to,r.countBack),l=e.at(-1);if(l){let e=v.get(t);(!e||l.time>=e.time)&&v.set(t,l)}a(e,{noData:0===e.length}),r.firstDataRequest&&l&&(null==s||s(l.close))}catch(e){l("Chart data temporarily unavailable")}},subscribeBars:(e,a,l,n)=>{var i,p,x;let f=null!=(i=h[a])?i:3600,y=(0,b.F)(512),w=!1,N=null!=(p=v.get(a))?p:null,k=null!=(x=null==N?void 0:N.time)?x:0,j=null,_=null,T=!1,A=null,P=e=>{w||e.time<k||(k=e.time,l(e),null==s||s(e.close))},E=(e,t)=>{let r=e*C;if(!Number.isFinite(r)||r<=0)return;let a=Math.floor(t/1e3/f)*f*1e3;if(!(a<k)){if(!N||a>N.time){let e=N?N.close:r;N={time:a,open:e,high:Math.max(e,r),low:Math.min(e,r),close:r}}else N={...N,high:Math.max(N.high,r),low:Math.min(N.low,r),close:r};P(N)}},F=async()=>{let e=Math.floor(Date.now()/1e3);try{let t=await S(a,e-3*f,e);if(w)return;for(let e of t){if(e.time<k)continue;let t=e;if(N){let r=e.time===N.time?N.open:e.time>N.time?N.close:null;null!=r&&(t={...e,open:r,high:Math.max(e.high,r),low:Math.min(e.low,r)})}(!N||t.time>=N.time)&&(N=t),P(t)}}catch(e){}},D=()=>{w||(A=setTimeout(async()=>{await F(),D()},"poll"===o||r||!(0,d.iD)()?5e3:15e3))};if(F(),D(),"poll"===o)return void u.set(n,()=>{w=!0,A&&clearTimeout(A),A=null});(async()=>{T=!0;try{let e=await (0,c.XC)({mints:[t]});if(w){T&&(T=!1,(0,c._r)());return}j=e;let r=await (0,c.ig)(j,(0,g.oF)(t),e=>{let r=(0,m.bl)(e);if(!r)return;let a=(0,m.K1)(r,t);y.seen(a.orderKey)||E(a.priceUsd,a.ts)});if(w)return void r.unsubscribe();_=r}catch(e){T&&(T=!1,(0,c._r)())}})(),u.set(n,()=>{w=!0,A&&clearTimeout(A),A=null,_&&(_.unsubscribe(),_=null),T&&(T=!1,(0,c._r)())})},unsubscribeBars:e=>{var t;null==(t=u.get(e))||t(),u.delete(e)}}};var C=r(59434),S=r(69821),T=r(35932),A=r(6863);let P=e=>{var t;if(!e)return 0;if(Number.isFinite(e.totalSupply)&&e.totalSupply>0)return e.totalSupply;let r=null!=(t=e.fdv)?t:e.mcap;return Number.isFinite(r)&&r>0&&Number.isFinite(e.usdPrice)&&e.usdPrice>0?r/e.usdPrice:0},E=e=>{var t;if(!e)return 0;let r=null!=(t=e.fdv)?t:e.mcap;return Number.isFinite(r)&&r>0?r:0};function F(e){let{tokenAddress:t,poolKey:r,className:i,onMarketCapChange:d,liveSource:c="nats",surface:m}=e,{data:b,isError:g,isPending:x}=(0,s.Xe)(t),[f,h]=(0,n.fp)(S.rG),v=(0,u.QH)(f,u.Pq),y=P(b)||1e9*!!r,w=E(b),N=null==b?void 0:b.symbol,[k,j]=(0,l.useState)({multiplier:0,marketCap:0}),F=(0,l.useRef)(t);(0,l.useEffect)(()=>{let e=F.current!==t;if(F.current=t,y<=0)return void j({multiplier:0,marketCap:0});j(t=>!e&&t.multiplier>0&&Math.abs(y-t.multiplier)/t.multiplier<=.005?t:{multiplier:y,marketCap:w})},[t,y,w]);let D=(0,l.useRef)(d);D.current=d;let U=g&&y<=0,R=(0,l.useRef)(null);(0,l.useEffect)(()=>{U&&R.current!==t&&(R.current=t,(0,p.F)({reason:"network_error",tokenAddress:t,network:"solana",...m?{surface:m}:{}}))},[U,t,m]);let q=(0,l.useMemo)(()=>null==c?null:_({tokenAddress:t,poolKey:r,symbol:N,priceMultiplier:k.multiplier,marketCap:k.marketCap,onLastClose:e=>{var t;return null==(t=D.current)?void 0:t.call(D,e)},liveSource:c}),[t,r,N,k.multiplier,k.marketCap,c]);return null==c?(0,a.jsx)("div",{className:"w-full","data-testid":"solana-candle-chart",children:(0,a.jsx)("div",{className:(0,C.cn)("bg-bags-background flex h-[360
1px] w-full animate-pulse items-center justify-center rounded-2xl",i),children:(0,a.jsx)("span",{className:"text-bags-foreground/30 text-sm",children:"Loading chart…"})})}):k.multiplier<=0?g&&y<=0?(0,a.jsx)("div",{className:"w-full","data-testid":"solana-candle-chart",children:(0,a.jsx)("div",{className:(0,C.cn)("border-bags-border bg-bags-background flex h-[360px] w-full items-center justify-center rounded-2xl border border-dashed",i),children:(0,a.jsx)("span",{className:"text-bags-foreground/40 text-sm",children:"Chart temporarily unavailable"})})}):x||y>0?(0,a.jsx)("div",{className:"w-full","data-testid":"solana-candle-chart",children:(0,a.jsx)("div",{className:(0,C.cn)("bg-bags-background flex h-[360px] w-full animate-pulse items-center justify-center rounded-2xl",i),children:(0,a.jsx)("span",{className:"text-bags-foreground/30 text-sm",children:"Loading chart…"})})}):(0,a.jsx)("div",{className:"w-full","data-testid":"solana-candle-chart",children:(0,a.jsx)("div",{className:(0,C.cn)("border-bags-border bg-bags-background flex h-[360px] w-full items-center justify-center rounded-2xl border border-dashed",i),children:(0,a.jsx)("span",{className:"text-bags-foreground/30 text-sm",children:"No data available"})})}):q?(0,a.jsxs)("div",{className:"w-full","data-testid":"solana-candle-chart",children:[(0,a.jsx)(o.A,{tokenAddress:t,datafeed:q,interval:v,showVolume:!0,className:(0,C.cn)("h-[360px] w-full",i),network:"solana",surface:m}),(0,a.jsx)("div",{className:"mt-3 flex gap-x-1","aria-label":"Chart interval",children:u.xE.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>{h(e.value),e.value!==v&&(0,T.sx)(A.qY.CHART_TIMEFRAME_CHANGED,{tokenAddress:t,network:"solana",resolution:e.value,...m?{surface:m}:{}})},className:(0,C.cn)("min-h-10 flex-1 cursor-pointer rounded-md py-1 text-xs font-semibold transition-colors",v===e.value?"bg-bags-foreground/10 text-bags-foreground":"text-bags-foreground/40 hover:text-bags-foreground/60"),"aria-pressed":v===e.value,children:e.label},e.value))})]}):(0,a.jsx)("div",{className:"w-full","data-testid":"solana-candle-chart",children:(0,a.jsx)("div",{className:(0,C.cn)("bg-bags-background flex h-[360px] w-full animate-pulse items-center justify-center rounded-2xl",i),children:(0,a.jsx)("span",{className:"text-bags-foreground/30 text-sm",children:"Loading chart…"})})})}},69821:(e,t,r)=>{r.d(t,{RR:()=>s,rG:()=>i});var a=r(3005),l=r(95179),n=r(63182);let s=(0,l.tG)("chartInterval",n.r8,void 0,{getOnInit:!0}),o=(0,l.tG)("solanaChartInterval",void 0,void 0,{getOnInit:!0}),i=(0,a.eU)(e=>{let t=e(o);if(null!=t)return t;let r=e(s);return n.Pq.includes(r)?r:n.r8},(e,t,r)=>t(o,r));(0,l.tG)("chartPriceFormat","mc",void 0,{getOnInit:!0})},74133:(e,t,r)=>{r.d(t,{default:()=>b});var a=r(95155),l=r(12115),n=r(13353),s=r(56376),o=r(59434),i=r(36388),u=r(50696),d=r(35932),c=r(6863);let m=[u.bq.AUTO,u.bq.JUPITER,u.bq.TITAN],b=function(){let[e,t]=(0,n.fp)(i.Kp),r=(0,l.useCallback)(r=>{t(r),r!==e&&(0,d.sx)(c.qY.SWAP_SETTING_CHANGED,{setting:"swap_provider",swapProvider:r})},[e,t]);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-y-2",children:[(0,a.jsx)("span",{className:"text-bags-foreground/40 text-[11px] font-bold tracking-wider uppercase",children:"Swap provider"}),(0,a.jsx)("div",{className:"border-bags-border grid grid-cols-3 gap-1 rounded-xl border p-1",children:m.map(t=>(0,a.jsx)("button",{type:"button",onClick:()=>r(t),"aria-pressed":e===t,className:(0,o.cn)("cursor-pointer rounded-lg py-2 text-sm font-semibold transition-colors",e===t?"bg-bags-foreground/15 text-bags-foreground":"text-bags-foreground/50 hover:text-bags-foreground"),children:s.v[t]},t))})]})}},76033:(e,t,r)=>{r.d(t,{A:()=>k});var a=r(95155),l=r(12115),n=r(51362),s=r(68466),o=r(63182),i=r(59434),u=r(35932),d=r(50950),c=r(6863);let m="tradingview-charting-library",b="charting_library.standalone.js",g="/charting_library/".concat(b),p=function(e){if(!e)return g;let t=e.replace(/\/+$/,"");return t.endsWith(".js")?t:"".concat(t,"/").concat(b)}(o.Je),x=p.slice(0,p.lastIndexOf("/")+1),f={dark:{background:"#000000",grid:"rgba(255, 255, 255, 0.08)",text:"rgba(255, 255, 255, 0.55)",crosshair:"rgba(255, 255, 255, 0.45)"},light:{background:"#f5f5ee",grid:"rgba(13, 13, 15, 0.05)",text:"rgba(13, 13, 15, 0.4)",crosshair:"rgba(13, 13, 15, 0.35)"}},h="#00ff00",v="#eb4d5c";function y(e){return{"paneProperties.background":e.background,"paneProperties.backgroundType":"solid","paneProperties.backgroundGradientStartColor":e.background,"paneProperties.backgroundGradientEndColor":e.background,"paneProperties.vertGridProperties.color":e.grid,"paneProperties.horzGridProperties.color":e.grid,"paneProperties.crossHairProperties.color":e.crosshair,"paneProperties.legendProperties.showLegend":!1,"paneProperties.legendProperties.showSeriesTitle":!1,"paneProperties.legendProperties.showSeriesOHLC":!1,"paneProperties.legendProperties.showVolume":!1,"paneProperties.legendProperties.showStudyTitles":!1,"paneProperties.legendProperties.showStudyValues":!1,"scalesProperties.textColor":e.text,"scalesProperties.lineColor":e.grid,"scalesProperties.showStudyLastValue":!1,"mainSeriesProperties.candleStyle.upColor":h,"mainSeriesProperties.candleStyle.downColor":v,"mainSeriesProperties.candleStyle.borderUpColor":h,"mainSeriesProperties.candleStyle.borderDownColor":v,"mainSeriesProperties.candleStyle.wickUpColor":h,"mainSeriesProperties.candleStyle.wickDownColor":v,"mainSeriesProperties.priceLineColor":h}}let w=null;function N(){var e;return(null==(e=window.TradingView)?void 0:e.widget)?Promise.resolve():w||(w=new Promise((e,t)=>
1{let r=document.getElementById(m);if(r){r.addEventListener("load",()=>e()),r.addEventListener("error",()=>t(Error("Failed to load TradingView library")));return}let a=document.createElement("script");a.id=m,a.src=p,a.async=!0,a.onload=()=>e(),a.onerror=()=>{w=null,a.remove(),t(Error("Failed to load TradingView library"))},document.head.appendChild(a)}))}function k(e){let{tokenAddress:t,datafeed:r,interval:o,className:m,showVolume:b=!1,surface:g,network:p}=e,w=(0,l.useRef)(null),k=(0,l.useRef)(null),{resolvedTheme:j}=(0,n.D)(),[_,C]=(0,l.useState)(!1),[S,T]=(0,l.useState)(!1),[A,P]=(0,l.useState)(!1),E=(0,l.useRef)(!1),F=(0,l.useRef)(o);F.current=o;let D=(0,l.useRef)(g);D.current=g;let U=(0,l.useRef)(p);U.current=p;let R=(0,l.useRef)(null),q=(0,l.useRef)(null);return((0,l.useEffect)(()=>{let e=!1;C(!1),T(!1),E.current=!1,P(!1),q.current!==t&&(q.current=t,(0,u.sx)(c.qY.CHART_VIEWED,{resolution:F.current,...U.current?{network:U.current}:{},...D.current?{surface:D.current}:{},tokenAddress:t}));let a=()=>{R.current!==t&&(R.current=t,(0,d.F)({reason:"network_error",tokenAddress:t,...U.current?{network:U.current}:{},...D.current?{surface:D.current}:{}}))},l=()=>{e||E.current||(E.current=!0,P(!0))},n={...r,getBars:(t,n,s,o,i)=>{r.getBars(t,n,s,(t,r)=>{e||(l(),o(t,r))},t=>{e||(l(),a(),i(t))})}},o="light"===j?f.light:f.dark;return N().then(()=>{var r,a;if(e||!w.current||!(null==(r=window.TradingView)?void 0:r.widget))return;let l=["header_widget","left_toolbar","timeframes_toolbar","symbol_search_hot_key","display_market_status","popup_hints","context_menus","main_series_scale_menu","legend_widget"];b||l.push("create_volume_indicator_by_default");let i=new window.TradingView.widget({container:w.current,datafeed:n,symbol:t,interval:F.current,library_path:x,locale:"en",autosize:!0,theme:"light"===j?"light":"dark",timezone:"Etc/UTC",disabled_features:l,enabled_features:["hide_left_toolbar_by_default"],overrides:y(o),...b?{studies_overrides:{"volume.volume.color.0":v,"volume.volume.color.1":h}}:{},loading_screen:{backgroundColor:(a=o.background,"undefined"==typeof document?a:getComputedStyle(document.documentElement).getPropertyValue("--bags-background").trim()||a),foregroundColor:o.text},custom_formatters:{priceFormatterFactory:()=>({format:e=>{let t=1e-13>Math.abs(e)?0:Number(e.toFixed(12));return"$".concat((0,s.Z)(t,{decimals:2,abbreviated:!0,allowInteger:!0,allowNegative:!0,trimTrailingZeros:!1}))}})}});i.onChartReady(()=>{if(!e){try{i.applyOverrides(y(o))}catch(e){}if(!b)try{for(let e of i.activeChart().getAllStudies())/volume/i.test(e.name)&&i.activeChart().removeEntity(e.id)}catch(e){}T(!0)}}),k.current=i}).catch(()=>{e||(a(),C(!0))}),()=>{if(e=!0,T(!1),E.current=!1,P(!1),k.current){try{k.current.remove()}catch(e){}k.current=null}}},[t,r,j,b]),(0,l.useEffect)(()=>{if(S&&k.current)try{k.current.activeChart().setResolution(o)}catch(e){}},[o,S]),_)?(0,a.jsx)("div",{className:(0,i.cn)("border-bags-border text-bags-foreground/50 flex items-center justify-center rounded-2xl border-2 text-sm",m),children:"Chart unavailable"}):(0,a.jsxs)("div",{className:(0,i.cn)("relative w-full overflow-hidden rounded-2xl",m),children:[(0,a.jsx)("div",{ref:w,className:"absolute inset-0"}),!S&&(0,a.jsx)("div",{className:"bg-bags-background absolute inset-0 flex animate-pulse items-center justify-center rounded-2xl",children:(0,a.jsx)("span",{className:"text-bags-foreground/30 text-sm",children:"Loading chart…"})})]})}N().catch(()=>{})},78639:(e,t,r)=>{r.d(t,{default:()=>d});var a=r(95155),l=r(12115),n=r(12136),s=r(31014),o=r(35932),i=r(6863);let u=/^\d*\.?\d{0,4}$/,d=function(){let{inputQuickBuyAmount:e,setQuickBuyAmount:t,defaultQuickBuyAmount:r}=(0,s.R)(),d=(0,l.useRef)(""),c=(0,l.useCallback)(e=>{let r=e.target.value;(""===r||u.test(r))&&t(r)},[t]),m=(0,l.useCallback)(()=>{d.current=null!=e?e:""},[e]),b=(0,l.useCallback)(()=>{let t=null!=e?e:"";if(t===d.current)return;let r=Number(t);""!==t&&Number.isFinite(r)&&!(r<0)&&(0,o.sx)(i.qY.SWAP_SETTING_CHANGED,{setting:"quick_buy_amount",quickBuyAmount:r})},[e]);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-y-2",children:[(0,a.jsx)("span",{className:"text-bags-foreground
1/40 text-[11px] font-bold tracking-wider uppercase",children:"Quick Buy Amount"}),(0,a.jsxs)("div",{className:"border-bags-border bg-bags-foreground/[0.03] flex items-center gap-x-2 rounded-xl border px-3 py-2.5",children:[(0,a.jsx)("input",{type:"text",inputMode:"decimal",value:null!=e?e:"",onChange:c,onFocus:m,onBlur:b,placeholder:r,"aria-label":"Quick buy amount in SOL",className:"text-bags-foreground placeholder:text-bags-foreground/25 min-w-0 flex-1 bg-transparent text-sm font-semibold tabular-nums outline-none"}),(0,a.jsxs)("span",{className:"text-bags-foreground/60 flex shrink-0 items-center gap-x-1.5 text-sm font-bold",children:[(0,a.jsx)(n.A,{width:16,height:16}),"SOL"]})]})]})}},81335:(e,t,r)=>{r.d(t,{t:()=>d});var a=r(12115),l=r(13353),n=r(31973),s=r(96548),o=r(96543),i=r(6757);let u=()=>(0,i.P7)();function d(e){let{action:t,onSuccess:r,isMfaSetupRequired:i=!1,enabled:d=!0}=e,c=(0,l.Xr)(n.IW),m=(0,a.useRef)(t),b=(0,a.useRef)(r);return m.current=t,b.current=r,{execute:(0,a.useCallback)(async()=>{let e=async()=>{var e;let t=await m.current();return null==(e=b.current)||e.call(b,t),t};if(!d)return e();try{let t=await s.q.fetchQuery({queryKey:o.z.mfaStatus(),queryFn:u,staleTime:12e4});if((null==t?void 0:t.status)==="verified")return e()}catch(t){return e()}return c({open:!0,onSuccess:()=>e(),isMfaSetupRequired:i}),{success:!1}},[d,c,i])}}},93331:(e,t,r)=>{function a(e){return"number"==typeof e&&Number.isFinite(e)&&e>0?e:null}function l(e,t){var r,l;return null!=(l=null!=(r=a(e))?r:a(t))?l:0}function n(e,t,r){var l,n,s,o,i,u;if(!e||!t)return null;let d=a(e.current_price);if(null===d)return null;if((null==(l=e.token_x)?void 0:l.address)===t){let t=null!=(o=a(null==(s=e.token_y)?void 0:s.price))?o:a(r);return null===t?null:a(d*t)}if((null==(n=e.token_y)?void 0:n.address)===t){let t=null!=(u=a(null==(i=e.token_x)?void 0:i.price))?u:a(r);return null===t?null:a(t/d)}return null}function s(e,t,r,n){var s;return e?null!=(s=a(n))?s:l(t,r):l(null,r)}r.d(t,{$y:()=>n,V7:()=>l,sv:()=>s})},96543:(e,t,r)=>{r.d(t,{z:()=>a}),r(6757),r(31973);let a={all:["auth"],mfaStatus:()=>[...a.all,"mfa-status"]}}}]);

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.