1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[67,336,1023,2802,7955],{4976:(e,l,t)=>{"use strict";t.d(l,{h:()=>a});var r=t(37876),o=t(49995),s=t(14232),i=t(85240),n=t.n(i);let a=(0,s.forwardRef)((e,l)=>{let{classes:t,children:i,className:a,style:c,dividerStyle:d="solid",color:u="var(--divider)",absolute:p=!1,variant:m="fullWidth",orientation:x="horizontal",flexItem:h,textAlign:f,spacing:_=12,dividerWidth:g=1,...v}=e,b=(0,s.useMemo)(()=>({"--mui-divider-color":u,"--mui-divider-style":d,"--mui-divider-width":"number"==typeof g?`${g}px`:g,"--mui-divider-spacing":`${_}px`}),[d,g,_,u]);return(0,r.jsx)("div",{ref:l,style:{...c,...b},className:(0,o.default)(a,"MuiDivider-root",n().root,null==t?void 0:t.root,{[n().inset]:"inset"===m,[n().middleHorizontal]:"middle"===m&&"horizontal"===x,[n().middleVertical]:"middle"===m&&"vertical"===x,[n().horizontalWithChild]:i&&"horizontal"===x,[n().verticalWithChild]:i&&"vertical"===x,[n().rightWithChild]:i&&"right"===f&&"vertical"!==x,[n().leftWithChild]:i&&"left"===f&&"vertical"!==x},p&&["MuiDivider-absolute",n().absolute,null==t?void 0:t.absolute],"fullWidth"===m&&["MuiDivider-fullWidth",null==t?void 0:t.fullWidth],"inset"===m&&["MuiDivider-inset",null==t?void 0:t.inset],"middle"===m&&["MuiDivider-middle",null==t?void 0:t.middle],"vertical"===x&&["MuiDivider-vertical",n().vertical,null==t?void 0:t.vertical],h?["MuiDivider-flexItem",n().flexItem,null==t?void 0:t.flexItem]:null,i?["MuiDivider-withChildren",n().withChildren,null==t?void 0:t.withChildren]:null),...v,children:i?(0,r.jsx)("div",{className:(0,o.default)("MuiDivider-wrap",null==t?void 0:t.wrap,{[n().wrapHorizontal]:"horizontal"===x,[n().wrapVertical]:"vertical"===x}),children:i}):null})})},5443:(e,l,t)=>{"use strict";t.r(l),t.d(l,{__N_SSP:()=>ok,default:()=>oN});var r=t(37876),o=t(92424),s=t(38795),i=t(29336),n=t(80997),a=t(9144),c=t(72997),d=t(78108),u=t(5811),p=t(18233),m=t.n(p),x=t(49995),h=t(35195),f=t(58700),_=t(5405);function g(e){let{kind:l,instrumentName:t,market:o,instrumentId:s}=e,i=(0,d.i)(t,o,s),{precision:n}=(0,_.B)({kind:l,instrumentName:t});return(0,r.jsx)(u.nu,{children:()=>{var e,l,t;let o=m().normal;return(null==(e=i.data)?void 0:e.lastPriceChangeState)===-1?o=m().down:(null==(l=i.data)?void 0:l.lastPriceChangeState)===1&&(o=m().up),(0,r.jsx)("span",{className:(0,x.default)(m()["ticker-box"],o),children:(0,h.gS)((0,f.M)({value:null==i||null==(t=i.data)?void 0:t.last_price,acc:n.price,format:!0}))})}})}var v=t(47215),b=t(25861),y=t(27321),j=t(37374),w=t(45350),T=t(28589),k=t(68483),N=t(80968),S=t(40328),I=t(89099),A=t(14232),C=t(37626),O=t(95522),P=t(53031),M=t(47887),H=t(36162),B=t(36748),R=t(67811),L=t(4976),F=t(60999),z=t(69887),D=t(5723),E=t(97481),$=t(48677),W=t(57358),G=t(29209),K=t(19485);let V={1:(0,r.jsx)("img",{src:"/static-lib/img/illus/I4EKsn1GoxUzzRfa.png",width:"20px",alt:""}),2:(0,r.jsx)("img",{src:"/static-lib/img/illus/dPkxilm2M0fzcE9D.png",width:"20px",alt:""}),3:(0,r.jsx)("img",{src:"/static-lib/img/illus/SbP9bw1DGAwWDXlj.png",width:"20px",alt:""})},q={spot:"SpotItem",margin:"MarginItem",perpetual:"StaticPerpetual",future:"StaticFutures"};function U(e){let{data:l,onClose:t,onClear:o,searchHistory:s,...i}=e,{symbol:n}=(0,B.g)(),a=(0,I.useRouter)(),c=(0,H.g)((e,l)=>{a.push(function(e,l){let t=Reflect.get(q,l);
1return(0,w.Yn)(t,{params:{symbol:e}})}(l.instrumentName,l.kind)),null==t||t()}),{t:d}=(0,C.B)();return(0,r.jsxs)("div",{className:(0,K.AH)({pt:"24px",height:"calc(100% - 96px)",display:"flex",flexDirection:"column"}),...i,children:[(0,r.jsx)("h4",{className:(0,K.AH)({px:"16px",mb:"16px"}),children:d("Public.HotSearch")}),(0,r.jsx)("div",{className:(0,K.AH)({flexGrow:1,overflowY:"auto"}),children:(0,r.jsx)(F.A,{disablePadding:!0,component:"nav",sx:{overflow:"auto",lineHeight:1},children:l.map((e,l)=>{let t=l+1,o=e.fireCount,s="perpetual"===e.kind;return(0,r.jsx)(z.Ay,{secondaryAction:(0,r.jsx)(W.B,{direction:"row",spacing:8,css:{fontSize:"0px",pr:"16px"},children:Array(o).fill(1).map((e,l)=>(0,r.jsx)("img",{src:"/static-lib/img/icon-multi/PqisxMWLIcXWNxjL.svg",width:"14px",alt:""},l))}),disableGutters:!0,disablePadding:!0,children:(0,r.jsxs)(D.A,{selected:n===e.instrumentName,onClick:l=>c(l,e),children:[(0,r.jsx)(E.A,{children:Reflect.get(V,t)??(0,r.jsx)("span",{className:(0,K.AH)({width:"20px",textAlign:"center",fontWeight:500}),children:t})}),(0,r.jsx)($.A,{primary:`${e.showName} ${s?d("Public.SearchHistory.PerpetualSymbol"):""}`,primaryTypographyProps:{variant:"h6",my:.25,fontWeight:500}})]})},e.instrumentId)})})}),s.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L.h,{}),(0,r.jsxs)("div",{className:(0,K.AH)({px:"16px",pt:"24px"}),children:[(0,r.jsxs)(W.B,{direction:"row",justifyContent:"space-between",css:{mb:"16px"},children:[(0,r.jsx)("h4",{children:d("Public.SearchHistory")}),(0,r.jsx)(R.I,{variant:"text",color:"inherit",onClick:o,children:(0,r.jsx)("span",{className:(0,K.AH)({color:"text-secondary"}),children:d("Public.SearchHistory.Clear")})})]}),(0,r.jsx)(W.B,{direction:"row",spacing:12,children:s.map(e=>(0,r.jsx)(R.I,{size:"medium",color:"secondary",onClick:()=>
1{a.push((0,w.Yn)(e.pathName,{params:{symbol:e.instrumentName}})),null==t||t()},children:e.name},e.instrumentName))})]})]})]})}function Y(e){let{children:l,showHot:t,...o}=e,[[s=[]]]=(0,M.F)([G.r.queryHotSearch],{deps:[]}),{isLimited:i}=(0,P.o)(),n=(0,A.useMemo)(()=>s.filter(e=>!i(e.instrumentName)),[s,i]);return(0,r.jsx)(r.Fragment,{children:t?(0,r.jsx)(U,{data:n,...o}):l})}var X=t(20935),Z=t(78475),Q=t.n(Z);function J(e){let{onClose:l}=e,{t}=(0,C.B)(),[o,s]=(0,A.useState)(""),[i,n]=(0,A.useState)("spot"),[a,c]=(0,A.useState)(!1),{push:d}=(0,I.useRouter)(),[u]=(0,A.useState)(()=>T.S.get(`${y.h}_spot`)??[]),p=(0,A.useCallback)(e=>{let{currentTarget:l}=e,{dataset:{id:t}}=l;t&&n(t)},[]),m=(0,A.useCallback)(e=>{null==l||l(),d({pathname:(0,w.Yn)("SpotItem",{params:{symbol:e.n}}),hash:location.hash})},[l,d]);return(0,r.jsxs)("div",{className:Q().root,children:[(0,r.jsx)(v.B,{onClose:l,children:t("Public.SearchBtn")}),(0,r.jsx)("div",{className:Q()["action-box"],children:(0,r.jsx)(N.I,{className:Q()["search-input"],color:"secondary",placeholder:`${t("Public.SearchBtn")}`,value:o,size:"medium",onChange:e=>{let l=(0,j.u)(e.currentTarget," ");s(l),l||c(!0)},onFocus:e=>{e.stopPropagation(),c(!0)},onBlur:()=>{setTimeout(()=>{c(!1)},160)},startAdornment:(0,r.jsx)(k.t,{code:"icon-search",sx:{fontSize:16,color:"var(--inputDivider)"}})})}),(0,r.jsxs)(Y,{onClick:()=>{c(!1)},showHot:a&&!o,searchHistory:u,onClose:l,children:[(0,r.jsxs)("div",{className:Q()["tab-box"],children:[(0,r.jsx)(S.A,{"data-id":"favorite",className:(0,x.default)(Q()["tab-btn"],{[Q().active]:"favorite"===i}),onClick:p,children:"Favorites"}),(0,r.jsx)(S.A,{"data-id":"spot",className:(0,x.default)(Q()["tab-btn"],{[Q().active]:"spot"===i}),onClick:p,children:t("Trade.Spot")})]}),"favorite"===i?(0,r.jsx)("div",{className:Q()["favorite-list-box"],children:(0,r.jsx)(b.Ef,{kind:"spot",currency:"SPOT",children:(0,r.jsx)(O.j,{onRowClick:m,kind:"spot",query:null==o?void 0:o.toUpperCase()})})}):null,"spot"===i?(0,r.jsx)(X.p,{onRowClick:m,query:null==o?void 0:o.toUpperCase(),className:Q()["trade-list-box"],kind:"spot"}):null]})]})}var ee=t(26786);function el(){ee.G.go("showChartDrawer")}function et(){ee.G.go("showTradeSetting")}function er(){""!==ee.G.hashName&&ee.G.clear()}var eo=t(2265),es=t(50982),ei=t(37967),en=t(28608),ea=t(73040);function ec(e){let{children:l,instrumentName:t}=e,{beginTime:o,disabled:s}=(0,en.M)(),{countdownComplete:i,...n}=(0,es.A)(o,ei.S.resubscribeAll);return s?(0,r.jsx)("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,r.jsx)(ea.A,{instrumentName:t,startTime:Number(o),countdown:n})}):(0,r.jsx)(r.Fragment,{children:l})}var ed=t(69556),eu=t(39355),ep=t(51890),em=t(38172),ex=t(25833),eh=t(46772),ef=t(20079),e_=t(69948),eg=t(33951),ev=t(18518),eb=t(87986),ey=t(69035),ej=t(70510),ew=t(20569),eT=t(51129),ek=t(39200);function eN(e){let{children:l,instrumentData:t}=e,o=(0,A.useMemo)(()=>(0,ek.EK)(t),[t]),{asksFirst:s,bidsLast:i}=(0,ew.f)(t.instrument_name,t.instrId),n=(0,eT.d)(t??null,(null==t?void 0:t.kind)==="spot"?"mark":void 0),a=(0,u.iz)(()=>({bid1:"",ask1:"",mp:n.value}));return(0,r.jsx)(u.nu,{render:()=>(a.bid1=i.price??"",a.ask1=s.price??"",a.mp=n.value??"",(0,r.jsx)(r.Fragment,{children:t?null==l?void 0:l(a,o):null}))})}var eS=t(42422),eI=t(96565),eA=t(87354),eC=t(85901),eO=t(26389),eP=t(14924);function eM(e,l,t,r){let o=r?(0,eO.mi)(e?null==r?void 0:r.min_trade_amount:null==r?void 0:r.tick_size).dp():2,s=e?(0,eO.mi)(l).div(t):(0,eO.mi)(l).multipliedBy(t);return`â ${s.isNaN()?(0,eO.mi)(0).toFixed(o):s.toFixed(o)} ${e?null==r?void 0:r.quote_currency:null==r?void 0:r.base_currency}`}function eH(e){let{d:{market_amount_order:l,amount:t},o,price:s}=e;return(0,r.jsx)(r.Fragment,{children:eM(!!l,t,s,o)})}function eB(e){let{instrument:l}=e,{symbol:t}=(0,eA.j)(),{t:o}=(0,C.B)(),[s,i]=(0,eC.iK)("spot.quickOrderPlacement",{defaultValue:eC.JN.False}),n=(0,H.g)(function(e,l){return(0,r.jsx)(u.nu,{children:()=>{var t,s;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ev.e,{orderType:"long",currency:null==(t=l.instrument)?void 0:t.base_currency,beforeSubmit:(t,r,o)=>{let{market_amount_order:s,percent_amount_order:i}=t;if(i)return t;let n=t.amount;return s||(n=(0,eO.mi)(n).multipliedBy(e.mp).toFixed(l.price)),{...t,amount:n}},renderValue:(e,t)=>
1(0,r.jsx)(u.nu,{children:()=>{let o=eP.nT.find("SPOT",l.instrument.base_currency),s=(null==o?void 0:o.available)??0;return(0,r.jsx)(r.Fragment,{children:t?(0,eO.mi)(parseInt(e)).div(100).multipliedBy(s).toFixed(l.price):s})}}),children:(0,r.jsx)(u.nu,{children:()=>(0,r.jsx)(r.Fragment,{children:(0,h.gS)((0,f.M)({value:e.ask1,acc:l.price,format:!0}))})})}),(0,r.jsx)(ej.Y,{title:(l,t)=>(console.log(e.mp,e,"store.mp"),(0,r.jsx)(u.nu,{children:()=>(0,r.jsx)(eH,{d:{...l,market_amount_order:!!l.market_amount_order},o:t,price:e.mp})})),renderLabel:(e,l)=>e?`${o("Public.Total")} (${l.base_currency})`:`${o("Public.Amount")} (${l.quote_currency})`}),(0,r.jsx)(ev.e,{orderType:"short",currency:null==(s=l.instrument)?void 0:s.quote_currency,beforeSubmit:(t,r,o)=>{let{market_amount_order:s,percent_amount_order:i}=t;if(i)return t;let n=t.amount;return s&&(n=(0,eO.mi)(n).div(e.mp).toFixed(l.amount)),{...t,amount:n}},renderValue:(e,t)=>(0,r.jsx)(u.nu,{children:()=>{let o=eP.nT.find("SPOT",l.instrument.quote_currency),s=(null==o?void 0:o.available)??0;return(0,r.jsx)(r.Fragment,{children:t?(0,eO.mi)(parseInt(e)).div(100).multipliedBy(s).toFixed(l.amount):s})}}),children:(0,r.jsx)(u.nu,{children:()=>(0,r.jsx)(r.Fragment,{children:(0,h.gS)((0,f.M)({value:e.bid1,acc:l.price,format:!0}))})})})]})}})});return(0,r.jsx)(eI.V,{type:"market",instrumentData:l,open:s===eC.JN.True,onChange:e=>{i(e?eC.JN.True:eC.JN.False)},children:(0,r.jsxs)(eg.G,{savePosition:"SpotQuickOrderPosition",instrument:l,instrumentName:t,children:[(0,r.jsx)(ey.D,{}),(0,r.jsx)(eN,{instrumentData:l,children:n}),(0,r.jsx)(eb.U,{})]})})}function eR(e){let{instrument:l}=e,{t}=(0,C.B)(),o=(0,H.g)((e,o)=>{let{price:s,pageX:i,pageY:n,lastPrice:a}=e,c=(0,eO.mi)(l.tick_size).dp(),d=(0,eO.mi)(l.min_trade_amount).dp(),p=(0,eO.mi)(s).toFixed(c,eO._8.ROUND_HALF_CEIL),m=s<a,x=m?l.base_currency:l.quote_currency,f=m?c:d;return(0,r.jsx)(eI.V,{type:"limit",instrumentData:l,open:!0,beforeSubmit:e=>({...e,price:p}),onChange:e=>{e||o()},onSuccess:o,children:(0,r.jsxs)(eg.o,{positionOffset:{x:"-100%",y:-22},position:{x:i,y:n},disabled:!1,children:[(0,r.jsx)(eb.U,{}),(0,r.jsx)(u.nu,{children:()=>{let e=eP.nT.find("SPOT",x),l=(null==e?void 0:e.available)??0;return(0,r.jsx)(ev.e,{orderType:m?"long":"short",currency:x,beforeSubmit:(e,l,t)=>{let{market_amount_order:r,percent_amount_order:o}=e;if(o)return e;let s=e.amount;return r&&(s=(0,eO.mi)(s).div(p).toFixed(d)),{...e,amount:s}},renderValue:(e,t)=>(0,r.jsx)(r.Fragment,{children:t?(0,eO.mi)(parseInt(e)).div(100).multipliedBy(l).toFixed(f):l}),children:(0,h.gS)(p)})}}),(0,r.jsx)(ej.Y,{title:(e,l)=>{let{amount:t,market_amount_order:r}=e;return eM(!!r,t,p,l)},renderLabel:(e,l)=>e?`${t("Public.Total")} (${l.base_currency})`:`${t("Public.Amount")} (${l.quote_currency})`})]})})});return(0,r.jsx)(eS.Y,{children:o})}function eL(e){let{needQuickOrder:l=!0,isSimple:t=!1,headerExtra:o,classes:s}=e,i=(0,eu.W2)();return!function(e,l,t,r){let o=(0,em.Q)(e);(0,ex.R4)([()=>{if(o){let e=new e_.yU,s=e=>e.instrument_name===l&&"trailing"!==e.order_type;o.onChartReady(()=>{var t;if(!o)return;let r=null==o||null==(t=o.activeChart)?void 0:t.call(o);if(!r)return;let s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.resolution(),t=e.replace(/^1([A-Z])$/g,"$1");return o.executionLines.dispose(),eh.O.getBS({instrumentName:l,resolution:t,timeType:2}).then(ep.D7).then(e=>{o.executionLines.multiAdd(Object.entries(e.resolutionOrderData)),o.executionLines.render()}).catch(ef.Vf)};s();let i=r.onIntervalChanged();i.subscribe(null,s),e.add(()=>{i.unsubscribe(null,s)})}),e.add(eh.O.changes.call(`${t}.${r}.raw`).subscribe(e=>{let{orders:l}=e,t=l.filter(s);t.length&&(t.forEach(e=>{"open"!==e.order_state&&o.executionLines.add([e.last_update_timestamp.toString(),[e]])}),o.executionLines.render())}));let i=o.executionLines.onMarkClick();return()=>{i(),e.unsubscribe()}}return e_.yU.EMPTY}],[o,l,t,r])}("SpotChart",i.instrument_name,i.kind,i.currency),(0,r.jsx)(ec,{instrumentName:i.show_name,children:(0,r.jsx)(ed.t,{enablePlusOrder:l,instrumentConfig:i,cacheKey:"SpotChart",isSimple:t,headerExtra:o,classes:s,children:l&&(0,r.jsx)(eR,{instrument:i})})})}var eF=t(28717),ez=t(9192);let eD=(0,A.createContext)(!1),eE=(0,A.createContext)(e=>{});function e$(e){let{children:l,cookie:t}=e,[o,s]=(0,A.useState)(()=>!!eF.rg.rawValue(t)),i=(0,A.useCallback)(e=>{eF.rg.rawValue(t,Number(e)),s(e)},[t]);return(0,r.jsx)(eE.Provider,{value:i,children:(0,r.jsx)(eD.Provider,{value:o,children:l})})}function eW(){return[(0,A.useContext)(eD),(0,A.useContext)(eE)]}function eG(){let{t:e}=(0,C.B)(),[l,t]=eW();return(0,r.jsx)(ez.x,{label:e("Perpetual.HideOther"),labelProps:{sx:{color:"text.primary",fontWeight:"normal"}},checked:l,onChange:(e,l)=>{t(l)}})}var eK=t(80660),eV=t(90313),eq=t(26540),eU=t(14986),eY=t(10928),eX=t(63898),eZ=t(15815),eQ=t(80035),eJ=t(9098),e0=t(24439),e1=t(7167),e2=t(28844),e4=t(37183),e3=t(58991),e8=t(39486),e9=t(19495),e6=t(84446);
1function e7(e){let{header:l,symbol:t,onDepthChange:o,instrumentId:s,showBsRatio:i=!0}=e,{kind:n}=(0,eA.j)(),{precision:a,instrument:c}=(0,_.B)({kind:n,instrumentName:t}),{disabled:d}=(0,en.M)(),[p,m]=(0,A.useState)(12),x=(0,A.useCallback)(e=>{var l;null==(l=eZ._.setDepth)||l.call(eZ._,e),null==o||o(e),eY.I.SpotMargin.SpotMarginPageAction({tradepair_name:t,tradeType:n,operate_type:"switch_depth"})},[n,o,t]),[h,f]=(0,A.useState)({});return(0,A.useEffect)(()=>{ei.S.setBookMaxShowSize({instrumentId:s,maxShowSize:Math.max(p,12)})},[s,p]),(0,A.useEffect)(()=>{if(c)return(0,eQ.fm)(()=>{let e={};Object.values(eZ._.ordersMap).forEach(l=>{l.instrument_name===c.instrument_name&&Reflect.set(e,+eU.ov.depthPrice(l.price,eZ._.depth??c.tick_size,"sell"===l.direction?2:1),l.direction)}),f(e)})},[c]),(0,r.jsx)(e6.A,{height:"100%",translate:"no",className:"notranslate",children:(0,r.jsx)(eV.H9,{threshold:.9,header:!1,getInstrumentData:()=>{var e,l;return{quote_currency:(null==a||null==(e=a.instrument)?void 0:e.quote_currency)||"",base_currency:(null==a||null==(l=a.instrument)?void 0:l.base_currency)||""}},getOrderType:()=>0,title:(0,r.jsx)(e8.G,{instrumentName:t,kind:n,width:"100%",justifyContent:"space-between",onChange:x,instrumentId:s}),onMaxNumberChange:m,asks:(0,r.jsx)(eV.Ek,{instrumentName:t,instrumentId:s,children:e=>(0,r.jsx)(u.nu,{children:()=>(0,r.jsx)(eV.u6,{...e,instrumentName:t,ownerOrders:h,rowClick:eq.l,kind:n,align:"bottom",type:"sell",showSize:p})})}),ticker:(0,r.jsx)(eV.C8,{disabled:d,instrumentName:t,market:"SPOT",kind:n,dataExtra:e=>(0,r.jsx)(e3.x,{component:"span",whiteSpace:"nowrap",value:null==e?void 0:e.last_price,acc:a.price,className:(0,K.AH)({color:"text-primary"})}),rowClick:(e,l,t)=>{(0,eq.l)(e,l,{price:t.price,amount:"",total:""})},instrumentId:s}),bids:(0,r.jsx)(eV.Oc,{instrumentName:t,instrumentId:s,children:e=>(0,r.jsx)(u.nu,{children:()=>(0,r.jsx)(eV.u6,{...e,instrumentName:t,ownerOrders:h,align:"top",rowClick:eq.l,kind:n,showSize:p})})}),bsRatio:i?(0,r.jsx)(e9.Z,{maxNumber:p,instrumentName:t,instrumentId:s,bidsDataKey:"totalPrice",asksDataKey:"totalPrice"}):null})})}var e5=t(72406),le=t(83847),ll=t(29264),lt=t.n(ll),lr=t(38630);let lo=e=>{let{open:l,onClose:t,kind:o,currency:s,instrumentName:i,instrumentId:n,onCoinNameClick:a}=e,{instrument:c}=(0,_.B)({kind:o,instrumentName:i}),{isLogin:d}=(0,le.II)(),u=(0,A.useRef)(null),{t:p}=(0,C.B)();return(0,r.jsxs)(eX.D,{PaperProps:{ref:u},classes:{paper:lt()["drawer-paper"]},anchor:"right",open:l,onClose:t,keepMounted:!0,disablePortal:!0,children:[(0,r.jsx)(e5.q,{getContainer:()=>u.current||document.body,children:d&&(0,r.jsx)(eK.s,{children:c&&(0,r.jsx)(eB,{instrument:c})})}),(0,r.jsx)(b.Ef,{kind:o,currency:s,children:(0,r.jsxs)("div",{className:lt()["chart-drawer-content"],children:[(0,r.jsx)(e1.B,{onBack:t,extra:(0,r.jsx)(e4._,{kind:o,currency:s,instrumentName:i}),children:"K Line"}),(0,r.jsx)(lr.X,{TourSetting:null,onClick:a}),(0,r.jsx)(b.wV,{})]})}),(0,r.jsx)(eK.s,{children:(0,r.jsx)(e2.r,{chart:(0,r.jsx)(eL,{isSimple:!0,classes:{pointWrap:lt().pointWrap}}),instrumentName:i,kind:o,instrumentData:c,orderbook:(0,r.jsx)(e7,{symbol:i,instrumentId:n,showBsRatio:!1})})}),(0,r.jsx)("div",{className:lt()["trade-btn"],children:(0,r.jsx)(R.I,{fullWidth:!0,onClick:t,children:p("Public.Trade")})})]})};var ls=t(37601),li=t(7825),ln=t(61629),la=t(93899),lc=t(94148);let ld={direction:"buy",available:"0",token:"--",kind:"spot",maxValue(e){let l="buy"===this.direction;return{total:l?this.available:(0,eO.mi)(this.available).multipliedBy(e).toFixed(),amount:l?(0,eO.mi)(this.available).div(e).toFixed():this.available}}},lu=(0,A.createContext)(ld);function lp(){return(0,A.useContext)(lu)}function lm(e){let{direction:l,children:t,instrumentName:o,kind:s}=e,{instrument:i}=(0,_.B)({instrumentName:o,kind:s}),[n,a]=(0,A.useState)(()=>({...ld,direction:l,token:i?"buy"===l?i.base_currency:i.quote_currency:"--"}));return(0,A.useEffect)(()=>{if(i){let e="buy"===l?i.base_currency:i.quote_currency;return(0,eQ.fm)(()=>{let t=eP.nT.find("SPOT",e);t&&a(r=>l===r.direction&&t.available===r.available?r:{...r,direction:l,available:t.available,token:e})})}},[i,l]),(0,r.jsx)(lu.Provider,{value:n,children:t})}function lx(e){let{tourId:l}=e,{t,availableRender:o,token:s,ctx:i,router:n,onTabListAppendClick:a}=(()=>{let{t:e}=(0,C.B)(),{isLogin:l}=(0,le.II)(),{available:t,token:r}=lp(),{instrument:o}=(0,_.B)(),s=(0,A.useContext)(li.N),i=(0,I.useRouter)(),n=(0,A.useCallback)(()=>{o&&eY.I.SpotMargin.SpotMarginPageAction({tradeType:o.kind,operate_type:"transfer",tradepair_name:o.instrument_name})},[o]);return{t:e,availableRender:l?(0,f.M)({value:t,acc:8,format:!0}):"--",token:r,ctx:s,router:i,onTabListAppendClick:n}})();return(0,r.jsx)(la.BJ,{id:l,direction:"column",gap:"8px",css:{mb:{xs:"8px",sm:"12px"},fontSize:"12px"},children:(0,r.jsxs)(la.BJ,{direction:"row",justify:"space-between",align:"center",children:[(0,r.jsx)("div",{className:(0,K.AH)({color:"text-secondary"}),children:t("Public.Available")}),(0,r.jsxs)("div",{className:(0,K.cx)((0,lc.B)({alignItems:"center",gap:"4px"}),"notranslate"),translate:"no",children:[(0,r.jsxs)("span",{translate:"no",className:"notranslate",children:[o," ",s]}),(0,r.jsx)(ls.A,{href:(0,w.U)(n.asPath),children:(0,r.jsx)(ln.l,{src:"/static-lib/img/icon-mono/iHZ2C2dCzma8Kkb
1k.svg",css:{width:"12px",height:"12px",color:"text-primary",cursor:"pointer",_hover:{opacity:.8}},onClick:()=>{a(),null==i||i.create("inner",{to:"SPOT",currency:s})}})})]})]})})}var lh=t(45526),lf=t(54622),l_=t(85061),lg=t(19613),lv=t(88992),lb=t(48978),ly=t(84932),lj=t(19914),lw=t(61051),lT=t(25763);function lk(e,l){let{min_total_amount:t,amount:r,instrument:o}=e;return(0,A.useMemo)(()=>{let e=(0,eO.mi)(l),s=e.isNaN()?(null==o?void 0:o.min_trade_amount)??"0":(0,eO.mi)(t).div(e).toFixed(r);return{minTradeAmount:s,minTotalAmount:t,validate(e,l){let r=(0,eO.mi)(e),o="trade"===l?s:t;return r.isGreaterThanOrEqualTo(o)}}},[t,r,l,o])}function lN(e){let{disabledSlider:l,instrumentName:t,kind:o}=e,{validateHandle:s,registerOptionsOnBlur:i,id:n,t:a,current:c,minTradeAmount:u,inputOnChange:p,available:m,sliderVal:x,sliderAmountOnChange:h}=((e,l)=>{var t;let{control:r,setValue:o,getFieldState:s,resetField:i,trigger:n,formState:a}=(0,lv.xW)(),{precision:c}=(0,_.B)({kind:e,instrumentName:l}),u=lp(),{direction:p,available:m}=u,x=(0,A.useId)(),{t:h}=(0,C.B)(),f=(0,d.K7)(),[g,v,b,y]=(0,lv.FH)({control:r,name:["price","amount","condition_type","trail_price"]}),j=null==(t=f.data)?void 0:t.last_price,w=g;if(!w&&j)if("TRAILING"===b&&y){let e="buy"===p?(0,eO.mi)(j).minus(y):(0,eO.mi)(j).plus(y);w=e.isGreaterThan(0)?e.toFixed():j}else w=j;let{minTradeAmount:T,validate:k}=lk(c,w=w||""),[N,S]=(0,A.useState)(0),I=(0,A.useCallback)(e=>{if((0,eO.mi)(e).isZero())return S(0);w&&S(100*("buy"===p?(0,eO.mi)(e).multipliedBy(w).div(m).toFixed(2,lT.A.ROUND_UP):(0,eO.mi)(e).div(m).toFixed(2,lT.A.ROUND_UP)))},[m,p,w]);return(0,A.useEffect)(()=>{I(v||0)},[w,I,v]),{validateHandle:e=>{if(!s("price",a).error)return k(e,"trade")?void 0:h("Public.Validate.Amount.Min",{min:T})},registerOptionsOnBlur:e=>{let{value:l}=e.target;l?n("amount"):i("amount",{keepError:!1})},id:x,t:h,current:c,minTradeAmount:T,inputOnChange:(e,l)=>{let t=e.target.value;if(""===t||ly.N.validFixed(c.amount)(t)){let r=(0,eO.mi)(u.maxValue(w).amount);l(r.lt(t)?r.toFixed(c.amount):e)}},available:m,sliderVal:N,sliderAmountOnChange:e=>{if(N!==e){if(S(e),!w||(0,eO.mi)(w).isZero())return;let l="buy"===p?(0,eO.mi)(m).multipliedBy(e).div(100).div(w):(0,eO.mi)(m).multipliedBy(e).div(100);o("amount",l.toFixed(c.amount),{shouldDirty:!0,shouldValidate:!0}),o("total",l.multipliedBy(w).toFixed(c.price),{shouldDirty:!0,shouldValidate:!0})}}}})(o,t),{isLt:f}=(0,lw.G)(),g=f("sm"),{inputProps:v,formItemProps:b}=(0,A.useMemo)(()=>{let e=(0,r.jsx)("label",{htmlFor:n,className:(0,K.AH)({fontSize:{xs:"inherit",sm:"14px"},color:"text-tertiary"}),children:a("Public.Size")});return{inputProps:g?{floatLabel:e}:{className:(0,K.AH)({textAlign:"right"}),startAdornment:e},formItemProps:g?{margin:"dense"}:{formItemGap:"12px"}}},[n,a,g]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(lg.eI,{defaultValue:"",name:"amount",...b,showErrorType:"popper",rules:{required:!0,validate:s,onBlur:i,deps:"price"},children:e=>{var l;let{field:{onChange:t,value:o,name:s,ref:i,...a},fieldState:{error:d}}=e;return(0,r.jsx)(lj.pd,{ref:i,name:s,id:n,endAdornment:(0,r.jsx)("span",{translate:"no",className:(0,K.cx)((0,K.AH)({fontSize:{xs:"12px",sm:"14px"}}),"notranslate"),children:null==(l=c.instrument)?void 0:l.quote_currency}),placeholder:`⥠${u}`,value:o,onChange:e=>p(e,t),error:!!d,...v,...a})}}),!l&&(0,r.jsx)("div",{className:(0,K.AH)({mb:"12px"}),children:(0,r.jsx)(lb.Y,{color:"primary",disabled:(0,eO.mi)(m).isZero(),value:x,onChange:h,valueLabelDisplay:"auto"})})]})}var lS=t(19802),lI=t(85070),lA=t(19342);let lC=(0,A.forwardRef)((e,l)=>{let{children:t,desc:o,...s}=e,{t:i}=(0,C.B)();return(0,r.jsx)(ez.x,{sx:{display:"inline-flex"},...s,ref:l,label:(0,r.jsx)(lA.v,{title:i(o),children:(0,r.jsx)("div",{children:t})})})}),lO=(0,A.forwardRef)((e,l)=>{let{t}=(0,C.B)();return(0,r.jsx)(lC,{...e,ref:l,desc:"Trade.Only.Post",children:t("Trade.Post")})});function lP(){let{disabled:e,onlyPost:l}=(0,en.M)(),{resetField:t,register:o}=(0,lv.xW)();return(0,A.useEffect)(()=>{if(l)return t("post_only",{keepDirty:!0,defaultValue:!0}),()=>{t("post_only",{keepDirty:!0,defaultValue:!1})}},[l,t]),(0,r.jsx)("div",{className:(0,K.AH)({mt:"10px"}),children:(0,r.jsx)(lO,{disabled:e||l,...o("post_only")})})}var lM=t(29790),lH=t(16732),lB=t(60842);function lR(e){let{endAdornment:l,kind:t,instrumentName:o,...s}=e,{t:i,range:n,elRef:a,id:c,current:d,validate:u,registerOptionsOnBlur:p,inputOnChange:m,instrument:x}=((e,l)=>{let{setValue:t,getValues:r,resetField:o,trigger:s}=(0,lv.xW)(),{kind:i,symbol:n}=(0,eA.j)(),a={kind:e??i,instrumentName:l??n},{precision:c,instrument:d}=(0,_.B)(a),u=(0,lH.k)(a),p=(0,A.useId)(),{t:m}=(0,C.B)(),x=(0,A.useRef)(),h=(0,A.useMemo)(()=>({plus(){if(!d)return;let e=r("price");t("price",(0,eO.mi)(e||0).plus(d.tick_size).toFixed(),{shouldValidate:!0})}
1,minus(){if(!d)return;let e=r("price"),l=(0,eO.mi)(e||0).minus(d.tick_size);t("price",l.isLessThanOrEqualTo(0)?d.tick_size:l.toFixed(),{shouldValidate:!0})}}),[d,t,r,u]);return(0,A.useEffect)(()=>{var e;let l,r=null==(e=x.current)?void 0:e.querySelector("input[name=price]"),o=lM.g.subscribe(e=>{let{row:o}=e;t("price",o.price,{shouldValidate:!0}),r&&(r.style.transform="scale(1.05)",l=requestAnimationFrame(()=>{r.style.transition="transform .16s linear",r.style.transform="none",cancelAnimationFrame(l)}))});return r&&o.add((0,lB.R)(r,"transitionend").subscribe(()=>{r.style.transition="none"})),()=>{cancelAnimationFrame(l),o.unsubscribe()}},[t,x]),{t:m,range:u,elRef:x,id:p,current:c,handles:h,validate:{min:e=>(0,eO.mi)(e).lt(u.min)?m("Public.Validate.Price.Min",{min:u.min}):void 0,max:e=>(0,eO.mi)(e).gt(u.max)?m("Public.Validate.Price.Max",{max:u.max}):void 0},instrument:d,registerOptionsOnBlur:e=>{let{value:l}=e.target;l?s("price"):o("price",{keepError:!1,defaultValue:""})},inputOnChange:(e,l)=>{let t=e.target.value;(""===t||ly.N.validFixed(c.price)(t))&&l(e)}}})(t,o),{isLt:h}=(0,lw.G)(),f=h("sm"),{inputProps:g,formItemProps:v}=(0,A.useMemo)(()=>{let e=(0,r.jsx)("label",{htmlFor:c,className:(0,K.AH)({fontSize:{xs:"inherit",sm:"14px"},color:"text-tertiary"}),children:i("Public.Price")});return{inputProps:f?{floatLabel:e}:{className:(0,K.AH)({textAlign:"right"}),startAdornment:e,type:"number"},formItemProps:f?{margin:"dense"}:{formItemGap:"12px"}}},[c,i,f]);return(0,r.jsx)(lg.eI,{name:"price",showErrorType:"popper",...v,...s,rules:{required:!0,validate:u,onBlur:p},children:e=>{var t;let{field:{onChange:o,value:s,name:i,ref:u,...p},fieldState:{error:h}}=e;return(0,r.jsx)(lj.pd,{ref:a,name:i,...g,id:c,step:null==x?void 0:x.tick_size,endAdornment:(0,r.jsx)("div",{className:(0,K.cx)((0,lc.B)({gap:"8px",fontSize:{xs:"12px",sm:"14px"},alignItems:"center"}),"notranslate"),children:l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l_.c,{orientation:"vertical",flexItem:!0,color:"var(--colors-base-tertiary)",className:(0,K.AH)({height:"1.2em",my:"auto"})}),l]}):(0,r.jsxs)("span",{children:[" ",null==(t=d.instrument)?void 0:t.base_currency]})}),value:s,onChange:e=>m(e,o),placeholder:`⥠${n.min} & ⤠${n.max}`,error:!!h,...p})}})}function lL(e){let{endAdornment:l,...t}=e,{t:o}=(0,C.B)(),{isLt:s}=(0,lw.G)(),i=s("sm"),{inputProps:n,formItemProps:a}=(0,A.useMemo)(()=>({inputProps:i?{floatLabel:(0,r.jsx)("label",{className:(0,K.AH)({fontSize:{xs:"inherit",sm:"14px"},color:"text-tertiary"}),children:o("Public.Market.Price")})}:{className:(0,K.AH)({textAlign:"right"}),startAdornment:(0,r.jsx)("label",{className:(0,K.AH)({fontSize:{xs:"inherit",sm:"14px"},color:"text-tertiary"}),children:o("Public.Price")})},formItemProps:i?{margin:"dense"}:{formItemGap:"12px"}}),[o,i]);return(0,r.jsx)(lg.eI,{...a,showErrorType:"none",...t,children:(0,r.jsx)(lj.pd,{disabled:!0,readOnly:!0,...n,placeholder:o("Trade.Open.Market"),endAdornment:l})})}var lF=t(53538),lz=t(34186),lD=t(12769),lE=t(35113),l$=t(54773),lW=t(74162),lG=t(75945),lK=t.n(lG);let lV=(0,lW.PA)(function(e){let{price:l,trigger_price:t,size:o,total:s,marketType:i,orderType:n,borrowed:a,kind:c,instrumentData:d,isTrailing:u}=e,{t:p}=(0,C.B)(),[m,x]=(0,A.useState)();(0,eC.iK)("spot.orderConfirmation",{onValue:e=>{x("0"===e)}});let h=(0,A.useMemo)(()=>{let{quote_currency:e,base_currency:r}=d,p="market"===i,m="buy"===n,x=[];return t&&x.push({label:u?"Trade.TrailingGap":"Trade.TriggerPrice",value:t,symbol:r}),u||x.push({label:"Public.Price",value:l,symbol:p?"":r}),o&&x.push({label:"Public.Size",value:o,symbol:e}),s&&x.push({label:"Public.Total",value:s,symbol:r}),"margin"===c&&a&&x.push({label:"Public.Borrowing",value:a,symbol:m?r:e}),x},[d,i,n,l,t,o,s,c,a,u]);return(0,r.jsxs)(r.Fragment,{children:[h.map(e=>(0,r.jsxs)("ul",{className:lK().group,children:[(0,r.jsx)("li",{children:p(e.label)}),(0,r.jsxs)("li",{children:[(0,r.jsx)("span",{className:lK().value,children:e.value})," ",e.symbol]})]},e.label)),(0,r.jsx)(l_.c,{className:lK().divider}),(0,r.jsx)(l$.S,{label:p("Public.No.Show.Again"),checked:m,onChange:(e,l)=>{lE.u.pub("spot.orderConfirmation",l?"0":"1")}})]})}),lq="USDT";function lU(e){let{children:l,customComponent:t}=e,{isBuy:o,t:s,nav:i,disabled:n,confirm:a,isSubmitting:c}=(()=>{let{t:e}=(0,C.B)(),{disabled:l}=(0,en.M)(),t=(0,A.useRef)(),{direction:o,kind:s}=lp(),i="buy"===o,{handleSubmit:n,resetField:a,formState:{isSubmitting:c}}=(0,lv.xW)(),d=(0,I.useRouter)(),{instrument:u}=(0,_.B)();(0,A.useEffect)(()=>()=>{var e;null==(e=t.current)||e.destroy()},[t]);let p=n(l=>{if(!u)return;let n={buy:eh.O.buy,sell:eh.O.sell}[o],c=()=>{let{total:e,...t}=l;eY.I.SpotMargin.SpotMarginPageAction({tradeType:s,operate_type:o,tradepair_name:lq}),eY.I.SpotMargin.SpotMarginTrade({tradeType:s,trade_direction:o,tradepair_name:lq,quote_coin_name:u.quote_currency,base_coin_name:u.base_currency,bb_trademode:null==l?void 0:l.type,commission_price:t.price,trade_amount:t.amount,trade_pay_amount_u:e}),a("amount");let r={instrument_name:u.instrument_name,...t};return void 0!==r.amount&&""!==r.amount&&(r.amount=Number(r.amount)),void 0!==r.trail_price&&""!==r.trail_price&&(r.trail_price=Number(r.trail_price)),n(r).then(ep.D7).then(()=>!0).catch(e=>((0,ef.Vf)({error:e}),!1))};if(!lE.u.spotOrderConfirmation)return c();let d="TRAILING"===l.condition_type,{title:p,...m}=l.trigger_price||d?{title:d?e("Trade.Trailing"):e("Trade.Conditional"),price:d?e("Trade.Open.Market"):"limit"===l.type?l.price:e("Trade.Open.Market"),trigger_price:d?l.trail_price:l.trigger_price,isTrailing:d,...d||"limit"===l.type?{size:l.amount,total:l.total}:i?{total:l.amount}:{size:l.amount}}:(null==l?void 0:l.type)==="limit"?{title:e("buy"===o?"Trade.Limit.Buy":"Trade.Limit.Sell"),size:l.amount,total:l.total,price:l.price}:{title:e(i?"Trade.MarketBuy":"Trade.MarketSell"),price:e("Trade.Open.Market"),...i?{total:l.amount}:{size:l.amount}};t.current=lD.l.create({title:p,children:(0,r.jsx)(lV,{orderType:o,marketType:d?"market":null==l?void 0:l.type,kind:s,...m,instrumentData:u,borrowed:"0"}),resolve:{action:()=>{c()}},onExited(){var e;null==(e=t.current)||e.destroy(),t.current=void 0}})});return{isBuy:i,t:e,nav:d,disabled:l,confirm:p,isSubmitting:c}})();return(0,r.jsx)(lF.P,{customComponent:t??(o?(0,r.jsx)(lz.$,{fullWidth:!0,color:"primary",href:(0,w.Yn)("Register",{search:{cb:i.asPath}}),children:s("Public.Register")}):(0,r.jsx)(ls.A,{children:(0,r.jsx)(lz.$,{fullWidth:!0,color:"secondary",href:(0,w.U)(i.asPath),children:s("Public.Login")})}
1)),children:(0,r.jsx)(lz.$,{disabled:n,fullWidth:!0,color:o?"long":"short",onClick:a,loading:c,children:l})})}function lY(){let{validateHandle:e,onBlurHandle:l,id:t,t:o,current:s,minTotalAmount:i,inputOnChange:n}=(()=>{var e;let l=lp(),{direction:t}=l,{control:r,getFieldState:o,resetField:s,trigger:i,formState:n}=(0,lv.xW)(),{precision:a}=(0,_.B)(),c=(0,A.useId)(),{t:u}=(0,C.B)(),p=(0,d.K7)(),[m,x,h]=(0,lv.FH)({control:r,name:["price","condition_type","trail_price"]}),f=null==(e=p.data)?void 0:e.last_price,g=m;if(!g&&f)if("TRAILING"===x&&h){let e="buy"===t?(0,eO.mi)(f).minus(h):(0,eO.mi)(f).plus(h);g=e.isGreaterThan(0)?e.toFixed():f}else g=f;let{minTotalAmount:v,validate:b}=lk(a,g||"");return{validateHandle:e=>{var l;let t=o("price",n);if("TRAILING"===x||!t.error)return b(e,"total")?void 0:u("Trade.LimitTips",{value:v,currency:null==(l=a.instrument)?void 0:l.base_currency})},onBlurHandle:e=>{let{value:l}=e.target;l?i("total"):s("total",{keepError:!1})},id:c,t:u,current:a,minTotalAmount:v,inputOnChange:(e,t)=>{let r=e.target.value;if(""===r||ly.N.validFixed(a.price)(r)){let o=(0,eO.mi)(l.maxValue(g||"").total);t(o.lt(r)?o.toFixed(a.price):e)}}}})(),{isLt:a}=(0,lw.G)(),c=a("sm"),{inputProps:u,formItemProps:p}=(0,A.useMemo)(()=>{let e=(0,r.jsx)("label",{htmlFor:t,className:(0,K.AH)({fontSize:{xs:"inherit",sm:"14px"},color:"text-tertiary"}),children:o("Public.Total")});return{inputProps:c?{floatLabel:e}:{className:(0,K.AH)({textAlign:"right"}),startAdornment:e},formItemProps:c?{formItemGap:"20px"}:{margin:"normal"}}},[t,o,c]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(lg.eI,{defaultValue:"",name:"total",...p,showErrorType:"popper",rules:{required:!0,validate:e,onBlur:l},children:e=>{var l;let{field:{onChange:o,value:a,name:c,ref:d,...p},fieldState:{error:m}}=e;return(0,r.jsx)(lj.pd,{name:c,ref:d,id:t,endAdornment:(0,r.jsx)("span",{translate:"no",className:(0,K.cx)((0,K.AH)({fontSize:{xs:"12px",sm:"14px"}}),"notranslate"),children:(null==(l=s.instrument)?void 0:l.base_currency)??"--"}),placeholder:`⥠${i}`,value:a,onChange:e=>n(e,o),error:!!m,...u,...p})}})})}function lX(e,l){let t=(0,d.K7)(),{precision:r}=(0,_.B)(),{watch:o,setValue:s,formState:i,getValues:n,getFieldState:a,resetField:c}=l,u=(0,A.useRef)(i);u.current=i;let p=(0,lv.FH)({name:"type",control:l.control});(0,A.useEffect)(()=>{let e=new e_.yU,l=new lS.c(e=>{let l=o((l,t)=>{let{name:r,type:o}=t;if(r&&("change"===o&&r||"price"===r||"amount"===r))return void e.next({name:r,value:l[r]})});return()=>{l.unsubscribe()}});return e.add(l.pipe((0,lI.F)((e,l)=>e.name===l.name&&e.value===l.value)).subscribe(e=>{let{name:l}=e,{price:t,amount:o,total:i}=n();if("amount"===l||"price"===l){let e=a("total",u.current),l=t&&o?(0,eO.mi)(t).multipliedBy(o).toFixed(r.price):"";s("total",l,{shouldDirty:!0,shouldValidate:!!l&&e.isTouched});return}if("total"===l){let e=a("amount",u.current),l=i?(0,eO.mi)(i).div(t).toFixed(r.amount):"";t&&s("amount",l,{shouldDirty:!0,shouldValidate:!!l&&e.isTouched});return}})),()=>{e.unsubscribe()}},[o,s,n,e,r.price,r.amount,a]),(0,A.useEffect)(()=>{if("market"!==p)return(0,eQ.mJ)(()=>{var e;return null==(e=t.data)?void 0:e.instrument_name},()=>{var e;(null==(e=t.data)?void 0:e.last_price)&&c("price",{defaultValue:(0,eO.mi)(t.data.last_price).toFixed()}),c("amount",{defaultValue:""})},{fireImmediately:!0})},[t,c,p])}function lZ(e){let{direction:l,children:t,tourId:o}=e,{form:s}=(e=>{let{direction:l}=e,t=(0,lv.mN)({mode:"onChange",defaultValues:{price:"",amount:"",total:"",post_only:!1,type:"limit"}}),{formState:r}=t;return(0,A.useRef)(r).current=r,lX(l,t),{form:t}})({direction:l});return(0,r.jsx)(lm,{direction:l,kind:"spot",children:(0,r.jsx)("div",{id:o,children:(0,r.jsxs)(lg.lV,{form:s,children:[(0,r.jsx)(lR,{}),(0,r.jsx)(lN,{}),(0,r.jsx)(lY,{}),(0,r.jsx)(l_.c,{className:(0,K.AH)({marginBottom:{sm:"16px"},display:{xs:"none",sm:"block"}})}),(0,r.jsx)(lU,{children:t}),(0,r.jsx)(lP,{})]})})})}function lQ(e){let{disabledSlider:l,instrumentName:t,kind:o,label:s}=e,{registerOptions:i,id:n,isBuy:a,t:c,min:u,current:p,inputOnChange:m,available:x,sliderVal:h,sliderOnChange:f}=((e,l)=>{var t,r;let{control:o,setValue:s,resetField:i,trigger:n}=(0,lv.xW)(),{precision:a,instrument:c}=(0,_.B)({kind:e,instrumentName:l}),{direction:u,available:p}=lp(),m=(0,d.K7)(),[x,h]=(0,A.useState)(()=>{var e;return(null==(e=m.data)?void 0:e.last_price)??""}),f="buy"===u,g=(0,A.useId)(),{t:v}=(0,C.B)(),{minTotalAmount:b,minTradeAmount:y}=lk(a,x),[j,w]=(0,A.useState)(0),[T]=(0,lv.FH)({control:o,name:["amount"]});(0,A.useEffect)(()=>(0,eQ.fm)(()=>{m.data&&h(m.data.last_price)}),[m]);let k=(0,A.useCallback)(e=>{if((0,eO.mi)(e).isZero())return w(0);w(100*(0,eO.mi)(e).div(p).toFixed(2,lT.A.ROUND_UP))},[p]);(0,A.useEffect)(()=>{k(T||0)},[k,T]),(0,A.useEffect)(()=>{i("amount",{keepError:!1,keepTouched:!1})},[null==c?void 0:c.instrument_name,i]);let N=f?a.price:a.amount,S=f?b:y;return{registerOptions:{required:!0,min:{value:S,message:v("Trade.LimitTips",f?{value:b,currency:null==(t=a.instrument)?void 0:t.base_currency}:{value:y,currency:null==(r=a.instrument)?void 0:r.quote_currency})},onBlur(e){let{value:l}=e.target;l?n("amount"):i("amount",{keepError:!1})}},id:g,isBuy:f,t:v,min:S,current:a,inputOnChange:(e,l)=>{let t=e.target.value;if(""===t||ly.N.validFixed(N)(t)){let r=(0,eO.mi)(p);l(r.lt(t)?r.toFixed(N):e)}},available:p,sliderVal:j,sliderOnChange:e=>{j!==e&&(w(e),s("amount",(0,eO.mi)(p).multipliedBy(e).div(100).toFixed(N),{shouldDirty:!0,shouldValidate:!0}))}}})(o,t),{isLt:g}=(0,lw.G)(),v=g("sm"),{inputProps:b,formItemProps:y}=(0,A.useMemo)(()=>{let e=(0,r.jsx)("label",{htmlFor:n,className:(0,K.AH)({fontSize:{xs:"inherit",sm:"14px"},color:"text-tertiary"}),children:s??c("Public.Total")});return{inputProps:v?{floatLabel:e}:{className:(0,K.AH)({textAlign:"right"}),startAdornment:e},formItemProps:v?{margin:"dense"}:{formItemGap:"12px"}}},[n,c,v,s]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(lg.eI,{name:"amount",...y,showErrorType:"popper",rules:i,children:e=>{var l,t;
1let{field:{onChange:o,value:s,name:i,ref:c,...d},fieldState:{error:x}}=e;return(0,r.jsx)(lj.pd,{ref:c,name:i,id:n,endAdornment:(0,r.jsx)("span",{translate:"no",className:(0,K.cx)((0,K.AH)({fontSize:{xs:"12px",sm:"14px"}}),"notranslate"),children:a?null==(l=p.instrument)?void 0:l.base_currency:null==(t=p.instrument)?void 0:t.quote_currency}),placeholder:`⥠${u}`,value:s,onChange:e=>m(e,o),error:!!x,...b,...d})}}),!l&&(0,r.jsx)("div",{className:(0,K.AH)({mb:"12px"}),children:(0,r.jsx)(lb.Y,{disabled:(0,eO.mi)(x).isZero(),color:"primary",value:h,onChange:f,valueLabelDisplay:"auto"})})]})}function lJ(e){let{instrumentName:l,kind:t,...o}=e,{t:s}=(0,C.B)(),{precision:i}=(0,_.B)({instrumentName:l,kind:t}),{trigger:n,resetField:a}=(0,lv.xW)(),{isLt:c}=(0,lw.G)(),d=c("sm"),{inputProps:u,formItemProps:p}=(0,A.useMemo)(()=>{let e=(0,r.jsx)("label",{className:(0,K.AH)({fontSize:{xs:"inherit",sm:"14px"},color:"text-tertiary"}),children:s("Trade.TriggerPrice")});return{inputProps:d?{floatLabel:e}:{className:(0,K.AH)({textAlign:"right"}),startAdornment:e},formItemProps:d?{margin:"dense"}:{formItemGap:"12px"}}},[s,d]);return(0,r.jsx)(lg.eI,{name:"trigger_price",showErrorType:"popper",...p,...o,rules:{required:!0,onBlur:e=>{let{value:l}=e.target;l?n("trigger_price"):a("trigger_price",{keepError:!1,defaultValue:""})}},children:e=>{var l;let{field:{onChange:t,value:o,name:s,ref:n,...a},fieldState:{error:c}}=e;return(0,r.jsx)(lj.pd,{name:s,ref:n,value:o,onChange:e=>((e,l)=>{let t=e.target.value;(""===t||ly.N.validFixed(i.price)(t))&&l(e)})(e,t),endAdornment:(0,r.jsx)("span",{translate:"no",className:(0,K.cx)((0,K.AH)({fontSize:{xs:"12px",sm:"14px"}}),"notranslate"),children:(null==(l=i.instrument)?void 0:l.base_currency)??"--"}),error:!!c,...u,...a})}})}function l0(e){let{onChange:l}=e,{resetField:t}=(0,lv.xW)();return(0,r.jsx)(lv.xI,{rules:{onChange(e){null==l||l(e.target.value),t("amount")}},name:"type",render:e=>{let{field:l}=e;return(0,r.jsx)(lf.ZN,{...l})}})}let l1=new class{setType(e){this.type=e}constructor(){(0,lh._)(this,"type","limit"),(0,eQ.l_)(this)}};function l2(e){var l;let{direction:t,children:o}=e,s=(0,d.K7)(),i=(0,lv.mN)({mode:"onChange",defaultValues:{trigger_price:"",trigger_price_type:2,condition_type:"STOP",price:"",amount:"",total:"",type:l1.type,post_only:!1},shouldUnregister:!0}),{setValue:n,getValues:a}=i;lX(t,i);let[c,p]=(0,lv.FH)({name:["trigger_price","type"],control:i.control});return(0,A.useEffect)(()=>{var e;(null==(e=s.data)?void 0:e.last_price)&&c&&n("condition_type",function(e,l,t){if(!l||!t)return"STOP";let r=(0,eO.mi)(t).isGreaterThanOrEqualTo(l);return"buy"===e?r?"IF_TOUCHED":"STOP":r?"STOP":"IF_TOUCHED"}(t,c,s.data.last_price))},[c,null==(l=s.data)?void 0:l.last_price,t,n]),(0,A.useEffect)(()=>(0,eQ.fm)(()=>{a("type")!==l1.type&&n("type",l1.type)}),[n,a]),(0,r.jsx)(lm,{direction:t,kind:"spot",children:(0,r.jsxs)(lg.lV,{form:i,children:[(0,r.jsx)(lJ,{}),(0,r.jsx)(u.nu,{children:()=>{let e=(0,r.jsx)(l0,{onChange:e=>l1.setType(e)});return(0,r.jsx)(r.Fragment,{children:"limit"===l1.type?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(lR,{endAdornment:e}),(0,r.jsx)(lN,{}),(0,r.jsx)(lY,{})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(lL,{endAdornment:e}),(0,r.jsx)(lQ,{})]})})}}),(0,r.jsx)(l_.c,{className:(0,K.AH)({marginBottom:{sm:"16px"},display:{xs:"none",sm:"block"}})}),(0,r.jsx)(lU,{children:o})]})})}function l4(e){let{direction:l,children:t,tourIdCanUse:o}=e,s=(0,lv.mN)({defaultValues:{amount:"",type:"market"},mode:"onChange"});return(0,r.jsx)(lm,{direction:l,kind:"spot",children:(0,r.jsxs)(lv.Op,{...s,children:[(0,r.jsx)(lL,{}),(0,r.jsx)(lQ,{}),(0,r.jsx)(l_.c,{className:(0,K.AH)({marginBottom:{sm:"16px"},display:{xs:"none",sm:"block"}})}),(0,r.jsx)(lU,{children:t})]})})}var l3=t(21004);function l8(e){let{instrumentName:l,endAdornment:t,hideLabel:o,margin:s,size:i,className:n,kind:a="perpetual",...c}=e,{t:d}=(0,C.B)(),{precision:u}=(0,_.B)({kind:a,instrumentName:l}),{trigger:p,resetField:m}=(0,lv.xW)(),{isLt:x}=(0,lw.G)(),h=x("sm"),{inputProps:f,formItemProps:g}=(0,A.useMemo)(()=>{let e=(0,r.jsx)("label",{className:(0,K.AH)({fontSize:{xs:"inherit",sm:"14px"},color:"text-tertiary"}),children:d("Trade.TrailingGap")});return{inputProps:h?{floatLabel:e}:{className:(0,K.AH)({textAlign:"right"}),startAdornment:e},formItemProps:h?{margin:"dense"}:{formItemGap:"12px"}}},[d,h]);return(0,r.jsx)(lg.eI,{name:"trail_price",showErrorType:"popper",className:(0,K.cx)(n),margin:s,...g,...c,rules:{required:!0,validate:e=>{if(!e)return!0;let l=(0,eO.mi)(e);return!(l.isNaN()||l.isLessThanOrEqualTo(0))||d("Trade.TrailingGapError")||"Trailing Gap must be a positive number"},onBlur:e=>{let{value:l}=e.target;l?p("trail_price"):m("trail_price",{keepError:!1,defaultValue:""})}},children:e=>{var l;
1let{field:{onChange:o,value:s,name:n,ref:a,...c},fieldState:{error:p}}=e;return(0,r.jsx)(lj.pd,{name:n,ref:a,placeholder:d("Trade.TrailingGap"),size:i,error:!!p,value:s,onChange:e=>((e,l)=>{let t=e.target.value;(""===t||ly.N.validFixed(u.price)(t))&&l(e)})(e,o),endAdornment:(0,r.jsx)("span",{translate:"no",className:(0,K.cx)((0,K.AH)({fontSize:{xs:"12px",sm:"14px"}}),"notranslate"),children:t??(null==(l=u.instrument)?void 0:l.base_currency)??"--"}),...f,...c})}})}function l9(e){let{direction:l,children:t,instrumentName:o}=e,s=(0,lv.mN)({mode:"onChange",defaultValues:{trigger_price_type:2,condition_type:"TRAILING",trail_price:"",amount:"",total:"",type:"limit"}}),{setValue:i,getValues:n,register:a}=s;return!function(e){let l=(0,d.K7)(),{precision:t}=(0,_.B)(),{direction:r}=lp(),{watch:o,setValue:s,formState:i,getValues:n,getFieldState:a,resetField:c}=e,u=(0,A.useRef)(i);u.current=i,(0,A.useEffect)(()=>{let e=new e_.yU,i=new lS.c(e=>{let l=o((l,t)=>{let{name:r,type:o}=t;if(r&&("change"===o&&r||"amount"===r||"trail_price"===r))return void e.next({name:r,value:l[r]})});return()=>{l.unsubscribe()}});return e.add(i.pipe((0,l3.B)(300),(0,lI.F)((e,l)=>e.name===l.name&&e.value===l.value)).subscribe(e=>{var o;let{name:i}=e,{amount:c,total:d,trail_price:p}=n(),m=null==(o=l.data)?void 0:o.last_price;if(!m)return;let x=m;if(p){let e="buy"===r?(0,eO.mi)(m).minus(p):(0,eO.mi)(m).plus(p);x=e.isGreaterThan(0)?e.toFixed():m}if("amount"===i||"trail_price"===i){let e=a("total",u.current),l=c?(0,eO.mi)(x).multipliedBy(c).toFixed(t.price):"";s("total",l,{shouldDirty:!0,shouldValidate:!!l&&e.isTouched});return}if("total"===i){let e=a("amount",u.current),l=d?(0,eO.mi)(d).div(x).toFixed(t.amount):"";s("amount",l,{shouldDirty:!0,shouldValidate:!!l&&e.isTouched});return}})),()=>{e.unsubscribe()}},[o,s,n,t.price,t.amount,a,l,r]),(0,A.useEffect)(()=>(0,eQ.mJ)(()=>{var e;return null==(e=l.data)?void 0:e.instrument_name},()=>{c("amount",{defaultValue:""}),c("total",{defaultValue:""}),c("trail_price",{defaultValue:""})},{fireImmediately:!0}),[l,c])}(s),(0,A.useEffect)(()=>(0,eQ.fm)(()=>{"limit"!==n("type")&&i("type","limit")}),[i,n]),(0,r.jsx)(lm,{direction:l,kind:"spot",children:(0,r.jsxs)(lg.lV,{form:s,children:[(0,r.jsx)("input",{type:"hidden",value:"TRAILING",...a("condition_type")}),(0,r.jsx)("input",{type:"hidden",value:"limit",...a("type")}),(0,r.jsx)("input",{type:"hidden",value:"2",...a("trigger_price_type")}),(0,r.jsx)(l8,{instrumentName:o,kind:"spot"}),(0,r.jsx)(lN,{}),(0,r.jsx)(lY,{}),(0,r.jsx)(l_.c,{className:(0,K.AH)({marginBottom:{sm:"16px"},display:{xs:"none",sm:"block"}})}),(0,r.jsx)(lU,{children:t})]})})}new class{setType(e){this.type=e}constructor(){(0,lh._)(this,"type","limit"),(0,eQ.l_)(this)}};var l6=t(81947),l7=t(87240),l5=t(65447),te=t(18839),tl=t(8142),tt=t.n(tl);let tr=()=>{let{t:e}=(0,C.B)(),{instrument:l}=(0,_.B)(),t=(null==l?void 0:l.instrument_name)||"",[o,s]=(0,A.useState)("buy"),[i,n]=(0,A.useState)("limit"),a=[{value:"limit",label:e("Trade.Order.Limit")},{value:"market",label:e("Trade.Order.Market")},{value:"condition",label:e("Trade.Conditional")},{value:"trailing",label:e("Trade.Trailing")}],c=e("buy"===o?"Public.Buy":"Public.Sell");return(0,r.jsxs)("section",{className:tt().createOrderBox,children:[(0,r.jsx)("div",{className:(0,K.AH)({mb:"8px"}),children:(0,r.jsx)(te.tU,{classes:{indicator:"buy"===o?(0,K.AH)({backgroundColor:"fn-up-normal"}):(0,K.AH)({backgroundColor:"fn-down-normal"})},rounded:!0,variant:"card",size:"sm",value:o,fullWidth:!0,onChange:(e,l)=>{s(l)},children:[{label:e("Public.Buy"),activeKey:"buy"},{label:e("Public.Sell"),activeKey:"sell"}].map(e=>(0,r.jsx)(te.oz,{value:e.activeKey,label:e.label},e.activeKey))})}),(0,r.jsxs)(lm,{direction:o,kind:"spot",children:[(0,r.jsx)(lx,{}),(0,r.jsx)(l7.e,{margin:"dense",children:(0,r.jsx)(l5.l,{fullWidth:!0,size:"small",value:i,options:a,onChange:e=>{e&&n(e)}})}),(0,r.jsxs)(l6.ZH,{value:i,children:[(0,r.jsx)(l6.OK,{value:"limit",children:(0,r.jsx)(lZ,{direction:o,children:c})}),(0,r.jsx)(l6.OK,{value:"market",children:(0,r.jsx)(l4,{direction:o,children:c})}),(0,r.jsx)(l6.OK,{value:"condition",children:(0,r.jsx)(l2,{direction:o,children:c})}),(0,r.jsx)(l6.OK,{value:"trailing",children:(0,r.jsx)(l9,{direction:o,instrumentName:t,children:c})})]})]})]})};var to=t(38465),ts=t(48037),ti=t(38769),tn=t(64620),ta=t(83685),tc=t(76759),td=t(36348),tu=t(61812),tp=t(79799),tm=t.n(tp);function tx(e){let{data:l,onClose:t,onCancel:o}=e,{t:s}=(0,C.B)(),[i,n]=(0,A.useState)(!1),a=[{activeKey:"LIMIT,MARKET",label:`${s("Trade.Limit")} | ${s("Trade.Market")}`},{activeKey:"CONDITIONAL",label:s("Trade.Conditional")},{activeKey:"TRAILING",label:s("Trade.Trailing")}];return(0,r.jsx)("div",{children:(0,r.jsx)(tu.y,{visible:i,children:(0,r.jsxs)("ul",{className:tm()["list-box"],children:[a.map(e=>{let{activeKey:s,label:i}=e,a=!l[s]||0===l[s].length;return(0,r.jsx)(S.A,{className:(0,x.default)(tm()["list-item"],{[tm().disabled]:a}),disabled:a,onClick:async()=>{n(!0);try{await o(s)&&(null==t||t()),n(!1)}catch{n(!1)}},children:(0,r.jsx)("span",{children:i})},s)}),(0,r.jsx)(S.A,{className:tm()["list-item"],onClick:t,children:(0,r.jsx)("span",{children:s("Public.Cancel")})})]})})})}var th=t(71922),tf=t(73842),t_=t(44480),tg=t(63856),tv=t(33072),tb=t(77350);function ty(e){var l,t,o,s;let{data:i}=e,{t:n}=(0,C.B)(),{register:a}=(0,lv.xW)(),{precisionGetter:c}=(0,_.B)({instrumentName:i.instrument_name,kind:i.kind}),p=c(i.instrument_name,i.kind),m=i.condition_type&&"NORMAL"!==i.condition_type,x=i.order_type.indexOf("market")>-1,h="buy"===i.direction,g=i.trigger_price?(0,f.M)(i.trigger_price,p.price):"--",v=(0,f.M)(i.amount,p.amount);return(0,r.jsx)(d.GX,{instrumentId:i.instrId,instrumentName:i.instrument_name,market:"SPOT",children:(0,r.jsx)(lm,{direction:i.direction,instrumentName:i.instrument_name,kind:"spot",children:(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",flexDirection:"column",gap:"16px",minWidth:"320px"}),children:[(0,r.jsx)("input",{type:"hidden",...a("order_id")}),(0,r.jsx)("input",{type:"hidden",...a("type")}),(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",flexDirection:"column",gap:"12px"}),children:[(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",gap:"8px",alignItems:"center"}),children:[(0,r.jsx)("span",{className:(0,K.AH)({fontSize:"16px",fontWeight:"bold",color:"text-primary"}),children:i.show_name||((null==(l=p.instrument)?void 0:l.quote_currency)??"--")}),(0,r.jsxs)(tb.v,{status:h?"long":"short",children:[" ",n(h?"Public.Buy":"Public.Sell")]})]}),(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",flexDirection:"column",gap:"8px",fontSize:"13px"}),children:[m&&(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",justifyContent:"space-between"}),children:[(0,r.jsx)("span",{className:(0,K.AH)({color:"text-secondary"}),children:n("Trade.TriggerPrice")}),(0,r.jsxs)("span",{className:(0,K.AH)({color:"text-primary"}),children:[g," ",null==(t=p.instrument)?void 0:t.base_currency]})]}),(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",justifyContent:"space-between"}),children:[(0,r.jsx)("span",{className:(0,K.AH)({color:"text-secondary"}),children:n(x&&h?"Trade.Total":"Public.Size")}),(0,r.jsxs)("span",{className:(0,K.AH)({color:"text-primary"}),children:[v," ",x&&h?null==(o=p.instrument)?void 0:o.base_currency:null==(s=p.instrument)?void 0:s.quote_currency]})]}),(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",justifyContent:"space-between"}),children:[(0,r.jsx)("span",{className:(0,K.AH)({color:"text-secondary"}
1),children:n("Trade.LastPrice")||"Last Price"}),(0,r.jsx)("span",{className:(0,K.AH)({color:"text-primary"}),children:(0,r.jsx)(d.tO.Consumer,{children:e=>(0,r.jsx)(u.nu,{children:()=>{var l,t;let o=(null==(l=e.data)?void 0:l.last_price)?(0,f.M)(e.data.last_price,p.price):"--";return(0,r.jsxs)(r.Fragment,{children:[o," ",null==(t=p.instrument)?void 0:t.base_currency]})}})})})]})]})]}),(0,r.jsx)(l_.c,{}),(0,r.jsxs)("div",{children:[m&&(0,r.jsx)(lJ,{margin:"dense",formItemGap:"0",kind:i.kind,instrumentName:i.instrument_name}),x?(0,r.jsx)(lL,{margin:"dense",formItemGap:"0"}):(0,r.jsx)(lR,{margin:"dense",formItemGap:"0",kind:i.kind,instrumentName:i.instrument_name}),x&&"buy"===i.direction?(0,r.jsx)(lQ,{disabledSlider:!0,kind:i.kind,instrumentName:i.instrument_name}):(0,r.jsx)(lN,{disabledSlider:!0,kind:i.kind,instrumentName:i.instrument_name})]})]})})})}function tj(e,l){let t=e.condition_type&&"NORMAL"!==e.condition_type,o="market"===e.order_type;lD.l.create({title:(0,tv.Vh)("Trade.EditOrder.Title")||"Modify Order",defaultValues:{order_id:e.order_id,type:e.order_type,price:o?"":e.price,amount:e.amount,trigger_price:t?e.trigger_price:"",trigger_price_type:2},children:l=>(0,r.jsx)(lg.lV,{form:l,children:(0,r.jsx)(ty,{data:e})}),resolve:{color:"primary",async action(r,s){try{let r={order_id:s.order_id,amount:s.amount};if(o||(r.price=s.price),t&&(r.trigger_price=s.trigger_price,r.trigger_price_type=2),!await (0,tg.DM)(s,e,"SPOT"))return!1;let i=await eh.O.orderEdit(r);return await (0,ep.D7)(i),l(),!0}catch(e){return(0,ef.Vf)({error:e}),!1}}}})}function tw(e){let{children:l,data:t,editable:o=!0,onSuccess:s}=e;return o?(0,r.jsxs)("div",{className:(0,K.AH)({display:"inline-flex",alignItems:"center",gap:"4px"}),children:[l,(0,r.jsx)(k.t,{code:"icon-edit",fontSize:12,className:(0,K.AH)({cursor:"pointer",color:"text.tertiary",_hover:{color:"brand.main"}}),onClick:()=>tj(t,s)})]}):(0,r.jsx)(r.Fragment,{children:l})}var tT=t(46531),tk=t(88418),tN=t(95147),tS=t.n(tN);function tI(e){let{data:l,amountAcc:t,quote_currency:o,priceAcc:s,onCancel:i}=e,{t:n}=(0,C.B)(),a=(0,f.M)(l.amount,t),c=(0,A.useCallback)(()=>{null==i||i(l)},[l,i]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("ul",{className:tS()["data-box"],children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:n("Public.Size")}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${a} ${o}`})})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:n("Trade.Filled")}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${(0,f.M)(l.filled_amount,t)} ${o}`})})]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:n("Public.Price")}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:(0,r.jsx)("span",{translate:"no",className:"notranslate",children:(0,h.gS)((0,f.M)(l.price,s))})})]})]}),(0,r.jsx)(lz.$,{className:tS()["cancel-btn"],fullWidth:!0,color:"secondary",size:"small",onClick:c,children:n("Public.Cancel")})]})}function tA(e){let{data:l,amountAcc:t,quote_currency:o,priceAcc:s,onCancel:i}=e,{t:n}=(0,C.B)(),a=(0,f.M)(l.amount,t),c=(0,A.useCallback)(()=>{null==i||i(l)},[l,i]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:tS()["data-box-conditional"],children:[(0,r.jsxs)("div",{className:tS().row,children:[(0,r.jsxs)("div",{className:tS()["col-left"],children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:n("Public.Size")}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${a} ${o}`})})]}),(0,r.jsxs)("div",{className:tS()["col-right"],children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:n("Trade.Filled")}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${(0,f.M)(l.filled_amount,t)} ${o}`})})]})]}),(0,r.jsxs)("div",{className:tS().row,children:[(0,r.jsxs)("div",{className:tS()["col-left"],children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:n("Public.Price")}
1),(0,r.jsx)("div",{className:tS()["data-box-content"],children:(0,r.jsx)("span",{translate:"no",className:"notranslate",children:(0,h.gS)((0,f.M)(l.price,s))})})]}),(0,r.jsxs)("div",{className:tS()["col-right"],children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:n("Trade.TrailingGap")}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:(0,r.jsx)("span",{translate:"no",className:"notranslate",children:void 0!==l.trail_price&&""!==l.trail_price?(0,h.gS)((0,f.M)(l.trail_price,s)):"--"})})]})]})]}),(0,r.jsx)(lz.$,{className:tS()["cancel-btn"],fullWidth:!0,color:"secondary",size:"small",onClick:c,children:n("Public.Cancel")})]})}function tC(e){let{data:l,amountAcc:t,quote_currency:o,base_currency:s,priceAcc:i,onCancel:n}=e,{t:a}=(0,C.B)(),c=(0,f.M)(l.amount,t),d=(0,A.useCallback)(()=>{null==n||n(l)},[l,n]),u=l.amount&&Number(l.amount)>0?`${(0,eO.mi)(l.filled_amount).div(l.amount).multipliedBy(100).toFixed(2,0)}%`:"0.00%",p="-1"===l.price||l.order_type.indexOf("market")>-1,m=p?a("Trade.Market"):(0,h.gS)((0,f.M)(l.price,i)),{order_type:x,direction:_,trigger_price:g,trigger_price_type:v}=l;if(["limit","market","trailing"].includes(x))return(0,r.jsx)("div",{className:tS()["open-order-panel"],children:"--"});let b=(0,h.gS)((0,f.M)({value:g,acc:-1,format:!0})),y=[(0,r.jsxs)(r.Fragment,{children:[a(lf.Cy[v]),` ⤠${b}`]}),(0,r.jsxs)(r.Fragment,{children:[a(lf.Cy[v]),` ⥠${b}`]})],[j,w]="buy"===_?y:y.reverse(),T=x.startsWith("take_profit")?j:w;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:tS()["data-box-conditional"],children:[(0,r.jsxs)("div",{className:tS().row,children:[(0,r.jsxs)("div",{className:tS()["col-left"],children:[(0,r.jsxs)("div",{className:tS()["data-box-title"],children:[a("Trade.Filled"),"/",`${p?`${a("Public.Total")}(${s})`:`${a("Public.Size")}(${o})`}`]}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:`${(0,f.M)(l.filled_amount,t)}/${c}`})]}),(0,r.jsxs)("div",{className:tS()["col-right"],children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:a("Trade.Filled")}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:u})]})]}),(0,r.jsxs)("div",{className:tS().row,children:[(0,r.jsxs)("div",{className:tS()["col-left"],children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:a("Trade.TriggerPrice")}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:T})]}),(0,r.jsxs)("div",{className:tS()["col-right"],children:[(0,r.jsx)("div",{className:tS()["data-box-title"],children:a("Public.Price")}),(0,r.jsx)("div",{className:tS()["data-box-content"],children:m})]})]})]}),(0,r.jsxs)("div",{className:tS()["btn-group"],children:[(0,r.jsx)(lz.$,{fullWidth:!0,color:"secondary",size:"small",onClick:()=>tj(l,()=>eZ._.getOpenOrder().subscribe()),children:a("Trade.EditOrder.Title")||"Modify Order"}),(0,r.jsx)(lz.$,{fullWidth:!0,color:"secondary",size:"small",onClick:d,children:a("Public.Cancel")})]})]})}function tO(e){let{data:l}=e,t="TRAILING"===l.perpetualOrderType,o=l.perpetualOrderType&&"LIMIT"!==l.perpetualOrderType&&"MARKET"!==l.perpetualOrderType&&"TRAILING"!==l.perpetualOrderType;return(0,r.jsxs)("div",{className:tS()["open-order-panel"],children:[(0,r.jsxs)("div",{className:tS()["first-line"],children:[(0,r.jsxs)("div",{className:(0,lc.B)({gap:"2px",alignItems:"center"}),children:[(0,r.jsx)("span",{className:tS().name,children:l.show_name}),(0,r.jsx)(tb.v,{size:"small",status:"buy"===l.direction?"long":"short",children:(0,tk.s8)(l.direction)})]}),(0,r.jsx)(tT.H0,{value:l.creation_timestamp})]}),t&&(0,r.jsx)(tA,{...e}),o&&(0,r.jsx)(tC,{...e}),!t&&!o&&(0,r.jsx)(tI,{...e})]})}var tP=t(87489),tM=t.n(tP);function tH(e){let{kind:l,instrumentName:t,onDepositBtnClick:o}=e,{precisionGetter:s}=(0,_.B)({kind:l,instrumentName:t}),{t:i}=(0,C.B)(),[n,a]=(0,A.useState)("LIMIT"),c=(0,A.useRef)(!1);(0,A.useEffect)(()=>{c.current=!1},[t,l]);let d=e=>{tf.Q.create({title:i("Public.Confirm"),children:(0,r.jsx)("div",{className:(0,K.AH)({color:"text-secondary"}),children:i("Trade.Cancel.Order")}),resolve:{label:i("Public.Confirm"),action:async()=>{try{let l=await eh.O.cancel({order_id:e.order_id});
1return await (0,ep.D7)(l),!0}catch(e){return(0,ef.Vf)({error:e}),!1}}},reject:{label:i("Public.Cancel")}})};return(0,r.jsx)(u.nu,{children:()=>{var e;let l=null!=(e=eP.nT.SPOT)&&!!e.available&&(0,eO.mi)(eP.nT.SPOT.available).isGreaterThan(0);if(0===eZ._.openOrders.length)return l?(0,r.jsx)(eK.s,{children:(0,r.jsx)(t_.D,{label:i("Public.NoData")})}):(0,r.jsx)(th.V,{onDepositBtnClick:o});let t=[],u=[],p=[];if(eZ._.openOrders.forEach(e=>{"LIMIT"===e.perpetualOrderType||"MARKET"===e.perpetualOrderType?t.push(e):"CONDITIONAL"===e.perpetualOrderType?u.push(e):"TRAILING"===e.perpetualOrderType&&p.push(e)}),!c.current){let e="LIMIT";t.length>0?e="LIMIT":u.length>0?e="CONDITIONAL":p.length>0&&(e="TRAILING"),c.current=!0,n!==e&&a(e)}let m="LIMIT"===n?t:"CONDITIONAL"===n?u:p,x=`${i("Trade.Limit")}ï½${i("Trade.Market")}${t.length>0?` (${t.length})`:""}`,h=`${i("Trade.Conditional")}${u.length>0?` (${u.length})`:""}`,f=`${i("Trade.Trailing")}${p.length>0?` (${p.length})`:""}`;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:(0,K.AH)({borderBottom:"0.5px solid",borderBottomColor:"base-primary",display:"flex",alignItems:"center",padding:"12px",gap:"8px",overflowX:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),children:[(0,r.jsx)("div",{className:(0,K.AH)({display:"flex",alignItems:"center",justifyContent:"center",height:"24px",padding:"2px 12px",borderRadius:"24px",fontSize:"14px",fontWeight:500,cursor:"pointer",userSelect:"none",whiteSpace:"nowrap",backgroundColor:"LIMIT"===n?"base-secondary":"transparent",color:"LIMIT"===n?"text-primary":"text-secondary",transition:"all 0.2s"}),onClick:()=>a("LIMIT"),children:x}),(0,r.jsx)("div",{className:(0,K.AH)({display:"flex",alignItems:"center",justifyContent:"center",height:"24px",padding:"2px 12px",borderRadius:"24px",fontSize:"14px",fontWeight:500,cursor:"pointer",userSelect:"none",whiteSpace:"nowrap",backgroundColor:"CONDITIONAL"===n?"base-secondary":"transparent",color:"CONDITIONAL"===n?"text-primary":"text-secondary",transition:"all 0.2s"}),onClick:()=>a("CONDITIONAL"),children:h}),(0,r.jsx)("div",{className:(0,K.AH)({display:"flex",alignItems:"center",justifyContent:"center",height:"24px",padding:"2px 12px",borderRadius:"24px",fontSize:"14px",fontWeight:500,cursor:"pointer",userSelect:"none",whiteSpace:"nowrap",backgroundColor:"TRAILING"===n?"base-secondary":"transparent",color:"TRAILING"===n?"text-primary":"text-secondary",transition:"all 0.2s"}),onClick:()=>a("TRAILING"),children:f})]}),0===m.length?(0,r.jsx)(eK.s,{children:(0,r.jsx)(t_.D,{label:i("Public.NoData")})}):m.map((e,l)=>{let{amount:t,price:o,instrument:i}=s(e.instrument_name);return(0,r.jsxs)("div",{className:tM()["open-order-item"],children:[(0,r.jsx)(tO,{data:e,quote_currency:null==i?void 0:i.quote_currency,base_currency:null==i?void 0:i.base_currency,amountAcc:t,priceAcc:o,onCancel:d}),(0,r.jsx)(l_.c,{})]},l)})]})}})}var tB=t(48962),tR=t(35003),tL=t(89201),tF=t.n(tL);function tz(e){let{data:l}=e,{t}=(0,C.B)(),o="USDT"===l.coin_type,s=(0,I.useRouter)(),i=o?l.total:(0,eO.mi)(l.total).multipliedBy(l.current_mark_price);return(0,r.jsxs)("div",{className:tF()["spot-token-box"],children:[(0,r.jsxs)("div",{className:tF()["first-line-box"],children:[(0,r.jsx)(tB.kf,{value:l.coin_type,children:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(tR.A,{variant:"h6",color:"inherit",sx:{cursor:o?"default":"pointer"},display:"flex",alignItems:"center",onClick:e=>{e.stopPropagation(),o||s.push((0,w.Yn)("SpotItem",{params:{symbol
1:`${l.coin_type}-USDT-SPOT`}}))},children:[(0,r.jsx)("span",{children:l.coin_type}),!o&&(0,r.jsx)(k.t,{code:"icon-caret-right",fontSize:6,ml:.5,color:"text.tertiary"})]}),(0,r.jsx)(tR.A,{variant:"subtitle2",color:"text.secondary",noWrap:!0,children:(null==e?void 0:e.fullName)||"--"})]})}),(0,r.jsxs)("div",{className:tF().total,children:[(0,r.jsx)("div",{children:(0,f.M)({value:i,acc:8,format:!0})}),(0,r.jsx)(e3.x,{value:o?l.total:i,color:"text.secondary",fontSize:12})]})]}),(0,r.jsxs)("div",{className:tF()["secondary-line"],children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:tF()["token-title"],children:t("Public.Available")}),(0,r.jsx)("div",{className:tF()["token-value"],children:(0,f.M)({value:l.available,acc:8,format:!0})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:tF()["token-title"],children:t("Public.Frozen")}),(0,r.jsx)("div",{className:tF()["token-value"],children:(0,f.M)({value:l.freeze,acc:8,format:!0})})]})]})]})}function tD(e){var l,t,o,s;let{data:i,onDepositBtnClick:n}=e,{t:a}=(0,C.B)(),c=i.every(e=>0===e.data.length);return(0,r.jsxs)("div",{className:tF()["spot-token"],children:[(0,r.jsx)(u.nu,{children:()=>{var e;let l=null!=(e=eP.nT.SPOT)&&!!e.available&&(0,eO.mi)(eP.nT.SPOT.available).isGreaterThan(0);return(0,r.jsx)("span",{children:c&&!l?(0,r.jsx)(th.V,{onDepositBtnClick:n}):null})}}),c?(0,r.jsx)(t_.D,{label:a("Public.NoData")}):null,null==(t=i[0])||null==(l=t.data)?void 0:l.map((e,l)=>(0,r.jsx)(tz,{data:e},l)),null==(s=i[1])||null==(o=s.data)?void 0:o.map((e,l)=>(0,r.jsx)(tz,{data:e},l))]})}var tE=t(24584),t$=t.n(tE);function tW(e){let{instrumentName:l,kind:t,...o}=e,{t:s}=(0,C.B)(),[i,n]=(0,A.useState)("1"),[a]=eW(),{instrument:c}=(0,_.B)(),{push:d}=(0,I.useRouter)(),[p,m]=(0,A.useState)([]),{isLogin:x}=(0,le.II)(),h=(0,A.useContext)(li.N),f=null==c?void 0:c.base_currency,g=(0,A.useCallback)(()=>{null==h||h.create("inner",{to:"SPOT",currency:f})},[f,h]),v=(0,A.useMemo)(()=>[{label:(0,r.jsxs)(e6.A,{display:"flex",alignItems:"center",children:[s("Trade.Open.Orders"),(0,r.jsx)(u.nu,{children:()=>(0,r.jsxs)(r.Fragment,{children:["(",eZ._.openOrders.length,")"]})})]}),activeKey:"1"},{label:`${s("Public.Coin")}(${p.reduce((e,l)=>e+l.data.length,0)})`,activeKey:"0"}],[p,s]);return(0,A.useEffect)(()=>{if(c)return(0,eQ.fm)(()=>{if(eP.nT.SPOT){let e=eP.nT.SPOT.details??[],l=[{title:"Trade.Token.CurrentPair",data:[]},{title:"Trade.Token.OtherPairs",data:[]}],{quote_currency:t,base_currency:r}=c;e.forEach(e=>{[t,r].includes(e.coin_type)?r===e.coin_type?l[0].data.push(e):l[0].data.unshift(e):tn.Z.less1U.filter((0,eO.mi)(e.current_mark_price??"0").multipliedBy(e.total).toFixed(8))&&l[1].data.push(e)}),m(l.filter(e=>!!e.data.length))}})},[c]),(0,r.jsxs)("div",{...o,children:[(0,r.jsx)(te.tU,{className:(0,K.AH)({px:"16px"}),fullWidth:!0,variant:"line",size:"sm",suffix:(0,r.jsx)(tc.A,{onClick:()=>{d((0,w.Yn)("Orders"))},children:(0,r.jsx)(ln.l,{src:"/static-lib/img/icon-mono/zA2utlaegFKcVZbD.svg",css:{width:"16px",height:"16px",color:"text-secondary"}})}),value:i,onChange:(e,r)=>{eY.I.SpotMargin.SpotMarginPageAction({tradepair_name:l,tradeType:t,operate_type:"switch_flowtype"}),n(r)},children:v.map(e=>(0,r.jsx)(te.oz,{value:e.activeKey,label:e.label},e.activeKey))}),"1"===i?(0,r.jsx)("div",{className:t$()["open-order-global-action-box"],children:(0,r.jsxs)("div",{className:t$()["action-box"],children:[(0,r.jsx)("div",{children:(0,r.jsx)(eG,{})}),x&&(0,r.jsx)("span",{children:(0,r.jsx)(R.I,{color:"info",size:"small",onClick:()=>{let e=[],t=[],o=[];eZ._.openOrders.forEach(l=>{"LIMIT"===l.perpetualOrderType||"MARKET"===l.perpetualOrderType?e.push(l):"CONDITIONAL"===l.perpetualOrderType?t.push(l):"TRAILING"===l.perpetualOrderType&&o.push(l)});var s={data:{"LIMIT,MARKET":e,CONDITIONAL:t,TRAILING:o},onCancel:async e=>{let t=e?e.split(","):[],r=await (a?eh.O.cancelAllByInstrument({instrument_name:l,perpetualOrderType:t}):eh.O.cancelAllByCurrency({currency:"SPOT",kind:"spot",perpetualOrderType:t}));return r.error&&ta.R.error(r.error.message),!r.error}};let i=(0,td.v)({anchor:"bottom",children:(0,r.jsx)(tx,{...s,onClose:()=>i.destroy()})})},disabled:!eZ._.openOrders.length,children:s("Trade.Cancel.All")})})]})}):null,(0,r.jsx)(l_.c,{}),(0,r.jsx)(ti.s,{children:(0,r.jsxs)("div",{className:t$()["content-box"],children:["0"===i?(0,r.jsx)(tD,{data:p,onDepositBtnClick:g}):null,"1"===i?(0,r.jsx)(tH,{instrumentName:l,kind:t,onDepositBtnClick:g}):null]})})]})}var tG=t(91928),tK=t.n(tG);let tV=()=>0;function tq(e){let{instrumentName:l,showName:t}=e,{kind:o}=(0,eA.j)(),{precision:s,instrument:i}=(0,_.B)(),n=(0,ee.Bu)(),[d,p]=(0,A.useState)(!1),m=(0,A.useCallback)(()=>{p(!1)},[]),[x,h]=(0,A.useState)(0),f=(null==i?void 0:i.instrId)||0;(0,A.useEffect)(()=>{ei.S.setBookMaxShowSize({instrumentId:f,maxShowSize:16})},[f]);let v=(0,A.useCallback)(()=>{p(!0)},[]),b=(0,A.useCallback)(()=>{p(!0)},[]),y=(0,A.useCallback)(e=>{h(e)},[]),j=(0,A.useCallback)(e=>{var t;null==(t=eZ._.setDepth)||t.call(eZ._,e),eY.I.SpotMargin.SpotMarginPageAction({tradepair_name:l,tradeType:o,operate_type:"switch_depth"})},[l,o]),[w]=eW();(0,A.useEffect)(()=>(0,eQ.fm)(()=>{let e=Object.values(eZ._.ordersMap);eZ._.openOrders=(w?e.filter(e=>e.instrument_name===l):e).sort((e,l)=>l.creation_timestamp-e.creation_timestamp)}),[w,l]);let[T,k]=(0,A.useState)({});(0,A.useEffect)(()=>
1{if(i)return(0,eQ.fm)(()=>{let e={};Object.values(eZ._.ordersMap).forEach(l=>{l.instrument_name===i.instrument_name&&eZ._.depth&&Reflect.set(e,+eU.ov.depthPrice(l.price,eZ._.depth,"sell"===l.direction?2:1),l.direction)}),k(e)})},[i]);let N=6*(0===x?1:2);return(0,A.useEffect)(()=>{let e=ee.G.hashChange.subscribe(e=>{""===e&&ei.S.setBookMaxShowSize({instrumentId:f,maxShowSize:16})});return()=>{e.unsubscribe()}},[f]),(0,r.jsx)(e0.p2,{chat:(e,l)=>(0,r.jsx)("div",{className:(0,K.AH)({height:"300px"}),children:(0,r.jsx)(eL,{needQuickOrder:!1,isSimple:!0,headerExtra:"bottom"===e?l:null})}),children:(0,r.jsxs)("div",{className:tK().root,children:[(0,r.jsx)(to.A,{showName:t,instrumentName:l,onCoinNameClick:b,onChartClick:el,onSettingClick:et}),(0,r.jsx)(eo.A,{top:0,sticky:!1,position:"spot",instrumentName:l}),(0,r.jsx)(e0.tP,{position:"top"}),(0,r.jsxs)("div",{className:tK()["spot-panel"],children:[(0,r.jsx)("div",{className:tK()["spot-orderbook-box"],children:(0,r.jsx)(eK.s,{children:(0,r.jsx)(a.i,{threshold:.9,kind:"spot",instrumentId:f,instrumentName:l,getOrderType:tV,getInstrumentData:()=>{var e,l;return{quote_currency:(null==s||null==(e=s.instrument)?void 0:e.quote_currency)||"",base_currency:(null==s||null==(l=s.instrument)?void 0:l.base_currency)||""}},onDepthSetting:j,onViewChange:y,asks:(0,r.jsx)(eV.Ek,{instrumentName:l,instrumentId:f,children:e=>(0,r.jsx)(u.nu,{children:()=>(0,r.jsx)(c.u,{...e,instrumentName:l,ownerOrders:T,rowClick:eq.l,kind:o,align:"bottom",type:"sell",showSize:N})})}),ticker:(0,r.jsx)("div",{className:tK()["ticker-box"],children:(0,r.jsx)(g,{kind:"spot",instrumentName:l,market:"SPOT",instrumentId:(null==i?void 0:i.instrId)||0})}),bids:(0,r.jsx)(eV.Oc,{instrumentName:l,instrumentId:(null==i?void 0:i.instrId)||0,children:e=>(0,r.jsx)(u.nu,{children:()=>(0,r.jsx)(c.u,{...e,instrumentName:l,ownerOrders:T,align:"top",rowClick:eq.l,kind:o,showSize:N})})})})})}),(0,r.jsx)("div",{className:tK()["spot-create-order-box"],children:(0,r.jsx)(eK.s,{children:(0,r.jsx)(tr,{})})})]}),(0,r.jsx)(tW,{className:tK().tabs,instrumentName:l,kind:o}),(0,r.jsx)(eJ.k,{showName:t}),(0,r.jsx)(lo,{instrumentId:f,instrumentName:l,kind:o,currency:"SPOT",open:"showChartDrawer"===n,onClose:er,onCoinNameClick:v}),(0,r.jsx)(ts.m,{kind:o,open:"showTradeSetting"===n,onClose:er}),(0,r.jsx)(eX.D,{open:d,anchor:"bottom",onClose:m,children:(0,r.jsx)(J,{onClose:m})})]})})}var tU=t(72804),tY=t(78098),tX=t(99915),tZ=t(59714);let tQ=A.forwardRef((e,l)=>{let{style:t,children:o,gridId:s,...i}=e,{styles:n,elementRef:a}=(0,tX._)({style:t,addParentStyle:!0}),c=(0,tZ.A)(l,a);return(0,r.jsx)(e6.A,{...i,zIndex:3,style:n,ref:c,height:"100%",width:"100%",children:o})});tQ.displayName="GridComponent";let tJ=(0,A.createContext)({layout:{},point:""}),t0=(0,A.createContext)({setLayout(e){}});var t1=t(62898),t2=t(1603),t4=t(98477),t3=t(45832);let t8=(0,t3.WidthProvider)(t3.Responsive),t9={cols:{xl:48,lg:48,md:12,sm:12,xs:12},breakpoints:t2.AX,useCSSTransforms:!0,compactType:"vertical",resizeHandles:["se"]};function t6(e){let{draggableHandle:l="react-grid-draggable-handle",draggableCancel:t="MuiButtonBase-root",rowHeight:o=10,margin:s=[4,4],onLayoutChange:i,autoSize:n=!0,preventCollision:a=!1,children:c,localKey:d,defaultValues:u,isDraggable:p=!0,...m}=e,x=(0,I.useRouter)(),h=(0,t1.I)(),f=eF.jW.value(),[_,g]=(0,A.useState)({realPoint:f??"lg",breakpoints:t2.AX}),[v,b]=(0,A.useState)(()=>u),y=_.point||_.realPoint,j=(0,A.useMemo)(()=>({layout:v[_.realPoint].reduce((e,l)=>(Reflect.set(e,l.i,l),e),{}),point:_.realPoint}),[_.realPoint,v]),w=(0,H.g)(()=>{g(e=>({...e,breakpoints:{...e.breakpoints,xs:+(0===e.breakpoints.xs)}}))});(0,A.useEffect)(()=>{(0,t4.unstable_batchedUpdates)(()=>{let e=T.S.get(d);e&&b(e),w()})},[d,w]),(0,A.useEffect)(()=>{eF.jW.value(y,{path:x.pathname.replace(/(\[\w+\])/g,"")})},[y,x.pathname]);let k=(0,A.useMemo)(()=>{let e=Reflect.get(v,y).filter(e=>0!==e.w&&0!==e.h||Reflect.has(e,"hide")&&!e.hide).reduce((e,l)=>(Reflect.set(e,l.i,l),e),{});return A.Children.toArray(c).map(l=>(0,A.isValidElement)(l)&&"string"!=typeof l&&l.type===tQ?(0,r.jsx)("div",{"data-grid":l.props.gridId,style:{transition:"width .2s linear"},children:Reflect.has(e,l.props.gridId)&&l},l.props.gridId):l)},[c,v,y]),N=(0,A.useMemo)(()=>({setLayout(e){(0,t4.unstable_batchedUpdates)(()=>{w(),b(l=>{let t=l[y];return{...l,[y]:t.map(l=>({...l,...e[l.i]}))}})})}}),[y,w]);return(0,r.jsx)(t0.Provider,{value:N,children:(0,r.jsx)("div",{className:(0,K.AH)({position:"relative"},{"& .react-grid-item,& .react-grid-item.react-grid-placeholder":{bgColor:"bg-secondary"}}),children:(0,r.jsx)(tJ.Provider,{value:j,children:(0,r.jsx)(t8,{...t9,breakpoints:_.breakpoints,draggableCancel:`.${t}`,draggableHandle:`.${l}`,rowHeight:o,margin:s,isDraggable:!h&&p,resizeHandle:m.isResizable?void 0:(0,r.jsx)("span",{}),...m,layouts:v,onBreakpointChange:e=>{_.realPoint!==e&&g(l=>({...l,realPoint:e}))},onLayoutChange:(e,l)=>{t2.AX!==_.breakpoints&&(T.S.set(d,l),b(l))},children:k})})})})}let t7=[1e4,100,1];function t5(e){return e.split(".").reduce((e,l,t)=>e+=l*t7[t])}
1let re=t5("5.1.8");var rl=t(55253),rt=t(69231),rr=t(65998),ro=t(57832),rs=t(80135),ri=t(96982);let rn=function(e){let{tourIdCanUse:l,...t}=e;return(0,r.jsxs)(ri.x.Row,{gutter:16,children:[(0,r.jsx)(ri.x.Col,{xs:24,sm:12,children:(0,r.jsxs)(lm,{direction:"buy",kind:"spot",children:[(0,r.jsx)(lx,{tourId:l}),t.Left]})}),(0,r.jsx)(ri.x.Col,{xs:24,sm:12,children:(0,r.jsxs)(lm,{direction:"sell",kind:"spot",children:[(0,r.jsx)(lx,{}),t.Right]})})]})};var ra=t(84906);let rc={root:"spot-tour-root",step1:"spot-tour-1",step2:"spot-tour-2",step2_1:"spot-tour-2-1",step3:"spot-tour-3",step4:"spot-tour-4",step5:"spot-tour-5"},rd=e=>{let{orderType:l}=e,{t}=(0,C.B)(),o="buy"===l;return(0,r.jsx)(ra.S6,{storageKey:"orx-tour-spot",checkType:["adv-dialog"],rootId:rc.root,tourId:rc.step5,steps:[{target:()=>document.getElementById(rc.step1),title:t("Tour.Trading01","Select Trading Pair"),children:t("Tour.Trading02","Choose the cryptocurrencies pair you want to trade here."),viewPortThreshold:64,MaskProps:{gap:[8,16]}},{target:()=>{let e=o?rc.step2:rc.step2_1;return document.getElementById(e)},title:t("Tour.Trading03","Transfer Funds"),children:t("Tour.Trading04","Transfer funds to your spot account."),viewPortThreshold:30,MaskProps:{gap:[8,13]}},{target:()=>document.getElementById(rc.step3),title:t("Tour.Trading05","Place Your Order"),children:t("Tour.Trading06","Choose between limit order or market order. Confirm the quantity and price of cryptocurrency you want to buy or sell. Then click âBuyâ or âSellâ to place an order."),MaskProps:{gap:e=>{let l=[43,-(e.width/2)+5,-10,-2];return o||(l[2]=2),l}}},{target:()=>document.getElementById(rc.step4),title:t("Tour.Trading07","View Orders And Funds"),children:t("Tour.Trading08","You can view open orders, order history, trade history and token here."),viewPortThreshold:30,MaskProps:{gap:[4,16]}},{target:()=>document.getElementById(rc.step5),title:t("Tour.Trading09","Check Again"),children:t("Tour.Trading10","Congratulations on completing guidance! Click here to view the trading tutorial again."),viewPortThreshold:64,MaskProps:{gap:[10,12]}}]})},ru=e=>{let{instrumentData:l,dispatchCreateOrderType:t}=e,{kind:o}=(0,eA.j)(),{t:s}=(0,C.B)(),[i,n]=(0,A.useState)("0");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:(0,K.cx)("react-grid-draggable-handle",(0,K.AH)({flexShrink:0})),children:[(0,r.jsx)("div",{className:(0,K.AH)({px:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",fontWeight:700,minHeight:"39px",fontSize:"14px",bg:"bg-secondary"}),children:(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"}),children:[(0,r.jsx)(ro.t,{size:"sm",variant:"line",value:i,onChange:(e,r)=>{eY.I.SpotMargin.SpotMarginPageAction({tradeType:o,operate_type:"switch_tradetype",tradepair_name:l.instrument_name}),n(r),t(r)},children:[{label:s("Trade.Order.Limit"),value:"0"},{label:s("Trade.Order.Market"),value:"1"},{label:s("Trade.Conditional"),value:"2"},{label:s("Trade.Trailing"),value:"3"}].map(e=>(0,r.jsx)(rr.o,{...e},e.value))}),(0,r.jsx)("div",{className:(0,K.AH)({p:0,fontSize:0}),children:(0,r.jsx)(rs.m,{title:s("0"===i?"Trade.Tooltip.Limit":"1"===i?"Trade.Tooltip.Market":"Trade.Tooltip.Conditional"),underline:!1,children:(0,r.jsx)(ln.l,{src:"/static-lib/img/icon-mono/RVkAVPwVYEIoQ9x_.svg",css:{width:"16px",height:"16px",color:"text-secondary"}})})})]})}),(0,r.jsx)(l_.c,{color:"var(--colors-base-primary)",className:(0,K.AH)({transform:"translateY(-1px)"})})]}),(0,r.jsxs)("div",{id:rc.step3,children:[(0,r.jsx)("div",{className:(0,K.AH)({p:"12px",display:"0"===i?"block":"none"}),children:(0,r.jsx)(rn,{tourIdCanUse:rc.step2,Left:(0,r.jsx)(lZ,{direction:"buy",children:`${s("Public.Buy")} ${l.quote_currency}`}),Right:(0,r.jsx)(lZ,{direction:"sell",children:`${s("Public.Sell")} ${l.quote_currency}`})})}),(0,r.jsx)("div",{className:(0,K.AH)({p:"12px",display:"1"===i?"block":"none"}),children:(0,r.jsx)(rn,{Left:(0,r.jsx)(l4,{direction:"buy",tourIdCanUse:rc.step2_1,children:`${s("Public.Buy")} ${l.quote_currency}`}),Right:(0,r.jsx)(l4,{direction:"sell",children:`${s("Public.Sell")} ${l.quote_currency}`})})}),(0,r.jsx)("div",{className:(0,K.AH)({p:"12px",display:"2"===i?"block":"none"}),children:(0,r.jsx)(rn,{Left:(0,r.jsx)(l2,{direction:"buy",children:`${s("Public.Buy")} ${l.quote_currency}`}),Right:(0,r.jsx)(l2,{direction:"sell",children:`${s("Public.Sell")} ${l.quote_currency}`})})}),(0,r.jsx)("div",{className:(0,K.AH)({p:"12px",display:"3"===i?"block":"none"}),children:(0,r.jsx)(rn,{Left:(0,r.jsx)(l9,{direction:"buy",instrumentName:l.instrument_name,children:`${s("Public.Buy")} ${l.quote_currency}`}),Right:(0,r.jsx)(l9,{direction:"sell",instrumentName:l.instrument_name,children:`${s("Public.Sell")} ${l.quote_currency}`})})})]})]})};var rp=t(88952),rm=t(39039),rx=t(34034),rh=t(72807),rf=t(30505),r_=t(27843),rg=t(12166),rv=t(70847),rb=t(92864),ry=t(45698),rj=t(395),rw=t(16201),rT=t(28812),rk=t(3010),rN=t(48595),rS=t(96033),rI=function(e){return e.SelectList="SelectList",e.TradingView="TradingView",e.Market="Market",e.OrderBook="OrderBook",e.Trades="Trades",e.Order="Order",e.Tables="Tables",e.Assets="Assets",e.Ticker="Ticker",e.Cache="spot_grid_layout_v3",e}({});(0,rS.o)()&&(T.S.remove("spot_grid_layout"),T.S.remove("spot_grid_layout_v2"));let rA={xl:{w:9,h:69,x:0,y:0,i:"SelectList",moved:!1,static:!1},lg:{w:10,h:71,x:0,y:0,i:"SelectList",moved:!1,static:!1}},rC={xl:[rA.xl,{w:39,h:5,x:9,y:0,i:"Ticker",minW:3,minH:2,moved:!1,static:!1},{w:21,h:35,x:9,y:5,i:"TradingView",minW:5,minH:10,moved:!1,static:!1},{w:21,h:29,x:9,y:40,i:"Order",minW:4,moved:!1,static:!1},{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"Market",moved:!1,static:!1,hide:!0},{w:9,h:46,x:30,y:5,i:"OrderBook",minW:3,moved:!1,static:!1},{w:9,h:64,x:39,y:5,i:"Trades",moved:!1,static:!1},{w:9,h:18,x:30,y:51,i:"Assets",moved:!1,static:!1},{w:48,h:25,x:0,y:69,i:"Tables",minW:8,minH:10,moved:!1,static:!1}],lg:[rA.lg,{w:38,h:5,x:10,y:0,i:"Ticker",minW:3,minH:2,moved:!1,static:!1},{w:28,h:35,x:10,y:5,i:"TradingView",minW:5,minH:10,moved:!1,static:!1},{w:28,h:31,x:10,y:40,i:"Order",minW:4,moved:!1,static:!1},{w:10,h:46,x:38,y:5,i:"Market",minW:3,moved:!1,static:!1},{w:10,h:20,x:38,y:51,i:"Assets",moved:!1,static:!1},{w:48,h:25,x:0,y:71,i:"Tables",minW:8,minH:10,moved:!1,static:!1},{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"OrderBook",moved:!1,static:!1,hide:!0},{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"Trades",moved:!1,static:!1,hide:!0}],md:[{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"SelectList",moved:!1,static:!1},{w:12,h:5,x:0,y:0,i:"Ticker",minW:3,minH:2,moved:!1,static:!1},{w:8,h:35,x:0,y:5,i:"TradingView",minW:5,minH:10,moved:!1,static:!1},{w:8,h:30,x:0,y:40,i:"Order",minW:4,moved:!1,static:!1},{w:4,h:45,x:8,y:5,i:"Market",minW:3,moved:!1,static:!1},{w:4,h:20,x:8,y:50,i:"Assets",moved:!1,static:!1},{w:12,h:19,x:0,y:69,i:"Tables",minW:8,minH:10,moved:!1,static:!1},{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"OrderBook",moved:!1,static:!1,hide:!0},{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"Trades",moved:!1,static:!1,hide:!0}],sm:[{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"SelectList",moved:!1,static:!1},{w:12,h:5,x:0,y:0,i:"Ticker",moved:!1,static:!1},{w:7,h:35,x:0,y:5,i:"TradingView",moved:!1,static:!1},{w:7,h:29,x:0,y:40,i:"Order",moved:!1,static:!1},{w:5,h:35,x:7,y:5,i:"Market",moved:!1,static:!1},{w:5,h:29,x:7,y:40,i:"Assets",moved:!1,static:!1},{w:12,h:19,x:0,y:69,i:"Tables",moved:!1,static:!1},{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"OrderBook",moved:!1,static:!1,hide:!0},{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"Trades",moved:!1,static:!1,hide:!0}],xs:[{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"SelectList",moved:!1,static:!1},{w:12,h:14,x:0,y:0,i:"Ticker",moved:!1,static:!1},{w:12,h:22,x:0,y:10,i:"TradingView",moved:!1,static:!1},{w:12,h:58,x:0,y:53,i:"Order",moved:!1,static:!1},{w:12,h:21,x:0,y:32,i:"Market",moved:!1,static:!1},{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"OrderBook",moved:!1,static:!1},{w:0,minW:0,h:0,minH:0,x:0,y:0,i:"Trades",moved:!1,static:!1},{w:12,h:12,x:0,y:109,i:"Assets",moved:!1,static:!1},{w:12,h:20,x:0,y:121,i:"Tables",moved:!1,static:!1}]};function rO(e){let{expandable:l,onRowClick:t}=e,{t:o}=(0,C.B)(),[s,i]=(0,A.useState)(!1),[n,a]=(0,A.useState)(rf.z6.ALL),[c,d]=(0,A.useState)(""),[u,p]=(0,A.useState)(()=>T.S.get(`${y.h}_spot`)??[]),m=(0,I.useRouter)(),[x,h]=(0,A.useState)(),[f,_]=(0,A.useState)(),g="Followed"===n.partitionId;(0,A.useEffect)(()=>{let e=T.S.get((0,y.m)(!1,"favorite")),l=T.S.get((0,y.m)(!1,"spot"));h(e),_(l)},[]);let[v,{action:b,updateFavoriteList:j,pause:w,resume:k}]=(0,rp.Ge)(),{isLimited:N}=(0,P.o)(),{isLogin:S}=(0,le.II)(),[[O=[]],B,R]=(0,M.F)([async e=>{let l=await G.r.instrumentTickers(e);if(S)return l;let t=await rg.W.get(e.kind);return l.result&&(l.result=l.result.map(e=>({...e,f:t.includes(e.n)}))),l},{kind:"spot",needHotFlag:!0,partitionId:n.partitionId!==rf.z6.ALL.partitionId?n.partitionId:void 0}],{deps:[n.partitionId],first:!1});(0,A.useEffect)(()=>
1{if(!g){let e=(0,rN.O)(0,1700).subscribe(()=>{null==R||R()});return()=>{e.unsubscribe()}}},[R,g,n.partitionId]);let L=(0,H.g)(e=>{let l=e.k,r=e.n,o=Reflect.get(rm.gt,l);return{onClick(){eY.I.tradeAction.onSwitchTickerList({kind:l,symbol:r}),c&&"spot"===l&&!u.some(e=>e.instrumentName===r)&&p(e=>{let l=[...e,{instrumentName:r,pathName:o,name:r.split("-")[0]}];return T.S.set(`${y.h}_spot`,l),l}),rb.b.set(rT.HL[l],r),m.push((0,rm.v)(r,l)),null==t||t()},style:{cursor:"pointer"}}}),F=(0,A.useCallback)((e,l)=>{let t=(0,y.m)(!1,e);T.S.set(t,l)},[]),z=(0,A.useCallback)(e=>{h(e),F("favorite",e)},[F]),D=(0,A.useCallback)(e=>{_(e),F("spot",e)},[F]),E=(0,A.useMemo)(()=>({instrument:new ry.e,price:new ry.e,change:new ry.e}),[]),$=(0,A.useMemo)(()=>v.filter(e=>!N(e.n)),[v,N]),W=(0,A.useMemo)(()=>O.filter(e=>!N(e.n)),[N,O]),V=(0,A.useCallback)(()=>{S&&w()},[S,w]),q=(0,A.useCallback)(async e=>{if(!S){await rg.W.sortDataByIndex(e),b();return}let{changedList:l,sortedList:t}=(0,rv.$)(e,v);j(t),await (0,rw.UE)(l).then(ep.D7).catch(ef.Vf),await (0,rk.y)(200),k()},[v,S,k,b,j]);return(0,r.jsxs)(r_.i3,{data:E,children:[(0,r.jsx)("div",{className:(0,K.Fj)({base:{px:"12px",pb:"8px"},variants:{expandable:{true:{pr:"30px"}}}})({expandable:l}),children:(0,r.jsx)(lj.pd,{placeholder:o("Public.Search"),size:"small",rounded:!0,fullWidth:!0,onClick:e=>{e.stopPropagation()},onFocus:e=>{e.stopPropagation(),i(!0)},onBlur:()=>{setTimeout(()=>{i(!1)},160)},onChange:e=>{let l=e.target.value;d(l.toUpperCase()),l||i(!0)},startAdornment:(0,r.jsx)(rj.r,{code:"icon-search",fontSize:16,color:"text.tertiary"})})}),(0,r.jsx)("div",{className:(0,K.AH)({height:"calc(100% - 32px)"}),children:(0,r.jsx)(rm.GC,{onClick:()=>{i(!1)},searchHistory:u,showHot:s&&!c,onClear:()=>{p([])},children:(0,r.jsxs)(l6.ZH,{value:g?n.partitionId:"spot",children:[(0,r.jsx)(rf.Sw,{followed:!0,zone:n,sx:{px:"12px"},onZoneChange:e=>a(e)}),(0,r.jsx)(l6.OK,{value:"Followed",height:"calc(100% - 50px)",keepAlive:!0,children:(0,r.jsx)(rx.vp,{filter:e=>e.filter(e=>"spot"===e.k),favorite:!0,query:c,kind:"spot",sortValue:x,dragSort:!0,data:$,active:g,onRow:L,onFavorite:b,onSort:z,onSortStart:V,onDragSort:q})}),(0,r.jsx)(l6.OK,{value:"spot",height:"calc(100% - 50px)",keepAlive:!0,children:(0,r.jsx)(rh.v,{sortValue:f,onSort:D,data:W,onRow:L,query:c,kind:"spot",active:!g,onFavorite:R,excludeFields:"t"})})]})})})]})}function rP(){let[{layout:e,point:l},t]=[(0,A.useContext)(tJ),(0,A.useContext)(t0)],[o,s]=(0,A.useMemo)(()=>[e[rI.SelectList],Reflect.get(rA,l)],[e,l]),i=o.w>1,n=(0,A.useCallback)(()=>{let l=i?-1:1,r=s.w-1,{x:n,w:a,h:c,y:d,i:u}=o;o.w+=l*r,Object.values(e).forEach(e=>{e.i!==u&&(!e.hide||0!==e.w&&0!==e.h)&&e.y<d+c&&e.x===n+a&&(e.x-=-l*r,e.w+=-l*r)}),t.setLayout({...e})},[o,null==s?void 0:s.w,t,e,i]);return(0,r.jsx)("div",{className:(0,K.AH)({width:"100%",height:"100%",flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",overflowX:"hidden"}),children:(0,r.jsxs)("div",{className:(0,K.AH)({py:"24px",position:"relative",height:"100%"}),children:[(0,r.jsx)(rj.r,{onClick:n,code:i?"icon-contract":"icon-extend",className:(0,K.Fj)({base:{position:"absolute",top:"30px",fontSize:"18px",color:"text-tertiary"},variants:{open:{true:{right:"4px"},false:{left:"50%",transform:"translateX(-50%)"}}}})({open:i})}),(0,r.jsx)("div",{className:(0,K.Fj)({base:{height:"100%",minWidth:"246px","& .MuiTabs-scrollButtons":{bgColor:"bg-modal"}},variants:{open:{true:{display:"block"},false:{display:"none"}}}})({open:i}),children:(0,r.jsx)(rO,{expandable:!0})})]})})}var rM=t(17211);function rH(){let{t:e}=(0,C.B)(),{kind:l,symbol:t}=(0,eA.j)(),o=(0,eu.W2)(),[s,i]=(0,A.useState)("0");return(0,r.jsx)(rt.Z,{className:"react-grid-draggable-handle",title:(0,r.jsx)(rM.K,{size:"small",activeKey:s,onChange:(e,l)=>{i(l)},tabsList:[{label:e("Trade.OrderBook"),activeKey:"0"},{label:e("Trade.Recent"),activeKey:"1"}]}),children:(0,r.jsxs)(l6.ZH,{value:s,children:[(0,r.jsx)(l6.OK,{value:"0",keepAlive:!0,height:"calc(100% - 38px)",children:(0,r.jsx)(eK.s,{minHeight:200,height:"100%",children:(0,r.jsx)(e7,{symbol:t,instrumentId:o.instrId})})}),(0,r.jsx)(l6.OK,{value:"1",height:"calc(100% - 38px)",children:(0,r.jsx)(tY.f,{instrumentId:o.instrId,base_currency:o.base_currency,quote_currency:o.quote_currency,store:eZ._,showHeader:!0,kind:l,symbol
1:o.instrument_name})})]})})}var rB=t(18655),rR=t(5061),rL=t(89867),rF=t(35505),rz=t(42993),rD=t(7028),rE=t.n(rD);function r$(){let{t:e}=(0,C.B)(),{precision:l}=(0,_.B)(),t=(0,eu.W2)(),{isLogin:o}=(0,le.II)(),{onClickHandle:s}=(0,rR.e)(),i=(0,A.useContext)(li.N),n=(0,I.useRouter)();return(0,r.jsx)(rt.Z,{className:"react-grid-draggable-handle",title:e("Public.Assets"),children:(0,r.jsxs)(rF.E,{style:{padding:16},children:[(0,r.jsx)(u.nu,{children:()=>{let{base_currency:s,quote_currency:i}=t,n=eP.nT.find("SPOT",i),a=eP.nT.find("SPOT",s);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:rE()["assets-item-box"],children:[(0,r.jsx)("span",{className:rE()["assets-item-title"],children:e("Trade.Assets.Available",{token:s})}),(0,r.jsx)("span",{translate:"no",className:"notranslate",children:(0,f.M)({value:o?null==a?void 0:a.available:"--",acc:4,format:!0,suffix:s})})]}),(0,r.jsxs)("div",{className:rE()["assets-item-box"],children:[(0,r.jsx)("span",{className:rE()["assets-item-title"],children:e("Trade.Assets.Available",{token:i})}),(0,r.jsx)("span",{translate:"no",className:"notranslate",children:(0,f.M)({value:o?null==n?void 0:n.available:"--",acc:l.amount,format:!0,suffix:i})})]})]})}}),(0,r.jsxs)(rz.A,{direction:"row",spacing:.8,children:[(0,r.jsx)(ls.A,{href:(0,w.U)(n.asPath),children:(0,r.jsx)(R.I,{size:"medium",color:"info",fullWidth:!0,onClick:()=>{s({authType:["assets_deposit"],callback:()=>(0,rL.z)(n,{currency:"spot"})})},children:e("Public.Deposit")})}),(0,r.jsx)(ls.A,{href:(0,w.U)(n.asPath),children:(0,r.jsx)(R.I,{size:"medium",color:"info",fullWidth:!0,onClick:()=>{i&&i.create("inner",{to:"SPOT",currency:"USDT"})},children:e("Public.Transfer")})})]}),(0,r.jsx)(rB.x,{kind:"spot",style:{marginTop:24}})]})})}function rW(e){let{data:l}=e,t=(0,I.useRouter)();return(0,r.jsxs)("div",{className:(0,K.AH)({fontSize:"12px",color:"inherit"},{cursor:"pointer"}),onClick:e=>{e.stopPropagation(),t.push((0,rm.v)(l.instrument_name,l.kind))},children:[(0,r.jsx)("span",{translate:"no",className:"notranslate",children:l.show_name}),(0,r.jsx)(k.t,{code:"icon-caret-right",fontSize:8,ml:.5,color:"text.secondary"})]})}var rG=t(60741),rK=t(46302),rV=t(34742),rq=t(48230),rU=t.n(rq);function rY(e){let{instrumentName:l}=e,{kind:t,symbol:o}=(0,eA.j)(),{precisionGetter:s}=(0,_.B)({kind:t,instrumentName:o}),[i,n]=(0,A.useState)([]),[a,c]=(0,A.useState)(!1),{t:d}=(0,C.B)(["ErrorCode"]),[u]=eW(),[p,m]=(0,A.useState)("LIMIT"),x=(0,A.useRef)(!1);(0,A.useEffect)(()=>{c(!0);let e=u?eh.O.getHistoryOrdersByInstrument({instrument_name:l,sort_field:"create",count:100}):eh.O.getHistoryOrdersByCurrency({kind:"spot",currency:"SPOT",sort_field:"create",count:100}),t=(0,ex.HW)(()=>e).subscribe({next:e=>{n(e),c(!1)}});return()=>{t.unsubscribe()}},[l,u]);let g=i.filter(e=>!e.condition_type||"NORMAL"===e.condition_type),v=i.filter(e=>e.condition_type&&"NORMAL"!==e.condition_type&&"TRAILING"!==e.condition_type),b=i.filter(e=>e.condition_type&&"TRAILING"===e.condition_type);return!x.current&&!a&&i.length>0&&(g.length>0?(m("LIMIT"),x.current=!0):v.length>0?(m("CONDITIONAL"),x.current=!0):b.length>0&&(m("TRAILING"),x.current=!0)),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:(0,K.AH)({height:"calc(100% - 40px)"}),children:[(0,r.jsx)("div",{className:(0,lc.B)({py:"12px",px:"16px",justifyContent:"space-between"}),children:(0,r.jsx)(rM.K,{size:"small-x",variant:"button",activeKey:p,onChange:(e,l)=>{m(l),x.current=!0},tabsList:[{activeKey:"LIMIT",label:`${d("Trade.Order.Limit")}|${d("Trade.Order.Market")}`},{activeKey:"CONDITIONAL",label:`${d("Trade.Conditional")}`},{activeKey:"TRAILING",label:`${d("Trade.Trailing")}`}]})}),(0,r.jsx)(l_.c,{}),(0,r.jsx)("div",{style:{height:"calc(100% - 50px)"},children:(0,r.jsxs)(l6.ZH,{value:p,children:[(0,r.jsx)(l6.OK,{value:"LIMIT",height:"100%",children:(0,r.jsx)(rK.A,{fontSize:"small",isBorder:!0,scroll:{y:"calc(100% - 40px)",x:1e3},rowKey:"creation_timestamp",data:g,loading:a,columns:[{title:d("Trade.Instrument"),dataIndex:"show_name",fixed:"left",width:120,render:(e,l)=>(0,r.jsx)(rW,{data:l})},{title:d("Public.Date"),width:180,render:e=>(0,r.jsx)(tT.H0,{value:e.creation_timestamp})},{title:d("Public.Type"),dataIndex:"order_type",width:80,render:(e,l)=>
1d((0,rV.EF)(e,l.source))},{title:d("Trade.Side"),dataIndex:"direction",width:80,render:rG.Q1},{title:d("Public.Price"),width:140,render(e){let l=s(e.instrument_name);return"-1"===e.price||e.order_type.indexOf("market")>-1?d("Trade.Market"):(0,h.gS)((0,f.M)({value:e.price,acc:l.price,format:!0}))}},{title:d("Public.Size"),dataIndex:"amount",width:140,render(e,l){let t=s(l.instrument_name),r=(0,f.M)(e,t.amount),{order_type:o,direction:i}=l;if("limit"===o||o.indexOf("market")>-1&&"sell"===i){var n;return`${r} ${null==(n=t.instrument)?void 0:n.quote_currency}`}return"--"}},{title:d("Public.Total"),width:140,render(e){var l,t;let r=s(e.instrument_name),{order_type:o,direction:i,amount:n}=e;return"limit"===o?`${(0,lT.A)(n).multipliedBy(e.price).toFixed(r.price)} ${null==(l=r.instrument)?void 0:l.base_currency}`:o.indexOf("market")>-1&&"buy"===i?`${(0,lT.A)(n).toFixed(r.price)} ${null==(t=r.instrument)?void 0:t.base_currency}`:"--"}},{title:d("Trade.Filled"),dataIndex:"filled_amount",width:140,render(e,l){let{order_type:t,direction:o,order_state:i}=l,n=s(l.instrument_name),a=(0,f.M)({value:e,acc:n.amount,format:!0}),c=t.indexOf("market")>-1&&"buy"===o;if("limit"===t||t.indexOf("market")>-1&&"sell"===o||c){var d;let t=(0,lT.A)(e),o=c?t.multipliedBy(l.average_price):t;return(0,r.jsxs)(r.Fragment,{children:[a," ",null==(d=n.instrument)?void 0:d.quote_currency,(0,r.jsx)("br",{}),"filled"===i?"100":t.isZero()?"0.00":o.div(l.amount).multipliedBy(100).toFixed(2,eO._8.ROUND_UP),"%"]})}return"--"}},{title:d("Trade.Avg.Price"),dataIndex:"average_price",width:100,render(e,l){let t=s(l.instrument_name);return"0"===e?"--":(0,h.gS)((0,f.M)(e,t.price))}},{title:d("Public.Status"),dataIndex:"order_state",width:80,align:"right",render:(e,l,t)=>d(Reflect.get({filled:"Trade.Filled",canceled:"Trade.Canceled"},e)||e)},{title:d("Trade.OrderID"),dataIndex:"order_id",width:180,align:"right",fixed:"right"}]})}),(0,r.jsx)(l6.OK,{value:"CONDITIONAL",height:"100%",children:(0,r.jsx)(rK.A,{fontSize:"small",isBorder:!0,scroll:{y:"calc(100% - 40px)",x:1e3},rowKey:"creation_timestamp",data:v,loading:a,columns:[{title:d("Trade.Instrument"),dataIndex:"show_name",fixed:"left",width:120,render:(e,l)=>(0,r.jsx)(rW,{data:l})},{title:d("Public.Date"),width:180,render:e=>(0,r.jsx)(tT.H0,{value:e.creation_timestamp})},{title:d("Public.Type"),dataIndex:"order_type",width:80,render:(e,l)=>d((0,rV.EF)(e,l.source))},{title:d("Trade.Side"),dataIndex:"direction",width:80,render:rG.Q1},{title:d("Trade.TriggerPrice"),width:200,render(e){let l=s(e.instrument_name),t="STOP"===e.condition_type?"â¥":"â¤",r=2===e.trigger_price_type?d("Perpetual.LastPrice"):1===e.trigger_price_type?d("Trade.MarkPrice"):"";return`${r} ${t} ${(0,h.gS)((0,f.M)({value:e.trigger_price,acc:l.price,format:!0}))}`}},{title:d("Public.Price"),width:140,render(e){let l=s(e.instrument_name);return"-1"===e.price||e.order_type.indexOf("market")>-1?d("Trade.Market"):(0,h.gS)((0,f.M)({value:e.price,acc:l.price,format:!0}))}},{title:d("Public.Size"),dataIndex:"amount",width:140,render(e,l){let t=s(l.instrument_name),r=(0,f.M)(e,t.amount),{order_type:o,direction:i}=l;if(o.indexOf("limit")>-1||o.indexOf("market")>-1&&"sell"===i){var n;return`${r} ${null==(n=t.instrument)?void 0:n.quote_currency}`}return"--"}},{title:d("Public.Total"),width:140,render(e){var l,t;let r=s(e.instrument_name),{order_type:o,direction:i,amount:n}=e;return o.indexOf("limit")>-1?`${(0,lT.A)(n).multipliedBy(e.price).toFixed(r.price)} ${null==(l=r.instrument)?void 0:l.base_currency}`:o.indexOf("market")>-1&&"buy"===i?`${(0,lT.A)(n).toFixed(r.price)} ${null==(t=r.instrument)?void 0:t.base_currency}`:"--"}},{title:d("Trade.Filled"),dataIndex:"filled_amount",width:140,render(e,l){let{order_type:t,direction:o,order_state:i}=l,n=s(l.instrument_name),a=(0,f.M)({value:e,acc:n.amount,format:!0}),c=t.indexOf("market")>-1&&"buy"===o;if(t.indexOf("limit")>-1||t.indexOf("market")>-1&&"sell"===o||c){var d;let t=(0,lT.A)(e),o=c?t.multipliedBy(l.average_price):t;return(0,r.jsxs)(r.Fragment,{children:[a," ",null==(d=n.instrument)?void 0:d.quote_currency,(0,r.jsx)("br",{}),"filled"===i?"100":t.isZero()?"0.00":o.div(l.amount).multipliedBy(100).toFixed(2,eO._8.ROUND_UP),"%"]})}return"--"}},{title:d("Trade.Avg.Price"),dataIndex:"average_price",width:100,render(e,l){let t=s(l.instrument_name);return"0"===e?"--":(0,h.gS)((0,f.M)(e,t.price))}},{title:d("Public.Status"),dataIndex:"order_state",width:80,align:"right",render(e,l,t){let o=d(Reflect.get({filled:"Trade.Filled",canceled:"Trade.Canceled",triggered:"Trade.Triggered",trigger_failed:"Trade.TriggerFailed",untriggered:"Trade.Untriggered"},e)||e);return l.error_code&&0!==l.error_code?(0,r.jsxs)("div",{className:(0,K.AH)({display:"inline-flex",alignItems:"center"}),children:[(0,r.jsx)("span",{className:(0,K.AH)({mr:"4px"},{whiteSpace:"nowrap",lineHeight:1}),children:o}),(0,r.jsx)(rs.m,{underline:!1,title:d(`ErrorCode.${l.error_code}`,l),children:(0,r.jsx)(k.t,{fontSize:12,color:"text.secondary",code:"icon-query-outline"})})]}):o}}
1,{title:d("Trade.OrderID"),dataIndex:"order_id",width:180,align:"right",fixed:"right"}]})}),(0,r.jsx)(l6.OK,{value:"TRAILING",height:"100%",children:(0,r.jsx)(rK.A,{fontSize:"small",isBorder:!0,scroll:{y:"calc(100% - 40px)",x:1e3},rowKey:"creation_timestamp",data:b,loading:a,columns:[{title:d("Trade.Instrument"),dataIndex:"show_name",fixed:"left",width:120,render:(e,l)=>(0,r.jsx)(rW,{data:l})},{title:d("Public.Date"),width:180,render:e=>(0,r.jsx)(tT.H0,{value:e.creation_timestamp})},{title:d("Trade.Side"),dataIndex:"direction",width:80,render:rG.Q1},{title:d("Public.Price"),width:120,dataIndex:"price",render(e,l){let t=s(l.instrument_name,l.kind);return(0,h.gS)((0,f.M)(e,t.price))}},{title:d("Trade.TrailingGap"),width:140,dataIndex:"trail_price",render:(e,l)=>{if(void 0===e||""===e)return"--";let t=s(l.instrument_name,l.kind);return`${(0,f.M)(e,t.price)}`}},{title:d("Public.Size"),dataIndex:"amount",width:140,render(e,l){var t;let r=s(l.instrument_name),o=(0,f.M)(e,r.amount);return`${o} ${null==(t=r.instrument)?void 0:t.quote_currency}`}},{title:d("Public.Total"),width:140,render(e){var l;let t=s(e.instrument_name,e.kind),o="filled"===e.order_state?e.average_price:e.price;return(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${(0,lT.A)(e.amount).multipliedBy(o).toFixed(t.price)} ${null==(l=t.instrument)?void 0:l.base_currency}`})}},{title:d("Trade.Filled"),dataIndex:"filled_amount",width:140,render(e,l){var t;let o=s(l.instrument_name),i=(0,f.M)({value:e,acc:o.amount,format:!0}),n=(0,lT.A)(e);return(0,r.jsxs)(r.Fragment,{children:[i," ",null==(t=o.instrument)?void 0:t.quote_currency,(0,r.jsx)("br",{}),"filled"===l.order_state?"100":n.isZero()?"0.00":n.div(l.amount).multipliedBy(100).toFixed(2,eO._8.ROUND_UP),"%"]})}},{title:d("Trade.Avg.Price"),dataIndex:"average_price",width:100,render(e,l){let t=s(l.instrument_name);return"0"===e?"--":(0,h.gS)((0,f.M)(e,t.price))}},{title:d("Public.Status"),dataIndex:"order_state",width:80,align:"right",render(e,l){let t=d(Reflect.get({filled:"Trade.Filled",canceled:"Trade.Canceled",triggered:"Trade.Triggered",trigger_failed:"Trade.TriggerFailed",untriggered:"Trade.Untriggered"},e)||e);return"canceled"===e&&l.error_code&&0!==l.error_code?(0,r.jsxs)("div",{className:(0,K.AH)({display:"inline-flex",alignItems:"center"}),children:[(0,r.jsx)("span",{className:(0,K.AH)({mr:"4px"},{whiteSpace:"nowrap",lineHeight:1}),children:t}),(0,r.jsx)(rs.m,{underline:!1,title:"Your available principal is insufficient. Transfer funds or reduce the order value and try again.",children:(0,r.jsx)(k.t,{fontSize:12,color:"text.secondary",code:"icon-query-outline"})})]}):t}},{title:d("Trade.OrderID"),dataIndex:"order_id",width:180,align:"right",fixed:"right"}]})})]})})]}),i&&i.length>0&&(0,r.jsx)("div",{className:"more-btn-box",children:(0,r.jsxs)(rU(),{href:(0,w.Yn)("TradeOrders",{params:{type:t},search:{historyType:"order"}}),children:[d("Public.More")," ",(0,r.jsx)(k.t,{code:"icon-arrow",fontSize:10})]})})]})}var rX=t(46747);function rZ(e){let{instrumentName:l}=e,{kind:t}=(0,eA.j)(),[o,s]=(0,A.useState)([]),[i,n]=(0,A.useState)(!1),[a]=eW(),{precisionGetter:c}=(0,_.B)({kind:t,instrumentName:l}),{t:d}=(0,C.B)();return(0,A.useEffect)(()=>{n(!0);let e=a?eh.O.getUserTradesByInstrument({instrument_name:l,count:100}):eh.O.getUserTradesByCurrency({kind:"spot",currency:"SPOT",count:100}),t=(0,ex.HW)(()=>e).subscribe(e=>{s(e.trades),n(!1)});return()=>{t.unsubscribe()}},[l,a]),(0,r.jsxs)(e6.A,{height:"calc(100% - 40px)",children:[(0,r.jsx)(rK.A,{fontSize:"small",loading:i,isBorder:!0,scroll:{y:"calc(100% - 40px)",x:1e3},data:o,rowKey:e=>`${e.order_id}_${e.trade_id}`,columns:[{title:d("Trade.Instrument"),dataIndex:"show_name",fixed:"left",width:120,render:(e,l,t)=>(0,r.jsx)(rW,{data:{...l,kind:"spot"}})},{title:d("Public.Date"),width:160,render:e=>(0,r.jsx)(tT.H0,{value:e.timestamp})},{title:d("Public.Type"),dataIndex:"order_type",width:80,render:(e,l)=>d((0,rV.EF)(e,l.source))},{title:d("Trade.Side"),dataIndex:"direction",width:80,render:rG.Q1},{title:d("Public.Price"),dataIndex:"price",width:100,render:(e,l)=>{let t=c(l.instrument_name);return(0,h.gS)((0,f.M)(e,t.price))}},{title:d("Public.Size"),dataIndex:"amount",width:100,render:(e,l)=>{var t;let r=c(l.instrument_name);return(0,f.M)({value:e,acc:r.amount,suffix:null==(t=r.instrument)?void 0:t.quote_currency})}},{title:d("Trade.OrderID"),width:160,dataIndex:"order_id"},{title:d("Public.TradeID"),width:120,dataIndex:"trade_id"},{title:"Role",width:80,dataIndex:"role",render:e=>"taker"===e?d("Trade.Taker"):"maker"===e?d("Trade.Maker"):e},{title:d("Trade.Fees"),align:"right",width:240,dataIndex:"fee",render:(e,l)=>{var t,o;let s=c(l.instrument_name),i="buy"===l.direction?null==(t=s.instrument)?void 0:t.quote_currency:null==(o=s.instrument)?void 0:o.base_currency;return(0,r.jsx)(rX.A,{type:"spot",data:l,unit:i})}}]}),o.length>0&&(0,r.jsx)("div",{className:"more-btn-box",children:(0,r.jsxs)(rU(),{href:(0,w.Yn)("TradeOrders",{params:{type:t},search:{historyType:"trade"}}),children:[d("Public.More")," ",(0,r.jsx)(k.t,{code:"icon-arrow",fontSize:10})]})})]})}
1function rQ(e){let{kind:l,symbol:t}=(0,eA.j)(),[o]=eW(),{precisionGetter:s}=(0,_.B)({kind:l,instrumentName:t}),{t:i}=(0,C.B)(),[n,a]=(0,A.useState)("LIMIT"),c=(0,A.useRef)(!1),d=e=>{tf.Q.create({title:i("Public.Confirm"),children:(0,r.jsx)("div",{className:(0,K.AH)({color:"var(--textSecondary)"}),children:i("Trade.Cancel.Order")}),resolve:{label:i("Public.Confirm"),action:async()=>{try{let l=await eh.O.cancel({order_id:e.order_id});return await (0,ep.D7)(l),!0}catch(e){return(0,ef.Vf)({error:e}),!1}}},reject:{label:i("Public.Cancel")}})};return(0,r.jsx)(u.nu,{children:()=>{let{LIMIT:e,CONDITIONAL:l,TPSL:u,TRAILING:p,TRAILING_STOP:m}={LIMIT:[],CONDITIONAL:[],TPSL:[],TRAILING:[],TRAILING_STOP:[]};return eZ._.openOrders.forEach(r=>{if(!o||r.instrument_name===t)switch(r.perpetualOrderType){case"LIMIT":case"MARKET":e.push(r);break;case"CONDITIONAL":l.push(r);break;case"TPSL":u.push(r);break;case"TRAILING":p.push(r);break;case"TRAILING_STOP":m.push(r)}}),!c.current&&(e.length>0?(a("LIMIT"),c.current=!0):l.length>0?(a("CONDITIONAL"),c.current=!0):p.length>0&&(a("TRAILING"),c.current=!0)),(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",flexDirection:"column",gap:"0px",height:"100%"}),children:[(0,r.jsx)("div",{className:(0,lc.B)({py:"12px",px:"16px",justifyContent:"space-between"}),children:(0,r.jsx)(rM.K,{size:"small-x",variant:"button",activeKey:n,onChange:(e,l)=>{a(l),c.current=!0},tabsList:[{activeKey:"LIMIT",label:`${i("Trade.Order.Limit")} (${e.length})`},{activeKey:"CONDITIONAL",label:`${i("Trade.Conditional")} (${l.length})`},{activeKey:"TRAILING",label:`${i("Trade.Trailing")} (${p.length})`}]})}),(0,r.jsx)(l_.c,{}),(0,r.jsx)("div",{className:(0,K.AH)({flex:1,minHeight:0}),children:(0,r.jsxs)(l6.ZH,{value:n,children:[(0,r.jsx)(l6.OK,{value:"LIMIT",height:"100%",children:(0,r.jsx)(rK.A,{fontSize:"small",isBorder:!0,data:e,rowKey:"order_id",scroll:e.length?{x:1e3,y:"calc(100% - 40px)"}:{x:1e3},columns:[{title:i("Trade.Instrument"),dataIndex:"show_name",fixed:"left",width:120,render:(e,l)=>(0,r.jsx)(rW,{data:l})},{title:i("Public.Date"),width:180,render:e=>(0,r.jsx)(tT.H0,{value:e.creation_timestamp})},{title:i("Public.Type"),dataIndex:"order_type",width:80,render:(e,l)=>i((0,rV.EF)(e,l.source))},{title:i("Trade.Side"),dataIndex:"direction",width:80,render:rG.Q1},{title:i("Public.Price"),width:120,dataIndex:"price",render(e,l){if("-1"===l.price||l.order_type.indexOf("market")>-1)return i("Trade.Market");let t=s(l.instrument_name,l.kind);return(0,h.gS)((0,f.M)(l.price,t.price))}},{title:`${i("Public.Size")}`,dataIndex:"amount",width:140,render(e,l){var t;let o=s(l.instrument_name),i=(0,f.M)(e,o.amount);return(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${i} ${null==(t=o.instrument)?void 0:t.quote_currency}`})}},{title:i("Trade.Total"),dataIndex:"amount",width:140,render(e,l){var t;let o=s(l.instrument_name,l.kind);return(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${(0,eO.mi)(e).multipliedBy(l.price).toFixed(o.price)} ${null==(t=o.instrument)?void 0:t.base_currency}`})}},{title:i("Trade.Filled"),dataIndex:"filled_amount",width:140,render(e,l){var t;let o=s(l.instrument_name,l.kind);return(0,r.jsxs)("span",{translate:"no",className:"notranslate",children:[(0,r.jsx)("span",{children:`${(0,f.M)(e,o.amount)} ${null==(t=o.instrument)?void 0:t.quote_currency}`}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{children:`${(0,eO.mi)(e).div(l.amount).multipliedBy(100).toFixed(2,0)}%`})]})}},{title:i("Public.Action"),width:160,fixed:"right",render:e=>(0,r.jsx)(lz.$,{color:"secondary",size:"xsmall",onClick:()=>d(e),children:i("Public.Cancel")})}]})}),(0,r.jsx)(l6.OK,{value:"CONDITIONAL",height:"100%",children:(0,r.jsx)(rK.A,{fontSize:"small",isBorder:!0,data:l,rowKey:"order_id",scroll:l.length?{x:1e3,y:"calc(100% - 40px)"}:{x:1e3},columns:[{title:i("Trade.Instrument"),dataIndex:"show_name",fixed:"left",width:120,render:(e,l)=>(0,r.jsx)(rW,{data:l})},{title:i("Public.Date"),width:180,render:e=>(0,r.jsx)(tT.H0,{value:e.creation_timestamp})},{title:i("Public.Type"),dataIndex:"order_type",width:80,render:(e,l)=>i((0,rV.EF)(e,l.source))},{title:i("Trade.Side"),dataIndex:"direction",width:80,render:rG.Q1},{title:i("Trade.TriggerPrice"),width:180,dataIndex:"trigger_price",render(e,l){let{order_type:t,direction:o,trigger_price:s,trigger_price_type:n}=l;if(["limit","market","trailing"].includes(t))return"--";let a=(0,h.gS)((0,f.M)({value:s,acc:-1,format:!0})),c=[(0,r.jsxs)(r.Fragment,{children:[i(lf.Cy[n]),` ⤠${a}`]}),(0,r.jsxs)(r.Fragment,{children:[i(lf.Cy[n]),` ⥠${a}`]})],[d,u]="buy"===o?c:c.reverse(),p=t.startsWith("take_profit")?d:u;return(0,r.jsx)(tw,{editable:!l.trigger_touch,data:l,onSuccess:()=>eZ._.getOpenOrder().subscribe(),children:p})}},{title:i("Public.Price"),width:120,dataIndex:"price",render(e,l){if("-1"===l.price||l.order_type.indexOf("market")>-1)return i("Trade.Market");let t=s(l.instrument_name,l.kind);return(0,r.jsx)(tw,{data:l,editable:!l.trigger_touch&&l.order_type.indexOf("limit")>-1,onSuccess:()=>eZ._.getOpenOrder().subscribe(),children:(0,h.gS)((0,f.M)(e,t.price))})}},{title:`${i("Public.Size")}`,dataIndex:"amount",width:140,render(e,l){var t;if(l.order_type.indexOf("market")>-1&&"buy"===l.direction)return"--";let o=s(l.instrument_name),i=(0,f.M)(e,o.amount);return(0,r.jsx)(tw,{data:l,editable:!l.trigger_touch,onSuccess:()=>eZ._.getOpenOrder().subscribe(),children:(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${i} ${null==(t=o.instrument)?void 0:t.quote_currency}`})})}},{title:i("Trade.Total"),dataIndex:"amount",width:140,render(e,l){var t;let o=s(l.instrument_name,l.kind),i=l.order_type.indexOf("market")>-1;return(0,r.jsx)(tw,{data:l,editable:!l.trigger_touch&&i&&"buy"===l.direction,onSuccess:()=>eZ._.getOpenOrder().subscribe(),children:(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${(0,eO.mi)(e).multipliedBy(i?1:l.price).toFixed(o.price)} ${null==(t=o.instrument)?void 0:t.base_currency}`})})}},{title:i("Trade.Filled"),dataIndex:"filled_amount",width:140,render(e,l){var t;let o=s(l.instrument_name,l.kind);return(0,r.jsxs)("span",{translate:"no",className:"notranslate",children:[(0,r.jsx)("span",{children:`${(0,f.M)(e,o.amount)} ${null==(t=o.instrument)?void 0:t.quote_currency}`}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{children:`${(0,eO.mi)(e).div(l.amount).multipliedBy(100).toFixed(2,0)}%`})]})}},{title:i("Public.Action"),width:160,fixed:"right",render:e=>
1(0,r.jsx)(lz.$,{color:"secondary",size:"xsmall",onClick:()=>d(e),children:i("Public.Cancel")})}]})}),(0,r.jsx)(l6.OK,{value:"TRAILING",height:"100%",children:(0,r.jsx)(rK.A,{fontSize:"small",isBorder:!0,data:p,rowKey:"order_id",scroll:p.length?{x:1e3,y:"calc(100% - 40px)"}:{x:1e3},columns:[{title:i("Trade.Instrument"),dataIndex:"show_name",fixed:"left",width:120,render:(e,l)=>(0,r.jsx)(rW,{data:l})},{title:i("Public.Date"),width:180,render:e=>(0,r.jsx)(tT.H0,{value:e.creation_timestamp})},{title:i("Trade.Side"),dataIndex:"direction",width:80,render:rG.Q1},{title:i("Public.Price"),width:120,dataIndex:"price",render(e,l){let t=s(l.instrument_name,l.kind);return(0,h.gS)((0,f.M)(e,t.price))}},{title:i("Trade.TrailingGap"),width:140,dataIndex:"trail_price",render:(e,l)=>{if(void 0===e||""===e)return"--";let t=s(l.instrument_name,l.kind);return`${(0,f.M)(e,t.price)}`}},{title:`${i("Public.Size")}`,dataIndex:"amount",width:140,render(e,l){var t;let o=s(l.instrument_name),i=(0,f.M)(e,o.amount);return(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${i} ${null==(t=o.instrument)?void 0:t.quote_currency}`})}},{title:i("Trade.Total"),dataIndex:"amount",width:140,render(e,l){var t;let o=s(l.instrument_name,l.kind);return(0,r.jsx)("span",{translate:"no",className:"notranslate",children:`${(0,eO.mi)(e).multipliedBy(l.price).toFixed(o.price)} ${null==(t=o.instrument)?void 0:t.base_currency}`})}},{title:i("Trade.Filled"),dataIndex:"filled_amount",width:140,render(e,l){var t;let o=s(l.instrument_name,l.kind);return(0,r.jsxs)("span",{translate:"no",className:"notranslate",children:[(0,r.jsx)("span",{children:`${(0,f.M)(e,o.amount)} ${null==(t=o.instrument)?void 0:t.quote_currency}`}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{children:`${(0,eO.mi)(e).div(l.amount).multipliedBy(100).toFixed(2,0)}%`})]})}},{title:i("Public.Action"),width:160,fixed:"right",render:e=>(0,r.jsx)(lz.$,{color:"secondary",size:"xsmall",onClick:()=>d(e),children:i("Public.Cancel")})}]})})]})})]})}})}var rJ=t(88604),r0=t(80359);function r1(e){let{children:l,...t}=e;return(0,r.jsx)("tr",{className:(0,K.AH)({borderBottom:"1px solid var(--colors-base-primary)","& td, & th":{padding:"8px"},"& td:first-of-type, & th:first-of-type":{paddingLeft:"16px"},"& td:last-of-type, & th:last-of-type":{paddingRight:"16px"}}),...t,children:l})}let r2=e=>{let{children:l,...t}=e;return(0,r.jsx)("thead",{className:(0,K.AH)({backgroundColor:"bg-secondary"}),...t,children:l})};function r4(e){let{children:l,css:t,...o}=e;return(0,r.jsx)("table",{className:(0,K.AH)({width:"100%",borderCollapse:"collapse",fontSize:"12px",position:"relative"},t),...o,children:l})}function r3(e){let{data:l,columns:t,title:o}=e,{t:s}=(0,C.B)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(r1,{children:(0,r.jsx)("td",{colSpan:t.length,className:(0,K.AH)({color:"text-tertiary"}),children:s(o)})}),l.map(e=>(0,r.jsx)(r1,{children:t.map((l,t)=>{var o;let s=l.dataIndex?Reflect.get(e,l.dataIndex):e,i=(null==(o=l.render)?void 0:o.call(l,s,e,t))??(l.dataIndex?e[l.dataIndex]:null);return(0,r.jsx)("td",{style:{textAlign:l.align||"left"},children:i},l.key||l.dataIndex||t)})},e.coin_type))]})}function r8(e){let{data:l}=e,{t}=(0,C.B)(),o=(0,I.useRouter)(),s=(0,A.useMemo)(()=>[{title:t("Public.Coin"),dataIndex:"coin_type",width:"25%",render(e,l){let t="USDT"===e;return(0,r.jsx)(tB.kf,{value:e,children:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:(0,K.AH)({cursor:t?"default":"pointer",display:"flex",alignItems:"center",color:"inherit",fontSize:"14px",fontWeight:600}),onClick:e=>{e.stopPropagation(),t||o.push((0,w.Yn)("SpotItem",{params:{symbol
1:`${l.coin_type}-USDT-SPOT`}}))},children:[(0,r.jsx)("span",{children:l.coin_type}),!t&&(0,r.jsx)(rj.r,{code:"icon-caret-right",className:(0,K.AH)({fontSize:"6px",marginLeft:"5px",color:"text-tertiary"})})]}),(0,r.jsx)("div",{className:(0,K.AH)({fontSize:"12px",color:"text-secondary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),children:(null==e?void 0:e.fullName)||"--"})]})})}},{title:t("Public.Available"),width:"15%",dataIndex:"available",render:e=>(0,f.M)({value:e,acc:8,format:!0})},{title:t("Public.Frozen"),width:"15%",dataIndex:"freeze",render:e=>(0,f.M)({value:e,acc:8,format:!0})},{title:t("Public.Total"),width:"15%",dataIndex:"total",render:e=>(0,f.M)({value:e,acc:8,format:!0})},{title:`${t("Wallet.Spot.Valuation")}ï¼USDTï¼`,width:"20%",dataIndex:"total",key:"$",render:(e,l)=>{let t="USDT"===l.coin_type,o=t?l.total:(0,eO.mi)(e).multipliedBy(l.current_mark_price);return(0,r.jsxs)("div",{children:[(0,f.M)({value:o,acc:8,format:!0}),(0,r.jsx)(rJ.x,{value:t?e:o,css:{root:{color:"text-secondary",fontSize:"12px",marginLeft:"4px"}}})]})}},{title:t("Public.Actions"),align:"right",width:"10%",render:(e,l)=>(0,r.jsx)(r0.c,{variant:"text",color:"primary",size:"medium",onClick:e=>{e.create("inner",{to:"SPOT",currency:l.coin_type})}})}],[o,t]),i=(0,A.useMemo)(()=>(0,r.jsx)("colgroup",{children:s.map((e,l)=>(0,r.jsx)("col",{style:{width:e.width}},e.key??e.dataIndex??l))}),[s]);return(0,r.jsxs)("div",{className:(0,K.AH)({height:"100%",overflow:"auto",position:"relative"}),children:[(0,r.jsxs)(r4,{css:{position:"sticky",top:0,zIndex:1},children:[i,(0,r.jsx)(r2,{children:(0,r.jsx)(r1,{children:s.map((e,l)=>(0,r.jsx)("th",{style:{textAlign:e.align??"left"},className:(0,K.AH)({fontSize:"12px",color:"text-tertiary",fontWeight:400}),children:e.title},l))})})]}),(0,r.jsxs)(r4,{children:[i,(0,r.jsx)("tbody",{children:l.map((e,l)=>(0,r.jsx)(r3,{columns:s,...e},l))})]})]})}function r9(e){let{instrumentName:l,kind:t}=e,{t:o}=(0,C.B)(),[s,i]=(0,A.useState)("1"),[n]=eW(),{instrument:a}=(0,_.B)(),{isLogin:c}=(0,le.II)(),d=()=>{tf.Q.create({title:o("Public.Confirm"),children:(0,r.jsx)("div",{className:(0,K.AH)({color:"text-secondary"}),children:o("Trade.Cancel.AllOrder")}),resolve:{label:o("Public.Confirm"),action:async()=>{let e=await (n?eh.O.cancelAllByInstrument({instrument_name:l}):eh.O.cancelAllByCurrency({currency:"SPOT",kind:"spot"}));return e.error&&ta.R.error(e.error.message),!e.error}},reject:{label:o("Public.Cancel")}})},[p,m]=(0,A.useState)([]);return(0,A.useEffect)(()=>{if(a)return(0,eQ.fm)(()=>{if(eP.nT.SPOT){let e=eP.nT.SPOT.details??[],l=[{title:"Trade.Token.CurrentPair",data:[]},{title:"Trade.Token.OtherPairs",data:[]}],{quote_currency:t,base_currency:r}=a;e.forEach(e=>{[t,r].includes(e.coin_type)?r===e.coin_type?l[0].data.push(e):l[0].data.unshift(e):tn.Z.less1U.filter((0,eO.mi)(e.current_mark_price??"0").multipliedBy(e.total).toFixed(8))&&l[1].data.push(e)}),m(l.filter(e=>!!e.data.length))}})},[a]),(0,r.jsx)(rt.Z,{className:"react-grid-draggable-handle",title:(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"}),children:[(0,r.jsx)(rM.K,{id:rc.step4,size:"small",activeKey:s,onChange:(e,r)=>{eY.I.SpotMargin.SpotMarginPageAction({tradepair_name:l,tradeType:t,operate_type:"switch_flowtype"}),i(r)},tabsList:[{label:(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",alignItems:"center"}),children:[o("Trade.Open.Orders"),(0,r.jsx)(u.nu,{children:()=>(0,r.jsxs)(r.Fragment,{children:["(",eZ._.openOrders.length,")"]})})]}),activeKey:"1"},{label:o("Trade.Order.History"),activeKey:"2"},{label:o("Trade.Trade.History"),activeKey:"3"},{label:`${o("Public.Coin")}(${p.reduce((e,l)=>e+l.data.length,0)})`,activeKey:"0"}]}),(0,r.jsx)(tJ.Consumer,{children:e=>{let{point:l}=e;return"xs"!==l?(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",flexDirection:"row",alignItems:"center",gap:4}),children:["0"!==s&&(0,r.jsx)(eG,{}),c&&"1"===s&&(0,r.jsx)(u.nu,{children:()=>(0,r.jsx)(lz.$,{color:"secondary",size:"xsmall",onClick:d,disabled:!eZ._.openOrders.length,children:o("Trade.Cancel.All")})})]}):null}})]}),children:(0,r.jsx)(ti.s,{children:(0,r.jsxs)("div",{style:{height:"calc(100% - 38px)"},children:["0"===s?(0,r.jsx)(r8,{data:p}):null,"1"===s?(0,r.jsx)(rQ,{instrumentName:l}):null,"2"===s?(0,r.jsx)(rY,{instrumentName:l}):null,"3"===s?(0,r.jsx)(rZ,{instrumentName:l}):null]})})})}var r6=t(72961),r7=t(42),r5=t(93172),oe=t.n(r5);function ol(e){let{data:l}=e,{currentBreakpoint:t}=(0,r7.L)();return(0,r.jsx)(r.Fragment,{children:"xs"!==t?(0,r.jsx)(r6._,{spaceBetween:16,className:oe().Ticker,freeMode:!0,navigation:!0,slidesPerView:"auto",slides:l.map((e,l)=>
1({key:l,className:oe().slide,children:(0,r.jsxs)("div",{className:oe()["list-item"],children:[(0,r.jsx)("div",{className:oe().listItemLabel,children:e.label}),(0,r.jsx)("div",{className:oe().listItemContent,children:e.content})]})}))}):(0,r.jsx)("div",{className:oe().tickerListBox,children:l.map((e,l)=>(0,r.jsxs)("div",{className:(0,x.default)(oe()["list-item"],oe().tickerListItem),children:[(0,r.jsx)("div",{className:oe().tickerListItemLabel,children:e.label}),(0,r.jsx)("div",{className:oe().listItemContent,children:e.content})]},l))})})}var ot=t(98182),or=t(77092),oo=t(85797),os=t(9633),oi=t.n(os);let{isPc:on}=(0,oo.Z)();function oa(e){let{instrumentName:l,kind:t}=e,[o]=(0,rp.Ge)(),s=(0,A.useMemo)(()=>o.find(e=>e.n===l),[o,l]);return(0,r.jsx)(rh.n,{row:s??{f:!1,n:l,k:t}})}let oc=e=>{let{ticker:l,...t}=e;return(0,r.jsx)("div",{className:(0,x.default)(oi().changeBox,l.data?l.data.isRise?oi().long:oi().short:void 0),...t})};function od(e){let{showName:l,showH1:t,instrumentName:o,kind:s}=e;return(0,r.jsx)("div",{className:(0,K.AH)({display:"flex",flexDirection:"row",gap:"4px",alignItems:"center",fontSize:"16px",fontWeight:700}),children:(0,r.jsx)(tB.kf,{value:o,imgProps:{width:24,height:24},children:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(tR.A,{variant:"h5",noWrap:!0,children:(0,r.jsx)("span",{suppressHydrationWarning:!0,children:(null==e?void 0:e.fullName)||"--"})}),t?(0,r.jsx)("h1",{className:(0,K.AH)({fontSize:"12px",whiteSpace:"nowrap",color:"var(--textSecondary)",textAlign:"left"}),color:"text.secondary",children:l}):(0,r.jsx)("h6",{className:(0,K.AH)({fontSize:"12px",whiteSpace:"nowrap",color:"var(--textSecondary)",textAlign:"left"}),color:"text.secondary",children:l})]})})})}function ou(e){let{instrumentName:l,kind:t,showName:o}=e,[s,i]=(0,A.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:(0,K.AH)({display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer"}),onClick:()=>{i(!0)},children:(0,r.jsx)(od,{instrumentName:l,kind:t,showName:o})}),(0,r.jsx)(eK.s,{children:(0,r.jsx)(eX.D,{keepMounted:!0,variant:"temporary",anchor:"bottom",open:s,onClose:()=>{i(!1)},children:(0,r.jsx)("div",{className:oi().marketList,children:(0,r.jsx)(rO,{onRowClick:()=>i(!1)})})})})]})}function op(e){let{TourSetting:l,showName:t,instrumentName:o,showH1:s=!1}=e,{kind:i}=(0,eA.j)(),{instrument:n,precision:a}=(0,_.B)({kind:i}),c=(0,d.K7)(),{t:p}=(0,C.B)(),{disabled:m}=(0,en.M)(),{currentBreakpoint:x}=(0,r7.L)(),g="xs"===x,[v,b]=(0,A.useState)(!1),y=(0,A.useCallback)(e=>{b(e)},[]),j=(0,A.useMemo)(()=>{let e={label:p("Trade.Change"),content:(0,r.jsx)(u.nu,{children:()=>(0,r.jsxs)(oc,{translate:"no",ticker:c,style:{fontSize:12},className:"notranslate",children:[m||!c.data?"--":(0,f.M)({value:(0,lT.A)(c.data.stats.price_change).multipliedBy(100),format:!0,symbol:!0}),"%"]})})},l={label:p("Trade.Low"),content:(0,r.jsx)(u.nu,{children:()=>{var e;return(0,r.jsx)("div",{translate:"no",className:"notranslate",children:m?"--":(0,h.gS)((0,f.M)({value:null==(e=c.data)?void 0:e.stats.low,acc:a.price,format:!0}))})}})},t={label:p("Trade.High"),content:(0,r.jsx)(u.nu,{children:()=>{var e;return(0,r.jsx)("div",{translate:"no",className:"notranslate",children:m?"--":(0,h.gS)((0,f.M)({value:null==(e=c.data)?void 0:e.stats.high,acc:a.price,format:!0}))})}})},o={label:p("Trade.Volume"),content:(0,r.jsx)(u.nu,{children:()=>{var e;return(0,r.jsxs)("div",{translate:"no",className:"notranslate",children:[m?"--":(0,h.bY)(null==(e=c.data)?void 0:e.stats.volume,a.amount)," ",(0,r.jsx)("div",{"data-inline":!0,children:(null==n?void 0:n.quote_currency)??"--"})]})}})},s={label:p("Trade.Turnover"),content:(0,r.jsx)(u.nu,{children:()=>{var e;return(0,r.jsxs)("div",{translate:"no",className:"notranslate",children:[m?"--":(0,h.bY)(null==(e=c.data)?void 0:e.stats.turnover)," ",(0,r.jsx)("div",{"data-inline":!0,children:(null==n?void 0:n.base_currency)??"--"})]})}})};return g?[l,t,o,s]:[e,l,t,o,s]},[a.amount,a.price,m,null==n?void 0:n.base_currency,null==n?void 0:n.quote_currency,g,p,c]);return(0,r.jsxs)("div",{className:(0,K.cx)("react-grid-draggable-handle",oi().root,(0,K.AH)({display:"flex",py:"9px",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"normal",sm:"center"}
1,justifyContent:"flex-start",gap:{xs:"8px",sm:"16px"},width:"100%"})),style:{overflowX:"hidden"},children:[(0,r.jsxs)("div",{className:(0,K.AH)({display:"flex",flexDirection:{xs:"column",sm:"row"},gap:{xs:"5px",sm:"16px"},alignItems:{xs:"flex-start",sm:"center"}}),children:[g?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(ou,{instrumentName:o,kind:i,showName:t})}):(0,r.jsx)(or.ms,{open:v,placement:"bottom-start",triggerMode:on?"hover":"click",onOpenChange:y,content:(0,r.jsx)("div",{className:oi().dropdownContent,children:(0,r.jsx)(rO,{onRowClick:()=>b(!1)})}),children:(0,r.jsxs)("div",{id:l?rc.step1:void 0,className:(0,K.cx)((0,K.AH)({display:"flex",flexDirection:"row",alignItems:"center",cursor:"pointer",gap:"8px"}),"notranslate"),translate:"no",children:[(0,r.jsx)(ln.l,{src:"/static-lib/img/icon-mono/13-ab4mo4sNUQixE.svg",css:{width:"24px",height:"24px"}}),(0,r.jsx)(od,{showName:t,showH1:s,instrumentName:o,kind:i})]})}),(0,r.jsx)(u.nu,{children:()=>{var e,l;return(0,r.jsxs)("div",{className:(0,K.cx)(oi().changeWrap,"notranslate"),translate:"no",children:[(0,r.jsx)(oc,{ticker:c,children:m?"--":(0,h.gS)((0,f.M)({value:null==(e=c.data)?void 0:e.last_price,acc:a.price,format:!0}))}),g?(0,r.jsxs)(oc,{ticker:c,translate:"no",children:[m||!c.data?"--":(0,f.M)({value:(0,lT.A)(c.data.stats.price_change).multipliedBy(100),format:!0,symbol:!0}),"%"]}):null,m?(0,r.jsx)("span",{children:"\xa0--"}):(0,r.jsx)(e3.x,{component:"div",value:null==(l=c.data)?void 0:l.last_price,acc:a.price})]})}})]}),!g&&(0,r.jsx)(l_.c,{orientation:"vertical",flexItem:!0}),(0,r.jsx)(ol,{data:j}),(0,r.jsxs)("div",{className:(0,K.cx)(oi().actionBox,(0,K.AH)({display:"flex",flexDirection:"row",alignItems:"center",gap:"16px"})),children:[(0,r.jsx)(oa,{instrumentName:o,kind:i}),l,(0,r.jsx)(ot.R,{kind:"spot",showIconOnly:!0})]})]})}let om=function(){var e;let{symbol:l=""}=(0,B.g)(),t=(0,_.B)({kind:"spot",instrumentName:l}).instrument,o=t.instrument_name,{kind:s,currency:i,symbol:n}=(0,eA.j)(),a=s.toUpperCase();(0,A.useEffect)(()=>(0,eQ.fm)(()=>{let{base_currency:e,quote_currency:l}=t;eZ._.tokenAsset=eP.nT.find(i,l),eZ._.baseAsset=eP.nT.find(i,e)}),[a,i,t,s]),(0,A.useEffect)(()=>{(0,eQ.h5)(()=>{let e=eZ._.instrumentsConfigs.find(e=>e.instrument_name===o);if(!e&&o)return eZ._.instrumentsConfigs.push({...t,instrument:o});Object.assign(e??{},{...t})})},[t,o]),(0,ex.R4)([()=>eZ._.getRealTrades(o)],[o]),(0,rl.A)("spot",t.base_currency);let[c]=eW();(0,A.useEffect)(()=>(0,eQ.fm)(()=>{let e=Object.values(eZ._.ordersMap);eZ._.openOrders=(c?e.filter(e=>e.instrument_name===o):e).sort((e,l)=>l.creation_timestamp-e.creation_timestamp)}),[c,o]),(0,A.useEffect)(()=>{eY.I.SpotMargin.SpotMarginView({tradepair_name:n,tradeType:s})},[s,n]);let{t:d}=(0,C.B)();e=rI.Cache,(0,A.useEffect)(()=>{re<=t5("4.2.22")&&e.split(",").forEach(e=>{T.S.remove(e)})},["4.2.22",e]);let[u,p]=(0,A.useState)("buy"),m=(0,A.useCallback)(e=>{p("0"===e?"buy":"sell")},[]);return(0,r.jsxs)(t6,{localKey:rI.Cache,defaultValues:rC,isResizable:!1,isDraggable:!1,children:[(0,r.jsx)(tQ,{gridId:rI.SelectList,children:(0,r.jsx)(eK.s,{children:(0,r.jsx)(rP,{})})}),(0,r.jsx)(tQ,{gridId:rI.Ticker,children:(0,r.jsx)(op,{TourSetting:(0,r.jsx)(rd,{orderType:u}),showName:t.show_name,instrumentName:o})}),(0,r.jsx)(tQ,{gridId:rI.TradingView,children:(0,r.jsx)(eL,{needQuickOrder:!0})}),(0,r.jsx)(tQ,{gridId:rI.Order,children:(0,r.jsx)(ru,{instrumentData:t,dispatchCreateOrderType:m})}),(0,r.jsx)(tQ,{gridId:rI.Market,children:(0,r.jsx)(rH,{})}),(0,r.jsx)(tQ,{gridId:rI.OrderBook,children:(0,r.jsx)(rt.Z,{title:d("Trade.OrderBook"),className:"react-grid-draggable-handle",children:(0,r.jsx)(eK.s,{minHeight:200,height:"calc(100% - 36px)",children:(0,r.jsx)(e7,{symbol:n,instrumentId:t.instrId})})})}),(0,r.jsx)(tQ,{gridId:rI.Trades,children:(0,r.jsx)(rt.Z,{title:d("Trade.Recent"),className:"react-grid-draggable-handle",children:(0,r.jsx)("div",{style:{height:"calc(100% - 36px)"},children:(0,r.jsx)(tY.f,{instrumentId:t.instrId,base_currency:t.base_currency,quote_currency:t.quote_currency,store:eZ._,showHeader:!0,kind:s,symbol:t.instrument_name})})})}),(0,r.jsx)(tQ,{gridId:rI.Assets,children:(0,r.jsx)(r$,{})}),(0,r.jsx)(tQ,{gridId:rI.Tables,children:(0,r.jsx)(eK.s,{children:(0,r.jsx)(r9,{kind:s,instrumentName:o})})})]})};var ox=t(27587),oh=t(93800),of=t(38371),o_=t(22026),og=t(98187),ov=t(90008);let{DOMAIN:ob}=(0,t(86365).uc)(),oy=e=>{let{instrumentData:l,ticker:t,precision:o}=e,{tick_size:s,instrument_name:i,instrId:n,currency:a,kind:c,show_name:d}=l??{},{t:u}=(0,C.B)(),{currentUrl:p}=(0,ov.K8)(),m=(0,A.useCallback)((e,l,t)=>u("Public.SpotTitle",{lastPrice:(0,h.gS)((0,f.M)({value:e,acc:l,format:!0})),symbol:t}),[u]),[x,_]=(0,A.useState)(()=>{let e=s?(0,eO.mi)(s).dp()??2:2;return m((null==t?void 0:t.last_price)??"--",e,d??"")});return(0,A.useEffect)(()=>
1{if(!i||!n||!a||!c)return;let e=new tU.z0("SPOT",{instrument_name:i,instrId:n,currency:a,kind:c}),l=(0,eQ.fm)(()=>{let l=e.data.last_price;l&&_(m(l,o.price,d??""))});return()=>{e.dispose(),l()}},[a,m,n,i,c,o.price,d]),(0,r.jsx)(oh.$,{title:x,description:u("Public.SpotDesc",{symbol:d}),breadcrumbs:[{name:u("Trade.Spot"),url:(0,w.Yn)("Spot")},{name:d||"",url:(0,w.Yn)("SpotItem",{params:{symbol:i||""}})}],graphList:[{"@type":"FinancialProduct","@id":`${p}#financial-product`,name:`${d||""} ${u("Trade.Spot")}`,url:p,description:u("Public.SpotDesc",{symbol:d}),provider:{"@id":`${ob}#organization`},category:u("Trade.Spot"),feesAndCommissionsSpecification:`${ob}${(0,w.Yn)("Fees")}`,termsOfService:`${ob}${(0,w.Yn)("terms")}`}]})},oj=e=>{let{query:{symbol:l=""},replace:t}=(0,I.useRouter)(),o=Array.isArray(l)?l[0]:l;(0,og.p)();let{instrument:s,precision:i}=(0,_.B)({kind:"spot",instrumentName:o,forceRequest:!0}),{isLimited:n}=(0,P.o)();return(0,A.useEffect)(()=>{if(n(o))return void t((0,w.Yn)("SpotItem",{params:{symbol:"BTC-USDT-SPOT"}}))},[o,n,t]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(oy,{instrumentData:s,precision:i,ticker:e.ticker}),(0,r.jsx)(b.Ef,{kind:"spot",currency:"SPOT",children:(0,r.jsxs)("div",{className:(0,K.AH)({position:"relative",display:"flow-root",bgColor:"bg-tertiary"}),id:rc.root,children:[(0,r.jsx)("span",{className:(0,K.AH)({srOnly:!0}),id:"H1BOX",children:(0,r.jsx)(op,{TourSetting:null,showName:(null==s?void 0:s.show_name)||"--",showH1:!0,instrumentName:o})}),(0,r.jsxs)(eK.s,{children:[s&&(0,r.jsx)(eB,{instrument:s}),(0,r.jsx)(b.wV,{}),(0,r.jsx)(om,{})]})]})})]})};function ow(e){let{query:l}=(0,I.useRouter)(),{symbol:t}=l;return t&&"string"==typeof t?(0,r.jsx)(r.Fragment,{children:e.children(t)}):null}function oT(e){let{query:{symbol:l=""}}=(0,I.useRouter)(),t=Array.isArray(l)?l[0]:l,{instrument:a}=(0,_.B)({kind:"spot",instrumentName:t,forceRequest:!0}),c=(null==a?void 0:a.show_name)??t,u=(null==a?void 0:a.instrId)||0,p=(0,o_.Bk)({kind:"spot",instrumentName:t,instrumentId:u,onChange:e=>{var l;null==(l=eZ._.setDepth)||l.call(eZ._,e),eY.I.SpotMargin.SpotMarginPageAction({tradepair_name:t,tradeType:"spot",operate_type:"switch_depth"})}});return(0,ex.R4)([()=>eZ._.getOpenOrder().subscribe(),()=>eZ._.subscribeOpenOrder().subscribe()],[]),(0,ex._j)([()=>eZ._.getTicker(t,u)],[t,u]),(0,r.jsx)(n.b7.Provider,{value:p,children:(0,r.jsx)(d.GX,{instrumentName:t,instrumentId:a.instrId,market:"SPOT",defaultValue:e.ticker,children:(0,r.jsx)(en.W,{instrumentName:t,instrument:a,children:(0,r.jsx)(e$,{cookie:rT.QX.spot,children:(0,r.jsx)(i.X,{mobile:(0,r.jsx)(s.k,{fullPageScroll:!0,main:(0,r.jsx)(tq,{instrumentName:t,showName:c}),appBar:(0,r.jsx)(o.h,{activeKey:"spot"})}),desktop:(0,r.jsxs)(of.A,{children:[(0,r.jsx)(ox.A,{}),(0,r.jsx)(eo.A,{position:"spot",instrumentName:t}),(0,r.jsx)(ow,{children:l=>(0,r.jsx)(eA.O,{value:{kind:"spot",currency:"SPOT",symbol:l},children:(0,r.jsx)(oj,{...e})})})]})})})})})})}oT.theme="toggle",oT.isFooterDerivatives=!0;var ok=!0;let oN=oT},7028:e=>{e.exports={"assets-item-box":"assets-item-box_nNOwYoIy","assets-item-title":"assets-item-title_KyOuAAxZ"}},7150:(e,l,t)=>{"use strict";t.d(l,{Z:()=>i});var r=t(28271),o=t(35812),s=t(82380);function i(){for(var e=[],l=0;l<arguments.length;l++)e[l]=arguments[l];var t=(0,o.lI)(e);return(0,s.N)(function(l,o){(t?(0,r.x)(e,l,t):(0,r.x)(e,l)).subscribe(o)})}},7167:(e,l,t)=>{"use strict";t.d(l,{B:()=>n});var r=t(37876),o=t(71030),s=t(395),i=t(19485);function n(e){let{extra:l,children:t,css:n,onBack:a,hideExtra:c=!1,absoluteCenterTitle:d=!1}=e,{isWebview:u}=(0,o.k)();return u?null:(0,r.jsxs)("div",{className:(0,i.cx)((0,i.AH)({height:"50px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px",px:4,bg:"bg-secondary",position:"relative",flexShrink:0},null==n?void 0:n.root)),children:[(0,r.jsx)("div",{className:(0,i.AH)({display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",cursor:"pointer",zIndex:1,transform:"rotate(180deg)"},null==n?void 0:n.icon),onClick:a,children:(0,r.jsx)(s.r,{code:"icon-arrow",css:{fontSize:"18px",color:"text-primary"}})}),(0,r.jsx)("span",{className:(0,i.cx)((0,i.AH)((0,i.Fj)({base:{fontWeight:600,fontSize:"18px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center"},variants:{absoluteCenterTitle:{true:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}}}).raw({absoluteCenterTitle:d}),null==n?void 0:n.title)),children:t}),!c&&(0,r.jsx)("span",{className:(0,i.cx)((0,i.AH)({display:"inline-block",flexShrink:0},null==n?void 0:n.extra)),children:l})]})}},8142:e=>{e.exports={directionButtonWrap:"direction-button-wrap_uUoD3tll",noActiveButton:"no-active-button_SqMwjykp",select:"select_BB_PYGke",suffixIconFixedBox:"suffix-icon-fixed-box__6EnZ9CL7",selectOptionItem:"select-option-item_I_01K_sT"}},9192:(e,l,t)=>{"use strict";t.d(l,{x:()=>j});var r=t(37876),o=t(36162),s=t(78572),i=t(23977),n=t(84446),a=t(38505),c=t(76759),d=t(59714),u=t(49995),p=t(14232),m=t(68483);
1let x=p.createContext(null),h={rippleBackground:"mui-checkbox-ripple-bg",checked:"mui-checkbox-checked",disabled:"mui-checkbox-disabled",baseline:"mui-checkbox-baseline"},f=(0,i.T)((0,p.forwardRef)((e,l)=>(0,r.jsx)(n.A,{...e,component:"label",ref:l})))(()=>({display:"flex",alignItems:"flex-start",cursor:"pointer",userSelect:"none",marginLeft:"-6px",maxWidth:"max-content",[`&.${h.disabled}`]:{cursor:"not-allowed"}})),_=(0,i.T)("input")(()=>({opacity:0,position:"fixed",left:"-9999px",[`&:checked + .${h.baseline}`]:{height:"1px"}})),g=(0,i.T)(n.A)(()=>({position:"fixed",left:"-9999px",height:0})),v=(0,i.T)(n.A)({position:"absolute",zIndex:0,opacity:0,width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"var(--mui-checkbox-color)",transition:"opacity 200ms"}),b=(0,i.T)(n.A)(()=>({position:"relative",zIndex:1,width:"var(--mui-checkbox-size)",height:"var(--mui-checkbox-size)",borderRadius:"2px",border:"1px solid var(--mui-checkbox-color)",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"}),e=>{if(!(Reflect.get(e,"mui-disabled")||Reflect.get(e,"mui-error")))return{"&:hover":{borderColor:"var(--mui-checkbox-color-checked)"}}},e=>({backgroundColor:Reflect.get(e,"mui-merge-state")?"var(--mui-checkbox-color)":"transparent"})),y={default:"var(--textSecondary)",checked:"var(--primary)",disabled:"var(--textTertiary)",error:"var(--error)"},j=(0,p.forwardRef)((e,l)=>{let{rootRef:t,label:i,labelProps:j,sx:w,style:T,className:k,color:N=y.checked,checked:S,defaultChecked:I=!1,disabled:A,disableRipple:C,indeterminate:O,name:P,value:M,error:H,children:B,size:R=12,checkboxIconProps:L,edge:F,iconButtonComponent:z="div",onChange:D,onBlur:E,...$}=e,W=(0,p.useMemo)(()=>Object.entries($).reduce((e,l)=>{let[t,r]=l;return t.startsWith("data-")?e.root[t]=r:e.checkbox[t]=r,e},{root:{},checkbox:{}}),[$]),G=p.useContext(x),K=(0,o.g)(null==G?void 0:G.cancelValue),V=(0,o.g)(null==G?void 0:G.registerValue),q=null==G?void 0:G.value.includes(M??""),[U,Y]=(0,s.X)(!1,{value:q??S,defaultValue:I,onChange:function(){let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I,{event:t}=arguments.length>1?arguments[1]:void 0;null==G||G.onChange(t,e),t&&(null==D||D(t,l))}}),X=P||(null==G?void 0:G.name),Z=A||(null==G?void 0:G.disabled),Q=H||(null==G?void 0:G.error),J=U||O,ee=(0,d.A)(l,null==G?void 0:G.ref),el=(0,p.useRef)(M);(0,p.useEffect)(()=>{void 0!==el.current&&V(el.current)},[V]),(0,p.useEffect)(()=>{if(void 0!==el.current&&void 0!==M)return M!==el.current&&(K(el.current),V(M),el.current=M),()=>K(M)},[K,V,M]);let et={...y,..."string"==typeof N?{checked:N}:N},er={"--mui-checkbox-size":R+"px","--mui-checkbox-color":(0,p.useMemo)(()=>Z?et.disabled:Q?et.error:J?et.checked:et.default,[et.checked,et.default,et.disabled,et.error,Z,Q,J]),"--mui-checkbox-color-checked":et.checked},eo=(0,p.useRef)(null),es=(0,d.A)(eo,t),ei=(0,o.g)(()=>{if(!eo.current)return;let{control:e}=eo.current;if(!e)return;let{checked:l}=e;Y(l)});(0,p.useEffect)(()=>ei(),[ei]);let en=(0,p.useRef)(null);(0,p.useEffect)(()=>{let e=en.current;if(!e||void 0!==S)return;let l=new ResizeObserver(e=>{let[l]=e;if(l.target.getAttribute("data-change"))return void l.target.removeAttribute("data-change");Y(1===l.contentRect.height)});return l.observe(e),()=>{l.unobserve(e),l.disconnect()}},[Y,S,q]);let ea=i??B,ec=O?"icon-dash":"icon-tick";return(0,r.jsxs)(f,{...W.root,ref:es,sx:w,style:{...T,...er},className:(0,u.default)(k,{[h.checked]:U,[h.disabled]:Z}),children:[(0,r.jsx)(_,{...W.checkbox,type:"checkbox",ref:ee,value:M,name:X,disabled:Z,checked:U,onBlur:e=>{var l;null==E||E(e),null==G||null==(l=G.onBlur)||l.call(G,e)},onChange:e=>{var l;let t=e.currentTarget.checked;null==(l=en.current)||l.setAttribute("data-change","1"),Y(t,{event:e})}}),(0,r.jsx)(g,{ref:en,className:h.baseline}),(0,r.jsxs)(c.A,{component:z,size:"small",edge:F,disabled:Z,disableRipple:C||Z,sx:{position:"relative",color:"var(--mui-checkbox-color)",padding:.6,zIndex:0,"&:hover":{backgroundColor:"transparent",[`& .${h.rippleBackground}`]:{opacity:.13}}},children:[(0,r.jsx)(v,{className:h.rippleBackground}),(0,r.jsx)(b,{"mui-merge-state":J,"mui-disabled":Z,"mui-error":Q,children:(0,r.jsx)(a.A,{in:J,children:(0,r.jsx)(m.t,{code:ec,color:"#fff",fontSize:7,...L})})})]}),ea&&(0,r.jsx)(n.A,{fontSize:12,lineHeight:"16px",mt:.4,color:"var(--textSecondary)",...j,children:ea})]})})},9633:e=>{e.exports={root:"root_riVgPY61",changeBox:"change-box_GexRpWa8",long:"long_bE9iZumH",short:"short_G_q3dEUT",changeWrap:"change-wrap_FseJNGmT",actionBox:"action-box_K1dEwczU",marketList:"market-list_gNVMox_u",dropdownContent:"dropdown-content_Vl5ptsLz"}},10067:(e,l,t)=>{"use strict";t.d(l,{G:()=>u});var r=t(37876),o=t(1603),s=t(36753),i=t(49995),n=t(14232),a=t(90078),c=t.n(a);let d={rowWrap:"MuiGridRow-wrap",rowRoot:"MuiGridRow-root",colRoot:"MuiGridCol-root"},u={Row:n.forwardRef((e,l)=>{let{gutter:t=0,align:o,justify:a,wrap:u=!0,className:p,style:m,rootStyle:x,classes:h,children:f,..._}=e,g=(0,n.useMemo)(()=>(0,s.h)(Array.isArray(t)?t[0]??0:t),[t]),v=(0,n.useMemo)(()=>(0,s.h)(Array.isArray(t)?t[1]??0:t),[t]),b={"--mui-grid-column-gutter-xs":g.xs+"px","--mui-grid-column-gutter-sm":g.sm+"px","--mui-grid-column-gutter-md":g.md+"px","--mui-grid-column-gutter-lg":g.lg+"px","--mui-grid-column-gutter-xl":g.xl+"px","--mui-grid-row-gutter-xs":v.xs+"px","--mui-grid-row-gutter-sm":v.sm+"px","--mui-grid-row-gutter-md":v.md+"px","--mui-grid-row-gutter-lg":v.lg+"px","--mui-grid-row-gutter-xl":v.xl+"px"};return(0,r.jsx)("div",{ref:l,className:(0,i.default)(p,d.rowWrap,null==h?void 0:h.rowWrap,c().rowWrap),style:{...m,...b},..._,children:(0,r.jsx)("div",{style:x,className:(0,i.default)(d.rowRoot,null==h?void 0:h.rowRoot,c().rowRoot,{[c()["row-nowrap"]]:!u,[c()[`row-align-${o}`]]:o,[c()[`row-justify-${a}`]]:a}),children:f})})}),Col:n.forwardRef((e,l)=>{let{span:t,order:s=0,offset:a=0,push:u=0,pull:p=0,className:m,style:x,...h}=e,f=(0,n.useCallback)(e=>{let l=e?`-${e}`:"";return`col${l}`},[]),_=(0,n.useMemo)(()=>{let l={};
1return o.fi.forEach(t=>{let r={},o=e[t];"number"==typeof o||"string"==typeof o||"boolean"==typeof o?r.span=o:"object"==typeof o&&(r=o||{}),delete h[t];let s=f(t);l={...l,[c()[`${s}-${r.span}`]]:void 0!==r.span&&!1!==r.span,[c()[`${s}-order-${r.order}`]]:r.order||0===r.order,[c()[`${s}-offset-${r.offset}`]]:r.offset||0===r.offset,[c()[`${s}-push-${r.push}`]]:r.push||0===r.push,[c()[`${s}-pull-${r.pull}`]]:r.pull||0===r.pull}}),l},[f,h,e]),g=f();return(0,r.jsx)("div",{ref:l,style:x,className:(0,i.default)(d.colRoot,c().colRoot,m,_,{[c()[`${g}-${t}`]]:void 0!==t&&!1!==t,[c()[`${g}-order-${s}`]]:s,[c()[`${g}-offset-${a}`]]:a,[c()[`${g}-push-${u}`]]:u,[c()[`${g}-pull-${p}`]]:p}),...h})})}},18233:e=>{e.exports={"ticker-box":"ticker-box__7QGxX6Z0",normal:"normal_b9BtognK",up:"up_tf8OwS84",down:"down__4cMCaTkp"}},19570:(e,l,t)=>{"use strict";var r=Error();e.exports=new Promise((e,l)=>{if("undefined"!=typeof Cropper)return e();t.l("/scripts/[email protected]",t=>{if("undefined"!=typeof Cropper)return e();var o=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;r.message="Loading script failed.\n("+o+": "+s+")",r.name="ScriptExternalLoadError",r.type=o,r.request=s,l(r)},"Cropper")}).then(()=>Cropper)},23515:(e,l,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/spot/[symbol]",function(){return t(5443)}])},24392:(e,l,t)=>{"use strict";t.d(l,{Ay:()=>o});var r=t(88493);t(43644),t(84605);let o=r.A},24584:e=>{e.exports={"tabs-box":"tabs-box_erkq3poI","open-order-global-action-box":"open-order-global-action-box__6vikuQn6","action-box":"action-box_HunSQGZ5","content-box":"content-box_Wi2ZaFVo"}},25194:e=>{e.exports={root:"root__DQV789S",hasScrollY:"has-scroll-y_pUwWzeN1",table:"table_HmzbjsqY",border:"border_feFVFgns",bolder:"bolder_p2ETGiDp",smallFont:"small-font__9ZBvGCVh",fontSizeSmall:"font-size-small_fgdXrS3a","table-cell-with-append":"table-cell-with-append_Oz7f5aAL",borderGap0:"border-gap0_CS6jwXP6",borderGap8:"border-gap8_DhAGFoBz",borderGap16:"border-gap16_RgSp1iNI",borderGap24:"border-gap24_TyMMG78M",expand:"expand_U3amojwp",tableWithScroll:"table-with-scroll_Xjg0vzMf",smallTable:"small-table_i_qkpc5O",expandByRow:"expand-by-row__zwnb_0y",expandActive:"expand-active__3AW3apLe",loadingWrapper:"loading-wrapper_qRw9ZjV7",pagination:"pagination_mDiPb9nD",checkboxRoot:"checkbox-root_UAPzkmdk",selectionAllBox:"selection-all-box_ayeEK2BB",selectionButton:"selection-button_Wl8SAjBK",selectionPopperIcon:"selection-popper-icon_SMwA5SHg"}},29336:(e,l,t)=>{"use strict";let r;t.d(l,{X:()=>x});var o=t(37876),s=t(83847),i=t(14232),n=t(60842),a=t(21004),c=t(64272),d=t(7150),u=t(85070),p=t(94374);let m=e=>e<768?"mobile":e>=768&&e<992?"tablet":"desktop",x=e=>{let{children:l,desktop:t,tablet:x,mobile:h}=e,f=t??l,{deviceType:_}=(0,s.II)(),[g,v]=(0,i.useState)(_??"desktop");return(0,i.useEffect)(()=>{let e=(r||(r=(0,n.R)(window,"resize").pipe((0,a.B)(80),(0,c.T)(()=>window.innerWidth),(0,d.Z)(window.innerWidth),(0,c.T)(m),(0,u.F)(),(0,p.t)(1))),r);if(!e)return;let l=e.subscribe(e=>{v(e)});return()=>{l.unsubscribe()}},[]),(0,o.jsx)(i.Fragment,{children:"mobile"===g?h??x??f:"tablet"===g?x??f??h:f??x??h})}},34808:(e,l,t)=>{"use strict";t.d(l,{O:()=>o});var r=t(45526);class o{intersectionCallback(e,l){e.forEach(e=>{let{target:t}=e;for(let r of this.data)r.element===t&&r.callback(e,l)})}init(e){var l=this;let t={rootMargin:"0px",threshold:[0,.1,1],...e};if(window.IntersectionObserver)return this.observer=new IntersectionObserver(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return l.intersectionCallback(...t)},t),this.data.forEach(e=>{if(!e.watching){var l;null==(l=this.observer)||l.observe(e.element),e.watching=!0}}),this}add(e,l){return this.observer?(this.data.add({element:e,callback:l,watching:!0}),this.observer.observe(e)):this.data.add({element:e,callback:l,watching:!1}),this}remove(e){for(let l of this.data.values())if(l.element===e)return this.observer&&this.observer.unobserve(e),this.data.delete(l),this}destroy(){this.observer&&this.observer.disconnect(),this.data.clear(),this.forceUpdateList.clear()}
1forceUpdate(){this.forceUpdateList.forEach(e=>{e()})}onForceUpdate(e){this.forceUpdateList.add(e)}deleteForceUpdate(e){this.forceUpdateList.delete(e)}constructor(){(0,r._)(this,"observer",void 0),(0,r._)(this,"data",new Set),(0,r._)(this,"forceUpdateList",new Set)}}},35505:(e,l,t)=>{"use strict";t.d(l,{E:()=>n});var r=t(49995),o=t(14232),s=t(58238),i=t.n(s);let n=(0,o.forwardRef)(function(e,l){let{component:t="div",className:s,classes:n,border:a,radius:c="4px",elevation:d=0,style:u,...p}=e,m=(0,o.useMemo)(()=>Math.max(0,Math.min(24,d)),[d]),x={"--mui-paper-radius":"number"==typeof c?`${c}px`:c};return(0,o.createElement)(t,{ref:l,className:(0,r.default)("mui-paper-root",i().root,s,null==n?void 0:n.root,i()[`shadow-${m}`],{[i().border]:a}),style:{...u,...x},...p})})},38784:(e,l,t)=>{"use strict";t.d(l,{A:()=>p});var r=t(37876),o=t(23977),s=t(84446),i=t(49995),n=t(14232),a=t(68483);let c={item:"mui-pagination-item",active:"mui-pagination-active",disabled:"mui-pagination-disabled",short:"mui-pagination-short",container:"mui-pagination-container",ghost:"mui-pagination-ghost"},d=(0,o.T)(s.A)({display:"flex"}),u=(0,o.T)(s.A)({width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",lineHeight:"28px",textAlign:"center",marginLeft:"8px",cursor:"pointer",userSelect:"none",fontWeight:500,fontSize:"12px",transition:"color 200ms",[`&.${c.short}`]:{marginLeft:"4px"},"&:first-of-type":{marginLeft:"0 !important"},"&:hover":{color:"var(--mui-pagination-color)"},[`&.${c.disabled}`]:{cursor:"not-allowed",color:"var(--textTertiary)"},[`&.${c.container}`]:{backgroundColor:"var(--paper)",border:"1px solid var(--divider)",[`.${c.disabled}`]:{backgroundColor:"var(--hover)"}},[`&.${c.ghost}`]:{border:"1px solid transparent"},[`&.${c.active}`]:{borderColor:"var(--mui-pagination-color)",color:"var(--mui-pagination-color)"}}),p=n.forwardRef((e,l)=>{let{currentPage:t=1,pageSize:o=10,pageTotal:s,count:p,showArrow:m,onChange:x,variant:h="ghost",short:f=!1,color:_="var(--primary)",className:g,style:v,sx:b,itemProps:y}=e,j=(0,n.useMemo)(()=>p??(s??0)*o,[p,o,s]),w=(0,n.useMemo)(()=>s??Math.ceil(j/o),[o,s,j]),T=(0,n.useCallback)(e=>{let{code:l}=e.currentTarget.dataset,r=Number(l);"prev"===l&&1!==t?r=t-1:"next"===l&&t!==w&&(r=t+1),r&&x&&x(r,o,e)},[x,t,w,o]),k=(0,n.useMemo)(()=>({"--mui-pagination-color":_}),[_]);if(j<=o)return null;let N=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[],o=t?2:3;if(e<=(t?7:10))for(let l=1;l<e+1;l++)r.push({value:l,code:l});else{r.push({value:l,code:l});let s=l<=e-(t?4:5)?o:(t?5:7)-(e-l);for(let e=1;e<=s;e++){let t=l-e;if(t<1)break;if(e===s&&t>1){r.unshift({value:1,code:1},2===t?{value:2,code:2}:{value:"...",code:"prevEllipsis"});break}r.unshift({value:t,code:t})}s=l>=5?o:(t?6:8)-l;for(let t=1;t<=s;t++){let o=l+t;if(o>e)break;if(t===s&&o<=e-1){r.push(o===e-1?{value:e-1,code:e-1}:{value:"...",code:"nextEllipsis"},{value:e,code:e});break}r.push({value:o,code:o})}}return r}(w,t,f);return m&&(N.push({value:(0,r.jsx)(a.t,{code:"icon-arrow-right",fontSize:12}),code:"next"}),N.unshift({value:(0,r.jsx)(a.t,{code:"icon-arrow-left",fontSize:12}),code:"prev"})),(0,r.jsx)(d,{sx:b,className:g,style:{...v,...k},children:N.map(e=>(0,r.jsx)(u,{role:"button",onClick:T,"data-code":e.code,style:null==y?void 0:y.style,sx:null==y?void 0:y.sx,className:(0,i.default)(null==y?void 0:y.className,c.item,c[h],{[c.active]:t===e.code,[c.short]:f,[c.disabled]:"prev"===e.code&&1===t||"next"===e.code&&t===w}),children:"next"===e.code?(0,r.jsx)(a.t,{code:"icon-arrow-right",fontSize:"inherit"}):"prev"===e.code?(0,r.jsx)(a.t,{code:"icon-arrow-left",fontSize:"inherit"}):e.value},e.code))})})},38795:(e,l,t)=>{"use strict";t.d(l,{k:()=>u});var r=t(37876),o=t(22860),s=t(85646),i=t(49995),n=t(14232),a=t(83065),c=t.n(a);let d=0,u=e=>{let{header:l,main:t,appBar:a,style:u,className:p,fullPageScroll:m=!1}=e,[x,h]=(0,n.useState)(0),[f,_]=(0,n.useState)(0),{elementRef:g}=(0,s.w)({onResizeObserver:e=>{let{element:l}=e;return h(l.offsetHeight)}}),{elementRef:v}=(0,s.w)({onResizeObserver:e=>{let{element:l}=e;return _(l.offsetHeight)}});(0,n.useEffect)(()=>(d&&clearTimeout(d),(0,o.Vf)("hide"),()=>{d=window.setTimeout(()=>(0,o.Vf)("show"),500)}),[]);let b={"--m-header-height":`${x}px`,"--m-footer-height":`${f}px`,...u};return(0,r.jsxs)("div",{className:(0,i.default)(c().root,p,{[c().fullPageScroll]:m}),style:b,children:[l&&(0,r.jsx)("div",{ref:g,className:c().header,children:l}),(0,r.jsxs)("main",{className:c().main,children:[t,m&&a&&(0,r.jsx)("div",{className:c().footerSpacer,style:{height:f||72}})]}),a&&(0,r.jsx)("div",{ref:v,className:c().footer,children:a})]})}},39467:(e,l,t)=>{"use strict";t.d(l,{A:()=>j});var r,o=t(40670),s=t(44501),i=t(14232),n=t(49995),a=t(4697),c=t(98428),d=t(35003),u=t(63738),p=t(47354),m=t
1(35268),x=t(47951),h=t(45879);function f(e){return(0,h.Ay)("MuiInputAdornment",e)}let _=(0,x.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var g=t(31723),v=t(37876);let b=["children","className","component","disablePointerEvents","disableTypography","position","variant"],y=(0,m.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,l)=>{let{ownerState:t}=e;return[l.root,l[`position${(0,c.A)(t.position)}`],!0===t.disablePointerEvents&&l.disablePointerEvents,l[t.variant]]}})(e=>{let{theme:l,ownerState:t}=e;return(0,s.A)({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(l.vars||l).palette.action.active},"filled"===t.variant&&{[`&.${_.positionStart}&:not(.${_.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})}),j=i.forwardRef(function(e,l){let t=(0,g.A)({props:e,name:"MuiInputAdornment"}),{children:m,className:x,component:h="div",disablePointerEvents:_=!1,disableTypography:j=!1,position:w,variant:T}=t,k=(0,o.A)(t,b),N=(0,p.A)()||{},S=T;T&&N.variant,N&&!S&&(S=N.variant);let I=(0,s.A)({},t,{hiddenLabel:N.hiddenLabel,size:N.size,disablePointerEvents:_,position:w,variant:S}),A=(e=>{let{classes:l,disablePointerEvents:t,hiddenLabel:r,position:o,size:s,variant:i}=e,n={root:["root",t&&"disablePointerEvents",o&&`position${(0,c.A)(o)}`,i,r&&"hiddenLabel",s&&`size${(0,c.A)(s)}`]};return(0,a.A)(n,f,l)})(I);return(0,v.jsx)(u.A.Provider,{value:null,children:(0,v.jsx)(y,(0,s.A)({as:h,ownerState:I,className:(0,n.default)(A.root,x),ref:l},k,{children:"string"!=typeof m||j?(0,v.jsxs)(i.Fragment,{children:["start"===w?r||(r=(0,v.jsx)("span",{className:"notranslate",children:"â"})):null,m]}):(0,v.jsx)(d.A,{color:"text.secondary",children:m})}))})})},41318:(e,l,t)=>{"use strict";t.d(l,{q3:()=>j,Qi:()=>k,kc:()=>y,jn:()=>T,Ej:()=>b});var r=t(64272),o=t(10928),s=t(91283),i=t(29209),n=t(51890),a=t(61116),c=t(45526),d=t(35981),u=t(13997),p=t(7261),m=t(19802),x=t(94374);class h extends d.C{addSub(e,l){0===this.channelStatusMap.size&&this.dispatch("has-subscriber",l),this.dispatch("add-subscriber",l),this.channelStatusMap.set(e,l)}removeSub(e){this.channelStatusMap.get(e),this.dispatch("remove-subscriber",e),this.channelStatusMap.delete(e),0===this.channelStatusMap.size&&this.dispatch("no-subscriber",this)}registerService(e,l){let t=e.id;this.channelStatusMap.has(t)||this.addSub(t,e);let r=this.channelStatusMap.get(t);return 1===r.status?null==l||l():r.on("sub-success",()=>{null==l||l()}),r.on("unSub-success",()=>{this.removeSub(t)}),r.subscription}getSub(e){return this.channelStatusMap.get(e)}destroy(){for(let e of this.channelStatusMap){let[l,t]=e;t.destroy()}this.channelStatusMap.clear()}constructor(...e){super(...e),(0,c._)(this,"channelStatusMap",new Map)}}class f extends d.C{createId(e){return(0,u.r)()}setStatus(e){this.status=e,1===e&&this.dispatch("sub-success",this)}once(){return 1===this.status?new Promise(()=>{}):this.onStart()}onStart(){return new Promise(()=>{})}onUnSub(){return new Promise(()=>{})}destroy(){this.off()}active(){3!==this.status&&(2===this.status&&this.setStatus(1),this.clearTimer&&(clearTimeout(this.clearTimer),this.clearTimer=null))}onMessage(e){this.onMessageSubscription.next(e)}constructor(e){super(),(0,c._)(this,"id",void 0),(0,c._)(this,"status",0),(0,c._)(this,"data",{}),(0,c._)(this,"clearTimer",null),(0,c._)(this,"onMessageSubscription",new p.m(1)),(0,c._)(this,"subscription",new m.c(e=>{this.active(),0===this.status&&this.once().then(()=>{this.setStatus(1)}).catch(e=>{this.dispatch("error",e),this.setStatus(4)});let l=this.onMessageSubscription.subscribe(l=>{e.next(l)}
1);return()=>{this.setStatus(2),l.unsubscribe(),this.clearTimer=window.setTimeout(()=>{this.onUnSub().catch(e=>{this.dispatch("error",e),this.setStatus(4)}),this.setStatus(3),this.dispatch("unSub-success",this),this.destroy()},100)}}).pipe((0,x.t)({refCount:!0,bufferSize:1}))),this.id=this.createId(e),this.data=e}}class _ extends f{static createId(e){let{subscribeType:l,instrId:t,klineRange:r,kimpChannelId:o}=e;return[l,t,r??o].filter(Boolean).join("-")}createId(e){let{subscribeType:l,instrId:t,klineRange:r,kimpChannelId:o}=e;return[l,t,r??o].filter(Boolean).join("-")}onStart(){return a.t.request("/subscribe-channel",{data:this.data})}onUnSub(){return a.t.request("/unsubscribe-channel",{data:this.data})}}let g=new h;function v(e,l){a.t.send({id:e,type:"data-response",from:"bin-service-request",data:l})}function b(e,l){let t=new _({instrId:e,subscribeType:"TRADES",instrumentName:l});return g.registerService(t)}function y(e,l,t){let r=new _({instrId:e,subscribeType:"KLINE",instrumentName:l,klineRange:t});return g.registerService(r)}function j(e,l,t){let o=new _({instrId:e,subscribeType:"BOOK",instrumentName:l,depth:t});return g.registerService(o).pipe((0,r.T)(e=>e))}a.t.on("data-push",function(e){let{channelName:l,data:t}=e,r=g.getSub(l);r&&r.onMessage(t)}),a.t.on("data-request",e=>{let{data:l}=e,{payload:t,requestType:r}=l;"TRADES"===r?i.r.getRealTrades({instrument_name:t.instrumentName,count:60}).then(n.D7).then(l=>{v(e.id,l)}):"BOOK"===r?i.r.getOrderBook({...t}).then(n.D7).then(l=>{v(e.id,l)}).catch(l=>{v(e.id,{error:l.message})}):"TICKER"===r&&i.r.getTickers({instrument_name:t.instrumentName,market:"PERPETUAL"}).then(n.D7).then(l=>{v(e.id,l)})}),a.t.on("data-notification",e=>{let{data:l}=e;"WS-CONNECTED"===l.eventType?(o.I.WS.reconnect("binary"),s.M.next({type:"open"}),console.info(`Stream service [${new Date().toLocaleString()}]:`,"New websocket Network connection is successful")):"WS-DISCONNECTED"===l.eventType?(o.I.WS.disconnect("binary"),s.M.next({type:"close"}),console.info(`Stream service [${new Date().toLocaleString()}]:`,"network is disconnected.")):"WS-RECONNECTED"===l.eventType?(s.M.next({type:"reconnect",count:l.retryCount}),console.info(`Stream service [${new Date().toLocaleString()}]:`,`Network Is Being Reconnected(${l.retryCount})...`)):"CHANNEL-NO-DATA-PUSH"===l.eventType&&(console.info(`Stream service [${new Date().toLocaleString()}]:`,`Channel (${l.channel}) received no data`),o.I.WS.channelNoData(l.channel))}),a.t.on("data-error",()=>{}),a.t.on("error",()=>{});let w=new Map;function T(e,l,t){let r=new _({instrId:e,subscribeType:"TICKERS",instrumentName:l,marketType:t});r.on("unSub-success",e=>{w.delete(e.data.instrId)});let o=g.getSub(`TICKERS-${e}`);return o&&!o.data.marketType&&t&&(o.data.marketType=t,o.onStart()),g.registerService(r)}function k(e,l){let t=new _({subscribeType:"KIMPTICKER",instrId:e,kimpChannelId:l});return g.registerService(t)}},46302:(e,l,t)=>{"use strict";t.d(l,{A:()=>b});var r=t(37876),o=t(36162),s=t(54773),i=t(11897),n=t(68483),a=t(61812),c=t(38784),d=t(5723),u=t(76759),p=t(49995),m=t(24392),x=t(14232),h=t(25194),f=t.n(h),_=t(38793),g=t(26389),v=t(71506);let b=function(e){let{className:l,prefixCls:t,data:h=[],columns:b,scroll:y,expandable:j,emptyText:w,loading:T,paginationBy:k,defaultPage:N=1,pageTotal:S=0,pageCount:I=0,pageSize:A=10,pageChange:C,currentPage:O=1,classes:P,size:M="middle",fontSize:H,rowClassName:B,tree:R=!1,rowSelection:L,fontBolder:F=!1,borderGap:z="16",isBorder:D,...E}=e,{resultData:$,page:W,setPage:G,count:K}=function(e){let{data:l,paginationBy:t,pageTotal:r,pageSize:o,pageCount:s,defaultPage:i,currentPage:n}=e,[a,c]=(0,x.useState)([]),[d,u]=(0,x.useState)(0),[p,m]=(0,x.useState)(n??i),h="front"===t,f=e=>(0,g.mi)(e).div(o).integerValue(g._8.ROUND_CEIL).toNumber(),_=(0,x.useCallback)(e=>{let t=(0,g.mi)(o).times((0,g.mi)(e).minus(1));return l.slice(t.toNumber(),t.plus(o).toNumber())},[o,l]);return(0,v.N)(()=>m(n),[n]),(0,v.N)(()=>{if(!t)return void c(l);if(h){c(_(p)),u(f(l.length));return}c(l),u(s||f(r))},[t,h,l,p]),{count:d,resultData:a,page:p,setPage:m}}({paginationBy:k,data:h,defaultPage:N,pageCount:I,pageSize:A,pageTotal:S,currentPage:O}),V=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{expandedRowRender:l,classes:t,...o}=e;return{indentSize:20,expandRowByClick:!1,expandIcon:(0,x.useCallback)(e=>{let{expandable:o,expanded:s,onExpand:i,record:a}=e;return o&&o.length||l?(0,r.jsx)(n.t,{code:"icon-arrow-down",fontSize:20,className:(0,p.default)(null==t?void 0:t.expand,s?null==t?void 0:t.expandActive:""),onClick:e=>{i&&i(a,e)}}):null},[t,l]),expandedRowRender:(0,x.useMemo)(()=>
1{if(l)return(e,t,r,o)=>o?l(e,t,r,o):null},[l]),...o}}({...j,classes:{expandActive:f().expandActive,expand:f().expand}}),q=(0,x.useCallback)(e=>R?e.children?"table-row-with-arrow":"table-row-with-children":"",[R]),U=(0,x.useCallback)((e,l,t)=>{let r=typeof B,o=q(e);return"string"===r?(0,p.default)(B,o):"function"===r?(0,p.default)(B(e,l,t),o):o},[q,B]),Y=(null==h?void 0:h.length)?{x:null==y?void 0:y.x,y:null==y?void 0:y.y}:void 0,X=(0,x.useMemo)(()=>{if(!y)return;let e={};return(y.x||y.y)&&(e["--table-overflow"]=`${y.x?"auto":"hidden"} ${y.y?"auto":"hidden"}`),"boolean"!=typeof y.y&&y.y&&(e["--table-max-height"]="number"==typeof y.y?`${y.y}px`:y.y),e},[y]),[Z,Q]=(0,x.useState)({[W]:[]}),J=(0,o.g)(e=>!!Z[W]&&-1!==Z[W].indexOf(e)),ee=(0,o.g)(e=>{Q(l=>{var t;let r={...l,[W]:e},o=r[W],s=$.filter(e=>L&&o.includes(String(e[null==L?void 0:L.dataProps])));return null==L||null==(t=L.onChange)||t.call(L,s,o),r})});(0,x.useEffect)(()=>{let e=(null==L?void 0:L.selectedRowKeys)??[];if(!e.length)return ee([]);ee(e.filter(e=>""!==e&&void 0!==e))},[null==L?void 0:L.selectedRowKeys,ee]),(0,x.useEffect)(()=>{L&&Q(e=>{var l;let t=e[W];if(!(null==t?void 0:t.length))return e;let r=t.filter(e=>$.some(l=>l[L.dataProps]===e)),o=$.filter(e=>r.includes(e[L.dataProps]));return null==L||null==(l=L.onChange)||l.call(L,o,r),{...e,[W]:r}})},[$,W]);let[el,et]=(0,x.useState)(""),er=(0,x.useMemo)(()=>{var e,l,t;if(!L)return b;let o=null==b?void 0:b.slice(),a=$.length>0&&(null==(e=Z[W])?void 0:e.length)===$.length,c=$.length>0&&!a&&(null==(l=Z[W])?void 0:l.length)>0;return null==o||o.unshift({title:(0,r.jsxs)("div",{className:f().selectionAllBox,children:[(0,r.jsx)(s.S,{size:"medium",indeterminate:c,checked:a,className:f().checkboxRoot,onChange:(e,l)=>{if(et(""),l)return void ee($.map(e=>String(e[L.dataProps])));ee([])}}),(null==(t=L.selections)?void 0:t.length)&&(0,r.jsx)(i.Z,{arrow:!0,placement:"bottom-start",offset:-16,gap:2,content:(0,r.jsx)(r.Fragment,{children:L.selections.map(e=>(0,r.jsx)(d.A,{sx:{pt:.9,pb:.9,fontSize:12,lineHeight:"14px",fontWeight:"400 !important"},selected:e.key===el,onClick:()=>{et(e.key),e.onSelect($)},children:e.text},e.key))}),children:(0,r.jsx)(u.A,{style:{padding:2},children:(0,r.jsx)(n.t,{className:f().selectionPopperIcon,code:"icon-caret-down"})})})]}),width:(null==L?void 0:L.width)??(L.selections?80:58),fixed:null==L?void 0:L.fixed,render:e=>{let l=String(e[L.dataProps]),t=J(l);return(0,r.jsx)(s.S,{size:"medium",checked:t,className:f().checkboxRoot,onChange:()=>{var e,t,r,o,s,i;let n=null==(e=Z[W])?void 0:e.indexOf(l),a=[];-1===n?a=a.concat(Z[W],l):0===n?a=a.concat(null==(r=Z[W])?void 0:r.slice(1)):n===(null==(t=Z[W])?void 0:t.length)-1?a=a.concat(null==(o=Z[W])?void 0:o.slice(0,-1)):n>0&&(a=a.concat(null==(s=Z[W])?void 0:s.slice(0,n),null==(i=Z[W])?void 0:i.slice(n+1))),ee(a)}})}}),o},[L,b,W,Z,ee,J,$,el]);return(0,r.jsxs)("div",{className:(0,p.default)("table-root",f().root,null==P?void 0:P.tableRoot,{[f().hasScrollY]:!!(null==y?void 0:y.y)}),children:[(0,r.jsx)(m.Ay,{prefixCls:"table",expandable:V,className:(0,p.default)(l,f().table,f()[`borderGap${z}`],j&&(null==V?void 0:V.expandRowByClick)&&f().expandByRow,{[f().tableWithScroll]:!!y,[f().bolder]:F,[f().border]:D,[f().smallTable]:"small"===M,[f().fontSizeSmall]:"small"===H},null==P?void 0:P.table),style:X,columns:er,data:$,scroll:Y,emptyText:w||(0,r.jsx)(_.x,{}),rowClassName:U,...E}),T&&(0,r.jsx)("div",{className:f().loadingWrapper,children:(0,r.jsx)(a.y,{})}),K>1&&k?(0,r.jsx)(c.A,{className:(0,p.default)(f().pagination,null==P?void 0:P.pagination),showArrow:!0,currentPage:W,pageSize:A,pageTotal:K,onChange:(e,l,t)=>{G(e),null==C||C(t,e)}}):null]})}},46747:(e,l,t)=>{"use strict";t.d(l,{A:()=>m});var r=t(37876),o=t(19342),s=t(84446),i=t(58700),n=t(25763),a=t(37626),c=t(4976),d=t(50426),u=t.n(d);function p(e){let{item:l,unit:t}=e,{feeReal:o}=l,{t:s}=(0,a.B)();return(0,r.jsxs)("div",{className:u()["fee-tooltip-box"],children:[(0,r.jsxs)("li",{className:u()["fee-list-title"],children:[(0,r.jsx)("span",{className:u().title,children:s("Trades.ExpectedFees")}),(0,r.jsxs)("span",{className:u().value,children:[(0,n.A)(o).toFixed(8)," ",t]})]}),(0,r.jsx)(c.h,{style:{margin:"12px 0"},color:"var(--textTertiary)",dividerStyle:"dotted"}),(0,r.jsxs)("ul",{className:u()["fee-list-box"],children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("span",{className:u().title,children:s("Trades.ChargedFees")}),(0,r.jsxs)("span",{className:u().value,children:[(0,n.A)(l.feeActual).toFixed(8)," ",t]})]}),l.feeCoupon&&0!==Number(l.feeCoupon)?(0,r.jsxs)("li",{children:[(0,r.jsx)("span",{className:u().title,children:s("Trades.CouponDeductedFees")}),(0,r.jsxs)("span",{className:u().value,children:[(0,n.A)(l.feeCoupon).toFixed(8)," ",t]})]}):null,l.feeBonus&&0!==Number(l.feeBonus)?(0,r.jsxs)("li",{children:[(0,r.jsx)("span",{className:u().title,children:s("Trades.BonusDeductedFees")}),(0,r.jsxs)("span",{className:u().value,children:[(0,n.A)(l.feeBonus).toFixed(8)," ",t]})]}):null]})]})}function m(e){let{data:l,type:t,unit:c="USDT"}=e,{t:d}=(0,a.B)(),u=(0,n.A)(l.fee),m="perpetual"===t?u.abs().toFormat(2):(0,i.M)(l.fee,8);if(l.feeActual===l.feeReal)return(0,r.jsx)(r.Fragment,{children:`${m} ${c}`});let x=(0,n.A)(l.feeReal).minus(l.feeActual).div(l.feeReal).multipliedBy(100);return(0,r.jsx)(o.v,{placement:"top",title:(0,r.jsx)(p,{unit:c,type:t,item:l}),children:(0,r.jsx)(s.A,{sx:{whiteSpace:"nowrap"},color:u.lt(0)?"warning.main":void 0,translate:"no",className:"notranslate",children:`${m} ${c}(â${n.A.min(100,x).toFixed(2)}% ${d("Rewards.Deduction")})`})})}},50426:e=>{e.exports={"fee-tooltip-box":"fee-tooltip-box_Kcn43SR5",title:"title_ATq6zEeM",value:"value_P_zjwxRg","fee-list-title":"fee-list-title_IL7w_YG7","fee-list-box":"fee-list-box_r8Xd2FTP"}},58238:e=>{e.exports={root:"root_BaSV_yWE",border:"border_sJYrK_rG","shadow-24":"shadow-24_jju_RG9P","shadow-23":"shadow-23_oqv9GIp4","shadow-22":"shadow-22__8M1G1GRu","shadow-21":"shadow-21_z1U_WMkS","shadow-20":"shadow-20_LL4ZOr7Q","shadow-19":"shadow-19_ANKRFUAQ","shadow-18":"shadow-18__e9QJjzJ","shadow-17":"shadow-17_w1oeDOXh","shadow-16":"shadow-16_uaQ2pDVr","shadow-15":"shadow-15_YC6lF8GY","shadow-14":"shadow-14_Yc3IQjQ6","shadow-13":"shadow-13_KoUqz9cP","shadow-12":"shadow-12_JaoM_7wR","shadow-11":"shadow-11_xvImPDgK","shadow-10":"shadow-10__4hCET6BJ","shadow-9":"shadow-9_wc5m3meQ","shadow-8":"shadow-8_rd6TN3Nu","shadow-7":"shadow-7_Pu6Tdci4","shadow-6":"shadow-6_XNF3HkRY","shadow-5":"shadow-5__4sLTXuHu","shadow-4":"shadow-4__dRUGUrU","shadow-3":"shadow-3_WIKAvx9D","shadow-2":"shadow-2_XYCYx_7i","shadow-1":"shadow-1_OYujH6PV","shadow-0":"shadow-0_bDqKp31Q"}},61116:(e,l,t)=>{"use strict";t.d(l,{t:()=>c});var r=t(96033),o=t(45526),s=t(13997),i=t(35981);
1class n extends i.C{request(e,l){let t=(0,s.r)(),r=this;return new Promise((o,s)=>{this.worker&&(this.worker.postMessage({id:t,body:l.data,pathname:e,origin:l.origin,contentType:l.contentType||"application/json"}),null===this||void 0===this||this.on("data-response",function e(l){l&&l.id===t&&(null==r||r.off("data-response",e),l.status>=200&&l.status<400?o(l.data):s(l))}))})}send(e){var l;null==(l=this.worker)||l.postMessage(e)}constructor(e){super(),(0,o._)(this,"worker",void 0),this.worker=e,this.worker.addEventListener("message",e=>{let{data:l}=e;if(l)switch(l.action){case"data-error":this.dispatch("data-error",l);break;case"error":this.dispatch("error",l);break;case"data-notification":this.dispatch("data-notification",l);break;case"data-push":this.dispatch("data-push",l);break;case"data-response":this.dispatch("data-response",l);break;case"data-request":this.dispatch("data-request",l)}})}}class a extends EventTarget{postMessage(e){}onmessage(e){}onmessageerror(e){}terminate(){}onerror(e){}constructor(){super()}}let c=new n((0,r.o)()?new Worker(t.tu(new URL(t.p+t.u(8223),t.b)),{type:void 0}):new a)},63481:(e,l,t)=>{"use strict";t.d(l,{A:()=>T});var r=t(40670),o=t(44501),s=t(14232),i=t(49995),n=t(46809),a=t(4697),c=t(35268),d=t(31723),u=t(2249),p=t(53358),m=t(66703),x=t(59714),h=t(47951),f=t(45879);function _(e){return(0,f.Ay)("MuiCollapse",e)}(0,h.A)("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);var g=t(37876);let v=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],b=(0,c.Ay)("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,l)=>{let{ownerState:t}=e;return[l.root,l[t.orientation],"entered"===t.state&&l.entered,"exited"===t.state&&!t.in&&"0px"===t.collapsedSize&&l.hidden]}})(e=>{let{theme:l,ownerState:t}=e;return(0,o.A)({height:0,overflow:"hidden",transition:l.transitions.create("height")},"horizontal"===t.orientation&&{height:"auto",width:0,transition:l.transitions.create("width")},"entered"===t.state&&(0,o.A)({height:"auto",overflow:"visible"},"horizontal"===t.orientation&&{width:"auto"}),"exited"===t.state&&!t.in&&"0px"===t.collapsedSize&&{visibility:"hidden"})}),y=(0,c.Ay)("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,l)=>l.wrapper})(e=>{let{ownerState:l}=e;return(0,o.A)({display:"flex",width:"100%"},"horizontal"===l.orientation&&{width:"auto",height:"100%"})}),j=(0,c.Ay)("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,l)=>l.wrapperInner})(e=>{let{ownerState:l}=e;return(0,o.A)({width:"100%"},"horizontal"===l.orientation&&{width:"auto",height:"100%"})}),w=s.forwardRef(function(e,l){let t=(0,d.A)({props:e,name:"MuiCollapse"}),{addEndListener:c,children:h,className:f,collapsedSize:w="0px",component:T,easing:k,in:N,onEnter:S,onEntered:I,onEntering:A,onExit:C,onExited:O,onExiting:P,orientation:M="vertical",style:H,timeout:B=u.p0.standard,TransitionComponent:R=n.Ay}=t,L=(0,r.A)(t,v),F=(0,o.A)({},t,{orientation:M,collapsedSize:w}),z=(e=>{let{orientation:l,classes:t}=e,r={root:["root",`${l}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${l}`],wrapperInner:["wrapperInner",`${l}`]};return(0,a.A)(r,_,t)})(F),D=(0,m.A)(),E=s.useRef(),$=s.useRef(null),W=s.useRef(),G="number"==typeof w?`${w}px`:w,K="horizontal"===M,V=K?"width":"height";s.useEffect(()=>()=>{clearTimeout(E.current)},[]);let q=s.useRef(null),U=(0,x.A)(l,q),Y=e=>l=>{if(e){let t=q.current;void 0===l?e(t):e(t,l)}},X=()=>$.current?$.current[K?"clientWidth":"clientHeight"]:0,Z=Y((e,l)=>{$.current&&K&&($.current.style.position="absolute"),e.style[V]=G,S&&S(e,l)}),Q=Y((e,l)=>{let t=X();$.current&&K&&($.current.style.position="");let{duration:r,easing:o}=(0,p.c)({style:H,timeout:B,easing:k},{mode:"enter"});if("auto"===B){let l=D.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${l}ms`,W.current=l}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[V]=`${t}px`,e.style.transitionTimingFunction=o,A&&A(e,l)}),J=Y((e,l)=>{e.style[V]="auto",I&&I(e,l)}),ee=Y(e=>{e.style[V]=`${X()}px`,C&&C(e)}),el=Y(O),et=Y(e=>{let l=X(),{duration:t,easing:r}=(0,p.c)({style:H,timeout:B,easing:k},{mode:"exit"});if("auto"===B){let t=D.transitions.getAutoHeightDuration(l);e.style.transitionDuration=`${t}ms`,W.current=t}else e.style.transitionDuration="string"==typeof t?t:`${t}ms`;e.style[V]=G,e.style.transitionTimingFunction=r,P&&P(e)});return(0,g.jsx)(R,(0,o.A)({in:N,onEnter:Z,onEntered:J,onEntering:Q,onExit:ee,onExited:el,onExiting:et,addEndListener:e=>{"auto"===B&&(E.current=setTimeout(e,W.current||0)),c&&c(q.current,e)},nodeRef:q,timeout:"auto"===B?null:B},L,{children:(e,l)=>(0,g.jsx)(b,(0,o.A)({as:T,className:(0,i.default)(z.root,f,{entered:z.entered,exited:!N&&"0px"===G&&z.hidden}[e]),style:(0,o.A)({[K?"minWidth":"minHeight"]:G},H),ownerState:(0,o.A)({},F,{state:e}),ref:U},l,{children:(0,g.jsx)(y,{ownerState:(0,o.A)({},F,{state:e}),className:z.wrapper,ref:$,children:(0,g.jsx)(j,{ownerState:(0,o.A)({},F,{state:e}),className:z.wrapperInner,children:h})})}))}))});w.muiSupportAuto=!0;let T=w},64620:(e,l,t)=>{"use strict";t.d(l,{D:()=>u,Z:()=>d});var r=t(37876),o=t(36162),s=t(26389),i=t(54773),n=t(19485),a=t(14232),c=t(37626);let d={all:{label:"Public.All",key:0,filter:()=>!0},less0U:{label:"Wallet.Spot.HideBalance",key:"zero",filter:e=>!(0,s.mi)(e).isLessThanOrEqualTo(0)},less1U:{label:"Wallet.Spot.HideBalance",key:1,filter:e=>!(0,s.mi)(e).isLessThan(1)},less5U:{label:"Wallet.Spot.HideBalance",key:5,filter:e=>!(0,s.mi)(e).isLessThan(5)},less10U:{label:"Wallet.Spot.HideBalance",key:10,filter:e=>!(0,s.mi)(e).isLessThan(10)},debts:{label:"Wallet.Spot.OnlyDebts",key:"debts",filter:e=>!(0,s.mi)(e).isZero()}};
1function u(e){let{defaultValue:l,onChange:t}=e,[s,u]=(0,a.useState)(l??d.all),{t:p}=(0,c.B)(),m=(0,o.g)(t);return(0,a.useEffect)(()=>m(s),[m,s]),(0,r.jsx)(i.S,{label:(0,r.jsx)("span",{className:(0,n.AH)({fontSize:"14px",color:"text-tertiary",whiteSpace:"nowrap"}),children:p("Public.HideSmallAmount")}),defaultChecked:(null==l?void 0:l.key)===1,onChange:(e,l)=>{l?u(d.less1U):u(d.all)}})}},75945:e=>{e.exports={group:"group__2a5ovrI1",value:"value_KtsE6Df9",divider:"divider_HBTVo00t"}},79799:e=>{e.exports={"list-box":"list-box_TijxlaRb","list-item":"list-item_YPQ7AlIM",disabled:"disabled_VrjgalBQ"}},80135:(e,l,t)=>{"use strict";t.d(l,{m:()=>u});var r=t(37876),o=t(998),s=t(14232),i=t(77092);let n=(0,o.A)({backgroundColor:"bg-inverse-primary",border:"none",boxShadow:"none",maxHeight:"none",maxWidth:"300px",padding:"8px 12px",fontSize:"12px",lineHeight:"16px",fontWeight:400,color:"text-inverse-primary",overflow:"visible",wordBreak:"break-word"}),a=(0,o.A)({_before:{backgroundColor:"bg-inverse-primary"},_after:{backgroundColor:"bg-inverse-primary"}}),c=(0,o.A)({borderBottom:"1px var(--tooltip-line-type, dotted) var(--tooltip-underline-color, currentColor)"}),d=(0,o.A)({cursor:"pointer"}),u=(0,s.forwardRef)((e,l)=>{var t,u,p;let{title:m,placement:x="top",arrow:h=!0,underline:f=!0,underLineColor:_,lineType:g,open:v,onOpen:b,onClose:y,onOpenChange:j,children:w,className:T,disabled:k,leaveDelay:N,panelClassName:S,panelStyle:I,offset:A,arrowClassName:C,fullWidth:O=!1,maxTriggerWidth:P=!1}=e;if(!m)return w;let M=f&&(g||_)?{"--tooltip-line-type":g,"--tooltip-underline-color":_}:void 0,H=f?(0,s.cloneElement)(w,{...w.props,style:M?{...null==(t=w.props)?void 0:t.style,...M}:null==(u=w.props)?void 0:u.style,className:(0,o.cx)(null==(p=w.props)?void 0:p.className,c,"solid"===g&&d)}):w;return(0,r.jsx)(i.ms,{ref:l,triggerMode:"hover",fullWidth:O,maxTriggerWidth:P,placement:x,arrow:h,arrowClassName:(0,o.cx)(a,C),panelClassName:(0,o.cx)(n,S),panelStyle:I,offset:A,content:m,open:v,onOpen:b,onClose:y,onOpenChange:j,className:T,disabled:k,leaveDelay:N,children:H})})},80968:(e,l,t)=>{"use strict";t.d(l,{I:()=>a});var r=t(37876),o=t(84446),s=t(53738),i=t(39467),n=t(14232);let a=(0,n.forwardRef)((e,l)=>{let{startAdornment:t,startAdornmentPosition:a="start",endAdornmentPosition:c="end",endAdornment:d,startAdornmentClasses:u,endAdornmentClasses:p,adornmentClasses:m,withoutStartAdornment:x,withoutEndAdornment:h,startAdornmentSx:f,endAdornmentSx:_,fullWidth:g=!0,autoFocus:v,...b}=e,y=(0,n.useMemo)(()=>t&&!x?(0,r.jsx)(i.A,{classes:u,className:null==m?void 0:m.start,position:a,sx:f,children:(0,r.jsx)(o.A,{color:"var(--colors-text-secondary)",display:"flex",children:t})}):t,[u,null==m?void 0:m.start,t,a,x,f]),j=(0,n.useMemo)(()=>d&&!h?(0,r.jsx)(i.A,{classes:p,className:null==m?void 0:m.end,position:c,sx:_,children:d}):d,[p,null==m?void 0:m.end,d,c,h,_]);return(0,r.jsx)(s.A,{translate:"no",ref:l,...b,fullWidth:g,startAdornment:y,endAdornment:j,autoFocus:v})})},81947:(e,l,t)=>{"use strict";t.d(l,{OK:()=>a,ZH:()=>n});var r=t(37876),o=t(84446),s=t(14232);let i=s.createContext(""),n=i.Provider,a=(0,s.memo)(e=>{let{value:l,keepAlive:t,children:n,...a}=e,c=l!==s.useContext(i);return(0,r.jsx)(o.A,{hidden:c,...a,children:(!c||t)&&n})})},83065:e=>{e.exports={root:"root_r6bd7JzG",fullPageScroll:"full-page-scroll_tCCIEZ3E",header:"header_NQwilPMP",main:"main_b8Fg1Fpo",footer:"footer_r8hqZIFd",footerSpacer:"footer-spacer_gaHFM8HO"}},85240:e=>{e.exports={root:"root_LgtrBi0l",absolute:"absolute_ziLhfwOr",inset:"inset_HA_xsN9q",middleHorizontal:"middle-horizontal__4JDBkx_V",middleVertical:"middle-vertical_K200yYwf",vertical:"vertical_eEeTLLXR",flexItem:"flex-item_A6uczSHU",withChildren:"with-children_MSn35z0t",horizontalWithChild:"horizontal-with-child_BZ2KXQnT",verticalWithChild:"vertical-with-child__4wpKlrYH",rightWithChild:"right-with-child_d88uqO9i",leftWithChild:"left-with-child_UHSLYuSB",wrap:"wrap_q0jOsdES",wrapHorizontal:"wrap-horizontal_EXEUJBmT",wrapVertical:"wrap-vertical_XCjtauhn"}},87489:e=>{e.exports={"open-order-item":"open-order-item_fdU_m_PA"}},89201:e=>{e.exports={"spot-token":"spot-token__A4tPYjs","spot-token-box":"spot-token-box__6Fw_LnoX",total:"total_v5ifuzvV","first-line-box":"first-line-box_F1aV_8Cb","secondary-line":"secondary-line__9Xs5Ds6k","token-title":"token-title_iI8s9m2R","token-value":"token-value_RSi_S0rC"}},90008:(e,l,t)=>{"use strict";t.d(l,{K8:()=>a,WT:()=>o.q,po:()=>n});var r=t(83847),o=t(25163),s=t(45350),i=t(89099);function n(e){try{let{origin:l,pathname:t,search:r,hash:o}=new URL(e),s=t.replace(/\/+$/,"")||"/";return`${l}${s}${r}${o}`}catch(l){if("string"==typeof e){let l=e.split(/[?#]/),t=l[0].replace(/\/+$/,"")||"/",r=e.substring(l[0].length);return`${t}${r}`}return e}}function a(e){let{ignoreLocales:l}=e??{},{DOMAIN:t,CDN_HOST:a}=(0,r.II)(),{locales:c,locale:d,defaultLocale:u,asPath:p}=(0,i.useRouter)(),m=c&&l?c.filter(e=>!l.includes(e)):c,x=(0,s.Hm)(p),h=d??u??o.q,f=h===o.q?"":`/${h}`,_=n(`${t}${f}${x}`);return{DOMAIN:t,CDN_HOST:a,locales:c,locale:d,defaultLocale:u,asPath:p,omitLocales:m,pathname:x,lang:h,currentUrl:_}}},90078:e=>{e.exports={rowWrap:"row-wrap__7C1c3JUT",rowRoot:"row-root_lOdgDcjo","row-nowrap":"row-nowrap_u09hTj89","row-justify-start":"row-justify-start_OUMFNcPH","row-justify-end":"row-justify-end_Tk5E7SL8","row-justify-center":"row-justify-center_yr2XfUb7","row-justify-space-between":"row-justify-space-between_kChjTCMr","row-justify-space-around":"row-justify-space-around_dCqdHJAB","row-align-top":"row-align-top__4lqGq6xy","row-align-middle":"row-align-middle_z43hZ9QY","row-align-bottom":"row-align-bottom_xKBYDkOZ","row-align-stretch":"row-align-stretch_QIFPtQ13",colRoot:"col-root_rmbEvJJZ","col-24":"col-24__6njKCGDX","col-push-24":"col-push-24_cddIr0zc","col-pull-24":"col-pull-24_RftoogpH","col-offset-24":"col-offset-24_TpKhlQzI","col-order-24":"col-order-24_vkTSLWLp","col-23":"col-23_sOR_nf2F","col-push-23":"col-push-23__2yRT0Kts","col-pull-23":"col-pull-23_Na4VjrdO","col-offset-23":"col-offset-23_DAGbK16p","col-order-23":"col-order-23_GCTeEU_u","col-22":"col-22__3GybCVs1","col-push-22":"col-push-22_mQCZdahB","col-pull-22":"col-pull-22_oMzKPKky","col-offset-22":"col-offset-22_v_4O5Qjj","col-order-22":"col-order-22_m3RIxa7k","col-21":"col-21_WIz3gYyV","col-push-21":"col-push-21_Ypgr9op9","col-pull-21":"col-pull-21_Q70Gncxc","col-offset-21":"col-offset-21_ksyFd1SW","col-order-21":"col-order-21_cE3xxewc","col-20":"col-20_WyFiteNZ","col-push-20":"col-push-20_FqYDCnZQ","col-pull-20":"col-pull-20_m4EZMEVn","col-offset-20":"col-offset-20__2Psh3Nk0","col-order-20":"col-order-20_CUzgY0GV","col-19":"col-19_HewUU0hh","col-push-19":"col-push-19_Fl2KNjha","col-pull-19":"col-pull-19_QHfH_iEh","col-offset-19":"col-offset-19_xdOdqxiN","col-order-19":"col-order-19_XIA6rGx_","col-18":"col-18_NJ_7J4n1","col-push-18":"col-push-18_yFW2nmDm","col-pull-18":"col-pull-18_IDjp5IQN","col-offset-18":"col-offset-18_lQHx9QLd","col-order-18":"col-order-18_QR9LM0Ac","col-17":"col-17_Lyi9Qb4D","col-push-17":"col-push-17_HKRnbcD8","col-pull-17":"col-pull-17_cmEtebpu","col-offset-17":"col-offset-17_P9hjs0VR","col-order-17":"col-order-17_ghy5TV2O","col-16":"col-16_RIXo_
1yFy","col-push-16":"col-push-16_W8QNP7H0","col-pull-16":"col-pull-16_WryI_eDH","col-offset-16":"col-offset-16_C3SgAA2B","col-order-16":"col-order-16_Ms7iWilb","col-15":"col-15__9iXWGP_n","col-push-15":"col-push-15_tP2qTVxb","col-pull-15":"col-pull-15_GOThOcPF","col-offset-15":"col-offset-15_M_t0K7oL","col-order-15":"col-order-15__344O2Kly","col-14":"col-14_GuS4kyxt","col-push-14":"col-push-14_C4CfgfZJ","col-pull-14":"col-pull-14__G_pVCA5","col-offset-14":"col-offset-14_fxezbtah","col-order-14":"col-order-14_HMcGq3J_","col-13":"col-13_zE6EWxde","col-push-13":"col-push-13_upBBtrNA","col-pull-13":"col-pull-13_W11qVt0K","col-offset-13":"col-offset-13_MPQAwAIq","col-order-13":"col-order-13_nRhvlHfh","col-12":"col-12__1KRfWjId","col-push-12":"col-push-12_WUwZC0RS","col-pull-12":"col-pull-12_eyHrLWS9","col-offset-12":"col-offset-12_iFaTxt9W","col-order-12":"col-order-12__7LnR0rCW","col-11":"col-11_naDZRIFf","col-push-11":"col-push-11_fd6NK46d","col-pull-11":"col-pull-11__AMW2xaW","col-offset-11":"col-offset-11_dDFotq3g","col-order-11":"col-order-11_voqjIWZC","col-10":"col-10_jkdMshf6","col-push-10":"col-push-10_IadbL7tj","col-pull-10":"col-pull-10_xyF2ggaL","col-offset-10":"col-offset-10_CRSH4n1W","col-order-10":"col-order-10_pe5NYFd3","col-9":"col-9__5GToiaSx","col-push-9":"col-push-9_FCwBql3f","col-pull-9":"col-pull-9_l7VMI5pr","col-offset-9":"col-offset-9_omIddlQ9","col-order-9":"col-order-9__2RShR_FT","col-8":"col-8_cObBKeAJ","col-push-8":"col-push-8_MA8ml24m","col-pull-8":"col-pull-8_BywIA01_","col-offset-8":"col-offset-8_vX73z3ks","col-order-8":"col-order-8_OJ76iEp1","col-7":"col-7_K28osTLY","col-push-7":"col-push-7_LTKrlg6Y","col-pull-7":"col-pull-7_tNDf0Qq8","col-offset-7":"col-offset-7__0nX4aQx6","col-order-7":"col-order-7_QiGMiwwZ","col-6":"col-6_hv8LyZOc","col-push-6":"col-push-6_GYpvuaaY","col-pull-6":"col-pull-6_EsglpqlD","col-offset-6":"col-offset-6_xPblbFj7","col-order-6":"col-order-6_MmdVb3K2","col-5":"col-5_php5yik_","col-push-5":"col-push-5__804hRikT","col-pull-5":"col-pull-5_JxMwPKiI","col-offset-5":"col-offset-5_aw_IhNhe","col-order-5":"col-order-5_TREeWhnU","col-4":"col-4_r1No6_n4","col-push-4":"col-push-4_asZFjH9m","col-pull-4":"col-pull-4_UmADqzdp","col-offset-4":"col-offset-4_um_u2ZwX","col-order-4":"col-order-4_aOtdbsAG","col-3":"col-3_ej9cDSVQ","col-push-3":"col-push-3_KsXQ00F6","col-pull-3":"col-pull-3_tIR25a_K","col-offset-3":"col-offset-3_F5mwDrjM","col-order-3":"col-order-3_Mb3kXx6N","col-2":"col-2__3Wc_IMtV","col-push-2":"col-push-2_ixmNKHCe","col-pull-2":"col-pull-2_NgjCie1h","col-offset-2":"col-offset-2_vGucaYNb","col-order-2":"col-order-2_xuIhl4er","col-1":"col-1_csx73d9A","col-push-1":"col-push-1_HxP5Rqiy","col-pull-1":"col-pull-1_bNWRArqh","col-offset-1":"col-offset-1_GCOe3Crb","col-order-1":"col-order-1__J18yJvh","col-0":"col-0_lvJQgZCG","col-push-0":"col-push-0_Mcv6JTbm","col-pull-0":"col-pull-0_OZp2Ayrj","col-offset-0":"col-offset-0__6CAVdIsI","col-order-0":"col-order-0__EvsSpCb","col-auto":"col-auto_y_3ZB4oJ","col-true":"col-true_sEAFlS8M","col-xs-24":"col-xs-24_UDwh_07o","col-xs-push-24":"col-xs-push-24_zTdENdqS","col-xs-pull-24":"col-xs-pull-24_KWR8ph_u","col-xs-offset-24":"col-xs-offset-24__61fVtkPd","col-xs-order-24":"col-xs-order-24_vlovfBve","col-xs-23":"col-xs-23_oy9_n14C","col-xs-push-23":"col-xs-push-23__6e_qIxe5","col-xs-pull-23":"col-xs-pull-23_jKmiA1tv","col-xs-offset-23":"col-xs-offset-23__2aU_rUng","col-xs-order-23":"col-xs-order-23_XULP4bgF","col-xs-22":"col-xs-22_PBzwl8pv","col-xs-push-22":"col-xs-push-22_f4R9CsK_","col-xs-pull-22":"col-xs-pull-22_rfjXqG1F","col-xs-offset-22":"col-xs-offset-22_Suoi19tU","col-xs-order-22":"col-xs-order-22_Rql0k9VC","col-xs-21":"col-xs-21_JYnAruED","col-xs-push-21":"col-xs-push-21_PtyxY_jb","col-xs-pull-21":"col-xs-pull-21_z9tVZYaE","col-xs-offset-21":"col-xs-offset-21_xP6fBZBl","col-xs-order-21":"col-xs-order-21_mtDHnKNR","col-xs-20":"col-xs-20__6QTH1Hr5","col-xs-push-20":"col-xs-push-20_GQGVsxT7","col-xs-pull-20":"col-xs-pull-20_XguGKu7z","col-xs-offset-20":"col-xs-offset-20_zzP4LWQf","col-xs-order-20":"col-xs-order-20__0HelFtry","col-xs-19":"col-xs-19__10U8tSoP","col-xs-push-19":"col-xs-push-19_MMInkxQf","col-xs-pull-19":"col-xs-pull-19_E_erugh2","col-xs-offset-19":"col-xs-offset-19__0p3h4_CO","col-xs-order-19":"col-xs-order-19_WeE0XtRH","col-xs-18":"col-xs-18_h18ZHOJE","col-xs-push-18":"col-xs-push-18_XDZbPCDo","col-xs-pull-18":"col-xs-pull-18__50wh2lN_","col-xs-offset-18":"col-xs-offset-18_kSM2_bL0","col-xs-order-18":"col-xs-order-18___furfgU","col-xs-17":"col-xs-17_TSwuHzmk","col-xs-push-17":"col-xs-push-17__3NJlksRL","col-xs-pull-17":"col-xs-pull-17_lp99Rniu","col-xs-offset-17":"col-xs-offset-17_KcGcgs5p","col-xs-order-17":"col-xs-order-17_sfpHmk31","col-xs-16":"col-xs-16_EVAesj1L","col-xs-push-16":"col-xs-push-16_v_29P65s","col-xs-pull-16":"col-xs-pull-16_EV4z4zYt","col-xs-offset-16":"col-xs-offset-16_HtHbyag5","col-xs-order-16":"col-xs-order-16_x3ttHbeu","col-xs-15":"col-xs-15_a_NT0_DU","col-xs-push-15":"col-xs-push-15_BPCNoIld","col-xs-pull-15":"col-xs-pull-15_R6YH2_gq","col-xs-offset-15":"col-xs-offset-15_QKTnInrJ","col-xs-order-15":"col-xs-order-15_U881xGW1","col-xs-14":"col-xs-14__7_KHm761","col-xs-push-14":"col-xs-push-14_gAAKC_R0","col-xs-pull-14":"col-xs-pull-14_fFoMvTfN","col-xs-offset-14":"col-xs-offset-14_
1C8t4Af4S","col-xs-order-14":"col-xs-order-14_owID5hll","col-xs-13":"col-xs-13_izfCUSoq","col-xs-push-13":"col-xs-push-13_ZkuWQUmp","col-xs-pull-13":"col-xs-pull-13__8hbh5xe6","col-xs-offset-13":"col-xs-offset-13_sYJ2jEUP","col-xs-order-13":"col-xs-order-13_ND_PeqJz","col-xs-12":"col-xs-12_naNX88sY","col-xs-push-12":"col-xs-push-12_k6xVjBMT","col-xs-pull-12":"col-xs-pull-12__1pGbgd9h","col-xs-offset-12":"col-xs-offset-12_o1m4Lyvj","col-xs-order-12":"col-xs-order-12_T7x5Ki7E","col-xs-11":"col-xs-11_huWx43Gl","col-xs-push-11":"col-xs-push-11_aE1QNQ4s","col-xs-pull-11":"col-xs-pull-11__1OLa1qW1","col-xs-offset-11":"col-xs-offset-11_GASpkG9I","col-xs-order-11":"col-xs-order-11_L7BclwKA","col-xs-10":"col-xs-10_b5ESmFB9","col-xs-push-10":"col-xs-push-10_l8aifY9E","col-xs-pull-10":"col-xs-pull-10__7z7_3wFD","col-xs-offset-10":"col-xs-offset-10_Q9jAxwF8","col-xs-order-10":"col-xs-order-10_Ry6bxXOU","col-xs-9":"col-xs-9_WTmPNdlI","col-xs-push-9":"col-xs-push-9_LqX18Owc","col-xs-pull-9":"col-xs-pull-9_CYV4U7qw","col-xs-offset-9":"col-xs-offset-9_jdsRm7qV","col-xs-order-9":"col-xs-order-9__1A2GLJyR","col-xs-8":"col-xs-8__K_mJJam","col-xs-push-8":"col-xs-push-8__P4xNo03","col-xs-pull-8":"col-xs-pull-8_yrCnC6yb","col-xs-offset-8":"col-xs-offset-8_Xm6n7UNL","col-xs-order-8":"col-xs-order-8_yJ6nHVMz","col-xs-7":"col-xs-7_DjD0cchs","col-xs-push-7":"col-xs-push-7_dnOo76rt","col-xs-pull-7":"col-xs-pull-7_AQWyjPLl","col-xs-offset-7":"col-xs-offset-7_AAKP7cDH","col-xs-order-7":"col-xs-order-7_A2A7MmWY","col-xs-6":"col-xs-6_eEolujdo","col-xs-push-6":"col-xs-push-6_ylaH14y2","col-xs-pull-6":"col-xs-pull-6_ZbWbER6U","col-xs-offset-6":"col-xs-offset-6_qqn2gLkT","col-xs-order-6":"col-xs-order-6__76Amu4HI","col-xs-5":"col-xs-5_Xe5_aVj3","col-xs-push-5":"col-xs-push-5_iXYBQK3L","col-xs-pull-5":"col-xs-pull-5_A1ScJPze","col-xs-offset-5":"col-xs-offset-5_YJCzS7EU","col-xs-order-5":"col-xs-order-5_EWgtfCjd","col-xs-4":"col-xs-4__7Io48roH","col-xs-push-4":"col-xs-push-4_sCasI8Bc","col-xs-pull-4":"col-xs-pull-4_Q_O4bT9v","col-xs-offset-4":"col-xs-offset-4_YxjjCA1a","col-xs-order-4":"col-xs-order-4_JobDTtDX","col-xs-3":"col-xs-3_hWYl8p6L","col-xs-push-3":"col-xs-push-3__0NjfK0ZO","col-xs-pull-3":"col-xs-pull-3__dgq9tTf","col-xs-offset-3":"col-xs-offset-3__5nRK_lMi","col-xs-order-3":"col-xs-order-3__3XDM1o7","col-xs-2":"col-xs-2_fkG17G6p","col-xs-push-2":"col-xs-push-2_TD_OqHP7","col-xs-pull-2":"col-xs-pull-2_WlxFE9J_","col-xs-offset-2":"col-xs-offset-2_yWLCcdi3","col-xs-order-2":"col-xs-order-2_fS4fE670","col-xs-1":"col-xs-1_bo99IaBv","col-xs-push-1":"col-xs-push-1_UcPi44bs","col-xs-pull-1":"col-xs-pull-1_NHRHCse7","col-xs-offset-1":"col-xs-offset-1_WK37UBoF","col-xs-order-1":"col-xs-order-1_S_JcOmKq","col-xs-0":"col-xs-0_cMsNhz8_","col-xs-push-0":"col-xs-push-0_V_Wh0ofA","col-xs-pull-0":"col-xs-pull-0_rBITqB73","col-xs-offset-0":"col-xs-offset-0_Z_MslNBp","col-xs-order-0":"col-xs-order-0_cBRnzvl5","col-xs-auto":"col-xs-auto_ieMAScYb","col-xs-true":"col-xs-true_SOOcYHON","col-sm-24":"col-sm-24_L5XzskbS","col-sm-push-24":"col-sm-push-24_rHEN0rat","col-sm-pull-24":"col-sm-pull-24_gLm0LYri","col-sm-offset-24":"col-sm-offset-24_PE30FTG3","col-sm-order-24":"col-sm-order-24_dvt9hUky","col-sm-23":"col-sm-23_hx7TeIt_","col-sm-push-23":"col-sm-push-23_N4_zkcdw","col-sm-pull-23":"col-sm-pull-23_qKJFm8F8","col-sm-offset-23":"col-sm-offset-23_Ftyd2X8D","col-sm-order-23":"col-sm-order-23__1VZ0Fxk7","col-sm-22":"col-sm-22_ZG2Byip4","col-sm-push-22":"col-sm-push-22_Zh_29IW6","col-sm-pull-22":"col-sm-pull-22_OvOCx_Np","col-sm-offset-22":"col-sm-offset-22_ReGgw0ei","col-sm-order-22":"col-sm-order-22_F83HgtO5","col-sm-21":"col-sm-21_Da5VpgND","col-sm-push-21":"col-sm-push-21_NXwTlgm0","col-sm-pull-21":"col-sm-pull-21_ueS6rBuX","col-sm-offset-21":"col-sm-offset-21__1K1wuYsw","col-sm-order-21":"col-sm-order-21_ymZU0R_F","col-sm-20":"col-sm-20_ANfmI3nI","col-sm-push-20":"col-sm-push-20__7A3DkCtV","col-sm-pull-20":"col-sm-pull-20_Vg9L3kQc","col-sm-offset-20":"col-sm-offset-20_IatFdsOc","col-sm-order-20":"col-sm-order-20_ZR8kUHbM","col-sm-19":"col-sm-19_l4_NGB7R","col-sm-push-19":"col-sm-push-19__0n6gg2C2","col-sm-pull-19":"col-sm-pull-19__43_DY8S5","col-sm-offset-19":"col-sm-offset-19_Z58yUeLH","col-sm-order-19":"col-sm-order-19__0l2lR_zu","col-sm-18":"col-sm-18_KM4xWOHw","col-sm-push-18":"col-sm-push-18_UsUOm_mk","col-sm-pull-18":"col-sm-pull-18_TQKJCSil","col-sm-offset-18":"col-sm-offset-18_OjVBvlXp","col-sm-order-18":"col-sm-order-18_Y6SAgkQR","col-sm-17":"col-sm-17_FUKj5yjm","col-sm-push-17":"col-sm-push-17__4eTJzYOf","col-sm-pull-17":"col-sm-pull-17_YV6Ao55u","col-sm-offset-17":"col-sm-offset-17_gibS9KpP","col-sm-order-17":"col-sm-order-17_HL706gHs","col-sm-16":"col-sm-16_uFqAPawg","col-sm-push-16":"col-sm-push-16_D5hj5T34","col-sm-pull-16":"col-sm-pull-16_Aprn_YE1","col-sm-offset-16":"col-sm-offset-16__6SPwDsRX","col-sm-order-16":"col-sm-order-16__2lAho3bA","col-sm-15":"col-sm-15_L6k0rGrw","col-sm-push-15":"col-sm-push-15_Rr8Rt1Qf","col-sm-pull-15":"col-sm-pull-15_YTOglFOg","col-sm-offset-15":"col-sm-offset-15__2tu8wsNv","col-sm-order-15":"col-sm-order-15_FdPbjCrL","col-sm-14":"col-sm-14_S4JRrujr","col-sm-push-14":"col-sm-push-14_MU9_pGZQ","col-sm-pull-14":"col-sm-pull-14__479N9JHQ","col-sm-offset-14":"col-sm-offset-14_qxs0moug","col-sm-order-14":"col-sm-order-14__3XEFaIxq","col-sm-13":"col-sm-13_HGBsW_MQ","col-sm-push-13":"col-sm-push-13_i1GXcCCx","col-sm-pull-13":"col-sm-pull-13_UFfc7wYc","col-sm-offset-13":"col-sm-offset-13_ECC_s3Xb","col-sm-order-13":"col-sm-order-13_x9ztg6xS","col-sm-12":"col-sm-12__6AZGAJcT","col-sm-push-12":"col-sm-push-12_AwJbDnjK","col-sm-pull-12":"col-sm-pull-12_cH3AVxVL","col-sm-offset-12":"col-sm-offset-12_mTha07po","col-sm-order-12":"col-sm-order-12_NY1IK2tD","col-sm-11":"col-sm-11__lzC4jgq","col-sm-push-11":"col-sm-push-11__1Qrm3pdG","col-sm-pull-11":"col-sm-pull-11_rKF1W6TX","col-sm-offset-11":"col-sm-offset-11__3NaNA1rF","col-sm-order-11":"col-sm-order-11_xISOGmPi","col-sm-10":"col-sm-10__5ljJclVA","col-sm-push-10":"col-sm-push-10_TXM4LUFt","col-sm-pull-10":"col-sm-pull-10_JsjgT_Pu","col-sm-offset-10":"col-sm-offset-10_dT2Uhs_O","col-sm-order-10":"col-sm-order-10_MJeRxHWf","col-sm-9":"col-sm-9_qvNOG084","col-sm-push-9":"col-sm-push-9__6rMtNYD9","col-sm-pull-9":"col-sm-pull-9_bcHGqToy","col-sm-offset-9":"col-sm-offset-9_DKj3yv3B","col-sm-order-9":"col-sm-order-9__39uE19k7","col-sm-8":"col-sm-8_iPSD2G4m","col-sm-push-8":"col-sm-push-8_qHkCG42c","col-sm-pull-8":"col-sm-pull-8__8mW2KtFv","col-sm-offset-8":"col-sm-offset-8_Mn0kzoDM","col-sm-order-8":"col-sm-order-8_vy_FZ8ti","col-sm-7":"
1col-sm-7_Kv1Lb9mz","col-sm-push-7":"col-sm-push-7_lDfJNGpu","col-sm-pull-7":"col-sm-pull-7_fkliYjCz","col-sm-offset-7":"col-sm-offset-7_HKD40jde","col-sm-order-7":"col-sm-order-7__7aPzf_ON","col-sm-6":"col-sm-6_PRCMYB6A","col-sm-push-6":"col-sm-push-6__0jvBEMK_","col-sm-pull-6":"col-sm-pull-6_qL_fcM8U","col-sm-offset-6":"col-sm-offset-6_qPBsB6uR","col-sm-order-6":"col-sm-order-6_yrbsXwjl","col-sm-5":"col-sm-5_jdS5_hz1","col-sm-push-5":"col-sm-push-5_L7BIt4ib","col-sm-pull-5":"col-sm-pull-5_YkEaNCMM","col-sm-offset-5":"col-sm-offset-5_DWw0pGN0","col-sm-order-5":"col-sm-order-5_x81FKZYT","col-sm-4":"col-sm-4_pSp2w_8R","col-sm-push-4":"col-sm-push-4__15yrmrM_","col-sm-pull-4":"col-sm-pull-4_yLK0j5uc","col-sm-offset-4":"col-sm-offset-4__7Y5xJDE8","col-sm-order-4":"col-sm-order-4__6ESa22NC","col-sm-3":"col-sm-3_ni0SSlBY","col-sm-push-3":"col-sm-push-3_trOO9hcu","col-sm-pull-3":"col-sm-pull-3_CK8EmA9H","col-sm-offset-3":"col-sm-offset-3_IygLFVFN","col-sm-order-3":"col-sm-order-3_ij0bCdrH","col-sm-2":"col-sm-2_z8xLgnCN","col-sm-push-2":"col-sm-push-2_PaqD946z","col-sm-pull-2":"col-sm-pull-2_Um0O_Gwf","col-sm-offset-2":"col-sm-offset-2_xFMc8GBs","col-sm-order-2":"col-sm-order-2_a1HkC8t8","col-sm-1":"col-sm-1_j8uBL_ZQ","col-sm-push-1":"col-sm-push-1_NMR8bopx","col-sm-pull-1":"col-sm-pull-1_nRRUXEtZ","col-sm-offset-1":"col-sm-offset-1__81UY79GD","col-sm-order-1":"col-sm-order-1_VxcP_acz","col-sm-0":"col-sm-0_xZHk9tMg","col-sm-push-0":"col-sm-push-0_g75dumXE","col-sm-pull-0":"col-sm-pull-0_Z79Oi3D1","col-sm-offset-0":"col-sm-offset-0__5xaRf5f_","col-sm-order-0":"col-sm-order-0_C9_t51Ut","col-sm-auto":"col-sm-auto_u5BQZbSr","col-sm-true":"col-sm-true__UIF9ooY","col-md-24":"col-md-24_UzMe1euZ","col-md-push-24":"col-md-push-24_kvMb27Vt","col-md-pull-24":"col-md-pull-24_FRlFNX7V","col-md-offset-24":"col-md-offset-24__9slk2_fJ","col-md-order-24":"col-md-order-24__5ebTqT05","col-md-23":"col-md-23__6QtczlBX","col-md-push-23":"col-md-push-23_uv9sMxeF","col-md-pull-23":"col-md-pull-23_A0Ph_g2n","col-md-offset-23":"col-md-offset-23_rhR9ixvQ","col-md-order-23":"col-md-order-23_MtCoPsJW","col-md-22":"col-md-22_SgvNQYmI","col-md-push-22":"col-md-push-22_o6CaZBfr","col-md-pull-22":"col-md-pull-22__mVOvifv","col-md-offset-22":"col-md-offset-22_zYNF_FGy","col-md-order-22":"col-md-order-22_VQYhfQ8G","col-md-21":"col-md-21_OQOVuRG_","col-md-push-21":"col-md-push-21__0AgLQLii","col-md-pull-21":"col-md-pull-21_FLBdddqY","col-md-offset-21":"col-md-offset-21_nm7GJ_bE","col-md-order-21":"col-md-order-21_K0UUw1IN","col-md-20":"col-md-20_YrOrdRMA","col-md-push-20":"col-md-push-20_JAucAvC2","col-md-pull-20":"col-md-pull-20_opfE_l7G","col-md-offset-20":"col-md-offset-20_euMPZHEV","col-md-order-20":"col-md-order-20_tT8T2mRa","col-md-19":"col-md-19_vmyMhgCu","col-md-push-19":"col-md-push-19_uiW17TIV","col-md-pull-19":"col-md-pull-19__6c3JRz2Y","col-md-offset-19":"col-md-offset-19__4_9CAHi","col-md-order-19":"col-md-order-19__faoOWIF","col-md-18":"col-md-18_Kec4dDo_","col-md-push-18":"col-md-push-18_FNXJYdtc","col-md-pull-18":"col-md-pull-18_iEgmH5nS","col-md-offset-18":"col-md-offset-18_rdtWlFFG","col-md-order-18":"col-md-order-18_MbqjcFKZ","col-md-17":"col-md-17_FfOowalK","col-md-push-17":"col-md-push-17__iBe80ry","col-md-pull-17":"col-md-pull-17__1iQgXOCm","col-md-offset-17":"col-md-offset-17_hO1txw9F","col-md-order-17":"col-md-order-17_zSBtAm_G","col-md-16":"col-md-16__60IpchcK","col-md-push-16":"col-md-push-16_Wlrub3AD","col-md-pull-16":"col-md-pull-16_mb6w4gkt","col-md-offset-16":"col-md-offset-16_aiZAt7Hj","col-md-order-16":"col-md-order-16_XIgMCkSP","col-md-15":"col-md-15_cHlHe7Pd","col-md-push-15":"col-md-push-15_FrVgoVxf","col-md-pull-15":"col-md-pull-15_urKVz8RR","col-md-offset-15":"col-md-offset-15_RWg2FSPA","col-md-order-15":"col-md-order-15__iKDrn5S","col-md-14":"col-md-14_r8M2zYaF","col-md-push-14":"col-md-push-14_pUEyEUQR","col-md-pull-14":"col-md-pull-14_d8yIfuFW","col-md-offset-14":"col-md-offset-14_CdAWtNJh","col-md-order-14":"col-md-order-14_fR81joU4","col-md-13":"col-md-13_hRmketdo","col-md-push-13":"col-md-push-13__3Pd4SuDI","col-md-pull-13":"col-md-pull-13_mgmavv0T","col-md-offset-13":"col-md-offset-13_gGT2VTHX","col-md-order-13":"col-md-order-13__2w99eElz","col-md-12":"col-md-12_dm3P9VbP","col-md-push-12":"col-md-push-12__8py4X_Sa","col-md-pull-12":"col-md-pull-12_yXD_wlnB","col-md-offset-12":"col-md-offset-12__6kw_eCJE","col-md-order-12":"col-md-order-12_GLuKCnj2","col-md-11":"col-md-11__0fU9xGfQ","col-md-push-11":"col-md-push-11__I9NkBgq","col-md-pull-11":"col-md-pull-11_pJ5hODLg","col-md-offset-11":"col-md-offset-11_nSy_
1LGez","col-md-order-11":"col-md-order-11__4RVbts0Z","col-md-10":"col-md-10_zNn_Vywj","col-md-push-10":"col-md-push-10__0JBQ_uad","col-md-pull-10":"col-md-pull-10_NjeeXXXD","col-md-offset-10":"col-md-offset-10_lCbDerWD","col-md-order-10":"col-md-order-10_oV5oxm17","col-md-9":"col-md-9_l3oGlsMi","col-md-push-9":"col-md-push-9_V694M_oP","col-md-pull-9":"col-md-pull-9__3sPnEx_8","col-md-offset-9":"col-md-offset-9_OOTIWrvQ","col-md-order-9":"col-md-order-9_brGG6_gL","col-md-8":"col-md-8_YeFIHACa","col-md-push-8":"col-md-push-8_J5jjcToM","col-md-pull-8":"col-md-pull-8_n4e49BLV","col-md-offset-8":"col-md-offset-8_Z4sZKyN2","col-md-order-8":"col-md-order-8_OFcBzVNe","col-md-7":"col-md-7_tRUABzCT","col-md-push-7":"col-md-push-7__1VC2dfOq","col-md-pull-7":"col-md-pull-7_TCxwl2YV","col-md-offset-7":"col-md-offset-7_dcEjYtvb","col-md-order-7":"col-md-order-7_uHz2_pZx","col-md-6":"col-md-6_s5FI9uu3","col-md-push-6":"col-md-push-6_YioHZv18","col-md-pull-6":"col-md-pull-6_wSjC9hpB","col-md-offset-6":"col-md-offset-6__69INIDp6","col-md-order-6":"col-md-order-6_bTFPKWog","col-md-5":"col-md-5_GYLGcbqq","col-md-push-5":"col-md-push-5_sCURYjP4","col-md-pull-5":"col-md-pull-5_LdOYNvse","col-md-offset-5":"col-md-offset-5_abjYnMRL","col-md-order-5":"col-md-order-5_aKsLu5sW","col-md-4":"col-md-4_wpksEV5I","col-md-push-4":"col-md-push-4_DFNbi_m9","col-md-pull-4":"col-md-pull-4_shMRtgPM","col-md-offset-4":"col-md-offset-4_xCX2AMxx","col-md-order-4":"col-md-order-4_EchUIowC","col-md-3":"col-md-3__9nO1HpDC","col-md-push-3":"col-md-push-3_wedZOq02","col-md-pull-3":"col-md-pull-3_we0sQ336","col-md-offset-3":"col-md-offset-3__7tH4HFuR","col-md-order-3":"col-md-order-3_LoPzyHCC","col-md-2":"col-md-2_klHd9qF7","col-md-push-2":"col-md-push-2_trYZALIz","col-md-pull-2":"col-md-pull-2_TQ9y33Sw","col-md-offset-2":"col-md-offset-2_CCFwq0pe","col-md-order-2":"col-md-order-2_ZKgqeuo6","col-md-1":"col-md-1_g7vVp9cQ","col-md-push-1":"col-md-push-1_Q8tkm4K1","col-md-pull-1":"col-md-pull-1_C08xdHA8","col-md-offset-1":"col-md-offset-1_v_dgDOp6","col-md-order-1":"col-md-order-1_vQSC1_NV","col-md-0":"col-md-0_vbKU8_5j","col-md-push-0":"col-md-push-0_sMoyfn4U","col-md-pull-0":"col-md-pull-0_qLIaGhAG","col-md-offset-0":"col-md-offset-0_zfw0qcHn","col-md-order-0":"col-md-order-0_l_fcDcgn","col-md-auto":"col-md-auto_mLOZI07D","col-md-true":"col-md-true_HE7ZXWpQ","col-lg-24":"col-lg-24_zMJcDsRx","col-lg-push-24":"col-lg-push-24_eepxt6wT","col-lg-pull-24":"col-lg-pull-24_KJF3A_CI","col-lg-offset-24":"col-lg-offset-24_SzXfw_xj","col-lg-order-24":"col-lg-order-24_D_bLQCXo","col-lg-23":"col-lg-23__7pMkOkkQ","col-lg-push-23":"col-lg-push-23__IXqP0YZ","col-lg-pull-23":"col-lg-pull-23__89nbJOkH","col-lg-offset-23":"col-lg-offset-23_FA6LaB3w","col-lg-order-23":"col-lg-order-23_cDV4SNXq","col-lg-22":"col-lg-22_BurCE09e","col-lg-push-22":"col-lg-push-22_oh_Js3jv","col-lg-pull-22":"col-lg-pull-22_yLkNA__g","col-lg-offset-22":"col-lg-offset-22_i5n3A1cu","col-lg-order-22":"col-lg-order-22_lZAo6vja","col-lg-21":"col-lg-21_VXBMwDpF","col-lg-push-21":"col-lg-push-21_Ei3RIV49","col-lg-pull-21":"col-lg-pull-21_WENzzler","col-lg-offset-21":"col-lg-offset-21_b0Z84jEJ","col-lg-order-21":"col-lg-order-21_ilBPaGzT","col-lg-20":"col-lg-20_zIMguxbq","col-lg-push-20":"col-lg-push-20__48ybSJ7X","col-lg-pull-20":"col-lg-pull-20__5S5hJ5iW","col-lg-offset-20":"col-lg-offset-20__0vFlbm_w","col-lg-order-20":"col-lg-order-20_NzSbWp9p","col-lg-19":"col-lg-19__9QDG4GZq","col-lg-push-19":"col-lg-push-19_ZrlmTXVs","col-lg-pull-19":"col-lg-pull-19_RXwFD8Vc","col-lg-offset-19":"col-lg-offset-19_CeXSS5k3","col-lg-order-19":"col-lg-order-19__11bRa9kr","col-lg-18":"col-lg-18__2w_sVk0v","col-lg-push-18":"col-lg-push-18__4XwIUxEm","col-lg-pull-18":"col-lg-pull-18_yfOsZS01","col-lg-offset-18":"col-lg-offset-18_YRK2isvy","col-lg-order-18":"col-lg-order-18_ZE56YZ_s","col-lg-17":"col-lg-17_lIO_MbND","col-lg-push-17":"col-lg-push-17_qFi0A_oq","col-lg-pull-17":"col-lg-pull-17_xsl_Bo64","col-lg-offset-17":"col-lg-offset-17_ouFzhrvy","col-lg-order-17":"col-lg-order-17_GVZA2c6k","col-lg-16":"col-lg-16__76zOnYMb","col-lg-push-16":"col-lg-push-16_ClBS7eo2","col-lg-pull-16":"col-lg-pull-16_sT_nbmk4","col-lg-offset-16":"col-lg-offset-16_cP2oeQzs","col-lg-order-16":"col-lg-order-16_hduCepwT","col-lg-15":"col-lg-15_c3Jq8NFJ","col-lg-push-15":"col-lg-push-15_j0t5XR
1DJ","col-lg-pull-15":"col-lg-pull-15_kWPj0FSj","col-lg-offset-15":"col-lg-offset-15_pJhU6HWz","col-lg-order-15":"col-lg-order-15_pV7wbiKT","col-lg-14":"col-lg-14_AHCrHqqH","col-lg-push-14":"col-lg-push-14_MUaPPKPa","col-lg-pull-14":"col-lg-pull-14_L2o1LZcE","col-lg-offset-14":"col-lg-offset-14_d82HrtpT","col-lg-order-14":"col-lg-order-14_QBqf_oBs","col-lg-13":"col-lg-13_MJJooIM3","col-lg-push-13":"col-lg-push-13_MrsCVrXa","col-lg-pull-13":"col-lg-pull-13__2JNFAwGY","col-lg-offset-13":"col-lg-offset-13_iWgVSC35","col-lg-order-13":"col-lg-order-13_Ftb1ULFn","col-lg-12":"col-lg-12_GXQtE_kA","col-lg-push-12":"col-lg-push-12__0aWUUPjj","col-lg-pull-12":"col-lg-pull-12_RCecjXCH","col-lg-offset-12":"col-lg-offset-12_er8LiBon","col-lg-order-12":"col-lg-order-12_SYrlFj2s","col-lg-11":"col-lg-11_rXJAKxmZ","col-lg-push-11":"col-lg-push-11_ncApNavr","col-lg-pull-11":"col-lg-pull-11__00vMTXSp","col-lg-offset-11":"col-lg-offset-11_irTHYrdL","col-lg-order-11":"col-lg-order-11_YubjkXyG","col-lg-10":"col-lg-10_p2PH5_2V","col-lg-push-10":"col-lg-push-10_lM3kCUvk","col-lg-pull-10":"col-lg-pull-10_EjRKJ1Iu","col-lg-offset-10":"col-lg-offset-10_TXp5wFLL","col-lg-order-10":"col-lg-order-10_kNW5rsYe","col-lg-9":"col-lg-9__1kjZPs9D","col-lg-push-9":"col-lg-push-9_d0P_w1Ln","col-lg-pull-9":"col-lg-pull-9_YtkdOoBr","col-lg-offset-9":"col-lg-offset-9_iY31gwnD","col-lg-order-9":"col-lg-order-9_D9aq_ar4","col-lg-8":"col-lg-8_fs6h0qXi","col-lg-push-8":"col-lg-push-8_esFN_Gry","col-lg-pull-8":"col-lg-pull-8_S1nmGAeE","col-lg-offset-8":"col-lg-offset-8_rfRhxrYL","col-lg-order-8":"col-lg-order-8_sI14osVL","col-lg-7":"col-lg-7_SqfzCX3D","col-lg-push-7":"col-lg-push-7_oTbtlvFW","col-lg-pull-7":"col-lg-pull-7_FhfrqwYv","col-lg-offset-7":"col-lg-offset-7_mwlACyOs","col-lg-order-7":"col-lg-order-7_qwdZH4DQ","col-lg-6":"col-lg-6__42ERisCl","col-lg-push-6":"col-lg-push-6_tIH_sN_E","col-lg-pull-6":"col-lg-pull-6_Y9ZbRPfC","col-lg-offset-6":"col-lg-offset-6_ZKiGFpTh","col-lg-order-6":"col-lg-order-6_qSG8zgfO","col-lg-5":"col-lg-5_ncfiukw7","col-lg-push-5":"col-lg-push-5_m2YsbjHs","col-lg-pull-5":"col-lg-pull-5_PDg5MX06","col-lg-offset-5":"col-lg-offset-5__3hnbKfbK","col-lg-order-5":"col-lg-order-5_rXfQF9ff","col-lg-4":"col-lg-4_exz_Faft","col-lg-push-4":"col-lg-push-4__8McAeiud","col-lg-pull-4":"col-lg-pull-4_IVMpbx9v","col-lg-offset-4":"col-lg-offset-4_DygfX5MY","col-lg-order-4":"col-lg-order-4_PDJc2Kla","col-lg-3":"col-lg-3_LCnDp_Uz","col-lg-push-3":"col-lg-push-3__13fOOVsV","col-lg-pull-3":"col-lg-pull-3_i81KGfO7","col-lg-offset-3":"col-lg-offset-3_bWwcRakX","col-lg-order-3":"col-lg-order-3_s5Ngf_YV","col-lg-2":"col-lg-2__78Lh4xEw","col-lg-push-2":"col-lg-push-2_HJ8FU5ht","col-lg-pull-2":"col-lg-pull-2_j1U7c8I0","col-lg-offset-2":"col-lg-offset-2__8d1_4wAs","col-lg-order-2":"col-lg-order-2__46oX_uGx","col-lg-1":"col-lg-1__wrhEl9U","col-lg-push-1":"col-lg-push-1__1f7s4NmO","col-lg-pull-1":"col-lg-pull-1_pI2_Y1Hr","col-lg-offset-1":"col-lg-offset-1_MEhibj6u","col-lg-order-1":"col-lg-order-1__04LF7_st","col-lg-0":"col-lg-0_OvtCiuzU","col-lg-push-0":"col-lg-push-0_gTOI1qIZ","col-lg-pull-0":"col-lg-pull-0_tPYHAEgP","col-lg-offset-0":"col-lg-offset-0_aXCmJKCT","col-lg-order-0":"col-lg-order-0_rw6X5LEb","col-lg-auto":"col-lg-auto__0_BTqldW","col-lg-true":"col-lg-true_qon6dmHa","col-xl-24":"col-xl-24_pvBWuZ3L","col-xl-push-24":"col-xl-push-24__23J1yxLE","col-xl-pull-24":"col-xl-pull-24_GP2_scXT","col-xl-offset-24":"col-xl-offset-24_vPjsnGeo","col-xl-order-24":"col-xl-order-24__570vueej","col-xl-23":"col-xl-23_h2NOOl5_","col-xl-push-23":"col-xl-push-23_OQNbPlJZ","col-xl-pull-23":"col-xl-pull-23_fT_LvgB7","col-xl-offset-23":"col-xl-offset-23__79D00CKo","col-xl-order-23":"col-xl-order-23_OMrz4kbo","col-xl-22":"col-xl-22_Pe6MITVC","col-xl-push-22":"col-xl-push-22_qlh7vD9Y","col-xl-pull-22":"col-xl-pull-22_qaPUDaSt","col-xl-offset-22":"col-xl-offset-22_mGF39BGu","col-xl-order-22":"col-xl-order-22_Y3v6nwn3","col-xl-21":"col-xl-21_l4LmbWpS","col-xl-push-21":"col-xl-push-21__91jsFdqJ","col-xl-pull-21":"col-xl-pull-21_yu2gQ2HM","col-xl-offset-21":"col-xl-offset-21_sxoQp7IR","col-xl-order-21":"col-xl-order-21_DJoomwQ_","col-xl-20":"col-xl-20_sLoRj7ky","col-xl-push-20":"col-xl-push-20_gwXgsg51","col-xl-pull-20":"col-xl-pull-20_knC5qzB9","col-xl-offset-20":"col-xl-offset-20__7tsHGIgW","col-xl-order-20":"col-xl-order-20__98nABcLP","col-xl-19":"col-xl-19__4GDvcyZe","col-xl-push-19":"col-xl-push-19_YShIIHqc","col-xl-pull-19":"col-xl-pull-19_uyLXEqu_","col-xl-offset-19":"col-xl-offset-19__2y0TRFyw","col-xl-order-19":"col-xl-order-19_jFF2QQ5_","col-xl-18":"col-xl-18_S5iRnHro","col-xl-push-18":"col-xl-push-18_Lbg008S8","col-xl-pull-18":"col-xl-pull-18_TEfWIbLm","col-xl-offset-18":"col-xl-offset-18__1N8JVoG_","col-xl-order-18":"col-xl-order-18_tGiCVBbK","col-xl-17":"col-xl-17_MDRXJEjG","col-xl-push-17":"col-xl-push-17_WGtpR1v9","col-xl-pull-17":"col-xl-pull-17_CM1S7czt","col-xl-offset-17":"col-xl-offset-17_u_mKlFyL","col-xl-order-17":"col-xl-order-17_jn_FxIZo","col-xl-16":"col-xl-16_rXd1g7uL","col-xl-push-16":"col-xl-push-16_fnEtAfl2","col-xl-pull-16":"col-xl-pull-16_UOuXDDCw","col-xl-offset-16":"col-xl-offset-16_uqke2ia6","col-xl-order-16":"col-xl-order-16_KDTaKAsG","col-xl-15":"col-xl-15_EzqbYOcx","col-xl-push-15":"col-xl-push-15_QZYRhxUD","col-xl-pull-15":"col-xl-pull-15_xoTNDX_J","col-xl-offset-15":"col-xl-offset-15_R56lzj_G","col-xl-order-15":"col-xl-order-15_N_Swo2id","col-xl-14":"col-xl-14_JnaDYMSu","col-xl-push-14":"col-xl-push-14_zNAOQyXJ","col-xl-pull-14":"col-xl-pull-14__8sszz63s","col-xl-offset-14":"col-xl-offset-14_foUdW49b","col-xl-order-14":"col-xl-order-14__4vk9dSLw","col-xl-13":"col-xl-13_ndwHl5iL","col-xl-push-13":"col-xl-push-13__8_MaXlLF","col-xl-pull-13":"col-xl-pull-13__7H_a81S6","col-xl-offset-13":"col-xl-offset-13__3LTN9QkT","col-xl-order-13":"col-xl-order-13_cvpJWg5I","col-xl-12":"col-xl-12_d20ib_NL","col-xl-push-12":"col-xl-push-12_gTVvROlm","col-xl-pull-12":"col-xl-pull-12_XIo4WIXQ","col-xl-offset-12":"col-xl-offset-12_DSOUhZTb","col-xl-order-12":"col-xl-order-12__7UUivnQY","col-xl-11":"col-xl-11_K1tSfl46","col-xl-push-11":"col-xl-push-11__5Mz_kRXs","col-xl-pull-11":"col-xl-pull-11_c6SpvdST","col-xl-offset-11":"col-xl-offset-11_ZWNYcccD","col-xl-order-11":"col-xl-order-11_ArR9cCRc","col-xl-10":"col-xl-10__2Rp79d5r","col-xl-push-10":"col-xl-push-10_r6KpK4fo","col-xl-pull-10":"col-xl-pull-10_v3QpIU7G","col-xl-offset-10":"col-xl-offset-10_dOgbmhj0","col-xl-order-10":"col-xl-order-10__1am7Mpq","col-xl-9":"col-xl-9_dSqrC2gW","col-xl-push-9":"col-xl-push-9__7jlpIo_f","col-xl-pull-9":"col-xl-pull-9__9MKSc6dH","col-xl-offset-9":"col-xl-offset-9_WGyB16DZ","col-xl-order-9":"col-xl-order-9_Uqq_kvKJ","col-xl-8":"col-xl-8_oIXxUSS1","col-xl-push-8":"col-xl-push-8_XRRA9k9e","col-xl-pull-8":"col-xl-pull-8_O1OQ1OwU","col-xl-offset-8":"col-xl-offset-8_sbVXL0Sj","col-xl-order-8":"col-xl-order-8_Uj055jGf","col-xl-7":"col-xl-7_GiGd5vfp","col-xl-push-7":"col-xl-push-7_OMAfstBj","col-xl-pull-7":"col-xl-pull-7_BEHX9GGn","col-xl-offset-7":"
1col-xl-offset-7__128ogufx","col-xl-order-7":"col-xl-order-7_kC4q2CSs","col-xl-6":"col-xl-6_ehMCsHvs","col-xl-push-6":"col-xl-push-6__2QIH8owv","col-xl-pull-6":"col-xl-pull-6__6GZ3kTf7","col-xl-offset-6":"col-xl-offset-6_nun1MSvS","col-xl-order-6":"col-xl-order-6_Okr17GMr","col-xl-5":"col-xl-5_YmpV7aHh","col-xl-push-5":"col-xl-push-5__3pi_0k04","col-xl-pull-5":"col-xl-pull-5_i4w6HQ0I","col-xl-offset-5":"col-xl-offset-5_uw3dfCvF","col-xl-order-5":"col-xl-order-5_o1WiRgpE","col-xl-4":"col-xl-4_dJrCNM9O","col-xl-push-4":"col-xl-push-4__41sWefKQ","col-xl-pull-4":"col-xl-pull-4_DfjTCgaA","col-xl-offset-4":"col-xl-offset-4__Id3vdTG","col-xl-order-4":"col-xl-order-4__6dkIsQpN","col-xl-3":"col-xl-3_eYBjlbX_","col-xl-push-3":"col-xl-push-3_ZSHDBKi9","col-xl-pull-3":"col-xl-pull-3_AmUEhiQn","col-xl-offset-3":"col-xl-offset-3_sZ0QkMzo","col-xl-order-3":"col-xl-order-3_L3_1z5Xa","col-xl-2":"col-xl-2_IbRq_hnT","col-xl-push-2":"col-xl-push-2_JxtTa5kC","col-xl-pull-2":"col-xl-pull-2_OmZ6ylgs","col-xl-offset-2":"col-xl-offset-2__8YPCv2lO","col-xl-order-2":"col-xl-order-2_gY7HxVCE","col-xl-1":"col-xl-1_CgdvZDq7","col-xl-push-1":"col-xl-push-1_S7oDpU7S","col-xl-pull-1":"col-xl-pull-1__6HMhUGuq","col-xl-offset-1":"col-xl-offset-1_pYpPs_5e","col-xl-order-1":"col-xl-order-1_wGWfACOp","col-xl-0":"col-xl-0_KLoz6LVg","col-xl-push-0":"col-xl-push-0_OrGs4zbs","col-xl-pull-0":"col-xl-pull-0_mpEfPt8o","col-xl-offset-0":"col-xl-offset-0_s3D1WJEs","col-xl-order-0":"col-xl-order-0_ebty1tY_","col-xl-auto":"col-xl-auto_VXpYqk3g","col-xl-true":"col-xl-true_axA4xiYt"}},91928:e=>{e.exports={root:"root__4Cu8n_eS","spot-panel":"spot-panel__7riil_x6","spot-orderbook-box":"spot-orderbook-box_VhmwoQDG","spot-create-order-box":"spot-create-order-box_qV5Ljlsk",tabs:"tabs_PhEZAT0a","ticker-box":"ticker-box_D_9XweGO"}},93172:e=>{e.exports={Ticker:"ticker_z__cMyKt","list-item":"list-item_Mnw2k3z1","item-content":"item-content_T6KCL6WS",up:"up_jQ2KVnYq",down:"down_nOfVVXDn",slide:"slide_l2cwMSz_","swiper-button":"swiper-button__6jiOpPES",listItemLabel:"list-item-label_twxTVBYV",listItemContent:"list-item-content__6w78WUZQ",tickerListBox:"ticker-list-box_PHNV2LIe",tickerListItem:"ticker-list-item__6TDbWAY9",tickerListItemLabel:"ticker-list-item-label_MCKtc8wV"}},93800:(e,l,t)=>{"use strict";t.d(l,{$:()=>x});var r=t(37876),o=t(41902),s=t(90008),i=t(77328),n=t.n(i),a=t(14232),c=t(37626),d=t(86365);let u={title:"Public.HomeTitle",description:"Public.HomeDesc",keywords:"Public.HomeKeywords"},{DOMAIN:p}=(0,d.uc)(),m={"@type":"Organization","@id":`${p}#organization`,name:o.wZ,url:p,logo:{"@type":"ImageObject",url:`${p}${o.Tf.logo}`},description:"Seo.LD.GlobalDesc",sameAs:["https://t.me/OrangeX_exchange","https://t.me/orangexvn","https://twitter.com/OrangeXExchange","https://twitter.com/OrangeXJapan","https://x.com/OrangeXCIS","https://x.com/OrangeXvietnam","https://x.com/OrangeXTurkiye","https://medium.com/@OrangeX.com","https://www.linkedin.com/company/orangexexchange/"]},x=(0,a.memo)(e=>{let{title:l,titleKey:t,description:i,keywords:d,ogTitle:x,ogDescription:h,ignoreLocales:f,breadcrumbs:_,collectionPage:g,graphList:v=[]}=e,{t:b}=(0,c.B)(),y=l||b(t??u.title),j=i||b(u.description),w=d||b(u.keywords),T=(0,a.useRef)(x||y),k=(0,a.useRef)(h||j),{pathname:N,lang:S,currentUrl:I,omitLocales:A,CDN_HOST:C}=(0,s.K8)({ignoreLocales:f}),O=`${C}/images/media-image.jpg`,P=_&&0!==_.length?_.some(e=>"/"===e.url||""===e.url)?_:[{name:b("Public.Home","Home"),url:"/"},..._]:void 0,M={"@type":"WebPage","@id":`${I}#webpage`,url:I,name:y,description:j,inLanguage:S,isPartOf:{"@id":`${p}#website`},publisher:{"@id":`${p}#organization`},breadcrumb:P&&P.length>0?{"@id":`${I}#breadcrumb`}:void 0},H=P&&P.length>0?{"@type":"BreadcrumbList","@id":`${I}#breadcrumb`,itemListElement:P.map((e,l)=>{let t=e.url||"";if(t&&!t.startsWith("http")){let e=S||s.WT,l=e===s.WT?"":`/${e}`,r=t.startsWith("/")?t:`/${t}`;t=(0,s.po)(`${p}${l}${r}`)}return{"@type":"ListItem",position:l+1,name:e.name,item:t}})}:null;m.description=b(m.description);let B=[m,{"@type":"WebSite","@id":`${p}#website`,name:o.wZ,url:`${p}/`,publisher:{"@id":`${p}#organization`},inLanguage:S},M,H,g?function(e){let{locale:l,currentUrl:t,name:r,description:o}=e;return{"@type":"CollectionPage","@id":`${t}#collection`,url:t,name:r,description:o,inLanguage:l,mainEntity:{"@id":`${t}#itemlist`}}}({locale:S,currentUrl:I,...g,description:j}):null,...v].filter(e=>!!e);return(0,r.jsxs)(n(),{children:[(0,r.jsx)("title",{children:y}),(0,r.jsx)("meta",{name:"description",content:j}),(0,r.jsx)("meta",{name:"keywords",content:w}),(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{property:"og:url",content:I}),(0,r.jsx)("meta",{property:"og:site_name",content:o.wZ}),(0,r.jsx)("meta",{property:"og:title",content:T.current}),(0,r.jsx)("meta",{property:"og:description",content:k.current}),(0,r.jsx)("meta",{property:"og:image",content:O}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:site",content:o.wZ}),(0,r.jsx)("meta",{name:"twitter:title",content:T.current}),(0,r.jsx)("meta",{name:"twitter:description",content:k.current}
1),(0,r.jsx)("meta",{property:"twitter:image:src",content:O}),(0,r.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@graph":B})}}),(0,r.jsx)("link",{rel:"canonical",href:I}),[...A??[],"x-default"].map(e=>(0,r.jsx)("link",{rel:"alternate",hrefLang:e,href:(0,s.po)(`${p}${"x-default"===e||e===s.WT?"":`/${e}`}${N}`)},e))]})})},95147:e=>{e.exports={"open-order-panel":"open-order-panel_Od0abeAz","order-direction":"order-direction__6p0eDs24",buy:"buy_MVDPHKJZ",sell:"sell_NpUYFYCm","first-line":"first-line_xBk2C9LJ",name:"name_cYDJ_93V","data-box":"data-box_QLszMpTR","data-box-title":"data-box-title__4AdPl7Q6","data-box-content":"data-box-content_Nx46ww5m","cancel-btn":"cancel-btn_ZdnZQj_D","data-box-conditional":"data-box-conditional_Mx3tXfWs",row:"row_oEF6zXbB","col-left":"col-left_dseVLY0x","col-right":"col-right_VycHXO1H","btn-group":"btn-group_lzjsvHwP","btn-item":"btn-item_hGqi6Gpa"}},96982:(e,l,t)=>{"use strict";t.d(l,{x:()=>_});var r=t(37876),o=t(998),s=t(1940),i=t(14232);let n=(0,o.F)({base:{display:"flex",flexWrap:"wrap"},variants:{align:{top:{alignItems:"flex-start"},middle:{alignItems:"center"},bottom:{alignItems:"flex-end"},stretch:{alignItems:"stretch"}},justify:{start:{justifyContent:"flex-start"},end:{justifyContent:"flex-end"},center:{justifyContent:"center"},"space-around":{justifyContent:"space-around"},"space-between":{justifyContent:"space-between"}},wrap:{true:{flexWrap:"wrap"},false:{flexWrap:"nowrap"}}}}),a=(0,o.A)({"--_col-gap":"var(--grid-col-gap, 0px)",columnGap:"var(--grid-col-gap, 0px)",rowGap:"var(--grid-row-gap, 0px)",sm:{"--_col-gap":"var(--grid-col-gap-sm, 0px)",columnGap:"var(--grid-col-gap-sm, 0px)",rowGap:"var(--grid-row-gap-sm, 0px)"},md:{"--_col-gap":"var(--grid-col-gap-md, 0px)",columnGap:"var(--grid-col-gap-md, 0px)",rowGap:"var(--grid-row-gap-md, 0px)"},lg:{"--_col-gap":"var(--grid-col-gap-lg, 0px)",columnGap:"var(--grid-col-gap-lg, 0px)",rowGap:"var(--grid-row-gap-lg, 0px)"},xl:{"--_col-gap":"var(--grid-col-gap-xl, 0px)",columnGap:"var(--grid-col-gap-xl, 0px)",rowGap:"var(--grid-row-gap-xl, 0px)"}});function c(e,l){let t=(e/l*100).toFixed(4),r=(1-e/l).toFixed(4);return`calc(${t}% - var(--_col-gap, 0px) * ${r})`}function d(e,l){let t={};for(let r=0;r<=e;r++)t[r]={[l]:{order:r}};return t}function u(e,l){let t={};for(let r=0;r<=e;r++)if(0===r)t[r]={[l]:{display:"none"}};else{let o=c(r,e);t[r]={[l]:{display:"block",flex:`0 0 ${o}`,maxWidth:o}}}return t.auto={[l]:{display:"block",flex:"0 0 auto",maxWidth:"none",width:"auto"}},t.true={[l]:{display:"block",flex:"1 1 0"}},t}let p=(0,o.F)({base:{position:"relative",maxWidth:"100%"},variants:{span:function(e){let l={};for(let e=0;e<=24;e++)if(0===e)l[e]={display:"none"};else{let t=c(e,24);l[e]={display:"block",flex:`0 0 ${t}`,maxWidth:t}}return l.auto={display:"block",flex:"0 0 auto",maxWidth:"none",width:"auto"},l.true={display:"block",flex:"1 1 0"},l}(24),order:function(e){let l={};for(let e=0;e<=24;e++)l[e]={order:e};return l}(0),xs:u(24,"xs"),sm:u(24,"sm"),md:u(24,"md"),lg:u(24,"lg"),xl:u(24,"xl"),xsOrder:d(24,"xs"),smOrder:d(24,"sm"),mdOrder:d(24,"md"),lgOrder:d(24,"lg"),xlOrder:d(24,"xl")}}),m=(0,i.forwardRef)((e,l)=>{let{gutter:t=0,align:c,justify:d,wrap:u=!0,className:p,style:m,children:x,...h}=e,f=(0,i.useMemo)(()=>{let e=(0,s.By)(Array.isArray(t)?t[0]??0:t),l=(0,s.By)(Array.isArray(t)?t[1]??0:t);return{"--grid-col-gap":`${e.xs}px`,"--grid-col-gap-sm":`${e.sm}px`,"--grid-col-gap-md":`${e.md}px`,"--grid-col-gap-lg":`${e.lg}px`,"--grid-col-gap-xl":`${e.xl}px`,"--grid-row-gap":`${l.xs}px`,"--grid-row-gap-sm":`${l.sm}px`,"--grid-row-gap-md":`${l.md}px`,"--grid-row-gap-lg":`${l.lg}px`,"--grid-row-gap-xl":`${l.xl}px`}},[t]);return(0,r.jsx)("div",{ref:l,className:(0,o.cx)(n({align:c,justify:d,wrap:u}),a,p),style:{...m,...f},...h,children:x})});function x(e){return void 0===e?void 0:!0===e?"true":!1!==e?String(e):void 0}function h(e){return void 0===e?{}:"object"!=typeof e||Array.isArray(e)||"boolean"==typeof e?{span:x(e)}:{span:x(e.span),order:void 0!==e.order?String(e.order):void 0}}m.displayName="GridRow";let f=(0,i.forwardRef)((e,l)=>{let{span:t,order:s,xs:i,sm:n,md:a,lg:c,xl:d,className:u,style:m,children:f,..._}=e,g=h(i),v=h(n),b=h(a),y=h(c),j=h(d);
1return(0,r.jsx)("div",{ref:l,className:(0,o.cx)(p({span:x(t),order:void 0!==s?String(s):void 0,xs:g.span,sm:v.span,md:b.span,lg:y.span,xl:j.span,xsOrder:g.order,smOrder:v.order,mdOrder:b.order,lgOrder:y.order,xlOrder:j.order}),u),style:m,..._,children:f})});f.displayName="GridCol";let _={Row:m,Col:f}}},e=>{e.O(0,[771,983,2262,692,4162,667,6470,4905,3738,2592,2351,7455,8493,7888,102,2195,2793,186,7092,346,1848,9961,3891,4788,3116,7771,9754,4104,3233,1764,3589,636,6593,8792],()=>e(e.s=23515)),_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.