1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/css/BY08xot2.css","static/css/DT3PbF_C.css","static/css/BXy9f9tM.css","static/css/DHXOrf7N.css","static/css/BJB7vJRV.css","static/css/Ce6GnYsT.css","static/css/BSQjr9xB.css","static/css/T17af3iT.css","static/css/BhTCBccL.css","static/css/BjroAMSF.css","static/css/UmrusQ9J.css","static/css/Duy0XItN.css","static/css/CnDVbkz1.css","static/css/i5vg6QLC.css","static/css/C_R-mBj1.css","static/css/D7lo2WC_.css","static/css/DiTeGWvm.css","static/css/BmP_ol2L.css","static/css/CFtqqLxP.css","static/css/hUM__s7C.css","static/css/vnJwNHBL.css"])))=>i.map(i=>d[i]); 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"btse@5f19a485"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e2b04674-bf06-40c5-86b4-9ba722be9e88",e._sentryDebugIdIdentifier="sentry-dbid-e2b04674-bf06-40c5-86b4-9ba722be9e88")}catch(a){}}();import{_ as e}from"./ByGuns7q.js";import{a7 as t,an as a,g as l,r as i,a8 as r,a9 as n,af as s,ai as o,aE as c,aF as u,a6 as d,ak as p,ab as f,aa as m,as as v,ag as h,bM as g,am as y,aK as b,aS as _,ap as w,aI as k,aN as x,aT as S,ad as C,aU as $,ae as M,ar as P,aQ as A,bC as T,bD as N,b6 as L,aY as E,b5 as I,ah as F,aq as R,aZ as D,ac as O,B as U,aM as z,aD as q,bL as B,b7 as W,aJ as H,bk as V,al as j,a5 as K,i as Y,a$ as G,aP as Z}from"./PmfENnFs.js";import{p3 as X,g3 as Q,d0 as J,pf as ee,aI as te,cF as ae,az as le,j as ie,U as re,af as ne,R as se,iI as oe,sl as ce,l as ue,e4 as de,aq as pe,x as fe,p as me,co as ve,ss as he,st as ge,e_ as ye,b8 as be,f1 as _e,su as we,sv as ke,sw as xe,sx as Se,sy as Ce,br as $e,mi as Me,e as Pe,b1 as Ae,lv as Te,sz as Ne,sA as Le,c as Ee,sB as Ie,lz as Fe,pi as Re,c1 as De,pj as Oe,c3 as Ue,pg as ze,ph as qe,aU as Be,eI as We,c0 as He,cy as Ve,sC as je,r0 as Ke,ct as Ye,c4 as Ge,c5 as Ze,eC as Xe,ri as Qe,sD as Je,u as et,cf as tt,s4 as at,rj as lt,sE as it,sF as rt,sG as nt,sH as st,cm as ot,lu as ct,P as ut,N as dt,sI as pt,sJ as ft,dd as mt,sK as vt,bW as ht,bV as gt,bU as yt,aL as bt,sL as _t,sM as wt,m1 as kt,sN as xt,m5 as St,sO as Ct,lb as $t,aD as Mt,sP as Pt}from"./BhKTELSe.js";import{T as At,R as Tt,f as Nt,i as Lt,h as Et,F as It,a as Ft,G as Rt,H as Dt,J as Ot,K as Ut,L as zt,D as qt,N as Bt,O as Wt,P as Ht,b as Vt,y as jt}from"./cvxruSMo.js";import{bv as Kt,y as Yt,s as Gt,Q as Zt,br as Xt,ay as Qt,bw as Jt,F as ea,aF as ta,bh as aa}from"../../app.DuROpXuw.js";import{_ as la}from"./CRPzHAml.js";import{I as ia}from"./DGw9Heqg.js";import{I as ra,C as na,T as sa}from"./lwVPh_Cg.js";import{u as oa,a as ca,b as ua,c as da,d as pa,j as fa,i as ma,L as va,o as ha,m as ga,n as ya}from"./chunk-echarts.AHWYl6Ef.js";import{A as ba,E as _a,I as wa}from"./tad1MRrM.js";import{x as ka,t as xa}from"./BLBkQ53j.js";import{I as Sa,u as Ca,a as $a,T as Ma,b as Pa}from"./9oX6lwoU.js";import{M as Aa}from"./BM9joY-k.js";import{I as Ta,d as Na}from"./xcw4LDtS.js";import{a as La,N as Ea,W as Ia,T as Fa}from"./ByOB-9wo.js";const Ra=l("tradingViewPanel",(()=>{const e=X(),t=i([]),a=i([]),l=i(!1);return{oneClickMarkets:t,oneClickActiveTrades:a,hasPlacedOrder:l,getOneClickMarkets:async function(){const e=await Q.getOneClickMarkets();t.value=e},fetchOneClickActiveTrades:async function({symbol:t}){if(e.isDemoMode)return;const l=await Q.getOneClickActiveTrades({symbol:t});a.value=l.pageItems||[]},checkHasPlacedOrder:async function(){if(!l.value)try{const e=await Q.hasPlacedOneClickOrder();l.value=!!e}catch{}}}})),Da={class:"demo-tag"};const Oa=la({},[["render",function(e,t){return n(),r("div",Da,s(e.$t("t.demo")),1)}],["__scopeId","data-v-3ac476a3"]]),Ua={class:"my-trade-info"},za={class:"my-trade-info__left"},qa={class:"my-trade-info__title"},Ba={class:"my-trade-info__stats"},Wa={class:"my-trade-info__stat-item"},Ha={class:"my-trade-info__stat-label"},Va={class:"my-trade-info__stat-value"},ja={class:"my-trade-info__stat-unit"},Ka={class:"my-trade-info__stat-item"},Ya={class:"my-trade-info__stat-label"},Ga={class:"my-trade-info__stat-value"},Za={key:0,class:"my-trade-info__stat-item"},Xa={class:"my-trade-info__stat-label"},Qa={class:"my-trade-info__stat-value"},Ja={class:"my-trade-info__stat-number"},el={key:1},tl=la(o({__name:"MyTradeInfo",setup(t){const a=g((()=>e((()=>Promise.resolve().then((()=>Sm))),void 0))),{$openDialog:l}=J(),i=te(),o=ee(),y=X();c((()=>{o.startPolling()})),u((()=>{o.stopPolling()}));const b=d((()=>i.isMobile));return(e,t)=>(n(),r("div",Ua,[v(y).isDemoMode&&b.value?(n(),p(Oa,{key:0,class:"my-trade-info__demo-tag"})):f("",!0),m("div",za,[v(y).isDemoMode&&!b.value?(n(),p(Oa,{key:0})):f("",!0),m("span",qa,s(e.$t("copyTrading.myTrades")),1)]),t[3]||(t[3]=m("div",{class:"my-trade-info__divider"},null,-1)),m("div",Ba,[m("div",Wa,[m("span",Ha,s(e.$t("trading.currentPnl")),1),m("div",Va,[m("span",{class:h(["my-trade-info__stat-number",v(o).pnlClass])},s(v(o).displayPnl),3),m("span",ja,s(v(ae)),1)])]),t[1]||(t[1]=m("div",{class:"my-trade-info__divider"},null,-1)),m("div",Ka,[m("span",Ya,s(e.$t("trading.currentReturn")),1),m("div",Ga,[m("span",{class:h(["my-trade-info__stat-number",v(o).roiClass])},s(v(o).displayRoi)+"% ",3)])]),t[2]||(t[2]=m("div",{class:"my-trade-info__divider"},null,-1)),b.value?f("",!0):(n(),r("div",Za,[m("span",Xa,s(e.$t("trading.openTrades")),1),m("div",Qa,[m("span",Ja,s(v(o).displayTradeCount),1)])]))]),v(y).isDemoMode?f("",!0):(n(),r("button",{key:1,class:"my-trade-info__view-all-btn",onClick:t[0]||(t[0]=e=>v(l)(v(a)))},[b.value?(n(),p(le,{key:0,width:16,height:16})):(n(),r("span",el,s(e.$t("t.viewAll")),1))]))]))}}),[["__scopeId","data-v-e033212a"]]),al=o({__name:"IconTriangleRound",setup:e=>(e,t)=>
2(n(),p(ie,{width:"10",height:"9",viewBox:"0 0 10 9"},{default:y((()=>t[0]||(t[0]=[m("path",{d:"M3.56679 0.728206C4.14939 -0.242802 5.55666 -0.242804 6.13927 0.728205L9.48998 6.31273C10.0899 7.31251 9.36968 8.58447 8.20374 8.58447H1.50231C0.336372 8.58447 -0.383798 7.31252 0.216074 6.31273L3.56679 0.728206Z"},null,-1)]))),_:1,__:[0]}))}),ll={class:"trending-token-card"},il={class:"name-wrapper"},rl={class:"symbol"},nl={class:"full-name"},sl={class:"chart-wrapper"},ol={class:"price-area"},cl={class:"value"},ul={class:"label"},dl={class:"change-area"},pl={class:"value"},fl={class:"label"},ml={class:"btns-wrapper"},vl=la(o({__name:"TrendingTokenCard",props:{market:{}},emits:["update:symbol"],setup(e,{emit:a}){const l=i(null),o=t(),u=e,g=a;oa([ca,ua,da,pa,fa]),c((()=>{y()}));const y=()=>{ma(l.value).setOption({dataset:{source:u.market.priceChart},grid:{top:0,right:0,bottom:0,left:0},xAxis:{type:"time",axisLabel:{show:!1},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"value",scale:!0,splitLine:{show:!1},axisLabel:{show:!1}},series:[{type:"line",name:"ROI",symbol:"none",encode:{x:0,y:1},itemStyle:{color:"#95A3A3"},areaStyle:{color:new va(0,0,0,1,[{offset:.6,color:"rgba(155, 162, 139, 0.20)"},{offset:1,color:"rgba(155, 162, 139, 0.00)"}])}}]})},_=()=>{g("update:symbol",u.market.coin)},w=d((()=>{var e;return(null==(e=o.state.futures.marketDetailMap[u.market.symbol])?void 0:e.priceFilter)??2})),k=d((()=>o.state.futures.futuresLastPriceMap[u.market.symbol]||0));return(e,t)=>(n(),r("div",ll,[m("div",il,[b(re,{name:u.market.coin,showName:!1},null,8,["name"]),m("div",null,[m("div",rl,s(u.market.coin),1),m("div",nl,s(u.market.displayName),1)])]),m("div",sl,[m("div",{ref_key:"chartRef",ref:l,class:"chart"},null,512)]),m("div",{class:h(["info-wrapper",{positive:Number(u.market.priceChange24h)>0,negative:Number(u.market.priceChange24h)<0}])},[m("div",ol,[m("div",cl,[m("span",null,s(v(ne)(k.value,w.value)),1),0!==Number(u.market.priceChange24h)?(n(),p(al,{key:0,class:h({revert:Number(u.market.priceChange24h)<0})},null,8,["class"])):f("",!0)]),m("div",ul,s(e.$t("t.price")),1)]),m("div",dl,[m("div",pl,s(v(ne)(u.market.priceChange24h,{formatKey:2,signed:!0,postfix:"%"})),1),m("div",fl,s(e.$t("markets.24hChange")),1)])],2),m("div",ml,[m("div",{class:"btn",onClick:_},s(e.$t("trading.copywise.startNow")),1)])]))}}),[["__scopeId","data-v-2a1add12"]]),hl={class:"trending-tokens"},gl={class:"cards-container"},yl=la(o({__name:"index",setup(e){const a=_(),l=w(),o=t(),d=i(null),f=i(!1),v=i(!1),h=e=>{const t=o.getters["futures/getSymbolByCoin"](e);a.push({name:se.ONE_CLICK_FUTURES,params:{...l.params,id:t}}
2)},g=()=>{if(!d.value)return;const{scrollLeft:e,scrollWidth:t,clientWidth:a}=d.value;f.value=e>0,v.value=Math.ceil(e+a)<t-1},y=e=>{d.value&&d.value.scrollBy({left:e,behavior:"smooth"})};let M=null,P=null;c((()=>{k((()=>{g(),d.value&&(M=new ResizeObserver((()=>g())),M.observe(d.value))})),T(),P=setInterval((()=>{T()}),3e4)})),u((()=>{M&&M.disconnect(),P&&clearInterval(P)}));const A=i([]),T=async()=>{try{const e=await Q.getOCFTrendingAssets();A.value=e}catch(e){A.value=[]}};return(e,t)=>(n(),r("div",hl,[m("h1",null,s(e.$t("trading.ocf.trendingAssets")),1),m("div",gl,[x(m("div",{class:"scroll-btn left-btn",onClick:t[0]||(t[0]=e=>y(-300))},[b(le)],512),[[S,f.value]]),m("div",{ref_key:"cardsRef",ref:d,class:"cards",onScroll:g},[(n(!0),r(C,null,$(A.value,((e,t)=>(n(),p(vl,{key:t,market:e,"onUpdate:symbol":h},null,8,["market"])))),128))],544),x(m("div",{class:"scroll-btn right-btn",onClick:t[1]||(t[1]=e=>y(300))},[b(le)],512),[[S,v.value]])])]))}}),[["__scopeId","data-v-40878d4d"]]),bl={class:"faq-container"},_l={class:"title"},wl={class:"title-context"},kl={key:0,class:"list-desc"},xl={key:0,class:"list-title"},Sl={class:"list-content"},Cl={key:2,class:"post"},$l=la(o({__name:"index",setup(e){const t=e=>e.node;function a(){const e=P("i18n-t"),t=t=>A(e,{keypath:t});return[{title:t("trading.ocf.faq.1"),content:A(e,{keypath:"trading.ocf.faq.1.desc"},{opt1:()=>A(e,{keypath:"trading.ocf.faq.direction.1",class:"bold",tag:"span"}),opt2:()=>A(e,{keypath:"t.investmentAmount",class:["bold","lower-case"],tag:"span"}),opt3:()=>A(e,{keypath:"futuresMain.trade.leverage",class:["bold","lower-case"],tag:"span"}),opt4:()=>A(e,{keypath:"trading.ocf.desiredEntryPrice",class:["bold","lower-case"],tag:"span"})})},{title:t("trading.ocf.faq.2"),content:t("trading.ocf.faq.2.desc.1"),list:[{title:t("trading.ocf.faq.direction.2"),content:t("trading.ocf.faq.2.desc.2")},{title:t("t.investmentAmount"),content:t("trading.ocf.faq.2.desc.3")},{title:t("futuresMain.trade.leverage"),content:t("trading.ocf.faq.2.desc.4")},{title:t("trading.ocf.desiredEntryPrice"),content:t("trading.ocf.faq.2.desc.5")}]},{title:t("trading.ocf.faq.3"),content:A(e,{keypath:"trading.ocf.faq.3.desc.1"},{liquidationPrice:()=>A(e,{keypath:"futuresMain.openPosition.liqPrice",class:["bold","lower-case"],tag:"span"})}),list:[{content:t("trading.ocf.faq.3.desc.3")},{content:t("trading.ocf.faq.3.desc.4")},{content:t("trading.ocf.faq.3.desc.5")}],listDesc:t("trading.ocf.faq.3.desc.2"),postContent:t("trading.ocf.faq.3.desc.6")}]}return(e,l)=>(n(),r("div",bl,[m("div",_l,s(e.$t("trading.ocf.faq.title")),1),b(ba,{isShowLatest:"",class:"faq-list",list:a()},{title:y((({item:e})=>[m("div",wl,[b(t,{node:e.title},null,8,["node"])])])),content:y((({item:e})=>[m("div",{class:h(["pre",{"mb-12":e.list}])},[b(t,{node:e.content},null,8,["node"])],2),e.listDesc?(n(),r("div",kl,[b(t,{node:e.listDesc},null,8,["node"])])):f("",!0),e.list?(n(),r("ul",{key:1,class:h(["list",{"mb-24":e.postContent}])},[(n(!0),r(C,null,$(e.list,((e,a)=>(n(),r("li",{key:a},[m("div",{class:h(["item",{inline:e.title}])},[e.title?(n(),r("div",xl,[b(t,{node:e.title},null,8,["node"]),l[0]||(l[0]=M(" : "))])):f("",!0),m("div",Sl,[b(t,{node:e.content},null,8,["node"])])],2)])))),128))],2)):f("",!0),e.postContent?(n(),r("div",Cl,[b(t,{node:e.postContent},null,8,["node"])])):f("",!0)])),_:1},8,["list"])]))}}),[["__scopeId","data-v-7d9b8157"]]),Ml=-2,Pl={class:"current-symbol"},Al={class:"symbol"},Tl={class:"subTitle"},Nl=la(o({__name:"CurrentSymbol",props:{currentSymbol:{default:()=>({label:"",subTitle:"",icon:""})}},setup:e=>(e,t)=>(n(),r("div",Pl,[b(re,{name:e.currentSymbol.icon||"placeholder",size:"28",showName:!1},null,8,["name"]),m("span",Al,s(e.currentSymbol.label),1),m("span",Tl,s(e.currentSymbol.subTitle),1)]))}),[["__scopeId","data-v-3cc6aa70"]]),Ll={class:"dropdown"},El={class:"input-wrapper"},Il=["value","placeholder"],Fl={key:0,class:"tabs"},Rl=["onClick"],Dl={key:1,class:"empty"},Ol={class:"options"},Ul=["onClick"],zl=["onClick"],ql={class:"name"},Bl={class:"subTitle"},Wl=la(o({__name:"SymbolDropdown",props:T({symbol:{},options:{},categoryTabs:{}
2,showFavorite:{type:Boolean}},{category:{},categoryModifiers:{}}),emits:T(["update:symbol","toggleFavorite"],["update:category"]),setup(e,{emit:a}){const l=e,o=a,c=N(e,"category"),u=t(),g=d((()=>u.getters.isEnableCFD)),y=d((()=>c.value===Ml)),_=i(""),w=d((()=>((e,t)=>t.trim()?e.filter((e=>e.label.toLowerCase().includes(t.toLowerCase()))):e)(l.options,_.value))),k=e=>{_.value=e.target.value};return(e,t)=>{var a;return n(),r("div",Ll,[m("div",El,[b(oe,{class:"search"}),m("input",{value:_.value,class:"input",name:"symbol",type:"text",placeholder:e.$t("t.searchToken"),onInput:k},null,40,Il)]),g.value&&(null==(a=e.categoryTabs)?void 0:a.length)>1?(n(),r("ul",Fl,[(n(!0),r(C,null,$(e.categoryTabs,(e=>(n(),r("li",{key:e.value,class:h(["tab",{active:c.value===e.value,"my-list":e.value===v(Ml)}]),onClick:t=>c.value=e.value},[e.value===v(Ml)?(n(),p(Yt,{key:0,class:"tab-star"})):f("",!0),M(" "+s(e.label),1)],10,Rl)))),128))])):f("",!0),w.value.length?f("",!0):(n(),r("div",Dl,s(y.value&&!_.value?e.$t("trading.ocf.myListEmpty"):e.$t("referralV2Page.linkOptions.emptyTitle")),1)),m("ul",Ol,[(n(!0),r(C,null,$(w.value,(a=>(n(),r("li",{key:a.value,class:h(["option",{selected:a.value===e.symbol}]),onMousedown:t[0]||(t[0]=L((()=>{}),["prevent"])),onClick:e=>{return t=a.value,o("update:symbol",t),void(_.value="");var t}},[e.showFavorite?(n(),r("button",{key:0,class:"favorite-btn",onClick:L((e=>o("toggleFavorite",a.value)),["stop"])},[b(Yt,{class:h(["favorite-icon",{"is-favorite":a.isFavorite}])},null,8,["class"])],8,zl)):f("",!0),b(re,{name:a.icon||"btc",size:"16",showName:!1},null,8,["name"]),m("div",ql,[M(s(a.label)+" ",1),m("div",Bl,s(a.subTitle),1)]),m("div",{class:h(["price",{up:a.direction>0,down:a.direction<0}])},[M(s(a.displayPrice)+" ",1),a.direction?(n(),p(ce,{key:0,class:h(["triangle",{"is-down":a.direction<0}])},null,8,["class"])):f("",!0)],2)],42,Ul)))),128))])])}}}),[["__scopeId","data-v-6539a89f"]]),Hl=la(o({__name:"SymbolDropdownDialog",props:T({symbol:{},options:{},categoryTabs:{},showFavorite:{type:Boolean}},{visible:{type:Boolean,default:!1},visibleModifiers:{},category:{},categoryModifiers:{}}),emits:T(["update:symbol","toggleFavorite"],["update:visible","update:category"]),setup(e,{emit:t}){const a=t,l=N(e,"visible"),i=N(e,"category"),r=e=>{a("update:symbol",e),l.value=!1};return(e,t)=>(n(),p(ue,{visible:l.value,"onUpdate:visible":t[2]||(t[2]=e=>l.value=e),isBottomUp:!0,isBrandNewStyle:!0,showClose:!0,width:"100%"},{header:y((()=>[m("h6",null,s(e.$t("t.allMarkets")),1)])),body:y((()=>[b(Wl,{category:i.value,"onUpdate:category":t[0]||(t[0]=e=>i.value=e),symbol:e.symbol,options:e.options,"category-tabs":e.categoryTabs,showFavorite:e.showFavorite,"onUpdate:symbol":r,onToggleFavorite:t[1]||(t[1]=t=>e.$emit("toggleFavorite",t))},null,8,["category","symbol","options","category-tabs","showFavorite"])])),_:1},8,["visible"]))}}),[["__scopeId","data-v-7e7371aa"]]),Vl={class:"select-wrapper"},jl=la(o({__name:"SymbolSelect",props:{symbol:{}},emits:["update:symbol"],setup(e,{emit:l}){const s=te(),{t:o}=E(),c=d((()=>null==s?void 0:s.isMobile)),u=t(),g=Ra(),y=X(),_=Gt(),{selectedFuturesCategory:w}=Zt({defaultTab:de.CRYPTO}),k=d((()=>({[de.CRYPTO]:o("t.crypto"),[de.EQUITIES]:o("t.stocks")}))),C=d((()=>u.state.loginState)),$=d((()=>C.value&&!y.isDemoMode)),M=d((()=>_.isFuturesUserCustomized?new Set(_.futuresFavoriteMarkets.map((({symbol:e})=>e))):new Set)),P=d((()=>u.state.futures.futuresLastPriceMap||{})),A=i({}),T={};a(P,(e=>{for(const t of Object.keys(e)){const a=Number(e[t]);if(!a)continue;const l=T[t];void 0!==l&&a!==l&&(A.value[t]=a>l?1:-1),T[t]=a}}),{deep:!0,immediate:!0});const N=d((()=>g.oneClickMarkets.map((e=>{var t;const a=e.categoryId===de.CRYPTO?e.categoryId:de.EQUITIES,l=Number(P.value[e.symbol])||0,i=(null==(t=u.state.futures.marketMap[e.symbol])?void 0:t.priceFilter)??2;return{label:e.coin,value:e.symbol,subTitle:e.displayName||e.coin,icon:e.coin.toLowerCase(),categoryId:a,displayPrice:l?ne(l,{formatKey:i}):"-",direction:A.value[e.symbol]??0,isFavorite:M.value.has(e.symbol)}})).filter((e=>e.value)))),L=d((()=>{const e=[...new Set(N.value.map((e=>e.categoryId)))].map((e=>({label:k.value[e],value:e}))).filter((e=>e.label));return $.value&&e.length&&e.push({label:o("trading.ocf.myList"),value:Ml}),e})),F=d((()=>w.value===Ml?N.value.filter((e=>e.isFavorite)):N.value.filter((e=>e.categoryId===w.value))));async function R(e){const t=!M.value.has(e);await fe.setMarketIsFavorite(`${e}-USD`,t),await _.getFavoriteMarkets()}a((()=>y.isDemoMode),(e=>{e&&w.value===Ml&&(w.value=de.CRYPTO)}));const D=e,O=l,U=d((()=>{const e=N.value.find((e=>e.value===D.symbol));return c.value?{icon:null==e?void 0:e.icon,label:null==e?void 0:e.label}:e})),z=i(!1),q=e=>{O("update:symbol",e),z.value=!1},B=g.getOneClickMarkets();let W=!1;return a($,(e=>{e&&async function(){await Promise.all([B,_.getFavoriteMarkets()]),W||(W=!0,N.value.some((e=>e.isFavorite))&&(w.value=Ml))}()}),{immediate:!0}),(e,t)=>(n(),r("div",Vl,[z.value&&!c.value?(n(),r("div",{key:0,class:"overlay",onClick:t[0]||(t[0]=e=>z.value=!1)})):f("",!0),m("div",{class:"trigger",onClick:t[1]||(t[1]=e=>z.value=!z.value)},[b(Nl,{currentSymbol:U.value},null,8,["currentSymbol"]),b(pe,{width:"12",height:"12",class:h(["arrowIcon",{rotated:z.value}])},null,8,["class"])]),c.value?(n(),p(Hl,{key:2,visible:z.value,"onUpdate:visible":t[3]||(t[3]=e=>z.value=e),category:v(w),"onUpdate:category":t[4]||(t[4]=e=>I(w)?w.value=e:null),symbol:e.symbol,options:F.value,categoryTabs:L.value,showFavorite:$.value,"onUpdate:symbol":q,onToggleFavorite:R},null,8,["visible","category","symbol","options","categoryTabs","showFavorite"])):x((n(),p(Wl,{key:1,category:v(w),"onUpdate:category":t[2]||(t[2]=e=>I(w)?w.value=e:null),symbol:e.symbol,options:F.value,categoryTabs:L.value,showFavorite:$.value,"onUpdate:symbol":q,onToggleFavorite:R},null,8,["category","symbol","options","categoryTabs","showFavorite"])),[[S,z.value]])]))}}),[["__scopeId","data-v-a3db8b3c"]]),Kl=o({__name:"IconLongShort",props:{isShort:{type:Boolean,default:!1}},setup:e=>(e,t)=>
2(n(),p(ie,{width:"14",height:"9",viewBox:"0 0 14 9",fill:"none",style:F({transform:e.isShort?"scaleX(-1) rotate(180deg)":void 0})},{default:y((()=>t[0]||(t[0]=[m("path",{d:"M13.0537 4.97949H11.4941V2.7959L6.64062 8.72852L3.5752 5.0498L1.27246 7.35156L0 6.0791L3.69629 2.38379L6.62793 5.90234L10.1807 1.56055H8.0752V0H13.0537V4.97949Z",fill:"currentColor"},null,-1)]))),_:1,__:[0]},8,["style"]))}),Yl={class:"ocf-tooltip-dialog"},Gl={class:"dialog-title"},Zl={class:"dialog-body"},Xl=la(o({inheritAttrs:!1,__name:"OcfTooltip",props:{title:{},tooltip:{default:""},tooltipStyle:{default:void 0},placement:{default:void 0},hasCursorQuestion:{type:Boolean,default:!0},disable:{type:Boolean,default:!1}},setup(e){const t=e,a=te(),l=d((()=>a.isMobile)),o=i(!1),c=()=>{t.disable||(o.value=!0)};return(e,t)=>{const a=P("Tooltip");return l.value?(n(),r(C,{key:1},[m("span",R({class:"ocf-tooltip-trigger"},e.$attrs,{onClick:c}),[O(e.$slots,"content",{},void 0,!0)],16),b(Aa,{isShow:o.value,"onUpdate:isShow":t[0]||(t[0]=e=>o.value=e)},{default:y((()=>
2[m("div",Yl,[m("div",Gl,s(e.title),1),m("div",Zl,[O(e.$slots,"tooltip",{},(()=>[M(s(e.tooltip),1)]),!0)])])])),_:3},8,["isShow"])],64)):(n(),p(a,R({key:0},e.$attrs,{tooltip:e.tooltip,tooltipStyle:e.tooltipStyle,placement:e.placement,hasCursorQuestion:e.hasCursorQuestion,disable:e.disable}),D({content:y((()=>[O(e.$slots,"content",{},void 0,!0)])),_:2},[e.$slots.tooltip?{name:"tooltip",fn:y((()=>[O(e.$slots,"tooltip",{},void 0,!0)])),key:"0"}:void 0]),1040,["tooltip","tooltipStyle","placement","hasCursorQuestion","disable"]))}}}),[["__scopeId","data-v-3ef89df8"]]),Ql={class:"stats-bar"},Jl={class:"stats-bar__user"},ei={class:"stats-bar__username"},ti={class:"stats-bar__stats"},ai={class:"stats-bar__item"},li={class:"stats-bar__label"},ii={class:"stats-bar__value-row"},ri={class:"stats-bar__unit"},ni={class:"stats-bar__item"},si={class:"stats-bar__label"},oi={class:"stats-bar__value-row"},ci={class:"stats-bar__item"},ui={class:"stats-bar__label"},di={class:"stats-bar__value-row"},pi={class:"stats-bar__value"},fi=la(o({__name:"MyTradeStatsBar",setup(e){const{enableAccountAvatar:a}=me,l=t(),i=ee(),o=d((()=>l.state.accountInfo)),c=d((()=>o.value.nickname||""));return(e,t)=>(n(),r("div",Ql,[m("div",Jl,[v(a)?(n(),p(ve,{key:0,class:"stats-bar__avatar"})):f("",!0),m("span",ei,s(c.value),1)]),t[2]||(t[2]=m("div",{class:"stats-bar__divider"},null,-1)),m("div",ti,[m("div",ai,[m("div",li,s(e.$t("trading.currentPnl")),1),m("div",ii,[m("span",{class:h(["stats-bar__value",v(i).pnlClass])},s(v(i).displayPnl),3),m("span",ri,s(v(ae)),1)])]),t[0]||(t[0]=m("div",{class:"stats-bar__divider"},null,-1)),m("div",ni,[m("div",si,s(e.$t("trading.currentReturn")),1),m("div",oi,[m("span",{class:h(["stats-bar__value",v(i).roiClass])},s(v(i).displayRoi)+"% ",3)])]),t[1]||(t[1]=m("div",{class:"stats-bar__divider"},null,-1)),m("div",ci,[m("div",ui,s(e.$t("trading.openTrades")),1),m("div",di,[m("span",pi,s(v(i).displayTradeCount),1)])])])]))}}),[["__scopeId","data-v-33ef2b3c"]]),mi={class:"active-header"},vi={class:"active-header__top"},hi={class:"active-header__crypto-id"},gi={class:"active-header__coin-info"},yi={class:"active-header__symbol"},bi={class:"active-header__coin-name"},_i={class:"active-header__order-number"},wi={class:"active-header__actions"},ki=["disabled"],xi={class:"active-header__info-row"},Si={class:"active-header__tags"},Ci={class:"active-header__leverage-tag"},$i={class:"active-header__price-bar"},Mi={class:"active-header__price-item"},Pi={class:"active-header__price-label"},Ai={class:"active-header__price-values"},Ti={class:"active-header__price-item"},Ni={class:"active-header__price-label"},Li={class:"active-header__price-value"},Ei={class:"active-header__price-item"},Ii={class:"active-header__price-label"},Fi={class:"active-header__price-value"},Ri=la(o({__name:"ActiveDetailsHeader",props:{data:{},isInitializing:{type:Boolean,default:!1}},emits:["close","stop"],setup(e,{emit:a}){const l=e,i=a,o=te(),p=d((()=>o.isMobile)),g=t(),y=X(),_=d((()=>g.state.futures.futuresLastPriceMap[l.data.symbol]||0)),w=d((()=>g.state.futures.futuresLastDataMap[l.data.symbol]||{})),k=d((()=>{var e;return(null==(e=g.state.futures.marketMap[l.data.symbol])?void 0:e.priceFilter)??2})),x=d((()=>{var e;return(null==(e=g.state.futures.marketMap[l.data.symbol])?void 0:e.baseCurrency)||""})),S=d((()=>{var e;return(null==(e=g.state.futures.marketMap[l.data.symbol])?void 0:e.displayName)||""})),$=d((()=>l.data.orderSide===he.BUY)),P=d((()=>ge.includes(l.data.status))),A=d((()=>w.value.gains||0)),T=d((()=>w.value.high||0)),N=d((()=>w.value.low||0));let L=null;async function E(){try{const e=await ye.getMarketDetail({baseCurrency:l.data.symbol,quoteCurrency:g.state.futures.fixedCurrency}),{change:t,volume:a,high:i,low:r}=e.data||{},n=U(t||0).times(100).toNumber(),s=g.state.futures.futuresLastDataMap[l.data.symbol];if(s&&s.gains===n&&s.volume===a&&s.high===i&&s.low===r)return;g.commit("futures/setFuturesLastData",{marketSymbol:l.data.symbol,data:{gains:n,volume:a,high:i,low:r}})}catch{}}return c((()=>{E(),L=setInterval(E,3e4)})),u((()=>{L&&(clearInterval(L),L=null)})),(e,t)=>(n(),r("div",mi,[m("div",vi,[m("div",hi,[m("div",gi,[b(re,{name:x.value,showName:!1,size:"28"},null,8,["name"]),m("span",yi,s(x.value),1),m("span",bi,s(S.value),1)]),m("div",_i,[m("span",null,"#"+s(e.data.tradeNumber),1)])]),m("div",wi,[p.value?f("",!0):(n(),r("button",{key:0,class:h(["active-header__stop-btn",{"is-disabled":e.isInitializing||P.value,"is-demo":v(y).isDemoMode}]),disabled:e.isInitializing||P.value,onClick:t[0]||(t[0]=e=>i("stop"))},[e.isInitializing?(n(),r(C,{key:0},[M(s(e.$t("t.initializing"))+" ... ",1)],64)):P.value?(n(),r(C,{key:1},[M(s(e.$t("t.stopping"))+" ...",1)],64)):(n(),r(C,{key:2},[b(Sa,{width:16,height:16}),M(" "+s(e.$t("t.stop")),1)],64))],10,ki)),m("button",{class:"active-header__close-btn",onClick:t[1]||(t[1]=e=>i("close"))},[b(be,{width:16,height:16})])])]),m("div",xi,[m("div",Si,[b(Xt,{classification:$.value?v(_e).LONG:v(_e).SHORT},null,8,["classification"]),m("span",Ci,s(+e.data.leverage)+"x",1)]),m("div",$i,[m("div",Mi,[m("span",Pi,s(e.$t("futuresMain.openPosition.price")),1),m("div",Ai,[m("span",{class:h(["active-header__price-main",A.value>=0?"positive":"negative"])},s(v(ne)(_.value,k.value)),3),m("span",{class:h(["active-header__price-change",A.value>=0?"positive":"negative"])},s(A.value>=0?"+":"")+s(v(ne)(A.value,2))+"% ",3)])]),m("div",Ti,[m("span",Ni,s(e.$t("futuresMain.contractDetail.24H_high")),1
2),m("span",Li,s(v(ne)(T.value,k.value)),1)]),m("div",Ei,[m("span",Ii,s(e.$t("futuresMain.contractDetail.24H_low")),1),m("span",Fi,s(v(ne)(N.value,k.value)),1)])])])]))}}),[["__scopeId","data-v-075f4bf7"]]),Di={class:"active-chart"},Oi=la(o({__name:"ActiveDetailsChart",props:{symbol:{}},setup:e=>(e,t)=>(n(),r("div",Di,[e.symbol?(n(),p(ka,{key:e.symbol,class:"active-chart__tv",variant:"oneClickFutures",symbol:e.symbol,isFutures:!0},null,8,["symbol"])):f("",!0)]))}),[["__scopeId","data-v-f72cb8f3"]]),Ui={class:"trade-details-popover__header"},zi={class:"trade-details-popover__title"},qi={class:"trade-details-popover__data"},Bi={class:"trade-details-popover__item"},Wi={class:"trade-details-popover__item-label"},Hi={class:"trade-details-popover__label"},Vi={class:"trade-details-popover__unit"},ji={class:"trade-details-popover__item-value"},Ki={class:"trade-details-popover__item"},Yi={class:"trade-details-popover__item-label"},Gi={class:"trade-details-popover__label"},Zi={class:"trade-details-popover__unit"},Xi={class:"trade-details-popover__item-value"},Qi=la(o({__name:"TradeDetailsPopover",props:{data:{}},emits:["close"],setup(e,{emit:a}){const l=e,i=t(),o=d((()=>{var e;return(null==(e=i.state.futures.marketMap[l.data.symbol])?void 0:e.priceFilter)??2})),c=d((()=>l.data.orderSize?U(l.data.positionSize).abs().div(l.data.orderSize):U(0))),u=d((()=>U(l.data.initialInvestment).times(c.value).dp(2).toNumber())),p=a;return(e,t)=>{const a=z("click-outside");return x((n(),r("div",{class:"trade-details-popover",onClick:t[1]||(t[1]=L((()=>{}),["stop"]))},[m("div",Ui,[m("span",zi,s(e.$t("history.details.title")),1),m("button",{class:"trade-details-popover__close",onClick:t[0]||(t[0]=e=>p("close"))},[b(be,{width:16,height:16})])]),m("div",qi,[m("div",Bi,[m("div",Wi,[m("span",Hi,s(e.$t("trading.ocf.actualInvestmentUsed")),1),m("span",Vi," ("+s(v(ae))+" Value) ",1)]),m("span",ji,s(v(ne)(u.value,2))+" / "+s(v(ne)(e.data.initialInvestment,2)),1)]),m("div",Ki,[m("div",Yi,[m("span",Gi,s(e.$t("trading.ocf.desiredEntryPrice")),1),m("span",Zi," ("+s(v(ae))+") ",1)]),m("span",Xi,s(e.data.orderType!==v(we).MARKET&&e.data.orderPrice?v(ne)(e.data.orderPrice,o.value):e.$t("trading.marketPrice")),1)])])])),[[a,()=>p("close")]])}}}),[["__scopeId","data-v-3d5447ce"]]),Ji={class:"progress-bar"},er={class:"progress-bar-value"},tr=la(o({__name:"ProgressBar",props:{progress:{}},setup:e=>(e,t)=>(n(),r("div",Ji,[m("div",{class:"progress-bar-fill",style:F({width:e.progress+"%"})},null,4),m("div",er,s(e.progress)+"%",1)]))}),[["__scopeId","data-v-7012093b"]]);function ar(e,t){return t?U(e).abs().div(t).times(100).dp(0,U.ROUND_HALF_UP).toNumber():0}const lr={[xe.TAKE_PROFIT]:"futuresMain.trade.takeProfit",[xe.STOP_LOSS]:"tpsl.sl",[xe.MANUAL_TAKE_PROFIT]:"trading.copywise.stopReason.manualTp",[xe.MANUAL_STOP_LOSS]:"trading.copywise.stopReason.manualSl",[xe.LIQUIDATION]:"trading.ocf.stopReason.liquidated",[xe.ADL]:"trading.bot.grid.closeReason.adl.title"};function ir(e,t){return t(e&&function(e){return e in lr}(e)?lr[e]:"trading.ocf.stopReason.systemAdjustment")}const rr={class:"active-stats"},nr={class:"active-stats__return-row"},sr={class:"active-stats__return-item"},or={class:"active-stats__return-title"},cr={class:"active-stats__label"},ur={class:"active-stats__unit"},dr={class:"active-stats__return-item"},pr={class:"active-stats__return-title"},fr={class:"active-stats__label"},mr={key:0,class:"active-stats__unit"},vr={class:"active-stats__data"},hr={class:"active-stats__row"},gr={class:"active-stats__row-label"},yr={class:"active-stats__label-group"},br={class:"active-stats__label highlight"},_r={class:"active-stats__unit"},wr={class:"active-stats__row-value"},kr={class:"active-stats__row"},xr={class:"active-stats__row-label"},Sr={class:"active-stats__label-group"},Cr={class:"active-stats__label highlight"},$r={class:"active-stats__unit"},Mr={class:"active-stats__row-value"},Pr={class:"active-stats__row"},Ar={class:"active-stats__row-label"},Tr={class:"active-stats__label"},Nr={class:"active-stats__unit"},Lr={class:"active-stats__row-value"},Er={class:"active-stats__row"},Ir={class:"active-stats__row-label"},Fr={class:"active-stats__label"},Rr={class:"active-stats__unit"},Dr={class:"active-stats__row-value"},Or={class:"active-stats__row active-stats__row--completion"},Ur={class:"active-stats__row-label"},zr={class:"active-stats__label-group"},qr={class:"active-stats__label"},Br=la(o({__name:"ActiveDetailsStats",props:{data:{},isInitializing:{type:Boolean,default:!1}},setup(e){const a=e,l=t(),o=Se(),c=te(),u=d((()=>c.isMobile)),g=i(!1);function _(e){u.value||(g.value=e)}const w=d((()=>o.getPosition(a.data.walletName))),k=d((()=>{var e;return(null==(e=w.value)?void 0:e.entryPrice)??a.data.entryPrice})),x=d((()=>a.isInitializing||U(k.value).isZero())),S=d((()=>a.data.orderSide===he.BUY)),C=d((()=>l.state.futures.futuresMarkPriceMap[a.data.symbol]||0)),$=d((()=>{var e;return(null==(e=l.state.futures.marketMap[a.data.symbol])?void 0:e.priceFilter)??2})),M=d((()=>{var e;return(null==(e=w.value)?void 0:e.totalContracts)??a.data.positionSize})),P=d((()=>Ce({markPrice:C.value,entryPrice:k.value,positionSize:M.value,contractSize:a.data.contractSize,isLong:S.value}))),A=d((()=>U(a.data.initialInvestment).plus(a.data.investmentUserAdded).toNumber())),T=d((()=>U(a.data.initialInvestment).times(a.data.leverage).toNumber())),N=d((()=>
2{if(!A.value)return 0;const e=U(P.value).div(A.value).times(100);return e.dp(2,e.gt(0)?U.ROUND_DOWN:U.ROUND_UP).toNumber()})),E=d((()=>{const e=(t=a.data.createdAt)?t<1e12?1e3*t:t:0;var t;if(!e)return"-";const l=$e.minutes(Date.now(),e),i=Math.floor(l/1440),r=Math.floor(l%1440/60);return i>0?`${i}d-${r}h`:`${r}h-${l%60}m`})),I=d((()=>ar(M.value,a.data.orderSize)));return(e,t)=>(n(),r("div",rr,[m("div",nr,[m("div",sr,[m("div",or,[m("span",cr,s(e.$t("trading.profitLoss")),1),m("span",ur,"("+s(v(ae))+")",1)]),m("span",{class:h(["active-stats__return-value",x.value?"":P.value>=0?"positive":"negative"])},s(x.value?"-":v(ne)(P.value,{formatKey:2,signed:!0})),3)]),m("div",dr,[m("div",pr,[m("span",fr,s(e.$t("trading.return")),1),e.isInitializing?f("",!0):(n(),r("span",mr," ("+s(E.value)+") ",1))]),m("span",{class:h(["active-stats__return-value",x.value?"":N.value>=0?"positive":"negative"])},s(x.value?"-":`${v(ne)(N.value,{formatKey:2,signed:!0})}%`),3)])]),m("div",vr,[m("div",hr,[m("div",gr,[b(Xl,{title:e.$t("futuresMain.openPosition.entryPrice"),tooltip:e.$t("trading.ocf.entryPrice.hint"),placement:"bottom-start",hasCursorQuestion:!1},{content:y((()=>[m("div",yr,[m("span",br,s(e.$t("futuresMain.openPosition.entryPrice")),1),m("span",_r," ("+s(v(ae))+") ",1),b(Me,{class:"active-stats__info-icon"})])])),_:1},8,["title","tooltip"])]),m("span",wr,s(e.isInitializing?"-":v(ne)(k.value,$.value)),1)]),m("div",kr,[m("div",xr,[b(Xl,{title:e.$t("futuresMain.openPosition.liqPrice"),tooltip:e.$t("trading.ocf.liquidationPrice.hint"),placement:"bottom-start",hasCursorQuestion:!1},{content:y((()=>[m("div",Sr,[m("span",Cr,s(e.$t("futuresMain.openPosition.liqPrice")),1),m("span",$r," ("+s(v(ae))+") ",1),b(Me,{class:"active-stats__info-icon"})])])),_:1},8,["title","tooltip"])]),m("span",Mr,s(x.value||!e.data.liquidationPrice?"-":v(ne)(e.data.liquidationPrice,$.value)),1)]),m("div",Pr,[m("div",Ar,[m("span",Tr,s(e.$t("strategy.yourInvestment")),1),m("span",Nr,"("+s(v(ae))+")",1)]),m("span",Lr,s(v(ne)(A.value,2)),1)]),m("div",Er,[m("div",Ir,[m("span",Fr,s(e.$t("trading.ocf.youAreTradingWith")),1),m("span",Rr,"("+s(v(ae))+")",1)]),m("span",Dr,s(v(ne)(T.value,2)),1)]),m("div",Or,[m("div",Ur,[b(Xl,{title:`${e.$t("trading.ocf.orderFill")} %`,tooltip:e.$t("trading.ocf.orderFillTip"),placement:"bottom-start",hasCursorQuestion:!1},{content:y((()=>[m("div",zr,[m("span",qr,s(e.$t("trading.ocf.orderFill"))+" % ",1),b(Me,{class:"active-stats__info-icon"})])])),_:1},8,["title","tooltip"])]),m("div",{class:"active-stats__completion",onMouseenter:t[0]||(t[0]=e=>_(!0)),onMouseleave:t[1]||(t[1]=e=>_(!1)),onClick:t[2]||(t[2]=e=>g.value=!g.value),onTouchend:t[3]||(t[3]=L((()=>{}),["stop"]))},[b(tr,{progress:I.value},null,8,["progress"]),b(Pe,{class:h(["active-stats__chevron",{"active-stats__chevron--open":g.value}]),width:12,height:12},null,8,["class"])],32),g.value?(n(),p(Qi,{key:0,data:e.data,onClose:t[4]||(t[4]=e=>g.value=!1)},null,8,["data"])):f("",!0)])])]))}}),[["__scopeId","data-v-0181b78d"]]),Wr={class:"balance-info"},Hr=la(o({__name:"BalanceInfo",props:{balance:{},showIcon:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!0},demoColor:{type:Boolean,default:!1}},setup(t){const{checkAuthAndRedirect:a}=Ca(),{$openDialog:l}=J(),i=g((()=>e((()=>import("./D7N4GSvD.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])))),o=X(),c=()=>{a()&&l(i)};return(e,t)=>{const a=P("i18n-t");return n(),r("div",Wr,[e.showIcon?(n(),p(Ta,{key:0,width:"16"})):f("",!0),e.showLabel?(n(),r(C,{key:1},[M(s(v(o).isDemoMode?e.$t("t.demo"):e.$t("t.balance")),1)],64)):f("",!0),m("span",{class:h(["price",{"price-demo":e.demoColor}])},[b(Xl,{title:e.$t("t.balance"),tooltipStyle:{width:"220px","font-size":"14px"},disable:v(o).isDemoMode,placement:"bottom-end"},{tooltip:y((()=>[b(a,{keypath:"trading.ocf.spotHint"},{asset:y((()=>t[0]||(t[0]=[m("strong",null,"USDT",-1)]))),wallet:y((()=>[m("strong",null,s(e.$t("t.spotWallet")),1)])),_:1})])),content:y((()=>[M("$"+s(e.balance),1)])),_:1},8,["title","disable"])],2),t[1]||(t[1]=M(" USDT ")),v(o).isDemoMode?f("",!0):(n(),r("button",{key:2,class:"icon-add",onClick:c},[b(Ae,{class:"add"})]))])}}}),[["__scopeId","data-v-61360bb3"]]),Vr={class:"add-investment-dialog__wrapper"},jr={class:"add-investment-dialog__header"},Kr={class:"add-investment-dialog__title"},Yr={class:"add-investment-dialog__status"},Gr={class:"add-investment-dialog__status-label"},Zr={class:"add-investment-dialog__label"},Xr={class:"add-investment-dialog__unit"},Qr={class:"add-investment-dialog__status-values"},Jr={class:"add-investment-dialog__price-old"},en={class:"add-investment-dialog__price-new"},tn={class:"add-investment-dialog__prompt"},an={class:"add-investment-dialog__bold"},ln={class:"add-investment-dialog__bold"},rn={class:"add-investment-dialog__prompt-text"},nn={class:"add-investment-dialog__actions"},sn=la(o({__name:"AddInvestmentDialog",props:{visible:{type:Boolean},data:{}},emits:["update:visible","confirm"],setup(e,{emit:t}){const a=t,l=te(),i=d((()=>l.isMobile)),r=X();return(e,t)=>{const l=P("i18n-t");return n(),p(ue,{class:"add-investment-dialog",visible:e.visible,width:"460px",showClose:!1,center:!i.value,isBottomUp:i.value,isBrandNewStyle:"",onClosed:t[3]||(t[3]=e=>a("update:visible",!1))},{body:y((()=>[m("div",Vr,[v(r).isDemoMode?(n(),p(Oa,{key:0,class:"add-investment-dialog__demo-tag"})):f("",!0),m("div",jr,[m("h2",Kr,s(e.$t("trading.ocf.avoidLiquidation")),1),m("button",{class:"add-investment-dialog__close",onClick:t[0]||(t[0]=e=>a("update:visible",!1))},[b(be,{width:16,height:16})])]),m("div",Yr,[m("div",Gr,[m("span",Zr,s(e.$t("futuresMain.openPosition.liqPrice")),1),m("span",Xr," ("+s(v(ae))+") ",1)]),m("div",Qr,[m("span",Jr,s(v(ne)(e.data.currentLiqPrice,e.data.priceFilter)),1),b(ra,{class:"add-investment-dialog__price-arrow"}),m("span",en,s(v(ne)(e.data.estLiqPrice,e.data.priceFilter)),1)])]),m("div",tn,[b(l,{keypath:"trading.ocf.addInvestment.prompt",tag:"p",class:"add-investment-dialog__prompt-text"},{amount:y((()=>[m("span",an,s(v(ne)(e.data.amount,2))+" "+s(v(ae)),1)])),wallet:y((()=>[m("span",ln,s(v(r).isDemoMode?e.$t("trading.ocf.demoFunds"):e.$t("t.spotWallet")),1)])),_:1}),m("p",rn,s(e.$t("trading.ocf.addInvestment.hint")),1)]),m("div",nn,[m("button",{class:"add-investment-dialog__btn add-investment-dialog__btn--cancel",onClick:t[1]||(t[1]=e=>a("update:visible",!1))},s(e.$t("t.cancel")),1),m("button",{class:h(["add-investment-dialog__btn add-investment-dialog__btn--confirm",{"is-demo":v(r).isDemoMode}]),onClick:t[2]||(t[2]=e=>a("confirm"))},s(e.$t("t.confirm")),3)])])])),_:1},8,["visible","center","isBottomUp"])}}}),[["__scopeId","data-v-3c2b8e8c"]]);function on(e){const l=t(),{proxy:r}=q(),n=Te(),s=X(),o=i(""),c=d((()=>{var e;if(s.isDemoMode)return s.funds;const{available:t=0,virtual:a=0}=(null==(e=l.state.currencyMap)?void 0:e[ae])||{};return U(t).plus(a??0).dp(2,U.ROUND_DOWN).toNumber()})),p=d((()=>e.value.orderSide===he.BUY)),f=d((()=>l.state.futures.futuresMarkPriceMap[e.value.symbol]||0)),m=d((()=>l.state.futures.marketMap[e.value.symbol]||{})),v=d((()=>l.state.futures.marketDetailMap[e.value.symbol]||{})),h=d((()=>m.value.priceFilter??2)),g=Ne(),y=d((()=>g.getWallet(e.value.walletName)||{})),b=d((()=>y.value.originalAvailableBalance||0)),_=d((()=>y.value.marginBalance||0)),w=d((()=>Le(e.value.symbol))),k=i(null);const x=Ee((function(){if(!o.value||"0"===o.value)return void(k.value=null);if(s.isDemoMode)return void(k.value=Ie(e.value.tradeNumber,Number(o.value)));const{contractSize:t=1,initialMarginMarkup:a=Fe}=v.value,{fundingRate:i=0}=m.value,c=p.value?e.value.positionSize:-e.value.positionSize,u={adjustment:{adjustmentType:"INCREASE",amount:o.value,contractSize:t,markPrice:f.value},orderConfig:{leverage:Number(e.value.leverage),takerFee:n.takerFee,maintenanceMarginRatio:w.value,fundingRate:i,adjConf:a,isMarginIncludeUnrealizedPnl:l.state.includeUnrealizedPnl},curState:{availableBalance:b.value,positionMargin:_.value,entryPrice:Number(e.value.entryPrice),positionSize:c}},d=xa({shareLib:r.$shareLib,wasmFunction:Qt,params:u,defaultResult:{estimatedLiquidationPrice:0,newPositionMargin:0}});k.value=Math.max(d.estimatedLiquidationPrice,0)}),250);a(o,(e=>{e&&"0"!==e?x():k.value=null})),u((()=>{x.cancel()}));const S=d((()=>
2{if(!o.value)return!0;const e=Number(o.value);return isNaN(e)||e<.01||e>c.value})),C=i(!1),$=d((()=>null==k.value?null:{amount:o.value,currentLiqPrice:e.value.liquidationPrice??"",estLiqPrice:k.value,priceFilter:h.value})),M=ee(),P=Ra(),A=i(!1);const T=d((()=>ne(c.value,{formatKey:2})));return{amount:o,spotBalance:c,formattedBalance:T,priceFilter:h,estLiqPrice:k,isAddDisabled:S,confirmDialogVisible:C,confirmDialogData:$,submitting:A,submitAddInvestment:async function(){if(A.value)return!1;A.value=!0;const t=e.value.symbol,a=Re(s.isDemoMode);De(Ue.OCF_ADD_INVESTMENT_SUBMIT,{trading_pair:t,direction:Oe(e.value.orderSide),add_amount:o.value,mode:a});try{return await ze.addInvestment(e.value.tradeNumber,Number(o.value)),C.value=!1,o.value="",M.bumpActiveTrades(),P.fetchOneClickActiveTrades({symbol:e.value.symbol}),!0}catch(l){return qe(Ue.OCF_ADD_INVESTMENT_FAIL,l,{trading_pair:t,mode:a}),!1}finally{A.value=!1}}}}const cn={class:"avoid-liq"},un={class:"avoid-liq__header"},dn={class:"avoid-liq__title-content"},pn={class:"avoid-liq__title"},fn={class:"avoid-liq__input-row"},mn=["disabled"],vn={class:"avoid-liq__preview"},hn={class:"avoid-liq__preview-label"},gn={class:"avoid-liq__label"},yn={class:"avoid-liq__unit"},bn={class:"avoid-liq__preview-values"},_n={class:"avoid-liq__preview-current"},wn={class:"avoid-liq__preview-new"},kn=la(o({__name:"AvoidLiquidation",props:{data:{}},setup(e){const t=e,{amount:a,spotBalance:l,formattedBalance:i,priceFilter:o,estLiqPrice:c,isAddDisabled:u,confirmDialogVisible:d,confirmDialogData:g,submitAddInvestment:_}=on(B(t,"data")),w=X();async function k(){await _()}return(e,t)=>(n(),r("div",cn,[m("div",un,[b(Xl,{title:e.$t("trading.ocf.avoidLiquidation"),placement:"top-start",hasCursorQuestion:!1,class:"avoid-liq__title-wrap"},{content:y((()=>[m("div",dn,[m("span",pn,s(e.$t("trading.ocf.avoidLiquidation")),1),b(Me,{class:"avoid-liq__info-icon"})])])),tooltip:y((()=>[m("span",null,s(e.$t("trading.ocf.avoidLiquidation.hint")),1)])),_:1},8,["title"]),b(Hr,{balance:v(i),showLabel:!1},null,8,["balance"])]),m("div",fn,[b(At,{value:v(a),"onUpdate:value":t[0]||(t[0]=e=>I(a)?a.value=e:null),enableThousandSeparator:"",step:.01,min:0,max:v(l),inputmode:"decimal",canClear:"",desktopStyle:""},{prepend:y((()=>t[3]||(t[3]=[m("span",{class:"avoid-liq__input-prepend"},"$",-1)]))),append:y((()=>[M(s(v(ae)),1)])),_:1},8,["value","max"]),m("button",{class:h(["avoid-liq__add-btn",{disabled:v(u)}]),disabled:v(u),onClick:t[1]||(t[1]=e=>d.value=!0)},s(e.$t("trading.addInvestment")),11,mn),v(w).isDemoMode?(n(),p(Oa,{key:0,class:"avoid-liq__demo-tag"})):f("",!0)]),m("div",vn,[m("div",hn,[m("span",gn,s(e.$t("futuresMain.openPosition.liqPrice")),1),m("span",yn,"("+s(v(ae))+")",1)]),m("div",bn,[m("span",_n,s(e.data.liquidationPrice?v(ne)(e.data.liquidationPrice,v(o)):"-"),1),t[4]||(t[4]=m("span",{class:"avoid-liq__preview-arrow"},"â",-1)),m("span",wn,s(null!=v(c)?v(ne)(v(c),v(o)):"?"),1)])]),v(d)&&v(g)?(n(),p(sn,{key:0,visible:v(d),"onUpdate:visible":t[2]||(t[2]=e=>I(d)?d.value=e:null),data:v(g),onConfirm:k},null,8,["visible","data"])):f("",!0)]))}}),[["__scopeId","data-v-3bdf8921"]]),xn={class:"avoid-liq-dialog__wrapper"},Sn={class:"avoid-liq-dialog__header"},Cn={class:"avoid-liq-dialog__title"},$n={class:"avoid-liq-dialog__desc"},Mn={class:"avoid-liq-dialog__input-section"},Pn={class:"avoid-liq-dialog__wallet"},An={class:"avoid-liq-dialog__status"},Tn={class:"avoid-liq-dialog__status-label"},Nn={class:"avoid-liq-dialog__label"},Ln={class:"avoid-liq-dialog__unit"},En={class:"avoid-liq-dialog__status-values"},In={class:"avoid-liq-dialog__price-old"},Fn={class:"avoid-liq-dialog__price-new"},Rn={class:"avoid-liq-dialog__actions"},Dn=["disabled"],On=la(o({__name:"AvoidLiquidationDialog",props:{visible:{type:Boolean},data:{}},emits:["update:visible"],setup(e,{emit:t}){const a=e,l=t,{amount:i,spotBalance:o,formattedBalance:c,priceFilter:u,estLiqPrice:d,isAddDisabled:g,confirmDialogVisible:_,confirmDialogData:w,submitAddInvestment:k}=on(B(a,"data")),x=X();async function S(){await k()&&l("update:visible",!1)}return(e,t)=>(n(),r(C,null,[b(ue,{class:"avoid-liq-dialog",visible:e.visible,width:"460px",showClose:!1,isBottomUp:!0,isBrandNewStyle:"",onClosed:t[4]||(t[4]=e=>l("update:visible",!1))},{body:y((()=>[m("div",xn,[v(x).isDemoMode?(n(),p(Oa,{key:0,class:"avoid-liq-dialog__demo-tag"})):f("",!0),m("div",Sn,[m("h2",Cn,s(e.$t("trading.ocf.avoidLiquidation")),1),m("button",{class:"avoid-liq-dialog__close",onClick:t[0]||(t[0]=e=>l("update:visible",!1))},[b(be,{width:16,height:16})])]),m("p",$n,s(e.$t("trading.ocf.avoidLiquidation.hint")),1),m("div",Mn,[b(At,{value:v(i),"onUpdate:value":t[1]||(t[1]=e=>I(i)?i.value=e:null),enableThousandSeparator:"",step:.01,min:0,max:v(o),inputmode:"decimal",canClear:"",desktopStyle:""},{append:y((()=>[M(s(v(ae)),1)])),_:1},8,["value","max"]),m("div",Pn,[b(Hr,{balance:v(c),showLabel:!1},null,8,["balance"])])]),m("div",An,[m("div",Tn,[m("span",Nn,s(e.$t("futuresMain.openPosition.liqPrice")),1),m("span",Ln," ("+s(v(ae))+") ",1)]),m("div",En,[m("span",In,s(e.data.liquidationPrice?v(ne)(e.data.liquidationPrice,v(u)):"-"),1),t[6]||(t[6]=m("span",{class:"avoid-liq-dialog__price-arrow"},"â",-1)),m("span",Fn,s(null!=v(d)?v(ne)(v(d),v(u)):"?"),1)])]),m("div",Rn,[m("button",{class:"avoid-liq-dialog__btn avoid-liq-dialog__btn--cancel",onClick:t[2]||(t[2]=e=>l("update:visible",!1))},s(e.$t("t.cancel")),1),m("button",{class:h(["avoid-liq-dialog__btn avoid-liq-dialog__btn--confirm",{disabled:v(g),"is-demo":v(x).isDemoMode}]),disabled:v(g),onClick:t[3]||(t[3]=e=>_.value=!0)},s(e.$t("trading.addInvestment")),11,Dn)])])])),_:1},8,["visible"]),v(_)&&v(w)?(n(),p(sn,{key:0,visible:v(_),"onUpdate:visible":t[5]||(t[5]=e=>I(_)?_.value=e:null),data:v(w),onConfirm:S},null,8,["visible","data"])):f("",!0)],64))}}),[["__scopeId","data-v-cde94c00"]]),Un={class:"tpsl-section"},zn={class:"tpsl-section__toggle"},qn={class:"tpsl-section__title"},Bn={key:0,class:"tpsl-section__content"},Wn={class:"tpsl-section__inputs"},Hn={class:"tpsl-section__input-group"},Vn={class:"tpsl-section__mode-label"},jn={key:0,class:"tpsl-section__dropdown"},Kn=["onClick"],Yn={class:"tpsl-section__input-wrap"},Gn={key:0,class:"tpsl-section__input-dash"},Zn={class:"tpsl-section__input-group"},Xn={class:"tpsl-section__price-label color-primary"},Qn={class:"tpsl-section__result"},Jn={class:"tpsl-section__est"},es={class:"tpsl-section__est-label"},ts={key:0,class:"tpsl-section__warning"},as=la(o({__name:"TpSlSection",props:{enabled:{type:Boolean},title:{},coinSymbol:{},modeOptions:{},selectedMode:{},inputValue:{},priceValue:{},priceStep:{},estLabel:{},estValue:{},estColor:{},inputSuffix:{},warning:{}},emits:["update:enabled","update:selectedMode","update:inputValue","update:priceValue"],setup(e,{emit:t}){const a=e,l=t,o=i(!1);let c=null;const p=d({get:()=>a.inputValue,set:e=>l("update:inputValue",e)}),g=d({get:()=>a.priceValue,set:e=>l("update:priceValue",e)}),_=d((()=>{var e;return(null==(e=a.modeOptions.find((e=>e.value===a.selectedMode)))?void 0:e.label)||""})),w=d((()=>!!a.priceValue&&!a.inputValue));function k(){c&&(document.removeEventListener("click",c,!0),c=null)}function x(){if(o.value=!o.value,o.value){const e=()=>{o.value=!1,k()};c=e,setTimeout((()=>document.addEventListener("click",e,!0)))}else k()}return u((()=>{k()})),(e,t)=>(n(),r("div",Un,[m("div",zn,[b(Be,{modelValue:e.enabled,"onUpdate:modelValue":t[0]||(t[0]=e=>l("update:enabled",e))}
2,null,8,["modelValue"]),m("span",qn,s(e.title),1)]),b(W,{name:"fade"},{default:y((()=>[e.enabled?(n(),r("div",Bn,[m("div",Wn,[m("div",Hn,[m("button",{class:"tpsl-section__mode-selector",onClick:x},[m("span",Vn,s(_.value),1),b(pe,{width:12,height:12,class:"tpsl-section__mode-arrow"})]),o.value?(n(),r("div",jn,[(n(!0),r(C,null,$(e.modeOptions,(t=>(n(),r("div",{key:t.value,class:h(["tpsl-section__dropdown-item",{active:t.value===e.selectedMode}]),onClick:e=>{return a=t.value,l("update:selectedMode",a),void(o.value=!1);var a}},s(t.label),11,Kn)))),128))])):f("",!0),m("div",Yn,[b(At,{value:p.value,"onUpdate:value":t[1]||(t[1]=e=>p.value=e),enableThousandSeparator:"",step:.01,min:0,inputmode:"decimal",canClear:"",desktopStyle:""},{append:y((()=>[M(s(e.inputSuffix),1)])),_:1},8,["value"]),w.value?(n(),r("span",Gn," - ")):f("",!0)])]),m("div",Zn,[m("span",Xn,s(e.$t("trading.ocf.tpsl.targetPriceTitle",{coin:e.coinSymbol}))+": ",1),b(At,{value:g.value,"onUpdate:value":t[2]||(t[2]=e=>g.value=e),enableThousandSeparator:"",step:e.priceStep,min:0,inputmode:"decimal",canClear:"",desktopStyle:""},{append:y((()=>[M(s(v(ae)),1)])),_:1},8,["value","step"])])]),m("div",Qn,[m("div",Jn,[m("span",es,s(e.estLabel),1),m("span",{class:h(["tpsl-section__est-value",e.estColor])},s(e.estValue),3)]),e.warning?(n(),r("div",ts,s(e.warning),1)):f("",!0)])])):f("",!0)])),_:1})]))}}),[["__scopeId","data-v-13b33f11"]]),ls={class:"tpsl-dialog__wrapper"},is={class:"tpsl-dialog__header"},rs={class:"tpsl-dialog__title"},ns={class:"tpsl-dialog__info-bar"},ss={class:"tpsl-dialog__info-item"},os={class:"tpsl-dialog__info-label"},cs={class:"tpsl-dialog__info-value"},us={class:"tpsl-dialog__info-unit"},ds={class:"tpsl-dialog__info-item"},ps={class:"flex-1"},fs={class:"tpsl-dialog__info-label"},ms={class:"tpsl-dialog__info-price positive"},vs={class:"tpsl-dialog__sections"},hs={class:"tpsl-dialog__actions"},gs=["disabled"],ys=la(o({__name:"TpSlDialog",props:{visible:{type:Boolean},data:{},submitting:{type:Boolean}},emits:["update:visible","confirm"],setup(e,{emit:t}){const a=e,l=t,{t:r}=E(),o=te(),u=d((()=>o.isMobile)),g=d((()=>"Long"===a.data.direction)),_=X(),w="percentGain",k="profit",x="percentLoss",S="loss",C=d((()=>U(a.data.positionSize).times(a.data.contractSize))),$=d((()=>Math.pow(10,-a.data.priceFilter))),M=d((()=>ne(a.data.currentPrice,a.data.priceFilter))),P=i(!1),A=i(w),T=i(""),N=i(""),L=i(!1),I=i(x),F=i(""),R=i("");function D(e){return e===w||e===x}function O(e,t,l){const i=U(e);if(!e||i.isNaN()||i.lte(0))return"";const r=U(a.data.entryPrice),n=U(a.data.investment);if(C.value.isZero()||n.isZero())return"";const s=l===g.value?1:-1,o=U(s).times(i.minus(r)),c=D(t)?o.div(n).times(C.value).times(100):o.times(C.value);return c.isNaN()||c.lte(0)?"":c.dp(2,U.ROUND_DOWN).toFixed()}function z(e,t,l){return d((()=>{if(!e.value||t.value)return"-";const i=U(a.data.entryPrice),r=U(e.value),n=U(a.data.investment);if(C.value.isZero()||n.isZero())return"-";const s=g.value?1:-1,o=U(s).times(r.minus(i)).times(C.value),c=o.div(n).times(100);if(D(l.value)){return`${o.gte(0)?"+":""}${ne(o.dp(2,U.ROUND_DOWN).toNumber(),2)} ${ae}`}return`${c.gte(0)?"+":""}${ne(c.dp(2,U.ROUND_DOWN).toNumber(),2)}%`}))}function q(e,t,l){return d((()=>{if(!e.value||!t.value)return"";const i=U(t.value);if(i.isNaN()||i.lte(0))return"";const n=a.data.currentPrice,s=ne(n,a.data.priceFilter);if(l){if(g.value&&i.lte(n))return r("trading.ocf.tpsl.warning.higher",{price:s});if(!g.value&&i.gte(n))return r("trading.ocf.tpsl.warning.lower",{price:s})}else{if(g.value&&i.gt(n))return r("trading.ocf.tpsl.warning.lower",{price:s});if(!g.value&&i.lt(n))return r("trading.ocf.tpsl.warning.higher",{price:s})}return""}))}function B(e,t,l,i,r){return{onInputChange(n){r&&(n=r(n)),e.value=n,t.value=function(e,t,l){const i=U(e);if(!e||i.isNaN()||i.lte(0))return"";const r=U(a.data.entryPrice),n=U(a.data.investment);if(C.value.isZero())return"";const s=l===g.value?1:-1,o=D(t)?i.div(100).times(n).div(C.value):i.div(C.value),c=r.plus(U(s).times(o));return c.lte(0)?"":c.dp(a.data.priceFilter,g.value?U.ROUND_UP:U.ROUND_DOWN).toFixed()}(n,l.value,i)},onPriceChange(a){t.value=a,e.value=O(a,l.value,i)},onModeChange(a){const r=t.value;l.value=a,e.value=O(r,a,i)}}}const{onInputChange:W,onPriceChange:H,onModeChange:V}=B(T,N,A,!0),{onInputChange:j,onPriceChange:K,onModeChange:Y}=B(F,R,I,!1,(e=>I.value===x&&U(e).gt(100)?"100":e)),G=q(P,N,!0),Z=q(L,R,!1),Q=z(N,G,A),J=z(R,Z,I),ee=d((()=>[{value:w,label:`${r("t.estimatedProfit")} %`},{value:k,label:`${r("t.estimatedProfit")} $`}])),le=d((()=>[{value:x,label:`${r("t.estimatedLoss")} %`},{value:S,label:`${r("t.estimatedLoss")} $`}])),ie=d((()=>A.value===w?"%":ae)),re=d((()=>I.value===x?"%":ae)),se=d((()=>A.value===w?`${r("t.estimatedProfit")} $:`:`${r("t.estimatedProfit")} %:`)),oe=d((()=>I.value===x?`${r("t.estimatedLoss")} $:`:`${r("t.estimatedLoss")} %:`)),ce=d((()=>!!a.submitting||(!!(P.value&&N.value&&G.value)||!!(L.value&&R.value&&Z.value))));function de(){l("confirm",{tpEnabled:P.value&&!!N.value,tpPrice:N.value,slEnabled:L.value&&!!R.value,slPrice:R.value})}return c((()=>
2{const{existingTpPrice:e,existingSlPrice:t}=a.data;e&&(P.value=!0,N.value=e,T.value=O(e,A.value,!0)),t&&(L.value=!0,R.value=t,F.value=O(t,I.value,!1))})),(e,t)=>(n(),p(ue,{class:"tpsl-dialog",visible:e.visible,width:"480px",showClose:!1,center:!u.value,isBottomUp:u.value,isBrandNewStyle:"",onClosed:t[4]||(t[4]=e=>l("update:visible",!1))},{body:y((()=>[v(_).isDemoMode?(n(),p(Oa,{key:0,class:"tpsl-dialog__demo-tag"})):f("",!0),m("div",ls,[m("div",is,[m("h2",rs,s(e.$t("t.takeProfitStopLoss")),1),m("button",{class:"tpsl-dialog__close",onClick:t[0]||(t[0]=e=>l("update:visible",!1))},[b(be,{width:16,height:16})])]),m("div",ns,[m("div",ss,[m("span",os,s(e.$t("t.investment")),1),m("span",cs,s(e.data.investment),1),m("span",us,s(v(ae)),1)]),t[5]||(t[5]=m("span",{class:"tpsl-dialog__info-divider"},"|",-1)),m("div",ds,[m("div",ps,[m("span",fs,s(e.data.coinSymbol)+" "+s(e.$t("t.price"))+": ",1),m("span",ms,s(M.value),1)]),b(Xt,{class:"tpsl-dialog__info-classification",classification:"Long"===e.data.direction?v(_e).LONG:v(_e).SHORT},null,8,["classification"])])]),m("div",vs,[b(as,{enabled:P.value,"onUpdate:enabled":t[1]||(t[1]=e=>P.value=e),inputValue:T.value,priceValue:N.value,priceStep:$.value,title:e.$t("futuresMain.trade.takeProfit"),coinSymbol:e.data.coinSymbol,modeOptions:ee.value,selectedMode:A.value,estLabel:se.value,estValue:v(Q),estColor:"positive",inputSuffix:ie.value,warning:v(G),"onUpdate:inputValue":v(W),"onUpdate:priceValue":v(H),"onUpdate:selectedMode":v(V)},null,8,["enabled","inputValue","priceValue","priceStep","title","coinSymbol","modeOptions","selectedMode","estLabel","estValue","inputSuffix","warning","onUpdate:inputValue","onUpdate:priceValue","onUpdate:selectedMode"]),b(as,{enabled:L.value,"onUpdate:enabled":t[2]||(t[2]=e=>L.value=e),inputValue:F.value,priceValue:R.value,priceStep:$.value,title:e.$t("tpsl.sl"),coinSymbol:e.data.coinSymbol,modeOptions:le.value,selectedMode:I.value,estLabel:oe.value,estValue:v(J),estColor:"negative",inputSuffix:re.value,warning:v(Z),"onUpdate:inputValue":v(j),"onUpdate:priceValue":v(K),"onUpdate:selectedMode":v(Y)},null,8,["enabled","inputValue","priceValue","priceStep","title","coinSymbol","modeOptions","selectedMode","estLabel","estValue","inputSuffix","warning","onUpdate:inputValue","onUpdate:priceValue","onUpdate:selectedMode"])]),m("div",hs,[m("button",{class:"tpsl-dialog__btn tpsl-dialog__btn--cancel",onClick:t[3]||(t[3]=e=>l("update:visible",!1))},s(e.$t("t.cancel")),1),m("button",{class:h(["tpsl-dialog__btn tpsl-dialog__btn--confirm",{disabled:ce.value,"is-demo":v(_).isDemoMode}]),disabled:ce.value,onClick:de},s(e.$t("t.confirm")),11,gs)])])])),_:1},8,["visible","center","isBottomUp"]))}}),[["__scopeId","data-v-864ae93f"]]);const bs="/static/img/gAOS2Dmo.png",_s="/static/img/DJW7fRwC.png",ws={class:"share-preview-card__head"},ks={class:"share-preview-card__service"},xs={class:"share-preview-card__service-name"},Ss={class:"share-preview-card__bottom"},Cs={class:"share-preview-card__bottom-content"},$s={class:"share-preview-card__bottom-text"},Ms=la(o({__name:"SharePreviewCard",props:{isProfit:{type:Boolean}},setup(e){const t=e,a=d((()=>t.isProfit?bs:_s));return(e,t)=>(n(),r("div",{class:"share-preview-card",style:F({backgroundImage:`url(${a.value})`})},[m("div",ws,[b(He,{class:"share-preview-card__logo"}),m("div",ks,[m("span",xs,s(e.$t("trading.ocf.title")),1),t[0]||(t[0]=m("span",{class:"share-preview-card__service-tm"},"TM",-1))])]),m("div",Ss,[t[2]||(t[2]=m("div",{class:"share-preview-card__bottom-backdrop"},null,-1)),m("div",Cs,[m("div",$s,[m("p",null,s(e.$t("trading.ocf.title")),1),m("p",null,s(e.$t("trading.ocf.slogan")),1),m("p",null,s(e.$t("trading.ocf.shareCodeToStart")),1)]),t[1]||(t[1]=H('<svg class="share-preview-card__qrcode" viewBox="0 0 29 29" xmlns="http://www.w3.org/2000/svg" data-v-ecb52fcf><rect width="29" height="29" fill="white" data-v-ecb52fcf></rect><rect x="2" y="2" width="7" height="1" fill="black" data-v-ecb52fcf></rect><rect x="2" y="3" width="1" height="5" fill="black" data-v-ecb52fcf></rect><rect x="8" y="3" width="1" height="5" fill="black" data-v-ecb52fcf></rect><rect x="2" y="8" width="7" height="1" fill="black" data-v-ecb52fcf></rect><rect x="4" y="4" width="3" height="3" fill="black" data-v-ecb52fcf></rect><rect x="20" y="2" width="7" height="1" fill="black" data-v-ecb52fcf></rect><rect x="20" y="3" width="1" height="5" fill="black" data-v-ecb52fcf></rect><rect x="26" y="3" width="1" height="5" fill="black" data-v-ecb52fcf></rect><rect x="20" y="8" width="7" height="1" fill="black" data-v-ecb52fcf></rect><rect x="22" y="4" width="3" height="3" fill="black" data-v-ecb52fcf></rect><rect x="2" y="20" width="7" height="1" fill="black" data-v-ecb52fcf></rect><rect x="2" y="21" width="1" height="5" fill="black" data-v-ecb52fcf></rect><rect x="8" y="21" width="1" height="5" fill="black" data-v-ecb52fcf></rect><rect x="2" y="26" width="7" height="1" fill="black" data-v-ecb52fcf></rect><rect x="4" y="22" width="3" height="3" fill="black" data-v-ecb52fcf></rect><rect x="10" y="2" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="12" y="2" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="14" y="2" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="16" y="2" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="18" y="2" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="2" y="10" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="2" y="12" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="2" y="14" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="2" y="16" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="2" y="18" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="10" y="4" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="12" y="5" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="14" y="4" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="16" y="6" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="11" y="7" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="13" y="6" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="15" y="8" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="17" y="5" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="18" y="7" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="10" y="10" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="12" y="11" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="14" y="10" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="16" y="12" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="18" y="10" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="11" y="13" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="13" y="12" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="15" y="14" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="17" y="11" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="4" y="10" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="6" y="11" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="8" y="10" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="5" y="13" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="7" y="12" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="4" y="15" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="6" y="14" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="8" y="16" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="5" y="17" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="7" y="18" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="10" y="16" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="12" y="15" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="14" y="17" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="16" y="16" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="18" y="15" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="11" y="18" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="13" y="17" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="15" y="16" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="17" y="18" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="20" y="10" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="22" y="11" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="24" y="10" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="26" y="12" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="21" y="13" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="23" y="12" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="25" y="14" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="20" y="16" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="22" y="15" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="24" y="17" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="26" y="16" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="21" y="18" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="23" y="17" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="25" y="15" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="10" y="20" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="12" y="21" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="14" y="20" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="16" y="22" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="18" y="21" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="11" y="23" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="13" y="22" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="15" y="24" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="17" y="23" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="10" y="25" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="12" y="26" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="14" y="25" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="20" y="20" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="22" y="21" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="24" y="22" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="26" y="20" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="21" y="23" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="23" y="24" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="25" y="21" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="20" y="25" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="22" y="26" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="24" y="25" width="1" height="1" fill="black" data-v-ecb52fcf></rect><rect x="26" y="24" width="1" height="1" fill="black" data-v-ecb52fcf></rect></svg>',1))])])],4))}}),[["__scopeId","data-v-ecb52fcf"]]),Ps={class:"spinner"};const As=la({},[["render",function(e,t){return n(),r("div",Ps,t[0]||(t[0]=[m("svg",{class:"spinner-circular",viewBox:"25 25 50 50"},[m("circle",{class:"spinner-path",cx:"50",cy:"50",r:"20",fill:"none"})],-1)]))}],["__scopeId","data-v-c62f20cb"]]);var Ts=Object.defineProperty,Ns=(e,t)=>()=>(e&&(t=e(e=0)),t),Ls=(e,t)=>{for(var a in t)Ts(e,a,{get:t[a],enumerable:!0})};var Es,Is,Fs=Ns((()=>{Es=class extends Map{constructor(e=100,...t){super(...t),this._maxSize=e}set(e,t){if(this.size>=this._maxSize&&!this.has(e)){let e=this.keys().next().value;void 0!==e&&this.delete(e)}return super.set(e,t)}},Is={image:new Es(100),background:new Es(100),resource:new Es(150),defaultStyle:new Es(30),baseStyle:new Es(50),computedStyle:new WeakMap,measureHints:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}}));function Rs(e){let t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)return null;let a=t[2].trim();return a.startsWith("#")?null:a}function Ds(e){if(/%[0-9A-Fa-f]{2}/.test(e))return e;try{return encodeURI(e)}catch{return e}}var Os=Ns((()=>{}));function Us(e,t){if(!t||function(e){return/^data:|^blob:|^about:blank$/i.test(e)}(e)||function(e,t){try{let a=typeof location<"u"&&location.href?location.href:"http://localhost/",l=t.includes("{url}")?t.split("{url}
2")[0]:t,i=new URL(l||".",a),r=new URL(e,a);if(r.origin===i.origin)return!0;let n=r.searchParams;if(n&&(n.has("url")||n.has("target")))return!0}catch{}return!1}(e,t))return!1;try{let t=typeof location<"u"&&location.href?location.href:"http://localhost/",a=new URL(e,t);return!(typeof location<"u")||a.origin!==location.origin}catch{return!!t}}function zs(e){return new Promise(((t,a)=>{let l=new FileReader;l.onload=()=>t(String(l.result||"")),l.onerror=()=>a(new Error("read_failed")),l.readAsDataURL(e)}))}async function qs(e,t={}){let a=t.as??"blob",l=t.timeout??3e3,i=t.useProxy||"",r=t.errorTTL??8e3,n=t.headers||{},s=!!t.silent;if(/^data:/i.test(e))try{if("text"===a)return{ok:!0,data:String(e),status:200,url:e,fromCache:!1};if("dataURL"===a)return{ok:!0,data:String(e),status:200,url:e,fromCache:!1,mime:String(e).slice(5).split(";")[0]||""};let[,t="",l=""]=String(e).match(/^data:([^,]*),(.*)$/)||[],i=/;base64/i.test(t)?atob(l):decodeURIComponent(l),r=new Uint8Array([...i].map((e=>e.charCodeAt(0)))),n=new Blob([r],{type:(t||"").split(";")[0]||""});return{ok:!0,data:n,status:200,url:e,fromCache:!1,mime:n.type||""}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(e))try{let t=await fetch(e);if(!t.ok)return{ok:!1,data:null,status:t.status,url:e,fromCache:!1,reason:"http_error"};let l=await t.blob(),i=l.type||t.headers.get("content-type")||"";return"dataURL"===a?{ok:!0,data:await zs(l),status:t.status,url:e,fromCache:!1,mime:i}:"text"===a?{ok:!0,data:await l.text(),status:t.status,url:e,fromCache:!1,mime:i}:{ok:!0,data:l,status:t.status,url:e,fromCache:!1,mime:i}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(e))return"dataURL"===a?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:e,fromCache:!1,mime:"image/png"}:{ok:!0,data:"text"===a?"":new Blob([]),status:200,url:e,fromCache:!1};let o=function(e,t){return[t.as||"blob",t.timeout??3e3,t.useProxy||"",t.errorTTL??8e3,e].join("|")}(e,{as:a,timeout:l,useProxy:i,errorTTL:r}),c=Hs.get(o);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Hs.delete(o);let u=Ws.get(o);if(u)return u;let d=Us(e,i)?function(e,t){if(!t)return e;if(t.includes("{url}"))return t.replace("{urlRaw}",Ds(e)).replace("{url}",encodeURIComponent(e));if(/[?&]url=?$/.test(t))return`${t}${encodeURIComponent(e)}`;if(t.endsWith("?"))return`${t}url=${encodeURIComponent(e)}`;if(t.endsWith("/"))return`${t}${Ds(e)}`;let a=t.includes("?")?"&":"?";return`${t}${a}url=${encodeURIComponent(e)}`}(e,i):e,p=t.credentials;if(!p)try{let t=typeof location<"u"&&location.href?location.href:"http://localhost/",a=new URL(e,t);p=typeof location<"u"&&a.origin===location.origin?"include":"omit"}catch{p="omit"}let f=new AbortController,m=setTimeout((()=>f.abort("timeout")),l),v=(async()=>{try{let l=await fetch(d,{signal:f.signal,credentials:p,headers:n});if(!l.ok){let i={ok:!1,data:null,status:l.status,url:d,fromCache:!1,reason:"http_error"};if(r>0&&Hs.set(o,{until:Date.now()+r,result:i}),!s){let t=`${l.status} ${l.statusText||""}`.trim();Bs.warnOnce(`http:${l.status}:${a}:${new URL(e,(null==location?void 0:location.href)??"http://localhost/").origin}`,`HTTP error ${t} while fetching ${a} ${e}`)}return t.onError&&t.onError(i),i}if("text"===a)return{ok:!0,data:await l.text(),status:l.status,url:d,fromCache:!1};let i=await l.blob(),c=i.type||l.headers.get("content-type")||"";return"dataURL"===a?{ok:!0,data:await zs(i),status:l.status,url:d,fromCache:!1,mime:c}:{ok:!0,data:i,status:l.status,url:d,fromCache:!1,mime:c}}catch(i){let n=i&&"object"==typeof i&&"name"in i&&"AbortError"===i.name?String(i.message||"").includes("timeout")?"timeout":"abort":"network",c={ok:!1,data:null,status:0,url:d,fromCache:!1,reason:n};if(!/^blob:/i.test(e)&&r>0&&Hs.set(o,{until:Date.now()+r,result:c}),!s){let t=`${n}:${a}:${new URL(e,(null==location?void 0:location.href)??"http://localhost/").origin}`,i="timeout"===n?`Timeout after ${l}ms. Consider increasing timeout or using a proxy for ${e}`:"abort"===n?`Request aborted while fetching ${a} ${e}`:`Network/CORS issue while fetching ${a} ${e}. A proxy may be required`;Bs.errorOnce(t,i)}return t.onError&&t.onError(c),c}finally{clearTimeout(m),Ws.delete(o)}})();return Ws.set(o,v),v}var Bs,Ws,Hs,Vs=Ns((()=>{Os(),Bs=function(e="[snapDOM]",{ttlMs:t=3e5,maxEntries:a=12}={}){let l=new Map,i=0;function r(e,r,n){if(i>=a)return;let s=Date.now();(l.get(r)||0)>s||(l.set(r,s+t),i++,"warn"===e&&console&&console.warn||console&&console.error)}return{warnOnce(e,t){r("warn",e)},errorOnce(e,t){r("error",e)},reset(){l.clear(),i=0}}}("[snapDOM]",{ttlMs:18e4,maxEntries:10}),Ws=new Map,Hs=new Map}));async function js(e,t={}
2){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(e)||"none"===e.trim())return e;let a=Rs(e);if(!a)return e;let l=function(e,t){var a;if(!e||/^(data|blob|about|#)/i.test(e.trim()))return e;try{let l=t||typeof document<"u"&&(document.baseURI||(null==(a=document.location)?void 0:a.href))||"http://localhost/";return new URL(e,l).href}catch{return e}}(a),i=Ds(l);if(Is.background.has(i)){let e=Is.background.get(i);return e?`url("${e}")`:"none"}try{let e=await qs(i,{as:"dataURL",useProxy:t.useProxy});return e.ok?(Is.background.set(i,e.data),`url("${e.data}")`):(Is.background.set(i,null),"none")}catch{return Is.background.set(i,null),"none"}}var Ks=Ns((()=>{Fs(),Os(),Vs()}));function Ys(e){let t=String(e).toLowerCase();return!!(lo.has(t)||ao.test(t)||to.test(t))}function Gs(e,t){if(t=String(t||"").toLowerCase(),eo.has(t))return"";let a=[],l=function(e){if(e=String(e).toLowerCase(),eo.has(e)){let t={};return Is.defaultStyle.set(e,t),t}if(Is.defaultStyle.has(e))return Is.defaultStyle.get(e);let t=document.getElementById("snapdom-sandbox");t||(t=document.createElement("div"),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t));let a=document.createElement(e);a.style.all="initial",t.appendChild(a);let l=getComputedStyle(a),i={};for(let r of l){if(Ys(r))continue;let e=l.getPropertyValue(r);i[r]=e}return t.removeChild(a),Is.defaultStyle.set(e,i),i}(t),i="inline"===(e.display||"").toLowerCase()||new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]).has(t);for(let[r,n]of Object.entries(e)){if(Ys(r)||i&&("width"===r||"min-width"===r||"max-width"===r))continue;let e=l[r];n&&n!==e&&a.push(`${r}:${n}`)}return a.sort(),a.join(";")}function Zs(e,t=null){let a=()=>{let e={length:0,getPropertyValue:()=>"",item:()=>""};return e[Symbol.iterator]=function*(){},e};if(!(e instanceof Element)){let l=typeof window<"u"?window:null;if(l&&"function"==typeof l.getComputedStyle)try{return l.getComputedStyle(e,t)||a()}catch{return a()}return a()}let l=Is.computedStyle.get(e);l||(l=new Map,Is.computedStyle.set(e,l));let i=l.get(t);if(!i){let r=function(e){var t;try{let a=null==e?void 0:e.ownerDocument;if(!a)return typeof window<"u"?window:null;let l=a.defaultView;if(l&&"function"==typeof l.getComputedStyle)return l;if(typeof window<"u"&&window.frames)for(let e=0;e<window.frames.length;e++)try{if((null==(t=window.frames[e])?void 0:t.document)===a)return window.frames[e]}catch{}}catch{}return typeof window<"u"?window:null}(e),n=null;try{n=r&&"function"==typeof r.getComputedStyle?r.getComputedStyle(e,t):null}catch{}if(!n&&typeof window<"u"&&"function"==typeof window.getComputedStyle)try{e.ownerDocument===document&&(n=window.getComputedStyle(e,t))}catch{}i=n||a(),l.set(t,i)}return i}function Xs(e){let t={};for(let a of e)t[a]=e.getPropertyValue(a);return t}function Qs(e){let t=[],a=0,l=0;for(let i=0;i<e.length;i++){let r=e[i];"("===r&&a++,")"===r&&a--,","===r&&0===a&&(t.push(e.slice(l,i).trim()),l=i+1)}return t.push(e.slice(l).trim()),t}var Js,eo,to,ao,lo,io=Ns((()=>{Fs(),Js=new Set(["meta","script","noscript","title","link","template"]),eo=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),to=/(?:^|-)(animation|transition)(?:-|$)/i,ao=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,lo=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom"])}));function ro(e,{fast:t=!1}={}){if(t)return e();"requestIdleCallback"in window?requestIdleCallback(e,{timeout:50}):setTimeout(e,1)}function no(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||"",t=e.toLowerCase(),a=t.includes("safari")&&!t.includes("chrome")&&!t.includes("crios")&&!t.includes("fxios")&&!t.includes("android"),l=/applewebkit/i.test(e),i=/mobile/i.test(e),r=!/safari/i.test(e),n=l&&i&&r,s=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(e),o=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(t),c=/ipad|iphone|ipod/.test(t)&&l;
2return a||n||s||o||c}var so=Ns((()=>{}));function oo(e,t,a){let l=e&&"object"==typeof e&&(e.options||e);l&&l.debug}var co=Ns((()=>{})),uo=Ns((()=>{Ks(),io(),so(),Os(),co()})),po={};function fo(e){let t=function(e){let t=[],a="",l=0;for(let i=0;i<e.length;i++){let r=e[i];"("===r&&l++,")"===r&&(l=Math.max(0,l-1)),";"===r&&0===l?(t.push(a),a=""):a+=r}return a.trim()&&t.push(a),t.map((e=>e.trim())).filter(Boolean)}(e),a=null,l=null,i=null,r=[];for(let s of t){let e=s.indexOf(":");if(e<0)continue;let t=s.slice(0,e).trim().toLowerCase(),n=s.slice(e+1).trim();"box-shadow"===t?i=n:"filter"===t?a=n:"-webkit-filter"===t?l=n:r.push([t,n])}if(i){let e=function(e){let t=[],a="",l=0;for(let r=0;r<e.length;r++){let i=e[r];"("===i&&l++,")"===i&&(l=Math.max(0,l-1)),","===i&&0===l?(t.push(a.trim()),a=""):a+=i}a.trim()&&t.push(a.trim());let i=[];for(let r of t){if(/\binset\b/i.test(r))continue;let e=r.match(/-?\d+(?:\.\d+)?px/gi)||[],[t="0px",a="0px",l="0px"]=e,n=r.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/gi,"").trim().replace(/\s{2,}/g," "),s=!!n&&","!==n;i.push(`drop-shadow(${t} ${a} ${l}${s?` ${n}`:""})`)}return i.join(" ")}(i);e&&(a=a?`${a} ${e}`:e,l=l?`${l} ${e}`:e)}let n=[...r];return a&&n.push(["filter",a]),l&&n.push(["-webkit-filter",l]),n.map((([e,t])=>`${e}:${t}`)).join(";")}function mo(e){return e=(e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,((e,t)=>e.replace(t,function(e){return e.replace(/([^{}]+)\{([^}]*)\}/g,((e,t,a)=>`${t}{${fo(a)}}`))}(t))))).replace(/style=(['"])([\s\S]*?)\1/gi,((e,t,a)=>`style=${t}${fo(a)}${t}`))}function vo(e){if(!no()||!function(e){return"string"==typeof e&&/^data:image\/svg\+xml/i.test(e)}(e))return e;try{let t=function(e){let t=e.indexOf(",");return t>=0?decodeURIComponent(e.slice(t+1)):""}(e);return function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}(mo(t))}catch{return e}}async function ho(e,t){let{width:a,height:l,scale:i=1,dpr:r=1,meta:n={},backgroundColor:s}=t;e=vo(e);let o=new Image;o.loading="eager",o.decoding="sync",o.crossOrigin="anonymous",o.src=e,await o.decode();let c,u,d=o.naturalWidth,p=o.naturalHeight,f=Number.isFinite(n.w0)?n.w0:d,m=Number.isFinite(n.h0)?n.h0:p,v=Number.isFinite(a),h=Number.isFinite(l);if(v&&h)c=Math.max(1,a),u=Math.max(1,l);else if(v){c=a,u=m*(a/Math.max(1,f))}else if(h){u=l,c=f*(l/Math.max(1,m))}else c=d,u=p;c*=i,u*=i;let g=document.createElement("canvas");g.width=c*r,g.height=u*r,g.style.width=`${c}px`,g.style.height=`${u}px`;let y=g.getContext("2d");return 1!==r&&y.scale(r,r),s&&(y.save(),y.fillStyle=s,y.fillRect(0,0,c,u),y.restore()),y.drawImage(o,0,0,c,u),g}Ls(po,{toCanvas:()=>ho});var go=Ns((()=>{so()})),yo={};async function bo(e,t){let a=await ho(e,t),l=new Image;return l.src=a.toDataURL(`image/${t.format}`,t.quality),await l.decode(),l.style.width=a.width/t.dpr+"px",l.style.height=a.height/t.dpr+"px",l}Ls(yo,{rasterize:()=>bo});var _o=Ns((()=>{go()})),wo={};async function ko(e,t){let{scale:a=1,width:l,height:i,meta:r={}}=t,n=Number.isFinite(l),s=Number.isFinite(i),o=Number.isFinite(a)&&1!==a||n||s;if(no()&&o)return await bo(e,{...t,format:"png",quality:1,meta:r});let c=new Image;if(c.decoding="sync",c.loading="eager",c.src=e,await c.decode(),n&&s)c.style.width=`${l}px`,c.style.height=`${i}px`;else if(n){let e=Number.isFinite(r.w0)?r.w0:c.naturalWidth,t=Number.isFinite(r.h0)?r.h0:c.naturalHeight,a=l/Math.max(1,e);c.style.width=`${l}px`,c.style.height=`${Math.round(t*a)}px`}else if(s){let e=Number.isFinite(r.w0)?r.w0:c.naturalWidth,t=Number.isFinite(r.h0)?r.h0:c.naturalHeight,a=i/Math.max(1,t);c.style.height=`${i}px`,c.style.width=`${Math.round(e*a)}px`}else{let l=Math.round(c.naturalWidth*a),i=Math.round(c.naturalHeight*a);if(c.style.width=`${l}px`,c.style.height=`${i}px`,"string"==typeof e&&e.startsWith("data:image/svg+xml"))try{let t=decodeURIComponent(e.split(",")[1]).replace(/width="[^"]*"/,`width="${l}"`).replace(/height="[^"]*"/,`height="${i}"`);e=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,c.src=e}catch(u){oo(t)}}return c}Ls(wo,{toImg:()=>ko,toSvg:()=>ko});var xo=Ns((()=>{uo(),_o()})),So={};async function Co(e,t){let a=t.type;if("svg"===a){let t=decodeURIComponent(e.split(",")[1]);return new Blob([t],{type:"image/svg+xml"})}let l=await ho(e,t);return new Promise((e=>l.toBlob((t=>e(t)),`image/${a}`,t.quality)))}Ls(So,{toBlob:()=>Co});var $o=Ns((()=>{go()})),Mo={};async function Po(e,t){var a;let l=new File([e],t,{type:e.type});if(!(null==(a=navigator.canShare)?void 0:a.call(navigator,{files:[l]})))return!1;try{await navigator.share({files:[l],title:t})}catch(i){if("AbortError"!==i.name)return!1}return!0}async function Ao(e,t){let a=new Set(["png","jpeg","jpg","webp","svg"]),l=((null==t?void 0:t.type)||"").toLowerCase(),i=a.has(l)?l:"",r=((null==t?void 0:t.format)||i||"").toLowerCase(),n="jpg"===r?"jpeg":r||"png",s=(null==t?void 0:t.filename)||`snapdom.${n}`,o={...t||{},format:n,type:n};o.dpr=1;let c=function(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return"iOS"===navigator.userAgentData.platform;let e=navigator.userAgent||"",t=/iPhone|iPad|iPod/.test(e),a=navigator.maxTouchPoints>2&&/Macintosh/.test(e);return t||a}();if("svg"===n){let t=await Co(e,{...o,type:"svg"});if(c&&await Po(t,s))return;
2let a=URL.createObjectURL(t),l=document.createElement("a");return l.href=a,l.download=s,document.body.appendChild(l),l.click(),URL.revokeObjectURL(a),void l.remove()}let u=await ho(e,o);if(c){let e=`image/${n}`,a=await new Promise((a=>u.toBlob(a,e,null==t?void 0:t.quality)));if(a&&await Po(a,s))return}let d=document.createElement("a");d.href=u.toDataURL(`image/${n}`,null==t?void 0:t.quality),d.download=s,document.body.appendChild(d),d.click(),d.remove()}Ls(Mo,{download:()=>Ao});var To=Ns((()=>{$o(),go(),so()}));uo(),uo(),Fs();var No=new WeakMap,Lo=new Map,Eo=0;function Io(){Eo++,Lo.size>2e3&&Lo.clear()}var Fo=!1;var Ro=new WeakMap;function Do(e,t=null,a={}){let l=No.get(e);if(l&&l.epoch===Eo)return l.snapshot;let i=t||getComputedStyle(e),r=function(e,t={}){let a={},l=e.getPropertyValue("visibility"),i=t.excludeStyleProps;for(let d=0;d<e.length;d++){let t=e[d];if(Ys(t)||i&&(i instanceof RegExp&&i.test(t)||"function"==typeof i&&i(t)))continue;let l=e.getPropertyValue(t);("background-image"===t||"content"===t)&&l.includes("url(")&&!l.includes("data:")&&(l="none"),a[t]=l}let r=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let d of r)if(!a[d])try{let t=e.getPropertyValue(d);t&&(a[d]=t)}catch{}let n=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let d of n)if(!a[d])try{let t=e.getPropertyValue(d);t&&(a[d]=t)}catch{}if(t.embedFonts){let t=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let l of t)if(!a[l])try{let t=e.getPropertyValue(l);t&&(a[l]=t)}catch{}}"hidden"===l&&(a.opacity="0");try{"hidden"===(a["content-visibility"]||e.getPropertyValue("content-visibility"))&&(a.visibility="hidden")}catch{}let s=parseFloat(e.getPropertyValue("border-top-width")||0)||0,o=parseFloat(e.getPropertyValue("border-right-width")||0)||0,c=parseFloat(e.getPropertyValue("border-bottom-width")||0)||0,u=parseFloat(e.getPropertyValue("border-left-width")||0)||0;if(0===s&&0===o&&0===c&&0===u){let t=(e.getPropertyValue("border-image-source")||"").trim(),l=t&&"none"!==t,i=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color"];for(let e of i)delete a[e];l||(a.border="none")}return a}(i,a);return function(e,t,a){if(e instanceof HTMLElement&&e.style&&e.style.height)return;let l=e.tagName&&e.tagName.toLowerCase();if(!l||!["div","section","article","main","aside","header","footer","nav"].includes(l))return;let i=parseFloat(t.height);if(Number.isFinite(i)&&e.scrollHeight>0&&Math.abs(i-e.scrollHeight)>2||t.aspectRatio&&"none"!==t.aspectRatio&&"auto"!==t.aspectRatio)return;let r=t.display||"";if(r.includes("flex")||r.includes("grid")||function(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLIFrameElement||e instanceof SVGElement||e instanceof HTMLObjectElement||e instanceof HTMLEmbedElement}(e))return;let n=t.position;if("absolute"===n||"fixed"===n||"sticky"===n||"none"!==t.transform||function(e){return!!(e.backgroundImage&&"none"!==e.backgroundImage||e.backgroundColor&&"rgba(0, 0, 0, 0)"!==e.backgroundColor&&"transparent"!==e.backgroundColor||(parseFloat(e.borderTopWidth)||0)>0||(parseFloat(e.borderBottomWidth)||0)>0||(parseFloat(e.paddingTop)||0)>0||(parseFloat(e.paddingBottom)||0)>0)||"visible"!==(e.overflowBlock||e.overflowY||"visible")}(t)||function(e){let t=e.parentElement;if(!t)return!1;let a=getComputedStyle(t).display||"";return a.includes("flex")||a.includes("grid")}(e))return;let s=t.overflowX||t.overflow||"visible",o=t.overflowY||t.overflow||"visible";if("visible"!==s||"visible"!==o)return;let c=t.clip;c&&"auto"!==c&&"rect(auto, auto, auto, auto)"!==c||"hidden"===t.visibility||"0"===t.opacity||function(e,t){if(e.textContent&&/\S/.test(e.textContent))return!0;let a=e.firstElementChild,l=e.lastElementChild;if(a&&"BR"===a.tagName||l&&"BR"===l.tagName)return!0;let i=e.scrollHeight;if(0===i)return!1;let r=parseFloat(t.paddingTop)||0,n=parseFloat(t.paddingBottom)||
20;return i>r+n}(e,t)&&(delete a.height,delete a["block-size"])}(e,i,r),No.set(e,{epoch:Eo,snapshot:r}),r}async function Oo(e,t,a,l){var i,r;if("STYLE"===e.tagName)return;let n=function(e,t){return e&&e.session&&e.persist?e:e&&(e.styleMap||e.styleCache||e.nodeMap)?{session:e,persist:{snapshotKeyCache:Lo,defaultStyle:Is.defaultStyle,baseStyle:Is.baseStyle,image:Is.image,resource:Is.resource,background:Is.background,font:Is.font},options:t||{}}:{session:Is.session,persist:{snapshotKeyCache:Lo,defaultStyle:Is.defaultStyle,baseStyle:Is.baseStyle,image:Is.image,resource:Is.resource,background:Is.background,font:Is.font},options:e||t||{}}}(a,l),s=n.options&&n.options.cache||"auto";"disabled"!==s&&function(e=document.documentElement){var t,a;if(!Fo){Fo=!0;try{new MutationObserver((()=>Io())).observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver((()=>Io())).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let e=document.fonts;e&&(null==(t=e.addEventListener)||t.call(e,"loadingdone",Io),null==(a=e.ready)||a.then((()=>Io())).catch((()=>{})))}catch{}}}(document.documentElement),"disabled"===s&&!n.session.__bumpedForDisabled&&(Io(),Lo.clear(),n.session.__bumpedForDisabled=!0);let{session:o,persist:c}=n;if(!o.styleCache.has(e)){let t=null;try{t=getComputedStyle(e)}catch{}o.styleCache.set(e,t||getComputedStyle(document.documentElement))}let u=o.styleCache.get(e);(null==(i=e.getAttribute)?void 0:i.call(e,"style"))&&function(e,t,a){if(e.style&&0!==e.style.length)for(let l=0;l<e.style.length;l++){let i=e.style[l],r=a.getPropertyValue(i);r&&t.style.setProperty(i,r)}}(e,t,u);let d=Do(e,u,n.options),p=function(e){let t=Ro.get(e);return t||(t=Object.entries(e).sort(((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0)).map((([e,t])=>`${e}:${t}`)).join(";"),Ro.set(e,t),t)}(d),f=c.snapshotKeyCache.get(p);if(!f){f=Gs(d,(null==(r=e.tagName)?void 0:r.toLowerCase())||"div"),c.snapshotKeyCache.set(p,f)}o.styleMap.set(t,f)}io();var Uo=["fill","stroke","color","background-color","stop-color"],zo=new Map;function qo(e,t){var a,l,i;if(!(e instanceof Element&&t instanceof Element))return;let r=null==(a=e.getAttribute)?void 0:a.call(e,"style"),n=!(!r||!r.includes("var("));if(!n&&(null==(l=e.attributes)?void 0:l.length)){let t=e.attributes;for(let e=0;e<t.length;e++){let a=t[e];if(a&&"string"==typeof a.value&&a.value.includes("var(")){n=!0;break}}}let s=null;if(n)try{s=getComputedStyle(e)}catch{}if(n){let a=e.style;if(a&&a.length){let e=new Set;for(let l=0;l<a.length;l++){let i=a[l];if(e.has(i))continue;e.add(i);let r=a.getPropertyValue(i);if(!r||!r.includes("var("))continue;let n=s&&s.getPropertyValue(i);if(n)try{t.style.setProperty(i,n.trim(),a.getPropertyPriority(i))}catch{}}}}if(n&&(null==(i=e.attributes)?void 0:i.length)){let a=e.attributes;for(let e=0;e<a.length;e++){let l=a[e];if(!l||"string"!=typeof l.value||!l.value.includes("var("))continue;let i=l.name,r=s&&s.getPropertyValue(i);if(r)try{t.style.setProperty(i,r.trim())}catch{}}}if(!n){if(!s)try{s=getComputedStyle(e)}catch{s=null}if(!s)return;let a=e.namespaceURI||"html",l=function(e,t){let a=t+"::"+e.toLowerCase(),l=zo.get(a);if(l)return l;let i=document,r="http://www.w3.org/2000/svg"===t?i.createElementNS(t,e):i.createElement(e),n=i.createElement("div");n.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",n.appendChild(r),i.documentElement.appendChild(n);let s=getComputedStyle(r),o={};for(let c of Uo)o[c]=s.getPropertyValue(c)||"";return n.remove(),zo.set(a,o),o}(e.tagName,a);for(let e of Uo){let a=s.getPropertyValue(e)||"",i=l[e]||"";if(a&&a!==i)try{t.style.setProperty(e,a.trim())}catch{}}}}function Bo(e,t,a){return Promise.all(e.map((e=>new Promise((l=>{!function i(){ro((a=>{!a||"function"!=typeof a.timeRemaining||a.timeRemaining()>0?t(e,l):i()}),{fast:a})}()})))))}function Wo(e,t){return e?e=(e=(e=(e=(e=e.replace(/:host\(([^)]+)\)/g,((e,a)=>`:where(${t}:is(${a.trim()}))`))).replace(/:host\b/g,`:where(${t})`)).replace(/:host-context\(([^)]+)\)/g,((e,a)=>`:where(:where(${a.trim()}) ${t})`))).replace(/::slotted\(([^)]+)\)/g,((e,a)=>`:where(${t} ${a.trim()})`))).replace(/(^|})(\s*)([^@}{]+){/g,((e,a,l,i)=>{let r=function(e,t,a=!0){return e.split(",").map((e=>
2e.trim())).filter(Boolean).map((e=>{if(e.startsWith(":where(")||e.startsWith("@"))return e;let l=a?function(e){return!(e=e.trim())||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(e)?e:`${e}:not([data-sd-slotted])`}(e):e;return`:where(${t} ${l})`})).join(", ")}(i,t,!0);return`${a}${l}${r}{`})):""}function Ho(e,t){try{let a=getComputedStyle(e).getPropertyValue(t).trim();if(a)return a}catch{}try{let e=getComputedStyle(document.documentElement).getPropertyValue(t).trim();if(e)return e}catch{}return""}function Vo(e){let t=0,a=0;if(e.offsetWidth>0&&(t=e.offsetWidth),e.offsetHeight>0&&(a=e.offsetHeight),0===t||0===a)try{let l=getComputedStyle(e);if(0===t){let e=parseFloat(l.width);!isNaN(e)&&e>0&&(t=e)}if(0===a){let e=parseFloat(l.height);!isNaN(e)&&e>0&&(a=e)}}catch{}if(0===t||0===a)try{if(0===t){let a=parseFloat(e.getAttribute("width"));!isNaN(a)&&a>0&&(t=a)}if(0===a){let t=parseFloat(e.getAttribute("height"));!isNaN(t)&&t>0&&(a=t)}}catch{}if((0===t||0===a)&&(e.naturalWidth||e.naturalHeight))try{0===t&&e.naturalWidth>0&&(t=e.naturalWidth),0===a&&e.naturalHeight>0&&(a=e.naturalHeight)}catch{}return{width:t,height:a}}async function jo(e,t,a){let l=await async function(e,t=3){let a=()=>{var t;try{return e.contentDocument||(null==(t=e.contentWindow)?void 0:t.document)||null}catch{return null}},l=a(),i=0;for(;i<t&&(!l||!l.body&&!l.documentElement);)await new Promise((e=>setTimeout(e,0))),l=a(),i++;return l&&(l.body||l.documentElement)?l:null}(e,3);if(!l)throw new Error("iframe document not accessible/ready");let{contentWidth:i,contentHeight:r,rect:n}=function(e){let t=e.getBoundingClientRect(),a=0,l=0,i=0,r=0;try{let t=getComputedStyle(e);a=parseFloat(t.borderLeftWidth)||0,l=parseFloat(t.borderRightWidth)||0,i=parseFloat(t.borderTopWidth)||0,r=parseFloat(t.borderBottomWidth)||0}catch{}return{contentWidth:Math.max(0,Math.round(t.width-(a+l))),contentHeight:Math.max(0,Math.round(t.height-(i+r))),rect:t}}(e),s=null==a?void 0:a.snap;if(!s&&typeof window<"u"&&window.snapdom&&(s=window.snapdom),!s||"function"!=typeof s.toPng)throw new Error("[snapdom] iframe capture requires snapdom.toPng. Use snapdom(el) or pass options.snap. With ESM, assign window.snapdom = snapdom after import if using iframes.");let o,c={...a,scale:1},u=function(e,t,a){let l=e.createElement("style");return l.setAttribute("data-sd-iframe-pin",""),l.textContent=`html, body {margin: 0 !important;padding: 0 !important;width: ${t}px !important;height: ${a}px !important;min-width: ${t}px !important;min-height: ${a}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(e.head||e.documentElement).appendChild(l),()=>{try{l.remove()}catch{}}}(l,i,r);try{o=await s.toPng(l.documentElement,c)}finally{u()}o.style.display="block",o.style.width=`${i}px`,o.style.height=`${r}px`;let d=document.createElement("div");return t.nodeMap.set(d,e),Oo(e,d,t,a),d.style.overflow="hidden",d.style.display="block",d.style.width||(d.style.width=`${Math.round(n.width)}px`),d.style.height||(d.style.height=`${Math.round(n.height)}px`),d.appendChild(o),d}uo(),uo(),Fs(),Vs();var Ko=new Es(80);async function Yo(e){var t;if(null==(t=Is.resource)?void 0:t.has(e))return Is.resource.get(e);if(Ko.has(e))return Ko.get(e);let a=(async()=>{var t;let a=await qs(e,{as:"dataURL",silent:!0});if(!a.ok||"string"!=typeof a.data)throw new Error(`[snapDOM] Failed to read blob URL: ${e}`);return null==(t=Is.resource)||t.set(e,a.data),a.data})();Ko.set(e,a);try{let t=await a;return Ko.set(e,t),t}catch(l){throw Ko.delete(e),l}}var Go=/\bblob:[^)"'\s]+/g;async function Zo(e){if(!e||-1===e.indexOf("blob:"))return e;let t=Array.from(new Set(e.match(Go)||[]));if(0===t.length)return e;let a=e;for(let l of t)try{let e=await Yo(l);a=a.split(l).join(e)}catch{}return a}function Xo(e){return"string"==typeof e&&e.startsWith("blob:")}function Qo(e){return(e||"").split(",").map((e=>e.trim())).filter(Boolean).map((e=>{let t=e.match(/^(\S+)(\s+.+)?$/);return t?{url:t[1],desc:t[2]||""}:null})).filter(Boolean)}function Jo(e){return e.map((e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url)).join(", ")}
vendor: 9,181 bytes, line 2
2async function ec(e,t,a){var l,i,r,n,s,o,c,u,d;if(!e)throw new Error("Invalid node");let p,f=new Set,m=null,v=null;if(e.nodeType===Node.ELEMENT_NODE){let a=(e.localName||e.tagName||"").toLowerCase();if("snapdom-sandbox"===e.id||e.hasAttribute("data-snapdom-sandbox")||Js.has(a))return null;if("foreignobject"===a&&(null==(i=null==(l=e.parentElement)?void 0:l.closest)?void 0:i.call(l,"foreignObject")))return oo(t),null}if(e.nodeType===Node.TEXT_NODE||e.nodeType!==Node.ELEMENT_NODE)return e.cloneNode(!0);if("exclude"===e.getAttribute("data-capture")){if("hide"===a.excludeMode){let t=document.createElement("div"),{width:a,height:l}=Vo(e),i=a||e.getBoundingClientRect().width||0,r=l||e.getBoundingClientRect().height||0;return t.style.cssText=`display:inline-block;width:${i}px;height:${r}px;visibility:hidden;`,t}if("remove"===a.excludeMode)return null}if(a.exclude&&Array.isArray(a.exclude))for(let w of a.exclude)try{if(null==(r=e.matches)?void 0:r.call(e,w)){if("hide"===a.excludeMode){let t=document.createElement("div"),{width:a,height:l}=Vo(e),i=a||e.getBoundingClientRect().width||0,r=l||e.getBoundingClientRect().height||0;return t.style.cssText=`display:inline-block;width:${i}px;height:${r}px;visibility:hidden;`,t}if("remove"===a.excludeMode)return null}}catch(y){}if("function"==typeof a.filter)try{if(!a.filter(e)){if("hide"===a.filterMode){let t=document.createElement("div"),{width:a,height:l}=Vo(e),i=a||e.getBoundingClientRect().width||0,r=l||e.getBoundingClientRect().height||0;return t.style.cssText=`display:inline-block;width:${i}px;height:${r}px;visibility:hidden;`,t}if("remove"===a.filterMode)return null}}catch(b){}if("IFRAME"===e.tagName){let l=!1;try{l=!(!e.contentDocument&&!(null==(n=e.contentWindow)?void 0:n.document))}catch(y){oo(t)}if(l)try{return await jo(e,t,a)}catch(y){}if(a.placeholders){let{width:l,height:i}=Vo(e),r=document.createElement("div");return r.style.cssText=`width:${l}px;height:${i}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,Oo(e,r,t,a),r}{let{width:l,height:i}=Vo(e),r=document.createElement("div");return r.style.cssText=`display:inline-block;width:${l}px;height:${i}px;visibility:hidden;`,Oo(e,r,t,a),r}}if("placeholder"===e.getAttribute("data-capture")){let l=e.cloneNode(!1);t.nodeMap.set(l,e),Oo(e,l,t,a);let i=document.createElement("div");return i.textContent=e.getAttribute("data-placeholder-text")||"",i.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",l.appendChild(i),l}if("CANVAS"===e.tagName){let l="";try{let t=e.getContext("2d",{willReadFrequently:!0});try{t&&t.getImageData(0,0,1,1)}catch{}if(await new Promise((e=>requestAnimationFrame(e))),l=e.toDataURL("image/png"),!l||"data:,"===l){try{t&&t.getImageData(0,0,1,1)}catch{}if(await new Promise((e=>requestAnimationFrame(e))),l=e.toDataURL("image/png"),!l||"data:,"===l){let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let a=t.getContext("2d");a&&(a.drawImage(e,0,0),l=t.toDataURL("image/png"))}}}catch(_){oo(t)}let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch(_){oo(t)}l&&(i.src=l),i.width=e.width,i.height=e.height;let{width:r,height:n}=Vo(e);return r>0&&(i.style.width=`${r}px`),n>0&&(i.style.height=`${n}px`),t.nodeMap.set(i,e),Oo(e,i,t,a),i}if("VIDEO"===e.tagName){let l="";try{let t=document.createElement("canvas");t.width=e.videoWidth||e.offsetWidth||320,t.height=e.videoHeight||e.offsetHeight||240;let a=t.getContext("2d");a&&(a.drawImage(e,0,0,t.width,t.height),l=t.toDataURL("image/png"),(!l||"data:,"===l)&&(l=""))}catch(_){oo(t)}let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch{}l?i.src=l:e.poster&&(i.src=e.poster),i.width=e.videoWidth||e.offsetWidth||0,i.height=e.videoHeight||e.offsetHeight||0;let{width:r,height:n}=Vo(e);return r>0&&(i.style.width=`${r}px`),n>0&&(i.style.height=`${n}px`),i.style.objectFit="contain",t.nodeMap.set(i,e),Oo(e,i,t,a),i}try{if(p=e.cloneNode(!1),null==(s=p.attributes)?void 0:s.length)try{for(let e of p.attributes)/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(e.value)&&p.setAttribute(e.name,e.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,""))}catch{}if(qo(e,p),t.nodeMap.set(p,e),"IMG"===e.tagName){!function(e,t){try{let a=e.currentSrc||e.src||"";if(!a)return;t.setAttribute("src",a),t.removeAttribute("srcset"),t.removeAttribute("sizes"),t.loading="eager",t.decoding="sync"}catch{}}(e,p);try{let{width:t,height:a}=Vo(e),l=Math.round(t||0),i=Math.round(a||0);l&&(p.dataset.snapdomWidth=String(l)),i&&(p.dataset.snapdomHeight=String(i))}catch(b){oo(t)}try{let t=e.getAttribute("style")||"",a=window.getComputedStyle(e),l=e=>{let l=t.match(new RegExp(`${e}\\s*:\\s*([^;]+)`,"i")),i=l?l[1].trim():a.getPropertyValue(e);return/%|auto/i.test(String(i||""))},i=parseInt(p.dataset.snapdomWidth||"0",10),r=parseInt(p.dataset.snapdomHeight||"0",10),n=l("width")||!i,s=l("height")||!r;n&&i&&(p.style.width=`${i}px`),s&&r&&(p.style.height=`${r}px`);let o=a.getPropertyValue("object-fit"),c=a.getPropertyValue("object-position");o&&"fill"!==o?(p.style.objectFit=o,c&&(p.style.objectPosition=c)):(i&&(p.style.minWidth=`${i}px`),r&&(p.style.minHeight=`${r}px`))}catch(b){oo(t)}}}catch(b){throw b}let h=null;if(e instanceof HTMLTextAreaElement){let{width:t,height:a}=Vo(e),l=t||e.getBoundingClientRect().width||0,i=a||e.getBoundingClientRect().height||0;l&&(p.style.width=`${l}px`),i&&(p.style.height=`${i}px`)}if(e instanceof HTMLInputElement){let a=(e.type||"text").toLowerCase();if("checkbox"!==a&&"radio"!==a||!function(){if(typeof navigator>"u")return!1;let e=(navigator.userAgent||"").toLowerCase();return e.includes("firefox")||e.includes("fxios")}())p.value=e.value,p.setAttribute("value",e.value),void 0!==e.checked&&(p.checked=e.checked,e.checked&&p.setAttribute("checked",""),e.indeterminate&&(p.indeterminate=e.indeterminate));else{let{el:a,applyVisual:l}=function(e){let t,{width:a,height:l}=Vo(e),i=e.getBoundingClientRect();try{t=window.getComputedStyle(e)}catch{}let r=t?parseFloat(t.width):NaN,n=t?parseFloat(t.height):NaN,s=Math.round(a||i.width||0),o=Math.round(l||i.height||0),c=Number.isFinite(r)&&r>0?Math.round(r):Math.max(12,s||16),u=Number.isFinite(n)&&n>0?Math.round(n):Math.max(12,o||16),d="checkbox"===(e.type||"text").toLowerCase(),p=!!e.checked,f=!!e.indeterminate,m=Math.max(Math.min(c,u),12),v="middle";try{t&&t.verticalAlign&&(v=t.verticalAlign)}catch{}let h=document.createElement("div");h.setAttribute("data-snapdom-input-replacement",e.type||"checkbox"),h.style.cssText=`display:inline-block;width:${m}px;height:${m}px;vertical-align:${v};flex-shrink:0;line-height:0;`;let g=document.createElementNS("http://www.w3.org/2000/svg","svg");function y(){let e="#0a6ed1";try{t&&(e=t.accentColor||t.color||e)}catch{}let a=m-2;if(g.innerHTML="",d){let t=document.createElementNS("http://www.w3.org/2000/svg","rect");if(t.setAttribute("x",String(1)),t.setAttribute("y",String(1)),t.setAttribute("width",String(a)),t.setAttribute("height",String(a)),t.setAttribute("rx","2"),t.setAttribute("ry","2"),t.setAttribute("fill",p?e:"none"),t.setAttribute("stroke",e),t.setAttribute("stroke-width",String(2)),g.appendChild(t),p){let e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",`M 3 ${m/2} L ${m/2-1} ${m-1-2} L ${m-1-2} 3`),e.setAttribute("stroke","white"),e.setAttribute("stroke-width",String(Math.max(1.5,2))),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),g.appendChild(e)}else if(f){let t=document.createElementNS("http://www.w3.org/2000/svg","rect"),l=Math.max(6,a-4);t.setAttribute("x",String((m-l)/2)),t.setAttribute("y",String((m-2)/2)),t.setAttribute("width",String(l)),t.setAttribute("height",String(2)),t.setAttribute("fill",e),t.setAttribute("rx","1"),g.appendChild(t)}}else{let t=document.createElementNS("http://www.w3.org/2000/svg","circle");if(t.setAttribute("cx",String(m/2)),t.setAttribute("cy",String(m/2)),t.setAttribute("r",String((m-2)/2)),t.setAttribute("fill",p?e:"none"),t.setAttribute("stroke",e),t.setAttribute("stroke-width",String(2)),g.appendChild(t),p){let e=document.createElementNS("http://www.w3.org/2000/svg","circle"),t=Math.max(2,.35*(m-4));e.setAttribute("cx",String(m/2)),e.setAttribute("cy",String(m/2)),e.setAttribute("r",String(t)),e.setAttribute("fill","white"),g.appendChild(e)}}h.style.setProperty("width",`${m}px`,"important"),h.style.setProperty("height",`${m}px`,"important"),h.style.setProperty("min-width",`${m}px`,"important"),h.style.setProperty("min-height",`${m}px`,"important")}return g.setAttribute("width",String(m)),g.setAttribute("height",String(m)),g.setAttribute("viewBox",`0 0 ${m} ${m}`),h.appendChild(g),y(),{el:h,applyVisual:y}}(e);t.nodeMap.set(a,e),h=l,p=a}}if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&!e.value&&e.placeholder)try{let t=window.getComputedStyle(e,"::placeholder"),a=t&&t.color;if(a&&"rgba(0, 0, 0, 0)"!==a){let e="snapdom-ph-"+(1e6*Math.random()|0);p.classList.add(e);
2let l=document.createElement("style");l.textContent=`.${e}::placeholder{color:${a}!important;opacity:${t.opacity||"1"}!important;}`,p.prepend(l)}}catch{}if(e instanceof HTMLSelectElement&&(m=e.value),e instanceof HTMLTextAreaElement&&(v=e.value),e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){e.disabled&&p.setAttribute("disabled",""),e.required&&p.setAttribute("required",""),e.readOnly&&p.setAttribute("readonly","");let t=e;void 0!==t.min&&""!==t.min&&p.setAttribute("min",t.min),void 0!==t.max&&""!==t.max&&p.setAttribute("max",t.max),void 0!==t.pattern&&""!==t.pattern&&p.setAttribute("pattern",t.pattern);let a=e.getAttribute("aria-invalid");null!==a&&p.setAttribute("aria-invalid",a)}if(Oo(e,p,t,a),h&&h(),e instanceof SVGElement){let t=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display"];try{let a=window.getComputedStyle(e);for(let e of t){let t=a.getPropertyValue(e);t&&p.style.setProperty(e,t)}}catch{}}if(e.shadowRoot){let l=function(e,l){if(e.nodeType===Node.ELEMENT_NODE&&"STYLE"===e.tagName)return l(null);ec(e,t,a).then((e=>{l(e||null)})).catch((()=>{l(null)}))};try{let t=e.shadowRoot.querySelectorAll("slot");for(let e of t){let t=[];try{t=(null==(o=e.assignedNodes)?void 0:o.call(e,{flatten:!0}))||(null==(c=e.assignedNodes)?void 0:c.call(e))||[]}catch{t=(null==(u=e.assignedNodes)?void 0:u.call(e))||[]}for(let e of t)f.add(e)}}catch{}let i=function(e){return e.shadowScopeSeq=(e.shadowScopeSeq||0)+1,`s${e.shadowScopeSeq}`}(t),r=`[data-sd="${i}"]`;try{p.setAttribute("data-sd",i)}catch{}let n=function(e){let t="";try{e.querySelectorAll("style").forEach((e=>{t+=(e.textContent||"")+"\n"}));let a=e.adoptedStyleSheets||[];for(let e of a)try{if(e&&e.cssRules)for(let a of e.cssRules)t+=a.cssText+"\n"}catch{}}catch{}return t}(e.shadowRoot),s=Wo(n,r),d=function(e){let t=new Set;if(!e)return t;let a,l=/var\(\s*(--[A-Za-z0-9_-]+)\b/g;for(;a=l.exec(e);)t.add(a[1]);return t}(n),m=function(e,t,a){let l=[];for(let i of t){let t=Ho(e,i);t&&l.push(`${i}: ${t};`)}return l.length?`${a}{${l.join("")}}\n`:""}(e,d,r);!function(e,t,a){if(!t)return;let l=document.createElement("style");l.setAttribute("data-sd",a),l.textContent=t,e.insertBefore(l,e.firstChild||null)}(p,m+s,i);let v=document.createDocumentFragment(),h=await Bo(Array.from(e.shadowRoot.childNodes),l,a.fast);v.append(...h.filter((e=>!!e))),p.appendChild(v)}if("SLOT"===e.tagName){let l=function(e,l){ec(e,t,a).then((e=>{e&&function(e){e&&(e.nodeType===Node.ELEMENT_NODE&&e.setAttribute("data-sd-slotted",""),e.querySelectorAll&&e.querySelectorAll("*").forEach((e=>e.setAttribute("data-sd-slotted",""))))}(e),l(e||null)})).catch((()=>{l(null)}))},i=(null==(d=e.assignedNodes)?void 0:d.call(e,{flatten:!0}))||[],r=i.length>0?i:Array.from(e.childNodes),n=document.createDocumentFragment(),s=await Bo(Array.from(r),l,a.fast);return n.append(...s.filter((e=>!!e))),n}let g=await Bo(Array.from(e.childNodes),(function(e,l){if(f.has(e))return l(null);ec(e,t,a).then((e=>{l(e||null)})).catch((()=>{l(null)}))}),a.fast);if(p.append(...g.filter((e=>!!e))),null!==m&&p instanceof HTMLSelectElement){p.value=m;for(let e of p.options)e.value===m?e.setAttribute("selected",""):e.removeAttribute("selected")}return null!==v&&p instanceof HTMLTextAreaElement&&(p.textContent=v),p}so(),uo(),Os(),Fs();var tc=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],ac=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.
2com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{}),lc=[];function ic(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rc(e){let t="string"==typeof e?e:"",a=[...tc,...lc];for(let l of a)if(l instanceof RegExp&&l.test(t))return!0;return!!(/icon/i.test(t)||/glyph/i.test(t)||/symbols/i.test(t)||/feather/i.test(t)||/fontawesome/i.test(t))}function nc(e=""){let t=String(e).toLowerCase();return/\bmaterial\s*icons\b/.test(t)||/\bmaterial\s*symbols\b/.test(t)}var sc=new Map;function oc(e){var t,a;let l=(null==(t=e.getPropertyValue("-webkit-text-fill-color"))?void 0:t.trim())||"",i=/^transparent$/i.test(l)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(l);if(l&&!i&&"currentcolor"!==l.toLowerCase())return l;let r=null==(a=e.color)?void 0:a.trim();return r&&"inherit"!==r?r:"#000"}async function cc(e,{family:t="Material Icons",weight:a="normal",fontSize:l=32,color:i="#000",variation:r="",className:n=""}={}){let s=String(t||"").replace(/^['"]+|['"]+$/g,""),o=window.devicePixelRatio||1,c=function(e=""){let t,a=Object.create(null),l=String(e||""),i=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g;for(;t=i.exec(l);)a[t[1].toUpperCase()]=Number(t[2]);return a}(r),{familyForMeasure:u,familyForCanvas:d}=await async function(e,t,a){let l=String(e||""),i=l.toLowerCase(),r=String(t||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(i)&&!/\bsymbols\b/.test(i))return{familyForMeasure:l,familyForCanvas:l};if(!/\bmaterial\s*symbols\b/.test(i))return{familyForMeasure:l,familyForCanvas:l};let n=a&&(a.FILL??a.fill),s="outlined";/\brounded\b/.test(r)||/\bround\b/.test(r)?s="rounded":/\bsharp\b/.test(r)?s="sharp":/\boutlined\b/.test(r)&&(s="outlined");let o=null;if(1===n&&("outlined"===s&&ac.materialIconsFilled?o={url:ac.materialIconsFilled,alias:"snapdom-mi-filled"}:"rounded"===s&&ac.materialIconsRound?o={url:ac.materialIconsRound,alias:"snapdom-mi-round"}:"sharp"===s&&ac.materialIconsSharp&&(o={url:ac.materialIconsSharp,alias:"snapdom-mi-sharp"})),!o)return{familyForMeasure:l,familyForCanvas:l};if(!sc.has(o.alias))try{let e=new FontFace(o.alias,`url(${o.url})`,{style:"normal",weight:"400"});document.fonts.add(e),await e.load(),sc.set(o.alias,!0)}catch{return{familyForMeasure:l,familyForCanvas:l}}let c=`"${o.alias}"`;return{familyForMeasure:c,familyForCanvas:c}}(s,n,c);await async function(e="Material Icons",t=24){try{await Promise.all([document.fonts.load(`400 ${t}px "${String(e).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}(d.replace(/^["']+|["']+$/g,""),l);let p=document.createElement("span");p.textContent=e,p.style.position="absolute",p.style.visibility="hidden",p.style.left="-99999px",p.style.whiteSpace="nowrap",p.style.fontFamily=u,p.style.fontWeight=String(a||"normal"),p.style.fontSize=`${l}px`,p.style.lineHeight="1",p.style.margin="0",p.style.padding="0",p.style.fontFeatureSettings="'liga' 1",p.style.fontVariantLigatures="normal",p.style.color=i,document.body.appendChild(p);let f=p.getBoundingClientRect(),m=Math.max(1,Math.ceil(f.width)),v=Math.max(1,Math.ceil(f.height));document.body.removeChild(p);let h=document.createElement("canvas");h.width=m*o,h.height=v*o;let g=h.getContext("2d");g.scale(o,o),g.font=`${a?`${a} `:""}${l}px ${d}`,g.textAlign="left",g.textBaseline="top",g.fillStyle=i;try{g.fontKerning="normal"}catch{}return g.fillText(e,0,0),{dataUrl:h.toDataURL(),width:m,height:v}}async function uc(e,t,a,l=32,i="#000"){t=t.replace(/^['"]+|['"]+$/g,"");let r=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let n=document.createElement("span");n.textContent=e,n.style.position="absolute",n.style.visibility="hidden",n.style.fontFamily=`"${t}"`,n.style.fontWeight=a||"normal",n.style.fontSize=`${l}px`,n.style.lineHeight="1",n.style.whiteSpace="nowrap",n.style.padding="0",n.style.margin="0",document.body.appendChild(n);let s=n.getBoundingClientRect(),o=Math.ceil(s.width),c=Math.ceil(s.height);document.body.removeChild(n);let u=document.createElement("canvas");u.width=Math.max(1,o*r),u.height=Math.max(1,c*r);let d=u.getContext("2d");return d.scale(r,r),d.font=a?`${a} ${l}px "${t}"`:`${l}px "${t}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=i,d.fillText(e,0,0),{dataUrl:u.toDataURL(),width:o,height:c}}Vs();var dc=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),pc=["katex","mathjax","mathml"];function fc(e){if(!e)return"";for(let t of e.split(",")){let e=t.trim().replace(/^['"]+|['"]+$/g,"");if(e&&!dc.has(e.toLowerCase()))return e}return""}function mc(e){let t=String(e??"400").trim().toLowerCase();if("normal"===t)return 400;
2if("bold"===t)return 700;let a=parseInt(t,10);return Number.isFinite(a)?Math.min(900,Math.max(100,a)):400}function vc(e){let t=String(e??"normal").trim().toLowerCase();return t.startsWith("italic")?"italic":t.startsWith("oblique")?"oblique":"normal"}function hc(e){let t=String(e??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return t?Math.max(50,Math.min(200,parseFloat(t[1]))):100}function gc(e){return e&&"string"==typeof e?e.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-"):""}function yc(e,t,a=[]){if(!e)return!1;try{let l=new URL(e,location.href);if(l.origin===location.origin)return!0;let i=l.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some((e=>i.endsWith(e)))||a.some((e=>i===e.toLowerCase()||i.endsWith("."+e.toLowerCase()))))return!0;let r=(l.pathname+l.search).toLowerCase();if(/\bfont(s)?\b/.test(r)||/\.woff2?(\b|$)/.test(r)||pc.some((e=>r.includes(e))))return!0;for(let e of t){let t=e.toLowerCase().replace(/\s+/g,"+"),a=e.toLowerCase().replace(/\s+/g,"-"),l=gc(e);if(r.includes(t)||r.includes(a)||l&&r.includes(l))return!0}return!1}catch{return!1}}function bc(e,t){return e&&e.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,((e,a,l)=>{let i=(l||"").trim();if(!i||/^data:|^blob:|^https?:|^file:|^about:/i.test(i))return e;let r=i;try{r=new URL(i,t||location.href).href}catch{}return`url("${r}")`}))}var _c=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g;async function wc(e,t,a){if(!e)return e;let l=new Set;function i(e,t){try{return new URL(e,t||location.href).href}catch{return e}}let r=bc(e,t||location.href);return r=await async function e(t,r,n=0){if(n>4)return t;let s,o="",c=0;for(;s=_c.exec(t);){o+=t.slice(c,s.index),c=_c.lastIndex;let u=i((s[2]||s[4]||"").trim(),r);if(l.has(u))continue;l.add(u);let d="";try{let e=await qs(u,{as:"text",useProxy:a,silent:!0});e.ok&&"string"==typeof e.data&&(d=e.data)}catch{}d?(d=bc(d,u),d=await e(d,u,n+1),o+=`\n/* inlined: ${u} */\n${d}\n`):o+=s[0]}return o+=t.slice(c),o}(r,t||location.href,0),r}var kc=/url\((["']?)([^"')]+)\1\)/g,xc=/@font-face[^{}]*\{[^}]*\}/g;function Sc(e){if(!e)return[];let t=[],a=e.split(",").map((e=>e.trim())).filter(Boolean);for(let l of a){let e=l.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!e)continue;let a=e[1],i=e[2],r=e=>{if(!e.includes("?"))return parseInt(e,16);return[parseInt(e.replace(/\?/g,"0"),16),parseInt(e.replace(/\?/g,"F"),16)]};if(i){let e=r(a),l=r(i),n=Array.isArray(e)?e[0]:e,s=Array.isArray(l)?l[1]:l;t.push([Math.min(n,s),Math.max(n,s)])}else{let e=r(a);Array.isArray(e)?t.push([e[0],e[1]]):t.push([e,e])}}return t}function Cc(e,t){if(!t.length||!e||0===e.size)return!0;for(let a of e)for(let[e,l]of t)if(a>=e&&a<=l)return!0;return!1}function $c(e,t){let a=[];if(!e)return a;for(let l of e.matchAll(kc)){let e=(l[2]||"").trim();if(e&&!e.startsWith("data:")){if(!/^https?:/i.test(e))try{e=new URL(e,t||location.href).href}catch{}a.push(e)}}return a}async function Mc(e,t,a=""){var l,i,r,n,s;let o=e;for(let c of e.matchAll(kc)){let e=Rs(c[0]);if(!e)continue;let u=e;if(!u.startsWith("http")&&!u.startsWith("data:"))try{u=new URL(u,t||location.href).href}catch{}if(!rc(u)){if(null==(l=Is.resource)?void 0:l.has(u)){null==(i=Is.font)||i.add(u),o=o.replace(c[0],`url(${Is.resource.get(u)})`);continue}if(!(null==(r=Is.font)?void 0:r.has(u)))try{let e=await qs(u,{as:"dataURL",useProxy:a,silent:!0});if(e.ok&&"string"==typeof e.data){let t=e.data;null==(n=Is.resource)||n.set(u,t),null==(s=Is.font)||s.add(u),o=o.replace(c[0],`url(${t})`)}}catch{}}}return o}function Pc(e={}){let t=new Set((e.families||[]).map((e=>String(e).toLowerCase()))),a=new Set((e.domains||[]).map((e=>String(e).toLowerCase()))),l=new Set((e.subsets||[]).map((e=>String(e).toLowerCase())));return(e,i)=>{if(t.size&&t.has(e.family.toLowerCase()))return!0;if(a.size)for(let t of e.srcUrls)try{if(a.has(new URL(t).host.toLowerCase()))return!0}catch{}if(l.size){let e=function(e){if(!e.length)return null;let t=(t,a)=>e.some((([e,l])=>!(l<t||e>a))),a=t(0,255)||t(305,305),l=t(256,591)||t(7680,7935),i=t(880,1023),r=t(1024,1279);return t(7840,7929)||t(258,259)||t(416,417)||t(431,432)?"vietnamese":r?"cyrillic":i?"greek":l?"latin-ext":a?"latin":null}(i);if(e&&l.has(e))return!0}return!1}}async function Ac(e,t,a,l){let i;try{i=e.cssRules||[]}catch{return}let r=(e,t)=>{try{return new URL(e,t||location.href).href}catch{return e}};for(let n of i)if(n.type===CSSRule.IMPORT_RULE&&n.styleSheet){let e=n.href?r(n.href,t):t;if(l.depth>=4)continue;if(e&&l.visitedSheets.has(e))continue;e&&l.visitedSheets.add(e);let i={...l,depth:(l.depth||0)+1};await Ac(n.styleSheet,e,a,i)}else if(n.type===CSSRule.FONT_FACE_RULE){let e=fc((n.style.getPropertyValue("font-family")||"").trim());if(!e||rc(e))continue;
2let i=(n.style.getPropertyValue("font-weight")||"400").trim(),r=(n.style.getPropertyValue("font-style")||"normal").trim(),s=(n.style.getPropertyValue("font-stretch")||"100%").trim(),o=(n.style.getPropertyValue("src")||"").trim(),c=(n.style.getPropertyValue("unicode-range")||"").trim();if(!l.faceMatchesRequired(e,r,i,s))continue;let u=Sc(c);if(!Cc(l.usedCodepoints,u))continue;let d={family:e,weightSpec:i,styleSpec:r,stretchSpec:s,unicodeRange:c,srcRaw:o,srcUrls:$c(o,t||location.href),href:t||location.href};if(l.simpleExcluder&&l.simpleExcluder(d,u))continue;if(/url\(/i.test(o)){let n=await Mc(o,t||location.href,l.useProxy);await a(`@font-face{font-family:${e};src:${n};font-style:${r};font-weight:${i};font-stretch:${s};${c?`unicode-range:${c};`:""}}`)}else await a(`@font-face{font-family:${e};src:${o};font-style:${r};font-weight:${i};font-stretch:${s};${c?`unicode-range:${c};`:""}}`)}}async function Tc({required:e,usedCodepoints:t,exclude:a,localFonts:l=[],useProxy:i="",fontStylesheetDomains:r=[]}={}){var n,s,o,c,u,d,p,f,m,v,h,g,y,b,_,w,k,x;e instanceof Set||(e=new Set),t instanceof Set||(t=new Set);let S=new Map;for(let I of e){let[e,t,a,l]=String(I).split("__");if(!e)continue;let i=S.get(e)||[];
2i.push({w:parseInt(t,10),s:a,st:parseInt(l,10)}),S.set(e,i)}function C(e,t,a,l){if(!S.has(e))return!1;let i=S.get(e),r=function(e){let t=String(e||"400").trim(),a=t.match(/^(\d{2,3})\s+(\d{2,3})$/);if(a){let e=mc(a[1]),t=mc(a[2]);return{min:Math.min(e,t),max:Math.max(e,t)}}let l=mc(t);return{min:l,max:l}}(a),n=function(e){let t=String(e||"normal").trim().toLowerCase();return"italic"===t?{kind:"italic"}:t.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}(t),s=function(e){let t=String(e||"100%").trim(),a=t.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(a){let e=parseFloat(a[1]),t=parseFloat(a[2]);return{min:Math.min(e,t),max:Math.max(e,t)}}let l=t.match(/(\d+(?:\.\d+)?)\s*%/),i=l?parseFloat(l[1]):100;return{min:i,max:i}}(l),o=r.min!==r.max,c=r.min,u=e=>"normal"===n.kind&&"normal"===e||"normal"!==n.kind&&("italic"===e||"oblique"===e),d=!1;for(let p of i){let e=o?p.w>=r.min&&p.w<=r.max:p.w===c,t=u(vc(p.s)),a=p.st>=s.min&&p.st<=s.max;if(e&&t&&a){d=!0;break}}if(d)return!0;if(!o)for(let p of i){let e=u(vc(p.s)),t=p.st>=s.min&&p.st<=s.max;if(Math.abs(c-p.w)<=300&&e&&t)return!0}if(!o&&"normal"===n.kind&&i.some((e=>"normal"!==vc(e.s))))for(let p of i){let e=Math.abs(c-p.w)<=300,t=p.st>=s.min&&p.st<=s.max;if(e&&t)return!0}return!1}let $=Pc(a),M=function(e,t,a,l,i){return`fonts-embed-css::req=${Array.from(e||[]).sort().join("|")}::ex=${t?JSON.stringify({families:(t.families||[]).map((e=>String(e).toLowerCase())).sort(),domains:(t.domains||[]).map((e=>String(e).toLowerCase())).sort(),subsets:(t.subsets||[]).map((e=>String(e).toLowerCase())).sort()}):""}::lf=${(a||[]).map((e=>`${(e.family||"").toLowerCase()}::${e.weight||"normal"}::${e.style||"normal"}::${e.src||""}`)).sort().join("|")}::px=${l||""}::fd=${(i||[]).map((e=>String(e).toLowerCase())).sort().join("|")}`}(e,a,l,i,r);if(null==(n=Is.resource)?void 0:n.has(M))return Is.resource.get(M);let P=function(e){var t;let a=new Set;for(let l of e||[]){let e=null==(t=String(l).split("__")[0])?void 0:t.trim();e&&a.add(e)}return a}(e),A=[],T=_c;for(let I of document.querySelectorAll("style")){let e=I.textContent||"";for(let t of e.matchAll(T)){let e=(t[2]||t[4]||"").trim();e&&!rc(e)&&(document.querySelector(`link[rel="stylesheet"][href="${e}"]`)||A.push(e))}}A.length&&await Promise.all(A.map((e=>new Promise((t=>{if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return t(null);let a=document.createElement("link");a.rel="stylesheet",a.href=e,a.setAttribute("data-snapdom","injected-import"),a.onload=()=>t(a),a.onerror=()=>t(null),document.head.appendChild(a)})))));let N="",L=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).filter((e=>!!e.href));for(let I of L)try{if(rc(I.href))continue;let e="",l=!1;try{l=new URL(I.href,location.href).origin===location.origin}catch{}if(!l){let e=Array.isArray(r)?r:[];if(!yc(I.href,P,e))continue}if(l){let t=Array.from(document.styleSheets).find((e=>e.href===I.href));if(t)try{let a=t.cssRules||[];e=Array.from(a).map((e=>e.cssText)).join("")}catch{}}if(!e){let t=await qs(I.href,{as:"text",useProxy:i});if((null==t?void 0:t.ok)&&"string"==typeof t.data&&(e=t.data),rc(I.href))continue}e=await wc(e,I.href,i);let n="";for(let r of e.match(xc)||[]){let e=fc(((null==(s=r.match(/font-family:\s*([^;]+);/i))?void 0:s[1])||"").trim());if(!e||rc(e))continue;let l=((null==(o=r.match(/font-weight:\s*([^;]+);/i))?void 0:o[1])||"400").trim(),f=((null==(c=r.match(/font-style:\s*([^;]+);/i))?void 0:c[1])||"normal").trim(),m=((null==(u=r.match(/font-stretch:\s*([^;]+);/i))?void 0:u[1])||"100%").trim(),v=((null==(d=r.match(/unicode-range:\s*([^;]+);/i))?void 0:d[1])||"").trim(),h=((null==(p=r.match(/src\s*:\s*([^;}]+)[;}]/i))?void 0:p[1])||"").trim(),g=$c(h,I.href);if(!C(e,f,l,m))continue;let y=Sc(v);if(!Cc(t,y))continue;let b={family:e,weightSpec:l,styleSpec:f,stretchSpec:m,unicodeRange:v,srcRaw:h,srcUrls:g,href:I.href};a&&$(b,y)||(n+=/url\(/i.test(h)?await Mc(r,I.href,i):r)}n.trim()&&(N+=n)}catch{}let E={requiredIndex:S,usedCodepoints:t,faceMatchesRequired:C,simpleExcluder:a?Pc(a):null,useProxy:i,visitedSheets:new Set,depth:0};for(let I of document.styleSheets)if(!I.href||!L.some((e=>e.href===I.href)))try{let e=I.href||location.origin+"/";e&&E.visitedSheets.add(e),await Ac(I,e,(async e=>{N+=e}),E)}catch{}try{for(let e of document.fonts||[]){if(!e||!e.family||"loaded"!==e.status||!e._snapdomSrc)continue;let t=String(e.family).replace(/^['"]+|['"]+$/g,"");if(rc(t)||!S.has(t)||(null==a?void 0:a.families)&&a.families.some((e=>String(e).toLowerCase()===t.toLowerCase())))continue;let l=e._snapdomSrc;if(!String(l).startsWith("data:"))if(null==(f=Is.resource)?void 0:f.has(e._snapdomSrc))l=Is.resource.get(e._snapdomSrc),null==(m
2=Is.font)||m.add(e._snapdomSrc);else if(!(null==(v=Is.font)?void 0:v.has(e._snapdomSrc)))try{let t=await qs(e._snapdomSrc,{as:"dataURL",useProxy:i,silent:!0});if(!t.ok||"string"!=typeof t.data)continue;l=t.data,null==(h=Is.resource)||h.set(e._snapdomSrc,l),null==(g=Is.font)||g.add(e._snapdomSrc)}catch{continue}N+=`@font-face{font-family:'${t}';src:url(${l});font-style:${e.style||"normal"};font-weight:${e.weight||"normal"};}`}}catch{}for(let I of l){if(!I||"object"!=typeof I)continue;let e=String(I.family||"").replace(/^['"]+|['"]+$/g,"");if(!e||rc(e)||!S.has(e)||(null==a?void 0:a.families)&&a.families.some((t=>String(t).toLowerCase()===e.toLowerCase())))continue;let t=null!=I.weight?String(I.weight):"normal",l=null!=I.style?String(I.style):"normal",r=null!=I.stretchPct?`${I.stretchPct}%`:"100%",n=String(I.src||""),s=n;if(!s.startsWith("data:"))if(null==(y=Is.resource)?void 0:y.has(n))s=Is.resource.get(n),null==(b=Is.font)||b.add(n);else if(!(null==(_=Is.font)?void 0:_.has(n)))try{let e=await qs(n,{as:"dataURL",useProxy:i,silent:!0});if(!e.ok||"string"!=typeof e.data)continue;s=e.data,null==(w=Is.resource)||w.set(n,s),null==(k=Is.font)||k.add(n)}catch{continue}N+=`@font-face{font-family:'${e}';src:url(${s});font-style:${l};font-weight:${t};font-stretch:${r};}`}return N&&(N=function(e){var t,a,l,i,r,n;if(!e)return e;let s=/@font-face[^{}]*\{[^}]*\}/gi,o=new Set,c=[];for(let d of e.match(s)||[]){let e=fc((null==(t=d.match(/font-family:\s*([^;]+);/i))?void 0:t[1])||""),s=((null==(a=d.match(/font-weight:\s*([^;]+);/i))?void 0:a[1])||"400").trim(),u=((null==(l=d.match(/font-style:\s*([^;]+);/i))?void 0:l[1])||"normal").trim(),p=((null==(i=d.match(/font-stretch:\s*([^;]+);/i))?void 0:i[1])||"100%").trim(),f=((null==(r=d.match(/unicode-range:\s*([^;]+);/i))?void 0:r[1])||"").trim(),m=((null==(n=d.match(/src\s*:\s*([^;}]+)[;}]/i))?void 0:n[1])||"").trim(),v=$c(m,location.href),h=v.length?v.map((e=>String(e).toLowerCase())).sort().join("|"):m.toLowerCase(),g=[String(e||"").toLowerCase(),s,u,p,f.toLowerCase(),h].join("|");o.has(g)||(o.add(g),c.push(d))}if(0===c.length)return e;let u=0;return e.replace(s,(()=>c[u++]||""))}(N),null==(x=Is.resource)||x.set(M,N)),N}function Nc(e){let t=new Set;if(!e)return t;let a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null),l=e=>{let a=function(e){if(!e)return[];let t=[];for(let a of e.split(",")){let e=a.trim().replace(/^['"]+|['"]+$/g,"");e&&(dc.has(e.toLowerCase())||t.push(e))}return t}(e.fontFamily);if(a.length)for(let l of a){let a=(e,t,a)=>`${l}__${mc(e)}__${vc(t)}__${hc(a)}`;t.add(a(e.fontWeight,e.fontStyle,e.fontStretch))}};l(getComputedStyle(e));let i=getComputedStyle(e,"::before");i&&i.content&&"none"!==i.content&&l(i);let r=getComputedStyle(e,"::after");for(r&&r.content&&"none"!==r.content&&l(r);a.nextNode();){let e=a.currentNode;l(getComputedStyle(e));let t=getComputedStyle(e,"::before");t&&t.content&&"none"!==t.content&&l(t);let i=getComputedStyle(e,"::after");i&&i.content&&"none"!==i.content&&l(i)}return t}async function Lc(e,t=2){try{await document.fonts.ready}catch{}let a=Array.from(e||[]).filter(Boolean);if(0===a.length)return;let l=()=>{let e=document.createElement("div");e.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let t of a){let a=document.createElement("span");a.textContent="AaBbGg1234ÃÃÃÃÃçñââ",a.style.fontFamily=`"${t}"`,a.style.fontWeight="700",a.style.fontStyle="italic",a.style.fontSize="32px",a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.margin="0",a.style.padding="0",e.appendChild(a)}document.body.appendChild(e),e.offsetWidth,document.body.removeChild(e)};for(let i=0;i<Math.max(1,t);i++)l(),await new Promise((e=>requestAnimationFrame((()=>requestAnimationFrame(e)))))}function Ec(e,t=!1){let a="",l=Math.max(1,e);for(;l>0;)l--,a=String.fromCharCode(97+l%26)+a,l=Math.floor(l/26);return t?a.toUpperCase():a}function Ic(e,t=!0){let a=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],l=Math.max(1,Math.min(3999,e)),i="";for(let[r,n]of a)for(;l>=r;)i+=n,l-=r;return t?i:i.toLowerCase()}function Fc(e,t){switch((t||"decimal").toLowerCase()){case"decimal":default:return String(e);case"decimal-leading-zero":{let t=Math.abs(e);return(e<0?"-":"")+(t<10?"0":"")+String(t)}case"lower-alpha":return Ec(e,!1);case"upper-alpha":return Ec(e,!0);case"lower-roman":return Ic(e,!1);case"upper-roman":return Ic(e,!0)}}function Rc(e){let t=()=>{var e;return(null==(e=null==Is?void 0:Is.session)?void 0:e.__counterEpoch)??0}
2,a=t(),l=new WeakMap,i=e instanceof Document?e.documentElement:e,r=e=>{let t=0,a=null==e?void 0:e.parentElement;if(!a)return 0;for(let l of a.children){if(l===e)break;"LI"===l.tagName&&t++}return t},n=(e,t,a)=>{var l,i,n;let s,o,c,u=(e=>{let t=new Map;for(let[a,l]of e)t.set(a,l.slice());return t})(e);try{s=(null==(l=a.style)?void 0:l.counterReset)||getComputedStyle(a).counterReset}catch{}if(s&&"none"!==s)for(let r of s.split(",")){let e=r.trim().split(/\s+/),a=e[0],l=Number.isFinite(Number(e[1]))?Number(e[1]):0;if(!a)continue;let i=t.get(a);if(i&&i.length){let e=i.slice();e.push(l),u.set(a,e)}else u.set(a,[l])}try{o=(null==(i=a.style)?void 0:i.counterSet)||getComputedStyle(a).counterSet}catch{}if(o&&"none"!==o)for(let r of o.split(",")){let e=r.trim().split(/\s+/),t=e[0],a=Number.isFinite(Number(e[1]))?Number(e[1]):0;if(!t)continue;let l=u.get(t)||[];0===l.length&&l.push(0),l[l.length-1]=a,u.set(t,l)}try{c=(null==(n=a.style)?void 0:n.counterIncrement)||getComputedStyle(a).counterIncrement}catch{}if(c&&"none"!==c)for(let r of c.split(",")){let e=r.trim().split(/\s+/),t=e[0],a=Number.isFinite(Number(e[1]))?Number(e[1]):1;if(!t)continue;let l=u.get(t)||[];0===l.length&&l.push(0),l[l.length-1]+=a,u.set(t,l)}
2try{if("list-item"===getComputedStyle(a).display&&(e=>e&&"LI"===e.tagName)(a)){let e=a.parentElement,t=1;if(e&&"OL"===e.tagName){let l=e.getAttribute("start"),i=Number.isFinite(Number(l))?Number(l):1,n=r(a),s=a.getAttribute("value");t=Number.isFinite(Number(s))?Number(s):i+n}else t=1+r(a);let l=u.get("list-item")||[];0===l.length&&l.push(0),l[l.length-1]=t,u.set("list-item",l)}}catch{}return u},s=(e,t,a)=>{let i=n(a,t,e);l.set(e,i);let r=i;for(let l of e.children)r=s(l,i,r);let o=new Map;for(let[l,n]of a){let e=n.length,t=r.get(l);o.set(l,t&&t.length?t.slice(0,e):n.slice())}for(let[l,n]of r)!o.has(l)&&n.length&&!t.has(l)&&o.set(l,n.slice(0,1));return o},o=new Map;function c(){let e=t();if(e!==a){a=e;let t=new Map;s(i,t,t)}}return s(i,o,o),{get(e,t){var a;c();let i=null==(a=l.get(e))?void 0:a.get(t);return i&&i.length?i[i.length-1]:0},getStack(e,t){var a;c();let i=null==(a=l.get(e))?void 0:a.get(t);return i?i.slice():[]}}}Fs(),Vs(),Fs();var Dc=new WeakMap;function Oc(e){try{return e&&e.cssRules?e.cssRules:null}catch{return null}}function Uc(e){let t=e.querySelectorAll('style,link[rel~="stylesheet"]'),a=`n:${t.length}|`,l=0;for(let r=0;r<t.length;r++){let e=t[r];if("STYLE"===e.tagName){a+=`S${e.textContent?e.textContent.length:0}|`;let t=e.sheet,i=t?Oc(t):null;i&&(l+=i.length)}else{a+=`L${e.getAttribute("href")||""}|m:${e.getAttribute("media")||"all"}|`;let t=e.sheet,i=t?Oc(t):null;i&&(l+=i.length)}}let i=e.adoptedStyleSheets;return a+=`ass:${Array.isArray(i)?i.length:0}|tr:${l}`,a}function zc(e,t,a){let l=Oc(e);if(!l)return!1;for(let i=0;i<l.length;i++){if(a.budget<=0)return!1;let e=l[i],r=e&&e.cssText?e.cssText:"";a.budget--;for(let a of t)if(r.includes(a))return!0;if(e&&e.cssRules&&e.cssRules.length)for(let l=0;l<e.cssRules.length&&a.budget>0;l++){let i=e.cssRules[l],r=i&&i.cssText?i.cssText:"";a.budget--;for(let e of t)if(r.includes(e))return!0}if(a.budget<=0)return!1}return!1}function qc(e=document){let t=Uc(e),a=Dc.get(e);if(a&&a.fingerprint===t)return a.result;let l=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],i=e.querySelectorAll("style");for(let n=0;n<i.length;n++){let a=i[n].textContent||"";for(let i of l)if(a.includes(i))return Dc.set(e,{fingerprint:t,result:!0}),!0}let r=e.adoptedStyleSheets;if(Array.isArray(r)&&r.length){let a={budget:1e3};try{for(let i of r)if(zc(i,l,a))return Dc.set(e,{fingerprint:t,result:!0}),!0}catch{}}{let a=e.querySelectorAll('style,link[rel~="stylesheet"]'),i={budget:1e3};for(let r=0;r<a.length&&i.budget>0;r++){let n=a[r],s=null;if(n.tagName,s=n.sheet||null,s&&zc(s,l,i))return Dc.set(e,{fingerprint:t,result:!0}),!0}}return e.querySelector('[style*="counter("], [style*="counters("]')?(Dc.set(e,{fingerprint:t,result:!0}),!0):(Dc.set(e,{fingerprint:t,result:!1}),!1)}var Bc=new WeakMap,Wc=-1;function Hc(e){if(!e)return"";let t,a=[],l=/"([^"]*)"/g;for(;t=l.exec(e);)a.push(t[1]);return a.length?a.join(""):function(e){return(e||"").replace(/"([^"]*)"/g,"$1")}(e)}function Vc(e,t){let a=e.parentElement,l=a?Bc.get(a):null;return l?{get(e,a){let i=t.get(e,a),r=l.get(a);return"number"==typeof r?Math.max(i,r):i},getStack(e,a){let i=t.getStack(e,a);if(!i.length)return i;let r=l.get(a);if("number"==typeof r){let e=i.slice();return e[e.length-1]=Math.max(e[e.length-1],r),e}return i}}:t}function jc(e,t,a){let l=new Map;function i(e){let t=[];if(!e||"none"===e)return t;for(let a of String(e).split(",")){let e=a.trim().split(/\s+/),l=e[0],i=Number.isFinite(Number(e[1]))?Number(e[1]):void 0;l&&t.push({name:l,num:i})}return t}let r=i(null==t?void 0:t.counterReset),n=i(null==t?void 0:t.counterIncrement);function s(t){if(l.has(t))return l.get(t).slice();let i=a.getStack(e,t);i=i.length?i.slice():[];let s=r.find((e=>e.name===t));if(s){let e=Number.isFinite(s.num)?s.num:0;i=i.length?[...i,e]:[e]}let o=n.find((e=>e.name===t));if(o){let e=Number.isFinite(o.num)?o.num:1;0===i.length&&(i=[0]),i[i.length-1]+=e}return l.set(t,i.slice()),i}return{get(e,t){let a=s(t);return a.length?a[a.length-1]:0},getStack:(e,t)=>s(t),__incs:n}}function Kc(e,t,a){let l;try{l=Zs(e,t)}catch{}let i=null==l?void 0:l.content;if(!i||"none"===i||"normal"===i)return{text:"",incs:[]};let r=jc(e,l,Vc(e,a)),n=function(e){return/\bcounter\s*\(|\bcounters\s*\(/.test(e||"")}(i)?function(e,t,a){if(!e||"none"===e)return e;try{let l=/\b(counter|counters)\s*\(([^)]+)\)/g;return function(e){return(e||"").replace(/"([^"]*)"/g,"$1")}(e.replace(l,((e,l,i)=>{var r,n,s;let o=String(i).split(",").map((e=>e.trim()));if("counter"===l){let e=null==(r=o[0])?void 0:r.replace(/^["']|["']$/g,""),l=(o[1]||"decimal").toLowerCase();return Fc(a.get(t,e),l)}{let e=null==(n=o[0])?void 0:n.replace(/^["']|["']$/g,""),l=(null==(s=o[1])?void 0:s.replace(/^["']|["']$/g,""))??"",i=(o[2]||"decimal").toLowerCase(),r=a.getStack(t,e);return r.length?r.map((e=>Fc(e,i))).join(l):""}})))}catch{return"- "}}(i,e,r):i;return{text:Hc(n),incs:r.__incs||[]}}async function Yc(e,t,a,l){var i,r,n;if(!(e instanceof Element&&t instanceof Element))return;if(!function(e,t){let a=Uc(e);return t?(t.__pseudoPreflightFp!==a&&(t.__pseudoPreflight=qc(e),t.__pseudoPreflightFp=a),!!t.__pseudoPreflight):qc(e)}(e.ownerDocument||document,a))return;let s=(null==(i=null==Is?void 0:Is.session)?void 0:i.__counterEpoch)??0;if(Wc!==s&&(Bc=new WeakMap,a&&(a.__counterCtx=null),Wc=s),!a.__counterCtx)try{a.__counterCtx=Rc(e.ownerDocument||document)}catch(u){oo(a)}let o=a.__counterCtx;for(let m of["::before","::after","::first-letter"])try{let i=Zs(e,m);if(!(i&&("none"!==i.content||"none"!==i.backgroundImage||"transparent"!==i.backgroundColor||"none"!==i.borderStyle&&0!==parseFloat(i.borderWidth)||i.transform&&"none"!==i.transform||"inline"!==i.display)))continue;if("::first-letter"===m){let l=Zs(e);if(i.color===l.color&&i.fontSize===l.fontSize&&i.fontWeight===l.fontWeight&&i.fontFamily===l.fontFamily&&i.fontStyle===l.fontStyle&&i.textTransform===l.textTransform&&i.float===l.float&&i.paddingTop===l.paddingTop&&i.paddingRight===l.paddingRight&&i.paddingBottom===l.paddingBottom&&i.paddingLeft===l.paddingLeft&&i.marginTop===l.marginTop&&i.marginRight===l.marginRight&&i.marginBottom===l.marginBottom&&i.marginLeft===l.marginLeft)continue;let n=Array.from(t.childNodes).find((e=>{var t;
2return e.nodeType===Node.TEXT_NODE&&(null==(t=e.textContent)?void 0:t.trim().length)>0}));if(!n)continue;let s=n.textContent,o=null==(r=s.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['â])?)/u))?void 0:r[0],c=s.slice((null==o?void 0:o.length)||0);if(!o||/[\uD800-\uDFFF]/.test(o))continue;let u=document.createElement("span");u.textContent=o,u.dataset.snapdomPseudo="::first-letter";let d=Gs(Xs(i),"span");a.styleMap.set(u,d);let p=document.createTextNode(c);t.replaceChild(p,n),t.insertBefore(u,p);continue}let s=i.content??"",c=""===s||"none"===s||"normal"===s,{text:u,incs:f}=Kc(e,m,o),v=i.backgroundImage,h=i.backgroundColor,g=i.fontFamily,y=parseInt(i.fontSize)||32,b=parseInt(i.fontWeight)||!1,_=i.color||"#000",w=i.borderStyle,k=parseFloat(i.borderWidth),x=i.transform,S=rc(g),C=!c&&""!==u,$=v&&"none"!==v,M=h&&"transparent"!==h&&"rgba(0, 0, 0, 0)"!==h,P=w&&"none"!==w&&k>0,A=x&&"none"!==x;if(!(C||$||M||P||A)){if(f&&f.length&&e.parentElement){let t=Bc.get(e.parentElement)||new Map;for(let{name:a}of f){if(!a)continue;let l=Vc(e,o),i=jc(e,Zs(e,m),l).get(e,a);t.set(a,i)}Bc.set(e.parentElement,t)}continue}let T=document.createElement("span");T.dataset.snapdomPseudo=m,T.style.pointerEvents="none";let N=Gs(Xs(i),"span");if(a.styleMap.set(T,N),S&&u&&1===u.length){let{dataUrl:e,width:a,height:l}=await uc(u,g,b,y,_),i=document.createElement("img");i.src=e,i.style=`height:${y}px;width:${a/l*y}px;object-fit:contain;`,T.appendChild(i),t.dataset.snapdomHasIcon="true"}else if(u&&u.startsWith("url(")){let e=Rs(u);if(null==e?void 0:e.trim())try{let t=await qs(Ds(e),{as:"dataURL",useProxy:l.useProxy});if((null==t?void 0:t.ok)&&"string"==typeof t.data){let e=document.createElement("img");e.src=t.data,e.style=`width:${y}px;height:auto;object-fit:contain;`,T.appendChild(e)}}catch(d){}}else!S&&C&&(T.textContent=u);T.style.backgroundImage="none","maskImage"in T.style&&(T.style.maskImage="none"),"webkitMaskImage"in T.style&&(T.style.webkitMaskImage="none");try{T.style.backgroundRepeat=i.backgroundRepeat,T.style.backgroundSize=i.backgroundSize,i.backgroundPositionX&&i.backgroundPositionY?(T.style.backgroundPositionX=i.backgroundPositionX,T.style.backgroundPositionY=i.backgroundPositionY):T.style.backgroundPosition=i.backgroundPosition,T.style.backgroundOrigin=i.backgroundOrigin,T.style.backgroundClip=i.backgroundClip,T.style.backgroundAttachment=i.backgroundAttachment,T.style.backgroundBlendMode=i.backgroundBlendMode}catch{}if($)try{let e=Qs(v),t=await Promise.all(e.map(js));T.style.backgroundImage=t.join(", ")}catch(p){}M&&(T.style.backgroundColor=h);let L=T.childNodes.length>0||""!==(null==(n=T.textContent)?void 0:n.trim())||$||M||P||A;if(f&&f.length&&e.parentElement){let t=Bc.get(e.parentElement)||new Map,a=Vc(e,o),l=jc(e,Zs(e,m),a);for(let{name:i}of f){if(!i)continue;let a=l.get(e,i);t.set(i,a)}Bc.set(e.parentElement,t)}if(!L)continue;"::before"===m?(t.dataset.snapdomHasBefore="1",t.insertBefore(T,t.firstChild)):(t.dataset.snapdomHasAfter="1",t.appendChild(T))}catch(f){}let c=Array.from(t.children).filter((e=>!e.dataset.snapdomPseudo));if(a.nodeMap)for(let m of c){let e=a.nodeMap.get(m);e instanceof Element&&await Yc(e,m,a,l)}else{let t=Array.from(e.children);for(let e=0;e<Math.min(t.length,c.length);e++)await Yc(t[e],c[e],a,l)}}function Gc(e,t){var a,l;if(!(e&&e instanceof Element))return;let i=e.ownerDocument||document,r=i,n=e instanceof SVGSVGElement?[e]:Array.from(e.querySelectorAll("svg"));if(0===n.length)return;let s=/url\(\s*#([^)]+)\)/g,o=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],c=e=>{if(!e||!e.getAttribute)return null;let t=e.getAttribute("href")||e.getAttribute("xlink:href")||("function"==typeof e.getAttributeNS?e.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(t)return t;let a=e.attributes;if(!a)return null;for(let l=0;l<a.length;l++){let e=a[l];if(!e||!e.name)continue;if("href"===e.name)return e.value;let t=e.name.indexOf(":");if(-1!==t&&"href"===e.name.slice(t+1))return e.value}return null},u=new Set(Array.from(e.querySelectorAll("[id]")).map((e=>e.id))),d=new Set,p=!1,f=(e,t=null)=>{if(!e)return;let a;for(s.lastIndex=0;a=s.exec(e);){p=!0;let e=(a[1]||"").trim();e&&(u.has(e)||(d.add(e),t&&!t.has(e)&&t.add(e)))}},m=e=>{let t=e.querySelectorAll("use");for(let l of t){let e=c(l);if(!e||!e.startsWith("#"))continue;p=!0;let t=e.slice(1).trim();t&&!u.has(t)&&d.add(t)}let a=e.querySelectorAll('*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]');for(let l of a){f(l.getAttribute("style")||"");for(let e of o)f(l.getAttribute(e))}};for(let _ of n)m(_);if(!p)return;let v=e.querySelector("svg.inline-defs-container");v||(v=i.createElementNS("http://www.w3.org/2000/svg","svg"),v.classList.add("inline-defs-container"),v.setAttribute("aria-hidden","true"),v.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),e.insertBefore(v,e.firstChild||null));let h=v.querySelector("defs")||null,g=t=>{if(!t||u.has(t))return null;let a=(e=>window.CSS&&CSS.escape?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,"\\$&"))(t),l=t=>{let a=r.querySelector(t);return a&&!e.contains(a)?a:null};return l(`svg defs > *#${a}`)||l(`svg > symbol#${a}`)||l(`*#${a}`)};if(!d.size)return;let y=new Set(d),b=new Set;for(;y.size;){let e=y.values().next().value;if(y.delete(e),!e||u.has(e)||b.has(e))continue;let t=g(e);
2if(!t){b.add(e);continue}h||(h=i.createElementNS("http://www.w3.org/2000/svg","defs"),v.appendChild(h));let r=t.cloneNode(!0);r.id||r.setAttribute("id",e),h.appendChild(r),b.add(e),u.add(e);let n=[r,...r.querySelectorAll("*")];for(let i of n){let e=c(i);if(e&&e.startsWith("#")){let t=e.slice(1).trim();t&&!u.has(t)&&!b.has(t)&&y.add(t)}let t=(null==(a=i.getAttribute)?void 0:a.call(i,"style"))||"";t&&f(t,y);for(let a of o){let e=null==(l=i.getAttribute)?void 0:l.call(i,a);e&&f(e,y)}}}}function Zc(e){if(!e||"auto"===e)return null;let t=Number.parseFloat(e);return Number.isFinite(t)?t:null}function Xc(e,t){let a=[];for(let l=e;l&&l!==t;){let e=l.parentElement;if(!e)break;a.push(Array.prototype.indexOf.call(e.children,l)),l=e}return a.reverse()}function Qc(e,t,a){let l=e;for(let i=0;i<t.length;i++)if(l=Jc(l,a)[t[i]],!l)return null;return l instanceof HTMLElement?l:null}function Jc(e,t){let a=[],l=e.children;for(let i=0;i<l.length;i++){let e=l[i];e.hasAttribute(t)||a.push(e)}return a}async function eu(e,t={}){var a,l;let i,r={styleMap:Is.session.styleMap,styleCache:Is.session.styleCache,nodeMap:Is.session.nodeMap,options:t},n="",s="";!function(e){let t=getComputedStyle(e),a=t.outlineStyle,l=t.outlineWidth,i=t.borderStyle,r=t.borderWidth,n="none"!==a&&parseFloat(l)>0,s="none"===i||0===parseFloat(r);n&&s&&(e.style.border=`${l} solid transparent`)}(e);let o=function(e){let t=[];try{let a=e.querySelectorAll("*");for(let e of a){if(!(e instanceof HTMLElement))continue;let a=e.style.contentVisibility||"",l=getComputedStyle(e),i=l.contentVisibility||l.getPropertyValue("content-visibility")||"";("auto"===i||"hidden"===i)&&(t.push({el:e,original:a}),e.style.contentVisibility="visible")}if(e instanceof HTMLElement){let a=getComputedStyle(e),l=a.contentVisibility||a.getPropertyValue("content-visibility")||"";("auto"===l||"hidden"===l)&&(t.push({el:e,original:e.style.contentVisibility||""}),e.style.contentVisibility="visible")}}catch{}return()=>{for(let{el:e,original:a}of t)try{e.style.contentVisibility=a}catch{}}}(e);try{Gc(e)}catch(u){}try{i=await ec(e,r,t)}catch(u){throw u}finally{o()}try{await Yc(e,i,r,t)}catch(u){}await async function(e,t=null){var a,l;if(!e)return;let i=t,r=e.querySelectorAll?e.querySelectorAll("img"):[];for(let f of r)try{let e=f.getAttribute("src")||f.currentSrc||"";if(Xo(e)){let t=await Yo(e);f.setAttribute("src",t)}let t=f.getAttribute("srcset");if(t&&t.includes("blob:")){let e=Qo(t),a=!1;for(let t of e)if(Xo(t.url))try{t.url=await Yo(t.url),a=!0}catch(u){oo(i)}a&&f.setAttribute("srcset",Jo(e))}}catch(d){oo(i)}let n=e.querySelectorAll?e.querySelectorAll("image"):[];for(let f of n)try{let e="http://www.w3.org/1999/xlink",t=f.getAttribute("href")||(null==(a=f.getAttributeNS)?void 0:a.call(f,e,"href"));if(Xo(t)){let a=await Yo(t);f.setAttribute("href",a),null==(l=f.removeAttributeNS)||l.call(f,e,"href")}}catch(d){oo(i)}let s=e.querySelectorAll?e.querySelectorAll("[style*='blob:']"):[];for(let f of s)try{let e=f.getAttribute("style");if(e&&e.includes("blob:")){let t=await Zo(e);f.setAttribute("style",t)}}catch(d){oo(i)}let o=e.querySelectorAll?e.querySelectorAll("style"):[];for(let f of o)try{let e=f.textContent||"";e.includes("blob:")&&(f.textContent=await Zo(e))}catch(d){oo(i)}let c=["poster"];for(let f of c){let t=e.querySelectorAll?e.querySelectorAll(`[${f}^='blob:']`):[];for(let e of t)try{let t=e.getAttribute(f);Xo(t)&&e.setAttribute(f,await Yo(t))}catch(p){oo(i)}}}(i,r);try{let e=i.querySelectorAll("style[data-sd]");for(let t of e)s+=t.textContent||"",t.remove()}catch(u){oo(r)}let c=function(e){let t=Array.from(new Set(e.values())).filter(Boolean).sort(),a=new Map,l=1;for(let i of t)a.set(i,"c"+l++);return a}(r.styleMap);n=Array.from(c.entries()).map((([e,t])=>`.${t}{${e}}`)).join(""),n=s+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+n;for(let[d,p]of r.styleMap.entries()){if("STYLE"===d.tagName)continue;if(d.getRootNode&&d.getRootNode()instanceof ShadowRoot){d.setAttribute("style",p.replace(/;/g,"; "));continue}let e=c.get(p);e&&d.classList.add(e);let t=null==(a=d.style)?void 0:a.backgroundImage,i=null==(l=d.dataset)?void 0:l.snapdomHasIcon;t&&"none"!==t&&(d.style.backgroundImage=t),i&&(d.style.verticalAlign="middle",d.style.display="inline")}for(let[d,p]of r.nodeMap.entries()){let e=p.scrollLeft,t=p.scrollTop;if((e||t)&&d instanceof HTMLElement){d.style.overflow="hidden",d.style.scrollbarWidth="none",d.style.msOverflowStyle="none";try{let a=d.querySelectorAll("*");for(let l of a){if(!(l instanceof HTMLElement))continue;let a=l.style.position;if("fixed"===a||"absolute"===a){let i=parseFloat(l.style.top)||0,r=parseFloat(l.style.left)||0;l.style.top=`${i+t}px`,l.style.left=`${r+e}px`,"fixed"===a&&(l.style.position="absolute")}}}catch{}let a=document.createElement("div");for(a.style.transform=`translate(${-e}px, ${-t}px)`,a.style.willChange="transform",a.style.display="inline-block",a.style.width="100%";d.firstChild;)a.appendChild(d.firstChild);d.appendChild(a)}}if(function(e,t){var a;if(!e||!t)return;let l=e.scrollTop||0;if(!l)return;"static"===getComputedStyle(t).position&&(t.style.position="relative");let i=e.getBoundingClientRect(),r=e.clientHeight,n="data-snap-ph",s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;s.nextNode();){let o=s.currentNode,c=getComputedStyle(o),u=c.position;if("sticky"!==u&&"-webkit-sticky"!==u)continue;let d=Zc(c.top),p=Zc(c.bottom);if(null==d&&null==p)continue;let f=Qc(t,Xc(o,e),n);if(!f)continue;let m=o.getBoundingClientRect(),v=m.width,h=m.height,g=m.left-i.left;if(!(v>0&&h>0&&Number.isFinite(g)))continue;let y=null!=d?d+l:l+(r-h-p);if(!Number.isFinite(y))continue;let b=Number.parseInt(c.zIndex,10),_=Number.isFinite(b),w=_?Math.max(b,1)+1:2,k=_?b-1:0,x=f.cloneNode(!1);x.setAttribute(n,"1"),x.style.position="sticky",x.style.left=`${g}px`,x.style.top=`${y}px`,x.style.width=`${v}px`,x.style.height=`${h}px`,x.style.visibility="hidden",x.style.zIndex=String(k),x.style.overflow="hidden",x.style.background="transparent",x.style.boxShadow="none",x.style.filter="none",null==(a=f.parentElement)||a.insertBefore(x,f),f.style.position="absolute",f.style.left=`${g}px`,f.style.top=`${y}px`,f.style.bottom="auto",f.style.zIndex=String(w),f.style.pointerEvents="none"}}(e,i instanceof HTMLElement&&i.firstElementChild instanceof HTMLElement?i.firstElementChild:i),e===r.nodeMap.get(i)){let t=r.styleCache.get(e)||Zs(e);r.styleCache.set(e,t);let a=function(e){if(!e||"none"===e)return"";let t=e.replace(/translate[XY]?\([^)]*\)/g,"");return t=t.replace(/matrix\(([^)]+)\)/g,((e,t)=>
2{let a=t.split(",").map((e=>e.trim()));return 6!==a.length?`matrix(${t})`:(a[4]="0",a[5]="0",`matrix(${a.join(", ")})`)})),t=t.replace(/matrix3d\(([^)]+)\)/g,((e,t)=>{let a=t.split(",").map((e=>e.trim()));return 16!==a.length?`matrix3d(${t})`:(a[12]="0",a[13]="0",`matrix3d(${a.join(", ")})`)})),t.trim().replace(/\s{2,}/g," ")}(t.transform);i.style.margin="0",i.style.top="auto",i.style.left="auto",i.style.right="auto",i.style.bottom="auto",i.style.animation="none",i.style.transition="none",i.style.willChange="auto",i.style.float="none",i.style.clear="none",i.style.transform=a||""}for(let[d,p]of r.nodeMap.entries())"PRE"===p.tagName&&(d.style.marginTop="0",d.style.marginBlockStart="0");return{clone:i,classCSS:n,styleCache:r.styleCache}}Fs(),Vs();var tu="http://www.w3.org/1999/xlink";async function au(e,t={}){let a=Array.from(e.querySelectorAll("img")),l=async e=>{if(!e.getAttribute("src")){let t=e.currentSrc||e.src||"";t&&e.setAttribute("src",t)}e.removeAttribute("srcset"),e.removeAttribute("sizes");let a=e.src||"";if(!a)return;let l=await qs(a,{as:"dataURL",useProxy:t.useProxy});if(l.ok&&"string"==typeof l.data&&l.data.startsWith("data:"))return e.src=l.data,e.width||(e.width=e.naturalWidth||100),void(e.height||(e.height=e.naturalHeight||100));let{width:i,height:r}=function(e){var t,a,l,i;let r=parseInt((null==(t=e.dataset)?void 0:t.snapdomWidth)||"",10)||0,n=parseInt((null==(a=e.dataset)?void 0:a.snapdomHeight)||"",10)||0,s=parseInt(e.getAttribute("width")||"",10)||0,o=parseInt(e.getAttribute("height")||"",10)||0,c=parseFloat((null==(l=e.style)?void 0:l.width)||"")||0,u=parseFloat((null==(i=e.style)?void 0:i.height)||"")||0;return{width:r||c||s||e.width||e.naturalWidth||100,height:n||u||o||e.height||e.naturalHeight||100}}(e),{fallbackURL:n}=t||{};if(n)try{let l="function"==typeof n?await n({width:i,height:r,src:a,element:e}):n;if(l){let a=await qs(l,{as:"dataURL",useProxy:t.useProxy});if((null==a?void 0:a.ok)&&"string"==typeof a.data)return e.src=a.data,e.width||(e.width=i),void(e.height||(e.height=r))}}catch{}if(!1!==t.placeholders){let t=document.createElement("div");t.style.cssText=[`width:${i}px`,`height:${r}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${r}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),t.textContent="img",e.replaceWith(t)}else{let t=document.createElement("div");t.style.cssText=`display:inline-block;width:${i}px;height:${r}px;visibility:hidden;`,e.replaceWith(t)}};for(let n=0;n<a.length;n+=4){let e=a.slice(n,n+4).map(l);await Promise.allSettled(e)}let i=Array.from(e.querySelectorAll("image")),r=async e=>{let a=function(e){return e.getAttribute("href")||e.getAttribute("xlink:href")||("function"==typeof e.getAttributeNS?e.getAttributeNS(tu,"href"):null)}(e);if(!a||a.startsWith("data:")||a.startsWith("blob:"))return;let l=await qs(a,{as:"dataURL",useProxy:t.useProxy});l.ok&&"string"==typeof l.data&&l.data.startsWith("data:")&&(e.setAttribute("href",l.data),e.removeAttribute("xlink:href"),"function"==typeof e.removeAttributeNS&&e.removeAttributeNS(tu,"href"))};for(let n=0;n<i.length;n+=4){let e=i.slice(n,n+4).map(r);await Promise.allSettled(e)}}function lu(e){if(!e)return()=>{};let t=[];return function e(a){let l=function(e){if(!e)return()=>{};let t=function(e){let t=getComputedStyle(e),a=t.getPropertyValue("-webkit-line-clamp")||t.getPropertyValue("line-clamp");a=(a||"").trim();let l=parseInt(a,10);return Number.isFinite(l)&&l>0?l:0}(e);if(t<=0)return()=>{};if(!function(e){return!(e.childElementCount>0)&&Array.from(e.childNodes).some((e=>e.nodeType===Node.TEXT_NODE))}(e))return()=>{};let a=getComputedStyle(e),l=Math.round(function(e){let t=(e.lineHeight||"").trim(),a=parseFloat(e.fontSize)||16;
2return t&&"normal"!==t?t.endsWith("px")?parseFloat(t):/^\d+(\.\d+)?$/.test(t)?Math.round(parseFloat(t)*a):t.endsWith("%")?Math.round(parseFloat(t)/100*a):Math.round(1.2*a):Math.round(1.2*a)}(a)*t+function(e){return(parseFloat(e.paddingTop)||0)+(parseFloat(e.paddingBottom)||0)}(a)),i=e.textContent??"",r=i;if(e.scrollHeight<=l+.5)return()=>{};let n=0,s=i.length,o=-1;for(;n<=s;){let t=n+s>>1;e.textContent=i.slice(0,t)+"â¦",e.scrollHeight<=l+.5?(o=t,n=t+1):s=t-1}return e.textContent=(o>=0?i.slice(0,o):"")+"â¦",()=>{e.textContent=r}}(a);l&&t.push(l);for(let t of a.children||[])e(t)}(e),()=>t.forEach((e=>e()))}uo(),uo(),Fs();var iu=[];function ru(e){if(!e)return null;if(Array.isArray(e)){let[t,a]=e;return"function"==typeof t?t(a):t}if("object"==typeof e&&"plugin"in e){let{plugin:t,options:a}=e;return"function"==typeof t?t(a):t}return"function"==typeof e?e():e}function nu(e){return(e&&Array.isArray(e.plugins)?e.plugins:iu)||iu}async function su(e,t,a){let l=a,i=nu(t);for(let r of i){let a=r&&"function"==typeof r[e]?r[e]:null;if(!a)continue;let i=await a(t,l);typeof i<"u"&&(l=i)}return l}function ou(e,t,a=!1){return!e||e.plugins&&!a||(e.plugins=function(e){let t=[];if(Array.isArray(e))for(let a of e){let e=ru(a);if(!e||!e.name)continue;let l=t.findIndex((t=>t&&t.name===e.name));l>=0&&t.splice(l,1),t.push(e)}for(let a of iu)a&&a.name&&!t.some((e=>e.name===a.name))&&t.push(a);return Object.freeze(t)}(t)),e}function cu(e){return!!(!e||e.startsWith("data:")||e.startsWith("blob:")||/^data:image\/(gif|png|svg)/.test(e)&&e.length<200)}function uu(e,t){let a=e.currentSrc||"";if(a&&!cu(a))return a;let l=t.querySelectorAll("source[srcset]"),i=null;for(let r of l){let e=r.getAttribute("srcset");if(!e||cu(e))continue;let t=r.getAttribute("media");if(t)try{if(window.matchMedia(t).matches)return e.split(",")[0].trim().split(/\s+/)[0]}catch{}i||(i=e.split(",")[0].trim().split(/\s+/)[0])}return i}function du(e){let t=[e.getAttribute("data-src"),e.getAttribute("data-lazy-src"),e.getAttribute("data-original"),e.getAttribute("data-hi-res-src")];for(let l of t)if(l&&!cu(l))return l;let a=e.getAttribute("data-srcset")||e.getAttribute("data-lazy-srcset");if(a){let e=a.split(",")[0].trim().split(/\s+/)[0];if(e&&!cu(e))return e}return null}async function pu(e,t={}){if(!(e&&e instanceof Element&&!1!==t.resolvePicturePlaceholders))return null;let{timeout:a,concurrency:l,resolveLazySrc:i,silent:r,useProxy:n}=function(e={}){let t=e.pictureResolver&&"object"==typeof e.pictureResolver?e.pictureResolver:{};return{timeout:t.timeout??5e3,concurrency:t.concurrency??4,resolveLazySrc:!1!==t.resolveLazySrc,silent:t.silent??!1,useProxy:"string"==typeof e.useProxy?e.useProxy:""}}(t);if(!function(e,t){return!!(e&&e instanceof Element&&(e.querySelector("picture")||t&&e.querySelector("img[data-src], img[data-lazy-src], img[data-original], img[data-hi-res-src], img[data-srcset], img[data-lazy-srcset]")))}(e,i))return null;let s=[],o=[];async function c(e){let t=new AbortController,l=setTimeout((()=>t.abort()),a);try{let a=await fetch(e,{credentials:"include",signal:t.signal});if(!a.ok&&n){let l=n.includes("{url}")?n.replace("{url}",encodeURIComponent(e)):n.endsWith("?")?`${n}${encodeURIComponent(e)}`:`${n}${n.includes("?")?"&":"?"}url=${encodeURIComponent(e)}`;a=await fetch(l,{signal:t.signal})}if(!a.ok)return null;let l=await a.blob();return await new Promise(((e,t)=>{let a=new FileReader;a.onload=()=>e(a.result),a.onerror=t,a.readAsDataURL(l)}))}catch{return null}finally{clearTimeout(l)}}let u=e.querySelectorAll("picture");for(let d of u){let e=d.querySelector("img");if(!e)continue;if(!cu(e.getAttribute("src")||""))continue;let t=uu(e,d);t&&o.push((async()=>{let a=await c(t);if(!a)return;let l=e.getAttribute("src"),i=e.getAttribute("srcset"),r=e.getAttribute("sizes"),n=[];e.src=a,e.setAttribute("src",a),e.removeAttribute("srcset"),e.removeAttribute("sizes");let o=d.querySelectorAll("source");for(let e of o)n.push({el:e,parent:e.parentElement,next:e.nextSibling}),e.remove();s.push((()=>{null!==l?e.setAttribute("src",l):e.removeAttribute("src"),null!==i&&e.setAttribute("srcset",i),null!==r&&e.setAttribute("sizes",r);for(let{el:e,parent:t,next:a}of n)t&&t.insertBefore(e,a)}))}))}if(i){let t=e.querySelectorAll("img");for(let e of t){if(e.closest("picture")&&cu(e.getAttribute("src")||""))continue;let t=e.getAttribute("src")||"",a=du(e);a&&cu(t)&&o.push((async()=>{let t=await c(a);if(!t)return;let l=e.getAttribute("src");e.src=t,e.setAttribute("src",t),e.removeAttribute("srcset"),e.removeAttribute("sizes"),s.push((()=>{null!==l?e.setAttribute("src",l):e.removeAttribute("src")}))}
2))}}return 0===o.length?null:(await async function(e){for(let t=0;t<e.length;t+=l){let a=e.slice(t,t+l);await Promise.allSettled(a.map((e=>e())))}}(o),async function(){for(let e of s)try{e()}catch{}})}function fu(e,t={}){e&&(function(e,t={}){let{stripFrameworkDirectives:a=!0}=t,l=new Set(["xml","xlink"]),i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;i.nextNode();){let e=i.currentNode;for(let t of Array.from(e.attributes)){let i=t.name;if(i.includes("@"))e.removeAttribute(i);else{if(i.includes(":")){let t=i.split(":",1)[0];if(!l.has(t)){e.removeAttribute(i);continue}}a&&(i.startsWith("x-")||i.startsWith("v-")||i.startsWith(":")||i.startsWith("on:")||i.startsWith("bind:")||i.startsWith("let:")||i.startsWith("class:"))&&e.removeAttribute(i)}}}}(e,t),function(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),a=[];for(;t.nextNode();)a.push(t.currentNode);for(let l of a)l.remove()}(e))}function mu(e,t){if(!(e instanceof Element)||function(e){var t;try{let a=(null==(t=e.getAttribute)?void 0:t.call(e,"style"))||"";return/\b(height|width|block-size|inline-size)\s*:/.test(a)}catch{return!1}}(e)||function(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLIFrameElement||e instanceof SVGElement||e instanceof HTMLObjectElement||e instanceof HTMLEmbedElement}(e))return!1;let a=t.position;if("absolute"===a||"fixed"===a||"sticky"===a)return!1;let l=t.display||"";return!(l.includes("flex")||l.includes("grid")||l.startsWith("table")||t.transform&&"none"!==t.transform)}function vu(e){let t=getComputedStyle(e);return!("none"===t.display||"absolute"===t.position||"fixed"===t.position)}function hu(e,t){if(!(e instanceof Element))return!1;if("exclude"===e.getAttribute("data-capture")&&"remove"===(null==t?void 0:t.excludeMode))return!0;if(Array.isArray(null==t?void 0:t.exclude))for(let l of t.exclude)try{if(e.matches(l))return"remove"===t.excludeMode}catch(a){oo(t)}return!1}uo();var gu=(e,t=3)=>Number.isFinite(e)?Math.round(e*10**t)/10**t:e,yu=/::-webkit-scrollbar(-[a-z]+)?\b/i;function bu(e,t=new Set){let a="";if(!e)return a;for(let l=0;l<e.length;l++){let i=e[l];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){a+=bu(i.styleSheet.cssRules,t);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let e=bu(i.cssRules,t);e&&(a+=`@media ${i.conditionText}{${e}}`);continue}if(i.type===CSSRule.STYLE_RULE){let e=i.selectorText||"";if(yu.test(e)){let e=i.cssText;e&&!t.has(e)&&(t.add(e),a+=e)}}}catch{}}return a}function _u(e,t,a,l,i){let r=a.a,n=a.b,s=a.c,o=a.d,c=a.e||0,u=a.f||0;function d(e,t){let a=e-l,d=t-i,p=r*a+s*d,f=n*a+o*d;return p+=l+c,f+=i+u,[p,f]}let p=[d(0,0),d(e,0),d(0,t),d(e,t)],f=1/0,m=1/0,v=-1/0,h=-1/0;for(let[g,y]of p)g<f&&(f=g),y<m&&(m=y),g>v&&(v=g),y>h&&(h=y);return{minX:f,minY:m,maxX:v,maxY:h,width:v-f,height:h-m}}var wu=null;function ku(e){let t=function(){if(wu)return wu;let e=document.createElement("div");return e.id="snapdom-measure-slot",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",left:"-99999px",to
2p:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(e),wu=e,e}(),a=document.createElement("div");a.style.transformOrigin="0 0",e.baseTransform&&(a.style.transform=e.baseTransform),e.rotate&&(a.style.rotate=e.rotate),e.scale&&(a.style.scale=e.scale),e.translate&&(a.style.translate=e.translate),t.appendChild(a);let l=xu(a);return t.removeChild(a),l}function xu(e){let t=getComputedStyle(e).transform;if(!t||"none"===t)return new DOMMatrix;try{return new DOMMatrix(t)}catch{return new WebKitCSSMatrix(t)}}function Su(e){var t;if(Array.isArray(e.plugins))for(let a of e.plugins)if("picture-resolver"===(null==(t=ru(a))?void 0:t.name))return!0;return iu.slice().some((e=>"picture-resolver"===(null==e?void 0:e.name)))}async function Cu(e,t){var a,l;if(!e)throw new Error("Element cannot be null or undefined");!function(e="soft"){switch(Is.session.__counterEpoch=(Is.session.__counterEpoch||0)+1,e){case"auto":return Is.session.styleMap=new Map,void(Is.session.nodeMap=new Map);case"soft":default:return Is.session.styleMap=new Map,Is.session.nodeMap=new Map,void(Is.session.styleCache=new WeakMap);case"full":return;case"disabled":Is.session.styleMap=new Map,Is.session.nodeMap=new Map,Is.session.styleCache=new WeakMap,Is.computedStyle=new WeakMap,Is.baseStyle=new Es(50),Is.defaultStyle=new Es(30),Is.image=new Es(100),Is.background=new Es(100),Is.resource=new Es(150),Is.font=new Set}}(t.cache);let i,r,n,s,o,c=t.fast,u=!1!==t.outerTransforms,d=!!t.outerShadows,p={element:e,options:t,plugins:t.plugins},f="",m="",v=null;await su("beforeSnap",p);let h=null;!1!==t.resolvePicturePlaceholders&&!Su(t)&&(h=await pu(p.element,p.options)),await su("beforeClone",p);let g=lu(p.element);try{({clone:i,classCSS:r,styleCache:n}=await eu(p.element,p.options)),!u&&i&&(v=function(e,t){if(!e||!t||!t.style)return null;let a=getComputedStyle(e);try{t.style.transformOrigin="0 0"}catch{}try{"translate"in t.style&&(t.style.translate="none"),"rotate"in t.style&&(t.style.rotate="none")}catch{}let l=a.transform||"none";if("none"===l)try{let a=xu(e);if(1===a.a&&0===a.b&&0===a.c&&1===a.d)return t.style.transform="none",{a:1,b:0,c:0,d:1}}catch{}function i(e,t,a,l){let i=Math.sqrt(e*e+t*t)||0,r=0,n=0;if(i>0){let s=e/i,o=t/i;r=s*a+o*l;let c=a-s*r,u=l-o*r;n=Math.sqrt(c*c+u*u)||0,n>0?r/=n:r=0}return{a:i,b:0,c:r*n,d:n}}let r=l.match(/^matrix\(\s*([^)]+)\)$/i);if(r){let e=r[1].split(",").map((e=>parseFloat(e.trim())));if(6===e.length&&e.every(Number.isFinite)){let[a,l,r,n]=e,s=i(a,l,r,n);try{t.style.transform=`matrix(${s.a}, ${s.b}, ${s.c}, ${s.d}, 0, 0)`}catch{}return s}}let n=l.match(/^matrix3d\(\s*([^)]+)\)$/i);if(n){let e=n[1].split(",").map((e=>parseFloat(e.trim())));if(16===e.length&&e.every(Number.isFinite)){let a=i(e[0],e[1],e[4],e[5]);try{t.style.transform=`matrix(${a.a}, ${a.b}, ${a.c}, ${a.d}, 0, 0)`}catch{}return a}}try{let e=new DOMMatrix(l),a=i(e.a,e.b,e.c,e.d);try{t.style.transform=`matrix(${a.a}, ${a.b}, ${a.c}, ${a.d}, 0, 0)`}catch{}return a}catch{return null}}(p.element,i)),!d&&i&&function(e,t,a={}){if(!e||!t||!t.style)return;let l=getComputedStyle(e);try{t.style.boxShadow="none"}catch(i){oo(a)}try{t.style.textShadow="none"}catch(i){oo(a)}try{t.style.outline="none"}catch(i){oo(a)}let r=(l.filter||"").replace(/\bblur\([^()]*\)\s*/gi,"").replace(/\bdrop-shadow\([^()]*\)\s*/gi,"").trim().replace(/\s+/g," ");try{t.style.filter=r.length?r:"none"}catch(i){oo(a)}}(p.element,i,p.options)}finally{g()}if(p={clone:i,classCSS:r,styleCache:n,...p},await su("afterClone",p),h&&await h(),fu(p.clone),"remove"===(null==(a=p.options)?void 0:a.excludeMode))try{!function(e,t,a=new Map){!function e(t,l){if(!(t instanceof Element&&l instanceof Element))return;let i=t.childElementCount>l.childElementCount,r=a.get(t)||getComputedStyle(t);if(a.has(t)||a.set(t,r),i&&mu(t,r)){l.style.height||(l.style.height="auto"),l.style.width||(l.style.width="auto"),l.style.removeProperty("block-size"),l.style.removeProperty("inline-size"),l.style.minHeight||(l.style.minHeight="0"),l.style.minWidth||(l.style.minWidth="0"),l.style.maxHeight||(l.style.maxHeight="none"),l.style.maxWidth||(l.style.maxWidth="none");let e=r.overflowY||r.overflowBlock||"visible",t=r.overflowX||r.overflowInline||"visible";("visible"!==e||"visible"!==t)&&(l.style.overflow="visible")}let n=Array.from(t.children),s=Array.from(l.children);for(let a=0;a<Math.min(n.length,s.length);a++)e(n[a],s[a])}(e,t)}(p.element,p.clone,p.styleCache)}catch(k){}try{await async function(e,t){if(!(e instanceof Element))return 0;let a='.material-icons, [class*="material-symbols"]',l=Array.from(e.querySelectorAll(a)).filter((e=>e&&e.textContent&&e.textContent.trim()));if(0===l.length)return 0;let i=t instanceof Element?Array.from(t.querySelectorAll(a)).filter((e=>e&&e.textContent&&e.textContent.trim())):[],r=0;for(let n=0;n<l.length;n++){let e=l[n],t=i[n]||null;try{let a=getComputedStyle(t||e),l=a.fontFamily||"Material Icons";if(!nc(l))continue;let i=(t||e).textContent.trim();if(!i)continue;let n=parseInt(a.fontSize,10)||24,s=a.fontWeight&&"normal"!==a.fontWeight?a.fontWeight:"normal",o=oc(a),c=a.fontVariationSettings&&"normal"!==a.fontVariationSettings?a.fontVariationSettings:"",u=(t||e).className||"",{dataUrl:d,width:p,height:f}=await cc(i,{family:l,weight:s,fontSize:n,color:o,variation:c,className:u});e.textContent="";let m=e.ownerDocument.createElement("img");m.src=d,m.alt=i,m.style.height=`${n}px`,m.style.width=`${Math.max(1,Math.round(p/f*n))}px`,m.style.objectFit="contain",m.style.verticalAlign=getComputedStyle(e).verticalAlign||"baseline",e.appendChild(m),r++}catch{}}return r}(p.clone,p.element)}catch{}await new Promise((e=>{ro((async()=>{await au(p.clone,p.options),e()}),{fast:c})})),await new Promise((e=>{ro((async()=>{await async function(e,t,a,l={}){let i=[[e,t]],r=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],n=["mask-position","mask-size","mask-repeat","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],s=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],o=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];for(;i.length;){let[e,t]=i.shift();if(!t)continue;let c=a.get(e)||Zs(e);a.has(e)||a.set(e,c);let u=(()=>{let e=c.getPropertyValue("border-image"),t=c.getPropertyValue("border-image-source");return e&&"none"!==e||t&&"none"!==t})();for(let a of s){let e=c.getPropertyValue(a);e&&t.style.setProperty(a,e)}for(let a of r){let e=c.getPropertyValue(a);if("background-image"===a&&(!e||"none"===e)){let t=c.getPropertyValue("background");t&&/url\s*\(/.test(t)&&(e=Qs(t).filter((e=>/url\s*\(/.test(e))).join(", ")||e)}if(!e||"none"===e)continue;let i=Qs(e),r=await Promise.all(i.map((e=>js(e,l))));r.some((e=>e&&"none"!==e&&!/^url\(undefined/.test(e)))&&t.style.setProperty(a,r.join(", "))}for(let a of n){let e=c.getPropertyValue(a);!e||"initial"===e||t.style.setProperty(a,e)}if(u)for(let a of o){let e=c.getPropertyValue(a);!e||"initial"===e||t.style.setProperty(a,e)}let d=e.shadowRoot?Array.from(e.shadowRoot.children).filter((e=>"STYLE"!==e.tagName)):Array.from(e.children),p=Array.from(t.children).filter((e=>{var t,a;
2return!((null==(t=e.dataset)?void 0:t.snapdomPseudo)||"STYLE"===e.tagName&&(null==(a=e.dataset)?void 0:a.sd))}));for(let a=0;a<Math.min(d.length,p.length);a++)i.push([d[a],p[a]])}}(p.element,p.clone,p.styleCache,p.options),e()}),{fast:c})})),t.embedFonts&&await new Promise((e=>{ro((async()=>{let t=Nc(p.element),a=function(e){var t;let a=new Set,l=e=>{if(e)for(let t of e)a.add(t.codePointAt(0))},i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;i.nextNode();){let e=i.currentNode;if(e.nodeType===Node.TEXT_NODE)l(e.nodeValue||"");else if(e.nodeType===Node.ELEMENT_NODE){let i=e;for(let e of["::before","::after"]){let r=null==(t=getComputedStyle(i,e))?void 0:t.getPropertyValue("content");if(r&&"none"!==r)if(/^"/.test(r)||/^'/.test(r))l(r.slice(1,-1));else{let e=r.match(/\\[0-9A-Fa-f]{1,6}/g);if(e)for(let t of e)try{a.add(parseInt(t.slice(1),16))}catch{}}}}}return a}(p.element);if(no()){let e=new Set(Array.from(t).map((e=>String(e).split("__")[0])).filter(Boolean));await Lc(e,1)}f=await Tc({required:t,usedCodepoints:a,exclude:p.options.excludeFonts,useProxy:p.options.useProxy,fontStylesheetDomains:p.options.fontStylesheetDomains}),e()}),{fast:c})}));let y=function(e){let t=new Set;return e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(e.tagName&&t.add(e.tagName.toLowerCase()),"function"==typeof e.querySelectorAll&&e.querySelectorAll("*").forEach((e=>t.add(e.tagName.toLowerCase()))),Array.from(t))}(p.clone).sort(),b=y.join(",");Is.baseStyle.has(b)?m=Is.baseStyle.get(b):await new Promise((e=>{ro((()=>{m=function(e){let t=new Map;for(let l of e){let e=Is.defaultStyle.get(l);if(!e)continue;let a=Object.entries(e).map((([e,t])=>`${e}:${t};`)).sort().join("");a&&(t.has(a)||t.set(a,[]),t.get(a).push(l))}let a="";for(let[l,i]of t.entries())a+=`${i.join(",")} { ${l} }\n`;return a}(y),Is.baseStyle.set(b,m),e()}),{fast:c})}));let _=function(e){if(!e||!e.styleSheets)return"";let t=new Set,a="";for(let l of Array.from(e.styleSheets))try{let e=l.cssRules;e&&(a+=bu(e,t))}catch{}return a}((null==(l=p.element)?void 0:l.ownerDocument)||document);p={fontsCSS:f,baseCSS:m,scrollbarCSS:_,...p},await su("beforeRender",p),await new Promise((e=>{ro((()=>{var a,l,i,r,n,c;let f=Zs(p.element),m=p.element.getBoundingClientRect(),h=Math.max(1,gu(p.element.offsetWidth||parseFloat(f.width)||m.width||1)),g=Math.max(1,gu(p.element.offsetHeight||parseFloat(f.height)||m.height||1)),y=p.element.ownerDocument||document;if(p.element===y.body||p.element===y.documentElement){let e=Math.max(p.element.scrollHeight||0,(null==(a=y.documentElement)?void 0:a.scrollHeight)||0,(null==(l=y.body)?void 0:l.scrollHeight)||0),t=Math.max(p.element.scrollWidth||0,(null==(i=y.documentElement)?void 0:i.scrollWidth)||0,(null==(r=y.body)?void 0:r.scrollWidth)||0);e>0&&(g=Math.max(g,gu(e))),t>0&&(h=Math.max(h,gu(t)));try{let e=(p.scrollbarCSS||"").length+(p.baseCSS||"").length+(p.fontsCSS||"").length+(p.classCSS||"").length,t=Is.measureHints.get(p.element);if(t&&t.cssLen===e&&t.w0===h)t.csh>0&&(g=Math.max(g,gu(t.csh))),t.csw>0&&(h=Math.max(h,gu(t.csw)));else{let t=y.createElement("div");t.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+h+"px!important;overflow:visible!important;visibility:hidden!important;";let a=y.createElement("style");a.textContent=(p.scrollbarCSS||"")+p.baseCSS+p.fontsCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+p.classCSS,t.appendChild(a),t.appendChild(p.clone.cloneNode(!0)),y.body.appendChild(t);let l=t.scrollHeight,i=t.scrollWidth;y.body.removeChild(t),Is.measureHints.set(p.element,{cssLen:e,w0:h,csh:l,csw:i}),l>0&&(g=Math.max(g,gu(l))),i>0&&(h=Math.max(h,gu(i)))}}catch{}}if("remove"===(null==(n=p.options)?void 0:n.excludeMode)){let e=function(e,t){let a=getComputedStyle(e),l=e.getBoundingClientRect(),i=1/0,r=-1/0,n=!1,s=Array.from(e.children);for(let c of s){if(hu(c,t)||!vu(c))continue;let e=c.getBoundingClientRect(),a=e.top-l.top,s=e.bottom-l.top;s<=a||(a<i&&(i=a),s>r&&(r=s),n=!0)}let o=n?Math.max(0,r-i):0;return(parseFloat(a.borderTopWidth)||0)+(parseFloat(a.borderBottomWidth)||0)+(parseFloat(a.paddingTop)||0)+(parseFloat(a.paddingBottom)||
20)+o}(p.element,p.options);Number.isFinite(e)&&e>0&&(g=Math.max(1,Math.min(g,gu(e+1))))}let b=(e,t=NaN)=>{let a="string"==typeof e?parseFloat(e):e;return Number.isFinite(a)?a:t},_=b(p.options.width),w=b(p.options.height),k=h,x=g,S=Number.isFinite(_),C=Number.isFinite(w),$=g>0?h/g:1;S&&C?(k=Math.max(1,gu(_)),x=Math.max(1,gu(w))):S?(k=Math.max(1,gu(_)),x=Math.max(1,gu(k/($||1)))):C?(x=Math.max(1,gu(w)),k=Math.max(1,gu(x*($||1)))):(k=h,x=g);let M=0,P=0,A=h,T=g;if(!u&&v&&Number.isFinite(v.a)){let e=_u(h,g,{a:v.a,b:v.b||0,c:v.c||0,d:v.d||1,e:0,f:0},0,0);M=gu(e.minX),P=gu(e.minY),A=gu(e.maxX),T=gu(e.maxY)}else if(u&&$u(p.element)){let e=f.transform&&"none"!==f.transform?f.transform:"",t=function(e){var t,a,l,i,r,n,s,o;let c={rotate:"0deg",scale:null,translate:null},u="function"==typeof e.computedStyleMap?e.computedStyleMap():null;if(u){let d=e=>{try{return"function"==typeof u.has&&!u.has(e)||"function"!=typeof u.get?null:u.get(e)}catch{return null}},p=d("rotate");if(p)if(p.angle){let e=p.angle;c.rotate="rad"===e.unit?180*e.value/Math.PI+"deg":e.value+e.unit}else p.unit?c.rotate="rad"===p.unit?180*p.value/Math.PI+"deg":p.value+p.unit:c.rotate=String(p);else{let t=getComputedStyle(e);c.rotate=t.rotate&&"none"!==t.rotate?t.rotate:"0deg"}let f=d("scale");if(f){let e="x"in f&&null!=(null==(t=f.x)?void 0:t.value)?f.x.value:Array.isArray(f)?null==(a=f[0])?void 0:a.value:Number(f)||1,r="y"in f&&null!=(null==(l=f.y)?void 0:l.value)?f.y.value:Array.isArray(f)?null==(i=f[1])?void 0:i.value:e;c.scale=`${e} ${r}`}else{let t=getComputedStyle(e);c.scale=t.scale&&"none"!==t.scale?t.scale:null}let m=d("translate");if(m){let e="x"in m&&"value"in m.x?m.x.value:Array.isArray(m)?null==(r=m[0])?void 0:r.value:0,t="y"in m&&"value"in m.y?m.y.value:Array.isArray(m)?null==(n=m[1])?void 0:n.value:0,a="x"in m&&(null==(s=m.x)?void 0:s.unit)?m.x.unit:"px",l="y"in m&&(null==(o=m.y)?void 0:o.unit)?m.y.unit:"px";c.translate=`${e}${a} ${t}${l}`}else{let t=getComputedStyle(e);c.translate=t.translate&&"none"!==t.translate?t.translate:null}return c}let d=getComputedStyle(e);return c.rotate=d.rotate&&"none"!==d.rotate?d.rotate:"0deg",c.scale=d.scale&&"none"!==d.scale?d.scale:null,c.translate=d.translate&&"none"!==d.translate?d.translate:null,c}(p.element),a=ku({baseTransform:e,rotate:t.rotate||"0deg",scale:t.scale,translate:t.translate}),{ox:l,oy:i}=function(e,t,a){let l=(e.transformOrigin||"0 0").trim().split(/\s+/),[i,r]=[l[0]||"0",l[1]||"0"],n=(e,t)=>{let a=e.toLowerCase();return"left"===a||"top"===a?0:"center"===a?t/2:"right"===a||"bottom"===a?t:a.endsWith("px")?parseFloat(a)||0:a.endsWith("%")?(parseFloat(a)||0)*t/100:/^-?\d+(\.\d+)?$/.test(a)&&parseFloat(a)||0};return{ox:n(i,t),oy:n(r,a)}}(f,h,g),r=_u(h,g,a.is2D?a:new DOMMatrix(a.toString()),l,i);M=gu(r.minX),P=gu(r.minY),A=gu(r.maxX),T=gu(r.maxY)}let N=function(e){var t;let a=e.boxShadow||"";if(!a||"none"===a)return{top:0,right:0,bottom:0,left:0};let l=a.split(/\),(?=(?:[^()]*\([^()]*\))*[^()]*$)/).map((e=>e.trim())),i=0,r=0,n=0,s=0;for(let o of l){let e=(null==(t=o.match(/-?\d+(\.\d+)?px/g))?void 0:t.map((e=>parseFloat(e))))||[];if(e.length<2)continue;let[a,l,c=0,u=0]=e,d=Math.abs(a)+c+u,p=Math.abs(l)+c+u;r=Math.max(r,d+Math.max(a,0)),s=Math.max(s,d+Math.max(-a,0)),n=Math.max(n,p+Math.max(l,0)),i=Math.max(i,p+Math.max(-l,0))}return{top:Math.ceil(i),right:Math.ceil(r),bottom:Math.ceil(n),left:Math.ceil(s)}}(f),L=function(e){let t=(e.filter||"").match(/blur\(\s*([0-9.]+)px\s*\)/),a=t?Math.ceil(parseFloat(t[1])||0):0;return{top:a,right:a,bottom:a,left:a}}(f),E=function(e){if("none"===(e.outlineStyle||"none"))return{top:0,right:0,bottom:0,left:0};let t=Math.ceil(parseFloat(e.outlineWidth||"0")||0),a=parseFloat(e.outlineOffset||"0")||0,l=t+Math.max(0,Math.ceil(a));return{top:l,right:l,bottom:l,left:l}}(f),I=function(e){var t;let a=`${e.filter||""} ${e.webkitFilter||""}`.trim();if(!a||"none"===a)return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let l=a.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],i=0,r=0,n=0,s=0,o=!1;for(let c of l){o=!0;let e=(null==(t=c.match(/-?\d+(?:\.\d+)?px/gi))?void 0:t.map((e=>parseFloat(e))))||[],[a=0,l=0,u=0]=e,d=Math.abs(a)+u,p=Math.abs(l)+u;r=Math.max(r,d+Math.max(a,0)),s=Math.max(s,d+Math.max(-a,0)),n=Math.max(n,p+Math.max(l,0)),i=Math.max(i,p+Math.max(-l,0))}return{bleed:{top:gu(i),right:gu(r),bottom:gu(n),left:gu(s)},has:o}}(f),F=d?{top:gu(N.top+L.top+E.top+I.bleed.top),right:gu(N.right+L.right+E.right+I.bleed.right),bottom:gu(N.bottom+L.bottom+E.bottom+I.bleed.bottom),left:gu(N.left+L.left+E.left+I.bleed.left)}:{top:0,right:0,bottom:0,left:0};M=gu(M-F.left),P=gu(P-F.top),A=gu(A+F.right),T=gu(T+F.bottom);let R=Math.max(1,gu(A-M)),D=Math.max(1,gu(T-P)),O=S||C?gu(k/h):1,U=C||S?gu(x/g):1,z=Math.max(1,gu(R*O)),q=Math.max(1,gu(D*U)),B="http://www.w3.org/2000/svg",W=no()&&$u(p.element)?1:0,H=gu(W+(u?0:1)),V=document.createElementNS(B,"foreignObject"),j=gu(M),K=gu(P);V.setAttribute("x",String(gu(-(j-H)))),V.setAttribute("y",String(gu(-(K-H)))),V.setAttribute("width",String(gu(h+2*H))),V.setAttribute("height",String(gu(g+2*H))),V.style.overflow="visible";let Y=document.createElement("style");Y.textContent=(p.scrollbarCSS||"")+p.baseCSS+p.fontsCSS+'svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject *{min-width:0;} foreignObject pre,foreignObject [style*="white-space"]{white-space:inherit;}'+p.classCSS,V.appendChild(Y);let G=document.createElement("div");G.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),G.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${gu(h)}px;height:${gu(g)}px`,G.appendChild(p.clone),V.appendChild(G);let Z=(new XMLSerializer).serializeToString(V),X=gu(R+2*H),Q=gu(D+2*H),J=S||C;t.meta={w0:h,h0:g,vbW:X,vbH:Q,targetW:k,targetH:x};
2let ee=no()&&J?X:gu(z+2*H),te=no()&&J?Q:gu(q+2*H),ae=parseFloat(null==(c=Zs(y.documentElement))?void 0:c.fontSize)||16;o=`<svg xmlns="${B}" width="${ee}" height="${te}" viewBox="0 0 ${X} ${Q}" font-size="${ae}px">`+Z+"</svg>",s=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(o)}`,p={svgString:o,dataURL:s,...p},e()}),{fast:c})})),await su("afterRender",p);let w=document.getElementById("snapdom-sandbox");return w&&"absolute"===w.style.position&&w.remove(),p.dataURL}function $u(e){return function(e){let t=getComputedStyle(e),a=t.transform||"none";if("none"!==a&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(a))return!0;let l=t.rotate&&"none"!==t.rotate&&"0deg"!==t.rotate,i=t.scale&&"none"!==t.scale&&"1"!==t.scale,r=t.translate&&"none"!==t.translate&&"0px 0px"!==t.translate;return!!(l||i||r)}(e)}Fs(),so(),co(),uo(),Vs(),Fs();var Mu=Object.assign((async function(e,t){if(!e)throw new Error("Element cannot be null or undefined");let a=function(e={}){let t=e.format??"png";"jpg"===t&&(t="jpeg");let a=function(e){if(!0===e)return"soft";if(!1===e)return"disabled";if("string"==typeof e){let t=e.toLowerCase().trim();if("auto"===t)return"auto";if("full"===t)return"full";if("soft"===t||"disabled"===t)return t}return"soft"}(e.cache);return{debug:e.debug??!1,fast:e.fast??!0,scale:e.scale??1,exclude:e.exclude??[],excludeMode:e.excludeMode??"hide",filter:e.filter??null,filterMode:e.filterMode??"hide",placeholders:!1!==e.placeholders,embedFonts:e.embedFonts??!1,iconFonts:Array.isArray(e.iconFonts)?e.iconFonts:e.iconFonts?[e.iconFonts]:[],localFonts:Array.isArray(e.localFonts)?e.localFonts:[],excludeFonts:e.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(e.fontStylesheetDomains)?e.fontStylesheetDomains:[],fallbackURL:e.fallbackURL??void 0,cache:a,useProxy:"string"==typeof e.useProxy?e.useProxy:"",width:e.width??null,height:e.height??null,format:t,type:e.type??"svg",quality:e.quality??.92,dpr:e.dpr??(window.devicePixelRatio||1),backgroundColor:e.backgroundColor??(["jpeg","webp"].includes(t)?"#ffffff":null),filename:e.filename??"snapDOM",outerTransforms:e.outerTransforms??!0,outerShadows:e.outerShadows??!1,safariWarmupAttempts:Math.min(3,Math.max(1,0|(e.safariWarmupAttempts??3))),excludeStyleProps:e.excludeStyleProps??null,resolvePicturePlaceholders:!1!==e.resolvePicturePlaceholders,pictureResolver:e.pictureResolver&&"object"==typeof e.pictureResolver?e.pictureResolver:{}}}(t);if(ou(a,t&&t.plugins),no()&&(!0===a.embedFonts||function(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;t.nextNode();){let e=t.currentNode,a=getComputedStyle(e),l=a.backgroundImage&&"none"!==a.backgroundImage,i=a.maskImage&&"none"!==a.maskImage||a.webkitMaskImage&&"none"!==a.webkitMaskImage;if(l||i||"CANVAS"===e.tagName)return!0}return!1}(e))){if(a.embedFonts)try{let t=Nc(e),a=new Set([...t].map((e=>String(e).split("__")[0])).filter(Boolean));await Lc(a,1)}catch{}let l=a.safariWarmupAttempts??3;for(let a=0;a<l;a++)try{await Nu(e,t)}catch{}}return a.iconFonts&&a.iconFonts.length>0&&function(e){let t=Array.isArray(e)?e:[e];for(let a of t)a instanceof RegExp?lc.push(a):"string"==typeof a&&lc.push(new RegExp(ic(a),"i"))}(a.iconFonts),a.snap||(a.snap={toPng:(e,t)=>Mu.toPng(e,t),toSvg:(e,t)=>Mu.toSvg(e,t)}),Mu.capture(e,a,Pu)}),{plugins:function(...e){return function(...e){let t=e.flat();for(let a of t){let e=ru(a);e&&(iu.some((t=>t&&t.name&&e.name&&t.name===e.name))||iu.push(e))}}(...e),Mu}}),Pu=Symbol("snapdom.internal"),Au=Symbol("snapdom.internal.silent"),Tu=!1;async function Nu(e,t){if(Tu)return;let a,l={...t,fast:!0,embedFonts:!0,scale:.2};try{a=await Cu(e,l)}catch(i){oo(t)}await new Promise((e=>requestAnimationFrame((()=>requestAnimationFrame(e))))),a&&await new Promise((e=>{let l=new Image;try{l.decoding="sync",l.loading="eager"}catch(i){oo(t)}l.style.cssText="position:fixed;left:0px;top:0px;width:10px;height:10px;opacity:0.01;pointer-events:none;",l.src=a,document.body.appendChild(l),(async()=>{try{"function"==typeof l.decode&&await l.decode()}catch(i){oo(t)}let a=performance.now();for(;
2!(l.complete&&l.naturalWidth>0)&&performance.now()-a<900;)await new Promise((e=>setTimeout(e,200)));await new Promise((e=>requestAnimationFrame(e)));try{let e=document.createElement("canvas");e.width=Math.max(1,l.naturalWidth||10),e.height=Math.max(1,l.naturalHeight||10);let t=e.getContext("2d");t&&t.drawImage(l,0,0)}catch{}await new Promise((e=>requestAnimationFrame(e)));try{l.remove()}catch(i){oo(t)}e()})()})),e.querySelectorAll("canvas").forEach((e=>{try{let t=e.getContext("2d",{willReadFrequently:!0});t&&t.getImageData(0,0,1,1)}catch(a){oo(t)}})),Tu=!0}Mu.capture=async(e,t,a)=>{if(a!==Pu)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");let l=await Cu(e,t),i={img:async(e,t)=>{let{toImg:a}=await Promise.resolve().then((()=>(xo(),wo)));return a(l,{...e,...t||{}})},svg:async(e,t)=>{let{toSvg:a}=await Promise.resolve().then((()=>(xo(),wo)));return a(l,{...e,...t||{}})},canvas:async(e,t)=>{let{toCanvas:a}=await Promise.resolve().then((()=>(go(),po)));return a(l,{...e,...t||{}})},blob:async(e,t)=>{let{toBlob:a}=await Promise.resolve().then((()=>($o(),So)));return a(l,{...e,...t||{}})},png:async(e,t)=>{let{rasterize:a}=await Promise.resolve().then((()=>(_o(),yo)));return a(l,{...e,...t||{},format:"png"})},jpeg:async(e,t)=>{let{rasterize:a}=await Promise.resolve().then((()=>(_o(),yo)));return a(l,{...e,...t||{},format:"jpeg"})},webp:async(e,t)=>{let{rasterize:a}=await Promise.resolve().then((()=>(_o(),yo)));return a(l,{...e,...t||{},format:"webp"})},download:async(e,t)=>{let{download:a}=await Promise.resolve().then((()=>(To(),Mo)));return a(l,{...e,...t||{}})}},r={};for(let m of["img","svg","canvas","blob","png","jpeg","webp"])r[m]=async e=>i[m](t,{...e||{},[Au]:!0});r.jpg=r.jpeg;
2let n={...t,export:{url:l},exports:r},s=await async function(e,t,a){let l=[],i=nu(t);for(let r of i){let i=r&&"function"==typeof r[e]?r[e]:null;if(!i)continue;let n=await i(t,a);typeof n<"u"&&l.push(n)}return l}("defineExports",n),o=Object.assign({},...s.filter((e=>e&&"object"==typeof e))),c={...i,...o};c.jpeg&&!c.jpg&&(c.jpg=(e,t)=>c.jpeg(e,t));let u=!1,d=Promise.resolve();async function p(e,a){return d=d.then((async()=>{let i=c[e];if(!i)throw new Error(`[snapdom] Unknown export type: ${e}`);let r=function(e,a){let l={...t,...a||{}};return("jpeg"===e||"jpg"===e)&&(null==l.backgroundColor||"transparent"===l.backgroundColor)&&(l.backgroundColor="#ffffff"),l}(e,a),n={...t,export:{type:e,options:r,url:l}};await su("beforeExport",n);let s=await i(n,r);return await su("afterExport",n,s),u||(u=!0,await su("afterSnap",t)),s}))}let f={url:l,toRaw:()=>l,to:(e,t)=>p(e,t),toImg:e=>p("img",e),toSvg:e=>p("svg",e),toCanvas:e=>p("canvas",e),toBlob:e=>p("blob",e),toPng:e=>p("png",e),toJpg:e=>p("jpg",e),toWebp:e=>p("webp",e),download:e=>p("download",e)};for(let m of Object.keys(c)){let e="to"+m.charAt(0).toUpperCase()+m.slice(1);f[e]||(f[e]=e=>p(m,e))}return f},Mu.toRaw=(e,t)=>Mu(e,t).then((e=>e.toRaw())),Mu.toImg=(e,t)=>Mu(e,t).then((e=>e.toImg())),Mu.toSvg=(e,t)=>Mu(e,t).then((e=>e.toSvg())),Mu.toCanvas=(e,t)=>Mu(e,t).then((e=>e.toCanvas())),Mu.toBlob=(e,t)=>Mu(e,t).then((e=>e.toBlob())),Mu.toPng=(e,t)=>Mu(e,{...t,format:"png"}).then((e=>e.toPng())),Mu.toJpg=(e,t)=>Mu(e,{...t,format:"jpeg"}).then((e=>e.toJpg())),Mu.toWebp=(e,t)=>Mu(e,{...t,format:"webp"}).then((e=>e.toWebp())),Mu.download=(e,t)=>Mu(e,t).then((e=>e.download()));const Lu={class:"ocf-share-card__content"},Eu={class:"ocf-share-card__head"},Iu={class:"ocf-share-card__service"},Fu={class:"ocf-share-card__service-name"},Ru={class:"ocf-share-card__coin-row"},Du={class:"ocf-share-card__coin-name"},Ou={class:"ocf-share-card__leverage"},Uu={class:"ocf-share-card__roi-main"},zu={class:"ocf-share-card__roi-sign"},qu={class:"ocf-share-card__roi-num"},Bu={key:0,class:"ocf-share-card__pnl"},Wu={class:"ocf-share-card__info"},Hu={class:"ocf-share-card__info-label"},Vu={class:"ocf-share-card__info-value"},ju={class:"ocf-share-card__bottom"},Ku={class:"ocf-share-card__bottom-content"},Yu={class:"ocf-share-card__bottom-text"},Gu={class:"ocf-share-card__bottom-desc"},Zu={class:"ocf-share-card__bottom-desc"},Xu={class:"ocf-share-card__bottom-desc"},Qu={class:"ocf-share-card__bottom-time"},Ju={class:"ocf-share-card__qrcode"},ed=la(o({__name:"ShareCard",props:{bgUrl:{},data:{},referralLink:{},showPnl:{type:Boolean},index:{},activePageIndex:{}},setup(e,{expose:a}){const{ocfShareImageFilePrefix:l}=me,o=e,c=t(),{t:u}=E(),p=d((()=>Ve(o.data.stoppedAt,"yyyy-MM-dd HH:mm:ss"))),g=d((()=>c.state.futures.marketMap)),y=d((()=>{var e;return null==(e=g.value[o.data.symbol])?void 0:e.baseCurrency})),_=d((()=>{const e=U(o.data.roi).times(100).abs().toNumber();return ne(e,{formatKey:2})})),w=d((()=>[{label:u("futuresMain.openPosition.entryPrice"),value:ne(o.data.entryPrice,{formatKey:2})},{label:u("futuresMain.trade.stopPrice"),value:ne(o.data.exitPrice,{formatKey:2})}])),k=i(null);const x=d((()=>c.state.isApp)),S=d((()=>u("trading.ocf.shareText",{brand:u("brand.name"),feature:je})));return a({handleShare:async function(e=!0){const t=await async function(){if(!k.value)return null;try{const e=await Mu(k.value);return await e.toBlob({type:"jpeg",scale:3})}catch{return null}}();if(!t)return;const a=Ve(new Date,"yyyyMMdd-HHmmss"),i=`${l}-${a}.png`;if(x.value){const a=await Ke(t);Ye(e?{event:"DOWNLOAD_IMAGE",imgBase64:a}:{event:"OPEN_SHARE_PROMPT",message:S.value,url:o.referralLink,imgBase64:a})}else e?Ge(URL.createObjectURL(t),i):Ze({imageBlob:t,text:S.value,url:o.referralLink},i)}}),(e,t)=>(n(),r("div",{ref_key:"cardRef",ref:k,class:"ocf-share-card",style:F({backgroundImage:`url(${e.bgUrl})`})},[m("div",Lu,[m("div",Eu,[b(He,{class:"ocf-share-card__logo"}),m("div",Iu,[m("span",Fu,s(e.$t("trading.ocf.title")),1),t[0]||(t[0]=m("span",{class:"ocf-share-card__service-tm"},"â¢",-1))])]),m("div",Ru,[m("span",Du,s(y.value),1),t[1]||(t[1]=m("span",{class:"ocf-share-card__divider"},null,-1)),m("span",{class:h(["ocf-share-card__direction",{positive:e.data.orderSide===v(he).BUY,negative:e.data.orderSide===v(he).SELL}])},s(e.data.orderSide===v(he).BUY?e.$t("t.long"):e.$t("t.short")),3),t[2]||(t[2]=m("span",{class:"ocf-share-card__divider"},null,-1)),m("span",Ou,s(+e.data.leverage)+"x",1)]),m("div",{class:h(["ocf-share-card__roi",+e.data.roi>=0?"positive":"negative"])},[m("div",Uu,[m("span",zu,s(+e.data.roi>=0?"+":"-"),1),m("span",qu,s(_.value),1),t[3]||(t[3]=m("span",{class:"ocf-share-card__roi-pct"},"%",-1))]),e.showPnl?(n(),r("span",Bu," ("+s(+e.data.realizedPnl>=0?"+":"")+s(v(ne)(e.data.realizedPnl,{formatKey:2}))+" "+s(v(ae))+") ",1)):f("",!0)],2),m("div",Wu,[(n(!0),r(C,null,$(w.value,(e=>(n(),r("div",{key:e.label,class:"ocf-share-card__info-block"},[m("span",Hu,s(e.label),1),m("span",Vu,s(e.value),1)])))),128))])]),m("div",ju,[t[4]||(t[4]=m("div",{class:"ocf-share-card__bottom-backdrop"},null,-1)),m("div",Ku,[m("div",Yu,[m("p",Gu,s(e.$t("trading.ocf.title")),1),m("p",Zu,s(e.$t("trading.ocf.slogan")),1),m("p",Xu,s(e.$t("trading.ocf.shareCodeToStart")),1),m("span",Qu,s(p.value),1)]),m("div",Ju,[b(V,{size:64,value:e.referralLink},null,8,["value"])])])])],4))}}),[["__scopeId","data-v-9f500f8e"]]),td={class:"ocf-share-panel"},ad={class:"ocf-share-panel__pnl-row"},ld={class:"ocf-share-panel__pnl-label"},id={class:"ocf-share-panel__via"},rd={class:"ocf-share-panel__via-title"},nd={class:"ocf-share-panel__list"},sd={class:"ocf-share-panel__icon-wrap"},od={class:"ocf-share-panel__item-name"},cd={class:"ocf-share-panel__item"},ud={class:"ocf-share-panel__icon-wrap"},dd={class:"ocf-share-panel__item-name"},pd=["onClick"],fd={class:"ocf-share-panel__icon-wrap"},md={class:"ocf-share-panel__item-name"},vd=la(o({__name:"SharePanel",props:{referralLink:{},showPnl:{type:Boolean},loading:{type:Boolean},handleShare:{type:Function}},emits:["update:showPnl","clickShare"],setup(e,{emit:t}){const a=e,l=t,{t:i}=E(),{updateCopyWiseToast:o}=Xe(),c=d((()=>i("trading.ocf.shareText",{brand:i("brand.name"),feature:je}))),u=[{name:"Twitter",className:"twitter",icon:Dt,click:function(){const e=new La(a.referralLink,c.value,[i("brand.name").toUpperCase()]).to;window.open(e),l("clickShare",{shareType:Je.TWITTER,isSharePnl:a.showPnl})}},{name:"Facebook",className:"facebook",icon:Ot,click:function(){const e=new Ea(a.referralLink,i("brand.name").toUpperCase()).to;window.open(e),l("clickShare",{shareType:Je.FACEBOOK,isSharePnl:a.showPnl})}},{name:"Whatsapp",className:"whatsapp",icon:Ut,click:function(){const e=new Ia(a.referralLink,c.value).to;window.open(e),l("clickShare",{shareType:Je.WHATSAPP,isSharePnl:a.showPnl})}},{name:"Telegram",className:"telegram",icon:zt,click:function(){const e=new Fa(a.referralLink,c.value).to;window.open(e),l("clickShare",{shareType:Je.TELEGRAM,isSharePnl:a.showPnl})}}];function f(e){a.loading||l("update:showPnl",e)}function v(){a.loading||a.handleShare(!0)}function g(){o({type:Qe.SUCCESS,text:i("msg.copied")}),l("clickShare",{shareType:Je.COPY_LINK,isSharePnl:a.showPnl})}return(e,t)=>{const a=z("loading"),l=z("clipboard");return n(),r("div",td,[m("div",ad,[m("span",ld,s(e.$t("trading.copywise.shareMyProfitLoss")),1),b(Be,{modelValue:e.showPnl,disabled:e.loading,"onUpdate:modelValue":f},null,8,["modelValue","disabled"])]),m("div",id,[m("div",rd,s(e.$t("trading.copywise.shareVia")),1),m("div",nd,[m("div",{class:"ocf-share-panel__item",onClick:v},[x((n(),r("div",sd,[b(Ft,{width:22,height:22,class:"icon"}
2)])),[[a,e.loading]]),m("span",od,s(e.$t("t.saveImage")),1)]),x((n(),r("div",cd,[m("div",ud,[b(Rt,{width:20,height:20,class:"icon"})]),m("span",dd,s(e.$t("t.copyLink")),1)])),[[l,e.referralLink,"copy"],[l,g,"success"]]),(n(),r(C,null,$(u,(e=>m("div",{key:e.name,class:h(["ocf-share-panel__item",e.className]),onClick:e.click},[m("div",fd,[(n(),p(j(e.icon),{width:40,height:40}))]),m("span",md,s(e.name),1)],10,pd))),64))])])])}}}),[["__scopeId","data-v-5beb5f31"]]),hd={class:"ocf-share-dialog__head"},gd={class:"ocf-share-dialog__title"},yd={class:"ocf-share-dialog__body"},bd={class:"ocf-share-dialog__left"},_d={class:"ocf-share-dialog__slider-wrap"},wd=["onClick"],kd=["onClick"],xd={class:"ocf-share-dialog__right"},Sd=la(o({__name:"index",props:{visible:{type:Boolean},data:{}},emits:["update:visible"],setup(e,{emit:t}){const a=e,l=t,o=_(),u=et(),{lang:v,loginState:h}=K(u),g=tt(),{userReferral:w}=K(g),{debouncePromiseGetUserReferralInfo:k}=g,x=i(null),S=i([]),M=i(!1);c((()=>{k()}));const P=i(!0),A={loop:!0,align:"center",containScroll:!1,duration:20},T=d((()=>+a.data.realizedPnl>=0)),N=d((()=>T.value?[bs,"/static/img/F6S2k3Pg.png","/static/img/DMVCMhH7.png"]:[_s,"/static/img/B5-5DiQQ.png","/static/img/jP51I2gS.png"])),L=d((()=>N.value.length<=1)),E=d((()=>{var e;const{symbol:t}=a.data,l={};h.value&&(null==(e=w.value)?void 0:e.referralCode)&&(l.refCode=String(w.value.referralCode));const i=o.resolve({name:se.ONE_CLICK_FUTURES,params:{lang:v.value,id:t},query:l}).href;return`${window.location.origin}${i}`}));async function I(e){var t,a,l;const i=null==(a=null==(t=x.value)?void 0:t.emblaApi)?void 0:a.selectedScrollSnap();if(void 0!==i){M.value=!0;try{await(null==(l=S.value[i])?void 0:l.handleShare(e))}finally{M.value=!1}}}function F(){}return(e,t)=>(n(),p(ue,{class:"ocf-share-dialog",width:e.isMobile?"100%":"760px",visible:e.visible,isBottomUp:e.isMobile,center:!e.isMobile,isBrandNewStyle:"",showClose:!1,onClosed:t[2]||(t[2]=e=>l("update:visible",!1))},{body:y((()=>[m("div",hd,[m("span",gd,s(e.$t("trading.ocf.share.title")),1),m("button",{class:"ocf-share-dialog__close",onClick:t[0]||(t[0]=e=>l("update:visible",!1))},[b(be,{width:16,height:16})])]),m("div",yd,[m("div",bd,[m("div",_d,[b(_a,{ref_key:"sliderRef",ref:x,isShowCustomPagingArrow:!1,options:A,autoWidth:"",class:"ocf-share-dialog__slider"},{prevArrow:y((({action:e})=>[L.value?f("",!0):(n(),r("div",{key:0,class:"ocf-share-dialog__arrow prev cursor-pointer",onClick:e},[b(le)],8,wd))])),nextArrow:y((({action:e})=>[L.value?f("",!0):(n(),r("div",{key:0,class:"ocf-share-dialog__arrow next cursor-pointer",onClick:e},[b(le)],8,kd))])),default:y((()=>[(n(!0),r(C,null,$(N.value,((t,a)=>(n(),p(ed,{ref_for:!0,ref_key:"shareCardRefs",ref:S,key:a,index:a,bgUrl:t,data:e.data,referralLink:E.value,showPnl:P.value},null,8,["index","bgUrl","data","referralLink","showPnl"])))),128))])),_:1},512)])]),m("div",xd,[b(vd,{showPnl:P.value,"onUpdate:showPnl":t[1]||(t[1]=e=>P.value=e),referralLink:E.value,handleShare:I,loading:M.value,onClickShare:F},null,8,["showPnl","referralLink","loading"])])])])),_:1},8,["width","visible","isBottomUp","center"]))}}),[["__scopeId","data-v-878e26df"]]),Cd={class:"stop-trades-dialog__container"},$d={key:1,class:"stop-trades-dialog__wrapper"},Md={class:"stop-trades-dialog__header"},Pd={class:"stop-trades-dialog__title"},Ad={class:"stop-trades-dialog__desc"},Td={class:"stop-trades-dialog__data"},Nd={class:"stop-trades-dialog__row"},Ld={class:"stop-trades-dialog__row-label"},Ed={class:"stop-trades-dialog__label"},Id={class:"stop-trades-dialog__unit"},Fd={class:"stop-trades-dialog__row"},Rd={class:"stop-trades-dialog__row-label"},Dd={class:"stop-trades-dialog__label"},Od={class:"stop-trades-dialog__row"},Ud={class:"stop-trades-dialog__row-label"},zd={class:"stop-trades-dialog__label"},qd={class:"stop-trades-dialog__unit"},Bd={class:"stop-trades-dialog__row-value"},Wd={class:"stop-trades-dialog__notes"},Hd={class:"stop-trades-dialog__notes-highlight"},Vd={class:"stop-trades-dialog__actions"},jd={key:2,class:"stop-trades-dialog__wrapper stopping"},Kd={class:"stop-trades-dialog__header"},Yd={class:"stop-trades-dialog__loading-content"},Gd={class:"stop-trades-dialog__loading-title"},Zd={class:"stop-trades-dialog__loading-desc"},Xd={class:"stop-trades-dialog__actions"},Qd=["src"],Jd={class:"stop-trades-dialog__header"},ep={class:"stop-trades-dialog__success-content"},tp={class:"stop-trades-dialog__success-title"},ap={class:"stop-trades-dialog__profit-value"},lp={class:"stop-trades-dialog__profit-return"},ip={class:"stop-trades-dialog__actions"},rp={class:"stop-trades-dialog__share-wrapper"},np={class:"stop-trades-dialog__share-preview"},sp=la(o({__name:"StopTradesDialog",props:{visible:{type:Boolean},data:{}},emits:["update:visible","stopped","goMyTrades","goHistory"],setup(e,{emit:l}){const{t:o}=E(),c=e,u=l,g=t(),_=te(),w=d((()=>_.isMobile)),k=X(),S=ee(),$=Ra(),A=i("confirm"),T=i(null),N=i(!1);a((()=>c.visible),(e=>{e?(A.value="confirm",T.value=null):st()}));const L=d((()=>c.data.symbol)),I=d((()=>(g.state.futures.marketMap[L.value]||{}).priceFilter??2)),{estStopPrice:F,estProfitLoss:R,estReturn:D}=function(e){const{proxy:t}=q(),l=Te(),r=Ne(),n=d((()=>{var t;return(null==(t=e.value)?void 0:t.symbol)??""})),s=i(Et()),o=d((()=>n.value?`snapshot${Tt}:${n.value}_0`:"")),{updateSubscriptions:c}=Nt(It,{onMessage({topic:e,data:t}){if(e===o.value){const e={...t},a=Et();e.asks=Lt(a.asks,e.asks,!0),e.bids=Lt(a.bids,e.bids,!1),s.value=e}}});a(o,(e=>{const t=new Set;e&&t.add(e),c(t)}),{immediate:!0});const u=d((()=>{var t;return(null==(t=e.value)?void 0:t.orderSide)===he.BUY})),p=d((()=>s.value.bids.map((({price:e,size:t})=>[`${e}`,`${t}`])))),f=d((()=>{const e=s.value.asks,t=e.length,a=new Array(t);for(let l=t-1;l>=0;l--){const{price:i,size:r}=e[l];a[t-1-l]=[`${i}`,`${r}`]}return a})),m=d((()=>e.value?new U(e.value.initialInvestment).plus(e.value.investmentUserAdded).toNumber():0)),v=d((()=>e.value&&r.getWallet(e.value.walletName)||{})),h=d((()=>{var t,a;return(null==(a=null==(t=e.value)?void 0:t.walletName)?void 0:a.startsWith("demo-"))??!1})),g=d((()=>
2{if(!e.value||!e.value.positionSize)return null;const a=u.value?p.value:f.value;if(!a.length)return null;const l={contractSize:Number(e.value.contractSize),size:e.value.positionSize,curState:{unitType:"CONTRACT",orderbook:a}},i=xa({shareLib:t.$shareLib,wasmFunction:Jt,params:l});return Number(i)?i:null})),y=d((()=>e.value&&e.value.positionSize&&g.value?new U(e.value.positionSize).times(e.value.contractSize).times(g.value).times(l.takerFee).toNumber():null)),b=d((()=>{if(!e.value)return null;const t=v.value.walletTotalValue,a=e.value.entryPrice,l=e.value.positionSize;if(!l||!a||!g.value||null==y.value)return null;if(!h.value&&!t)return null;const i=new U(l).times(e.value.contractSize),r=u.value?new U(g.value).minus(a).times(i).minus(y.value):new U(a).minus(g.value).times(i).minus(y.value),n=h.value?r.toNumber():new U(t).plus(r).minus(m.value).toNumber();return new U(n).dp(2,We(n)).toNumber()})),_=d((()=>null!=b.value&&m.value?new U(b.value).div(m.value).toNumber():null));return{estStopPrice:g,estProfitLoss:b,estReturn:_,investment:m}}(d((()=>c.data))),O=d((()=>null==V.value?"-":at(V.value))),B=d((()=>null==V.value?"":V.value>=0?"positive":"negative")),W=d((()=>null==j.value?"-":lt(j.value))),H=d((()=>null==F.value?"-":ne(F.value,I.value))),V=d((()=>"success"===A.value&&T.value?Number(T.value.realizedPnl):R.value)),j=d((()=>"success"===A.value&&T.value?Number(T.value.roi):D.value)),K=d((()=>(V.value??0)>=0)),Y=d((()=>Oe(c.data.orderSide))),G=d((()=>{const e=R.value;return null==e||0===e?it.breakeven:e>0?it.profit:it.loss})),Z=d((()=>Re(k.isDemoMode))),Q=()=>({trading_pair:L.value,direction:Y.value,close_type:rt.full,pnl_status:G.value,mode:Z.value}),J=d((()=>null==j.value?0:U(j.value).times(100).toNumber())),le=d((()=>{if(!K.value)return o("trading.ocf.stop.result.title.1");const e=J.value;return o(e<=5?"trading.ocf.stop.result.title.2":e<=20?"trading.ocf.stop.result.title.3":e<=40?"trading.ocf.stop.result.title.4":e<=80?"trading.ocf.stop.result.title.5":e<=120?"trading.ocf.stop.result.title.6":"trading.ocf.stop.result.title.7")}));async function ie(){k.isDemoMode&&null!=R.value&&null!=F.value&&nt({tradeNumber:c.data.tradeNumber,estProfitLoss:R.value,estStopPrice:F.value}),A.value="stopping";try{T.value=await ze.stopTrade(c.data.tradeNumber),A.value="success"}catch(e){T.value=null,A.value="confirm",st(),qe(Ue.OCF_CLOSE_POSITION_FAIL,e,{trading_pair:L.value,mode:Z.value})}}function re(){u("stopped"),u("goMyTrades"),u("update:visible",!1)}function se(){S.bumpActiveTrades(),$.fetchOneClickActiveTrades({symbol:L.value}),u("goHistory"),u("update:visible",!1)}function oe(){N.value=!0}function ce(){T.value&&(S.bumpActiveTrades(),$.fetchOneClickActiveTrades({symbol:L.value}),u("stopped")),u("update:visible",!1)}return(e,t)=>{const a=P("i18n-t"),l=z("track");return n(),r(C,null,[b(ue,{class:"stop-trades-dialog",visible:e.visible,width:"460px",showClose:!1,center:!w.value,isBottomUp:w.value,isBrandNewStyle:"",onClosed:ce},{body:y((()=>[m("div",Cd,[v(k).isDemoMode?(n(),p(Oa,{key:0,class:"stop-trades-dialog__demo-tag"})):f("",!0),"confirm"===A.value?(n(),r("div",$d,[m("div",Md,[m("h2",Pd,s(e.$t("trading.ocf.stopTrade.title")),1),m("button",{class:"stop-trades-dialog__close",onClick:t[0]||(t[0]=e=>u("update:visible",!1))},[b(be,{width:16,height:16})])]),m("p",Ad,s(e.$t("trading.ocf.stopTrade.description")),1),m("div",Td,[m("div",Nd,[m("div",Ld,[m("span",Ed,s(e.$t("trading.ocf.stopTrade.estimatedPnl")),1),m("span",Id," ("+s(v(ae))+") ",1)]),m("span",{class:h(["stop-trades-dialog__row-value",B.value])},s(O.value),3)]),m("div",Fd,[m("div",Rd,[m("span",Dd,s(e.$t("trading.ocf.stopTrade.estimatedReturn")),1)]),m("span",{class:h(["stop-trades-dialog__row-value",B.value])},s(W.value),3)]),m("div",Od,[m("div",Ud,[m("span",zd,s(e.$t("trading.ocf.stopTrade.estimatedStopPrice")),1),m("span",qd," ("+s(v(ae))+") ",1)]),m("span",Bd,s(H.value),1)])]),m("ul",Wd,[m("li",null,s(e.$t("trading.ocf.stopTrade.desc.1")),1),b(a,{keypath:"trading.ocf.stopTrade.desc.2",tag:"li"},{wallet:y((()=>[m("span",Hd,s(v(k).isDemoMode?`${e.$t("trading.ocf.demoFunds")}`:`${e.$t("t.spotWallet")}`),1)])),_:1})]),m("div",Vd,[m("button",{class:"stop-trades-dialog__btn stop-trades-dialog__btn--cancel",onClick:t[1]||(t[1]=e=>u("update:visible",!1))},s(e.$t("t.dontStop")),1),x((n(),r("button",{class:h(["stop-trades-dialog__btn stop-trades-dialog__btn--confirm",{"is-demo":v(k).isDemoMode}]),onClick:ie},[M(s(e.$t("t.stop")),1)],2)),[[l,{posthog:{name:v(Ue).OCF_CLOSE_POSITION_CLICKED,props:Q}}]])])])):"stopping"===A.value?(n(),r("div",jd,[m("div",Kd,[t[4]||(t[4]=m("div",{class:"stop-trades-dialog__title"},null,-1)),m("button",{class:"stop-trades-dialog__close",onClick:t[2]||(t[2]=e=>u("update:visible",!1))},[b(be,{width:16,height:16})])]),m("div",Yd,[b(As),m("h2",Gd,s(e.$t("trading.ocf.stopTrade.justAMoment"))+"... ",1),m("p",Zd,s(e.$t("trading.ocf.stopTrade.justAMoment.desc")),1
2)]),m("div",Xd,[m("button",{class:"stop-trades-dialog__btn stop-trades-dialog__btn--cancel",onClick:re},s(e.$t("copyTrading.myTrades")),1)])])):(n(),r("div",{key:3,class:h(["stop-trades-dialog__wrapper success",{profit:K.value}])},[K.value?(n(),r("img",{key:0,class:"stop-trades-dialog__coin-icon",src:v("/static/img/Cm_SiRch.png"),alt:"coin"},null,8,Qd)):f("",!0),m("div",Jd,[t[5]||(t[5]=m("div",{class:"stop-trades-dialog__title"},null,-1)),m("button",{class:"stop-trades-dialog__close",onClick:ce},[b(be,{width:16,height:16})])]),m("div",ep,[m("h2",tp,s(le.value),1),m("div",{class:h(["stop-trades-dialog__profit",B.value])},[m("span",ap,s(O.value),1),m("span",lp," ("+s(W.value)+") ",1)],2)]),m("div",ip,[v(k).isDemoMode?(n(),r("button",{key:0,class:"stop-trades-dialog__btn stop-trades-dialog__btn--cancel",onClick:ce},s(e.$t("t.close")),1)):(n(),r(C,{key:1},[m("button",{class:"stop-trades-dialog__btn stop-trades-dialog__btn--cancel",onClick:se},s(e.$t("t.details")),1),m("div",rp,[m("button",{class:"stop-trades-dialog__btn stop-trades-dialog__btn--confirm",onClick:oe},s(e.$t("t.share")),1),m("div",np,[b(Ms,{isProfit:K.value},null,8,["isProfit"])])])],64))])],2))])])),_:1},8,["visible","center","isBottomUp"]),T.value?(n(),p(Sd,{key:0,visible:N.value,"onUpdate:visible":t[3]||(t[3]=e=>N.value=e),data:T.value},null,8,["visible","data"])):f("",!0)],64)}}}),[["__scopeId","data-v-1a1a1b01"]]),op={class:"active-details-dialog__wrapper"},cp={class:"active-details-dialog__loading-header"},up={class:"active-details-dialog__content"},dp={class:"active-details-dialog__data"},pp={class:"active-details-dialog__settings"},fp={class:"active-details-dialog__tpsl-info"},mp={class:"active-details-dialog__tpsl-label"},vp={class:"active-details-dialog__tpsl-value"},hp={key:0,class:"active-details-dialog__tpsl-unit"},gp={class:"active-details-dialog__tpsl-info"},yp={class:"active-details-dialog__tpsl-label"},bp={class:"active-details-dialog__tpsl-value"}
2,_p={key:0,class:"active-details-dialog__tpsl-unit"},wp={class:"active-details-dialog__advanced-btn disabled",disabled:""},kp={key:0,class:"active-details-dialog__bottom"},xp=["disabled"],Sp=["disabled"],Cp=la(o({__name:"ActiveDetailsDialog",props:{tradeNumber:{},initialDetail:{}},emits:["dialog:closed"],setup(e,{emit:l}){const o=e,u=t(),g=Ra(),_=ee(),w=Se(),k=X(),x=te(),S=d((()=>x.isMobile)),$=i(!1),P=i(!1),A=l,T=i(!o.initialDetail),N=i(o.initialDetail??null),L=d((()=>!!N.value&&N.value.status===ke.INIT)),E=d((()=>!!N.value&&ge.includes(N.value.status))),I=d((()=>L.value||E.value)),F=d((()=>!!N.value&&0!==N.value.positionSize));async function R(){var e;const t=w.lastClosedNotification;if(t&&(null==(e=N.value)?void 0:e.positionId)===t.positionId)return;const a=!N.value;a&&(T.value=!0);try{N.value=await ze.getTradeDetail(o.tradeNumber)}catch{N.value=null,A("dialog:closed")}finally{a&&(T.value=!1)}}c((()=>{De(Ue.OCF_ORDER_DETAIL_VIEW,{mode:Re(k.isDemoMode)}),N.value||R()})),a((()=>_.activeTradesVersion),R),a((()=>w.lastClosedNotification),(e=>{var t;e&&(null==(t=N.value)?void 0:t.positionId)===e.positionId&&A("dialog:closed")}));const D=d((()=>{var e;return(null==(e=N.value)?void 0:e.symbol)||""})),O=d((()=>u.state.futures.marketMap[D.value]||{})),z=d((()=>{const e=g.oneClickMarkets,t=null==e?void 0:e.find((e=>e.symbol===D.value));return(null==t?void 0:t.marketName)||""})),q=d((()=>O.value.priceFilter??2)),B=d((()=>{var e,t;return(null==(t=null==(e=N.value)?void 0:e.takeProfitOrder)?void 0:t.triggerPrice)||""})),W=d((()=>{var e,t;return(null==(t=null==(e=N.value)?void 0:e.stopLossOrder)?void 0:t.triggerPrice)||""})),H=d((()=>!!B.value||!!W.value)),V=d((()=>B.value?ne(B.value,q.value):"-")),j=d((()=>W.value?ne(W.value,q.value):"-")),K=d((()=>u.state.futures.futuresLastPriceMap[D.value]||0)),Y=d((()=>{var e,t;if(!N.value)return null;const a=N.value;return{coinSymbol:a.symbol.split("-")[0],direction:a.orderSide===he.BUY?"Long":"Short",investment:U(a.initialInvestment).plus(a.investmentUserAdded).toNumber(),currentPrice:K.value,entryPrice:Number(a.entryPrice),positionSize:a.positionSize,contractSize:Number(a.contractSize),priceFilter:q.value,existingTpPrice:(null==(e=a.takeProfitOrder)?void 0:e.triggerPrice)||"",existingSlPrice:(null==(t=a.stopLossOrder)?void 0:t.triggerPrice)||""}})),G=i(!1),Z=i(!1);async function Q(e){if(Z.value)return;Z.value=!0;const t=e.tpEnabled&&e.tpPrice,a=e.slEnabled&&e.slPrice;try{t||a?await ze.bindTpSl(o.tradeNumber,{takeProfitTriggerPrice:t?Number(e.tpPrice):null,takeProfitTriggerType:ct.LAST_PRICE,stopLossTriggerPrice:a?Number(e.slPrice):null,stopLossTriggerType:ct.LAST_PRICE}):H.value&&await ze.removeTpSl(o.tradeNumber),$.value=!1,N.value&&(N.value.takeProfitOrder=t?{triggerPrice:e.tpPrice,triggerPriceType:ct.LAST_PRICE}:null,N.value.stopLossOrder=a?{triggerPrice:e.slPrice,triggerPriceType:ct.LAST_PRICE}:null)}catch{}finally{Z.value=!1}}function J(){G.value=!0}function le(){A("dialog:closed")}function ie(){G.value=!1,A("dialog:closed")}function re(){G.value=!1,A("dialog:closed","goHistory")}return(e,t)=>(n(),r(C,null,[b(ue,{class:"active-details-dialog tabular-nums",width:"760px",showClose:!1,center:!S.value,isBottomUp:S.value,isBrandNewStyle:"",onClosed:t[5]||(t[5]=e=>A("dialog:closed"))},{body:y((()=>[v(k).isDemoMode?(n(),p(Oa,{key:0,class:"active-details-dialog__demo-tag"})):f("",!0),m("div",op,[T.value?(n(),r(C,{key:0},[m("div",cp,[m("button",{class:"active-details-dialog__close-btn",onClick:t[0]||(t[0]=e=>A("dialog:closed"))},[b(be,{width:16,height:16})])]),b(As,{class:"active-details-dialog__spinner"})],64)):N.value?(n(),r(C,{key:1},[b(Ri,{data:N.value,isInitializing:L.value,onClose:t[1]||(t[1]=e=>A("dialog:closed")),onStop:J},null,8,["data","isInitializing"]),m("div",up,[b(Oi,{symbol:z.value},null,8,["symbol"]),m("div",dp,[b(Br,{data:N.value,isInitializing:L.value},null,8,["data","isInitializing"]),m("div",{class:h(["active-details-dialog__right",{"is-initializing":I.value}])},[S.value?f("",!0):(n(),p(kn,{key:0,data:N.value},null,8,["data"])),m("div",pp,[H.value?(n(),r(C,{key:0},[m("div",fp,[m("span",mp,s(e.$t("trading.ocf.tpPrice")),1),m("span",vp,s(V.value),1),B.value?(n(),r("span",hp," ("+s(v(ae))+") ",1)):f("",!0)]),m("div",gp,[m("span",yp,s(e.$t("trading.ocf.slPrice")),1),m("span",bp,s(j.value),1),W.value?(n(),r("span",_p," ("+s(v(ae))+") ",1)):f("",!0)])],64)):f("",!0),F.value?(n(),r("button",{key:2,class:"active-details-dialog__advanced-btn",onClick:t[2]||(t[2]=e=>$.value=!0)},[b($a,{width:13,height:13,class:"active-details-dialog__advanced-icon"}),H.value?f("",!0):(n(),r(C,{key:0}
2,[M(s(e.$t("t.advanced")),1)],64))])):(n(),p(ot,{key:1,placement:"top"},{content:y((()=>[m("button",wp,[b($a,{width:13,height:13,class:"active-details-dialog__advanced-icon"}),H.value?f("",!0):(n(),r(C,{key:0},[M(s(e.$t("t.advanced")),1)],64))])])),tooltip:y((()=>[M(s(e.$t("trading.ocf.tpsl.disabled.hint")),1)])),_:1})),$.value&&Y.value?(n(),p(ys,{key:3,visible:$.value,"onUpdate:visible":t[3]||(t[3]=e=>$.value=e),data:Y.value,submitting:Z.value,onConfirm:Q},null,8,["visible","data","submitting"])):f("",!0)])],2)]),S.value?(n(),r("div",kp,[m("button",{class:"active-details-dialog__bottom-btn",disabled:I.value,onClick:t[4]||(t[4]=e=>P.value=!0)},s(e.$t("trading.ocf.avoidLiquidation")),9,xp),m("button",{class:"active-details-dialog__bottom-btn stop",disabled:I.value,onClick:J},[I.value?f("",!0):(n(),p(Sa,{key:0,width:16,height:16})),L.value?(n(),r(C,{key:1},[M(s(e.$t("t.initializing"))+" ... ",1)],64)):E.value?(n(),r(C,{key:2},[M(s(e.$t("t.stopping"))+" ... ",1)],64)):(n(),r(C,{key:3},[M(s(e.$t("t.stop")),1)],64))],8,Sp)])):f("",!0)])],64)):f("",!0)])])),_:1},8,["center","isBottomUp"]),N.value&&G.value?(n(),p(sp,{key:0,visible:G.value,"onUpdate:visible":t[6]||(t[6]=e=>G.value=e),data:N.value,onStopped:le,onGoMyTrades:ie,onGoHistory:re},null,8,["visible","data"])):f("",!0),N.value?(n(),p(On,{key:1,visible:P.value,"onUpdate:visible":t[7]||(t[7]=e=>P.value=e),data:N.value},null,8,["visible","data"])):f("",!0)],64))}}),[["__scopeId","data-v-62c7bc58"]]),$p=Object.freeze(Object.defineProperty({__proto__:null,default:Cp},Symbol.toStringTag,{value:"Module"})),Mp=la(o({__name:"RoiChart",props:{points:{}},setup(e,{expose:t}){oa([ca,ha,ua,ga,pa,ya]);const l=e,s=i(),o=Y();let p=null,f=!1;const m=d((()=>{let e=-1/0,t=1/0;for(const[,a]of l.points)a>e&&(e=a),a<t&&(t=a);return{min:t,max:e}}));function v(){const{min:e,max:t}=m.value,a=t<0?0:e<0?Number((t/(t-e)).toFixed(2)):1,l=[{offset:0,color:"rgba(31, 193, 144, 0.3)"},{offset:a,color:"rgba(31, 193, 144, 0)"}];return 1!==a&&l.push({offset:a,color:"rgba(255, 93, 85, 0)"},{offset:1,color:"rgba(255, 93, 85, 0.25)"}),l}const h=d((()=>{const{min:e,max:t}=m.value;return e===t?{min:e-1,max:t+1}:{}}));function g(){var e;o.value&&o.value.setOption({animation:!1,xAxis:{type:"category",show:!1,axisLine:{show:!1},axisTick:{show:!1},boundaryGap:!1},yAxis:{type:"value",show:!1,...h.value},grid:[{left:"6%",right:"6%",bottom:0,top:0}],series:[{data:l.points,type:"line",smooth:!0,showSymbol:!1,emphasis:{disabled:!0},lineStyle:{width:2},areaStyle:{color:new va(0,0,0,1,v())},markPoint:{data:[],symbol:"none",symbolSize:[50,22],label:{fontWeight:"bold",formatter:e=>lt(e.data.value)},itemStyle:{color:"rgba(51, 69, 115, 0.9)"},animation:!1}},{type:"effectScatter",symbolSize:8,rippleEffect:{number:1,scale:3,period:1.2},data:[l.points[l.points.length-1]],itemStyle:{color:((null==(e=l.points[l.points.length-1])?void 0:e[1])??0)>=0?"#1FC190":"#FF5D55"},emphasis:{disabled:!0},zlevel:1}],visualMap:{show:!1,seriesIndex:0,pieces:[{gte:0,lte:9999999,color:"#1FC190"},{lt:0,color:"#FF5D55"}]}})}function y(e,t){const a=e/(t-1||1);return a<(t>5?.15:t>3?.35:.5)?30:a>(t>5?.85:t>3?.65:0)?-30:0}function b(){if(!o.value)return;const e=l.points.length;let t=0,a=0,i=1/0,r=-1/0;l.points.forEach((([,e],l)=>{e>r&&(r=e,a=l),e<i&&(i=e,t=l)}));const n="#1FC190",s="#FF5D55",c=[{type:"max",name:"Max",label:{color:r>=0?n:s},symbolOffset:[y(a,e),11]}];a!==t&&c.push({type:"min",name:"Min",label:{color:i>=0?n:s},symbolOffset:[y(t,e),-11]}),o.value.setOption({series:{markPoint:{symbol:"roundRect",data:c,zlevel:2}}})}t({showMarkPoints:function(){f=!0,b()},hideMarkPoints:function(){f=!1,o.value&&o.value.setOption({series:{markPoint:{symbol:"none"}}})}});const _=Ee((()=>{var e;null==(e=o.value)||e.resize()}),50);let w,x=0;function S(){if(s.value&&!o.value){if(!s.value.clientWidth||!s.value.clientHeight){if(x>=10)return;return x++,void(w=setTimeout(S,50))}x=0,o.value=ma(s.value,null,{renderer:"svg"}),g(),window.addEventListener("resize",_)}}function C(){s.value&&(p=new IntersectionObserver((([e])=>{e.isIntersecting&&(null==p||p.disconnect(),p=null,S())}),{rootMargin:"200px"}),p.observe(s.value))}return a((()=>l.points),(()=>{g(),f&&b()})),c((()=>{k(C)})),u((()=>{var e;null==p||p.disconnect(),clearTimeout(w),window.removeEventListener("resize",_),null==(e=o.value)||e.dispose(),o.value=void 0})),(e,t)=>(n(),r("div",{ref_key:"chartEl",ref:s,class:"roi-chart"},null,512))}}),[["__scopeId","data-v-64550f2f"]]),Pp={class:"active-card"},Ap={class:"active-card__top"},Tp={class:"active-card__crypto-id"},Np={class:"active-card__coin-info"},Lp={class:"active-card__coin-name"},Ep={class:"active-card__symbol"},Ip={class:"active-card__full-name"},Fp={class:"active-card__tags"},Rp={class:"active-card__tag tag--leverage"},Dp={class:"active-card__chart"},Op={class:"active-card__data"},Up={class:"active-card__row"},zp={class:"active-card__row-label"},qp={class:"active-card__row-unit"},Bp={class:"active-card__row"},Wp={class:"active-card__row-label"},Hp={class:"active-card__row-unit"},Vp={class:"active-card__row"},jp={class:"active-card__row-label"},Kp={class:"active-card__row-unit"},Yp={class:"active-card__row-value"},Gp={class:"active-card__actions"},Zp={key:0,class:"active-card__btn active-card__btn--status",disabled:""},Xp={key:1,class:"active-card__btn active-card__btn--status",disabled:""},Qp=la(o({__name:"MyTradeActiveCard",props:{data:{}},emits:["goHistory"],setup(e,{emit:a}){const l=e,o=a,c=t(),{$openDialog:u}=J();function g(){A.value||_()}async function _(){"goHistory"===await u(Cp,{tradeNumber:String(l.data.tradeNumber)})&&o("goHistory")}const w=d((()=>c.state.futures.marketMap)),k=d((()=>w.value[l.data.symbol])),x=d((()=>c.state.futures.futuresMarkPriceMap[l.data.symbol])),S=i(),$=i(!1),P=d((()=>l.data.status===ke.INIT)),A=d((()=>ge.includes(l.data.status))),T=i(null);async function N(){try{T.value=await Q.ocfGetTradeDetail(l.data.tradeNumber),$.value=!0}catch{}}const E=d((()=>{const e=l.data.roiPoint.map((([e,t])=>[e,Number(t)]));if(0===e.length)return[[0,0],[1,0]];if(null!=R.value&&isFinite(R.value)){const t=e.length-1;e[t]=[e[t][0],R.value/100]}if(1===e.length){const[t,a]=e[0];e.push([t+1,a])}return e})),I=d((()=>l.data.orderSide===he.BUY)),F=d((()=>Ce({markPrice:x.value,entryPrice:l.data.entryPrice,positionSize:l.data.positionSize,contractSize:l.data.contractSize,isLong:
2I.value}))),R=d((()=>{if(!l.data.totalInvestment)return 0;const e=U(F.value).div(l.data.totalInvestment).times(100);return e.dp(2,e.gt(0)?U.ROUND_DOWN:U.ROUND_UP).toNumber()})),D=d((()=>{const e=(t=l.data.createdAt)?t<1e12?1e3*t:t:0;var t;if(!e)return"-";const a=Date.now();if(a<e)return"-";const i=$e.minutes(a,e),r=Math.floor(i/1440),n=i%1440,s=Math.floor(n/60);return r>0?`${r}d-${s}h`:`${s}h-${n%60}m`}));return(e,t)=>{var a,l,i;return n(),r("div",Pp,[m("div",{class:h(["active-card__inner",{"is-clickable":!A.value}]),onClick:g,onMouseenter:t[0]||(t[0]=e=>{var t;return null==(t=S.value)?void 0:t.showMarkPoints()}),onMouseleave:t[1]||(t[1]=e=>{var t;return null==(t=S.value)?void 0:t.hideMarkPoints()})},[m("div",Ap,[m("div",Tp,[m("div",Np,[b(re,{name:null==(a=k.value)?void 0:a.baseCurrency,showName:!1,size:"24"},null,8,["name"]),m("div",Lp,[m("span",Ep,s((null==(l=k.value)?void 0:l.baseCurrency)||""),1),m("span",Ip,s((null==(i=k.value)?void 0:i.displayName)||""),1)])])]),m("div",Fp,[b(Xt,{classification:I.value?v(_e).LONG:v(_e).SHORT},null,8,["classification"]),m("span",Rp,s(+e.data.leverage)+"x ",1)])]),m("div",Dp,[b(Mp,{ref_key:"roiChart",ref:S,points:E.value},null,8,["points"])]),m("div",Op,[m("div",Up,[m("span",zp,[M(s(e.$t("trading.profitLoss"))+" ",1),m("span",qp,"("+s(e.data.currency)+")",1)]),b(ea,{fontSize:20,class:h(["active-card__row-value active-card__row-value--pnl",+F.value>=0?"positive":"negative"])},{default:y((()=>[M(s(v(ne)(F.value,{formatKey:2,signed:!0})),1)])),_:1},8,["class"])]),m("div",Bp,[m("span",Wp,[M(s(e.$t("trading.return"))+" ",1),m("span",Hp,"("+s(D.value)+")",1)]),m("span",{class:h(["active-card__row-value active-card__row-value--roi",+R.value>=0?"positive":"negative"])},s(v(ne)(R.value,{formatKey:2,signed:!0}))+"% ",3)]),m("div",Vp,[m("span",jp,[M(s(e.$t("t.investment"))+" ",1),m("span",Kp,"("+s(e.data.currency)+")",1)]),m("span",Yp,s(v(ne)(e.data.totalInvestment,{formatKey:2})),1)])]),m("div",Gp,[P.value?(n(),r("button",Zp,s(e.$t("t.initializing"))+" ... ",1)):A.value?(n(),r("button",Xp,s(e.$t("t.stopping"))+" ... ",1)):(n(),r(C,{key:2},[m("button",{class:"active-card__btn active-card__btn--detail",onClick:L(_,["stop"])},s(e.$t("t.detail")),1),m("button",{class:"active-card__btn active-card__btn--stop",onClick:L(N,["stop"])},[b(Sa,{width:16,height:16}),M(" "+s(e.$t("t.stop")),1)])],64))])],34),T.value&&$.value?(n(),p(sp,{key:0,visible:$.value,"onUpdate:visible":t[2]||(t[2]=e=>$.value=e),data:T.value,onGoHistory:t[3]||(t[3]=e=>o("goHistory"))},null,8,["visible","data"])):f("",!0)])}}}),[["__scopeId","data-v-1d7ba8fa"]]);const Jp=la({name:"IconNoDataSearch",components:{Icon:ie}},[["render",function(e,t,a,l,i,r){const s=P("Icon");return n(),p(s,{"aria-label":"No Data Icon",width:"100",height:"100",viewBox:"0 0 100 100",fill:"none"},{default:y((()=>t[0]||(t[0]=[m("path",{d:"M66.7169 87.6934H33.2803C32.9342 87.6934 32.7992 87.2174 33.0879 87.018L35.8903 85.0506C38.9115 82.9287 40.3392 79.0372 39.4592 75.3296H60.5424V75.3327C59.6611 79.0402 61.0902 82.9317 64.1129 85.0537L66.9122 87.018C67.201 87.2206 67.0644 87.6934 66.7169 87.6934Z",fill:"#222424"},null,-1),m("path",{d:"M95 62.9644H5V12.7357C5 9.74831 7.43 7.32812 10.4279 7.32812H89.5721C92.57 7.32812 95 9.74831 95 12.7357V62.9644Z",fill:"#222424"},null,-1),m("path",{d:"M67.8452 92.3306H32.1556C30.8754 92.3306 29.8281 91.2873 29.8281 90.0124C29.8281 88.7376 30.8756 87.6943 32.1556 87.6943H67.8452C69.1254 87.6943 70.1727 88.7376 70.1727 90.0124C70.1727 91.2873 69.1254 92.3306 67.8452 92.3306Z",fill:"#404646"},null,-1),m("path",{d:"M5 69.9226C5 72.9085 7.43 75.3302 10.4279 75.3302H89.5721C92.57 75.3302 95 72.9085 95 69.9226V62.9666H5V69.9226Z",fill:"#404646"},null,-1),m("g",{"clip-path":"url(#clip0_icon_no_data_search)"},[m("path",{d:"M48.9392 54.6061C58.1439 54.6061 65.6059 47.1442 65.6059 37.9394C65.6059 28.7346 58.1439 21.2727 48.9392 21.2727C39.7344 21.2727 32.2725 28.7346 32.2725 37.9394C32.2725 47.1442 39.7344 54.6061 48.9392 54.6061Z",fill:"#404646","fill-opacity":"0.4"}),m("path",{d:"M57.2734 40.2128H57.2732C56.0181 40.2128 55.0005 39.1951 55.0007 37.94C55.0009 36.3212 54.3704 34.7993 53.2255 33.6543C52.0807 32.5095 50.5588 31.8791 48.9398 31.8792C47.6847 31.8793 46.667 30.8618 46.667 29.6066C46.667 28.3513 47.6844 27.3338 48.9396 27.3337C51.7728 27.3335 54.4362 28.4368 56.4397 30.4403C58.4431 32.4438 59.5463 35.1073 59.5461 37.9405C59.546 39.1955 58.5284 40.2128 57.2734 40.2128Z",fill:"#404646"}),m("path",{d:"M79.3343 65.1205L63.8376 49.6235C66.3689 46.4032 67.8804 42.3449 67.8804 37.9402C67.8803 27.4966 59.3838 19 48.94 19H48.9397C43.881 19 39.1245 20.9703 35.5473 24.5473C31.9701 28.1249 30 32.8811 30 37.9401C30 48.3839 38.4964 56.8803 48.94 56.8803C53.3446 56.8803 57.4027 55.3689 60.6235 52.8379L76.1201 68.3344C76.5639 68.7781 77.1456 69 77.7272 69C78.3089 69 78.8906 68.7782 79.3342 68.3344C80.222
267.447 80.222 66.0079 79.3343 65.1205ZM34.5454 37.9401C34.5454 34.0951 36.0427 30.4803 38.7614 27.7615C41.4802 25.0428 45.0949 23.5455 48.9399 23.5455C56.8773 23.5455 63.3348 30.0029 63.3348 37.9402C63.3348 45.8776 56.8773 52.335 48.9399 52.335C41.0027 52.3349 34.5454 45.8776 34.5454 37.9401Z",fill:"#596262"})],-1),m("defs",null,[m("clipPath",{id:"clip0_icon_no_data_search"},[m("rect",{width:"50",height:"50",fill:"white",transform:"translate(30 19)"})])],-1)]))),_:1,__:[0]})}]]),ef={class:"active-tab"},tf={class:"active-tab__grid"},af={key:0,class:"active-tab__pagination"},lf={key:0,class:"active-tab__pagination"},rf=o({__name:"MyTradeActiveTab",props:{filter:{}},emits:["goHistory"],setup(e,{emit:t}){const l=e,s=t,o=ee(),u=te(),v=d((()=>u.isMobile)),h=i({totalRows:0,totalPages:0,pageSize:10,page:1}),g=i(!0),_=i([]);async function w(){const e={page:h.value.page,pageSize:h.value.pageSize,sorting:l.filter};g.value=!0;try{const t=await Q.ocfGetActiveTrades(e);_.value=t.pageItems,h.value.totalRows=t.total,h.value.totalPages=t.pagesAvailable,o.getMyTradeInfo()}catch{_.value=[],h.value.totalRows=0,h.value.totalPages=1}finally{g.value=!1}}function k(e){h.value.page=e,w()}return c((()=>{w()})),a((()=>l.filter),(()=>{h.value.page=1,w()})),a((()=>o.activeTradesVersion),w),(e,t)=>(n(),r("div",ef,[g.value?(n(),p(As,{key:0,class:"active-tab__spinner"})):_.value.length?(n(),r(C,{key:1},[m("div",tf,[(n(!0),r(C,null,$(_.value,(e=>(n(),p(Qp,{key:e.tradeNumber,data:e,onGoHistory:t[0]||(t[0]=e=>s("goHistory"))},null,8,["data"])))),128)),v.value?(n(),r("div",af,[b(ut,{pagerCount:5,background:!1,total:h.value.totalRows,totalPages:h.value.totalPages,pageSize:h.value.pageSize,currentPage:h.value.page,onHandleCurrentChangeP:k},null,8,["total","totalPages","pageSize","currentPage"])])):f("",!0)]),v.value?f("",!0):(n(),r("div",lf,[b(ut,{pagerCount:5,background:!1,total:h.value.totalRows,totalPages:h.value.totalPages,pageSize:h.value.pageSize,currentPage:h.value.page,onHandleCurrentChangeP:k},null,8,["total","totalPages","pageSize","currentPage"])]))],64)):(n(),p(dt,{key:2,class:"active-tab__empty",emptyText:e.$t("trading.ocf.active.emptyText")},{"no-data-icon":y((()=>[b(Jp)])),_:1},8,["emptyText"]))]))}}),nf=la(rf,[["__scopeId","data-v-9c56823f"]]),sf={class:"history-card"},of={class:"history-card__top"},cf={class:"history-card__crypto-id"},uf={class:"history-card__coin-info"},df={class:"history-card__coin-name"},pf={class:"history-card__symbol"},ff={class:"history-card__full-name"},mf={class:"history-card__tags"},vf={class:"history-card__tag tag--leverage"},hf={class:"history-card__list-wrap"},gf={class:"history-card__list-item"},yf={class:"history-card__list-item-label"},bf={class:"history-card__list-item-value"},_f={class:"history-card__list-item"},wf={class:"history-card__list-item-label"},kf={class:"history-card__list-item"},xf={class:"history-card__list-item-label"},Sf={class:"history-card__list-item-value"},Cf={class:"history-card__list-item"},$f={class:"history-card__list-item-label"},Mf={class:"history-card__list-item-value"},Pf={class:"history-card__list-item"},Af={class:"history-card__list-item-label"},Tf={class:"history-card__list-item-unit"},Nf={class:"history-card__list-item-value"},Lf={class:"history-card__list-item"},Ef={class:"history-card__list-item-label"},If={class:"history-card__list-item-unit"},Ff={class:"history-card__list-item"},Rf={class:"history-card__list-item-label"},Df={class:"history-card__list-item"},Of={class:"history-card__list-item-label"},Uf={class:"history-card__list-item-value"},zf={class:"history-card__actions-wrap"},qf=o({__name:"MyTradeHistoryCard",props:{data:{}},setup(e){const a=e,{t:l}=E(),o=t(),c=d((()=>o.state.futures.marketMap)),u=d((()=>c.value[a.data.symbol])),g=d((()=>{var e;return(null==(e=u.value)?void 0:e.baseCurrency)||""})),y=d((()=>{var e;return(null==(e=u.value)?void 0:e.displayName)||""})),_=d((()=>{const e=U(a.data.roi).times(100).toNumber();return ne(e,{formatKey:2,signed:!0})})),w=d((()=>Ve(a.data.createdAt,"yyyy-MM-dd HH:mm:ss"))),k=d((()=>ar(a.data.positionSize,a.data.orderSize))),x=d((()=>ir(a.data.stopReason,l))),S=i(!1),$=i(null);return(e,t)=>(n(),r(C,null,[m("div",sf,[m("div",of,[m("div",cf,[m("div",uf,[b(re,{name:g.value,showName:!1,size:"24"},null,8,["name"]),m("div",df,[m("span",pf,s(g.value),1),m("span",ff,s(y.value),1)])])]),m("div",mf,[b(Xt,{classification:e.data.orderSide===v(he).BUY?v(_e).LONG:v(_e).SHORT},null,8,["classification"]),m("span",vf,s(+e.data.leverage)+"x ",1)])]),m("div",hf,[m("div",gf,[m("span",yf,s(e.$t("t.date")),1),m("span",bf,s(w.value),1)]),m("div",_f,[m("span",wf,s(e.$t("trading.ocf.orderFill"))+" % ",1),b(tr,{progress:k.value},null,8,["progress"])]),m("div",kf,[m("span",xf,s(e.$t("futuresMain.openPosition.entryPrice")),1),m("span",Sf,s(v(ne)(e.data.entryPrice,{formatKey:2})),1)]),m("div",Cf,[m("span",$f,s(e.$t("t.exitPrice")),1),m("span",Mf,s(v(ne)(e.data.exitPrice,{formatKey:2})),1)]),m("div",Pf,[m("span",Af,[M(s(e.$t("t.investment"))+" ",1),m("span",Tf," ("+s(v(ae))+") ",1)]),m("span",Nf,s(v(ne)(e.data.totalInvestment,{formatKey:2})),1)]),m("div",Lf,[m("span",Ef,[M(s(e.$t("trading.profitLoss"))+" ",1),m("span",If," ("+s(v(ae))+") ",1)]),m("span",{class:h(["history-card__list-item-value",+e.data.realizedPnl>=0?"positive":"negative"])},s(v(ne)(e.data.realizedPnl,{formatKey:2,signed:!0})),3)]),m("div",Ff,[m("span",Rf,s(e.$t("trading.return")),1),m("span",{class:h(["history-card__list-item-value",+e.data.roi>=0?"positive":"negative"])},s(_.value)+"% ",3)]),m("div",Df,[m("span",Of,s(e.$t("trading.copywise.stopReason")),1),m("span",Uf,s(x.value),1)])]),m("div",zf,[m("div",{class:"history-card__actions-btn",onClick:t[0]||(t[0]=t=>{return a=e.data,$.value={...a},void(S.value=!0);var a})},s(e.$t("t.share")),1)])]),$.value?(n(),p(Sd,{key:0,visible:S.value,"onUpdate:visible":t[1]||(t[1]=e=>S.value=e),data:$.value},null,8,["visible","data"])):f("",!0)],64))}}),Bf=la(qf,[["__scopeId","data-v-b10112fa"]]),Wf={class:"history-tab"},Hf={key:0,class:"history-tab__table"},Vf={class:"th-exit-price"},jf={class:"th-investment"},Kf={class:"th-pnl"},Yf={class:"th-roi"},Gf={class:"th-actions"},Zf={class:"col-date"},Xf={class:"col-market"},Qf={class:"col-market__inner"},Jf={class:"col-type"},em={class:"col-type__inner"},tm={class:"history-tab__leverage"},am={class:"col-completion"},lm={class:"history-tab__progress-wrap"},im={class:"col-exit-price"},rm={class:"col-investment"},nm={class:"col-actions"},sm=["onClick"],om={key:1,class:"history-tab__mobile-list"},cm={class:"history-tab__pagination"},um={class:"history-tab__pagination-notice"}
2,dm={key:0,class:"history-tab__pagination"},pm={class:"history-tab__pagination-notice"},fm=la(o({__name:"MyTradeHistoryTab",props:{filter:{}},setup(e){const l=e,{t:o}=E(),g=t(),_=te(),w=d((()=>_.isMobile)),x=d((()=>g.state.futures.marketMap)),S=i(null),P=i(!1);function A(){const e=S.value;e&&(P.value=e.scrollWidth-e.clientWidth-e.scrollLeft>1)}const T=i(!0),N=i({totalRows:0,totalPages:0,pageSize:20,page:1}),I=i(!1),F=i(null);function R(e){N.value.page=e,B()}function D(e){var t;return(null==(t=x.value[e])?void 0:t.baseCurrency)||""}function O(e){var t;return(null==(t=x.value[e])?void 0:t.priceFilter)??""}function z(e){const t=U(e).times(100).toNumber();return ne(t,{signed:!0,formatKey:2})}c((()=>{B(),window.addEventListener("resize",A)})),u((()=>{window.removeEventListener("resize",A)})),a((()=>l.filter),(()=>{N.value.page=1,B()}));const q=i([]);async function B(){const e={page:N.value.page,pageSize:N.value.pageSize,sorting:l.filter};T.value=!0;try{const t=await Q.ocfGetHistoricalTrades(e);q.value=t.pageItems,N.value.totalRows=t.total,N.value.totalPages=t.pagesAvailable}catch{q.value=[],N.value.totalRows=0,N.value.totalPages=1}finally{T.value=!1,k(A)}}return(e,t)=>(n(),r("div",Wf,[T.value?(n(),p(As,{key:0,class:"history-tab__spinner"})):q.value.length?(n(),r(C,{key:1},[m("div",{ref_key:"scrollRef",ref:S,class:h(["history-tab__scroll",{"has-sticky-shadow":P.value}]),onScroll:A},[w.value?(n(),r("div",om,[(n(!0),r(C,null,$(q.value,(e=>(n(),p(Bf,{key:e.tradeNumber,data:e},null,8,["data"])))),128)),m("div",cm,[b(ut,{pagerCount:5,background:!1,total:N.value.totalRows,totalPages:N.value.totalPages,pageSize:N.value.pageSize,currentPage:N.value.page,onHandleCurrentChangeP:R},null,8,["total","totalPages","pageSize","currentPage"]),m("div",um,s(e.$t("trading.ocf.historyListHint")),1)])])):(n(),r("table",Hf,[m("thead",null,[m("tr",null,[m("th",null,s(e.$t("t.date")),1),m("th",null,s(e.$t("t.market")),1),m("th",null,s(e.$t("trading.ocf.tradingType")),1),m("th",null,[b(ot,{placement:"top"},{content:y((()=>[M(s(e.$t("trading.ocf.orderFill"))+" % ",1),b(Me,{class:"info-icon"})])),tooltip:y((()=>[M(s(e.$t("trading.ocf.orderFill.hint")),1)])),_:1})]),m("th",null,s(e.$t("futuresMain.openPosition.entryPrice")),1),m("th",Vf,s(e.$t("t.exitPrice")),1),m("th",jf,s(e.$t("t.investment"))+" ("+s(v(ae))+") ",1),m("th",Kf,s(e.$t("trading.profitLoss"))+" ("+s(v(ae))+") ",1),m("th",Yf,s(e.$t("trading.return")),1),m("th",null,s(e.$t("trading.copywise.stopReason")),1),m("th",Gf,s(e.$t("wallets.futuresList.actions")),1)])]),m("tbody",null,[(n(!0),r(C,null,$(q.value,(e=>{return n(),r("tr",{key:e.tradeNumber,class:"row"},[m("td",Zf,s((i=e.stoppedAt,Ve(i,"yyyy-MM-dd HH:mm:ss"))),1),m("td",Xf,[m("div",Qf,[b(re,{name:D(e.symbol),showName:!1,size:"20"},null,8,["name"]),M(" "+s(D(e.symbol)),1)])]),m("td",Jf,[m("div",em,[b(Xt,{classification:e.orderSide===v(he).BUY?v(_e).LONG:v(_e).SHORT},null,8,["classification"]),m("span",tm,s(+e.leverage)+"x ",1)])]),m("td",am,[m("div",lm,[b(tr,{progress:(a=e.orderSize,l=e.positionSize,ar(l,a))},null,8,["progress"])])]),m("td",null,s(v(ne)(e.entryPrice,O(e.symbol))),1),m("td",im,s(v(ne)(e.exitPrice,O(e.symbol))),1),m("td",rm,s(v(ne)(e.totalInvestment,2)),1),m("td",{class:h(["col-pnl",+e.realizedPnl>=0?"positive":"negative"])},s(v(ne)(e.realizedPnl,{signed:!0,formatKey:2})),3),m("td",{class:h(["col-roi",+e.roi>=0?"positive":"negative"])},s(z(e.roi))+"% ",3),m("td",null,s((t=e.stopReason,ir(t,o))),1),m("td",nm,[m("div",{class:"history-tab__share-btn cursor-pointer",onClick:L((t=>function(e){F.value={...e},I.value=!0}(e)),["stop"])},[b(qt,{height:14})],8,sm)])]);var t,a,l,i})),128))])]))],34),w.value?f("",!0):(n(),r("div",dm,[b(ut,{pagerCount:5,background:!1,total:N.value.totalRows,totalPages:N.value.totalPages,pageSize:N.value.pageSize,currentPage:N.value.page,onHandleCurrentChangeP:R},null,8,["total","totalPages","pageSize","currentPage"]),m("div",pm,s(e.$t("trading.ocf.historyListHint")),1)]))],64)):(n(),p(dt,{key:2,class:"history-tab__empty",emptyText:e.$t("trading.ocf.history.emptyText")},{"no-data-icon":y((()=>[b(Jp)])),_:1},8,["emptyText"])),F.value?(n(),p(Sd,{key:3,visible:I.value,"onUpdate:visible":t[0]||(t[0]=e=>I.value=e),data:F.value},null,8,["visible","data"])):f("",!0)]))}}),[["__scopeId","data-v-8e2e244c"]]),mm={class:"my-trade-filters"},vm=la(o({__name:"MyTradeFilters",props:T({isHistory:{type:Boolean}},{activeFilter:{required:!0},activeFilterModifiers:{},historyFilter:{required:!0},historyFilterModifiers:{}}),emits:["update:activeFilter","update:historyFilter"],setup(e){const t=e,{t:a}=E(),l=N(e,"activeFilter"),i=N(e,"historyFilter"),s=d({get:()=>t.isHistory?i.value:l.value,set:e=>{t.isHistory?i.value=e:l.value=e}}),o=d((()=>[t.isHistory?{key:pt.STOPPED_AT,text:a("trading.copywise.stopTime")}:{key:pt.CREATED_AT,text:a("t.duration")},{key:pt.ROI,text:a("trading.return")},{key:pt.PNL,text:a("trading.profitLoss")}]));return(e,t)=>(n(),r("div",mm,[b(Ma,{sortBy:s.value,"onUpdate:sortBy":t[0]||(t[0]=e=>s.value=e),sortByOptions:o.value},null,8,["sortBy","sortByOptions"])]))}}),[["__scopeId","data-v-e2f70e4f"]]),hm={class:"my-trade-dialog__wrapper"},gm={class:"my-trade-dialog__header"},ym={class:"my-trade-dialog__title"},bm={class:"my-trade-dialog__tab-row"},_m={class:"my-trade-dialog__tabs"},wm={class:"my-trade-dialog__tab-count"},km={class:"my-trade-dialog__content"},xm=la(o({__name:"MyTradeDialog",props:{defaultTab:{default:ft.CURRENT}},emits:["dialog:closed"],setup(e,{emit:t}){const a=e,l=t,r=ee(),o=i(a.defaultTab),c=i(`${pt.CREATED_AT}:${vt.DESC}`),u=i(`${pt.STOPPED_AT}:${vt.DESC}`),f=d((()=>o.value===ft.HISTORY)),g=d((()=>o.value===ft.CURRENT));return(e,t)=>(n(),p(ue,{class:"my-trade-dialog tabular-nums",width:"1440px",isBottomUp:!0,showClose:!1,isBrandNewStyle:"",onClosed:t[6]||(t[6]=e=>l("dialog:closed"))},{body:y((()=>[m("div",hm,[m("div",gm,[m("span",ym,s(e.$t("copyTrading.myTrades")),1),m("button",{class:"my-trade-dialog__close",onClick:t[0]||(t[0]=e=>l("dialog:closed"))}," â ")]),b(fi),m("div",bm,[m("div",_m,[m("div",{class:h(["my-trade-dialog__tab",{active:g.value}]),onClick:t[1]||(t[1]=e=>o.value=v(ft).CURRENT)},[b(Na,{class:"my-trade-dialog__tab-icon"}),M(" "+s(e.$t("t.current"))+" ",1),m("span",wm,s(v(r).displayTradeCount),1)],2),m("div",{class:h(["my-trade-dialog__tab",{active:f.value}]),onClick:t[2]||(t[2]=e=>o.value=v(ft).HISTORY)},[b(mt,{class:"my-trade-dialog__tab-icon"}),M(" "+s(e.$t("t.history")),1)],2)]),b(vm,{activeFilter:c.value,"onUpdate:activeFilter":t[3]||(t[3]=e=>c.value=e),historyFilter:u.value,"onUpdate:historyFilter":t[4]||(t[4]=e=>u.value=e),isHistory:f.value},null,8,["activeFilter","historyFilter","isHistory"])]),m("div",km,[g.value?(n(),p(nf,{key:0,filter:c.value,onGoHistory:t[5]||(t[5]=e=>o.value=v(ft).HISTORY)},null,8,["filter"])):(n(),p(fm,{key:1,filter:u.value},null,8,["filter"]))])])])),_:1}))}}),[["__scopeId","data-v-eb18583a"]]),Sm=Object.freeze(Object.defineProperty({__proto__:null,default:xm},Symbol.toStringTag,{value:"Module"})),Cm={class:"header"},$m={class:"title"},Mm={class:"table-wrapper"},Pm={key:0,class:"table"},Am={class:"col-trade"},Tm={class:"col-completion"},Nm={key:0,class:"col-price"},Lm={key:1,class:"col-investment"},Em={class:"col-pnl"},Im={class:"col-return"},Fm={key:2,class:"col-action"},Rm=["onClick"],Dm={class:"col-trade"},Om={class:"trade-info"},Um={class:"direction"},zm={class:"leverage"},qm={class:"col-completion"},Bm={class:"progress-wrapper"},Wm={class:"progress-bar"},Hm={class:"progress-label"},Vm={class:"col-price"},jm={class:"col-investment"},Km={key:1,class:"col-action"},Ym={key:1,class:"empty-state"},Gm={key:0,src:"/static/img/BEpMTDy2.png",width:"100",height:"100",alt:"empty icon"},Zm={class:"empty-title"},Xm={class:"desc"},Qm=la(o({__name:"ActiveTrades",props:{coin:{},trades:{}}
2,setup(e){const a=e,l=_(),i=w(),o=t(),{$openDialog:c}=J(),{checkAuthAndRedirect:u}=Ca(),p=d((()=>o.state.futures.futuresMarkPriceMap)),g=Se(),k=X(),x={BUY:"long",SELL:"short"},S=()=>{u()&&c(xm)},A=e=>e>=0?"positive":"negative",T=e=>ne(e,{formatKey:2,signed:!0}),N=d((()=>(a.trades||[]).map((e=>{var t;const a=g.getPositionById(e.positionId),l=x[e.orderSide]||"",i="long"===l,r=new U((null==a?void 0:a.entryPrice)??e.entryPrice),n=new U(p.value[e.symbol]||0),s=(null==a?void 0:a.totalContracts)??e.positionSize??0,c=ar(s,e.orderSize),u=Number(e.contractSize||1),d=(null==(t=o.state.futures.marketMap[e.symbol])?void 0:t.priceFilter)??2,f=r.isZero(),m=Ce({markPrice:n,entryPrice:r,positionSize:s,contractSize:u,isLong:i}),v=new U(e.totalInvestment||0),h=new U(m).div(v).times(100),y=v.isZero()?0:h.dp(2,h.gt(0)?U.ROUND_DOWN:U.ROUND_UP).toNumber();return{side:l,leverage:e.leverage,tradeNumber:e.tradeNumber,completion:c,price:f?"-":ne(r.toNumber(),{formatKey:d}),investment:ne(e.totalInvestment,{preserveDecimals:!0}),pnl:f?"-":T(m),pnlClass:f?"":A(m),returnRate:f?"-":`${T(y)}%`,returnRateClass:f?"":A(y)}}))));return(e,t)=>{const a=P("ToolTip");return!e.isMobile||N.value.length?(n(),r("div",{key:0,class:h(["active-trades",{"demo-mode":v(k).isDemoMode}])},[m("div",Cm,[m("h3",$m,s(e.$t("trading.ocf.yourActiveTrades",{coin:e.coin})),1),v(k).isDemoMode?f("",!0):(n(),r("button",{key:0,class:"view-all",onClick:S},[b(Na),M(" "+s(e.$t("trading.ocf.viewAllTrades")),1)]))]),m("div",Mm,[N.value.length?(n(),r("table",Pm,[m("thead",null,[m("tr",null,[m("th",Am,s(e.$t("t.trade")),1),m("th",Tm,[M(s(e.$t("t.orderFill"))+" % ",1),b(Xl,{title:`${e.$t("t.orderFill")} %`,tooltipStyle:{width:"210px","font-size":"14px"},tooltip:e.$t("trading.ocf.orderFillTip"),placement:"bottom-end"},{content:y((()=>[b(Me,{class:"info-icon"})])),_:1},8,["title","tooltip"])]),e.isMobile?f("",!0):(n(),r("th",Nm,[M(s(e.$t("t.price"))+" ",1),b(a,{tooltipStyle:{width:"210px","font-size":"14px"},tooltip:e.$t("trading.ocf.priceTip"),placement:"bottom-end"},{content:y((()=>[b(Me,{class:"info-icon"})])),_:1},8,["tooltip"])])),e.isMobile?f("",!0):(n(),r("th",Lm,[M(s(e.$t("t.investment"))+" ",1),t[0]||(t[0]=m("span",{class:"unit"},"(USDT)",-1))])),m("th",Em,[M(s(e.$t("t.profit"))+" / "+s(e.$t("t.loss"))+" ",1),t[1]||(t[1]=m("span",{class:"unit"},"(USDT)",-1))]),m("th",Im,s(e.$t("trading.return")),1),e.isMobile?f("",!0):(n(),r("th",Fm))])]),m("tbody",null,[(n(!0),r(C,null,$(N.value,((t,a)=>(n(),r("tr",{key:a,class:"row",onClick:e=>(async e=>{"goHistory"===await c(Cp,{tradeNumber:e})&&l.push({name:se.ONE_CLICK_FUTURES,params:i.params,query:{...i.query,info:ft.HISTORY}})})(t.tradeNumber)},[m("td",Dm,[m("div",Om,[m("div",Um,[b(Kl,{class:h(["direction-icon",t.side]),isShort:"short"===t.side},null,8,["class","isShort"]),m("span",{class:h(["side-label",t.side])},s("long"===t.side?e.$t("t.long"):e.$t("t.short")),3)]),m("span",zm,s(t.leverage)+"x",1)])]),m("td",qm,[m("div",Bm,[m("div",Wm,[m("span",Hm,s(t.completion)+"%",1),m("div",{class:"progress-fill",style:F({width:t.completion+"%"})},null,4)])])]),e.isMobile?f("",!0):(n(),r(C,{key:0},[m("td",Vm,s(t.price),1),m("td",jm,s(t.investment),1)],64)),m("td",{class:h(["col-pnl",t.pnlClass])},s(t.pnl),3),m("td",{class:h(["col-return",t.returnRateClass])},s(t.returnRate),3),e.isMobile?f("",!0):(n(),r("td",Km,[b(le,{class:"chevron"})]))],8,Rm)))),128))])])):(n(),r("div",Ym,[e.isMobile?f("",!0):(n(),r("img",Gm)),m("div",null,[m("p",Zm,s(e.$t("trading.ocf.noActiveTrades")),1),m("p",Xm,s(e.$t("trading.ocf.cta")),1)])]))])],2)):f("",!0)}}}),[["__scopeId","data-v-8329526c"]]),Jm={class:"input-wrapper"},ev={key:0,class:"prepend"},tv=["placeholder","value","readonly","size"],av={key:2,class:"append"},lv=la(o({__name:"TradingInput",props:{value:{},max:{default:1/0},min:{default:-1/0},step:{default:1},maxlength:{default:-1},maxDecimalPlaces:{default:-1},disableLimitDecimalPlaces:{type:Boolean,default:!1},placeholder:{default:""},readonly:{type:Boolean,default:!1},autoFit:{type:Boolean,default:!1}},emits:["update:value","input"],setup(e,{emit:t}){const a=e,l=t,i=d((()=>a.disableLimitDecimalPlaces?-1:a.maxDecimalPlaces>-1?a.maxDecimalPlaces:a.step?ht(a.step):ht(a.min)||-1)),s=d((()=>gt(a.value)?U(a.value).toString():Bt(a.value)));function o(){l("update:value",""),l("input","")}function c(e,t=!0){const r=e instanceof Event?e.target:null;let n=t&&r?r.value:e,s=0;if(r&&(s=r.value.length-(r.selectionStart??0)),"string"==typeof n&&(n=n.replace(/,/g,""),/^-?\d*\.?\d*$/.test(n)||(n=n.replace(/[^\d.-]/g,""))),""!==n){if("string"==typeof n&&n.length>1&&n.startsWith("0")&&!n.includes(".")&&(n=n.replace(/^0+/,""),""===n&&(n="0")),a.maxlength>0){const e=String(n);e.length>a.maxlength&&(n=e.substring(0,a.maxlength))}i.value>-1&&(ht(n)>=i.value&&a.min!==-1/0&&a.min>Number(n)&&(n=a.min),n=yt(n+"",i.value)),a.max!==1/0&&Number(n)>a.max&&(n=a.max),0!==Number(n)&&Number(n)<0&&a.min>Number(n)&&(n=a.min)}l("update:value",n),l("input",n),r&&k((()=>{r.value=Bt(n);const e=Math.max(0,r.value.length-s);r.setSelectionRange(e,e)}))}function u(e){"-"===e.key&&a.min>=0?e.preventDefault():Wt(e,{precision:i.value,max:a.max,value:a.value})}function p(e){Ht(e,{precision:i.value,updateValue:c})}return(e,t)=>(n(),r("div",Jm,[e.$slots.prepend?(n(),r("div",ev,[O(e.$slots,"prepend",{},void 0,!0)])):f("",!0),m("input",{class:"input",type:"text",placeholder:e.placeholder,value:s.value,readonly:e.readonly,size:e.autoFit?Math.max((s.value||e.placeholder).length,1):void 0,inputmode:"decimal",onInput:c,onKeydown:u,onPaste:p},null,40,tv),!e.readonly&&s.value?(n(),r("button",{key:1,class:"reset",onClick:o},[b(be,{class:"close-icon"})])):f("",!0),e.$slots.append?(n(),r("div",av,[O(e.$slots,"append",{},void 0,!0)])):f("",!0)]))}}),[["__scopeId","data-v-55a21502"]]),iv={class:"select-wrapper"},rv=["id","value"],nv=["for"],sv={key:1,class:"display-value"},ov={class:"dropdown"},cv=["onClick"],uv=la(o({__name:"NumberSelectInput",props:T({options:{},max:{default:100},enableInput:{type:Boolean,default:!1}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=N(e,"modelValue"),a=e,l=bt(),o=G("inputRef"),c=i(!1),u=i(!1);function d(e){return e<1?1:a.max!==1/0&&e>a.max?a.max:e}function p(e){const a=e.target.value,l=Number.parseInt(a,10);Number.isNaN(l)||(t.value=d(l))}function g(e){"."===e.key&&e.preventDefault()}function y(){u.value=!1,c.value=!1}function _(){u.value=!0,c.value=!0}function w(){var e;a.enableInput?null==(e=o.value)||e.focus():c.value=!c.value}return(e,a)=>(n(),r("div",iv,[c.value?(n(),r("div",{key:0,class:"overlay",onClick:a[0]||(a[0]=e=>c.value=!1)})):f("",!0),m("div",{class:"trigger",onClick:w},[e.enableInput?(n(),r("span",{key:0,class:"input-wrapper",onClick:a[1]||(a[1]=L((()=>{}),["stop"]))},[m("input",{id:v(l),ref_key:"inputRef",ref:o,class:"input",type:"number",value:t.value,style:F({width:`${String(t.value??"").length||1}ch`}),onBlur:y,onFocus:_,onInput:p,onKeydown:g},null,44,rv),u.value?f("",!0):(n(),r("label",{key:0,for:v(l),class:"display-value input-label"}," x ",8,nv))])):(n(),r("span",sv,s(t.value),1)),b(pe,{class:h(["arrowIcon",{rotated:c.value}]),width:"12",height:"12"}
2,null,8,["class"])]),x(m("ul",ov,[(n(!0),r(C,null,$(e.options,(e=>(n(),r("li",{key:e.value,class:h(["option",{selected:e.value===t.value}]),onMousedown:a[2]||(a[2]=L((()=>{}),["prevent"])),onClick:a=>{return l=Number(e.value),t.value=d(l),c.value=!1,void(null==(i=o.value)||i.blur());var l,i}},s(e.label),43,cv)))),128))],512),[[S,c.value]])]))}}),[["__scopeId","data-v-3c3c2836"]]),dv={class:"items"},pv={class:"item"},fv={class:"title-wrapper"},mv={class:"title"},vv={key:0,class:"warning"},hv={class:"item"},gv={class:"title-wrapper"},yv={class:"title"},bv={class:"trade-value-label"},_v={class:"leverage"},wv={key:0,class:"currency"},kv={key:0,class:"item"},xv={class:"title-wrapper"},Sv={class:"title"},Cv={key:0,class:"warning"},$v={key:1,class:"warning limit"},Mv={class:"button-section"},Pv={class:"button-wrapper"},Av=["disabled"],Tv={class:"liq-price"},Nv={class:"title"},Lv={class:"flex tooltip-dir"},Ev={class:"price"},Iv={class:"button-wrapper"},Fv=["disabled"],Rv={class:"liq-price"},Dv={class:"title"},Ov={class:"flex tooltip-dir"},Uv={class:"price"},zv=la(o({__name:"OrderFormItems",props:{market:{},symbol:{},activeTab:{},activeTrades:{}},setup(l){const{checkAuthAndRedirect:o}=Ca(),{$openDialog:c}=J(),{proxy:u}=q(),_=Vt(),w=Te(),k=g((()=>e((()=>import("./D7N4GSvD.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])))),S=g((()=>e((()=>import("./B2ojMlo3.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,18])))),C=g((()=>e((()=>import("./Bc3KupHC.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,14,15,16,17,19])))),$=l,A=t(),T=X(),N=d((()=>T.isDemoMode)),L=d((()=>"market"===$.activeTab)),E=d((()=>A.getters["futures/marketData"])),I=d((()=>{var e;return(null==(e=$.activeTrades)?void 0:e.length)>=5})),F=({side:e,amount:t})=>{const a="BUY"===e,l=ae.value;let i=Number(V.value);if(L.value)try{i=xa({shareLib:u.$shareLib,wasmFunction:ta,params:{newOrder:{orderType:"MARKET_ORDER",side:a?"LONG":"SHORT",contractSize:(null==l?void 0:l.contractSize)||1,size:t},price:{markPrice:G.value||0,lastPrice:re.value||0,limitPrice:0},priceParams:{effectivePrice:0},curState:{unitType:"USDT",orderbook:a?_.normalizedAsks:_.normalizedBids}}})}catch{i=G.value||re.value}return{price:i,qty:St(t,i)}},R=e=>{if(!H.value)return"-";const t=Number(j.value),a=new U(te.value).times(new U(1).minus(new U(3).times(w.takerFee).times(t))),l=ae.value,{price:i,qty:r}=F({side:e,amount:a.toNumber()}),n=kt({marketDetail:l,marketData:E.value||{},wallet:{originalAvailableBalance:H.value},order:{price:i,qty:r},isLong:"BUY"===e,position:[],isHedgeMode:!1,isClose:!1,isMarket:L.value,isMarketOrder:L.value,includeUnrealizedPnl:A.state.includeUnrealizedPnl,markPrice:G.value,maintenanceMarginPercentage:Le($.symbol)});return new U(n||0).dp(2,U.ROUND_DOWN).toNumber().toLocaleString()},D=d((()=>R("BUY"))),O=d((()=>R("SELL"))),B=d((()=>A.state.futures.marketMap)),W=d((()=>{var e,t;return(null==(t=null==(e=B.value)?void 0:e[$.symbol])?void 0:t.priceFilter)??2})),H=i(""),V=i(""),j=i(1),K=i(!1),Y=i(0),G=d((()=>A.state.futures.futuresMarkPriceMap[$.symbol]||0));a(G,(e=>{!Y.value&&e&&(Y.value=e)}),{immediate:!0}),a((()=>[$.activeTab,$.symbol]),(()=>{K.value=!1,H.value="",V.value="limit"===$.activeTab?re.value:"",Y.value=G.value})),a((()=>$.market),(e=>{(null==e?void 0:e.defaultLeverage)&&(j.value=Number(e.defaultLeverage))}),{immediate:!0});const Z=d((()=>{const e=Number(H.value);return(e<se.value.min||e>se.value.max)&&K.value})),Q=d((()=>{if("market"===$.activeTab)return!1;return 0===Number(V.value)&&K.value})),ee=d((()=>{const e=le.value.maxLeverage;return[{value:1,label:"1x"},{value:3,label:"3x"},{value:5,label:"5x"},{value:10,label:"10x"},{value:20,label:"20x"},{value:50,label:"50x"},{value:100,label:"100x"}].filter((t=>t.value<=e))})),te=d((()=>{const e=new U(H.value||0),t=new U(j.value||1);return e.isZero()||t.isZero()?"":e.times(t).toNumber()})),ae=d((()=>A.state.futures.marketDetailMap[$.symbol])),le=d((()=>{const e=(A.getters["futures/riskLimitSetting"]||[])[0]||{};return{riskLimitValue:e.riskLimitValue??0,maxLeverage:e.maxLeverage??100}})),ie=d((()=>A.state.futures.futuresLastPriceMap)),re=d((()=>U(ie.value[$.symbol]||0).dp(W.value,U.ROUND_DOWN).toNumber())),se=d((()=>{var e,t,a,l;const i=new U((null==(e=ae.value)?void 0:e.minOrderSize)||0).times((null==(t=ae.value)?void 0:t.contractSize)||1),r=new
2U((null==(a=ae.value)?void 0:a.maxOrderSize)||0).times((null==(l=ae.value)?void 0:l.contractSize)||1),n=new U(j.value||1),s=new U(Y.value);if(s.isZero()||n.isZero())return{min:0,max:0};const o=i.times(s).div(n).times(1.1).decimalPlaces(2,U.ROUND_CEIL).toNumber(),c=new U(le.value.riskLimitValue),u=r.times(s).div(n).times(.9),d=c.div(n),p=U.min(u,d).decimalPlaces(2,U.ROUND_FLOOR).toNumber();return{min:Math.max(1,o),max:p}})),oe=d((()=>`${ne(se.value.min,{preserveDecimals:!0})} ~ ${ne(se.value.max,{preserveDecimals:!0})}`)),ce=d((()=>{var e;return N.value?T.funds:(null==(e=A.state.currencyMap.USDT)?void 0:e.available)??0})),ue=d((()=>new U(H.value||0).gt(ce.value))),de=d((()=>ne(U(ce.value).dp(2,U.ROUND_DOWN).toNumber(),{formatKey:2}))),pe=d((()=>Re(N.value))),fe=e=>({direction:e,trading_pair:$.symbol,amount:String(H.value??""),leverage:String(j.value??""),order_type:"limit"===$.activeTab?_t.limit:_t.market,mode:pe.value}),me=e=>{De(Ue.OCF_INVEST_FAIL,{direction:e,trading_pair:$.symbol,leverage:String(j.value??""),mode:pe.value})},ve=async e=>{var t;K.value=!0;const a=Oe(e);if(Z.value||Q.value)return void me(a);if(!N.value&&!o())return;if(ue.value)return me(a),void c(N.value?S:k,{investAmount:Number(H.value)});const l=Number(j.value),i=new U(te.value).times(new U(1).minus(new U(3).times(w.takerFee).times(l))),{qty:r}=F({side:e,amount:i.toNumber()}),n={symbol:$.symbol,orderSize:r,...L.value?{}:{orderPrice:Number(V.value)},orderSide:e,orderType:L.value?xt.MARKET:xt.LIMIT,investment:Number(H.value),currency:"USDT",leverage:l};c(C,{params:n,displayName:null==(t=$.market)?void 0:t.displayName,liqPrice:R(e),priceFilter:W.value})},he=()=>{H.value=Math.min(se.value.max,new U(ce.value).dp(2,U.ROUND_DOWN).toNumber()),De(Ue.OCF_MAX_CLICKED,{trading_pair:$.symbol,mode:pe.value})};return(e,t)=>{const a=P("i18n-t"),l=z("track");return n(),r("div",dv,[m("div",pv,[m("div",fv,[m("h6",mv,[t[6]||(t[6]=m("span",{class:"icon"},"1",-1)),M(" "+s(e.$t("trading.ocf.amountToInvest")),1)]),e.isMobile?(n(),p(Hr,{key:0,balance:de.value,showIcon:!N.value,showLabel:N.value,demoColor:N.value},null,8,["balance","showIcon","showLabel","demoColor"])):f("",!0)]),b(lv,{value:H.value,"onUpdate:value":t[0]||(t[0]=e=>H.value=e),placeholder:oe.value,step:.01,min:0,maxDecimalPlaces:2},{prepend:y((()=>t[7]||(t[7]=[M("$")]))),append:y((()=>[m("button",{class:"max",onClick:he},s(e.$t("futuresMain.transfer.max")),1),t[8]||(t[8]=m("span",{class:"currency"},"USDT",-1))])),_:1},8,["value","placeholder"]),Z.value?(n(),r("p",vv,s(e.$t("trading.ocf.amountRangeWarning",{min:se.value.min,max:se.value.max}))+" USDT ",1)):f("",!0),e.isMobile||Z.value?f("",!0):(n(),p(Hr,{key:1,balance:de.value,demoColor:N.value},null,8,["balance","demoColor"]))]),m("div",hv,[m("div",gv,[m("h6",yv,[t[9]||(t[9]=m("span",{class:"icon"},"2",-1)),M(" "+s(e.$t("futuresMain.trade.leverage")),1)]),m("span",bv,[M(s(e.$t("trading.ocf.tradingWith"))+" ",1),b(Xl,{title:e.$t("trading.ocf.tradingWith"),tooltipStyle:{width:"200px","font-size":"14px"},placement:"bottom-end"},{tooltip:y((()=>[m("p",null,s(e.$t("trading.ocf.tradingWith.intro")),1),b(a,{keypath:"trading.ocf.tradingWith.example",tag:"p"},{amount:y((()=>t[10]||(t[10]=[M("$100")]))),leverage:y((()=>t[11]||(t[11]=[m("span",{class:"highlight"},"[20x]",-1)]))),result:y((()=>[m("strong",null,s(e.$t("trading.ocf.tradeWith"))+" $2,000",1)])),_:1}),m("p",null,s(e.$t("trading.ocf.tradingWith.profitHint")),1),m("p",null,s(e.$t("trading.ocf.tradingWith.warning")),1)])),content:y((()=>[b(Me,{class:"trade-value-icon"})])),_:1},8,["title"])])]),m("div",_v,[b(uv,{modelValue:j.value,"onUpdate:modelValue":t[1]||(t[1]=e=>j.value=e),class:"leverage-select",options:ee.value,max:le.value.maxLeverage,enableInput:""},null,8,["modelValue","options","max"]),b(ra,{class:"icon-trend-arrow"}),b(lv,{value:te.value,placeholder:"-",class:h(["trade-value",{"is-empty":!te.value}]),readonly:"",autoFit:""},{append:y((()=>[te.value?(n(),r("span",wv,"USDT")):f("",!0)])),_:1},8,["value","class"])])]),"limit"===e.activeTab?(n(),r("div",kv,[m("div",xv,[m("h6",Sv,[t[12]||(t[12]=m("span",{class:"icon"},"3",-1)),M(" "+s(e.$t("trading.ocf.desiredEntryPrice")),1)])]),b(lv,{value:V.value,"onUpdate:value":t[3]||(t[3]=e=>
2V.value=e),placeholder:e.$t("t.priceOfToken"),step:.01,min:0,maxDecimalPlaces:W.value},{append:y((()=>[m("button",{class:"max",onClick:t[2]||(t[2]=e=>V.value=re.value)},s(e.$t("trading.form.last")),1),t[13]||(t[13]=m("span",{class:"currency"},"USDT",-1))])),_:1},8,["value","placeholder","maxDecimalPlaces"]),Q.value?(n(),r("p",Cv,s(e.$t("trading.ocf.entryEmptyError")),1)):f("",!0)])):f("",!0),I.value?(n(),r("p",$v,s(e.$t("trading.ocf.tradesReachLimitError")),1)):f("",!0),m("div",Mv,[m("div",Pv,[x((n(),r("button",{class:"button button-long",disabled:I.value,onClick:t[4]||(t[4]=e=>ve("BUY"))},[M(s(e.$t("t.long"))+" ",1),b(ra,{width:"16",height:"16"})],8,Av)),[[l,{posthog:{name:v(Ue).OCF_INVEST_SUBMIT,props:()=>fe(v(wt).long)}}]]),m("div",Tv,[m("p",Nv,[M(s(e.$t("futuresMain.openPosition.liqPrice"))+" ",1),b(Xl,{title:e.$t("futuresMain.openPosition.liqPrice"),tooltipStyle:{width:"200px","font-size":"14px"},placement:"bottom-end"},{tooltip:y((()=>[m("p",Lv,[M(s(e.$t("t.long"))+" ",1),b(ra,{class:"arrow",width:"16",height:"16"})]),m("ul",null,[m("li",null,[b(a,{keypath:"trading.ocf.dirTip.profitIf"},{direction:y((()=>[M(s(e.$t("t.rises").toLowerCase()),1)])),_:1})]),m("li",null,[m("strong",null,s(e.$t("trading.ocf.dirTip.autoClose.prefix")),1),M(" "+s(e.$t("trading.ocf.dirTip.autoClose.suffix")),1)])])])),content:y((()=>[b(Me,{width:"15",height:"15"})])),_:1},8,["title"])]),m("div",Ev,s(D.value),1)])]),m("div",Iv,[x((n(),r("button",{class:"button button-short",disabled:I.value,onClick:t[5]||(t[5]=e=>ve("SELL"))},[M(s(e.$t("t.short"))+" ",1),b(ra,{class:"arrow",width:"16",height:"16"})],8,Fv)),[[l,{posthog:{name:v(Ue).OCF_INVEST_SUBMIT,props:()=>fe(v(wt).short)}}]]),m("div",Rv,[m("p",Dv,[M(s(e.$t("futuresMain.openPosition.liqPrice"))+" ",1),b(Xl,{title:e.$t("futuresMain.openPosition.liqPrice"),tooltipStyle:{width:"200px","font-size":"14px"},placement:"bottom-end"},{tooltip:y((()=>[m("p",Ov,[M(s(e.$t("t.short"))+" ",1),b(ra,{class:"arrow short",width:"16",height:"16"})]),m("ul",null,[m("li",null,[b(a,{keypath:"trading.ocf.dirTip.profitIf"},{direction:y((()=>[M(s(e.$t("t.falls").toLowerCase()),1)])),_:1})]),m("li",null,[m("strong",null,s(e.$t("trading.ocf.dirTip.autoClose.prefix")),1),M(" "+s(e.$t("trading.ocf.dirTip.autoClose.suffix")),1)])])])),content:y((()=>[b(Me,{width:"15",height:"15"})])),_:1},8,["title"])]),m("div",Uv,s(O.value),1)])])])])}}}),[["__scopeId","data-v-348a49d3"]]),qv={class:"tabs"},Bv=la(o({__name:"OrderFormTabs",props:{modelValue:{default:"market"},modelModifiers:{}},emits:["update:modelValue"],setup(t){const a=g((()=>e((()=>import("./B4vtx7BF.js")),__vite__mapDeps([0,20])))),{checkAuthAndRedirect:l}=Ca(),{$openDialog:i}=J(),o=X(),c=d((()=>o.isDemoMode)),u=Ra(),p=N(t,"modelValue"),f=async e=>{if("limit"===e&&!c.value){if(!l())return;if(await u.checkHasPlacedOrder(),!u.hasPlacedOrder)return void i(a)}p.value=e};return(e,t)=>(n(),r("ul",qv,[m("li",{class:h(["tab",{active:"market"===p.value}]),onClick:t[0]||(t[0]=e=>f("market"))},s(e.$t("trading.copywise.quickStart")),3),m("li",{class:h(["tab set-price-tab",{active:"limit"===p.value}]),onClick:t[1]||(t[1]=e=>f("limit"))},s(e.$t("trading.ocf.setPrice")),3)]))}}),[["__scopeId","data-v-29e460c6"]]),Wv=["width","height"],Hv=o({__name:"IconDoubleChevronRight",props:{width:{default:10},height:{default:6}},setup:e=>(e,t)=>(n(),r("svg",{"aria-label":"Double Chevron Right Icon",width:e.width,height:e.height,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t[0]||(t[0]=[m("path",{d:"M0.0263672 0.422852C-0.0924075 0.155096 0.203821 -0.106809 0.455078 0.0439453L4.21191 2.29883C4.40584 2.41538 4.40584 2.69594 4.21191 2.8125L0.455078 5.06738C0.203818 5.21814 -0.0924195 4.95624 0.0263672 4.68848L0.919922 2.67773C0.954397 2.60016 0.954398 2.51116 0.919922 2.43359L0.0263672 0.422852ZM5.02637 0.422852C4.90759 0.155096 5.20382 -0.106809 5.45508 0.0439453L9.21191 2.29883C9.40584 2.41538 9.40584 2.69594 9.21191 2.8125L5.45508 5.06738C5.20382 5.21814 4.90758 4.95624 5.02637 4.68848L5.91992 2.67773C5.9544 2.60016 5.9544 2.51116 5.91992 2.43359L5.02637 0.422852Z",fill:"currentColor"},null,-1)]),8,Wv))}),Vv={class:"demo"},jv={key:3,class:"exit-demo"},Kv=la(o({__name:"DemoButton",props:{isDemoMode:{type:Boolean,default:!1}},setup:e=>(e,t)=>
2{const a=P("i18n-t");return n(),r("button",Vv,[e.isDemoMode?(n(),r(C,{key:0},[M(s(e.$t("t.exit")),1)],64)):(n(),p(a,{key:1,keypath:"t.demo"},{br:y((()=>t[0]||(t[0]=[m("br",null,null,-1)]))),_:1})),e.isDemoMode?(n(),r("p",jv,s(e.$t("trading.ocf.demo")),1)):(n(),p(Hv,{key:2,class:"demo__icon",width:e.isMobile?10:17,height:e.isMobile?5:10},null,8,["width","height"]))])}}),[["__scopeId","data-v-6cdd58c7"]]),Yv=la(o({__name:"FunctionButton",emits:["click"],setup:e=>(e,t)=>(n(),r("button",{class:"btn",onClick:t[0]||(t[0]=t=>e.$emit("click",t))},[O(e.$slots,"default",{},void 0,!0)]))}),[["__scopeId","data-v-37afa6ff"]]),Gv=la(o({__name:"QuestionButton",props:{showOverlay:{type:Boolean}},setup(t){const l=i(),r=t;a((()=>r.showOverlay),(e=>{var t,a;e?null==(a=l.value)||a.show():null==(t=l.value)||t.hide()}));const{$openDialog:o}=J(),c=g((()=>e((()=>Promise.resolve().then((()=>Mh))),void 0)));return(e,t)=>{const a=P("Tooltip");return n(),p(Yv,{class:h({"question-button":e.showOverlay}),onClick:t[0]||(t[0]=t=>!e.showOverlay&&v(o)(v(c)))},{default:y((()=>[x(b(a,{ref_key:"tooltipRef",ref:l,placement:"left",onlyShowOnClick:!0,tooltipStyle:{width:"190px",transform:"translateX(-10%)","font-size":"14px"}},{content:y((()=>[b(wa,{class:"icon",width:15,height:14})])),tooltip:y((()=>[M(s(e.$t("trading.ocf.tutorialTip")),1)])),_:1},512),[[S,e.showOverlay]]),e.showOverlay?f("",!0):(n(),p(wa,{key:0,class:"icon",width:16,height:16}))])),_:1},8,["class"])}}}),[["__scopeId","data-v-11d85bfd"]]),Zv=la(o({__name:"FunctionButtonGroup",props:{isDemoMode:{type:Boolean,default:!1},showOverlay:{type:Boolean,default:!1}},emits:["toggleDemo","walletClick"],setup(e,{emit:t}){const a=t;return(e,t)=>(n(),r("div",{class:h(e.isXlSize?"function-buttons":"tablet-question-buttons")},[!e.showOverlay||e.isXlSize?(n(),p(Kv,{key:0,isDemoMode:e.isDemoMode,onClick:t[0]||(t[0]=e=>a("toggleDemo"))},null,8,["isDemoMode"])):f("",!0),e.isDemoMode?f("",!0):(n(),p(Yv,{key:1,onClick:t[1]||(t[1]=e=>a("walletClick"))},{default:y((()=>[b(Ta,{class:"icon",width:"16",height:"16"})])),_:1})),b(Gv,{showOverlay:e.showOverlay},null,8,["showOverlay"])],2))}}),[["__scopeId","data-v-c8ad9d9b"]]),Xv={class:"header"},Qv={class:"title"},Jv={key:0,class:"tabs"},eh={class:"content"},th={class:"desc-content"},ah={class:"list"},lh={class:"step-title"},ih={class:"desc"},rh={class:"list"},nh={class:"step-title"},sh={class:"desc"},oh={class:"desc"},ch={class:"desc"},uh={key:0,class:"list"},dh={class:"step-title"},ph={class:"desc"},fh={class:"list"},mh={class:"step-title"},vh={class:"icon"},hh={class:"direction-row"},gh={class:"direction-item"},yh={class:"direction long"},bh={class:"desc flex"},_h={class:"direction-item"},wh={class:"direction short"},kh={class:"desc flex"},xh={class:"img-content"},Sh=["src","height","alt"],Ch={class:"footer"},$h=la(o({__name:"TutorialDialog",emits:["dialog:closed"],setup(e,{emit:t}){const a=et(),{lang:l}=K(a),o=i("market"),c=d((()=>"market"===o.value)),u=d((()=>"limit"===o.value)),v=t,g=Object.assign({"./assets/limit-en.png":"/static/img/Elcwobmv.png","./assets/limit-zh-CN.png":"/static/img/GZyxDonA.png","./assets/limit-zh-TW.png":"/static/img/JAFj6ZvG.png","./assets/market-en.png":"/static/img/BUoMIlsO.png","./assets/market-zh-CN.png":"/static/img/BH0iGhxS.png","./assets/market-zh-TW.png":"/static/img/C8TULYF9.png"}),_=d((()=>{const e=c.value?"market":"limit";return g[`./assets/${e}-${l.value}.png`]??g[`./assets/${e}-en.png`]}));function w(){v("dialog:closed")}return(e,t)=>{const a=P("i18n-t");return n(),p(ue,{class:"one-click-futures-tutorial-dialog",width:e.isMobile?"100%":"760px",visible:"",showClose:!1,isBottomUp:e.isMobile,center:"",isBrandNewStyle:"",onClosed:w},{body:y((()=>[m("div",Xv,[m("div",Qv,s(e.$t("trading.ocf.onboarding.title")),1),b(be,{class:"close-icon",onClick:w})]),e.isMobile?(n(),r("div",Jv,[m("button",{class:h(["tab",{active:c.value}]),onClick:t[0]||(t[0]=e=>o.value="market")},s(e.$t("trading.copywise.quickStart")),3),m("button",{class:h(["tab",{active:u.value}]),onClick:t[1]||(t[1]=e=>o.value="limit")},s(e.$t("trading.ocf.setPrice")),3)])):f("",!0),m("div",eh,[m("ul",th,[m("li",ah,[m("div",lh,[t[4]||(t[4]=m("span",{class:"icon"},"1",-1)),M(" "+s(e.$t("trading.ocf.onboarding.steps.title")),1)]),m("p",ih,s(e.$t("trading.ocf.onboarding.steps.desc")),1
2)]),m("li",rh,[m("div",nh,[t[5]||(t[5]=m("span",{class:"icon"},"2",-1)),M(" "+s(e.$t("trading.ocf.selectLeverage")),1)]),m("p",sh,s(e.$t("trading.ocf.leverageDesc")),1),m("p",oh,[b(a,{keypath:"trading.ocf.leverageExample"},{amount:y((()=>t[6]||(t[6]=[M("$100")]))),leverage:y((()=>t[7]||(t[7]=[m("span",{class:"highlight"},"[20x]",-1)]))),total:y((()=>t[8]||(t[8]=[m("strong",null,"$2,000",-1)]))),_:1})]),m("p",ch,[M(s(e.$t("trading.ocf.leverageRisk"))+" ",1),t[9]||(t[9]=m("br",null,null,-1)),M(" "+s(e.$t("trading.ocf.leverageWarning"))+" ",1),t[10]||(t[10]=m("br",null,null,-1)),M(" "+s(e.$t("trading.ocf.leverageNote")),1)])]),u.value?(n(),r("li",uh,[m("div",dh,[t[11]||(t[11]=m("span",{class:"icon"},"3",-1)),M(" "+s(e.$t("t.enter"))+" "+s(e.$t("trading.ocf.desiredEntryPrice")),1)]),m("p",ph,s(e.$t("trading.ocf.enterPriceDesc")),1)])):f("",!0),m("li",fh,[m("div",mh,[m("span",vh,s(c.value?"3":"4"),1),M(" "+s(e.$t("trading.ocf.chooseDirection")),1)]),m("div",hh,[m("div",gh,[m("span",yh,[M(s(e.$t("t.long"))+" ",1),b(ra,{class:"arrow-up"})]),m("p",bh,[b(a,{keypath:"trading.ocf.direction.profitIf",tag:"p",class:"desc flex"},{direction:y((()=>[M(s(e.$t("t.rises")),1)])),_:1}),m("strong",null,s(e.$t("trading.ocf.direction.profit")),1)])]),m("div",_h,[m("span",wh,[M(s(e.$t("t.short"))+" ",1),b(ra,{class:"arrow-down"})]),m("p",kh,[b(a,{keypath:"trading.ocf.direction.profitIf",tag:"p",class:"desc"},{direction:y((()=>[M(s(e.$t("t.falls")),1)])),_:1}),m("strong",null,s(e.$t("trading.ocf.direction.profit")),1)])])])])]),m("div",xh,[m("button",{class:"tab-area market",onClick:t[2]||(t[2]=e=>o.value="market")}),m("button",{class:"tab-area limit",onClick:t[3]||(t[3]=e=>o.value="limit")}),e.isMobile?f("",!0):(n(),r("img",{key:0,src:_.value,width:"320",height:c.value?424:528,alt:c.value?"Market Order Form":"Limit Order Form"},null,8,Sh))])]),m("div",Ch,[m("button",{class:"start-btn",onClick:w},s(e.$t("trading.copywise.startNow")),1)])])),_:1},8,["width","isBottomUp"])}}}),[["__scopeId","data-v-24c85640"]]),Mh=Object.freeze(Object.defineProperty({__proto__:null,default:$h},Symbol.toStringTag,{value:"Module"})),Ph={key:0,class:"demo-info"},Ah={key:0,class:"title"},Th={key:0,class:"price"},Nh={key:1,class:"title"},Lh={class:"demo-funds"},Eh={class:"demo-funds-section"},Ih={key:0,class:"demo-funds-title"},Fh={key:1,class:"price"},Rh={class:"trading-view-wrapper"},Dh={class:"market-info"},Oh={class:"market-data-list-wrap"},Uh={class:"list"},zh={class:"content"},qh={key:0,class:"list"},Bh={class:"content"},Wh={class:"amount"},Hh={class:"currency"},Vh={key:1,class:"list"},jh={class:"popularity-fire"},Kh={class:"trading-view-container"},Yh={class:"trading-view-chart"},Gh={key:2,class:"demo-bar-bottom"},Zh=la(o({__name:"index",props:{symbol:{}},emits:["update:symbol"],setup(l,{emit:o}){const u=l,_=o,w=te(),k=d((()=>w.isMobile)),{checkAuthAndRedirect:x}=Ca(),S=i(!1),P=i("market"),A=t(),T=Ra(),{$openDialog:N}=J(),L=X(),E=d((()=>L.isDemoMode)),I=()=>{E.value?L.exitDemo():L.enterDemo()};a(E,(e=>{e||"limit"!==P.value||T.hasPlacedOrder||(P.value="market")}));const R=e=>{var t;const a=T.oneClickMarkets;return(null==(t=null==a?void 0:a.find((t=>t.symbol===e)))?void 0:t.coin)??""};a((()=>u.symbol),((e,t)=>{if(!t||!e||e===t)return;const a=R(t),l=R(e);a&&l&&De(Ue.OCF_MARKET_SELECTED,{from_market:a,to_market:l,mode:Re(E.value)})}));const D=d((()=>E.value?L.trades.filter((e=>e.symbol===u.symbol)).sort(((e,t)=>t.createdAt-e.createdAt)).map(Ct):T.oneClickActiveTrades)),O=g((()=>e((()=>import("./D7N4GSvD.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])))),U=()=>{x()&&N(O)},z=i(!1),q=()=>{z.value=!1,k.value||fe()};c((async()=>{A.state.loginState&&A.dispatch("futures/updateAssetCollateralRatio")}));const B=d((()=>{var e;return null==(e=G.value)?void 0:e.coin})),H=d((()=>{var e;return null==(e=A.state.orderBook)?void 0:e.lastPrice})),V=d((()=>{var e;return null==(e=A.state.orderBook)?void 0:e.lastPriceChange})),j=d((()=>1===V.value)),K=d((()=>-1===V.value)),Y=d((()=>A.getters["futures/currentSettleInCurrency"])),G=d((()=>{const e=T.oneClickMarkets;return null==e?void 0:e.find((e=>e.symbol===u.symbol))})),Q=d((()=>{var e;return null==(e=G.value)?void 0:e.marketName})),ee=d((()=>A.state.futures.marketMap[u.symbol]||{})),ae=d((()=>A.state.futures.futuresLastDataMap[u.symbol]||{})),le=d((()=>ae.value.gains||0)),ie=d((()=>le.value>0)),re=d((()=>le.value<0)),se=d((()=>{var e;return(null==(e=G.value)?void 0:e.popularity)??0})),oe=d((()=>{const e=H.value||ae.value.price||0,t=ee.value.priceFilter??2;return ne(e,{formatKey:t})})),ue=d((()=>`${le.value>=0?"+":""}${le.value.toFixed(2)}%`)),de=d((()=>{const e=ae.value.volume||0;return $t(e,2,2)})),pe=d((()=>!k.value||E.value||T.hasPlacedOrder)),fe=()=>{S.value=!0,Mt(!0)},me=()=>{S.value=!1,Mt(!1)};return Z((()=>{Mt(!1)})),(e,t)=>(n(),r(C,null,[m("div",{class:h(["trading-view-panel",{"demo-mode":E.value}])},[E.value?(n(),r("div",Ph,[k.value?(n(),r("h4",Ah,[M(s(e.$t("trading.ocf.demoFunds"))+" ",1),k.value?(n(),r("span",Th," $"+s(v(ne)(v(L).funds,{formatKey:2})),1)):f("",!0)])):(n(),r("h4",Nh,s(e.$t("trading.ocf.demoTrading")),1)),m("div",Lh,[m("div",Eh,[k.value?f("",!0):(n(),r("div",Ih,s(e.$t("trading.ocf.demoFunds")),1)),k.value?f("",!0):(n(),r("div",Fh," $"+s(v(ne)(v(L).funds,{formatKey:2})),1))]),m("button",{class:"reset",onClick:t[0]||(t[0]=e=>v(L).reset())},[b(Pa,{class:"reset-icon"}),M(" "+s(e.$t("t.reset")),1)])])])):f("",!0),e.isXlSize?(n(),p(Zv,{key:1,isDemoMode:E.value,showOverlay:S.value,onToggleDemo:I,onWalletClick:U},null,8,["isDemoMode","showOverlay"])):f("",!0),m("div",Rh,[e.isLargeSize&&!e.isXlSize?(n(),p(Zv,{key:0,isDemoMode:E.value,showOverlay:S.value,onToggleDemo:I,onWalletClick:U},null,8,["isDemoMode","showOverlay"])):f("",!0),m("div",Dh,[b(jl,{symbol:e.symbol,"onUpdate:symbol":t[1]||(t[1]=e=>_("update:symbol",e))},null,8,["symbol"]),m("ul",Oh,[m("li",Uh,[M(s(e.$t("t.price"))+" ",1),m("div",zh,[m("span",{class:h(["price",{long:j.value,short:K.value}])},[M(s(oe.value)+" ",1),b(ce,{width:"12",height:"10",class:h(["icon-triangle",{"rotate-180":K.value,hidden:!j.value&&!K.value}])},null,8,["class"])],2),k.value?f("",!0):(n(),r("span",{key:0,class:h({long:ie.value,short:re.value})},s(ue.value),3))])]),k.value?f("",!0):(n(),r("li",qh,[M(s(e.$t("t.24h"))+" "+s(e.$t("t.vol"))+" ",1),m("div",Bh,[m("span",Wh,s(de.value),1),m("span",Hh,s(Y.value),1)])])),k.value?f("",!0):(n(),r("li",Vh,[M(s(e.$t("t.popularity"))+" ",1),m("div",jh,[(n(),r(C,null,$(5,((e,t)=>b(aa,{key:t,class:h({dark:t>=se.value})},null,8,["class"]))),64))])]))]),k.value?(n(),p(Kv,{key:0,isDemoMode:E.value,onClick:I},null,8,["isDemoMode"])):f("",!0)]),m("div",Kh,[m("div",Yh,[Q.value?(n(),p(ka,{key:Q.value,class:"chart",variant:"oneClickFutures",symbol:Q.value,isFutures:!0,style:F({height:k.value?"219px":"384px"})},null,8,["symbol","style"])):f("",!0),k.value?f("",!0):(n(),p(Qm,{key:1,coin:B.value,trades:D.value},null,8,["coin","trades"]))]),m("div",{class:h(["order-form",{"has-placed-order":pe.value}])},[pe.value?(n(),p(Bv,{key:0,modelValue:P.value,"onUpdate:modelValue":t[2]||(t[2]=e=>P.value=e)},null,8,["modelValue"])):f("",!0),b(zv,{market:G.value,symbol:e.symbol,activeTab:P.value,activeTrades:D.value},null,8,["market","symbol","activeTab","activeTrades"])],2)])]),b(W,{name:"overlay"},{default:y((()=>[S.value?(n(),r("div",{key:0,class:"overlay",onClick:me})):f("",!0)])),_:1}),E.value?(n(),r("div",Gh,[m("button",{class:"exit",onClick:t[3]||(t[3]=e=>v(L).exitDemo())},s(e.$t("trading.ocf.exitDemo")),1)])):f("",!0)],2),k.value?(n(),p(Qm,{key:0,coin:B.value,trades:D.value},null,8,["coin","trades"])):f("",!0),z.value?(n(),p($h,{key:1,"onDialog:closed":q})):f("",!0)],64))}}),[["__scopeId","data-v-9fea872b"]]),Xh={class:"one-click-futures tabular-nums"},Qh={key:0,class:"bg"},Jh={class:"title-wrap"},eg={key:0},tg={class:"title-subtitle"},ag={class:"highlight"},lg=la(o({__name:"index",setup(l){const i=g((()=>e((()=>Promise.resolve().then((()=>Sm))),void 0))),o=g((()=>e((()=>Promise.resolve().then((()=>$p))),void 0))),u=w(),v=_(),{$openDialog:h}=J(),{loginState:k}=K(et()),x=Ra(),S=Se(),C=X(),{isDemoMode:$,trades:P}=K(C),{updateSymbol:A}=jt(It,{isTradePageMode:!0});!function(){const e=t();a((()=>e.state.futures.notification),(t=>{if(!t)return;const{error:a}=t;let l;try{l="string"==typeof a?JSON.parse(a):a??null}catch{l=null}const i=null==l?void 0:l.code;(27===t.status||i&&Kt.includes(i))&&e.dispatch("messageSuccess",t)}))}();const T=d((()=>$.value?P.value.length>0:k.value&&x.hasPlacedOrder)),N=Pt();a($,(e=>{e?N.start():N.stop()}),{immediate:!0});let L=null;const E=d((()=>u.params.id||localStorage.getItem("OCF_LAST_SYMBOL")||"BTC-PERP")),I=()=>{L&&(clearTimeout(L),L=null)},F=()=>
2{if(L||!k.value)return;if($.value)return;const e=async()=>{await x.fetchOneClickActiveTrades({symbol:E.value}),null!==L&&(L=setTimeout(e,6e4))};L=setTimeout(e,0)};a(k,(e=>{e?(F(),x.checkHasPlacedOrder()):(I(),x.hasPlacedOrder=!1,x.oneClickActiveTrades=[])}),{immediate:!0});const R=e=>{v.push({name:se.ONE_CLICK_FUTURES,params:{...u.params,id:e},query:u.query})};a((()=>u.params.id),(e=>{e&&(localStorage.setItem("OCF_LAST_SYMBOL",e),A(e),k.value&&(I(),F()))}),{immediate:!0});const D=e=>{const t=Array.isArray(e)?e[0]:e;return"string"==typeof t&&t.length>0?t:void 0},O=async()=>{const e=D(u.query.info),t=D(u.query.tn),l=e===ft.HISTORY||e===ft.CURRENT;if(!t&&!l)return;const r=Object.fromEntries(Object.entries(u.query).filter((([e])=>"info"!==e&&"tn"!==e)));try{await v.replace({query:r})}catch{return}if(t&&$.value)return;const n=async()=>{try{if(t){const e=t,l=await ze.getTradeDetail(e);if((a=l.status)===ke.CLOSED||a===ke.CLOSED_DUE_TO_FAILED)await h(i,{defaultTab:ft.HISTORY});else{const t=h(i,{defaultTab:ft.CURRENT});t.catch((()=>{}));"goHistory"===await h(o,{tradeNumber:e,initialDetail:l})&&(t.resolveFn(null),await t.catch((()=>{})),await h(i,{defaultTab:ft.HISTORY}))}}else await h(i,{defaultTab:e})}catch(l){}var a};if(k.value)n();else{const e=a(k,(t=>{t&&(e(),n())}))}};return a((()=>u.query),(()=>{O()}),{deep:!0}),c((async()=>{u.params.id||await v.replace({name:se.ONE_CLICK_FUTURES,params:{...u.params,id:E.value},query:u.query}),O()})),a($,(e=>{e?I():k.value&&F()})),a((()=>Object.keys(S.positionMap).length),((e,t)=>{!$.value&&k.value&&e<t&&x.fetchOneClickActiveTrades({symbol:E.value})})),Z((()=>{I(),N.stop()})),(e,t)=>(n(),p(ia,null,{default:y((()=>[m("div",Xh,[e.isMobile?f("",!0):(n(),r("div",Qh)),m("main",null,[m("div",Jh,[e.isDesktop?(n(),r("h1",eg,[M(s(e.$t("trading.ocf.title"))+" ",1),t[0]||(t[0]=m("sup",{class:"tm"},"TM",-1))])):f("",!0),m("p",tg,[M(s(e.$t("trading.ocf.slogan"))+" â ",1),m("span",ag,s(e.$t("trading.ocf.slogan.subText")),1)])]),T.value?(n(),p(tl,{key:0})):f("",!0),b(Zh,{symbol:E.value,"onUpdate:symbol":R},null,8,["symbol"]),b(na)]),e.isMobile?f("",!0):(n(),p(yl,{key:1})),b(sa),b($l)])])),_:1}))}}),[["__scopeId","data-v-649d42b4"]]),ig=Object.freeze(Object.defineProperty({__proto__:null,default:lg},Symbol.toStringTag,{value:"Module"}));export{Nl as C,Oa as D,Kl as _,ig as i,Ra as u}; 3//# sourceMappingURL=K33ZgrkB.js.map
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.