@backtest-kit/ui 6.16.0 → 7.1.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/README.md +3 -1
- package/build/index.cjs +0 -2
- package/build/index.mjs +0 -2
- package/build/modules/frontend/build/3rdparty/qfchart_0.8.7/echarts.min.js +45 -45
- package/build/modules/frontend/build/3rdparty/qfchart_0.8.7/pinets.js +122 -21534
- package/build/modules/frontend/build/3rdparty/qfchart_0.8.7/qfchart.js +37 -3976
- package/build/modules/frontend/build/assets/{Article-DYhWfFAi.js → Article-C4UQxwWZ.js} +1 -1
- package/build/modules/frontend/build/assets/{Background-COpkJTP-.js → Background-CxbWw1Ud.js} +1 -1
- package/build/modules/frontend/build/assets/{IconPhoto-DUgsqsYP.js → IconPhoto-CQO1S6y0.js} +1 -1
- package/build/modules/frontend/build/assets/{KeyboardArrowLeft-BlwcBPHn.js → KeyboardArrowLeft-BI2k8xRQ.js} +1 -1
- package/build/modules/frontend/build/assets/{Refresh-aWduZclR.js → Refresh-UXSQ8IiW.js} +1 -1
- package/build/modules/frontend/build/assets/emitters-CQQC0XnS.js +1 -0
- package/build/modules/frontend/build/assets/hasRouteMatch-DSslqyi0.js +1 -0
- package/build/modules/frontend/build/assets/{html2canvas-Do8zi4tS.js → html2canvas-C3UwgAQV.js} +1 -1
- package/build/modules/frontend/build/assets/index-B-QL9HJi.js +1 -0
- package/build/modules/frontend/build/assets/index-BEFTWFv3.js +1 -0
- package/build/modules/frontend/build/assets/index-CmOWmwjE.js +1 -0
- package/build/modules/frontend/build/assets/index-CsiJpNoi.js +1 -0
- package/build/modules/frontend/build/assets/{index-lZGMPvrT.js → index-Cvubqa1L.js} +3 -3
- package/build/modules/frontend/build/assets/index-CxKLVnqz.js +1 -0
- package/build/modules/frontend/build/assets/index-DkFY3Vy5.js +1 -0
- package/build/modules/frontend/build/assets/{index-Ce2sQITf.js → index-DxeOxY_I.js} +9 -9
- package/build/modules/frontend/build/assets/index-M3LYmcX-.js +1 -0
- package/build/modules/frontend/build/assets/index-NxBMVjOv.js +1 -0
- package/build/modules/frontend/build/assets/index-T3P0DZX1.js +1 -0
- package/build/modules/frontend/build/assets/index-vox4evLO.js +1 -0
- package/build/modules/frontend/build/assets/{index.es-Cel98f_u.js → index.es-8J0skUK9.js} +1 -1
- package/build/modules/frontend/build/assets/{markdownit-22RgFULT.js → markdownit-VuWBTDGx.js} +1 -1
- package/build/modules/frontend/build/index.html +1 -1
- package/package.json +4 -4
- package/build/modules/frontend/build/assets/emitters-CSLNlyHG.js +0 -1
- package/build/modules/frontend/build/assets/hasRouteMatch-CImjW4Jf.js +0 -1
- package/build/modules/frontend/build/assets/index-7wQuV9F_.js +0 -1
- package/build/modules/frontend/build/assets/index-B_46G-d8.js +0 -1
- package/build/modules/frontend/build/assets/index-BfiWEbdc.js +0 -1
- package/build/modules/frontend/build/assets/index-Bmqo1dsM.js +0 -1
- package/build/modules/frontend/build/assets/index-CETLG42q.js +0 -1
- package/build/modules/frontend/build/assets/index-Cb4CVVwH.js +0 -1
- package/build/modules/frontend/build/assets/index-CjymMd2D.js +0 -1
- package/build/modules/frontend/build/assets/index-D6YeBcAB.js +0 -1
- package/build/modules/frontend/build/assets/index-WhalaOXd.js +0 -1
- package/build/modules/frontend/build/assets/index-kQ_oUmTQ.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e,f as a,$ as o,z as t,y as n,D as i,G as r,a0 as s,a1 as l,i as c,a2 as d,a3 as p,a4 as h,J as m,a5 as b,a6 as u,a7 as g,B as y,T as v,a8 as x,l as f,n as k,a9 as S,Y as w,aa as L,ab as P,ac as z,I as R,ad as $,F as D,ae as j,af as C}from"./index-DxeOxY_I.js";import{R as T,C as W}from"./Refresh-UXSQ8IiW.js";import{K as F}from"./KeyboardArrowLeft-BI2k8xRQ.js";import{I as O}from"./IconPhoto-CQO1S6y0.js";import{B}from"./Background-CxbWw1Ud.js";const A=e(a("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard"),E=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"),H=new o,I=[{type:t.Link,action:"back-action",label:a(F,{sx:{display:"block"}})},{type:t.Link,action:"back-action",label:"Main"},{type:t.Link,action:"back-action",label:"Overview"}],M=[{action:"download-action",label:"Download",icon:()=>a(r,{icon:i,color:"#4caf50"})},{divider:!0},{action:"dashboard-action",label:"Dashboard",icon:()=>a(r,{icon:A,color:"#4caf50"})},{action:"logs-action",label:"Logs",icon:()=>a(r,{icon:E,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>a(r,{icon:T,color:"#4caf50"})}],N=()=>a(n,{items:I,actions:M,onAction:H.next});const V=({data:{type:e},setLoading:o})=>{const{elementRef:t,size:n}=s({closest:".MuiContainer-root",compute:e=>(e.height-=150,e)}),[i,{loading:r,execute:j}]=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]}),C=d(i),T=d(e);p(()=>H.subscribe(e=>{if("update-now"===e&&j(),"download-action"===e){const e=new Blob([JSON.stringify(C.current,null,2)],{type:"application/json"}),a=URL.createObjectURL(e);c.layoutService.downloadFile(a,`signals_${T.current}_${Date.now()}.json`)}"dashboard-action"===e&&c.routerService.push(`/dashboard/${T.current}`),"logs-action"===e&&c.routerService.push("/logs"),"back-action"===e&&c.routerService.push("/main")}));const W=h.useMemo(()=>i?i.reduce((e,a)=>(e[a.symbol]||(e[a.symbol]=[]),e[a.symbol].push(a),e),{}):{},[i]),F=e=>{const o=W[e]||[];return o.length?a(D,{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(u,{primary:a(y,{sx:{display:"flex",gap:1,flexWrap:"wrap",alignItems:"center"},children:[a(v,{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(v,{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(v,{variant:"body2",component:"span",sx:{fontWeight:"medium"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"Entry:"}),z(t.priceOpen),"$",t.originalPriceOpen!==t.priceOpen&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[z(t.originalPriceOpen),"$"]})]}),a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium",color:"success.main"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"TP:"}),z(t.priceTakeProfit),"$",t.originalPriceTakeProfit!==t.priceTakeProfit&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[z(t.originalPriceTakeProfit),"$"]})]}),a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium",color:"error.main"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"SL:"}),z(t.priceStopLoss),"$",t.originalPriceStopLoss!==t.priceStopLoss&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[z(t.originalPriceStopLoss),"$"]})]}),"pnl"in t&&a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"Invested:"}),z(t.pnl.pnlEntries),"$"]}),"pnl"in t&&a(v,{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?"+":"",z(t.pnl.pnlCost),"$"]}),t.totalEntries>1&&a(v,{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(v,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:P("#9c27b0",.15),color:"#6a1b9a"},children:["Partial×",t.totalPartials]}),a(v,{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(v,{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(R,{disableRipple:!0,children:a($,{})})]},`item-${e}-${t.id}`);var i})}):a(b,{children:a(u,{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:[W],children:async()=>{const o=Object.keys(W),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,s=(null==(n=W[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(O,{symbol:e})}),(null==(i=t[e])?void 0:i.displayName)||e,a(y,{flex:1}),a(v,{variant:"body2",sx:{fontWeight:"medium"},children:x(s,{one:"Signal",two:"Signals",many:"Signals"})})]}),a(y,{sx:{marginTop:"16px",marginBottom:"16px"},children:F(e)})]})},`section-${e}`);var l}):a(b,{children:a(u,{primary:"No signals yet",secondary:"live"===e?"Live signals will be displayed here":"Backtest signals will be displayed here"})})}})})},G=C(),J=(e,a)=>e.some(e=>e.includes(a)),K=[{id:"backtest",element:V,isActive:e=>J(["/backtest"],e)},{id:"live",element:V,isActive:e=>J(["/live"],e)}],U=[{id:"backtest",label:"Backtest"},{id:"live",label:"Live"}],Y=()=>{p(()=>G.replace("/backtest"));return a(W,{children:[a(j,{withScroll:!0,sx:{height:"calc(100vh - 105px)"},BeforePaper:N,onLoadStart:()=>c.layoutService.setAppbarLoader(!0),onLoadEnd:()=>c.layoutService.setAppbarLoader(!1),routes:K,tabs:U,history:G,initialData:()=>({backtest:{type:"backtest"},live:{type:"live"}}),onTabChange:(e,a)=>{"backtest"===e&&a.replace("/backtest"),"live"===e&&a.replace("/live")}}),a(B,{})]})};export{Y as OverviewPage,Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aU as a,a1 as t,i as e,f as o,y as i,z as n,w as s,N as r,G as c,T as l,aV as d,A as p,B as u,F as m,O as b,Q as y,R as h,W as g,l as f,n as S,V as v,Y as L,aW as k,aX as w,aY as x,x as A,a3 as N,$ as C,aZ as $,D as R,a_ as j,a$ as F}from"./index-DxeOxY_I.js";import{h as B}from"./hasRouteMatch-DSslqyi0.js";import{I as H}from"./IconPhoto-CQO1S6y0.js";import{C as M,R as V}from"./Refresh-UXSQ8IiW.js";import{K as _}from"./KeyboardArrowLeft-BI2k8xRQ.js";import{B as E}from"./Background-CxbWw1Ud.js";const G="backtest-kit__groupHeader",O="backtest-kit__groupRoot",z="backtest-kit__symbolImage",I=s()({root:{[`& .${O}:hover .${G}`]:{opacity:"1 !important"}}});function P(a){return L(a,"#000000")>L(a,"#FFFFFF")}const U=[{type:n.Link,action:"back-action",label:o(_,{sx:{display:"block"}})},{type:n.Link,action:"back-action",label:"Main"},{type:n.Link,action:"back-action",label:"Status"}],W=[{action:"update-now",label:"Refresh",icon:()=>o(c,{icon:V,color:"#4caf50"})}],D=(a,t)=>({type:r.Group,className:O,sx:{p:2},tabletColumns:"12",desktopColumns:"3",fields:[{type:r.Component,className:G,style:{transition:"opacity 500ms",opacity:.5},element:()=>o(h,{direction:"row",children:[o(b,{variant:"outlined",size:"small",color:"info",label:`${y.bullet} ${a}`,sx:{mb:1,pr:.5,fontSize:"14px",background:"white",cursor:"not-allowed"}}),o(u,{flex:1})]})},{type:r.Group,fields:t.map(({symbol:a,label:t,to:i,color:n})=>((a,t,i,n)=>({type:r.Component,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>o(v,{component:g,onClick:()=>{e.routerService.push(`/status/${t}`)},sx:{width:"100%",background:n,color:"white",fontWeight:"bold",fontSize:"14px",height:"75px",minHeight:"75px",textWrap:"wrap",padding:"16px",[`& .${z}`]:{transition:"filter 500ms"},"&:hover":{background:()=>P(n)?f(n,.33):S(n,.33),[`& .${z}`]:{transition:"filter 500ms",filter:P(n)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:o(H,{className:z,symbol:a}),children:i})}))(a,i,t,n))}]}),T=[{type:n.Link,action:"back-action",label:o(_,{sx:{display:"block"}})},{type:n.Link,action:"back-action",label:"Main"},{type:n.Link,action:"back-action",label:"Status"},{type:n.Link,action:"back-action",compute:a=>a?`${String(a.symbol).toUpperCase()} (${a.strategyName})`:"Live"},{type:n.Button,action:"print-action",label:"Print",icon:$}],K=[{action:"print-action",label:"Print",icon:()=>o(c,{icon:$,color:"#4caf50"})},{action:"download-action",label:"Download",icon:()=>o(c,{icon:R,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>o(c,{icon:V,color:"#4caf50"})}],Y=new C,J=[{id:"status",element:({params:a})=>{const[n]=t(async()=>{const t=await e.statusViewService.getStatusMap();return k.get(t,a.id,null)},{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[a.id]}),[s,{loading:r,execute:c}]=t(async()=>await e.statusViewService.getStatusOne(a.id),{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[a.id]}),b=w(async()=>{if(!s)return;const a=new Blob([JSON.stringify(s,null,2)],{type:"application/json"}),t=URL.createObjectURL(a);e.layoutService.downloadFile(t,`status_${Date.now()}.json`)}),y=w(async()=>{if(!s)return;const a=e.markdownHelperService.buildMarkdownFromFields(x,s);await A(a)});N(()=>Y.subscribe(c));return o(M,{children:[o(i,{items:T,actions:K,payload:n,onAction:async a=>{"back-action"===a&&((async()=>{1!==(await e.statusViewService.getStatusList()).length?e.routerService.push("/status"):e.routerService.push("/")})(),e.routerService.push("/")),"update-now"===a&&await Y.next(),"download-action"===a&&await b(),"print-action"===a&&await y()}}),r?o(d,{children:o(l,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):s?o(m,{children:[o(p,{handler:s,fields:j}),o(u,{paddingBottom:"24px"})]}):o(d,{children:o(l,{variant:"h6",sx:{opacity:.5},children:"No pending signal"})}),o(E,{})]})},isActive:a=>B(["/status/:id"],a)},{id:"main",element:()=>{const{classes:n}=I(),{reloadTrigger:s,doReload:c}=a();t(async()=>{const a=await e.statusViewService.getStatusList();if(1===a.length){const[{id:t}]=a;e.routerService.push(`/status/${t}`)}},{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[s]});const[b,{loading:y}]=t(async()=>await(async()=>{const[a,t]=await Promise.all([e.symbolGlobalService.getSymbolMap(),e.statusViewService.getStatusList()]);if(!t||0===t.length)return[{type:r.Typography,typoVariant:"h6",placeholder:"Listening for a pending signal...",sx:{textAlign:"center",opacity:.5,mt:4}}];const o={};t.forEach(t=>{const e=a[t.symbol],i=t.strategyName;o[i]||(o[i]=[]),o[i].push({symbol:t.symbol,label:(null==e?void 0:e.displayName)||t.symbol,color:(null==e?void 0:e.color)||"#ccc",to:t.id})});const i=Object.entries(o).sort(([,a],[,t])=>t.length-a.length),n=[],s=[],c=[];return i.forEach(([a,t],e)=>{const o=D(a,t);e%2==0?n.push(o):s.push(o),c.push(o)}),[{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:s},{type:r.Group,columns:"12",className:"wideColumn",tabletHidden:!0,fields:c}]})(),{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[s]});return o(M,{children:[o(i,{items:U,actions:W,onAction:a=>{"back-action"===a&&e.routerService.push("/"),"update-now"===a&&c()}}),y||!b?o(d,{children:o(l,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):b.length?o(m,{children:[o(p,{className:n.root,fields:b},s),o(u,{paddingBottom:"24px"})]}):o(d,{children:o(l,{variant:"h6",sx:{opacity:.5},children:"No pending signals"})})]})},isActive:a=>B(["/status"],a)}],Q=({id:a})=>o(F,{history:e.routerService,onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),routes:J,params:{id:a}});export{Q as StatusPage,Q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as e,b0 as t,M as a,B as i,b1 as r,b2 as o,i as n,b3 as l,b4 as s,aX as c,b5 as d,E as w,G as p,H as h,K as m,aS as k,b6 as g,au as b,b7 as v,af as u,b8 as y,aZ as f,ax as S,R as x,b9 as _,ai as D,x as V,aU as N,a1 as O,y as R,z as L,w as B,N as A,T as P,aV as C,A as $,F as M,O as J,Q as j,W as G,l as X,n as F,V as H,Y as E,a$ as I}from"./index-DxeOxY_I.js";import{h as z}from"./hasRouteMatch-DSslqyi0.js";import{I as T}from"./IconPhoto-CQO1S6y0.js";import{C as U,R as K}from"./Refresh-UXSQ8IiW.js";import{K as W}from"./KeyboardArrowLeft-BI2k8xRQ.js";const q=[{id:"backtest",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/backtest")},{id:"live",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/live")},{id:"breakeven",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/breakeven")},{id:"risk",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/risk")},{id:"partial",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/partial")},{id:"highest_profit",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/highest_profit")},{id:"max_drawdown",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/max_drawdown")},{id:"schedule",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/schedule")},{id:"performance",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/performance")},{id:"sync",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/sync")},{id:"heat",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/heat")},{id:"strategy",element:({data:r})=>e(i,{sx:{height:"100%",width:"100%",pt:1},children:e(t,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:e("div",{children:[e(a,{content:r||"# Нет данных"}),e(i,{sx:{paddingBottom:"65px"}})]})})}),isActive:e=>e.includes("/markdown_report/strategy")}],Q=[{id:"backtest",label:"Backtest",isVisible:({type:e})=>"backtest"===e},{id:"live",label:"Live",isVisible:({type:e})=>"live"===e},{id:"strategy",label:"Strategy"},{id:"breakeven",label:"Breakeven"},{id:"risk",label:"Risk"},{id:"partial",label:"Partial"},{id:"highest_profit",label:"Highest Profit"},{id:"max_drawdown",label:"Max Drawdown"},{id:"schedule",label:"Schedule"},{id:"performance",label:"Performance"},{id:"sync",label:"Sync"},{id:"heat",label:"Heat"}],Y=({disabled:t,className:a,style:i,sx:c,onClick:d,color:w})=>e(l,{className:a,style:i,sx:c,disabled:t,color:w,size:36,onClick:async e=>{const[t,{resolve:a}]=o();e.preventDefault(),e.stopPropagation(),await d(e,e=>a(e));const i=await t;await(async e=>{let t=!1;t=t||"string"==typeof e,t=t||"number"==typeof e,t=t||"boolean"==typeof e,t=t||void 0===e,t=t||null===e,t&&await s(String(e))})(i),n.alertService.notify("Copied!")},children:e(r,{})}),Z=[{action:"json",label:"Download JSON",icon:()=>e(p,{icon:w,color:"#4caf50"})},{action:"markdown",label:"Download Markdown",icon:()=>e(p,{icon:h,color:"#4caf50"})},{action:"pdf",label:"Download PDF",icon:()=>e(p,{icon:m,color:"#4caf50"})}],ee=({disabled:t,className:a,style:i,sx:r,onDownloadJson:o,onDownloadMarkdown:n,onDownloadPdf:l})=>{const s=c(async e=>{"json"===e?await o():"markdown"===e?await n():"pdf"===e&&await l()});return e(d,{transparent:!0,keepMounted:!0,className:a,style:i,sx:r,disabled:t,options:Z,onAction:s})},te=u(),ae=D(async(e,t)=>{const a=("backtest"===t?await n.backtestGlobalService.list():await n.liveGlobalService.list()).find(t=>t.id===e);if(!a)throw new Error(`Item not found: ${e}`);const{symbol:i,strategyName:r,exchangeName:o,frameName:l}=a,[s,c,d,w,p,h,m,k,g,b,v,u]=await Promise.all(["backtest"===t?n.markdownViewService.getBacktestReport(i,r,o,l):Promise.resolve(""),"live"===t?n.markdownViewService.getLiveReport(i,r,o):Promise.resolve(""),n.markdownViewService.getBreakevenReport(i,r,o,l,"backtest"===t),n.markdownViewService.getRiskReport(i,r,o,l,"backtest"===t),n.markdownViewService.getPartialReport(i,r,o,l,"backtest"===t),n.markdownViewService.getHighestProfitReport(i,r,o,l,"backtest"===t),n.markdownViewService.getMaxDrawdownReport(i,r,o,l,"backtest"===t),n.markdownViewService.getScheduleReport(i,r,o,l,"backtest"===t),n.markdownViewService.getPerformanceReport(i,r,o,l,"backtest"===t),n.markdownViewService.getSyncReport(i,r,o,l,"backtest"===t),n.markdownViewService.getHeatReport(r,o,l,"backtest"===t),n.markdownViewService.getStrategyReport(i,r,o,l,"backtest"===t)]);return{type:t,backtest:s,live:c,breakeven:d,risk:w,partial:p,highest_profit:h,max_drawdown:m,schedule:k,performance:g,sync:b,heat:v,strategy:u}},{timeout:45e3,key:([e,t])=>`${e}_${t}`}),ie=()=>{const[t,a]=k(""),[r,o]=k("backtest"),s=g(),{push:c,pop:d}=s,[w,p]=b(te.location.pathname),h=async()=>{const e=(await ae(t.current,r.current))[w.current.replace("/markdown_report/","")];"string"==typeof e&&await V(e)},m=async()=>{const e=await ae(t.current,r.current),a=w.current.replace("/markdown_report/",""),i=e[a];if("string"==typeof i){const e=new Blob([i],{type:"text/plain"}),t=URL.createObjectURL(e);n.layoutService.downloadFile(t,`${a}_${r.current}_${Date.now()}.md`)}},u=async()=>{const e=("backtest"===r.current?await n.backtestGlobalService.list():await n.liveGlobalService.list()).find(e=>e.id===t.current);if(!e)throw new Error(`Item not found: ${t.current}`);const{symbol:a,strategyName:i,exchangeName:o,frameName:l}=e,s=w.current.replace("/markdown_report/",""),c="backtest"===r.current;let d;if("backtest"===s?d=await n.markdownViewService.getBacktestData(a,i,o,l):"live"===s?d=await n.markdownViewService.getLiveData(a,i,o):"breakeven"===s?d=await n.markdownViewService.getBreakevenData(a,i,o,l,c):"risk"===s?d=await n.markdownViewService.getRiskData(a,i,o,l,c):"partial"===s?d=await n.markdownViewService.getPartialData(a,i,o,l,c):"highest_profit"===s?d=await n.markdownViewService.getHighestProfitData(a,i,o,l,c):"max_drawdown"===s?d=await n.markdownViewService.getMaxDrawdownData(a,i,o,l,c):"schedule"===s?d=await n.markdownViewService.getScheduleData(a,i,o,l,c):"performance"===s?d=await n.markdownViewService.getPerformanceData(a,i,o,l,c):"sync"===s?d=await n.markdownViewService.getSyncData(a,i,o,l,c):"heat"===s?d=await n.markdownViewService.getHeatData(i,o,l,c):"strategy"===s&&(d=await n.markdownViewService.getStrategyData(a,i,o,l,c)),void 0!==d){const e=new Blob([JSON.stringify(d,null,2)],{type:"application/json"}),t=URL.createObjectURL(e);n.layoutService.downloadFile(t,`${s}_${r.current}_${Date.now()}.json`)}},{pickData:D,render:N}=v({tabs:Q,withStaticAction:!0,onTabChange:(e,t)=>{const a=`/markdown_report/${e}`;t.replace(a),p(a)},animation:"none",title:"Markdown Report",sizeRequest:y,history:te,routes:q,BeforeTitle:({onClose:t})=>{const{total:a}=g();return e(i,{sx:{mr:1,display:1===a?"none":"flex"},children:e(l,{onClick:t,children:e(_,{})})})},AfterTitle:({onClose:a})=>e(x,{direction:"row",gap:1,children:[e(l,{sx:{mr:"10px"},onClick:()=>h(),children:e(f,{})}),e(Y,{onClick:async(e,a)=>{await(async(e,t,a,i)=>{const r=("backtest"===a?await n.backtestGlobalService.list():await n.liveGlobalService.list()).find(e=>e.id===t);if(!r)throw new Error(`Item not found: ${t}`);const{symbol:o,strategyName:l,exchangeName:s,frameName:c}=r,d="backtest"===a;e.includes("/markdown_report/backtest")?i(JSON.stringify(await n.markdownViewService.getBacktestData(o,l,s,c),null,2)):e.includes("/markdown_report/live")?i(JSON.stringify(await n.markdownViewService.getLiveData(o,l,s),null,2)):e.includes("/markdown_report/breakeven")?i(JSON.stringify(await n.markdownViewService.getBreakevenData(o,l,s,c,d),null,2)):e.includes("/markdown_report/risk")?i(JSON.stringify(await n.markdownViewService.getRiskData(o,l,s,c,d),null,2)):e.includes("/markdown_report/partial")?i(JSON.stringify(await n.markdownViewService.getPartialData(o,l,s,c,d),null,2)):e.includes("/markdown_report/highest_profit")?i(JSON.stringify(await n.markdownViewService.getHighestProfitData(o,l,s,c,d),null,2)):e.includes("/markdown_report/max_drawdown")?i(JSON.stringify(await n.markdownViewService.getMaxDrawdownData(o,l,s,c,d),null,2)):e.includes("/markdown_report/schedule")?i(JSON.stringify(await n.markdownViewService.getScheduleData(o,l,s,c,d),null,2)):e.includes("/markdown_report/performance")?i(JSON.stringify(await n.markdownViewService.getPerformanceData(o,l,s,c,d),null,2)):e.includes("/markdown_report/sync")?i(JSON.stringify(await n.markdownViewService.getSyncData(o,l,s,c,d),null,2)):e.includes("/markdown_report/heat")?i(JSON.stringify(await n.markdownViewService.getHeatData(l,s,c,d),null,2)):e.includes("/markdown_report/strategy")&&i(JSON.stringify(await n.markdownViewService.getStrategyData(o,l,s,c,d),null,2))})(w.current,t.current,r.current,a)},sx:{mr:"10px",mt:"2.5px"}}),e(ee,{sx:{mr:"10px",mt:"0.5px"},onDownloadJson:u,onDownloadMarkdown:m,onDownloadPdf:h}),e(l,{onClick:a,children:e(S,{})})]}),fetchState:async()=>await ae(t.current,r.current),mapInitialData:([{type:e,backtest:t,live:a,breakeven:i,risk:r,partial:o,highest_profit:n,max_drawdown:l,schedule:s,performance:c,sync:d,heat:w,strategy:p}])=>({backtest:t,live:a,breakeven:i,risk:r,partial:o,highest_profit:n,max_drawdown:l,schedule:s,performance:c,sync:d,heat:w,strategy:p,type:e}),mapPayload:([{type:e}])=>({type:e}),onLoadStart:()=>n.layoutService.setAppbarLoader(!0),onLoadEnd:()=>n.layoutService.setAppbarLoader(!1),onClose:()=>{d()}});return(e,t)=>{c({id:"markdown_report_modal",render:N,onInit:()=>{const e="live"===t?"/markdown_report/live":"/markdown_report/backtest";te.push(e),p(e)},onMount:()=>{a(e),o(t),D()}})}},re="backtest-kit__groupHeader",oe="backtest-kit__groupRoot",ne="backtest-kit__symbolImage",le=B()({root:{[`& .${oe}:hover .${re}`]:{opacity:"1 !important"}}});function se(e){return E(e,"#000000")>E(e,"#FFFFFF")}const ce=[{type:L.Link,action:"back-action",label:e(W,{sx:{display:"block"}})},{type:L.Link,action:"back-action",label:"Main"},{type:L.Link,action:"back-action",label:"Markdown Report"}],de=[{action:"update-now",label:"Refresh",icon:()=>e(p,{icon:K,color:"#4caf50"})}],we=(t,a)=>({type:A.Group,className:oe,sx:{p:2},tabletColumns:"12",desktopColumns:"3",fields:[{type:A.Component,className:re,style:{transition:"opacity 500ms",opacity:.5},element:()=>e(x,{direction:"row",children:[e(J,{variant:"outlined",size:"small",color:"info",label:`${j.bullet} ${t}`,sx:{mb:1,pr:.5,fontSize:"14px",background:"white",cursor:"not-allowed"}}),e(i,{flex:1})]})},{type:A.Group,fields:a.map(({symbol:t,label:a,id:i,type:r,color:o})=>((t,a,i,r,o)=>({type:A.Component,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:({payload:n})=>e(H,{component:G,onClick:()=>{n.handleOpen(t,a)},sx:{width:"100%",background:o,color:"white",fontWeight:"bold",fontSize:"14px",height:"75px",minHeight:"75px",textWrap:"wrap",padding:"16px",[`& .${ne}`]:{transition:"filter 500ms"},"&:hover":{background:()=>se(o)?X(o,.33):F(o,.33),[`& .${ne}`]:{transition:"filter 500ms",filter:se(o)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:e(T,{className:ne,symbol:i}),children:r})}))(i,r,t,a,o))}]}),pe=[{id:"main",element:()=>{const{classes:t}=le(),{reloadTrigger:a,doReload:r}=N(),[o,{loading:l}]=O(async()=>await(async()=>{const[e,t,a]=await Promise.all([n.symbolGlobalService.getSymbolMap(),n.backtestGlobalService.list(),n.liveGlobalService.list()]),i={},r={};t.forEach(t=>{const a=e[t.symbol],r=t.strategyName;i[r]||(i[r]=[]),i[r].push({symbol:t.symbol,label:(null==a?void 0:a.displayName)||t.symbol,color:(null==a?void 0:a.color)||"#ccc",type:"backtest",id:t.id})}),a.forEach(t=>{const a=e[t.symbol],i=t.strategyName;r[i]||(r[i]=[]),r[i].push({symbol:t.symbol,label:(null==a?void 0:a.displayName)||t.symbol,color:(null==a?void 0:a.color)||"#ccc",id:t.id,type:"live"})});const o=Object.entries(i).sort(([,e],[,t])=>t.length-e.length).map(([e,t])=>we(e,t)),l=Object.entries(r).sort(([,e],[,t])=>t.length-e.length).map(([e,t])=>we(e,t));return l.length||o.length?[{type:A.Fragment,isVisible:()=>!!o.length,fields:[{type:A.Line,title:"Backtest"},{type:A.Group,columns:"12",fields:o}]},{type:A.Fragment,isVisible:()=>!!l.length,fields:[{type:A.Line,title:"Live"},{type:A.Group,columns:"12",fields:l}]}]:[]})(),{onLoadStart:()=>n.layoutService.setAppbarLoader(!0),onLoadEnd:()=>n.layoutService.setAppbarLoader(!1),deps:[a]}),s=ie(),c=(e,t)=>{s(e,t)};return e(U,{children:[e(R,{items:ce,actions:de,onAction:e=>{"back-action"===e&&n.routerService.push("/"),"update-now"===e&&r()}}),l||!o?e(C,{children:e(P,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):o.length?e(M,{children:[e($,{className:t.root,fields:o,payload:()=>({handleOpen:c})},a),e(i,{paddingBottom:"24px"})]}):e(C,{children:e(P,{variant:"h6",sx:{opacity:.5},children:"No pending signals"})})]})},isActive:e=>z(["/report"],e)}],he=({id:t})=>e(I,{history:n.routerService,onLoadStart:()=>n.layoutService.setAppbarLoader(!0),onLoadEnd:()=>n.layoutService.setAppbarLoader(!1),routes:pe,params:{id:t}});export{he as StatusPage,he as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,f as a,P as i,B as n,R as r,aC as t,T as o,ah as l,O as s,ap as c,F as d,aD as p,M as m,aE as u,aF as b,aG as v,aH as g,ax as y,aI as h,aJ as k,aK as $,aL as f,aM as x,aN as S,aO as _,i as C,as as P,$ as w,at as L,y as A,z,aP as O,aQ as E,G as F}from"./index-DxeOxY_I.js";import{C as j,R as T}from"./Refresh-UXSQ8IiW.js";import{K as B}from"./KeyboardArrowLeft-BI2k8xRQ.js";const R=e=>{const i={color:"white",fontSize:28};switch(e.type){case"signal.opened":case"partial_profit.available":case"partial_profit.commit":return a(S,{sx:i});case"signal.closed":case"signal_sync.close":case"close_pending.commit":return a(y,{sx:i});case"signal.scheduled":return a(_,{sx:i});case"signal.cancelled":case"cancel_scheduled.commit":return a(h,{sx:i});case"partial_loss.available":case"partial_loss.commit":case"average_buy.commit":return a(f,{sx:i});case"breakeven.available":case"breakeven.commit":return a(x,{sx:i});case"activate_scheduled.commit":case"signal_sync.open":return a(k,{sx:i});case"trailing_stop.commit":case"trailing_take.commit":return a($,{sx:i});case"risk.rejection":return a(g,{sx:i});case"error.info":case"error.validation":case"signal.info":return a(b,{sx:i});case"error.critical":return a(v,{sx:i});default:return a(u,{sx:i})}},I=e=>{switch(e.type){case"signal.opened":return`${c("Opened")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal.closed":return`${c("Closed")} ${e.symbol} (${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%)`;case"signal.scheduled":return`${c("Scheduled")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal.cancelled":return`${c("Cancelled")} ${e.symbol}`;case"partial_profit.available":return`${c("Partial profit")} ${e.level}% ${e.symbol}`;case"partial_profit.commit":return`${c("Profit fixed")} ${e.percentToClose}% ${e.symbol}`;case"partial_loss.available":return`${c("Partial loss")} ${e.level}% ${e.symbol}`;case"partial_loss.commit":return`${c("Loss fixed")} ${e.percentToClose}% ${e.symbol}`;case"breakeven.available":return`${c("Breakeven available")} ${e.symbol}`;case"breakeven.commit":return`${c("Breakeven set")} ${e.symbol}`;case"activate_scheduled.commit":return`${c("Activated")} ${e.position.toUpperCase()} ${e.symbol}`;case"average_buy.commit":return`${c("Average Buy")} ${e.symbol}`;case"trailing_stop.commit":return`${c("Trailing stop")} ${e.symbol}`;case"trailing_take.commit":return`${c("Trailing take")} ${e.symbol}`;case"signal_sync.open":return`${c("Sync Open")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal_sync.close":return`${c("Sync Close")} ${e.symbol} (${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%)`;case"cancel_scheduled.commit":return`${c("Cancel Scheduled")} ${e.symbol}`;case"close_pending.commit":return`${c("Close Pending")} ${e.symbol}`;case"risk.rejection":return`${c("Rejected")} ${e.position.toUpperCase()} ${e.symbol}`;case"error.info":return`${c("Error")}: ${e.message}`;case"error.validation":return`${c("Validation")}: ${e.message}`;case"error.critical":return`${c("Critical")}: ${e.message}`;case"signal.info":return`${c("Signal Info")} ${e.symbol} (${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%)`;default:return c("Unknown")}},D=e=>{switch(e.type){case"signal.opened":return c("Signal Opened");case"signal.closed":return c("Signal Closed");case"signal.scheduled":return c("Signal Scheduled");case"signal.cancelled":return c("Signal Cancelled");case"partial_profit.available":return c("Partial Profit Available");case"partial_profit.commit":return c("Partial Profit Commit");case"partial_loss.available":return c("Partial Loss Available");case"partial_loss.commit":return c("Partial Loss Commit");case"breakeven.available":return c("Breakeven Available");case"breakeven.commit":return c("Breakeven Commit");case"activate_scheduled.commit":return c("Activated Scheduled");case"average_buy.commit":return c("Average Buy");case"trailing_stop.commit":return c("Trailing Stop");case"trailing_take.commit":return c("Trailing Take");case"signal_sync.open":return c("Signal Sync Open");case"signal_sync.close":return c("Signal Sync Close");case"cancel_scheduled.commit":return c("Cancel Scheduled");case"close_pending.commit":return c("Close Pending");case"risk.rejection":return c("Risk Rejection");case"error.info":return c("Info Error");case"error.validation":return c("Validation Error");case"error.critical":return c("Critical Error");case"signal.info":return c("Signal Info");default:return c("Unknown")}},U=e=>"symbol"in e,M=e=>"position"in e,N=e=>"priceOpen"in e&&"priceTakeProfit"in e&&"priceStopLoss"in e,W=e=>"pnlPercentage"in e,H=e=>"level"in e,Y=e=>"percentToClose"in e,K=e=>"currentPrice"in e,V=e=>"duration"in e,G=e=>"closeReason"in e,q=e=>"cancelReason"in e,J=e=>"priceClose"in e,Q=e=>"percentShift"in e,X=e=>"signal.opened"===e.type?"note"in e&&!!e.note:"signal.info"===e.type?"note"in e&&!!e.note&&!!e.notificationId:"activate_scheduled.commit"===e.type?"note"in e&&!!e.note&&!!e.activateId:"close_pending.commit"===e.type?"note"in e&&!!e.note&&!!e.closeId:"cancel_scheduled.commit"===e.type&&("note"in e&&!!e.note&&!!e.cancelId),Z=e=>"message"in e,ee=e=>"rejectionNote"in e,ae=e=>"activePositionCount"in e,ie=e=>"effectivePriceOpen"in e,ne=e=>"totalEntries"in e&&e.totalEntries>1,re=e=>"originalPriceOpen"in e&&"priceOpen"in e&&e.originalPriceOpen!==e.priceOpen,te=e=>"totalPartials"in e&&e.totalPartials>0,oe=e=>"cost"in e,le=e=>"pnlPriceOpen"in e&&"pnlPriceClose"in e&&"pnlCost"in e&&"pnlEntries"in e,se=e.forwardRef(({item:e,className:u,style:b,sx:v},g)=>{const y=(e=>{switch(e.type){case"signal.opened":case"activate_scheduled.commit":case"signal_sync.open":return"#4CAF50";case"signal.closed":case"signal_sync.close":return"#2196F3";case"signal.scheduled":case"average_buy.commit":case"error.info":case"error.validation":return"#FF9800";case"signal.cancelled":case"cancel_scheduled.commit":default:return"#9E9E9E";case"partial_profit.available":case"partial_profit.commit":return"#8BC34A";case"partial_loss.available":case"partial_loss.commit":return"#FF5722";case"breakeven.available":case"breakeven.commit":return"#00BCD4";case"trailing_stop.commit":case"trailing_take.commit":return"#673AB7";case"close_pending.commit":return"#607D8B";case"risk.rejection":return"#F44336";case"error.critical":return"#D32F2F";case"signal.info":return"#9C27B0"}})(e),h=(e=>"timestamp"in e)(e)?e.timestamp:Date.now();return a("div",{className:u,style:b,ref:g,children:a(i,{variant:"outlined",onClick:()=>(e=>{switch(e.type){case"risk.rejection":C.layoutService.pickRisk(e.id);break;case"signal.opened":C.layoutService.pickSignalOpened(e.id);break;case"signal.closed":C.layoutService.pickSignalClosed(e.id);break;case"signal.scheduled":C.layoutService.pickSignalScheduled(e.id);break;case"signal.cancelled":C.layoutService.pickSignalCancelled(e.id);break;case"partial_profit.available":C.layoutService.pickPartialProfitAvailable(e.id);break;case"partial_profit.commit":C.layoutService.pickPartialProfitCommit(e.id);break;case"partial_loss.available":C.layoutService.pickPartialLossAvailable(e.id);break;case"partial_loss.commit":C.layoutService.pickPartialLossCommit(e.id);break;case"breakeven.available":C.layoutService.pickBreakevenAvailable(e.id);break;case"breakeven.commit":C.layoutService.pickBreakevenCommit(e.id);break;case"trailing_stop.commit":C.layoutService.pickTrailingStop(e.id);break;case"trailing_take.commit":C.layoutService.pickTrailingTake(e.id);break;case"activate_scheduled.commit":C.layoutService.pickActivateScheduled(e.id);break;case"average_buy.commit":C.layoutService.pickAverageBuyCommit(e.id);break;case"signal_sync.open":C.layoutService.pickSignalSyncOpen(e.id);break;case"signal_sync.close":C.layoutService.pickSignalSyncClose(e.id);break;case"cancel_scheduled.commit":C.layoutService.pickCancelScheduled(e.id);break;case"close_pending.commit":C.layoutService.pickClosePending(e.id);break;case"signal.info":C.layoutService.pickSignalNotify(e.id)}})(e),sx:{transition:"box-shadow 0.2s ease",cursor:"pointer",display:"flex",alignItems:"stretch",justifyContent:"stretch","&:hover":{boxShadow:4},...v},children:a(n,{sx:{flex:1,position:"relative",overflow:"clip",height:"100%",width:"100%",borderRadius:"12px"},children:[a(r,{direction:"row",spacing:2,sx:{p:2},children:[a(t,{sx:{width:56,height:56,background:y},children:R(e)}),a(r,{flex:1,spacing:1,children:[a(r,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[a(o,{variant:"h6",sx:{fontWeight:600},children:I(e)}),a(o,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap",ml:2},children:l(h).format("HH:mm DD/MM/YYYY")})]}),a(r,{direction:"row",spacing:1,flexWrap:"wrap",children:[a(s,{size:"small",label:D(e),sx:{background:y,color:"white",fontWeight:500}}),U(e)&&a(s,{size:"small",label:e.symbol,variant:"outlined"}),M(e)&&a(s,{size:"small",label:e.position.toUpperCase(),variant:"outlined",color:"long"===e.position?"success":"error"}),W(e)&&a(s,{size:"small",label:`PnL: ${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%`,color:e.pnlPercentage>=0?"success":"error",variant:"outlined"}),H(e)&&a(s,{size:"small",label:`${c("Level")}: ${e.level}%`,variant:"outlined"}),Y(e)&&a(s,{size:"small",label:`${c("Close")}: ${e.percentToClose}%`,variant:"outlined"}),V(e)&&a(s,{size:"small",label:`${c("Duration")}: ${e.duration} ${c("min")}`,variant:"outlined"}),G(e)&&a(s,{size:"small",label:e.closeReason,variant:"outlined",color:"info"}),q(e)&&a(s,{size:"small",label:e.cancelReason,variant:"outlined",color:"info"}),Q(e)&&a(s,{size:"small",label:`${c("Shift")}: ${e.percentShift>0?"+":""}${e.percentShift}%`,variant:"outlined"}),ae(e)&&a(s,{size:"small",label:`${c("Active")}: ${e.activePositionCount}`,variant:"outlined"}),ne(e)&&a(s,{size:"small",label:`${c("Entries")}: ${e.totalEntries}`,variant:"outlined"}),te(e)&&a(s,{size:"small",label:`${c("Partials")}: ${e.totalPartials}`,variant:"outlined"}),oe(e)&&a(s,{size:"small",label:`${c("Cost")}: ${e.cost.toFixed(2)}$`,variant:"outlined"}),ie(e)&&a(s,{size:"small",label:`${c("Avg entry")}: ${e.effectivePriceOpen}`,variant:"outlined",color:"warning"}),re(e)&&a(s,{size:"small",label:`${c("Orig entry")}: ${e.originalPriceOpen}`,variant:"outlined"})]}),N(e)&&a(d,{children:[a(p,{sx:{my:1}}),a(r,{direction:"row",spacing:3,flexWrap:"wrap",children:[a(o,{variant:"body2",children:[a(o,{component:"span",color:"text.secondary",children:[c("Entry"),":"," "]}),e.priceOpen]}),J(e)&&a(o,{variant:"body2",children:[a(o,{component:"span",color:"text.secondary",children:[c("Close"),":"," "]}),e.priceClose]}),K(e)&&a(o,{variant:"body2",children:[a(o,{component:"span",color:"text.secondary",children:[c("Current"),":"," "]}),e.currentPrice]}),a(o,{variant:"body2",children:[a(o,{component:"span",color:"text.secondary",children:[c("Take Profit"),":"," "]}),e.priceTakeProfit]}),a(o,{variant:"body2",children:[a(o,{component:"span",color:"text.secondary",children:[c("Stop Loss"),":"," "]}),e.priceStopLoss]})]})]}),le(e)&&a(d,{children:[a(p,{sx:{my:1}}),a(r,{direction:"row",spacing:3,flexWrap:"wrap",children:[a(o,{variant:"body2",children:[a(o,{component:"span",color:"text.secondary",children:[c("PnL Entry"),":"," "]}),e.pnlPriceOpen]}),a(o,{variant:"body2",children:[a(o,{component:"span",color:"text.secondary",children:[c("PnL Exit"),":"," "]}),e.pnlPriceClose]}),a(o,{variant:"body2",children:[a(o,{component:"span",color:"text.secondary",children:[c("PnL"),":"," "]}),a(o,{component:"span",color:e.pnlCost>=0?"success.main":"error.main",children:[e.pnlCost>=0?"+":"",e.pnlCost.toFixed(2),"$"]})]}),a(o,{variant:"body2",children:[a(o,{component:"span",color:"text.secondary",children:[c("Invested"),":"," "]}),e.pnlEntries.toFixed(2),"$"]})]})]})]})]}),X(e)&&a(n,{onClick:e=>{e.preventDefault(),e.stopPropagation()},sx:{px:2,pb:2},children:[a(p,{sx:{mb:1.5}}),a(n,{component:"pre",sx:{m:0,whiteSpace:"pre-wrap",wordWrap:"break-word"},children:a(m,{content:e.note})})]}),ee(e)&&a(n,{sx:{px:2,pb:2},children:[a(p,{sx:{mb:1.5}}),a(o,{variant:"body2",color:"error",children:e.rejectionNote})]}),Z(e)&&!X(e)&&a(n,{sx:{px:2,pb:2},children:[a(p,{sx:{mb:1.5}}),a(o,{variant:"body2",color:"text.secondary",children:e.message})]}),a(n,{sx:{position:"absolute",top:0,left:0,bottom:0,width:6,zIndex:1,background:y}})]})})})}),ce=[{action:"update-now",label:"Refresh manually",icon:()=>a(F,{icon:T,color:"#4caf50"})}],de=[{type:z.Link,action:"back-action",label:a(B,{sx:{display:"block"}})},{type:z.Link,action:"back-action",label:"Main"},{type:z.Link,action:"back-action",label:"Notifications"}],pe=new w,me=()=>{const{data:e,hasMore:i,loading:n,onSkip:r}=P({handler:async(e,a)=>{const i=await C.notificationViewService.getList(),n=L(e,a);for(const r of i)if(n([r]).done)break;return n().rows},onLoadStart:()=>C.layoutService.setAppbarLoader(!0),onLoadEnd:()=>C.layoutService.setAppbarLoader(!1),reloadSubject:pe});return a(j,{children:[a(A,{items:de,actions:ce,onAction:async e=>{"back-action"===e&&C.routerService.push("/"),"update-now"===e&&await pe.next()}}),a(O,{sx:{height:"calc(100vh - 155px)"},withScrollbar:!0,minHeight:72,loading:n,onDataRequest:r,bufferSize:E,hasMore:i,children:e.map(e=>a(se,{item:e,sx:{mb:1}},e.id))})]})};export{me as NotificationPage,me as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as t,bv as e,p as r,o as i}from"./index-Ce2sQITf.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),G=a.navigator,Q=G&&G.userAgent,Z=Q?String(Q):"",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),Gt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+$t(++Wt+qt,36)},Qt=jt,Zt=Xt,Kt=Gt,Jt=ht,te=ut,ee=a.Symbol,re=Qt("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,Ge=h?function(t,e,r){return qe.f(t,e,$e(1,r))}:function(t,e,r){return t[e]=r,t},Qe={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=Gt,pr=jt("keys"),dr=function(t){return pr[t]||(pr[t]=gr(t))},yr={},vr=fr,mr=a,xr=X,br=Ge,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=Qe.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,Gr=Qe.exports,Qr=F,Zr=Me,Kr=Gr,Jr=Rt,ti=function(t,e,r,i){i||(i={});var n=i.enumerable,a=void 0!==i.name?i.name:e;if(Qr(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,Gi=Ge,Qi=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)&&Gi(a,"sham",!0),Qi(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=Gr,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),Gn=!qn.test(Yn),Qn=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 Gn||!!$n(qn,Xn(t))}catch(e){return!0}};Zn.sham=!0;var Kn,Jn,ta,ea,ra=!Wn||Un(function(){var t;return Qn(Qn.call)||!Qn(Object)||!Qn(function(){t=!0})||t})?Zn:Qn,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 Ga=function(t){if(Ra(qa,t)){var e=qa[t];delete qa[t],e()}},Qa=function(t){return function(){Ga(t)}},Za=function(t){Ga(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(Qa(t))}:Fa&&Fa.now?Jn=function(t){Fa.now(Qa(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),Ga(t)}}:function(t){setTimeout(Qa(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,Gs,Qs,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===Gs?new $s(t):Vo(t)},oo(mo)&&Co!==Object.prototype)){Qs=Co.then,To||ro(Co,"then",function(t,e){var r=this;return new Po(function(t,e){eo(Qs,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}),Gs=to.Promise,no(Po,bo,!1),ao(bo);var Wo={},qo=Wo,$o=ne("iterator"),Go=Array.prototype,Qo=Bn,Zo=Tt,Ko=I,Jo=Wo,th=ne("iterator"),eh=function(t){if(!Ko(t))return Zo(t,th)||Zo(t,"@@iterator")||Jo[Qo(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||Go[$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 Gh=Hs;tn({target:"Promise",stat:!0,forced:Fs.CONSTRUCTOR},{reject:function(t){var e=Gh.f(this);return(0,e.reject)(t),e.promise}});var Qh=ke,Zh=X,Kh=Hs,Jh=tn,tu=Fs.CONSTRUCTOR,eu=function(t,e){if(Qh(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,Gu=hu,Qu=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=Qu.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(Gu,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=Ge,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,Gl=wl,Ql=ke,Zl=X,Kl=ci,Jl=su,tc=D,ec=Tt,rc=Ml,ic=zl,nc=ql,ac=O("".indexOf);Gl("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=Ql(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"),Gc=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[$c]=!1,"/./"[t](e)}catch(i){}}return!1},Qc=tn,Zc=ma,Kc=s.f,Jc=ci,tf=su,ef=qc,rf=D,nf=Gc,af=Zc("".slice),sf=Math.min,of=nf("startsWith");Qc({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=Ge,qf=ti,$f=Wo,Gf=rr.PROPER,Qf=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)),Gf&&n===eg&&p&&p.name!==eg&&(Qf?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=Ge,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,Gg=D,Qg=Gc,Zg=Xg("".slice),Kg=Math.min,Jg=Qg("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(Gg(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,Gp=vi.indexOf,Qp=Ug,Zp=ma([].indexOf),Kp=!!Zp&&1/Zp([1],1,-0)<0;$p({target:"Array",proto:!0,forced:Kp||!Qp("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Kp?Zp(this,t,e)||0:Gp(this,t,e)}});var Jp=tn,td=qc,ed=D,rd=su,id=Gc,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{o as t,bz as e,q as r,t as i}from"./index-DxeOxY_I.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),G=a.navigator,Q=G&&G.userAgent,Z=Q?String(Q):"",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),Gt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+$t(++Wt+qt,36)},Qt=jt,Zt=Xt,Kt=Gt,Jt=ht,te=ut,ee=a.Symbol,re=Qt("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,Ge=h?function(t,e,r){return qe.f(t,e,$e(1,r))}:function(t,e,r){return t[e]=r,t},Qe={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=Gt,pr=jt("keys"),dr=function(t){return pr[t]||(pr[t]=gr(t))},yr={},vr=fr,mr=a,xr=X,br=Ge,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=Qe.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,Gr=Qe.exports,Qr=F,Zr=Me,Kr=Gr,Jr=Rt,ti=function(t,e,r,i){i||(i={});var n=i.enumerable,a=void 0!==i.name?i.name:e;if(Qr(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,Gi=Ge,Qi=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)&&Gi(a,"sham",!0),Qi(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=Gr,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),Gn=!qn.test(Yn),Qn=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 Gn||!!$n(qn,Xn(t))}catch(e){return!0}};Zn.sham=!0;var Kn,Jn,ta,ea,ra=!Wn||Un(function(){var t;return Qn(Qn.call)||!Qn(Object)||!Qn(function(){t=!0})||t})?Zn:Qn,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 Ga=function(t){if(Ra(qa,t)){var e=qa[t];delete qa[t],e()}},Qa=function(t){return function(){Ga(t)}},Za=function(t){Ga(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(Qa(t))}:Fa&&Fa.now?Jn=function(t){Fa.now(Qa(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),Ga(t)}}:function(t){setTimeout(Qa(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,Gs,Qs,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===Gs?new $s(t):Vo(t)},oo(mo)&&Co!==Object.prototype)){Qs=Co.then,To||ro(Co,"then",function(t,e){var r=this;return new Po(function(t,e){eo(Qs,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}),Gs=to.Promise,no(Po,bo,!1),ao(bo);var Wo={},qo=Wo,$o=ne("iterator"),Go=Array.prototype,Qo=Bn,Zo=Tt,Ko=I,Jo=Wo,th=ne("iterator"),eh=function(t){if(!Ko(t))return Zo(t,th)||Zo(t,"@@iterator")||Jo[Qo(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||Go[$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 Gh=Hs;tn({target:"Promise",stat:!0,forced:Fs.CONSTRUCTOR},{reject:function(t){var e=Gh.f(this);return(0,e.reject)(t),e.promise}});var Qh=ke,Zh=X,Kh=Hs,Jh=tn,tu=Fs.CONSTRUCTOR,eu=function(t,e){if(Qh(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,Gu=hu,Qu=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=Qu.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(Gu,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=Ge,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,Gl=wl,Ql=ke,Zl=X,Kl=ci,Jl=su,tc=D,ec=Tt,rc=Ml,ic=zl,nc=ql,ac=O("".indexOf);Gl("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=Ql(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"),Gc=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[$c]=!1,"/./"[t](e)}catch(i){}}return!1},Qc=tn,Zc=ma,Kc=s.f,Jc=ci,tf=su,ef=qc,rf=D,nf=Gc,af=Zc("".slice),sf=Math.min,of=nf("startsWith");Qc({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=Ge,qf=ti,$f=Wo,Gf=rr.PROPER,Qf=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)),Gf&&n===eg&&p&&p.name!==eg&&(Qf?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=Ge,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,Gg=D,Qg=Gc,Zg=Xg("".slice),Kg=Math.min,Jg=Qg("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(Gg(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,Gp=vi.indexOf,Qp=Ug,Zp=ma([].indexOf),Kp=!!Zp&&1/Zp([1],1,-0)<0;$p({target:"Array",proto:!0,forced:Kp||!Qp("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Kp?Zp(this,t,e)||0:Gp(this,t,e)}});var Jp=tn,td=qc,ed=D,rd=su,id=Gc,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
|
|
package/build/modules/frontend/build/assets/{markdownit-22RgFULT.js → markdownit-VuWBTDGx.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e,bx as t}from"./index-DxeOxY_I.js";function r(e,t){for(var r=0;r<t.length;r++){const o=t[r];if("string"!=typeof o&&!Array.isArray(o))for(const t in o)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(o,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var o=t();const n=r({__proto__:null,default:e(o)},[o]);export{n as m};
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
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"
|
|
150
150
|
rel="stylesheet"
|
|
151
151
|
/>
|
|
152
|
-
<script type="module" crossorigin src="/assets/index-
|
|
152
|
+
<script type="module" crossorigin src="/assets/index-DxeOxY_I.js"></script>
|
|
153
153
|
<link rel="stylesheet" crossorigin href="/assets/index-DrRm3Jka.css">
|
|
154
154
|
</head>
|
|
155
155
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.1.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",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"url": "http://paypal.me/tripolskypetr"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"homepage": "https://backtest-kit.github.io/documents/
|
|
15
|
+
"homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"backtest",
|
|
18
18
|
"backtesting",
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
"ccxt": "4.5.24",
|
|
93
93
|
"touch": "3.1.1",
|
|
94
94
|
"worker-testbed": "2.0.0",
|
|
95
|
-
"backtest-kit": "
|
|
95
|
+
"backtest-kit": "7.1.0",
|
|
96
96
|
"markdown-it": "14.1.0"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
|
-
"backtest-kit": "^
|
|
99
|
+
"backtest-kit": "^7.1.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{X as o}from"./index-Ce2sQITf.js";const r=new o;export{r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as a,bn as e,bo as o}from"./index-Ce2sQITf.js";const t=(t,i=a.routerService.location.pathname)=>!!e(o.filter(({path:a})=>t.includes(a)),i);export{t as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aR as t,Z as a,i as e,f as o,w as s,x as i,t as n,K as r,A as c,T as l,aS as d,y as p,B as u,F as m,L as b,N as y,O as h,R as g,k as S,l as f,Q as L,V as v,aT as k,aU as w,a0 as x,X as A,D as N,aV as C,aW as R}from"./index-Ce2sQITf.js";import{h as j}from"./hasRouteMatch-CImjW4Jf.js";import{I as $}from"./IconPhoto-DUgsqsYP.js";import{C as F,R as V}from"./Refresh-aWduZclR.js";import{K as B}from"./KeyboardArrowLeft-BlwcBPHn.js";import{B as E}from"./Background-COpkJTP-.js";const H="backtest-kit__groupHeader",M="backtest-kit__groupRoot",_="backtest-kit__symbolImage",G=n()({root:{[`& .${M}:hover .${H}`]:{opacity:"1 !important"}}});function O(t){return v(t,"#000000")>v(t,"#FFFFFF")}const I=[{type:i.Link,action:"back-action",label:o(B,{sx:{display:"block"}})},{type:i.Link,action:"back-action",label:"Main"},{type:i.Link,action:"back-action",label:"Status"}],T=[{action:"update-now",label:"Refresh",icon:()=>o(c,{icon:V,color:"#4caf50"})}],U=(t,a)=>({type:r.Group,className:M,sx:{p:2},tabletColumns:"12",desktopColumns:"3",fields:[{type:r.Component,className:H,style:{transition:"opacity 500ms",opacity:.5},element:()=>o(h,{direction:"row",children:[o(b,{variant:"outlined",size:"small",color:"info",label:`${y.bullet} ${t}`,sx:{mb:1,pr:.5,fontSize:"14px",background:"white",cursor:"not-allowed"}}),o(u,{flex:1})]})},{type:r.Group,fields:a.map(({symbol:t,label:a,to:s,color:i})=>((t,a,s,i)=>({type:r.Component,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>o(L,{component:g,onClick:()=>{e.routerService.push(`/status/${a}`)},sx:{width:"100%",background:i,color:"white",fontWeight:"bold",fontSize:"14px",height:"75px",minHeight:"75px",textWrap:"wrap",padding:"16px",[`& .${_}`]:{transition:"filter 500ms"},"&:hover":{background:()=>O(i)?S(i,.33):f(i,.33),[`& .${_}`]:{transition:"filter 500ms",filter:O(i)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:o($,{className:_,symbol:t}),children:s})}))(t,s,a,i))}]}),z=[{type:i.Link,action:"back-action",label:o(B,{sx:{display:"block"}})},{type:i.Link,action:"back-action",label:"Main"},{type:i.Link,action:"back-action",label:"Status"},{type:i.Link,action:"back-action",compute:t=>t?`${String(t.symbol).toUpperCase()} (${t.strategyName})`:"Live"}],D=[{action:"download-action",label:"Download",icon:()=>o(c,{icon:N,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>o(c,{icon:V,color:"#4caf50"})}],K=new A,W=[{id:"status",element:({params:t})=>{const[i]=a(async()=>{const a=await e.statusViewService.getStatusMap();return k.get(a,t.id,null)},{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[t.id]}),[n,{loading:r,execute:c}]=a(async()=>await e.statusViewService.getStatusOne(t.id),{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[t.id]}),b=w(async()=>{if(!n)return;const t=new Blob([JSON.stringify(n,null,2)],{type:"application/json"}),a=URL.createObjectURL(t);e.layoutService.downloadFile(a,`status_${Date.now()}.json`)});x(()=>K.subscribe(c));return o(F,{children:[o(s,{items:z,actions:D,payload:i,onAction:async t=>{"back-action"===t&&((async()=>{1!==(await e.statusViewService.getStatusList()).length?e.routerService.push("/status"):e.routerService.push("/")})(),e.routerService.push("/")),"update-now"===t&&await K.next(),"download-action"===t&&await b()}}),r?o(d,{children:o(l,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):n?o(m,{children:[o(p,{handler:n,fields:C}),o(u,{paddingBottom:"24px"})]}):o(d,{children:o(l,{variant:"h6",sx:{opacity:.5},children:"No pending signal"})}),o(E,{})]})},isActive:t=>j(["/status/:id"],t)},{id:"main",element:()=>{const{classes:i}=G(),{reloadTrigger:n,doReload:c}=t();a(async()=>{const t=await e.statusViewService.getStatusList();if(1===t.length){const[{id:a}]=t;e.routerService.push(`/status/${a}`)}},{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[n]});const[b,{loading:y}]=a(async()=>await(async()=>{const[t,a]=await Promise.all([e.symbolGlobalService.getSymbolMap(),e.statusViewService.getStatusList()]);if(!a||0===a.length)return[{type:r.Typography,typoVariant:"h6",placeholder:"Listening for a pending signal...",sx:{textAlign:"center",opacity:.5,mt:4}}];const o={};a.forEach(a=>{const e=t[a.symbol],s=a.strategyName;o[s]||(o[s]=[]),o[s].push({symbol:a.symbol,label:(null==e?void 0:e.displayName)||a.symbol,color:(null==e?void 0:e.color)||"#ccc",to:a.id})});const s=Object.entries(o).sort(([,t],[,a])=>a.length-t.length),i=[],n=[],c=[];return s.forEach(([t,a],e)=>{const o=U(t,a);e%2==0?i.push(o):n.push(o),c.push(o)}),[{type:r.Group,columns:"6",className:"tabletLeftColumn",phoneHidden:!0,desktopHidden:!0,fields:i},{type:r.Group,columns:"6",className:"tabletRightColumn",phoneHidden:!0,desktopHidden:!0,fields:n},{type:r.Group,columns:"12",className:"wideColumn",tabletHidden:!0,fields:c}]})(),{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[n]});return o(F,{children:[o(s,{items:I,actions:T,onAction:t=>{"back-action"===t&&e.routerService.push("/"),"update-now"===t&&c()}}),y||!b?o(d,{children:o(l,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):b.length?o(m,{children:[o(p,{className:i.root,fields:b},n),o(u,{paddingBottom:"24px"})]}):o(d,{children:o(l,{variant:"h6",sx:{opacity:.5},children:"No pending signals"})})]})},isActive:t=>j(["/status"],t)}],P=({id:t})=>o(R,{history:e.routerService,onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),routes:W,params:{id:t}});export{P as StatusPage,P as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e,c as t,r as n,i as r,S as o}from"./index-Ce2sQITf.js";const a=t(t=>e("div",{style:t.v0,children:[e("input",{type:"text",value:t.v1,onChange:t.v2,style:t.v3,placeholder:"BTCUSDT"}),e("select",{value:t.v4,onChange:t.v5,style:t.v6,children:t.v7}),e("input",{type:"date",value:t.v8,onChange:t.v9,style:t.v10,title:"From date"}),e("input",{type:"date",value:t.v11,onChange:t.v12,style:t.v13,title:"To date"}),e("button",{onClick:t.v14,disabled:t.v15,style:t.v16,children:t.v17}),t.v18]}),{name:"Toolbar_1",portals:["v7","v17","v18"]}),i=function({symbol:t,timeframe:n,fromDate:r,toDate:o,running:i,status:c,onSymbolChange:v,onTimeframeChange:d,onFromDateChange:h,onToDateChange:g,onRun:m}){return e(a,{v0:{display:"flex",gap:8,padding:"8px 12px",background:"#1e293b",alignItems:"center",flexShrink:0},v1:t,v2:e=>v(e.target.value.toUpperCase()),v3:{...s,width:100},v4:n,v5:e=>d(e.target.value),v6:s,v7:l.map(t=>e("option",{children:t},t)),v8:r,v9:e=>h(e.target.value),v10:u,v11:o,v12:e=>g(e.target.value),v13:u,v14:m,v15:i,v16:{background:"#3b82f6",color:"#fff",border:"none",borderRadius:4,padding:"5px 16px",fontSize:13,cursor:"pointer"},v17:i?"...":"▶ Run",v18:c&&e("span",{style:{fontSize:12,color:"#94a3b8",marginLeft:8},children:c})})},l=["1","5","15","60","D","W"],s={background:"#1e293b",color:"#e2e8f0",border:"1px solid #334155",borderRadius:4,padding:"4px 8px",fontSize:13},u={...s,colorScheme:"dark"},c=t(t=>e("textarea",{value:t.v0,onChange:t.v1,onKeyDown:t.v2,spellCheck:!1,style:t.v3}),{name:"CodeEditor_1"}),v=function({value:t,onChange:n,onRun:r}){return e(c,{v0:t,v1:e=>n(e.target.value),v2:e=>{e.ctrlKey&&"Enter"===e.key&&(e.preventDefault(),r())},v3:{width:320,flexShrink:0,resize:"none",background:"#1e293b",color:"#e2e8f0",border:"none",borderRight:"1px solid #334155",padding:12,fontFamily:"monospace",fontSize:13,lineHeight:1.5,outline:"none"}})},d={1:"1m",3:"3m",5:"5m",15:"15m",30:"30m",60:"1h",120:"2h",240:"4h",360:"6h",480:"8h","1D":"1d",D:"1d","1W":"1w",W:"1w"};function h(e){return{time:e.openTime,open:e.open,high:e.high,low:e.low,close:e.close,volume:e.volume}}class g{async getMarketData(e,t,n,o,a){const i=e.toUpperCase().replace(/^BINANCE:|^BYBIT:|^OKX:/,""),l=d[t]??t;return(await r.exchangeViewService.getRangeCandles({symbol:i,interval:l,limit:n,sDate:o,eDate:a})).map(e=>({openTime:e.timestamp,open:e.open,high:e.high,low:e.low,close:e.close,volume:e.volume}))}async getSymbolInfo(e){const t=e.toUpperCase().replace(/^BINANCE:|^BYBIT:|^OKX:/,""),n=t.replace(/USDT$|BUSD$|USD$/,""),r=t.replace(n,"");return{ticker:t,tickerid:t,description:`${n}/${r}`,type:"crypto",basecurrency:n,currency:r||"USDT",timezone:"UTC"}}}const m=()=>e(o,{children:"\n #root > .MuiBox-root {\n padding-left: 0;\n padding-right: 0;\n }\n "}),p=t(t=>e("div",{style:t.v0,children:[t.v1,e("div",{style:t.v2,children:[t.v3,e("div",{style:t.v4,children:t.v5})]}),t.v6]}),{name:"PinePage_1",portals:["v1","v3","v5","v6"]}),f=()=>{const t=n.useRef(null),[r,o]=n.useState('//@version=5\nindicator("Simple MA", overlay=true)\n\nlength = input.int(20, "Length")\nsma = ta.sma(close, length)\n\nplot(sma, "SMA", color.blue, linewidth=2)'),[a,l]=n.useState("BTCUSDC"),[s,u]=n.useState("1"),[c,d]=n.useState(""),[f,y]=n.useState(""),{run:C,status:b,running:D}=function(){const e=n.useRef(null),t=n.useRef(null),r=n.useRef(null),[o,a]=n.useState(""),[i,l]=n.useState(!1);function s(){if(r.current){try{r.current.stop()}catch{}r.current=null}}function u(){e.current&&(e.current.destroy(),e.current=null,t.current=null)}function c(e){a(`Error: ${e.message}`),l(!1)}return n.useEffect(()=>{const t=()=>{var t;return null==(t=e.current)?void 0:t.resize()};return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t),s(),u()}},[]),{run:function({symbol:n,timeframe:o,fromDate:i,toDate:v,code:d,containerRef:m}){if(!m.current)return;l(!0),a("Connecting..."),s(),u();const p=/indicator\([^)]*overlay\s*=\s*true/i.test(d);let f=!1;try{const s=i?new Date(i).getTime():void 0,u=v?new Date(v).getTime():void 0,y=new g,C=new PineTS(y,n,o,1e3,s,u).stream(d,{pageSize:500,live:!0,interval:3e3});r.current=C,C.on("data",i=>{var s,u;if(r.current===C)if(f)t.current&&i.plots&&t.current.updateData(i.plots),null==(u=e.current)||u.updateData([h(i.marketData[i.marketData.length-1])]);else{f=!0;const r=i.marketData.map(h);m.current.innerHTML="",e.current=new QFChart.QFChart(m.current,{title:`${n} · ${o}`,backgroundColor:"#0f172a",height:"100%",padding:.1,databox:{position:"right",triggerOn:"mousemove"},dataZoom:{visible:!0,position:"top",height:6,start:80,end:101},layout:{mainPaneHeight:"70%",gap:5},controls:{collapse:!1,maximize:!1,fullscreen:!1}}),e.current.setMarketData(r);const u=(null==(s=i.fullContext)?void 0:s.plots)??i.plots;t.current=e.current.addIndicator("indicator",u,{overlay:p,height:p?void 0:30,controls:{collapse:!1,maximize:!1}}),e.current.registerPlugin(new QFChart.MeasureTool),e.current.registerPlugin(new QFChart.LineTool),e.current.registerPlugin(new QFChart.FibonacciTool),a(`${r.length} bars loaded`),l(!1)}}),C.on("error",c)}catch(y){c(y)}},status:o,running:i}}();function S(){C({symbol:a,timeframe:s,fromDate:c,toDate:f,code:r,containerRef:t})}return e(p,{v0:{display:"flex",flexDirection:"column",height:"100vh",background:"#0f172a",color:"#e2e8f0",fontFamily:"monospace"},v1:e(i,{symbol:a,timeframe:s,fromDate:c,toDate:f,running:D,status:b,onSymbolChange:l,onTimeframeChange:u,onFromDateChange:d,onToDateChange:y,onRun:S}),v2:{display:"flex",flex:1,overflow:"hidden"},v3:e(v,{value:r,onChange:o,onRun:S}),v4:{flex:1},v5:e("div",{ref:t,style:{width:"100%",height:"100%"},children:e("p",{style:{color:"#475569",textAlign:"center",marginTop:"20%"},children:["Press ",e("b",{children:"▶ Run"})," or ",e("b",{children:"Ctrl+Enter"})," to load the chart"]})}),v6:e(m,{})})};export{f as PinePage,f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e,f as o,aR as t,Z as i,i as a,w as n,x as l,t as s,A as r,T as c,aS as p,y as d,B as m,F as u,K as h,L as b,N as y,O as f,R as g,k,l as v,Q as S,V as C,r as L,al as x,bg as w,bh as P,bi as T,bj as V,bk as $,bl as M,ae as H,a9 as z,$ as A,a0 as O,a_ as N,aO as _,aA as R,P as F,H as I,ah as j,bm as E,X as W,ar as D,as as U,aU as B,at as G,I as Y,au as K,D as J,aW as Q}from"./index-Ce2sQITf.js";import{h as X}from"./hasRouteMatch-CImjW4Jf.js";import{I as Z}from"./IconPhoto-DUgsqsYP.js";import{C as q,R as ee}from"./Refresh-aWduZclR.js";import{K as oe}from"./KeyboardArrowLeft-BlwcBPHn.js";const te=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"),ie=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"),ae=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"),ne="backtest-kit__groupHeader",le="backtest-kit__groupRoot",se="backtest-kit__symbolImage",re=s()({root:{[`& .${le}:hover .${ne}`]:{opacity:"1 !important"}}});function ce(e){return C(e,"#000000")>C(e,"#FFFFFF")}const pe=[{type:l.Link,action:"back-action",label:o(oe,{sx:{display:"block"}})},{type:l.Link,action:"back-action",label:"Main"},{type:l.Link,action:"back-action",label:"Price Chart"}],de=[{action:"update-now",label:"Refresh",icon:()=>o(r,{icon:ee,color:"#4caf50"})}],me=e=>({type:h.Group,className:le,sx:{p:2},tabletColumns:"12",desktopColumns:"3",fields:[{type:h.Component,className:ne,style:{transition:"opacity 500ms",opacity:.5},element:()=>o(f,{direction:"row",children:[o(b,{variant:"outlined",size:"small",color:"info",label:`${y.bullet} Symbols`,sx:{mb:1,pr:.5,fontSize:"14px",background:"white",cursor:"not-allowed"}}),o(m,{flex:1})]})},{type:h.Group,fields:e.map(({symbol:e,label:t,color:i})=>((e,t,i)=>({type:h.Component,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>o(S,{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",[`& .${se}`]:{transition:"filter 500ms"},"&:hover":{background:()=>ce(i)?k(i,.33):v(i,.33),[`& .${se}`]:{transition:"filter 500ms",filter:ce(i)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:o(Z,{className:se,symbol:e}),children:t})}))(e,t,i))}]}),ue="backtest-kit__groupHeader",he="backtest-kit__groupRoot",be="backtest-kit__symbolImage",ye=s()({root:{[`& .${he}:hover .${ue}`]:{opacity:"1 !important"}}});function fe(e){return C(e,"#000000")>C(e,"#FFFFFF")}const ge=[{type:l.Link,action:"back-action",label:o(oe,{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()}],ke=(e,t)=>({type:h.Group,className:he,sx:{p:2},desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fields:[{type:h.Component,className:ue,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(m,{flex:1})]})},{type:h.Group,fields:t.map(({label:e,to:t,color:i,icon:n})=>((e,t,i,n)=>({type:h.Component,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>o(S,{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",[`& .${be}`]:{transition:"filter 500ms"},"&:hover":{background:()=>fe(i)?k(i,.33):v(i,.33),[`& .${be}`]:{transition:"filter 500ms",filter:fe(i)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:o(n,{className:be}),children:t})}))(t,e,i,n))}]}),ve=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}},Ce=({height:e,width:t,items:i,position:a,priceOpen:n,priceStopLoss:l,priceTakeProfit:s})=>{const{classes:r}=ve(),c=L.useRef(void 0),[p,d]=L.useState(null);return L.useLayoutEffect(()=>{const{current:o}=c,r=x(o,{...Se,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=H(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:M[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=H(o.timestamp).format("DD/MM/YYYY HH:mm:ss"),t=z(o.close.toFixed(6));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"},xe={"1m":"1 minute","15m":"15 minutes","1h":"1 hour"};const we=({symbol:e,interval:t,reloadSubject:n,downloadSubject:l,onInfoClick:s,disableInfo:r,position:p,priceOpen:d,priceStopLoss:u,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=A(f);O(()=>n.subscribe(k)),O(()=>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(F,{sx:{...y,display:"flex",flexDirection:"column",alignItems:"stretch",overflow:"clip"},children:[o(m,{sx:{background:Le[t]||"#607d8b",minHeight:"48px",display:"flex",alignItems:"center",pl:2,pr:1},children:[o(c,{variant:"h6",sx:{color:"white",fontWeight:"bold",mr:1},children:xe[t]||t}),!!p&&o(b,{variant:"filled",sx:{color:"white"},color:"short"===p?"warning":"success",label:String(p).toUpperCase()}),o(m,{sx:{flex:1}}),o(N,{disabled:r,onClick:s,children:o(_,{style:{color:"white",opacity:r?.5:1}})})]}),o(R,{}),!f||g?o(I,{sx:{height:"100%",width:"100%"}}):o(m,{sx:{position:"relative",flex:1},children:o(j,{style:{position:"absolute"},children:({height:e,width:t})=>o(Ce,{items:f,height:e,width:t,position:p,priceOpen:d,priceStopLoss:u,priceTakeProfit:h})})})]})},Pe=[{type:l.Link,action:"back-action",label:o(oe,{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()}],Te=[{action:"download-now",label:"Download",icon:()=>o(r,{icon:J,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>o(r,{icon:ee,color:"#4caf50"})}],Ve=new W,$e=new W,Me=[{type:h.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"symbol",title:"Symbol",readonly:!0,compute:e=>e.symbol||"N/A"},{type:h.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:h.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"priceOpen",title:"Entry",readonly:!0,compute:e=>e.priceOpen?`${z(e.priceOpen)}$`:"N/A"},{type:h.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?`${z(e.originalPriceOpen)}$`:"N/A"},{type:h.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"priceTakeProfit",title:"Take Profit",readonly:!0,compute:e=>e.priceTakeProfit?`${z(e.priceTakeProfit)}$`:"N/A"},{type:h.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?`${z(e.originalPriceTakeProfit)}$`:"N/A"},{type:h.Text,outlined:!1,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",name:"priceStopLoss",title:"Stop Loss",readonly:!0,compute:e=>e.priceStopLoss?`${z(e.priceStopLoss)}$`:"N/A"},{type:h.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?`${z(e.originalPriceStopLoss)}$`:"N/A"},{type:h.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:h.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:h.Component,sx:{mt:2},element:({payload:e})=>o(S,{variant:"outlined",onClick:e.handleClose,children:"Back"})}],He=[{id:"chart",element:({params:e})=>{const t=E(()=>({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]});O(()=>Ve.subscribe(r));const c=L.useMemo(()=>l?l.priceTakeProfit:0,[l]),p=L.useMemo(()=>l?l.priceStopLoss:0,[l]),d=L.useMemo(()=>l?l.priceOpen:0,[l]),m=L.useMemo(()=>l?l.position:null,[l]),[u,h]=D(null),{pickData:b,setOpen:y,render:g}=U({title:"Info",AfterTitle:({onClose:e})=>o(f,{direction:"row",gap:2,children:[o(G,{onClick:()=>a.layoutService.pickSignal(u.current.id),variant:"outlined",children:"Show Details"}),o(Y,{size:"small",onClick:e,children:o(K,{})})]}),payload:()=>({handleClose(){y(!1)}}),fields:Me,handler:()=>u.current,withActionButton:!1}),k=B(async()=>{l&&(h(l),b(l.id))});return o(q,{children:[o(n,{items:Pe,actions:Te,payload:t,onAction:async o=>{"back-action"===o&&a.routerService.push(`/price_chart/${e.symbol}`),"update-now"===o&&await Ve.next(),"download-now"===o&&await $e.next()}}),s?null:o(we,{symbol:t.symbol,interval:t.interval,disableInfo:!l,reloadSubject:Ve,downloadSubject:$e,onInfoClick:k,position:m,priceOpen:d,priceStopLoss:p,priceTakeProfit:c,sx:{height:"calc(100dvh - 165px)"}}),g()]})},isActive:e=>X(["/price_chart/:symbol/:interval"],e)},{id:"coin",element:({params:e})=>{const{classes:t}=ye(),i=e.symbol,l=L.useMemo(()=>[{label:"1 minute",to:`/price_chart/${i}/1m`,color:"#2979ff",icon:ie},{label:"15 minutes",to:`/price_chart/${i}/15m`,color:"#f3a43a",icon:ae},{label:"1 hour",to:`/price_chart/${i}/1h`,color:"#d500f9",icon:te}],[i]),s=L.useMemo(()=>[ke("Chart",l)],[l]);return o(q,{children:[o(n,{items:ge,payload:i,onAction:e=>{"back-action"===e&&a.routerService.push("/price_chart")}}),o(d,{className:t.root,fields:s}),o(m,{paddingBottom:"24px"})]})},isActive:e=>X(["/price_chart/:symbol"],e)},{id:"main",element:()=>{const{classes:e}=re(),{reloadTrigger:l,doReload:s}=t(),[r,{loading:h}]=i(async()=>await(async()=>{const[e,o]=await Promise.all([a.symbolGlobalService.getSymbolList(),a.symbolGlobalService.getSymbolMap()]),t=e.map(e=>{const t=o[e];return{symbol:e,label:(null==t?void 0:t.displayName)||e,color:(null==t?void 0:t.color)||"#ccc"}});return t.length?[me(t)]:[]})(),{onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),deps:[l]});return o(q,{children:[o(n,{items:pe,actions:de,onAction:e=>{"back-action"===e&&a.routerService.push("/"),"update-now"===e&&s()}}),h||!r?o(p,{children:o(c,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):r.length?o(u,{children:[o(d,{className:e.root,fields:r},l),o(m,{paddingBottom:"24px"})]}):o(p,{children:o(c,{variant:"h6",sx:{opacity:.5},children:"No symbols found"})})]})},isActive:e=>X(["/price_chart"],e)}],ze=({symbol:e,interval:t})=>o(Q,{history:a.routerService,onLoadStart:()=>a.layoutService.setAppbarLoader(!0),onLoadEnd:()=>a.layoutService.setAppbarLoader(!1),routes:He,params:{symbol:e,interval:t}});export{ze as PriceChartPage,ze as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e,f as a,X as o,x as t,w as n,D as i,A as r,Y as s,Z as l,i as c,$ as d,a0 as p,a1 as h,J as m,a2 as b,a3 as u,a4 as g,B as y,T as v,a5 as x,k as f,l as k,a6 as S,V as w,a7 as L,a8 as P,a9 as R,I as $,aa as z,F as D,ab as j,ac as C}from"./index-Ce2sQITf.js";import{R as T,C as W}from"./Refresh-aWduZclR.js";import{K as F}from"./KeyboardArrowLeft-BlwcBPHn.js";import{I as O}from"./IconPhoto-DUgsqsYP.js";import{B as A}from"./Background-COpkJTP-.js";const B=e(a("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard"),V=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,H=[{type:t.Link,action:"back-action",label:a(F,{sx:{display:"block"}})},{type:t.Link,action:"back-action",label:"Main"},{type:t.Link,action:"back-action",label:"Overview"}],I=[{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:V,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>a(r,{icon:T,color:"#4caf50"})}],M=()=>a(n,{items:H,actions:I,onAction:E.next});const N=({data:{type:e},setLoading:o})=>{const{elementRef:t,size:n}=s({closest:".MuiContainer-root",compute:e=>(e.height-=150,e)}),[i,{loading:r,execute:j}]=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]}),C=d(i),T=d(e);p(()=>E.subscribe(e=>{if("update-now"===e&&j(),"download-action"===e){const e=new Blob([JSON.stringify(C.current,null,2)],{type:"application/json"}),a=URL.createObjectURL(e);c.layoutService.downloadFile(a,`signals_${T.current}_${Date.now()}.json`)}"dashboard-action"===e&&c.routerService.push(`/dashboard/${T.current}`),"logs-action"===e&&c.routerService.push("/logs"),"back-action"===e&&c.routerService.push("/main")}));const W=h.useMemo(()=>i?i.reduce((e,a)=>(e[a.symbol]||(e[a.symbol]=[]),e[a.symbol].push(a),e),{}):{},[i]),F=e=>{const o=W[e]||[];return o.length?a(D,{children:o.map((o,t)=>{return a(L,{sx:{background:e=>t%2==1?P(e.palette.getContrastText(e.palette.background.paper),.02):void 0},onClick:()=>c.layoutService.pickSignal(o.id),children:[a(u,{primary:a(y,{sx:{display:"flex",gap:1,flexWrap:"wrap",alignItems:"center"},children:[a(v,{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:["#",t+1]}),a(v,{variant:"body2",component:"span",sx:{fontWeight:"bold",px:1,py:.5,borderRadius:1,background:"long"===o.position?"#1976D2":"#F57C00",color:"white"},children:"long"===o.position?"LONG":"SHORT"}),a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"Entry:"}),R(o.priceOpen),"$",o.originalPriceOpen!==o.priceOpen&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[R(o.originalPriceOpen),"$"]})]}),a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium",color:"success.main"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"TP:"}),R(o.priceTakeProfit),"$",o.originalPriceTakeProfit!==o.priceTakeProfit&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[R(o.originalPriceTakeProfit),"$"]})]}),a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium",color:"error.main"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"SL:"}),R(o.priceStopLoss),"$",o.originalPriceStopLoss!==o.priceStopLoss&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[R(o.originalPriceStopLoss),"$"]})]}),"pnl"in o&&a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"Invested:"}),R(o.pnl.pnlEntries),"$"]}),"pnl"in o&&a(v,{variant:"body2",component:"span",sx:{fontWeight:"bold",px:1,py:.5,borderRadius:1,background:o.pnl.pnlPercentage>=0?P("#4caf50",.15):P("#f44336",.15),color:o.pnl.pnlPercentage>=0?"#2e7d32":"#c62828"},children:["PNL: ",o.pnl.pnlPercentage>=0?"+":"",o.pnl.pnlPercentage.toFixed(2),"%"," / ",o.pnl.pnlCost>=0?"+":"",R(o.pnl.pnlCost),"$"]}),o.totalEntries>1&&a(v,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:P("#2196f3",.15),color:"#1565c0"},children:["DCA×",o.totalEntries]}),o.totalPartials>0&&a(v,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:P("#9c27b0",.15),color:"#6a1b9a"},children:["Partial×",o.totalPartials]}),a(v,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:"opened"===o.status?P("#4caf50",.2):"scheduled"===o.status?P("#ff9800",.2):"closed"===o.status?P("#9e9e9e",.2):P("#f44336",.2),color:"opened"===o.status?"#2e7d32":"scheduled"===o.status?"#e65100":"closed"===o.status?"#616161":"#c62828"},children:o.status})]}),secondary:a(v,{pt:.5,variant:"subtitle2",sx:{opacity:.5},children:(n=o.createdAt,new Date(n).toLocaleString([],{year:"numeric",month:"numeric",day:"numeric",hourCycle:"h24",hour:"2-digit",minute:"2-digit",second:"2-digit"}))})}),a($,{disableRipple:!0,children:a(z,{})})]},`item-${e}-${o.id}`);var n})}):a(b,{children:a(u,{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:[W],children:async()=>{const o=Object.keys(W),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,s=(null==(n=W[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(O,{symbol:e})}),(null==(i=t[e])?void 0:i.displayName)||e,a(y,{flex:1}),a(v,{variant:"body2",sx:{fontWeight:"medium"},children:x(s,{one:"Signal",two:"Signals",many:"Signals"})})]}),a(y,{sx:{marginTop:"16px",marginBottom:"16px"},children:F(e)})]})},`section-${e}`);var l}):a(b,{children:a(u,{primary:"No signals yet",secondary:"live"===e?"Live signals will be displayed here":"Backtest signals will be displayed here"})})}})})},G=C(),J=(e,a)=>e.some(e=>e.includes(a)),K=[{id:"backtest",element:N,isActive:e=>J(["/backtest"],e)},{id:"live",element:N,isActive:e=>J(["/live"],e)}],U=[{id:"backtest",label:"Backtest"},{id:"live",label:"Live"}],X=()=>{p(()=>G.replace("/backtest"));return a(W,{children:[a(j,{withScroll:!0,sx:{height:"calc(100vh - 105px)"},BeforePaper:M,onLoadStart:()=>c.layoutService.setAppbarLoader(!0),onLoadEnd:()=>c.layoutService.setAppbarLoader(!1),routes:K,tabs:U,history:G,initialData:()=>({backtest:{type:"backtest"},live:{type:"live"}}),onTabChange:(e,a)=>{"backtest"===e&&a.replace("/backtest"),"live"===e&&a.replace("/live")}}),a(A,{})]})};export{X as OverviewPage,X as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e,f as a,r as t,b6 as i,b7 as o,Z as r,i as s,b8 as n,b9 as c,ba as l,I as d,au as p,aQ as h,bb as u,t as m,a8 as b,bc as f,H as y,T as g,aS as x,a2 as v,R as w,bd as S,a3 as L,be as k,aM as A,z as j,a0 as C,X as z,w as N,x as H,aX as R,B as E,A as M,aW as T}from"./index-Ce2sQITf.js";import{h as I}from"./hasRouteMatch-CImjW4Jf.js";import{B as V}from"./Background-COpkJTP-.js";import{A as B}from"./Article-DYhWfFAi.js";import{C as D,R as F}from"./Refresh-aWduZclR.js";import{K}from"./KeyboardArrowLeft-BlwcBPHn.js";const W=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"),X=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"),P="65px",O=e=>e.mimeType.startsWith("image/")?a(W,{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(X,{sx:{color:"#546e7a",fontSize:20}}),Q=m()(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:P},input:{height:P,paddingRight:e.spacing(2),paddingLeft:e.spacing(1),width:"100%"},container:{position:"absolute",top:P,left:0,right:0,bottom:0,height:`calc(100% - ${P})`,width:"100%",background:"white",overflow:"clip",display:"flex",alignItems:"stretch",justifyContent:"stretch"},content:{display:"flex",flex:1},loader:{height:"100%",width:"100%"},accent:{background:b("#00c3ff",.05)}})),Z=({outlinePaper:e,className:m,style:b,sx:j,nodes:C,initialSearch:z=""})=>{const{classes:N,cx:H}=Q(),[R,E]=t.useState(z),M=i(R),[T,{flush:I}]=o(R,2500),[V,{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 f(0),i.length>25e3)break;return i})(T,C),{onLoadStart:()=>s.layoutService.setAppbarLoader(!0),onLoadEnd:()=>s.layoutService.setAppbarLoader(!1),deps:[T,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:H(N.root,m),style:b,sx:j,children:[a("div",{className:N.header,children:a(c,{disabled:B,className:N.input,endAdornment:a(l,{position:"end",children:a(d,{disabled:B||!R,onClick:()=>{M.once(async()=>{await f(500),I()}),E("")},edge:"end",children:a(R?p:h,{})})}),placeholder:"Search",value:R,onBlur:()=>I(),onChange:({target:e})=>E(e.value),onKeyDown:({key:e,currentTarget:a})=>"Enter"===e&&a.blur()})}),a("div",{className:N.container,children:a("div",{className:N.content,children:V?V.length?a(A,{withScrollbar:!0,children:V.map((e,t)=>a(v,{className:H({[N.accent]:t%2==1}),component:w,onClick:()=>(async e=>{await D(e)})(e.id),children:[a(S,{children:O(e)}),a(L,{primary:e.label,secondary:e.path}),a(k,{content:e.path,label:"Copy path"})]},e.id))}):a(x,{sx:{height:"100%",width:"100%"},children:a(g,{variant:"h6",sx:{opacity:.5},children:"Not found"})}):a(y,{className:N.loader})})})]})},$=[{type:H.Link,action:"back-action",label:a(K,{sx:{display:"block"}})},{type:H.Link,action:"back-action",label:"Main"},{type:H.Link,action:"back-action",label:"Dump Explorer"}],q=[{action:"update-now",label:"Refresh",icon:()=>a(M,{icon:F,color:"#4caf50"})}],G=new z,J=({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(()=>G.subscribe(o));return a(D,{children:[a(N,{items:$,actions:q,onAction:e=>{"back-action"===e&&s.routerService.push("/"),"update-now"===e&&(s.explorerViewService.clear(),G.next())}}),a(R,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"calc(100vh - 150px)"},children:a(E,{pr:2,pl:2,children:i||!t?a(x,{children:a(g,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):a(Z,{nodes:t,initialSearch:e.search})})}),a(V,{})]})},U=[{id:"search",element:J,isActive:e=>I(["/dump/:search"],e)},{id:"main",element:J,isActive:e=>I(["/dump"],e)}],Y=({search:e=""})=>a(T,{history:s.routerService,onLoadStart:()=>s.layoutService.setAppbarLoader(!0),onLoadEnd:()=>s.layoutService.setAppbarLoader(!1),routes:U,params:{search:e}});export{Y as DumpPage,Y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a,f as t,T as e,N as o,bf as n,K as i,P as l,t as r,Z as c,i as s,a0 as d,w as p,x as h,z as m,A as y,E as w,G as u,H as x,y as f,aX as b,v as g,aW as v}from"./index-Ce2sQITf.js";import{h as S}from"./hasRouteMatch-CImjW4Jf.js";import{r as L}from"./emitters-CSLNlyHG.js";import{I as k}from"./IconPhoto-DUgsqsYP.js";import{C as D,R}from"./Refresh-aWduZclR.js";import{K as A}from"./KeyboardArrowLeft-BlwcBPHn.js";const N=a(t("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H8V4h12v12zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm12 6V9c0-.55-.45-1-1-1h-2v5h2c.55 0 1-.45 1-1zm-2-3h1v3h-1V9zm4 2h1v-1h-1V9h1V8h-2v5h1zm-8 0h1c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9v5h1v-2zm0-2h1v1h-1V9z"}),"PictureAsPdfOutlined"),j=r()(a=>({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:a.spacing(1),paddingBottom:a.spacing(2),gap:10,flexDirection:"column"},avatar:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"128px",minWidth:"128px"}})),V=[{type:i.Text,name:"totalPnl",title:"Total PNL",compute:a=>null!==a.totalPnl?`${a.totalPnl.toFixed(2)}%`:"N/A",readonly:!0},{type:i.Text,columns:"6",name:"winRate",title:"Win Rate",compute:a=>null!==a.winRate?`${a.winRate.toFixed(2)}%`:"N/A",readonly:!0},{type:i.Text,columns:"6",name:"profitFactor",title:"Profit Factor",compute:a=>null!==a.profitFactor?a.profitFactor.toFixed(2):"N/A",readonly:!0},{type:i.Text,columns:"6",name:"maxDrawdown",title:"Max Drawdown",compute:a=>null!==a.maxDrawdown?`${a.maxDrawdown.toFixed(2)}%`:"N/A",readonly:!0},{type:i.Text,columns:"6",name:"expectancy",title:"Expectancy",compute:a=>null!==a.expectancy?`${a.expectancy.toFixed(2)}%`:"N/A",readonly:!0},{type:i.Text,fieldBottomMargin:"0",name:"totalTrades",title:"Trades",readonly:!0}],F=({row:a})=>{const{classes:i}=j();return t(l,{className:i.root,children:[t("div",{className:i.header,children:t(e,{variant:"h6",sx:{opacity:.8},children:`${o.bullet} ${a.symbol}`})}),t("div",{className:i.container,children:t("div",{className:i.content,children:[t("div",{className:i.avatar,children:t(k,{symbol:a.symbol,sx:{width:128,height:128}})}),t(n,{handler:()=>a,fields:V,sx:{mb:2}})]})})]})},H=[{type:h.Link,action:"back-action",label:t(A,{sx:{display:"block"}})},{type:h.Link,action:"back-action",label:"Dashboard"},{type:h.Link,action:"back-action",label:"Heatmap"},{type:h.Button,action:"download-pdf",label:"Download PDF",icon:N}],T=[{action:"download-json",label:"Download JSON",icon:()=>t(y,{icon:m,color:"#4caf50"})},{action:"download-markdown",label:"Download Markdown",icon:()=>t(y,{icon:w,color:"#4caf50"})},{action:"download-pdf",label:"Download PDF",icon:()=>t(y,{icon:u,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>t(y,{icon:R,color:"#4caf50"})}],P=[{id:"main",element:()=>{const[a,{loading:e,execute:o}]=c(async()=>(a=>{if(!a.length)return[{type:i.Typography,typoVariant:"h6",placeholder:"No data",sx:{textAlign:"center",opacity:.5,mt:4}}];const e=a.map(a=>({type:i.Group,desktopColumns:"4",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",child:{type:i.Component,element:()=>t(F,{row:a})}}));return e.length>2?e:[{type:i.Center,sx:a=>({[a.breakpoints.up("lg")]:{height:"calc(100dvh - 165px)","& > *":{transform:"translateY(-56px)"}}}),fields:e}]})((await s.heatViewService.getStrategyHeatData()).symbols),{onLoadStart:()=>s.layoutService.setAppbarLoader(!0),onLoadEnd:()=>s.layoutService.setAppbarLoader(!1)});d(()=>L.subscribe(o));return t(D,{children:[t(p,{items:H,actions:T,onAction:async a=>{"back-action"===a&&s.routerService.push("/"),"update-now"===a&&await L.next(),"download-markdown"===a&&await(async()=>{const a=await s.heatViewService.getStrategyHeatReport(),t=new Blob([a],{type:"text/plain"}),e=URL.createObjectURL(t);s.layoutService.downloadFile(e,`heat_${Date.now()}.md`)})(),"download-pdf"===a&&await(async()=>{const a=await s.heatViewService.getStrategyHeatReport();await g(a)})(),"download-json"===a&&await(async()=>{const a=await s.heatViewService.getStrategyHeatData(),t=JSON.stringify(a,null,2),e=new Blob([t],{type:"text/plain"}),o=URL.createObjectURL(e);s.layoutService.downloadFile(o,`heat_${Date.now()}.md`)})()}}),!a||e?t(x,{sx:{height:"calc(100dvh - 165px)"}}):t(b,{withScrollbar:!0,sx:{height:"calc(100dvh - 165px)"},hideOverflowX:!0,children:t(f,{fields:a})})]})},isActive:a=>S(["/heat"],a)}],z=({id:a})=>t(v,{history:s.routerService,onLoadStart:()=>s.layoutService.setAppbarLoader(!0),onLoadEnd:()=>s.layoutService.setAppbarLoader(!1),routes:P,params:{id:a}});export{z as HeatPage,z as default};
|