PageSourceSearch

https://pelagos-sui.vercel.app/_next/static/chunks/0smitkhyrb3eg.js

js pelagos-sui.vercel.app collected 2026-10-03 07:28:58 UTC 80,290 bytes, 139 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52139,e=>{"use strict";var t=e.i(43476),r=e.i(37902),a=e.i(71645),i=e.i(41510),o=e.i(22404),d=e.i(52412),l=e.i(63039),n=e.i(79273),s=e.i(3410),c=e.i(18592);let C=(e,t)=>"count"===e?(Math.round(100*t)/100).toString():t>=1e3?`$${Math.round(t).toLocaleString()}`:`$${t.toFixed(2*(t<10))}`;function u(e,t,r){let a=Math.max(r,1e-9),i=(e-t)/a;return Math.exp(-.5*i*i)/(a*Math.sqrt(2*Math.PI))}function x({quote:e}){let r=e.x,a=r.length;if(a<2)return null;let i=r[0],d=r[a-1],l=e=>30+(e-i)/(d-i||1)*700,n=Math.max(...e.market_pdf,...e.target_pdf,1e-12),s=e=>186-e/n*150,u=r.map((t,r)=>[l(t),s(e.market_pdf[r])]),h=r.map((t,r)=>[l(t),s(e.target_pdf[r])]),m=`${(0,c.monotonePath)(h)} L ${l(d)} 186 L ${l(i)} 186 Z`,g=Math.max(...e.trade_curve.map(e=>Math.abs(e)),1e-9),p=Math.max(1.2,700/a-.6),b=[{v:i,anchor:"start"},{v:e.market_mu,anchor:"middle"},{v:e.target_mu,anchor:"middle"},{v:d,anchor:"end"}];b.sort((e,t)=>e.v-t.v);let f=[],y=[-1/0,-1/0];for(let t=0;t<b.length;t++){let r=b[t];if(t>0&&3>Math.abs(l(r.v)-l(b[t-1].v)))continue;let a=C(e.unit,r.v),i=5.6*a.length/2,o=l(r.v),d=o-i,n=o+i,s=0;d<y[0]+6&&(s=d<y[1]+6?0:1),y[s]=n,f.push({...r,row:s,label:a})}return(0,t.jsxs)("div",{children:[(0,t.jsxs)("svg",{viewBox:"0 0 760 210",width:"100%",style:{display:"block"},children:[(0,t.jsx)("line",{x1:l(e.market_mu),x2:l(e.market_mu),y1:22,y2:186,stroke:o.C.textMuted,strokeWidth:"1",strokeDasharray:"3 3",opacity:.5}),(0,t.jsx)("line",{x1:l(e.target_mu),x2:l(e.target_mu),y1:22,y2:186,stroke:o.C.tealLight,strokeWidth:"1",strokeDasharray:"3 3",opacity:.6}),(0,t.jsx)("path",{d:m,fill:o.C.tealLight,opacity:.12}),(0,t.jsx)("path",{d:(0,c.monotonePath)(h),fill:"none",stroke:o.C.tealLight,strokeWidth:"2"}),(0,t.jsx)("path",{d:(0,c.monotonePath)(u),fill:"none",stroke:o.C.textSecondary,strokeWidth:"1.5",strokeDasharray:"5 4",opacity:.85}),f.map((e,r)=>(0,t.jsx)("text",{x:l(e.v),y:197+11*e.row,fill:o.C.textMuted,fontFamily:o.FM,fontSize:"9.5",textAnchor:e.anchor,children:e.label},r))]}),(0,t.jsxs)("div",{style:{display:"flex",gap:16,margin:"2px 0 10px",fontFamily:o.FM,fontSize:10.5},children:[(0,t.jsx)("span",{style:{color:o.C.textSecondary},children:"— — market f(x)"}),(0,t.jsx)("span",{style:{color:o.C.tealLight},children:"—— your view g(x)"})]}),(0,t.jsx)("div",{style:{fontFamily:o.FM,fontSize:10,letterSpacing:"0.12em",color:o.C.textMuted,textTransform:"uppercase",marginBottom:4},children:"Your payoff at settlement · g(x) − f(x)"}),(0,t.jsxs)("svg",{viewBox:"0 0 760 96",width:"100%",style:{display:"block"},children:[(0,t.jsx)("line",{x1:30,x2:730,y1:48,y2:48,stroke:o.C.border,strokeWidth:"1"}),r.map((r,a)=>{let i=e.trade_curve[a],d=48-i/g*38;return(0,t.jsx)("rect",{x:l(r)-p/2,y:Math.min(48,d),width:p,height:Math.abs(48-d),fill:i>=0?o.C.green:o.C.red,opacity:.75},a)})]})]})}var h=e.i(51817),m=e.i(78655),g=e.i(76942),p=e.i(38983),b=e.i(37816);let f=e=>e>=1e9?`$${(e/1e9).toFixed(1)}B`:e>=1e6?`$${(e/1e6).toFixed(1)}M`:e>=1e3?`$${(e/1e3).toFixed(0)}K`:`$${Math.round(e)}`;function y(e){if(!Number.isFinite(e)||e<=0)return 0n;let[t,r=""]=e.toFixed(6).split(".");return 1000000n*BigInt(t)+BigInt(r.padEnd(6,"0").slice(0,6))}function F(e){return Number(e)/Number(1000000n)}function M(e,t){let r="bigint"==typeof e?e:BigInt(e),a=r<0n,i=a?-r:r,o=(i%1000000n).toString().padStart(6,"0").replace(/0+$/,"").padEnd(2,"0");return`${a?"-":""}$${(i/1000000n).toLocaleString()}.${o}${t?` ${t}`:""}`}function v(e){return BigInt(e?.managers[0]?.idle_raw??"0")}function S(e,t,r,a){if("mUSDC"===e)return{positionCostRaw:t,executionHeadroomRaw:0n,managerAppliedRaw:0n,walletAuthorizationRaw:t};let i=r>t?r:t,o=a<i?a:i;return{positionCostRaw:t,executionHeadroomRaw:i-t,managerAppliedRaw:o,walletAuthorizationRaw:i-o}}function L({currency:e,breakdown:r,ready:a,compact:i=!1}){if(!a)return(0,t.jsx)("div",{style:{borderTop:`1px solid ${o.C.border}`,paddingTop:12,fontFamily:o.FM,fontSize:11,color:o.C.textMuted},children:"Loading current manager collateral before calculating wallet authorization…"});let d="dUSDC"===e?[["Live exact position cost",r.positionCostRaw,o.C.textPrimary],["Execution headroom",r.executionHeadroomRaw,o.C.amber],["Existing manager collateral applied",r.managerAppliedRaw,o.C.green],["Max new wallet authorization",r.walletAuthorizationRaw,o.C.tealLight]]:[["Live exact position cost",r.positionCostRaw,o.C.textPrimary],["Exact wallet debit",r.walletAuthorizationRaw,o.C.tealLight]];return(0,t.jsxs)("div",{style:{borderTop:`1px solid ${o.C.border}`,borderBottom:`1px solid ${o.C.border}`,padding:"12px 0",display:"grid",gap:10},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},children:[(0,t.jsx)("span",{style:{fontFamily:o.FM,fontSize:10,letterSpacing:"0.1em",textTransform:"uppercase",color:o.C.textMuted},children:"Funding reconciliation"}
1),(0,t.jsx)("span",{style:{fontFamily:o.FM,fontSize:10,color:o.C.green},children:"current exact quote"})]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:`repeat(${i&&d.length>2?2:d.length}, minmax(0, 1fr))`,gap:14},children:d.map(([r,a,i])=>(0,t.jsxs)("div",{style:{minWidth:0},children:[(0,t.jsx)("div",{style:{fontFamily:o.FM,fontSize:9.5,lineHeight:1.35,color:o.C.textMuted},children:r}),(0,t.jsx)("div",{style:{marginTop:4,fontFamily:o.FD,fontSize:14,fontWeight:600,color:i,overflowWrap:"anywhere"},children:M(a,e)})]},r))}),"dUSDC"===e?(0,t.jsxs)("div",{style:{fontFamily:o.FM,fontSize:10.5,lineHeight:1.55,color:o.C.textSecondary},children:[(0,t.jsx)("strong",{style:{color:o.C.textPrimary},children:M(r.positionCostRaw)})," + ",(0,t.jsx)("strong",{style:{color:o.C.amber},children:M(r.executionHeadroomRaw)})," - ",(0,t.jsx)("strong",{style:{color:o.C.green},children:M(r.managerAppliedRaw)})," = ",(0,t.jsxs)("strong",{style:{color:o.C.tealLight},children:[M(r.walletAuthorizationRaw)," max new wallet authorization"]}),(0,t.jsx)("span",{style:{color:o.C.textMuted},children:" · Cost + execution headroom - dUSDC already held by your manager."})]}):(0,t.jsxs)("div",{style:{fontFamily:o.FM,fontSize:10.5,lineHeight:1.55,color:o.C.textSecondary},children:[(0,t.jsx)("strong",{style:{color:o.C.textPrimary},children:M(r.positionCostRaw)})," = ",(0,t.jsxs)("strong",{style:{color:o.C.tealLight},children:[M(r.walletAuthorizationRaw)," exact wallet debit"]}),(0,t.jsx)("span",{style:{color:o.C.textMuted},children:" · mUSDC uses no manager collateral and no execution headroom."})]})]})}let E=e=>Number.isFinite(e)?e<=0?"0.00":e>=1e3?e.toLocaleString(void 0,{maximumFractionDigits:0}):e.toFixed(2):"—",w=e=>Math.round(e).toLocaleString(),D=e=>Number.isFinite(e)&&e>0?`${(100*e).toFixed(0)}%`:"—",j=e=>Number.isFinite(e)?e.toFixed(2):"—",$=e=>`$${Math.round(e).toLocaleString()}`;function k(){let e=(0,s.useWalletSigner)(),n=(0,s.useDusdcBalance)(),c=(0,s.useUsdcBalance)(),[C,u]=(0,a.useState)(null),[x,h]=(0,a.useState)(null),[f,F]=(0,a.useState)(0),[k,B]=(0,a.useState)(null),[I,T]=(0,a.useState)("1"),[q,R]=(0,a.useState)("dUSDC"),[U,O]=(0,a.useState)(!1),[W,V]=(0,a.useState)(null),[Y,K]=(0,a.useState)(null),[G,Z]=(0,a.useState)(null),[J,Q]=(0,a.useState)(null),[X,ee]=(0,a.useState)(null),[et,er]=(0,a.useState)(!1),[ea,ei]=(0,a.useState)(null),[eo,ed]=(0,a.useState)(null),[el,en]=(0,a.useState)(null),[es,ec]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=!0,t=()=>(0,b.fetchOptionsChain)("BTC").then(t=>{e&&(u(t),h(null))}).catch(t=>{e&&h(t instanceof Error?t.message:String(t))});t();let r=window.setInterval(t,3e3);return()=>{e=!1,window.clearInterval(r)}},[]),(0,a.useEffect)(()=>{let t=!0;return e.address?(ed(null),(0,b.fetchYieldAccount)(e.address).then(e=>{t&&ed(e)}).catch(()=>{t&&ed(null)}),()=>{t=!1}):(ed(null),()=>{t=!1})},[e.address,Y]),(0,a.useEffect)(()=>{C&&f>C.expiries.length-1&&F(Math.max(0,Math.min(C.expiries.length-1,Math.floor(.35*C.expiries.length))))},[C,f]);let eC=(0,a.useRef)(!1);(0,a.useEffect)(()=>{!C||eC.current||(eC.current=!0,F(Math.max(0,Math.min(C.expiries.length-1,Math.floor(.35*C.expiries.length)))))},[C]);let eu=C?C.expiries[Math.min(f,C.expiries.length-1)]??null:null,ex=C?.spot??0,eh=(0,a.useMemo)(()=>{if(!eu)return -1;let e=-1,t=1/0;return eu.strikes.forEach((r,a)=>{let i=Math.abs(r.moneyness-1);i<t&&(t=i,e=a)}),e},[eu]),em=(0,a.useMemo)(()=>{if(!k||!C)return null;let e=C.expiries[k.expiryIdx];return e?.strikes[k.strikeIdx]??null},[k,C]),eg=em?em[k.side]:null,ep=k&&C?C.expiries[k.expiryIdx]:null,eb=eg?.lower_strike,ef=eg?.higher_strike,ey=ep?.oracle_id,eF=ep?.expiry;(0,a.useEffect)(()=>{if(!ey||!eF||!eb||!ef||!eg?.tradeable)return void Q(null);let e=!0;return Q(null),(0,b.fetchBandDepth)({oracle_id:ey,expiry:eF,lower:eb,higher:ef}).then(t=>{e&&Q(t)}).catch(()=>{e&&Q(null)}),()=>{e=!1}},[q,ey,eF,eb,ef,eg?.tradeable]);let eM=(0,a.useCallback)((e,t)=>{let r=C?.expiries[f]?.strikes[e]?.[t];r&&r.tradeable&&(B({expiryIdx:f,strikeIdx:e,side:t}),K(null),Z(null),en(null))},[f,C]),ev=(0,a.useCallback)(e=>{F(e),B(t=>t?{...t,expiryIdx:e}:t),K(null),Z(null),en(null)},[]),eS=eg?eg.mid:0,eL=!!eg&&eg.tradeable&&eS>.005,eE=Number(I),ew=Number.isSafeInteger(eE)&&eE>0?eE:0,eD=1000000n*BigInt(ew);(0,a.useEffect)(()=>
1{if(!ey||!eF||!eb||!ef||ew<1)return;let e=window.setInterval(()=>ec(e=>e+1),15e3);return()=>window.clearInterval(e)},[ew,eF,ef,eb,ey]),(0,a.useEffect)(()=>{if(!ey||!eF||!eb||!ef||!eg?.tradeable||ew<1){ee(null),er(!1),ei(null);return}let t=!0;ee(null),en(null),er(!0),ei(null);let r=window.setTimeout(()=>{(0,b.quoteOptionOrder)({oracle_id:ey,expiry:eF,lower:eb,higher:ef,contracts:ew,currency:q,sender:e.address??void 0}).then(e=>{t&&ee(e)}).catch(e=>{t&&ei(e instanceof Error?e.message:String(e))}).finally(()=>{t&&er(!1)})},160);return()=>{t=!1,window.clearTimeout(r)}},[q,ew,es,eF,ef,eb,ey,eg?.tradeable,e.address]);let ej=!!X&&X.contracts===ew&&X.oracle_id===ey&&X.expiry===String(eF)&&X.lower===eb&&X.higher===ef&&BigInt(X.quantity_raw)===eD&&X.expires_at>Date.now(),e$=ej?BigInt(X.mint_cost_raw):0n,ek=ej?BigInt(X.max_payout_raw):0n,eP=ek>e$?ek-e$:0n,eA=J?"dUSDC"===q?J.max_contracts:J.market_depth_contracts:null,eN=null!=eA&&ew>eA,e_=y("mUSDC"===q?c.uiAmount:n.uiAmount),eH="mUSDC"===q||!e.connected||null!==eo,ez=S(q,e$,ej?BigInt(X.funding_ceiling_raw):e$,v(eo)),eB=el??ez,eI=e.connected&&ej&&eH&&e_<eB.walletAuthorizationRaw,eT=ew<1||eN||et||!ej||!eH||!!ea,eq=ew<1?"Enter at least 1 whole contract":eN?`Exceeds ${"dUSDC"===q?"pool":"reference"} depth \xb7 max ${eA.toLocaleString()}`:ea?"Exact option quote unavailable":et||!ej?"Pricing exact order…":eH?`Buy ${ew} ${k?.side??"option"} ${1===ew?"contract":"contracts"} \xb7 ${M(e$)}`:"Loading manager collateral…",eR=eS>=.56?"ITM":eS<=.44?"OTM":"ATM";async function eU(){if(ep&&eg&&em&&eL&&!U){if(!e.address)return void Z("Connect a wallet to open this position.");if(ew<1)return void Z("Enter a whole number of contracts (minimum 1).");if(!ej||!X)return void Z("Exact-size strike quote is still loading.");if(!eH)return void Z("Current manager collateral is still loading.");if(null!=eA&&ew>eA)return void Z(`Order exceeds ${"dUSDC"===q?"pool":"reference-book"} depth — max ${eA.toLocaleString()} contracts for this strike.`);O(!0),Z(null),K(null);try{V("Refreshing exact quote…");let[t,r]=await Promise.all([(0,b.quoteOptionOrder)({oracle_id:ep.oracle_id,expiry:ep.expiry,lower:eg.lower_strike,higher:eg.higher_strike,contracts:ew,currency:q,sender:e.address}),"dUSDC"===q?(0,b.fetchYieldAccount)(e.address):Promise.resolve(null)]);if(t.oracle_id!==ep.oracle_id||t.expiry!==String(ep.expiry)||t.lower!==eg.lower_strike||t.higher!==eg.higher_strike||t.contracts!==ew||BigInt(t.quantity_raw)!==eD||t.expires_at<=Date.now())throw Error("The exact option quote no longer matches this order. Reprice and try again.");ee(t),r&&ed(r);let a=BigInt(t.mint_cost_raw),i=S(q,a,BigInt(t.funding_ceiling_raw),v(r));if(en(i),e_<i.walletAuthorizationRaw)throw Error(`Insufficient ${q} — ${M(i.walletAuthorizationRaw,q)} is the max wallet authorization for this exact-size order.`);if("mUSDC"===q){V("Opening position…");let r=await (0,g.simOpen)({owner:e.address,quote_id:t.quote_id});V("Sign in wallet…");let a=await e.signAndExecute(r.tx_bytes);V("Confirming…"),await (0,g.simConfirm)(r.sim_id,a),K({digest:a}),c.refresh();return}V("Preparing manager…");let o=await (0,p.ensureManager)(e.address,e.signAndExecute);V("Simulating position…");let d=await (0,b.prepareOptionOpen)({owner:e.address,manager_id:o,quote_id:t.quote_id});if(!0!==d.dry_run.ok)throw Error(d.dry_run.error??"Pre-trade simulation did not pass.");let l=BigInt(d.live_cost_raw),s=BigInt(d.funding_ceiling_raw),C=BigInt(d.manager_idle_used_raw),u=BigInt(d.wallet_draw_raw);if(s<l||C+u!==s)throw Error("Prepared dUSDC funding does not reconcile; the transaction was not sent to the wallet.");if(en({positionCostRaw:l,executionHeadroomRaw:s-l,managerAppliedRaw:C,walletAuthorizationRaw:u}),e_<u)throw Error(`Insufficient dUSDC — ${M(u,"dUSDC")} is the prepared max wallet authorization.`);V("Sign in wallet…");let x=await e.signAndExecute(d.tx_bytes);V("Confirming…");let h=await (0,p.confirmPredict)(x);if(!h.ok)throw Error(`On-chain open failed (${h.status}) — check the explorer before retrying.`);K({digest:h.digest}),n.refresh()}catch(e){Z((0,d.friendlyWalletError)(e))}finally{O(!1),V(null)}}}let eO=eu&&eh>=0?eu.strikes[eh].call.iv||eu.strikes[eh].put.iv:0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Header,{}),(0,t.jsx)(i.PageFrame,{wide:!0,children:(0,t.jsxs)("div",{className:"oc",children:[(0,t.jsx)("div",{className:"oc-head",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"oc-eyebrow",children:"BTC · DeepBook Predict"}),(0,t.jsx)("h1",{children:"Distribution Markets"}),(0,t.jsx)("p",{children:"The live BTC options chain — calls and puts across every on-chain expiry. Each contract is a DeepBook Predict range, priced live off the protocol's own liquidity (real bid/ask, whole contracts). Settled on Sui."})]})}),(0,t.jsxs)("div",{className:"oc-bar",children:[(0,t.jsx)(A,{k:"BTC spot",v:C?$(ex):"—",accent:o.C.tealLight,live:!0}),(0,t.jsx)(A,{k:"Forward",v:eu?$(eu.forward):"—",hint:eu?`${eu.tenor_label} expiry`:"—"}),(0,t.jsx)(A,{k:"ATM implied vol",v:eu?D(eO):"—",hint:"at-the-money"}),(0,t.jsx)(A,{k:"Days to expiry",v:eu?eu.days_to_expiry<1?`${(24*eu.days_to_expiry).toFixed(1)}h`:`${eu.days_to_expiry.toFixed(1)}d`:"—",hint:"testnet · ultra-short"}),(0,t.jsx)(A,{k:"Source",v:"DeepBook book",hint:"get_range_trade_amounts · on-chain"})]}),x&&!C&&(0,t.jsxs)("div",{className:"oc-err",children:["DeepBook Predict pricing is temporarily unavailable. ",(0,t.jsx)("span",{children:x})]}),(0,t.jsx)("div",{className:"oc-exps",children:C?(C.expiries??[]).map((e,r)=>{let a=r===f;return(0,t.jsx)("button",{"aria-pressed":a,"aria-label":`Expiry ${e.tenor_label}`,onClick:()=>ev(r),className:`oc-pill${a?" on":""}`,children:e.tenor_label},e.oracle_id)}):Array.from({length:7}).map((e,r)=>
1(0,t.jsx)("span",{className:"oc-pill skel"},r))}),(0,t.jsxs)("div",{className:"oc-grid",children:[(0,t.jsxs)("div",{className:"oc-card oc-chain",children:[(0,t.jsxs)("div",{className:"oc-chain-head",children:[(0,t.jsx)("span",{className:"oc-side-cap oc-call",children:"Calls"}),(0,t.jsx)("span",{className:"oc-strike-cap",children:"Strike"}),(0,t.jsx)("span",{className:"oc-side-cap oc-put",children:"Puts"})]}),(0,t.jsxs)("div",{className:"oc-cols",children:[(0,t.jsxs)("div",{className:"oc-colhead call",children:[(0,t.jsx)("span",{children:"Mid"}),(0,t.jsx)("span",{children:"IV"}),(0,t.jsx)("span",{children:"Δ"})]}),(0,t.jsx)("span",{className:"oc-kcol",children:"K"}),(0,t.jsxs)("div",{className:"oc-colhead put",children:[(0,t.jsx)("span",{children:"Mid"}),(0,t.jsx)("span",{children:"IV"}),(0,t.jsx)("span",{children:"Δ"})]})]}),(0,t.jsx)("div",{className:"oc-rows",children:eu?(eu.strikes??[]).map((e,r)=>{let a=r===eh,i=k?.expiryIdx===f&&k?.strikeIdx===r&&k?.side==="call",o=k?.expiryIdx===f&&k?.strikeIdx===r&&k?.side==="put";return(0,t.jsxs)("div",{className:`oc-row${a?" atm":""}`,children:[(0,t.jsx)(P,{q:e.call,side:"call",strike:e.strike,selected:i,onClick:()=>eM(r,"call")}),(0,t.jsxs)("button",{onClick:()=>{let t=e.moneyness>=1?"call":"put",a=e[t].tradeable?t:e.call.tradeable?"call":e.put.tradeable?"put":null;a&&eM(r,a)},className:`oc-k${a?" atm":""}`,children:[w(e.strike),a&&(0,t.jsx)("i",{children:"ATM"})]}),(0,t.jsx)(P,{q:e.put,side:"put",strike:e.strike,selected:o,onClick:()=>eM(r,"put")})]},e.strike)}):Array.from({length:11}).map((e,r)=>(0,t.jsx)("div",{className:"oc-row skel"},r))}),(0,t.jsx)("div",{className:"oc-chain-foot",children:"Greyed strikes sit outside the protocol's mintable 2–98% band (deep ITM / OTM) — the pool won't underwrite them, so they aren't tradeable. Live strikes price off the DeepBook book; a call and put at the same strike sum to ~$1.00 (the ATM pair is ~$0.50 each — correct for a $1-payout binary)."})]}),(0,t.jsx)("div",{style:{alignSelf:"start"},className:"oc-card oc-ticket",children:em&&eg&&ep?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"oc-tkt-head",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"oc-tkt-cap",children:"Order ticket"}),(0,t.jsxs)("div",{className:"oc-tkt-title",children:[(0,t.jsx)("span",{className:`oc-badge ${k.side}`,children:"call"===k.side?"CALL":"PUT"}),"BTC ",w(em.strike)," · ",ep.tenor_label,(0,t.jsx)("span",{className:`oc-mny ${eR.toLowerCase()}`,children:eR})]})]}),!eL&&(0,t.jsx)("span",{className:"oc-indicative",children:"indicative"})]}),(0,t.jsxs)("div",{className:"oc-quote",children:[(0,t.jsxs)("div",{className:"oc-q-mid",children:[(0,t.jsxs)("span",{children:["Mid · per contract ",(0,t.jsx)("i",{style:{display:"inline-block",marginLeft:5,verticalAlign:"middle"},className:"oc-dot"})]}),(0,t.jsx)("strong",{children:eS>0?`$${E(eS)}`:"$0.00"})]}),(0,t.jsxs)("div",{className:"oc-q-ba",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"Bid"}),(0,t.jsxs)("b",{style:{color:o.C.green},children:["$",E(eg.bid)]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"Ask"}),(0,t.jsxs)("b",{style:{color:o.C.red},children:["$",E(eg.ask)]})]})]})]}),(0,t.jsxs)("div",{className:"oc-greeks",children:[(0,t.jsx)(N,{k:"IV",v:D(eg.iv),accent:o.C.tealLight}),(0,t.jsx)(N,{k:"Δ Delta",v:j(eg.delta)}),(0,t.jsx)(N,{k:"Γ Gamma",v:H(eg.gamma)}),(0,t.jsx)(N,{k:"ν Vega",v:H(eg.vega)}),(0,t.jsx)(N,{k:"Θ Theta",v:Math.abs(eg.theta)>=.98?"—":H(eg.theta)}),(0,t.jsx)(N,{k:"Moneyness",v:`${(100*em.moneyness).toFixed(0)}%`})]}),(0,t.jsxs)("div",{className:"oc-rows-info",children:[(0,t.jsx)(_,{k:"Underlying",v:`BTC \xb7 ${$(ex)}`}),(0,t.jsx)(_,{k:"Forward",v:$(ep.forward)}),(0,t.jsx)(_,{k:"Expiry",v:new Date(ep.expiry).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}),e.connected&&(0,t.jsx)(_,{k:"Wallet balance",v:M(e_,q),color:eI?o.C.amber:void 0}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:8},children:[(0,t.jsx)("span",{style:{fontFamily:o.FM,fontSize:11,color:o.C.textMuted},children:"Settle in"}),(0,t.jsx)(m.CurrencySelect,{value:q,onChange:e=>{R(e),en(null),K(null),Z(null)}})]})]}),eL?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"oc-budget",children:[(0,t.jsxs)("div",{className:"oc-budget-cap",children:[(0,t.jsx)("span",{className:"oc-tkt-cap",children:"Contracts · whole only"}),null!=eA&&(0,t.jsxs)("span",{className:`oc-depth${eN?" over":""}
1`,children:["max ",eA.toLocaleString()," · ","dUSDC"===q?"pool":"reference"," depth"]})]}),(0,t.jsxs)("div",{className:"oc-budget-in",children:[(0,t.jsx)("input",{inputMode:"numeric","aria-label":"Number of contracts",value:I,onChange:e=>{T(e.target.value.match(/^\d*/)?.[0]??""),en(null),K(null),Z(null)},placeholder:"1"}),(0,t.jsx)("span",{children:"× $1 payout"})]})]}),(0,t.jsxs)("div",{className:"oc-rows-info",children:[(0,t.jsx)(_,{k:"Exact sized cost",v:ej?M(e$,q):"Pricing…"}),(0,t.jsx)(_,{k:"Average fill",v:ej?`$${X.average_ask.toFixed(4)} / contract`:"—"}),(0,t.jsx)(_,{k:"Exit bid now",v:ej?M(X.redeem_value_raw,q):"—",color:o.C.green}),(0,t.jsx)(_,{k:"Max gain",v:ej?M(eP,q):"—"}),(0,t.jsx)(_,{k:"Max loss",v:ej?M(e$,q):"—"})]}),(0,t.jsx)(L,{currency:q,breakdown:eB,ready:ej&&eH,compact:!0}),ea&&!eN&&ew>=1&&(0,t.jsx)("div",{role:"alert",className:"oc-err inline",children:ea}),ew<1&&(0,t.jsx)("div",{role:"alert",className:"oc-err inline",children:"Enter at least 1 whole contract."}),eN&&null!=eA&&(0,t.jsxs)("div",{role:"alert",className:"oc-err inline",children:["This order exceeds ","dUSDC"===q?"pool":"reference-book"," depth. Maximum: ",eA.toLocaleString()," contracts."]}),e.connected?(0,t.jsx)("button",{disabled:U||ew<1||eN||eI||et||!ej||!eH||!!ea,"aria-busy":U||et,onClick:eU,style:{opacity:U||ew<1||eN||eI||et||!ej||!eH||ea?.6:1,cursor:U||et?"wait":"pointer"},className:"oc-open",children:U?W??"Submitting…":eI?`Need more ${q} to open`:eq}):(0,t.jsx)(l.ConnectModal,{defaultOpen:!1,trigger:(0,t.jsx)("button",{disabled:eT,"aria-busy":et,className:"oc-open",children:eT?eq:"Connect a wallet to trade"})}),(0,t.jsx)("p",{className:"oc-note",children:ew<1?"Enter a positive whole-contract quantity to request an exact quote.":eN&&null!=eA?`Reduce the order to ${eA.toLocaleString()} contracts or fewer for the selected ${q} rail.`:"mUSDC"===q?`Buys ${ew} whole ${k.side} ${1===ew?"contract":"contracts"}, priced live off DeepBook and settled through the Pelagos mUSDC vault on Sui.`:`Buys ${ew} whole ${k.side} ${1===ew?"contract":"contracts"} as a live on-chain DeepBook Predict range — priced off the book (real bid/ask), settled on Sui testnet.`})]}):(0,t.jsx)("div",{className:"oc-indic-box",children:"This strike is far out-of-the-money this close to expiry, so its premium has collapsed to ~0 — there is nothing to lock. It is shown for reference only. Pick a nearer-the-money strike, or a longer expiry, to trade."}),Y&&(0,t.jsxs)("div",{role:"status","aria-live":"polite",className:"oc-ok",children:["✓ Position opened on testnet ·"," ",(0,t.jsxs)("a",{href:(0,d.suiExplorerTxUrl)(Y.digest),target:"_blank",rel:"noreferrer",children:[Y.digest.slice(0,10),"… ↗"]})]}),G&&(0,t.jsx)("div",{role:"alert",className:"oc-err inline",children:G})]}):(0,t.jsxs)("div",{className:"oc-ticket-empty",children:[(0,t.jsxs)("div",{className:"oc-tkt-head",children:[(0,t.jsx)("div",{className:"oc-tkt-cap",children:"Order ticket"}),(0,t.jsx)("span",{className:"oc-indicative",children:"No contract selected"})]}),(0,t.jsxs)("div",{className:"oc-empty-market",children:[(0,t.jsx)("strong",{children:"Awaiting live contract"}),(0,t.jsx)("span",{children:"No live quote, Greeks or funding terms loaded."})]}),(0,t.jsxs)("div",{className:"oc-rows-info",children:[(0,t.jsx)(_,{k:"Contract payout",v:"$1.00"}),(0,t.jsx)(_,{k:"Settlement",v:"Sui · DeepBook Predict"}),(0,t.jsx)(_,{k:"Available rails",v:"dUSDC / mUSDC"})]})]})})]})]})}),(0,t.jsx)(r.default,{id:z.__hash,children:z})]})}function P({q:e,side:r,strike:a,selected:i,onClick:o}){let d=e.mid,l=`${r} ${w(a)}, mid ${e.mid>.005?E(e.mid):"0.00"}`;return e.tradeable?(0,t.jsxs)("button",{className:`oc-cells ${r}${i?" sel":""}`,"aria-label":l,"aria-pressed":i,onClick:o,children:[(0,t.jsx)("span",{className:"oc-mid",children:E(d)}),(0,t.jsx)("span",{className:"oc-iv",children:D(e.iv)}),(0,t.jsx)("span",{className:"oc-dlt",children:j(e.delta)})]}):(0,t.jsxs)("div",{className:`oc-cells ${r} blackout`,title:"Not tradeable — outside the protocol's mintable 2–98% band",children:[(0,t.jsx)("span",{className:"oc-mid",children:d>.005?E(d):"·"}),(0,t.jsx)("span",{className:"oc-iv",children:D(e.iv)}
1),(0,t.jsx)("span",{className:"oc-dlt",children:"—"})]})}function A({k:e,v:r,hint:a,accent:i,live:o}){return(0,t.jsxs)("div",{className:"oc-cell",children:[(0,t.jsxs)("span",{className:"oc-cell-k",children:[e,o&&(0,t.jsx)("i",{className:"oc-dot"})]}),(0,t.jsx)("strong",{style:i?{color:i}:void 0,children:r}),a&&(0,t.jsx)("span",{className:"oc-cell-h",children:a})]})}function N({k:e,v:r,accent:a}){return(0,t.jsxs)("div",{className:"oc-grk",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)("strong",{style:a?{color:a}:void 0,children:r})]})}function _({k:e,v:r,color:a}){return(0,t.jsxs)("div",{className:"oc-info",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)("b",{style:a?{color:a}:void 0,children:r})]})}function H(e){if(!Number.isFinite(e))return"—";let t=Math.abs(e);return t<5e-8?"0":t>=1?e.toFixed(2):t>=.01?e.toFixed(4):e.toFixed(7).replace(/0+$/,"").replace(/\.$/,"")}let z=`
2  .oc { max-width: 1480px; margin: 0 auto; display: grid; gap: 14px; min-width: 0; }
3  .oc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
4  .oc-eyebrow { font-family: ${o.FM}; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: ${o.C.teal}; }
5  .oc-head h1 { margin: 6px 0 0; font-family: ${o.FD}; font-size: 30px; font-weight: 600; letter-spacing: -0.03em; color: ${o.C.textPrimary}; display: flex; align-items: center; }
6  .oc-head p { margin: 8px 0 0; max-width: 640px; font-family: ${o.FS}; font-size: 13px; line-height: 1.55; color: ${o.C.textSecondary}; }
7
8  .oc-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: ${o.C.border}; border: 0.5px solid ${o.C.border}; border-radius: 12px; overflow: hidden; }
9  .oc-cell { background: ${o.C.card}; padding: 11px 14px; display: grid; gap: 3px; min-width: 0; }
10  .oc-cell-k { font-family: ${o.FM}; font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; color: ${o.C.textMuted}; display: inline-flex; align-items: center; gap: 6px; }
11  .oc-cell strong { font-family: ${o.FD}; font-size: 18px; font-weight: 600; color: ${o.C.textPrimary}; font-variant-numeric: tabular-nums; }
12  .oc-cell-h { font-family: ${o.FM}; font-size: 9.5px; color: ${o.C.textMuted}; }
13  .oc-dot { width: 6px; height: 6px; border-radius: 50%; background: ${o.C.green}; box-shadow: 0 0 7px ${o.C.green}; animation: oc-pulse 2s ${o.EASE} infinite; }
14  @keyframes oc-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
15
16  .oc-err { border: 0.5px solid ${o.C.red}55; background: ${o.C.redBg}; border-radius: 10px; padding: 11px 14px; font-family: ${o.FM}; font-size: 12px; color: ${o.C.red}; }
17  .oc-err span { color: ${o.C.textMuted}; opacity: 0.8; }
18  .oc-err.inline { margin-top: 10px; }
19
20  .oc-exps { display: flex; flex-wrap: wrap; gap: 7px; }
21  .oc-pill { font-family: ${o.FM}; font-size: 11px; letter-spacing: 0.03em; padding: 7px 13px; border-radius: 8px; border: 0.5px solid ${o.C.border}; background: ${o.C.card}; color: ${o.C.textSecondary}; cursor: pointer; transition: all 0.14s ${o.EASE}; font-variant-numeric: tabular-nums; }
22  .oc-pill:hover { border-color: ${o.C.borderHover}; color: ${o.C.textPrimary}; }
23  .oc-pill.on { background: ${o.C.tealLight}; border-color: ${o.C.tealLight}; color: #04121d; font-weight: 600; }
24  .oc-pill.skel { width: 52px; height: 30px; opacity: 0.5; animation: oc-sk 1.3s ${o.EASE} infinite; cursor: default; }
25  @keyframes oc-sk { 0%,100% { opacity: 0.35; } 50% { opacity: 0.6; } }
26
27  .oc-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(320px, 0.86fr); gap: 14px; align-items: stretch; }
28  @media (max-width: 1080px) { .oc-grid { grid-template-columns: 1fr; } .oc-bar { grid-template-columns: repeat(2, 1fr); } }
29  .oc-card { border: 0.5px solid ${o.C.border}; background: ${o.C.card}; border-radius: 14px; min-width: 0; }
30
31  /* chain table */
32  .oc-chain { padding: 0; overflow: hidden; }
33  .oc-chain-head { display: grid; grid-template-columns: 1fr 132px 1fr; align-items: center; padding: 12px 14px 8px; }
34  .oc-side-cap { font-family: ${o.FM}; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
35  .oc-side-cap.oc-call { color: ${o.C.green}; text-align: left; }
36  .oc-side-cap.oc-put { color: ${o.C.violet}; text-align: right; }
37  .oc-strike-cap { font-family: ${o.FM}; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: ${o.C.textMuted}; text-align: center; }
38  /* Column headers MUST mirror .oc-cells exactly (same 3\xd71fr, 6px gap, 14px
39     horizontal padding, RTL on the put side) so every label sits dead-centre
40     over its data column. */
41  .oc-cols { display: grid; grid-template-columns: 1fr 132px 1fr; align-items: center; padding: 0 0 7px; border-bottom: 0.5px solid ${o.C.border}; }
42  .oc-colhead { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 0 14px; }
43  .oc-colhead span { font-family: ${o.FM}; font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; color: ${o.C.textMuted}; text-align: right; }
44  .oc-colhead.put { direction: rtl; }
45  .oc-colhead.put span { direction: ltr; text-align: left; }
46  .oc-cols .oc-kcol { font-family: ${o.FM}; font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; color: ${o.C.textMuted}; text-align: center; }
47
48  .oc-rows { display: grid; }
49  .oc-row { display: grid; grid-template-columns: 1fr 132px 1fr; align-items: stretch; border-bottom: 0.5px solid ${o.C.border}; }
50  .oc-row:last-child { border-bottom: 0; }
51  .oc-row.atm { background: ${o.C.tealLight}0c; }
52  .oc-row.skel { height: 34px; opacity: 0.4; animation: oc-sk 1.3s ${o.EASE} infinite; }
53
54  .oc-cells { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 6px; padding: 8px 14px; background: transparent; border: none; cursor: pointer; font-variant-numeric: tabular-nums; transition: background 0.12s ${o.EASE}; }
55  .oc-cells span { font-family: ${o.FM}; font-size: 12px; }
56  .oc-cells.call span { text-align: right; }
57  .oc-cells.put { direction: rtl; }
58  .oc-cells.put span { text-align: left; direction: ltr; }
59  .oc-cells:hover { background: ${o.C.cardHover}; }
60  .oc-cells.sel { background: ${o.C.tealLight}22; }
61  .oc-cells.call.sel { box-shadow: inset 3px 0 0 ${o.C.tealLight}; }
62  .oc-cells.put.sel { box-shadow: inset -3px 0 0 ${o.C.tealLight}; }
63  .oc-cells.blackout { cursor: default; opacity: 0.5; }
64  .oc-cells.blackout:hover { background: transparent; }
65  .oc-cells.blackout span { color: ${o.C.textMuted}; }
66  .oc-mid { color: ${o.C.textPrimary}; font-weight: 500; }
67  .oc-iv { color: ${o.C.textSecondary}; }
68  .oc-dlt { color: ${o.C.textMuted}; }
69
70  .oc-k { font-family: ${o.FM}; font-size: 12.5px; font-weight: 600; color: ${o.C.textPrimary}; background: ${o.C.surface}; border: none; border-left: 0.5px solid ${o.C.border}; border-right: 0.5px solid ${o.C.border}; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-variant-numeric: tabular-nums; transition: background 0.12s ${o.EASE}; }
71  .oc-k:hover { background: ${o.C.cardHover}; }
72  .oc-k.atm { color: ${o.C.tealLight}; background: ${o.C.tealLight}14; }
73  .oc-k i { font-style: normal; font-family: ${o.FM}; font-size: 7.5px; letter-spacing: 0.1em; color: ${o.C.tealLight}; }
74
75  .oc-chain-foot { padding: 9px 14px; border-top: 0.5px solid ${o.C.border}; font-family: ${o.FM}; font-size: 10px; line-height: 1.5; color: ${o.C.textMuted}; background: ${o.C.surface}; }
76
77  /* ticket */
78  .oc-ticket { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 13px; }
79  .oc-tkt-cap { font-family: ${o.FM}; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: ${o.C.textMuted}; }
80  /* empty state fills the column so it lines up with the (tall) chain — no void */
81  .oc-ticket-empty { display: grid; gap: 20px; padding-bottom: 4px; }
82  .oc-empty-market { display: grid; gap: 5px; padding: 16px 0; border-top: 0.5px solid ${o.C.border}; border-bottom: 0.5px solid ${o.C.border}; }
83  .oc-empty-market strong { font-family: ${o.FD}; font-size: 13px; font-weight: 600; color: ${o.C.textPrimary}; }
84  .oc-empty-market span { font-family: ${o.FS}; font-size: 11px; line-height: 1.5; color: ${o.C.textMuted}; }
85  .oc-tkt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
86  .oc-tkt-title { margin-top: 6px; font-family: ${o.FD}; font-size: 16px; font-weight: 600; color: ${o.C.textPrimary}; display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
87  .oc-badge { font-family: ${o.FM}; font-size: 9px; font-weight: 600; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 5px; }
88  .oc-badge.call { color: ${o.C.green}; background: ${o.C.green}1c; }
89  .oc-badge.put { color: ${o.C.violet}; background: ${o.C.violet}22; }
90  .oc-mny { font-family: ${o.FM}; font-size: 8.5px; font-weight: 600; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 4px; margin-left: 2px; }
91  .oc-mny.itm { color: ${o.C.amber}; background: ${o.C.amber}1f; }
92  .oc-mny.otm { color: ${o.C.teal}; background: ${o.C.teal}1f; }
93  .oc-mny.atm { color: ${o.C.textSecondary}; background: ${o.C.textMuted}1f; }
94  .oc-indicative { font-family: ${o.FM}; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: ${o.C.amber}; border: 0.5px solid ${o.C.amber}66; background: ${o.C.amber}14; border-radius: 5px; padding: 3px 7px; white-space: nowrap; }
95
96  .oc-quote { border: 0.5px solid ${o.C.border}; background: ${o.C.surface}; border-radius: 11px; padding: 12px 14px; display: grid; gap: 10px; }
97  .oc-q-mid { display: flex; justify-content: space-between; align-items: baseline; }
98  .oc-q-mid span { font-family: ${o.FM}; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: ${o.C.textMuted}; }
99  .oc-q-mid strong { font-family: ${o.FD}; font-size: 24px; font-weight: 600; color: ${o.C.textPrimary}; font-variant-numeric: tabular-nums; }
100  .oc-q-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 0.5px solid ${o.C.border}; padding-top: 10px; }
101  .oc-q-ba div { display: flex; justify-content: space-between; align-items: baseline; }
102  .oc-q-ba span { font-family: ${o.FM}; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: ${o.C.textMuted}; }
103  .oc-q-ba b { font-family: ${o.FD}; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
104
105  .oc-greeks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: ${o.C.border}; border: 0.5px solid ${o.C.border}; border-radius: 11px; overflow: hidden; }
106  .oc-grk { background: ${o.C.card}; padding: 9px 11px; display: grid; gap: 3px; }
107  .oc-grk span { font-family: ${o.FM}; font-size: 8.5px; letter-spacing: 0.05em; text-transform: uppercase; color: ${o.C.textMuted}; }
108  .oc-grk strong { font-family: ${o.FD}; font-size: 14px; font-weight: 600; color: ${o.C.textPrimary}; font-variant-numeric: tabular-nums; }
109
110  .oc-rows-info { display: grid; gap: 8px; }
111  .oc-info { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
112  .oc-info span { font-family: ${o.FM}; font-size: 11px; color: ${o.C.textMuted}; }
113  .oc-info b { font-family: ${o.FD}; font-size: 12.5px; font-weight: 600; color: ${o.C.textPrimary}; font-variant-numeric: tabular-nums; }
114
115  .oc-budget { border: 0.5px solid ${o.C.border}; background: ${o.C.surface}; border-radius: 11px; padding: 10px 13px; display: grid; gap: 6px; }
116  .oc-budget-cap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
117  .oc-depth { font-family: ${o.FM}; font-size: 9px; letter-spacing: 0.04em; color: ${o.C.textMuted}; white-space: nowrap; }
118  .oc-depth.over { color: ${o.C.amber}; }
119  .oc-budget-in { display: flex; align-items: baseline; gap: 8px; }
120  .oc-budget-in input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: ${o.C.textPrimary}; font-family: ${o.FD}; font-size: 20px; font-weight: 600; padding: 0; }
121  .oc-budget-in span { font-family: ${o.FM}; font-size: 11px; color: ${o.C.textMuted}; }
122
123  .oc-open { width: 100%; height: 46px; border: none; border-radius: 12px; background: ${o.C.tealLight}; color: #04121d; font-family: ${o.FD}; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform 0.15s ${o.EASE}; }
124  .oc-open:hover:not(:disabled) { transform: translateY(-1px); }
125  .oc-note { margin: 0; font-family: ${o.FS}; font-size: 10.5px; line-height: 1.5; color: ${o.C.textMuted}; }
126  .oc-indic-box { border: 0.5px solid ${o.C.amber}44; background: ${o.C.amber}10; border-radius: 11px; padding: 12px 14px; font-family: ${o.FS}; font-size: 11.5px; line-height: 1.55; color: ${o.C.textSecondary}; }
127
128  .oc-ok { font-family: ${o.FM}; font-size: 12px; color: ${o.C.green}; line-height: 1.5; }
129  .oc-ok a { color: ${o.C.tealLight}; }
130
131  @media (max-width: 520px) {
132    .oc-chain-head, .oc-cols, .oc-row { grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr); }
133    .oc-chain-head { padding-left: 6px; padding-right: 6px; }
134    .oc-colhead, .oc-cells { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding-left: 5px; padding-right: 5px; min-width: 0; }
135    .oc-colhead span { font-size: 7.5px; letter-spacing: 0.04em; }
136    .oc-cells span { min-width: 0; font-size: 10px; }
137    .oc-k { min-width: 0; font-size: 11px; }
138  }
139`;function B(e){return Math.max(.15*e.sigmaImpl,Math.min(3*e.sigmaImpl,.8*e.sigmaImpl))}let I={background:o.C.card,border:`0.5px solid ${o.C.border}`,borderRadius:14,padding:20};function T({label:e,value:r,min:a,max:i,step:d,fmt:l,onChange:n}){return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:6},children:[(0,t.jsx)("span",{style:{fontFamily:o.FM,fontSize:10.5,letterSpacing:"0.1em",color:o.C.textMuted,textTransform:"uppercase"},children:e}),(0,t.jsx)("span",{style:{fontFamily:o.FD,fontSize:14,color:o.C.textPrimary},children:l(r)})]}),(0,t.jsx)("input",{type:"range",className:"dc-range","aria-label":e,min:a,max:i,step:d,value:r,onChange:e=>n(Number(e.target.value))})]})}function q(){let e=(0,s.useWalletSigner)(),n=(0,s.useDusdcBalance)(),c=(0,s.useUsdcBalance)(),[C,E]=(0,a.useState)([]),[w,D]=(0,a.useState)(null),[j,$]=(0,a.useState)(null),[k,P]=(0,a.useState)(null),[A,N]=(0,a.useState)(0),[_,H]=(0,a.useState)(0),[z,q]=(0,a.useState)("10"),[R,U]=(0,a.useState)("dUSDC"),[O,W]=(0,a.useState)(null),[V,Y]=(0,a.useState)(null),[K,G]=(0,a.useState)(!1),[Z,J]=(0,a.useState)(!1),[Q,X]=(0,a.useState)(null),[ee,et]=(0,a.useState)(null),[er,ea]=(0,a.useState)(null),[ei,eo]=(0,a.useState)(null),[ed,el]=(0,a.useState)(null),[en,es]=(0,a.useState)(null),[ec,eC]=(0,a.useState)(0),eu=(0,a.useMemo)(()=>C.find(e=>e.id===w)??null,[C,w]);(0,a.useEffect)(()=>{(0,p.fetchVolSurface)("BTC").then(e=>{let t=720/0x1e187e0,r=e.slices.filter(e=>e.t_years>t).map(e=>({id:e.oracle_id,expiry:e.expiry,tenor:e.tenor_label,forward:e.forward_usd,atmIv:e.atm_iv,tYears:e.t_years,sigmaImpl:Math.max(1,e.forward_usd*e.atm_iv*Math.sqrt(Math.max(e.t_years,1e-9)))}));E(r);let a=r[Math.min(r.length-1,Math.floor(.55*r.length))];a&&(D(a.id),N(a.forward),H(B(a)))}).catch(e=>eo(e instanceof Error?e.message:String(e))),fetch(`${o.BACKEND_URL}
139/api/predict/vault/summary`).then(e=>e.json()).then(e=>{e&&"number"==typeof e.vault_value&&$(e.vault_value/1e6);let t=Number(e?.remaining_risk_capacity);Number.isFinite(t)&&t>0&&P(t/1e6)}).catch(()=>{})},[]),(0,a.useEffect)(()=>{let t=!0;return e.address?(el(null),(0,b.fetchYieldAccount)(e.address).then(e=>{t&&el(e)}).catch(()=>{t&&el(null)}),()=>{t=!1}):(el(null),()=>{t=!1})},[e.address,ee]);let ex=(0,a.useCallback)(e=>{D(e.id),N(e.forward),H(B(e)),Y(null),es(null),et(null),ea(null)},[]);(0,a.useEffect)(()=>{if(!w)return void W(null);let e=!0;return W(null),(0,p.fetchDensity)(w).then(t=>{e&&W(t)}).catch(()=>{e&&W(null)}),()=>{e=!1}},[w]);let eh=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!eu)return;let e=window.setInterval(()=>eC(e=>e+1),15e3);return()=>window.clearInterval(e)},[eu]),(0,a.useEffect)(()=>{if(!eu)return;let t=Number(z);if(!Number.isFinite(t)||t<=0){Y(null),ea(null),G(!1);return}let r=new AbortController;return eh.current&&window.clearTimeout(eh.current),Y(null),es(null),G(!0),eh.current=window.setTimeout(()=>{(0,p.stripPreview)({oracle_id:eu.id,mu_usd:A,sigma_usd:_,n:6,budget_usd:t,currency:R,sender:e.address??void 0},r.signal).then(e=>{Y(e),ea(null)}).catch(e=>{e?.name!=="AbortError"&&(Y(null),ea(e instanceof Error?e.message:String(e)))}).finally(()=>G(!1))},200),()=>{r.abort(),eh.current&&window.clearTimeout(eh.current)}},[eu,A,_,z,R,e.address,ec]);let em=(0,a.useMemo)(()=>eu?O&&O.oracle_id===eu.id&&O.pdf.length>2?function(e,t,r,a){let i=e.length,o=i>1?(e[i-1]-e[0])/(i-1):1,d=e.map(e=>u(e,r,Math.max(a,1e-9))),l=e=>Math.max(Math.sqrt(e.reduce((e,t)=>e+t*t*o,0)),1e-9),n=t.map(e=>e/l(t)),s=d.map(e=>e/l(d)).map((e,t)=>e-n[t]),c=Math.max(...t,1e-12),C=Math.max(...d,1e-12),x=C>4*c?4*c/C:1,h=d.map(e=>e*x),m=e[0],g=-1/0;for(let r=0;r<i;r++)t[r]>g&&(g=t[r],m=e[r]);return{x:e,market_pdf:t,target_pdf:h,trade_curve:s,market_mu:m,target_mu:r,unit:"usd"}}(O.x,O.pdf,A,_):function(e,t,r,a,i="usd"){let o=Math.max(t,1e-9),d=Math.max(a,1e-9),l=Math.min(e-4*o,r-4*d),n=Math.max(e+4*o,r+4*d);e>0&&r>0&&(l=Math.max(l,0));let s=(n-l)/120||1,c=Array.from({length:121},(e,t)=>l+t*s),C=c.map(t=>u(t,e,o)),x=c.map(e=>u(e,r,d)),h=e=>Math.max(Math.sqrt(e.reduce((e,t)=>e+t*t*s,0)),1e-9),m=C.map(e=>e/h(C)),g=x.map(e=>e/h(x)).map((e,t)=>e-m[t]),p=Math.max(...C,1e-12),b=Math.max(...x,1e-12),f=b>4*p?4*p/b:1;return{x:c,market_pdf:C,target_pdf:x.map(e=>e*f),trade_curve:g,market_mu:e,target_mu:r,unit:i}}(eu.forward,eu.sigmaImpl,A,_,"usd"):null,[eu,A,_,O]),eg=Number(z),ep=Number.isFinite(eg)&&eg>0,eb=y(eg),ef=!!V&&!K&&!!eu&&V.oracle_id===eu.id&&V.expiry===String(eu.expiry)&&6===V.n&&BigInt(V.budget_raw)===eb&&1e-6>Math.abs(V.mu_usd-A)&&1e-6>Math.abs(V.sigma_usd-_),ey=ef?V.buckets.filter(e=>e.tradeable&&BigInt(e.quantity)>0n).length:0,eF=!ef||0===ey,eM=/not currently quoteable|PREDICT_UNAVAILABLE/i.test(er??""),ev=/capacity exceeded|risk capacity/i.test(er??""),eS=ev?"Current dUSDC vault capacity cannot underwrite this payoff. Reduce the budget or widen σ.":er,eL=ef?BigInt(V.total_cost_raw):0n,eE=ef?BigInt(V.realized_max_payout_raw):0n,ew=F(eE),eD="dUSDC"===R&&null!=k&&ew>k,ej=eE-eL,e$=ef?BigInt(V.expected_value_raw):0n,ek=y("mUSDC"===R?c.uiAmount:n.uiAmount),eP="mUSDC"===R||!e.connected||null!==ed,eA=ef?BigInt((0,p.predictFundingCeilingRaw)(eL)):eL,eN=S(R,eL,eA,v(ed)),e_=en??eN,eH=e.connected&&ef&&eP&&ek<e_.walletAuthorizationRaw,ez=e.connected&&ef&&!eF&&!K&&!Z&&eP&&!eD&&!eH&&!eM,eB=ep&&ef&&!eF&&!K&&eP&&!eD&&!eM&&!ev,eI=ep?eM?"DeepBook pricing unavailable":ev?"Exceeds payout capacity · reduce budget or widen σ":K||!ef?"Pricing exact strip…":eP?eF?"Widen σ to build a tradeable str
139ip":eD?"Exceeds pool depth · reduce budget":`Open strip \xb7 position cost ${M(eL)}`:"Loading manager collateral…":"Enter a positive budget";async function eT(){if(eu&&V&&ef&&!Z){if(!e.address)return void ea("Connect a wallet to open this strip.");if(!eP)return void ea("Current manager collateral is still loading.");if(eD)return void ea(`Strip max payout ($${ew.toFixed(0)}) exceeds pool depth — reduce budget (max ≈ $${k.toFixed(0)}).`);J(!0),ea(null),et(null);try{X("Refreshing exact quote…");let[t,r]=await Promise.all([(0,p.stripPreview)({oracle_id:eu.id,mu_usd:A,sigma_usd:_,n:6,budget_usd:eg,currency:R,sender:e.address}),"dUSDC"===R?(0,b.fetchYieldAccount)(e.address):Promise.resolve(null)]);if(t.oracle_id!==eu.id||t.expiry!==String(eu.expiry)||6!==t.n||BigInt(t.budget_raw)!==eb||Math.abs(t.mu_usd-A)>=1e-6||Math.abs(t.sigma_usd-_)>=1e-6)throw Error("The exact distribution quote no longer matches these controls. Reprice and try again.");let a=(0,h.openableBuckets)(t.buckets);if(0===a.length)throw Error("No tradeable bands — widen σ or pick another expiry.");let i=BigInt(t.total_cost_raw),o=BigInt(t.realized_max_payout_raw);if("dUSDC"===R&&null!=k&&F(o)>k)throw Error(`Strip max payout (${M(o)}) exceeds current pool depth — reduce budget.`);r&&el(r),Y(t);let d="dUSDC"===R?BigInt((0,p.predictFundingCeilingRaw)(i)):i,l=S(R,i,d,v(r));if(es(l),ek<l.walletAuthorizationRaw)throw Error(`Insufficient ${R} — ${M(l.walletAuthorizationRaw,R)} is the max wallet authorization for this exact strip.`);if("mUSDC"===R){if(X("Opening position…"),!t.quote_id)throw Error("The server did not return an executable mUSDC quote id.");let r=await (0,g.simOpen)({owner:e.address,quote_id:t.quote_id});X("Sign in wallet…");let a=await e.signAndExecute(r.tx_bytes);X("Confirming…"),await (0,g.simConfirm)(r.sim_id,a),et({digest:a}),c.refresh();return}X("Preparing manager…");let s=await (0,p.ensureManager)(e.address,e.signAndExecute);if(X("Building strip…"),!t.quote_id)throw Error("The server did not return an executable dUSDC quote id.");let C=await (0,p.prepareOpenStrip)({owner:e.address,manager_id:s,quote_id:t.quote_id});if(!0!==C.dry_run.ok)throw Error(C.dry_run.error??"Pre-trade simulation did not pass.");let u=BigInt(C.live_cost_raw),x=BigInt(C.funding_ceiling_raw),m=BigInt(C.manager_idle_used_raw),f=BigInt(C.wallet_draw_raw);if(x<u||m+f!==x)throw Error("Prepared dUSDC funding does not reconcile; the transaction was not sent to the wallet.");if(es({positionCostRaw:u,executionHeadroomRaw:x-u,managerAppliedRaw:m,walletAuthorizationRaw:f}),ek<f)throw Error(`Insufficient dUSDC — ${M(f,"dUSDC")} is the prepared max wallet authorization.`);X("Sign in wallet…");let y=await e.signAndExecute(C.tx_bytes);X("Confirming…");let L=await (0,p.confirmPredict)(y);if(!L.ok)throw Error(`On-chain open failed (${L.status}) — check the explorer before retrying.`);et({digest:L.digest}),n.refresh()}catch(e){ea((0,d.friendlyWalletError)(e))}finally{J(!1),X(null)}}}let eq=eu?eu.forward-Math.max(.06*eu.forward,4*eu.sigmaImpl):0,eR=eu?eu.forward+Math.max(.06*eu.forward,4*eu.sigmaImpl):1,eU=eu?.15*eu.sigmaImpl:0,eO=eu?3*eu.sigmaImpl:1,eW=eu?Math.max(1,Math.round(eu.forward/4e3)):1;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Header,{}),(0,t.jsxs)(i.PageFrame,{wide:!0,zoom:.8,children:[(0,t.jsxs)("div",{style:{marginBottom:22},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)("div",{style:{fontFamily:o.FM,fontSize:10.5,letterSpacing:"0.16em",textTransform:"uppercase",color:o.C.teal,marginBottom:10},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:"BTC · DeepBook Predict"}),(0,t.jsx)("h1",{style:{fontFamily:o.FD,fontSize:34,fontWeight:600,letterSpacing:"-0.03em",color:o.C.textPrimary,margin:0,display:"flex",alignItems:"center",gap:10},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:"Distribution Markets"}),(0,t.jsxs)("p",{style:{fontFamily:o.FS,fontSize:14.5,color:o.C.textSecondary,margin:"8px 0 0",maxWidth:680,lineHeight:1.6},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["Trade your ",(0,t.jsx)("strong",{style:{color:o.C.textPrimary},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:"whole view"})," ","of where BTC settles, not one strike. f(x) is the latest indexed implied distribution from the DeepBook SVI surface. Move μ and σ to set your view g(x), then mint the matching range str
139ip. Priced and settled on-chain."]})]}),(0,t.jsxs)("div",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-grid",children:[(0,t.jsxs)("aside",{style:{display:"flex",flexDirection:"column",gap:16,minWidth:0},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("div",{style:I,className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)("div",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-cap",children:"Markets · BTC tenors"}),(0,t.jsxs)("div",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-market-scroll",children:[C.map(e=>{let a=e.id===w;return(0,t.jsxs)("button",{onClick:()=>ex(e),style:{borderColor:a?o.C.tealLight:o.C.border,background:a?o.C.cardHover:"transparent"},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-market",children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",gap:8},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("span",{style:{flex:1,minWidth:0,fontFamily:o.FD,fontSize:14,color:o.C.textPrimary,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["BTC · ",e.tenor," expiry"]}),(0,t.jsx)("span",{style:{flexShrink:0,display:"inline-flex",alignItems:"center",height:18,fontFamily:o.FM,fontSize:9,lineHeight:1,letterSpacing:"0.06em",textTransform:"uppercase",color:"#7de7ff",background:"#7de7ff1f",borderRadius:999,padding:"0 8px"},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:"Crypto"})]}),(0,t.jsxs)("span",{style:{fontFamily:o.FM,fontSize:11,color:o.C.textMuted},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["f = N($",Math.round(e.forward).toLocaleStr
139ing(),", $",Math.round(e.sigmaImpl).toLocaleString(),")"]}),(0,t.jsxs)("div",{style:{display:"flex",gap:10,marginTop:2,fontFamily:o.FM,fontSize:10,color:o.C.textMuted},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["IV ",(100*e.atmIv).toFixed(0),"%"]}),null!=j&&(0,t.jsxs)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["pool ",f(j)]}),(0,t.jsx)("span",{style:{color:eM?o.C.amber:`${o.C.green}cc`},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:eM?"reference only":"live"})]})]},e.id)}),0===C.length&&(0,t.jsx)("span",{style:{fontFamily:o.FS,fontSize:12.5,color:o.C.textMuted,lineHeight:1.5},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:ei?"DeepBook Predict pricing is temporarily unavailable.":"Loading BTC tenors…"})]})]}),eu&&(0,t.jsxs)("div",{style:I,className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)("div",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-cap",children:"Your view · g(x)"}),(0,t.jsxs)("div",{style:{display:"grid",gap:18,marginTop:14},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)(T,{label:"Mean (μ)",value:A,min:eq,max:eR,step:eW,fmt:e=>`$${Math.round(e).toLocaleString()}`,onChange:e=>{N(e),es(null)}}),(0,t.jsx)(T,{label:"Std dev (σ) · conviction",value:_,min:eU,max:eO,step:eW,fmt:e=>`\xb1$${Math.round(e).toLocaleString()}`,onChange:e=>{H(e),es(null)}}),(0,t.jsxs)("div",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8,marginBottom:6},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-cap",children:"Budget · max loss"}),"dUSDC"===R&&null!=k&&(0,t.jsxs)("span",{style:{fontFamily:o.FM,fontSize:9,letterSpacing:"0.04em",whiteSpace:"nowrap",color:eD?o.C.amber:o.C.textMuted},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["$",Math.round(k).toLocaleStr
139ing()," payout capacity"]})]}),(0,t.jsxs)("div",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-amount-in",children:[(0,t.jsx)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-amount-cur",children:"$"}),(0,t.jsx)("input",{type:"number",min:1,value:z,onChange:e=>{q(e.target.value),es(null)},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-num dc-num-bare"}),(0,t.jsx)(m.CurrencySelect,{value:R,onChange:e=>{U(e),es(null),et(null),ea(null)}})]})]}),(0,t.jsx)("button",{onClick:()=>ex(eu),className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-reset",children:"Reset to indexed forward"})]}),(0,t.jsxs)("div",{style:{display:"grid",gap:14,paddingTop:18},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("div",{style:{borderTop:`0.5px solid ${o.C.border}`,paddingTop:14},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-cap",children:"Pool liquidity · PLP"}),(0,t.jsx)("div",{style:{fontFamily:o.FD,fontSize:22,fontWeight:600,color:o.C.textPrimary,marginTop:6},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:null!=j?f(j):"—"})]}),(0,t.jsxs)("div",{style:{borderTop:`0.5px solid ${o.C.border}`,paddingTop:12,display:"grid",gap:6},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontFamily:o.FM,fontSize:11,color:o.C.textMuted},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:"Expiry"}),(0,t.jsx)("span",{style:{color:o.C.textSecondary},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:new Date(eu.expiry).toLocaleStr
139ing(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontFamily:o.FM,fontSize:11,color:o.C.textMuted},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:"Oracle"}),(0,t.jsxs)("span",{style:{color:o.C.textSecondary},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[eu.id.slice(0,8),"…"]})]}),e.connected&&(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontFamily:o.FM,fontSize:11,color:o.C.textMuted},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:"Balance"}),(0,t.jsx)("span",{style:{color:eH?o.C.amber:o.C.textPrimary},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:M(ek,R)})]})]})]})]})]}),(0,t.jsxs)("section",{"aria-label":"Distribution payoff",style:{display:"flex",flexDirection:"column",gap:16},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("div",{style:I,className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:12},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)("div",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-cap",children:eu?`BTC \xb7 ${eu.tenor} expiry \xb7 forward f(x)`:"Select a market"}),eu&&(0,t.jsx)("div",{style:{fontFamily:o.FM,fontSize:11,color:o.C.textMuted},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:eM?"Indexed SVI reference · pricing unavailable":`SVI surface \xb7 ${K?"pricing…":"121-pt grid"}`})]}),em?(0,t.jsx)(x,{quote:em}):(0,t.jsx)("div",{style:{height:300},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])})]}),(0,t.jsxs)("div",{style:I,className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:14},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsx)(h.Stat,{label:"Live exact cost",value:ef?M(eL):"—"}),(0,t.jsx)(h.Stat,{label:"Max profit",value:ef?M(ej):"—",color:o.C.green}),(0,t.jsx)(h.Stat,{label:"Max loss",value:ef?M(eL):"—",color:o.C.red}),(0,t.jsx)(h.Stat,{label:"EV under your view",value:ef?M(e$):"—",color:ef&&e$>=0n?o.C.green:o.C.red})]}),ef&&(0,t.jsx)("div",{style:{marginTop:14},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:(0,t.jsx)(L,{currency:R,breakdown:e_,ready:eP})}),ef&&V&&(0,t.jsxs)("div",{style:{display:"flex",gap:18,marginTop:12,fontFamily:o.FM,fontSize:11,color:o.C.textMuted,flexWrap:"wrap"},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[(0,t.jsxs)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["round-trip spread ",M(V.round_trip_spread_raw)]}),(0,t.jsxs)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[ey,"/",V.buckets.length," bands live"]}),(0,t.jsxs)("span",{className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["best payout ",M(V.realized_max_payout_raw)]})]}),!ep&&(0,t.jsx)("div",{role:"alert",style:{marginTop:12,fontFamily:o.FM,fontSize:12,color:o.C.red,lineHeight:1.5},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:"Enter a positive budget to request an exact strip quote."}),e.connected?(0,t.jsx)("button",{onClick:eT,disabled:!ez,"aria-busy":Z,style:{marginTop:18,opacity:ez?1:.5,cursor:ez?"pointer":"not-allowed"},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-open",children:Z?Q??"Submitting…":eH?`Need more ${R} to open`:eI}
139):(0,t.jsx)(l.ConnectModal,{defaultOpen:!1,trigger:(0,t.jsx)("button",{disabled:!eB,"aria-busy":K,style:{marginTop:18,cursor:eB?"pointer":K?"wait":"not-allowed",opacity:eB?1:.5},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]])+" dc-open",children:eB?"Connect a wallet to trade":eI})}),e.connected&&(0,t.jsxs)("div",{style:{marginTop:12,fontFamily:o.FM,fontSize:11,color:o.C.textMuted},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["Settles in ",R,". Top up either balance from ",(0,t.jsx)("strong",{style:{color:o.C.textSecondary},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:"Test funds"})," in the header."]}),ee&&(0,t.jsxs)("div",{role:"status","aria-live":"polite",style:{marginTop:12,fontFamily:o.FM,fontSize:12,color:o.C.green},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:["✓ Strip opened on testnet ·"," ",(0,t.jsxs)("a",{href:(0,d.suiExplorerTxUrl)(ee.digest),target:"_blank",rel:"noreferrer",style:{color:o.C.tealLight},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:[ee.digest.slice(0,10),"… ↗"]})]}),eS&&(0,t.jsx)("div",{role:"alert",style:{marginTop:12,fontFamily:o.FM,fontSize:12,color:o.C.red,lineHeight:1.5},className:r.default.dynamic([["3d505076d3320c16",[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight]]]),children:eS})]})]})]})]}),(0,t.jsx)(r.default,{id:"3d505076d3320c16",dynamic:[o.FM,o.C.textMuted,o.C.border,o.EASE,o.EASE,o.C.borderHover,o.C.surface,o.C.border,o.C.textPrimary,o.FD,o.C.tealLight,o.C.surface,o.C.border,o.C.tealLight,o.FD,o.C.textMuted,o.C.border,o.C.textSecondary,o.FM,o.C.borderHover,o.C.textPrimary,o.C.tealLight,o.FD,o.C.border,o.C.tealLight,o.C.tealLight],children:`.dc-grid{grid-template-columns:320px minmax(0,1fr);align-items:start;gap:30px;display:grid}@media (width<=900px){.dc-grid{grid-template-columns:1fr}}.dc-cap{letter-spacing:.14em;text-transform:uppercase;color:${o.C.textMuted};font-family:${o.FM};font-size:10.5px}.dc-market-scroll{scrollbar-width:none;-ms-overflow-style:none;gap:8px;max-height:320px;margin-top:12px;padding-right:2px;display:grid;overflow:hidden auto;-webkit-mask-image:linear-gradient(#000 calc(100% - 22px),#0000);mask-image:linear-gradient(#000 calc(100% - 22px),#0000)}.dc-market-scroll::-webkit-scrollbar{width:0;height:0;display:none}.dc-market{box-sizing:border-box;border:.5px solid ${o.C.border};cursor:pointer;text-align:left;width:100%;min-width:0;max-width:100%;transition:border-color .15s ${o.EASE}, background .15s ${o.EASE};border-radius:10px;flex-direction:column;align-items:flex-start;gap:3px;padding:12px 14px;display:flex;overflow:hidden}.dc-market:hover{border-color:${o.C.borderHover}}.dc-num{box-sizing:border-box;background:${o.C.surface};border:.5px solid ${o.C.border};width:100%;color:${o.C.textPrimary};border-radius:8px;outline:none;padding:10px 12px;font-family:${o.FD};font-size:15px}.dc-num:focus{border-color:${o.C.tealLight}}.dc-amount-in{background:${o.C.surface};border:.5px solid ${o.C.border};border-radius:8px;align-items:center;gap:7px;padding:6px 8px 6px 12px;display:flex}.dc-amount-in:focus-within{border-color:${o.C.tealLight}}.dc-amount-cur{color:${o.C.textMuted};font-family:${o.FD};font-size:15px;font-weight:600;line-height:1}.dc-num-bare{background:0 0;border:none;border-radius:0;flex:1;width:auto;min-width:0;padding:4px 0}.dc-num-bare:focus{border:none}.dc-reset{border:.5px solid ${o.C.border};color:${o.C.textSecondary};cursor:pointer;background:0 0;border-radius:8px;padding:8px;font-family:${o.FM};font-size:11px}.dc-reset:hover{border-color:${o.C.borderHover};color:${o.C.textPrimary}}.dc-open{background:${o.C.tealLight};color:#06121a;border:none;border-radius:10px;width:100%;padding:14px;font-family:${o.FD};font-size:14px;font-weight:600}.dc-range{appearance:none;background:${o.C.border};border-radius:4px;outline:none;width:100%;height:4px}.dc-range::-webkit-slider-thumb{appearance:none;background:${o.C.tealLight};cursor:pointer;border:none;border-radius:50%;width:15px;height:15px}.dc-range::-moz-range-thumb{background:${o.C.tealLight};cursor:pointer;border:none;border-radius:50%;width:15px;height:15px}`})]})}e.s(["default",0,function(){let{mode:e}=(0,n.useMode)();return"advanced"===e?(0,t.jsx)(q,{}):(0,t.jsx)(k,{})}],52139)}]);

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.