PageSourceSearch

https://c3pool.com/assets/BlocksPage-CtZxBbn0.js

js c3pool.com collected 2026-10-04 20:38:12 UTC 6,114 bytes, 1 lines download raw bytes

1import{d as j,u as G,P as J,w as K,Q as Z,Z as q,c as p,b as d,t as n,j as l,W as B,a as N,h as f,y as k,H as y,$ as Y,o as i,F as b,n as ee,g as w,G as m,a0 as te,p as ae,m as oe,a1 as F,a2 as I,a3 as $,_ as re}from"./index-DzWggLfK.js";import{S as ne,a as le}from"./index-DCNfhbfE.js";import{T as se}from"./index-DwTaR9IZ.js";import{T as R}from"./index-DAvujiIZ.js";import"./slide-C48F4Dmy.js";import"./index-BCSBjaLc.js";import"./KeyCode-D7YpJ0Z0.js";import"./index-ChsPwAyt.js";import"./DownOutlined-BFM3F62_.js";import"./CheckOutlined-Di3J-i0G.js";import"./SearchOutlined-DzoDt8KC.js";import"./index-C2k2iJvH.js";import"./RightOutlined-7TvpgyXH.js";import"./LeftOutlined-BQ45Y8pj.js";import"./index-ruGUxaiW.js";const ie={class:"page-container"},ce={class:"blocks__header"},ue={class:"page__title"},pe={class:"page__subtitle"},de={class:"blocks__controls"},he={class:"blocks__controls-label"},ge={class:"card card--table"},fe={key:0,class:"mono"},me=["onClick"],z=30,xe=j({__name:"BlocksPage",setup(ve){const{t}=G(),x=J(),u=k(I),C=k(!1),P=k([]),T=k({}),c=k({current:1,pageSize:15,total:0,showSizeChanger:!0,pageSizeOptions:["15","50","100"],showQuickJumper:!0,showTotal:e=>t("explorer.blocksCount",{count:B(e)})}),g=y(()=>F(u.value)),O=y(()=>$.value.length?$.value:g.value?[g.value]:[]),_=y(()=>{var e;return x.stats?u.value===I?x.stats.mainBlocksFound??0:((e=x.stats.altBlocksFound)==null?void 0:e[u.value])??0:0});K(_,e=>{c.value={...c.value,total:e}},{immediate:!0});async function E(e=1){C.value=!0;try{const r=e-1,s=c.value.pageSize??15;P.value=await Y(u.value,r,s),c.value={...c.value,current:e,total:_.value}}finally{C.value=!1}}function D(e){c.value={...c.value,current:e.current,pageSize:e.pageSize},E(e.current??1)}function L(){c.value={...c.value,current:1,total:_.value},E(1)}function M(){var e;return((e=g.value)==null?void 0:e.divisor)??1e12}function H(e){return!e||!Number.isFinite(e)?"0":(e/M()).toFixed(6)}function V(e){const r=g.value;if(!r)return;const s=r.buildExplorerUrl?r.buildExplorerUrl(e):r.explorer?`${r.explorer}/search?value=${e}`:null;s&&window.open(s,"_blank","noopener")}function U(e){if(!e.valid)return{label:t("explorer.orphaned"),color:"error"};if(e.unlocked)return{label:t("explorer.confirmed"),color:"success"};const r=e.port??u.value,s=T.value[r]??0;if(s>0){const a=z-(s-e.height),o=F(r),h=(o==null?void 0:o.blockTime)??120;return a>0?{label:`${Math.ceil(a*h/60)} ${t("explorer.minsLeft")}`,color:"processing"}:a>-10?{label:t("explorer.soon"),color:"processing"}:{label:t("explorer.delayed"),color:"warning"}}return{label:t("explorer.pending"),color:"processing"}}function W(e){if(!e.valid)return t("explorer.orphaned");const r=e.port??u.value,s=r===I,a=s?e.rawReward:e.payValue??0,o=1e12;if(e.unlocked&&a)return(a/o).toFixed(6)+" XMR";if(s){const h=T.value[r]??0;if(h>0){const v=z-(h-e.height),S=F(r),X=(S==null?void 0:S.blockTime)??120;return v>0?`${Math.ceil(v*X/60)} ${t("explorer.minsLeft")}`:v>-10?t("explorer.soon"):t("explorer.delayed")}return t("explorer.pending")}return A(e.payStage)??t("explorer.pending")}function A(e){return e?{DONE:t("explorer.stageDone"),"Paid by other block":t("explorer.stagePaidByOther"),"Unlocking wallet balance":t("explorer.stageUnlockingWallet"),"Unlocking exchange balance":t("explorer.stageUnlockingExchange"),"Waiting for more exchange blocks":t("explorer.stageWaitingExchange"),"Exchange BASE trade":t("explorer.stageExchangeBase"),"Exchange BTC trade":t("explorer.stageExchangeBtc"),"Exchange USDT trade":t("explorer.stageExchangeUsdt"),"Exchange XMR trade":t("explorer.stageExchangeXmr")}[e]??e:void 0}const Q=y(()=>[{title:t("explorer.id"),dataIndex:"id",key:"id",width:70,align:"center"},{title:t("explorer.date"),dataIndex:"ts",key:"ts",width:180,align:"center"},{title:t("explorer.height"),dataIndex:"height",key:"height",width:110,align:"center"},{title:t("explorer.effort"),dataIndex:"effort",key:"effort",width:100,align:"center"},{title:t("explorer.reward"),dataIndex:"rawReward",key:"rawReward",width:160,align:"center"},{title:t("explorer.status"),key:"status",width:130,align:"center"},{title:t("explorer.payment"),key:"payment",width:160,align:"center"},{title:t("explorer.hash"),dataIndex:"hash",key:"hash"}]);return Z(async()=>{x.stats||x.refresh();try{T.value=await q()}catch{}E(1)}),(e,r)=>{var s;return i(),p("div",ie,[d("header",ce,[d("div",null,[d("h1",ue,n(l(t)("explorer.blocksTitle")),1),d("p",pe,n(((s=g.value)==null?void 0:s.name)??l(t)("explorer.allCoins"))+" · "+n(l(t)("explorer.blocksCount",{count:l(B)(_.value)})),1)]),d("div",de,[d("span",he,n(l(t)("coinsTable.coin")),1),N(l(ne),{value:u.value,"onUpdate:value":r[0]||(r[0]=a=>u.value=a),class:"blocks__select",bordered:!1,onChange:L},{default:f(()=>[(i(!0),p(b,null,ee(O.value,a=>(i(),w(l(le),{key:a.port,value:a.port},{default:f(()=>[m(n(a.name?`${a.symbol} · ${a.name}`:a.symbol),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])])]),d("div",ge,[N(l(se),{columns:Q.value,"data-source":P.value,loading:C.value,pagination:c.value,"row-key":"id",size:"middle",scroll:{x:1200},onChange:D},{bodyCell:f(({column:a,record:o})=>{var h;return[a.key==="ts"?(i(),p(b,{key:0},[m(n(l(te)(o.ts,"datetime")),1)],64)):a.key==="height"?(i(),p(b,{key:1},[m(n(l(B)(o.height)),1)],64)):a.key==="effort"?(i(),w(l(R),{key:2,color:o.effort>150?"red":o.effort>100?"orange":"green"},{default:f(()=>[m(n(o.effort.toFixed(0))+"% ",1)]),_:2},1032,["color"])):a.key==="rawReward"?(i(),p(b,{key:3},[o.valid?(i(),p("span",fe,n(H(o.rawReward))+" "+n(((h=g.value)==null?void 0:h.symbol)??""),1)):(i(),w(l(R),{key:1,color:"error"},{default:f(()=>
1[m(n(l(t)("explorer.orphaned")),1)]),_:1}))],64)):a.key==="status"?(i(),w(l(R),{key:4,color:U(o).color},{default:f(()=>[m(n(U(o).label),1)]),_:2},1032,["color"])):a.key==="payment"?(i(),p("span",{key:5,class:ae({mono:o.valid&&o.unlocked})},n(W(o)),3)):a.key==="hash"?(i(),p("button",{key:6,class:"hash-btn",type:"button",onClick:v=>V(o.hash)},[d("code",null,n(o.hash),1)],8,me)):oe("",!0)]}),_:1},8,["columns","data-source","loading","pagination"])])])}}}),Ne=re(xe,[["__scopeId","data-v-9cfe0afb"]]);export{Ne as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.