PageSourceSearch

https://tfm.com/_next/static/chunks/pages/[chain]/trade/protrade-195996ecdaac54a2.js

js tfm.com collected 2026-10-06 07:59:25 UTC 124,112 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7181],{21747:function(e,l,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[chain]/trade/protrade",function(){return i(53464)}])},53464:function(e,l,i){"use strict";i.r(l),i.d(l,{default:function(){return iN}});var r,t,a,o,d,s,n=i(85893),c=i(11163),u=i(67294),v=i(8964),m=i(95445),x=i(9008),h=i.n(x),p=i(91325),g=i(62586),y=e=>{let{decimalsList:l}=e;(0,p.P)(e=>e.poolPrice);let[i,r]=(0,u.useState)(l[l.length-1]),t=(0,p.P)(e=>e.minDecimalsStore),a={displayRow:e=>{let{open:l,disabled:i}=e;return"dark:text-dark-200 text-light-200 text-sm"},optionsContainer:e=>{let{open:l,disabled:i}=e;return"".concat(l?"py-2":""," px-2 dark:bg-dark-800 bg-light-800 dark:text-dark-100 text-light-100 rounded-xl -right-2 w-max mt-1 shadow-dropdown-light-2")},arrow:e=>{let{open:l,disabled:i}=e;return"ml-1 dark:text-dark-200 text-light-200"}},o=(0,u.useMemo)(()=>(0,n.jsx)(g.ZP,{onChange:e=>r(e),notRelativeContainer:!1,disabledPosition:!0,disabledScroll:!0,options:[...l].reverse(),value:i,classNames:a,children:e=>(0,n.jsxs)("div",{className:"".concat((null==i?void 0:i.label)===e.label?"dark:bg-dark-600 bg-light-600":""," flex items-center justify-between dark:hover:bg-dark-700 hover:bg-light-700 cursor-pointer rounded-xl text-right px-3 py-2"),children:[(0,n.jsx)("p",{children:e.label}),(0,n.jsx)("div",{className:"h-1.5 w-1.5 rounded-full ml-2 ".concat((null==i?void 0:i.label)===e.label&&"bg-CTA")})]})}),[i,l]);return(0,u.useEffect)(()=>{t&&r({label:"".concat(1/10**t.value),value:t.value})},[t]),{decimalsList:l,selectedItem:i,dropdown:o}};let j=e=>{let{width:l=16,height:i=16}=e;return(0,n.jsxs)("svg",{width:l,height:i,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{width:"6.85714",height:"6.85714",rx:"1",fill:"#D54849"}),(0,n.jsx)("rect",{y:"9.14288",width:"6.85714",height:"6.85714",rx:"1",fill:"#60B37F"}),(0,n.jsx)("rect",{x:"9.125",width:"6.85714",height:"3.80952",rx:"1",fill:"#9F9DB7"}),(0,n.jsx)("rect",{x:"9.125",y:"6.09485",width:"6.85714",height:"3.80952",rx:"1",fill:"#9F9DB7"}),(0,n.jsx)("rect",{x:"9.125",y:"12.1898",width:"6.85714",height:"3.80952",rx:"1",fill:"#9F9DB7"})]})},b=e=>{let{width:l=16,height:i=16}=e;return(0,n.jsx)("svg",{width:l,height:i,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsxs)("g",{children:[(0,n.jsx)("rect",{width:"6.85714",height:"16",rx:"1",fill:"#60B37F"}),(0,n.jsx)("rect",{x:"9.125",width:"6.85714",height:"3.80952",rx:"1",fill:"#9F9DB7"}),(0,n.jsx)("rect",{x:"9.125",y:"6.09485",width:"6.85714",height:"3.80952",rx:"1",fill:"#9F9DB7"}),(0,n.jsx)("rect",{x:"9.125",y:"12.1898",width:"6.85714",height:"3.80952",rx:"1",fill:"#9F9DB7"})]})})},f=e=>{let{width:l=16,height:i=16}=e;return(0,n.jsx)("svg",{width:l,height:i,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsxs)("g",{children:[(0,n.jsx)("rect",{width:"6.85714",height:"15.9989",rx:"1",fill:"#D54849"}),(0,n.jsx)("rect",{x:"9.125",width:"6.85714",height:"3.80952",rx:"1",fill:"#9F9DB7"}),(0,n.jsx)("rect",{x:"9.125",y:"6.09485",width:"6.85714",height:"3.80952",rx:"1",fill:"#9F9DB7"}),(0,n.jsx)("rect",{x:"9.125",y:"12.1898",width:"6.85714",height:"3.80952",rx:"1",fill:"#9F9DB7"})]})})},k=e=>{let{isActive:l,children:i}=e;return(0,n.jsx)("div",{className:"".concat(l?"":"opacity-40 hover:opacity-80"),children:i})};var w=i(75626);let N=[{value:w.Y.both,svg:(0,n.jsx)(j,{})},{value:w.Y.sell,svg:(0,n.jsx)(f,{})},{value:w.Y.buy,svg:(0,n.jsx)(b,{})}],C=e=>{let{activeView:l,onSelectView:i,className:r}=e;return(0,n.jsx)("div",{className:"".concat(r," flex items-center gap-1"),children:N.map(e=>(0,n.jsx)("button",{disabled:l===e.value,onClick:()=>i(e.value),children:(0,n.jsx)(k,{isActive:l===e.value,children:e.svg})}))})};var T=i(67192);function A(e){let{setDecimals:l,activeView:i,onSelectView:r}=e,t=(0,p.P)(e=>e.poolPrice),{dropdown:a,selectedItem:o}=y({decimalsList:+t&&1e-4>+t?T.y:T.y.slice(0,4)});return(0,u.useEffect)(()=>
1{l(o)},[o]),(0,n.jsxs)("div",{className:"flex justify-between items-center text-light-primary dark:text-dark-primary text-sm gap-2",children:[(0,n.jsx)("p",{children:"Order Book"}),(0,n.jsxs)("div",{className:"flex items-center gap-4 lg:gap-2 xxl:gap-4",children:[(0,n.jsx)(C,{onSelectView:e=>r(e),activeView:i,className:"pt-1"}),a]})]})}var D=i(9495),S=i(60886),P=i(30154);function F(e){let{className:l,size:i,price:r,progress:t=0,total:a,color:o="",reverse:d}=e,{setPrice:s}=(0,u.useContext)(P.Z),[c,v]=(0,u.useState)(!1);(0,u.useEffect)(()=>{v(!0);let e=setTimeout(()=>{v(!1)},500);return()=>clearTimeout(e)},[i,r,a]);let m=(0,u.useMemo)(()=>i<1e-4?1e-4:i,[i]),x=(0,u.useMemo)(()=>r<1e-6?1e-6:r<1e-4?1e-4:r,[r]),h=(0,u.useMemo)(()=>a<1e-6?1e-6:a<1e-4?1e-4:a,[a]);return(0,n.jsx)("div",{style:{"--progress_order":"".concat(Math.min(100,t),"%"),"--order-opacity":"".concat(c?.3:.2)},className:"".concat(l," order-progress-bar py-1 text-sm px-4"),children:d?(0,n.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,n.jsxs)("p",{className:"".concat(o," cursor-pointer"),onClick:()=>s(null==r?void 0:r.toString()),children:[(0,n.jsx)(S.Z,{value:null==x?void 0:x.toString(),noDecimalsEdit:!0})," "]}),(0,n.jsx)("p",{className:"dark:text-dark-primary text-light-primary justify-self-center lg:justify-self-end ",children:(0,n.jsx)(S.Z,{value:null==m?void 0:m.toString()})}),(0,n.jsxs)("p",{className:"dark:text-dark-primary text-light-primary justify-self-end",children:[(0,n.jsx)(S.Z,{value:null==h?void 0:h.toString()})," "]})]}):(0,n.jsxs)("div",{className:"flex flex-row-reverse lg:flex-row justify-between",children:[(0,n.jsx)("p",{className:"dark:text-dark-primary text-light-primary",children:(0,n.jsx)(S.Z,{value:null==m?void 0:m.toString()})}),(0,n.jsx)("p",{className:"".concat(o," cursor-pointer sm:pr-2"),onClick:e=>{s(null==r?void 0:r.toString())},children:(0,n.jsx)(S.Z,{value:null==x?void 0:x.toString(),noDecimalsEdit:!0})})]})})}var E=i(39513),Z=i(76942);let B=e=>{let{text:l,icon:i,className:r}=e;return(0,n.jsxs)("div",{className:"".concat(r," text-sm flex items-center gap-1 dark:text-white dark:text-opacity-70 text-dark-950 text-opacity-70"),children:[(0,n.jsx)("span",{children:l}),i&&(0,n.jsx)(E.Z,{className:"w-4 h-4",src:i,size:E.D.SMALL})]})},M=e=>{let{sellOrders:l,buyOrders:i}=e;return(0,n.jsxs)("div",{className:"grid grid-cols-2",children:[(0,n.jsx)("div",{className:"dark:text-dark-green text-light-green mt-4 mb-2 md:mt-0 md:mb-0 lg:mt-4 lg:mb-2",children:null==i?void 0:i.map((e,l)=>(0,n.jsx)(F,{progress:e.progress,total:null==e?void 0:e.total,className:"order-progress-bar-right",size:null==e?void 0:e.amount,price:null==e?void 0:e.price,color:"dark:text-dark-green text-light-green"},l))}),(0,n.jsx)("div",{className:"dark:text-dark-red text-light-red",children:null==l?void 0:l.map((e,l)=>(0,n.jsx)(F,{progress:e.progress,total:e.total,className:"order-progress-bar-right",size:null==e?void 0:e.amount,price:null==e?void 0:e.price,color:"dark:text-dark-red text-light-red"},l))})]})};function z(e){var l,i,r;let{sellOrders:t,buyOrders:a,loading:o,view:d,makeScroll:s,onSelectView:c,setDecimals:m}=e,{activePair:x}=(0,p.P)(),h=(0,v.s)(e=>e.assetsInfo),g="/tokens/Token.svg",y=(0,p.P)(e=>e.poolPriceFromOrderbook),j=(0,p.P)(e=>e.poolPriceUsd),b=(0,p.P)(e=>e.activeProtradeTab),f=(0,u.useRef)(null);return(0,u.useRef)(null),(0,u.useEffect)(()=>{if(!o&&(d===w.Y.both||d===w.Y.sell)){var e,l;null===(e=f.current)||void 0===e||e.scrollTo({top:null===(l=f.current)||void 0===l?void 0:l.scrollHeight})}},[o,d,s,b]),(0,n.jsxs)("div",{className:"h-full grid-rows-max-max-1fr md:grid-rows-max-1fr grid min-h-full",children:[(0,n.jsx)("div",{className:"md:hidden text-light-200 dark:text-dark-200 text-sm px-2 my-1",children:(0,n.jsx)(A,{activeView:d,onSelectView:c,setDecimals:m})}),(0,n.jsxs)("div",{className:"grid grid-cols-3 md:hidden lg:grid lg:grid-cols-3 justify-between items-center xs6:py-2 xs3:py-1 px-4 gap-4 lg:gap-2",children:[(0,n.jsx)(B,{text:"Price",icon:(null==h?void 0:null===(l=h[null==x?void 0:x.token2])||void 0===l?void 0:l.icon)||g,className:"text-left"}),(0,n.jsx)(B,{text:"Amount",icon:(null==h?void 0:null===(i=h[null==x?void 0:x.token1])||void 0===i?void 0:i.icon)||g,className:"justify-self-center lg:justify-self-end"}),(0,n.jsx)(B,{text:"Total",className:"justify-self-end",icon:(null==h?void 0:null===(r=h[null==x?void 0:x.token2])||void 0===r?void 0:r.icon)||g})]}),(0,n.jsxs)("div",{className:"hidden md:grid md:grid-cols-2 lg:hidden xs6:py-2 xs3:py-1 px-2 gap-4 lg:gap-2",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)(B,{text:"Price ".concat(null==x?void 0:x.symbol1),className:"text-right"}),(0,n.jsx)(B,{text:"Amount ".concat(null==x?void 0:x.symbol2),className:"text-left"})]}),(0,n.jsxs)("div",{className:"flex justify-between items-center",children:[(0,n.jsx)(B,{text:"Price ".concat(null==x?void 0:x.symbol1),className:"text-right"}),(0,n.jsx)(B,{text:"Amount ".concat(null==x?void 0:x.symbol2),className:"text-left"})]})]}),o?(0,n.jsx)("div",{className:"h-full flex justify-center items-center lg:absolute top-20-p xxl:top-50-p left-50-p lg:-translate-x-50-p lg:-translate-y-50-p",children:(0,n.jsx)("div",{className:"h-10",children:(0,n.jsx)(D.Z,{})})}):(null==a?void 0:a.length)||(null==t?void 0:t.length)?(0,n.jsxs)("div",{className:"h-full min-h-full md:h-auto overflow-y-auto scrollbar-tune md:rounded-br-xl",children:[(0,n.jsxs)("div",{className:"h-full flex md:hidden lg:flex flex-col relative scrollbar-tune overflow-x-hidden",children:[(0,n.jsx)("div",{ref:f,className:"text-red overflow-y-auto scrollbar-tune ".concat(t.length&&d===w.Y.both?"h-full":""),children:null==t?void 0:t.map((e,l)=>(0,n.jsx)(F,{progress:null==e?void 0:e.percentage,className:"order-progress-bar-right ",size:null==e?void 0:e.amount,total:null==e?void 0:e.total,price:null==e?void 0:e.price,color:"dark:text-dark-red text-light-red",reverse:!0},l))}),(0,n.jsx)("div",{className:"dark:text-dark-green text-light-green h-min border-y-px border-light-600 dar
1k:border-dark-600",children:y?(0,n.jsxs)("div",{className:"px-4 py-1",children:[(0,n.jsx)("span",{className:"text-xl-d",children:y?(0,Z.ZP)(y,4):null}),(0,n.jsx)("span",{className:"text-2sm pl-2",children:j?"$"+(0,Z.ZP)(j):null})]}):(0,n.jsx)(n.Fragment,{})}),(0,n.jsx)("div",{className:"dark:text-dark-green text-light-green overflow-y-auto scrollbar-tune ".concat(a.length&&d===w.Y.both?" h-full":""),children:null==a?void 0:a.map((e,l)=>(0,n.jsx)(F,{progress:null==e?void 0:e.percentage,className:"order-progress-bar-right",size:null==e?void 0:e.amount,total:null==e?void 0:e.total,price:null==e?void 0:e.price,color:"dark:text-dark-green text-light-green",reverse:!0},l))})]}),(0,n.jsx)("div",{className:"hidden md:block lg:hidden overflow-y-auto scrollbar-tune mb-2",children:(0,n.jsx)(M,{sellOrders:t,buyOrders:a})})]}):(0,n.jsx)("div",{className:"flex justify-center items-center xxl:h-80-p text-2sm text-light-200 dark:text-dark-200 lg:absolute top-20-p xxl:top-50-p left-50-p lg:-translate-x-50-p lg:-translate-y-50-p",children:(0,n.jsx)("p",{className:"",children:"No orders found"})})]})}var V=i(71070);function L(e){let{activeTab:l}=e,i=(0,p.P)(e=>e.buyOrders),r=(0,p.P)(e=>e.setBuyOrders),t=(0,p.P)(e=>e.sellOrders),a=(0,p.P)(e=>e.setSellOrders),o=(0,p.P)(e=>e.orderbookLoading),d=(0,p.P)(e=>e.setOrderbookDecimals),s=(0,p.P)(e=>e.orderbookView),c=(0,p.P)(e=>e.setOrderbookView),{trackOrderBookInteraction:u}=(0,V.Z)();return(0,n.jsxs)("div",{className:"lg:grid lg:grid-rows-max-1fr min-h-full h-full w-full relative rounded-t-none lg3:rounded-t-lg rounded-lg lg3:rounded-br-xl dark:bg-dark-800 bg-light-800",children:[(0,n.jsx)("div",{className:"hidden lg:block lg:px-4 lg:py-3",children:(0,n.jsx)(A,{onSelectView:e=>{c(e),r([]),a([]),u(e)},activeView:s,setDecimals:d})}),(0,n.jsx)(z,{loading:!i.length&&!t.length&&o,sellOrders:t,buyOrders:i,view:s,onSelectView:e=>{c(e),r([]),a([])},setDecimals:d,makeScroll:!i.length&&!t.length})]})}var I=i(29128),O=i(70794),q=i(70478),H=i(83263);let U={1:"60",3:"180",5:"300",15:"900",30:"1800",60:"3600",240:"14400",720:"43200","1D":"86400","7D":"604800","1M":"2592000"},_={1:"1m",3:"3m",5:"5m",15:"15m",30:"30m",60:"1h",240:"4h",720:"12h","1D":"1d","7D":"1w","1M":"1M"},R=["1","3","5","15","30","60","240","720"],K=["1D","7D"],Y=["1M"],$=async e=>{var l,i,r,t,a,o,d,s;let{token0:n,token1:c,start:u,finish:v,resolution:m,chain:x,isAggregated:h,id:p}=e,g=new q.A,y=await g.getTradingViewChart({chain:x,tokens:{token0:n,token1:c},limit:1,aggregate:h,end:v,start:u,interval:_[m],contractAddr:p});return y.status&&(null===(l=null===(i=y.data)||void 0===i?void 0:null===(r=i.data)||void 0===r?void 0:null===(t=r.pair)||void 0===t?void 0:t.items[0])||void 0===l?void 0:l.chart)?null===(a=null===(o=y.data)||void 0===o?void 0:null===(d=o.data)||void 0===d?void 0:null===(s=d.pair)||void 0===s?void 0:s.items[0])||void 0===a?void 0:a.chart:[]},W=e=>{let{adapter:l,label:i,market:r,chain:t,onFirstLoadFinish:a,onNoData:o,poolPrice:d,token0:s,token1:n,isDirectPair:c,isAggregated:u,id:v}=e,m={supported_resolutions:[...R,...K,...Y],symbols_types:[{name:"crypto",value:"crypto"}]};return{onReady:e=>{console.log("%c[".concat(performance.now()/1e3,"]%c Chart is ready"),"color:yellow","color:white"),setTimeout(()=>e(m),0)},searchSymbols:async(e,l,i,r)=>{console.log("%c[".concat(performance.now()/1e3,"]%c search Symbols"),"color:yellow","color:white"),r([])},resolveSymbol:async(e,l,t)=>{let a=1e3,o=new O.Z(d),s=(0,Z.k2)(d);o.lt(.01)&&o.gt(0)&&(a=Math.pow(10,s+1));let n={ticker:"".concat(i),name:"".concat(i),description:"".concat(i," TFM.com"),type:"crypto",session:"24x7",timezone:"Etc/UTC",minmov:1,pricescale:a,has_intraday:!0,intraday_multipliers:[...R],has_no_volume:!c,has_weekly_and_monthly:!1,supported_resolutions:m.supported_resolutions,volume_precision:3,data_status:"endofday",exchange:r};console.log("%c[".concat(performance.now()/1e3,"]%c Resolved symbol"),"color:yellow","color:white"),l(n)},getBars:async(e,l,i,r,d)=>{let{from:c,to:m,firstDataRequest:x,countBack:h}=i;try{let e=x?Math.ceil(Date.now()/1e3):m,i=e-340*+U[l];console.log("%c[".concat(performance.now()/1e3,"]%c send chart request"),"color:yellow","color:white");let d=await $({token0:s,token1:n,start:i,finish:e,resolution:l,chain:t,isAggregated:u,id:v});x&&0===d.length&&(o(!0),r([],{noData:!0})),x&&a(),0===d.length?r([],{noData:!0}):o(!1),setTimeout(()=>{r(d,{noData:!0})},0)}catch(e){d(e)}},subscribeBars:(e,i,r,a,o)=>{(0,H.R1)(l,s,n,t,u,v,r)},unsubscribeBars:()=>{}}};var G=i(5152),X=i.n(G),J=i(99329);let Q=X()(()=>i.e(1864).then(i.bind(i,11864)).then(e=>e.ChartContainer),{loadableGenerated:{webpack:()=>[11864]},ssr:!1});function ee(e){let{id:l}=e,i=(0,p.P)(e=>e.activePair);(0,v.s)(e=>e.url);let r=(0,J._)(e=>e.barsAdapter),[t,a]=(0,u.useState)([]),[o,d]=(0,u.useState)(!0),[s]=(0,u.useState)(!1),[m,x]=(0,u.useState)(!1),h=(0,c.useRouter)(),g=e=>{x(e),d(!1)},y=()=>{d(!1),x(!0)};return(0,u.useLayoutEffect)(()=>{d(!0)},[i,t]),(0,u.useEffect)(()=>{((null==i?void 0:i.id)||(null==i?void 0:i.primary)&&(null==i?void 0:i.secondary))&&a([{label:"".concat(i.primarySymbol,"/").concat(i.secondarySymbol),style:1,id:null==i?void 0:i.id,datafeed:W({adapter:r,label:"".concat(i.primarySymbol,"/").concat(i.secondarySymbol),chain:h.query.chain,isDirectPair:(null==i?void 0:i.id)!=="",market:null==i?void 0:i.market,onFirstLoadFinish:y,onNoData:g,poolPrice:null==i?void 0:i.primaryPoolPrice,token0:i.primary,token1:i.secondary,isAggregated:(null==i?void 0:i.poolType)==="aggregated",id:null==i?void 0:i.id})}])},[null==i?void 0:i.id,null==i?void 0:i.primary,null==i?void 0:i.secondary,null==i?void 0:i.poolType,h.query.chain]),(0,n.jsxs)("div",{className:"relative h-full rounded-inherit dark:bg-dark-800 bg-light-800",children:[o&&(0,n.jsx)("div",{className:"w-full h-full grid place-items-center absolute",children:(0,n.jsx)("div",{className:"w-10 h-10",children:(0,n.jsx)(D.Z,{})})}),m&&!o&&(0,n.jsx)("div",{className:"w-full h-full pt-2",children:(0,n.jsx)("div",{className:"text-yellow w-full h-full rounded-lg flex flex-col justify-center items-center",children:(0,n.jsxs)("div",{className:"h-full flex flex-col items-center justify-center",children:[(0,n.jsx)(I.Z,{}),(0,n.jsx)("p",{children:"No Trades on this pool"})]})})}),s&&(0,n.jsxs)("div",{className:"text-yellow w-full h-full rounded-lg flex flex-col justify-center items-center",children:[(0,n.jsx)(I.Z,{}),(0,n.jsx)("p",{children:"Server Error"})]}),(0,n.jsx)("div",{className:"w-full h-full overflow-hidden rounded-inherit ".concat(o||s||m?"hidden":""),children:(0,n.jsx)("div",{className:"flex h-full",children:null==t?void 0:t.map(e=>(0,n.jsx)("div",{className:"min-w-full",children:(0,n.jsx)(Q,{id:e.id,dataFeed:e.datafeed,symbol:e.label,chartStyle:e.style,interval:60})},e.label))})})]})}var el=i(20506),ei=i(9304),er=i(32613);(r=o||(o={}))[r.swapForm=0]="swapForm",r[r.histryTable=1]="histryTable",r[r.protradeMobile=2]="protradeMobile";let et=e=>{let{type:l=1,label:i,tabKey:r,onClick:t,isActive:a}=e,o=(0,u.useMemo)(()=>0===l?{wrapper:(a?"text-white":"")+" cursor-pointer",content:(a?"dark:text-dark-100 text-light-100":"dark:text-dark-300 text-light-300")+" text-sm w-max"}:1===l?{wrapper:(a?"active border-b border-dark-300":"")+" cursor-pointer py-2 px-3",content:(a?"dark:text-dark-primary text-light-primary":"dark:text-dark-secondary text-light-secondary")+" text-xs-d md:text-sm w-max"}:2===l?{wrapper:(a?"active border-b border-dark-300":"")+" cursor-pointer py-2 px-3 w-full text-center",content:(a?"dark:text-dark-100 text-light-100 ":"text-light-300 dark:text-dark-300")+" text-xs-d md:text-sm whitespace-nowrap "}:void 0,[l,a]);return(0,n.jsx)("div",{onClick:()=>t({label:i,tabKey:r}),className:null==o?void 0:o.wrapper,children:(0,n.jsx)("p",{className:null==o?void 0:o.content,children:i})})};var ea=i(62796),eo=i(48177);let ed=e=>{let{children:l,className:i=""}=e;return(0,n.jsx)("div",{className:"flex justify-center items-center bg-CTA rounded-full h-4 w-4 text-2xs ".concat(i),children:l})};var es=i(80695),en=i(46826),ec=i(92026),eu=i(62095);let ev=e=>{let{tradeHistorySwitch:l,txTabs:i,setActiveTxTab:r,activeTxTab:t,orderHistoryTabs:a,p2pOrderTabs:o,selectedVersion:d,setSelectedVersion:s,selectedTime:c,setSelectedTime:m}=e,{activeOrderHistoryTab:x,setActiveOrderHistoryTab:h}=(0,u.useContext)(P.Z),g=(0,p.P)(e=>e.activeHistoryTab),y=(0,p.P)(e=>e.setActiveHistoryTab),j=(0,p.P)(e=>e.activeProtradeTab),{activeP2PTab:b,setactiveP2PTab:f}=(0,ea.T)(),k=(0,v.s)(e=>e.features);(0,v.s)(e=>e.url);let w=(0,eo.o)(e=>e.setDefaultValues),N=(0,eo.o)(e=>e.setActiveTab),C=(0,p.P)(e=>e.activePair),{trackProTransactionHistoryAction:T,trackLimitOrderHistory:A}=(0,V.Z)();return(0,n.jsxs)("div",{className:"block lg:flex justify-between p-2 items-center border-b dark:border-dark-800 border-light-800 dark:bg-dark-800 bg-light-800 ",children:[(0,n.jsxs)("div",{className:"overflow-x-hidden scrollbar-tune-horisontal lg:flex hidden",children:[(0,n.jsx)(ei.Z.Button,{name:es.Uz.txs,children:(0,n.jsx)(et,{label:"Trade History",tabKey:es.Uz.txs,onClick:e=>{y(e),w(),N(0)},isActive:(null==g?void 0:g.tabKey)===es.Uz.txs})}),(null==k?void 0:k.includes("limit_orders"))&&(0,n.jsx)(ei.Z.Button,{name:"Limit Orders",children:(0,n.jsx)(et,{label:"Limit Orders",tabKey:es.Uz.historyOrder,onClick:e=>{A(),y(e),w(),N(1)},isActive:(null==g?void 0:g.tabKey)===es.Uz.historyOrder})}),(null==k?void 0:k.includes("p2p"))&&(0,n.jsx)(ei.Z.Button,{name:"p2p",children:(0,n.jsx)(et,{label:"P2P Orders",tabKey:es.Uz.p2p,onClick:e=>{y(e),w(),N(2)},isActive:(null==g?void 0:g.tabKey)===es.Uz.p2p})}),(null==C?void 0:C.id)&&(null==C?void 0:C.poolType)!=="indirect"?(0,n.jsx)(ei.Z.Button,{name:"topTraders",children:(0,n.jsx)(et,{label:"Top Traders",tabKey:es.Uz.topTraders,onClick:e=>{y(e),w(),N(3)},isActive:(null==g?void 0:g.tabKey)===es.Uz.topTraders})}):(0,n.jsx)(n.Fragment,{})]}),(0,n.jsx)("div",{className:"overflow-x-hidden scrollbar-tune-horisontal flex lg:hidden",children:"trades"===j.tabKey?(0,n.jsx)(ei.Z.Button,{name:"Trade History",children:(0,n.jsx)(et,{label:"Trade History",tabKey:es.Uz.txs,onClick:e=>{y(e),w(),N(0)},isActive:(null==g?void 0:g.tabKey)===es.Uz.txs})}):(0,n.jsxs)(n.Fragment,{children:[(null==k?void 0:k.includes("swap"))&&(0,n.jsx)(ei.Z.Button,{name:"Trade History",children:(0,n.jsx)(et,{label:"Trade History",tabKey:es.Uz.txs,onClick:e=>{y(e),w(),N(0)},isActive:(null==g?void 0:g.tabKey)===es.Uz.txs})}),(null==k?void 0:k.includes("limit_orders"))&&(0,n.jsx)(ei.Z.Button,{name:"Limit Orders",children:(0,n.jsx)(et,{label:"Limit Orders",tabKey:es.Uz.historyOrder,onClick:e=>{y(e),w(),N(1)},isActive:(null==g?void 0:g.tabKey)===es.Uz.historyOrder})}),(null==k?void 0:k.includes("p2p"))&&(0,n.jsx)(ei.Z.Button,{name:"p2p",children:(0,n.jsx)(et,{label:"P2P Orders",tabKey:es.Uz.p2p,onClick:e=>{y(e),w(),N(2)},isActive:(null==g?void 0:g.tabKey)===es.Uz.p2p})}),(null==C?void 0:C.id)&&(null==C?void 0:C.poolType)!=="indirect"?(0,n.jsx)(ei.Z.Button,{name:"topTraders",children:(0,n.jsx)(et,{label:"Top Traders",tabKey:es.Uz.topTraders,onClick:e=>{y(e),w(),N(3)},isActive:(null==g?void 0:g.tabKey)===es.Uz.topTraders})}):null]})}),(0,n.jsx)(ei.Z.Tab,{name:es.Uz.txs,children:(0,n.jsx)(er.Z,{className:"mt-2 lg:mt-0",children:i.map((e,l)=>(0,n.jsx)(el.Z,{active:l===t,onClick:()=>{r(l),w(),N(0),T(i[l].label)},children:e.label},e.label))})}),(0,n.jsx)(ei.Z.Tab,{name:"Limit Orders",children:(0,n.jsx)(er.Z,{className:"mt-2 lg:mt-0",children:a.map((e,l)=>(0,n.jsx)(el.Z,{active:l===x,onClick:()=>{h(l),w(),N(1)},children:(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("p",{children:e.label}),e.count&&(0,n.jsx)(ed,{children:e.count})]})},e.label))})}),(0,n.jsx)(ei.Z.Tab,{name:"p2p",children:(0,n.jsx)(er.Z,{className:"mt-2 lg:mt-0",children:o.map((e,l)=>(0,n.jsx)(el.Z,{active:l===b,onClick:()=>{f(l),w(),N(2)},children:e.label},e.label))})}),(0,n.jsx)(ei.Z.Tab,{name:"topTraders",children:(0,n.jsxs)("div",{className:"flex items-center pt-2",children:[(0,n.jsxs)("div",{className:"flex gap-2 text-sm mr-4",children:[(0,n.jsx)(en.Z,{checked:d,className:"flex",onChange:e=>s(e)}),"Include previous buys"]}),(0,n.jsx)(ec.Z,{options:eu.J7,selectedItem:c,onTimeSelect:m,possition:"right",className:"dark:bg-dark-700 bg-light-700"})]})})]})};var em=i(38852),ex=i(23246),eh=i(5509),ep=i(28894),eg=i(74379),ey=i(18514),ej=i(43181);let eb=e=>{var l,i;let{label:r,tokensValue:t,txsValue:a,usdValue:o,showExtraInfo:d,valueColor:s="dark:text-dark-primary text-light-primary",tokenIcon:c}=e;return(0,n.jsxs)("div",{className:"flex justify-between gap-1 group text-sm",children:[(0,n.jsx)("span",{className:"capitalize dark:text-dark-secondary text-light-secondary",children:r}),(0,n.jsxs)("div",{className:"text-right",children:[(0,n.jsx)("div",{children:(0,n.jsx)(S.Z,{value:o.toString(),prefix:"$",className:s})}),d?(0,n.jsxs)("div",{className:"dark:text-dark-secondary text-light-secondary flex items-center text-2sm pt-0.5",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{children:(0,n.jsx)(S.Z,{value:null!==(l=null==t?void 0:t.toString())&&void 0!==l?l:"0"})}),(0,n.jsx)("span",{children:(0,n.jsx)(E.Z,{src:null!=c?c:"",className:"w-4 h-4"})}),"/"]}),(0,n.jsxs)("span",{className:"pl-1",children:[(0,n.jsx)(S.Z,{value:null!==(i=null==a?void 0:a.toString())&&void 0!==i?i:"0"})," txns"]})]}):(0,n.jsx)(n.Fragment,{})]})]})};var ef=i(35024),ek=i(93951),ew=i(11496);let eN=e=>e>=1e4?{title:"Whale",range:"$10000+"}:e>=1e3&&e<9999?{title:"Dolphin",range:"$1000 - $9999"}:e>=250&&e<999?{title:"Shrimp",range:"$250 - $999"}:e>
1=10&&e<249?{title:"Fish",range:"$10 - $249"}:{title:"Plankton",range:"<$10"},eC=e=>{var l,i,r,t,a,o,d,s,c,u,v,m,x,h,p,g,y,j,b,f,k,w,N,C,T,A,D,P,F;let{tx:Z,className:B=""}=e;return(0,n.jsxs)("div",{className:"".concat(B),onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("div",{className:"grid grid-cols-max-fr items-center gap-2 border-b dark:border-dark-600 border-light-600 px-3 pb-2",children:[(0,n.jsx)("div",{className:"w-9 h-9 rounded-full dark:bg-dark-600 bg-light-600 flex items-center justify-center",children:(0,n.jsx)(ey.V,{bought:(null==Z?void 0:null===(l=Z.senderSummary)||void 0===l?void 0:l.buyVolume)||0,sold:(null==Z?void 0:null===(i=Z.senderSummary)||void 0===i?void 0:i.sellVolume)||0})}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center w-full ",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"font-inter-mono",children:(0,ej.$G)(null==Z?void 0:null===(r=Z.sender)||void 0===r?void 0:r.slice(5,null==Z?void 0:null===(t=Z.sender)||void 0===t?void 0:t.length),[5,5])}),(0,n.jsx)("div",{className:"text-sky pb-1",children:(0,n.jsx)(ew.t,{address:Z.sender,chain:"osmosis",target:"_blank",children:(0,n.jsx)("a",{target:"_blank",children:(0,n.jsx)(ek.Z,{})})})})]}),(0,n.jsx)("span",{className:"dark:text-dark-secondary text-light-secondary",children:"30D"})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"dark:text-dark-secondary text-light-secondary capitalize",children:[eN((null==Z?void 0:null===(a=Z.senderSummary)||void 0===a?void 0:a.buyVolume)||0+(null==Z?void 0:null===(o=Z.senderSummary)||void 0===o?void 0:o.sellVolume)||0).title,":"," "]}),(0,n.jsxs)("span",{className:"dark:text-dark-primary text-light-primary",children:[eN((null==Z?void 0:null===(d=Z.senderSummary)||void 0===d?void 0:d.buyVolume)||0+(null==Z?void 0:null===(s=Z.senderSummary)||void 0===s?void 0:s.sellVolume)||0).range," ","Buys/Sells"]})]})]})]}),(0,n.jsxs)("div",{className:"px-3 py-2 grid gap-3 border-b dark:border-dark-600 border-light-600",children:[(0,n.jsx)(eb,{label:"Buys",tokensValue:(null==Z?void 0:null===(c=Z.senderSummary)||void 0===c?void 0:c.primaryAmountBuy)||0,txsValue:(null==Z?void 0:null===(u=Z.senderSummary)||void 0===u?void 0:u.buyTxs)||0,usdValue:(null==Z?void 0:null===(v=Z.senderSummary)||void 0===v?void 0:v.buyVolume)||0,showExtraInfo:!0,valueColor:"dark:text-dark-red text-light-red",tokenIcon:null==Z?void 0:null===(m=Z.primaryToken)||void 0===m?void 0:m.icon}),(0,n.jsx)(eb,{label:"Sells",tokensValue:(null==Z?void 0:null===(x=Z.senderSummary)||void 0===x?void 0:x.primaryAmountSell)||0,txsValue:(null==Z?void 0:null===(h=Z.senderSummary)||void 0===h?void 0:h.sellTxs)||0,usdValue:(null==Z?void 0:null===(p=Z.senderSummary)||void 0===p?void 0:p.sellVolume)||0,showExtraInfo:!0,valueColor:"dark:text-dark-green text-light-green",tokenIcon:null==Z?void 0:null===(g=Z.primaryToken)||void 0===g?void 0:g.icon}),(0,n.jsx)(eb,{label:"Realized",usdValue:Math.abs((null==Z?void 0:null===(y=Z.senderSummary)||void 0===y?void 0:y.sellVolume)||0-(null==Z?void 0:null===(j=Z.senderSummary)||void 0===j?void 0:j.buyVolume)||0),valueColor:0>((null==Z?void 0:null===(b=Z.senderSummary)||void 0===b?void 0:b.sellVolume)||0-(null==Z?void 0:null===(f=Z.senderSummary)||void 0===f?void 0:f.buyVolume)||0)?"dark:text-dark-green text-light-green":"dark:text-dark-red text-light-red"})]}),(0,n.jsxs)("div",{className:"px-3 pt-2",children:[(0,n.jsx)(eb,{label:"Unrealized",tokensValue:(null==Z?void 0:null===(k=Z.senderSummary)||void 0===k?void 0:k.buyTxs)||0,txsValue:(null==Z?void 0:null===(w=Z.senderSummary)||void 0===w?void 0:w.buyTxs)||0,usdValue:(null==Z?void 0:null===(N=Z.senderSummary)||void 0===N?void 0:N.buyVolume)||0}),(0,n.jsxs)("div",{className:"mt-1",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{children:(0,n.jsx)(S.Z,{value:((null==Z?void 0:null===(C=Z.senderSummary)||void 0===C?void 0:C.primaryAmountBuy)||null==Z||null===(T=Z.senderSummary)||void 0===T||T.primaryAmountSell,"0")})}),(0,n.jsx)("span",{children:(0,n.jsx)(E.Z,{src:null==Z?void 0:null===(A=Z.primaryToken)||void 0===A?void 0:A.icon,className:"w-4 h-4 rounded-full"})})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{children:(0,n.jsx)(S.Z,{value:(null==Z?void 0:null===(D=Z.senderSummary)||void 0===D?void 0:null===(P=D.primaryAmountBuy)||void 0===P?void 0:P.toString())||"0"})}),(0,n.jsx)("span",{children:(0,n.jsx)(E.Z,{src:null==Z?void 0:null===(F=Z.primaryToken)||void 0===F?void 0:F.icon,className:"w-4 h-4 rounded-full"})})]})]}),(0,n.jsx)(ef.C,{height:"4px",percent:50,backgroundColor:"dark:bg-dark-600 bg-light-600",className:"mt-1"})]})]})]})},eT=e=>{let{width:l=24,height:i=24}=e;return(0,n.jsx)("svg",{width:l,height:i,viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsxs)("g",{opacity:"0.7",children:[(0,n.jsx)("path",{d:"M20.5 8.5H3.5M6 21.5H18C19.6569 21.5 21 20.1569 21 18.5V8.5C21 6.84315 19.6569 5.5 18 5.5H6C4.34315 5.5 3 6.84315 3 8.5V18.5C3 20.1569 4.34315 21.5 6 21.5Z",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M7.5 5.5V3.25",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M16.5 5.5V3.25",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M8.25 18H6.75M8.25 15H6.75M8.25 12H6.75M12.75 18H11.25M12.75 15H11.25M12.75 12H11.25M17.25 18H15.75M17.25 15H15.75M17.25 12H15.75",stroke:"white",strokeWidth:"1.3",strokeLinecap:"round"})]})})};var eA=i(89343),eD=i(18450),eS=i(48306),eP=i(48321),eF=i(66476),eE=i(30381),eZ=i.n(eE),eB=i(54220);let eM=(e,l)=>"sell"===e.swapType?"dark:text-dark-red text-light-red ".concat(l?"dark:bg-dark-red bg-light-red":""):"buy"===e.swapType?"dark:text-dark-green text-light-green ".concat(l?"dark:bg-dark-green bg-light-green":""):"",ez=e=>{let l=Math.ceil(e/1e3*100);return l>100?100:l},eV=(e,l,i,r,t,a,o,d,s)=>[{name:(e,l,i)=>(0,n.jsxs)("div",{className:"flex items-center justify-between gap-1 group",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("span",{className:"text-sm",children:"Date"}),(0,n.jsx)(eP.V,{isActive:e,isOpen:i})]}),(0,n.jsx)(n.Fragment,{children:"ticker"===r?(0,n.jsx)("button",{onClick:e=>{e.stopPropagation(),t("date")},children:(0,n.jsx)(eA.Z,{width:16,height:16})}):(0,n.jsx)("button",{onClick:e=>{e.stopPropagation(),t("ticker")},children:(0,n.jsx)(eT,{height:16,width:16})})})]}),key:"timestamp",sortable:!0,className:"dark:bg-dark-700 bg-light-700 py-2 pl-3 pr-3 text-right",render:(e,l)=>(0,n.jsx)("div",{className:" text-sm pl-3 dark:text-dark-secondary text-light-secondary ".concat(eM(e)),children:"ticker"===r?(0,n.jsx)(eS.F,{timestamp:(null==e?void 0:e.timestamp)*1e3}):eZ()((null==e?void 0:e.timestamp)*1e3).format("HH:mm:ss YYYY/MM/DD")}),sortingVariants:[eB.i.asc,eB.i.transactionType,eB.i.date]},{name:(e,l,i)=>(0,n.jsxs)("div",{className:"flex items-center justify-end gap-1 group",children:[(0,n.jsx)("span",{className:"text-sm",children:"Total"}),(0,n.jsx)(eP.V,{isActive:e,isOpen:i})]}),key:"volume",sortable:!0,className:"dark:bg-dark-700 bg-light-700 py-2 pr-3",render:(e,l)=>(0,n.jsxs)("div",{className:"text-right relative pr-2 h-10 flex items-center justify-end ".concat(eM(e)," dark:bg-opacity-25 pr-2"),children:[(0,n.jsx)("div",{style:{width:"".concat(ez(+l),"%")},className:"absolute inset-0 ".concat(eM(e,!0)," dark:bg-opacity-20 bg-opacity-20 z-0")}),(0,n.jsx)(S.Z,{prefix:"$",value:l,className:"font-inter-mono text-sm"})]}),sortingVariants:[eB.i.asc,eB.i.range],filterLabel:"Total USD"},{name:(l,i,r)=>(0,n.jsxs)("div",{className:"flex items-center justify-end gap-1 group",children:[(0,n.jsx)("span",{className:"text-sm max-w-40 truncate",children:e}),(0,n.jsx)(eP.V,{isActive:l,isOpen:r})]}
1),key:"primaryTokenAmount",sortable:!0,className:"dark:bg-dark-700 bg-light-700 py-2 pr-3",render:(e,l)=>(0,n.jsx)("div",{className:"text-right pr-2 group ".concat(eM(e)),children:(0,n.jsx)(S.Z,{value:l,className:"font-inter-mono text-sm"})}),sortingVariants:[eB.i.asc,eB.i.range],filterLabel:e},{name:(e,i,r)=>(0,n.jsxs)("div",{className:"flex items-center justify-end gap-1 group",children:[(0,n.jsx)("span",{className:"text-sm max-w-40 truncate",children:l}),(0,n.jsx)(eP.V,{isActive:e,isOpen:r})]}),key:"secondaryTokenAmount",sortable:!0,className:"dark:bg-dark-700 bg-light-700 py-2 pr-3",render:(e,l)=>(0,n.jsx)("div",{className:"text-right pr-2 group ".concat(eM(e)),children:(0,n.jsx)(S.Z,{value:l,className:"font-inter-mono text-sm"})}),sortingVariants:[eB.i.asc,eB.i.range],filterLabel:l},{name:(e,l,i)=>(0,n.jsxs)("div",{className:"flex items-center justify-end gap-1 group",children:[(0,n.jsx)("span",{className:"text-sm",children:"Price"}),0===d?(0,n.jsx)(eP.V,{isActive:e,isOpen:i}):(0,n.jsx)(n.Fragment,{})]}),key:"primaryPrice",sortable:0===d,className:"dark:bg-dark-700 bg-light-700 py-2 pr-3",render:(e,l)=>(0,n.jsx)("div",{className:"text-right pr-2 ".concat(eM(e)),children:0===d?(0,n.jsx)(S.Z,{value:l,prefix:"$",className:"font-inter-mono text-sm"}):(0,n.jsx)(n.Fragment,{children:"-"})}),sortingVariants:[eB.i.asc,eB.i.range],filterLabel:"Price"},{name:(e,l,i)=>(0,n.jsxs)("div",{className:"flex items-center justify-end gap-1 group",children:[(0,n.jsx)("span",{className:"text-sm",children:"Trader"}),(0,n.jsx)(eP.V,{isActive:e,isOpen:i})]}),key:"sender",sortable:!0,className:"dark:bg-dark-700 bg-light-700 py-2 pr-3",render:(e,l)=>{var i,r,t,d,c,u,v,m;return(0,n.jsxs)("div",{className:"flex items-center justify-end gap-1 pr-2",children:[(0,n.jsx)("div",{className:"bg-sky bg-opacity-10 p-1 rounded-md text-xss group cursor-default",children:(0,n.jsx)(S.Z,{className:"font-inter-mono text-sky",value:(null==e?void 0:null===(i=e.senderSummary)||void 0===i?void 0:i.buyTxs)||(null==e?void 0:null===(r=e.senderSummary)||void 0===r?void 0:r.sellTxs)?((null==e?void 0:null===(t=e.senderSummary)||void 0===t?void 0:t.buyTxs)+(null==e?void 0:null===(d=e.senderSummary)||void 0===d?void 0:d.sellTxs)).toString():"0"})}),(0,n.jsx)("div",{className:"ml-1 cursor-default",children:(0,n.jsx)(ey.V,{bought:null===(c=e.senderSummary)||void 0===c?void 0:c.buyVolume,sold:null===(u=e.senderSummary)||void 0===u?void 0:u.sellVolume})}),(0,n.jsxs)("div",{className:"font-inter-mono text-sm group relative flex items-center gap-1",onClick:()=>s===l?o():a(l),children:[""!==l?(0,n.jsx)("span",{className:"lowercase ".concat((null==e?void 0:null===(v=e.senderSummary)||void 0===v?void 0:v.sellVolume)-(null==e?void 0:null===(m=e.senderSummary)||void 0===m?void 0:m.buyVolume)<0?"dark:text-dark-green text-light-green":"dark:text-dark-red text-light-red"," underline decoration-dashed cursor-pointer w-24 text-right"),children:(0,ej.$G)(l.slice(5,l.length),[5,5])}):(0,n.jsx)(n.Fragment,{}),l?(0,n.jsx)("div",{className:"absolute group-hover:visible invisible right-[110px] top-0 z-full min-w-80 wallet-info",children:(0,n.jsx)(eC,{tx:e,className:"rounded-xl dark:bg-dark-700 bg-light-700 py-3 cursor-default"})}):(0,n.jsx)(n.Fragment,{}),""!==s?s===l?(0,n.jsx)("button",{className:"hover:dark:bg-dark-600 hover:bg-light-600 p-1 rounded-md",children:(0,n.jsx)(eD.Z,{width:"14",height:"14"})}):(0,n.jsx)("button",{onClick:()=>a(l),className:"cursor-pointer",children:(0,n.jsx)(eP.V,{})}):(0,n.jsx)(n.Fragment,{})]})]})},sortingVariants:[eB.i.fromAddress]},{name:(e,l,i)=>(0,n.jsx)("span",{className:"text-sm text-center",children:"Tx"}),key:"txHash",sortable:!1,className:"dark:bg-dark-700 bg-light-700 py-2 w-12 text-center",render:(e,l)=>(0,n.jsx)("div",{className:"flex justify-center items-center text-sky",children:(0,n.jsx)(eF.z,{chain:i,address:l,target:"_blank",children:(0,n.jsx)(ek.Z,{})})}),sortingVariants:[eB.i.fromAddress]}],eL=[{name:()=>"Date",key:"timestamp",sortable:!0,filterLabel:""},{name:()=>"Market",key:"market",sortable:!1,filterLabel:""},{name:()=>"Total USD",key:"volume",sortable:!0,filterLabel:"Total USD"},{name:()=>
1"Token",key:"primaryTokenAmount",sortable:!0,filterLabel:""},{name:()=>"Token",key:"secondaryTokenAmount",sortable:!0,filterLabel:""},{name:()=>"Price",key:"primaryPrice",sortable:!0,filterLabel:""},{name:()=>"Trader",key:"sender",sortable:!0,filterLabel:""}];var eI=()=>{let[e,l]=(0,u.useState)(eL);return{headers:e,setHeaders:l}},eO=i(79016);let eq=e=>{let{label:l,onRemove:i}=e;return(0,n.jsxs)("div",{className:"dark:bg-dark-950 bg-light-960 rounded-xl px-2 py-1-5 flex items-center gap-2 border dark:border-dark-500 border-light-500 capitalize",children:[(0,n.jsx)("span",{children:l}),(0,n.jsx)("button",{className:"dark:bg-dark-500 bg-light-500 rounded-full p-1",onClick:i,children:(0,n.jsx)(eO.Z,{width:"8",height:"8"})})]})},eH=e=>(null==e?void 0:e.max)&&(null==e?void 0:e.min)?"".concat(e.min,"-").concat(e.max):(null==e?void 0:e.max)?"<".concat(e.max):(null==e?void 0:e.min)?">".concat(e.min):void 0,eU=(e,l,i)=>{var r;let t=null===(r=e.find(e=>e.key===i&&e.filterLabel))||void 0===r?void 0:r.filterLabel;return t?"".concat(t," ").concat(l):l},e_=(e,l)=>{let i=Object.keys(e).reduce((i,r)=>{let t=e[r];return t&&Object.keys(t).forEach(e=>{let a=t[e];if(a&&!(Array.isArray(a)&&0===a.length)&&null!=a){if(e===eB.i.asc)return;e===eB.i.fromAddress?i.push({key:r,variant:e,value:a.length<11?a:(0,ej.$G)(a.slice(5,a.length),[5,5])}):e===eB.i.range?((null==a?void 0:a.min)||(null==a?void 0:a.max))&&i.push({key:r,variant:e,value:eU(l,eH(a),r)}):i.push({key:r,variant:e,value:a})}}),i},[]);return i},eR=e=>{let{smartSorting:l,headers:i,className:r,onRemoveAll:t,onRemove:a}=e,[o,d]=(0,u.useState)();return(0,u.useEffect)(()=>{if(!Object.keys(l).length)return d([]);let e=e_(l,i);d(e)},[l]),(null==o?void 0:o.length)?(0,n.jsxs)("div",{className:"grid grid-cols-fr-max gap-2 items-center ".concat(r),children:[(0,n.jsx)("div",{className:"flex flex-wrap gap-2 ",children:null==o?void 0:o.map(e=>(0,n.jsx)(eq,{label:"string"==typeof e.value?e.value:"",onRemove:()=>a(e)},"".concat(e.key,"-").concat(e.value)))}),(null==o?void 0:o.length)?(0,n.jsx)("button",{className:"text-CTA",onClick:()=>t(),children:"Clear All"}):null]}):(0,n.jsx)(n.Fragment,{})};var eK=i(65091),eY=i(66063);let e$=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return;let l={};for(let[i,r]of Object.entries(e))r&&(l[i]=r);if(0!==Object.keys(l).length)return l},eW=e=>{let{adapter:l,shoouldSubscribe:i=!0,poolAddress:r,poolType:t,chain:a,token:o,tokens:d,market:s,sender:n,action:c,swapType:v,sort:m,limit:x,skip:h,totalUsdGt:p,totalUsdLt:g,primaryTokenLt:y,primaryTokenGt:j,secondaryTokenLt:b,secondaryTokenGt:f,priceLt:k,priceGt:w}=e,[N,C]=(0,u.useState)([]),T=(0,u.useMemo)(()=>{var e;if("TIMESTAMP"===m)return(0,eK.J5)({operation:"transactionWs",variables:{chain:{value:a,required:!0,type:"[String!]"},contractAddr:{value:r||void 0,type:"[String!]"},token:{value:o,type:"String"},tokens:{value:e$(d),required:!1,type:"PairTokensFilter"},market:{value:s,type:"String"},sender:{value:n,type:"String"},action:{value:null!==(e=null==c?void 0:c.toUpperCase())&&void 0!==e?e:void 0,type:"TransactionAction"},swapType:{value:v,type:"SwapType"},sort:{value:m,type:"TransactionSorting"},limit:{value:x,type:"Int"},totalUsd:{value:e$({gt:p,lt:g}),type:"RangeFilter"},primaryTokenAmount:{value:e$({gt:j,lt:y}),type:"RangeFilter"},secondaryTokenAmount:{value:e$({gt:f,lt:b}),type:"RangeFilter"},price:{value:e$({gt:w,lt:k}),type:"RangeFilter"}},fields:["volume","txHash","timestamp","swapType","sender",{secondaryToken:eY.hg},"secondaryVolume","secondaryTokenAmount","secondaryTokenAddress","secondaryPrice","primaryVolume",{primaryToken:eY.hg},"primaryTokenAmount","primaryTokenAddress","primaryPrice","pairAddr",{market:eY.ao},"height",{chain:eY.vS},{senderSummary:["volume","buyVolume","sellVolume","txs","buyTxs","sellTxs","primaryAmount","primaryAmountBuy","primaryAmountSell","realizedTokens","realizedVolume","unrealizedTokens","unrealizedVolume","rank","gainPercent","avgTrade"]}]})},[a,r,o,s,n,c,v,m,x,h,p,g,y,j,b,f,k,w,d]);return(0,u.useEffect)(()=>{if(C([]),!T||"indirect"===t){l.unsubscribe();return}if(l.unsubscribe(),i)return l.subscribe(T,e=>C(e.data.transactionWs)),()=>{l.unsubscribe()}},[T,t,i]),{data:N}};var eG=i(10233);(t=d||(d={})).swap="swap",t.withdraw="withdraw_liquidity",t.add="provide_liquidity",t.all="";let eX={[d.swap]:"SWAP",[d.withdraw]:"REMOVE",[d.add]:"ADD"},eJ=e=>{let{contractAddr:l,action:i=d.all,asc:r,market:t="",token:a="",senderWallet:o,primaryTokenLt:s,primaryTokenGt:n,secondaryTokenLt:c,secondaryTokenGt:v,priceLt:m,priceGt:x,totalUsdGt:h,totalUsdLt:p,date:g,transactionType:y="all",sortField:j="timestamp",limit:b,tokens:f,poolType:k,preload:w=!1,chain:N}=e,C=new q.A,[T,A]=(0,u.useState)(!0),[D,S]=(0,u.useState)([]),[P,F]=(0,u.useState)(),[E,Z]=(0,u.useState)(0),B=(0,u.useMemo)(()=>new eG.O("wss://analytics.api.tfm.com/graphql2"),[]),{data:M}=eW({adapter:B,poolAddress:l,poolType:k,chain:N,token:a,tokens:f,market:t,sender:o,limit:b,totalUsdGt:Number(h),totalUsdLt:Number(p),primaryTokenLt:Number(s),primaryTokenGt:Number(n),secondaryTokenLt:Number(c),secondaryTokenGt:Number(v),priceLt:Number(m),priceGt:Number(x),shoouldSubscribe:D.length>0,action:i,sort:j?j.toUpperCase():void 0});(0,u.useEffect)(()=>{(null==M?void 0:M.length)>0&&S(e=>[...M,...null==e?void 0:e.slice(0,(null==e?void 0:e.length)>=30?(null==e?void 0:e.length)-1:30)])},[M]);let z=async()=>{var e,d,u;A(!0);let g=await C.getTransactions({chain:N,contractAddr:l,action:null!==(u=eX[i])&&void 0!==u?u:"",sort:j.toUpperCase(),asc:r,skip:b*E,market:t,limit:b,token:a,tokens:f,sender:o,primaryTokenAmount:{lt:Number(s),gt:Number(n)},secondaryTokenAmount:{lt:Number(c),gt:Number(v)},price:{lt:Number(m),gt:Number(x)},totalUsd:{gt:Number(h),lt:Number(p)},swapType:"all"===y?void 0:y.toUpperCase()});if(!(null===(e=g.data)||void 0===e?void 0:null===(d=e.data)||void 0===d?void 0:d.transaction.items)){S([]),A(!1),F(void 0);return}
1F(g.data.data.transaction.pageInfo),E?S(e=>[...e,...g.data.data.transaction.items]):S(g.data.data.transaction.items),A(!1)};return(0,u.useEffect)(()=>{if("indirect"===k||w||!f&&!l){S([]),A(!1),F(void 0);return}z()},[r,l,i,b,a,E,t,N,o,s,n,c,v,m,x,h,p,g,y,f,w]),(0,u.useEffect)(()=>{Z(0),S([]),F(void 0)},[r,i,o,s,n,c,v,m,x,h,p,g,y,N,l,b,f]),{data:D,loading:T,pageInfo:P,page:E,setPage:Z}};var eQ=i(39674);let e0=e=>{var l,i,r,t,a,o,d,s,c,m,x,h,g,y,j,b,f,k,w,N,C;let{onSmartSortingHandle:T,removeFilter:A,resetSmartSorting:D,smartSorting:S,selectedTransactionsType:P,contractAddr:F,activeAction:E,tokens:Z,preload:B,chain:M}=e,{headers:z,setHeaders:V}=eI(),L=(0,v.s)(e=>e.assetsInfo),I=(0,p.P)(e=>e.activePair),[O,q]=(0,u.useState)("ticker"),{data:H,loading:U,pageInfo:_,setPage:R}=eJ({market:"",limit:15,contractAddr:F,senderWallet:null==S?void 0:null===(l=S.sender)||void 0===l?void 0:l[eB.i.fromAddress],primaryTokenGt:null==S?void 0:null===(i=S.primaryTokenAmount)||void 0===i?void 0:null===(r=i[eB.i.range])||void 0===r?void 0:r.min,primaryTokenLt:null==S?void 0:null===(t=S.primaryTokenAmount)||void 0===t?void 0:null===(a=t[eB.i.range])||void 0===a?void 0:a.max,priceGt:null==S?void 0:null===(o=S.price)||void 0===o?void 0:null===(d=o[eB.i.range])||void 0===d?void 0:d.min,priceLt:null==S?void 0:null===(s=S.price)||void 0===s?void 0:null===(c=s[eB.i.range])||void 0===c?void 0:c.max,secondaryTokenGt:null==S?void 0:null===(m=S.secondaryTokenAmount)||void 0===m?void 0:null===(x=m[eB.i.range])||void 0===x?void 0:x.min,secondaryTokenLt:null==S?void 0:null===(h=S.secondaryTokenAmount)||void 0===h?void 0:null===(g=h[eB.i.range])||void 0===g?void 0:g.max,action:E,totalUsdGt:null==S?void 0:null===(y=S.volume)||void 0===y?void 0:null===(j=y[eB.i.range])||void 0===j?void 0:j.min,totalUsdLt:null==S?void 0:null===(b=S.volume)||void 0===b?void 0:null===(f=b[eB.i.range])||void 0===f?void 0:f.max,date:null==S?void 0:null===(k=S.timestamp)||void 0===k?void 0:k[eB.i.date],transactionType:null!==(C=null==S?void 0:null===(w=S.timestamp)||void 0===w?void 0:w[eB.i.transactionType])&&void 0!==C?C:"all",sortField:(0,eQ.z)(S),asc:null===(N=S[(0,eQ.z)(S)])||void 0===N?void 0:N[eB.i.asc],tokens:Z,poolType:null==I?void 0:I.poolType,preload:B,chain:M}),K=()=>{R(e=>e+1)},Y=e=>{T("sender",e?{...eg.LI,fromAddress:e}:void 0)},$=()=>{Y("")},W=e=>Y(e);return(0,u.useLayoutEffect)(()=>{var e,l,i;if(!L||!I||!M)return;let r=eV(null===(e=L[I.primary])||void 0===e?void 0:e.symbol,null===(l=L[I.secondary])||void 0===l?void 0:l.symbol,M,O,e=>q(e),W,$,P,(null===(i=S.sender)||void 0===i?void 0:i[eB.i.fromAddress])||"");V(r)},[L,I,M,O,P,S]),(0,n.jsx)(eh.Z,{hasMore:null==_?void 0:_.hasNextPage,hasData:H.length>0,loader:(0,n.jsx)("div",{className:"w-full relative h-25",children:(0,n.jsx)("div",{className:"absolute top-20-p right-50-p translate-x-50-p w-8 h-8",children:(0,n.jsx)(ex.Z,{})})}),getData:K,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eR,{className:"pb-2 px-3 text-sm dark:bg-dark-800 bg-light-800 mt-2",smartSorting:S,headers:z,onRemoveAll:D,onRemove:A}),(0,n.jsx)(ep.t,{headers:z,data:H,smartSorting:S,onSmartSortingHandle:T,loading:U,noDataMessage:"No transactions found.",classNames:{tableBodyRow:()=>"dark:bg-dark-800 bg-light-800 dark:hover:bg-dark-700 hover:bg-light-700 py-2 hover:dark:bg-opacity-30 hover:bg-opacity-30 z-10 first:animate-slide-top",tableHeadRow:()=>"dark:text-dark-secondary text-light-secondary divide-x dark:divide-dark-600 divide-light-600 border-l dark:border-dark-600 border-light-600",table:()=>"min-w-200",tableBodyCell:()=>"p-0"},specKey:"txHash"})]})})};var e1=i(48820),e2=i(86498),e3=i(84077),e5=i(28067),e6=i(96224),e4=i(22327),e8=i(3237),e9=i(64086),e7=i(23027),le=i(71291),ll=i(99721),li=i(73807),lr=i(26452),lt=i(38520),la=i(46151),lo=i(53717),ld=i(36401);let ls=e=>{var l,i;let{item:r,index:t,fillHandler:a}=e,o=(0,e7.X$)(e=>e.activeProviderTemp),{assetsInfo:d}=(0,v.s)(),{activeP2PTab:s}=(0,ea.T)(),{cancelOrder:c,status:m,setStatus:x}=(0,lt.Z)(),h=(0,e1.d)();(0,u.useEffect)(()=>{m===lr.w.pending&&h.open()},[m]);let{ask_amount:p,creation_time:g,maker_addr:y,ask_asset:j,expiration_time:b,offer_amount:f,offer_asset:k,order_id:w,order_open:N,taker_addr:C}=r,T=(e,l)=>new O.Z(l).div(new O.Z(e)).toFixed(6),A=(0,u.useMemo)(()=>r.maker_addr===(null==o?void 0:o.address)?ld.i7.outbound:r.taker_addr===(null==o?void 0:o.address)?ld.i7.inbound:void 0,[o,r]),D=(0,u.useMemo)(()=>{var e,l;return{symbol1:null==d?void 0:null===(e=d[k])||void 0===e?void 0:e.symbol,symbol2:null==d?void 0:null===(l=d[j])||void 0===l?void 0:l.symbol,value:T(f,p)}},[j,k,p,f]),S=(0,u.useMemo)(()=>{var e,l;return{symbol1:null==d?void 0:null===(e=d[j])||void 0===e?void 0:e.symbol,symbol2:null==d?void 0:null===(l=d[k])||void 0===l?void 0:l.symbol,value:T(p,f)}},[j,k,p,f]),P=(e,l)=>
1d&&d[l]?0==+e?0:new O.Z(e).div(10**d[l].decimals).toFixed(d[l].decimals):new O.Z(e).div(1e6).toFixed(6),F=e=>eZ()(1e3*e).format("YYYY/MM/DD"),E=e=>eZ()(1e3*e).format("HH:mm:ss"),Z=(0,la.Z)({order_id:w}),[B,M]=(0,u.useState)(!0),[z,V]=(0,u.useState)(!1),L=()=>{setTimeout(()=>M(!1),400),setTimeout(()=>V(!0),500),setTimeout(()=>{setTimeout(()=>M(!0),500),setTimeout(()=>V(!1),400)},1500)},I=()=>{window.navigator.clipboard.writeText(Z),L()};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(le.Z,{modal:h,title:"Cancel Order",setStatus:x,status:m}),(0,n.jsx)("div",{className:"transition-all text-xs dark:text-dark-200 text-light-200 min-w-250 lg:overflow-x-auto overflow-x-scroll",children:(0,n.jsxs)("div",{className:"grid grid-cols-12 gap-4 px-4 py-3 w-full items-center",children:[(0,n.jsx)("div",{className:"col-span-2",children:(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("div",{className:"w-4 h-4",children:(0,n.jsx)("img",{className:"mr-1 w-full h-full lg:mr-2",height:16,src:null==d?void 0:null===(l=d[j])||void 0===l?void 0:l.icon})}),(0,n.jsx)("div",{className:"dark:text-white text-black",children:P(p,j)})]})}),(0,n.jsx)("div",{className:"col-span-2",children:(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("div",{className:"w-4 h-4",children:(0,n.jsx)("img",{className:"mr-1 w-full h-full lg:mr-2",height:16,src:null==d?void 0:null===(i=d[k])||void 0===i?void 0:i.icon})}),(0,n.jsx)("div",{className:"dark:text-white text-black",children:P(f,k)})]})}),(0,n.jsxs)("div",{className:"col-span-2",children:[(0,n.jsxs)("p",{children:["1 ",null==D?void 0:D.symbol1," = ",null==D?void 0:D.value," ",null==D?void 0:D.symbol2]}),(0,n.jsxs)("p",{children:["1 ",null==S?void 0:S.symbol1," = ",null==S?void 0:S.value," ",null==S?void 0:S.symbol2]})]}),(0,n.jsx)("div",{className:"col-span-2 text-CTA",children:0===s?(0,n.jsx)("p",{children:(0,ej.$G)(C)}):(0,n.jsx)("p",{children:(0,ej.$G)(y)})}),(0,n.jsxs)("div",{className:"col-span-2",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{children:F(+g)}),(0,n.jsx)("div",{className:"ml-2",children:E(+g)})]}),0!=+b?(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{children:F(+b)}),(0,n.jsx)("div",{className:"ml-2",children:E(+b)})]}):(0,n.jsx)("p",{children:"Never"})]}),(0,n.jsx)("div",{className:"col-span-2",children:0===s?(0,n.jsxs)("div",{className:"flex items-center w-full justify-end gap-4",children:[(0,n.jsx)("div",{className:"rounded-xl bg-CTA dark:bg-opacity-25 bg-opacity-15 hover:bg-opacity-30 dark:hover:bg-opacity-40 px-3 py-0-5 text-CTA relative",children:(0,n.jsxs)(li.Z,{isReverse:!0,onClick:I,textColor:"CTA",children:[(0,n.jsx)("p",{className:"".concat(B?"opacity-1":"opacity-0"," transition-all duration-700"),children:"Copy Link"}),(0,n.jsx)("div",{className:"flex items-center transition-all px-3 py-2 absolute top-0 left-0 duration-700 text-CTA ".concat(z?"opacity-1":"opacity-0"," "),children:"Copied"})]})}),(0,n.jsx)("div",{onClick:()=>c(r.order_id),className:"cursor-pointer text-red transition-all border-sm dark:hover:bg-dark-600 rounded-sm p-1 hover:bg-light-600",children:(0,n.jsx)(eO.Z,{width:"8",height:"8"})})]}):1===s?(0,n.jsx)("div",{className:"flex items-center w-full justify-end gap-4",children:(0,n.jsx)(ll.Z,{onClick:()=>a(t),textColor:"white",paddingOff:!0,className:"px-3 py-1 text-sm",children:"Fill"})}):(0,n.jsx)(lo.v,{status:A})})]})})]})};var ln=i(46230),lc=i(24778),lu=i(76347);let lv=()=>{let{historyOrders:e,activeP2PTab:l,fillStatus:i,pendingStatus:r}=(0,ea.T)(),t=(0,ea.T)(e=>e.outboundOrdersStore),a=(0,ea.T)(e=>e.inboundOrdersStore),[o,d]=(0,u.useState)(0),s=(0,J._)(e=>e.myTokens),c=(0,p.P)(e=>e.activePair),{activeProviderTemp:v}=(0,e7.X$)(),m=(0,e7.X$)(e=>e.setIsPreselectChain),x=(0,u.useMemo)(()=>{var e;return null==s?void 0:null===(e=s[c.token1])||void 0===e?void 0:e.balance},[s,c.token1]),h=(0,u.useMemo)(()=>{var e;return null==s?void 0:null===(e=s[c.token2])||void 0===e?void 0:e.balance},[s,c.token2]),g=[{name:e=>"You sell",key:"ask_asset",sortable:!1,className:"col-span-2"},{name:e=>
1"You buy",key:"offer_asset",sortable:!1,className:"col-span-2"},{name:e=>"Rate",key:"rate",sortable:!1,className:"col-span-2"},{name:e=>l?"Maker address":"Taker address",key:"creation_time",sortable:!1,className:"col-span-2"},{name:e=>"Created/Expired",key:"creation_time",sortable:!1,className:"col-span-2"},{name:e=>"Status",key:"filled_amount",sortable:!1,className:"col-span-2"}],[y,j]=(0,u.useState)(g),b=(0,e1.d)(),f=(0,e1.d)(),k=(0,ln.W)(),w=(0,e9.Z)(),N=()=>k.open(),C=e=>{d(e),b.open()},T=()=>{f.close()},A=(0,u.useMemo)(()=>l?1===l?a:e:t,[l,a,t,e]);(0,u.useEffect)(()=>{let e=null==g?void 0:g.slice(0,-1);2===l?j(g):j(e)},[l]);let{isBlacklisted:D,redirectToBlocked:S}=(0,lu.Z)();return(null==v?void 0:v.address)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e3.Z,{order:{...null==a?void 0:a[o],balance1:x,balance2:h},fillModal:b,pendingModal:f,error:void 0,onFinish:()=>{}}),(0,n.jsx)(e5.Z,{onPending:T,pendingModal:f,error:void 0,onFinish:()=>{}}),w.isMobile||w.isTablet?(0,n.jsx)("div",{className:"flex flex-col gap-2 items-center justify-center px-1 pt-2 mb-5",children:A.map((e,i)=>(0,n.jsx)("div",{className:"border dark:border-dark-800 border-light-800 rounded-xl w-full",children:l?1===l?(0,n.jsx)(e4.Z,{fillHandler:C,index:i,item:e}):(0,n.jsx)(e6.Z,{item:e}):(0,n.jsx)(e8.Z,{item:e})},e.order_id))}):0!==A.length&&(0,n.jsx)(e2.Z,{isInfiniteScroll:!0,noOffsetTop:!0,headerData:y,maxPage:0,loading:!1,defaultSort:"timestamp",minWidth:"min-w-250",className:"grid-cols-12 w-max gap-4 px-4",simplified:!0,children:(0,n.jsx)("div",{className:"lg:overflow-x-auto overflow-x-scroll max-h-full overflow-y-auto",children:A.map((e,l)=>(0,n.jsx)(ls,{item:e,fillHandler:C,index:l},null==e?void 0:e.order_id))})}),0===A.length&&(0,n.jsx)("div",{className:"transition-all earn-card-shadow text-center px-8 py-6 text-light-400 text-sm ",children:"You don’t have any P2P orders yet"})]}):(0,n.jsx)("div",{className:"flex justify-center dark:bg-dark-800 bg-light-800 py-6 ",children:(0,n.jsx)(lc.k,{className:"px-4 rounded-xl",onClick:()=>{if(D)return S();N(),m(!0)},children:"Connect Wallet"})})};var lm=i(37119),lx=i(4473),lh=i(64351),lp=i(55438),lg=i(30696),ly=i(89618),lj=i(16712),lb=i(33618);let lf=e=>{let{orders:l,onCancel:i}=e,{confirmationStepAll:r,setConfirmationStepAll:t,modalAll:a}=(0,u.useContext)(lj.Z);return(0,n.jsx)(lb.Z,{modal:a,status:r,setStatus:t,onCancelOrder:i,title:"Cancel orders",msg:"Are you sure you want to cancel ".concat(l.length," orders?\n")+"This action is irreversible."})},lk=e=>{let{onCancel:l}=e,{confirmationStep:i,setConfirmationStep:r,modal:t}=(0,u.useContext)(lj.Z);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(lb.Z,{modal:t,status:i,setStatus:r,onCancelOrder:l,title:"Cancel order",msg:"Are you sure you want to cancel order?\nThis action is irreversible."})})};var lw=i(75407),lN=i(35914),lC=i(77857),lT=i(15625),lA=i(73612),lD=i(21919),lS=i(84038),lP=i(74491);let lF=e=>{var l,i,r,t;let{item:a,handleCancelOrder:o}=e,{assetsInfo:d}=(0,v.s)(),s=e=>eZ()(1e3*e).format("YYYY/MM/DD"),c=e=>eZ()(1e3*e).format("HH:mm:ss"),m=(0,u.useCallback)(()=>{o(a)},[a]),x=(0,u.useMemo)(()=>(0,lP.I)(a.status),[a.status]);return(0,n.jsx)("div",{className:"transition-all text-xs dark:text-dark-200 text-light-200 min-w-180 lg:overflow-x-auto overflow-x-scroll ",children:(0,n.jsxs)("div",{className:"grid grid-cols-12 gap-4 px-4 py-3 w-full items-center",children:[(0,n.jsx)("div",{className:"col-span-2",children:(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("div",{className:"w-4 h-4",children:(0,n.jsx)("img",{className:"mr-1 w-full h-full lg:mr-2",height:16,src:null==d?void 0:null===(l=d[null==a?void 0:a.offerAsset])||void 0===l?void 0:l.icon})}),(0,n.jsx)("div",{className:"dark:text-white text-black",children:null==a?void 0:a.offerAmountD})]})}),(0,n.jsx)("div",{className:"col-span-2",children:(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("div",{className:"w-4 h-4",children:(0,n.jsx)("img",{className:"mr-1 w-full h-full lg:mr-2",height:16,src:null==d?void 0:null===(i=d[null==a?void 0:a.askAsset])||void 0===i?void 0:i.icon})}),(0,n.jsx)("div",{className:"dark:text-white text-black",children:null==a?void 0:a.askAmountD})]})}),(0,n.jsxs)("div",{className:"col-span-3",children:[(0,n.jsx)("p",{children:null==a?void 0:a.priceAsk}),(0,n.jsx)("p",{children:null==a?void 0:a.priceOffer})]}),(0,n.jsxs)("div",{className:"col-span-2",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{children:s(null==a?void 0:a.creationTime)}),(0,n.jsx)("div",{className:"ml-2",children:c(null==a?void 0:a.creationTime)})]}),0!=+(null==a?void 0:a.expirationTime)?(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{children:s(null==a?void 0:a.expirationTime)}),(0,n.jsx)("div",{className:"ml-2",children:c(null==a?void 0:a.expirationTime)})]}):(0,n.jsx)("p",{children:"Never"})]}),(0,n.jsxs)("div",{className:" col-span-3 flex items-center justify-between pl-8 gap-2",children:[(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)(lD.Z,{percent:(+(null==a?void 0:a.filledAmount)/(null==a?void 0:a.offerAmount)*100).toFixed(1),filledAmount:(r=+(null==a?void 0:a.filledAmount),t=null==a?void 0:a.offerAsset,d&&d[t]?0==+r?0:new O.Z(r).div(10**d[t].decimals).toFixed(d[t].decimals):new O.Z(r).div(1e6).toFixed(6)),offerAmount:null==a?void 0:a.offerAmountD,offerAsset:null==a?void 0:a.offerAsset,color:null==x?void 0:x.color})}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(null==a?void 0:a.status)!==lT.a.OPEN&&(0,n.jsx)(lS.i,{status:x}),((null==a?void 0:a.status)===lT.a.OPEN||(null==a?void 0:a.status)===lT.a.EXPIRED)&&(0,n.jsx)("div",{onClick:m,className:"dark:text-dark-red text-light-red cursor-pointer",children:(0,n.jsx)(eO.Z,{width:"12",height:"12"})})]})]})]})})};var lE=i(5997);let lZ=[{name:e=>
1"You sell",key:"ask_asset",sortable:!1,className:"col-span-2"},{name:e=>"You buy",key:"offer_asset",sortable:!1,className:"col-span-2"},{name:e=>"Rate",key:"rate",sortable:!1,className:"col-span-3"},{name:e=>"Created/Expired",key:"creation_time",sortable:!1,className:"col-span-2"},{name:e=>"Filled",key:"filled_amount",sortable:!1,className:"col-span-3 pl-8"}],lB=e=>{let{sort:l={sort:!1,id:"",asc:!1},setSort:i=()=>{}}=e,r=(0,e7.X$)(e=>e.activeProviderTemp),{limitAddress:t,activeOrderHistoryTab:a}=(0,u.useContext)(P.Z),{modal:o,modalAll:d,setResult:s,setConfirmationStep:c,setConfirmationStepAll:m}=(0,u.useContext)(lj.Z),[x,h]=(0,u.useState)(0),{displayCustomSucces:g,displayError:y}=(0,lA.Z)(),[j,b]=(0,u.useState)(),{activePair:f}=(0,p.P)(),{assetsInfo:k}=(0,v.s)(),w=(0,ln.W)(),{activeHistoryTab:N}=(0,p.P)(),C=(0,e7.X$)(e=>e.setIsPreselectChain),[T,A]=(0,u.useState)(lZ),S=(0,v.s)(e=>e.url);(0,e7.X$)(e=>e.pendingCount);let F=(0,e7.X$)(e=>e.updatePendingCount),E=(0,e9.Z)(),[Z,B]=(0,u.useState)(null),M=(0,u.useMemo)(()=>new eG.O,[]),{orders:z,loading:V}=(0,lT.Z)({active:!a,asc:!1,chain:S,limit:500,orderType:"limit",sender:null==r?void 0:r.address,client:M,isOnLoad:!0});(0,u.useLayoutEffect)(()=>{if(!f||!k)return;let e=[];lZ.map(l=>{var i,r;return e.push({...l,name:"offer_amount"===l.key?l.name(null===(i=k[f.primary])||void 0===i?void 0:i.symbol):l.name(null===(r=k[f.secondary])||void 0===r?void 0:r.symbol)})}),A(e)},[lZ,k,f]);let L=(0,u.useCallback)(()=>{w.open(),C(!0)},[w]),I=(0,lh.Z)({chain:S,onSuccess:e=>{null===e.error?g("Transaction has been completed.",S,(null==e?void 0:e.txhash)||(null==e?void 0:e.txHash)||e||""):y(e.error),F(-1),s(e)}}),{execute:O}=(0,lC.$)({activeWallet:r,onAwaiting(){c(lm.w.awaiting),m(lm.w.awaiting)},async onError(e,l){console.error(e);let i=new lx.Z,t="";if(e instanceof lg.kb)t=null==e?void 0:e.message;else{var a;t=await i.getFriendlyErrorMsg(lx.p.LIMIT,null==r?void 0:r.chainId,e,null==r?void 0:r.walletName,null==r?void 0:r.address,JSON.stringify({additionals:{rpc:null==r?void 0:null===(a=r.provider)||void 0===a?void 0:a.rpc,stack:l,message:i.decodeMsg(Z)}}))}y(t,!1),s(t),c(lm.w.confirming),m(lm.w.confirming),B(void 0),null==o||o.close(),null==d||d.close()},onPending(){c(lm.w.pending),m(lm.w.pending),F(1),null==o||o.close(),null==d||d.close()},onSuccess(e){c(lm.w.confirming),m(lm.w.confirming),I(e),B(void 0)}}),q=(0,u.useCallback)(e=>{let l=(0,lw.j)({chainId:null==r?void 0:r.chainId,orderId:+(null==e?void 0:e.orderId)}),i=new ly.y;if((null==r?void 0:r.address)&&l){var a;if(r.chainId.includes("injective"))return i.buildInjectiveExecuteMessage([{contractAddress:t,msg:l,sender:null==r?void 0:r.address}]).map(e=>lE.N.includes(null!==(a=null==r?void 0:r.walletName)&&void 0!==a?a:"")?e:e.toData());let e=i.buildExecuteMessage({contractAddress:t,msg:l,sender:null==r?void 0:r.address});return e}},[r]),H=e=>{b(e);let l=q(e);B(l),null==o||o.open()},U=()=>{let e=z.map(e=>q(e));B(e.flat()),null==d||d.open()},_=async()=>{let e=z.map(e=>q(e));e&&await O(null==r?void 0:r.address,e.flat(),"TFM")},R=async e=>{let l=q(e);l&&await O(null==r?void 0:r.address,l,"TFM")},K=(0,u.useMemo)(()=>0===a?lN.U.active:lN.U.history,[a]),{isBlacklisted:Y,redirectToBlocked:$}=(0,lu.Z)();return(null==r?void 0:r.address)?(0,n.jsxs)("div",{className:"col-span-full",children:[(0,n.jsx)(lf,{onCancel:_,orders:z.filter(e=>(null==e?void 0:e.status)===lT.a.OPEN||(null==e?void 0:e.status)===lT.a.EXPIRED)}),(0,n.jsx)(lk,{onCancel:()=>R(j)}),(0,n.jsxs)("div",{className:"w-full",children:[V?(0,n.jsx)("div",{className:"flex px-8 py-4 justify-center",children:(0,n.jsx)("div",{className:"h-8",children:(0,n.jsx)(D.Z,{})})}):z.length?(0,n.jsx)(n.Fragment,{children:E.isMobile||E.isTablet?(0,n.jsx)("div",{className:"flex flex-col gap-2 items-center justify-center px-1 pt-2 mb-5",children:z.map((e,l)=>(0,n.jsx)("div",{className:"border dark:border-dark-800 border-light-800 rounded-xl w-full",children:(0,n.jsx)(lN.Z,{item:e,type:K,handleCancelOrder:R})},e.orderId))}):(0,n.jsx)(e2.Z,{noOffsetTop:!0,headerData:T,sort:l,setSort:i,page:x,isInfiniteScroll:!0,maxItems:z.length,maxPage:0,loading:V,setPage:h,perPage:30,defaultSort:"timestamp",minWidth:"min-w-180",className:"grid-cols-12 w-max gap-4 px-4",dataLength:z.length,simplified:!0,children:(0,n.jsx)("div",{className:"lg:overflow-x-auto overflow-x-scroll max-h-full overflow-y-auto pb-12",children:z.map(e=>(0,n.jsx)(lF,{item:e,handleCancelOrder:H,...e},null==e?void 0:e.orderId))})})}):(0,n.jsx)("div",{className:"flex w-full justify-center py-6 text-light-400 text-sm",children:"You don’t have any Limit orders yet"}),z.length>0&&!V&&(0,n.jsx)(n.Fragment,{children:(null==N?void 0:N.tabKey)===es.Uz.historyOrder&&0===a&&z.length>0&&(0,n.jsx)("div",{className:"flex w-full justify-center px-8 pt-4 pb-12 shadow-y-px-limit",children:(0,n.jsx)(lp.Z,{withIcon:!0,onClick:U,children:"Cancel all active orders"})})})]})]}):(0,n.jsx)("div",{className:"flex justify-center dark:bg-dark-800 bg-light-800 py-6 ",children:(0,n.jsx)(lc.k,{className:"px-4 roun
1ded-xl",onClick:Y?$:L,children:"Connect Wallet"})})};var lM=i(49649);function lz(e){let{filter:l,id:i,activeTx:r,className:t,setActiveTxTab:a,selectedVersion:o,selectedTime:d}=e,s=(0,p.P)(e=>e.activePair),m=(0,c.useRouter)(),x=(0,p.P)(e=>e.activeHistoryTab),h=(0,p.P)(e=>e.activePairLoading),g=(0,p.P)(e=>e.setActiveHistoryTab),y=(0,v.s)(e=>e.url),{onSmartSortingHandle:j,smartSorting:b,resetSmartSorting:f,removeFilter:k}=(0,lM.M)({timestamp:{asc:!1,transactionType:null}}),w=(0,u.useMemo)(()=>{if(!h)return(null==s?void 0:s.poolType)==="aggregated"&&""!==m.query.from&&""!==m.query.to?{token0:m.query.from,token1:m.query.to}:void 0},[m.query,s]),N=(0,u.useMemo)(()=>{if(!h)return(null==s?void 0:s.poolType)==="aggregated"?void 0:null==s?void 0:s.id},[s]),{onSmartSortingHandle:C,smartSorting:T}=(0,lM.M)({gainPercent:{asc:!1}});return(0,n.jsxs)("div",{className:"overflow-y-auto noTopBorder w-full h-full scrollbar-tune ".concat(t),children:[(null==x?void 0:x.tabKey)===es.Uz.historyOrder&&(0,n.jsx)(ei.Z.Tab,{name:es.Uz.historyOrder,children:(0,n.jsx)(lB,{})}),(null==x?void 0:x.tabKey)===es.Uz.p2p&&(0,n.jsx)(ei.Z.Tab,{name:es.Uz.p2p,children:(0,n.jsx)(lv,{})}),(null==x?void 0:x.tabKey)===es.Uz.txs&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(ei.Z.Tab,{name:es.Uz.txs,className:t,children:(0,n.jsx)("div",{className:"text-base-dense",children:(0,n.jsx)(e0,{onSmartSortingHandle:j,smartSorting:b,resetSmartSorting:f,removeFilter:k,selectedTransactionsType:r,chain:m.query.chain,contractAddr:N,tokens:w,activeAction:l,preload:h})})})}),(null==x?void 0:x.tabKey)===es.Uz.topTraders&&(null==s?void 0:s.poolType)!=="aggregated"&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(ei.Z.Tab,{name:es.Uz.topTraders,className:t,children:(0,n.jsx)(em.T,{className:"border-t dark:border-dark-600 border-light-600 min-w-3",unrealizedView:"line",onTraderCustom:e=>{g({tabKey:es.Uz.txs,label:"Trade History"}),a(0),j("sender",{fromAddress:e,asc:null})},onSmartSortingHandle:C,smartSorting:T,pairAddr:null==s?void 0:s.id,selectedTime:d,minWidth:"min-w-360",selectedVersion:o,chain:y})})})]})}(a=s||(s={})).swap="swap",a.withdraw="withdraw_liquidity",a.add="provide_liquidity",a.all="all";let lV=[{label:"Swaps",filter:s.swap},{label:"Adds",filter:s.add},{label:"Removes",filter:s.withdraw}],lL=[{label:"Outbound"},{label:"Inbound"},{label:"History"}],lI=[{label:"Trade History",value:es.Uz.txs},{label:"P2P Orders",value:es.Uz.p2p},{label:"Limit Orders",value:es.Uz.historyOrder}],lO=e=>{let{limitOrders:l,className:i}=e,r=(0,e9.Z)(),t=(0,p.P)(e=>e.activePair),a=(0,p.P)(e=>e.activeHistoryTab),o=(0,p.P)(e=>e.setActiveHistoryTab),d=(0,eo.o)(e=>e.activeTab),[s,c]=(0,u.useState)(0),v={tabKey:es.Uz.txs,label:"Trade History"};1===d?v={tabKey:es.Uz.historyOrder,label:"Limit Orders"}:2===d&&(v={tabKey:es.Uz.p2p,label:"P2P Orders"}),(0,u.useEffect)(()=>{(r.isLaptop||r.isNetbook||r.isPc)&&o(v)},[r]);let m=[{label:"Active",filter:0,count:null==l?void 0:l.length},{label:"History",filter:2}],[x,h]=(0,u.useState)(!1),[g,y]=(0,u.useState)(eu.J7[4]);return(0,n.jsx)("div",{className:"h-full block ".concat(i),children:(0,n.jsx)("div",{className:"h-full overflow-hidden lg:rounded-md lg:border dark:border-dark-800 border-light-800 dark:bg-dark-800 bg-light-800",children:(0,n.jsxs)(ei.Z,{_activeTab:a.tabKey,defaultTab:lI[0].label,children:[(0,n.jsx)(ev,{activeTxTab:s,orderHistoryTabs:m,p2pOrderTabs:lL,setActiveTxTab:c,tradeHistorySwitch:lI,txTabs:lV,selectedVersion:x,setSelectedVersion:h,selectedTime:g,setSelectedTime:y}),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(lz,{id:t.id,filter:lV[s].filter,activeTx:s,setActiveTxTab:c,selectedVersion:x,selectedTime:g})})]})})})};var lq=i(143),lH=i(90174);let lU=e=>{let{className:l,...i}=e;return(0,n.jsx)("button",{...i,className:"w-3 h-15 bg-light-400 dark:bg-dark-400 text-white rounded flex items-center justify-center ".concat(l),children:(0,n.jsx)(lH.Z,{height:"8px",width:"4px"})})};var l_=i(1177),lR=i(14838),lK=i(31690),lY=i(80156),l$=i(32268),lW=i(74333),lG=i(57324);let lX=e=>{let{isActive:l,onClick:i,width:r=18,height:t=18,className:a=""}=e;return(0,n.jsx)("button",{onClick:e=>i(e),className:a,children:(0,n.jsx)("svg",{width:r,height:t,viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M9.51187 1.18042C9.31763 0.732472 8.68238 0.732473 8.48813 1.18042L6.68703 5.33391C6.60619 5.52034 6.43038 5.64808 6.22809 5.66735L1.72131 6.0968C1.23527 6.14311 1.03897 6.74727 1.40496 7.07043L4.798
16 10.0669C4.95092 10.2014 5.01808 10.4081 4.9739 10.6064L3.98965 15.0253C3.88351 15.5019 4.39744 15.8753 4.81788 15.627L8.71636 13.3255C8.89134 13.2221 9.10866 13.2221 9.28365 13.3255L13.1821 15.627C13.6026 15.8753 14.1165 15.5019 14.0103 15.0253L13.0261 10.6064C12.9819 10.4081 13.0491 10.2014 13.2014 10.0669L16.595 7.07043C16.961 6.74727 16.7647 6.14311 16.2787 6.0968L11.7719 5.66735C11.5696 5.64808 11.3938 5.52034 11.313 5.33391L9.51187 1.18042Z",stroke:l?"#EDCD28":"currentColor",strokeWidth:"1.11585",fill:l?"#EDCD28":"none"})})})};var lJ=i(2890),lQ=i(41664),l0=i.n(lQ),l1=i(44323),l2=i(82742),l3=i(95980);let l5=e=>{let{ammModal:l,protrade:i=!1,token1:r,tokenToRequest:t,chain:a}=e,{totalCount:o,loading:d}=(0,l3.Z)({chain:a,search:i?t:r,skip:0,limit:1}),{trackProOtherPairsClicked:s}=(0,V.Z)();return(0,n.jsxs)(ll.Z,{paddingOff:!0,onClick:()=>{l.open(),s()},className:"font-medium whitespace-nowrap px-2 py-1 flex items-center hover:bg-opacity-40 gap-2 text-2sm ".concat(i?"dark:bg-dark-600 bg-light-600 dark:text-dark-secondary text-light-secondary":"bg-opacity-25"),children:[d?(0,n.jsxs)("div",{className:"w-4 h-4",children:[(0,n.jsx)(D.Z,{})," "]}):(0,n.jsx)(n.Fragment,{children:o>0?"+".concat(o," "):"0 "}),"pools",(0,n.jsx)("div",{className:"-rotate-90",children:(0,n.jsx)(lH.Z,{})})]})};var l6=i(40899);let l4=e=>{var l;let{className:i="",selectedPool:r,onSelectPool:t,chain:a,token1:o,token2:d}=e,{data:s,loading:v}=(0,l3.Z)({chain:a,token0:o,token1:d,findPoolsByTokens:!0,limit:10,skip:0,operationName:"getPoolsViewDropdown"}),m=(0,c.useRouter)(),x=e=>{var l,i,r,a,o,d,s,n,c,u,v,x,h,p;let g=(null==e?void 0:e.value)==="aggregated";t({id:g?"":null!==(h=null==e?void 0:e.contractAddr)&&void 0!==h?h:"",token1:m.query.from,token2:m.query.to,primary:null==e?void 0:null===(l=e.primaryToken)||void 0===l?void 0:l.contractAddr,secondary:null==e?void 0:null===(i=e.secondaryToken)||void 0===i?void 0:i.contractAddr,primarySymbol:null==e?void 0:null===(r=e.primaryToken)||void 0===r?void 0:r.symbol,secondarySymbol:null==e?void 0:null===(a=e.secondaryToken)||void 0===a?void 0:a.symbol,symbol1:(null==e?void 0:null===(o=e.primaryToken)||void 0===o?void 0:o.contractAddr)===m.query.from?null==e?void 0:null===(d=e.primaryToken)||void 0===d?void 0:d.symbol:null==e?void 0:null===(s=e.secondaryToken)||void 0===s?void 0:s.symbol,symbol2:(null==e?void 0:null===(n=e.primaryToken)||void 0===n?void 0:n.contractAddr)===m.query.from?null==e?void 0:null===(c=e.secondaryToken)||void 0===c?void 0:c.symbol:null==e?void 0:null===(u=e.primaryToken)||void 0===u?void 0:u.symbol,market:g?"":null!==(p=null==e?void 0:e.market)&&void 0!==p?p:"",primaryPoolPrice:null==e?void 0:null===(v=e.price)||void 0===v?void 0:v.pricePrimary,secondaryPoolPrice:null==e?void 0:null===(x=e.price)||void 0===x?void 0:x.priceSecondary,poolId:g?null:null==e?void 0:e.poolId,poolType:g?"aggregated":null==e?void 0:e.poolType})},h=(0,u.useMemo)(()=>(null==r?void 0:r.poolType)==="indirect"?[]:s.map(e=>({label:"Specific Pool",value:e.contractAddr,...e})),[s,null==r?void 0:r.poolType]);return(0,n.jsx)("div",{className:i,children:(0,n.jsx)(g.ZP,{onChange:e=>(null==r?void 0:r.poolType)!=="indirect"?x(e):null,options:[{value:"aggregated",label:"Aggregated View",...s[0]},...h],value:{selectedPool:r,value:r,label:(null==r?void 0:r.poolType)==="aggregated"||(null==r?void 0:r.poolType)==="indirect"?"Aggregated View":"".concat((null==r?void 0:r.poolId)?"Pool #"+(null==r?void 0:r.poolId):(0,ej.$G)(null==r?void 0:r.id,[5,5]))},selectedElement:e=>{var l,i,r,t,a,o;return(0,n.jsx)("div",{children:(null==e?void 0:null===(l=e.value)||void 0===l?void 0:l.poolType)==="aggregated"||(null==e?void 0:null===(i=e.value)||void 0===i?void 0:i.poolType)==="indirect"?"Aggregated View":(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(E.Z,{className:"w-4 h-4 rounded-full",src:null!==(o=null==e?void 0:null===(r=e.value)||void 0===r?void 0:null===(t=r.marketplace)||void 0===t?void 0:t.icon)&&void 0!==o?o:""}),(0,n.jsx)("span",{children:(0,ej.$G)(null==e?void 0:null===(a=e.value)||void 0===a?void 0:a.id,[5,5])})]})})},classNames:{optionsContainer:e=>{let{open:l}=e;return"dark:bg-dark-700 bg-light-700 rounded-lg mt-8 ".concat(l?"p-2":"")},arrow:()=>"ml-2 text-sky",container:()=>"",selected:()=>"",displayRow:()=>"dark:bg-sky dark:bg-opacity-20 rounded-xl px-3 text-sky font-medium py-1 text-2sm"},children:e=>{var i;return(0,n.jsxs)("div",{className:"flex items-center justify-between dark:hover:bg-dark-600 hover:bg-light-600 rounded-md px-3 py-2 w-50 ".concat(r.id===e.value||(null==r?void 0:r.poolType)==="aggregated"&&"aggregated"===e.value?"dark:bg-dark-600 bg-light-600":"cursor-pointer"),children:[(0,n.jsx)("div",{children:(0,n.jsx)("p",{className:"dark:text-dark-primary text-light-primary pt-0.5",children:"aggregated"!==e.value?(null==e?void 0:e.poolId)?"Pool ".concat((null==e?void 0:e.poolId)?"#"+(null==e?void 0:e.poolId):(0,ej.$G)(null==e?void 0:e.contractAddr,[5,5])):(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(E.Z,{className:"w-4 h-4 rounded-full",src:null!==(l=null==e?void 0:null===(i=e.marketplace)||void 0===i?void 0:i.icon)&&void 0!==l?l:""}),(0,n.jsx)("span",{children:(0,ej.$G)(null==e?void 0:e.contractAddr,[5,5])})]}):"Aggregated View"})}),r.id===e.value||(null==r?void 0:r.poolType)==="aggregated"&&"aggregated"===e.value?(0,n.jsx)("div",{className:"bg-CTA w-2 h-2 rounded-full"}):null]})}})})},l8=e=>{var l,i,r;let{onAnalytics:t}=e,a=(0,lJ.Z)(),o=(0,p.P)(e=>e.activePair),d=(0,v.s)(e=>e.url);(0,v.s)(e=>e.assetsInfo);let s=(0,v.s)(e=>e.chainId),[c,m]=(0,u.useState)(void 0),x=(0,u.useMemo)(()=>new eG.O,[]);(0,u.useEffect)(()=>{m(void 0),(0,H.Mi)(x,o.primary,o.secondary,o.market,d,m)},[o.primary,o.secondary,o.market]);let h=(0,u.useMemo)(()=>{var e;let l=null!==(e=null==c?void 0:c.changeT0)&&void 0!==e?e:0;return l?{value:l,prefix:l>0?"+":"",className:l>0?"dark:text-dark-green text-light-green":"text-red"}:{value:l,prefix:"",className:"dark:text-dark-100 text-light-100"}},[c]),g=(0,l1.E)(e=>e.pairsHandler),y=(0,l1.E)(e=>e.pairs),[j,b]=(0,u.useState)("token"),f=(0,e1.d)(),{trackProOtherPairs:k}=(0,V.Z)(),[w,N]=(0,u.useState)([]),C=e=>{var l,i,r,t,d,s,n,c,u,v,m,x,h,p,g,y;let j="".concat(o.primarySymbol,"/").concat(o.secondarySymbol),b="".concat(null==e?void 0:null===(l=e.primaryToken)||void 0===l?void 0:l.symbol,"/").concat(null==e?void 0:null===(i=e.secondaryToken)||void 0===i?void 0:i.symbol);(null==e?void 0:null===(r=e.primaryToken)||void 0===r?void 0:r.contractAddr)===o.primary&&(null==e?void 0:null===(t=e.secondaryToken)||void 0===t?void 0:t.contractAddr)===o.secondary?D({id:null==e?void 0:e.contractAddr,token1:null==e?void 0:null===(d=e.primaryToken)||void 0===d?void 0:d.contractAddr,token2:null==e?void 0:null===(s=e.secondaryToken)||void 0===s?void 0:s.contractAddr,primary:null==e?void 0:null===(n=e.primaryToken)||void 0===n?void 0:n.contractAddr,secondary:null==e?void 0:null===(c=e.secondaryToken)||void 0===c?void 0:c.contractAddr,primarySymbol:null==e?void 0:null===(u=e.primaryToken)||void 0===u?void 0:u.symbol,secondarySymbol:null==e?void 0:null===(v=e.secondaryToken)||void 0===v?void 0:v.symbol,symbol1:null==e?void 0:null===(m=e.primaryToken)||void 0===m?void 0:m.symbol,symbol2:null==e?void 0:null===(x=e.secondaryToken)||void 0===x?void 0:x.symbol,market:null==e?void 0:e.market,poolType:null==e?void 0:e.poolType,poolId:null==e?void 0:e.poolId,primaryPoolPrice
1:null==e?void 0:null===(h=e.price)||void 0===h?void 0:h.pricePrimary,secondaryPoolPrice:null==e?void 0:null===(p=e.price)||void 0===p?void 0:p.priceSecondary,marketplace:null==e?void 0:e.marketplace}):a(null==e?void 0:null===(g=e.primaryToken)||void 0===g?void 0:g.contractAddr,null==e?void 0:null===(y=e.secondaryToken)||void 0===y?void 0:y.contractAddr),k(j,b),f.close()},T=(0,u.useMemo)(()=>new eG.O,[]),{token0:A}=(0,l6.N)([o.primary].join(","),T,s),D=(0,p.P)(e=>e.setActivePair);return(0,n.jsxs)(n.Fragment,{children:[f.isOpen?(0,n.jsx)(lW.Z,{modal:f,primaryTokenAddress:null==o?void 0:o.primary,secondaryTokenAddress:null==o?void 0:o.secondary,action:C}):null,(0,n.jsxs)("div",{className:"flex justify-between flex-wrap items-center p-4 gap-3 h-max",children:[(0,n.jsxs)("div",{className:"flex flex-wrap gap-4 items-center h-full",children:[(0,n.jsxs)("div",{className:"flex items-center md:border-r-px dark:border-dark-600 border-light-600 md:pr-4",children:[(0,n.jsx)(lX,{onClick:e=>g(e,o.id),isActive:y&&y.includes(o.id),className:"rounded-lg p-1 dark:bg-dark-700 bg-light-700",height:18,width:18}),(0,n.jsx)("div",{className:"ml-2",children:(0,n.jsx)(l2.Z,{primary:null==o?void 0:o.primary,secondary:null==o?void 0:o.secondary,primaryClassName:"w-7 h-7 lg3:w-9 w-7 h-7 lg3:h-9",secondaryClassName:"w-7 h-7 lg3:w-9 w-7 h-7 lg3:h-9",noMargin:!0})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)(l0(),{href:{pathname:"/[chain]/trade/analytics/pairs/[id]",query:{chain:d,id:o.id}},className:"group hover:text-theme-blue text-base md:text-xl-xd ".concat((null==o?void 0:o.id)&&(null==o?void 0:o.poolType)!=="aggregated"?"":"pointer-events-none"),children:[(0,n.jsx)("span",{children:null==o?void 0:o.primarySymbol}),(0,n.jsxs)("span",{className:"dark:text-dark-200 text-light-200 group-hover:text-theme-blue",children:["/",null==o?void 0:o.secondarySymbol]})]}),(0,n.jsx)(l5,{ammModal:f,protrade:!0,tokenToRequest:null==o?void 0:o.primary,chain:d})]}),(0,n.jsx)(l4,{selectedPool:o,onSelectPool:e=>D(e),className:"pt-1 w-max",token1:null==o?void 0:o.primary,token2:null==o?void 0:o.secondary,chain:d})]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(lG.Z,{loading:!c,className:"min-w-25 h-6",borderRadius:12,block:!0,children:(0,n.jsx)("span",{className:"text-xl-d lg3:text-2xl leading-6",children:"token"===j?(0,Z.ZP)(null!==(i=null==c?void 0:c.priceT0)&&void 0!==i?i:0,4):"$"+(0,Z.ZP)(+(null==A?void 0:A.priceInvertedUsd))})}),(0,n.jsx)(lG.Z,{loading:!c,className:"min-w-15 h-5",borderRadius:12,block:!0,children:(0,n.jsx)("div",{className:"".concat(h.className," text-sm ml-1"),children:(0,n.jsx)(S.Z,{value:null!==(r=null==h?void 0:null===(l=h.value)||void 0===l?void 0:l.toString())&&void 0!==r?r:"",prefix:null==h?void 0:h.prefix})})})]}),(0,n.jsxs)(er.Z,{className:"",children:[(null==o?void 0:o.secondarySymbol)?(0,n.jsx)(el.Z,{active:"token"===j,onClick:()=>b("token"),children:null==o?void 0:o.secondarySymbol}):(0,n.jsx)(n.Fragment,{}),(0,n.jsx)(el.Z,{active:"usd"===j,onClick:()=>b("usd"),children:"USD"})]})]})]}),(0,n.jsx)("div",{className:"flex items-center gap-2 w-full md:w-auto",children:(0,n.jsx)("button",{onClick:t,className:"lg3:hidden dark:bg-dark-600 bg-light-600 rounded-xl px-4 py-2 w-full text-sm",children:"Show Analytics"})})]})]})};var l9=i(77506);let l7=e=>{let{activeTab:l,setActiveTab:i}=e,r=(0,p.P)(e=>e.setActiveHistoryTab),t=(0,v.s)(e=>e.features);return(0,n.jsxs)("div",{className:"flex border-b-px border-solid dark:border-dark-800 border-light-700 md:dark:bg-dark-800 md:bg-light-800 rounded-t-lg",children:[t.includes("limit_orders")&&(0,n.jsx)(et,{type:o.protradeMobile,tabKey:es.sD.orders,label:"Orders",onClick:e=>{i(e)},isActive:(null==l?void 0:l.tabKey)===es.sD.orders}),t.includes(l9.X.orderbook)&&(0,n.jsx)(et,{type:o.protradeMobile,tabKey:es.sD.order_book,label:"Order Book",onClick:e=>{i(e)},isActive:(null==l?void 0:l.tabKey)===es.sD.order_book}),(0,n.jsx)(et,{type:o.protradeMobile,tabKey:es.sD.chart,label:"Chart",onClick:e=>{i(e)},isActive:(null==l?void 0:l.tabKey)===es.sD.chart}),(0,n.jsx)(et,{type:o.protradeMobile,tabKey:es.sD.trades,label:"Trades",onClick:e=>{r({label:"Trade History",tabKey:"Trade History"}),i(e)},isActive:(null==l?void 0:l.tabKey)===es.sD.trades})]})},ie=e=>{let{orders:l,activeTab:i,onSelectTab:r,onSettings:t,setSlippageSettings:a,slippageSettings:o}=e,d=(0,p.P)(e=>e.activeProtradeTab),s=(0,p.P)(e=>e.setActiveProtradeTab),c=(0,v.s)(e=>e.features),u=(0,p.P)(e=>e.activePair);return(0,n.jsxs)("div",{className:"max-w-full h-full grid grid-cols-1 grid-rows-max-1fr",children:[(0,n.jsx)("div",{className:"h-max",children:(0,n.jsx)(l7,{activeTab:d,setActiveTab:s})}),d.tabKey===es.sD.orders?(0,n.jsxs)("div",{className:"w-full max-h-[1000vh] grid grid-cols-1 gap-4",children:[(0,n.jsx)("div",{className:"md:hidden",children:(0,n.jsx)(l_.I,{activeTab:i,onSelectTab:r,onSettings:t,setSlippageSettings:a,slippageSettings:o})}),(0,n.jsx)("div",{className:"relative max-h-[calc(75vh)]",children:(0,n.jsx)(lO,{limitOrders:l,className:""})})]}):null,d.tabKey===es.sD.order_book&&c.includes(l9.X.orderbook)?(0,n.jsx)("div",{className:"w-full grid h-[calc(calc(calc(100vh-var(--header-height))-var(--chainBar-height))-150px)]",children:(0,n.jsx)(L,{})}):null,d.tabKey===es.sD.chart?(0,n.jsx)("div",{className:"w-full grid h-[calc(calc(calc(100vh-var(--header-height))-var(--chainBar-height))-200px)]",children:(0,n.jsx)(ee,{id:null==u?void 0:u.id})}):null,d.tabKey===es.sD.trades?(0,n.jsx)("div",{className:"relative w-full h-[calc(calc(calc(100vh-var(--header-height))-var(--chainBar-height))-200px)] block",children:(0,n.jsx)(lO,{limitOrders:l})}):null]})};var il=i(37895),ii=i(84263);let ir=e=>{let{options:l,selectedTime:i,onSelect:r,valuesToShow:t=["1m","4h","1d","1w","1M"]}=e,[a,o]=(0,u.useState)(!1),d=(0,u.useMemo)(()=>l.filter((e,l)=>t.includes(e.value)).sort((e,l)=>e.secValue<l.secValue?-1:e.secValue>l.secValue?1:0),[l,t]),s=(0,u.useMemo)(()=>l.filter(e=>!t.includes(e.value)).sort((e,l)=>e.secValue<l.secValue?-1:e.secValue>l.secValue?1:0),[l,t]);return(0,n.jsxs)("div",{className:"grid grid-cols-fr-max items-center dark:bg-dark-700 bg-light-700 rounded-xl p-1 relative ",children:[(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"grid grid-cols-".concat(t.length),children:d.map(e=>(0,n.jsx)("div",{onClick:()=>{r(e)},className:"text-center py-0-5 cursor-pointer ".concat(e.value===i.value?"dark:bg-dark-400 bg-light-950 rounded-lm font-medium":"dark:hover:bg-dark-600 hover:bg-light-600 rounded-lm"),children:e.label}))})}),(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("button",{onClick:()=>o(e=>!e),className:"".concat(s.map(e=>e.value).includes(i.value)?"dark:bg-dark-400 bg-light-950":"dark:hover:bg-dark-600 hover:bg-light-600 rounded-lm"," px-3 py-1 rounded-lm"),children:(0,n.jsx)(il.Z,{height:16,width:16})}),(0,n.jsx)("div",{className:"absolute dark:bg-dark-700 bg-light-700 right-0 top-10 w-full z-full rounded-xl",children:(0,n.jsx)(ii.Z,{open:a,responcivePosition:!0,children:(0,n.jsx)("div",{className:"flex flex-col flex-wrap gap-2 shadow-dropdown-dark p-2 w-full max-h-35",children:s.map((e,l)=>(0,n.jsx)("div",{onClick:()=>{r(e),o(!1)},className:"text-center ".concat(i.value===e.value?"bg-CTA bg-opacity-15 border border-solid border-CTA dark:text-dark-100 text-CTA":"dark:hover:bg-dark-600 hover:bg-light-600 bg-transparent border dark:border-dark-600 border-light-400 cursor-pointer"," rounded-xl py-0-5 px-1-5 max-w-26"),children:e.label},l))})})})]})]})};var it=i(97358),ia=i(56539);let io=e=>e?e.length>11?e.slice(0,11)+"...":e:"N/A",id=e=>{var l,i;let{data:r,chainId:t,className:a}=e;return(0,n.jsxs)("div",{className:"border rounded-xl dark:border-dark-700 border-light-700 p-2-5 ".concat(a),children:[(0,n.jsx)("p",{className:"dark:text-dark-secondary text-light-secondary text-xss",children:"Top Pairs"}),(0,n.jsx)("div",{className:"flex gap-1 flex-wrap pt-2",children:r.map((e,r)=>{var a,o,d,s,c,u,v,m;return(0,n.jsx)(l0(),{href:{pathname:"/[chain]/trade/protrade",query:{from:null==e?void 0:null===(a=e.primaryToken)||void 0===a?void 0:a.contractAddr,to:null==e?void 0:null===(o=e.secondaryToken)||void 0===o?void 0:o.contractAddr,chain:t}},className:"dark:bg-dark-700 dark:hover:bg-dark-600 bg-light-700 hover:bg-light-600 flex items-center rounded-xl px-2 py-1 text-sm",children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(E.Z,{src:null!==(l=null===(d=e.primaryToken)||void 0===d?void 0:d.icon)&&void 0!==l?l:"",className:"w-6 h-6 rounded-full",alt:null===(s=e.primaryToken)||void 0===s?void 0:s.symbol}),(0,n.jsx)(E.Z,{src:null!==(i=null===(c=e.secondaryToken)||void 0===c?void 0:c.icon)&&void 0!==i?i:"",className:"w-6 h-6 rounded-full",alt:null===(u=e.secondaryToken)||void 0===u?void 0:u.symbol}),(0,n.jsxs)("div",{className:"pl-1",children:[(0,n.jsx)("span",{className:"truncate",children:io(null===(v=e.primaryToken)||void 0===v?void 0:v.symbol)}),(0,n.jsxs)("span",{className:"dark:text-dark-secondary text-light-secondary truncate",children:["/",io(null===(m=e.secondaryToken)||void 0===m?void 0:m.symbol)]})]})]})},r)})})]})};var is=i(8639),ic=e=>{let{chain:l,interval:i,tokenAddress:r}
1=e,[t,a]=(0,u.useState)(!0),[o,d]=(0,u.useState)();return(0,u.useEffect)(()=>{if(!l||!i||!r)return;let e=async()=>{try{var e,t;a(!0);let o=new is.g(l),s=await o.getTokenInfoV2(r,i);if(!(null===(e=s.data.data)||void 0===e?void 0:e.tokenInfo))throw Error("");d(null===(t=s.data.data)||void 0===t?void 0:t.tokenInfo)}catch(e){d(void 0)}finally{a(!1)}};e()},[l,i,r]),{data:o,loading:t}};let iu=e=>e?+e>0?"dark:text-dark-green text-light-green":0>+e?"dark:text-dark-red text-light-red":void 0:"",iv=e=>{var l,i,r;let{chainId:t,tokenAddress:a,selectedTime:o}=e,{data:d,loading:s}=ic({chain:t,tokenAddress:a,interval:o.value});return(0,n.jsxs)("div",{className:"",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(E.Z,{src:null!==(i=null==d?void 0:d.icon)&&void 0!==i?i:"",alt:null==d?void 0:d.symbol,className:"w-6 h-6 rounded-full"}),(0,n.jsx)("span",{children:null==d?void 0:d.symbol})]}),(0,n.jsx)(lG.Z,{loading:s,block:!0,borderRadius:12,className:"h-35 mt-2",children:(0,n.jsxs)("div",{className:"p-2-5 rounded-xl border dark:border-dark-700 border-light-700 mt-2",children:[(0,n.jsxs)("div",{className:"grid grid-cols-3 border-b dark:border-dark-700 border-light-700 pb-2",children:[(0,n.jsx)(ia.r,{title:"Price",value:null==d?void 0:d.priceUsd,prefix:"$",additionalInfo:(0,n.jsxs)("div",{className:"".concat(iu(null==d?void 0:d.priceChangePercent)),children:[(0,n.jsx)(S.Z,{value:(null==d?void 0:d.priceChangePercent)?d.priceChangePercent.toFixed(2):"0",prefix:(null==d?void 0:d.priceChangePercent)&&d.priceChangePercent>0?"+":""}),"%"]})}),(0,n.jsx)(ia.r,{title:"Volume",value:null==d?void 0:d.volume,prefix:"$",additionalInfo:(0,n.jsxs)("div",{className:"".concat(iu(null==d?void 0:d.volumeChange)),children:[(0,n.jsx)(S.Z,{value:(null==d?void 0:d.volumeChange)?d.volumeChange.toFixed(2):"0",prefix:(null==d?void 0:d.volumeChange)&&d.volumeChange>0?"+":""}),"%"]})}),(0,n.jsx)(ia.r,{title:"Total Liquidity",value:null==d?void 0:d.liquidity,prefix:"$",additionalInfo:(0,n.jsxs)("div",{className:"".concat(iu(null==d?void 0:d.liquidityChangePercent)),children:[(0,n.jsx)(S.Z,{value:(null==d?void 0:d.liquidityChangePercent)?d.liquidityChangePercent.toFixed(2):"0",prefix:(null==d?void 0:d.liquidityChangePercent)&&d.liquidityChangePercent>0?"+":""}),"%"]})})]}),(0,n.jsxs)("div",{className:"grid grid-cols-3 pt-2",children:[(0,n.jsx)(ia.r,{title:"FDV",value:null==d?void 0:d.fdv,prefix:"$"}),(0,n.jsx)(ia.r,{title:"Market Cap",value:null==d?void 0:d.marketCap,prefix:"$"}),(0,n.jsx)(ia.r,{title:"Fees",value:null==d?void 0:d.fees,prefix:"$"})]})]})}),(0,n.jsx)(lG.Z,{loading:s,block:!0,borderRadius:12,className:"h-28 mt-2",children:(null==d?void 0:null===(l=d.topPairs)||void 0===l?void 0:l.length)?(0,n.jsx)(id,{data:null!==(r=null==d?void 0:d.topPairs)&&void 0!==r?r:[],chainId:t,className:"mt-2"}):null})]})};var im=i(88740);let ix=e=>{let{title:l,value:i,loading:r=!1}=e;return(0,n.jsx)(lG.Z,{loading:r,className:"w-full",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("div",{className:"text-sm text-light-300 dark:text-dark-300",children:l}),(0,n.jsx)("div",{className:"text-sm",children:i})]})})};var ih=i(62861);let ip=e=>{var l,i,r,t,a,o,d,s,c,u,v,m,x,h,p,g,y,j,b,f,k,w,N,C,T,A,D,P,F,Z,B,M,z,V,L,I,O,q,H,U,_,R,K,Y,$,W,G,X,J,Q,ee,el,ei,er,et,ea,eo,ed,es,en,ec,eu,ev,em,ex,eh,ep,eg,ey,eb,ef,ek,ew,eN,eC,eT,eA,eD,eS,eP,eF,eE,eZ,eB;let{token0:eM,token1:ez,chain:eV,selectedTime:eL}=e,{data:eI,loading:eO}=(0,l3.Z)({chain:eV,skip:0,limit:1,interval:eL.value,config:{aggregated:!0},token0:eM,token1:ez,findPoolsByTokens:!0,operationName:"getAggregatedPairInfo"}),eq=(0,ih.Y)(),eH=(0,ih.Y)();return(0,n.jsxs)("div",{className:"px-4",children:[(0,n.jsx)(lG.Z,{loading:eO,block:!0,borderRadius:12,className:"h-30",children:(0,n.jsxs)("div",{className:"p-2-5 border-px dark:border-dark-700 border-light-700 rounded-xl",children:[(0,n.jsxs)("div",{className:"grid grid-cols-3 border-b-px dark:border-dark-700 border-light-700 pb-2",children:[(0,n.jsx)(ia.r,{title:"High",value:null==eI?void 0:null===(l=eI[0])||void 0===l?void 0:null===(i=l.stats)||void 0===i?void 0:i.maxPriceT0}),(0,n.jsx)(ia.r,{title:"Low",value:null==eI?void 0:null===(r=eI[0])||void 0===r?void 0:null===(t=r.stats)||void 0===t?void 0:t.minPriceT0}),(0,n.jsx)(ia.r,{title:"Price Change",value:null==eI?void 0:null===(a=eI[0])||void 0===a?void 0:null===(o=a.stats)||void 0===o?void 0:o.priceChangePercentT0,className:"".concat((null==eI?void 0:null===(d=eI[0])||void 0===d?void 0:null===(s=d.stats)||void 0===s?void 0:s.priceChangePercentT0)&&(null==eI?void 0:null===(c=eI[0])||void 0===c?void 0:null===(u=c.stats)||void 0===u?void 0:u.priceChangePercentT0)>0?"dark:text-dark-green text-light-green":(null==eI?void 0:null===(v=eI[0])||void 0===v?void 0:null===(m=v.stats)||void 0===m?void 0:m.priceChangePercentT0)&&0>+(null==eI?void 0:null===(x=eI[0])||void 0===x?void 0:null===(h=x.stats)||void 0===h?void 0:h.priceChangePercentT0)?"dark:text-dark-red text-light-red":""),postfix:"%"})]}),(0,n.jsxs)("div",{className:"grid grid-cols-3 pt-2",children:[(0,n.jsx)(ia.r,{title:"Fees",value:null==eI?void 0:null===(p=eI[0])||void 0===p?void 0:null===(g=p.stats)||void 0===g?void 0:g.fees,prefix:"$"}),(0,n.jsx)(ia.r,{title:"Volume",value:null==eI?void 0:null===(y=eI[0])||void 0===y?void 0:null===(j=y.stats)||void 0===j?void 0:j.volume,prefix:"$"}),(0,n.jsx)(ia.r,{title:"Fee APR",value:"-",postfix:""})]})]})}),(0,n.jsx)(lG.Z,{loading:eO,block:!0,borderRadius:12,className:"w-full h-[202px] mt-2",children:(0,n.jsx)(im.B,{className:"border dark:border-dark-700 border-light-700 rounded-xl p-3 mb-3 mt-2",buysCount:null!==(eS=null==eI?void 0:null===(b=eI[0])||void 0===b?void 0:null===(f=b.stats)||void 0===f?void 0:f.buysCount)&&void 0!==eS?eS:0,sellsCount:null!==(eP=null==eI?void 0:null===(k=eI[0])||void 0===k?void 0:null===(w=k.stats)||void 0===w?void 0:w.sellsCount)&&void 0!==eP?eP:0,buysVolume:null!==(eF=null==eI?void 0:null===(N=eI[0])||void 0===N?void 0:null===(C=N.stats)||void 0===C?void 0:C.buysVolume)&&void 0!==eF?eF:0,sellsVolume:null!==(eE=null==eI?void 0:null===(T=eI[0])||void 0===T?void 0:null===(A=T.stats)||void 0===A?void 0:A.sellsVolume)&&void 0!==eE?eE:0,buysSenders:null!==(eZ=null==eI?void 0:null===(D=eI[0])||void 0===D?void 0:null===(P=D.stats)||void 0===P?void 0:P.buysSenders)&&void 0!==eZ?eZ:0,sellsSen
1ders:null!==(eB=null==eI?void 0:null===(F=eI[0])||void 0===F?void 0:null===(Z=F.stats)||void 0===Z?void 0:Z.sellsSenders)&&void 0!==eB?eB:0})}),(0,n.jsxs)("div",{className:"grid gap-1 mt-2",children:[(0,n.jsx)(ix,{title:"1 ".concat(null==eI?void 0:null===(B=eI[0])||void 0===B?void 0:null===(M=B.primaryToken)||void 0===M?void 0:M.symbol),value:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(S.Z,{value:null==eI?void 0:null===(z=eI[0])||void 0===z?void 0:null===(V=z.price)||void 0===V?void 0:V.pricePrimary.toString()}),(0,n.jsx)(E.Z,{src:null==eI?void 0:null===(L=eI[0])||void 0===L?void 0:null===(I=L.primaryToken)||void 0===I?void 0:I.icon,className:"w-4 h-4 rounded-full"})]}),loading:eO}),(0,n.jsx)(ix,{title:"1 ".concat(null==eI?void 0:null===(O=eI[0])||void 0===O?void 0:null===(q=O.secondaryToken)||void 0===q?void 0:q.symbol),value:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(S.Z,{value:null==eI?void 0:null===(H=eI[0])||void 0===H?void 0:null===(U=H.price)||void 0===U?void 0:U.priceSecondary.toString()}),(0,n.jsx)(E.Z,{src:null==eI?void 0:null===(_=eI[0])||void 0===_?void 0:null===(R=_.secondaryToken)||void 0===R?void 0:R.icon,className:"w-4 h-4 rounded-full"})]}),loading:eO}),(0,n.jsx)(ix,{title:"Pooled ".concat(null==eI?void 0:null===(K=eI[0])||void 0===K?void 0:null===(Y=K.primaryToken)||void 0===Y?void 0:Y.symbol),value:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(S.Z,{value:null==eI?void 0:null===($=eI[0])||void 0===$?void 0:null===(W=$.price)||void 0===W?void 0:W.pooledAmountPrimary.toString()}),(0,n.jsx)(E.Z,{src:null==eI?void 0:null===(G=eI[0])||void 0===G?void 0:null===(X=G.primaryToken)||void 0===X?void 0:X.icon,className:"w-4 h-4 rounded-full"})]}),loading:eO}),(0,n.jsx)(ix,{title:"Pooled ".concat(null==eI?void 0:null===(J=eI[0])||void 0===J?void 0:null===(Q=J.secondaryToken)||void 0===Q?void 0:Q.symbol),value:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(S.Z,{value:null==eI?void 0:null===(ee=eI[0])||void 0===ee?void 0:null===(el=ee.price)||void 0===el?void 0:el.pooledAmountSecondary.toString()}),(0,n.jsx)(E.Z,{src:null==eI?void 0:null===(ei=eI[0])||void 0===ei?void 0:null===(er=ei.secondaryToken)||void 0===er?void 0:er.icon,className:"w-4 h-4 rounded-full"})]}),loading:eO}),(0,n.jsx)(ix,{title:"TVL",value:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsxs)("div",{className:(null==eI?void 0:null===(et=eI[0])||void 0===et?void 0:null===(ea=et.stats)||void 0===ea?void 0:ea.liquidityChangePercent)>0?"dark:text-dark-green text-light-green":(null==eI?void 0:null===(eo=eI[0])||void 0===eo?void 0:null===(ed=eo.stats)||void 0===ed?void 0:ed.liquidityChangePercent)<0?"dark:text-dark-red text-light-red":"",children:[(0,n.jsx)(S.Z,{value:null==eI?void 0:null===(es=eI[0])||void 0===es?void 0:null===(en=es.stats)||void 0===en?void 0:en.liquidityChangePercent.toString(),prefix:(null==eI?void 0:null===(ec=eI[0])||void 0===ec?void 0:null===(eu=ec.stats)||void 0===eu?void 0:eu.liquidityChangePercent)>0?"+":""}),"%"]}),(0,n.jsx)(S.Z,{value:null==eI?void 0:null===(ev=eI[0])||void 0===ev?void 0:null===(em=ev.price)||void 0===em?void 0:em.pooledAmountSecondary.toString(),className:"ml-1"})]}),loading:eO}),(0,n.jsx)(ix,{title:"".concat(null==eI?void 0:null===(ex=eI[0])||void 0===ex?void 0:null===(eh=ex.primaryToken)||void 0===eh?void 0:eh.symbol," Address"),loading:eO,value:(0,n.jsx)(ih.Z,{text:"".concat((0,ej.$G)(null==eI?void 0:null===(ep=eI[0])||void 0===ep?void 0:null===(eg=ep.primaryToken)||void 0===eg?void 0:eg.contractAddr,[4,2])),link:"".concat(null===(ey=window.location)||void 0===ey?void 0:ey.origin,"/").concat(eV,"/trade/analytics/tokens/").concat(encodeURIComponent(null==eI?void 0:null===(eb=eI[0])||void 0===eb?void 0:null===(ef=eb.primaryToken)||void 0===ef?void 0:ef.contractAddr)),tooltipCopied:eq,className:"dark:text-dark-100 text-light-100 hover:text-light-100 dark:hover:text-dark-100",copy:()=>{var e,l;navigator.clipboard.writeText(null==eI?void 0:null===(e=eI[0])||void 0===e?void 0:null===(l=e.primaryToken)||void 0===l?void 0:l.contractAddr),eq.run()}})}),(0,n.jsx)(ix,{title:"".concat(null==eI?void 0:null===(ek=eI[0])||void 0===ek?void 0:null===(ew=ek.secondaryToken)||void 0===ew?void 0:e
1w.symbol," Address"),loading:eO,value:(0,n.jsx)(ih.Z,{text:"".concat((0,ej.$G)(null==eI?void 0:null===(eN=eI[0])||void 0===eN?void 0:null===(eC=eN.secondaryToken)||void 0===eC?void 0:eC.contractAddr,[4,2])),link:"".concat(null===(eT=window.location)||void 0===eT?void 0:eT.origin,"/").concat(eV,"/trade/analytics/tokens/").concat(encodeURIComponent(null==eI?void 0:null===(eA=eI[0])||void 0===eA?void 0:null===(eD=eA.secondaryToken)||void 0===eD?void 0:eD.contractAddr)),tooltipCopied:eH,className:"dark:text-dark-100 text-light-100 hover:text-light-100 dark:hover:text-dark-100",copy:()=>{var e,l;navigator.clipboard.writeText(null==eI?void 0:null===(e=eI[0])||void 0===e?void 0:null===(l=e.secondaryToken)||void 0===l?void 0:l.contractAddr),eH.run()}})})]})]})},ig=e=>{var l,i,r,t,a,o,d,s,c,u,v,m,x,h,p,g,y,j,b,f,k,w,N,C,T,A,D,P,F,Z,B,M,z,V,L,I,O,q,H,U,_,R,K,Y,$,W,G,X,J,Q,ee,el,ei,er,et,ea,eo,ed,es,en,ec,eu,ev,em,ex,eh,ep,eg,ey,eb,ef,ek,ew,eN,eC,eT,eA,eD,eS,eP,eF,eE,eB,eM,ez,eV,eL,eI,eO,eq,eH,eU,e_,eR,eK;let{chains:eY,poolAddress:e$,selectedTime:eW}=e,{data:eG,loading:eX,pageInfo:eJ}=(0,l3.Z)({chain:eY,limit:1,skip:0,contractAddr:e$,interval:eW.value,operationName:"getPoolInfo"}),eQ=(0,ih.Y)(),e0=(0,ih.Y)(),e1=(0,ih.Y)();return(0,n.jsxs)("div",{className:"px-4",children:[(0,n.jsxs)("div",{className:"border-b pb-2 dark:border-dark-600 border-light-600",children:[(0,n.jsx)(lG.Z,{loading:eX,block:!0,borderRadius:12,className:"h-30",children:(0,n.jsxs)("div",{className:"p-2-5 border-px dark:border-dark-700 border-light-700 rounded-xl",children:[(0,n.jsxs)("div",{className:"grid grid-cols-3 border-b-px dark:border-dark-700 border-light-700 pb-2",children:[(0,n.jsx)(ia.r,{title:"High",value:null==eG?void 0:null===(l=eG[0])||void 0===l?void 0:null===(i=l.stats)||void 0===i?void 0:i.maxPriceT0}),(0,n.jsx)(ia.r,{title:"Low",value:null==eG?void 0:null===(r=eG[0])||void 0===r?void 0:null===(t=r.stats)||void 0===t?void 0:t.minPriceT0}),(0,n.jsx)(ia.r,{title:"Price Change",value:null==eG?void 0:null===(a=eG[0])||void 0===a?void 0:null===(o=a.stats)||void 0===o?void 0:o.priceChangePercentT0,className:"".concat((null==eG?void 0:null===(d=eG[0])||void 0===d?void 0:null===(s=d.stats)||void 0===s?void 0:s.priceChangePercentT0)&&(null==eG?void 0:null===(c=eG[0])||void 0===c?void 0:null===(u=c.stats)||void 0===u?void 0:u.priceChangePercentT0)>0?"dark:text-dark-green text-light-green":(null==eG?void 0:null===(v=eG[0])||void 0===v?void 0:null===(m=v.stats)||void 0===m?void 0:m.priceChangePercentT0)&&0>+(null==eG?void 0:null===(x=eG[0])||void 0===x?void 0:null===(h=x.stats)||void 0===h?void 0:h.priceChangePercentT0)?"dark:text-dark-red text-light-red":""),postfix:"%"})]}),(0,n.jsxs)("div",{className:"grid grid-cols-3 pt-2",children:[(0,n.jsx)(ia.r,{title:"Fees",value:null==eG?void 0:null===(p=eG[0])||void 0===p?void 0:null===(g=p.stats)||void 0===g?void 0:g.fees,prefix:"$"}),(0,n.jsx)(ia.r,{title:"Volume",value:null==eG?void 0:null===(y=eG[0])||void 0===y?void 0:null===(j=y.stats)||void 0===j?void 0:j.volume,prefix:"$"}),(0,n.jsx)(ia.r,{title:"Fee APR",value:"-",postfix:""})]})]})}),(0,n.jsx)(lG.Z,{loading:eX,block:!0,borderRadius:12,className:"w-full h-[202px] mt-2",children:(0,n.jsx)(im.B,{className:"border dark:border-dark-700 border-light-700 rounded-xl p-3 mt-2 mb-3",buysCount:null!==(eq=null==eG?void 0:null===(b=eG[0])||void 0===b?void 0:null===(f=b.stats)||void 0===f?void 0:f.buysCount)&&void 0!==eq?eq:0,sellsCount:null!==(eH=null==eG?void 0:null===(k=eG[0])||void 0===k?void 0:null===(w=k.stats)||void 0===w?void 0:w.sellsCount)&&void 0!==eH?eH:0,buysVolume:null!==(eU=null==eG?void 0:null===(N=eG[0])||void 0===N?void 0:null===(C=N.stats)||void 0===C?void 0:C.buysVolume)&&void 0!==eU?eU:0,sellsVolume:null!==(e_=null==eG?void 0:null===(T=eG[0])||void 0===T?void 0:null===(A=T.stats)||void 0===A?void 0:A.sellsVolume)&&void 0!==e_?e_:0,buysSenders:null!==(eR=null==eG?void 0:null===(D=eG[0])||void 0===D?void 0:null===(P=D.stats)||void 0===P?void 0:P.buysSenders)&&void 0!==eR?eR:0,sellsSen
1ders:null!==(eK=null==eG?void 0:null===(F=eG[0])||void 0===F?void 0:null===(Z=F.stats)||void 0===Z?void 0:Z.sellsSenders)&&void 0!==eK?eK:0})}),e$?(0,n.jsx)(l0(),{href:{pathname:"/[chain]/trade/analytics/pairs/[id]",query:{chain:eY,id:e$}},className:"text-CTA",children:"Open Full Analytics"}):(0,n.jsx)(n.Fragment,{})]}),(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)(ix,{title:"1 ".concat(null==eG?void 0:null===(B=eG[0])||void 0===B?void 0:null===(M=B.primaryToken)||void 0===M?void 0:M.symbol),value:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(S.Z,{value:null==eG?void 0:null===(z=eG[0])||void 0===z?void 0:null===(V=z.price)||void 0===V?void 0:V.pricePrimary.toString()}),(0,n.jsx)(E.Z,{src:null==eG?void 0:null===(L=eG[0])||void 0===L?void 0:null===(I=L.primaryToken)||void 0===I?void 0:I.icon,className:"w-4 h-4 rounded-full"})]}),loading:eX}),(0,n.jsx)(ix,{title:"1 ".concat(null==eG?void 0:null===(O=eG[0])||void 0===O?void 0:null===(q=O.secondaryToken)||void 0===q?void 0:q.symbol),value:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(S.Z,{value:null==eG?void 0:null===(H=eG[0])||void 0===H?void 0:null===(U=H.price)||void 0===U?void 0:U.priceSecondary.toString()}),(0,n.jsx)(E.Z,{src:null==eG?void 0:null===(_=eG[0])||void 0===_?void 0:null===(R=_.secondaryToken)||void 0===R?void 0:R.icon,className:"w-4 h-4 rounded-full"})]}),loading:eX}),(0,n.jsx)(ix,{title:"Pooled ".concat(null==eG?void 0:null===(K=eG[0])||void 0===K?void 0:null===(Y=K.primaryToken)||void 0===Y?void 0:Y.symbol),value:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(S.Z,{value:null==eG?void 0:null===($=eG[0])||void 0===$?void 0:null===(W=$.price)||void 0===W?void 0:W.pooledAmountPrimary.toString()}),(0,n.jsx)(E.Z,{src:null==eG?void 0:null===(G=eG[0])||void 0===G?void 0:null===(X=G.primaryToken)||void 0===X?void 0:X.icon,className:"w-4 h-4 rounded-full"})]}),loading:eX}),(0,n.jsx)(ix,{title:"Pooled ".concat(null==eG?void 0:null===(J=eG[0])||void 0===J?void 0:null===(Q=J.secondaryToken)||void 0===Q?void 0:Q.symbol),value:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(S.Z,{value:null==eG?void 0:null===(ee=eG[0])||void 0===ee?void 0:null===(el=ee.price)||void 0===el?void 0:el.pooledAmountSecondary.toString()}),(0,n.jsx)(E.Z,{src:null==eG?void 0:null===(ei=eG[0])||void 0===ei?void 0:null===(er=ei.secondaryToken)||void 0===er?void 0:er.icon,className:"w-4 h-4 rounded-full"})]}),loading:eX}),(0,n.jsx)(ix,{title:"TVL",value:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsxs)("div",{className:(null==eG?void 0:null===(et=eG[0])||void 0===et?void 0:null===(ea=et.stats)||void 0===ea?void 0:ea.liquidityChangePercent)>0?"dark:text-dark-green text-light-green":(null==eG?void 0:null===(eo=eG[0])||void 0===eo?void 0:null===(ed=eo.stats)||void 0===ed?void 0:ed.liquidityChangePercent)<0?"dark:text-dark-red text-light-red":"",children:[(0,n.jsx)(S.Z,{value:null==eG?void 0:null===(es=eG[0])||void 0===es?void 0:null===(en=es.stats)||void 0===en?void 0:en.liquidityChangePercent.toString(),prefix:(null==eG?void 0:null===(ec=eG[0])||void 0===ec?void 0:null===(eu=ec.stats)||void 0===eu?void 0:eu.liquidityChangePercent)>0?"+":""}),"%"]}),(0,n.jsx)(S.Z,{value:null==eG?void 0:null===(ev=eG[0])||void 0===ev?void 0:null===(em=ev.price)||void 0===em?void 0:em.pooledAmountSecondary.toString(),className:"ml-1"})]}),loading:eX}),(0,n.jsx)(ix,{title:"TX Amount",value:(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)(S.Z,{value:null==eG?void 0:null===(ex=eG[0])||void 0===ex?void 0:null===(eh=ex.stats)||void 0===eh?void 0:null===(ep=eh.txCount)||void 0===ep?void 0:ep.toString()})}),loading:eX}),(0,n.jsx)(ix,{title:"Pool Type",value:(0,n.jsx)("div",{children:(null==eG?void 0:null===(eg=eG[0])||void 0===eg?void 0:eg.poolType)?null==eG?void 0:null===(ey=eG[0])||void 0===ey?void 0:ey.poolType:"-"}),loading:eX}),(0,n.jsx)(ix,{title:"Pool Number",value:(0,n.jsx)("div",{children:(null==eG?void 0:null===(eb=eG[0])||void 0===eb?void 0:eb.poolId)?"#".concat(null==eG?void 0:null===(ef=eG[0])||void 0===ef?void 0:ef.poolId):"-"}),loading:eX}),(0,n.jsx)(ix,{title:"Pool Created",value:(0,n.jsx)("div",{children:eZ()((null==eG?void 0:null===(ek=eG[0])||void 0===ek?void 0:ek.createdAt)*1e3).format("MM/DD/YYYY HH:mm")}
1),loading:eX})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(ix,{title:"".concat(null==eG?void 0:null===(ew=eG[0])||void 0===ew?void 0:null===(eN=ew.primaryToken)||void 0===eN?void 0:eN.symbol," Address"),loading:eX,value:(0,n.jsx)(ih.Z,{text:"".concat((0,ej.$G)(null==eG?void 0:null===(eC=eG[0])||void 0===eC?void 0:null===(eT=eC.primaryToken)||void 0===eT?void 0:eT.contractAddr,[4,2])),link:"".concat(null===(eA=window.location)||void 0===eA?void 0:eA.origin,"/").concat(eY,"/trade/analytics/tokens/").concat(encodeURIComponent(null==eG?void 0:null===(eD=eG[0])||void 0===eD?void 0:null===(eS=eD.primaryToken)||void 0===eS?void 0:eS.contractAddr)),tooltipCopied:eQ,className:"dark:text-dark-100 text-light-100 hover:text-light-100 dark:hover:text-dark-100",copy:()=>{var e,l;navigator.clipboard.writeText(null==eG?void 0:null===(e=eG[0])||void 0===e?void 0:null===(l=e.primaryToken)||void 0===l?void 0:l.contractAddr),eQ.run()}})}),(0,n.jsx)(ix,{title:"".concat(null==eG?void 0:null===(eP=eG[0])||void 0===eP?void 0:null===(eF=eP.secondaryToken)||void 0===eF?void 0:eF.symbol," Address"),loading:eX,value:(0,n.jsx)(ih.Z,{text:"".concat((0,ej.$G)(null==eG?void 0:null===(eE=eG[0])||void 0===eE?void 0:null===(eB=eE.secondaryToken)||void 0===eB?void 0:eB.contractAddr,[4,2])),link:"".concat(null===(eM=window.location)||void 0===eM?void 0:eM.origin,"/").concat(eY,"/trade/analytics/tokens/").concat(encodeURIComponent(null==eG?void 0:null===(ez=eG[0])||void 0===ez?void 0:null===(eV=ez.secondaryToken)||void 0===eV?void 0:eV.contractAddr)),tooltipCopied:e0,className:"dark:text-dark-100 text-light-100 hover:text-light-100 dark:hover:text-dark-100",copy:()=>{var e,l;navigator.clipboard.writeText(null==eG?void 0:null===(e=eG[0])||void 0===e?void 0:null===(l=e.secondaryToken)||void 0===l?void 0:l.contractAddr),e0.run()}})}),(0,n.jsx)(ix,{title:"Pair Address",loading:eX,value:(0,n.jsx)(ih.Z,{text:"".concat((0,ej.$G)(null==eG?void 0:null===(eL=eG[0])||void 0===eL?void 0:eL.contractAddr,[4,2])),link:"".concat(null===(eI=window.location)||void 0===eI?void 0:eI.origin,"/").concat(eY,"/trade/analytics/pairs/").concat(null==eG?void 0:null===(eO=eG[0])||void 0===eO?void 0:eO.contractAddr),tooltipCopied:e1,className:"dark:text-dark-100 text-light-100 hover:text-light-100 dark:hover:text-dark-100",copy:()=>{var e;navigator.clipboard.writeText(null==eG?void 0:null===(e=eG[0])||void 0===e?void 0:e.contractAddr),e1.run()}})})]})]})};var iy=i(62850);let ij=e=>{let{selectedTime:l,setSelectedTime:i,timeIntervals:r,onClose:t}=e,a=(0,p.P)(e=>e.activePair),o=(0,c.useRouter)(),d=o.query.chain,[s,v]=(0,u.useState)(it.Mf.pool);return(0,u.useEffect)(()=>{a.primary&&a.secondary&&(null==a?void 0:a.poolType)==="indirect"?v(it.Mf.token):(null==a?void 0:a.poolType)==="aggregated"?v(it.Mf.pair):v(it.Mf.pool)},[a]),(0,n.jsx)("div",{children:(0,n.jsxs)(ei.Z,{defaultTab:it.Mf.pool,_activeTab:s,children:[(0,n.jsxs)("div",{className:"flex justify-between items-center pt-3 px-4 ",children:[(0,n.jsx)("div",{className:"flex gap-3",children:Object.keys(it.Mf).map((e,l)=>(0,n.jsx)(ei.Z.Button,{name:e,className:l=>"".concat(e===it.Mf.pool&&(null==a?void 0:a.poolType)==="aggregated"||(e===it.Mf.pool||e===it.Mf.pair)&&(null==a?void 0:a.poolType)==="indirect"?"hidden":""," ").concat(l?"dark:text-dark-primary text-light-primary":"dark:text-dark-secondary text-light-secondary"),children:it.Co[e]}))}),t?(0,n.jsx)(iy.Z,{onClick:t}):null]}),(0,n.jsx)("div",{className:"text-sm pt-3 px-4 sticky top-0 left-0 z-full dark:bg-dark-800 bg-light-800",children:(0,n.jsx)("div",{className:"pb-2",children:(0,n.jsx)(ir,{options:r,selectedTime:l,onSelect:i})})}),(0,n.jsx)(ei.Z.Tab,{name:it.Mf.pair,children:(0,n.jsx)(ip,{chain:d,token0:null==a?void 0:a.primary,token1:null==a?void 0:a.secondary,selectedTime:l})}),(0,n.jsx)(ei.Z.Tab,{name:it.Mf.pool,children:(0,n.jsx)(ig,{chains:d,poolAddress:a.id,selectedTime:l})}),(0,n.jsx)(ei.Z.Tab,{name:it.Mf.token,children:(0,n.jsxs)("div",{className:"px-4 grid gap-4 pb-4",children:[(0,n.jsx)(iv,{chainId:d,selectedTime:l,tokenAddress:null==a?void 0:a.primary}),(0,n.jsx)(iv,{chainId:d,selectedTime:l,tokenAddress:null==a?void 0:a.secondary})]})})]})})};var ib=i(35415);let ik=e=>
1{let{modal:l,selectedTime:i,onTimeSelect:r}=e,t=(0,ib.Z)();return(0,n.jsx)(e1.Z,{...l,className:"w-full",classNameOverlay:"no-max-width",children:(0,n.jsx)("div",{className:"col-span-full rounded-xl dark:bg-dark-800 bg-light-800 w-70 xs3:w-92 md:w-108 overflow-hidden py-3 text-light-100 dark:text-dark-100",children:(0,n.jsx)(ij,{selectedTime:i,setSelectedTime:r,timeIntervals:t,onClose:()=>l.close()})})})};var iw=i(75175);function iN(){let e=(0,c.useRouter)(),l=(0,v.s)(e=>e.url),i=(0,v.s)(e=>e.defaultTokens),[r,t]=(0,u.useState)(!0);(0,u.useEffect)(()=>{!l||e.query.from&&e.query.to||e.replace({pathname:"/[chain]/trade/protrade",query:{chain:l,dashboard:!0,to:i.to,from:i.from}},void 0,{shallow:!0})},[l,e]);let{price:a,token1:o,token2:d}=(0,m.s)(),s=a&&o&&d?"".concat(String(a.toFixed(4))," ").concat(o,"/").concat(d):"TFM",x=(0,p.P)(e=>e.activePair),g=(0,e7.X$)(e=>e.activeProviderTemp),y=(0,u.useMemo)(()=>new eG.O,[]),{orders:j}=(0,lT.Z)({active:!0,asc:!1,chain:l,limit:500,orderType:"limit",sender:null==g?void 0:g.address,client:y,isOnLoad:!0}),[b,f]=(0,u.useState)(400),k=(0,u.useRef)(null);(0,u.useEffect)(()=>{var e;null==k||null===(e=k.current)||void 0===e||e.addEventListener("pointerdown",e=>{var l,i,r;null==k||null===(l=k.current)||void 0===l||l.setPointerCapture(e.pointerId);let t=e=>{{let l=window.innerHeight;f((0,lq.u)(e.clientY-170,0,l-200))}},a=e=>{var l,i,r;null==k||null===(l=k.current)||void 0===l||l.removeEventListener("pointermove",t),(null==k?void 0:null===(i=k.current)||void 0===i?void 0:i.hasPointerCapture(e.pointerId))&&(null==k||null===(r=k.current)||void 0===r||r.releasePointerCapture(e.pointerId))};null==k||null===(i=k.current)||void 0===i||i.addEventListener("pointermove",t),null==k||null===(r=k.current)||void 0===r||r.addEventListener("pointerup",a)})},[]);let w=(0,p.P)(e=>e.selectedFormTab),N=(0,p.P)(e=>e.setSelectedFormTab),C=(0,v.s)(e=>e.features),[T,A]=(0,u.useState)({label:"24H",value:"1d",active:"24 Hours",secValue:86400,dateFormat:"MMM D, YYYY, hh:mm A",utc:!0}),D=(0,e1.d)(),[S,F]=(0,lK.Z)("slippage",{slippage:"".concat(lY.fc),custom:""}),E=(0,l$.g)(e=>e.positionForm),Z=(0,e1.d)(),B=(0,ib.Z)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(h(),{children:[(0,n.jsx)("title",{children:s}),(0,n.jsx)("meta",{property:"og:image",content:"https://tfm.com/images/meta/meta-tfm-proSwap.png"}),(0,n.jsx)("meta",{name:"twitter:image",content:"https://tfm.com/images/meta/meta-tfm-proSwap.png"})]}),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(P.k,{children:(0,n.jsxs)(lj.y,{children:[(0,n.jsx)(lR.Z,{settingsModal:D,setSlippageSettings:F,slippageSettings:S}),(0,n.jsx)(ik,{selectedTime:T,onTimeSelect:A,modal:Z}),(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 grid-rows-max-1fr lg3:grid-rows-1 ".concat("right"===E?"lg3:grid-cols-fr-max":"lg3:grid-cols-max-fr"," gap-1-5 lg:gap-4 px-4 mt-2"),children:[(0,n.jsxs)("div",{className:"contents lg3:grid grid-rows-max-1fr gap-1 min-h-full ".concat("right"===E?"order-0":"order-1"),children:[(0,n.jsxs)("div",{className:"col-span-full grid grid-cols-1 lg2:grid-cols-max-fr gap-1",children:[(0,n.jsx)(iw.Z,{type:"dropdown"}),(0,n.jsx)("div",{className:"w-full min-h-17 dark:bg-dark-800 bg-light-800 rounded-tr-xl rounded-lg",children:(0,n.jsx)(l8,{onAnalytics:()=>Z.open()})})]}),(0,n.jsx)("div",{className:"grid grid-cols-1 lg3:hidden h-full",children:(0,n.jsx)(ie,{orders:j,activeTab:w,onSelectTab:N,onSettings:()=>D.open(),setSlippageSettings:F,slippageSettings:S})}),(0,n.jsxs)("div",{className:"hidden lg3:grid grid-cols-fr-max",children:[(0,n.jsxs)("div",{style:{gridTemplateRows:"".concat(b,"px ").concat(window.innerHeight-b-200,"px")},className:"grid gap-1 grid-cols-1",children:[(0,n.jsxs)("div",{className:"relative rounded-lg",children:[(0,n.jsx)(ee,{id:null==x?void 0:x.id}),(0,n.jsx)("div",{ref:k,className:"absolute bottom-1 w-full h-0 flex justify-center items-center",children:(0,n.jsx)(lU,{className:"cursor-row-resize rotate-90 "})})]}),(0,n.jsx)("div",{className:"relative w-full",children:(0,n.jsx)(lO,{limitOrders:j})})]}),C.includes(l9.X.orderbook)?(0,n.jsxs)("div",{className:"".concat(r?"min-w-71 xl2-5:min-w-90 ml-1":"min-w-0"," protrade-orderbook relative transition-all duration-500"),children:[r?(0,n.jsx)(L,{}):null,(0,n.jsx)("div",{className:"absolute ".concat(r?"left-0":"left-0.5"," top-1/4 -translate-y-1/4"),onClick:()=>t(e=>!e),children:(0,n.jsx)(lU,{className:"".concat(r?"transform rotate-180":"")})})]}):null]})]}),(0,n.jsxs)("div",{className:"hidden md:grid grid-rows-max-1fr gap-1 h-full lg3:max-w-85 xl2-5:max-w-92 protrade-swap-and-info",children:[(0,n.jsx)("div",{className:"max-w-full",children:(0,n.jsx)(l_.I,{activeTab:w,onSelectTab:N,onSettings:()=>D.open(),setSlippageSettings:F,slippageSettings:S})}),(0,n.jsx)("div",{className:"hidden lg3:block dark:bg-dark-800 bg-light-800 rounded-lg rounded-b-xl overflow-y-auto scrollbar-tune relative",children:(0,n.jsx)(ij,{selectedTime:T,setSelectedTime:A,timeIntervals:B})})]})]})]})})})]})}},89343:function(e,l,i){"use strict";var r=i(85893);
1i(67294);let t=e=>{let{width:l=24,height:i=24}=e;return(0,r.jsxs)("svg",{width:l,height:i,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsxs)("g",{clipPath:"url(#clip0_13375_171941)",children:[(0,r.jsx)("circle",{cx:"11.9992",cy:"12.0002",r:"10.8",stroke:"currentColor"}),(0,r.jsx)("path",{d:"M12 6.75V12H15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0_13375_171941",children:(0,r.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})};l.Z=t},60938:function(e,l,i){"use strict";i.d(l,{Z:function(){return n}});var r=i(85893),t=i(67294);let a=()=>(0,r.jsx)("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M8 9.75L4.25 6L8 2.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),o=()=>(0,r.jsx)("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M5 2.25L8.75 6L5 9.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),d=e=>{let{children:l,onClick:i,active:t=!1,disabled:a=!1,className:o="",noBorder:d=!1}=e;return(0,r.jsx)("button",{onClick:i,disabled:a,className:" min-w-[2rem] px-1 h-8 flex items-center justify-center  ".concat(!d&&"border-solid border-r-px dark:border-black-80 border-theme-light-border-2","\n         ").concat(t?"bg-theme-deep-blue rounded-base text-white":"".concat(!a&&"hover:bg-light-gray-text dark:hover:bg-black-80 cursor-pointer")," \n         ").concat(a&&"border-theme-light-border-2"," ").concat(o),children:l})},s=e=>{let{page:l,setPage:i,maxPage:s,simplified:n=!1}=e,c=[];for(let e=1;e<=s;e++)c.push(e);let[u,v]=(0,t.useState)([]);return(0,t.useEffect)(()=>{if(n)return;let e=l+1,r=[...u],t="... ",a=" ...";if(c.length<6)r=c;else if(e>=1&&e<=3)r=[1,2,3,4,"...",c.length];else if(4===e&&s>6){let e=c.slice(0,5);r=[...e,"...",c.length]}else if(4===e&&6===s){let l=c.slice(e-2,e),i=c.slice(e,e+1);r=[1,t,...l,...i,c.length]}else if(e>4&&e<c.length-2){let l=c.slice(e-2,e),i=c.slice(e,e+1);r=[1,t,...l,...i,a,c.length]}else if(e>c.length-3){let e=c.slice(c.length-4);r=[1,t,...e]}else e===+a?i(u[3]+1):e===+t&&i(u[3]-3);v(r)},[l,s,n]),s>1?(0,r.jsxs)("div",{className:"flex rounded-base overflow-hidden border-px dark:border-black-80 border-theme-light-border-2",children:[(0,r.jsx)(d,{onClick:()=>i(Math.max(0,l-1)),disabled:l===Math.max(0,l-1)||!s&&!l,children:(0,r.jsx)(a,{})}),u.map((e,t)=>(0,r.jsx)(d,{onClick:()=>i(e-1),active:e===l+1,disabled:"..."===e||" ..."===e||"... "===e,children:e},e)),(0,r.jsx)(d,{disabled:l===Math.min(s-1,l+1)||!s&&!l,onClick:()=>i(Math.min(s-1,l+1)),noBorder:!0,children:(0,r.jsx)(o,{})})]}):n?(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(d,{onClick:()=>i(l-1),disabled:0===l||!l,className:"border-px border-solid dark:border-black-80 border-theme-light-border-2 rounded-base",children:(0,r.jsx)(a,{})}),(0,r.jsxs)("div",{className:"mx-2",children:["Page ",l+1]}),(0,r.jsx)(d,{disabled:void 0===l,onClick:()=>i(l+1),className:"border-solid border-px dark:border-black-80 border-theme-light-border-2 rounded-base",children:(0,r.jsx)(o,{})})]}):null};var n=s},62586:function(e,l,i){"use strict";var r,t=i(85893),a=i(67294),o=i(84263),d=i(3093),s=i(64086);let n=(e,l)=>(0,t.jsx)("div",{className:l,children:null!==(r=null==e?void 0:e.label)&&void 0!==r?r:""}),c=(e,l)=>(0,t.jsx)("div",{className:l,children:(0,t.jsx)("div",{className:"flex transition-all dark:text-white text-black-90 ".concat(e?"rotate-180":""),children:(0,t.jsx)(d.Z,{width:12,height:12})})}),u=e=>{let{responcivePosition:l=!1,options:i=[],children:r,onChange:d,value:u=null,disabled:v=!1,classNames:m={optionsContainer:()=>"w-full",selected:()=>"",arrow:()=>"",container:()=>"",displayRow:()=>""},defaultSelectedIndex:x=0,selectedElement:h=n,arrowElement:p=c,notRelativeContainer:g,disabledPosition:y,disabledScroll:j,timeSelector:b,possition:f="left",positionY:k=null,wrapper:w=e=>{let{children:l}=e;return(0,t.jsx)(t.Fragment,{children:l})}}=e,N=(0,s.Z)(),[C,T]=(0,a.useState)(!1),[A,D]=(0,a.useState)(x>=0?x:0),[S,P]=(0,a.useState)(0);(0,a.useEffect)(()=>{(N.isPc||N.isLaptop||N.isNetbook)&&P(-10)},[N]);let F=(0,a.useRef)(),E=(0,a.useCallback)(()=>{v||T(e=>!e)},[v]);(0,a.useLayoutEffect)(()=>{let e=e=>{let l=e.target.closest("[data-dropdown-base]");l&&l===F.current||T(!1)};return C?document.addEventListener("click",e):document.removeEventListener("click",e),()=>{document.removeEventListener("click",e)}},[C]);let Z=e=>m[e]?m[e]({open:C,disabled:v}):"";return(0,t.jsxs)("div",{ref:F,"data-dropdown-base":!0,className:"".concat(g?"":"relative"," ").concat(Z("container")),children:[(0,t.jsxs)("div",{className:"grid grid-rows-1fr grid-cols-1fr-max w-full h-full whitespace-nowrap ".concat(v?"cursor-default":"cursor-pointer"," ").concat(Z("displayRow")),onClick:E,children:[(0,t.jsx)("div",{className:"w-full select-none my-auto",children:u&&h(u,Z("selected"))}),(0,t.jsx)("div",{className:"flex items-center",children:p(C,Z("arrow"))})]}),(0,t.jsx)("div",{className:"absolute overflow-hidden w-full min-w-max ".concat(!l||N.isPc||N.isLaptop||N.isNetbook?"mt-12":""," ").concat(y?"":"left"===f?"left-0":"right"===f?"right-0":"-left-20"," z-30 ").concat(Z("optionsContainer")),style:{to
1p:"bottom"===k?"":"-".concat(S+10,"px"),bottom:"bottom"===k?45:""},children:(0,t.jsx)(o.Z,{open:C,responcivePosition:l,className:"".concat(j?"w-full":"max-h-65 overflow-y-auto scrollbar-tune"," min-w-28"),children:(0,t.jsx)(w,{children:i.map((e,l)=>a.cloneElement(r(e,l,l===A),{onClick:()=>{D(l),T(!1),d(e)},key:l}))})})})]})};l.ZP=u},13526:function(e,l,i){"use strict";i.d(l,{Z:function(){return d}});var r=i(85893);i(67294);let t=e=>{let{leftArrowColor:l="",rightArrowColor:i=""}=e;return(0,r.jsxs)("svg",{className:"h-full w-full",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{stroke:l||"currentColor",d:"M10.9375 12.0001V3.57764M10.9375 12.0001L8.875 9.97871M10.9375 12.0001L13 9.97871",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{stroke:i||"currentColor",d:"M5.0625 3V11.4225M5.0625 3L3 5.02139M5.0625 3L7.125 5.02139",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})};var a=i(86596);let o=e=>{let{colors:l,asc:i}=e,o=(0,a.f)(e=>e.theme);return(0,r.jsx)("div",{children:l?l&&!i?(0,r.jsx)(t,{leftArrowColor:"".concat("light"===o?"#262433":"#EEEEEE"),rightArrowColor:"".concat("light"===o?"#BEBCC6":"#565467")}):l&&i?(0,r.jsx)(t,{leftArrowColor:"".concat("light"===o?"#BEBCC6":"#565467"),rightArrowColor:"".concat("light"===o?"#262433":"#EEEEEE")}):(0,r.jsx)(t,{}):(0,r.jsx)(t,{})})};var d=o},48306:function(e,l,i){"use strict";i.d(l,{F:function(){return a}});var r=i(85893),t=i(67294);let a=e=>{let{timestamp:l}=e,i=e=>{let l=Math.floor((new Date().getTime()-e.getTime())/1e3),i=l/31536e3;return i>1?"".concat(Math.floor(i)," year").concat(Math.floor(i)>1?"s":""," ago"):(i=l/2592e3)>1?"".concat(Math.floor(i)," month").concat(Math.floor(i)>1?"s":""," ago"):(i=l/86400)>1?"".concat(Math.floor(i)," day").concat(Math.floor(i)>1?"s":""," ago"):(i=l/3600)>1?"".concat(Math.floor(i)," hour").concat(Math.floor(i)>1?"s":""," ago"):(i=l/60)>1?"".concat(Math.floor(i)," min ago"):"".concat(Math.floor(l)," sec ago")},[a,o]=(0,t.useState)(i(new Date(l)));return(0,t.useEffect)(()=>{let e=setInterval(()=>{o(i(new Date(l)))},1e3);return()=>clearInterval(e)},[l]),(0,r.jsx)("div",{children:a})}},11496:function(e,l,i){"use strict";i.d(l,{t:function(){return s}});var r=i(85893),t=i(80156),a=i(41664),o=i.n(a),d=i(67294);let s=e=>{let{address:l,chain:i,target:a,children:s,className:n}=e,c=(0,d.useMemo)(()=>i===t.jI.terra2?"https://chainsco.pe/terra2/address/"+l:i===t.jI.terraClassic?"https://finder.terra.money/classic/address/"+l:i===t.jI.juno?"https://www.mintscan.io/juno/account/"+l:i===t.jI.osmosis?"https://www.mintscan.io/osmosis/account/"+l:i===t.jI.stargaze?"https://www.mintscan.io/stargaze/account/"+l:i===t.jI.omniflix?"https://www.mintscan.io/omniflix/account/"+l:i===t.jI.neutron?"https://www.mintscan.io/neutron/account/"+l:i===t.jI.sei?"https://www.mintscan.io/sei/account/"+l:i===t.jI.injective?"https://www.mintscan.io/injective/account/"+l:"",[i,l]);return(0,r.jsx)(o(),{legacyBehavior:!0,rel:"noopener noreferrer",href:c,target:a,className:n,children:s})}},95445:function(e,l,i){"use strict";i.d(l,{s:function(){return c}});var r=i(67294),t=i(10233),a=i(8964),o=i(83263),d=i(11163);let s=["ibc/8242AD24008032E457D2E12D46588FD39FB54FB29680C6C7663D296B383C37C4","ibc/F17C9CA112815613C5B6771047A093054F837C3020CBA59DFFD9D780A8B2984C","ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4","ibc/9F9B07EF9AD291167CF5700628145DE1DEB777C2CFC7907553B24446515F6D0E","ibc/71B441E27F1BBB44DD0891BCD370C2794D404D60A4FFE5AECCD9B1E28BC89805","ibc/231FD77ECCB2DB916D314019DA30FE013202833386B1908A191D16989AD80B5A","ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858","ibc/4ABBEF4C8926DDDB320AE5188CFD63267ABBCEFC0583E4AE05D6E5AA2401DDAB","ibc/2108F2D81CBE328F371AD0CEF56691B18A86E08C3651504E42487D9EE92DDE9C","ibc/6B99DB46AA9FF47162148C1726866919E44A6A5E0274B90912FD17E19A337695","ibc/6b99db46aa9ff47162148c1726866919e44a6a5e0274b90912fd17e19a337695","ibc/EAC38D55372F38F1AFD68DF7FE9EF762DCF69F26520643CF3F9D292A738D8034","ibc/57503D7852EF4E1899FE6D71C5E81D7C839F76580F86F21E39348FC2BC9D7CE2","ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349","ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81","ibc/B3504E092456BA618CC28AC671A71FB08C6CA0FD0BE7C8A5B5A3E2DD933CC9E4","ibc/CBF67A2BCF6CAE343FDF251E510C8E18C361FC02B23430C121116E0811835DEF","ibc/AC65808D27055D0A44359F4196176B7017C124DE9E866F48BC793C13291BA992","ibc/2C962DAB9F57FE0921435426AE75196009FAA198
11BF86991203C8411F8980FDB","factory/sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l/3Ri4N719RQfQaudHiB9CMCYACtK3aieoz1q1Ph24VdAb","factory/sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l/DUVFMY2neJdL8aE4d3stcpttDDm5aoyfGyVvm29iA9Yp","factory/sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l/Hq4tuDzhRBnxw3tFA5n6M52NVMVcC19XggbyDiJKCD6H","factory/sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l/3VKKYtbQ9iq8f9CaZfgR6Cr3TUj6ypXPAn6kco6wjcAu","factory/sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l/7edDfnf4mku8So3t4Do215GNHwASEwCWrdhM5GqD51xZ","factory/sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l/871jbn9unTavWsAe83f2Ma9GJWSv6BKsyWYLiQ6z3Pva","factory/sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l/9fELvUhFo6yWL34ZaLgPbCPzdk9MD1tAzMycgH45qShH","factory/sei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l/HktfLoADCk9mnjv7XJiN4YXK9ayE6xinLzt8wzcsR2rY","ibc/F082B65C88E4B6D5EF1DB243CDA1D331D002759E938A0F5CD3FFDC5D53B3E349","ibc/4ABBEF4C8926DDDB320AE5188CFD63267ABBCEFC0583E4AE05D6E5AA2401DDAB","ibc/90C6F06139D663CFD7949223D257C5B5D241E72ED61EBD12FFDDA6F068715E47","ibc/24E5D0825D3D71BF00C4A01CD8CA8F2D27B1DD32B7446CF633534AEA25379271","ibc/7965483148018AFAA12DC569959897E7A5E474F4B41A87FFC5513B552C108DB5","ibc/DF32F083238097AD2CA5444BFB8F338534C32865EFE0696C5AF89AFB3A0144D6","ibc/2CBC2EA121AE42563B08028466F37B600F2D7D4282342DE938283CC3FB2BC00E","factory/inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk/inj1q6zlut7gtkzknkk773jecujwsdkgq882akqksk","peggy0xdAC17F958D2ee523a2206206994597C13D831ec7","ibc/4ABBEF4C8926DDDB320AE5188CFD63267ABBCEFC0583E4AE05D6E5AA2401DDAB","peggy0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","factory/inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk/inj1l9eyrnv3ret8da3qh8j5aytp6q4f73crd505lj","ibc/2CBC2EA121AE42563B08028466F37B600F2D7D4282342DE938283CC3FB2BC00E","uluna","ujuno","untrn","usei","uosmo","inj","ibc/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7","ibc/D1542AA8762DB13087D8364F3EA6509FD6F009A34F00426AF9E4F9FA85CBBF1F","ibc/EA1D43981D5C9A1C4AAEA9C23BB1D4FA126BA9BC7020A25E0AE4AA841EA25DC5","ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2","juno1u45shlp0q4gcckvsj06ss4xuvsu0z24a0d0vr9ce6r24pht4e5xq7q995n","juno1mkw83sv6c7sjdvsaplrzc8yaes9l42p4mhy0ssuxjnyzl87c9eps7ce3m9"],n=(e,l)=>{for(let i of s){if(e===i)return{primary:l,secondary:e};if(l===i)break}return{primary:e,secondary:l}},c=()=>{var e,l;let i=(0,a.s)(e=>e.url),s=(0,a.s)(e=>e.assetsInfo),c=(0,r.useMemo)(()=>new t.O,[]),[u,v]=(0,r.useState)(),{query:m}=(0,d.useRouter)(),{primary:x,secondary:h}=n(m.from,m.to);(0,r.useEffect)(()=>{null==c||c.unsubscribe(),i&&(0,o.P6)(c,i,x,h,"",v)},[i,m]);let p=null===(e=s[x])||void 0===e?void 0:e.symbol,g=null===(l=s[h])||void 0===l?void 0:l.symbol;return{price:u,token1:p,token2:g}}}},function(e){e.O(0,[9926,2580,2863,9750,1066,5153,8852,9717,9774,2888,179],function(){return e(e.s=21747)}),_N_E=e.O()}]);

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.