@backtest-kit/ui 15.2.0 → 15.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/modules/frontend/build/assets/{Article-BXBHQ9ZL.js → Article-CV6sYzXB.js} +1 -1
- package/build/modules/frontend/build/assets/{Background-z2hZ5vrs.js → Background-Djt8-6Ze.js} +1 -1
- package/build/modules/frontend/build/assets/{IconPhoto-DBNRgcFh.js → IconPhoto-CtWTATuX.js} +1 -1
- package/build/modules/frontend/build/assets/{KeyboardArrowLeft-BcNNsJIG.js → KeyboardArrowLeft-C3lIqTl8.js} +1 -1
- package/build/modules/frontend/build/assets/{PictureAsPdfOutlined-z3cPPLwg.js → PictureAsPdfOutlined-B1KE8AuD.js} +1 -1
- package/build/modules/frontend/build/assets/{Refresh-BIf7i5Ab.js → Refresh-KIrQPPBf.js} +1 -1
- package/build/modules/frontend/build/assets/emitters-qnXuWOnN.js +1 -0
- package/build/modules/frontend/build/assets/{hasRouteMatch-Bo3n95qK.js → hasRouteMatch-B6-B9b9t.js} +1 -1
- package/build/modules/frontend/build/assets/{html2canvas-C4HtshZG.js → html2canvas-CdSt4VzX.js} +1 -1
- package/build/modules/frontend/build/assets/index-0JctlSLr.js +1 -0
- package/build/modules/frontend/build/assets/index-1K1HGT_8.js +1 -0
- package/build/modules/frontend/build/assets/index-8b7X5vYC.js +1 -0
- package/build/modules/frontend/build/assets/index-BFzLQzbk.js +1 -0
- package/build/modules/frontend/build/assets/index-BmoE1JTl.js +1 -0
- package/build/modules/frontend/build/assets/index-C3X0Cyxd.js +1 -0
- package/build/modules/frontend/build/assets/index-C5m6_YJk.js +1 -0
- package/build/modules/frontend/build/assets/index-CHkGhaAk.js +1 -0
- package/build/modules/frontend/build/assets/index-Dg5tMbmL.js +1 -0
- package/build/modules/frontend/build/assets/index-DkFd37tu.js +1 -0
- package/build/modules/frontend/build/assets/index-OFztncO3.js +1 -0
- package/build/modules/frontend/build/assets/{index-DQ0Y8Jqw.js → index-WrZQf7cw.js} +516 -516
- package/build/modules/frontend/build/assets/index-ZG9R-qtJ.js +1 -0
- package/build/modules/frontend/build/assets/{index.es-CJnIp80N.js → index.es-DenpndJP.js} +1 -1
- package/build/modules/frontend/build/index.html +1 -1
- package/package.json +3 -3
- package/build/modules/frontend/build/assets/emitters-k6IxEkD1.js +0 -1
- package/build/modules/frontend/build/assets/index-BGmWtYij.js +0 -1
- package/build/modules/frontend/build/assets/index-BJmac5su.js +0 -1
- package/build/modules/frontend/build/assets/index-CQ30d87p.js +0 -1
- package/build/modules/frontend/build/assets/index-CehzP5XN.js +0 -1
- package/build/modules/frontend/build/assets/index-ChQMz8hn.js +0 -1
- package/build/modules/frontend/build/assets/index-Ci4nukts.js +0 -1
- package/build/modules/frontend/build/assets/index-CiWEd_QA.js +0 -1
- package/build/modules/frontend/build/assets/index-DVjpvdFy.js +0 -1
- package/build/modules/frontend/build/assets/index-DlJ97jds.js +0 -1
- package/build/modules/frontend/build/assets/index-Dwx5drMf.js +0 -1
- package/build/modules/frontend/build/assets/index-ckg1rLeX.js +0 -1
- package/build/modules/frontend/build/assets/index-wK67zULN.js +0 -1
- package/build/modules/frontend/build/assets/markdownit-BafkpXSa.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e,b as t,r as o,u as a,_ as i,e as r,f as n,h as l,k as s,s as c,l as p,d,z as m,A as y,i as u,V as g,W as h,q as b,a3 as f,t as v,$ as x,T as C,b3 as w,Y as S,B as N,w as P,a4 as k,K as A,J as L,a6 as $,m as M,n as T,a5 as B,a7 as R,ai as V,b4 as F,b5 as z,y as I,G as E,a9 as O,b6 as D,D as j,b7 as H,b8 as W,ag as G,X as q,U,a2 as Y,b9 as _,ad as Q,ba as J,bb as K,bc as X,Q as Z,bd as ee,aZ as te,ah as oe,be as ae,aQ as ie,aO as re,b0 as ne,bf as le,bg as se,bh as ce,bi as pe,I as de,av as me,al as ye,bj as ue,aj as ge}from"./index-WrZQf7cw.js";import{h as he}from"./hasRouteMatch-B6-B9b9t.js";import{I as be}from"./IconPhoto-CtWTATuX.js";import{C as fe,R as ve}from"./Refresh-KIrQPPBf.js";import{K as xe}from"./KeyboardArrowLeft-C3lIqTl8.js";import{B as Ce}from"./Background-Djt8-6Ze.js";import{r as we}from"./emitters-qnXuWOnN.js";function Se(t){return e("MuiCard",t)}t("MuiCard",["root"]);const Ne=["className","raised"],Pe=c(p,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),ke=o.forwardRef(function(e,t){const o=a({props:e,name:"MuiCard"}),{className:c,raised:p=!1}=o,d=i(o,Ne),m=r({},o,{raised:p}),y=(e=>{const{classes:t}=e;return s({root:["root"]},Se,t)})(m);return n(Pe,r({className:l(y.root,c),elevation:p?8:void 0,ref:t,ownerState:m},d))});function Ae(t){return e("MuiCardContent",t)}t("MuiCardContent",["root"]);const Le=["className","component"],$e=c("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),Me=o.forwardRef(function(e,t){const o=a({props:e,name:"MuiCardContent"}),{className:c,component:p="div"}=o,d=i(o,Le),m=r({},o,{component:p}),y=(e=>{const{classes:t}=e;return s({root:["root"]},Ae,t)})(m);return n($e,r({as:p,className:l(y.root,c),ownerState:m,ref:t},d))}),Te=d(n("path",{d:"M18.21 9.21C15.93 10.78 13.45 13.3 13 17h2v2H9v-2h2c-.5-4.5-4.37-8-9-8V7c4.39 0 8.22 2.55 10 6.3 1.13-2.43 2.99-4.25 4.78-5.52L14 5h7v7l-2.79-2.79z"}),"AirlineStops"),Be=d(n("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),Re=d(n("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"CloseOutlined"),Ve=d(n("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83v-4.7l6-2.25 6 2.25v4.7z"}),"ShieldOutlined"),Fe=d(n("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6h-6z"}),"TrendingUpOutlined"),ze=d(n("path",{d:"M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-10 7H8v3H6v-3H3v-2h3V8h2v3h3v2zm4.5 2c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4-3c-.83 0-1.5-.67-1.5-1.5S18.67 9 19.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"}),"VideogameAsset"),Ie="backtest-kit__groupHeader",Ee="backtest-kit__groupRoot",Oe="backtest-kit__symbolImage",De=b()({root:{[`& .${Ee}:hover .${Ie}`]:{opacity:"1 !important"}}});function je(e){return R(e,"#000000")>R(e,"#FFFFFF")}const He=[{type:h.Link,action:"back-action",label:n(xe,{sx:{display:"block"}})},{type:h.Link,action:"back-action",label:v("Main")},{type:h.Link,action:"back-action",label:v("Status")}],We=[{action:"update-now",label:v("Refresh"),icon:()=>n(x,{icon:ve,color:"#4caf50"})}],Ge=(e,t)=>({type:f.Group,className:Ee,sx:{p:2},tabletColumns:"12",desktopColumns:"3",fields:[{type:f.Component,className:Ie,style:{transition:"opacity 500ms",opacity:.5},element:()=>n(L,{direction:"row",children:[n(k,{variant:"outlined",size:"small",color:"info",label:`${A.bullet} ${e}`,sx:{mb:1,pr:.5,fontSize:"14px",background:"white",cursor:"not-allowed"}}),n(N,{flex:1})]})},{type:f.Group,fields:t.map(({symbol:e,label:t,to:o,color:a})=>((e,t,o,a)=>({type:f.Component,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>n(B,{component:$,onClick:()=>{u.routerService.push(`/status/${t}`)},sx:{width:"100%",background:a,color:"white",fontWeight:"bold",fontSize:"14px",height:"75px",minHeight:"75px",textWrap:"wrap",padding:"16px",[`& .${Oe}`]:{transition:"filter 500ms"},"&:hover":{background:()=>je(a)?M(a,.33):T(a,.33),[`& .${Oe}`]:{transition:"filter 500ms",filter:je(a)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:n(be,{className:Oe,symbol:e}),children:n(N,{sx:{overflow:"hidden",textOverflow:"ellipsis",width:"75px"},children:o})})}))(e,o,t,a))}]}),qe=[{type:h.Link,action:"back-action",label:n(xe,{sx:{display:"block"}})},{type:h.Link,action:"back-action",label:v("Main")},{type:h.Link,action:"back-action",label:v("Status")},{type:h.Link,action:"back-action",compute:e=>e?`${String(e.symbol).toUpperCase()} (${e.strategyName})`:v("Live")},{type:h.Button,action:"control-action",label:v("Manual Control"),icon:ze},{type:h.Fab,action:"print-action",label:v("Print"),icon:D},{type:h.Fab,action:"update-now",label:v("Refresh"),icon:ve}],Ue=[{action:"print-action",label:v("Print"),icon:()=>n(x,{icon:D,color:"#4caf50"})},{action:"download-action",label:v("Download"),icon:()=>n(x,{icon:j,color:"#4caf50"})},{divider:!0},{action:"update-now",label:v("Refresh"),icon:()=>n(x,{icon:ve,color:"#4caf50"})}],Ye=new O,_e=new O,Qe=new O,Je=new O,Ke=new O,Xe=Y.createLoader(12),Ze=({payload:e})=>n(N,{sx:{mb:1,minHeight:48},children:n(W,{sx:{height:"100%",minHeight:48},hideOverflowY:!0,children:n(L,{direction:"row",gap:1,sx:{pointerEvents:"all"},children:[n(G,{startIcon:n(Te,{}),onClick:async()=>await _e.next(),color:"success",sx:{whiteSpace:"nowrap"},children:v("Open Position")}),n(G,{startIcon:n(Fe,{}),onClick:async()=>await Qe.next(),color:"warning",sx:{whiteSpace:"nowrap"},children:v("Commit Averaging")}),n(G,{startIcon:n(Ve,{}),onClick:async()=>await Ke.next(),sx:{whiteSpace:"nowrap"},children:v("Commit Breakeven")}),n(N,{flex:1}),n(q,{Loader:Xe,deps:[e.symbol,e.exchangeName,e.strategyName],reloadSubject:we,children:async()=>{const t=await u.controlViewService.getAveragePrice(e.symbol,{exchangeName:e.exchangeName,strategyName:e.strategyName}),o=Number(t);return n(C,{height:"100%",display:"flex",alignItems:"center",whiteSpace:"nowrap",mr:1,children:[v("Avg price")," ",e.symbol,":",A.nbsp,n("b",{children:`${o.toFixed(U(o))}${v("$")}`})]})}}),n(G,{startIcon:n(Re,{}),onClick:async()=>await Je.next(),sx:{whiteSpace:"nowrap"},color:"error",children:v("Close Position")})]})})}),et=[{type:f.Center,child:{type:f.Group,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fields:[{type:f.Typography,style:{opacity:.5},fieldBottomMargin:"3",typoVariant:"h6",placeholder:v("Open Position")},{type:f.Outline,fields:[{type:f.Combo,name:"position",title:v("Direction"),placeholder:v("Select direction"),itemList:["long","short"],validation:{required:!0},defaultValue:"long"},{type:f.Text,name:"cost",inputPattern:"[0-9]*",inputMode:"numeric",inputType:"tel",trailingIcon:Q,trailingIconClick:(e,{},{},t)=>{t("")},validation:{required:!0},title:v("Amount USDT"),placeholder:"00000",inputFormatterSymbol:"0",inputFormatterAllowed:/[0-9]/,defaultValue:"100"},{type:f.Text,outlined:!0,name:"quantity",sx:{cursor:"not-allowed","& *":{cursor:"not-allowed"}},title:v("Coin Quantity"),placeholder:"0.00",compute:(e,t)=>{const o=parseFloat(e.cost||"0"),a=parseFloat(t.averagePrice||"0");return o&&a?(o/a).toFixed(6):"0"},inputFormatterSymbol:"0",inputFormatterAllowed:/[0-9.]/,readonly:!0},{type:f.Text,name:"note",title:v("Note"),placeholder:v("Reason for opening the position")}]},{type:f.Typography,fieldBottomMargin:"3",typoVariant:"caption",sx:{pt:2,opacity:.5,fontSize:12},placeholder:`${A.bullet} ${v("After pressing the Next button, the position will be opened IMMEDIATELY")}`}]}}],tt=[{type:f.Center,child:{type:f.Group,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fields:[{type:f.Typography,style:{opacity:.5},fieldBottomMargin:"3",typoVariant:"h6",placeholder:v("Open Position")},{type:f.Outline,fields:[{type:f.Text,name:"symbol",compute:({},e)=>e.symbol,title:v("Symbol")},{type:f.Text,name:"price",inputPattern:"[0-9.]*",inputMode:"decimal",inputType:"tel",compute:({},e)=>`${Z(e.averagePrice)}${v("$")}`,title:v("Coin Price"),placeholder:"000000.00",inputFormatterSymbol:"0",inputFormatterAllowed:/[0-9.]/}]},{type:f.Typography,fieldBottomMargin:"3",typoVariant:"caption",sx:{pt:2,opacity:.5,fontSize:12},placeholder:`${A.bullet} ${v("Carefully verify that this is the coin you want to open a position on. Rely on the symbol AND THE PRICE")}`}]}}],ot=({type:e,title:t,description:o,amount:a,price:i,symbol:r})=>{const l=ee(),s="loading"===e?{color:l.palette.warning.main,bgColor:oe(l.palette.warning.main,.1),icon:n(ae,{size:24,color:"warning"}),chipColor:"warning"}:"success"===e?{color:l.palette.success.main,bgColor:oe(l.palette.success.main,.1),icon:n(Be,{}),chipColor:"success"}:"error"===e?{color:l.palette.error.main,bgColor:oe(l.palette.error.main,.1),icon:n(ie,{}),chipColor:"error"}:"warning"===e?{color:l.palette.warning.main,bgColor:oe(l.palette.warning.main,.1),icon:n(re,{}),chipColor:"warning"}:"info"===e?{color:l.palette.info.main,bgColor:oe(l.palette.info.main,.1),icon:n(ne,{}),chipColor:"info"}:{color:l.palette.grey[500],bgColor:oe(l.palette.grey[500],.1),icon:n(ne,{}),chipColor:"default"};return n(ke,{elevation:0,sx:{backgroundColor:s.bgColor,border:`1px solid ${oe(s.color,.3)}`,borderRadius:2,transition:"all 0.3s ease"},children:n(Me,{sx:{p:3},children:[n(N,{sx:{display:"flex",alignItems:"center",gap:2,mb:2},children:[n(N,{sx:{color:s.color,display:"flex",alignItems:"center"},children:s.icon}),n(C,{variant:"h6",sx:{color:s.color,fontWeight:600,flex:1},children:t}),r&&n(k,{label:r,size:"small",color:s.chipColor,variant:"outlined",icon:n(te,{})})]}),o&&n(C,{variant:"body2",color:"text.secondary",sx:{mb:2,lineHeight:1.5},children:o}),(a||i)&&n(N,{sx:{display:"flex",gap:3,mt:2,p:2,backgroundColor:oe(l.palette.background.paper,.6),borderRadius:1,border:`1px solid ${oe(s.color,.1)}`},children:[a&&n(N,{children:[n(C,{variant:"caption",color:"text.secondary",children:v("Amount")}),n(C,{variant:"subtitle1",sx:{fontWeight:600,color:s.color},children:a})]}),i&&n(N,{children:[n(C,{variant:"caption",color:"text.secondary",children:v("Price")}),n(C,{variant:"subtitle1",sx:{fontWeight:600,color:s.color},children:i})]})]})]})})},at={success:!1,loading:!0,error:""},it=[{id:"brief",element:({data:e,payload:t,history:o,onChange:a,onClose:i,setLoading:r})=>{const l=_([e],50),[s,{loading:c}]=y(async()=>{const e=t.getContext();return{averagePrice:await u.controlViewService.getAveragePrice(e.symbol,{strategyName:e.strategyName,exchangeName:e.exchangeName}),symbol:e.symbol}},{onLoadStart:()=>r(!0),onLoadEnd:()=>r(!1)});return n(X,{Navigation:n(K,{hasPrev:!0,hasNext:!!s,labelPrev:v("Close"),onPrev:async()=>{await i()},onNext:async()=>{a({averagePrice:s.averagePrice,symbol:s.symbol}),await l(),o.replace("/form")}}),children:s?c?null:n(S,{payload:()=>({averagePrice:s.averagePrice,symbol:s.symbol}),slots:J,fields:tt}):null})},isActive:e=>!!se("/brief",e)},{id:"form",element:({data:e,history:t,formState:a,onChange:i})=>{const[r,l]=o.useState(e),s=_([e],50);return n(X,{Navigation:n(K,{hasPrev:!0,hasNext:!0,labelPrev:v("Back"),onPrev:async()=>{t.replace("/brief")},onNext:async()=>{r&&(i({position:r.position,cost:r.cost,note:r.note,symbol:a.data.brief.symbol}),await s(),t.replace("/submit"))}}),children:n(S,{payload:()=>({averagePrice:a.data.brief.averagePrice}),onChange:e=>l(e),slots:J,fields:et,sx:{pt:1}})})},isActive:e=>!!se("/form",e)},{id:"submit",element:({formState:e,payload:t,beginSave:a,setLoading:i})=>{const[r,l]=o.useState(at),{position:s,cost:c,note:p,symbol:d}=o.useMemo(()=>{const{position:t,cost:o,note:a,symbol:i}=e.data.form;return{position:t,cost:o,note:a,symbol:i}},[e]);E(async()=>{i(!0);try{const e=t.getContext();await u.controlViewService.commitOpenPending(e.symbol,{strategyName:e.strategyName,exchangeName:e.exchangeName},{position:s,cost:parseFloat(c||"0"),note:p||""}),l({success:!0,loading:!1,error:""})}catch(e){l({success:!1,loading:!1,error:le(e)})}finally{i(!1)}});return n(X,{Navigation:n(K,{hasNext:r.success||!!r.error,labelNext:v("Close"),onNext:async()=>{await a()}}),children:n(N,{p:1,children:r.error?n(ot,{type:"error",title:v("Position Opening Error"),description:r.error,amount:`${Z(parseFloat(c||"0"))}${v("$")}`,symbol:d}):r.loading?n(ot,{type:"loading",title:v("Opening Position"),description:v("Please wait. Your operation is being processed..."),amount:`${Z(parseFloat(c||"0"))}${v("$")}`,symbol:d}):n(ot,{type:"success",title:v("Position Opened"),description:v("Position has been scheduled successfully. Waiting for the order to be executed on the exchange"),amount:`${Z(parseFloat(c||"0"))}${v("$")}`,symbol:d})})})},isActive:e=>!!se("/submit",e)}],rt=[{id:"brief",label:v("Briefing")},{id:"form",label:v("Input")},{id:"submit",label:v("Opening")}],nt="/brief",lt=me(),st=[{type:f.Center,child:{type:f.Group,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fields:[{type:f.Typography,style:{opacity:.5},fieldBottomMargin:"3",typoVariant:"h6",placeholder:v("Average Position")},{type:f.Outline,fields:[{type:f.Text,name:"cost",inputPattern:"[0-9]*",inputMode:"numeric",inputType:"tel",trailingIcon:Q,trailingIconClick:(e,{},{},t)=>{t("")},validation:{required:!0},title:v("Amount USDT"),placeholder:"00000",inputFormatterSymbol:"0",inputFormatterAllowed:/[0-9]/,defaultValue:"100"},{type:f.Text,outlined:!0,name:"quantity",sx:{cursor:"not-allowed","& *":{cursor:"not-allowed"}},title:v("Coin Quantity"),placeholder:"0.00",compute:(e,t)=>{const o=parseFloat(e.cost||"0"),a=parseFloat(t.averagePrice||"0");return o&&a?(o/a).toFixed(6):"0"},inputFormatterSymbol:"0",inputFormatterAllowed:/[0-9.]/,readonly:!0},{type:f.Text,name:"note",title:v("Note"),placeholder:v("Reason for averaging the position")}]},{type:f.Typography,fieldBottomMargin:"3",typoVariant:"caption",sx:{pt:2,opacity:.5,fontSize:12},placeholder:`${A.bullet} ${v("After pressing the Next button, the averaging will be performed IMMEDIATELY")}`}]}}],ct=[{type:f.Center,child:{type:f.Group,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fields:[{type:f.Typography,style:{opacity:.5},fieldBottomMargin:"3",typoVariant:"h6",placeholder:v("Average Position")},{type:f.Outline,fields:[{type:f.Text,name:"symbol",compute:({},e)=>e.symbol,title:v("Symbol")},{type:f.Text,name:"price",inputPattern:"[0-9.]*",inputMode:"decimal",inputType:"tel",compute:({},e)=>`${Z(e.averagePrice)}${v("$")}`,title:v("Coin Price"),placeholder:"000000.00",inputFormatterSymbol:"0",inputFormatterAllowed:/[0-9.]/}]},{type:f.Typography,fieldBottomMargin:"3",typoVariant:"caption",sx:{pt:2,opacity:.5,fontSize:12},placeholder:`${A.bullet} ${v("Carefully verify that this is the coin you want to average the position on. Rely on the symbol AND THE PRICE")}`}]}}],pt=({type:e,title:t,description:o,amount:a,price:i,symbol:r})=>{const l=ee(),s="loading"===e?{color:l.palette.warning.main,bgColor:oe(l.palette.warning.main,.1),icon:n(ae,{size:24,color:"warning"}),chipColor:"warning"}:"success"===e?{color:l.palette.success.main,bgColor:oe(l.palette.success.main,.1),icon:n(Be,{}),chipColor:"success"}:"error"===e?{color:l.palette.error.main,bgColor:oe(l.palette.error.main,.1),icon:n(ie,{}),chipColor:"error"}:"warning"===e?{color:l.palette.warning.main,bgColor:oe(l.palette.warning.main,.1),icon:n(re,{}),chipColor:"warning"}:"info"===e?{color:l.palette.info.main,bgColor:oe(l.palette.info.main,.1),icon:n(ne,{}),chipColor:"info"}:{color:l.palette.grey[500],bgColor:oe(l.palette.grey[500],.1),icon:n(ne,{}),chipColor:"default"};return n(ke,{elevation:0,sx:{backgroundColor:s.bgColor,border:`1px solid ${oe(s.color,.3)}`,borderRadius:2,transition:"all 0.3s ease"},children:n(Me,{sx:{p:3},children:[n(N,{sx:{display:"flex",alignItems:"center",gap:2,mb:2},children:[n(N,{sx:{color:s.color,display:"flex",alignItems:"center"},children:s.icon}),n(C,{variant:"h6",sx:{color:s.color,fontWeight:600,flex:1},children:t}),r&&n(k,{label:r,size:"small",color:s.chipColor,variant:"outlined",icon:n(te,{})})]}),o&&n(C,{variant:"body2",color:"text.secondary",sx:{mb:2,lineHeight:1.5},children:o}),(a||i)&&n(N,{sx:{display:"flex",gap:3,mt:2,p:2,backgroundColor:oe(l.palette.background.paper,.6),borderRadius:1,border:`1px solid ${oe(s.color,.1)}`},children:[a&&n(N,{children:[n(C,{variant:"caption",color:"text.secondary",children:v("Amount")}),n(C,{variant:"subtitle1",sx:{fontWeight:600,color:s.color},children:a})]}),i&&n(N,{children:[n(C,{variant:"caption",color:"text.secondary",children:v("Price")}),n(C,{variant:"subtitle1",sx:{fontWeight:600,color:s.color},children:i})]})]})]})})},dt={success:!1,loading:!0,error:""},mt=[{id:"brief",element:({data:e,payload:t,history:o,onChange:a,onClose:i,setLoading:r})=>{const l=_([e],50),[s,{loading:c}]=y(async()=>{const e=t.getContext();return{averagePrice:await u.controlViewService.getAveragePrice(e.symbol,{strategyName:e.strategyName,exchangeName:e.exchangeName}),symbol:e.symbol}},{onLoadStart:()=>r(!0),onLoadEnd:()=>r(!1)});return n(X,{Navigation:n(K,{hasPrev:!0,hasNext:!!s,labelPrev:v("Close"),onPrev:async()=>{await i()},onNext:async()=>{a({averagePrice:s.averagePrice,symbol:s.symbol}),await l(),o.replace("/form")}}),children:s?c?null:n(S,{payload:()=>({averagePrice:s.averagePrice,symbol:s.symbol}),slots:J,fields:ct}):null})},isActive:e=>!!se("/brief",e)},{id:"form",element:({data:e,history:t,formState:a,onChange:i})=>{const[r,l]=o.useState(e),s=_([e],50);return n(X,{Navigation:n(K,{hasPrev:!0,hasNext:!0,labelPrev:v("Back"),onPrev:async()=>{t.replace("/brief")},onNext:async()=>{r&&(i({cost:r.cost,note:r.note,symbol:a.data.brief.symbol}),await s(),t.replace("/submit"))}}),children:n(S,{payload:()=>({averagePrice:a.data.brief.averagePrice}),onChange:e=>l(e),slots:J,fields:st,sx:{pt:1}})})},isActive:e=>!!se("/form",e)},{id:"submit",element:({formState:e,payload:t,beginSave:a,setLoading:i})=>{const[r,l]=o.useState(dt),{cost:s,note:c,symbol:p}=o.useMemo(()=>{const{cost:t,note:o,symbol:a}=e.data.form;return{cost:t,note:o,symbol:a}},[e]);E(async()=>{i(!0);try{const e=t.getContext();await u.controlViewService.commitAverageBuy(e.symbol,{strategyName:e.strategyName,exchangeName:e.exchangeName},{cost:parseFloat(s||"0"),note:c||""}),l({success:!0,loading:!1,error:""})}catch(e){l({success:!1,loading:!1,error:le(e)})}finally{i(!1)}});return n(X,{Navigation:n(K,{hasNext:r.success||!!r.error,labelNext:v("Close"),onNext:async()=>{await a()}}),children:n(N,{p:1,children:r.error?n(pt,{type:"error",title:v("Averaging Error"),description:r.error,amount:`${Z(parseFloat(s||"0"))}${v("$")}`,symbol:p}):r.loading?n(pt,{type:"loading",title:v("Averaging Position"),description:v("Please wait. Your operation is being processed..."),amount:`${Z(parseFloat(s||"0"))}${v("$")}`,symbol:p}):n(pt,{type:"success",title:v("Position Averaged"),description:v("Averaging has been scheduled successfully. Waiting for the order to be executed on the exchange"),amount:`${Z(parseFloat(s||"0"))}${v("$")}`,symbol:p})})})},isActive:e=>!!se("/submit",e)}],yt=[{id:"brief",label:v("Briefing")},{id:"form",label:v("Input")},{id:"submit",label:v("Averaging")}],ut="/brief",gt=me(),ht=[{type:f.Center,child:{type:f.Group,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fields:[{type:f.Typography,style:{opacity:.5},fieldBottomMargin:"3",typoVariant:"h6",placeholder:v("Close Position")},{type:f.Outline,fields:[{type:f.Text,name:"note",title:v("Note"),placeholder:v("Reason for closing the position")}]},{type:f.Typography,fieldBottomMargin:"3",typoVariant:"caption",sx:{pt:2,opacity:.5,fontSize:12},placeholder:`${A.bullet} ${v("After pressing the Next button, the closing will be performed IMMEDIATELY")}`}]}}],bt=[{type:f.Center,child:{type:f.Group,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fields:[{type:f.Typography,style:{opacity:.5},fieldBottomMargin:"3",typoVariant:"h6",placeholder:v("Close Position")},{type:f.Outline,fields:[{type:f.Text,name:"symbol",compute:({},e)=>e.symbol,title:v("Symbol")},{type:f.Text,name:"price",inputPattern:"[0-9.]*",inputMode:"decimal",inputType:"tel",compute:({},e)=>`${Z(e.averagePrice)}${v("$")}`,title:v("Coin Price"),placeholder:"000000.00",inputFormatterSymbol:"0",inputFormatterAllowed:/[0-9.]/}]},{type:f.Typography,fieldBottomMargin:"3",typoVariant:"caption",sx:{pt:2,opacity:.5,fontSize:12},placeholder:`${A.bullet} ${v("Carefully verify that this is the coin you want to close the position on. Rely on the symbol AND THE PRICE")}`}]}}],ft=({type:e,title:t,description:o,amount:a,price:i,symbol:r})=>{const l=ee(),s="loading"===e?{color:l.palette.warning.main,bgColor:oe(l.palette.warning.main,.1),icon:n(ae,{size:24,color:"warning"}),chipColor:"warning"}:"success"===e?{color:l.palette.success.main,bgColor:oe(l.palette.success.main,.1),icon:n(Be,{}),chipColor:"success"}:"error"===e?{color:l.palette.error.main,bgColor:oe(l.palette.error.main,.1),icon:n(ie,{}),chipColor:"error"}:"warning"===e?{color:l.palette.warning.main,bgColor:oe(l.palette.warning.main,.1),icon:n(re,{}),chipColor:"warning"}:"info"===e?{color:l.palette.info.main,bgColor:oe(l.palette.info.main,.1),icon:n(ne,{}),chipColor:"info"}:{color:l.palette.grey[500],bgColor:oe(l.palette.grey[500],.1),icon:n(ne,{}),chipColor:"default"};return n(ke,{elevation:0,sx:{backgroundColor:s.bgColor,border:`1px solid ${oe(s.color,.3)}`,borderRadius:2,transition:"all 0.3s ease"},children:n(Me,{sx:{p:3},children:[n(N,{sx:{display:"flex",alignItems:"center",gap:2,mb:2},children:[n(N,{sx:{color:s.color,display:"flex",alignItems:"center"},children:s.icon}),n(C,{variant:"h6",sx:{color:s.color,fontWeight:600,flex:1},children:t}),r&&n(k,{label:r,size:"small",color:s.chipColor,variant:"outlined",icon:n(te,{})})]}),o&&n(C,{variant:"body2",color:"text.secondary",sx:{mb:2,lineHeight:1.5},children:o}),(a||i)&&n(N,{sx:{display:"flex",gap:3,mt:2,p:2,backgroundColor:oe(l.palette.background.paper,.6),borderRadius:1,border:`1px solid ${oe(s.color,.1)}`},children:[a&&n(N,{children:[n(C,{variant:"caption",color:"text.secondary",children:v("Amount")}),n(C,{variant:"subtitle1",sx:{fontWeight:600,color:s.color},children:a})]}),i&&n(N,{children:[n(C,{variant:"caption",color:"text.secondary",children:v("Price")}),n(C,{variant:"subtitle1",sx:{fontWeight:600,color:s.color},children:i})]})]})]})})},vt={success:!1,loading:!0,error:""},xt=[{id:"brief",element:({data:e,payload:t,history:o,onChange:a,onClose:i,setLoading:r})=>{const l=_([e],50),[s,{loading:c}]=y(async()=>{const e=t.getContext();return{averagePrice:await u.controlViewService.getAveragePrice(e.symbol,{strategyName:e.strategyName,exchangeName:e.exchangeName}),symbol:e.symbol}},{onLoadStart:()=>r(!0),onLoadEnd:()=>r(!1)});return n(X,{Navigation:n(K,{hasPrev:!0,hasNext:!!s,labelPrev:v("Close"),onPrev:async()=>{await i()},onNext:async()=>{a({averagePrice:s.averagePrice,symbol:s.symbol}),await l(),o.replace("/form")}}),children:s?c?null:n(S,{payload:()=>({averagePrice:s.averagePrice,symbol:s.symbol}),slots:J,fields:bt}):null})},isActive:e=>!!se("/brief",e)},{id:"form",element:({data:e,history:t,formState:a,onChange:i})=>{const[r,l]=o.useState(e),s=_([e],50);return n(X,{Navigation:n(K,{hasPrev:!0,hasNext:!0,labelPrev:v("Back"),onPrev:async()=>{t.replace("/brief")},onNext:async()=>{r&&(i({note:r.note,symbol:a.data.brief.symbol}),await s(),t.replace("/submit"))}}),children:n(S,{payload:()=>({averagePrice:a.data.brief.averagePrice}),onChange:e=>l(e),slots:J,fields:ht,sx:{pt:1}})})},isActive:e=>!!se("/form",e)},{id:"submit",element:({formState:e,payload:t,beginSave:a,setLoading:i})=>{const[r,l]=o.useState(vt),{note:s,symbol:c}=o.useMemo(()=>{const{note:t,symbol:o}=e.data.form;return{note:t,symbol:o}},[e]);E(async()=>{i(!0);try{const e=t.getContext();await u.controlViewService.commitClosePending(e.symbol,{strategyName:e.strategyName,exchangeName:e.exchangeName},{note:s||""}),l({success:!0,loading:!1,error:""})}catch(e){l({success:!1,loading:!1,error:le(e)})}finally{i(!1)}});return n(X,{Navigation:n(K,{hasNext:r.success||!!r.error,labelNext:v("Close"),onNext:async()=>{await a()}}),children:n(N,{p:1,children:r.error?n(ft,{type:"error",title:v("Position Closing Error"),description:r.error,symbol:c}):r.loading?n(ft,{type:"loading",title:v("Closing Position"),description:v("Please wait. Your operation is being processed..."),symbol:c}):n(ft,{type:"success",title:v("Position Closed"),description:v("Closing has been scheduled successfully. Waiting for the order to be executed on the exchange"),symbol:c})})})},isActive:e=>!!se("/submit",e)}],Ct=[{id:"brief",label:v("Briefing")},{id:"form",label:v("Input")},{id:"submit",label:v("Closing")}],wt="/brief",St=me(),Nt=[{type:f.Center,child:{type:f.Group,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fields:[{type:f.Typography,style:{opacity:.5},fieldBottomMargin:"3",typoVariant:"h6",placeholder:v("Move to Breakeven")},{type:f.Outline,fields:[{type:f.Typography,typoVariant:"body1",placeholder:v("The stop-loss will be moved to the breakeven point of the current position. No additional input is required.")}]},{type:f.Typography,fieldBottomMargin:"3",typoVariant:"caption",sx:{pt:2,opacity:.5,fontSize:12},placeholder:`${A.bullet} ${v("After pressing the Next button, the move to breakeven will be performed IMMEDIATELY")}`}]}}],Pt=[{type:f.Center,child:{type:f.Group,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fields:[{type:f.Typography,style:{opacity:.5},fieldBottomMargin:"3",typoVariant:"h6",placeholder:v("Move to Breakeven")},{type:f.Outline,fields:[{type:f.Text,name:"symbol",compute:({},e)=>e.symbol,title:v("Symbol")},{type:f.Text,name:"price",inputPattern:"[0-9.]*",inputMode:"decimal",inputType:"tel",compute:({},e)=>`${Z(e.averagePrice)}${v("$")}`,title:v("Coin Price"),placeholder:"000000.00",inputFormatterSymbol:"0",inputFormatterAllowed:/[0-9.]/}]},{type:f.Typography,fieldBottomMargin:"3",typoVariant:"caption",sx:{pt:2,opacity:.5,fontSize:12},placeholder:`${A.bullet} ${v("Carefully verify that this is the coin whose stop you want to move to breakeven. Rely on the symbol AND THE PRICE")}`}]}}],kt=({type:e,title:t,description:o,amount:a,price:i,symbol:r})=>{const l=ee(),s="loading"===e?{color:l.palette.warning.main,bgColor:oe(l.palette.warning.main,.1),icon:n(ae,{size:24,color:"warning"}),chipColor:"warning"}:"success"===e?{color:l.palette.success.main,bgColor:oe(l.palette.success.main,.1),icon:n(Be,{}),chipColor:"success"}:"error"===e?{color:l.palette.error.main,bgColor:oe(l.palette.error.main,.1),icon:n(ie,{}),chipColor:"error"}:"warning"===e?{color:l.palette.warning.main,bgColor:oe(l.palette.warning.main,.1),icon:n(re,{}),chipColor:"warning"}:"info"===e?{color:l.palette.info.main,bgColor:oe(l.palette.info.main,.1),icon:n(ne,{}),chipColor:"info"}:{color:l.palette.grey[500],bgColor:oe(l.palette.grey[500],.1),icon:n(ne,{}),chipColor:"default"};return n(ke,{elevation:0,sx:{backgroundColor:s.bgColor,border:`1px solid ${oe(s.color,.3)}`,borderRadius:2,transition:"all 0.3s ease"},children:n(Me,{sx:{p:3},children:[n(N,{sx:{display:"flex",alignItems:"center",gap:2,mb:2},children:[n(N,{sx:{color:s.color,display:"flex",alignItems:"center"},children:s.icon}),n(C,{variant:"h6",sx:{color:s.color,fontWeight:600,flex:1},children:t}),r&&n(k,{label:r,size:"small",color:s.chipColor,variant:"outlined",icon:n(te,{})})]}),o&&n(C,{variant:"body2",color:"text.secondary",sx:{mb:2,lineHeight:1.5},children:o}),(a||i)&&n(N,{sx:{display:"flex",gap:3,mt:2,p:2,backgroundColor:oe(l.palette.background.paper,.6),borderRadius:1,border:`1px solid ${oe(s.color,.1)}`},children:[a&&n(N,{children:[n(C,{variant:"caption",color:"text.secondary",children:v("Amount")}),n(C,{variant:"subtitle1",sx:{fontWeight:600,color:s.color},children:a})]}),i&&n(N,{children:[n(C,{variant:"caption",color:"text.secondary",children:v("Price")}),n(C,{variant:"subtitle1",sx:{fontWeight:600,color:s.color},children:i})]})]})]})})},At={success:!1,loading:!0,error:""},Lt=[{id:"brief",element:({data:e,payload:t,history:o,onChange:a,onClose:i,setLoading:r})=>{const l=_([e],50),[s,{loading:c}]=y(async()=>{const e=t.getContext();return{averagePrice:await u.controlViewService.getAveragePrice(e.symbol,{strategyName:e.strategyName,exchangeName:e.exchangeName}),symbol:e.symbol}},{onLoadStart:()=>r(!0),onLoadEnd:()=>r(!1)});return n(X,{Navigation:n(K,{hasPrev:!0,hasNext:!!s,labelPrev:v("Close"),onPrev:async()=>{await i()},onNext:async()=>{a({averagePrice:s.averagePrice,symbol:s.symbol}),await l(),o.replace("/form")}}),children:s?c?null:n(S,{payload:()=>({averagePrice:s.averagePrice,symbol:s.symbol}),slots:J,fields:Pt}):null})},isActive:e=>!!se("/brief",e)},{id:"form",element:({data:e,history:t,formState:o,onChange:a})=>{const i=_([e],50);return n(X,{Navigation:n(K,{hasPrev:!0,hasNext:!0,labelPrev:v("Back"),onPrev:async()=>{t.replace("/brief")},onNext:async()=>{a({symbol:o.data.brief.symbol}),await i(),t.replace("/submit")}}),children:n(S,{payload:()=>({averagePrice:o.data.brief.averagePrice}),slots:J,fields:Nt,sx:{pt:1}})})},isActive:e=>!!se("/form",e)},{id:"submit",element:({formState:e,payload:t,beginSave:a,setLoading:i})=>{const[r,l]=o.useState(At),{symbol:s}=o.useMemo(()=>{const{symbol:t}=e.data.form;return{symbol:t}},[e]);E(async()=>{i(!0);try{const e=t.getContext();await u.controlViewService.commitBreakeven(e.symbol,{strategyName:e.strategyName,exchangeName:e.exchangeName}),l({success:!0,loading:!1,error:""})}catch(e){l({success:!1,loading:!1,error:le(e)})}finally{i(!1)}});return n(X,{Navigation:n(K,{hasNext:r.success||!!r.error,labelNext:v("Close"),onNext:async()=>{await a()}}),children:n(N,{p:1,children:r.error?n(kt,{type:"error",title:v("Breakeven Error"),description:r.error,symbol:s}):r.loading?n(kt,{type:"loading",title:v("Moving to Breakeven"),description:v("Please wait. Your operation is being processed..."),symbol:s}):n(kt,{type:"success",title:v("Breakeven Set"),description:v("Breakeven has been scheduled successfully. Waiting for the order to be executed on the exchange"),symbol:s})})})},isActive:e=>!!se("/submit",e)}],$t=[{id:"brief",label:v("Briefing")},{id:"form",label:v("Input")},{id:"submit",label:v("Breakeven")}],Mt="/brief",Tt=me(),Bt=e=>"pnl"===e?v("P&L"):e,Rt=[{type:h.Link,action:"back-action",label:n(xe,{sx:{display:"block"}})},{type:h.Link,action:"back-action",label:v("Main")},{type:h.Link,action:"back-action",label:v("Status")},{type:h.Link,action:"back-action",compute:e=>e?`${String(e.symbol).toUpperCase()} (${e.strategyName})`:v("Live")},{type:h.Link,action:"back-action",label:v("Manual Control")},{type:h.Button,action:"update-now",label:v("Refresh"),icon:ve}],Vt=[{action:"download-action",label:v("Download"),icon:()=>n(x,{icon:j,color:"#4caf50"})},{divider:!0},{action:"update-now",label:v("Refresh"),icon:()=>n(x,{icon:ve,color:"#4caf50"})}],Ft=[{id:"control",element:({params:e})=>{const[t]=y(async()=>{const t=await u.statusViewService.getStatusMap();return V.get(t,e.id,null)},{onLoadStart:()=>u.layoutService.setAppbarLoader(!0),onLoadEnd:()=>u.layoutService.setAppbarLoader(!1),deps:[e.id]}),[o,{loading:a,execute:i}]=y(async()=>t?await u.controlViewService.getStrategyStatus(t.symbol,{strategyName:t.strategyName,exchangeName:t.exchangeName}):null,{onLoadStart:()=>u.layoutService.setAppbarLoader(!0),onLoadEnd:()=>u.layoutService.setAppbarLoader(!1),deps:[t]}),r=ye(t),{pickData:l,render:s}=(({payload:e})=>{const{pickData:t,render:o}=ce({history:lt,animation:"none",title:v("Open Position"),AfterTitle:({onClose:e})=>n(L,{direction:"row",gap:1,children:n(de,{size:"small",onClick:e,children:n(Q,{})})}),mapPayload:()=>e,pathname:nt,sizeRequest:pe,routes:it,steps:rt,onSubmit:async t=>(t&&await e.reloadSubject.next(),!0)});return{pickData:()=>{lt.push(nt),t()},render:o}})({payload:{getContext:()=>r.current,reloadSubject:we}}),{pickData:c,render:d}=(({payload:e})=>{const{pickData:t,render:o}=ce({history:gt,animation:"none",title:v("Average Position"),AfterTitle:({onClose:e})=>n(L,{direction:"row",gap:1,children:n(de,{size:"small",onClick:e,children:n(Q,{})})}),mapPayload:()=>e,pathname:ut,sizeRequest:pe,routes:mt,steps:yt,onSubmit:async t=>(t&&await e.reloadSubject.next(),!0)});return{pickData:()=>{gt.push(ut),t()},render:o}})({payload:{getContext:()=>r.current,reloadSubject:we}}),{pickData:m,render:h}=(({payload:e})=>{const{pickData:t,render:o}=ce({history:St,animation:"none",title:v("Close Position"),AfterTitle:({onClose:e})=>n(L,{direction:"row",gap:1,children:n(de,{size:"small",onClick:e,children:n(Q,{})})}),mapPayload:()=>e,pathname:wt,sizeRequest:pe,routes:xt,steps:Ct,onSubmit:async t=>(t&&await e.reloadSubject.next(),!0)});return{pickData:()=>{St.push(wt),t()},render:o}})({payload:{getContext:()=>r.current,reloadSubject:we}}),{pickData:b,render:f}=(({payload:e})=>{const{pickData:t,render:o}=ce({history:Tt,animation:"none",title:v("Move to Breakeven"),AfterTitle:({onClose:e})=>n(L,{direction:"row",gap:1,children:n(de,{size:"small",onClick:e,children:n(Q,{})})}),mapPayload:()=>e,pathname:Mt,sizeRequest:pe,routes:Lt,steps:$t,onSubmit:async t=>(t&&await e.reloadSubject.next(),!0)});return{pickData:()=>{Tt.push(Mt),t()},render:o}})({payload:{getContext:()=>r.current,reloadSubject:we}});E(()=>we.subscribe(i)),E(()=>_e.subscribe(l)),E(()=>Qe.subscribe(c)),E(()=>Je.subscribe(m)),E(()=>Ke.subscribe(b));const x=F(async()=>{if(!o)return;const e=new Blob([JSON.stringify(o,null,2)],{type:"application/json"}),t=URL.createObjectURL(e);u.layoutService.downloadFile(t,`manual_control_${Date.now()}.json`)});return n(fe,{children:[n(g,{items:Rt,actions:Vt,payload:t,onAction:async t=>{"back-action"===t&&u.routerService.push(`/status/${e.id}`),"download-action"===t&&x(),"update-now"===t&&await we.next()}}),o?a?null:n(ue,{component:p,withExpandAll:!0,sx:{p:1,minHeight:"calc(100dvh - 175px)"},payload:t,formatSearch:Bt,AfterSearch:Ze,data:o}):null,n(N,{sx:{paddingBottom:"24px"}}),n(Ce,{}),s(),d(),h(),f()]})},isActive:e=>he(["/status/:id/control"],e)},{id:"status",element:({params:e})=>{const[t]=y(async()=>{const t=await u.statusViewService.getStatusMap();return V.get(t,e.id,null)},{onLoadStart:()=>u.layoutService.setAppbarLoader(!0),onLoadEnd:()=>u.layoutService.setAppbarLoader(!1),deps:[e.id]}),[o,{loading:a,execute:i}]=y(async()=>await u.statusViewService.getStatusOne(e.id),{onLoadStart:()=>u.layoutService.setAppbarLoader(!0),onLoadEnd:()=>u.layoutService.setAppbarLoader(!1),deps:[e.id]}),r=F(async()=>{if(!o)return;const e=new Blob([JSON.stringify(o,null,2)],{type:"application/json"}),t=URL.createObjectURL(e);u.layoutService.downloadFile(t,`status_${Date.now()}.json`)}),l=F(async()=>{if(!o)return;const e=u.markdownHelperService.buildMarkdownFromFields(z,o);await I(e)});E(()=>Ye.subscribe(i));return n(fe,{children:[n(g,{items:qe,actions:Ue,payload:t,onAction:async t=>{"back-action"===t&&(async()=>{1!==(await u.statusViewService.getStatusList()).length?u.routerService.push("/status"):u.routerService.push("/")})(),"control-action"===t&&u.routerService.push(`/status/${e.id}/control`),"update-now"===t&&await Ye.next(),"download-action"===t&&await r(),"print-action"===t&&await l()}}),a?n(w,{children:n(C,{variant:"h6",sx:{opacity:.5},children:v("Loading...")})}):o?n(P,{children:[n(S,{handler:o,fields:H}),n(N,{paddingBottom:"24px"})]}):n(w,{children:n(C,{variant:"h6",sx:{opacity:.5},children:v("No pending signal")})}),n(Ce,{})]})},isActive:e=>he(["/status/:id"],e)},{id:"main",element:()=>{const{classes:e}=De(),{reloadTrigger:t,doReload:o}=m();y(async()=>{const e=await u.statusViewService.getStatusList();if(1===e.length){const[{id:t}]=e;u.routerService.push(`/status/${t}`)}},{onLoadStart:()=>u.layoutService.setAppbarLoader(!0),onLoadEnd:()=>u.layoutService.setAppbarLoader(!1),deps:[t]});const[a,{loading:i}]=y(async()=>await(async()=>{const[e,t]=await Promise.all([u.symbolGlobalService.getSymbolMap(),u.statusViewService.getStatusList()]);if(!t||0===t.length)return[{type:f.Typography,typoVariant:"h6",placeholder:v("Listening for a pending signal..."),sx:{textAlign:"center",opacity:.5,mt:4}}];const o={};t.forEach(t=>{const a=e[t.symbol],i=t.strategyName;o[i]||(o[i]=[]),o[i].push({symbol:t.symbol,label:(null==a?void 0:a.displayName)||t.symbol,color:(null==a?void 0:a.color)||"#ccc",to:t.id})});const a=Object.entries(o).sort(([,e],[,t])=>t.length-e.length),i=[],r=[],n=[];return a.forEach(([e,t],o)=>{const a=Ge(e,t);o%2==0?i.push(a):r.push(a),n.push(a)}),[{type:f.Group,columns:"6",className:"tabletLeftColumn",phoneHidden:!0,desktopHidden:!0,fields:i},{type:f.Group,columns:"6",className:"tabletRightColumn",phoneHidden:!0,desktopHidden:!0,fields:r},{type:f.Group,columns:"12",className:"wideColumn",tabletHidden:!0,fields:n}]})(),{onLoadStart:()=>u.layoutService.setAppbarLoader(!0),onLoadEnd:()=>u.layoutService.setAppbarLoader(!1),deps:[t]});return n(fe,{children:[n(g,{items:He,actions:We,onAction:e=>{"back-action"===e&&u.routerService.push("/"),"update-now"===e&&o()}}),i||!a?n(w,{children:n(C,{variant:"h6",sx:{opacity:.5},children:v("Loading...")})}):a.length?n(P,{children:[n(S,{className:e.root,fields:a},t),n(N,{paddingBottom:"24px"})]}):n(w,{children:n(C,{variant:"h6",sx:{opacity:.5},children:v("No pending signals")})})]})},isActive:e=>he(["/status"],e)}],zt=({id:e})=>n(ge,{history:u.routerService,onLoadStart:()=>u.layoutService.setAppbarLoader(!0),onLoadEnd:()=>u.layoutService.setAppbarLoader(!1),routes:Ft,params:{id:e}});export{zt as StatusPage,zt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bP as t,bQ as e,bR as r,bM as i}from"./index-DQ0Y8Jqw.js";var n=function(t){return t&&t.Math===Math&&t},a=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s={},o=function(t){try{return!!t()}catch(e){return!0}},h=!o(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),u=!o(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),l=u,c=Function.prototype.call,f=l?c.bind(c):function(){return c.apply(c,arguments)},g={},p={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,y=d&&!p.call({1:2},1);g.f=y?function(t){var e=d(this,t);return!!e&&e.enumerable}:p;var v,m,x=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b=u,w=Function.prototype,S=w.call,T=b&&w.bind.bind(S,S),O=b?T:function(t){return function(){return S.apply(t,arguments)}},A=O,C=A({}.toString),P=A("".slice),E=function(t){return P(C(t),8,-1)},N=o,M=E,R=Object,_=O("".split),V=N(function(){return!R("z").propertyIsEnumerable(0)})?function(t){return"String"===M(t)?_(t,""):R(t)}:R,I=function(t){return null==t},k=I,L=TypeError,D=function(t){if(k(t))throw new L("Can't call method on "+t);return t},j=V,B=D,z=function(t){return j(B(t))},U="object"==typeof document&&document.all,F=void 0===U&&void 0!==U?function(t){return"function"==typeof t||t===U}:function(t){return"function"==typeof t},H=F,X=function(t){return"object"==typeof t?null!==t:H(t)},Y=a,W=F,q=function(t,e){return arguments.length<2?(r=Y[t],W(r)?r:void 0):Y[t]&&Y[t][e];var r},$=O({}.isPrototypeOf),Q=a.navigator,G=Q&&Q.userAgent,Z=G?String(G):"",K=a,J=Z,tt=K.process,et=K.Deno,rt=tt&&tt.versions||et&&et.version,it=rt&&rt.v8;it&&(m=(v=it.split("."))[0]>0&&v[0]<4?1:+(v[0]+v[1])),!m&&J&&(!(v=J.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=J.match(/Chrome\/(\d+)/))&&(m=+v[1]);var nt=m,at=nt,st=o,ot=a.String,ht=!!Object.getOwnPropertySymbols&&!st(function(){var t=Symbol("symbol detection");return!ot(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&at&&at<41}),ut=ht&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,lt=q,ct=F,ft=$,gt=Object,pt=ut?function(t){return"symbol"==typeof t}:function(t){var e=lt("Symbol");return ct(e)&&ft(e.prototype,gt(t))},dt=String,yt=function(t){try{return dt(t)}catch(e){return"Object"}},vt=F,mt=yt,xt=TypeError,bt=function(t){if(vt(t))return t;throw new xt(mt(t)+" is not a function")},wt=bt,St=I,Tt=function(t,e){var r=t[e];return St(r)?void 0:wt(r)},Ot=f,At=F,Ct=X,Pt=TypeError,Et={exports:{}},Nt=a,Mt=Object.defineProperty,Rt=function(t,e){try{Mt(Nt,t,{value:e,configurable:!0,writable:!0})}catch(r){Nt[t]=e}return e},_t=a,Vt=Rt,It="__core-js_shared__",kt=Et.exports=_t[It]||Vt(It,{});(kt.versions||(kt.versions=[])).push({version:"3.48.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Lt=Et.exports,Dt=Lt,jt=function(t,e){return Dt[t]||(Dt[t]=e||{})},Bt=D,zt=Object,Ut=function(t){return zt(Bt(t))},Ft=Ut,Ht=O({}.hasOwnProperty),Xt=Object.hasOwn||function(t,e){return Ht(Ft(t),e)},Yt=O,Wt=0,qt=Math.random(),$t=Yt(1.1.toString),Qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+$t(++Wt+qt,36)},Gt=jt,Zt=Xt,Kt=Qt,Jt=ht,te=ut,ee=a.Symbol,re=Gt("wks"),ie=te?ee.for||ee:ee&&ee.withoutSetter||Kt,ne=function(t){return Zt(re,t)||(re[t]=Jt&&Zt(ee,t)?ee[t]:ie("Symbol."+t)),re[t]},ae=f,se=X,oe=pt,he=Tt,ue=function(t,e){var r,i;if("string"===e&&At(r=t.toString)&&!Ct(i=Ot(r,t)))return i;if(At(r=t.valueOf)&&!Ct(i=Ot(r,t)))return i;if("string"!==e&&At(r=t.toString)&&!Ct(i=Ot(r,t)))return i;throw new Pt("Can't convert object to primitive value")},le=TypeError,ce=ne("toPrimitive"),fe=function(t,e){if(!se(t)||oe(t))return t;var r,i=he(t,ce);if(i){if(void 0===e&&(e="default"),r=ae(i,t,e),!se(r)||oe(r))return r;throw new le("Can't convert object to primitive value")}return void 0===e&&(e="number"),ue(t,e)},ge=pt,pe=function(t){var e=fe(t,"string");return ge(e)?e:e+""},de=X,ye=a.document,ve=de(ye)&&de(ye.createElement),me=function(t){return ve?ye.createElement(t):{}},xe=me,be=!h&&!o(function(){return 7!==Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a}),we=h,Se=f,Te=g,Oe=x,Ae=z,Ce=pe,Pe=Xt,Ee=be,Ne=Object.getOwnPropertyDescriptor;s.f=we?Ne:function(t,e){if(t=Ae(t),e=Ce(e),Ee)try{return Ne(t,e)}catch(r){}if(Pe(t,e))return Oe(!Se(Te.f,t,e),t[e])};var Me={},Re=h&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),_e=X,Ve=String,Ie=TypeError,ke=function(t){if(_e(t))return t;throw new Ie(Ve(t)+" is not an object")},Le=h,De=be,je=Re,Be=ke,ze=pe,Ue=TypeError,Fe=Object.defineProperty,He=Object.getOwnPropertyDescriptor,Xe="enumerable",Ye="configurable",We="writable";Me.f=Le?je?function(t,e,r){if(Be(t),e=ze(e),Be(r),"function"==typeof t&&"prototype"===e&&"value"in r&&We in r&&!r[We]){var i=He(t,e);i&&i[We]&&(t[e]=r.value,r={configurable:Ye in r?r[Ye]:i[Ye],enumerable:Xe in r?r[Xe]:i[Xe],writable:!1})}return Fe(t,e,r)}:Fe:function(t,e,r){if(Be(t),e=ze(e),Be(r),De)try{return Fe(t,e,r)}catch(i){}if("get"in r||"set"in r)throw new Ue("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var qe=Me,$e=x,Qe=h?function(t,e,r){return qe.f(t,e,$e(1,r))}:function(t,e,r){return t[e]=r,t},Ge={exports:{}},Ze=h,Ke=Xt,Je=Function.prototype,tr=Ze&&Object.getOwnPropertyDescriptor,er=Ke(Je,"name"),rr={PROPER:er&&"something"===function(){}.name,CONFIGURABLE:er&&(!Ze||Ze&&tr(Je,"name").configurable)},ir=F,nr=Lt,ar=O(Function.toString);ir(nr.inspectSource)||(nr.inspectSource=function(t){return ar(t)});var sr,or,hr,ur=nr.inspectSource,lr=F,cr=a.WeakMap,fr=lr(cr)&&/native code/.test(String(cr)),gr=Qt,pr=jt("keys"),dr=function(t){return pr[t]||(pr[t]=gr(t))},yr={},vr=fr,mr=a,xr=X,br=Qe,wr=Xt,Sr=Lt,Tr=dr,Or=yr,Ar="Object already initialized",Cr=mr.TypeError,Pr=mr.WeakMap;if(vr||Sr.state){var Er=Sr.state||(Sr.state=new Pr);Er.get=Er.get,Er.has=Er.has,Er.set=Er.set,sr=function(t,e){if(Er.has(t))throw new Cr(Ar);return e.facade=t,Er.set(t,e),e},or=function(t){return Er.get(t)||{}},hr=function(t){return Er.has(t)}}else{var Nr=Tr("state");Or[Nr]=!0,sr=function(t,e){if(wr(t,Nr))throw new Cr(Ar);return e.facade=t,br(t,Nr,e),e},or=function(t){return wr(t,Nr)?t[Nr]:{}},hr=function(t){return wr(t,Nr)}}var Mr={set:sr,get:or,has:hr,enforce:function(t){return hr(t)?or(t):sr(t,{})},getterFor:function(t){return function(e){var r;if(!xr(e)||(r=or(e)).type!==t)throw new Cr("Incompatible receiver, "+t+" required");return r}}},Rr=O,_r=o,Vr=F,Ir=Xt,kr=h,Lr=rr.CONFIGURABLE,Dr=ur,jr=Mr.enforce,Br=Mr.get,zr=String,Ur=Object.defineProperty,Fr=Rr("".slice),Hr=Rr("".replace),Xr=Rr([].join),Yr=kr&&!_r(function(){return 8!==Ur(function(){},"length",{value:8}).length}),Wr=String(String).split("String"),qr=Ge.exports=function(t,e,r){"Symbol("===Fr(zr(e),0,7)&&(e="["+Hr(zr(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Ir(t,"name")||Lr&&t.name!==e)&&(kr?Ur(t,"name",{value:e,configurable:!0}):t.name=e),Yr&&r&&Ir(r,"arity")&&t.length!==r.arity&&Ur(t,"length",{value:r.arity});try{r&&Ir(r,"constructor")&&r.constructor?kr&&Ur(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(n){}var i=jr(t);return Ir(i,"source")||(i.source=Xr(Wr,"string"==typeof e?e:"")),t};Function.prototype.toString=qr(function(){return Vr(this)&&Br(this).source||Dr(this)},"toString");var $r,Qr=Ge.exports,Gr=F,Zr=Me,Kr=Qr,Jr=Rt,ti=function(t,e,r,i){i||(i={});var n=i.enumerable,a=void 0!==i.name?i.name:e;if(Gr(r)&&Kr(r,a,i),i.global)n?t[e]=r:Jr(e,r);else{try{i.unsafe?t[e]&&(n=!0):delete t[e]}catch(s){}n?t[e]=r:Zr.f(t,e,{value:r,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t},ei={},ri=Math.ceil,ii=Math.floor,ni=Math.trunc||function(t){var e=+t;return(e>0?ii:ri)(e)},ai=function(t){var e=+t;return e!=e||0===e?0:ni(e)},si=ai,oi=Math.max,hi=Math.min,ui=ai,li=Math.min,ci=function(t){var e=ui(t);return e>0?li(e,9007199254740991):0},fi=ci,gi=function(t){return fi(t.length)},pi=z,di=function(t,e){var r=si(t);return r<0?oi(r+e,0):hi(r,e)},yi=gi,vi={indexOf:($r=!1,function(t,e,r){var i=pi(t),n=yi(i);if(0===n)return!$r&&-1;var a,s=di(r,n);if($r&&e!=e){for(;n>s;)if((a=i[s++])!=a)return!0}else for(;n>s;s++)if(($r||s in i)&&i[s]===e)return $r||s||0;return!$r&&-1})},mi=Xt,xi=z,bi=vi.indexOf,wi=yr,Si=O([].push),Ti=function(t,e){var r,i=xi(t),n=0,a=[];for(r in i)!mi(wi,r)&&mi(i,r)&&Si(a,r);for(;e.length>n;)mi(i,r=e[n++])&&(~bi(a,r)||Si(a,r));return a},Oi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ai=Ti,Ci=Oi.concat("length","prototype");ei.f=Object.getOwnPropertyNames||function(t){return Ai(t,Ci)};var Pi={};Pi.f=Object.getOwnPropertySymbols;var Ei=q,Ni=ei,Mi=Pi,Ri=ke,_i=O([].concat),Vi=Ei("Reflect","ownKeys")||function(t){var e=Ni.f(Ri(t)),r=Mi.f;return r?_i(e,r(t)):e},Ii=Xt,ki=Vi,Li=s,Di=Me,ji=o,Bi=F,zi=/#|\.prototype\./,Ui=function(t,e){var r=Hi[Fi(t)];return r===Yi||r!==Xi&&(Bi(e)?ji(e):!!e)},Fi=Ui.normalize=function(t){return String(t).replace(zi,".").toLowerCase()},Hi=Ui.data={},Xi=Ui.NATIVE="N",Yi=Ui.POLYFILL="P",Wi=Ui,qi=a,$i=s.f,Qi=Qe,Gi=ti,Zi=Rt,Ki=function(t,e,r){for(var i=ki(e),n=Di.f,a=Li.f,s=0;s<i.length;s++){var o=i[s];Ii(t,o)||r&&Ii(r,o)||n(t,o,a(e,o))}},Ji=Wi,tn=function(t,e){var r,i,n,a,s,o=t.target,h=t.global,u=t.stat;if(r=h?qi:u?qi[o]||Zi(o,{}):qi[o]&&qi[o].prototype)for(i in e){if(a=e[i],n=t.dontCallGetSet?(s=$i(r,i))&&s.value:r[i],!Ji(h?i:o+(u?".":"#")+i,t.forced)&&void 0!==n){if(typeof a==typeof n)continue;Ki(a,n)}(t.sham||n&&n.sham)&&Qi(a,"sham",!0),Gi(r,i,a,t)}},en=a,rn=Z,nn=E,an=function(t){return rn.slice(0,t.length)===t},sn=an("Bun/")?"BUN":an("Cloudflare-Workers")?"CLOUDFLARE":an("Deno/")?"DENO":an("Node.js/")?"NODE":en.Bun&&"string"==typeof Bun.version?"BUN":en.Deno&&"object"==typeof Deno.version?"DENO":"process"===nn(en.process)?"NODE":en.window&&en.document?"BROWSER":"REST",on="NODE"===sn,hn=a,un=O,ln=bt,cn=X,fn=function(t){return cn(t)||null===t},gn=String,pn=TypeError,dn=function(t,e,r){try{return un(ln(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(i){}},yn=X,vn=D,mn=function(t){if(fn(t))return t;throw new pn("Can't set "+gn(t)+" as a prototype")},xn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=dn(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(i){}return function(r,i){return vn(r),mn(i),yn(r)?(e?t(r,i):r.__proto__=i,r):r}}():void 0),bn=Me.f,wn=Xt,Sn=ne("toStringTag"),Tn=function(t,e,r){t&&!r&&(t=t.prototype),t&&!wn(t,Sn)&&bn(t,Sn,{configurable:!0,value:e})},On=Qr,An=Me,Cn=q,Pn=function(t,e,r){return r.get&&On(r.get,e,{getter:!0}),r.set&&On(r.set,e,{setter:!0}),An.f(t,e,r)},En=h,Nn=ne("species"),Mn=$,Rn=TypeError,_n={};_n[ne("toStringTag")]="z";var Vn="[object z]"===String(_n),In=F,kn=E,Ln=ne("toStringTag"),Dn=Object,jn="Arguments"===kn(function(){return arguments}()),Bn=Vn?kn:function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(r){}}(e=Dn(t),Ln))?r:jn?kn(e):"Object"===(i=kn(e))&&In(e.callee)?"Arguments":i},zn=O,Un=o,Fn=F,Hn=Bn,Xn=ur,Yn=function(){},Wn=q("Reflect","construct"),qn=/^\s*(?:class|function)\b/,$n=zn(qn.exec),Qn=!qn.test(Yn),Gn=function(t){if(!Fn(t))return!1;try{return Wn(Yn,[],t),!0}catch(e){return!1}},Zn=function(t){if(!Fn(t))return!1;switch(Hn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Qn||!!$n(qn,Xn(t))}catch(e){return!0}};Zn.sham=!0;var Kn,Jn,ta,ea,ra=!Wn||Un(function(){var t;return Gn(Gn.call)||!Gn(Object)||!Gn(function(){t=!0})||t})?Zn:Gn,ia=ra,na=yt,aa=TypeError,sa=ke,oa=function(t){if(ia(t))return t;throw new aa(na(t)+" is not a constructor")},ha=I,ua=ne("species"),la=function(t,e){var r,i=sa(t).constructor;return void 0===i||ha(r=sa(i)[ua])?e:oa(r)},ca=u,fa=Function.prototype,ga=fa.apply,pa=fa.call,da="object"==typeof Reflect&&Reflect.apply||(ca?pa.bind(ga):function(){return pa.apply(ga,arguments)}),ya=E,va=O,ma=function(t){if("Function"===ya(t))return va(t)},xa=bt,ba=u,wa=ma(ma.bind),Sa=function(t,e){return xa(t),void 0===e?t:ba?wa(t,e):function(){return t.apply(e,arguments)}},Ta=q("document","documentElement"),Oa=O([].slice),Aa=TypeError,Ca=/(?:ipad|iphone|ipod).*applewebkit/i.test(Z),Pa=a,Ea=da,Na=Sa,Ma=F,Ra=Xt,_a=o,Va=Ta,Ia=Oa,ka=me,La=function(t,e){if(t<e)throw new Aa("Not enough arguments");return t},Da=Ca,ja=on,Ba=Pa.setImmediate,za=Pa.clearImmediate,Ua=Pa.process,Fa=Pa.Dispatch,Ha=Pa.Function,Xa=Pa.MessageChannel,Ya=Pa.String,Wa=0,qa={},$a="onreadystatechange";_a(function(){Kn=Pa.location});var Qa=function(t){if(Ra(qa,t)){var e=qa[t];delete qa[t],e()}},Ga=function(t){return function(){Qa(t)}},Za=function(t){Qa(t.data)},Ka=function(t){Pa.postMessage(Ya(t),Kn.protocol+"//"+Kn.host)};Ba&&za||(Ba=function(t){La(arguments.length,1);var e=Ma(t)?t:Ha(t),r=Ia(arguments,1);return qa[++Wa]=function(){Ea(e,void 0,r)},Jn(Wa),Wa},za=function(t){delete qa[t]},ja?Jn=function(t){Ua.nextTick(Ga(t))}:Fa&&Fa.now?Jn=function(t){Fa.now(Ga(t))}:Xa&&!Da?(ea=(ta=new Xa).port2,ta.port1.onmessage=Za,Jn=Na(ea.postMessage,ea)):Pa.addEventListener&&Ma(Pa.postMessage)&&!Pa.importScripts&&Kn&&"file:"!==Kn.protocol&&!_a(Ka)?(Jn=Ka,Pa.addEventListener("message",Za,!1)):Jn=$a in ka("script")?function(t){Va.appendChild(ka("script"))[$a]=function(){Va.removeChild(this),Qa(t)}}:function(t){setTimeout(Ga(t),0)});var Ja={set:Ba},ts=a,es=h,rs=Object.getOwnPropertyDescriptor,is=function(){this.head=null,this.tail=null};is.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var ns,as,ss,os,hs,us=is,ls=/ipad|iphone|ipod/i.test(Z)&&"undefined"!=typeof Pebble,cs=/web0s(?!.*chrome)/i.test(Z),fs=a,gs=function(t){if(!es)return ts[t];var e=rs(ts,t);return e&&e.value},ps=Sa,ds=Ja.set,ys=us,vs=Ca,ms=ls,xs=cs,bs=on,ws=fs.MutationObserver||fs.WebKitMutationObserver,Ss=fs.document,Ts=fs.process,Os=fs.Promise,As=gs("queueMicrotask");if(!As){var Cs=new ys,Ps=function(){var t,e;for(bs&&(t=Ts.domain)&&t.exit();e=Cs.get();)try{e()}catch(r){throw Cs.head&&ns(),r}t&&t.enter()};vs||bs||xs||!ws||!Ss?!ms&&Os&&Os.resolve?((os=Os.resolve(void 0)).constructor=Os,hs=ps(os.then,os),ns=function(){hs(Ps)}):bs?ns=function(){Ts.nextTick(Ps)}:(ds=ps(ds,fs),ns=function(){ds(Ps)}):(as=!0,ss=Ss.createTextNode(""),new ws(Ps).observe(ss,{characterData:!0}),ns=function(){ss.data=as=!as}),As=function(t){Cs.head||ns(),Cs.add(t)}}var Es=As,Ns=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},Ms=a.Promise,Rs=a,_s=Ms,Vs=F,Is=Wi,ks=ur,Ls=ne,Ds=sn,js=nt;_s&&_s.prototype;var Bs=Ls("species"),zs=!1,Us=Vs(Rs.PromiseRejectionEvent),Fs={CONSTRUCTOR:Is("Promise",function(){var t=ks(_s),e=t!==String(_s);if(!e&&66===js)return!0;if(!js||js<51||!/native code/.test(t)){var r=new _s(function(t){t(1)}),i=function(t){t(function(){},function(){})};if((r.constructor={})[Bs]=i,!(zs=r.then(function(){})instanceof i))return!0}return!(e||"BROWSER"!==Ds&&"DENO"!==Ds||Us)}),REJECTION_EVENT:Us,SUBCLASSING:zs},Hs={},Xs=bt,Ys=TypeError,Ws=function(t){var e,r;this.promise=new t(function(t,i){if(void 0!==e||void 0!==r)throw new Ys("Bad Promise constructor");e=t,r=i}),this.resolve=Xs(e),this.reject=Xs(r)};Hs.f=function(t){return new Ws(t)};var qs,$s,Qs,Gs,Zs=tn,Ks=on,Js=a,to=hn,eo=f,ro=ti,io=xn,no=Tn,ao=function(t){var e=Cn(t);En&&e&&!e[Nn]&&Pn(e,Nn,{configurable:!0,get:function(){return this}})},so=bt,oo=F,ho=X,uo=function(t,e){if(Mn(e,t))return t;throw new Rn("Incorrect invocation")},lo=la,co=Ja.set,fo=Es,go=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(r){}},po=Ns,yo=us,vo=Mr,mo=Ms,xo=Hs,bo="Promise",wo=Fs.CONSTRUCTOR,So=Fs.REJECTION_EVENT,To=Fs.SUBCLASSING,Oo=vo.getterFor(bo),Ao=vo.set,Co=mo&&mo.prototype,Po=mo,Eo=Co,No=Js.TypeError,Mo=Js.document,Ro=Js.process,_o=xo.f,Vo=_o,Io=!!(Mo&&Mo.createEvent&&Js.dispatchEvent),ko="unhandledrejection",Lo=function(t){var e;return!(!ho(t)||!oo(e=t.then))&&e},Do=function(t,e){var r,i,n,a=e.value,s=1===e.state,o=s?t.ok:t.fail,h=t.resolve,u=t.reject,l=t.domain;try{o?(s||(2===e.rejection&&Fo(e),e.rejection=1),!0===o?r=a:(l&&l.enter(),r=o(a),l&&(l.exit(),n=!0)),r===t.promise?u(new No("Promise-chain cycle")):(i=Lo(r))?eo(i,r,h,u):h(r)):u(a)}catch(c){l&&!n&&l.exit(),u(c)}},jo=function(t,e){t.notified||(t.notified=!0,fo(function(){for(var r,i=t.reactions;r=i.get();)Do(r,t);t.notified=!1,e&&!t.rejection&&zo(t)}))},Bo=function(t,e,r){var i,n;Io?((i=Mo.createEvent("Event")).promise=e,i.reason=r,i.initEvent(t,!1,!0),Js.dispatchEvent(i)):i={promise:e,reason:r},!So&&(n=Js["on"+t])?n(i):t===ko&&go("Unhandled promise rejection",r)},zo=function(t){eo(co,Js,function(){var e,r=t.facade,i=t.value;if(Uo(t)&&(e=po(function(){Ks?Ro.emit("unhandledRejection",i,r):Bo(ko,r,i)}),t.rejection=Ks||Uo(t)?2:1,e.error))throw e.value})},Uo=function(t){return 1!==t.rejection&&!t.parent},Fo=function(t){eo(co,Js,function(){var e=t.facade;Ks?Ro.emit("rejectionHandled",e):Bo("rejectionhandled",e,t.value)})},Ho=function(t,e,r){return function(i){t(e,i,r)}},Xo=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,jo(t,!0))},Yo=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new No("Promise can't be resolved itself");var i=Lo(e);i?fo(function(){var r={done:!1};try{eo(i,e,Ho(Yo,r,t),Ho(Xo,r,t))}catch(n){Xo(r,n,t)}}):(t.value=e,t.state=1,jo(t,!1))}catch(n){Xo({done:!1},n,t)}}};if(wo&&(Eo=(Po=function(t){uo(this,Eo),so(t),eo(qs,this);var e=Oo(this);try{t(Ho(Yo,e),Ho(Xo,e))}catch(r){Xo(e,r)}}).prototype,(qs=function(t){Ao(this,{type:bo,done:!1,notified:!1,parent:!1,reactions:new yo,rejection:!1,state:0,value:null})}).prototype=ro(Eo,"then",function(t,e){var r=Oo(this),i=_o(lo(this,Po));return r.parent=!0,i.ok=!oo(t)||t,i.fail=oo(e)&&e,i.domain=Ks?Ro.domain:void 0,0===r.state?r.reactions.add(i):fo(function(){Do(i,r)}),i.promise}),$s=function(){var t=new qs,e=Oo(t);this.promise=t,this.resolve=Ho(Yo,e),this.reject=Ho(Xo,e)},xo.f=_o=function(t){return t===Po||t===Qs?new $s(t):Vo(t)},oo(mo)&&Co!==Object.prototype)){Gs=Co.then,To||ro(Co,"then",function(t,e){var r=this;return new Po(function(t,e){eo(Gs,r,t,e)}).then(t,e)},{unsafe:!0});try{delete Co.constructor}catch(Jv){}io&&io(Co,Eo)}Zs({global:!0,constructor:!0,wrap:!0,forced:wo},{Promise:Po}),Qs=to.Promise,no(Po,bo,!1),ao(bo);var Wo={},qo=Wo,$o=ne("iterator"),Qo=Array.prototype,Go=Bn,Zo=Tt,Ko=I,Jo=Wo,th=ne("iterator"),eh=function(t){if(!Ko(t))return Zo(t,th)||Zo(t,"@@iterator")||Jo[Go(t)]},rh=f,ih=bt,nh=ke,ah=yt,sh=eh,oh=TypeError,hh=f,uh=ke,lh=Tt,ch=Sa,fh=f,gh=ke,ph=yt,dh=function(t){return void 0!==t&&(qo.Array===t||Qo[$o]===t)},yh=gi,vh=$,mh=function(t,e){var r=arguments.length<2?sh(t):e;if(ih(r))return nh(rh(r,t));throw new oh(ah(t)+" is not iterable")},xh=eh,bh=function(t,e,r){var i,n;uh(t);try{if(!(i=lh(t,"return"))){if("throw"===e)throw r;return r}i=hh(i,t)}catch(Jv){n=!0,i=Jv}if("throw"===e)throw r;if(n)throw i;return uh(i),r},wh=TypeError,Sh=function(t,e){this.stopped=t,this.result=e},Th=Sh.prototype,Oh=function(t,e,r){var i,n,a,s,o,h,u,l=r&&r.that,c=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),g=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),d=ch(e,l),y=function(t){return i&&bh(i,"normal"),new Sh(!0,t)},v=function(t){return c?(gh(t),p?d(t[0],t[1],y):d(t[0],t[1])):p?d(t,y):d(t)};if(f)i=t.iterator;else if(g)i=t;else{if(!(n=xh(t)))throw new wh(ph(t)+" is not iterable");if(dh(n)){for(a=0,s=yh(t);s>a;a++)if((o=v(t[a]))&&vh(Th,o))return o;return new Sh(!1)}i=mh(t,n)}for(h=f?t.next:i.next;!(u=fh(h,i)).done;){try{o=v(u.value)}catch(Jv){bh(i,"throw",Jv)}if("object"==typeof o&&o&&vh(Th,o))return o}return new Sh(!1)},Ah=ne("iterator"),Ch=!1;try{var Ph=0,Eh={next:function(){return{done:!!Ph++}},return:function(){Ch=!0}};Eh[Ah]=function(){return this},Array.from(Eh,function(){throw 2})}catch(Jv){}var Nh=Ms,Mh=Fs.CONSTRUCTOR||!function(t,e){try{if(!e&&!Ch)return!1}catch(Jv){return!1}var r=!1;try{var i={};i[Ah]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(Jv){}return r}(function(t){Nh.all(t).then(void 0,function(){})}),Rh=f,_h=bt,Vh=Hs,Ih=Ns,kh=Oh;tn({target:"Promise",stat:!0,forced:Mh},{all:function(t){var e=this,r=Vh.f(e),i=r.resolve,n=r.reject,a=Ih(function(){var r=_h(e.resolve),a=[],s=0,o=1;kh(t,function(t){var h=s++,u=!1;o++,Rh(r,e,t).then(function(t){u||(u=!0,a[h]=t,--o||i(a))},n)}),--o||i(a)});return a.error&&n(a.value),r.promise}});var Lh=tn,Dh=Fs.CONSTRUCTOR,jh=Ms,Bh=q,zh=F,Uh=ti,Fh=jh&&jh.prototype;if(Lh({target:"Promise",proto:!0,forced:Dh,real:!0},{catch:function(t){return this.then(void 0,t)}}),zh(jh)){var Hh=Bh("Promise").prototype.catch;Fh.catch!==Hh&&Uh(Fh,"catch",Hh,{unsafe:!0})}var Xh=f,Yh=bt,Wh=Hs,qh=Ns,$h=Oh;tn({target:"Promise",stat:!0,forced:Mh},{race:function(t){var e=this,r=Wh.f(e),i=r.reject,n=qh(function(){var n=Yh(e.resolve);$h(t,function(t){Xh(n,e,t).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var Qh=Hs;tn({target:"Promise",stat:!0,forced:Fs.CONSTRUCTOR},{reject:function(t){var e=Qh.f(this);return(0,e.reject)(t),e.promise}});var Gh=ke,Zh=X,Kh=Hs,Jh=tn,tu=Fs.CONSTRUCTOR,eu=function(t,e){if(Gh(t),Zh(e)&&e.constructor===t)return e;var r=Kh.f(t);return(0,r.resolve)(e),r.promise};function ru(t,e,r,i,n,a,s){try{var o=t[a](s),h=o.value}catch(u){return void r(u)}o.done?e(h):Promise.resolve(h).then(i,n)}function iu(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var a=t.apply(e,r);function s(t){ru(a,i,n,s,o,"next",t)}function o(t){ru(a,i,n,s,o,"throw",t)}s(void 0)})}}q("Promise"),Jh({target:"Promise",stat:!0,forced:tu},{resolve:function(t){return eu(this,t)}});var nu=Bn,au=String,su=function(t){if("Symbol"===nu(t))throw new TypeError("Cannot convert a Symbol value to a string");return au(t)},ou=ke,hu=function(){var t=ou(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},uu=o,lu=a.RegExp,cu=uu(function(){var t=lu("a","y");return t.lastIndex=2,null!==t.exec("abcd")});cu||uu(function(){return!lu("a","y").sticky});var fu={BROKEN_CARET:cu||uu(function(){var t=lu("^r","gy");return t.lastIndex=2,null!==t.exec("str")}),UNSUPPORTED_Y:cu},gu={},pu=Ti,du=Oi,yu=Object.keys||function(t){return pu(t,du)},vu=h,mu=Re,xu=Me,bu=ke,wu=z,Su=yu;gu.f=vu&&!mu?Object.defineProperties:function(t,e){bu(t);for(var r,i=wu(e),n=Su(e),a=n.length,s=0;a>s;)xu.f(t,r=n[s++],i[r]);return t};var Tu,Ou=ke,Au=gu,Cu=Oi,Pu=yr,Eu=Ta,Nu=me,Mu="prototype",Ru="script",_u=dr("IE_PROTO"),Vu=function(){},Iu=function(t){return"<"+Ru+">"+t+"</"+Ru+">"},ku=function(t){t.write(Iu("")),t.close();var e=t.parentWindow.Object;return t=null,e},Lu=function(){try{Tu=new ActiveXObject("htmlfile")}catch(Jv){}var t,e,r;Lu="undefined"!=typeof document?document.domain&&Tu?ku(Tu):(e=Nu("iframe"),r="java"+Ru+":",e.style.display="none",Eu.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Iu("document.F=Object")),t.close(),t.F):ku(Tu);for(var i=Cu.length;i--;)delete Lu[Mu][Cu[i]];return Lu()};Pu[_u]=!0;var Du,ju,Bu=Object.create||function(t,e){var r;return null!==t?(Vu[Mu]=Ou(t),r=new Vu,Vu[Mu]=null,r[_u]=t):r=Lu(),void 0===e?r:Au.f(r,e)},zu=o,Uu=a.RegExp,Fu=zu(function(){var t=Uu(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}),Hu=o,Xu=a.RegExp,Yu=Hu(function(){var t=Xu("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}),Wu=f,qu=O,$u=su,Qu=hu,Gu=fu,Zu=Bu,Ku=Mr.get,Ju=Fu,tl=Yu,el=jt("native-string-replace",String.prototype.replace),rl=RegExp.prototype.exec,il=rl,nl=qu("".charAt),al=qu("".indexOf),sl=qu("".replace),ol=qu("".slice),hl=(ju=/b*/g,Wu(rl,Du=/a/,"a"),Wu(rl,ju,"a"),0!==Du.lastIndex||0!==ju.lastIndex),ul=Gu.BROKEN_CARET,ll=void 0!==/()??/.exec("")[1];(hl||ll||ul||Ju||tl)&&(il=function(t){var e,r,i,n,a,s,o,h=this,u=Ku(h),l=$u(t),c=u.raw;if(c)return c.lastIndex=h.lastIndex,e=Wu(il,c,l),h.lastIndex=c.lastIndex,e;var f=u.groups,g=ul&&h.sticky,p=Wu(Qu,h),d=h.source,y=0,v=l;if(g&&(p=sl(p,"y",""),-1===al(p,"g")&&(p+="g"),v=ol(l,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==nl(l,h.lastIndex-1))&&(d="(?: "+d+")",v=" "+v,y++),r=new RegExp("^(?:"+d+")",p)),ll&&(r=new RegExp("^"+d+"$(?!\\s)",p)),hl&&(i=h.lastIndex),n=Wu(rl,g?r:h,v),g?n?(n.input=ol(n.input,y),n[0]=ol(n[0],y),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:hl&&n&&(h.lastIndex=h.global?n.index+n[0].length:i),ll&&n&&n.length>1&&Wu(el,n[0],r,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(n[a]=void 0)}),n&&f)for(n.groups=s=Zu(null),a=0;a<f.length;a++)s[(o=f[a])[0]]=n[o[1]];return n});var cl=il;tn({target:"RegExp",proto:!0,forced:/./.exec!==cl},{exec:cl});var fl,gl=f,pl=ti,dl=cl,yl=o,vl=ne,ml=Qe,xl=vl("species"),bl=RegExp.prototype,wl=function(t,e,r,i){var n=vl(t),a=!yl(function(){var e={};return e[n]=function(){return 7},7!==""[t](e)}),s=a&&!yl(function(){var e=!1,r=/a/;if("split"===t){var i={};i[xl]=function(){return r},(r={constructor:i,flags:""})[n]=/./[n]}return r.exec=function(){return e=!0,null},r[n](""),!e});if(!a||!s||r){var o=/./[n],h=e(n,""[t],function(t,e,r,i,n){var s=e.exec;return s===dl||s===bl.exec?a&&!n?{done:!0,value:gl(o,e,r,i)}:{done:!0,value:gl(t,r,e,i)}:{done:!1}});pl(String.prototype,t,h[0]),pl(bl,n,h[1])}i&&ml(bl[n],"sham",!0)},Sl=O,Tl=ai,Ol=su,Al=D,Cl=Sl("".charAt),Pl=Sl("".charCodeAt),El=Sl("".slice),Nl={charAt:(fl=!0,function(t,e){var r,i,n=Ol(Al(t)),a=Tl(e),s=n.length;return a<0||a>=s?fl?"":void 0:(r=Pl(n,a))<55296||r>56319||a+1===s||(i=Pl(n,a+1))<56320||i>57343?fl?Cl(n,a):r:fl?El(n,a,a+2):i-56320+(r-55296<<10)+65536})}.charAt,Ml=function(t,e,r){return e+(r?Nl(t,e).length:1)},Rl=o,_l=a.RegExp,Vl=!Rl(function(){var t=!0;try{_l(".","d")}catch(Jv){t=!1}var e={},r="",i=t?"dgimsy":"gimsy",n=function(t,i){Object.defineProperty(e,t,{get:function(){return r+=i,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(a.hasIndices="d"),a)n(s,a[s]);return Object.getOwnPropertyDescriptor(_l.prototype,"flags").get.call(e)!==i||r!==i}),Il=f,kl=Xt,Ll=$,Dl={correct:Vl},jl=hu,Bl=RegExp.prototype,zl=Dl.correct?function(t){return t.flags}:function(t){return Dl.correct||!Ll(Bl,t)||kl(t,"flags")?t.flags:Il(jl,t)},Ul=f,Fl=ke,Hl=F,Xl=E,Yl=cl,Wl=TypeError,ql=function(t,e){var r=t.exec;if(Hl(r)){var i=Ul(r,t,e);return null!==i&&Fl(i),i}if("RegExp"===Xl(t))return Ul(Yl,t,e);throw new Wl("RegExp#exec called on incompatible receiver")},$l=f,Ql=wl,Gl=ke,Zl=X,Kl=ci,Jl=su,tc=D,ec=Tt,rc=Ml,ic=zl,nc=ql,ac=O("".indexOf);Ql("match",function(t,e,r){return[function(e){var r=tc(this),i=Zl(e)?ec(e,t):void 0;return i?$l(i,e,r):new RegExp(e)[t](Jl(r))},function(t){var i=Gl(this),n=Jl(t),a=r(e,i,n);if(a.done)return a.value;var s=Jl(ic(i));if(-1===ac(s,"g"))return nc(i,n);var o=-1!==ac(s,"u");i.lastIndex=0;for(var h,u=[],l=0;null!==(h=nc(i,n));){var c=Jl(h[0]);u[l]=c,""===c&&(i.lastIndex=rc(n,Kl(i.lastIndex),o)),l++}return 0===l?null:u}]});var sc=O,oc=Ut,hc=Math.floor,uc=sc("".charAt),lc=sc("".replace),cc=sc("".slice),fc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,gc=/\$([$&'`]|\d{1,2})/g,pc=da,dc=f,yc=O,vc=wl,mc=o,xc=ke,bc=F,wc=X,Sc=ai,Tc=ci,Oc=su,Ac=D,Cc=Ml,Pc=Tt,Ec=function(t,e,r,i,n,a){var s=r+t.length,o=i.length,h=gc;return void 0!==n&&(n=oc(n),h=fc),lc(a,h,function(a,h){var u;switch(uc(h,0)){case"$":return"$";case"&":return t;case"`":return cc(e,0,r);case"'":return cc(e,s);case"<":u=n[cc(h,1,-1)];break;default:var l=+h;if(0===l)return a;if(l>o){var c=hc(l/10);return 0===c?a:c<=o?void 0===i[c-1]?uc(h,1):i[c-1]+uc(h,1):a}u=i[l-1]}return void 0===u?"":u})},Nc=zl,Mc=ql,Rc=ne("replace"),_c=Math.max,Vc=Math.min,Ic=yc([].concat),kc=yc([].push),Lc=yc("".indexOf),Dc=yc("".slice),jc=function(t){return void 0===t?t:String(t)},Bc="$0"==="a".replace(/./,"$0"),zc=!!/./[Rc]&&""===/./[Rc]("a","$0");vc("replace",function(t,e,r){var i=zc?"$":"$0";return[function(t,r){var i=Ac(this),n=wc(t)?Pc(t,Rc):void 0;return n?dc(n,t,i,r):dc(e,Oc(i),t,r)},function(t,n){var a=xc(this),s=Oc(t);if("string"==typeof n&&-1===Lc(n,i)&&-1===Lc(n,"$<")){var o=r(e,a,s,n);if(o.done)return o.value}var h=bc(n);h||(n=Oc(n));var u,l=Oc(Nc(a)),c=-1!==Lc(l,"g");c&&(u=-1!==Lc(l,"u"),a.lastIndex=0);for(var f,g=[];null!==(f=Mc(a,s))&&(kc(g,f),c);){""===Oc(f[0])&&(a.lastIndex=Cc(s,Tc(a.lastIndex),u))}for(var p="",d=0,y=0;y<g.length;y++){for(var v,m=Oc((f=g[y])[0]),x=_c(Vc(Sc(f.index),s.length),0),b=[],w=1;w<f.length;w++)kc(b,jc(f[w]));var S=f.groups;if(h){var T=Ic([m],b,x,s);void 0!==S&&kc(T,S),v=Oc(pc(n,void 0,T))}else v=Ec(m,s,x,b,S,n);x>=d&&(p+=Dc(s,d,x)+v,d=x+m.length)}return p+Dc(s,d)}]},!!mc(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!Bc||zc);var Uc,Fc=X,Hc=E,Xc=ne("match"),Yc=function(t){var e;return Fc(t)&&(void 0!==(e=t[Xc])?!!e:"RegExp"===Hc(t))},Wc=TypeError,qc=function(t){if(Yc(t))throw new Wc("The method doesn't accept regular expressions");return t},$c=ne("match"),Qc=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[$c]=!1,"/./"[t](e)}catch(i){}}return!1},Gc=tn,Zc=ma,Kc=s.f,Jc=ci,tf=su,ef=qc,rf=D,nf=Qc,af=Zc("".slice),sf=Math.min,of=nf("startsWith");Gc({target:"String",proto:!0,forced:!!(of||(Uc=Kc(String.prototype,"startsWith"),!Uc||Uc.writable))&&!of},{startsWith:function(t){var e=tf(rf(this));ef(t);var r=Jc(sf(arguments.length>1?arguments[1]:void 0,e.length)),i=tf(t);return af(e,r,r+i.length)===i}});var hf=ne,uf=Bu,lf=Me.f,cf=hf("unscopables"),ff=Array.prototype;void 0===ff[cf]&&lf(ff,cf,{configurable:!0,value:uf(null)});var gf,pf,df,yf=!o(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),vf=Xt,mf=F,xf=Ut,bf=yf,wf=dr("IE_PROTO"),Sf=Object,Tf=Sf.prototype,Of=bf?Sf.getPrototypeOf:function(t){var e=xf(t);if(vf(e,wf))return e[wf];var r=e.constructor;return mf(r)&&e instanceof r?r.prototype:e instanceof Sf?Tf:null},Af=o,Cf=F,Pf=X,Ef=Of,Nf=ti,Mf=ne("iterator"),Rf=!1;[].keys&&("next"in(df=[].keys())?(pf=Ef(Ef(df)))!==Object.prototype&&(gf=pf):Rf=!0),(!Pf(gf)||Af(function(){var t={};return gf[Mf].call(t)!==t}))&&(gf={}),Cf(gf[Mf])||Nf(gf,Mf,function(){return this});var _f={IteratorPrototype:gf,BUGGY_SAFARI_ITERATORS:Rf},Vf=_f.IteratorPrototype,If=Bu,kf=x,Lf=Tn,Df=Wo,jf=function(){return this},Bf=tn,zf=f,Uf=F,Ff=function(t,e,r,i){var n=e+" Iterator";return t.prototype=If(Vf,{next:kf(+!i,r)}),Lf(t,n,!1),Df[n]=jf,t},Hf=Of,Xf=xn,Yf=Tn,Wf=Qe,qf=ti,$f=Wo,Qf=rr.PROPER,Gf=rr.CONFIGURABLE,Zf=_f.IteratorPrototype,Kf=_f.BUGGY_SAFARI_ITERATORS,Jf=ne("iterator"),tg="keys",eg="values",rg="entries",ig=function(){return this},ng=z,ag=function(t){ff[cf][t]=!0},sg=Wo,og=Mr,hg=Me.f,ug=function(t,e,r,i,n,a,s){Ff(r,e,i);var o,h,u,l=function(t){if(t===n&&d)return d;if(!Kf&&t&&t in g)return g[t];switch(t){case tg:case eg:case rg:return function(){return new r(this,t)}}return function(){return new r(this)}},c=e+" Iterator",f=!1,g=t.prototype,p=g[Jf]||g["@@iterator"]||n&&g[n],d=!Kf&&p||l(n),y="Array"===e&&g.entries||p;if(y&&(o=Hf(y.call(new t)))!==Object.prototype&&o.next&&(Hf(o)!==Zf&&(Xf?Xf(o,Zf):Uf(o[Jf])||qf(o,Jf,ig)),Yf(o,c,!0)),Qf&&n===eg&&p&&p.name!==eg&&(Gf?Wf(g,"name",eg):(f=!0,d=function(){return zf(p,this)})),n)if(h={values:l(eg),keys:a?d:l(tg),entries:l(rg)},s)for(u in h)(Kf||f||!(u in g))&&qf(g,u,h[u]);else Bf({target:e,proto:!0,forced:Kf||f},h);return g[Jf]!==d&&qf(g,Jf,d,{name:n}),$f[e]=d,h},lg=function(t,e){return{value:t,done:e}},cg=h,fg="Array Iterator",gg=og.set,pg=og.getterFor(fg),dg=ug(Array,"Array",function(t,e){gg(this,{type:fg,target:ng(t),index:0,kind:e})},function(){var t=pg(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,lg(void 0,!0);switch(t.kind){case"keys":return lg(r,!1);case"values":return lg(e[r],!1)}return lg([r,e[r]],!1)},"values"),yg=sg.Arguments=sg.Array;if(ag("keys"),ag("values"),ag("entries"),cg&&"values"!==yg.name)try{hg(yg,"name",{value:"values"})}catch(Jv){}var vg=me("span").classList,mg=vg&&vg.constructor&&vg.constructor.prototype,xg=mg===Object.prototype?void 0:mg,bg=a,wg={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Sg=xg,Tg=dg,Og=Qe,Ag=Tn,Cg=ne("iterator"),Pg=Tg.values,Eg=function(t,e){if(t){if(t[Cg]!==Pg)try{Og(t,Cg,Pg)}catch(Jv){t[Cg]=Pg}if(Ag(t,e,!0),wg[e])for(var r in Tg)if(t[r]!==Tg[r])try{Og(t,r,Tg[r])}catch(Jv){t[r]=Tg[r]}}};for(var Ng in wg)Eg(bg[Ng]&&bg[Ng].prototype,Ng);function Mg(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,r);if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function Rg(t,e,r){return(e=Mg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Eg(Sg,"DOMTokenList");var _g,Vg=bt,Ig=Ut,kg=V,Lg=gi,Dg=TypeError,jg="Reduce of empty array with no initial value",Bg={left:(_g=!1,function(t,e,r,i){var n=Ig(t),a=kg(n),s=Lg(n);if(Vg(e),0===s&&r<2)throw new Dg(jg);var o=_g?s-1:0,h=_g?-1:1;if(r<2)for(;;){if(o in a){i=a[o],o+=h;break}if(o+=h,_g?o<0:s<=o)throw new Dg(jg)}for(;_g?o>=0:s>o;o+=h)o in a&&(i=e(i,a[o],o,n));return i})},zg=o,Ug=function(t,e){var r=[][t];return!!r&&zg(function(){r.call(null,e||function(){return 1},1)})},Fg=Bg.left;tn({target:"Array",proto:!0,forced:!on&&nt>79&&nt<83||!Ug("reduce")},{reduce:function(t){var e=arguments.length;return Fg(this,t,e,e>1?arguments[1]:void 0)}});var Hg=tn,Xg=ma,Yg=s.f,Wg=ci,qg=su,$g=qc,Qg=D,Gg=Qc,Zg=Xg("".slice),Kg=Math.min,Jg=Gg("endsWith"),tp=!Jg&&!!function(){var t=Yg(String.prototype,"endsWith");return t&&!t.writable}();Hg({target:"String",proto:!0,forced:!tp&&!Jg},{endsWith:function(t){var e=qg(Qg(this));$g(t);var r=arguments.length>1?arguments[1]:void 0,i=e.length,n=void 0===r?i:Kg(Wg(r),i),a=qg(t);return Zg(e,n-a.length,n)===a}});var ep=f,rp=O,ip=wl,np=ke,ap=X,sp=D,op=la,hp=Ml,up=ci,lp=su,cp=Tt,fp=ql,gp=o,pp=fu.UNSUPPORTED_Y,dp=Math.min,yp=rp([].push),vp=rp("".slice),mp=!gp(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}),xp="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;ip("split",function(t,e,r){var i="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:ep(e,this,t,r)}:e;return[function(e,r){var n=sp(this),a=ap(e)?cp(e,t):void 0;return a?ep(a,e,n,r):ep(i,lp(n),e,r)},function(t,n){var a=np(this),s=lp(t);if(!xp){var o=r(i,a,s,n,i!==e);if(o.done)return o.value}var h=op(a,RegExp),u=a.unicode,l=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(pp?"g":"y"),c=new h(pp?"^(?:"+a.source+")":a,l),f=void 0===n?4294967295:n>>>0;if(0===f)return[];if(0===s.length)return null===fp(c,s)?[s]:[];for(var g=0,p=0,d=[];p<s.length;){c.lastIndex=pp?0:p;var y,v=fp(c,pp?vp(s,p):s);if(null===v||(y=dp(up(c.lastIndex+(pp?p:0)),s.length))===g)p=hp(s,p,u);else{if(yp(d,vp(s,g,p)),d.length===f)return d;for(var m=1;m<=v.length-1;m++)if(yp(d,v[m]),d.length===f)return d;p=g=y}}return yp(d,vp(s,g)),d}]},xp||!mp,pp);var bp={exports:{}},wp={exports:{}};(function(){var t,e,i,n,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?wp.exports=function(){return performance.now()}:null!=r&&r.hrtime?(wp.exports=function(){return(t()-a)/1e6},e=r.hrtime,n=(t=function(){var t;return 1e9*(t=e())[0]+t[1]})(),s=1e9*r.uptime(),a=n-s):Date.now?(wp.exports=function(){return Date.now()-i},i=Date.now()):(wp.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(t);for(var Sp=wp.exports,Tp="undefined"==typeof window?t:window,Op=["moz","webkit"],Ap="AnimationFrame",Cp=Tp["request"+Ap],Pp=Tp["cancel"+Ap]||Tp["cancelRequest"+Ap],Ep=0;!Cp&&Ep<Op.length;Ep++)Cp=Tp[Op[Ep]+"Request"+Ap],Pp=Tp[Op[Ep]+"Cancel"+Ap]||Tp[Op[Ep]+"CancelRequest"+Ap];if(!Cp||!Pp){var Np=0,Mp=0,Rp=[],_p=1e3/60;Cp=function(t){if(0===Rp.length){var e=Sp(),r=Math.max(0,_p-(e-Np));Np=r+e,setTimeout(function(){var t=Rp.slice(0);Rp.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(Np)}catch(r){setTimeout(function(){throw r},0)}},Math.round(r))}return Rp.push({handle:++Mp,callback:t,cancelled:!1}),Mp},Pp=function(t){for(var e=0;e<Rp.length;e++)Rp[e].handle===t&&(Rp[e].cancelled=!0)}}bp.exports=function(t){return Cp.call(Tp,t)},bp.exports.cancel=function(){Pp.apply(Tp,arguments)},bp.exports.polyfill=function(t){t||(t=Tp),t.requestAnimationFrame=Cp,t.cancelAnimationFrame=Pp};const Vp=i(bp.exports);var Ip,kp="\t\n\v\f\r \u2028\u2029\ufeff",Lp=D,Dp=su,jp=kp,Bp=O("".replace),zp=RegExp("^["+jp+"]+"),Up=RegExp("(^|[^"+jp+"])["+jp+"]+$"),Fp={trim:(Ip=3,function(t){var e=Dp(Lp(t));return 1&Ip&&(e=Bp(e,zp,"")),2&Ip&&(e=Bp(e,Up,"$1")),e})},Hp=rr.PROPER,Xp=o,Yp=kp,Wp=Fp.trim;tn({target:"String",proto:!0,forced:function(t){return Xp(function(){return!!Yp[t]()||"
"!=="
"[t]()||Hp&&Yp[t].name!==t})}("trim")},{trim:function(){return Wp(this)}});const qp=i(function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<r.length;i++){var n=r[i].re,a=r[i].process,s=n.exec(t);if(s){var o=a(s);this.r=o[0],this.g=o[1],this.b=o[2],o.length>3&&(this.alpha=o[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r},this.getHelpXML=function(){for(var t=new Array,i=0;i<r.length;i++)for(var n=r[i].example,a=0;a<n.length;a++)t[t.length]=n[a];for(var s in e)t[t.length]=s;var o=document.createElement("ul");o.setAttribute("id","rgbcolor-examples");for(i=0;i<t.length;i++)try{var h=document.createElement("li"),u=new RGBColor(t[i]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),l.appendChild(document.createTextNode("test"));var c=document.createTextNode(" "+t[i]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(l),h.appendChild(c),o.appendChild(h)}catch(f){}return o}});var $p=tn,Qp=vi.indexOf,Gp=Ug,Zp=ma([].indexOf),Kp=!!Zp&&1/Zp([1],1,-0)<0;$p({target:"Array",proto:!0,forced:Kp||!Gp("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Kp?Zp(this,t,e)||0:Qp(this,t,e)}});var Jp=tn,td=qc,ed=D,rd=su,id=Qc,nd=O("".indexOf);Jp({target:"String",proto:!0,forced:!id("includes")},{includes:function(t){return!!~nd(rd(ed(this)),rd(td(t)),arguments.length>1?arguments[1]:void 0)}});var ad=E,sd=tn,od=Array.isArray||function(t){return"Array"===ad(t)},hd=O([].reverse),ud=[1,2];sd({target:"Array",proto:!0,forced:String(ud)===String(ud.reverse())},{reverse:function(){return od(this)&&(this.length=this.length),hd(this)}});
|
|
1
|
+
import{bP as t,bQ as e,bR as r,bN as i}from"./index-WrZQf7cw.js";var n=function(t){return t&&t.Math===Math&&t},a=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s={},o=function(t){try{return!!t()}catch(e){return!0}},h=!o(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),u=!o(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),l=u,c=Function.prototype.call,f=l?c.bind(c):function(){return c.apply(c,arguments)},g={},p={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,y=d&&!p.call({1:2},1);g.f=y?function(t){var e=d(this,t);return!!e&&e.enumerable}:p;var v,m,x=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},b=u,w=Function.prototype,S=w.call,T=b&&w.bind.bind(S,S),O=b?T:function(t){return function(){return S.apply(t,arguments)}},A=O,C=A({}.toString),P=A("".slice),E=function(t){return P(C(t),8,-1)},N=o,M=E,R=Object,_=O("".split),V=N(function(){return!R("z").propertyIsEnumerable(0)})?function(t){return"String"===M(t)?_(t,""):R(t)}:R,I=function(t){return null==t},k=I,L=TypeError,D=function(t){if(k(t))throw new L("Can't call method on "+t);return t},j=V,B=D,z=function(t){return j(B(t))},U="object"==typeof document&&document.all,F=void 0===U&&void 0!==U?function(t){return"function"==typeof t||t===U}:function(t){return"function"==typeof t},H=F,X=function(t){return"object"==typeof t?null!==t:H(t)},Y=a,W=F,q=function(t,e){return arguments.length<2?(r=Y[t],W(r)?r:void 0):Y[t]&&Y[t][e];var r},$=O({}.isPrototypeOf),Q=a.navigator,G=Q&&Q.userAgent,Z=G?String(G):"",K=a,J=Z,tt=K.process,et=K.Deno,rt=tt&&tt.versions||et&&et.version,it=rt&&rt.v8;it&&(m=(v=it.split("."))[0]>0&&v[0]<4?1:+(v[0]+v[1])),!m&&J&&(!(v=J.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=J.match(/Chrome\/(\d+)/))&&(m=+v[1]);var nt=m,at=nt,st=o,ot=a.String,ht=!!Object.getOwnPropertySymbols&&!st(function(){var t=Symbol("symbol detection");return!ot(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&at&&at<41}),ut=ht&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,lt=q,ct=F,ft=$,gt=Object,pt=ut?function(t){return"symbol"==typeof t}:function(t){var e=lt("Symbol");return ct(e)&&ft(e.prototype,gt(t))},dt=String,yt=function(t){try{return dt(t)}catch(e){return"Object"}},vt=F,mt=yt,xt=TypeError,bt=function(t){if(vt(t))return t;throw new xt(mt(t)+" is not a function")},wt=bt,St=I,Tt=function(t,e){var r=t[e];return St(r)?void 0:wt(r)},Ot=f,At=F,Ct=X,Pt=TypeError,Et={exports:{}},Nt=a,Mt=Object.defineProperty,Rt=function(t,e){try{Mt(Nt,t,{value:e,configurable:!0,writable:!0})}catch(r){Nt[t]=e}return e},_t=a,Vt=Rt,It="__core-js_shared__",kt=Et.exports=_t[It]||Vt(It,{});(kt.versions||(kt.versions=[])).push({version:"3.48.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.48.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Lt=Et.exports,Dt=Lt,jt=function(t,e){return Dt[t]||(Dt[t]=e||{})},Bt=D,zt=Object,Ut=function(t){return zt(Bt(t))},Ft=Ut,Ht=O({}.hasOwnProperty),Xt=Object.hasOwn||function(t,e){return Ht(Ft(t),e)},Yt=O,Wt=0,qt=Math.random(),$t=Yt(1.1.toString),Qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+$t(++Wt+qt,36)},Gt=jt,Zt=Xt,Kt=Qt,Jt=ht,te=ut,ee=a.Symbol,re=Gt("wks"),ie=te?ee.for||ee:ee&&ee.withoutSetter||Kt,ne=function(t){return Zt(re,t)||(re[t]=Jt&&Zt(ee,t)?ee[t]:ie("Symbol."+t)),re[t]},ae=f,se=X,oe=pt,he=Tt,ue=function(t,e){var r,i;if("string"===e&&At(r=t.toString)&&!Ct(i=Ot(r,t)))return i;if(At(r=t.valueOf)&&!Ct(i=Ot(r,t)))return i;if("string"!==e&&At(r=t.toString)&&!Ct(i=Ot(r,t)))return i;throw new Pt("Can't convert object to primitive value")},le=TypeError,ce=ne("toPrimitive"),fe=function(t,e){if(!se(t)||oe(t))return t;var r,i=he(t,ce);if(i){if(void 0===e&&(e="default"),r=ae(i,t,e),!se(r)||oe(r))return r;throw new le("Can't convert object to primitive value")}return void 0===e&&(e="number"),ue(t,e)},ge=pt,pe=function(t){var e=fe(t,"string");return ge(e)?e:e+""},de=X,ye=a.document,ve=de(ye)&&de(ye.createElement),me=function(t){return ve?ye.createElement(t):{}},xe=me,be=!h&&!o(function(){return 7!==Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a}),we=h,Se=f,Te=g,Oe=x,Ae=z,Ce=pe,Pe=Xt,Ee=be,Ne=Object.getOwnPropertyDescriptor;s.f=we?Ne:function(t,e){if(t=Ae(t),e=Ce(e),Ee)try{return Ne(t,e)}catch(r){}if(Pe(t,e))return Oe(!Se(Te.f,t,e),t[e])};var Me={},Re=h&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),_e=X,Ve=String,Ie=TypeError,ke=function(t){if(_e(t))return t;throw new Ie(Ve(t)+" is not an object")},Le=h,De=be,je=Re,Be=ke,ze=pe,Ue=TypeError,Fe=Object.defineProperty,He=Object.getOwnPropertyDescriptor,Xe="enumerable",Ye="configurable",We="writable";Me.f=Le?je?function(t,e,r){if(Be(t),e=ze(e),Be(r),"function"==typeof t&&"prototype"===e&&"value"in r&&We in r&&!r[We]){var i=He(t,e);i&&i[We]&&(t[e]=r.value,r={configurable:Ye in r?r[Ye]:i[Ye],enumerable:Xe in r?r[Xe]:i[Xe],writable:!1})}return Fe(t,e,r)}:Fe:function(t,e,r){if(Be(t),e=ze(e),Be(r),De)try{return Fe(t,e,r)}catch(i){}if("get"in r||"set"in r)throw new Ue("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var qe=Me,$e=x,Qe=h?function(t,e,r){return qe.f(t,e,$e(1,r))}:function(t,e,r){return t[e]=r,t},Ge={exports:{}},Ze=h,Ke=Xt,Je=Function.prototype,tr=Ze&&Object.getOwnPropertyDescriptor,er=Ke(Je,"name"),rr={PROPER:er&&"something"===function(){}.name,CONFIGURABLE:er&&(!Ze||Ze&&tr(Je,"name").configurable)},ir=F,nr=Lt,ar=O(Function.toString);ir(nr.inspectSource)||(nr.inspectSource=function(t){return ar(t)});var sr,or,hr,ur=nr.inspectSource,lr=F,cr=a.WeakMap,fr=lr(cr)&&/native code/.test(String(cr)),gr=Qt,pr=jt("keys"),dr=function(t){return pr[t]||(pr[t]=gr(t))},yr={},vr=fr,mr=a,xr=X,br=Qe,wr=Xt,Sr=Lt,Tr=dr,Or=yr,Ar="Object already initialized",Cr=mr.TypeError,Pr=mr.WeakMap;if(vr||Sr.state){var Er=Sr.state||(Sr.state=new Pr);Er.get=Er.get,Er.has=Er.has,Er.set=Er.set,sr=function(t,e){if(Er.has(t))throw new Cr(Ar);return e.facade=t,Er.set(t,e),e},or=function(t){return Er.get(t)||{}},hr=function(t){return Er.has(t)}}else{var Nr=Tr("state");Or[Nr]=!0,sr=function(t,e){if(wr(t,Nr))throw new Cr(Ar);return e.facade=t,br(t,Nr,e),e},or=function(t){return wr(t,Nr)?t[Nr]:{}},hr=function(t){return wr(t,Nr)}}var Mr={set:sr,get:or,has:hr,enforce:function(t){return hr(t)?or(t):sr(t,{})},getterFor:function(t){return function(e){var r;if(!xr(e)||(r=or(e)).type!==t)throw new Cr("Incompatible receiver, "+t+" required");return r}}},Rr=O,_r=o,Vr=F,Ir=Xt,kr=h,Lr=rr.CONFIGURABLE,Dr=ur,jr=Mr.enforce,Br=Mr.get,zr=String,Ur=Object.defineProperty,Fr=Rr("".slice),Hr=Rr("".replace),Xr=Rr([].join),Yr=kr&&!_r(function(){return 8!==Ur(function(){},"length",{value:8}).length}),Wr=String(String).split("String"),qr=Ge.exports=function(t,e,r){"Symbol("===Fr(zr(e),0,7)&&(e="["+Hr(zr(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!Ir(t,"name")||Lr&&t.name!==e)&&(kr?Ur(t,"name",{value:e,configurable:!0}):t.name=e),Yr&&r&&Ir(r,"arity")&&t.length!==r.arity&&Ur(t,"length",{value:r.arity});try{r&&Ir(r,"constructor")&&r.constructor?kr&&Ur(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(n){}var i=jr(t);return Ir(i,"source")||(i.source=Xr(Wr,"string"==typeof e?e:"")),t};Function.prototype.toString=qr(function(){return Vr(this)&&Br(this).source||Dr(this)},"toString");var $r,Qr=Ge.exports,Gr=F,Zr=Me,Kr=Qr,Jr=Rt,ti=function(t,e,r,i){i||(i={});var n=i.enumerable,a=void 0!==i.name?i.name:e;if(Gr(r)&&Kr(r,a,i),i.global)n?t[e]=r:Jr(e,r);else{try{i.unsafe?t[e]&&(n=!0):delete t[e]}catch(s){}n?t[e]=r:Zr.f(t,e,{value:r,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t},ei={},ri=Math.ceil,ii=Math.floor,ni=Math.trunc||function(t){var e=+t;return(e>0?ii:ri)(e)},ai=function(t){var e=+t;return e!=e||0===e?0:ni(e)},si=ai,oi=Math.max,hi=Math.min,ui=ai,li=Math.min,ci=function(t){var e=ui(t);return e>0?li(e,9007199254740991):0},fi=ci,gi=function(t){return fi(t.length)},pi=z,di=function(t,e){var r=si(t);return r<0?oi(r+e,0):hi(r,e)},yi=gi,vi={indexOf:($r=!1,function(t,e,r){var i=pi(t),n=yi(i);if(0===n)return!$r&&-1;var a,s=di(r,n);if($r&&e!=e){for(;n>s;)if((a=i[s++])!=a)return!0}else for(;n>s;s++)if(($r||s in i)&&i[s]===e)return $r||s||0;return!$r&&-1})},mi=Xt,xi=z,bi=vi.indexOf,wi=yr,Si=O([].push),Ti=function(t,e){var r,i=xi(t),n=0,a=[];for(r in i)!mi(wi,r)&&mi(i,r)&&Si(a,r);for(;e.length>n;)mi(i,r=e[n++])&&(~bi(a,r)||Si(a,r));return a},Oi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ai=Ti,Ci=Oi.concat("length","prototype");ei.f=Object.getOwnPropertyNames||function(t){return Ai(t,Ci)};var Pi={};Pi.f=Object.getOwnPropertySymbols;var Ei=q,Ni=ei,Mi=Pi,Ri=ke,_i=O([].concat),Vi=Ei("Reflect","ownKeys")||function(t){var e=Ni.f(Ri(t)),r=Mi.f;return r?_i(e,r(t)):e},Ii=Xt,ki=Vi,Li=s,Di=Me,ji=o,Bi=F,zi=/#|\.prototype\./,Ui=function(t,e){var r=Hi[Fi(t)];return r===Yi||r!==Xi&&(Bi(e)?ji(e):!!e)},Fi=Ui.normalize=function(t){return String(t).replace(zi,".").toLowerCase()},Hi=Ui.data={},Xi=Ui.NATIVE="N",Yi=Ui.POLYFILL="P",Wi=Ui,qi=a,$i=s.f,Qi=Qe,Gi=ti,Zi=Rt,Ki=function(t,e,r){for(var i=ki(e),n=Di.f,a=Li.f,s=0;s<i.length;s++){var o=i[s];Ii(t,o)||r&&Ii(r,o)||n(t,o,a(e,o))}},Ji=Wi,tn=function(t,e){var r,i,n,a,s,o=t.target,h=t.global,u=t.stat;if(r=h?qi:u?qi[o]||Zi(o,{}):qi[o]&&qi[o].prototype)for(i in e){if(a=e[i],n=t.dontCallGetSet?(s=$i(r,i))&&s.value:r[i],!Ji(h?i:o+(u?".":"#")+i,t.forced)&&void 0!==n){if(typeof a==typeof n)continue;Ki(a,n)}(t.sham||n&&n.sham)&&Qi(a,"sham",!0),Gi(r,i,a,t)}},en=a,rn=Z,nn=E,an=function(t){return rn.slice(0,t.length)===t},sn=an("Bun/")?"BUN":an("Cloudflare-Workers")?"CLOUDFLARE":an("Deno/")?"DENO":an("Node.js/")?"NODE":en.Bun&&"string"==typeof Bun.version?"BUN":en.Deno&&"object"==typeof Deno.version?"DENO":"process"===nn(en.process)?"NODE":en.window&&en.document?"BROWSER":"REST",on="NODE"===sn,hn=a,un=O,ln=bt,cn=X,fn=function(t){return cn(t)||null===t},gn=String,pn=TypeError,dn=function(t,e,r){try{return un(ln(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(i){}},yn=X,vn=D,mn=function(t){if(fn(t))return t;throw new pn("Can't set "+gn(t)+" as a prototype")},xn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=dn(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(i){}return function(r,i){return vn(r),mn(i),yn(r)?(e?t(r,i):r.__proto__=i,r):r}}():void 0),bn=Me.f,wn=Xt,Sn=ne("toStringTag"),Tn=function(t,e,r){t&&!r&&(t=t.prototype),t&&!wn(t,Sn)&&bn(t,Sn,{configurable:!0,value:e})},On=Qr,An=Me,Cn=q,Pn=function(t,e,r){return r.get&&On(r.get,e,{getter:!0}),r.set&&On(r.set,e,{setter:!0}),An.f(t,e,r)},En=h,Nn=ne("species"),Mn=$,Rn=TypeError,_n={};_n[ne("toStringTag")]="z";var Vn="[object z]"===String(_n),In=F,kn=E,Ln=ne("toStringTag"),Dn=Object,jn="Arguments"===kn(function(){return arguments}()),Bn=Vn?kn:function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(r){}}(e=Dn(t),Ln))?r:jn?kn(e):"Object"===(i=kn(e))&&In(e.callee)?"Arguments":i},zn=O,Un=o,Fn=F,Hn=Bn,Xn=ur,Yn=function(){},Wn=q("Reflect","construct"),qn=/^\s*(?:class|function)\b/,$n=zn(qn.exec),Qn=!qn.test(Yn),Gn=function(t){if(!Fn(t))return!1;try{return Wn(Yn,[],t),!0}catch(e){return!1}},Zn=function(t){if(!Fn(t))return!1;switch(Hn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Qn||!!$n(qn,Xn(t))}catch(e){return!0}};Zn.sham=!0;var Kn,Jn,ta,ea,ra=!Wn||Un(function(){var t;return Gn(Gn.call)||!Gn(Object)||!Gn(function(){t=!0})||t})?Zn:Gn,ia=ra,na=yt,aa=TypeError,sa=ke,oa=function(t){if(ia(t))return t;throw new aa(na(t)+" is not a constructor")},ha=I,ua=ne("species"),la=function(t,e){var r,i=sa(t).constructor;return void 0===i||ha(r=sa(i)[ua])?e:oa(r)},ca=u,fa=Function.prototype,ga=fa.apply,pa=fa.call,da="object"==typeof Reflect&&Reflect.apply||(ca?pa.bind(ga):function(){return pa.apply(ga,arguments)}),ya=E,va=O,ma=function(t){if("Function"===ya(t))return va(t)},xa=bt,ba=u,wa=ma(ma.bind),Sa=function(t,e){return xa(t),void 0===e?t:ba?wa(t,e):function(){return t.apply(e,arguments)}},Ta=q("document","documentElement"),Oa=O([].slice),Aa=TypeError,Ca=/(?:ipad|iphone|ipod).*applewebkit/i.test(Z),Pa=a,Ea=da,Na=Sa,Ma=F,Ra=Xt,_a=o,Va=Ta,Ia=Oa,ka=me,La=function(t,e){if(t<e)throw new Aa("Not enough arguments");return t},Da=Ca,ja=on,Ba=Pa.setImmediate,za=Pa.clearImmediate,Ua=Pa.process,Fa=Pa.Dispatch,Ha=Pa.Function,Xa=Pa.MessageChannel,Ya=Pa.String,Wa=0,qa={},$a="onreadystatechange";_a(function(){Kn=Pa.location});var Qa=function(t){if(Ra(qa,t)){var e=qa[t];delete qa[t],e()}},Ga=function(t){return function(){Qa(t)}},Za=function(t){Qa(t.data)},Ka=function(t){Pa.postMessage(Ya(t),Kn.protocol+"//"+Kn.host)};Ba&&za||(Ba=function(t){La(arguments.length,1);var e=Ma(t)?t:Ha(t),r=Ia(arguments,1);return qa[++Wa]=function(){Ea(e,void 0,r)},Jn(Wa),Wa},za=function(t){delete qa[t]},ja?Jn=function(t){Ua.nextTick(Ga(t))}:Fa&&Fa.now?Jn=function(t){Fa.now(Ga(t))}:Xa&&!Da?(ea=(ta=new Xa).port2,ta.port1.onmessage=Za,Jn=Na(ea.postMessage,ea)):Pa.addEventListener&&Ma(Pa.postMessage)&&!Pa.importScripts&&Kn&&"file:"!==Kn.protocol&&!_a(Ka)?(Jn=Ka,Pa.addEventListener("message",Za,!1)):Jn=$a in ka("script")?function(t){Va.appendChild(ka("script"))[$a]=function(){Va.removeChild(this),Qa(t)}}:function(t){setTimeout(Ga(t),0)});var Ja={set:Ba},ts=a,es=h,rs=Object.getOwnPropertyDescriptor,is=function(){this.head=null,this.tail=null};is.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var ns,as,ss,os,hs,us=is,ls=/ipad|iphone|ipod/i.test(Z)&&"undefined"!=typeof Pebble,cs=/web0s(?!.*chrome)/i.test(Z),fs=a,gs=function(t){if(!es)return ts[t];var e=rs(ts,t);return e&&e.value},ps=Sa,ds=Ja.set,ys=us,vs=Ca,ms=ls,xs=cs,bs=on,ws=fs.MutationObserver||fs.WebKitMutationObserver,Ss=fs.document,Ts=fs.process,Os=fs.Promise,As=gs("queueMicrotask");if(!As){var Cs=new ys,Ps=function(){var t,e;for(bs&&(t=Ts.domain)&&t.exit();e=Cs.get();)try{e()}catch(r){throw Cs.head&&ns(),r}t&&t.enter()};vs||bs||xs||!ws||!Ss?!ms&&Os&&Os.resolve?((os=Os.resolve(void 0)).constructor=Os,hs=ps(os.then,os),ns=function(){hs(Ps)}):bs?ns=function(){Ts.nextTick(Ps)}:(ds=ps(ds,fs),ns=function(){ds(Ps)}):(as=!0,ss=Ss.createTextNode(""),new ws(Ps).observe(ss,{characterData:!0}),ns=function(){ss.data=as=!as}),As=function(t){Cs.head||ns(),Cs.add(t)}}var Es=As,Ns=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},Ms=a.Promise,Rs=a,_s=Ms,Vs=F,Is=Wi,ks=ur,Ls=ne,Ds=sn,js=nt;_s&&_s.prototype;var Bs=Ls("species"),zs=!1,Us=Vs(Rs.PromiseRejectionEvent),Fs={CONSTRUCTOR:Is("Promise",function(){var t=ks(_s),e=t!==String(_s);if(!e&&66===js)return!0;if(!js||js<51||!/native code/.test(t)){var r=new _s(function(t){t(1)}),i=function(t){t(function(){},function(){})};if((r.constructor={})[Bs]=i,!(zs=r.then(function(){})instanceof i))return!0}return!(e||"BROWSER"!==Ds&&"DENO"!==Ds||Us)}),REJECTION_EVENT:Us,SUBCLASSING:zs},Hs={},Xs=bt,Ys=TypeError,Ws=function(t){var e,r;this.promise=new t(function(t,i){if(void 0!==e||void 0!==r)throw new Ys("Bad Promise constructor");e=t,r=i}),this.resolve=Xs(e),this.reject=Xs(r)};Hs.f=function(t){return new Ws(t)};var qs,$s,Qs,Gs,Zs=tn,Ks=on,Js=a,to=hn,eo=f,ro=ti,io=xn,no=Tn,ao=function(t){var e=Cn(t);En&&e&&!e[Nn]&&Pn(e,Nn,{configurable:!0,get:function(){return this}})},so=bt,oo=F,ho=X,uo=function(t,e){if(Mn(e,t))return t;throw new Rn("Incorrect invocation")},lo=la,co=Ja.set,fo=Es,go=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(r){}},po=Ns,yo=us,vo=Mr,mo=Ms,xo=Hs,bo="Promise",wo=Fs.CONSTRUCTOR,So=Fs.REJECTION_EVENT,To=Fs.SUBCLASSING,Oo=vo.getterFor(bo),Ao=vo.set,Co=mo&&mo.prototype,Po=mo,Eo=Co,No=Js.TypeError,Mo=Js.document,Ro=Js.process,_o=xo.f,Vo=_o,Io=!!(Mo&&Mo.createEvent&&Js.dispatchEvent),ko="unhandledrejection",Lo=function(t){var e;return!(!ho(t)||!oo(e=t.then))&&e},Do=function(t,e){var r,i,n,a=e.value,s=1===e.state,o=s?t.ok:t.fail,h=t.resolve,u=t.reject,l=t.domain;try{o?(s||(2===e.rejection&&Fo(e),e.rejection=1),!0===o?r=a:(l&&l.enter(),r=o(a),l&&(l.exit(),n=!0)),r===t.promise?u(new No("Promise-chain cycle")):(i=Lo(r))?eo(i,r,h,u):h(r)):u(a)}catch(c){l&&!n&&l.exit(),u(c)}},jo=function(t,e){t.notified||(t.notified=!0,fo(function(){for(var r,i=t.reactions;r=i.get();)Do(r,t);t.notified=!1,e&&!t.rejection&&zo(t)}))},Bo=function(t,e,r){var i,n;Io?((i=Mo.createEvent("Event")).promise=e,i.reason=r,i.initEvent(t,!1,!0),Js.dispatchEvent(i)):i={promise:e,reason:r},!So&&(n=Js["on"+t])?n(i):t===ko&&go("Unhandled promise rejection",r)},zo=function(t){eo(co,Js,function(){var e,r=t.facade,i=t.value;if(Uo(t)&&(e=po(function(){Ks?Ro.emit("unhandledRejection",i,r):Bo(ko,r,i)}),t.rejection=Ks||Uo(t)?2:1,e.error))throw e.value})},Uo=function(t){return 1!==t.rejection&&!t.parent},Fo=function(t){eo(co,Js,function(){var e=t.facade;Ks?Ro.emit("rejectionHandled",e):Bo("rejectionhandled",e,t.value)})},Ho=function(t,e,r){return function(i){t(e,i,r)}},Xo=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,jo(t,!0))},Yo=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new No("Promise can't be resolved itself");var i=Lo(e);i?fo(function(){var r={done:!1};try{eo(i,e,Ho(Yo,r,t),Ho(Xo,r,t))}catch(n){Xo(r,n,t)}}):(t.value=e,t.state=1,jo(t,!1))}catch(n){Xo({done:!1},n,t)}}};if(wo&&(Eo=(Po=function(t){uo(this,Eo),so(t),eo(qs,this);var e=Oo(this);try{t(Ho(Yo,e),Ho(Xo,e))}catch(r){Xo(e,r)}}).prototype,(qs=function(t){Ao(this,{type:bo,done:!1,notified:!1,parent:!1,reactions:new yo,rejection:!1,state:0,value:null})}).prototype=ro(Eo,"then",function(t,e){var r=Oo(this),i=_o(lo(this,Po));return r.parent=!0,i.ok=!oo(t)||t,i.fail=oo(e)&&e,i.domain=Ks?Ro.domain:void 0,0===r.state?r.reactions.add(i):fo(function(){Do(i,r)}),i.promise}),$s=function(){var t=new qs,e=Oo(t);this.promise=t,this.resolve=Ho(Yo,e),this.reject=Ho(Xo,e)},xo.f=_o=function(t){return t===Po||t===Qs?new $s(t):Vo(t)},oo(mo)&&Co!==Object.prototype)){Gs=Co.then,To||ro(Co,"then",function(t,e){var r=this;return new Po(function(t,e){eo(Gs,r,t,e)}).then(t,e)},{unsafe:!0});try{delete Co.constructor}catch(Jv){}io&&io(Co,Eo)}Zs({global:!0,constructor:!0,wrap:!0,forced:wo},{Promise:Po}),Qs=to.Promise,no(Po,bo,!1),ao(bo);var Wo={},qo=Wo,$o=ne("iterator"),Qo=Array.prototype,Go=Bn,Zo=Tt,Ko=I,Jo=Wo,th=ne("iterator"),eh=function(t){if(!Ko(t))return Zo(t,th)||Zo(t,"@@iterator")||Jo[Go(t)]},rh=f,ih=bt,nh=ke,ah=yt,sh=eh,oh=TypeError,hh=f,uh=ke,lh=Tt,ch=Sa,fh=f,gh=ke,ph=yt,dh=function(t){return void 0!==t&&(qo.Array===t||Qo[$o]===t)},yh=gi,vh=$,mh=function(t,e){var r=arguments.length<2?sh(t):e;if(ih(r))return nh(rh(r,t));throw new oh(ah(t)+" is not iterable")},xh=eh,bh=function(t,e,r){var i,n;uh(t);try{if(!(i=lh(t,"return"))){if("throw"===e)throw r;return r}i=hh(i,t)}catch(Jv){n=!0,i=Jv}if("throw"===e)throw r;if(n)throw i;return uh(i),r},wh=TypeError,Sh=function(t,e){this.stopped=t,this.result=e},Th=Sh.prototype,Oh=function(t,e,r){var i,n,a,s,o,h,u,l=r&&r.that,c=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),g=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),d=ch(e,l),y=function(t){return i&&bh(i,"normal"),new Sh(!0,t)},v=function(t){return c?(gh(t),p?d(t[0],t[1],y):d(t[0],t[1])):p?d(t,y):d(t)};if(f)i=t.iterator;else if(g)i=t;else{if(!(n=xh(t)))throw new wh(ph(t)+" is not iterable");if(dh(n)){for(a=0,s=yh(t);s>a;a++)if((o=v(t[a]))&&vh(Th,o))return o;return new Sh(!1)}i=mh(t,n)}for(h=f?t.next:i.next;!(u=fh(h,i)).done;){try{o=v(u.value)}catch(Jv){bh(i,"throw",Jv)}if("object"==typeof o&&o&&vh(Th,o))return o}return new Sh(!1)},Ah=ne("iterator"),Ch=!1;try{var Ph=0,Eh={next:function(){return{done:!!Ph++}},return:function(){Ch=!0}};Eh[Ah]=function(){return this},Array.from(Eh,function(){throw 2})}catch(Jv){}var Nh=Ms,Mh=Fs.CONSTRUCTOR||!function(t,e){try{if(!e&&!Ch)return!1}catch(Jv){return!1}var r=!1;try{var i={};i[Ah]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(Jv){}return r}(function(t){Nh.all(t).then(void 0,function(){})}),Rh=f,_h=bt,Vh=Hs,Ih=Ns,kh=Oh;tn({target:"Promise",stat:!0,forced:Mh},{all:function(t){var e=this,r=Vh.f(e),i=r.resolve,n=r.reject,a=Ih(function(){var r=_h(e.resolve),a=[],s=0,o=1;kh(t,function(t){var h=s++,u=!1;o++,Rh(r,e,t).then(function(t){u||(u=!0,a[h]=t,--o||i(a))},n)}),--o||i(a)});return a.error&&n(a.value),r.promise}});var Lh=tn,Dh=Fs.CONSTRUCTOR,jh=Ms,Bh=q,zh=F,Uh=ti,Fh=jh&&jh.prototype;if(Lh({target:"Promise",proto:!0,forced:Dh,real:!0},{catch:function(t){return this.then(void 0,t)}}),zh(jh)){var Hh=Bh("Promise").prototype.catch;Fh.catch!==Hh&&Uh(Fh,"catch",Hh,{unsafe:!0})}var Xh=f,Yh=bt,Wh=Hs,qh=Ns,$h=Oh;tn({target:"Promise",stat:!0,forced:Mh},{race:function(t){var e=this,r=Wh.f(e),i=r.reject,n=qh(function(){var n=Yh(e.resolve);$h(t,function(t){Xh(n,e,t).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var Qh=Hs;tn({target:"Promise",stat:!0,forced:Fs.CONSTRUCTOR},{reject:function(t){var e=Qh.f(this);return(0,e.reject)(t),e.promise}});var Gh=ke,Zh=X,Kh=Hs,Jh=tn,tu=Fs.CONSTRUCTOR,eu=function(t,e){if(Gh(t),Zh(e)&&e.constructor===t)return e;var r=Kh.f(t);return(0,r.resolve)(e),r.promise};function ru(t,e,r,i,n,a,s){try{var o=t[a](s),h=o.value}catch(u){return void r(u)}o.done?e(h):Promise.resolve(h).then(i,n)}function iu(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var a=t.apply(e,r);function s(t){ru(a,i,n,s,o,"next",t)}function o(t){ru(a,i,n,s,o,"throw",t)}s(void 0)})}}q("Promise"),Jh({target:"Promise",stat:!0,forced:tu},{resolve:function(t){return eu(this,t)}});var nu=Bn,au=String,su=function(t){if("Symbol"===nu(t))throw new TypeError("Cannot convert a Symbol value to a string");return au(t)},ou=ke,hu=function(){var t=ou(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},uu=o,lu=a.RegExp,cu=uu(function(){var t=lu("a","y");return t.lastIndex=2,null!==t.exec("abcd")});cu||uu(function(){return!lu("a","y").sticky});var fu={BROKEN_CARET:cu||uu(function(){var t=lu("^r","gy");return t.lastIndex=2,null!==t.exec("str")}),UNSUPPORTED_Y:cu},gu={},pu=Ti,du=Oi,yu=Object.keys||function(t){return pu(t,du)},vu=h,mu=Re,xu=Me,bu=ke,wu=z,Su=yu;gu.f=vu&&!mu?Object.defineProperties:function(t,e){bu(t);for(var r,i=wu(e),n=Su(e),a=n.length,s=0;a>s;)xu.f(t,r=n[s++],i[r]);return t};var Tu,Ou=ke,Au=gu,Cu=Oi,Pu=yr,Eu=Ta,Nu=me,Mu="prototype",Ru="script",_u=dr("IE_PROTO"),Vu=function(){},Iu=function(t){return"<"+Ru+">"+t+"</"+Ru+">"},ku=function(t){t.write(Iu("")),t.close();var e=t.parentWindow.Object;return t=null,e},Lu=function(){try{Tu=new ActiveXObject("htmlfile")}catch(Jv){}var t,e,r;Lu="undefined"!=typeof document?document.domain&&Tu?ku(Tu):(e=Nu("iframe"),r="java"+Ru+":",e.style.display="none",Eu.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Iu("document.F=Object")),t.close(),t.F):ku(Tu);for(var i=Cu.length;i--;)delete Lu[Mu][Cu[i]];return Lu()};Pu[_u]=!0;var Du,ju,Bu=Object.create||function(t,e){var r;return null!==t?(Vu[Mu]=Ou(t),r=new Vu,Vu[Mu]=null,r[_u]=t):r=Lu(),void 0===e?r:Au.f(r,e)},zu=o,Uu=a.RegExp,Fu=zu(function(){var t=Uu(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}),Hu=o,Xu=a.RegExp,Yu=Hu(function(){var t=Xu("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}),Wu=f,qu=O,$u=su,Qu=hu,Gu=fu,Zu=Bu,Ku=Mr.get,Ju=Fu,tl=Yu,el=jt("native-string-replace",String.prototype.replace),rl=RegExp.prototype.exec,il=rl,nl=qu("".charAt),al=qu("".indexOf),sl=qu("".replace),ol=qu("".slice),hl=(ju=/b*/g,Wu(rl,Du=/a/,"a"),Wu(rl,ju,"a"),0!==Du.lastIndex||0!==ju.lastIndex),ul=Gu.BROKEN_CARET,ll=void 0!==/()??/.exec("")[1];(hl||ll||ul||Ju||tl)&&(il=function(t){var e,r,i,n,a,s,o,h=this,u=Ku(h),l=$u(t),c=u.raw;if(c)return c.lastIndex=h.lastIndex,e=Wu(il,c,l),h.lastIndex=c.lastIndex,e;var f=u.groups,g=ul&&h.sticky,p=Wu(Qu,h),d=h.source,y=0,v=l;if(g&&(p=sl(p,"y",""),-1===al(p,"g")&&(p+="g"),v=ol(l,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==nl(l,h.lastIndex-1))&&(d="(?: "+d+")",v=" "+v,y++),r=new RegExp("^(?:"+d+")",p)),ll&&(r=new RegExp("^"+d+"$(?!\\s)",p)),hl&&(i=h.lastIndex),n=Wu(rl,g?r:h,v),g?n?(n.input=ol(n.input,y),n[0]=ol(n[0],y),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:hl&&n&&(h.lastIndex=h.global?n.index+n[0].length:i),ll&&n&&n.length>1&&Wu(el,n[0],r,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(n[a]=void 0)}),n&&f)for(n.groups=s=Zu(null),a=0;a<f.length;a++)s[(o=f[a])[0]]=n[o[1]];return n});var cl=il;tn({target:"RegExp",proto:!0,forced:/./.exec!==cl},{exec:cl});var fl,gl=f,pl=ti,dl=cl,yl=o,vl=ne,ml=Qe,xl=vl("species"),bl=RegExp.prototype,wl=function(t,e,r,i){var n=vl(t),a=!yl(function(){var e={};return e[n]=function(){return 7},7!==""[t](e)}),s=a&&!yl(function(){var e=!1,r=/a/;if("split"===t){var i={};i[xl]=function(){return r},(r={constructor:i,flags:""})[n]=/./[n]}return r.exec=function(){return e=!0,null},r[n](""),!e});if(!a||!s||r){var o=/./[n],h=e(n,""[t],function(t,e,r,i,n){var s=e.exec;return s===dl||s===bl.exec?a&&!n?{done:!0,value:gl(o,e,r,i)}:{done:!0,value:gl(t,r,e,i)}:{done:!1}});pl(String.prototype,t,h[0]),pl(bl,n,h[1])}i&&ml(bl[n],"sham",!0)},Sl=O,Tl=ai,Ol=su,Al=D,Cl=Sl("".charAt),Pl=Sl("".charCodeAt),El=Sl("".slice),Nl={charAt:(fl=!0,function(t,e){var r,i,n=Ol(Al(t)),a=Tl(e),s=n.length;return a<0||a>=s?fl?"":void 0:(r=Pl(n,a))<55296||r>56319||a+1===s||(i=Pl(n,a+1))<56320||i>57343?fl?Cl(n,a):r:fl?El(n,a,a+2):i-56320+(r-55296<<10)+65536})}.charAt,Ml=function(t,e,r){return e+(r?Nl(t,e).length:1)},Rl=o,_l=a.RegExp,Vl=!Rl(function(){var t=!0;try{_l(".","d")}catch(Jv){t=!1}var e={},r="",i=t?"dgimsy":"gimsy",n=function(t,i){Object.defineProperty(e,t,{get:function(){return r+=i,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(a.hasIndices="d"),a)n(s,a[s]);return Object.getOwnPropertyDescriptor(_l.prototype,"flags").get.call(e)!==i||r!==i}),Il=f,kl=Xt,Ll=$,Dl={correct:Vl},jl=hu,Bl=RegExp.prototype,zl=Dl.correct?function(t){return t.flags}:function(t){return Dl.correct||!Ll(Bl,t)||kl(t,"flags")?t.flags:Il(jl,t)},Ul=f,Fl=ke,Hl=F,Xl=E,Yl=cl,Wl=TypeError,ql=function(t,e){var r=t.exec;if(Hl(r)){var i=Ul(r,t,e);return null!==i&&Fl(i),i}if("RegExp"===Xl(t))return Ul(Yl,t,e);throw new Wl("RegExp#exec called on incompatible receiver")},$l=f,Ql=wl,Gl=ke,Zl=X,Kl=ci,Jl=su,tc=D,ec=Tt,rc=Ml,ic=zl,nc=ql,ac=O("".indexOf);Ql("match",function(t,e,r){return[function(e){var r=tc(this),i=Zl(e)?ec(e,t):void 0;return i?$l(i,e,r):new RegExp(e)[t](Jl(r))},function(t){var i=Gl(this),n=Jl(t),a=r(e,i,n);if(a.done)return a.value;var s=Jl(ic(i));if(-1===ac(s,"g"))return nc(i,n);var o=-1!==ac(s,"u");i.lastIndex=0;for(var h,u=[],l=0;null!==(h=nc(i,n));){var c=Jl(h[0]);u[l]=c,""===c&&(i.lastIndex=rc(n,Kl(i.lastIndex),o)),l++}return 0===l?null:u}]});var sc=O,oc=Ut,hc=Math.floor,uc=sc("".charAt),lc=sc("".replace),cc=sc("".slice),fc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,gc=/\$([$&'`]|\d{1,2})/g,pc=da,dc=f,yc=O,vc=wl,mc=o,xc=ke,bc=F,wc=X,Sc=ai,Tc=ci,Oc=su,Ac=D,Cc=Ml,Pc=Tt,Ec=function(t,e,r,i,n,a){var s=r+t.length,o=i.length,h=gc;return void 0!==n&&(n=oc(n),h=fc),lc(a,h,function(a,h){var u;switch(uc(h,0)){case"$":return"$";case"&":return t;case"`":return cc(e,0,r);case"'":return cc(e,s);case"<":u=n[cc(h,1,-1)];break;default:var l=+h;if(0===l)return a;if(l>o){var c=hc(l/10);return 0===c?a:c<=o?void 0===i[c-1]?uc(h,1):i[c-1]+uc(h,1):a}u=i[l-1]}return void 0===u?"":u})},Nc=zl,Mc=ql,Rc=ne("replace"),_c=Math.max,Vc=Math.min,Ic=yc([].concat),kc=yc([].push),Lc=yc("".indexOf),Dc=yc("".slice),jc=function(t){return void 0===t?t:String(t)},Bc="$0"==="a".replace(/./,"$0"),zc=!!/./[Rc]&&""===/./[Rc]("a","$0");vc("replace",function(t,e,r){var i=zc?"$":"$0";return[function(t,r){var i=Ac(this),n=wc(t)?Pc(t,Rc):void 0;return n?dc(n,t,i,r):dc(e,Oc(i),t,r)},function(t,n){var a=xc(this),s=Oc(t);if("string"==typeof n&&-1===Lc(n,i)&&-1===Lc(n,"$<")){var o=r(e,a,s,n);if(o.done)return o.value}var h=bc(n);h||(n=Oc(n));var u,l=Oc(Nc(a)),c=-1!==Lc(l,"g");c&&(u=-1!==Lc(l,"u"),a.lastIndex=0);for(var f,g=[];null!==(f=Mc(a,s))&&(kc(g,f),c);){""===Oc(f[0])&&(a.lastIndex=Cc(s,Tc(a.lastIndex),u))}for(var p="",d=0,y=0;y<g.length;y++){for(var v,m=Oc((f=g[y])[0]),x=_c(Vc(Sc(f.index),s.length),0),b=[],w=1;w<f.length;w++)kc(b,jc(f[w]));var S=f.groups;if(h){var T=Ic([m],b,x,s);void 0!==S&&kc(T,S),v=Oc(pc(n,void 0,T))}else v=Ec(m,s,x,b,S,n);x>=d&&(p+=Dc(s,d,x)+v,d=x+m.length)}return p+Dc(s,d)}]},!!mc(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!Bc||zc);var Uc,Fc=X,Hc=E,Xc=ne("match"),Yc=function(t){var e;return Fc(t)&&(void 0!==(e=t[Xc])?!!e:"RegExp"===Hc(t))},Wc=TypeError,qc=function(t){if(Yc(t))throw new Wc("The method doesn't accept regular expressions");return t},$c=ne("match"),Qc=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[$c]=!1,"/./"[t](e)}catch(i){}}return!1},Gc=tn,Zc=ma,Kc=s.f,Jc=ci,tf=su,ef=qc,rf=D,nf=Qc,af=Zc("".slice),sf=Math.min,of=nf("startsWith");Gc({target:"String",proto:!0,forced:!!(of||(Uc=Kc(String.prototype,"startsWith"),!Uc||Uc.writable))&&!of},{startsWith:function(t){var e=tf(rf(this));ef(t);var r=Jc(sf(arguments.length>1?arguments[1]:void 0,e.length)),i=tf(t);return af(e,r,r+i.length)===i}});var hf=ne,uf=Bu,lf=Me.f,cf=hf("unscopables"),ff=Array.prototype;void 0===ff[cf]&&lf(ff,cf,{configurable:!0,value:uf(null)});var gf,pf,df,yf=!o(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),vf=Xt,mf=F,xf=Ut,bf=yf,wf=dr("IE_PROTO"),Sf=Object,Tf=Sf.prototype,Of=bf?Sf.getPrototypeOf:function(t){var e=xf(t);if(vf(e,wf))return e[wf];var r=e.constructor;return mf(r)&&e instanceof r?r.prototype:e instanceof Sf?Tf:null},Af=o,Cf=F,Pf=X,Ef=Of,Nf=ti,Mf=ne("iterator"),Rf=!1;[].keys&&("next"in(df=[].keys())?(pf=Ef(Ef(df)))!==Object.prototype&&(gf=pf):Rf=!0),(!Pf(gf)||Af(function(){var t={};return gf[Mf].call(t)!==t}))&&(gf={}),Cf(gf[Mf])||Nf(gf,Mf,function(){return this});var _f={IteratorPrototype:gf,BUGGY_SAFARI_ITERATORS:Rf},Vf=_f.IteratorPrototype,If=Bu,kf=x,Lf=Tn,Df=Wo,jf=function(){return this},Bf=tn,zf=f,Uf=F,Ff=function(t,e,r,i){var n=e+" Iterator";return t.prototype=If(Vf,{next:kf(+!i,r)}),Lf(t,n,!1),Df[n]=jf,t},Hf=Of,Xf=xn,Yf=Tn,Wf=Qe,qf=ti,$f=Wo,Qf=rr.PROPER,Gf=rr.CONFIGURABLE,Zf=_f.IteratorPrototype,Kf=_f.BUGGY_SAFARI_ITERATORS,Jf=ne("iterator"),tg="keys",eg="values",rg="entries",ig=function(){return this},ng=z,ag=function(t){ff[cf][t]=!0},sg=Wo,og=Mr,hg=Me.f,ug=function(t,e,r,i,n,a,s){Ff(r,e,i);var o,h,u,l=function(t){if(t===n&&d)return d;if(!Kf&&t&&t in g)return g[t];switch(t){case tg:case eg:case rg:return function(){return new r(this,t)}}return function(){return new r(this)}},c=e+" Iterator",f=!1,g=t.prototype,p=g[Jf]||g["@@iterator"]||n&&g[n],d=!Kf&&p||l(n),y="Array"===e&&g.entries||p;if(y&&(o=Hf(y.call(new t)))!==Object.prototype&&o.next&&(Hf(o)!==Zf&&(Xf?Xf(o,Zf):Uf(o[Jf])||qf(o,Jf,ig)),Yf(o,c,!0)),Qf&&n===eg&&p&&p.name!==eg&&(Gf?Wf(g,"name",eg):(f=!0,d=function(){return zf(p,this)})),n)if(h={values:l(eg),keys:a?d:l(tg),entries:l(rg)},s)for(u in h)(Kf||f||!(u in g))&&qf(g,u,h[u]);else Bf({target:e,proto:!0,forced:Kf||f},h);return g[Jf]!==d&&qf(g,Jf,d,{name:n}),$f[e]=d,h},lg=function(t,e){return{value:t,done:e}},cg=h,fg="Array Iterator",gg=og.set,pg=og.getterFor(fg),dg=ug(Array,"Array",function(t,e){gg(this,{type:fg,target:ng(t),index:0,kind:e})},function(){var t=pg(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,lg(void 0,!0);switch(t.kind){case"keys":return lg(r,!1);case"values":return lg(e[r],!1)}return lg([r,e[r]],!1)},"values"),yg=sg.Arguments=sg.Array;if(ag("keys"),ag("values"),ag("entries"),cg&&"values"!==yg.name)try{hg(yg,"name",{value:"values"})}catch(Jv){}var vg=me("span").classList,mg=vg&&vg.constructor&&vg.constructor.prototype,xg=mg===Object.prototype?void 0:mg,bg=a,wg={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Sg=xg,Tg=dg,Og=Qe,Ag=Tn,Cg=ne("iterator"),Pg=Tg.values,Eg=function(t,e){if(t){if(t[Cg]!==Pg)try{Og(t,Cg,Pg)}catch(Jv){t[Cg]=Pg}if(Ag(t,e,!0),wg[e])for(var r in Tg)if(t[r]!==Tg[r])try{Og(t,r,Tg[r])}catch(Jv){t[r]=Tg[r]}}};for(var Ng in wg)Eg(bg[Ng]&&bg[Ng].prototype,Ng);function Mg(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,r);if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function Rg(t,e,r){return(e=Mg(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}Eg(Sg,"DOMTokenList");var _g,Vg=bt,Ig=Ut,kg=V,Lg=gi,Dg=TypeError,jg="Reduce of empty array with no initial value",Bg={left:(_g=!1,function(t,e,r,i){var n=Ig(t),a=kg(n),s=Lg(n);if(Vg(e),0===s&&r<2)throw new Dg(jg);var o=_g?s-1:0,h=_g?-1:1;if(r<2)for(;;){if(o in a){i=a[o],o+=h;break}if(o+=h,_g?o<0:s<=o)throw new Dg(jg)}for(;_g?o>=0:s>o;o+=h)o in a&&(i=e(i,a[o],o,n));return i})},zg=o,Ug=function(t,e){var r=[][t];return!!r&&zg(function(){r.call(null,e||function(){return 1},1)})},Fg=Bg.left;tn({target:"Array",proto:!0,forced:!on&&nt>79&&nt<83||!Ug("reduce")},{reduce:function(t){var e=arguments.length;return Fg(this,t,e,e>1?arguments[1]:void 0)}});var Hg=tn,Xg=ma,Yg=s.f,Wg=ci,qg=su,$g=qc,Qg=D,Gg=Qc,Zg=Xg("".slice),Kg=Math.min,Jg=Gg("endsWith"),tp=!Jg&&!!function(){var t=Yg(String.prototype,"endsWith");return t&&!t.writable}();Hg({target:"String",proto:!0,forced:!tp&&!Jg},{endsWith:function(t){var e=qg(Qg(this));$g(t);var r=arguments.length>1?arguments[1]:void 0,i=e.length,n=void 0===r?i:Kg(Wg(r),i),a=qg(t);return Zg(e,n-a.length,n)===a}});var ep=f,rp=O,ip=wl,np=ke,ap=X,sp=D,op=la,hp=Ml,up=ci,lp=su,cp=Tt,fp=ql,gp=o,pp=fu.UNSUPPORTED_Y,dp=Math.min,yp=rp([].push),vp=rp("".slice),mp=!gp(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}),xp="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;ip("split",function(t,e,r){var i="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:ep(e,this,t,r)}:e;return[function(e,r){var n=sp(this),a=ap(e)?cp(e,t):void 0;return a?ep(a,e,n,r):ep(i,lp(n),e,r)},function(t,n){var a=np(this),s=lp(t);if(!xp){var o=r(i,a,s,n,i!==e);if(o.done)return o.value}var h=op(a,RegExp),u=a.unicode,l=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(pp?"g":"y"),c=new h(pp?"^(?:"+a.source+")":a,l),f=void 0===n?4294967295:n>>>0;if(0===f)return[];if(0===s.length)return null===fp(c,s)?[s]:[];for(var g=0,p=0,d=[];p<s.length;){c.lastIndex=pp?0:p;var y,v=fp(c,pp?vp(s,p):s);if(null===v||(y=dp(up(c.lastIndex+(pp?p:0)),s.length))===g)p=hp(s,p,u);else{if(yp(d,vp(s,g,p)),d.length===f)return d;for(var m=1;m<=v.length-1;m++)if(yp(d,v[m]),d.length===f)return d;p=g=y}}return yp(d,vp(s,g)),d}]},xp||!mp,pp);var bp={exports:{}},wp={exports:{}};(function(){var t,e,i,n,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?wp.exports=function(){return performance.now()}:null!=r&&r.hrtime?(wp.exports=function(){return(t()-a)/1e6},e=r.hrtime,n=(t=function(){var t;return 1e9*(t=e())[0]+t[1]})(),s=1e9*r.uptime(),a=n-s):Date.now?(wp.exports=function(){return Date.now()-i},i=Date.now()):(wp.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(t);for(var Sp=wp.exports,Tp="undefined"==typeof window?t:window,Op=["moz","webkit"],Ap="AnimationFrame",Cp=Tp["request"+Ap],Pp=Tp["cancel"+Ap]||Tp["cancelRequest"+Ap],Ep=0;!Cp&&Ep<Op.length;Ep++)Cp=Tp[Op[Ep]+"Request"+Ap],Pp=Tp[Op[Ep]+"Cancel"+Ap]||Tp[Op[Ep]+"CancelRequest"+Ap];if(!Cp||!Pp){var Np=0,Mp=0,Rp=[],_p=1e3/60;Cp=function(t){if(0===Rp.length){var e=Sp(),r=Math.max(0,_p-(e-Np));Np=r+e,setTimeout(function(){var t=Rp.slice(0);Rp.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(Np)}catch(r){setTimeout(function(){throw r},0)}},Math.round(r))}return Rp.push({handle:++Mp,callback:t,cancelled:!1}),Mp},Pp=function(t){for(var e=0;e<Rp.length;e++)Rp[e].handle===t&&(Rp[e].cancelled=!0)}}bp.exports=function(t){return Cp.call(Tp,t)},bp.exports.cancel=function(){Pp.apply(Tp,arguments)},bp.exports.polyfill=function(t){t||(t=Tp),t.requestAnimationFrame=Cp,t.cancelAnimationFrame=Pp};const Vp=i(bp.exports);var Ip,kp="\t\n\v\f\r \u2028\u2029\ufeff",Lp=D,Dp=su,jp=kp,Bp=O("".replace),zp=RegExp("^["+jp+"]+"),Up=RegExp("(^|[^"+jp+"])["+jp+"]+$"),Fp={trim:(Ip=3,function(t){var e=Dp(Lp(t));return 1&Ip&&(e=Bp(e,zp,"")),2&Ip&&(e=Bp(e,Up,"$1")),e})},Hp=rr.PROPER,Xp=o,Yp=kp,Wp=Fp.trim;tn({target:"String",proto:!0,forced:function(t){return Xp(function(){return!!Yp[t]()||"
"!=="
"[t]()||Hp&&Yp[t].name!==t})}("trim")},{trim:function(){return Wp(this)}});const qp=i(function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var r=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<r.length;i++){var n=r[i].re,a=r[i].process,s=n.exec(t);if(s){var o=a(s);this.r=o[0],this.g=o[1],this.b=o[2],o.length>3&&(this.alpha=o[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r},this.getHelpXML=function(){for(var t=new Array,i=0;i<r.length;i++)for(var n=r[i].example,a=0;a<n.length;a++)t[t.length]=n[a];for(var s in e)t[t.length]=s;var o=document.createElement("ul");o.setAttribute("id","rgbcolor-examples");for(i=0;i<t.length;i++)try{var h=document.createElement("li"),u=new RGBColor(t[i]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),l.appendChild(document.createTextNode("test"));var c=document.createTextNode(" "+t[i]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(l),h.appendChild(c),o.appendChild(h)}catch(f){}return o}});var $p=tn,Qp=vi.indexOf,Gp=Ug,Zp=ma([].indexOf),Kp=!!Zp&&1/Zp([1],1,-0)<0;$p({target:"Array",proto:!0,forced:Kp||!Gp("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Kp?Zp(this,t,e)||0:Qp(this,t,e)}});var Jp=tn,td=qc,ed=D,rd=su,id=Qc,nd=O("".indexOf);Jp({target:"String",proto:!0,forced:!id("includes")},{includes:function(t){return!!~nd(rd(ed(this)),rd(td(t)),arguments.length>1?arguments[1]:void 0)}});var ad=E,sd=tn,od=Array.isArray||function(t){return"Array"===ad(t)},hd=O([].reverse),ud=[1,2];sd({target:"Array",proto:!0,forced:String(ud)===String(ud.reverse())},{reverse:function(){return od(this)&&(this.length=this.length),hd(this)}});
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
|
149
149
|
rel="stylesheet"
|
|
150
150
|
/>
|
|
151
|
-
<script type="module" crossorigin src="/assets/index-
|
|
151
|
+
<script type="module" crossorigin src="/assets/index-WrZQf7cw.js"></script>
|
|
152
152
|
<link rel="stylesheet" crossorigin href="/assets/index-DrRm3Jka.css">
|
|
153
153
|
</head>
|
|
154
154
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/ui",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.0",
|
|
4
4
|
"description": "Full-stack UI framework for visualizing cryptocurrency trading signals, backtests, and real-time market data. React dashboard with candlestick charts, signal tracking, and risk analysis.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
"ccxt": "4.5.24",
|
|
93
93
|
"touch": "3.1.1",
|
|
94
94
|
"worker-testbed": "3.0.0",
|
|
95
|
-
"backtest-kit": "15.
|
|
95
|
+
"backtest-kit": "15.3.0",
|
|
96
96
|
"markdown-it": "14.1.0"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
|
-
"backtest-kit": "^15.
|
|
99
|
+
"backtest-kit": "^15.3.0",
|
|
100
100
|
"markdown-it": "^14.1.0",
|
|
101
101
|
"ccxt": "^4.5.24",
|
|
102
102
|
"typescript": "^5.0.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a8 as o}from"./index-DQ0Y8Jqw.js";const r=new o;export{r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e,f as a,r as t,bp as i,bq as o,y as r,i as s,br as n,bs as c,bt as l,I as d,ad as p,b1 as h,bu as u,p as b,ah as m,bv as y,a1 as f,T as g,b2 as v,an as x,a5 as w,bw as L,ao as S,bx as k,aZ as A,Y as j,E as C,a8 as N,U as z,V as E,b7 as H,B as R,Z as T,aj as V}from"./index-DQ0Y8Jqw.js";import{h as I}from"./hasRouteMatch-Bo3n95qK.js";import{B as M}from"./Background-z2hZ5vrs.js";import{A as B}from"./Article-BXBHQ9ZL.js";import{C as D,R as F}from"./Refresh-BIf7i5Ab.js";import{K}from"./KeyboardArrowLeft-BcNNsJIG.js";const P=e(a("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Image"),W=e(a("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"}),"InsertDriveFile"),Z="65px",q=e=>e.mimeType.startsWith("image/")?a(P,{sx:{color:"#f57c00",fontSize:20}}):"application/json"===e.mimeType?a(j,{sx:{color:"#7b1fa2",fontSize:20}}):e.mimeType.startsWith("text/")?a(B,{sx:{color:"#1976d2",fontSize:20}}):a(W,{sx:{color:"#546e7a",fontSize:20}}),O=b()(e=>({root:{position:"relative",height:"100%",width:"100%",background:"#eee",overflow:"clip"},header:{position:"absolute",top:0,left:0,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:"8px",paddingRight:"4px",height:Z},input:{height:Z,paddingRight:e.spacing(2),paddingLeft:e.spacing(1),width:"100%"},container:{position:"absolute",top:Z,left:0,right:0,bottom:0,height:`calc(100% - ${Z})`,width:"100%",background:"white",overflow:"clip",display:"flex",alignItems:"stretch",justifyContent:"stretch"},content:{display:"flex",flex:1},loader:{height:"100%",width:"100%"},accent:{background:m("#00c3ff",.05)}})),U=({outlinePaper:e,className:b,style:m,sx:j,nodes:C,initialSearch:N=""})=>{const{classes:z,cx:E}=O(),[H,R]=t.useState(N),T=i(H),[V,{flush:I}]=o(H,2500),[M,{loading:B}]=r(async()=>await(async(e,a)=>{const t=e.trim().toLowerCase(),i=[];let o=0;for(const r of s.explorerHelperService.deepFlat(a))if("file"!==r.type||t&&!r.path.toLowerCase().includes(t)||i.push(r),++o%1e4==0&&await y(0),i.length>25e3)break;return i})(V,C),{onLoadStart:()=>s.layoutService.setAppbarLoader(!0),onLoadEnd:()=>s.layoutService.setAppbarLoader(!1),deps:[V,C]}),{execute:D}=n(async e=>{await s.layoutService.pickDumpContent(e)},{onLoadStart:()=>s.layoutService.setAppbarLoader(!0),onLoadEnd:()=>s.layoutService.setAppbarLoader(!1)});return a(u,{outlinePaper:e,className:E(z.root,b),style:m,sx:j,children:[a("div",{className:z.header,children:a(c,{disabled:B,className:z.input,endAdornment:a(l,{position:"end",children:a(d,{disabled:B||!H,onClick:()=>{T.once(async()=>{await y(500),I()}),R("")},edge:"end",children:a(H?p:h,{})})}),placeholder:"Search",value:H,onBlur:()=>I(),onChange:({target:e})=>R(e.value),onKeyDown:({key:e,currentTarget:a})=>"Enter"===e&&a.blur()})}),a("div",{className:z.container,children:a("div",{className:z.content,children:M?M.length?a(A,{withScrollbar:!0,children:M.map((e,t)=>a(x,{className:E({[z.accent]:t%2==1}),component:w,onClick:()=>(async e=>{await D(e)})(e.id),children:[a(L,{children:q(e)}),a(S,{primary:e.label,secondary:e.path}),a(k,{content:e.path,label:"Copy path"})]},e.id))}):a(v,{sx:{height:"100%",width:"100%"},children:a(g,{variant:"h6",sx:{opacity:.5},children:"Not found"})}):a(f,{className:z.loader})})})]})},X=[{type:E.Link,action:"back-action",label:a(K,{sx:{display:"block"}})},{type:E.Link,action:"back-action",label:"Main"},{type:E.Link,action:"back-action",label:"Dump Explorer"}],Y=[{action:"update-now",label:"Refresh",icon:()=>a(T,{icon:F,color:"#4caf50"})}],$=new N,G=({params:e})=>{const[t,{loading:i,execute:o}]=r(async()=>await s.explorerViewService.getFolderTree(),{onLoadStart:()=>s.layoutService.setAppbarLoader(!0),onLoadEnd:()=>s.layoutService.setAppbarLoader(!1)});C(()=>$.subscribe(o));return a(D,{children:[a(z,{items:X,actions:Y,onAction:e=>{"back-action"===e&&s.routerService.push("/"),"update-now"===e&&(s.explorerViewService.clear(),$.next())}}),a(H,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"calc(100vh - 150px)"},children:a(R,{pr:2,pl:2,children:i||!t?a(v,{children:a(g,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):a(U,{nodes:t,initialSearch:e.search})})}),a(M,{})]})},J=[{id:"search",element:G,isActive:e=>I(["/dump/:search"],e)},{id:"main",element:G,isActive:e=>I(["/dump"],e)}],Q=({search:e=""})=>a(V,{history:s.routerService,onLoadStart:()=>s.layoutService.setAppbarLoader(!0),onLoadEnd:()=>s.layoutService.setAppbarLoader(!1),routes:J,params:{search:e}});export{Q as DumpPage,Q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e,f as a,a8 as o,V as t,U as n,D as i,Z as r,ak as s,y as l,i as c,al as d,E as p,am as h,W as m,an as u,ao as b,ap as g,B as y,T as x,aq as v,m as f,n as k,ar as S,a6 as w,as as L,ah as P,O as R,I as F,at as z,v as $,au as N,av as D}from"./index-DQ0Y8Jqw.js";import{R as O,C as T}from"./Refresh-BIf7i5Ab.js";import{K as W}from"./KeyboardArrowLeft-BcNNsJIG.js";import{I as j}from"./IconPhoto-DBNRgcFh.js";import{B as C}from"./Background-z2hZ5vrs.js";const B=e(a("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard"),A=e(a("path",{d:"M3 10h11v2H3v-2zm0-2h11V6H3v2zm0 8h7v-2H3v2zm15.01-3.13.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41l-.71.71-2.12-2.12zm-.71.71-5.3 5.3V21h2.12l5.3-5.3-2.12-2.12z"}),"EditNote"),E=new o,V=[{type:t.Link,action:"back-action",label:a(W,{sx:{display:"block"}})},{type:t.Link,action:"back-action",label:"Main"},{type:t.Link,action:"back-action",label:"Overview"},{type:t.Button,action:"update-now",label:"Refresh",icon:O}],H=[{action:"download-action",label:"Download",icon:()=>a(r,{icon:i,color:"#4caf50"})},{divider:!0},{action:"dashboard-action",label:"Dashboard",icon:()=>a(r,{icon:B,color:"#4caf50"})},{action:"logs-action",label:"Logs",icon:()=>a(r,{icon:A,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>a(r,{icon:O,color:"#4caf50"})}],I=()=>a(n,{items:V,actions:H,onAction:E.next});const M=({data:{type:e},setLoading:o})=>{const{elementRef:t,size:n}=s({closest:".MuiContainer-root",compute:e=>(e.height-=150,e)}),[i,{loading:r,execute:N}]=l(async()=>{if("live"===e){return(await c.storageViewService.listSignalLive()).filter(e=>"closed"===e.status)}return(await c.storageViewService.listSignalBacktest()).filter(e=>"closed"===e.status)},{onLoadStart:()=>o(!0),onLoadEnd:()=>o(!1),deps:[e]}),D=d(i),O=d(e);p(()=>E.subscribe(e=>{if("update-now"===e&&N(),"download-action"===e){const e=new Blob([JSON.stringify(D.current,null,2)],{type:"application/json"}),a=URL.createObjectURL(e);c.layoutService.downloadFile(a,`signals_${O.current}_${Date.now()}.json`)}"dashboard-action"===e&&c.routerService.push(`/dashboard/${O.current}`),"logs-action"===e&&c.routerService.push("/logs"),"back-action"===e&&c.routerService.push("/main")}));const T=h.useMemo(()=>i?i.reduce((e,a)=>(e[a.symbol]||(e[a.symbol]=[]),e[a.symbol].push(a),e),{}):{},[i]),W=e=>{const o=T[e]||[];return o.length?a($,{children:o.map((t,n)=>{return a(L,{sx:{background:e=>n%2==1?P(e.palette.getContrastText(e.palette.background.paper),.02):void 0},onClick:()=>c.layoutService.pickSignal(t.id),children:[a(b,{primary:a(y,{sx:{display:"flex",gap:1,flexWrap:"wrap",alignItems:"center"},children:[a(x,{variant:"body2",component:"span",sx:{fontWeight:"bold",px:1,py:.5,opacity:.5,borderRadius:1,transition:"opacity 500ms",background:P("#9e9e9e",.2),color:"#616161","&:hover":{opacity:1}},children:["#",o.length-n]}),a(x,{variant:"body2",component:"span",sx:{fontWeight:"bold",px:1,py:.5,borderRadius:1,background:"long"===t.position?"#1976D2":"#F57C00",color:"white"},children:"long"===t.position?"LONG":"SHORT"}),a(x,{variant:"body2",component:"span",sx:{fontWeight:"medium"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"Entry:"}),R(t.priceOpen),"$",null!=t.originalPriceOpen&&Number(t.originalPriceOpen).toFixed(6)!==Number(t.priceOpen).toFixed(6)&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[R(t.originalPriceOpen),"$"]})]}),a(x,{variant:"body2",component:"span",sx:{fontWeight:"medium",color:"success.main"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"TP:"}),R(t.priceTakeProfit),"$",null!=t.originalPriceTakeProfit&&Number(t.originalPriceTakeProfit).toFixed(6)!==Number(t.priceTakeProfit).toFixed(6)&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[R(t.originalPriceTakeProfit),"$"]})]}),a(x,{variant:"body2",component:"span",sx:{fontWeight:"medium",color:"error.main"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"SL:"}),R(t.priceStopLoss),"$",null!=t.originalPriceStopLoss&&Number(t.originalPriceStopLoss).toFixed(6)!==Number(t.priceStopLoss).toFixed(6)&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[R(t.originalPriceStopLoss),"$"]})]}),"pnl"in t&&a(x,{variant:"body2",component:"span",sx:{fontWeight:"medium"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"Invested:"}),R(t.pnl.pnlEntries),"$"]}),"pnl"in t&&a(x,{variant:"body2",component:"span",sx:{fontWeight:"bold",px:1,py:.5,borderRadius:1,background:t.pnl.pnlPercentage>=0?P("#4caf50",.15):P("#f44336",.15),color:t.pnl.pnlPercentage>=0?"#2e7d32":"#c62828"},children:["PNL: ",t.pnl.pnlPercentage>=0?"+":"",t.pnl.pnlPercentage.toFixed(2),"%"," / ",t.pnl.pnlCost>=0?"+":"",R(t.pnl.pnlCost),"$"]}),t.totalEntries>1&&a(x,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:P("#2196f3",.15),color:"#1565c0"},children:["DCA×",t.totalEntries]}),t.totalPartials>0&&a(x,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:P("#9c27b0",.15),color:"#6a1b9a"},children:["Partial×",t.totalPartials]}),a(x,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:"opened"===t.status?P("#4caf50",.2):"scheduled"===t.status?P("#ff9800",.2):"closed"===t.status?P("#9e9e9e",.2):P("#f44336",.2),color:"opened"===t.status?"#2e7d32":"scheduled"===t.status?"#e65100":"closed"===t.status?"#616161":"#c62828"},children:t.status})]}),secondary:a(x,{pt:.5,variant:"subtitle2",sx:{opacity:.5},children:(i=t.createdAt,new Date(i).toLocaleString([],{year:"numeric",month:"numeric",day:"numeric",hourCycle:"h24",hour:"2-digit",minute:"2-digit",second:"2-digit"}))})}),a(F,{disableRipple:!0,children:a(z,{})})]},`item-${e}-${t.id}`);var i})}):a(u,{children:a(b,{sx:{"& .MuiTypography-body2":{maxWidth:"435px"}},primary:"No signals",secondary:"Signals will be displayed here after they appear"})})};return r?null:a(S,{ref:t,sx:{width:"100%",maxHeight:n.height,overflowX:"hidden",overflowY:"auto",scrollbarWidth:"thin",bgcolor:"background.paper",position:"relative","& ul":{padding:0}},subheader:a("li",{}),children:a(m,{deps:[T],children:async()=>{const o=Object.keys(T),t=await c.symbolGlobalService.getSymbolMap();return o.length?o.map(e=>{var o,n,i;const r=(null==(o=t[e])?void 0:o.color)||"#ccc",s=(null==(n=T[e])?void 0:n.length)||0;return a("li",{children:a("ul",{children:[a(g,{sx:{background:(l=r,w(l,"#000000")>w(l,"#FFFFFF")?f(r,.1):k(r,.1)),color:"white !important",zIndex:9,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[a(y,{sx:{position:"relative",paddingRight:"8px"},children:a(j,{symbol:e})}),(null==(i=t[e])?void 0:i.displayName)||e,a(y,{flex:1}),a(x,{variant:"body2",sx:{fontWeight:"medium"},children:v(s,{one:"Signal",two:"Signals",many:"Signals"})})]}),a(y,{sx:{marginTop:"16px",marginBottom:"16px"},children:W(e)})]})},`section-${e}`);var l}):a(u,{children:a(b,{primary:"No signals yet",secondary:"live"===e?"Live signals will be displayed here":"Backtest signals will be displayed here"})})}})})},U=D(),G=(e,a)=>e.some(e=>e.includes(a)),K=[{id:"backtest",element:M,isActive:e=>G(["/backtest"],e)},{id:"live",element:M,isActive:e=>G(["/live"],e)}],_=[{id:"backtest",label:"Backtest"},{id:"live",label:"Live"}],q=()=>{p(()=>U.replace("/backtest"));return a(T,{children:[a(N,{withScroll:!0,sx:{height:"calc(100vh - 105px)"},BeforePaper:I,onLoadStart:()=>c.layoutService.setAppbarLoader(!0),onLoadEnd:()=>c.layoutService.setAppbarLoader(!1),routes:K,tabs:_,history:U,initialData:()=>({backtest:{type:"backtest"},live:{type:"live"}}),onTabChange:(e,a)=>{"backtest"===e&&a.replace("/backtest"),"live"===e&&a.replace("/live")}}),a(C,{})]})};export{q as OverviewPage,q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as e,b as t,d as a,f as o,r,u as n,_ as i,e as s,I as l,C as c,h as d,j as p,k as h,s as v,l as m,m as u,n as g,T as f,o as y,B as w,M as $,t as x,p as b,q as S,D as z,v as C,w as P,i as L,x as M,z as k,y as A,A as N,E as V,G as R,L as D,H,J as T,K as F,N as I,O as B,Q as W,R as E,U as O,V as j,W as Y,X as J,Y as _,Z as G,$ as U,a0 as q,a1 as Z,a2 as K,a3 as Q,a4 as X,a5 as ee,a6 as te,a7 as ae}from"./index-DQ0Y8Jqw.js";import{r as oe}from"./emitters-k6IxEkD1.js";import{C as re,R as ne}from"./Refresh-BIf7i5Ab.js";function ie(t){return e("MuiAlert",t)}const se=t("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),le=a(o("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),ce=a(o("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),de=a(o("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),pe=a(o("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),he=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],ve=v(m,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,t[a.variant],t[`${a.variant}${p(a.color||a.severity)}`]]}})(({theme:e,ownerState:t})=>{const a="light"===e.palette.mode?u:g,o="light"===e.palette.mode?g:u,r=t.color||t.severity;return s({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},r&&"standard"===t.variant&&{color:e.vars?e.vars.palette.Alert[`${r}Color`]:a(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:o(e.palette[r].light,.9),[`& .${se.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}},r&&"outlined"===t.variant&&{color:e.vars?e.vars.palette.Alert[`${r}Color`]:a(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${se.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}},r&&"filled"===t.variant&&s({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}))}),me=v("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),ue=v("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),ge=v("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),fe={success:o(le,{fontSize:"inherit"}),warning:o(ce,{fontSize:"inherit"}),error:o(de,{fontSize:"inherit"}),info:o(pe,{fontSize:"inherit"})},ye=r.forwardRef(function(e,t){var a,r,v,m,u,g;const f=n({props:e,name:"MuiAlert"}),{action:y,children:w,className:$,closeText:x="Close",color:b,components:S={},componentsProps:z={},icon:C,iconMapping:P=fe,onClose:L,role:M="alert",severity:k="success",slotProps:A={},slots:N={},variant:V="standard"}=f,R=i(f,he),D=s({},f,{color:b,severity:k,variant:V}),H=(e=>{const{variant:t,color:a,severity:o,classes:r}=e,n={root:["root",`${t}${p(a||o)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return h(n,ie,r)})(D),T=null!=(a=null!=(r=N.closeButton)?r:S.CloseButton)?a:l,F=null!=(v=null!=(m=N.closeIcon)?m:S.CloseIcon)?v:c,I=null!=(u=A.closeButton)?u:z.closeButton,B=null!=(g=A.closeIcon)?g:z.closeIcon;return o(ve,s({role:M,elevation:0,ownerState:D,className:d(H.root,$),ref:t},R,{children:[!1!==C?o(me,{ownerState:D,className:H.icon,children:C||P[k]||fe[k]}):null,o(ue,{ownerState:D,className:H.message,children:w}),null!=y?o(ge,{ownerState:D,className:H.action,children:y}):null,null==y&&L?o(ge,{ownerState:D,className:H.action,children:o(T,s({size:"small","aria-label":x,title:x,color:"inherit",onClick:L},I,{children:o(F,s({fontSize:"small"},B))}))}):null]}))}),we=a([o("path",{d:"M13 17c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6V5H5v14h14v-2h-6z",opacity:".3"}),o("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.38-1-1.72zM20 9v6h-7V9h7zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2H5z"}),o("circle",{cx:"16",cy:"12",r:"1.5"})],"AccountBalanceWalletTwoTone"),$e=a([o("path",{d:"M8 6h8v6H8zm11 8H5c-.55 0-1 .45-1 1v3h16v-3c0-.55-.45-1-1-1zm-1 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z",opacity:".3"}),o("path",{d:"M19 12h-1V4H6v8H5c-1.66 0-3 1.34-3 3v5h20v-5c0-1.66-1.34-3-3-3zM8 6h8v6H8V6zm12 12H4v-3c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v3z"}),o("circle",{cx:"18",cy:"16",r:"1"})],"AdfScannerTwoTone"),xe=a([o("path",{d:"M9 4H7v2H5v12h2v2h2v-2h2V6H9V4zm0 12H7V8h2v8z"}),o("path",{d:"M7 8h2v8H7zm8 2h2v3h-2z",opacity:".3"}),o("path",{d:"M19 8h-2V4h-2v4h-2v7h2v5h2v-5h2V8zm-2 5h-2v-3h2v3z"})],"CandlestickChartTwoTone"),be=a([o("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8zm0 14.5c-.83 0-1.5-.67-1.5-1.5h3c0 .83-.67 1.5-1.5 1.5zm5-2.5H7v-2h1v-2.61C8 9.27 9.03 7.47 11 7v-.5c0-.57.43-1 1-1s1 .43 1 1V7c1.97.47 3 2.28 3 4.39V14h1v2z",opacity:".3"}),o("path",{d:"M12 18.5c.83 0 1.5-.67 1.5-1.5h-3c0 .83.67 1.5 1.5 1.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4-8.61c0-2.11-1.03-3.92-3-4.39v-.5c0-.57-.43-1-1-1s-1 .43-1 1V7c-1.97.47-3 2.27-3 4.39V14H7v2h10v-2h-1v-2.61zM14 14h-4v-3c0-1.1.9-2 2-2s2 .9 2 2v3z"})],"CircleNotificationsTwoTone"),Se=a(o("path",{d:"M21.5 14.98c-.02 0-.03 0-.05.01C21.2 13.3 19.76 12 18 12c-1.4 0-2.6.83-3.16 2.02C13.26 14.1 12 15.4 12 17c0 1.66 1.34 3 3 3l6.5-.02c1.38 0 2.5-1.12 2.5-2.5s-1.12-2.5-2.5-2.5zM10 4.26v2.09C7.67 7.18 6 9.39 6 12c0 1.77.78 3.34 2 4.44V14h2v6H4v-2h2.73C5.06 16.54 4 14.4 4 12c0-3.73 2.55-6.85 6-7.74zM20 6h-2.73c1.43 1.26 2.41 3.01 2.66 5h-2.02c-.23-1.36-.93-2.55-1.91-3.44V10h-2V4h6v2z"}),"CloudSync"),ze=a(o("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),Ce=a(o("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),Pe=a([o("path",{d:"M14 4H6v16h12V8h-4V4zm2 7v4c0 2.21-1.79 4-4 4s-4-1.79-4-4V9.5C8 8.12 9.12 7 10.5 7S13 8.12 13 9.5V15h-2V9.5c0-.28-.22-.5-.5-.5s-.5.22-.5.5V15c0 1.1.9 2 2 2s2-.9 2-2v-4h2z",opacity:".3"}),o("path",{d:"M14 15c0 1.1-.9 2-2 2s-2-.9-2-2V9.5c0-.28.22-.5.5-.5s.5.22.5.5V15h2V9.5C13 8.12 11.88 7 10.5 7S8 8.12 8 9.5V15c0 2.21 1.79 4 4 4s4-1.79 4-4v-4h-2v4z"}),o("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h8v4h4v12z"})],"FilePresentTwoTone"),Le=a([o("path",{d:"M19 5H5v14h14V5zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z",opacity:".3"}),o("path",{d:"M3 5v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2zm2 0h14v14H5V5zm2 5h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"})],"InsertChartTwoTone"),Me=a([o("path",{d:"M10 5h4v14h-4V5zm-6 6h4v8H4v-8zm16 8h-4v-6h4v6z",opacity:".3"}),o("path",{d:"M16 11V3H8v6H2v12h20V11h-6zm-6-6h4v14h-4V5zm-6 6h4v8H4v-8zm16 8h-4v-6h4v6z"})],"LeaderboardTwoTone"),ke=a(o(r.Fragment,{children:[o("path",{d:"M12 20c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zM10 7.5l6 4.5-6 4.5v-9z",opacity:".3"}),o("path",{d:"M12 22c5.52 0 10-4.48 10-10S17.52 2 12 2 2 6.48 2 12s4.48 10 10 10zm0-18c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8zm-2 3.5v9l6-4.5z"})]}),"PlayCircleFilledWhiteTwoTone"),Ae=a([o("path",{d:"M4 18h16V8H4v10zm8-3h6v2h-6v-2zm-5.91-4.59L7.5 9l4 4-4 4-1.41-1.41L8.67 13l-2.58-2.59z",opacity:".3"}),o("path",{d:"M12 15h6v2h-6z"}),o("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm0 14H4V8h16v10z"}),o("path",{d:"m7.5 17 4-4-4-4-1.41 1.41L8.67 13l-2.58 2.59z"})],"TerminalTwoTone"),Ne=b()(e=>({root:{marginTop:e.spacing(1),marginBottom:e.spacing(2),marginLeft:e.spacing(2),marginRight:e.spacing(3),background:"white",transition:"opacity 500ms","&:hover":{opacity:1},opacity:.35,cursor:"pointer"},open:{opacity:1},expandButton:{cursor:"pointer !important",marginLeft:e.spacing(1)},copyButton:{cursor:"pointer !important",marginRight:e.spacing(1)},downloadButton:{cursor:"pointer !important"}})),Ve=(e,t="%")=>null==e||Number.isNaN(e)?"—":`${e.toFixed(2)}${t}`,Re=e=>null==e||Number.isNaN(e)?"—":`${e.toFixed(1)} min`,De=e=>window.Translate?window.Translate.translateText(e):e,He=({data:e})=>{const{classes:t,cx:a}=Ne(),[n,i]=r.useState(!1),s=(e=>{const{context:t,portfolioTotalPnl:a,portfolioSharpeRatio:o,portfolioTotalTrades:r,portfolioStdDev:n,portfolioSortinoRatio:i,portfolioCalmarRatio:s,portfolioRecoveryFactor:l,portfolioExpectancy:c,portfolioAvgPeakPnl:d,portfolioAvgFallPnl:p,portfolioPeakProfitPnl:h,portfolioMaxDrawdownPnl:v,portfolioAvgDuration:m,portfolioMedianPnl:u,portfolioAvgConsecutiveWinPnl:g,portfolioAvgConsecutiveLossPnl:f,portfolioAvgWinDuration:y,portfolioAvgLossDuration:w,portfolioAnnualizedSharpeRatio:$,portfolioCertaintyRatio:x,portfolioExpectedYearlyReturns:b,portfolioTradesPerYear:S,symbols:z,backtest:C}=e,P=De(C?"Backtest":"Live"),L=t.frameName?` / ${t.frameName}`:"",M=[`## ${P}: ${t.strategyName} / ${t.exchangeName}${L}`,"",`**${De("Total PNL")}:** ${Ve(a)} `,`**Sharpe Ratio:** ${Ve(o,"")} `,`**${De("Annualized Sharpe")}:** ${Ve($,"")} `,`**${De("Certainty Ratio")}:** ${Ve(x,"")} `,`**${De("Expected Yearly Returns")}:** ${Ve(b)} `,`**${De("Trades Per Year")}:** ${null!==S?S.toFixed(1):"—"} `,`**${De("Total trades")}:** ${r} `,`**${De("Standard Deviation Per Trade")}:** ${Ve(n)} `,`**${De("Sortino Ratio")}:** ${Ve(i,"")} `,`**${De("Calmar Ratio")}:** ${Ve(s,"")} `,`**${De("Recovery Factor Per Equity Drawdown")}:** ${Ve(l,"")} `,`**${De("Expectancy")}:** ${Ve(c)} `,`**${De("Median PNL")}:** ${Ve(u)} `,`**${De("Avg Peak PNL")}:** ${Ve(d)} `,`**${De("Avg Drawdown PNL")}:** ${Ve(p)} `,`**${De("Peak Profit PNL")}:** ${Ve(h)} `,`**${De("Max Drawdown PNL")}:** ${Ve(v)} `,`**${De("Avg Duration")}:** ${Re(m)} `,`**${De("Avg Win Duration")}:** ${Re(y)} `,`**${De("Avg Loss Duration")}:** ${Re(w)} `,`**${De("Avg Consecutive Win PNL")}:** ${Ve(g)} `,`**${De("Avg Consecutive Loss PNL")}:** ${Ve(f)}`,""];for(const k of z)M.push(`### ${k.symbol}`,"",`**PNL:** ${Ve(k.totalPnl)} `,`**${De("Avg PNL")}:** ${Ve(k.avgPnl)} `,`**${De("Median PNL")}:** ${Ve(k.medianPnl)} `,`**Win Rate:** ${Ve(k.winRate)} `,`**Profit Factor:** ${Ve(k.profitFactor,"")} `,`**Max Drawdown:** ${Ve(k.maxDrawdown)} `,`**Expectancy:** ${Ve(k.expectancy)} `,`**Sharpe Ratio:** ${Ve(k.sharpeRatio,"")} `,`**Annualized Sharpe:** ${Ve(k.annualizedSharpeRatio,"")} `,`**Certainty Ratio:** ${Ve(k.certaintyRatio,"")} `,`**Expected Yearly Returns:** ${Ve(k.expectedYearlyReturns)} `,`**Trades Per Year:** ${null!==k.tradesPerYear?k.tradesPerYear.toFixed(1):"—"} `,`**Sortino Ratio:** ${Ve(k.sortinoRatio,"")} `,`**Calmar Ratio:** ${Ve(k.calmarRatio,"")} `,`**Recovery Factor Per Equity Drawdown:** ${Ve(k.recoveryFactor,"")} `,`**Standard Deviation:** ${Ve(k.stdDev)} `,`**Avg Win:** ${Ve(k.avgWin)} `,`**Avg Loss:** ${Ve(k.avgLoss)} `,`**Max Win Streak:** ${k.maxWinStreak} `,`**Max Loss Streak:** ${k.maxLossStreak} `,`**Avg Peak PNL:** ${Ve(k.avgPeakPnl)} `,`**Avg Drawdown PNL:** ${Ve(k.avgFallPnl)} `,`**Peak Profit PNL:** ${Ve(k.peakProfitPnl)} `,`**Max Drawdown PNL:** ${Ve(k.maxDrawdownPnl)} `,`**Avg Duration:** ${Re(k.avgDuration)} `,`**Avg Win Duration:** ${Re(k.avgWinDuration)} `,`**Avg Loss Duration:** ${Re(k.avgLossDuration)} `,`**Avg Consecutive Win PNL:** ${Ve(k.avgConsecutiveWinPnl)} `,`**Avg Consecutive Loss PNL:** ${Ve(k.avgConsecutiveLossPnl)} `,`**${De("Trades")}:** ${k.totalTrades}`,"");return M.join("\n")})(e),c=()=>{i(!n)},d=async e=>{e.stopPropagation(),await M(s)},p=async e=>{e.stopPropagation(),await P(s)&&L.alertService.notify("Copied!")};return o(ye,{className:a(t.root,{[t.open]:n}),action:o(C,{children:[o(l,{className:t.copyButton,onClick:p,size:"small",children:o(S,{})}),o(l,{className:t.downloadButton,onClick:d,size:"small",children:o(z,{})}),o(l,{className:t.expandButton,onClick:c,size:"small",children:o(n?ze:Ce,{})})]}),onClick:c,variant:"outlined",severity:"info",children:o(f,{minHeight:"100%",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",children:[o(f,{variant:"body2",sx:{opacity:n?.5:1,transition:"opacity 500ms"},minHeight:"100%",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",children:[e.backtest?"Backtest":"Live",": ",e.context.strategyName]}),o(y,{in:n,timeout:"auto",unmountOnExit:!0,children:[o(w,{paddingBottom:"16px"}),o($,{content:s}),o(w,{paddingBottom:"32px"})]}),!n&&o(f,{variant:"caption",sx:{opacity:.7,mt:1},children:[x(s).slice(0,150),"..."]})]})})},Te="backtest-kit__groupHeader",Fe="backtest-kit__groupRoot",Ie="backtest-kit__symbolImage",Be=b()({root:{[`& .${Fe}:hover .${Te}`]:{opacity:"1 !important"}}});function We(e){return te(e,"#000000")>te(e,"#FFFFFF")}const Ee=[{type:j.Component,element:()=>{const{reloadTrigger:e,doReload:t}=k(15e3),[a,{execute:r}]=A(async()=>{L.runtimeViewService.getRuntimeInfo.clear();const e=N(L.runtimeViewService.getRuntimeInfo,{defaultValue:null});return await e()},{onLoadStart:()=>L.layoutService.setAppbarLoader(!0),onLoadEnd:()=>L.layoutService.setAppbarLoader(!1),deps:[e]});V(()=>oe.subscribe(r));return o(H,{direction:"row",alignItems:"center",children:[o(R,{"aria-label":"breadcrumb",children:[o(D,{underline:"always",color:"inherit",href:"#",onClick:e=>e.preventDefault(),children:"Main"}),o(D,{underline:"always",color:"inherit",href:"#",onClick:e=>e.preventDefault(),children:"Navigation"})]}),o(w,{flex:1}),(()=>{if(!a)return null;const{symbol:e,when:r,currentPrice:n,backtest:i}=a;return o(W,{placement:"bottom",description:i?"Backtest mode":"Live mode",children:o(H,{direction:"row",alignItems:"center",spacing:1,sx:{display:{xs:"none",sm:"flex"},cursor:"pointer",userSelect:"none"},onClick:()=>{L.runtimeViewService.getRuntimeInfo.clear(),t()},children:[o(l,{size:"small",children:o(Se,{})}),o(f,{variant:"body2",sx:{opacity:.5},children:["Symbol:",T.nbsp,o("b",{children:e})]}),o(F,{orientation:"vertical",flexItem:!0}),o(f,{variant:"body2",sx:{opacity:.5},children:["Time:",T.nbsp,o("b",{children:I(r).format("HH:mm DD MMM YYYY")})]}),o(F,{orientation:"vertical",flexItem:!0}),o(f,{variant:"body2",sx:{opacity:.5},children:["Price:",T.nbsp,o("b",{children:[B(n,E(n)),"$"]})]})]})})})(),o(w,{pr:1})]})}}],Oe=[{action:"download-json",label:"Download Heatmap JSON",icon:()=>o(G,{icon:_,color:"#4caf50"})},{action:"download-markdown",label:"Download Heatmap Markdown",icon:()=>o(G,{icon:U,color:"#4caf50"})},{action:"download-pdf",label:"Download Heatmap PDF",icon:()=>o(G,{icon:q,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>o(G,{icon:ne,color:"#4caf50"})}],je=(e,t)=>({type:K.Group,className:Fe,sx:{p:2},desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fields:[{type:K.Component,className:Te,style:{transition:"opacity 500ms",opacity:.5},element:()=>o(H,{direction:"row",children:[o(Q,{variant:"outlined",size:"medium",color:"info",label:`${T.bullet} ${e}`,sx:{mb:1,pr:.5,fontSize:"16px",background:"white",cursor:"not-allowed"}}),o(w,{flex:1})]})},{type:K.Group,fields:t.map(({label:e,description:t,to:a,color:r,icon:n})=>((e,t,a,r,n)=>({type:K.Component,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>o(W,{description:a,children:o(X,{component:ee,onClick:()=>{L.routerService.push(e)},sx:{width:"100%",background:r,color:"white",fontWeight:"bold",fontSize:"18px",height:"75px",minHeight:"125px",textWrap:"wrap",padding:"16px",[`& .${Ie}`]:{transition:"filter 500ms"},"&:hover":{background:()=>We(r)?u(r,.33):g(r,.33),[`& .${Ie}`]:{transition:"filter 500ms",filter:We(r)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:o(n,{className:Ie}),children:t})})}))(a,e,t,r,n))}]}),Ye=[{label:"Portfolio Overview",description:ae.newline("Closed trading signals grouped by symbol for Backtest and Live modes","Each card shows position type, entry price, TP/SL levels, PNL amount and percent","Displays DCA entry count and partial close count where applicable","Supports JSON export and manual refresh of the signal list"),to:"/overview",color:"#0033AD",icon:we},{label:"PNL Performance",description:ae.newline("KPI dashboard with aggregated trading performance metrics per symbol","Shows daily trade counts, success rates, resolved/rejected breakdowns","Revenue analytics across today, yesterday, 7-day and 31-day windows","Toggle between Backtest and Live modes; supports JSON export"),to:"/dashboard",color:"#E6007A",icon:Le},{label:"System Logs",description:ae.newline("Virtualized feed of runtime log entries with type badges: Debug, Info, Warn, Log","Each entry shows topic, timestamp and raw JSON arguments in monospace","Filter by keyword or regex via search prompt","Supports full log export as JSON file"),to:"/logs",color:"#58BF00",icon:Ae}],Je=[{label:"Notifications",description:ae.newline("Event feed for all trading signals: opens, closes, schedules, errors","Color-coded cards with symbol, position, PNL, entry/exit/TP/SL prices","Infinite-scroll pagination; click any card to open a detailed modal","Supports manual refresh to pull the latest activity"),to:"/notifications",color:"#F7931A",icon:be},{label:"Pending Status",description:ae.newline("Live view of active trading signals grouped by strategy","Grid of strategy buttons; click to inspect individual signal state","Detail view shows entry, exit, effective price, DCA and partial counts","Supports per-signal JSON export and manual refresh"),to:"/status",color:"#6F42C1",icon:ke},{label:"Dump Explorer",description:ae.newline("Tree-structured file browser for backtest output and artifact files","Icons indicate file type: image, JSON, plain text or generic","Click any file to open a full-screen preview modal","Supports keyword search and manual refresh of the file tree"),to:"/dump",color:"#0090FF",icon:Pe}],_e=[{label:"Markdown Reports",description:ae.newline("Strategy performance reports rendered from markdown for Backtest and Live runs","Grid of strategy buttons grouped by type and sorted by signal volume","Download reports as markdown, PDF or raw JSON","Supports manual refresh to regenerate report content"),to:"/report",color:"#009688",icon:$e},{label:"Price Charts",description:ae.newline("Interactive candlestick charts powered by TradingView Lightweight Charts","Navigate by symbol then interval (1m, 15m, 1h) to view price history","Overlays active signal lines: entry, take profit (green) and stop loss (red)","Supports chart image export and signal detail inspection"),to:"/price_chart",color:"#1565C0",icon:xe},{label:"Heatmap",description:ae.newline("Color-coded performance heatmap across all tracked symbols","Cells show win rate, profit factor, Sharpe ratio and other key metrics","Download heatmap as JSON, markdown report or PDF","Supports manual refresh to recalculate aggregated statistics"),to:"/heat",color:"#8D6E63",icon:Me}],Ge=[je("Application",Ye),je("Live",Je),je("Other",_e)],Ue=()=>o(Z,{sx:{width:"100%",height:"75px"}}),qe=()=>{const{classes:e}=Be();return o(re,{children:[o(O,{items:Ee,actions:Oe,onAction:async e=>{"update-now"===e&&await(async()=>{L.statusViewService.getStatusInfo.clear(),oe.next()})(),"download-markdown"===e&&await(async()=>{const e=await L.heatViewService.getStrategyHeatReport(),t=new Blob([e],{type:"text/plain"}),a=URL.createObjectURL(t);L.layoutService.downloadFile(a,`heat_${Date.now()}.md`)})(),"download-pdf"===e&&await(async()=>{const e=await L.heatViewService.getStrategyHeatReport();await M(e)})(),"download-json"===e&&await(async()=>{const e=await L.heatViewService.getStrategyHeatData(),t=JSON.stringify(e,null,2),a=new Blob([t],{type:"text/plain"}),o=URL.createObjectURL(a);L.layoutService.downloadFile(o,`heat_${Date.now()}.json`)})()}}),o(Y,{Loader:Ue,reloadSubject:oe,children:async()=>{const e=await L.statusViewService.getStatusInfo();return e?o(He,{data:e}):null}}),o(J,{className:e.root,fields:Ge,payload:()=>({history:history})}),o(w,{paddingBottom:"24px"})]})};export{qe as MainPage,qe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e,f as o,z as t,y as i,i as a,U as n,V as l,p as s,a2 as r,Z as c,T as p,b2 as d,X as m,B as u,v as h,a3 as b,J as y,H as f,a5 as g,m as k,n as v,a4 as C,a6 as S,r as x,aD as L,bz as w,bA as P,bB as T,bC as V,bD as $,bE as H,N as z,O as M,R as N,al as O,E as A,bk as _,a$ as E,K as I,l as R,a1 as F,az as j,bF as D,a8 as G,aI as B,aJ as U,b3 as W,ag as Y,I as J,ad as K,D as X,aj as Z}from"./index-DQ0Y8Jqw.js";import{h as q}from"./hasRouteMatch-Bo3n95qK.js";import{I as Q}from"./IconPhoto-DBNRgcFh.js";import{C as ee,R as oe}from"./Refresh-BIf7i5Ab.js";import{K as te}from"./KeyboardArrowLeft-BcNNsJIG.js";const ie=e([o("path",{d:"M5 19h14V5H5v14zm4-4h4v-2h-2v-2h2V9H9V7h4c1.1 0 2 .89 2 2v1.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15c0 1.11-.9 2-2 2H9v-2z",opacity:".3"}),o("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V9c0-1.11-.9-2-2-2H9v2h4v2h-2v2h2v2H9v2h4c1.1 0 2-.89 2-2z"})],"Looks3TwoTone"),ae=e([o("path",{d:"M19 5H5v14h14V5zm-5 12h-2V9h-2V7h4v10z",opacity:".3"}),o("path",{d:"M5 21h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2zM5 5h14v14H5V5zm5 4h2v8h2V7h-4z"})],"LooksOneTwoTone"),ne=e([o("path",{d:"M19 5H5v14h14V5zm-4 6c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 2v2z",opacity:".3"}),o("path",{d:"M5 21h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2zM5 5h14v14H5V5zm8 2H9v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2h-4v-2h2c1.1 0 2-.89 2-2V9c0-1.11-.9-2-2-2z"})],"LooksTwoTwoTone"),le="backtest-kit__groupHeader",se="backtest-kit__groupRoot",re="backtest-kit__symbolImage",ce=s()({root:{[`& .${se}:hover .${le}`]:{opacity:"1 !important"}}});function pe(e){return S(e,"#000000")>S(e,"#FFFFFF")}const de=[{type:l.Link,action:"back-action",label:o(te,{sx:{display:"block"}})},{type:l.Link,action:"back-action",label:"Main"},{type:l.Link,action:"back-action",label:"Price Chart"}],me=[{action:"update-now",label:"Refresh",icon:()=>o(c,{icon:oe,color:"#4caf50"})}],ue=(e,t)=>({type:r.Group,className:se,sx:{p:2},tabletColumns:"12",desktopColumns:"3",fields:[{type:r.Component,className:le,style:{transition:"opacity 500ms",opacity:.5},element:()=>o(f,{direction:"row",children:[o(b,{variant:"outlined",size:"small",color:"info",label:`${y.bullet} ${e}`,sx:{mb:1,pr:.5,fontSize:"14px",background:"white",cursor:"not-allowed"}}),o(u,{flex:1})]})},{type:r.Group,fields:t.map(({symbol:e,label:t,color:i})=>((e,t,i)=>({type:r.Component,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>o(C,{component:g,onClick:()=>{a.routerService.push(`/price_chart/${e.toLowerCase()}`)},sx:{width:"100%",background:i,color:"white",fontWeight:"bold",fontSize:"14px",height:"75px",minHeight:"75px",textWrap:"wrap",padding:"16px",[`& .${re}`]:{transition:"filter 500ms"},"&:hover":{background:()=>pe(i)?k(i,.33):v(i,.33),[`& .${re}`]:{transition:"filter 500ms",filter:pe(i)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:o(Q,{className:re,symbol:e}),children:o(u,{sx:{overflow:"hidden",textOverflow:"ellipsis",width:"75px"},children:t})})}))(e,t,i))}]}),he="backtest-kit__groupHeader",be="backtest-kit__groupRoot",ye="backtest-kit__symbolImage",fe=s()({root:{[`& .${be}:hover .${he}`]:{opacity:"1 !important"}}});function ge(e){return S(e,"#000000")>S(e,"#FFFFFF")}const ke=[{type:l.Link,action:"back-action",label:o(te,{sx:{display:"block"}})},{type:l.Link,action:"back-action",label:"Main"},{type:l.Link,action:"back-action",label:"Price Chart"},{type:l.Link,action:"back-action",compute:e=>String(e).toUpperCase()}],ve=(e,t)=>({type:r.Group,className:be,sx:{p:2},desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fields:[{type:r.Component,className:he,style:{transition:"opacity 500ms",opacity:.5},element:()=>o(f,{direction:"row",children:[o(b,{variant:"outlined",size:"medium",color:"info",label:`${y.bullet} ${e}`,sx:{mb:1,pr:.5,fontSize:"16px",background:"white",cursor:"not-allowed"}}),o(u,{flex:1})]})},{type:r.Group,fields:t.map(({label:e,to:t,color:i,icon:n})=>((e,t,i,n)=>({type:r.Component,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>o(C,{component:g,onClick:()=>{a.routerService.push(e)},sx:{width:"100%",background:i,color:"white",fontWeight:"bold",fontSize:"18px",height:"75px",minHeight:"125px",textWrap:"wrap",padding:"16px",[`& .${ye}`]:{transition:"filter 500ms"},"&:hover":{background:()=>ge(i)?k(i,.33):v(i,.33),[`& .${ye}`]:{transition:"filter 500ms",filter:ge(i)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:o(n,{className:ye}),children:t})}))(t,e,i,n))}]}),Ce=s()({root:{position:"relative"},tooltip:{position:"absolute",margin:0,left:5,top:5,backgroundColor:"#343434",zIndex:999,color:"white",fontWeight:"bold",padding:"5px 10px",borderRadius:3,fontSize:"12px",pointerEvents:"none",touchAction:"none"}}),Se={layout:{textColor:"#d4d4d8",backgroundColor:"#ffffff"},rightPriceScale:{scaleMargins:{top:.3,bottom:.25}},crosshair:{vertLine:{width:4,color:"#ebe0e301",style:0},horzLine:{visible:!1,labelVisible:!1}},grid:{vertLines:{color:"#f8b3"},horzLines:{color:"#f8b3"}},handleScroll:{vertTouchDrag:!1}},xe=({height:e,width:t,items:i,position:a,priceOpen:n,priceStopLoss:l,priceTakeProfit:s})=>{const{classes:r}=Ce(),c=x.useRef(void 0),[p,d]=x.useState(null);return x.useLayoutEffect(()=>{const{current:o}=c,r=L(o,{...Se,localization:{priceFormatter:e=>M(e,N(e))},width:t,height:e,crosshair:{mode:w.Normal,vertLine:{labelVisible:!1},horzLine:{visible:!1,labelVisible:!0}},timeScale:{timeVisible:!0,secondsVisible:!0,tickMarkFormatter:e=>{const o=i.find(o=>o.timestamp===Number(e))||i[0];if(!o||!o.timestamp)return"Invalid date";const t=z(o.timestamp);return t.isValid()?t.format("HH:mm:ss"):"Invalid date"}}}),p=r.addLineSeries({lastValueVisible:!1,color:P[400]}),m=i.map(e=>({time:Math.floor(e.timestamp),value:parseFloat(e.close)}));if(p.setData(m),a&&n){const e="long"===a?P[700]:V[700];p.createPriceLine({price:n,color:e,lineWidth:2,lineStyle:T.Solid,axisLabelVisible:!0,title:"long"===a?"LONG Entry":"SHORT Entry"})}return l&&p.createPriceLine({price:l,color:$[500],lineWidth:2,lineStyle:T.Solid,axisLabelVisible:!0,title:"SL"}),s&&p.createPriceLine({price:s,color:H[500],lineWidth:2,lineStyle:T.Solid,axisLabelVisible:!0,title:"TP"}),r.subscribeCrosshairMove(e=>{if(e.time){const o=i.find(o=>o.timestamp===Number(e.time));if(o){const e=z(o.timestamp).format("DD/MM/YYYY HH:mm:ss"),t=M(o.close,N(o.close));d(`${e}: ${t}`)}else d(null)}else d(null)}),r.timeScale().fitContent(),()=>{r.remove()}},[e,t,i]),o("div",{ref:c,className:r.root,children:p&&o("div",{className:r.tooltip,children:p})})},Le={"1m":"#2979ff","15m":"#f3a43a","1h":"#d500f9"},we={"1m":"1 minute","15m":"15 minutes","1h":"1 hour"};const Pe=({symbol:e,interval:t,reloadSubject:n,downloadSubject:l,onInfoClick:s,disableInfo:r,position:c,priceOpen:d,priceStopLoss:m,priceTakeProfit:h,sx:y})=>{const[f,{loading:g,execute:k}]=i(async()=>await a.exchangeViewService.getLastCandles(e,t),{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[e,t]}),v=O(f);A(()=>n.subscribe(k)),A(()=>l.subscribe(()=>{const{current:o}=v;!function(e,o="data.json"){const t=new Blob([e],{type:"application/json"}),i=window.URL.createObjectURL(t);a.layoutService.downloadFile(i,o)}(JSON.stringify(o,null,2),`${e}-${t}.json`)}));return o(R,{sx:{...y,display:"flex",flexDirection:"column",alignItems:"stretch",overflow:"clip"},children:[o(u,{sx:{background:Le[t]||"#607d8b",minHeight:"48px",display:"flex",alignItems:"center",pl:2,pr:1},children:[o(p,{variant:"h6",sx:{color:"white",fontWeight:"bold",mr:1},children:we[t]||t}),!!c&&o(b,{variant:"filled",sx:{color:"white"},color:"short"===c?"warning":"success",label:String(c).toUpperCase()}),o(u,{sx:{flex:1}}),o(_,{disabled:r,onClick:s,children:o(E,{style:{color:"white",opacity:r?.5:1}})})]}),o(I,{}),!f||g?o(F,{sx:{height:"100%",width:"100%"}}):o(u,{sx:{position:"relative",flex:1},children:o(j,{style:{position:"absolute"},children:({height:e,width:t})=>o(xe,{items:f,height:e,width:t,position:c,priceOpen:d,priceStopLoss:m,priceTakeProfit:h})})})]})},Te=[{type:l.Link,action:"back-action",label:o(te,{sx:{display:"block"}})},{type:l.Link,action:"back-action",label:"Main"},{type:l.Link,action:"back-action",label:"Price Chart"},{type:l.Link,action:"back-action",compute:({symbol:e})=>String(e).toUpperCase()},{type:l.Link,action:"back-action",compute:({interval:e})=>String(e).toUpperCase()}],Ve=[{action:"download-now",label:"Download",icon:()=>o(c,{icon:X,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>o(c,{icon:oe,color:"#4caf50"})}],$e=new G,He=new G,ze=[{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"symbol",title:"Symbol",readonly:!0,compute:e=>e.symbol||"N/A"},{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"position",title:"Position",readonly:!0,compute:e=>"long"===e.position?"🔵 LONG (profit on rise)":"🟠 SHORT (profit on fall)"},{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"priceOpen",title:"Entry",readonly:!0,compute:e=>e.priceOpen?`${M(e.priceOpen)}$`:"N/A"},{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"originalPriceOpen",title:"Original Entry",readonly:!0,isVisible:e=>null!=e.originalPriceOpen&&e.originalPriceOpen!==e.priceOpen,compute:e=>e.originalPriceOpen?`${M(e.originalPriceOpen)}$`:"N/A"},{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"priceTakeProfit",title:"Take Profit",readonly:!0,compute:e=>e.priceTakeProfit?`${M(e.priceTakeProfit)}$`:"N/A"},{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"originalPriceTakeProfit",title:"Original Take Profit",readonly:!0,isVisible:e=>null!=e.originalPriceTakeProfit&&e.originalPriceTakeProfit!==e.priceTakeProfit,compute:e=>e.originalPriceTakeProfit?`${M(e.originalPriceTakeProfit)}$`:"N/A"},{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"priceStopLoss",title:"Stop Loss",readonly:!0,compute:e=>e.priceStopLoss?`${M(e.priceStopLoss)}$`:"N/A"},{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"originalPriceStopLoss",title:"Original Stop Loss",readonly:!0,isVisible:e=>null!=e.originalPriceStopLoss&&e.originalPriceStopLoss!==e.priceStopLoss,compute:e=>e.originalPriceStopLoss?`${M(e.originalPriceStopLoss)}$`:"N/A"},{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"totalEntries",title:"Total Entries",readonly:!0,isVisible:e=>null!=e.totalEntries&&e.totalEntries>1,compute:e=>String(e.totalEntries)},{type:r.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"totalPartials",title:"Total Closes",readonly:!0,isVisible:e=>null!=e.totalPartials&&e.totalPartials>0,compute:e=>String(e.totalPartials)},{type:r.Component,sx:{mt:2},element:({payload:e})=>o(C,{variant:"outlined",onClick:e.handleClose,children:"Back"})}],Me=[{id:"chart",element:({params:e})=>{const t=D(()=>({symbol:String(e.symbol).toUpperCase(),interval:e.interval})),[l,{loading:s,execute:r}]=i(async()=>{const o=String(e.symbol).toUpperCase();return await a.signalViewService.getPendingSignal(o)},{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[e.symbol]});A(()=>$e.subscribe(r));const c=x.useMemo(()=>l?l.priceTakeProfit:0,[l]),p=x.useMemo(()=>l?l.priceStopLoss:0,[l]),d=x.useMemo(()=>l?l.priceOpen:0,[l]),m=x.useMemo(()=>l?l.position:null,[l]),[u,h]=B(null),{pickData:b,setOpen:y,render:g}=U({title:"Info",AfterTitle:({onClose:e})=>o(f,{direction:"row",gap:2,children:[o(Y,{onClick:()=>a.layoutService.pickSignal(u.current.id),variant:"outlined",children:"Show Details"}),o(J,{size:"small",onClick:e,children:o(K,{})})]}),payload:()=>({handleClose(){y(!1)}}),fields:ze,handler:()=>u.current,withActionButton:!1}),k=W(async()=>{l&&(h(l),b(l.id))});return o(ee,{children:[o(n,{items:Te,actions:Ve,payload:t,onAction:async o=>{"back-action"===o&&a.routerService.push(`/price_chart/${e.symbol}`),"update-now"===o&&await $e.next(),"download-now"===o&&await He.next()}}),s?null:o(Pe,{symbol:t.symbol,interval:t.interval,disableInfo:!l,reloadSubject:$e,downloadSubject:He,onInfoClick:k,position:m,priceOpen:d,priceStopLoss:p,priceTakeProfit:c,sx:{height:"calc(100dvh - 165px)"}}),g()]})},isActive:e=>q(["/price_chart/:symbol/:interval"],e)},{id:"coin",element:({params:e})=>{const{classes:t}=fe(),i=e.symbol,l=x.useMemo(()=>[{label:"1 minute",to:`/price_chart/${i}/1m`,color:"#2979ff",icon:ae},{label:"15 minutes",to:`/price_chart/${i}/15m`,color:"#f3a43a",icon:ne},{label:"1 hour",to:`/price_chart/${i}/1h`,color:"#d500f9",icon:ie}],[i]),s=x.useMemo(()=>[ve("Chart",l)],[l]);return o(ee,{children:[o(n,{items:ke,payload:i,onAction:e=>{"back-action"===e&&a.routerService.push("/price_chart")}}),o(m,{className:t.root,fields:s}),o(u,{paddingBottom:"24px"})]})},isActive:e=>q(["/price_chart/:symbol"],e)},{id:"main",element:()=>{const{classes:e}=ce(),{reloadTrigger:l,doReload:s}=t(),[c,{loading:b}]=i(async()=>await(async()=>{const[e,o]=await Promise.all([a.symbolGlobalService.getSymbolList(),a.symbolGlobalService.getSymbolMap()]),t={};e.forEach((e,i)=>{const a=o[e],n=i+1,l=(null==a?void 0:a.priority)||n;t[l]||(t[l]=[]),t[l].push({symbol:e,label:(null==a?void 0:a.displayName)||e,color:(null==a?void 0:a.color)||"#ccc"})});const i=Object.entries(t).map(([e,o])=>({priority:parseInt(e),routes:o})).sort(({priority:e,routes:{length:o}},{priority:t,routes:{length:i}})=>i-o||t-e),n=[],l=[],s=[];return i.forEach(({routes:e,priority:o},t)=>{const i=ue(`Priority ${o}`,e);t%2==0&&n.push(i),t%2==1&&l.push(i),s.push(i)}),s.length?[{type:r.Group,columns:"6",className:"tabletLeftColumn",phoneHidden:!0,desktopHidden:!0,fields:n},{type:r.Group,columns:"6",className:"tabletRightColumn",phoneHidden:!0,desktopHidden:!0,fields:l},{type:r.Group,columns:"12",className:"wideColumn",tabletHidden:!0,fields:s}]:[]})(),{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[l]});return o(ee,{children:[o(n,{items:de,actions:me,onAction:e=>{"back-action"===e&&a.routerService.push("/"),"update-now"===e&&s()}}),b||!c?o(d,{children:o(p,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):c.length?o(h,{children:[o(m,{className:e.root,fields:c},l),o(u,{paddingBottom:"24px"})]}):o(d,{children:o(p,{variant:"h6",sx:{opacity:.5},children:"No symbols found"})})]})},isActive:e=>q(["/price_chart"],e)}],Ne=({symbol:e,interval:t})=>o(Z,{history:a.routerService,onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),routes:Me,params:{symbol:e,interval:t}});export{Ne as PriceChartPage,Ne as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as t,T as e,J as a,by as o,a2 as n,l as i,p as l,y as r,i as c,E as s,U as d,V as p,Y as m,Z as y,$ as u,a0 as h,a1 as x,X as w,b7 as f,x as b,aj as g}from"./index-DQ0Y8Jqw.js";import{h as v}from"./hasRouteMatch-Bo3n95qK.js";import{r as R}from"./emitters-k6IxEkD1.js";import{I as S}from"./IconPhoto-DBNRgcFh.js";import{P as F}from"./PictureAsPdfOutlined-z3cPPLwg.js";import{C as A,R as L}from"./Refresh-BIf7i5Ab.js";import{K as N}from"./KeyboardArrowLeft-BcNNsJIG.js";const j=l()(t=>({root:{position:"relative",background:"#0001",overflow:"clip"},header:{position:"absolute",top:0,left:0,height:"48px",width:"calc(100% - 16px)",display:"flex",alignItems:"center",justifyContent:"space-between",marginLeft:"8px",marginRight:"8px"},container:{marginTop:"48px",width:"100%",background:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},content:{display:"flex",width:"100%",padding:t.spacing(1),paddingBottom:t.spacing(2),gap:10,flexDirection:"column"},avatar:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"128px",minWidth:"128px"}})),k=[{type:n.Text,columns:"6",name:"totalPnl",title:"Total PNL",compute:t=>null!==t.totalPnl?`${t.totalPnl.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"sharpeRatio",title:"Sharpe Ratio",compute:t=>null!==t.sharpeRatio?`${t.sharpeRatio.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"winRate",title:"Win Rate",compute:t=>null!==t.winRate?`${t.winRate.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"profitFactor",title:"Profit Factor",compute:t=>null!==t.profitFactor?t.profitFactor.toFixed(2):"N/A",readonly:!0},{type:n.Text,columns:"6",name:"maxDrawdown",title:"Max Drawdown",compute:t=>null!==t.maxDrawdown?`${t.maxDrawdown.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"expectancy",title:"Expectancy",compute:t=>null!==t.expectancy?`${t.expectancy.toFixed(2)}%`:"N/A",readonly:!0},{type:n.Text,columns:"6",name:"sortinoRatio",title:"Sortino Ratio",compute:t=>null!==t.sortinoRatio?t.sortinoRatio.toFixed(3):"N/A",readonly:!0},{type:n.Text,columns:"6",name:"calmarRatio",title:"Calmar Ratio",compute:t=>null!==t.calmarRatio?t.calmarRatio.toFixed(3):"N/A",readonly:!0},{type:n.Text,columns:"6",name:"recoveryFactor",title:"Recovery Factor",compute:t=>null!==t.recoveryFactor?t.recoveryFactor.toFixed(3):"N/A",readonly:!0},{type:n.Text,columns:"6",name:"totalTrades",title:"Trades",readonly:!0}],D=({row:n})=>{const{classes:l}=j();return t(i,{className:l.root,children:[t("div",{className:l.header,children:t(e,{variant:"h6",sx:{opacity:.8},children:`${a.bullet} ${n.symbol}`})}),t("div",{className:l.container,children:t("div",{className:l.content,children:[t("div",{className:l.avatar,children:t(S,{symbol:n.symbol,sx:{width:128,height:128}})}),t(o,{handler:()=>n,fields:k,sx:{mb:2}})]})})]})},T=[{type:p.Link,action:"back-action",label:t(N,{sx:{display:"block"}})},{type:p.Link,action:"back-action",label:"Dashboard"},{type:p.Link,action:"back-action",label:"Heatmap"},{type:p.Button,action:"download-pdf",label:"Download PDF",icon:F}],P=[{action:"download-json",label:"Download JSON",icon:()=>t(y,{icon:m,color:"#4caf50"})},{action:"download-markdown",label:"Download Markdown",icon:()=>t(y,{icon:u,color:"#4caf50"})},{action:"download-pdf",label:"Download PDF",icon:()=>t(y,{icon:h,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>t(y,{icon:L,color:"#4caf50"})}],C=[{id:"main",element:()=>{const[e,{loading:a,execute:o}]=r(async()=>(e=>{if(!e.length)return[{type:n.Typography,typoVariant:"h6",placeholder:"No data",sx:{textAlign:"center",opacity:.5,mt:4}}];const a=e.map(e=>({type:n.Group,desktopColumns:"4",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",child:{type:n.Component,element:()=>t(D,{row:e})}}));return a.length>2?a:[{type:n.Center,sx:t=>({[t.breakpoints.up("lg")]:{"@media (min-height: 900px)":{height:"calc(100dvh - 165px)","& > *":{transform:"translateY(-56px)"}}}}),fields:a}]})((await c.heatViewService.getStrategyHeatData()).symbols),{onLoadStart:()=>c.layoutService.setAppbarLoader(!0),onLoadEnd:()=>c.layoutService.setAppbarLoader(!1)});s(()=>R.subscribe(o));return t(A,{children:[t(d,{items:T,actions:P,onAction:async t=>{"back-action"===t&&c.routerService.push("/"),"update-now"===t&&await R.next(),"download-markdown"===t&&await(async()=>{const t=await c.heatViewService.getStrategyHeatReport(),e=new Blob([t],{type:"text/plain"}),a=URL.createObjectURL(e);c.layoutService.downloadFile(a,`heat_${Date.now()}.md`)})(),"download-pdf"===t&&await(async()=>{const t=await c.heatViewService.getStrategyHeatReport();await b(t)})(),"download-json"===t&&await(async()=>{const t=await c.heatViewService.getStrategyHeatData(),e=JSON.stringify(t,null,2),a=new Blob([e],{type:"text/plain"}),o=URL.createObjectURL(a);c.layoutService.downloadFile(o,`heat_${Date.now()}.json`)})()}}),!e||a?t(x,{sx:{height:"calc(100dvh - 165px)"}}):t(f,{withScrollbar:!0,sx:{height:"calc(100dvh - 165px)"},hideOverflowX:!0,children:t(w,{fields:e})})]})},isActive:t=>v(["/heat"],t)}],$=({id:e})=>t(g,{history:c.routerService,onLoadStart:()=>c.layoutService.setAppbarLoader(!0),onLoadEnd:()=>c.layoutService.setAppbarLoader(!1),routes:C,params:{id:e}});export{$ as HeatPage,$ as default};
|