const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-_EicKBCA.js","assets/vendor-react-DSIERL8z.js","assets/AnswerBlock-DYvQ9iJs.js","assets/vendor-i18n-CK3oCOMf.js","assets/AnswerBlock-7WA5goIU.css","assets/useSEOMetadata-BfKVMuUp.js","assets/Dashboard-B0D0HRxR.css","assets/Whitepaper-DgRZANn_.js","assets/vendor-utils-KRDf5bqx.js","assets/vendor-observability-DZmngUBG.js","assets/vendor-icons-BBf5w-s_.js","assets/Documentation-CI57t0D0.js","assets/ApiSubscription-Bui2c1hP.js","assets/AboutUs-SrzAd9tp.js","assets/Legal-CUSdcxl3.js","assets/Terms-Yph67RZP.js","assets/Privacy-h2zjwQPv.js","assets/Accessibility-E8IYexzZ.js","assets/FAQ-CoeXoYCC.js","assets/TzurWallet-DXqgkldw.js","assets/index-CRJyBhO1.js","assets/index-BH8NLF0z.css","assets/LazyImage-DJdYTe-M.js","assets/Starfield-Dz2WGmXg.js","assets/Starfield-e90VrjmE.css","assets/index-CPL8BpyC.js","assets/index-Y-Juwx_f.css","assets/sentry-_43brHoW.js","assets/index-0-drYcX5.js","assets/resource-metrics-DeTZOTiS.js","assets/index-KUAdLZJd.js","assets/index-D_0oDN8-.js"])))=>i.map(i=>d[i]); import{a as ri,b as ii,g as oi,r as d,L as Jt,c as Bs,u as ci,d as li,e as ce,N as ui,R as Ue,B as di}from"./vendor-react-DSIERL8z.js";import{u as re,i as Rs,a as hi}from"./vendor-i18n-CK3oCOMf.js";import{p as gn}from"./vendor-utils-KRDf5bqx.js";import{c as mi}from"./vendor-observability-DZmngUBG.js";import{R as pi,C as fi,a as gi,T as yi,L as bi,A as vi,F as ki,B as Si,b as _i,c as wi,W as Ei,U as Ti,S as Ci,M as Ai,d as xi}from"./vendor-icons-BBf5w-s_.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();const Bi="modulepreload",Ri=function(n){return"/"+n},Sa={},k=function(e,t,a){let s=Promise.resolve();if(t&&t.length>0){let h=function(m){return Promise.all(m.map(f=>Promise.resolve(f).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");s=h(t.map(m=>{if(m=Ri(m),m in Sa)return;Sa[m]=!0;const f=m.endsWith(".css"),b=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${b}`))return;const S=document.createElement("link");if(S.rel=f?"stylesheet":Bi,f||(S.as="script"),S.crossOrigin="",S.href=m,l&&S.setAttribute("nonce",l),document.head.appendChild(S),f)return new Promise((v,T)=>{S.addEventListener("load",v),S.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${m}`)))})}))}function r(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return s.then(o=>{for(const l of o||[])l.status==="rejected"&&r(l.reason);return e().catch(r)})};var yn={exports:{}},At={};var _a;function Ii(){if(_a)return At;_a=1;var n=ri(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r={key:!0,ref:!0,__self:!0,__source:!0};function o(l,h,m){var f,b={},S=null,v=null;m!==void 0&&(S=""+m),h.key!==void 0&&(S=""+h.key),h.ref!==void 0&&(v=h.ref);for(f in h)a.call(h,f)&&!r.hasOwnProperty(f)&&(b[f]=h[f]);if(l&&l.defaultProps)for(f in h=l.defaultProps,h)b[f]===void 0&&(b[f]=h[f]);return{$$typeof:e,type:l,key:S,ref:v,props:b,_owner:s.current}}return At.Fragment=t,At.jsx=o,At.jsxs=o,At}var wa;function Pi(){return wa||(wa=1,yn.exports=Ii()),yn.exports}var u=Pi(),Ut={},Ea;function Li(){if(Ea)return Ut;Ea=1;var n=ii();return Ut.createRoot=n.createRoot,Ut.hydrateRoot=n.hydrateRoot,Ut}var Di=Li();const Ni=oi(Di),Oi="_button_nzd27_31",Mi="_primary_nzd27_93",Hi="_secondary_nzd27_127",Fi="_ghost_nzd27_159",ji="_danger_nzd27_189",Ui="_sm_nzd27_231",Wi="_md_nzd27_245",zi="_lg_nzd27_259",Vi="_disabled_nzd27_281",qi="_fullWidth_nzd27_301",$i="_iconOnly_nzd27_319",Ki="_iconWrapper_nzd27_353",Gi="_iconLeft_nzd27_373",Zi="_iconRight_nzd27_375",Yi="_content_nzd27_389",xe={button:Oi,primary:Mi,secondary:Hi,ghost:Fi,danger:ji,sm:Ui,md:Wi,lg:zi,disabled:Vi,fullWidth:qi,iconOnly:$i,iconWrapper:Ki,iconLeft:Gi,iconRight:Zi,content:Yi},Ji=d.forwardRef(function({variant:e="primary",size:t="md",leftIcon:a,rightIcon:s,fullWidth:r=!1,iconOnly:o=!1,disabled:l,className:h,children:m,type:f="button",...b},S){const v=[xe.button,xe[e],xe[t],l&&xe.disabled,r&&xe.fullWidth,o&&xe.iconOnly,h].filter(Boolean).join(" ");return o?u.jsx("button",{ref:S,type:f,className:v,disabled:l,...b,children:u.jsx("span",{className:xe.iconWrapper,children:a||s})}):u.jsxs("button",{ref:S,type:f,className:v,disabled:l,...b,children:[a&&u.jsx("span",{className:xe.iconLeft,children:a}),m&&u.jsx("span",{className:xe.content,children:m}),s&&u.jsx("span",{className:xe.iconRight,children:s})]})});Ji.displayName="Button";const Xi="_ctaButton_smcig_15",Qi="_ctaGradient_smcig_1",eo="_primary_smcig_58",to="_secondary_smcig_70",no="_buttonText_smcig_75",ao="_sm_smcig_89",so="_md_smcig_94",ro="_lg_smcig_99",io="_fullWidth_smcig_108",oo="_starsContainer_smcig_142",co="_stars_smcig_142",lo="_ctaStarScroll_smcig_1",uo="_ctaStarRotate_smcig_1",ho="_glow_smcig_191",mo="_glowCircle_smcig_198",po="_ctaGlowPulse_smcig_1",fo="_glowPink_smcig_206",go="_glowPurple_smcig_210",yo="_disabled_smcig_255",bo="_loading_smcig_277",me={ctaButton:Xi,ctaGradient:Qi,primary:eo,secondary:to,buttonText:no,sm:ao,md:so,lg:ro,fullWidth:io,starsContainer:oo,stars:co,ctaStarScroll:lo,ctaStarRotate:uo,glow:ho,glowCircle:mo,ctaGlowPulse:po,glowPink:fo,glowPurple:go,disabled:yo,loading:bo},vo=d.forwardRef(function({variant:e="primary",size:t="md",fullWidth:a=!1,loading:s=!1,disabled:r,className:o,children:l,type:h="button",...m},f){const b=r||s,S=e==="primary",v=[me.ctaButton,me[e],me[t],a&&me.fullWidth,b&&me.disabled,s&&me.loading,o].filter(Boolean).join(" ");return u.jsxs("button",{ref:f,type:h,className:v,disabled:b,...m,children:[u.jsx("strong",{className:me.buttonText,children:l}),S&&u.jsx("div",{className:me.starsContainer,children:u.jsx("div",{className:me.stars})}),S&&u.jsxs("div",{className:me.glow,children:[u.jsx("div",{className:`${me.glowCircle} ${me.glowPink}`}),u.jsx("div",{className:`${me.glowCircle} ${me.glowPurple}`})]})]})});vo.displayName="CtaButton";const ko="_wrapper_ppy8b_39",So="_menu_ppy8b_57",_o="_menuLeft_ppy8b_97",wo="_menuRight_ppy8b_105",Eo="_item_ppy8b_121",To="_itemActive_ppy8b_225",Co="_itemDanger_ppy8b_237",Ao="_icon_ppy8b_263",xo="_label_ppy8b_301",Bo="_separator_ppy8b_325",Be={wrapper:ko,menu:So,menuLeft:_o,menuRight:wo,item:Eo,itemActive:To,itemDanger:Co,icon:Ao,label:xo,separator:Bo},Ro=({trigger:n,items:e,isOpen:t,onToggle:a,onClose:s,position:r="left",className:o="",menuClassName:l=""})=>{const{t:h}=re(),m=d.useRef(null);d.useEffect(()=>{const T=_=>{m.current&&!m.current.contains(_.target)&&s()};return t&&document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T)}},[t,s]),d.useEffect(()=>{const T=_=>{_.key==="Escape"&&t&&s()};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[t,s]);const f=d.useCallback(T=>{T.onClick&&T.onClick(),s()},[s]),b=T=>{const _=[Be.item,T.variant==="danger"&&Be.itemDanger,T.active&&Be.itemActive].filter(Boolean).join(" "),w=u.jsxs(u.Fragment,{children:[T.icon&&u.jsx("span",{className:Be.icon,children:T.icon}),u.jsx("span",{className:Be.label,children:h(T.labelKey)})]});return T.href?u.jsx(Jt,{to:T.href,className:_,onClick:s,children:w},T.key):u.jsx("button",{type:"button",className:_,onClick:()=>f(T),children:w},T.key)},S=[Be.menu,r==="left"?Be.menuLeft:Be.menuRight,l].filter(Boolean).join(" "),v=d.isValidElement(n)?d.cloneElement(n,{onClick:a}):n;return u.jsxs("div",{ref:m,className:`${Be.wrapper} ${o}`,children:[v,t&&u.jsx("div",{className:S,role:"menu",children:e.map((T,_)=>u.jsxs("div",{children:[b(T),T.separator&&_(n.LOW="LOW",n.MEDIUM="MEDIUM",n.HIGH="HIGH",n.CRITICAL="CRITICAL",n))(mt||{}),fe=(n=>(n.RENDER="RENDER",n.LIFECYCLE="LIFECYCLE",n.EVENT_HANDLER="EVENT_HANDLER",n.ASYNC_OPERATION="ASYNC_OPERATION",n.WEBGL_THREEJS="WEBGL_THREEJS",n.WEBSOCKET="WEBSOCKET",n.STATE_MANAGEMENT="STATE_MANAGEMENT",n.ROUTING="ROUTING",n.UNKNOWN="UNKNOWN",n))(fe||{});function qe(n,e){return e.some(t=>n.includes(t))}function Io(n,e){return qe(n,["webgl","three","renderer","shader","buffer","texture","geometry","material"])||qe(e,["webgl","three","renderer"])}function Po(n){return qe(n,["render","component","hook","state","effect"])}function Lo(n){return qe(n,["event","click","input","change"])}function Do(n){return qe(n,["fetch","api","network","timeout","promise"])}function No(n){return qe(n,["websocket","socket","connection"])}function Oo(n){return qe(n,["context","reducer","store","state"])}function Mo(n){return qe(n,["route","navigation","router"])}function Ho(n){const e=(n?.message||"").toLowerCase(),t=n?.stack?.toLowerCase()||"";return Io(e,t)?fe.WEBGL_THREEJS:Po(e)?fe.LIFECYCLE:Lo(e)?fe.EVENT_HANDLER:Do(e)?fe.ASYNC_OPERATION:No(e)?fe.WEBSOCKET:Oo(e)?fe.STATE_MANAGEMENT:Mo(e)?fe.ROUTING:fe.UNKNOWN}function Fo(n,e){const t=(n.message||"").toLowerCase(),a=n.stack?.toLowerCase()||"";return t.includes("cannot read properties of undefined")||t.includes("cannot read properties of null")||t.includes("maximum update depth exceeded")||t.includes("webgl context lost")||t.includes("out of memory")||a.includes("maximum update depth exceeded")?mt.CRITICAL:e===fe.WEBGL_THREEJS||e===fe.STATE_MANAGEMENT||t.includes("render")||t.includes("component")?mt.HIGH:e===fe.ASYNC_OPERATION||e===fe.WEBSOCKET||t.includes("network")||t.includes("timeout")?mt.MEDIUM:mt.LOW}function jo(n){return n.severity!==mt.CRITICAL&&n.retryCount!==void 0&&n.retryCount<3}function Uo(n){return Math.min(1e3*2**n,1e4)}const Wo=/^[a-zA-Z_:][a-zA-Z0-9_:]*$/;class Kn{name;help;labels;values=new Map;constructor(e,t,a){if(!Wo.test(e))throw new Error(`Invalid metric name: ${e}. Must match Prometheus naming convention: [a-zA-Z_:][a-zA-Z0-9_:]*`);this.name=e,this.help=t,this.labels=a,this.values.set("",0)}getName(){return this.name}getHelp(){return this.help}getLabels(){return this.labels}get(e){const t=this.getLabelKey(e);return this.values.get(t)||0}inc(e){const t=this.getLabelKey(e),a=this.values.get(t)||0;this.values.set(t,a+1)}reset(e){const t=this.getLabelKey(e);this.values.set(t,0)}resetAll(){this.values.clear(),this.values.set("",0)}getLabelKey(e){if(!this.labels||!e)return"";for(const a of this.labels)if(!(a in e))throw new Error(`Missing label value for label: ${a}`);return[...this.labels].sort().map(a=>`${a}=${e[a]}`).join(",")}parseLabelKey(e){const t={};if(!e)return t;const a=e.split(",");for(const s of a){const[r,o]=s.split("=");r&&o&&(t[r]=o)}return t}}class Pt extends Kn{constructor(e,t,a,s){super(e,t,a)}add(e,t){if(e<0)throw new Error("Counter value cannot be negative");const a=this.getLabelKey(t),s=this.values.get(a)||0;this.values.set(a,s+e)}getAll(){const e=[];for(const[t,a]of this.values.entries())if(t==="")(!this.labels||this.labels.length===0)&&e.push({labels:{},value:a});else{const s=this.parseLabelKey(t);e.push({labels:s,value:a})}return e}}class Lt extends Kn{constructor(e,t,a,s){super(e,t,a)}set(e,t){const a=this.getLabelKey(t);this.values.set(a,e)}dec(e){const t=this.getLabelKey(e),a=this.values.get(t)||0;this.values.set(t,a-1)}add(e,t){const a=this.getLabelKey(t),s=this.values.get(a)||0;this.values.set(a,s+e)}sub(e,t){const a=this.getLabelKey(t),s=this.values.get(a)||0;this.values.set(a,s-e)}getAll(){const e=[];for(const[t,a]of this.values.entries())if(t==="")e.push({labels:{},value:a});else{const s=this.parseLabelKey(t);e.push({labels:s,value:a})}return e}}const zo=[.005,.01,.025,.05,.1,.25,.5,1,2.5,5,10];class pt extends Kn{buckets;observations=new Map;sums=new Map;counts=new Map;constructor(e,t,a,s,r){super(e,t,s),this.validateBuckets(a),this.buckets=a||zo,this.observations.set("",[]),this.sums.set("",0),this.counts.set("",0)}observe(e,t){if(e<0)throw new Error("Histogram value cannot be negative");const a=this.getLabelKey(t),s=this.observations.get(a)||[];s.push(e),this.observations.set(a,s);const r=this.sums.get(a)||0;this.sums.set(a,r+e);const o=this.counts.get(a)||0;this.counts.set(a,o+1)}getBuckets(e){const t=this.getLabelKey(e),a=this.observations.get(t)||[],s=[];for(const r of this.buckets){const o=a.filter(l=>l<=r).length;s.push({le:r,count:o})}return s.push({le:Number.POSITIVE_INFINITY,count:a.length}),s}getSum(e){const t=this.getLabelKey(e);return this.sums.get(t)||0}getCount(e){const t=this.getLabelKey(e);return this.counts.get(t)||0}getObservations(e){const t=this.getLabelKey(e);return[...this.observations.get(t)||[]]}reset(e){const t=this.getLabelKey(e);this.observations.set(t,[]),this.sums.set(t,0),this.counts.set(t,0)}resetAll(){this.observations.clear(),this.sums.clear(),this.counts.clear(),this.observations.set("",[]),this.sums.set("",0),this.counts.set("",0)}getAll(){const e=[],t=new Set([...this.observations.keys(),...this.sums.keys(),...this.counts.keys()]);for(const a of t){const s=a===""?{}:this.parseLabelKey(a),r=this.getBuckets(a===""?void 0:s),o=this.sums.get(a)||0,l=this.counts.get(a)||0;e.push({labels:s,buckets:r,sum:o,count:l})}return e}getBucketBoundaries(){return[...this.buckets]}validateBuckets(e){if(e){if(e.length===0)throw new Error("Buckets array cannot be empty");for(let t=0;t0&&e[t]<=e[t-1])throw new Error("Buckets must be sorted in ascending order")}}}}class ft{static instance;metrics=new Map;constructor(){}static getInstance(){return ft.instance||(ft.instance=new ft),ft.instance}register(e){const t=e.getName();if(this.metrics.has(t))throw new Error(`Metric ${t} is already registered`);this.metrics.set(t,e)}get(e){return this.metrics.get(e)}getCounter(e){const t=this.get(e);return t instanceof Pt?t:void 0}getGauge(e){const t=this.get(e);return t instanceof Lt?t:void 0}getHistogram(e){const t=this.get(e);return t instanceof pt?t:void 0}has(e){return this.metrics.has(e)}getAll(){return Array.from(this.metrics.values())}getAllCounters(){return this.getAll().filter(e=>e instanceof Pt)}getAllGauges(){return this.getAll().filter(e=>e instanceof Lt)}getAllHistograms(){return this.getAll().filter(e=>e instanceof pt)}clear(){this.metrics.clear()}size(){return this.metrics.size}getNames(){return Array.from(this.metrics.keys())}}class gt{static instance;registry;config;constructor(e={}){this.config={enabled:e.enabled??!0,maxMetrics:e.maxMetrics??1e3,debug:e.debug??!1},this.registry=ft.getInstance()}static getInstance(e){return gt.instance||(gt.instance=new gt(e)),gt.instance}counter(e,t,a){if(!this.config.enabled)return new Pt(e,t,a,this.registry);const s=this.registry.get(e);if(s&&s instanceof Pt)return s;if(s)throw new Error(`Metric ${e} already exists with different type`);const r=new Pt(e,t,a,this.registry);return this.registry.register(r),r}gauge(e,t,a){if(!this.config.enabled)return new Lt(e,t,a,this.registry);const s=this.registry.get(e);if(s&&s instanceof Lt)return s;if(s)throw new Error(`Metric ${e} already exists with different type`);const r=new Lt(e,t,a,this.registry);return this.registry.register(r),r}histogram(e,t,a,s){if(!this.config.enabled)return new pt(e,t,a,s,this.registry);const r=this.registry.get(e);if(r&&r instanceof pt)return r;if(r)throw new Error(`Metric ${e} already exists with different type`);const o=new pt(e,t,a,s,this.registry);return this.registry.register(o),o}getAllMetrics(){return this.registry.getAll()}getMetric(e){return this.registry.get(e)}getHistogram(e){const t=this.getMetric(e);return t instanceof pt?t:void 0}clear(){this.registry.clear()}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}}const Z=gt.getInstance(),Vo={},Gn={serviceName:"blocksight-frontend",serviceVersion:"1.0.0",otlpEndpoint:"/api/traces",samplingRate:.1,sampleErrors:!0,enabled:!0};let yt=null,Qe=Gn;function Zn(){try{return typeof window<"u"&&"opentelemetry"in window}catch{return!1}}function qo(n){if(!Zn())return Vo?.VITE_ENABLE_TRACING==="true"&&console.warn("[Tracing] OpenTelemetry packages not installed. Install with: npm install @opentelemetry/api @opentelemetry/sdk-trace-web @opentelemetry/exporter-trace-otlp-http @opentelemetry/resources @opentelemetry/semantic-conventions"),In();try{const{WebTracerProvider:e,BatchSpanProcessor:t}=require("@opentelemetry/sdk-trace-web"),{OTLPTraceExporter:a}=require("@opentelemetry/exporter-trace-otlp-http"),{Resource:s}=require("@opentelemetry/resources"),{SemanticResourceAttributes:r}=require("@opentelemetry/semantic-conventions"),{trace:o}=require("@opentelemetry/api"),l=new s({[r.SERVICE_NAME]:n.serviceName,[r.SERVICE_VERSION]:n.serviceVersion}),h=new a({url:n.otlpEndpoint}),m=new e({resource:l});return m.addSpanProcessor(new t(h)),m.register(),{tracer:o.getTracer(n.serviceName,n.serviceVersion),provider:m,exporter:h,config:n}}catch(e){return console.error("[Tracing] Failed to initialize OpenTelemetry:",e),In()}}function In(){const n={setAttribute:()=>{},setAttributes:()=>{},addEvent:()=>{},setStatus:()=>{},recordException:()=>{},updateName:()=>{},end:()=>{},isRecording:()=>!1,spanContext:()=>({traceId:"00000000000000000000000000000000",spanId:"0000000000000000",traceFlags:0})};return{tracer:{startSpan:()=>n},provider:null,exporter:null,config:Qe}}function $o(n){if(Qe={...Gn,...n},!Qe.enabled){yt=In();return}yt=qo(Qe)}function Ko(){if(!yt&&($o(),!yt))throw new Error("Tracer failed to initialize");return yt}function Yn(){try{if(!Zn())return null;const{trace:n}=require("@opentelemetry/api");return n.getActiveSpan()||null}catch{return null}}function Is(n,e,t){return Ko().tracer.startSpan(n,{attributes:e,...t?{links:[{context:t}]}:{}})}function lS(){const n=Yn();if(n)try{const e=n.spanContext();return e.traceId!=="00000000000000000000000000000000"?e.traceId:void 0}catch{return}}function uS(){const n=Yn();if(n)try{const e=n.spanContext();return e.spanId!=="0000000000000000"?e.spanId:void 0}catch{return}}function dS(){const n=Yn();if(!n)return{};try{const e=n.spanContext();return e.traceId==="00000000000000000000000000000000"?{}:{traceparent:`00-${e.traceId}-${e.spanId}-0${e.traceFlags}`}}catch{return{}}}function hS(){return Qe.enabled&&Zn()}function mS(){return{...Qe}}function pS(){yt=null,Qe={...Gn}}var $=(n=>(n.DEBUG="debug",n.INFO="info",n.WARN="warn",n.ERROR="error",n))($||{}),g=(n=>(n.COMPONENT="COMPONENT",n.SERVICE="SERVICE",n.REPOSITORY="REPOSITORY",n.WEBSOCKET="WEBSOCKET",n.API="API",n.HOOK="HOOK",n.CONTEXT="CONTEXT",n.RENDER="RENDER",n.DATA_STORE="DATA_STORE",n.CACHE="CACHE",n.ANIMATION="ANIMATION",n.NAVIGATION="NAVIGATION",n.CONFIG="CONFIG",n.PERFORMANCE="PERFORMANCE",n.HEALTH="HEALTH",n.ERROR="ERROR",n.SECURITY="SECURITY",n.USER_ACTION="USER_ACTION",n.EVENT="EVENT",n.BRIDGE="BRIDGE",n.DEBUG="DEBUG",n))(g||{});class Go{config;transports=[];constructor(e={}){this.config={service:"blocksight-frontend",enableJsonOutput:!0,enablePrettyConsole:!1,hideStackTracesInProduction:!0,sanitizeSensitiveData:!0,...e}}sensitivePatterns=[/\bpassword\b/i,/\bapi[_-]?key\b/i,/\bsecret\b/i,/\btoken\b/i,/auth[_-]?token/i,/access[_-]?token/i,/refresh[_-]?token/i,/\bprivate[_-]?key\b/i,/\bcredit[_-]?card\b/i,/\bssn\b/i,/\bsocial[_-]?security\b/i,/\bpin\b/i];sanitizeData(e,t=new WeakSet){if(!this.config.sanitizeSensitiveData)return e;if(t.has(e))return{"[CIRCULAR_REFERENCE]":"[REDACTED]"};t.add(e);const a={};for(const[s,r]of Object.entries(e))this.sensitivePatterns.some(l=>l.test(s))?a[s]="[REDACTED]":Array.isArray(r)?a[s]=r.map(l=>typeof l=="object"&&l!==null?this.sanitizeData(l,t):l):typeof r=="object"&&r!==null?a[s]=this.sanitizeData(r,t):a[s]=r;return a}getIsProd(){try{if(typeof global<"u"){const e=global;if(e.import?.meta?.env?.PROD!==void 0)return e.import.meta.env.PROD??!1}return!0}catch{return!1}}sanitizeErrorMessage(e){if(!this.config.sanitizeSensitiveData||!this.getIsProd())return e;let t=e;return t=t.replace(/[a-zA-Z0-9]{32,}/g,"[REDACTED]"),t=t.replace(/Bearer\s+[a-zA-Z0-9._-]+/gi,"Bearer [REDACTED]"),t=t.replace(/token[=:]\s*[a-zA-Z0-9._-]+/gi,"token=[REDACTED]"),t=t.replace(/([a-zA-Z0-9._-]+)@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/g,"[REDACTED]@$2"),t=t.replace(/https?:\/\/[^:]+:[^@]+@/g,"https://[REDACTED]:[REDACTED]@"),t}formatAsJson(e,t){const a=e.metadata&&this.config.sanitizeSensitiveData?this.sanitizeData(e.metadata):e.metadata,s=this.sanitizeErrorMessage(e.message),o=this.config.hideStackTracesInProduction&&this.getIsProd()?void 0:e.metadata?.stack,l={...e,message:s,metadata:a,data:a,stack:o,correlationId:t||this.config.correlationId,levelName:e.level.toUpperCase(),service:this.config.service};try{return JSON.stringify(l)}catch{return JSON.stringify({level:e.level,levelName:e.level.toUpperCase(),category:e.category,message:e.message,timestamp:e.timestamp,correlationId:t||this.config.correlationId,service:this.config.service,error:"Failed to serialize log entry"})}}formatForConsole(e,t){const a=this.formatAsJson(e,t);if(this.config.enablePrettyConsole)try{const s=JSON.parse(a);return JSON.stringify(s,null,2)}catch{return a}return a}outputToConsole(e,t){const a=this.formatForConsole(e,t);switch(e.level){case $.DEBUG:console.debug(a);break;case $.INFO:console.info(a);break;case $.WARN:console.warn(a);break;case $.ERROR:console.error(a);break}if(this.transports.length>0){const s={...e,correlationId:t||this.config.correlationId,levelName:e.level.toUpperCase(),service:this.config.service};this.shipToTransports(s)}}setCorrelationId(e){this.config.correlationId=e}getCorrelationId(){return this.config.correlationId}updateConfig(e){this.config={...this.config,...e}}addTransport(e){this.transports.push(e)}removeTransport(e){const t=this.transports.indexOf(e);t>-1&&this.transports.splice(t,1)}async shipToTransports(e){for(const t of this.transports)if(t.isReady())try{await t.ship([e])}catch(a){console.warn("[StructuredLogger] Transport ship failed:",a)}}hasActiveTransports(){return this.transports.some(e=>e.isReady())}forward(e){if(this.transports.length===0)return;const t={...e,correlationId:this.config.correlationId,levelName:e.level.toUpperCase(),service:this.config.service};this.shipToTransports(t)}async shutdownTransports(){for(const e of this.transports)try{await e.shutdown()}catch(t){console.warn("[StructuredLogger] Transport shutdown failed:",t)}}}const tn=new Go;function Ps(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,n=>{const e=Math.random()*16|0;return(n==="x"?e:e&3|8).toString(16)})}let bn=null,st=null;function Ls(){return Ps()}function Ta(){return Ps()}function Ds(){return bn||(bn=Ls()),bn}function Zo(){if(!st)if(typeof sessionStorage<"u"){const n=sessionStorage.getItem("blocksight-session-id");n?st=n:(st=Ta(),sessionStorage.setItem("blocksight-session-id",st))}else st=Ta();return st}var Yo={};class Jo{config;constructor(){const e=this.isTestEnvironment();this.config={minLevel:$.INFO,enableConsole:!e&&!(typeof import.meta<"u"),enableFile:!1,enableRemote:!1,prettyPrint:!1,includeStackTrace:!1}}isTestEnvironment(){return typeof process<"u"&&(Yo.JEST_WORKER_ID!==void 0||typeof jest<"u")}levelPriority={[$.DEBUG]:0,[$.INFO]:1,[$.WARN]:2,[$.ERROR]:3};debug(e,t,a={}){this.log($.DEBUG,e,t,a)}info(e,t,a={}){this.log($.INFO,e,t,a)}warn(e,t,a={}){this.log($.WARN,e,t,a)}error(e,t,a={}){this.log($.ERROR,e,t,a)}log(e,t,a,s){if(this.levelPriority[e]{const s=e||Ls();return y.info(g.SERVICE,"Correlation ID generated",{correlationId:s}),s});d.useEffect(()=>{Xo(t)},[t]);const a=d.useMemo(()=>({correlationId:t}),[t]);return u.jsx(Jn.Provider,{value:a,children:n})}function un(n,e={}){const{url:t,attributes:a={},messageSize:s,error:r}=e,o=`websocket.${n}`,l={"websocket.event":n,...a};t&&(l["websocket.url"]=t),s!==void 0&&(l["websocket.message.size"]=s);const h=Is(o,l);return r?(h.recordException(r),h.setStatus({code:2,message:r.message})):h.setStatus({code:1}),h}function tc(n){return un("connect",{url:n})}function Ca(n){const e=un("disconnect",{url:n});return e.end(),e}function nc(n,e){const t=un("message",{url:n,messageSize:e});return t.end(),t}function ac(n,e){const t=un("error",{url:n,error:e});return t.end(),t}const sc="_errorDisplayContainer_igepb_39",rc="_errorCard_igepb_75",ic="_errorCardMini_igepb_153",oc="_errorTitle_igepb_177",cc="_errorDetails_igepb_195",lc="_errorCardSmall_igepb_203",uc="_errorCardLarge_igepb_223",dc="_errorCardWidget_igepb_245",hc="_errorHeader_igepb_281",mc="_errorDetailsText_igepb_351",_e={errorDisplayContainer:sc,errorCard:rc,errorCardMini:ic,errorTitle:oc,errorDetails:cc,errorCardSmall:lc,errorCardLarge:uc,errorCardWidget:dc,errorHeader:hc,errorDetailsText:mc},Os=({componentName:n,errorMessage:e,errorDetails:t,onRetry:a,onReload:s,showDetails:r=!1,severity:o="medium",icon:l,size:h="medium"})=>{const{t:m}=re(),f=()=>{switch(h){case"mini":return _e.errorCardMini;case"small":return _e.errorCardSmall;case"large":return _e.errorCardLarge;case"widget":return _e.errorCardWidget;default:return _e.errorCard}},b=()=>h==="mini"?m("errors.widget.failedToLoad",{componentName:n}):e??m("errors.general");return u.jsx("div",{className:_e.errorDisplayContainer,children:u.jsxs("div",{className:`${_e.errorCard} ${f()}`,children:[u.jsx("div",{className:_e.errorHeader,children:u.jsx("div",{className:_e.errorTitle,children:b()})}),r&&t&&h!=="mini"&&u.jsx("div",{className:_e.errorDetails,children:u.jsx("div",{className:_e.errorDetailsText,children:t})})]})})};class pc extends d.Component{getCorrelationId(){return this.context?.correlationId}constructor(e){super(e),this.state={hasError:!1,retryCount:0,isRecovering:!1,lastErrorTime:0}}static contextType=Jn;static getDerivedStateFromError(e){return{hasError:!0,error:e,lastErrorTime:Date.now()}}componentDidCatch(e,t){const{componentName:a,onError:s,customErrorHandler:r,type:o="general"}=this.props,l=this.getCorrelationId(),h=Ho(e),m=Fo(e,h),f=Is("error.boundary",{"error.type":h,"error.component":a||"Unknown","error.severity":m,"error.boundary_type":o,"error.message":e.message});f.recordException(e),f.setStatus({code:2,message:e.message}),f.end(),Z.counter("errors_total","Total number of errors",["error_type","component","severity"]).inc({error_type:h,component:a||"Unknown",severity:m}),y.error(g.COMPONENT,`Error in ${a||"Unknown"} component (${o})`,{error:e.message,componentStack:t.componentStack,retryCount:this.state.retryCount,category:h,severity:m,correlationId:l,errorBoundaryType:o,componentName:a||"Unknown"}),mi(e,{tags:{component:a||"Unknown",errorBoundaryType:o,category:h,severity:m},extra:{componentStack:t.componentStack,retryCount:this.state.retryCount,correlationId:l}}),r&&r(e,t),s&&s(e,t),this.setState({error:e,errorInfo:t,retryCount:this.state.retryCount+1}),this.props.enableAutoRecovery&&jo({errorInfo:{componentStack:t.componentStack||""},severity:m,retryCount:this.state.retryCount})&&this.scheduleAutoRecovery()}scheduleAutoRecovery(){const e=Uo(this.state.retryCount);this.setState({isRecovering:!0}),setTimeout(()=>{this.setState({isRecovering:!1}),this.resetError()},e)}handleRetry=()=>{const{maxRetries:e=3}=this.props,{retryCount:t}=this.state;t{this.setState({hasError:!1,error:void 0,errorInfo:void 0,isRecovering:!1})};render(){const{hasError:e,error:t,isRecovering:a}=this.state,{children:s,fallback:r,componentName:o,type:l="general"}=this.props;if(e){if(r){if(typeof r=="function"){const h=t??new Error("Unknown error occurred");return r({error:h,retry:this.handleRetry})}return r}return this.renderTypeSpecificFallback(t,o,l,a)}return s}renderTypeSpecificFallback(e,t,a,s){const r=()=>t?.toLowerCase().includes("header")||t?.toLowerCase().includes("footer")?"mini":t?.toLowerCase().includes("chip")?"small":"medium";return u.jsx(Os,{componentName:t||"Unknown Component",errorMessage:s?"Recovering...":e?.message||"Something went wrong. Please try again.",errorDetails:e?.stack||"No additional details available",onRetry:this.handleRetry,onReload:()=>window.location.reload(),showDetails:!0,severity:"medium",size:r()})}}const Ms=n=>u.jsx(pc,{...n}),fc=n=>u.jsx(Ms,{...n,type:"router"}),le=n=>u.jsx(Ms,{...n,type:"general"}),gc="_errorCard_ar49j_43",yc="_errorCardFadeIn_ar49j_1",bc="_warning_ar49j_117",vc="_error_ar49j_43",kc="_critical_ar49j_149",Sc="_criticalPulse_ar49j_1",_c="_iconContainer_ar49j_179",wc="_iconWarning_ar49j_193",Ec="_iconError_ar49j_203",Tc="_iconCritical_ar49j_213",Cc="_iconPulse_ar49j_1",Ac="_title_ar49j_233",xc="_message_ar49j_249",Bc="_errorCodeContainer_ar49j_273",Rc="_errorCodeLabel_ar49j_287",Ic="_errorCode_ar49j_273",Pc="_actions_ar49j_325",Lc="_retryButton_ar49j_341",Dc="_refreshButton_ar49j_343",Nc="_helpLink_ar49j_433",de={errorCard:gc,errorCardFadeIn:yc,warning:bc,error:vc,critical:kc,criticalPulse:Sc,iconContainer:_c,iconWarning:wc,iconError:Ec,iconCritical:Tc,iconPulse:Cc,title:Ac,message:xc,errorCodeContainer:Bc,errorCodeLabel:Rc,errorCode:Ic,actions:Pc,retryButton:Lc,refreshButton:Dc,helpLink:Nc};function Oc(n){const e={size:48,strokeWidth:1.5};switch(n){case"warning":return u.jsx(yi,{...e,className:de.iconWarning});case"critical":return u.jsx(gi,{...e,className:de.iconCritical});default:return u.jsx(fi,{...e,className:de.iconError})}}const Mc=({errorType:n,title:e,message:t,errorCode:a,onRetry:s,showHelpLink:r=!1,severity:o,className:l})=>{const{t:h}=re(),m=h(`errors.service.${n}.title`,Hc(n)),f=h(`errors.service.${n}.message`,Fc(n)),b=d.useCallback(()=>{s?.()},[s]),S=d.useCallback(()=>{window.location.reload()},[]);return u.jsxs("div",{className:`${de.errorCard} ${de[o]} ${l??""}`,role:"alert","aria-live":"assertive",children:[u.jsx("div",{className:de.iconContainer,children:Oc(o)}),u.jsx("h2",{className:de.title,children:e??m}),u.jsx("p",{className:de.message,children:t??f}),a&&u.jsxs("div",{className:de.errorCodeContainer,children:[u.jsxs("span",{className:de.errorCodeLabel,children:[h("errors.labels.errorCode","Error Code"),":"]}),u.jsx("code",{className:de.errorCode,children:a})]}),u.jsxs("div",{className:de.actions,children:[s&&u.jsxs("button",{type:"button",className:de.retryButton,onClick:b,children:[u.jsx(pi,{size:16}),u.jsx("span",{children:h("errors.actions.retry","Try Again")})]}),u.jsx("button",{type:"button",className:de.refreshButton,onClick:S,children:h("errors.actions.refresh","Refresh Page")})]}),r&&u.jsx("a",{href:"/docs",className:de.helpLink,onClick:v=>{v.preventDefault(),window.location.href="/docs"},children:h("errors.actions.help","Get Help")})]})};function Hc(n){return{network:"Connection Issue",module:"Loading Error",websocket:"Real-Time Connection Lost",api:"Service Temporarily Unavailable",render:"Display Error",unknown:"Something Went Wrong"}[n]}function Fc(n){return{network:"Unable to connect to BlockSight services. Please check your internet connection.",module:"The application failed to load completely. Try clearing your cache and refreshing.",websocket:"The connection for live data has been interrupted. Some features may be unavailable.",api:"BlockSight services are temporarily unavailable. Our team has been notified.",render:"An error occurred while displaying this page. Please try refreshing.",unknown:"An unexpected error occurred. Please try refreshing the page."}[n]}const jc="_gradientFallback_9g3gd_21",Uc={gradientFallback:jc},Wc=()=>u.jsx("div",{className:Uc.gradientFallback,"aria-hidden":"true","data-testid":"gradient-fallback"}),zc="_fallbackContainer_p5quo_21",Vc="_overlay_p5quo_51",qc="_content_p5quo_73",vn={fallbackContainer:zc,overlay:Vc,content:qc};function $c(n){if(!n)return"unknown";const e=n.message.toLowerCase(),t=n.stack?.toLowerCase()??"",a=`${e} ${t}`;return a.includes("dynamically imported module")||a.includes("chunk")||a.includes("module not found")||a.includes("loading chunk")||a.includes("chunkloaderror")?"module":a.includes("websocket")||a.includes("socket")||a.includes("ws://")?"websocket":a.includes("fetch")||a.includes("network")||a.includes("failed to fetch")||a.includes("net::err")||a.includes("cors")?"network":a.includes("api")||a.includes("backend")||a.includes("500")||a.includes("503")||a.includes("502")||a.includes("504")||a.includes("internal server error")?"api":a.includes("render")||a.includes("component")||a.includes("cannot read")||a.includes("undefined")||a.includes("null")?"render":"unknown"}function Kc(n){switch(n){case"module":return"critical";case"api":case"network":return"error";case"websocket":return"warning";default:return"error"}}function Gc(n){const e=n.substring(0,3).toUpperCase(),t=Date.now().toString(36).toUpperCase();return`ERR-${e}-${t}`}const Zc=({error:n,errorInfo:e,onRetry:t})=>{const a=d.useMemo(()=>$c(n),[n]),s=d.useMemo(()=>Kc(a),[a]),r=d.useMemo(()=>Gc(a),[a]);d.useMemo(()=>{},[n,e,a,s,r]);const o=d.useCallback(()=>{t?t():window.location.reload()},[t]);return u.jsxs("div",{className:vn.fallbackContainer,children:[u.jsx("div",{className:vn.overlay}),u.jsx("div",{className:vn.content,children:u.jsx(Mc,{errorType:a,severity:s,errorCode:r,onRetry:o,showHelpLink:!1})})]})},Yc="_iconButton_1pvxj_31",Jc="_iconWrapper_1pvxj_77",Xc="_jelloVertical_1pvxj_1",Qc="_sm_1pvxj_171",el="_md_1pvxj_191",tl="_lg_1pvxj_211",nl="_primary_1pvxj_241",al="_ghost_1pvxj_275",sl="_gradient_1pvxj_309",Wt={iconButton:Yc,iconWrapper:Jc,jelloVertical:Xc,sm:Qc,md:el,lg:tl,primary:nl,ghost:al,gradient:sl},Hs=d.forwardRef(function({icon:e,size:t="md",variant:a="ghost",className:s,type:r="button",...o},l){const h=[Wt.iconButton,Wt[t],Wt[a],s].filter(Boolean).join(" ");return u.jsx("button",{ref:l,type:r,className:h,...o,children:u.jsx("span",{className:Wt.iconWrapper,children:e})})});Hs.displayName="IconButton";const pe={PAGE_VIEWS:"blocksight_frontend_page_views_total",MODE_CHANGES:"blocksight_frontend_infopanel_mode_changes_total",ANIMATION_DURATION:"blocksight_frontend_animation_duration_seconds",SEARCH_LATENCY:"blocksight_frontend_search_latency_seconds",DATA_FRESHNESS:"blocksight_frontend_data_freshness_seconds",WS_RECONNECTIONS:"blocksight_frontend_ws_reconnections_total",ERRORS:"blocksight_frontend_errors_total"};function rl(){Z.counter(pe.PAGE_VIEWS,"Frontend page views",["page","referrer"]),Z.counter(pe.MODE_CHANGES,"InfoPanel mode changes",["from","to"]),Z.counter(pe.WS_RECONNECTIONS,"WebSocket reconnections",["reason"]),Z.counter(pe.ERRORS,"Frontend errors",["type","component"]),Z.histogram(pe.ANIMATION_DURATION,"Animation phase duration",[.05,.1,.2,.5,1,2],["animation_type","phase"]),Z.histogram(pe.SEARCH_LATENCY,"Search latency",[.05,.1,.25,.5,1,2,5],["stage"]),Z.gauge(pe.DATA_FRESHNESS,"Data freshness in seconds",["data_type"])}let Aa=!1;function il(){Aa||(rl(),Aa=!0)}function ol(){il();const n=d.useRef(null),e=d.useCallback((m,f)=>{Z.counter(pe.PAGE_VIEWS,"Frontend page views",["page","referrer"]).inc({page:m,referrer:f||"direct"})},[]),t=d.useCallback((m,f)=>{if(m===f)return;Z.counter(pe.MODE_CHANGES,"InfoPanel mode changes",["from","to"]).inc({from:m,to:f}),n.current=f},[]),a=d.useCallback((m,f,b)=>{Z.histogram(pe.ANIMATION_DURATION,"Animation phase duration",[.05,.1,.2,.5,1,2],["animation_type","phase"]).observe(b,{animation_type:m,phase:f})},[]),s=d.useCallback((m,f)=>{Z.histogram(pe.SEARCH_LATENCY,"Search latency",[.05,.1,.25,.5,1,2,5],["stage"]).observe(f,{stage:m})},[]),r=d.useCallback((m,f)=>{Z.gauge(pe.DATA_FRESHNESS,"Data freshness in seconds",["data_type"]).set(f,{data_type:m})},[]),o=d.useCallback(m=>{Z.counter(pe.WS_RECONNECTIONS,"WebSocket reconnections",["reason"]).inc({reason:m})},[]),l=d.useCallback((m,f)=>{Z.counter(pe.ERRORS,"Frontend errors",["type","component"]).inc({type:m,component:f})},[]),h=d.useCallback(()=>{const m=performance.now();return()=>(performance.now()-m)/1e3},[]);return{trackPageView:e,trackModeChange:t,trackAnimationDuration:a,trackSearchLatency:s,trackDataFreshness:r,trackWsReconnection:o,trackError:l,startTimer:h}}const xa={isOpen:!1,documentType:null,initialTab:null},Fs=d.createContext(null),cl=({children:n})=>{const[e,t]=d.useState(xa),a=d.useCallback((o,l)=>{t({isOpen:!0,documentType:o,initialTab:l??null})},[]),s=d.useCallback(()=>{t(xa)},[]),r={...e,openDocument:a,closeDocument:s};return u.jsx(Fs.Provider,{value:r,children:n})},ll=()=>{const n=d.useContext(Fs);if(!n)throw new Error("useDocument must be used within DocumentProvider");return n},Ba={entityType:"none",selectedBlock:null,selectedTransaction:null,selectedAddress:null,highlightedBlockHeight:null},js=d.createContext(null),ul=({children:n})=>{const[e,t]=d.useState(Ba),a=d.useCallback(f=>{t({entityType:"block",selectedBlock:f,selectedTransaction:null,selectedAddress:null,highlightedBlockHeight:null})},[]),s=d.useCallback(f=>{t({entityType:"transaction",selectedBlock:null,selectedTransaction:f,selectedAddress:null,highlightedBlockHeight:f.blockHeight??null})},[]),r=d.useCallback(f=>{t({entityType:"address",selectedBlock:null,selectedTransaction:null,selectedAddress:f,highlightedBlockHeight:null})},[]),o=d.useCallback(f=>{t(b=>({...b,highlightedBlockHeight:f}))},[]),l=d.useCallback(()=>{t(f=>({...f,highlightedBlockHeight:null}))},[]),h=d.useCallback(()=>{t(Ba)},[]),m=d.useMemo(()=>({...e,selectBlock:a,selectTransaction:s,selectAddress:r,highlightBlock:o,clearHighlight:l,clearSelection:h}),[e,a,s,r,o,l,h]);return u.jsx(js.Provider,{value:m,children:n})},Us=()=>{const n=d.useContext(js);if(!n)throw new Error("useEntitySelection must be used within EntitySelectionProvider");return n};function Ra(n,e=6){if(!n||n.length===0)return 0;const t=n.slice(0,e);return t.length===0?0:t.reduce((s,r)=>s+(r.avgfeerate||0),0)/t.length}function dl(n,e=10){if(!n||n.length<2)return 0;const t=n.slice(-e);if(t.length<2)return 0;const a=t.reduce((r,o)=>r+o,0)/t.length,s=t.reduce((r,o)=>r+(o-a)**2,0)/t.length;return Math.sqrt(s)}function hl(n){return!n||n<=0?0:n*2**32/600}function ml(n){if(!n||n<=0)return"0 H/s";const e=["H/s","KH/s","MH/s","GH/s","TH/s","PH/s","EH/s","ZH/s"];let t=0,a=n;for(;a>=1e3&&ta+(s.changePercent||0),0)/e.length;return t>1?"increasing":t<-1?"decreasing":"stable"}const et=21e4,Dt=600;function fl(n,e=Dt,t=Date.now()){if(!n||n<=0)return{blocksRemaining:et,estimatedDate:0};const r=(Math.floor(n/et)+1)*et-n,o=r*e;return{blocksRemaining:r,estimatedDate:t+o*1e3}}function gl(n){return!n||n<=0?0:Math.floor(n/et)}const yl=21e6,Ws=50;function zs(n){if(!n||n<=0)return 0;let e=0,t=Ws,a=0;for(;a0&&l>0&&a.push(o-l)}if(a.length===0)return Dt;const s=a.reduce((r,o)=>r+o,0)/a.length;return Math.max(1,s)}function kl(n){return!n||n<=0?6:3600/n}function Sl(n,e,t,a,s,r=Date.now()){const o=vl(n),l=fl(s,o,r),h=hl(a);return{averageFee6Blocks:Ra(n,6),averageFee24h:Ra(n,144),feeVolatility:dl(e.map(m=>m.avgFee)),networkHashrate:h,hashrateFormatted:ml(h),difficultyTrend:pl(t),averageBlockTime:o,blocksPerHour:kl(o),halvingBlocksRemaining:l.blocksRemaining,halvingEstimatedDate:l.estimatedDate,circulatingSupply:zs(s),inflationRate:bl(s),calculatedAt:r}}class _l{cache=new Map;stats={size:0,hits:0,misses:0,evictions:0,memoryUsage:0};config={maxSize:100,defaultTTL:3e5,cleanupInterval:6e4};cleanupTimer=null;constructor(e){this.config={...this.config,...e},this.startCleanupTimer()}set(e,t,a=this.config.defaultTTL){try{this.cache.size>=this.config.maxSize&&this.evictOldestEntry();const s={data:t,timestamp:Date.now(),ttl:a,accessCount:0,lastAccessed:Date.now()};this.cache.set(e,s),this.updateStats()}catch(s){y.warn(g.CACHE,"Failed to set entry",{error:s instanceof Error?s:String(s)})}}get(e){try{const t=this.cache.get(e);return t?this.isExpired(t)?(this.cache.delete(e),this.stats.misses++,this.updateStats(),null):(t.accessCount++,t.lastAccessed=Date.now(),this.stats.hits++,t.data):(this.stats.misses++,null)}catch(t){return y.warn(g.CACHE,"Failed to get entry",{error:t instanceof Error?t:String(t)}),this.stats.misses++,null}}has(e){const t=this.cache.get(e);return t?this.isExpired(t)?(this.cache.delete(e),this.updateStats(),!1):!0:!1}delete(e){const t=this.cache.delete(e);return t&&this.updateStats(),t}clear(){this.cache.clear(),this.updateStats()}getStats(){return{...this.stats}}size(){return this.cache.size}isExpired(e,t=Date.now()){return t-e.timestamp>e.ttl}evictOldestEntry(){let e="",t=1/0;for(const[a,s]of this.cache.entries())s.lastAccessed{this.cleanup()},this.config.cleanupInterval)}cleanup(e=Date.now()){const t=[];for(const[a,s]of this.cache.entries())e-s.timestamp>s.ttl&&t.push(a);t.forEach(a=>{this.cache.delete(a),this.stats.evictions++}),t.length>0&&this.updateStats()}destroy(){this.cleanupTimer&&(clearInterval(this.cleanupTimer),this.cleanupTimer=null),this.clear()}}const Ke=new _l,bt=1500,Ia=50,wl={daily:864e5},Pa=126080,El={athPrice:Pa,isAtAth:!1,athReachedAt:null,athExpiresAt:null,distanceFromAth:Pa,currentPollInterval:wl.daily,lastComparedAt:0};function La(){return{raw:Tl(),transformed:Cl(),system:Al(),websocket:xl(),transformation:Bl()}}function Tl(){return{coreRpc:{blockchainInfo:null,mempoolInfo:null,networkInfo:null,peerInfo:null,miningInfo:null,txOutSetInfo:null,chainTxStats:null,lastUpdate:0,source:"bitcoin-core-rpc",version:"1.0.0"},electrumServer:{blockHeaders:[],blockTransactions:[],mempoolTransactions:[],addressHistory:[],addressUtxos:[],transactionDetails:[],lastUpdate:0,source:"electrs-server",version:"1.0.0",windowCenter:null},external:{priceData:null,exchangeRates:null,marketData:null,newsData:null,lastUpdate:0,source:"external-apis",version:"1.0.0"},_meta:{coreRpc:{lastFetchedAt:0,sourceTimestamp:0,source:"cache",ttl:12e4,isStale:!0,isMock:!1,confidence:20},electrumServer:{lastFetchedAt:0,sourceTimestamp:0,source:"cache",ttl:12e4,isStale:!0,isMock:!1,confidence:20},external:{lastFetchedAt:0,sourceTimestamp:0,source:"cache",ttl:3e5,isStale:!0,isMock:!1,confidence:20}}}}function Cl(){return{blockchain:{summary:{height:0,lastBlock:null,mempool:{size:0,bytes:0,usage:0,transactions:[],sizeFormatted:"0 B",bytesFormatted:"0 B",usageFormatted:"0 B",averageFee:0,averageFeeRate:0,oldestTransaction:0,newestTransaction:0,minrelaytxfee:0},blocks:[],difficulty:0,hashrate:0,networkHashrate:0,difficultyFormatted:"0",hashrateFormatted:"0 H/s",networkHashrateFormatted:"0 H/s",averageBlockTime:600,estimatedNextBlock:0,totalTransactions:0,totalSupply:21e6,inflationRate:0},networkStats:{totalNodes:0,connectedNodes:0,averageLatency:0,bandwidth:0,totalNodesFormatted:"0",connectedNodesFormatted:"0",averageLatencyFormatted:"0 ms",bandwidthFormatted:"0 B/s",networkHealth:"excellent"},selectedBlockId:null,lastUpdate:0,source:"backend-transformation",version:"1.0.0"},market:{prices:{btc:{usd:0,eur:0,gbp:0,jpy:0,aud:0,cad:0,chf:0,cny:0,inr:0,brl:0,ars:0,ils:0,change24h:0,changePercent24h:0,lastUpdate:0}},exchangeRates:{usd:1,eur:0,gbp:0,jpy:0,aud:0,cad:0,chf:0,cny:0,inr:0,brl:0,ars:0,ils:0,pln:0,rub:0,try_:0,krw:0,twd:0,sar:0,irr:0,thb:0,vnd:0,idr:0,uah:0,myr:0,php:0,bdt:0,lastUpdate:0},marketCap:0,volume24h:0,dominance:0},analytics:{transactionFees:[],blockSizes:[],difficultyAdjustments:[],hashRateHistory:[],derived:{averageFee6Blocks:0,averageFee24h:0,feeVolatility:0,networkHashrate:0,hashrateFormatted:"0 H/s",difficultyTrend:"stable",averageBlockTime:600,blocksPerHour:6,halvingBlocksRemaining:0,halvingEstimatedDate:0,circulatingSupply:0,inflationRate:0,calculatedAt:0},feeGauge:{nextBlockFee:0,sixHourFee:0,timestamp:0}},ath:El,blockFound:{isAnimating:!1,phase:"idle",currentEvent:null,lastBlockFoundAt:0},visualization:null}}function Al(){return{health:{status:"healthy",lastCheck:0,services:{electrumServer:!1,coreRpc:!1,websocket:!1,redis:!1,postgresql:!1,externalAPI:!1},uptime:0,version:"1.0.0"},performance:{responseTime:0,memoryUsage:0,cpuUsage:0,cacheHitRate:0,errorRate:0,throughput:0,latency:{p50:0,p95:0,p99:0}},errors:[]}}function xl(){return{connected:!1,lastUpdate:0,subscriptions:[],reconnectAttempts:0,lastError:null}}function Bl(){return{lastUpdate:0,processing:!1,errors:[]}}function Rl(n){return{summary:{height:n.blockchainInfo?.blocks||0,lastBlock:n.blockchainInfo?{hash:n.blockchainInfo.bestblockhash,height:n.blockchainInfo.blocks,timestamp:Date.now(),size:0,weight:0,txCount:0,previousHash:"",merkleRoot:"",nonce:0,difficulty:n.blockchainInfo.difficulty||0,version:0,bits:"",age:0,sizeFormatted:"0 B",weightFormatted:"0 B",difficultyFormatted:"0"}:null,mempool:{size:n.mempoolInfo?.size||0,bytes:n.mempoolInfo?.bytes||0,usage:n.mempoolInfo?.usage||0,transactions:[],sizeFormatted:"0 B",bytesFormatted:"0 B",usageFormatted:"0 B",averageFee:0,averageFeeRate:0,oldestTransaction:0,newestTransaction:0},blocks:[],difficulty:n.blockchainInfo?.difficulty||0,hashrate:0,networkHashrate:0,difficultyFormatted:"0",hashrateFormatted:"0 H/s",networkHashrateFormatted:"0 H/s",averageBlockTime:600,estimatedNextBlock:0,totalTransactions:0,totalSupply:21e6,inflationRate:0},networkStats:{totalNodes:0,connectedNodes:0,averageLatency:0,bandwidth:0,totalNodesFormatted:"0",connectedNodesFormatted:"0",averageLatencyFormatted:"0 ms",bandwidthFormatted:"0 B/s",networkHealth:"excellent"},lastUpdate:Date.now(),source:"backend-transformation",version:"1.0.0"}}function Il(n){return{blockHeaders:n.blockHeaders,blockTransactions:n.blockTransactions,mempoolTransactions:n.mempoolTransactions,addressHistory:n.addressHistory,addressUtxos:n.addressUtxos,transactionDetails:n.transactionDetails}}function Pl(n){return!n.blockHeaders||n.blockHeaders.length===0?0:Math.max(...n.blockHeaders.map(e=>e.height))}function Ll(n){const e=n.priceData;return{btc:{usd:e?.value||0,eur:0,gbp:0,jpy:0,aud:0,cad:0,chf:0,cny:0,inr:0,brl:0,ars:0,ils:0,change24h:e?.change24h||0,changePercent24h:e?.changePercent24h||0,lastUpdate:e?.asOfMs||0}}}function Dl(n){const e=n.exchangeRates?.rates,t=a=>a||0;return{usd:1,eur:t(e?.eur),gbp:t(e?.gbp),jpy:t(e?.jpy),aud:t(e?.aud),cad:t(e?.cad),chf:t(e?.chf),cny:t(e?.cny),inr:t(e?.inr),brl:t(e?.brl),ars:t(e?.ars),ils:t(e?.ils),pln:t(e?.pln),rub:t(e?.rub),try_:t(e?.try),krw:t(e?.krw),twd:t(e?.twd),sar:t(e?.sar),irr:t(e?.irr),thb:t(e?.thb),vnd:t(e?.vnd),idr:t(e?.idr),uah:t(e?.uah),myr:t(e?.myr),php:t(e?.php),bdt:t(e?.bdt),lastUpdate:n.exchangeRates?.date?new Date(n.exchangeRates.date).getTime():0}}function Nl(n){return{marketCap:n.marketData?.market_cap||0,volume24h:n.marketData?.volume_24h||0,dominance:n.marketData?.dominance||0}}function Ol(n){return{prices:Ll(n),exchangeRates:Dl(n),...Nl(n)}}function Ml(n,e,t,a,s){const r=Math.max(t,a),o={};s&&"mempoolBlocks"in s&&(o.mempoolBlocks=s.mempoolBlocks);const l={...n,summary:{...n.summary,blocks:e.blockHeaders||[],height:r,...o}};if(!l.summary.lastBlock&&e.blockHeaders&&e.blockHeaders.length>0){const m=[...e.blockHeaders].sort((f,b)=>b.height-f.height)[0];l.summary.lastBlock={hash:m.hash,height:m.height,timestamp:m.timestamp,size:m.size||0,weight:m.weight||0,txCount:m.tx_count||0,previousHash:m.previous_hash||"",merkleRoot:m.merkle_root||"",nonce:m.nonce||0,difficulty:m.difficulty||0,version:m.version||0,bits:m.bits||"",avgfeerate:m.avgfeerate??0,feerateP10:m.feerateP10,feerateP50:m.feerateP50,feerateP90:m.feerateP90,minerName:m.miner_name,age:0,sizeFormatted:"0 B",weightFormatted:"0 B",difficultyFormatted:"0"}}return l}const Hl={now:()=>Date.now(),random:()=>Math.random(),perfNow:()=>performance.now()};class Fl{state;subscribers=new Set;selectiveSubscribers=new Set;clock;pageHidden=!1;pendingNotification=!1;visibilityHandler=null;animationBuffering=!1;pendingAnimationFlush=!1;dataFreshnessGauge=Z.gauge("blocksight_frontend_data_freshness_seconds","Data age in seconds since last update",["data_type"]);refreshLatencyHistogram=Z.histogram("blocksight_frontend_refresh_latency_seconds","Refresh cycle latency",[.05,.1,.25,.5,1,2,5],["trigger"]);lastUpdateTimestamps=new Map;constructor(e=Hl){this.clock=e,this.state=La(),this.setupVisibilityListener()}initialize(){}getState(){return{...this.state}}resetDataStore(){this.state=La(),this.notifySubscribers()}updateState(e){const t=this.state.transformed?.blockFound?.phase,a=this.state.transformed?.blockFound?.isAnimating??!1;this.state={...this.state,...e};const s=this.state.transformed?.blockFound?.phase,r=this.state.transformed?.blockFound?.isAnimating??!1,o=t!==s;if(this.trackDataFreshness(e),this.cacheUIState(),!a&&r&&(this.animationBuffering=!0),this.animationBuffering&&!r){this.animationBuffering=!1,this.pendingAnimationFlush=!1,this.pageHidden?this.pendingNotification=!0:this.notifySubscribers();return}if(this.pageHidden){this.pendingNotification=!0;return}if(this.animationBuffering&&!o){this.pendingAnimationFlush=!0;return}this.notifySubscribers()}flushAnimationBuffer(){this.animationBuffering=!1,this.pendingAnimationFlush&&(this.pendingAnimationFlush=!1,this.notifySubscribers())}trackDataFreshness(e){const t=this.clock.now();e.transformed?.blockchain&&(this.lastUpdateTimestamps.set("blockchain",t),this.dataFreshnessGauge.set(0,{data_type:"blockchain"})),e.transformed?.market&&(this.lastUpdateTimestamps.set("market",t),this.dataFreshnessGauge.set(0,{data_type:"market"})),e.websocket&&(this.lastUpdateTimestamps.set("websocket",t),this.dataFreshnessGauge.set(0,{data_type:"websocket"})),e.raw&&(this.lastUpdateTimestamps.set("raw",t),this.dataFreshnessGauge.set(0,{data_type:"raw"}))}recordRefreshLatency(e,t){const a=(this.clock.perfNow()-t)/1e3;this.refreshLatencyHistogram.observe(a,{trigger:e})}updateFreshnessMetrics(){const e=this.clock.now();for(const[t,a]of this.lastUpdateTimestamps){const s=(e-a)/1e3;this.dataFreshnessGauge.set(s,{data_type:t})}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}subscribeToSlice(e,t){const a={selector:e,callback:t,lastValue:e(this.state)};return this.selectiveSubscribers.add(a),()=>{this.selectiveSubscribers.delete(a)}}notifySubscribers(){this.subscribers.forEach(e=>{try{e(this.state)}catch(t){y.error(g.DATA_STORE,"Error in DataStore subscriber",{error:t instanceof Error?t:String(t)})}}),this.selectiveSubscribers.forEach(e=>{try{const t=e.selector(this.state);t!==e.lastValue&&(e.lastValue=t,e.callback(t))}catch(t){y.error(g.DATA_STORE,"Error in selective DataStore subscriber",{error:t instanceof Error?t:String(t)})}})}transformRawData(){try{this.updateState({transformation:{...this.state.transformation,processing:!0,lastUpdate:this.clock.now()}});const e=Rl(this.state.raw.coreRpc),t=Il(this.state.raw.electrumServer),a=Ol(this.state.raw.external),s=e.summary.height||0,r=Pl(this.state.raw.electrumServer),o=Ml(e,t,s,r,this.state.transformed?.blockchain?.summary);this.updateState({transformed:{...this.state.transformed,blockchain:o,market:a},transformation:{...this.state.transformation,processing:!1,lastUpdate:this.clock.now()}})}catch(e){this.handleError(e instanceof Error?e:new Error("Data transformation failed"),"DataTransformation")}}calculateDerivedData(){try{const{transformed:e}=this.state,{blockchain:t,analytics:a}=e,s=t.summary.blocks||[],r=t.summary.difficulty||0,o=t.summary.height||0,l=Sl(s,a.transactionFees,a.difficultyAdjustments,r,o);this.updateState({transformed:{...this.state.transformed,analytics:{...this.state.transformed.analytics,derived:l}}})}catch(e){y.warn(g.DATA_STORE,"DataStore: Failed to calculate derived data",{error:e instanceof Error?e:String(e)})}}handleError(e,t="DataStore"){const a={id:`error_${this.clock.now()}_${this.clock.random().toString(36).substr(2,9)}`,message:e.message,context:t,timestamp:this.clock.now(),severity:"medium",stack:e.stack,code:e.code,recoverable:!0},s=[...this.state.system.errors,a],r=s.length>Ia?s.slice(-Ia):s;this.updateState({system:{...this.state.system,errors:r}})}clearErrors(){this.updateState({system:{...this.state.system,errors:[]}})}cacheUIState(){try{Ke.set("system-health",this.state.system.health,3e5),Ke.set("websocket-state",this.state.websocket,6e4),Ke.set("transformation-state",this.state.transformation,3e4)}catch(e){y.warn(g.DATA_STORE,"DataStore: Failed to cache UI state",{error:e instanceof Error?e:String(e)})}}getCachedUIState(){try{return{systemHealth:Ke.get("system-health"),websocketState:Ke.get("websocket-state"),transformationState:Ke.get("transformation-state")}}catch(e){return y.warn(g.DATA_STORE,"DataStore: Failed to get cached UI state",{error:e instanceof Error?e:String(e)}),null}}setupVisibilityListener(){typeof document>"u"||(this.visibilityHandler=()=>{document.hidden?this.pageHidden=!0:(this.pageHidden=!1,this.pendingNotification&&(this.pendingNotification=!1,this.notifySubscribers()))},document.addEventListener("visibilitychange",this.visibilityHandler))}destroy(){this.subscribers.clear(),this.selectiveSubscribers.clear(),Ke.clear(),this.visibilityHandler&&typeof document<"u"&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null)}}const O=new Fl,Xn=d.createContext(null),jl=({children:n})=>{const e=d.useMemo(()=>r=>({height:r.transformed.blockchain.summary.height,lastBlock:r.transformed.blockchain.summary.lastBlock,mempool:r.transformed.blockchain.summary.mempool,blocks:r.transformed.blockchain.summary.blocks,mempoolBlocks:r.transformed.blockchain.summary.mempoolBlocks||[],difficulty:r.transformed.blockchain.summary.difficulty,hashrate:r.transformed.blockchain.summary.hashrate,networkHashrate:r.transformed.blockchain.summary.networkHashrate}),[]),[t,a]=d.useState(e(O.getState())),s=d.useRef(null);return d.useEffect(()=>{const r=O.subscribeToSlice(l=>l.transformed.blockchain,l=>{const h={height:l.summary.height,lastBlock:l.summary.lastBlock,mempool:l.summary.mempool,blocks:l.summary.blocks,mempoolBlocks:l.summary.mempoolBlocks||[],difficulty:l.summary.difficulty,hashrate:l.summary.hashrate,networkHashrate:l.summary.networkHashrate},{isAnimating:m}=O.getState().transformed.blockFound;if(m){s.current=h;return}s.current=null,a(h)}),o=O.subscribeToSlice(l=>l.transformed.blockFound.isAnimating,l=>{!l&&s.current&&(a(s.current),s.current=null)});return()=>{r(),o()}},[]),u.jsx(Xn.Provider,{value:t,children:n})},Ul=()=>{const n=d.useContext(Xn);if(!n)throw new Error("useBlockchainData must be used within BlockchainDataProvider");return n},Wl=()=>d.useContext(Xn),zl=1e10;function dn(n){return n==null?0:n0?t.minfeerate:void 0,r=Da(s,n.feerateP10,a),o=Da(t.maxfeerate,n.feerateP90,a),l=typeof n.feerateP50=="number"?n.feerateP50:a,h=typeof n.feerateP10=="number"||typeof n.feerateP90=="number"||typeof n.avgfeerate=="number"&&n.avgfeerate>0,m=typeof t.tx_count=="number"?t.tx_count:typeof n.txCount=="number"?n.txCount:0,f=dn(n.timestamp);return{kind:"real",id:{hash:n.hash,height:n.height},minedAtMs:f||e,txCount:m,minFeeRate:r,maxFeeRate:o,medianFeeRate:l,isEnriched:h,totalFeesSatoshis:t.totalfee??n.totalFees??void 0,minerName:n.minerName??t.miner_name??void 0}}const qs=1e3;function $s(n,e){if(n.length===0)return n;const t=e??Math.max(...n.map(a=>a.height));return t<=0?n:n.filter(a=>t-a.height<=qs)}function ql(){const{selectedBlock:n,selectBlock:e}=Us(),a=Wl()?.blocks;d.useEffect(()=>{if(!a||!n?.id.hash.startsWith("memory-pool-"))return;const s=n.id.height,r=a.find(l=>l.height===s);if(!r)return;const o=Vs(r);o&&e(o)},[n,a,e])}const Na={stack:[]},Oa=50,Ks=d.createContext(null),$l=({children:n})=>{const[e,t]=d.useState(Na),a=d.useCallback(h=>{t(m=>{const f=[...m.stack,h];return{stack:f.length>Oa?f.slice(f.length-Oa):f}})},[]),s=d.useCallback(()=>{const h=e.stack;if(h.length===0)return;const m=h[h.length-1];return t(f=>({stack:f.stack.slice(0,-1)})),m},[e.stack]),r=d.useCallback(()=>{t(Na)},[]),o=d.useMemo(()=>e.stack.length>0,[e.stack.length]),l={...e,push:a,pop:s,clear:r,canGoBack:o};return u.jsx(Ks.Provider,{value:l,children:n})},Kl=()=>{const n=d.useContext(Ks);if(!n)throw new Error("useNavigationHistory must be used within NavigationHistoryProvider");return n},Ma={widgets:{bitcoinPrice:!0,feeGauge:!0,congestionGauge:!0,monicaMetrics:!0,toolbar:!0,halvingTool:!0,supplyTool:!0,calculatorTool:!0,generalMetricsTool:!0,monicaMetricsTool:!0},effects:{hoverAnimations:!0,loadingSpinners:!0,transitionAnimations:!0,demoBlockAnimation:!1,blockFoundSound:!0,animateLastBlock:!0,cascadeDataShift:!0,useHybridBlockHistory:!0,showBlockChainLinks:!0,athCelebration:!0,useNewBlockHistoryGrid:!1},dataSources:{useRealHealthData:!0,useRealPriceData:!0,useRealBlockchainData:!0,useRealSearchData:!0,useBackendSearch:!0,useElectrumForSearch:!1,useZmqRawblock:!1,useZmqRawtx:!1}};function zt(n,e,t,a){return{...n,[e]:{...n[e],[t]:a}}}const Gs=d.createContext(void 0),Gl=({children:n,initialFlags:e=Ma})=>{const[t,a]=d.useState(()=>new URLSearchParams(window.location.search).get("cascade")==="true"?(y.debug(g.CONFIG,"Cascade enabled via URL param",{param:"?cascade=true"}),zt(e,"effects","cascadeDataShift",!0)):e);d.useEffect(()=>{const l=()=>{const m=new URLSearchParams(window.location.search).get("cascade");m==="true"&&!t.effects.cascadeDataShift?(y.debug(g.CONFIG,"Cascade enabled via URL param",{param:"?cascade=true"}),a(f=>zt(f,"effects","cascadeDataShift",!0))):m!=="true"&&t.effects.cascadeDataShift&&(y.debug(g.CONFIG,"Cascade disabled (URL param removed)"),a(f=>zt(f,"effects","cascadeDataShift",!1)))};return window.addEventListener("popstate",l),()=>{window.removeEventListener("popstate",l)}},[t.effects.cascadeDataShift]);const s=d.useCallback((l,h,m)=>{a(f=>zt(f,l,h,m))},[]),r=d.useCallback(()=>{a(Ma)},[]),o=d.useMemo(()=>({flags:t,setFlag:s,resetFlags:r}),[t,s,r]);return u.jsx(Gs.Provider,{value:o,children:n})},hn=()=>{const n=d.useContext(Gs);if(!n)throw new Error("useFeatureFlags must be used within FeatureFlagProvider");return n},fS=n=>{const{flags:e}=hn();return e.widgets[n]},Qn=n=>{const{flags:e}=hn();return e.dataSources[n]},Zs="/api/v1/telemetry/i18n-missing-key",Zl=20,Yl=3e4,Ha=5e3;let ze=[],kn=0,Fa=null;function Pn(n,e,t){ze.push({locale:n,namespace:e,key:t,ts:Date.now()}),ze.length>=Zl&&Ys()}async function Ys(){if(ze.length===0)return;const n=Date.now();if(n-kn{Ys()},n),typeof window<"u"&&window.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"&&ze.length>0)try{navigator.sendBeacon(Zs,new Blob([JSON.stringify({events:ze})],{type:"application/json"})),ze=[]}catch{}}))}const Xl=["ar","bn","cs","da","de","en","es","et","fa","fil","fr","he","hi","id","it","ja","ko","ms","nl","pl","pt","ro","ru","sv","th","tr","uk","ur","vi","zh-CN","zh-TW"],Ql={ar:{code:"ar",name:"Arabic",nativeName:"العربية",rtl:!0,available:!0},bn:{code:"bn",name:"Bengali",nativeName:"বাংলা",rtl:!1,available:!0},cs:{code:"cs",name:"Czech",nativeName:"Čeština",rtl:!1,available:!0},da:{code:"da",name:"Danish",nativeName:"Dansk",rtl:!1,available:!0},de:{code:"de",name:"German",nativeName:"Deutsch",rtl:!1,available:!0},en:{code:"en",name:"English",nativeName:"English",rtl:!1,available:!0},es:{code:"es",name:"Spanish",nativeName:"Español",rtl:!1,available:!0},et:{code:"et",name:"Estonian",nativeName:"Eesti",rtl:!1,available:!0},fa:{code:"fa",name:"Persian",nativeName:"فارسی",rtl:!0,available:!0},fil:{code:"fil",name:"Filipino",nativeName:"Filipino",rtl:!1,available:!0},fr:{code:"fr",name:"French",nativeName:"Français",rtl:!1,available:!0},he:{code:"he",name:"Hebrew",nativeName:"עברית",rtl:!0,available:!0},hi:{code:"hi",name:"Hindi",nativeName:"हिन्दी",rtl:!1,available:!0},id:{code:"id",name:"Indonesian",nativeName:"Bahasa Indonesia",rtl:!1,available:!0},it:{code:"it",name:"Italian",nativeName:"Italiano",rtl:!1,available:!0},ja:{code:"ja",name:"Japanese",nativeName:"日本語",rtl:!1,available:!0},ko:{code:"ko",name:"Korean",nativeName:"한국어",rtl:!1,available:!0},ms:{code:"ms",name:"Malay",nativeName:"Bahasa Melayu",rtl:!1,available:!0},nl:{code:"nl",name:"Dutch",nativeName:"Nederlands",rtl:!1,available:!0},pl:{code:"pl",name:"Polish",nativeName:"Polski",rtl:!1,available:!0},pt:{code:"pt",name:"Portuguese",nativeName:"Português",rtl:!1,available:!0},ro:{code:"ro",name:"Romanian",nativeName:"Română",rtl:!1,available:!0},ru:{code:"ru",name:"Russian",nativeName:"Русский",rtl:!1,available:!0},sv:{code:"sv",name:"Swedish",nativeName:"Svenska",rtl:!1,available:!0},th:{code:"th",name:"Thai",nativeName:"ไทย",rtl:!1,available:!0},tr:{code:"tr",name:"Turkish",nativeName:"Türkçe",rtl:!1,available:!0},uk:{code:"uk",name:"Ukrainian",nativeName:"Українська",rtl:!1,available:!0},ur:{code:"ur",name:"Urdu",nativeName:"اردو",rtl:!0,available:!0},vi:{code:"vi",name:"Vietnamese",nativeName:"Tiếng Việt",rtl:!1,available:!0},"zh-CN":{code:"zh-CN",name:"Chinese Simplified",nativeName:"简体中文",rtl:!1,available:!0},"zh-TW":{code:"zh-TW",name:"Chinese Traditional",nativeName:"繁體中文",rtl:!1,available:!0}},eu=["ar","fa","he","ur"],tu={ar:"ARA",bn:"BEN",cs:"CES",da:"DAN",de:"DEU",en:"ENG",es:"ESP",et:"EST",fa:"FAS",fil:"FIL",fr:"FRA",he:"HEB",hi:"HIN",id:"IND",it:"ITA",ja:"JPN",ko:"KOR",ms:"MAL",nl:"NLD",pl:"POL",pt:"POR",ro:"RON",ru:"RUS",sv:"SWE",th:"THA",tr:"TUR",uk:"UKR",ur:"URD",vi:"VIE","zh-CN":"CHS","zh-TW":"CHT"},gS=["ar","bn","cs","da","de","en","es","et","fa","fil","fr","he","hi","id","it","ja","ko","ms","nl","pl","pt","ro","ru","sv","th","tr","uk","ur","vi","zh-CN","zh-TW"],yS={ar:"ar_SA",bn:"bn_BD",cs:"cs_CZ",da:"da_DK",de:"de_DE",en:"en_US",es:"es_ES",et:"et_EE",fa:"fa_IR",fil:"fil_PH",fr:"fr_FR",he:"he_IL",hi:"hi_IN",id:"id_ID",it:"it_IT",ja:"ja_JP",ko:"ko_KR",ms:"ms_MY",nl:"nl_NL",pl:"pl_PL",pt:"pt_BR",ro:"ro_RO",ru:"ru_RU",sv:"sv_SE",th:"th_TH",tr:"tr_TR",uk:"uk_UA",ur:"ur_PK",vi:"vi_VN","zh-CN":"zh_CN","zh-TW":"zh_TW"},bS={ar:{currency:"SAR",symbol:"ر.س",label:"SAR"},bn:{currency:"BDT",symbol:"৳",label:"BDT"},cs:{currency:"",symbol:"",label:""},da:{currency:"",symbol:"",label:""},de:{currency:"EUR",symbol:"€",label:"EUR"},en:{currency:"",symbol:"",label:""},es:{currency:"ARS",symbol:"$",label:"ARS"},et:{currency:"",symbol:"",label:""},fa:{currency:"IRR",symbol:"﷼",label:"IRR"},fil:{currency:"PHP",symbol:"₱",label:"PHP"},fr:{currency:"EUR",symbol:"€",label:"EUR"},he:{currency:"ILS",symbol:"₪",label:"ILS"},hi:{currency:"INR",symbol:"₹",label:"INR"},id:{currency:"IDR",symbol:"Rp",label:"IDR"},it:{currency:"EUR",symbol:"€",label:"EUR"},ja:{currency:"JPY",symbol:"¥",label:"JPY"},ko:{currency:"KRW",symbol:"₩",label:"KRW"},ms:{currency:"MYR",symbol:"RM",label:"MYR"},nl:{currency:"EUR",symbol:"€",label:"EUR"},pl:{currency:"PLN",symbol:"zł",label:"PLN"},pt:{currency:"BRL",symbol:"R$",label:"BRL"},ro:{currency:"",symbol:"",label:""},ru:{currency:"RUB",symbol:"₽",label:"RUB"},sv:{currency:"",symbol:"",label:""},th:{currency:"THB",symbol:"฿",label:"THB"},tr:{currency:"TRY",symbol:"₺",label:"TRY"},uk:{currency:"UAH",symbol:"₴",label:"UAH"},ur:{currency:"",symbol:"",label:""},vi:{currency:"VND",symbol:"₫",label:"VND"},"zh-CN":{currency:"CNY",symbol:"¥",label:"CNY"},"zh-TW":{currency:"TWD",symbol:"NT$",label:"TWD"}},vS=["ar","bn","de","en","es","fil","fr","he","id","it","ja","ko","ms","nl","pl","pt","ru","th","tr","uk","vi","zh-CN","zh-TW"],nu={ar:()=>Promise.all([k(()=>import("./common-CIi1yTlB.js"),[]),k(()=>import("./documentation-BzlWbhWU.js"),[]),k(()=>import("./claude-install-fBH_zNiN.js"),[])]),bn:()=>Promise.all([k(()=>import("./common-05pobYdb.js"),[]),k(()=>import("./documentation-C-vZBrUe.js"),[]),k(()=>import("./claude-install-BJVik-YM.js"),[])]),cs:()=>Promise.all([k(()=>import("./common-C3CV0N_T.js"),[]),k(()=>import("./documentation-CXRYeeE5.js"),[]),k(()=>import("./claude-install-Bvj8r6Up.js"),[])]),da:()=>Promise.all([k(()=>import("./common-CLrNtUp2.js"),[]),k(()=>import("./documentation-B-CfKy5R.js"),[]),k(()=>import("./claude-install-oJERpcqP.js"),[])]),de:()=>Promise.all([k(()=>import("./common-BvUoZZFr.js"),[]),k(()=>import("./documentation-B86SgHLO.js"),[]),k(()=>import("./claude-install-BjhC5cqv.js"),[])]),es:()=>Promise.all([k(()=>import("./common-BxCiNs6u.js"),[]),k(()=>import("./documentation-h-lQ4-WW.js"),[]),k(()=>import("./claude-install-qzTMf-mi.js"),[])]),et:()=>Promise.all([k(()=>import("./common-DmesLESz.js"),[]),k(()=>import("./documentation-isOsMbUs.js"),[]),k(()=>import("./claude-install-dpTu8J0A.js"),[])]),fa:()=>Promise.all([k(()=>import("./common-DNCBu3vI.js"),[]),k(()=>import("./documentation-CrEIYBBD.js"),[]),k(()=>import("./claude-install-CF-edOV0.js"),[])]),fil:()=>Promise.all([k(()=>import("./common-szYK_GFQ.js"),[]),k(()=>import("./documentation-BLNmOu8_.js"),[]),k(()=>import("./claude-install-BWaGtktG.js"),[])]),fr:()=>Promise.all([k(()=>import("./common-idBzlhjb.js"),[]),k(()=>import("./documentation-DFGLUqVu.js"),[]),k(()=>import("./claude-install-CuYTIJRk.js"),[])]),he:()=>Promise.all([k(()=>import("./common-Dx_G8UVL.js"),[]),k(()=>import("./documentation-CyKjj5zi.js"),[]),k(()=>import("./claude-install-DCwZxMVX.js"),[])]),hi:()=>Promise.all([k(()=>import("./common-B-gem5-M.js"),[]),k(()=>import("./documentation-DrlGCZSY.js"),[]),k(()=>import("./claude-install-BnvxgqLX.js"),[])]),id:()=>Promise.all([k(()=>import("./common-SdVFspIV.js"),[]),k(()=>import("./documentation-CLTwTY7H.js"),[]),k(()=>import("./claude-install-BUfWolvX.js"),[])]),it:()=>Promise.all([k(()=>import("./common-Cw4dSZIA.js"),[]),k(()=>import("./documentation-C_cjtt1d.js"),[]),k(()=>import("./claude-install-CKq__Qho.js"),[])]),ja:()=>Promise.all([k(()=>import("./common-Co8mIJom.js"),[]),k(()=>import("./documentation-qrHf_5zn.js"),[]),k(()=>import("./claude-install-DIHD9gxN.js"),[])]),ko:()=>Promise.all([k(()=>import("./common-R9GiDfq1.js"),[]),k(()=>import("./documentation-CNr2CuqQ.js"),[]),k(()=>import("./claude-install-DZD9OBlL.js"),[])]),ms:()=>Promise.all([k(()=>import("./common-DsROYY3_.js"),[]),k(()=>import("./documentation-B4QrrisW.js"),[]),k(()=>import("./claude-install-DJR0mmuy.js"),[])]),nl:()=>Promise.all([k(()=>import("./common-apFgEnyY.js"),[]),k(()=>import("./documentation-aFFGKoL8.js"),[]),k(()=>import("./claude-install-6vCmBjcs.js"),[])]),pl:()=>Promise.all([k(()=>import("./common-DTUlXIFI.js"),[]),k(()=>import("./documentation-Cpp2SGj2.js"),[]),k(()=>import("./claude-install-EN-Q0itQ.js"),[])]),pt:()=>Promise.all([k(()=>import("./common-DaXJX8Bp.js"),[]),k(()=>import("./documentation-CDcXSLah.js"),[]),k(()=>import("./claude-install-Knp7qyxD.js"),[])]),ro:()=>Promise.all([k(()=>import("./common-CgR_xzZ_.js"),[]),k(()=>import("./documentation-BA_NKknI.js"),[]),k(()=>import("./claude-install-BgDrj0m0.js"),[])]),ru:()=>Promise.all([k(()=>import("./common-8-pmLS5B.js"),[]),k(()=>import("./documentation-DYRovY5w.js"),[]),k(()=>import("./claude-install-DJ0h-85E.js"),[])]),sv:()=>Promise.all([k(()=>import("./common-5UtUvRhG.js"),[]),k(()=>import("./documentation-Dbe7Tf6G.js"),[]),k(()=>import("./claude-install-C3JdshG-.js"),[])]),th:()=>Promise.all([k(()=>import("./common-fGCDxfh9.js"),[]),k(()=>import("./documentation-LHqoWTML.js"),[]),k(()=>import("./claude-install-BIDfZuVv.js"),[])]),tr:()=>Promise.all([k(()=>import("./common-BOjzhgxH.js"),[]),k(()=>import("./documentation-Cp_jtSjy.js"),[]),k(()=>import("./claude-install-DhDCzAyg.js"),[])]),uk:()=>Promise.all([k(()=>import("./common-CBAtdEaF.js"),[]),k(()=>import("./documentation-BadZhpD5.js"),[]),k(()=>import("./claude-install-sKzGvp7Q.js"),[])]),ur:()=>Promise.all([k(()=>import("./common-H_mYKIn5.js"),[]),k(()=>import("./documentation-Cz77cJe2.js"),[]),k(()=>import("./claude-install-BUNti_5w.js"),[])]),vi:()=>Promise.all([k(()=>import("./common-DWRchiZ8.js"),[]),k(()=>import("./documentation-DC_dKfNG.js"),[]),k(()=>import("./claude-install-C6BikjpK.js"),[])]),"zh-CN":()=>Promise.all([k(()=>import("./common-C49zsKfn.js"),[]),k(()=>import("./documentation-DoI0GM9y.js"),[]),k(()=>import("./claude-install-yClCThx4.js"),[])]),"zh-TW":()=>Promise.all([k(()=>import("./common-l10K7Buh.js"),[]),k(()=>import("./documentation-ugbsob7I.js"),[]),k(()=>import("./claude-install-B2_pwFJQ.js"),[])])},au={heading:"BlockSight for Claude",hook:"Read-only Bitcoin blockchain data inside Claude Desktop, Claude Code, and any MCP-compatible client — live blocks, transactions, addresses, fees, and network status, served from dedicated Bitcoin Core infrastructure.",capabilities:{heading:"What you can ask about",items:{blockHeight:"Current block height — the tip of the chain, live.",blockLookup:"Block details — txCount, size, weight, fees, miner, and timestamp for any block from genesis to tip.",transactionStatus:"Transactions — inputs, outputs, fee, confirmation depth, and block height for any TXID.",mempool:"Mempool state — current size, pending transaction count, and which fee tier is clearing now.",feeEstimates:"Recommended fees — sat/vB estimates for next-block and six-hour confirmation targets.",networkStatus:"Network status — difficulty, mempool size, hashrate, and live BTC/USD price.",congestion:"Congestion score — an at-a-glance read of how crowded the mempool is right now."}},desktop:{heading:"Install for Claude Desktop",intro:"BlockSight runs as a remote MCP server at https://mcp.blocksight.live. To add it to Claude Desktop, edit your Claude Desktop config file. If the file does not exist, create it. If it does exist, add the blocksight entry to the existing mcpServers object — do not replace the whole file.",macOSLabel:"macOS",macOSPath:"~/Library/Application Support/Claude/claude_desktop_config.json",windowsLabel:"Windows",windowsPath:"%APPDATA%\\Claude\\claude_desktop_config.json",codeBlockCaption:"Config snippet (starter — verify against current Anthropic docs before launch):",configSnippet:`{ "mcpServers": { "blocksight": { "url": "https://mcp.blocksight.live", "description": "Read-only Bitcoin blockchain explorer and analytics API by Blocksight OÜ." } } }`,restartInstruction:"After editing, quit Claude Desktop completely (not just close the window — fully quit the app), then relaunch. The blocksight tools will appear in the tools panel on your next conversation."},code:{heading:"Install for Claude Code",intro:"Claude Code uses the same MCP server. The config file location varies by Claude Code version — check the Claude Code documentation for the current path. The config shape mirrors Claude Desktop.",configSnippet:`{ "mcpServers": { "blocksight": { "url": "https://mcp.blocksight.live", "description": "Read-only Bitcoin blockchain explorer and analytics API by Blocksight OÜ." } } }`,restartInstruction:"After editing, restart Claude Code. The blocksight tools become available in the tool list."},prompts:{heading:"Example prompts",intro:"Once installed, ask Claude:",items:{latestBlock:"What's the current Bitcoin block height?",blockByHeight:"Tell me about block 800000 — how many transactions, total fees, who mined it?",blockByHash:"Look up the block with hash 00000000000000000000562e541a6570ab53bbfdeeb4f64f3a0e37d34aa3f2db.",txStatus:"Is transaction 9e26861987608c136f54eea5059a0fd1fa60b5ec068d2f0973ba48f2bb2b4e86 confirmed yet?",txDetails:"Show me the inputs, outputs, and fee for that transaction.",mempoolSize:"How congested is the Bitcoin mempool right now?",feeRecommendation:"What are the recommended Bitcoin fees for the next block?",networkCongestion:"Give me the current network congestion score and what it means in practice.",blockBeforeTx:"Show me the last 10 blocks with their fee rates.",halvingCountdown:"How many blocks until the next Bitcoin halving?"}},readonly:{heading:"What's read-only",intro:"BlockSight is a read-only Bitcoin data source. It cannot and will not:",items:{noKeys:"No key storage — BlockSight never sees your private keys, seed phrase, or passphrase. Don't share them with anyone, including Claude.",noSigning:'No transaction signing — BlockSight cannot sign transactions. Ask it to "send Bitcoin" and it will politely decline.',noBroadcast:"No broadcasting — BlockSight does not accept or forward transactions to the Bitcoin network. It reads the chain; it does not write to it.",publicData:"No authentication required — v1 is public and rate-limited. You don't create an account, you don't log in, you don't paste an API key."}},troubleshooting:{heading:"Troubleshooting",items:{serverNotStarting:{question:"Tools not showing up in Claude Desktop",answer:"Check three things. (1) Your config JSON is valid — a missing comma or bracket silently breaks the whole server list; paste it into jsonlint.com if unsure. (2) You fully quit Claude Desktop, not just closed the window — on macOS use Cmd+Q, on Windows use File → Exit. (3) Your Claude Desktop version supports remote MCP servers; older versions only supported stdio servers. Update to the latest."},staleData:{question:"Data looks stale or a block is missing",answer:"BlockSight follows the Bitcoin Core tip on dedicated infrastructure, typically within seconds of a new block. If a response looks stale, ask Claude to query again — the answer is cached briefly to respect rate limits. If the staleness persists across retries, email dev@blocksight.live with the block height or TXID you were querying."},rateLimit:{question:"Rate limit hit",answer:"BlockSight v1 shares a rate-limit pool with the public REST API (100 requests per 15 minutes per IP). If you hit it, wait a few minutes and try again. If you need higher throughput for a production workflow, email dev@blocksight.live and we will discuss a premium tier."}}},contact:{heading:"Contact",body:"Technical and API questions go to the address below. For privacy and legal questions use legal@blocksight.live. For partnerships, press, and business reach ceo@blocksight.live. BlockSight is built and operated by Blocksight OÜ, Tallinn, Estonia."}},su={claudeInstall:au},ru={ariaLabel:{block:"View block {{value}}",tx:"View transaction {{value}}",address:"View address {{value}}"}},iu={inMinSec:"in {{minutes}}m {{seconds}}s",inMin_one:"in {{count}} min",inMin_other:"in {{count}} mins",inSec_one:"in {{count}} sec",inSec_other:"in {{count}} secs",anyMoment:"any moment",delayed_one:"delayed {{count}} min",delayed_other:"delayed {{count}} mins",delayedSec_one:"DELAYED {{count}} sec",delayedSec_other:"DELAYED {{count}} secs",delayedMinSec:"DELAYED {{minutes}}m {{seconds}}s",delayedHourMin:"DELAYED {{hours}}h {{minutes}}m",justFound:"just found",justNow:"JUST NOW",momentAgo:"moment ago",ago_one:"{{count}} min ago",ago_other:"{{count}} mins ago",hoursMinAgo:"{{hours}}h {{minutes}}m ago"},ou={title:"BlockSight.Live",tagline:"Real-time Bitcoin Blockchain Visualization",loading:"Loading BlockSight...",error:"Something went wrong",retry:"Retry",back:"Back",close:"Close",save:"Save",cancel:"Cancel",confirm:"Confirm",delete:"Delete",edit:"Edit",view:"View",search:"Search",filter:"Filter",sort:"Sort",refresh:"Refresh",settings:"Settings",help:"Help",about:"About",copy:"Copy"},cu={home:"Home",dashboard:"Dashboard",search:"Search",calculator:"Calculator",settings:"Settings",addressExplorer:"Address Explorer",blockExplorer:"Block Explorer",transactionExplorer:"Transaction Explorer",language:"Language",currency:"Currency",units:"Units",whitepaper:"Whitepaper",documentation:"Documentation",faq:"FAQ",apiSubscription:"API Subscription",tzurWallet:"TZUR Wallet",aboutUs:"About Us",legal:"Legal",privacyPolicy:"Privacy Policy",termsOfService:"Terms of Service",returnToHome:"Return to home view",homeIndicator:"Home indicator"},lu={logo:"BlockSight.Live",searchPlaceholder:"Search blocks, transactions, addresses...",searchButton:"Search",language:"Language",languageSelector:"Select Language",english:"English",spanish:"Español",hebrew:"עברית",portuguese:"Português",networkStatus:"Network Status",connected:"Connected",disconnected:"Disconnected",syncing:"Syncing",mobileMenu:"Menu",lightMode:"Light",darkMode:"Dark",navigation:"Navigation",home:"BlockSight.Live home",openSearch:"Open search"},uu={title:"Bitcoin Blockchain Dashboard",leftPanel:{title:"Search Results",noResults:"No search results found",placeholder:"Search for blocks, transactions, or addresses to see results here",searching:"Searching...",selectBlock:"Select a block to view details",selectTransaction:"Select a transaction to view details",selectAddress:"Select an address to view details"},centerPanel:{title:"3D Blockchain Visualizer",memoryPool:{title:"Memory Pool",upcomingBlocks:"Upcoming Blocks",estimatedTime:"Estimated Time",transactionCount:"Transaction Count",feeRange:"Fee Range"},currentBlocks:{title:"Current Blocks",nextBlock:"Next Block",lastBlock:"Last Block",mining:"Mining in Progress",confirmed:"Confirmed",confirmations:"Confirmations"},builtBlockchain:{title:"Built Blockchain",historicalBlocks:"Historical Blocks",blockHeight:"Block Height",timestamp:"Timestamp",difficulty:"Difficulty",size:"Size"}},rightPanel:{title:"Dashboard Widgets",placeholder:"Bitcoin price, fees, and network congestion widgets will appear here",bitcoinPrice:"Bitcoin Price",feeEstimates:"Fee Estimates",networkCongestion:"Network Congestion",unconfirmedTx:"Unconfirmed Transactions"}},du={price:{title:"Bitcoin Price",currentPrice:"Current Price",priceChange:"Price Change",priceChange24h:"24h Change",priceChange7d:"7d Change",priceChange30d:"30d Change",high24h:"24h High",low24h:"24h Low",volume24h:"24h Volume",marketCap:"Market Cap",dominance:"Market Dominance",lastUpdated:"Last Updated",loading:"Loading price data...",dataSource:"Data Source",updated:"Updated",currency:{usd:"USD",eur:"EUR",gbp:"GBP",jpy:"JPY",cad:"CAD",aud:"AUD",chf:"CHF",cny:"CNY",inr:"INR",brl:"BRL",ils:"ILS"}},fees:{title:"Fee Estimates",loading:"Loading fee data...",nextBlock:"Next Block",sixHours:"6 Hours",twentyFourHours:"24 Hours",custom:"Custom",satPerByte:"sat/byte",satPerVByte:"sat/vbyte",dollars:"Dollars",confirmationTime:"Confirmation Time",fast:"Fast",medium:"Medium",slow:"Slow",verySlow:"Very Slow",mempoolSize:"Mempool Size",pendingTransactions:"Pending Transactions",gauge:{title:"Fee Gauge",nextBlock:"Next Block",nextBlockShort:"Next",withinSixHours:"Within 6 Hours",sixHoursShort:"Later",noPriority:`NO PRIORITY`,satsPerVByte:"sats v/B",dollars:"$",tooltip:{nextBlock:"Minimum fee likely to enter the next block",sixHours:"Average of the lowest fees in recent blocks"}}},network:{title:"Network Status",congestion:"Congestion",healthy:"Healthy",moderate:"Moderate",high:"High",extreme:"Extreme",hashRate:"Hash Rate",difficulty:"Difficulty",blockHeight:"Block Height",blockTime:"Block Time",averageBlockTime:"Average Block Time",blocksPerHour:"Blocks per Hour",blocksPerDay:"Blocks per Day",totalTransactions:"Total Transactions",transactionsPerSecond:"Transactions per Second",unconfirmedTransactions:"Unconfirmed Transactions",mempoolSize:"Mempool Size",lastBlock:"Last Block",nextBlock:"Next Block",gauge:{title:"Network Congestion Gauge",loading:"Loading network data...",belowAverage:"Low",average:"Average",congestion:"Congested",extremeCongestion:"Extreme",unconfirmed:"UNCONFIRMED TXs",systemStatus:"SYSTEM STATUS",unhealthy:"UNHEALTHY",healthy:"HEALTHY",degraded:"DEGRADED",demo:"(Demo)",tooltip:{"below-average":"Low activity level; the network is not congested",average:"Average activity level; transactions are confirmed in a reasonable time",congestion:"High activity level; delays in transaction confirmation may occur","extreme-congestion":"The network is heavily congested, with long confirmation times and higher fees"},centerTooltip:{description:"Current network congestion based on pending transactions and time since the last block",unconfirmed:"Unconfirmed"}}},calculator:{title:"Bitcoin Calculator",convert:"Convert",from:"From",to:"To",amount:"Amount",result:"Result",exchangeRate:"Exchange Rate",lastUpdated:"Last Updated",quickConversions:"Quick Conversions",quick1:"1 BTC = 100,000,000 sats",quick2:"1 sat = 0.00000001 BTC",units:{btc:"Bitcoin (BTC)",mbtc:"Millibitcoin (mBTC)",ubtc:"Microbitcoin (μBTC)",satoshi:"Satoshi (sat)",usd:"US Dollar (USD)",eur:"Euro (EUR)",gbp:"British Pound (GBP)",jpy:"Japanese Yen (JPY)",cad:"Canadian Dollar (CAD)",aud:"Australian Dollar (AUD)",chf:"Swiss Franc (CHF)",cny:"Chinese Yuan (CNY)",inr:"Indian Rupee (INR)",brl:"Brazilian Real (BRL)",ils:"Israeli Shekel (ILS)"},calculations:{fees:"Transaction Fees",confirmationTime:"Confirmation Time",blockReward:"Block Reward",halving:"Halving",difficulty:"Mining Difficulty",hashRate:"Hash Rate",energy:"Energy Consumption",carbonFootprint:"Carbon Footprint"}},search:{title:"Bitcoin Search",placeholder:"Search the Bitcoin Blockchain - Address, Transaction or Block Hash",searchButton:"Search",clearButton:"Clear",advancedSearch:"Advanced Search",searchTypes:{all:"All",blocks:"Blocks",transactions:"Transactions",addresses:"Addresses",scripts:"Scripts"},filters:{dateRange:"Date Range",blockHeight:"Block Height",transactionType:"Transaction Type",amount:"Amount",fee:"Fee"},results:{title:"Search Results",noResults:"No results found",searching:"Searching...",totalResults:"Total Results",showing:"Showing",of:"of",results:"results",loadMore:"Load More",export:"Export Results",match:"match",trySearchingFor:"Try searching for:",exampleBlockHeight:"Block height (e.g., 800000)",exampleTxId:"Transaction ID (e.g., 64-character hex)",exampleAddress:"Bitcoin address (e.g., 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa)"}}},hu={title:"Block",hash:"Block Hash",height:"Block Height",timestamp:"Timestamp",size:"Size",weight:"Weight",transactions:"Transactions",fees:"Fees",difficulty:"Difficulty",merkleRoot:"Merkle Root",previousBlock:"Previous Block",nextBlock:"Next Block",confirmations:"Confirmations",status:{confirmed:"Confirmed",unconfirmed:"Unconfirmed",orphaned:"Orphaned",stale:"Stale"},details:{title:"Block Details",header:"Block Header",transactions:"Transaction List",rawData:"Raw Data",statistics:"Statistics"}},mu={title:"Transaction",txid:"Transaction ID",hash:"Transaction Hash",block:"Block",confirmations:"Confirmations",timestamp:"Timestamp",size:"Size",weight:"Weight",fee:"Fee",inputs:"Inputs",outputs:"Outputs",amount:"Amount",status:{confirmed:"Confirmed",unconfirmed:"Unconfirmed",pending:"Pending",failed:"Failed"},details:{title:"Transaction Details",inputs:"Input Details",outputs:"Output Details",rawData:"Raw Data",script:"Script Analysis"}},pu={title:"Address",address:"Address",balance:"Balance",totalReceived:"Total Received",totalSent:"Total Sent",transactionCount:"Transaction Count",firstSeen:"First Seen",lastSeen:"Last Seen",utxoCount:"UTXO Count",type:"Address Type",script:"Script Type",details:{title:"Address Details",transactions:"Transaction History",utxos:"UTXO List",statistics:"Statistics",rawData:"Raw Data"}},fu={title:"Settings",general:"General",appearance:"Appearance",language:"Language",currency:"Currency",units:"Bitcoin Units",dark:"Dark",light:"Light",auto:"Auto",notifications:"Notifications",priceAlerts:"Price Alerts",feeAlerts:"Fee Alerts",networkAlerts:"Network Alerts",blockAlerts:"Block Alerts",privacy:"Privacy",analytics:"Analytics",telemetry:"Telemetry",crashReports:"Crash Reports",usageData:"Usage Data",about:"About",version:"Version",license:"License",contributors:"Contributors",changelog:"Changelog"},gu={general:"Something went wrong",network:"Network error occurred",notFound:"Resource not found",unauthorized:"Unauthorized access",forbidden:"Access forbidden",serverError:"Server error occurred",timeout:"Request timed out",offline:"You are currently offline",retry:"Please try again",contactSupport:"Contact support if the problem persists",errorCodes:{400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"},widget:{failedToLoad:"Failed to load {{componentName}}",retry:"Retry",retrying:"Retrying...",maxRetries:"Max retries reached. Please refresh the page.",price:"Price unavailable",congestion:"Congestion data unavailable",fee:"Fee data unavailable",timeout:"Connection timeout"},service:{network:{title:"Connection Issue",message:"Unable to connect to BlockSight services. Please check your internet connection and try again."},module:{title:"Loading Error",message:"The application failed to load completely. This may be due to a network issue or outdated cache. Try clearing your browser cache and refreshing."},websocket:{title:"Real-Time Connection Lost",message:"The connection for live data has been interrupted. Some features may be temporarily unavailable."},api:{title:"Service Temporarily Unavailable",message:"BlockSight services are temporarily unavailable. Our team has been notified and is working to restore service."},render:{title:"Display Error",message:"An error occurred while displaying this page. Please try refreshing."},unknown:{title:"Something Went Wrong",message:"An unexpected error occurred. Please try refreshing the page."}},actions:{retry:"Try Again",refresh:"Refresh Page",goHome:"Go to Homepage",help:"Get Help"},labels:{errorCode:"Error Code",supportReference:"Support Reference"}},yu={general:"Loading...",searching:"Searching...",fetching:"Fetching data...",processing:"Processing...",connecting:"Connecting...",syncing:"Synchronizing...",mining:"Mining in progress...",confirming:"Confirming transaction...",calculating:"Calculating...",updating:"Updating...",saving:"Saving...",deleting:"Deleting...",exporting:"Exporting...",importing:"Importing..."},bu={yes:"Yes",no:"No",ok:"OK",cancel:"Cancel",close:"Close",back:"Back",next:"Next",previous:"Previous",search:"Search",filter:"Filter",sort:"Sort",refresh:"Refresh",reload:"Reload",play:"Play",pause:"Pause",reset:"Reset",clear:"Clear",online:"Online",offline:"Offline",minutesShort:"min",copy:"Copy",copied:"Copied!",connected:"Connected",disconnected:"Disconnected"},vu={healthy:"Healthy",degraded:"Degraded"},ku={wsLatency:"WS latency"},Su={home:"Home",data:"Data",search:"Search",settings:"Settings",openDrawer:"Open menu",closeDrawer:"Close menu",swipeToClose:"Swipe to close"},_u={copyright:"© 2024 BlockSight.Live. All rights reserved.",poweredBy:"Powered by Bitcoin",network:"Network Status",statistics:"Statistics",feeEstimates:"Fee Estimates",externalLinks:"External Links",bitcoinOrg:"Bitcoin.org",bitcoinCore:"Bitcoin Core",electrum:"Electrum",github:"GitHub",documentation:"Documentation",api:"API",support:"Support",contact:"Contact"},wu={visualization:{title:"Blockchain Visualization",unableToLoad:"Unable to load blockchain data"}},Eu={ariaLabel:"Block {{height}} details",mempoolBlock:"Mempool Block",title:"Block",blockNumber:"Block {{height}}",hash:"Hash",copyHash:"Click to copy full hash",copyHashAriaLabel:"Copy block hash: {{hash}}",height:"Height",timestamp:"Timestamp",pending:"Pending",transactions:"Transactions",feeRates:"Fee Rates",minFee:"Min",medianFee:"Median",maxFee:"Max",miner:"Miner",predicted:"Predicted",unknown:"Unknown",tbd:"TBD",financials:"Block Reward",totalFees:"Total Fees",subsidy:"Subsidy",total:"Total",memoryPool:"Memory Pool",confirmed:"Confirmed",previousBlock:"Previous block",nextBlock:"Next block",genesisBlock:"(Genesis Block)"},Tu={ariaLabel:"Transaction details",title:"Transaction",hash:"TX Hash",status:"Status",block:"Block",firstSeen:"First Seen",confirmedAt:"Confirmed",fee:"Fee",sats:"Sats",fiatValue:"USD",feeRate:"sat/vB",from:"From",to:"To",amount:"Amount",pending:"Pending",confirmed:"Confirmed",unconfirmed:"UNCONFIRMED",oneConfirmation:"1 confirmation",confirmations:"{{count}} confirmations",justNow:"Just now",minuteAgo:"1 minute ago",minutesAgo:"{{count}} minutes ago",hourAgo:"1 hour ago",hoursAgo:"{{count}} hours ago",unknown:"Unknown",rbfHistory:"Fee Bump History",previousFee:"Previous",currentFee:"Current",bumpCount:"Bumps",viewBlock:"View block details",viewAddress:"View address details",estConfirmation:"Est. Confirmation",blockPosition:"Block {{position}}",minutes:"min",pattern:"Pattern",confidence:"Confidence",pattern_simple_payment:"Simple Payment",pattern_consolidation:"Consolidation",pattern_batch_payment:"Batch Payment",pattern_coinjoin:"CoinJoin",pattern_unknown:"Unknown Pattern",coinbase:"Coinbase",coinbaseFeeNote:"N/A — Block Reward",coinbaseBlockReward:"Coinbase (Block Reward)",coinbaseReward:"Coinbase reward",confirmedBadge:"Confirmed",blockReward:"Block Reward",estimatedPosition:"Est. Position",payment:"Payment",change:"Change",unknownType:"Unknown",heuristicTooltip:"Output classified by transaction analysis"},Cu={ariaLabel:"Address details",title:"Address",address:"Address",balance:"Balance",pending:"pending",received:"Received",sent:"Sent",transactions:"Transactions",totalReceived:"Received",totalSent:"Sent",txIn:"TX In",txOut:"TX Out",recentTransactions:"Recent Transactions",viewTransaction:"View transaction {{txid}}",pendingTx:"Pending",loadMore:"Load More",showQr:"Show QR Code",qrModal:"QR Code",addressType:{legacy:"Legacy",segwit:"SegWit",nativeSegwit:"Native SegWit",taproot:"Taproot"},unavailable:"N/A"},Au={copy:{address:"Copy Address",block:"Copy Block Hash",transaction:"Copy Transaction Hash"},copied:"Copied!",copiedAriaLabel:"Copied to clipboard",ariaLabel:{address:"Copy address to clipboard",block:"Copy block hash to clipboard",transaction:"Copy transaction hash to clipboard"}},xu={timer:{anyMoment:"any moment",minutesLeft:"{{count}} min left",minutesLeft_one:"{{count}} min left",minutesLeft_other:"{{count}} mins left",sinceLastBlock:"since last block"}},Bu={errors:{emptyQuery:"Please enter a search query",invalidInput:"Invalid search input",invalidBlockHeight:"Invalid block height",blockOutOfRange:"Block height must be between 0 and {{maxHeight}}",blockHeightNegative:"Block height cannot be negative",blockHeightTooHigh:"Block height exceeds current tip",blockNotFound:"Block not found in current view",blockNotFoundByHash:"Block not found with this hash",mempoolHashSearch:"Mempool blocks cannot be searched by hash",hashNotFound:"No block or transaction found with this hash",transactionNotFound:"Transaction not found",addressNotFound:"Address not found",apiNotAvailable:"Search API not available",rateLimited:"Please wait before searching again",rateLimitedDescription:"Try again in {{seconds}} seconds",notImplemented:"Search type not yet supported",notImplementedDescription:"Only block, transaction, and address search is available"},tips:{title:"Search Tips",transaction:"Transaction Hash: 64-character hex string",block:"Block Height: Number (e.g., 882491)",address:"Address: Bitcoin address (starts with 1, 3, or bc1)"},placeholder:"Search block, transaction, or address",searching:"Searching...",loading:"Searching"},Ru={ariaLabel:"System status: {{status}}",blockchain:"Blockchain",dataSources:"Data Sources",market:"Market",performance:"Performance",websocket:"WebSocket",uptime:"Uptime",slaTarget:"SLA Target",latency:"Latency (p95)",errorRate:"Error Rate",lastHeartbeat:"Last Heartbeat",statusLabel:"Status",status:{live:"Live",stale:"Stale",demo:"Demo",offline:"Offline"},heartbeat:{justNow:"Just now",minutesAgo:"{{count}} min ago",minutesAgo_one:"{{count}} min ago",minutesAgo_other:"{{count}} mins ago",hoursAgo:"{{count}} hr ago",hoursAgo_one:"{{count}} hr ago",hoursAgo_other:"{{count}} hrs ago"}},Iu={message:"BlockSight.Live is offline",reconnecting:"Reconnecting..."},Pu={home:{title:"BlockSight.Live | Explorer",description:"Monitor the Bitcoin blockchain in real-time with BlockSight.Live. View live blocks, transactions, mempool data, fee estimates, and network congestion. Free Bitcoin explorer with advanced visualization.",h1:"Real-Time Bitcoin Blockchain Explorer",answerBlock:"BlockSight.Live is a real-time Bitcoin blockchain explorer that visualizes the network as it happens. Users can monitor live blocks, pending transactions in the mempool, fee estimates, and network congestion. The platform offers both a free public dashboard and paid API access for developers. BlockSight.Live is designed for Bitcoin enthusiasts, traders, and developers who need instant visibility into blockchain activity."},about:{title:"About BlockSight.Live | Bitcoin Blockchain Explorer Team",description:"Learn about BlockSight.Live, the team behind the real-time Bitcoin blockchain explorer. Meet our founders and discover our mission to make Bitcoin data accessible.",h1:"About BlockSight.Live",answerBlock:"BlockSight.Live was created by a team of Bitcoin developers and data visualization experts. Our mission is to make Bitcoin blockchain data accessible, understandable, and actionable for everyone. We believe in Bitcoin-only principles and accept only Bitcoin payments for our services. The platform is operated by Blocksight OÜ, registered in Estonia, combining European regulatory standards with cutting-edge blockchain technology.",linksTitle:"Explore More"},api:{title:"Bitcoin API | BlockSight.Live Developer API",description:"Access real-time Bitcoin blockchain data through the BlockSight.Live API. REST and WebSocket endpoints for blocks, transactions, addresses, fees, and mempool data. Bitcoin-only payments.",h1:"BlockSight.Live API",answerBlock:"The BlockSight.Live API provides real-time Bitcoin blockchain data through REST and WebSocket endpoints. Developers can access blocks, transactions, addresses, fee estimates, and mempool data programmatically. Three subscription tiers are available: Basic for small projects, Advanced for growing applications, and Premium+ for enterprise needs. All payments are processed exclusively in Bitcoin, with subscriptions managed through on-chain transactions.",lastUpdated:"Last updated: 2025-12-16",linksTitle:"Learn More"},claude:{title:"BlockSight for Claude — Bitcoin blockchain data in Claude Desktop and Claude Code",description:"Install BlockSight as an MCP server for Claude Desktop and Claude Code. Read-only access to live Bitcoin blockchain data: blocks, transactions, mempool, fees, and network status. Free to install.",h1:"BlockSight for Claude",answerBlock:"BlockSight for Claude is an MCP (Model Context Protocol) server that connects Claude Desktop and Claude Code to live Bitcoin blockchain data. Users can ask Claude about block heights, transaction status, mempool activity, fee estimates, and network congestion — answered with real-time data from a dedicated Bitcoin Core + Electrum backend. The server is read-only (no private keys, no signing) and installs via a single config block."},documentation:{title:"Documentation | BlockSight.Live Bitcoin Explorer Guide",description:"Complete guide to using BlockSight.Live. Learn about blockchain visualization, fee gauges, congestion metrics, and all features of our Bitcoin explorer.",h1:"BlockSight.Live Documentation",answerBlock:"This documentation covers all features of BlockSight.Live, from basic navigation to advanced API integration. Learn how to interpret the real-time blockchain visualizer, understand fee gauges and congestion metrics, and use the search functionality. API subscribers will find endpoint references, authentication guides, and code examples. The documentation is regularly updated as new features are released.",lastUpdated:"Last updated: 2025-12-16",linksTitle:"Related Resources"},legal:{title:"Legal | Terms, Privacy & API Agreement | BlockSight.Live",description:"BlockSight.Live legal documents: Terms of Service, Privacy Policy, and API Terms & SLA Agreement. Operated by Blocksight OÜ, Estonia.",h1:"Legal",answerBlock:"This page contains BlockSight.Live's legal documents including Terms of Service, Privacy Policy, and API Terms & SLA Agreement. All services are provided by Blocksight OÜ, registered in Estonia. Review our policies to understand your rights and our obligations."},whitepaper:{title:"Whitepaper | BlockSight.Live Bitcoin Observation Layer",description:"BlockSight.Live Whitepaper: A Real-time Observation Layer for the Bitcoin Network. Read about our design principles, system structure, and observation model.",h1:"BlockSight.Live Whitepaper",answerBlock:"The BlockSight.Live Whitepaper introduces a real-time observation layer for the Bitcoin network. It describes a system architecture that processes blockchain data with minimal latency while maintaining data integrity. The paper covers design principles, the observation model, and how BlockSight.Live bridges raw blockchain data with human-readable insights. This technical document is intended for developers and researchers interested in Bitcoin infrastructure.",lastUpdated:"Last updated: 2025-12-16",linksTitle:"Continue Exploring"},faq:{title:"FAQ | BlockSight.Live Bitcoin Explorer",description:"Frequently asked questions about BlockSight.Live Bitcoin blockchain explorer. Learn about features, API access, pricing, and how to use the platform.",h1:"BlockSight FAQ",answerBlock:"Find answers to common questions about BlockSight.Live, the real-time Bitcoin blockchain explorer. Learn about our features, API subscription plans, Bitcoin-only payments, and how to get started with blockchain data."},tzur:{title:"TZUR Wallet | Bitcoin in Your Language | BlockSight.Live",description:"TZUR is a self-custody Bitcoin wallet for iOS with BIP-39 seed phrases in 22 languages. One-time purchase, no subscriptions. Built by the BlockSight team.",h1:"TZUR Wallet - Bitcoin in Your Language",answerBlock:"TZUR Wallet is a self-custody Bitcoin wallet built natively for iOS. It is the first Bitcoin wallet to generate BIP-39 seed phrases in 22 languages. TZUR is a one-time purchase of $59.99 with no subscriptions. Features include a built-in BlockSight.Live explorer, 75 fiat currencies, 7 visual themes, and hardware-backed security. Built by the same team behind BlockSight.Live.",linksTitle:"Explore More"},links:{readWhitepaper:"Read our Whitepaper",exploreApi:"Explore our API",viewDocs:"View Documentation",viewLegal:"View Legal",viewAbout:"View About Us",aboutUs:"About Us",readFaq:"Read FAQ",getApiAccess:"Get API Access",subscribeApi:"Subscribe to API"}},Lu={crm:{title:"CRM Dashboard",subtitle:"Client Management, Transactions & Reports",tabs:{clients:"Clients",transactions:"Transactions",reports:"Reports",overview:"Overview",users:"Users",documents:"Documents",invoices:"Invoices",audit:"Audit Log"},actions:{exportCsv:"Export CSV",retry:"Retry",refresh:"Refresh",backToCrm:"← Back to CRM"},table:{headers:{name:"Name",email:"Email",status:"Status",tier:"Tier",revenue:"Revenue",createdAt:"Created",amount:"Amount",amountBtc:"BTC Amount",amountUsd:"USD Value",client:"Client",invoiceId:"Invoice ID",txHash:"TX Hash",type:"Type",title:"Title",size:"Size",uploadedAt:"Uploaded",role:"Role",action:"Action",actor:"Actor",resource:"Resource",timestamp:"Time",lastActivity:"Last Activity",paidAt:"Paid At"},empty:{clients:"No clients found",transactions:"No transactions found",documents:"No documents found",users:"No users found",audit:"No audit logs found"}},filters:{allStatuses:"All statuses",allTiers:"All tiers",searchClients:"Search by name or email...",searchTransactions:"Search by ID, email, or client...",startDate:"Start date",endDate:"End date",search:"Search...",clearSearch:"Clear search",to:"to"},tiers:{free:"Free",basic:"Basic",advanced:"Advanced",premiumPlus:"Premium+"},status:{active:"Active",inactive:"Inactive",suspended:"Suspended",pending:"Pending",confirmed:"Confirmed",failed:"Failed",expired:"Expired",success:"Success",failure:"Failure"},loading:{clients:"Loading clients...",transactions:"Loading transactions...",reports:"Loading reports...",profile:"Loading profile..."},summary:{totalAmount:"Total Amount",usdValue:"USD Value",transactions:"Transactions"},profile:{notFound:"Client not found",invoicesComingSoon:"Invoice management coming soon. View all transactions in the",sections:{businessDetails:"Business Details",billingInfo:"Billing Information",recentActivity:"Recent Activity",statistics:"Statistics"},fields:{legalName:"Legal Name",taxId:"Tax ID",billingEmail:"Billing Email",address:"Address",website:"Website",industry:"Industry",createdAt:"Created",totalRevenue:"Total Revenue",totalTransactions:"Transactions",documentsCount:"Documents",usersCount:"Users",lastInvoice:"Last Invoice",file:"File",uploadedBy:"By"}},reports:{title:"Reports",metrics:{totalRevenue:"Total Revenue",totalInvoices:"Total Invoices",paidInvoices:"Paid Invoices",unpaidInvoices:"Unpaid Invoices",activeClients:"Active Clients",churnedClients:"Churned Clients",totalReceived:"Total Received",invoiceTotal:"Invoice Total",overdue:"Overdue",totalClients:"Total Clients",newThisMonth:"New This Month",churnRate:"Churn Rate",percentOfTotal:"% of Total"},sections:{tierBreakdown:"Tier Breakdown",topClients:"Top Clients by Revenue",revenueSummary:"Revenue Summary",customerMetrics:"Customer Metrics"},period:"Period",generatedAt:"Generated at"},pagination:{showing:"Showing {{start}}-{{end}} of {{total}}",perPage:"per page"},noName:"No name"}},Du={aria:{bitcoinTools:"Bitcoin Tools",openToolbar:"Open ToolBar",closeToolbar:"Close ToolBar"},halving:{ariaLabel:"Bitcoin Halving Countdown",title:"Halving Countdown",projectedDate:"Projected Date",halvingAtBlock:"Halving at Block",blocksRemaining:"Blocks Remaining",btcUntilHalving:"BTC Until Halving",currentEpoch:"Current Epoch %"},supply:{ariaLabel:"Bitcoin Supply Information",title:"Bitcoin Supply",circulatingSupply:"Circulating Supply",percentageIssued:"Percentage Issued",issuanceRemaining:"Issuance Remaining",dailyIssuance:"Issuance (24hrs)"},generalMetrics:{ariaLabel:"Core Network Metrics",title:"Core Network Metrics",waiting:"Waiting for data...",transactions24h:"Transactions 24h",avgTxPerHour:"Avg tx/hour",btcSent24h:"BTC sent 24h",btcSentPerHour:"BTC sent avg/hour",avgTxValue:"Avg tx value",medianTxValue:"Median tx value",avgTxFee:"Avg tx fee",medianTxFee:"Median tx fee"},monicaMetrics:{ariaLabelOpen:"Open Monica Metrics",ariaLabelClose:"Close Monica Metrics",ariaLabelModal:"Monica Metrics Panel",title:"Monica Metrics",error:"Unable to load Monica Metrics",errorDetails:"Monica Metrics component error",metrics:{bvp:{label:"BVP",tooltip:"Share of total Bitcoin supply that moved in the last 24 hours."},rur:{label:"RUR",tooltip:"Typical transaction size compared to the average, indicating whale skew."},fpi:{label:"FPI",tooltip:"Typical fee cost relative to what users are actually sending."},tts:{label:"TTS",tooltip:"Average value settled per Bitcoin transaction without intermediaries."},edi:{label:"EDI",tooltip:"Average dollar value settled by each Bitcoin block."}}},calculator:{ariaLabelOpen:"Open Currency Calculator",ariaLabelClose:"Close Currency Calculator",ariaLabelModal:"Currency Calculator",usdAmount:"USD amount",btcAmount:"BTC amount",satsAmount:"Satoshis amount",secondaryFiatAmount:"{{currency}} amount",copy:"Copy {{label}}",copied:"Copied!"}},Nu={title:"Subscription",currentPlan:"Current Plan",billingPeriod:"Billing Period:",renewalDate:"Renewal Date:",upgradePlan:"Upgrade Plan"},Ou={loading:"Loading invoices...",empty:"No invoices found",invoice:"Invoice",date:"Date",amount:"Amount",paymentAddress:"Payment Address",transaction:"Transaction",status:"Status",previous:"Previous",next:"Next",pageInfo:"Page {{current}} of {{total}}"},Mu={recommended:"Recommended",priceUnit:"BTC/year",sats:"sats",requestsPerDay:"Requests/day",rateLimit:"Rate limit",perSecond:"/second",processing:"Processing...",selectPlan:"Select Plan"},Hu={confirmed:"Payment Confirmed!",thankYou:"Thank you for subscribing to BlockSight API",summary:"Subscription Summary",plan:"Plan",amountPaid:"Amount Paid",dailyRequests:"Daily Requests",rateLimit:"Rate Limit",viewTransaction:"View Transaction",getApiKey:"Get Your API Key"},Fu={number:"Invoice #{{number}}",paymentAddress:"Payment Address",expiresIn:"Invoice expires in",expired:"EXPIRED"},ju={title:"API Key",active:"Active",inactive:"Inactive",secretWarning:"Keep this key secret. Do not share it publicly.",reveal:"Reveal",hide:"Hide",rotate:"Rotate",created:"Created:",lastUsed:"Last Used:",neverUsed:"Never used",confirmRotation:"Confirm Key Rotation",rotationWarning:"Are you sure you want to rotate your API key? Your current key will be invalidated immediately and cannot be recovered.",rotating:"Rotating..."},Uu={detailPanel:"Detail panel",closePanel:"Close panel",block:{title:"Block #{{height}}",hash:"Hash",time:"Time",transactions:"Transactions",miner:"Miner",feeMin:"MIN",feeMedian:"MEDIAN",feeMax:"MAX",feeUnit:"sat/vB"},transaction:{title:"Transaction",txid:"TXID",status:"Status",confirmed:"Confirmed ({{count}})",pending:"Pending",block:"Block",fee:"Fee",feeRate:"Fee Rate",from:"From",to:"To",inputs:"Inputs",outputs:"Outputs"},address:{title:"Address",address:"Address",type:"Type",totalBalance:"Total Balance",confirmed:"Confirmed",unconfirmed:"Unconfirmed",transactions:"Transactions",received:"Received",sent:"Sent"},search:{title:"Search Results",searching:"Searching for: {{query}}",enterQuery:"Enter a search query"}},Wu={skipToContent:"Skip to main content"},zu={ariaLabel:"Bitcoin amount approximately {{amount}} BTC"},Vu={languageImmediate:"Language changes will take effect immediately.",localStorage:"Your preferences are automatically saved to your browser's local storage.",resetNetworkState:"Reset persisted network state"},qu={api:{goToPortal:"Go to Customer Portal →",content:{modal:{paymentTitle:"Payment Invoice",creatingInvoice:"Creating invoice..."}}},legal:{sla:{title:"API Terms & SLA Agreement"}}},$u={terms:"Terms",privacy:"Privacy",accessibility:"Accessibility"},Ku={copyableLink:ru,timer:iu,app:ou,navigation:cu,header:lu,dashboard:uu,bitcoin:du,blocks:hu,transactions:mu,addresses:pu,settings:fu,errors:gu,loading:yu,common:bu,status:vu,network:ku,mobileNav:Su,footer:_u,blockchain:wu,blockDetails:Eu,transactionDetails:Tu,addressDetails:Cu,copyButton:Au,blockCard:xu,search:Bu,healthChip:Ru,backendOffline:Iu,seo:Pu,admin:Lu,toolbar:Du,subscription:Nu,invoices:Ou,tiers:Mu,payment:Hu,invoice:Fu,apiKey:ju,mobile:Uu,accessibility:Wu,btcAmountIcon:zu,settingsPage:Vu,documentation:qu,footerLinks:$u},Gu=JSON.parse(`{"aboutUs":{"title":"About Us","tagline":"A New Way of Seeing Bitcoin","intro":"BlockSight.Live is a real-time Bitcoin blockchain explorer built from the ground up. No altcoins. No tokens. No distractions. Just Bitcoin, live, clear, and in full detail.","whyBuilt":"We built BlockSight because the Bitcoin network is the most significant financial infrastructure ever created, and most people have never actually seen it work. Blocks are being mined right now. Transactions are being confirmed right now. Fees are shifting right now. BlockSight makes all of it visible, in real time, to anyone.","whatWeDo":{"title":"What We Do","intro":"BlockSight.Live provides real-time visibility into the Bitcoin blockchain:","blockVisualization":"Watch blocks as they're discovered, with live confirmation countdowns, fee ranges, and transaction counts.","blockVisualizationLabel":"Block Visualization.","networkDashboard":"Congestion gauge, fee estimates, BTC price, and Bitcoin calculator, all continuously updated.","networkDashboardLabel":"Network Dashboard.","monicaMetrics":"Five original indicators we created to make on-chain activity easier to understand at a glance: Bitcoin Velocity Pressure, Real Usage Ratio, Fee Pain Index, Trustless Throughput Score, and Economic Density Index.","monicaMetricsLabel":"Monica Bitcoin Metrics.","addressTxLookup":"Search any address or transaction on the Bitcoin blockchain.","addressTxLookupLabel":"Address & Transaction Lookup.","disclaimer":"We don't process transactions. We don't hold funds. We don't offer financial advice. BlockSight is a read-only window into the Bitcoin network. Nothing more, nothing less."},"whyBitcoinOnly":{"title":"Why Bitcoin Only","paragraph1":"Bitcoin is not \\"one of many.\\" It is the only truly decentralized, permissionless monetary network. It deserves tools built exclusively for it, not dashboards that treat it as one tab among a hundred altcoins.","paragraph2":"BlockSight.Live focuses on Bitcoin because focus produces better tools."},"mission":{"title":"Our Mission","paragraph1":"Make Bitcoin's network activity visible and understandable to everyone, regardless of technical background or language.","quote":"BlockSight.Live, a new way of seeing Bitcoin.","followUs":"Follow us on","twitter":"X (Twitter)","followUsOnTwitter":"Follow us on X"},"team":{"title":"The Team","ceo":{"name":"Dani ₿","role":"Co-Founder & CEO","bio1":"Dani has been a Bitcoin advocate since 2018, sharing insights and building conviction publicly on X. Before Bitcoin, he served 10 years as an officer in the Israeli Defense Forces, reaching the rank of Captain, with a background in both military and civilian aviation.","bio2":"After the IDF, he spent 3 years working in the Bitcoin ATM industry, helping people use Bitcoin and watching firsthand how people interact with it for the first time. That experience shaped everything BlockSight is today: the understanding that Bitcoin needs better tools, built for real people, not just developers.","quote":"Bitcoin is not just a digital currency. It is a technological, financial, and social revolution.","twitter":"@d_osem on X"},"cto":{"name":"Gabi","role":"Co-Founder & CTO","bio":"Gabi has been solving complex problems his entire life. A lifelong puzzle enthusiast, he served three years in the Israeli Navy as a Radar Systems Controller before studying Full Stack Programming at Universidad Provincial de Cordoba (UPC) in Argentina.","bio2":"His younger brother Dani introduced him to Bitcoin. Gabi went deep, not just the technology, but the architecture, the protocol, the possibilities. As CTO, he designs and builds BlockSight's systems with sharp analytical precision and a relentless focus on getting the details right."}},"company":{"title":"The Company","description":"BlockSight.Live is operated by Blocksight OÜ, registered in Estonia.","contact":"Contact:","supportEmail":"legal@blocksight.live","ceoEmail":"ceo@blocksight.live"}},"whitepaper":{"title":"Whitepaper","content":{"title":"BlockSight.Live: A Real-time Observation Layer for the Bitcoin Network","author":"Dani ₿","email":"ceo@blocksight.live","website":"www.blocksight.live","abstract":{"label":"Abstract.","text":"Bitcoin generates a continuous stream of publicly verifiable data, yet understanding its real-time behaviour often requires interacting with node software or multiple specialized tools. BlockSight.Live provides an external, structured interface for observing blocks, transactions, mempool conditions, and network indicators as they appear. The system does not participate in consensus or modify protocol behavior. Its purpose is to present a clear and accurate representation of the network's current state using information already broadcast by nodes."},"purpose":{"title":"1. Purpose","text":"BlockSight.Live is designed to simplify access to Bitcoin's observable activity. The platform collects and displays block formation, transaction flow, mempool changes, fee conditions, and congestion levels without performing analysis or interpretation. It presents only data that is already public on the network. The system does not submit transactions, alter confirmation times, or interact with user funds."},"observationModel":{"title":"2. Observation Model","text":"Bitcoin nodes validate and relay transactions independently. BlockSight.Live receives this publicly available information from standard node sources and indexes it in real time. The system holds no private keys and does not alter transactions. It does not influence miners or fee selection, and it does not replace node verification. BlockSight.Live functions solely as an observer. It describes the network as it appears, without predicting behavior or enforcing policy."},"systemStructure":{"title":"3. System Structure","text":"BlockSight.Live organizes publicly available network data into three complementary layers that together provide a coherent view of Bitcoin's observable activity. The Bitcoin Visualizer presents the chain as it progresses, showing confirmed blocks and pending blocks exactly as they are broadcast by nodes. The data dashboard offers a condensed view of network conditions, including pricing signals, congestion levels, and fee dynamics derived from information already present on the network. A search mechanism enables direct retrieval of blocks, transactions, and addresses from the same public data sources. These elements operate together as a consistent structure that an ordinary user can rely on, without altering or extending the underlying information produced by the network itself."},"designPrinciples":{"title":"4. Design Principles","text":"BlockSight.Live operates according to a minimal set of principles intended to remain aligned with Bitcoin's architecture while allowing limited interpretation of publicly available data where it is useful. The system may derive high-level indicators, such as network load, by aggregating and processing observable information, but these remain structured interpretations of data already present on the network rather than predictions or protocol-level claims. Derived metrics do not influence network behavior and have no effect on transaction propagation, miner policy, or consensus. All indicators originate solely from information that any Bitcoin node can obtain, without the use of external inputs, proprietary signals, or private data sources. The underlying data remains fully verifiable by any user."},"conclusion":{"title":"5. Conclusion","text":"BlockSight.Live offers a real-time perspective on Bitcoin's public activity without modifying or participating in the protocol. As Bitcoin continues to scale, tools that provide clear visibility into its operation can help users understand the system without running full infrastructure themselves. BlockSight.Live fulfills this role by presenting what the network already reveals, in a format designed for continuous observation."}}},"legal":{"title":"Legal","terms":{"title":"Terms of Service","lastUpdated":"Last updated: 2026-03-30","intro":"These Terms of Service (\\"Terms\\") govern your access to and use of BlockSight.Live (the \\"Website\\"), including any related services such as the BlockSight API and billing portal (collectively, the \\"Services\\"). By accessing or using the Services, you agree to these Terms.","sections":{"whoWeAre":{"title":"1) Who We Are","content":"The Services are operated by Blocksight OÜ (\\"BlockSight\\", \\"we\\", \\"us\\").","companyDetails":"Company details (for legal notices):","companyName":"Blocksight OÜ","registryCode":"Registry code: 17474529","registeredAddress":"Registered address: Vesivärava tn 50-301, Tallinn, 10152, Estonia","emtak":"EMTAK: 63101","registered":"Registered: 02.04.2026","contact":"Contact: legal@blocksight.live"},"otherPolicies":{"title":"2) Other Policies and Priority","intro":"Your use of the Services is also governed by:","privacyPolicy":"our Privacy Policy, and","apiAgreement":"for paid API use: the BlockSight.Live API Terms & SLA Agreement (\\"API Agreement\\").","priorityTitle":"Document Priority. If there is a conflict:","priority1":"The API Agreement controls for paid API access, billing, and SLA.","priority2":"The Privacy Policy controls for privacy and data handling.","priority3":"These Terms control for general Website/Services usage."},"independentService":{"title":"3) Independent Service","content":"BlockSight.Live is an independent service and is not affiliated with Bitcoin Core, miners, exchanges, wallets, or any third-party platform. We cannot provide support for third-party products or services."},"freeFeatures":{"title":"4) Free Website Features","content":"We may provide free access to certain Website functionality (e.g., blockchain search and viewing). Free features may be changed, limited, or discontinued at any time."},"paidApi":{"title":"5) Paid API Services","content":"Paid API access and billing are governed exclusively by the API Agreement. Please refer to the Billing Portal for current tiers and pricing."},"acceptableUse":{"title":"6) Acceptable Use","intro":"You agree to use the Services lawfully and responsibly. You must not:","prohibited1":"attempt to bypass authentication, quotas, rate limits, or security controls;","prohibited2":"interfere with the stability, performance, or security of the Services (including abusive traffic or excessive connections);","prohibited3":"use the Services for unlawful activities or to facilitate harmful activity;","prohibited4":"scrape, crawl, or harvest the Services in a way that disrupts operations;","prohibited5":"introduce malware or harmful code; or","prohibited6":"misrepresent your identity or authorization.","enforcement":"We may suspend or terminate access if we reasonably believe you violate these Terms or create a security risk."},"noWarranty":{"title":"7) No Warranty","content":"The Services are provided \\"as is\\" and \\"as available.\\" We do not make warranties of any kind (express or implied), including warranties of uninterrupted availability, error-free operation, merchantability, fitness for a particular purpose, or accuracy of information.","blockchainNote":"Blockchain data may be delayed, reorganized, incomplete, or otherwise change over time."},"limitationOfLiability":{"title":"8) Limitation of Liability","intro":"To the maximum extent permitted by law:","item1":"BlockSight is not liable for indirect, incidental, special, consequential, or punitive damages, or for loss of profits, revenue, data, or business interruption arising from or related to the Services.","item2":"BlockSight's total liability for any claim related to the Services will not exceed the amount paid by you to BlockSight for the Services in the three (3) months preceding the event giving rise to the claim."},"intellectualProperty":{"title":"9) Intellectual Property","content":"All rights, title, and interest in the Services, including software, documentation, designs, logos, trademarks, text, graphics, and other materials (\\"BlockSight Materials\\"), are owned by BlockSight or its licensors and are protected by applicable laws.","restrictions":"You may not copy, modify, distribute, sell, or create derivative works from BlockSight Materials without our prior written permission, except as permitted by law."},"changes":{"title":"10) Changes to the Services and Terms","content":"We may update the Services and these Terms from time to time. We will post the updated Terms on the Website and update the \\"Last updated\\" date. Your continued use after changes means you accept the updated Terms."},"termination":{"title":"11) Termination","content":"You may stop using the Services at any time. We may suspend or terminate access to the Services (or parts of them) if necessary for security, maintenance, or in response to misuse or violations."},"governingLaw":{"title":"12) Governing Law and Jurisdiction","content":"These Terms are governed by the laws of Estonia. The competent courts in Harju County (Tallinn), Estonia will have exclusive jurisdiction, unless mandatory law provides otherwise."},"contact":{"title":"13) Contact","content":"Questions about these Terms: legal@blocksight.live | ceo@blocksight.live"}}},"privacy":{"title":"Privacy Policy","lastUpdated":"Last updated: 2026-03-30","intro":"This Privacy Policy explains how Blocksight OÜ (\\"BlockSight\\", \\"we\\", \\"us\\") processes personal data when you access BlockSight.Live and use our API and billing portal (collectively, the \\"Services\\"). We provide data-only access via subscription and/or API and do not provide additional professional services, except basic technical support.","sections":{"controller":{"title":"1) Controller (Data Controller)","companyName":"Blocksight OÜ","registryCode":"Registry code: 17474529","registeredAddress":"Registered address: Vesivärava tn 50-301, Tallinn, 10152, Estonia","emtak":"EMTAK: 63101","registered":"Registered: 02.04.2026","contact":"Contact: privacy@blocksight.live | legal@blocksight.live"},"informationWeCollect":{"title":"2) Information We Collect","intro":"We collect only what is needed to operate the Services:","accountBilling":{"title":"Account & Billing Information (B2B)","item1":"Organization/company name, country, address","item2":"Business identifiers (e.g., company registration number, VAT ID / EIN) if provided","item3":"Billing contact name and email","item4":"Authorized user accounts (name/email)"},"apiSecurity":{"title":"API & Security Data","item1":"Authentication and security events","item2":"API usage logs (timestamps, endpoints, status codes, rate-limit events)","item3":"Technical data such as IP address and user agent (for security and abuse prevention)"},"bitcoinPayment":{"title":"Bitcoin (BTC) Payment Data (if used)","item1":"Invoice identifiers and amounts","item2":"On-chain transaction details needed for reconciliation (e.g., txid, amount received, timestamps, confirmations)","item3":"The unique destination address generated for the invoice","note":"Note: Bitcoin transactions are recorded on a public blockchain and may be publicly visible."},"supportCommunications":{"title":"Support Communications","item1":"Information you provide when contacting us (emails/support messages and attachments, if any)"}},"howWeUse":{"title":"3) How We Use Information","intro":"We use the information to:","item1":"Provide and operate the API and Services","item2":"Authenticate users, manage access, and secure accounts/API keys","item3":"Generate invoices and issue tax invoice/receipt documents (where applicable)","item4":"Detect abuse, enforce rate limits, and troubleshoot incidents","item5":"Communicate with you about support, security, billing, and service updates","item6":"Comply with legal and accounting obligations"},"legalBases":{"title":"4) Legal Bases (GDPR)","intro":"Where GDPR applies, we process personal data based on:","item1":"Contract performance (to provide the Services)","item2":"Legitimate interests (security, abuse prevention, service reliability)","item3":"Legal obligations (accounting/tax and other compliance duties)"},"sharing":{"title":"5) Sharing","noSell":"We do not sell your information.","intro":"We may share information only:","item1":"With service providers that help us operate the Services (e.g., hosting, monitoring, email/support tools), acting on our instructions","item2":"If required by law or valid legal process","item3":"In connection with a corporate transaction (e.g., merger, acquisition), subject to appropriate safeguards"},"internationalTransfers":{"title":"6) International Transfers","content":"If we transfer personal data outside the EEA, we will use appropriate safeguards as required by applicable law (e.g., standard contractual clauses), where applicable."},"dataRetention":{"title":"7) Data Retention","intro":"We retain information only as long as necessary for the purposes above:","item1":"Security/API logs: retained for a limited period for security, monitoring, and abuse prevention","item2":"Billing and accounting records: retained as required by applicable law","item3":"Support communications: retained as needed to handle requests and maintain service quality"},"security":{"title":"8) Security","content":"We use reasonable technical and organizational measures to protect information. You are responsible for protecting your credentials and API keys."},"yourRights":{"title":"9) Your Rights","content":"Depending on applicable law (including GDPR), you may request access, correction, deletion, restriction, objection, and data portability. Contact us at privacy@blocksight.live. You may also have the right to lodge a complaint with a supervisory authority (in Estonia: the Data Protection Inspectorate)."},"changes":{"title":"10) Changes","content":"We may update this Policy from time to time. The \\"Last updated\\" date will reflect the latest version. Continued use of the Services after changes means you accept the updated Policy."},"contact":{"title":"11) Contact","intro":"Privacy requests and questions:","email":"privacy@blocksight.live | legal@blocksight.live","companyName":"Blocksight OÜ","registeredAddress":"Vesivärava tn 50-301, Tallinn, 10152, Estonia","registryCode":"Registry code: 17474529"}}},"accessibility":{"title":"Accessibility Statement","lastUpdated":"Last updated: April 2026","sections":{"commitment":{"title":"Commitment to Accessibility","content":"BlockSight.Live is committed to ensuring digital accessibility for all users, including people with disabilities. We continuously work to improve the usability and accessibility of our website and services across all supported languages."},"compliance":{"title":"Compliance Standard","content":"Our goal is to follow recognized accessibility best practices and relevant international standards, including the Web Content Accessibility Guidelines (WCAG) 2.1 Level AA where applicable. This statement is also provided in alignment with the Israeli Equal Rights for Persons with Disabilities Regulations (Accessibility Adjustments for Services), 5773-2013, which adopts WCAG 2.1 Level AA, and with the spirit of the European Accessibility Act (Directive (EU) 2019/882) for our users in the European Union."},"features":{"title":"Accessibility Features Implemented","intro":"The BlockSight.Live website has been designed with the following accessibility principles in mind:","item1":"Clear semantic HTML structure and consistent navigation","item2":"Proper heading hierarchy across all pages","item3":"High contrast visual design for readability","item4":"Responsive layout compatible with mobile, tablet, and desktop devices","item5":"Support for keyboard navigation across interactive elements","item6":"Compatibility with modern screen readers","item7":"Visible focus indicators on interactive elements","item8":"Language-aware content structure across multiple supported languages","item9":"Avoidance of motion-heavy or flashing elements","item10":"Alternative text for meaningful images and icons"},"limitations":{"title":"Known Limitations","content":"While we strive to ensure accessibility across all parts of the website, some areas may still be undergoing improvement. We continue reviewing and updating the platform to enhance accessibility over time.","thirdParty":"Third-party embedded tools and interactive chart components are currently not used on this website. If they are introduced in the future, they will be reviewed for accessibility compatibility before release."},"feedback":{"title":"Feedback and Contact","content":"If you encounter any accessibility barriers while using BlockSight.Live, or if you need information in an alternative format, we encourage you to contact us:","email":"legal@blocksight.live","followUp":"Please include a description of the issue and the page where it occurred. We will make reasonable efforts to respond and provide assistance."},"scope":{"title":"Scope","content":"This accessibility statement applies to the BlockSight.Live website (blocksight.live). Any companion mobile applications or third-party integrations have their own accessibility considerations under their respective platforms."},"ongoing":{"title":"Ongoing Commitment","content":"Accessibility is an ongoing process. BlockSight.Live regularly reviews its interface and content structure to improve accessibility for users worldwide, including users in the European Union, Israel, and other regions where our services are available."}}}},"contact":{"title":"Contact Us","disclaimer":{"paragraph1":"BlockSight.Live provides information and insights about the Bitcoin network but does not assist with fund recovery, wallet-related issues, or similar matters. For any such concerns, please reach out directly to the service provider involved in your transaction, such as your wallet software or exchange platform.","paragraph2":"Please note that BlockSight.Live does not process Bitcoin transactions. Therefore, we cannot expedite, cancel, or replace pending transactions. If you have questions about a transaction, we recommend contacting the wallet or service provider used to initiate it."},"feedbackForm":{"title":"Feedback Form","content":"We welcome your feedback and suggestions. Please use the form below to share your thoughts, report issues, or ask questions about our services."},"form":{"subject":{"label":"Subject","general":"General Inquiry","api":"API Support","bug":"Report a Bug"},"name":{"label":"Name","placeholder":"Enter your name"},"email":{"label":"Email Address","placeholder":"Enter your email address"},"address":{"label":"Address","placeholder":"Enter your address"},"message":{"label":"Message","placeholder":"Enter your message here..."},"submit":"Submit"}},"api":{"title":"API Subscription","subtitle":"Access real-time Bitcoin blockchain data","placeholder":"API documentation and subscription options will be displayed here","nav":{"overview":"Overview","howItWorks":"How It Works","plans":"Subscription Plans","apiDocs":"API Docs","login":"Log In"},"content":{"hero":{"title":"BlockSight.Live API – Real-Time Bitcoin Data for Builders","subtitle":"Stable, fast, and secure Bitcoin API access for projects, apps, and organizations that need accurate, up-to-date on-chain data.","ctaGetStarted":"Get Started with API","ctaViewDocs":"View API Documentation"},"whyBlocksight":{"title":"Why BlockSight.Live API?","reasons":{"realTimeData":"Real-time Bitcoin network data (blocks, transactions, mempool, fees, congestion, price).","productionWorkloads":"Designed for production workloads and long-running services.","tieredPlans":"Tiered plans for different usage levels — from small projects to enterprise-scale platforms.","bitcoinPayments":"Bitcoin-only payments for maximum transparency and independence."}},"billingNote":"All plans are available with monthly or annual billing — payment in Bitcoin (BTC) only.","pricing":{"annual":"Annual","monthly":"Monthly","yearlyTotal":"yearly total"},"includedFeatures":"Included Features","includesBasicPlus":"Includes Everything in Basic, plus:","includesAllPlus":"Includes Everything in Basic & Advanced, plus:","apiLimits":"API Limits","limits":{"perSecond":"API Calls per Second","perDay":"API Calls per Day","burst":"Burst Capacity","upTo":"Up to","requests":"requests","customConfigurable":"Custom configurable"},"subscribe":"Subscribe","plans":{"basic":{"name":"Basic Plan","features":{"rateLimits":"Increased API rate limits compared to free/public alternatives","priorityHandling":"Priority request handling","smoothIntegration":"Smooth integration with BlockSight.Live","subdomain":"Optional co-branded subdomain: customer.blocksight.live","stablePerformance":"Stable, production-ready system performance"},"suggestedFor":"Suggested for: Small projects, prototypes, internal tools, and low-volume dashboards."},"advanced":{"name":"Advanced Plan","features":{"higherLimits":"Higher rate limits and expanded usage quotas","advancedEndpoints":"Access to advanced endpoints (blocks, dashboards, search, analytics)","customConfig":"Custom feature adjustments and configuration options","fasterPriority":"Faster request prioritization under load","whiteLabel":"White-label ready API domain branding: api.customer.com","enhancedReliability":"Enhanced reliability with priority routing and optimized performance"},"suggestedFor":"Suggested for: Production applications, customer-facing dashboards, and medium–high traffic platforms."},"premium":{"name":"Premium+ Plan","badge":"Recommended","features":{"fullCustomization":"Full customization layer (UI integration, endpoints, branding alignment)","dedicatedSupport":"Direct access to a dedicated support engineer for technical onboarding and optimization","advancedAnalytics":"Advanced analytics and anonymized behavioral insights","flexibleDomains":"Flexible domain options: Co-branded subdomain (customer.blocksight.live), fully custom domain (customer.com), API custom domain (api.customer.com)","highStability":"High-stability environment with premium traffic routing and proactive performance optimization"},"premiumRouting":"Premium routing for sustained high-volume workloads","suggestedFor":"Suggested for: Exchanges, large platforms, financial services, and mission-critical real-time systems."}},"bitcoinPolicy":{"title":"Bitcoin-Only Payment Policy","subtitle":"Bitcoin-Only Payments","intro":"All monthly and annual payments are made exclusively in Bitcoin (BTC). This ensures:","benefits":{"transparency":"Full transparency","secureTransfers":"Secure, censorship-resistant transfers without third-party payment processors","independence":"Independence from traditional banking and card limitations","nativeAlignment":"Native alignment with a decentralized financial ecosystem"}},"funnel":{"title":"How Subscription Works","steps":{"step1":"Sign up and create an Organization","step2":"Add billing details (company + billing email)","step3":"Choose a plan (Monthly/Yearly)","step4":"Generate a BTC invoice (unique address + exact amount)","step5":"Pay BTC — after 1 confirmation the subscription becomes active","step6":"Create an API Key and start using the API","step7":"Use the dashboard to monitor usage, manage keys, download documents","step8":"Upgrade anytime: pay upgrade invoice — upgrade applies immediately","step9":"Renew by paying the renewal invoice before the period ends"}},"apiDocs":{"title":"Full API Documentation","intro":"The BlockSight.Live API provides comprehensive access to Bitcoin blockchain data through REST and WebSocket interfaces.","authentication":{"title":"Authentication","content":"All authenticated requests must include your API key in the X-API-Key header.","example":"X-API-Key: your-api-key-here"},"rateLimits":{"title":"Rate Limits","intro":"Rate limits are enforced per API key and per IP address:","perKey":"Per-key counters: Track requests per second, minute, and day","perIp":"Per-IP limits: Additional protection against abuse","websocket":"WebSocket throttling: Message frequency limits per connection","burst":"Burst capacity: Short-term allowance above steady-state limits"},"rest":{"title":"REST API","baseUrl":"Base URL: https://blocksight.live/api/v1/","endpoints":{"title":"Available Endpoints","address":"GET /address/{address} — Address summary (balance, tx count)","addressTxs":"GET /address/{address}/transactions — Transaction history for address","block":"GET /block?height=... or /block?hash=... — Block data by height or hash","transaction":"GET /transaction?txid=... — Transaction details by ID","price":"GET /price — Current BTC price in multiple currencies","fees":"GET /recommended-fees — Fee estimates for next block and 6h target","congestion":"GET /congestion-load — Network congestion score (1-100)"}},"websocket":{"title":"WebSocket API","url":"WebSocket URL: wss://api.blocksight.live/api/v1/ws","streams":{"title":"Available Streams","blockVisualizer":"Block Visualizer Stream: Real-time block data for visualization","dashboard":"Dashboard Stream: Price, fees, congestion updates","addressTracking":"Address Tracking: Monitor specific addresses for activity","transactionTracking":"Transaction Tracking: Monitor specific transactions for confirmations"},"tracking":{"title":"Tracking Commands","trackAddress":"trackAddress: Monitor a single address (Advanced+)","trackAddresses":"trackAddresses: Monitor multiple addresses (Premium+ only)","trackTransaction":"trackTransaction: Monitor a single transaction (Advanced+)","trackTransactions":"trackTransactions: Monitor multiple transactions (Premium+ only)"}},"tiers":{"title":"Tier Capabilities","feature":"Feature","basic":"Basic","advanced":"Advanced","premium":"Premium+","rest":"REST API","restBasic":"Limited","restAdvanced":"Full","restPremium":"Unrestricted","websocketLabel":"WebSocket","websocketBasic":"Block visualizer only","websocketAdvanced":"+ Dashboard stream","websocketPremium":"All channels","tracking":"Tracking","trackingBasic":"None","trackingAdvanced":"Single address/tx","trackingPremium":"Multi-address/tx"},"errors":{"title":"Error Handling","content":"All API errors follow a standard format with an error code and human-readable message.","format":"Format: { \\"error\\": { \\"code\\": \\"ERROR_CODE\\", \\"message\\": \\"Description\\" } }"},"versioning":{"title":"API Versioning","content":"All endpoints are versioned (e.g., /api/v1/). Breaking changes will be introduced in new versions with a minimum 6-month deprecation notice for previous versions."}},"restApi":{"title":"REST API Reference","intro":"The BlockSight.Live REST API provides programmatic access to Bitcoin blockchain data. All endpoints are versioned under /api/v1/.","baseUrl":"Base URL","authDescription":"All requests must include your API key in the X-API-Key header:","endpoints":"Endpoints","parameters":"Parameters","paramName":"Name","paramLocation":"Location","paramType":"Type","paramRequired":"Required","paramDescription":"Description","curlExample":"cURL Example","response":"Response","errorDescription":"All API errors follow a standard format:","httpCodes":"HTTP Status Codes","rateLimitDescription":"Rate limits are enforced per API key and vary by subscription tier:","versioningDescription":"All endpoints are versioned (e.g., /api/v1/). Breaking changes will be introduced in new versions with a minimum 6-month deprecation notice."},"websocket":{"title":"WebSocket API","intro":"BlockSight.Live exposes a unified WebSocket endpoint for real-time delivery of Bitcoin network data, pricing, and tracking events.","connection":{"title":"Connection Endpoint","requirements":"All WebSocket connections require a valid API Key and an active subscription tier."},"envelope":{"title":"Message Envelope","description":"Every WebSocket message follows a unified envelope structure:","type":"Message category (e.g., block_added, dashboard.update, price_update)","version":"Schema version for the message payload","data":"Channel-specific payload"},"example":{"title":"JavaScript Example"},"streams":{"title":"Available Streams","blockVisualizer":{"title":"Block Visualizer Stream","description":"Real-time block activity stream for visualization.","cap1":"New blocks","cap2":"Mempool → next-block composition","cap3":"Block history updates","cap4":"Future block projections","cap5":"Block metadata changes"},"dashboard":{"title":"Dashboard Stream","description":"Live data for dashboard widgets.","del1":"BTC price","del2":"Congestion gauge","del3":"Fee gauge","del4":"Mempool-based calculator metrics"},"addressTracking":{"title":"Address Tracking","single":"Subscribe to updates for a single Bitcoin address.","multi":"Subscribe to multiple addresses simultaneously."},"transactionTracking":{"title":"Transaction Tracking","single":"Subscribe to updates for a single transaction (txid).","multi":"Subscribe to multiple transactions simultaneously."}},"capabilities":"Capabilities","delivers":"Delivers","exampleMessage":"Example Message","clientToServer":"Client → Server","serverToClient":"Server → Client","tierCapabilities":"Subscription Tier Capabilities","errors":{"title":"Error Responses","description":"When a rate limit is exceeded or an error occurs, the server responds with:"},"rateLimiting":{"title":"Rate Limiting & Abuse Protection","perKey":"Per-key counters","perIp":"Per-IP limits","frequency":"WebSocket message frequency throttling","caps":"Connection caps","abuse":"Automatic detection and temporary suppression of abusive clients"}},"sla":{"title":"API Terms & SLA Agreement","lastUpdated":"Last updated: 2026-03-30","intro":"This API Terms & SLA Agreement (\\"Agreement\\") governs access to and use of the paid BlockSight.Live API services (\\"API\\"). By creating an Organization account, generating an API Key, paying an invoice, or using the API, the customer (\\"Client\\" or \\"you\\") agrees to this Agreement.","sections":{"partiesAndService":{"title":"1) Parties & Service","content":"This Agreement is between Blocksight OÜ (\\"BlockSight\\", \\"we\\", \\"us\\") and the Client. The service is provided via BlockSight.Live.","b2bOnly":"B2B only. The API is offered exclusively to business entities. By accepting this Agreement, you represent that you are acting on behalf of a business and are authorized to bind the Client.","companyDetails":"Company details (for legal notices):","companyName":"Blocksight OÜ","registryCode":"Registry code: 17474529","registeredAddress":"Registered address: Vesivärava tn 50-301, Tallinn, 10152, Estonia","emtak":"EMTAK: 63101","registered":"Registered: 02.04.2026","contact":"Contact: legal@blocksight.live"},"documentPriority":{"title":"2) Document Priority","intro":"These documents work together:","apiAgreement":"This API Agreement governs paid API access, billing, and SLA.","privacyPolicy":"The Privacy Policy governs privacy and data handling.","termsOfService":"The Terms of Service govern general website/service usage.","conflict":"If there is a conflict, the higher-priority document controls for that topic."},"definitions":{"title":"3) Definitions","api":"API – The programmatic interface provided by BlockSight.Live, including REST endpoints and any streaming interfaces (e.g., WebSocket), documentation, and related software.","client":"Client – The business entity using the API.","organization":"Organization – The Client's business account within the Billing Portal.","user":"User – An individual authorized by the Client to access the Organization.","subscriptionTier":"Subscription Tier – A paid plan that defines quotas, rate limits, features, and (if applicable) support/SLA scope.","apiKey":"API Key – A token issued to an Organization used to authenticate API requests.","billingPortal":"Billing Portal – The self-serve interface used to manage subscriptions, invoices, payments, documents, users, and settings.","invoice":"Invoice – A payment request generated by the Billing Portal that includes a unique BTC address, an exact BTC amount, and an expiry time.","confirmations":"Confirmations – On-chain confirmations required before a payment is considered approved and final.","creditBalance":"Credit Balance – An internal credit recorded to an Organization (e.g., from overpayment or payment received after invoice expiry) that may be applied to future invoices under this Agreement.","sla":"SLA – The service level commitments described in Section 9."},"accountUsersAuthorization":{"title":"4) Account, Users, and Authorization","organizationAccount":"4.1 Organization account. API access requires an Organization account in the Billing Portal.","clientResponsibility":"4.2 Client responsibility. The Client is responsible for all activity under its Organization, including actions by its Users.","accurateInformation":"4.3 Accurate information. The Client must provide accurate business/billing information and keep it updated."},"accessAuthentication":{"title":"5) Access & Authentication","paidSubscription":"5.1 Paid subscription required. API access requires an active paid subscription.","apiKeys":"5.2 API Keys. Requests must be authenticated with a valid API Key.","keySecurity":"5.3 Key security. The Client must protect API Keys as confidential credentials and prevent unauthorized use.","keyActions":"5.4 Key actions. BlockSight may revoke, rotate, or require replacement of API Keys if we reasonably believe there is misuse, compromise, or security risk."},"acceptableUse":{"title":"6) Acceptable Use","intro":"The Client must not:","prohibited1":"bypass or attempt to bypass authentication, quotas, rate limits, throttling, or security controls;","prohibited2":"interfere with stability or security (abusive traffic, excessive connections, scanning, attacks);","prohibited3":"use the API for unlawful activities or to facilitate harmful activity;","prohibited4":"redistribute or resell API data or access as a standalone service without prior written permission;","prohibited5":"reverse engineer the API except where prohibited by law.","violation":"Violations may result in suspension or termination."},"tiersQuotasRateLimits":{"title":"7) Tiers, Quotas, Rate Limits","tierLimits":"7.1 Tier limits. Each Subscription Tier has defined quotas, rate limits, and connection caps.","enforcement":"7.2 Enforcement. We may enforce limits via throttling, temporary blocking, or connection caps.","billingPortalControls":"7.3 Billing Portal controls. The Billing Portal is the source of truth for current tiers, quotas, pricing, invoice status, and subscription status.","changes":"7.4 Changes. We may modify tiers, limits, and pricing with prior notice via the Billing Portal or email to the billing contact on file."},"billingPayments":{"title":"8) Billing & Payments (Bitcoin Only)","btcOnly":"8.1 BTC-only. Subscription fees are payable exclusively in Bitcoin (BTC) via the Billing Portal.","invoiceAddress":"8.2 Invoice and unique address. Each Invoice includes a unique BTC address and an exact BTC amount, and is valid only until its expiry time.","exactAmount":"8.3 Exact amount required. Underpayments do not activate, extend, or upgrade service until fully completed.","confirmationsRequired":"8.4 Confirmations required (1 confirmation). A payment is considered approved after at least one (1) on-chain confirmation. We may change the confirmations threshold for risk/security reasons with prior notice.","invoiceExpiry":"8.5 Invoice expiry. If an Invoice expires, the Client must generate a new Invoice to pay.","latePayment":"8.6 Late payment to expired invoice. Payments received to an address associated with an expired Invoice will not automatically activate, extend, or upgrade service. We may record such amounts as Credit Balance to be applied to a new Invoice.","overpayments":"8.7 Overpayments. Overpaid amounts may be recorded as Credit Balance.","noRefunds":"8.8 No refunds. All fees are non-refundable, including for unused time, early termination, downtime, or any downgrade (if offered).","taxesDocuments":"8.9 Taxes & documents. Fees may be subject to applicable taxes (including VAT where applicable). We may issue invoices/receipts and related billing documents via the Billing Portal and/or by email to the billing contact on file.","notices":"8.10 Notices. We may provide billing and policy notices via the Billing Portal or by email to the billing contact on file."},"slaSection":{"title":"9) SLA","availabilityTarget":"9.1 Availability target. We target 99.9% monthly uptime for the API under normal operating conditions.","maintenance":"9.2 Maintenance. Scheduled maintenance will be announced in advance when reasonably possible.","performance":"9.3 Performance. We aim to maintain low-latency responses under normal conditions.","exclusionsIntro":"9.4 Exclusions. The SLA does not apply to outages or degradation caused by:","exclusion1":"Bitcoin network disruptions, reorgs, or network-wide events;","exclusion2":"external services/infrastructure failures (ISPs, hosting providers, DNS, upstream dependencies);","exclusion3":"Client-side misuse, network issues, incorrect implementation, or unauthorized access;","exclusion4":"force majeure events.","serviceCredits":"9.5 Service credits. Unless explicitly agreed in writing, the SLA provides no service credits, refunds, or offsets."},"dataAccuracyLiability":{"title":"10) Data Accuracy, \\"As-Is\\" Service & Liability","asIs":"10.1 As-is. The API and any Bitcoin-related data are provided \\"as is\\" and \\"as available.\\" No guarantee of absolute accuracy, completeness, or timeliness.","noFinancialAdvice":"10.2 No financial advice. We do not provide investment, trading, tax, or legal advice.","limitationOfLiability":"10.3 Limitation of liability. To the maximum extent permitted by law, we are not liable for indirect, incidental, special, consequential, or punitive damages, or for loss of profits, revenue, data, or business interruption arising out of or related to the API.","liabilityCap":"10.4 Liability cap. To the maximum extent permitted by law, our total liability for all claims related to this Agreement will not exceed the fees paid by the Client in the three (3) months preceding the event giving rise to the claim."},"upgradesDowngrades":{"title":"11) Upgrades, Downgrades & Plan Changes","upgradesImmediate":"11.1 Upgrades are immediate. Upgrades take effect immediately after the upgrade Invoice is paid and approved (Confirmations).","noProration":"11.2 No proration, no refunds. No proration or refunds for unused time on the previous tier.","downgrades":"11.3 Downgrades (if offered). If downgrades are offered, timing and effect will be described in the Billing Portal. No refunds apply."},"termRenewalSuspensionTermination":{"title":"12) Term, Renewal, Suspension & Termination","term":"12.1 Term. Subscriptions are monthly or yearly, as selected in the Billing Portal, and run until the end of the paid period.","renewalByPayment":"12.2 Renewal by payment. Renewal occurs upon payment and approval of the renewal Invoice.","nonPayment":"12.3 Non-payment. If renewal payment is not received and approved by the end of the term, we may suspend API access until payment is completed and approved.","terminationByClient":"12.4 Termination by Client. The Client may terminate by ceasing to renew and/or by written notice.","terminationByBlockSight":"12.5 Termination by BlockSight. We may suspend or terminate immediately for security risk, abuse, or breach.","effectOfTermination":"12.6 Effect of termination. Upon termination, API access may be revoked and API Keys may be invalidated."},"intellectualProperty":{"title":"13) Intellectual Property","blockSightIP":"13.1 BlockSight IP. We retain all rights in the API, documentation, and service.","clientIP":"13.2 Client IP. The Client retains ownership of its own systems and data.","feedback":"13.3 Feedback. Feedback may be used by BlockSight without restriction or compensation."},"changesToAgreement":{"title":"14) Changes to This Agreement","content":"We may update this Agreement from time to time. We will post updates on BlockSight.Live and/or provide notice via the Billing Portal or email. Continued API use after changes constitutes acceptance."},"governingLawJurisdiction":{"title":"15) Governing Law & Jurisdiction","content":"This Agreement is governed by the laws of Estonia. The competent courts in Harju County (Tallinn), Estonia shall have exclusive jurisdiction, unless mandatory law provides otherwise."},"contact":{"title":"16) Contact","intro":"For support, legal inquiries, or SLA questions:","email":"legal@blocksight.live","companyName":"Blocksight OÜ","registryCode":"Registry code: 17474529","registeredAddress":"Registered address: Vesivärava tn 50-301, Tallinn, 10152, Estonia"}}},"modal":{"title":"API Terms & SLA Agreement","checkboxLabel":"I have read and agree to the API Terms & SLA Agreement","acceptButton":"Accept & Proceed","cancelButton":"Cancel"},"legal":{"text":"By subscribing to any API plan, you agree to the BlockSight.Live API Terms & SLA Agreement.","slaLink":"View SLA Agreement in Legal section"},"auth":{"intro":"Access your API dashboard to manage keys, view usage, and monitor your subscription.","email":"Email","emailPlaceholder":"you@example.com","password":"Password","rememberMe":"Remember me","forgotPassword":"Forgot password?","verificationCode":"Verification Code","totpHint":"Enter the 6-digit code from your authenticator app, or an 8-character backup code","signingIn":"Signing in...","verify":"Verify","signIn":"Sign In","backToLogin":"← Back to login","orContinueWith":"or continue with","noAccount":"Don't have an account?","subscribe":"Subscribe to a plan","oauth":{"github":"GitHub","google":"Google","apple":"Apple"},"errors":{"emailRequired":"Email is required","emailInvalid":"Invalid email format","passwordRequired":"Password is required","codeRequired":"Verification code is required","codeInvalid":"Enter a 6-digit code or 8-character backup code","networkError":"Network error. Please try again.","invalidCredentials":"Invalid email or password","invalidCode":"Invalid verification code"}}}},"faq":{"title":"FAQ","tagline":"Frequently Asked Questions","categories":{"bitcoinFundamentals":{"title":"Bitcoin Fundamentals","items":{"whatIsBitcoin":{"q":"What is Bitcoin?","a":"Bitcoin is a decentralized digital currency that operates without banks, governments, or intermediaries. It was created in 2009 by an anonymous person or group known as Satoshi Nakamoto. Bitcoin allows anyone, anywhere in the world, to send and receive value directly, without asking permission from any institution. There will only ever be 21 million bitcoin. No one can print more, change the rules, or shut it down."},"whatIsBlockchain":{"q":"What is a blockchain?","a":"A blockchain is a shared, append-only ledger that records transactions in a verifiable order. Instead of relying on a single central database, thousands of independent computers (nodes) around the world maintain the same history. Every transaction ever made on Bitcoin is recorded on this chain. No single entity controls it, and altering past records is practically impossible."},"whatIsBitcoinBlockchain":{"q":"What is the Bitcoin blockchain?","a":"The Bitcoin blockchain is the public ledger that stores every Bitcoin transaction ever made. New data is added in blocks, each cryptographically linked to the previous one, forming a continuous chain of verified records stretching back to January 3, 2009."},"whoControls":{"q":"Who controls Bitcoin?","a":"No one. That's the point. Bitcoin is maintained by a global network of nodes and miners running open-source software. There is no CEO, no company, no board of directors. Changes to the protocol require broad consensus among participants. This makes Bitcoin the only truly decentralized monetary network in existence."},"whatIsSatoshi":{"q":"What is a satoshi?","a":"A satoshi (sat) is the smallest unit of bitcoin. One bitcoin equals 100,000,000 satoshis. You don't need to buy a whole bitcoin. You can own and send fractions as small as 1 sat. Think of satoshis like cents to a dollar, except there are 100 million of them per bitcoin."},"isLegal":{"q":"Is Bitcoin legal?","a":"In most countries, yes. Bitcoin is legal to buy, hold, and use in the vast majority of jurisdictions worldwide. Regulations vary by country. Some countries have embraced Bitcoin (like El Salvador, which made it legal tender), while a small number have restricted or banned it. Always check your local laws."},"isAnonymous":{"q":"Is Bitcoin anonymous?","a":"Bitcoin is pseudonymous, not anonymous. Transactions are recorded on a public blockchain and can be viewed by anyone. Addresses are not directly linked to real-world identities, but with enough analysis, patterns can sometimes be traced. Privacy on Bitcoin requires deliberate effort and specific techniques."},"whatGivesValue":{"q":"What gives Bitcoin its value?","a":"Scarcity (only 21 million will ever exist), decentralization (no one can manipulate it), security (the most powerful computing network on earth protects it), and utility (it can be sent anywhere, anytime, without permission). Bitcoin's value comes from the same place any money's value comes from: people agreeing it has value. The difference is that Bitcoin's properties are enforced by mathematics, not by trust in institutions."}}},"howBitcoinWorks":{"title":"How Bitcoin Works","items":{"whatIsTransaction":{"q":"What is a Bitcoin transaction?","a":"A Bitcoin transaction is a transfer of value from one address to another, broadcast to the network and recorded on the blockchain. Every transaction specifies inputs (where the bitcoin is coming from) and outputs (where it's going). Once confirmed in a block, the transaction is permanent and irreversible."},"confirmedVsUnconfirmed":{"q":"What is the difference between confirmed and unconfirmed transactions?","a":"Unconfirmed transactions have been broadcast to the network but are not yet included in a block. They sit in the mempool, waiting for a miner to include them. Depending on network congestion and the fee rate paid, confirmation can take minutes or significantly longer. Confirmed transactions are included in a mined block. Additional confirmations accumulate as more blocks are built on top of that block. Generally, 1 confirmation is sufficient for small amounts, and 6 confirmations is considered highly secure."},"whatIsMempool":{"q":"What is the mempool?","a":"The mempool (memory pool) is a waiting area where unconfirmed transactions sit before being included in a block. Every Bitcoin node maintains its own mempool. When you send a transaction, it enters the mempool and waits for a miner to pick it up. Think of it as a queue. Higher-fee transactions generally get picked first."},"whatIsBlock":{"q":"What is a Bitcoin block?","a":"A block is a bundle of transactions that a miner has verified and added to the blockchain. Each block contains a set of transactions, a reference to the previous block, a timestamp, and a proof-of-work solution. A new block is found approximately every 10 minutes on average, though the actual time varies."},"whatIsAddress":{"q":"What is a Bitcoin address?","a":"A Bitcoin address is a string of characters that represents a destination for a Bitcoin payment. It's like a bank account number, except anyone can generate one without asking permission, and you can create as many as you want. Modern Bitcoin addresses start with 'bc1' (these are called native SegWit or bech32 addresses) and are the most efficient format."},"whatIsPrivateKey":{"q":"What is a private key?","a":"A private key is a secret number that proves ownership of the bitcoin associated with an address. Whoever holds the private key controls the funds. Private keys must never be shared with anyone. If someone else obtains your private key, they can take your bitcoin. If you lose your private key and have no backup, your bitcoin is gone permanently."},"whatIsSeedPhrase":{"q":"What is a seed phrase?","a":"A seed phrase (also called a recovery phrase or mnemonic) is a set of 12 or 24 words that represents your private keys. It is generated when you create a wallet and serves as the master backup for all your funds. Write it down on paper. Store it somewhere safe. Never type it into a website. Never share it with anyone. Your seed phrase IS your bitcoin."}}},"miningNetwork":{"title":"Bitcoin Mining & Network","items":{"whatIsMining":{"q":"What is Bitcoin mining?","a":"Mining is the process of selecting unconfirmed transactions from the mempool, packaging them into a block, and competing to add that block to the blockchain. Miners use specialized hardware to solve a cryptographic puzzle (proof-of-work). The first miner to find a valid solution wins the right to add the block. The winner earns the block subsidy (newly created bitcoin) plus all transaction fees included in that block."},"whatArePools":{"q":"What are mining pools?","a":"Mining pools are groups of miners who combine their computing power (hashpower) to reduce variance and receive steadier payouts. Solo mining is like playing the lottery alone. Pool mining is like joining a syndicate. When the pool finds a block, rewards are distributed to participants according to their contributed work."},"whatIsSubsidy":{"q":"What is the block subsidy?","a":"The block subsidy is the amount of new bitcoin created with each block. It started at 50 BTC per block in 2009. Every 210,000 blocks (approximately every 4 years), it cuts in half. This event is called the 'halving.' As of 2024, the subsidy is 3.125 BTC per block. This predictable, decreasing issuance schedule is how Bitcoin's 21 million supply cap is enforced."},"whatIsHalving":{"q":"What is the halving?","a":"The halving is a built-in event that cuts the block subsidy in half approximately every 4 years. It reduces the rate at which new bitcoin enters circulation. The most recent halving occurred in April 2024, reducing the subsidy from 6.25 to 3.125 BTC per block. Halvings will continue until approximately the year 2140, when all 21 million bitcoin will have been mined."},"emptyBlocks":{"q":"What are empty blocks and why do they occur?","a":"Empty blocks occur when a mining pool learns that a new block was found but has not yet received and validated the full transaction list. The pool knows the next block height and can start mining immediately, but cannot safely select transactions yet, so it mines on an empty template containing only the coinbase transaction. If a valid hash is found during this brief interval, an empty block is published."},"blockTimestamps":{"q":"Why don't block timestamps always increase in order?","a":"Bitcoin has no centralized time source. The protocol does not require a block's timestamp to be later than the previous block's. The only requirement is that the timestamp is not earlier than the median timestamp of the previous 11 blocks. In practice, block timestamps can vary by up to about an hour, which means blocks can occasionally appear out of chronological order."}}},"transactionsFees":{"title":"Bitcoin Transactions & Fees","items":{"whatAreFees":{"q":"What are transaction fees?","a":"Transaction fees are small amounts of bitcoin paid to miners as an incentive to include your transaction in a block. Fees are not fixed. They fluctuate based on network demand. When more people want to transact, fees rise. When the network is quiet, fees drop. Fees are measured in satoshis per virtual byte (sats/vB)."},"whatAreVirtualBytes":{"q":"What are virtual bytes (vB)?","a":"Virtual bytes (vB) are a unit of measurement used in Bitcoin to calculate the size of a transaction for fee purposes. Miners prioritize transactions based on their fee rate in sats/vB. A smaller transaction in virtual bytes requires a lower fee to get confirmed. This unit standardizes fee calculations and ensures fair pricing for block space."},"whyStuck":{"q":"Why is my transaction stuck?","a":"Most 'stuck' transactions are delayed because their fee rate is lower than other transactions competing for limited block space. When the mempool is congested, miners prioritize higher-fee transactions. Your transaction will eventually confirm when congestion drops, unless the mempool clears it (typically after 2 weeks). BlockSight.Live can show you network conditions and where your transaction sits relative to others, but it cannot modify or accelerate a transaction."},"howSpeedUp":{"q":"How can I speed up my Bitcoin transaction?","a":"Confirmation speed depends on fee rate and current congestion. Some wallets support Replace-By-Fee (RBF), which lets you rebroadcast the transaction with a higher fee. Other wallets support Child-Pays-For-Parent (CPFP), where a new transaction with a high fee incentivizes miners to confirm both. Check your wallet's documentation for these features."},"howAvoidSlow":{"q":"How can I avoid slow confirmations?","a":"Check current fee conditions before sending and choose a fee rate that matches your urgency. The BlockSight.Live dashboard shows recommended fee levels in real time. If your wallet supports fee-bumping (RBF), enable it before sending so you have the option to increase fees later if needed."},"canCancel":{"q":"Can I cancel a Bitcoin transaction?","a":"Once a Bitcoin transaction is confirmed in a block, it is permanent and irreversible. If a transaction is still unconfirmed and your wallet supports RBF, you may be able to replace it with a new transaction (effectively redirecting the funds back to yourself). There is no 'undo' button on the Bitcoin network."}}},"selfCustody":{"title":"Self-Custody & Security","items":{"whatIsSelfCustody":{"q":"What is self-custody?","a":"Self-custody means you hold your own private keys. When your bitcoin is on an exchange, the exchange controls the keys. 'Not your keys, not your coins' is a core principle of Bitcoin. Self-custody means no one can freeze your funds, deny your access, or lose your money through their own mismanagement. It also means you are fully responsible for security."},"whatIsWallet":{"q":"What is a Bitcoin wallet?","a":"A Bitcoin wallet is software (or hardware) that manages your private keys and lets you send and receive bitcoin. A wallet does not actually 'store' bitcoin. Bitcoin always lives on the blockchain. Your wallet stores the keys that prove you own it."},"hotVsCold":{"q":"What is the difference between a hot wallet and a cold wallet?","a":"A hot wallet is connected to the internet (like a mobile app). It's convenient for everyday use but more exposed to potential threats. A cold wallet (like a hardware device) stores keys offline and is considered more secure for long-term storage. Most people use a combination: hot wallet for spending, cold wallet for savings."},"howKeepSafe":{"q":"How do I keep my bitcoin safe?","a":"Write your seed phrase on paper and store it in a secure physical location. Never digitally. Never share your seed phrase or private keys with anyone, for any reason. Use a reputable self-custody wallet. Enable biometric authentication on your wallet if available. Be cautious of phishing. No legitimate service will ever ask for your seed phrase. Consider a hardware wallet for larger amounts."}}},"blocksightLive":{"title":"BlockSight.Live","items":{"whatIs":{"q":"What is BlockSight.Live?","a":"BlockSight.Live is a real-time Bitcoin blockchain explorer. It lets you watch the Bitcoin network as it operates: blocks being mined, transactions being confirmed, fees shifting, congestion rising and falling. It is a read-only window into the Bitcoin network, focused exclusively on Bitcoin."},"whatCanIDo":{"q":"What can I do on BlockSight.Live?","a":"Watch blocks arrive in real time with live confirmation countdowns. Monitor network congestion and fee conditions on the dashboard. Search any Bitcoin address or transaction. View recommended fee levels for sending transactions. Track Bitcoin price in USD and your local currency. Explore Monica Bitcoin Metrics, five original indicators that make on-chain data easier to understand."},"whatAreMonicaMetrics":{"q":"What are Monica Bitcoin Metrics?","a":"Monica Bitcoin Metrics are a set of five original indicators created by BlockSight.Live. They reframe existing blockchain information into signals that are easier to understand: Bitcoin Velocity Pressure (BVP), Real Usage Ratio (RUR), Fee Pain Index (FPI), Trustless Throughput Score (TTS), and Economic Density Index (EDI). Core Network Metrics show what is happening. Monica Metrics help explain what it means."},"whatIsCongestion":{"q":"What is the Congestion Gauge?","a":"The Congestion Gauge displays the real-time congestion level on the Bitcoin network. It is divided into four categories: Below Average (Green) for low activity, Average (Light Green) for normal activity, Congestion (Orange) for high activity with potential delays, and Extreme Congestion (Red) for heavily congested conditions with long confirmation times and higher fees."},"whatIsFeeGauge":{"q":"What is the Fee Gauge?","a":"The Fee Gauge shows recommended fee levels in sats/vB based on real-time analysis of unconfirmed transactions. Next block fee is the fee needed for a high chance of inclusion in the very next block. 6-hour fee is a lower fee based on recent block analysis, suitable for non-urgent transactions."},"doesProcessTx":{"q":"Does BlockSight.Live process transactions?","a":"No. BlockSight.Live is a read-only data tool. We do not process, send, receive, expedite, cancel, or modify Bitcoin transactions. We do not hold funds. We do not offer financial advice. For transaction-related help, contact the wallet or exchange you used."},"isAffiliated":{"q":"Is BlockSight.Live affiliated with Bitcoin Core or any exchange?","a":"No. BlockSight.Live is an independent service operated by Blocksight OÜ. We are not affiliated with Bitcoin Core, any mining pool, exchange, wallet provider, or third-party platform."},"languages":{"q":"What languages does BlockSight.Live support?","a":"BlockSight.Live displays Bitcoin price in both USD and the local fiat currency based on your selected language. The dashboard adapts to your language preference. We are continuously expanding language support."}}},"tzurWallet":{"title":"TZUR Wallet","items":{"whatIs":{"q":"What is TZUR?","a":"TZUR (pronounced 'tsoor', from the Hebrew word for 'rock') is a self-custody Bitcoin wallet built natively for iOS. It is designed for security, simplicity, and accessibility in your own language."},"whatMakesDifferent":{"q":"What makes TZUR different from other Bitcoin wallets?","a":"TZUR is built for the non-English-speaking world. Most Bitcoin wallets are designed in English and translated as an afterthought. TZUR is different. It supports Hebrew, Spanish, Portuguese, Russian, Traditional Chinese, and more languages are being added continuously. Each language is carefully localized, not just translated. TZUR is also Bitcoin-only. No altcoins. No tokens. No distractions."},"isSafe":{"q":"Is TZUR safe?","a":"TZUR is built with security as the first priority. Self-custody: you hold your own keys. We never have access to your funds. Seed phrases are stored in the iOS Secure Enclave, never in plaintext. Private keys exist in memory only during transaction signing and are cleared immediately after. All transaction signing happens locally on your device. Native SegWit (bech32) addresses for maximum efficiency and security. BIP-39, BIP-32, and BIP-84 compliant."},"whyIOS":{"q":"Why is TZUR iOS only?","a":"By design. iOS provides hardware-level security features (Secure Enclave) that TZUR relies on to protect your keys. Starting with one platform done right is a deliberate choice, not a limitation. Android support is planned for a future phase."},"canRestore":{"q":"Can I restore my TZUR wallet on another device?","a":"Yes. Your 12-word seed phrase is the master backup for your wallet. As long as you have your seed phrase, you can restore your wallet on any BIP-39/BIP-84 compatible wallet, not just TZUR. Your bitcoin is never locked to one app."},"lightning":{"q":"Does TZUR support Lightning Network?","a":"Not in the current version. TZUR focuses on on-chain Bitcoin transactions with full self-custody. Lightning support may be considered in a future release."},"isFree":{"q":"How much does TZUR cost?","a":"TZUR Wallet is a one-time purchase of $59.99 on the App Store. There are no subscriptions, no monthly fees, and no in-app purchases. You pay once and receive all future updates, security improvements, and new features at no extra cost. This pricing model reflects the product philosophy: TZUR is a tool you own, not a service you rent. Network fees for Bitcoin transactions are separate and go to Bitcoin miners, not to TZUR. The wallet does not take any cut or add any markup to transaction fees."},"connection":{"q":"What is the connection between TZUR and BlockSight.Live?","a":"Both are part of the BlockSight ecosystem, built by the same team at Blocksight OÜ. BlockSight.Live lets you see the Bitcoin network. TZUR lets you use it. They are complementary tools designed to make Bitcoin accessible."}}},"support":{"title":"Support","items":{"helpWithTx":{"q":"I need help with a transaction. Can BlockSight.Live help?","a":"BlockSight.Live can show you the status and details of any transaction on the Bitcoin network. However, we cannot modify, cancel, or speed up transactions. For transaction-related assistance, contact the wallet or exchange that created the transaction."},"howContact":{"q":"How do I contact the team?","a":"Email: legal@blocksight.live. X/Twitter: @BlockSight_Live. For TZUR wallet: visit tzur.live."}}}}},"docs":{"title":"Documentation","tagline":"BlockSight.Live – Your Guide to the Bitcoin Network","disclaimer":{"paragraph1":"BlockSight.Live provides information and insights about the Bitcoin network. It does not assist with fund recovery, wallet-related issues, or similar matters. For any such concerns, contact the service provider involved in your transaction, such as your wallet software or exchange platform.","paragraph2":"BlockSight.Live does not process Bitcoin transactions. We cannot expedite, cancel, or replace pending transactions. If you have questions about a transaction, contact the wallet or service provider used to initiate it."},"whatIsBlocksight":{"title":"What is BlockSight.Live?","content":"BlockSight.Live is a real-time Bitcoin blockchain explorer. It provides clear visibility into on-chain activity and network behavior as it happens. The platform transforms blockchain data into practical insights, with a dedicated focus on Bitcoin only."},"whatIsExplorer":{"title":"What is a Bitcoin explorer?","content":"A Bitcoin explorer is a tool that lets you search and view information on the Bitcoin blockchain: transaction history, wallet balances, block details, and network activity, all in real time. It is an essential resource for anyone who wants to track transactions, verify confirmations, or understand the current state of the Bitcoin network."},"visualization":{"title":"Block Visualization","subtitle":"Overview","overview":"BlockSight.Live provides an interactive, real-time visualization of the Bitcoin blockchain with continuous updates and an intuitive interface for exploring on-chain activity as it unfolds.","coreFeatures":{"title":"Block Metrics","blockMetrics":{"title":"Block Metrics","description":"Each block displays the following data:","blockNumber":"Block Number: Identifies the block within the chain.","feeRange":"Fee Range: The range of transaction fees included in the block.","timestamp":"Timestamp: Displayed as a precise date and time, or as a live-updating clock.","txCount":"Transaction Count: The total number of transactions included in the block."}},"colorCodes":{"title":"Color-Coded Status Indicators","orange":"Orange: Unconfirmed blocks in the mempool (queue).","red":"Red: The next block awaiting confirmation.","lightPurple":"Light Purple: The last confirmed block.","darkPurple":"Dark Purple: Previously confirmed blocks."},"unconfirmedBlocks":{"title":"Unconfirmed Blocks","content":"Each unconfirmed block includes an estimated time to confirmation, displayed dynamically in minutes or hours."},"nextBlock":{"title":"Next Block Confirmation Countdown","content":"A live countdown timer reflects the expected time to confirmation. Visual cues provide context and highlight any delays in block production."},"lastConfirmed":{"title":"Last Confirmed Block","content":"Displays the elapsed time since confirmation using a live clock. If delays occur, the interface adapts to flag potential issues."},"historical":{"title":"Historical Confirmation Data","content":"Confirmed blocks show elapsed confirmation time. If more than 24 hours have passed, the exact date and time of confirmation are displayed instead."},"alerts":{"title":"Block Discovery Alerts","content":"Real-time notifications trigger when a new block is found. This includes both audio and visual alerts showing the block number and key metrics."}},"dashboard":{"title":"Dashboard","intro":"The BlockSight.Live dashboard provides a consolidated view of real-time network and market indicators:","bulletPrice":"Bitcoin Price in USD, with a parallel value in the local fiat currency associated with the user's selected site language. For example, users browsing in Hebrew will see both USD and ILS values.","bulletCongestion":"Congestion Gauge reflecting current network load.","bulletFee":"Fee Gauge showing recommended fee levels in sats/vB for transactions targeting the next block or a broader confirmation window.","outro":"Together, these elements provide a continuously updated snapshot of market conditions and network activity."},"congestionGauge":{"title":"Bitcoin Congestion Gauge","content":"The Bitcoin Congestion Gauge displays the real-time congestion level on the Bitcoin network. It analyzes the number of pending transactions, estimated confirmation time, and other key parameters. The gauge is always visible on the main dashboard.","categories":{"title":"The gauge is divided into four categories:","belowAverage":"Below Average (Green): Low activity. The network is not congested.","average":"Average (Light Green): Normal activity. Transactions confirm in a reasonable time.","congestion":"Congestion (Orange): High activity. Delays in confirmation may occur.","extreme":"Extreme Congestion (Red): The network is heavily congested, with long confirmation times and higher fees."}},"virtualBytes":{"title":"Virtual Bytes (vB)","content":"Virtual bytes (vB) are a unit of measurement used in Bitcoin to calculate transaction size for fee purposes. Miners prioritize transactions based on their fee rate, measured in satoshis per vB (sats/vB). The smaller the transaction in virtual bytes, the lower the fee required to include it in a block. This unit standardizes fee calculations and ensures fair pricing for block space."},"feeGauge":{"title":"Fee Gauge","content":"Fees on the BlockSight.Live Fee Gauge are calculated using real-time data from the Bitcoin blockchain. The system analyzes the current state of unconfirmed transactions to provide fee recommendations in sats/vB. These recommendations target inclusion in the next block or within subsequent blocks, depending on network congestion.","display":{"title":"How fees are displayed","intro":"Fees are presented in two categories:","nextBlock":"Fee for confirmation in the next block: The fee required to significantly increase the likelihood of inclusion in the upcoming block.","sixHours":"Fee for confirmation within the next 6 hours: Based on an analysis of low fees in the last 10 blocks. A balanced option for non-urgent transactions."}},"calculator":{"title":"Bitcoin Calculator","content":"The Bitcoin calculator performs real-time conversions between Bitcoin and two fiat currencies (such as USD and ILS) using the latest exchange rates. Users can convert values into Bitcoin and sats. The calculator is integrated into the dashboard and accessible with a single click."},"emptyBlocks":{"title":"Bitcoin Empty Blocks","content":"Empty blocks occur when a mining pool learns that a new block was found but has not yet received and validated the full transaction list. The pool knows the next block height and can start mining immediately, but cannot safely select transactions yet, so it mines on an empty template containing only the coinbase transaction. If a valid hash is found during this brief interval, an empty block is published. Otherwise, the pool switches to a normal full template once the previous block is fully validated."},"blockTimestamps":{"title":"Block Timestamps","content":"Bitcoin has no centralized time source. The protocol does not require a block's timestamp to be later than the previous block's. The only requirement is that the timestamp is not earlier than the median timestamp of the previous 11 blocks. In practice, block timestamps can vary by up to about an hour, which can result in blocks appearing out of chronological order."},"metrics":{"title":"Metrics","intro":"BlockSight.Live displays two categories of metrics:","bulletCore":"Core Network Metrics are direct, unopinionated measurements of Bitcoin activity.","bulletMonica":"Monica Bitcoin Metrics are derived indicators designed to improve intuition and understanding.","allCalculated":"All metrics are calculated from live on-chain data.","coreMetrics":{"title":"Core Network Metrics","description":"Core Network Metrics present raw measurements of Bitcoin network activity without interpretation:","txLast24h":"Transactions (Last 24 Hours)","avgTxPerHour":"Average Transactions per Hour","btcSent24h":"Bitcoins Sent (Last 24 Hours)","btcSentAvgPerHour":"Bitcoins Sent (Average per Hour)","avgTxValue":"Average Transaction Value","medianTxValue":"Median Transaction Value","avgTxFee":"Average Transaction Fee","medianTxFee":"Median Transaction Fee"},"monicaMetrics":{"title":"Monica Bitcoin Metrics","description":"Monica Bitcoin Metrics are a set of original, derived indicators created by BlockSight.Live to make Bitcoin's on-chain activity easier to understand at a glance. They do not introduce new data. Instead, they reframe existing blockchain information into signals that reflect usage, friction, and economic weight.","bvp":{"title":"1. Bitcoin Velocity Pressure (BVP)","calculation":"How it's calculated: Bitcoin sent in the last 24 hours divided by total circulating Bitcoin supply.","significance":"Why it matters: This metric shows how much of Bitcoin's supply is actively moving. Lower values suggest accumulation or long-term holding, while higher values indicate redistribution or heightened activity."},"rur":{"title":"2. Real Usage Ratio (RUR)","calculation":"How it's calculated: Median transaction value divided by average transaction value.","significance":"Why it matters: This reveals whether transaction activity is driven by typical users or skewed by a small number of large transfers."},"fpi":{"title":"3. Fee Pain Index (FPI)","calculation":"How it's calculated: Median transaction fee divided by median transaction value.","significance":"Why it matters: By expressing fees relative to transaction size, this metric reflects how costly fees feel to a typical user on the network."},"tts":{"title":"4. Trustless Throughput Score (TTS)","calculation":"How it's calculated: Total USD value settled in the last 24 hours divided by the number of transactions.","significance":"Why it matters: This highlights Bitcoin's role as a trustless settlement network by showing how much value is moved per transaction."},"edi":{"title":"5. Economic Density Index (EDI)","calculation":"How it's calculated: Total USD value settled in the last 24 hours divided by the number of blocks mined in that same period.","significance":"Why it matters: Blocks are scarce settlement units. This metric shows how much economic weight each block carries."}},"usingMetrics":{"title":"Using These Metrics","content":"Core Network Metrics show what is happening on the Bitcoin network. Monica Bitcoin Metrics help explain what it means. Together, they allow BlockSight.Live users to observe Bitcoin activity with greater clarity and context, in real time."}},"faq":{"title":"Frequently Asked Questions","whatIsBlockchain":{"question":"What is a Blockchain?","answer":"A blockchain is a shared, append-only ledger that records transactions in a verifiable order. Instead of relying on a single central database, many independent nodes maintain the same history, making it extremely difficult to alter retroactively."},"whatIsBitcoinBlockchain":{"question":"What is the Bitcoin Blockchain?","answer":"The Bitcoin blockchain is the public ledger that stores Bitcoin's transaction history. New data is added in blocks, each cryptographically linked to the previous one, forming a continuous chain of verified records."},"confirmedVsUnconfirmed":{"question":"What is the difference between confirmed and unconfirmed transactions?","answer":"Unconfirmed transactions have been broadcast to the network but are not yet included in a block. Depending on network congestion and the fee rate paid, confirmation can take minutes or significantly longer. Confirmed transactions are included in a mined block. Additional confirmations accumulate as more blocks are built on top of that block."},"whyNotConfirming":{"question":"Why isn't my transaction confirming?","answer":"Most \\"stuck\\" transactions are delayed because their fee rate is lower than other transactions competing for limited block space. When the mempool is congested, miners generally prioritize higher-fee transactions. BlockSight.Live can show network conditions and where your transaction sits, but it can't modify or accelerate a transaction. For hands-on help, contact the wallet or service that created it (your wallet app or exchange)."},"speedUpTransaction":{"question":"How can I speed up my Bitcoin transaction confirmation?","answer":"Confirmation speed is driven mainly by fee rate and current congestion. Some wallets support fee-bumping features that can increase a transaction's effective fee rate after broadcast. For step-by-step guidance, use your wallet/exchange support, since BlockSight.Live is a read-only network data tool."},"reduceSlowConfirmations":{"question":"How can I reduce the risk of slow confirmations next time?","answer":"Check current fee conditions before sending and choose a fee rate that matches your urgency. If your wallet supports fee-bumping options, enabling them can provide flexibility if network conditions change after you broadcast. You can also reference the fee estimates shown on the BlockSight.Live dashboard before sending."},"whatIsMining":{"question":"What is Bitcoin mining?","answer":"Mining is the process of selecting unconfirmed transactions, packaging them into a block, and adding that block to the Bitcoin blockchain. Miners compete to produce the next valid block; the winner earns the block subsidy (newly issued bitcoin) plus the transaction fees included in that block."},"whatAreMiningPools":{"question":"What are mining pools?","answer":"Mining pools are groups of miners who combine their hashpower to reduce variance and receive steadier payouts. When the pool finds a block, rewards are distributed to participants according to their contributed work."}},"nav":{"whatIsBlocksight":"BlockSight.Live","whatIsExplorer":"Bitcoin Explorer","visualization":"Visualization","dashboard":"Dashboard","congestionGauge":"Congestion Gauge","virtualBytes":"Virtual Bytes","feeGauge":"Fee Gauge","calculator":"Calculator","emptyBlocks":"Empty Blocks","metrics":"Metrics","blockTimestamps":"Block Timestamps","faq":"FAQ"}},"tzur":{"title":"TZUR Wallet","hero":{"title":"Bitcoin in Your Language","subtitle":"The first Bitcoin wallet with native-language seed phrases, a built-in blockchain explorer, and a fully localized interface. Built by the BlockSight team.","appStore":"Download on the App Store","visitSite":"Visit tzur.live","screenshotAlt":"TZUR Wallet dashboard showing Bitcoin balance"},"whatIs":{"title":"What is TZUR?","paragraph1":"TZUR (Hebrew: צור, \\"rock/flint\\") is a self-custody Bitcoin wallet built natively for iOS. It is the first Bitcoin wallet to generate and display BIP-39 seed phrases in the user's native language.","paragraph2":"TZUR is built by the same team behind BlockSight.Live. One product lets you see the Bitcoin network. The other lets you interact with it. Together, they form a complete Bitcoin toolkit."},"whyExists":{"title":"Why TZUR Exists","paragraph1":"Six billion people don't speak English as a first language. Most Bitcoin wallets force users to write down a 12-word recovery phrase in English. If you don't understand the words, you can't verify them. If you can't verify them, you can't trust them.","paragraph2":"TZUR solves this. 22 languages. Same BIP-39 standard. Full compatibility with every other wallet that follows the protocol."},"pricing":{"title":"One Purchase. Yours Forever.","description":"TZUR Wallet is a one-time purchase of $59.99 on the App Store. There are no subscriptions, no monthly fees, and no in-app purchases. You pay once and receive all future updates, security improvements, and new features at no extra cost. This pricing model reflects the product philosophy: TZUR is a tool you own, not a service you rent. Network fees for Bitcoin transactions are separate and go to Bitcoin miners, not to TZUR. The wallet does not take any cut or add any markup to transaction fees."},"standards":{"title":"Built on Open Standards","headerStandard":"Standard","headerPurpose":"Purpose","bip39":"Mnemonic seed phrases (22 languages)","bip32":"Hierarchical deterministic key derivation","bip84":"Native SegWit address generation (bech32)","bip125":"Replace-by-fee (RBF) transaction replacement","bip21":"Bitcoin payment URI format","addressTypes":"TZUR sends to all Bitcoin address types: P2PKH (1...), P2SH (3...), P2WPKH (bc1q...), and P2TR (bc1p...)."},"selfCustody":{"title":"Self-Custody. No Exceptions.","keysOnDevice":"Private keys are generated on your device. No server ever sees them.","localSigning":"Transactions are signed locally. Nothing is shared with external services.","noAccounts":"No accounts. No registration. No personal data collected.","seedBackup":"Your seed phrase is your only backup. TZUR cannot recover it for you.","disclaimer":"This is not a custodial service. This is software that gives you direct access to the Bitcoin network."},"languages":{"title":"22 Languages","list":"English, Hebrew, Spanish, Portuguese, Russian, German, French, Turkish, Arabic, Japanese, Chinese (Simplified), Chinese (Traditional), Hindi, Indonesian, Vietnamese, Korean, Thai, Malay, Italian, Filipino, Dutch, Farsi.","scope":"Every screen, every label, every legal document. Not just the seed phrase."},"currencies":{"title":"75 Fiat Currencies","intro":"View your Bitcoin balance in any of 75 fiat currencies. Choose up to three at the same time.","americas":{"title":"Americas","list":"USD, CAD, MXN, BRL, ARS, CLP, COP, PEN, UYU, BOB, PYG, VES, CRC, DOP, GTQ, HNL, NIO, PAB, JMD, TTD, BBD, BZD, GYD, SRD, HTG"},"europe":{"title":"Europe","list":"EUR, GBP, CHF, SEK, NOK, DKK, PLN, CZK, HUF, RON, BGN, HRK, RSD, UAH, GEL, MDL, ALL, MKD, BAM, ISK"},"middleEastAfrica":{"title":"Middle East & Africa","list":"ILS, TRY, AED, SAR, QAR, KWD, BHD, OMR, JOD, EGP, MAD, TND, ZAR, NGN, KES, GHS, TZS, UGX, ETB, XOF"},"asiaPacific":{"title":"Asia-Pacific","list":"JPY, CNY, INR, KRW, TWD, HKD, SGD, THB, MYR, IDR, PHP, VND, PKR, BDT, LKR, NPR, MMK, KHR, LAK, AUD, NZD, FJD, PGK, MNT, KZT"},"source":"Live exchange rates from CoinGecko and Coinbase with offline fallbacks."},"blocksightInside":{"title":"BlockSight Inside","paragraph1":"TZUR includes a built-in BlockSight.Live explorer tab. Search any transaction, address, or block height without leaving the wallet. Tap any value in your transaction history to see it live on the blockchain.","paragraph2":"The same explorer. The same data. Inside your wallet.","screenshotAlt":"TZUR built-in BlockSight explorer tab"},"themes":{"title":"7 Visual Themes","headerTheme":"Theme","headerDescription":"Description","light":{"name":"Light","description":"Clean, bright interface"},"dark":{"name":"Dark","description":"Low-light optimized"},"bitcoinOrange":{"name":"Bitcoin Orange","description":"Classic Bitcoin palette"},"midnightBlue":{"name":"Midnight Blue","description":"Deep ocean tones"},"blocksight":{"name":"BlockSight.Live","description":"Galaxy explorer with animated starfield"},"satoshisRose":{"name":"Satoshi's Rose","description":"Elegant rose-tinted dark theme"},"myTzur":{"name":"My TZUR","description":"Fully customizable: your photo, your colors, your wallet"},"myTzurDetail":"My TZUR lets you set a custom background photo, accent color, atmosphere effects, and wallet card gradient. No other Bitcoin wallet offers this level of personalization."},"security":{"title":"Security Architecture","keychain":"iOS Keychain with hardware-backed encryption","faceId":"Face ID / PIN authentication","passphrase":"BIP-39 passphrase support (advanced users)","jailbreak":"Jailbreak detection with user warning","clipboard":"Clipboard auto-clear after copying sensitive data","autoLock":"Auto-lock with configurable timeout","tls":"TLS-only Electrum connections with certificate pinning","merkle":"Merkle proof verification for transaction integrity","iosOnly":"iOS-only is a deliberate security decision. Android support is planned for Phase 2."},"ecosystem":{"title":"The BlockSight Ecosystem","headerProduct":"Product","headerDescription":"What it does","blocksight":"Real-time Bitcoin blockchain explorer","tzur":"Self-custody Bitcoin wallet in 22 languages","company":"Both products are developed by Blocksight OÜ, registered in Estonia."},"download":{"appStore":"Download TZUR Wallet on the App Store","website":"TZUR Website","bip39":"BIP-39 Wordlists (Open Source)","contact":"Contact: contact@tzur.live"}}}`),Zu={documentation:Gu},ja=new Set(["en"]),Ua="__load_failed__";async function Yu(n){if(ja.has(n))return;const e=nu[n];if(!e){Pn(n,Ua,"no_loader_registered");return}let t;try{t=await e()}catch(s){const r=(s instanceof Error?s.message:String(s)).slice(0,60);Pn(n,Ua,r);return}const a={};for(const s of t)Object.assign(a,s.default);Rs.addResourceBundle(n,"translation",a),ja.add(n)}Rs.use(hi).init({resources:{en:{translation:{...Ku,...Zu,...su}}},lng:typeof import.meta<"u"&&"en"||"en",fallbackLng:"en",interpolation:{escapeValue:!1},react:{useSuspense:!1},supportedLngs:[...Xl],saveMissing:!0,missingKeyHandler:(n,e,t)=>{Pn(n[0]??"unknown",e,t)}});function Js(){const{i18n:n}=re(),e=n.language;return eu.includes(e)}function Ju(){return Js()?"rtl":"ltr"}function Xu(){return Js()?"right":"left"}const Qu="_root_jrf75_117",ed="_container_jrf75_141",td="_searchIcon_jrf75_163",nd="_icon_jrf75_183",ad="_input_jrf75_205",sd="_submitButton_jrf75_431",rd="_spinner_jrf75_517",Ge={root:Qu,container:ed,searchIcon:td,icon:nd,input:ad,submitButton:sd,spinner:rd},Wa=({query:n,onChange:e,onSubmit:t,autoFocus:a=!1,isLoading:s=!1})=>{const{t:r}=re(),o=Ju(),l=h=>{h.key==="Enter"&&(h.preventDefault(),t(h))};return u.jsx("search",{className:Ge.root,onSubmit:t,children:u.jsxs("div",{className:Ge.container,children:[u.jsx("input",{type:"search",className:Ge.input,dir:o,placeholder:r("bitcoin.search.placeholder"),value:n,onChange:h=>e(h.target.value),onKeyDown:l,"aria-label":r("navigation.search"),"data-testid":"search-input",disabled:s,autoFocus:a}),u.jsx("div",{className:Ge.searchIcon,children:u.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:Ge.icon,"aria-label":"Search icon",children:[u.jsx("title",{children:"Search"}),u.jsx("path",{d:"M21 21L16.514 16.506L21 21ZM19 10.5C19 15.194 15.194 19 10.5 19C5.806 19 2 15.194 2 10.5C2 5.806 5.806 2 10.5 2C15.194 2 19 5.806 19 10.5Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),u.jsx("button",{type:"button",className:Ge.submitButton,onClick:t,"aria-label":r("navigation.search"),disabled:!n.trim()||s,"data-testid":"search-submit-button",children:s?u.jsx(bi,{size:16,className:Ge.spinner,"aria-label":r("search.loading","Searching")}):u.jsx(vi,{size:16})})]})})},Sn=[{level:1,anchorBtc:.001,maxBtc:.002},{level:2,anchorBtc:.003,maxBtc:.004},{level:3,anchorBtc:.005,maxBtc:.007},{level:4,anchorBtc:.01,maxBtc:.015},{level:5,anchorBtc:.02,maxBtc:.03},{level:6,anchorBtc:.05,maxBtc:.075},{level:7,anchorBtc:.1,maxBtc:.175},{level:8,anchorBtc:.25,maxBtc:.375},{level:9,anchorBtc:.5,maxBtc:.75},{level:10,anchorBtc:1,maxBtc:1.5},{level:11,anchorBtc:2,maxBtc:2.5},{level:12,anchorBtc:3,maxBtc:4},{level:13,anchorBtc:5,maxBtc:6},{level:14,anchorBtc:7,maxBtc:8.5},{level:15,anchorBtc:10,maxBtc:12.5},{level:16,anchorBtc:15,maxBtc:17.5},{level:17,anchorBtc:20,maxBtc:35},{level:18,anchorBtc:50,maxBtc:60},{level:19,anchorBtc:75,maxBtc:85},{level:20,anchorBtc:100,maxBtc:Number.POSITIVE_INFINITY}],id=1e8;function od(n){return n/id}function cd(n){if(n<=0)return null;for(const e of Sn)if(n{const{t:a}=re(),s=d.useMemo(()=>ld(n),[n]);if(!s)return null;const{level:r,anchorBtc:o}=s,l=Pd[r],h=a("btcAmountIcon.ariaLabel","Bitcoin amount approximately {{amount}} BTC",{amount:o}),m=[za.container,t].filter(Boolean).join(" ");return u.jsx("span",{className:m,"aria-label":h,role:"img",children:u.jsx("img",{src:l,alt:"","aria-hidden":"true",className:za.coinImage,style:{width:e,height:e},draggable:!1})})};Ld.displayName="BtcAmountIcon";function Dd(n){return n.length<=16?n:`${n.slice(0,6)}....${n.slice(-6)}`}const Nd="_copyableEntityLink_heuwf_8",Od="_navLink_heuwf_14",Md="_plainText_heuwf_43",Hd="_labelOnly_heuwf_49",xt={copyableEntityLink:Nd,navLink:Od,plainText:Md,labelOnly:Hd},Fd="_tooltipWrapper_12qb5_33",jd="_tooltip_12qb5_33",Ud="_visible_12qb5_93",Wd="_top_12qb5_115",zd="_bottom_12qb5_131",Vd="_left_12qb5_147",qd="_right_12qb5_163",$d="_arrow_12qb5_185",Kd="_slideTop_12qb5_263",Gd="_slideBottom_12qb5_281",Zd="_slideLeft_12qb5_299",Yd="_slideRight_12qb5_317",rt={tooltipWrapper:Fd,tooltip:jd,visible:Ud,top:Wd,bottom:zd,left:Vd,right:qd,arrow:$d,slideTop:Kd,slideBottom:Gd,slideLeft:Zd,slideRight:Yd};function ea({trigger:n,children:e,position:t="top",animation:a="slide",showDelay:s=0,hideDelay:r=100,className:o,contentClassName:l,toggleOnClick:h=!1}){const[m,f]=d.useState(!1),[b,S]=d.useState(!1),v=d.useRef(null),T=d.useRef(null),_=d.useRef(null),w=d.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null),T.current&&(clearTimeout(T.current),T.current=null)},[]),L=d.useCallback(()=>{b||(w(),s>0?v.current=setTimeout(()=>f(!0),s):f(!0))},[w,s,b]),N=d.useCallback(()=>{b||(w(),r>0?T.current=setTimeout(()=>f(!1),r):f(!1))},[w,r,b]),U=d.useCallback(()=>{h&&(b?(S(!1),f(!1)):(w(),S(!0),f(!0)))},[h,b,w]);d.useEffect(()=>{if(!b)return;const J=ye=>{_.current&&!_.current.contains(ye.target)&&(S(!1),f(!1))};return document.addEventListener("click",J),()=>document.removeEventListener("click",J)},[b]);const q=[rt.tooltipWrapper,o].filter(Boolean).join(" "),K=[rt.tooltip,rt[t],rt[`${a}${t.charAt(0).toUpperCase()}${t.slice(1)}`],m&&rt.visible,l].filter(Boolean).join(" ");return u.jsxs("div",{ref:_,role:"group",className:q,onMouseEnter:L,onMouseLeave:N,onFocus:L,onBlur:N,onClick:h?U:void 0,onKeyDown:h?J=>{(J.key==="Enter"||J.key===" ")&&U()}:void 0,children:[n,u.jsxs("div",{className:K,role:"tooltip","aria-hidden":!m,children:[e,u.jsx("span",{className:rt.arrow,"aria-hidden":"true"})]})]})}ea.displayName="Tooltip";const Jd="_copyButton_soyq9_22",Xd="_clipboard_soyq9_69",Qd="_checkmark_soyq9_130",eh="_tooltipContent_soyq9_155",th="_tooltipText_soyq9_159",it={copyButton:Jd,clipboard:Xd,checkmark:Qd,tooltipContent:eh,tooltipText:th},nh=2e3,Xs=({value:n,type:e,position:t="top",className:a,onCopy:s})=>{const{t:r}=re(),[o,l]=d.useState(!1),h=o?r("copyButton.copied","Copied!"):r(`copyButton.copy.${e}`,`Copy ${e.charAt(0).toUpperCase()+e.slice(1)}`),m=o?r("copyButton.copiedAriaLabel","Copied to clipboard"):r(`copyButton.ariaLabel.${e}`,`Copy ${e} to clipboard`),f=d.useCallback(async()=>{try{await navigator.clipboard.writeText(n),l(!0),s?.(),setTimeout(()=>{l(!1)},nh)}catch(T){y.error(g.COMPONENT,"CopyButton: Failed to copy to clipboard",{error:T instanceof Error?T:String(T)})}},[n,s]),b=d.useCallback(T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),f())},[f]),S=[it.copyButton,o&&it.copied,a].filter(Boolean).join(" "),v=u.jsx("button",{type:"button",className:S,onClick:f,onKeyDown:b,"aria-label":m,tabIndex:0,children:u.jsx("span",{className:o?it.checkmark:it.clipboard,"aria-hidden":"true"})});return u.jsx(ea,{trigger:v,position:t,showDelay:0,hideDelay:100,contentClassName:it.tooltipContent,children:u.jsx("span",{className:it.tooltipText,children:h})})};Xs.displayName="CopyButton";const ah=["Coinbase","Coinbase (Block Reward)","OP_RETURN","Unknown","Non-standard"],sh=/^memory-pool-\d+$/,rh=16;function ih(n){return!!(n==null||n===""||ah.includes(n)||sh.test(n))}function oh(n){return n==="tx"?"transaction":n}const ch=({value:n,type:e,onNavigate:t,truncate:a=!0,testId:s,className:r})=>{const{t:o}=re();if(ih(n)){const v=n==null||n===""?"—":n,T=[xt.copyableEntityLink,xt.labelOnly,r].filter(Boolean).join(" ");return u.jsx("span",{className:T,"data-testid":s,children:v})}const l=n,h=a&&l.length>rh?Dd(l):l,m=[xt.copyableEntityLink,r].filter(Boolean).join(" "),f=`copyableLink.ariaLabel.${e}`,b=e==="block"?`View block ${h}`:e==="tx"?`View transaction ${h}`:`View address ${h}`,S=o(f,b,{value:h});return u.jsxs("span",{className:m,children:[u.jsx(Xs,{value:l,type:oh(e)}),t?u.jsx("button",{type:"button",className:xt.navLink,onClick:t,"aria-label":S,"data-testid":s,children:h}):u.jsx("span",{className:xt.plainText,"data-testid":s,children:h})]})};ch.displayName="CopyableEntityLink";const Te={mobile:768,tablet:1100,desktop:1536},Me={tiny:500,short:700,medium:800},lh=100;function uh(n,e){return n>=700&&n<=900&&e<=600||n<=300&&e>=600?"foldable":n<=Te.mobile?"phone":n<=Te.tablet?"tablet":n<=Te.desktop?"laptop":"desktop"}function dh(n,e){let t=1;return n<=768?t*=.8:n<=1024?t*=.9:n>=2560&&(t*=1.1),e<=500?t*=.65:e<=600?t*=.75:e<=700?t*=.85:e<=800&&(t*=.9),Math.max(.5,Math.min(1.2,t))}function hh(){return typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:1920,height:1080}}function mh(n,e){return n==="phone"||e<=Te.mobile?"single":e<=Te.tablet?"double":"triple"}function ph(n,e){return n!=="phone"&&e==="triple"}function fh(n,e){return n<=Me.tiny?"minimal":n<=Me.short?"reduced":e==="landscape"&&n<=500?"minimal":"full"}function gh(n,e,t){return e==="phone"?t==="minimal"?"mini":"compact":t==="minimal"?"mini":t==="reduced"||n<=Me.medium?"compact":"full"}function yh(n,e){return n==="phone"||e==="double"?"compact":"full"}const bh={width:1920,height:1080,isMobile:!1,isTablet:!1,isDesktop:!0,isWidescreen:!1,isTinyHeight:!1,isShortHeight:!1,isMediumHeight:!1,isTallHeight:!0,deviceType:"desktop",orientation:"landscape",scaleFactor:1,layoutMode:"triple",showLeftColumn:!0,contentMode:"full",blockCardVariant:"full",dashboardDataVariant:"full"},Qs=d.createContext(bh),vh=({children:n})=>{const[e,t]=d.useState(hh),a=d.useCallback(()=>{t({width:window.innerWidth,height:window.innerHeight})},[]);d.useEffect(()=>{a();let r;const o=()=>{clearTimeout(r),r=setTimeout(a,lh)};return window.addEventListener("resize",o),()=>{clearTimeout(r),window.removeEventListener("resize",o)}},[a]);const s=d.useMemo(()=>{const{width:r,height:o}=e,l=uh(r,o),h=r>o?"landscape":"portrait",m=mh(l,r),f=ph(l,m),b=fh(o,h),S=gh(o,l,b),v=yh(l,m);return{width:r,height:o,isMobile:r<=Te.mobile,isTablet:r>Te.mobile&&r<=Te.tablet,isDesktop:r>Te.tablet&&r<=Te.desktop,isWidescreen:r>Te.desktop,isTinyHeight:o<=Me.tiny,isShortHeight:o>Me.tiny&&o<=Me.short,isMediumHeight:o>Me.short&&o<=Me.medium,isTallHeight:o>Me.medium,deviceType:l,orientation:h,scaleFactor:dh(r,o),layoutMode:m,showLeftColumn:f,contentMode:b,blockCardVariant:S,dashboardDataVariant:v}},[e]);return u.jsx(Qs.Provider,{value:s,children:n})},er=()=>d.useContext(Qs),kh=()=>{const n=er();return{...n,isCompact:n.isMobile||n.isShortHeight||n.isTinyHeight,needsSimplifiedUI:n.scaleFactor<.8,shouldHideSecondaryInfo:n.scaleFactor<.7,isTouchDevice:n.deviceType==="phone"||n.deviceType==="tablet",isHeightConstrained:n.isTinyHeight||n.isShortHeight||n.isMediumHeight}},Ln={BLOCKCHAIN:12e4,PRICE:3e5};function Sh(n,e,t=Date.now()){return!n||n===0?!0:t-n>e}function Xt(n,e=Date.now()){return!n||n===0?-1:Math.floor((e-n)/1e3)}function _h(n){const{btc:e}=n.transformed.market.prices,t=n.raw._meta.external;return{price:e.usd,change24h:e.change24h,changePercent24h:e.changePercent24h,lastUpdate:t.lastFetchedAt,isStale:t.isStale||Sh(t.lastFetchedAt,Ln.PRICE),isMock:t.isMock,ageSeconds:Xt(t.lastFetchedAt)}}function Va(n,e,t,a=Date.now()){if(t)return"mock";if(!n||n===0)return"error";const s=a-n;return s>e*2?"error":s>e?"stale":"live"}function wh(n){const{_meta:e}=n.raw,{websocket:t}=n,a={status:Va(e.coreRpc.lastFetchedAt,Ln.BLOCKCHAIN,e.coreRpc.isMock),lastUpdate:e.coreRpc.lastFetchedAt,ageSeconds:Xt(e.coreRpc.lastFetchedAt),isMock:e.coreRpc.isMock,confidence:e.coreRpc.confidence},s={status:Va(e.external.lastFetchedAt,Ln.PRICE,e.external.isMock),lastUpdate:e.external.lastFetchedAt,ageSeconds:Xt(e.external.lastFetchedAt),isMock:e.external.isMock,confidence:e.external.confidence},r={status:t.connected?"live":"error",lastUpdate:t.lastUpdate,ageSeconds:Xt(t.lastUpdate),isMock:!1,confidence:t.connected?100:0},o=[a.status,s.status,r.status];let l;o.every(m=>m==="live")?l="fresh":o.some(m=>m==="error"||m==="mock")?l="offline":l="stale";let h;return l==="fresh"?h="All data sources active":r.status==="error"?h="WebSocket disconnected - using cached data":a.isMock&&s.isMock?h="Using demo data - backend offline":a.status==="stale"?h=`Blockchain data ${a.ageSeconds}s old`:h="Some data may be outdated",{overall:l,sources:{blockchain:a,market:s,network:r},message:h,showWarning:l!=="fresh"}}const tr=d.createContext(null),Eh=({children:n})=>{const[e,t]=d.useState(()=>{const a=O.getState();return{health:a.system.health,performance:a.system.performance,errors:a.system.errors,websocket:a.websocket}});return d.useEffect(()=>{const a=O.subscribeToSlice(s=>({system:s.system,websocket:s.websocket}),({system:s,websocket:r})=>{t({health:s.health,performance:s.performance,errors:s.errors,websocket:r})});return()=>{a()}},[]),u.jsx(tr.Provider,{value:e,children:n})},Th=()=>{const n=d.useContext(tr);if(!n)throw new Error("useHealthData must be used within HealthDataProvider");return n},nr=d.createContext(null),Ch=({children:n})=>{const[e,t]=d.useState(()=>{const a=O.getState();return{prices:a.transformed.market.prices,exchangeRates:a.transformed.market.exchangeRates,marketCap:a.transformed.market.marketCap,volume24h:a.transformed.market.volume24h,dominance:a.transformed.market.dominance}});return d.useEffect(()=>{const a=O.subscribeToSlice(s=>s.transformed.market,s=>{t({prices:s.prices,exchangeRates:s.exchangeRates,marketCap:s.marketCap,volume24h:s.volume24h,dominance:s.dominance})});return()=>{a()}},[]),u.jsx(nr.Provider,{value:e,children:n})},Ah=()=>{const n=d.useContext(nr);if(!n)throw new Error("usePriceData must be used within PriceDataProvider");return n},ar=d.createContext(null),xh=({children:n})=>{const[e,t]=d.useState(O.getState());return d.useEffect(()=>{const a=O.subscribe(s=>{t(s)});return()=>{a()}},[]),u.jsx(ar.Provider,{value:e,children:n})},ta=()=>{const n=d.useContext(ar);if(!n)throw new Error("useDataStore must be used within DataStoreProvider");return n},Bh=()=>Ul(),kS=()=>Ah(),Rh=()=>Th(),SS=()=>{const n=ta();return d.useMemo(()=>_h(n),[n])},Ih=()=>{const n=ta();return d.useMemo(()=>wh(n),[n])};let Ph=class be{static instance=null;static MAX_LISTENERS_PER_EVENT=100;static CONNECTION_TIMEOUT_MS=1e4;isEnabledFlag=!0;isConnecting=!1;connection=null;reconnectAttempts=0;reconnectDelay=1e3;maxReconnectDelay=3e4;reconnectTimer=null;connectionTimeoutTimer=null;heartbeatTimer=null;static HEARTBEAT_INTERVAL_MS=3e4;lastErrorShown=0;hasLoggedOffline=!1;eventListeners=new Map;constructor(){this.initializeServiceControl()}static getInstance(){return be.instance||(be.instance=new be),be.instance}initializeServiceControl(){const e="true";this.isEnabledFlag=e!=="false"}isEnabled(){return this.isEnabledFlag}enable(){this.isEnabledFlag=!0}disable(){this.isEnabledFlag=!1,this.disconnect()}resetFailureState(){this.reconnectAttempts=0,this.lastErrorShown=0,this.hasLoggedOffline=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}connect(e="ws://localhost:3001/api/v1/ws"){if(!this.isEnabled())return y.info(g.WEBSOCKET,"WebSocket service is disabled - skipping connection"),Promise.reject(new Error("WebSocket service is disabled"));if(this.isConnecting)return Promise.reject(new Error("Connection already in progress"));if(this.connection&&(this.connection.readyState===WebSocket.CONNECTING||this.connection.readyState===WebSocket.OPEN))return Promise.reject(new Error("Connection already in progress"));const t=Z.gauge("websocket_connections_active","Number of active WebSocket connections"),a=Z.counter("websocket_errors_total","Total number of WebSocket errors",["error_type"]);return this.isConnecting=!0,new Promise((s,r)=>{try{this.connection=new WebSocket(e),this.connectionTimeoutTimer=setTimeout(()=>{this.connectionTimeoutTimer=null,this.connection&&this.connection.readyState===WebSocket.CONNECTING&&(y.warn(g.WEBSOCKET,"Connection timeout",{url:e,timeoutMs:be.CONNECTION_TIMEOUT_MS}),this.connection.close(),this.connection=null,this.isConnecting=!1,a.inc({error_type:"connection_timeout"}),r(new Error("WebSocket connection timeout")))},be.CONNECTION_TIMEOUT_MS),this.connection.onopen=()=>{this.isConnecting=!1,this.connectionTimeoutTimer&&(clearTimeout(this.connectionTimeoutTimer),this.connectionTimeoutTimer=null),this.reconnectAttempts=0,this.hasLoggedOffline=!1,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.startHeartbeat(),tc(e),t.inc();const o=this.eventListeners.get("open");o&&o.forEach(l=>{try{l(new Event("open"))}catch(h){y.error(g.WEBSOCKET,"Error in open listener",{error:h instanceof Error?h:String(h)})}}),this.connection?s(this.connection):(y.error(g.WEBSOCKET,"Connection is null after onopen"),r(new Error("WebSocket connection is null")))},this.connection.onerror=o=>{this.isConnecting=!1,this.connectionTimeoutTimer&&(clearTimeout(this.connectionTimeoutTimer),this.connectionTimeoutTimer=null),ac(e,new Error(`WebSocket connection failed: ${o}`)),a.inc({error_type:"connection_error"});const l=Date.now();l-this.lastErrorShown>3e4&&(y.warn(g.WEBSOCKET,"WebSocket connection failed",{error:o instanceof Error?o:String(o)}),this.lastErrorShown=l);const h=this.eventListeners.get("error");h&&h.forEach(m=>{try{m(o)}catch(f){y.error(g.WEBSOCKET,"Error in error listener",{error:f instanceof Error?f:String(f)})}}),this.connection=null,r(new Error(`WebSocket connection failed: ${o}`))},this.connection.onclose=o=>{this.stopHeartbeat(),o.wasClean||y.warn(g.WEBSOCKET,"Connection lost unexpectedly",{code:o.code,reason:o.reason}),Ca(e),t.dec();const l=this.eventListeners.get("close");l&&l.forEach(h=>{try{h(o)}catch(m){y.error(g.WEBSOCKET,"Error in close listener",{error:m instanceof Error?m:String(m)})}}),this.connection=null,this.handleReconnect(e)},this.connection.onmessage=o=>{const l=o.data?typeof o.data=="string"?o.data.length:o.data.byteLength:0;nc(e,l);const h=this.eventListeners.get("message");h&&h.forEach(m=>{try{m(o)}catch(f){y.error(g.WEBSOCKET,"Error in message listener",{error:f instanceof Error?f:String(f)})}})}}catch(o){this.isConnecting=!1,this.connectionTimeoutTimer&&(clearTimeout(this.connectionTimeoutTimer),this.connectionTimeoutTimer=null),a.inc({error_type:"connection_failed"}),r(new Error(`Failed to create WebSocket connection: ${o}`))}})}clearAllListeners(){this.eventListeners.clear()}disconnect(){if(this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.connectionTimeoutTimer&&(clearTimeout(this.connectionTimeoutTimer),this.connectionTimeoutTimer=null),this.isConnecting=!1,this.reconnectAttempts=0,this.clearAllListeners(),this.connection){const e=this.connection.url;Ca(e);try{Z?.gauge?.("websocket_connections_active","Number of active WebSocket connections")?.dec?.()}catch{}this.connection.close(),this.connection=null}}getConnectionStatus(){return this.isEnabled()?this.connection&&this.connection.readyState===WebSocket.OPEN?"connected":this.reconnectTimer!==null||this.reconnectAttempts>0?"reconnecting":"disconnected":"disabled"}getReconnectAttempts(){return this.reconnectAttempts}handleReconnect(e){if(!this.isEnabled())return;this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.reconnectAttempts++;const t=this.reconnectDelay*2**(this.reconnectAttempts-1),a=Math.min(t,this.maxReconnectDelay),s=a*.2*(Math.random()*2-1),r=Math.max(0,Math.round(a+s));this.hasLoggedOffline||(this.hasLoggedOffline=!0,y.info(g.WEBSOCKET,"BlockSight.Live not available, try again later")),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect(e).catch(o=>{y.debug(g.WEBSOCKET,"Reconnect attempt failed",{error:o instanceof Error?o.message:String(o)})})},r)}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{if(this.connection&&this.connection.readyState===WebSocket.OPEN)try{this.connection.send(JSON.stringify({type:"ping"}))}catch{}},be.HEARTBEAT_INTERVAL_MS)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}send(e){if(!this.isEnabled()||!this.connection||this.connection.readyState!==WebSocket.OPEN)throw new Error("WebSocket is not connected or disabled");this.connection.send(JSON.stringify(e))}addEventListener(e,t){if(!this.isEnabled())return;this.eventListeners.has(e)||this.eventListeners.set(e,new Set);const a=this.eventListeners.get(e);if(a){if(a.size>=be.MAX_LISTENERS_PER_EVENT){y.warn(g.WEBSOCKET,"Max listeners per event reached, rejecting",{type:e,max:be.MAX_LISTENERS_PER_EVENT});return}a.add(t)}}addEventListenerWithCleanup(e,t){if(!this.isEnabled())return()=>{};this.eventListeners.has(e)||this.eventListeners.set(e,new Set);const a=this.eventListeners.get(e);return a?a.size>=be.MAX_LISTENERS_PER_EVENT?(y.warn(g.WEBSOCKET,"Max listeners per event reached, rejecting",{type:e,max:be.MAX_LISTENERS_PER_EVENT}),()=>{}):(a.add(t),()=>{this.removeEventListener(e,t)}):()=>{}}removeEventListener(e,t){const a=this.eventListeners.get(e);a&&a.delete(t)}getConfig(){return{enabled:this.isEnabled(),connectionStatus:this.getConnectionStatus(),reconnectAttempts:this.reconnectAttempts,maxReconnectDelay:this.maxReconnectDelay}}};const Qt=Ph.getInstance(),qa=500,_n="blocksight:range-response",Lh=1e4,Dh=10,Nh=200;function Oh(n,e,t=null){if(e.length===0)return"far";if(e.includes(n))return"near";if(t!==null)return Math.abs(n-t)<=qa?"medium":"far";const a=Math.max(...e),s=Math.min(...e);return Math.min(Math.abs(n-a),Math.abs(n-s))<=qa?"medium":"far"}function Mh(){return new Promise(n=>{const e=()=>{window.removeEventListener(_n,e),n(!0)};window.addEventListener(_n,e),setTimeout(()=>{window.removeEventListener(_n,e),n(!1)},Lh)})}function Hh(){return new Promise(n=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>n())})})}function Fh(n,e=3e3){return new Promise(t=>{const a=Date.now()+e,s=()=>{if(O.getState().raw.electrumServer.blockHeaders.some(o=>o.height===n)){t(!0);return}if(Date.now()>=a){t(!1);return}setTimeout(s,50)};s()})}async function jh(n,e){return!(!Qt.isEnabled()||Qt.getConnectionStatus()!=="connected"||(Qt.send({type:"request_blocks_range",payload:{centerHeight:n,radius:50}}),!await Mh()||e.current))}async function Uh(n,e,t,a){for(let s=0;ssetTimeout(o,Nh))}return!1}async function Wh(n,e,t,a){return!await jh(n,a)||!await Fh(n)||a.current||(await Hh(),a.current)?!1:Uh(t,n,e,a)}function zh(n){const e=d.useRef(!1),t=d.useCallback(()=>{e.current=!0},[]);return{scrollToBlock:d.useCallback(async s=>{e.current=!1;const r=O.getState(),l=r.raw.electrumServer.blockHeaders.map(b=>b.height),h=r.raw.electrumServer.windowCenter??null,m=Oh(s,l,h);return y.debug(g.HOOK,"Smart scroll classified",{height:s,strategy:m,loadedCount:l.length}),m==="near"?n()?.scrollToBlockHeight(s,"smooth")??!1:Wh(s,m==="medium"?"smooth":"instant",n,e)},[n]),cancel:t}}const sr=d.createContext(null),Vh=({children:n})=>{const e=d.useRef(null),t=d.useRef(null),a=d.useMemo(()=>({get current(){return t.current?.current?.getContainer()??null},set current(K){}}),[]),[s,r]=d.useState(!1),[o,l]=d.useState(!1),h=d.useCallback(K=>{e.current=K},[]),m=d.useCallback(K=>{t.current=K},[]),f=d.useCallback(()=>e.current?.current??null,[]),b=d.useCallback(()=>t.current?.current??null,[]),S=d.useCallback(()=>{const K=f();K&&K.scrollToBottom("smooth")},[f]),v=d.useCallback(()=>{const K=b();K&&K.scrollToIndex(0,"smooth")},[b]),T=d.useCallback(()=>{S(),v()},[S,v]),_=zh(b),w=d.useCallback(async(K,J="smooth")=>f()?.scrollToBlockHeight(K,J)?!0:_.scrollToBlock(K),[f,_]),L=d.useCallback(async K=>w(K,"smooth"),[w]),N=d.useCallback((K,J)=>{r(!J)},[]),U=d.useCallback((K,J)=>{l(!J)},[]),q=d.useMemo(()=>({setMempoolRef:h,setBuiltRef:m,builtContainerRef:a,isTopScrollMoved:s,isBottomScrollMoved:o,onTopScroll:N,onBottomScroll:U,resetTopScroll:S,resetBottomScroll:v,resetAllScrolls:T,scrollToBlock:w,centerBlockInView:L}),[h,m,a,s,o,N,U,S,v,T,w,L]);return u.jsx(sr.Provider,{value:q,children:n})},mn=()=>{const n=d.useContext(sr);if(!n)throw new Error("useScrollContext must be used within ScrollProvider");return n},qh=()=>{const{resetAllScrolls:n,resetTopScroll:e,resetBottomScroll:t}=mn();return{resetAllScrolls:n,resetTopScroll:e,resetBottomScroll:t}},rr=()=>{const{scrollToBlock:n,centerBlockInView:e}=mn();return{scrollToBlock:n,centerBlockInView:e}},_S=()=>{const{setMempoolRef:n,setBuiltRef:e}=mn();return{setMempoolRef:n,setBuiltRef:e}},$h=()=>{const{isTopScrollMoved:n,isBottomScrollMoved:e,onTopScroll:t,onBottomScroll:a}=mn();return{isTopScrollMoved:n,isBottomScrollMoved:e,isAnyScrollMoved:n||e,onTopScroll:t,onBottomScroll:a}},$a=2,Kh=10;function Gh(n,e,t=Date.now()){return{kind:"real",id:{hash:`memory-pool-${n+1}`,height:e+n+2},minedAtMs:t+(n+2)*60*1e3,txCount:1500+Math.floor(Math.random()*500),minFeeRate:5+n*2,maxFeeRate:100+n*20,medianFeeRate:15+n*3}}function Zh(){const n=Bh(),{selectBlock:e}=Fm(),{scrollToBlock:t}=rr(),a=n.height??null,s=d.useMemo(()=>{const S=n.blocks;return S&&S.length>0?S.map(Vs).filter(v=>v!==null):[]},[n.blocks]),r=d.useMemo(()=>{const S=n.height??(s.length>0?s[0].id.height:924457);return Array.from({length:Kh},(v,T)=>Gh(T,S)).reverse()},[s,n.height]),o=d.useMemo(()=>s.slice(0,$a),[s]),l=d.useMemo(()=>s.slice($a),[s]),h=d.useMemo(()=>[...r,...o,...l],[r,o,l]),m=d.useCallback(S=>o.some(v=>v.id.height===S)?"center":r.some(v=>v.id.height===S)?"mempool":l.some(v=>v.id.height===S)?"built":"not-found",[o,r,l]),f=d.useCallback(S=>{const v=h.find(_=>_.id.height===S);if(!v)return{success:!1,error:`Block #${S.toLocaleString()} not found in current view`,errorKey:"search.errors.blockNotFound"};const T=m(S);return e(v),T!=="center"&&t(S,"smooth"),{success:!0,block:v,section:T}},[h,m,e,t]),b=d.useCallback(S=>{const v=S.toLowerCase();if(v.startsWith("memory-pool-"))return{success:!1,error:"Mempool blocks cannot be searched by hash",errorKey:"search.errors.mempoolHashSearch"};const _=[...o,...l].find(L=>L.id.hash.toLowerCase()===v);if(!_)return{success:!1,error:"Block not found with this hash",errorKey:"search.errors.blockNotFoundByHash"};const w=m(_.id.height);return e(_),w!=="center"&&t(_.id.height,"smooth"),{success:!0,block:_,section:w}},[o,l,m,e,t]);return{selectBlockByHeight:f,selectBlockByHash:b,getBlockSection:m,tipHeight:a,availableBlocks:h}}function ir(n){const e="0123456789abcdef";let t="0000000000000000000",a=n+12345;for(let s=0;s<45;s++){a=a+1831565813|0;let r=Math.imul(a^a>>>15,1|a);r=r+Math.imul(r^r>>>7,61|r)^r;const l=((r^r>>>14)>>>0)%16;t+=e[l]}return t}const Et={};for(let n=926450;n<=926549;n++)Et[n]=ir(n);function Yh(n){const e=n*17%100,t=n*31%100,a=n*47%100,s=n*61%100,r=1800+Math.floor(e/100*2400),o=1+t/100*11,l=50+Math.floor(a/100*300),h=5+Math.floor(s/100*40);return{txCount:r,minFeeRate:Math.round(o*10)/10,maxFeeRate:l,medianFeeRate:h}}const Jh=(n,e)=>{const t=Date.now(),a=ir(n),s=Yh(n);return{kind:"real",id:{hash:a,height:n},minedAtMs:t-e*60*1e3,...s}},Xh=926549;function Qh(n,e){const t=[];for(let a=0;a({height:n.id.height,avgfeerate:n.medianFeeRate,timestamp:n.minedAtMs}));const ve=Date.now(),ke=n=>n*60*1e3,nt={block926549:{tx1:"a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456"},block926548:{tx1:"d4e5f6789012345678901234567890abcdef1234567890abcdef1234567890"},block926547:{tx1:"f6789012345678901234567890abcdef1234567890abcdef123456789012"},block926546:{tx1:"012345678901234567890abcdef1234567890abcdef1234567890123456"},block926545:{tx1:"2345678901234567890abcdef1234567890abcdef123456789012345678"},pending:{tx1:"pending123456789abcdef1234567890abcdef1234567890abcdef12345",tx2:"pending234567890abcdef1234567890abcdef1234567890abcdef12346"}},se={nativeSegwit1:"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq",nativeSegwit2:"bc1qc7slrfxkknqcq2jevvvkdgvrt8080852dfjewde450xdlk4ugp7szw5tk9",nativeSegwit3:"bc1q9vza2e8x573nczrlzms0wvx3gsqjx7vavgkx0l",taproot1:"bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297",taproot2:"bc1pqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs3wf0qm",legacy1:"1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",legacy2:"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",segwit1:"3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"},Dn={id:{txid:nt.block926549.tx1},status:"confirmed",confirmations:1,blockHeight:926549,blockHash:Et[926549],firstSeenMs:ve-ke(5),confirmedAtMs:ve-ke(3),feeSatoshis:15800,feeRate:28.5,fiatFeeUsd:15.67,fiatFeeCurrency:15.67,isRbf:!1,senderAddress:se.nativeSegwit1,receiverAddress:se.nativeSegwit2,inputCount:2,outputCount:2,totalInputValue:185e5,totalOutputValue:18484200},Nn={id:{txid:nt.block926548.tx1},status:"confirmed",confirmations:2,blockHeight:926548,blockHash:Et[926548],firstSeenMs:ve-ke(15),confirmedAtMs:ve-ke(12),feeSatoshis:9200,feeRate:18.4,fiatFeeUsd:9.12,fiatFeeCurrency:9.12,isRbf:!1,senderAddress:se.nativeSegwit3,receiverAddress:se.legacy1,inputCount:1,outputCount:2,totalInputValue:75e5,totalOutputValue:7490800},nn={id:{txid:nt.block926547.tx1},status:"confirmed",confirmations:3,blockHeight:926547,blockHash:Et[926547],firstSeenMs:ve-ke(25),confirmedAtMs:ve-ke(21),feeSatoshis:42500,feeRate:65.2,fiatFeeUsd:42.15,fiatFeeCurrency:42.15,isRbf:!1,senderAddress:se.taproot1,receiverAddress:se.nativeSegwit1,inputCount:5,outputCount:3,totalInputValue:125e6,totalOutputValue:124957500},or={id:{txid:nt.block926546.tx1},status:"confirmed",confirmations:4,blockHeight:926546,blockHash:Et[926546],firstSeenMs:ve-ke(38),confirmedAtMs:ve-ke(34),feeSatoshis:12300,feeRate:22.1,fiatFeeUsd:12.19,fiatFeeCurrency:12.19,isRbf:!1,senderAddress:se.legacy1,receiverAddress:se.taproot2,inputCount:2,outputCount:2,totalInputValue:35e6,totalOutputValue:34987700},cr={id:{txid:nt.block926545.tx1},status:"confirmed",confirmations:5,blockHeight:926545,blockHash:Et[926545],firstSeenMs:ve-ke(48),confirmedAtMs:ve-ke(42),feeSatoshis:8700,feeRate:15.8,fiatFeeUsd:8.63,fiatFeeCurrency:8.63,isRbf:!1,senderAddress:se.segwit1,receiverAddress:se.nativeSegwit3,inputCount:1,outputCount:2,totalInputValue:22e6,totalOutputValue:21991300},tm={id:{txid:nt.pending.tx1},status:"pending",confirmations:0,blockHeight:null,blockHash:null,estimatedBlockHeight:926550,firstSeenMs:ve-ke(8),confirmedAtMs:null,feeSatoshis:11500,feeRate:21.2,fiatFeeUsd:11.4,fiatFeeCurrency:11.4,isRbf:!0,rbfHistory:{previousFee:7500,currentFee:11500,bumpCount:1},senderAddress:se.nativeSegwit2,receiverAddress:se.taproot1,inputCount:1,outputCount:2,totalInputValue:8e6,totalOutputValue:7988500},nm={id:{txid:nt.pending.tx2},status:"pending",confirmations:0,blockHeight:null,blockHash:null,estimatedBlockHeight:926550,firstSeenMs:ve-ke(2),confirmedAtMs:null,feeSatoshis:85e3,feeRate:125.5,fiatFeeUsd:84.32,fiatFeeCurrency:84.32,isRbf:!1,senderAddress:se.taproot2,receiverAddress:se.legacy2,inputCount:3,outputCount:1,totalInputValue:25e7,totalOutputValue:249915e3},am={address:se.nativeSegwit1,addressType:"native-segwit",balanceSatoshis:285e6,balanceFiatUsd:282150,balanceFiatCurrency:282150,pendingBalanceSatoshis:8e6,totalReceivedSatoshis:65e7,totalSentSatoshis:365e6,txCountTotal:58,txCountReceived:38,txCountSent:20,latestTransaction:Dn,transactions:[Dn,nn,cr],hasMoreTransactions:!0},sm={address:se.taproot1,addressType:"taproot",balanceSatoshis:124957500,balanceFiatUsd:123832.93,balanceFiatCurrency:123832.93,pendingBalanceSatoshis:0,totalReceivedSatoshis:25e7,totalSentSatoshis:125042500,txCountTotal:15,txCountReceived:10,txCountSent:5,latestTransaction:nn,transactions:[nn],hasMoreTransactions:!0},rm={address:se.legacy1,addressType:"legacy",balanceSatoshis:425e5,balanceFiatUsd:42117.5,balanceFiatCurrency:42117.5,pendingBalanceSatoshis:0,totalReceivedSatoshis:85e6,totalSentSatoshis:425e5,txCountTotal:12,txCountReceived:8,txCountSent:4,latestTransaction:Nn,transactions:[Nn,or],hasMoreTransactions:!1},im={address:"bc1qemptyaddress000000000000000000000000000",addressType:"native-segwit",balanceSatoshis:0,balanceFiatUsd:0,balanceFiatCurrency:0,pendingBalanceSatoshis:0,totalReceivedSatoshis:0,totalSentSatoshis:0,txCountTotal:0,txCountReceived:0,txCountSent:0,latestTransaction:null,transactions:[],hasMoreTransactions:!1},om=[Dn,Nn,nn,or,cr,tm,nm],cm=[am,sm,rm,im];function lm(n){return om.find(e=>e.id.txid===n)||null}function um(n){return cm.find(e=>e.address===n)||null}function dm(n){const e=O.getState().transformed?.market?.prices?.btc?.usd??0,a=n.balance/1e8*e;return{address:n.address,addressType:n.addressType,balanceSatoshis:n.balance,balanceFiatUsd:a,balanceFiatCurrency:a,pendingBalanceSatoshis:n.pendingBalance,totalReceivedSatoshis:n.totalReceived,totalSentSatoshis:n.totalSent,txCountTotal:n.txCount,txCountReceived:n.txCountReceived,txCountSent:n.txCountSent,latestTransaction:null,transactions:n.transactions.map(s=>({id:{txid:s.txid},status:s.status,isCoinbase:!1,confirmations:s.confirmations,blockHeight:s.blockHeight,blockHash:null,firstSeenMs:s.timestamp?s.timestamp*1e3:Date.now(),confirmedAtMs:s.timestamp?s.timestamp*1e3:null,feeSatoshis:s.feeSatoshis??0,feeRate:0,fiatFeeUsd:0,fiatFeeCurrency:0,isRbf:!1,senderAddress:"",receiverAddress:"",inputCount:0,outputCount:0,totalInputValue:0,totalOutputValue:s.amountSatoshis??0})),hasMoreTransactions:n.hasMoreTransactions}}function hm(){const n=Qn("useRealSearchData"),{selectTransaction:e}=Um(),{selectAddress:t}=Hm(),{searchService:a,isBackendSearchEnabled:s}=na(),r=d.useCallback(l=>{const h=l.toLowerCase();if(!n){const m=lm(h);return m?(e(m),{success:!0,transaction:m}):{success:!1,error:"Transaction not found",errorKey:"search.errors.transactionNotFound"}}return{success:!1,error:"Transaction not in cache",errorKey:"search.errors.transactionNotFound"}},[n,e]),o=d.useCallback(async l=>{if(!l||l==="Unknown"||l.length<26)return{success:!1,error:"Invalid address",errorKey:"search.errors.invalidAddress"};if(!n){const h=um(l);return h?(t(h),{success:!0,address:h}):{success:!1,error:"Address not found",errorKey:"search.errors.addressNotFound"}}if(!s)return{success:!1,error:"Search service unavailable",errorKey:"search.errors.serviceDisabled"};try{const h=await a.directSearch({type:"address",query:l,limit:1});if(h.length>0&&h[0].type==="address"){const m=dm(h[0]);return t(m),{success:!0,address:m}}return{success:!1,error:"Address not found",errorKey:"search.errors.addressNotFound"}}catch{return{success:!1,error:"Address search failed",errorKey:"search.errors.searchFailed"}}},[n,t,s,a]);return{selectTransactionByTxid:r,selectAddressByAddress:o}}const wn=10;function wS(n,e){if(n<=0||e.length===0)return null;for(let s=0;s=r.minFeeRate&&n<=r.maxFeeRate){const o=s+1;return{blockPosition:o,estimatedMinutes:o*wn}}}const t=e[0];if(n>=t.maxFeeRate)return{blockPosition:1,estimatedMinutes:wn};const a=e[e.length-1];if(n<=a.minFeeRate){const s=e.length;return{blockPosition:s,estimatedMinutes:s*wn}}return null}function mm(n,e){if(n<=0||e.length===0)return null;for(const s of e)if(n>=s.minFeeRate&&n<=s.maxFeeRate)return s.id.height;const t=e[e.length-1];if(n<=t.minFeeRate)return t.id.height;const a=e[0];return n>=a.maxFeeRate?a.id.height:null}const lr=d.createContext(null),pm=({children:n})=>{const e=d.useRef(new Map([["mempool",new Set],["built",new Set],["center",new Set]])),[t,a]=d.useState(0),s=d.useCallback(b=>{for(const S of e.current.values())if(S.has(b))return!0;return!1},[t]),r=d.useCallback((b,S)=>e.current.get(S)?.has(b)??!1,[t]),o=d.useCallback(()=>{const b=new Set;for(const S of e.current.values())for(const v of S)b.add(v);return Array.from(b).sort((S,v)=>v-S)},[t]),l=d.useCallback(b=>{const S=e.current.get(b);return S?Array.from(S).sort((v,T)=>T-v):[]},[t]),h=d.useCallback((b,S)=>{const v=e.current.get(S);v&&!v.has(b)&&(v.add(b),a(T=>T+1))},[]),m=d.useCallback((b,S)=>{const v=e.current.get(S);v?.has(b)&&(v.delete(b),a(T=>T+1))},[]),f=d.useMemo(()=>({isBlockVisible:s,isBlockVisibleInSection:r,getVisibleBlockHeights:o,getVisibleBlockHeightsInSection:l,markBlockVisible:h,markBlockHidden:m}),[s,r,o,l,h,m]);return u.jsx(lr.Provider,{value:f,children:n})},ur=()=>{const n=d.useContext(lr);if(!n)throw new Error("useVisibility must be used within VisibilityProvider");return n},ES=()=>{const{isBlockVisible:n,isBlockVisibleInSection:e,getVisibleBlockHeights:t}=ur();return{isBlockVisible:n,isBlockVisibleInSection:e,getVisibleBlockHeights:t}},TS=()=>{const{markBlockVisible:n,markBlockHidden:e}=ur();return{markBlockVisible:n,markBlockHidden:e}},fm=1e4,gm=100;function ym(){const[n,e]=d.useState(null),[t,a]=d.useState(0),s=d.useRef(null),r=d.useCallback(()=>{e(Date.now())},[]),o=d.useCallback(()=>{e(null),a(0),s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return d.useEffect(()=>{if(s.current!==null&&(window.clearInterval(s.current),s.current=null),n===null){a(0);return}const h=()=>{const m=Date.now()-n,f=Math.max(0,fm-m),b=Math.ceil(f/1e3);a(b),f<=0&&s.current!==null&&(window.clearInterval(s.current),s.current=null)};return h(),s.current=window.setInterval(h,gm),()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)}},[n]),{canSearch:t===0,cooldownRemaining:t,recordSearch:r,reset:o}}const bm=8,vm=9,dr=64,pn={numericOnly:/^\d+$/,hash64:/^[a-fA-F0-9]{64}$/,addressPrefix:/^(1|3|bc1)/i};function hr(n){return!n||n.length===0||n.length>vm?!1:pn.numericOnly.test(n)}function km(n){return!n||n.length!==dr?!1:pn.hash64.test(n)}function CS(n){return!n||n.length!==dr?!1:pn.hash64.test(n)}function Sm(n){return!n||n.length<26||n.length>62?!1:pn.addressPrefix.test(n)}function _m(n){if(!hr(n))return null;const e=parseInt(n,10);return Number.isNaN(e)||!Number.isFinite(e)||e<0?null:e}function mr(n){if(!n||n.trim().length===0)return"invalid";const e=n.trim();return hr(e)?"blockHeight":km(e)?"blockHash":/^[0-9a-fA-F]{8,63}$/.test(e)?"txid":Sm(e)?"address":"invalid"}function pr(n,e){const t=n,a=n.trim();if(!a||a.length===0)return{type:"invalid",isValid:!1,value:"",rawInput:t,errorKey:"search.errors.emptyQuery"};const s=mr(a);if(s==="invalid")return{type:"invalid",isValid:!1,value:a,rawInput:t,errorKey:"search.errors.invalidBlockHeight"};if(s==="blockHeight"){const r=_m(a);if(r===null)return{type:"blockHeight",isValid:!1,value:a,rawInput:t,errorKey:"search.errors.invalidBlockHeight"};if(e!==void 0){const o=e+bm;if(r>o)return{type:"blockHeight",isValid:!1,value:r,rawInput:t,errorKey:"search.errors.blockOutOfRange",errorParams:{maxHeight:o}}}return{type:"blockHeight",isValid:!0,value:r,rawInput:t}}return s==="blockHash"?{type:"blockHash",isValid:!0,value:a.toLowerCase(),rawInput:t}:s==="txid"?{type:"txid",isValid:!0,value:a.toLowerCase(),rawInput:t}:s==="address"?{type:"address",isValid:!0,value:a,rawInput:t}:{type:"invalid",isValid:!1,value:a,rawInput:t,errorKey:"search.errors.invalidBlockHeight"}}function AS(n,e){return pr(n,e)}const wm=5e3;async function Vt(n,e={}){const{timeout:t,...a}=e,s=t??wm,r=Ds(),o=performance.now(),l=new AbortController,h=setTimeout(()=>l.abort(),s),m={...e.headers,"X-Correlation-ID":r};y.debug(g.API,`API Request: ${e.method||"GET"} ${n}`,{correlationId:r,url:n,method:e.method||"GET"});try{const f=await fetch(n,{...a,headers:m,signal:l.signal});clearTimeout(h);const b=performance.now()-o;if(!f.ok){f.status===404?y.debug(g.API,`API Not Found: ${f.status} ${f.statusText}`,{correlationId:r,url:n,status:f.status,duration:b}):y.error(g.API,`API Error: ${f.status} ${f.statusText}`,{correlationId:r,url:n,status:f.status,statusText:f.statusText,duration:b});const v=new Error(`API error: ${f.status} ${f.statusText}`);throw v.status=f.status,v}const S=await f.json();return y.info(g.API,`API Success: ${e.method||"GET"} ${n}`,{correlationId:r,url:n,status:f.status,duration:b}),S}catch(f){clearTimeout(h);const b=performance.now()-o;throw f instanceof Error&&"status"in f||y.error(g.API,`API Exception: ${n}`,{correlationId:r,url:n,error:f instanceof Error?f.message:String(f),duration:b}),f}}function Ka(n){return{type:"block",height:n.height,hash:n.hash,timestamp:n.timestamp,txCount:n.txCount,minFeeRate:n.minFee,medianFeeRate:n.medianFee,maxFeeRate:n.maxFee,totalFeesSatoshis:n.totalFeesSatoshis,subsidySatoshis:n.subsidySatoshis,miner:n.miner}}function Ga(n){const e=n.isCoinbase??!1,t=e?"Coinbase":Em(n.inputs),a=Tm(n.outputs,n.heuristics);return{type:"transaction",txid:n.txid,status:n.status,isCoinbase:e,blockHeight:n.blockHeight??null,blockHash:n.blockHash??null,confirmations:n.confirmations,value:n.totalOutputSatoshis,fee:n.feeSatoshis,feeRate:n.feeRate,timestamp:n.timestamp,size:n.size,vsize:n.vsize,isRbf:n.isRbf,senderAddress:t,receiverAddress:a,inputCount:n.inputs?.length??0,outputCount:n.outputs?.length??0,totalInputSatoshis:n.totalInputSatoshis,heuristics:n.heuristics?{pattern:n.heuristics.pattern,receiverType:Cm(n.heuristics.outputs)?.type??"unknown",confidence:n.heuristics.overallConfidence}:void 0}}function On(n){return!n||n.length<20?!1:!!(/^[13][1-9A-HJ-NP-Za-km-z]{24,33}$/.test(n)||/^bc1[a-z0-9]{38,85}$/.test(n)||/^[mn2][1-9A-HJ-NP-Za-km-z]{24,33}$/.test(n)||/^tb1[a-z0-9]{38,85}$/.test(n))}function Em(n){if(!n||n.length===0||n[0].txid==="0000000000000000000000000000000000000000000000000000000000000000")return"Coinbase";const e=n[0].address;return e?On(e)?e:"Non-standard output":"Unknown"}function Tm(n,e){if(!n||n.length===0)return"Unknown";if(e?.outputs){const a=e.outputs.find(s=>s.type==="payment");if(a&&n[a.index]){const s=n[a.index].address;if(s&&On(s))return s}}return n.find(a=>On(a.address))?.address??"Unknown"}function Cm(n){return n.find(e=>e.type==="payment")??n[0]}function Za(n){const e=n.totalTransactionCount!=null&&n.totalTransactionCount>=0?n.totalTransactionCount:n.txCountReceived>=0?n.txCountReceived:-1;return{type:"address",address:n.address,addressType:n.addressType,balance:n.balanceSatoshis,pendingBalance:n.pendingBalanceSatoshis,txCount:e,txCountReceived:n.txCountReceived,txCountSent:n.txCountSent,totalReceived:n.totalReceivedSatoshis,totalSent:n.totalSentSatoshis,transactions:(n.transactions??[]).map(t=>({txid:t.txid,status:t.status,timestamp:t.timestamp,blockHeight:t.blockHeight??null,confirmations:t.confirmations,amountSatoshis:t.amountSatoshis,balanceChangeSatoshis:t.balanceChangeSatoshis,feeSatoshis:t.feeSatoshis,type:t.type})),hasMoreTransactions:n.hasMoreTransactions??!1}}class fr{BASE_PATH="/api/v1/explorer";async search(e){y.info(g.REPOSITORY,"Searching via Explorer API",{type:e.type,query:e.query,limit:e.limit});try{const t=await this.executeSearch(e);return t?(y.debug(g.REPOSITORY,"Search result received",{type:t.type,query:e.query}),[t]):[]}catch(t){return this.handleError(t,e)}}async executeSearch(e){switch(e.type){case"block":return this.searchBlock(e.query);case"transaction":return this.searchTransaction(e.query);case"address":return this.searchAddress(e.query);default:return this.searchUniversal(e.query)}}async searchUniversal(e){const t=await Vt(`${this.BASE_PATH}/search?q=${encodeURIComponent(e)}`,{method:"GET",timeout:15e3});if(!t.success||t.type==="unknown")return null;switch(t.type){case"block":return Ka(t.data);case"transaction":return Ga(t.data);case"address":return Za(t.data);default:return null}}async searchBlock(e){const t=await Vt(`${this.BASE_PATH}/block/${encodeURIComponent(e)}`,{method:"GET",timeout:15e3});return!t.success||!t.data?null:Ka(t.data)}async searchTransaction(e){const t=await Vt(`${this.BASE_PATH}/transaction/${encodeURIComponent(e)}`,{method:"GET",timeout:15e3});return!t.success||!t.data?null:Ga(t.data)}async searchAddress(e){const t=await Vt(`${this.BASE_PATH}/address/${encodeURIComponent(e)}`,{method:"GET",timeout:15e3});return!t.success||!t.data?null:Za(t.data)}handleError(e,t){const a=e;if(a.status===503||e instanceof Error&&e.message.includes("503")){const s=new Error("Explorer service is currently unavailable. Please try again later.");throw s.name="ServiceDisabled",y.warn(g.REPOSITORY,"Explorer service disabled",{type:t.type,query:t.query,reason:"Backend returned 503 Service Unavailable"}),s}return a.status===404||e instanceof Error&&e.message.includes("404")?(y.debug(g.REPOSITORY,"Search returned no results",{type:t.type,query:t.query}),[]):(y.error(g.REPOSITORY,"Search failed",{type:t.type,query:t.query,error:e instanceof Error?e.message:String(e)}),[])}}var te=(n=>(n.CLOSED="CLOSED",n.OPEN="OPEN",n.HALF_OPEN="HALF_OPEN",n))(te||{});const Am={timeout:5e3,errorThresholdPercentage:50,resetTimeout:3e4,rollingCountTimeout:1e4,volumeThreshold:5};class xm extends Error{constructor(e="Circuit breaker is open"){super(e),this.name="CircuitOpenError"}}class Bm extends Error{constructor(e="Circuit breaker timeout"){super(e),this.name="CircuitTimeoutError"}}class Rm{fn;config;_state=te.CLOSED;_fallbackFn=null;_successes=0;_failures=0;_rejects=0;_timeouts=0;_lastFailureTime=0;_rollingWindow=[];_events=new Map;_resetTimerId=null;constructor(e,t){this.fn=e,this.config={...Am,...t}}async fire(...e){if(this.checkResetTimeout(),this._state===te.OPEN){if(this._rejects++,this.emit("reject"),this._fallbackFn)return this._fallbackFn(...e);throw new xm}try{const t=await this.executeWithTimeout(e);return this.recordSuccess(),this._state===te.HALF_OPEN&&this.transitionTo(te.CLOSED),t}catch(t){throw this.recordFailure(),this._state===te.HALF_OPEN?this.transitionTo(te.OPEN):this.checkShouldOpen(),t}}fallback(e){return this._fallbackFn=e,this}getState(){return this.checkResetTimeout(),this._state}getStats(){this.checkResetTimeout();const e=this._successes+this._failures;return{successes:this._successes,failures:this._failures,rejects:this._rejects,timeouts:this._timeouts,errorPercentage:e>0?this._failures/e*100:0,state:this._state}}on(e,t){return this._events.has(e)||this._events.set(e,new Set),this._events.get(e)?.add(t),this}off(e,t){return this._events.get(e)?.delete(t),this}open(){this.transitionTo(te.OPEN)}close(){this.transitionTo(te.CLOSED)}reset(){this._successes=0,this._failures=0,this._rejects=0,this._timeouts=0,this._rollingWindow=[],this._lastFailureTime=0,this.clearResetTimer(),this._state=te.CLOSED}dispose(){this.clearResetTimer(),this._events.clear(),this.reset()}async executeWithTimeout(e){return new Promise((t,a)=>{const s=setTimeout(()=>{this._timeouts++,this.emit("timeout"),a(new Bm)},this.config.timeout);this.fn(...e).then(r=>{clearTimeout(s),t(r)}).catch(r=>{clearTimeout(s),a(r)})})}recordSuccess(){this._successes++,this._rollingWindow.push({time:Date.now(),success:!0}),this.pruneRollingWindow(),this.emit("success")}recordFailure(){this._failures++,this._lastFailureTime=Date.now(),this._rollingWindow.push({time:Date.now(),success:!1}),this.pruneRollingWindow(),this.emit("failure")}checkShouldOpen(){if(this._state!==te.CLOSED||this._rollingWindow.length!a.success).length/this._rollingWindow.length*100>=this.config.errorThresholdPercentage&&this.transitionTo(te.OPEN)}checkResetTimeout(){if(this._state!==te.OPEN)return;Date.now()-this._lastFailureTime>=this.config.resetTimeout&&this.transitionTo(te.HALF_OPEN)}transitionTo(e){const t=this._state;this._state=e,e===te.OPEN?(this._lastFailureTime=Date.now(),this.emit("open")):e===te.CLOSED&&t!==te.CLOSED?this.emit("close"):e===te.HALF_OPEN&&this.emit("halfOpen")}pruneRollingWindow(){const e=Date.now()-this.config.rollingCountTimeout;this._rollingWindow=this._rollingWindow.filter(t=>t.time>=e)}clearResetTimer(){this._resetTimerId!==null&&(clearTimeout(this._resetTimerId),this._resetTimerId=null)}emit(e){const t=this._events.get(e);if(t)for(const a of t)a()}}const Re=new Map,Im={createBreaker(n,e,t){const a=Re.get(n);if(a)return a;const s=new Rm(e,t);return Re.set(n,s),s},getBreaker(n){return Re.get(n)},hasBreaker(n){return Re.has(n)},disposeBreaker(n){const e=Re.get(n);e&&(e.dispose(),Re.delete(n))},disposeAll(){for(const n of Re.values())n.dispose();Re.clear()},getKeys(){return[...Re.keys()]},getStats(){const n={};for(const[e,t]of Re)n[e]=t.getStats();return n}},qt="search-api",Pm=100,Lm={timeout:15e3,errorThresholdPercentage:50,resetTimeout:3e4,rollingCountTimeout:1e4,volumeThreshold:3};class gr{baseRepository;circuitBreaker;fallbackCache=new Map;constructor(e){this.baseRepository=e??new fr,this.circuitBreaker=Im.createBreaker(qt,async(...t)=>{const a=t[0];return this.baseRepository.search(a)},Lm),this.circuitBreaker.on("open",()=>{y.warn(g.SERVICE,"Search circuit breaker OPENED",{breakerKey:qt})}),this.circuitBreaker.on("close",()=>{y.info(g.SERVICE,"Search circuit breaker CLOSED",{breakerKey:qt})}),this.circuitBreaker.on("halfOpen",()=>{y.info(g.SERVICE,"Search circuit breaker HALF-OPEN",{breakerKey:qt})}),y.info(g.SERVICE,"SearchRepositoryWithCircuitBreaker initialized")}async search(e){const t=`${e.type}:${e.query}`;try{const a=await this.circuitBreaker.fire(e);if(a.length>0){if(this.fallbackCache.size>=Pm){const s=this.fallbackCache.keys().next().value;s!==void 0&&this.fallbackCache.delete(s)}this.fallbackCache.set(t,a)}return a}catch(a){y.warn(g.SERVICE,"Search circuit breaker caught error",{query:e.query,error:a instanceof Error?a.message:String(a),isCircuitOpen:this.isCircuitOpen()});const s=this.fallbackCache.get(t);return s?(y.info(g.SERVICE,"Returning cached results due to circuit breaker"),s):[]}}isCircuitOpen(){return this.circuitBreaker.getState()===te.OPEN}getCircuitState(){return this.circuitBreaker.getState()}getCircuitStats(){return this.circuitBreaker.getStats()}resetCircuit(){this.circuitBreaker.reset(),y.info(g.SERVICE,"Search circuit breaker manually reset")}}const Dm="blocksight_frontend_search_latency_seconds";class yr{constructor(e){this.searchRepository=e,y.info(g.SERVICE,"SearchService initialized")}cache=new Map;cacheTTL=3e5;maxCacheSize=100;debounceTimer=null;pendingQuery=null;pendingResolve=null;pendingReject=null;searchStartTime=null;debounceStartTime=null;searchLatencyHistogram=Z.histogram(Dm,"Search latency by stage",[.05,.1,.25,.5,1,2,5],["stage"]);async debouncedSearch(e){this.searchStartTime=performance.now(),this.debounceStartTime=performance.now();const t=`${e.type}:${e.query}`,a=this.getCachedResults(t);if(a){y.debug(g.SERVICE,"Search cache hit",{query:e.query});const s=(performance.now()-this.searchStartTime)/1e3;return this.searchLatencyHistogram.observe(s,{stage:"total"}),a}return this.cancelPendingSearch(),new Promise((s,r)=>{this.pendingQuery=e,this.pendingResolve=s,this.pendingReject=r,this.debounceTimer=setTimeout(()=>{if(this.debounceStartTime){const o=(performance.now()-this.debounceStartTime)/1e3;this.searchLatencyHistogram.observe(o,{stage:"debounce"})}this.debounceTimer=null,this.executePendingSearch()},300)})}async directSearch(e){const t=performance.now(),a=`${e.type}:${e.query}`,s=this.getCachedResults(a);if(s){y.debug(g.SERVICE,"Direct search cache hit",{query:e.query});const f=(performance.now()-t)/1e3;return this.searchLatencyHistogram.observe(f,{stage:"total"}),s}const r=performance.now(),o=await this.searchRepository.search(e),l=(performance.now()-r)/1e3;this.searchLatencyHistogram.observe(l,{stage:"api"});const h=this.processResults(o);this.setCache(a,h);const m=(performance.now()-t)/1e3;return this.searchLatencyHistogram.observe(m,{stage:"total"}),h}cancelPendingSearch(){if(this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null,this.pendingReject)){const e=this.pendingReject;this.clearPendingState(),e(new Error("Search cancelled"))}}async executePendingSearch(){if(!this.pendingQuery){this.pendingReject&&this.pendingReject(new Error("No query pending")),this.clearPendingState();return}const e=this.pendingQuery,t=this.pendingResolve,a=this.pendingReject;try{const s=performance.now(),r=await this.searchRepository.search(e),o=(performance.now()-s)/1e3;this.searchLatencyHistogram.observe(o,{stage:"api"});const l=this.processResults(r);if(this.setCache(`${e.type}:${e.query}`,l),this.searchStartTime){const h=(performance.now()-this.searchStartTime)/1e3;this.searchLatencyHistogram.observe(h,{stage:"total"})}t&&t(l)}catch(s){y.error(g.SERVICE,"Debounced search failed",{query:e.query,error:s instanceof Error?s.message:String(s)}),a&&a(s instanceof Error?s:new Error(String(s)))}finally{this.searchStartTime=null,this.debounceStartTime=null,this.clearPendingState()}}clearPendingState(){this.pendingQuery=null,this.pendingResolve=null,this.pendingReject=null}getCachedResults(e){const t=this.cache.get(e);return t?Date.now()-t.timestamp>this.cacheTTL?(this.cache.delete(e),null):t.results:null}validateQuery(e){const t=e.trim();if(t.length===0)return{valid:!1,type:"all"};const a=mr(t),s={blockHeight:"all",blockHash:"block",txid:"transaction",address:"address"};return a==="invalid"?{valid:!1,type:"all"}:{valid:!0,type:s[a]??"all"}}processResults(e){return e.filter(a=>a.type==="block"?a.height>=0&&a.hash.length>0:a.type==="transaction"?a.txid.length>0&&(a.blockHeight===null||a.blockHeight>=0):a.type==="address"?a.address.length>0&&a.txCount>=0:!1).sort((a,s)=>a.type==="block"&&s.type==="block"?s.height-a.height:a.type==="transaction"&&s.type==="transaction"?s.value-a.value:a.type==="address"&&s.type==="address"?s.balance-a.balance:0)}clearCache(){y.info(g.SERVICE,"Clearing search cache",{entriesCleared:this.cache.size}),this.cache.clear()}setCache(e,t){if(this.cache.size>=this.maxCacheSize){const a=this.cache.keys().next().value;a!==void 0&&this.cache.delete(a)}this.cache.set(e,{results:t,timestamp:Date.now()}),y.debug(g.SERVICE,"Search results cached",{query:e,resultCount:t.length,cacheSize:this.cache.size})}}const Nm=[/)<[^<]*)*<\/script>/gi,/<[^>]+>/g,/javascript:/gi,/on\w+=/gi,/</gi,/>/gi,/&#/gi];function Om(n){let e=n.trim();for(const t of Nm)e=e.replace(t,"");return e=e.replace(/\0/g,""),e}const Ya={isActive:!1,query:"",isLoading:!1,hasError:!1,resultsCount:0},br=d.createContext(null),Mm=({children:n})=>{const[e,t]=d.useState(Ya),a=Qn("useBackendSearch"),s=d.useMemo(()=>{const f=new fr,b=new gr(f),S=new yr(b);return y.info(g.SERVICE,"SearchContext initialized",{backendSearchEnabled:a}),{searchRepository:b,searchService:S,isBackendSearchEnabled:a}},[a]),r=d.useCallback(f=>{const b=Om(f);b.trim()&&t({isActive:!0,query:b,isLoading:!0,hasError:!1,resultsCount:0})},[]),o=d.useCallback(f=>{t(b=>({...b,isLoading:!1,resultsCount:f}))},[]),l=d.useCallback((f,b)=>{t(S=>({...S,isLoading:!1,hasError:f}))},[]),h=d.useCallback(()=>{t(Ya)},[]),m={...e,startSearch:r,setSearchResults:o,setSearchError:l,closeSearch:h,...s};return u.jsx(br.Provider,{value:m,children:n})},na=()=>{const n=d.useContext(br);if(!n)throw new Error("useSearch must be used within SearchProvider");return n},Hm=()=>{const{selectAddress:n,clearSelection:e,mode:t,selectedAddress:a}=je();return{selectAddress:n,clearSelection:e,isAddressSelected:t==="address",selectedAddress:a}},Fm=()=>{const{selectBlock:n,clearSelection:e,mode:t,selectedBlock:a}=je();return{selectBlock:n,clearSelection:e,isBlockSelected:t==="block",selectedBlock:a}},jm=()=>{const{openDocument:n,closePanel:e,mode:t,documentType:a}=je();return{openDocument:n,closePanel:e,isDocumentOpen:t==="document",currentDocument:a}},Um=()=>{const{selectTransaction:n,clearSelection:e,mode:t,selectedTransaction:a}=je();return{selectTransaction:n,clearSelection:e,isTransactionSelected:t==="transaction",selectedTransaction:a}},aa=d.createContext(null),Wm=({children:n})=>{const e=ll(),t=Us(),a=na(),s=Kl(),r=ol();ql();const o=d.useRef("idle"),l=d.useMemo(()=>e.isOpen?"document":a.isActive?"search":t.entityType!=="none"?t.entityType:"idle",[e.isOpen,a.isActive,t.entityType]);d.useEffect(()=>{o.current!==l&&(r.trackModeChange(o.current,l),o.current=l)},[l,r]);const h=d.useCallback((w,L)=>{t.clearSelection(),a.closeSearch(),s.clear(),e.openDocument(w,L)},[e,t,a,s]),m=d.useCallback(w=>{En(t,s),e.closeDocument(),a.closeSearch(),t.selectBlock(w)},[e,t,a,s]),f=d.useCallback(w=>{En(t,s),e.closeDocument(),a.closeSearch(),t.selectTransaction(w)},[e,t,a,s]),b=d.useCallback(w=>{En(t,s),e.closeDocument(),a.closeSearch(),t.selectAddress(w)},[e,t,a,s]),S=d.useCallback(w=>{e.closeDocument(),t.clearSelection(),s.clear(),a.startSearch(w)},[e,t,a,s]),v=d.useCallback(()=>{const w=s.pop();if(w)switch(w.type){case"block":t.selectBlock(w.data),w.highlightedBlockHeight!==null&&t.highlightBlock(w.highlightedBlockHeight);break;case"transaction":t.selectTransaction(w.data),w.highlightedBlockHeight!==null&&t.highlightBlock(w.highlightedBlockHeight);break;case"address":t.selectAddress(w.data),w.highlightedBlockHeight!==null&&t.highlightBlock(w.highlightedBlockHeight);break}},[s,t]),T=d.useCallback(()=>{e.closeDocument(),t.clearSelection(),a.closeSearch(),s.clear()},[e,t,a,s]),_=d.useMemo(()=>({mode:l,documentType:e.documentType,documentInitialTab:e.initialTab,selectedBlock:t.selectedBlock,selectedTransaction:t.selectedTransaction,selectedAddress:t.selectedAddress,highlightedBlockHeight:t.highlightedBlockHeight,searchQuery:a.query,isSearchLoading:a.isLoading,hasSearchError:a.hasError,searchResultsCount:a.resultsCount,navigationStack:s.stack,canGoBack:s.canGoBack,openDocument:h,selectBlock:m,selectTransaction:f,selectAddress:b,highlightBlock:t.highlightBlock,clearHighlight:t.clearHighlight,clearSelection:t.clearSelection,startSearch:S,setSearchResults:a.setSearchResults,setSearchError:a.setSearchError,goBack:v,closePanel:T,reset:T}),[l,e.documentType,e.initialTab,t.selectedBlock,t.selectedTransaction,t.selectedAddress,t.highlightedBlockHeight,a.query,a.isLoading,a.hasError,a.resultsCount,s.stack,s.canGoBack,h,m,f,b,t.highlightBlock,t.clearHighlight,t.clearSelection,S,a.setSearchResults,a.setSearchError,v,T]);return u.jsx(aa.Provider,{value:_,children:n})};function En(n,e){n.entityType==="block"&&n.selectedBlock?e.push({type:"block",data:n.selectedBlock,highlightedBlockHeight:n.highlightedBlockHeight}):n.entityType==="transaction"&&n.selectedTransaction?e.push({type:"transaction",data:n.selectedTransaction,highlightedBlockHeight:n.highlightedBlockHeight}):n.entityType==="address"&&n.selectedAddress&&e.push({type:"address",data:n.selectedAddress,highlightedBlockHeight:n.highlightedBlockHeight})}const je=()=>{const n=d.useContext(aa);if(!n)throw new Error("useInfoPanel must be used within InfoPanelProvider");return n},xS=()=>d.useContext(aa),zm="_cubes_rdcpv_26",Vm="_loop_rdcpv_44",qm="_item_rdcpv_61",Tn={cubes:zm,loop:Vm,item:qm},$m=["mempool-far","mempool-near","next-upper","next-center","last-block","historical"],Km=n=>n<=3?"top":"bottom",Gm=n=>n<=2?"orange":n<=4?"red":"purple",ue=({className:n,ariaLabel:e="Loading blockchain data"})=>u.jsx("output",{className:`${Tn.cubes} ${n||""}`.trim(),"aria-label":e,"aria-live":"polite","data-testid":"loading-blocks",children:u.jsx("div",{className:Tn.loop,children:$m.map((t,a)=>{const s=a+1;return u.jsx("div",{className:Tn.item,"aria-hidden":"true","data-cube-number":s,"data-cube-position":Km(s),"data-cube-color":Gm(s),title:`Cube ${s}`},t)})})}),Zm="_bottomNav_1srgy_33",Ym="_tabList_1srgy_91",Jm="_tab_1srgy_91",Xm="_tabActive_1srgy_219",Qm="_tabIcon_1srgy_243",ep="_tabLabel_1srgy_261",ot={bottomNav:Zm,tabList:Ym,tab:Jm,tabActive:Xm,tabIcon:Qm,tabLabel:ep};d.memo(function({activeTab:e,onTabChange:t,className:a}){const{t:s}=re(),r=[{id:"home",labelKey:"mobileNav.home",icon:"🏠"},{id:"data",labelKey:"mobileNav.data",icon:"📊"},{id:"search",labelKey:"mobileNav.search",icon:"🔍"},{id:"settings",labelKey:"mobileNav.settings",icon:"⚙️"}];return u.jsx("nav",{className:`${ot.bottomNav} ${a||""}`,"aria-label":s("header.navigation"),children:u.jsx("div",{className:ot.tabList,role:"tablist",children:r.map(o=>u.jsxs("button",{role:"tab",type:"button","aria-selected":e===o.id,"aria-controls":`panel-${o.id}`,className:`${ot.tab} ${e===o.id?ot.tabActive:""}`,onClick:()=>t(o.id),children:[u.jsx("span",{className:ot.tabIcon,"aria-hidden":"true",children:o.icon}),u.jsx("span",{className:ot.tabLabel,children:s(o.labelKey)})]},o.id))})})});const tp="_drawerContainer_5hbtn_31",np="_backdrop_5hbtn_53",ap="_drawer_5hbtn_31",sp="_positionLeft_5hbtn_103",rp="_positionRight_5hbtn_117",ip="_header_5hbtn_137",op="_title_5hbtn_155",cp="_closeButton_5hbtn_177",lp="_content_5hbtn_263",Oe={drawerContainer:tp,backdrop:np,drawer:ap,positionLeft:sp,positionRight:rp,header:ip,title:op,closeButton:cp,content:lp};d.memo(function({isOpen:e,onClose:t,children:a,title:s,className:r}){const{t:o}=re(),l=Xu(),h=d.useRef(null),m=d.useCallback(b=>{b.key==="Escape"&&e&&t()},[e,t]);if(d.useEffect(()=>(e?(document.body.style.overflow="hidden",document.addEventListener("keydown",m)):document.body.style.overflow="",()=>{document.body.style.overflow="",document.removeEventListener("keydown",m)}),[e,m]),d.useEffect(()=>{e&&h.current&&h.current.focus()},[e]),!e)return null;const f=l==="right"?Oe.positionRight:Oe.positionLeft;return Bs.createPortal(u.jsxs("div",{className:Oe.drawerContainer,role:"presentation",children:[u.jsx("div",{className:Oe.backdrop,onClick:t,"aria-hidden":"true"}),u.jsxs("div",{ref:h,className:`${Oe.drawer} ${f} ${r||""}`,role:"dialog","aria-modal":"true","aria-label":s||o("mobileNav.openDrawer"),tabIndex:-1,children:[u.jsxs("div",{className:Oe.header,children:[s&&u.jsx("h2",{className:Oe.title,children:s}),u.jsx("button",{type:"button",className:Oe.closeButton,onClick:t,"aria-label":o("mobileNav.closeDrawer"),children:u.jsx("span",{"aria-hidden":"true",children:"×"})})]}),u.jsx("div",{className:Oe.content,children:a})]})]}),document.body)});const up="_footer_aedv6_6",dp={footer:up},vr=()=>{const{mode:n}=je();return n!=="idle"?null:u.jsx("footer",{className:dp.footer,"data-testid":"footer-copyright",children:"© 2026 Blocksight OÜ. All rights reserved."})};vr.displayName="FooterCopyright";const hp="/images/logo-complete-2x-CyZiMERj.png",mp="/images/logo-icon-only-CJFcFyzp.png",pp="_wrapper_7zjjx_3",fp="_grid_7zjjx_7",gp="_item_7zjjx_24",yp="_itemActive_7zjjx_49",bp="_itemUnavailable_7zjjx_54",vp="_checkmark_7zjjx_59",kp="_rtlText_7zjjx_66",Ze={wrapper:pp,grid:fp,item:gp,itemActive:yp,itemUnavailable:bp,checkmark:vp,rtlText:kp},Sp=Object.values(Ql);function kr({isOpen:n,onToggle:e,onClose:t,trigger:a}){const{i18n:s}=re(),r=d.useRef(null);d.useEffect(()=>{if(!n)return;const l=m=>{m.key==="Escape"&&t()},h=m=>{r.current&&!r.current.contains(m.target)&&t()};return document.addEventListener("keydown",l),document.addEventListener("click",h),()=>{document.removeEventListener("keydown",l),document.removeEventListener("click",h)}},[n,t]);const o=d.useCallback((l,h)=>{h&&Yu(l).then(()=>{s.changeLanguage(l),t()})},[s,t]);return u.jsxs("div",{ref:r,className:Ze.wrapper,children:[u.jsx("div",{role:"button",tabIndex:0,onClick:e,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&e()},children:a}),n&&u.jsx("div",{className:Ze.grid,role:"listbox","aria-label":"Select language",children:Sp.map(l=>{const h=s.language===l.code,m=[Ze.item,h&&Ze.itemActive,!l.available&&Ze.itemUnavailable].filter(Boolean).join(" ");return u.jsxs("button",{type:"button",role:"option","aria-selected":h,className:m,onClick:()=>o(l.code,l.available),disabled:!l.available,children:[h&&u.jsx("span",{className:Ze.checkmark,"aria-hidden":"true",children:"✓"}),u.jsx("span",{className:l.rtl?Ze.rtlText:void 0,children:l.nativeName})]},l.code)})})]})}kr.displayName="LanguageGrid";const _p="/images/health-chip-green-XaVTYWNA.png",wp="/images/health-chip-red-BjDQqEwS.png",Ep="/images/health-chip-yellow-BJdyXVjp.png",Tp="_healthChip_1tpup_12",Cp="_indicatorImage_1tpup_54",Ap="_healthChipLive_1tpup_66",xp="_healthChipStale_1tpup_73",Bp="_healthChipOffline_1tpup_79",Rp="_tooltipContainer_1tpup_120",Ip="_tooltipContent_1tpup_142",Pp="_tooltipRow_1tpup_149",Lp="_tooltipLabel_1tpup_157",Dp="_tooltipValue_1tpup_164",Np="_online_1tpup_173",Op="_stale_1tpup_177",Mp="_offline_1tpup_181",Hp="_qualityMessage_1tpup_186",Fp="_tooltipDivider_1tpup_198",jp="_tooltipSection_1tpup_204",Up="_tooltipSectionTitle_1tpup_208",D={healthChip:Tp,indicatorImage:Cp,healthChipLive:Ap,healthChipStale:xp,healthChipOffline:Bp,tooltipContainer:Rp,tooltipContent:Ip,tooltipRow:Pp,tooltipLabel:Lp,tooltipValue:Dp,online:Np,stale:Op,offline:Mp,qualityMessage:Hp,tooltipDivider:Fp,tooltipSection:jp,tooltipSectionTitle:Up},Ja=n=>({status:"offline",isOnline:!1,isStale:!1,isMock:!0,uptime:0,slaTarget:99.9,latencyP95:0,errorRate:0,lastHeartbeat:n-1e3*60*15,dataQualityMessage:"Using demo data - backend offline",sources:{blockchain:{status:"mock",ageSeconds:-1},market:{status:"mock",ageSeconds:-1},network:{status:"error",connected:!1}}});function Wp(n){switch(n){case"live":return _p;case"stale":return Ep;case"offline":return wp}}function Xa(n){return n<0?"N/A":n<60?`${n}s`:n<3600?`${Math.floor(n/60)}m`:`${Math.floor(n/3600)}h`}function zp(n){return n?.websocket?.connected===!0}function Vp(n){return n?.health?.services?.coreRpc===!0}function qp(n){const t=n?.health?.services?.coreRpc===!0,a=n?.websocket?.connected===!0;return t&&a}function $p(n,e,t,a,s){return!n||a?"offline":e&&t&&!s?"live":"stale"}function Kp(n){return{blockchain:{status:n.sources.blockchain.status,ageSeconds:n.sources.blockchain.ageSeconds},market:{status:n.sources.market.status,ageSeconds:n.sources.market.ageSeconds},network:{status:n.sources.network.status,connected:n.sources.network.status==="live"}}}const Gp=({onClick:n})=>{const{t:e}=re(),t=Rh(),a=Ih(),s=Qn("useRealHealthData"),r=d.useRef(Date.now());r.current=Date.now();const o=d.useMemo(()=>{const _=r.current;if(!s||!t?.health)return Ja(_);try{const w=zp(t),L=Vp(t),N=qp(t),U=a.sources.blockchain.isMock||a.sources.market.isMock,q=a.overall==="stale";return{status:$p(w,L,N,U,q),isOnline:w&&L,isStale:q,isMock:U,uptime:t.health.uptime??0,slaTarget:99.9,latencyP95:t.performance?.latency?.p95??0,errorRate:t.performance?.errorRate??0,lastHeartbeat:t.health.lastCheck??_,dataQualityMessage:a.message,sources:Kp(a)}}catch(w){return y.warn(g.COMPONENT,"HealthChip: Error calculating health metrics",{error:w instanceof Error?w:String(w)}),Ja(_)}},[t,a,s]),l=d.useMemo(()=>(Math.min(o.uptime/2592e3,1)*100).toFixed(2),[o.uptime]),h=d.useMemo(()=>{if(o.isOnline&&o.status==="live")return null;const _=r.current-o.lastHeartbeat,w=Math.floor(_/(1e3*60));if(w<1)return e("healthChip.heartbeat.justNow","Just now");if(w<60)return e("healthChip.heartbeat.minutesAgo","{{count}} min ago",{count:w});const L=Math.floor(w/60);return e("healthChip.heartbeat.hoursAgo","{{count}} hr ago",{count:L})},[o.isOnline,o.status,o.lastHeartbeat,e]),m=d.useMemo(()=>{switch(o.status){case"live":return e("healthChip.status.live","Live");case"stale":return e("healthChip.status.stale","Stale");case"offline":return o.isMock?e("healthChip.status.demo","Demo"):e("healthChip.status.offline","Offline")}},[o.status,o.isMock,e]),f=d.useMemo(()=>{switch(o.status){case"live":return D.online;case"stale":return D.stale;case"offline":return D.offline}},[o.status]),b=d.useMemo(()=>e("healthChip.ariaLabel","System status: {{status}}",{status:m}),[m,e]),S=u.jsxs("div",{className:D.tooltipContent,children:[u.jsxs("div",{className:D.tooltipRow,children:[u.jsx("span",{className:D.tooltipLabel,children:e("healthChip.statusLabel","Status")}),u.jsx("span",{className:`${D.tooltipValue} ${f}`,children:m})]}),o.dataQualityMessage&&u.jsx("div",{className:D.tooltipRow,children:u.jsx("span",{className:`${D.tooltipValue} ${D.qualityMessage}`,children:o.dataQualityMessage})}),u.jsx("div",{className:D.tooltipDivider}),u.jsx("div",{className:D.tooltipSection,children:u.jsx("span",{className:D.tooltipSectionTitle,children:e("healthChip.dataSources","Data Sources")})}),u.jsxs("div",{className:D.tooltipRow,children:[u.jsx("span",{className:D.tooltipLabel,children:e("healthChip.blockchain","Blockchain")}),u.jsx("span",{className:D.tooltipValue,children:o.sources.blockchain.status==="live"?`${Xa(o.sources.blockchain.ageSeconds)} ago`:o.sources.blockchain.status})]}),u.jsxs("div",{className:D.tooltipRow,children:[u.jsx("span",{className:D.tooltipLabel,children:e("healthChip.market","Market")}),u.jsx("span",{className:D.tooltipValue,children:o.sources.market.status==="live"?`${Xa(o.sources.market.ageSeconds)} ago`:o.sources.market.status})]}),u.jsxs("div",{className:D.tooltipRow,children:[u.jsx("span",{className:D.tooltipLabel,children:e("healthChip.websocket","WebSocket")}),u.jsx("span",{className:`${D.tooltipValue} ${o.sources.network.connected?D.online:D.offline}`,children:o.sources.network.connected?e("common.connected","Connected"):e("common.disconnected","Disconnected")})]}),u.jsx("div",{className:D.tooltipDivider}),u.jsx("div",{className:D.tooltipSection,children:u.jsx("span",{className:D.tooltipSectionTitle,children:e("healthChip.performance","Performance")})}),u.jsxs("div",{className:D.tooltipRow,children:[u.jsx("span",{className:D.tooltipLabel,children:e("healthChip.uptime","Uptime")}),u.jsxs("span",{className:D.tooltipValue,children:[l,"%"]})]}),u.jsxs("div",{className:D.tooltipRow,children:[u.jsx("span",{className:D.tooltipLabel,children:e("healthChip.slaTarget","SLA Target")}),u.jsxs("span",{className:D.tooltipValue,children:[o.slaTarget,"%"]})]}),u.jsxs("div",{className:D.tooltipRow,children:[u.jsx("span",{className:D.tooltipLabel,children:e("healthChip.latency","Latency (p95)")}),u.jsxs("span",{className:D.tooltipValue,children:[o.latencyP95,"ms"]})]}),u.jsxs("div",{className:D.tooltipRow,children:[u.jsx("span",{className:D.tooltipLabel,children:e("healthChip.errorRate","Error Rate")}),u.jsxs("span",{className:D.tooltipValue,children:[o.errorRate.toFixed(2),"%"]})]}),h&&u.jsxs("div",{className:D.tooltipRow,children:[u.jsx("span",{className:D.tooltipLabel,children:e("healthChip.lastHeartbeat","Last Heartbeat")}),u.jsx("span",{className:D.tooltipValue,children:h})]})]}),v=d.useMemo(()=>{switch(o.status){case"live":return D.healthChipLive;case"stale":return D.healthChipStale;case"offline":return D.healthChipOffline}},[o.status]),T=u.jsx("button",{type:"button",className:`${D.healthChip} ${v}`,"aria-label":b,"data-testid":"health-chip",tabIndex:0,onClick:n,children:u.jsx("img",{src:Wp(o.status),alt:"","aria-hidden":"true",className:D.indicatorImage})});return n?T:u.jsx(ea,{trigger:T,position:"bottom",showDelay:100,hideDelay:150,contentClassName:D.tooltipContainer,toggleOnClick:!0,children:S})},Zp={block:"blockSelected",transaction:"transactionSelected",address:"addressSelected",document:"documentOpen",search:"searchActive"};function Yp(n,e,t,a){const s=[];e!==null&&s.push("txLocation");const r=Zp[n];return r&&s.push(r),t&&s.push("topScrollMoved"),a&&s.push("bottomScrollMoved"),s}function Jp(){const{isTopScrollMoved:n,isBottomScrollMoved:e}=$h(),{mode:t,highlightedBlockHeight:a}=je();return d.useMemo(()=>{const r=Yp(t,a,n,e),o=r.length>0;return{isActive:o,isDormant:!o,activationReason:r[0]??"none",activeConditions:r}},[t,a,n,e])}const Xp="_logoBeacon_urlsc_31",Qp="_logoContent_urlsc_79",Qa={logoBeacon:Xp,logoContent:Qp},Sr=d.memo(({onClick:n,children:e,className:t=""})=>{const{t:a}=re(),{isActive:s}=Jp(),r=d.useCallback(l=>{s&&(l.preventDefault(),n())},[s,n]),o=[Qa.logoBeacon,t].filter(Boolean).join(" ");return u.jsx("button",{type:"button",className:o,onClick:r,"aria-label":s?a("navigation.returnToHome","Return to home view"):a("header.home","BlockSight.Live home"),"data-testid":"logo-beacon","data-state":s?"active":"dormant",children:u.jsx("span",{className:Qa.logoContent,children:e})})});Sr.displayName="LogoBeacon";const ef="_header_trxq7_179",tf="_header__menu_trxq7_231",nf="_header__brand_trxq7_251",af="_header__logo_trxq7_275",sf="_header__aside_trxq7_359",we={"skip-link":"_skip-link_trxq7_103",header:ef,header__menu:tf,header__brand:nf,header__logo:af,"header__logo-complete":"_header__logo-complete_trxq7_305","header__search-container":"_header__search-container_trxq7_327",header__aside:sf,"lang-pill":"_lang-pill_trxq7_443","header__search-icon-mobile":"_header__search-icon-mobile_trxq7_883","header__search-modal-overlay":"_header__search-modal-overlay_trxq7_1191"};function rf(n){return tu[n]||"ENG"}const of={whitepaper:"whitepaper",docs:"docs",faq:"faq",api:"api",tzur:"tzur",about:"about",legal:"legal"},cf=[{key:"whitepaper",labelKey:"navigation.whitepaper",IconComponent:ki},{key:"docs",labelKey:"navigation.documentation",IconComponent:Si},{key:"faq",labelKey:"navigation.faq",IconComponent:_i},{key:"api",labelKey:"navigation.apiSubscription",IconComponent:wi,separator:!0},{key:"tzur",labelKey:"navigation.tzurWallet",IconComponent:Ei},{key:"about",labelKey:"navigation.aboutUs",IconComponent:Ti},{key:"legal",labelKey:"navigation.legal",IconComponent:Ci}];function lf(n,e,t){return cf.map(a=>({key:a.key,labelKey:a.labelKey,icon:d.createElement(a.IconComponent,{size:18}),onClick:()=>n(a.key),active:e&&t===a.key,separator:a.separator}))}const uf="_toastContainer_8391k_37",df="_topRight_8391k_59",hf="_topCenter_8391k_69",mf="_topLeft_8391k_81",pf="_bottomRight_8391k_91",ff="_bottomCenter_8391k_101",gf="_bottomLeft_8391k_113",yf="_toast_8391k_37",bf="_slideInRight_8391k_1",vf="_exiting_8391k_167",kf="_slideOutRight_8391k_1",Sf="_success_8391k_183",_f="_iconWrapper_8391k_191",wf="_error_8391k_199",Ef="_warning_8391k_215",Tf="_info_8391k_231",Cf="_loading_8391k_247",Af="_icon_8391k_191",xf="_iconLoading_8391k_295",Bf="_spin_8391k_1",Rf="_content_8391k_311",If="_message_8391k_321",Pf="_description_8391k_335",Lf="_actions_8391k_357",Df="_actionButton_8391k_369",Nf="_dismissButton_8391k_421",Of="_slideInBottom_8391k_1",Mf="_slideOutBottom_8391k_1",ne={toastContainer:uf,topRight:df,topCenter:hf,topLeft:mf,bottomRight:pf,bottomCenter:ff,bottomLeft:gf,toast:yf,slideInRight:bf,exiting:vf,slideOutRight:kf,success:Sf,iconWrapper:_f,error:wf,warning:Ef,info:Tf,loading:Cf,icon:Af,iconLoading:xf,spin:Bf,content:Rf,message:If,description:Pf,actions:Lf,actionButton:Df,dismissButton:Nf,slideInBottom:Of,slideOutBottom:Mf};function Hf(n){switch(n){case"success":return u.jsx("svg",{className:ne.icon,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:u.jsx("path",{d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",fill:"currentColor"})});case"error":return u.jsx("svg",{className:ne.icon,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",fill:"currentColor"})});case"warning":return u.jsx("svg",{className:ne.icon,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",fill:"currentColor"})});case"info":return u.jsx("svg",{className:ne.icon,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",fill:"currentColor"})});case"loading":return u.jsx("svg",{className:`${ne.icon} ${ne.iconLoading}`,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:u.jsx("path",{d:"M10 3a7 7 0 00-7 7h2a5 5 0 015-5V3z",fill:"currentColor"})});default:return null}}function Ff({toast:n,onDismiss:e,onPause:t,onResume:a}){const s=n.icon??Hf(n.type),r=()=>{n.action?.onClick(),e(n.id)};return u.jsxs("div",{className:`${ne.toast} ${ne[n.type]} ${n.visible?"":ne.exiting}`,role:"alert","data-testid":`toast-${n.type}`,"aria-live":n.type==="error"?"assertive":"polite","aria-atomic":"true",onMouseEnter:()=>t(n.id),onMouseLeave:()=>a(n.id),children:[s&&u.jsx("div",{className:ne.iconWrapper,children:s}),u.jsxs("div",{className:ne.content,children:[u.jsx("div",{className:ne.message,children:n.message}),n.description&&u.jsx("div",{className:ne.description,children:n.description}),n.action&&u.jsx("div",{className:ne.actions,children:u.jsx("button",{type:"button",className:ne.actionButton,onClick:r,children:n.action.label})})]}),n.dismissible&&u.jsx("button",{type:"button",className:ne.dismissButton,onClick:()=>e(n.id),"aria-label":"Dismiss notification",children:u.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:u.jsx("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]})}const $t={success:4e3,error:6e3,warning:5e3,info:4e3,loading:0},jf=3,es={exit:200},Uf={mobile:"bottom-center",desktop:"top-right"},Wf=768,sa=d.createContext(null);let zf=0;const Vf=()=>`toast-${++zf}-${Date.now()}`;function qf({children:n}){const[e,t]=d.useState([]),a=d.useContext(Jn),s=d.useRef(new Map),r=d.useRef();d.useEffect(()=>{const _=s.current;return()=>{_.forEach(w=>{clearTimeout(w)})}},[]),d.useEffect(()=>{e.forEach(_=>{if(s.current.has(_.id)||_.duration===0||!_.visible||_.pausedAt)return;const w=setTimeout(()=>{r.current?.(_.id,"auto")},_.duration);s.current.set(_.id,w)}),s.current.forEach((_,w)=>{e.find(L=>L.id===w)||(clearTimeout(s.current.get(w)),s.current.delete(w))})},[e]);const o=d.useCallback(_=>{const w=_.id??Vf(),L={id:w,type:_.type,message:_.message,description:_.description,duration:_.duration??$t[_.type],dismissible:_.dismissible??!0,action:_.action,icon:_.icon,onDismiss:_.onDismiss,correlationId:_.correlationId??a?.correlationId??"",createdAt:Date.now(),visible:!0};return y.info(g.COMPONENT,"Toast displayed",{toastId:w,type:L.type,message:L.message,correlationId:L.correlationId}),t(N=>{const U=N.filter(q=>q.visible);if(U.length>=jf){const q=U[0].id,K=s.current.get(q);K&&(clearTimeout(K),s.current.delete(q));const J=N.find(ye=>ye.id===q);return J?.onDismiss&&J.onDismiss(),setTimeout(()=>{t(ye=>ye.filter(ee=>ee.id!==q))},es.exit),[...N.map(ye=>ye.id===q?{...ye,visible:!1}:ye),L]}return[...N,L]}),w},[a?.correlationId]),l=d.useCallback((_,w="user")=>{s.current.has(_)&&(clearTimeout(s.current.get(_)),s.current.delete(_)),t(L=>L.map(N=>N.id===_&&N.visible?(N.onDismiss?.(),{...N,visible:!1}):N)),setTimeout(()=>{t(L=>L.filter(N=>N.id!==_))},es.exit),y.debug(g.COMPONENT,"Toast dismissed",{toastId:_,reason:w})},[]);d.useEffect(()=>{r.current=l},[l]);const h=d.useCallback(()=>{e.forEach(_=>{_.visible&&l(_.id,"user")})},[e,l]),m=d.useCallback(_=>{s.current.has(_)&&(clearTimeout(s.current.get(_)),s.current.delete(_))},[]),f=d.useCallback((_,w)=>{t(L=>L.map(N=>{if(N.id!==_)return N;const U={...N,...w};return w.type&&!w.duration&&(U.duration=$t[w.type],m(_)),U}))},[m]),b=d.useCallback(_=>{s.current.has(_)&&(clearTimeout(s.current.get(_)),s.current.delete(_)),t(w=>w.map(L=>L.id===_?{...L,pausedAt:Date.now()}:L))},[]),S=d.useCallback(_=>{s.current.has(_)&&(clearTimeout(s.current.get(_)),s.current.delete(_));let w=-1;if(t(L=>L.map(N=>N.id===_&&N.pausedAt?(w=Math.max(N.duration-(Date.now()-N.createdAt),0),{...N,pausedAt:void 0}):N)),w>0){const L=setTimeout(()=>l(_,"auto"),w);s.current.set(_,L)}else w===0&&l(_,"auto")},[l]),v=d.useCallback(async(_,w)=>{const L=o({type:"loading",message:w.loading,duration:0});try{const N=await _,U=typeof w.success=="function"?w.success(N):w.success;return f(L,{type:"success",message:U,duration:$t.success}),N}catch(N){const U=N instanceof Error?N:new Error(String(N)),q=typeof w.error=="function"?w.error(U):w.error;throw f(L,{type:"error",message:q,duration:$t.error}),U}},[o,f]),T=d.useMemo(()=>({toasts:e.filter(_=>_.visible),showToast:o,dismissToast:_=>l(_,"user"),dismissAll:h,updateToast:f,promise:v,_pauseToast:b,_resumeToast:S}),[e,o,l,h,f,v,b,S]);return u.jsx(sa.Provider,{value:T,children:n})}function $f(){const n=d.useContext(sa);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}function Kf(){const n=d.useContext(sa);if(!n)throw new Error("useToastInternal must be used within a ToastProvider");return n}function Gf(){const{showToast:n}=$f();return d.useCallback((e,t)=>n({type:"error",message:e,description:t}),[n])}function Zf(){const{toasts:n,dismissToast:e,dismissAll:t,_pauseToast:a,_resumeToast:s}=Kf(),[r,o]=d.useState("desktop"),[l]=d.useState(()=>typeof window<"u");if(d.useEffect(()=>{const m=()=>{o(window.innerWidthwindow.removeEventListener("resize",m)},[]),d.useEffect(()=>{const m=f=>{f.key==="Escape"&&n.length>0&&t()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[n.length,t]),!l||n.length===0)return null;const h=Uf[r]==="top-right"?ne.topRight:ne.bottomCenter;return Bs.createPortal(u.jsx("section",{className:`${ne.toastContainer} ${h}`,"aria-label":"Notifications",children:n.map(m=>u.jsx(Ff,{toast:m,onDismiss:e,onPause:a,onResume:s},m.id))}),document.body)}const Yf={html:n=>gn.sanitize(n),text:n=>gn.sanitize(n,{ALLOWED_TAGS:[]}),url:n=>{const e=gn.sanitize(n,{ALLOWED_TAGS:[]});try{const t=new URL(e);return["http:","https:"].includes(t.protocol)?e:""}catch{return""}},bitcoinId:n=>n.replace(/[^a-zA-Z0-9]/g,"")};function Jf(n){if(n<=0)return null;const t=O.getState().transformed?.blockchain?.summary?.mempoolBlocks??[];return mm(n,t)}function Xf(){const{t:n}=re(),e=Gf(),{selectBlock:t,selectTransaction:a,selectAddress:s,highlightBlock:r,closePanel:o}=je(),{selectBlockByHeight:l,selectBlockByHash:h}=Zh(),{selectTransactionByTxid:m,selectAddressByAddress:f}=hm(),{canSearch:b,cooldownRemaining:S,recordSearch:v}=ym(),{scrollToBlock:T}=rr(),{isMobile:_}=er(),w=d.useCallback(E=>{_||T(E,"smooth")},[_,T]),{searchService:L,isBackendSearchEnabled:N}=na(),[U,q]=d.useState(""),[K,J]=d.useState(!1),ye=d.useCallback(E=>{const P=Yf.bitcoinId(E);q(P)},[]),ee=d.useCallback((E,P,G)=>{let Ce;E?typeof P=="object"&&P?Ce=n(E,P):Ce=n(E,P??E):Ce=typeof P=="string"?P:n(G),e(Ce)},[e,n]),at=d.useCallback((E,P)=>{const G=E instanceof Error?E.message:String(E);if(E instanceof Error&&E.name==="ServiceDisabled"){y.warn(g.API,"Search service disabled",P),ee("search.errors.serviceDisabled","Search service is currently unavailable. Bitcoin Core RPC may be disabled.","search.errors.serviceDisabled");return}y.error(g.API,"Backend search failed",{...P,error:G}),ee("search.errors.backendFailed","Backend search failed. Please try again.","search.errors.backendFailed")},[ee]),jt=d.useCallback(E=>({kind:"real",id:{hash:E.hash,height:E.height},minedAtMs:E.timestamp*1e3,txCount:E.txCount,minFeeRate:E.minFeeRate,medianFeeRate:E.medianFeeRate,maxFeeRate:E.maxFeeRate,totalFeesSatoshis:E.totalFeesSatoshis,subsidySatoshis:E.subsidySatoshis,minerName:E.miner,isEnriched:E.minFeeRate>0}),[]),da=d.useCallback(E=>{const P=O.getState().transformed?.market?.prices?.btc?.usd??0,Ce=(E.fee??0)/1e8*P;return{id:{txid:E.txid},status:E.status,isCoinbase:E.isCoinbase,confirmations:E.confirmations,blockHeight:E.blockHeight,blockHash:E.blockHash,firstSeenMs:E.timestamp?E.timestamp*1e3:Date.now(),confirmedAtMs:E.status==="confirmed"&&E.timestamp?E.timestamp*1e3:null,feeSatoshis:E.fee,feeRate:E.feeRate,fiatFeeUsd:Ce,fiatFeeCurrency:Ce,isRbf:E.isRbf,senderAddress:E.senderAddress,receiverAddress:E.receiverAddress,inputCount:E.inputCount,outputCount:E.outputCount,totalInputValue:E.totalInputSatoshis,totalOutputValue:E.value,heuristics:E.heuristics?{pattern:E.heuristics.pattern,receiverType:E.heuristics.receiverType,confidence:E.heuristics.confidence}:void 0}},[]),ha=d.useCallback(E=>{const P=O.getState().transformed?.market?.prices?.btc?.usd??0,Ce=E.balance/1e8*P;return{address:E.address,addressType:E.addressType,balanceSatoshis:E.balance,balanceFiatUsd:Ce,balanceFiatCurrency:Ce,pendingBalanceSatoshis:E.pendingBalance,totalReceivedSatoshis:E.totalReceived,totalSentSatoshis:E.totalSent,txCountTotal:E.txCount,txCountReceived:E.txCountReceived,txCountSent:E.txCountSent,latestTransaction:null,transactions:E.transactions.map(Ae=>({id:{txid:Ae.txid},status:Ae.status,isCoinbase:!1,confirmations:Ae.confirmations,blockHeight:Ae.blockHeight,blockHash:null,firstSeenMs:Ae.timestamp?Ae.timestamp*1e3:Date.now(),confirmedAtMs:Ae.timestamp?Ae.timestamp*1e3:null,feeSatoshis:Ae.feeSatoshis??0,feeRate:0,fiatFeeUsd:0,fiatFeeCurrency:0,isRbf:!1,senderAddress:"",receiverAddress:"",inputCount:0,outputCount:0,totalInputValue:0,totalOutputValue:Ae.amountSatoshis??0})),hasMoreTransactions:E.hasMoreTransactions}},[]),ma=d.useCallback(async E=>{J(!0);try{const P=await L.debouncedSearch({type:"block",query:E.toString(),limit:1});if(P.length>0&&P[0].type==="block"){const G=jt(P[0]);return t(G),w(G.id.height),y.info(g.API,"Backend search successful",{height:E,hash:G.id.hash}),!0}return ee("search.errors.blockNotFound",`Block #${E.toLocaleString()} not found`,"search.errors.blockNotFound"),!1}catch(P){return at(P,{height:E}),!1}finally{J(!1)}},[L,jt,t,w,ee,at]),pa=d.useCallback(E=>{if(E.type==="block"){const P=jt(E);return t(P),w(P.id.height),!0}if(E.type==="transaction"){const P=da(E);if(a(P),P.blockHeight!==null)w(P.blockHeight);else{const G=Jf(P.feeRate);G!==null&&(r(G),w(G))}return!0}return!1},[jt,da,t,a,r,w]),fa=d.useCallback(async E=>{J(!0);try{const P=await L.directSearch({type:"all",query:E,limit:1});return P.length===0?(ee("search.errors.hashNotFound","No block or transaction found with this hash","search.errors.hashNotFound"),!1):pa(P[0])}catch(P){return at(P,{hash:E}),!1}finally{J(!1)}},[L,pa,ee,at]),ga=d.useCallback(async E=>{J(!0);try{const P=await L.debouncedSearch({type:"address",query:E,limit:1});if(P.length>0&&P[0].type==="address"){const G=ha(P[0]);return s(G),y.info(g.API,"Backend address search successful",{address:`${E.slice(0,8)}...`}),!0}return ee("search.errors.addressNotFound","Address not found","search.errors.addressNotFound"),!1}catch(P){return at(P,{address:E.slice(0,8)}),!1}finally{J(!1)}},[L,ha,s,ee,at]),ya=d.useCallback(async E=>{v();const P=l(E);return P.success?!0:N?await ma(E):(ee(P.errorKey,P.error,"search.errors.blockNotFound"),!1)},[v,l,N,ee,ma]),ba=d.useCallback(async E=>(v(),h(E).success||m(E).success?!0:N?await fa(E):(ee("search.errors.hashNotFound","No block or transaction found with this hash","search.errors.hashNotFound"),!1)),[v,h,m,N,ee,fa]),va=d.useCallback(async E=>{v();const P=await f(E);return P.success?!0:N?await ga(E):(ee(P.errorKey,P.error,"search.errors.addressNotFound"),!1)},[v,f,N,ee,ga]),ka=d.useCallback(async E=>{const{type:P,value:G}=E;return P==="blockHeight"?await ya(G):P==="blockHash"||P==="txid"?await ba(G):P==="address"?await va(G):(e(n("search.errors.notImplemented","Search type not yet supported"),n("search.errors.notImplementedDescription","Only block, transaction, and address search is available")),!1)},[ya,ba,va,e,n]),si=d.useCallback(async E=>{E.preventDefault();const P=U.trim();if(!P)return;if(!b){e(n("search.errors.rateLimited","Please wait before searching again"),n("search.errors.rateLimitedDescription","Try again in {{seconds}} seconds",{seconds:S}));return}const G=pr(P);if(!G.isValid){ee(G.errorKey,G.errorParams,"search.errors.invalidInput");return}o(),await ka(G)&&q("")},[U,b,S,e,n,o,ka,ee]);return{query:U,isSearching:K,canSearch:b,cooldownRemaining:S,handleSearchChange:ye,onSubmitSearch:si}}const Qf=()=>{const{t:n,i18n:e}=re(),{closePanel:t}=je(),{openDocument:a,isDocumentOpen:s,currentDocument:r}=jm(),{resetAllScrolls:o}=qh(),{query:l,isSearching:h,handleSearchChange:m,onSubmitSearch:f}=Xf(),b=rf(e.language),[S,v]=d.useState(null),T=d.useCallback(U=>{v(q=>q===U?null:U)},[]),_=d.useCallback(()=>{v(null)},[]),w=d.useCallback(U=>{const q=of[U];q&&(a(q),_())},[a,_]),L=d.useCallback(()=>{t(),o();const U=O.getState();U.raw.electrumServer.windowCenter!==null&&O.updateState({raw:{...U.raw,electrumServer:{...U.raw.electrumServer,windowCenter:null}}})},[t,o]);d.useEffect(()=>{if(S!=="search-modal")return;const U=q=>{q.key==="Escape"&&_()};return document.addEventListener("keydown",U),()=>{document.removeEventListener("keydown",U)}},[S,_]);const N=d.useMemo(()=>lf(w,s,r),[w,s,r]);return u.jsx(le,{componentName:"Header",maxRetries:2,enableAutoRecovery:!0,fallback:({error:U,retry:q})=>u.jsx(Os,{componentName:"Header",errorMessage:"Unable to load navigation and search",errorDetails:U?.message||"Header component error",onRetry:q,onReload:()=>window.location.reload(),severity:"high",size:"mini"}),children:u.jsxs("header",{className:we.header,"data-testid":"header",children:[u.jsx("a",{href:"#main-content",className:we["skip-link"],children:n("accessibility.skipToContent","Skip to main content")}),u.jsx("div",{className:we.header__menu,children:u.jsx(Ro,{trigger:u.jsx(Hs,{icon:u.jsx(Ai,{size:24}),"aria-label":n("header.navigation"),variant:"ghost",size:"md"}),items:N,isOpen:S==="nav",onToggle:()=>T("nav"),onClose:_,position:"left"})}),u.jsx("div",{className:we.header__brand,children:u.jsx(Sr,{onClick:L,className:we.header__logo,children:u.jsxs("picture",{children:[u.jsx("source",{media:"(max-width: 768px)",srcSet:mp}),u.jsx("img",{src:hp,alt:"BlockSight.Live","data-testid":"header-logo",className:we["header__logo-complete"]})]})})}),u.jsxs("div",{className:we["header__search-container"],children:[u.jsx(Wa,{query:l,onChange:m,onSubmit:f,isLoading:h}),u.jsx(kr,{isOpen:S==="lang",onToggle:()=>T("lang"),onClose:_,trigger:u.jsx("button",{type:"button",className:we["lang-pill"],"aria-label":"Select language",title:"Select language",children:b})})]}),u.jsx("button",{className:we["header__search-icon-mobile"],onClick:()=>v("search-modal"),"aria-label":n("header.openSearch","Open search"),type:"button",children:u.jsx(xi,{size:24})}),S==="search-modal"&&u.jsx("div",{className:we["header__search-modal-overlay"],children:u.jsx(Wa,{query:l,onChange:m,onSubmit:async U=>{await f(U),_()},autoFocus:!0,isLoading:h})}),u.jsx("aside",{className:we.header__aside,children:u.jsx(Gp,{})})]})})},eg="_nav_1o4hi_7",tg="_link_1o4hi_23",Kt={nav:eg,link:tg},_r=()=>{const{mode:n}=je(),{t:e}=re();return n!=="idle"?null:u.jsxs("nav",{className:Kt.nav,"data-testid":"legal-links-footer","aria-label":"Legal links",children:[u.jsx(Jt,{to:"/privacy",className:Kt.link,children:e("footerLinks.privacy")}),u.jsx(Jt,{to:"/terms",className:Kt.link,children:e("footerLinks.terms")}),u.jsx(Jt,{to:"/accessibility",className:Kt.link,children:e("footerLinks.accessibility")})]})};_r.displayName="LegalLinksFooter";function ng(){const{i18n:n}=re();d.useEffect(()=>{const e=n.language;document.documentElement.dir="ltr",document.documentElement.lang=e},[n.language])}function ag(){const n=ci();d.useEffect(()=>{Z.counter("page_views_total","Total number of page views",["path"]).inc({path:n.pathname})},[n.pathname])}const sg="/api/v1/analytics/visit";function rg(n="explorer"){d.useEffect(()=>{if(typeof fetch>"u"||navigator.doNotTrack==="1")return;const e=window.location.pathname,t=document.referrer?new URL(document.referrer).hostname===window.location.hostname?"internal":"external":"direct";fetch(sg,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({page:e,referrerType:t,app:n})}).catch(()=>{})},[n])}const en="chunk-reload-attempted";function ie(n){return d.lazy(()=>n().catch(e=>{if(!sessionStorage.getItem(en))return sessionStorage.setItem(en,"true"),window.location.reload(),new Promise(()=>{});throw sessionStorage.removeItem(en),e}))}function ig(){sessionStorage.removeItem(en)}const ts=ie(()=>k(()=>import("./Dashboard-_EicKBCA.js").then(n=>n.D),__vite__mapDeps([0,1,2,3,4,5,6])).then(n=>({default:n.Dashboard}))),og=ie(()=>k(()=>import("./Whitepaper-DgRZANn_.js"),__vite__mapDeps([7,1,2,3,4,5,8,9,10])).then(n=>({default:n.Whitepaper}))),cg=ie(()=>k(()=>import("./Documentation-CI57t0D0.js"),__vite__mapDeps([11,1,2,3,4,5,8,9,10])).then(n=>({default:n.Documentation}))),lg=ie(()=>k(()=>import("./ApiSubscription-Bui2c1hP.js"),__vite__mapDeps([12,1,2,3,4,5,8,9,10])).then(n=>({default:n.ApiSubscription}))),ug=ie(()=>k(()=>import("./AboutUs-SrzAd9tp.js"),__vite__mapDeps([13,1,2,3,4,5,8,9,10])).then(n=>({default:n.AboutUs}))),dg=ie(()=>k(()=>import("./Legal-CUSdcxl3.js"),__vite__mapDeps([14,1,2,3,4,5,8,9,10])).then(n=>({default:n.Legal}))),hg=ie(()=>k(()=>import("./Terms-Yph67RZP.js"),__vite__mapDeps([15,1,2,3,4,5,8,9,10])).then(n=>({default:n.Terms}))),mg=ie(()=>k(()=>import("./Privacy-h2zjwQPv.js"),__vite__mapDeps([16,1,2,3,4,5,8,9,10])).then(n=>({default:n.Privacy}))),ns=ie(()=>k(()=>import("./Accessibility-E8IYexzZ.js"),__vite__mapDeps([17,1,2,3,4,5,8,9,10])).then(n=>({default:n.Accessibility}))),pg=ie(()=>k(()=>import("./FAQ-CoeXoYCC.js"),__vite__mapDeps([18,1,2,3,4,5,8,9,10]))),fg=ie(()=>k(()=>import("./TzurWallet-DXqgkldw.js"),__vite__mapDeps([19,1,2,3,4,5,8,9,10]))),gg=ie(()=>k(()=>import("./index-CRJyBhO1.js"),__vite__mapDeps([20,1,5,3,8,9,10,21])).then(n=>({default:n.ClaudeInstall}))),yg=()=>u.jsx(fc,{children:u.jsxs(li,{children:[u.jsx(ce,{path:"/",element:u.jsx(le,{componentName:"Dashboard",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(ts,{})})})}),u.jsx(ce,{path:"/dashboard",element:u.jsx(le,{componentName:"Dashboard",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(ts,{})})})}),u.jsx(ce,{path:"/whitepaper",element:u.jsx(le,{componentName:"Whitepaper",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(og,{})})})}),u.jsx(ce,{path:"/docs",element:u.jsx(le,{componentName:"Documentation",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(cg,{})})})}),u.jsx(ce,{path:"/api",element:u.jsx(le,{componentName:"ApiSubscription",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(lg,{})})})}),u.jsx(ce,{path:"/about",element:u.jsx(le,{componentName:"AboutUs",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(ug,{})})})}),u.jsx(ce,{path:"/legal",element:u.jsx(le,{componentName:"Legal",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(dg,{})})})}),u.jsx(ce,{path:"/terms",element:u.jsx(le,{componentName:"Terms",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(hg,{})})})}),u.jsx(ce,{path:"/privacy",element:u.jsx(le,{componentName:"Privacy",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(mg,{})})})}),u.jsx(ce,{path:"/accessibility",element:u.jsx(le,{componentName:"Accessibility",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(ns,{})})})}),u.jsx(ce,{path:"/legal/accessibility",element:u.jsx(le,{componentName:"Accessibility",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(ns,{})})})}),u.jsx(ce,{path:"/faq",element:u.jsx(le,{componentName:"FAQ",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(pg,{})})})}),u.jsx(ce,{path:"/tzur",element:u.jsx(le,{componentName:"TzurWallet",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(fg,{})})})}),u.jsx(ce,{path:"/claude",element:u.jsx(le,{componentName:"ClaudeInstall",maxRetries:2,children:u.jsx(d.Suspense,{fallback:u.jsx(ue,{}),children:u.jsx(gg,{})})})}),u.jsx(ce,{path:"*",element:u.jsx(ui,{to:"/",replace:!0})})]})}),bg=()=>{ng(),ag(),rg("explorer");const{layoutMode:n}=kh(),[e,t]=d.useState(!0),[a,s]=d.useState(!1),r=d.useCallback(()=>{s(!0)},[]),o=d.useCallback(()=>{t(!1)},[]);return d.useEffect(()=>{const l=setTimeout(r,2e3),h=setTimeout(o,4e3);return()=>{clearTimeout(l),clearTimeout(h)}},[r,o]),u.jsxs("div",{className:"app",children:[n!=="single"&&u.jsx(Qf,{}),e&&u.jsx("div",{className:`splash-screen ${a?"fade-out":""}`,children:u.jsx(ue,{})}),u.jsx("main",{className:`main-content ${a?"loaded":"loading"}`,children:u.jsx(yg,{})}),u.jsx(vr,{}),u.jsx(_r,{})]})},vg="_loading_1lmcz_97",kg="_loaded_1lmcz_105",as={"image-background":"_image-background_1lmcz_23","lazy-image-container":"_lazy-image-container_1lmcz_63","lazy-image":"_lazy-image_1lmcz_63",loading:vg,loaded:kg,"image-quality-high":"_image-quality-high_1lmcz_115","image-quality-medium":"_image-quality-medium_1lmcz_125","image-quality-low":"_image-quality-low_1lmcz_133"},Sg=d.lazy(()=>k(()=>import("./LazyImage-DJdYTe-M.js"),__vite__mapDeps([22,1,3,8,9,10]))),_g=({quality:n="high",imageName:e="cosmic"})=>{const[t,a]=d.useState(!1),s=()=>{a(!0)};return t?null:u.jsx("div",{className:`${as["image-background"]} ${as[`image-quality-${n}`]}`,"data-testid":"cosmic-background",children:u.jsx(d.Suspense,{fallback:null,children:u.jsx(Sg,{imageName:e,quality:n,onError:s})})})},wr=d.createContext(null),Cn=["idle","preparing","anticipation","descent","merge","complete"];function wg(n){const e=Cn.indexOf(n);return e===-1||e>=Cn.length-1?"idle":Cn[e+1]}const Eg=({children:n})=>{const t=ta().transformed.blockFound,a=d.useCallback(()=>{const l=O.getState(),h=l.transformed.blockFound.phase,m=wg(h);if(m==="complete"){const b={transformed:{...l.transformed,blockFound:{...l.transformed.blockFound,phase:"complete"}}};O.updateState(b);return}if(h==="complete"||m==="idle"){const b={transformed:{...l.transformed,blockFound:{...l.transformed.blockFound,isAnimating:!1,phase:"idle",currentEvent:null}}};O.updateState(b);return}const f={transformed:{...l.transformed,blockFound:{...l.transformed.blockFound,phase:m}}};O.updateState(f)},[]),s=d.useCallback(()=>{const l=O.getState(),h={transformed:{...l.transformed,blockFound:{...l.transformed.blockFound,phase:"complete"}}};O.updateState(h),requestAnimationFrame(()=>{const m=O.getState(),f={transformed:{...m.transformed,blockFound:{isAnimating:!1,phase:"idle",currentEvent:null,lastBlockFoundAt:m.transformed.blockFound.lastBlockFoundAt}}};O.updateState(f)})},[]),r=d.useCallback(l=>{const m={transformed:{...O.getState().transformed,blockFound:{isAnimating:!0,phase:"preparing",currentEvent:l,lastBlockFoundAt:Date.now()}}};O.updateState(m)},[]),o=d.useMemo(()=>({state:t,isAnimating:t.isAnimating,phase:t.phase,currentEvent:t.currentEvent,advancePhase:a,completeAnimation:s,triggerAnimation:r}),[t,a,s,r]);return u.jsx(wr.Provider,{value:o,children:n})},Er=()=>{const n=d.useContext(wr);if(!n)throw new Error("useBlockFound must be used within BlockFoundProvider");return n},Tr=()=>{const{advancePhase:n,completeAnimation:e,triggerAnimation:t}=Er();return{advancePhase:n,completeAnimation:e,triggerAnimation:t}};class Tg{constructor(e,t){this.callback=e,this.intervalMs=t}interval=null;start(){this.interval||(this.interval=setInterval(this.callback,this.intervalMs))}stop(){this.interval&&(clearInterval(this.interval),this.interval=null)}get isRunning(){return this.interval!==null}}const Cg={batchSize:10,flushIntervalMs:5e3,maxRetries:3,enabled:!0,maxBufferSize:100};class Ag{constructor(e,t={}){this.faroService=e,this.config={...Cg,initialRetryDelayMs:100,...t},this.flushTimer=new Tg(()=>{this.flush()},this.config.flushIntervalMs),this.config.enabled&&this.config.flushIntervalMs>0&&this.flushTimer.start()}config;buffer=[];flushTimer;isShutdown=!1;async ship(e){!this.isReady()||this.isShutdown||(this.buffer.push(...e),(this.buffer.length>=this.config.batchSize||this.buffer.length>=this.config.maxBufferSize)&&await this.flush())}async flush(){if(this.buffer.length===0||!this.config.enabled)return;const e=[...this.buffer];this.buffer=[];for(const t of e)await this.shipSingleLog(t)}async shipSingleLog(e,t=1){try{const a=this.mapLogLevel(e.level),s=this.buildContext(e);this.faroService.captureLog(a,e.message,s)}catch(a){if(tsetTimeout(t,e))}}const Cr={},ss={development:"http://localhost:3001/collect",staging:"https://faro-staging.grafana.net/collect",production:"https://faro.grafana.net/collect",test:""};function ra(){return typeof import.meta<"u"||typeof process<"u"?"production":"development"}function xg(){if(typeof import.meta<"u"&&Cr?.VITE_FARO_COLLECTOR_URL)return;const n=ra();return ss[n]||ss.development}function Bg(){if(typeof import.meta<"u")return!1;const n=ra();return!(n==="test"||n==="development")}function Rg(){if(!(typeof import.meta<"u"&&Cr?.VITE_APP_VERSION))return"1.0.0"}function Ig(){return{name:"blocksight-frontend",version:Rg(),environment:ra()}}function Pg(){return{url:xg(),app:Ig(),enabled:Bg()}}function Lg(n){const e=Pg();return{...e,...n,app:{...e.app,...n?.app}}}class Ye{static instance=null;faroInstance=null;config=null;initialized=!1;constructor(){}static getInstance(){return Ye.instance||(Ye.instance=new Ye),Ye.instance}static resetInstance(){Ye.instance=null}async initialize(e){if(!this.initialized&&(this.config=e,e.enabled!==!1))try{const{initializeFaro:t,getWebInstrumentations:a}=await k(async()=>{const{initializeFaro:s,getWebInstrumentations:r}=await import("./vendor-observability-DZmngUBG.js").then(o=>o.d);return{initializeFaro:s,getWebInstrumentations:r}},__vite__mapDeps([9,1]));this.faroInstance=t({url:e.url,app:{name:e.app.name,version:e.app.version,environment:e.app.environment},instrumentations:[...a()],sessionTracking:{enabled:!0},beforeSend:s=>(e.correlationId&&s.meta&&(s.meta.correlation_id=e.correlationId),s)}),this.initialized=!0}catch(t){console.error("[FaroService] Failed to initialize Faro:",t)}}isInitialized(){return this.initialized}captureError(e,t){if(!this.initialized||!this.faroInstance){console.warn("[FaroService] captureError called before initialization");return}try{this.faroInstance.api.pushError(e,t)}catch(a){console.error("[FaroService] Failed to capture error:",a)}}captureLog(e,t,a){if(!this.initialized||!this.faroInstance){console.warn("[FaroService] captureLog called before initialization");return}try{const s=this.mapLogLevel(e);this.faroInstance.api.pushLog([t],{level:s,context:a})}catch(s){console.error("[FaroService] Failed to capture log:",s)}}setUser(e,t){if(!this.initialized||!this.faroInstance){console.warn("[FaroService] setUser called before initialization");return}try{this.faroInstance.api.setUser({id:e,attributes:t})}catch(a){console.error("[FaroService] Failed to set user:",a)}}getSession(){if(!this.initialized||!this.faroInstance)return null;try{const e=this.faroInstance.api.getSession();if(e)return{id:e.id,attributes:{}}}catch(e){console.error("[FaroService] Failed to get session:",e)}return null}getSessionId(){return this.getSession()?.id??null}getConfig(){return this.config}mapLogLevel(e){return{debug:"debug",info:"info",warn:"warn",error:"error"}[e]||"info"}}function Dg(n){n.isInitialized()||console.warn("[FaroTraceEnricher] Faro not initialized, enricher will return empty attributes")}const Ng=d.createContext(null);function Og({children:n,config:e,correlationId:t}){const[a,s]=d.useState(!1),r=Ye.getInstance(),o=d.useRef(null);d.useEffect(()=>((async()=>{try{const m=Lg({...e,correlationId:t});await r.initialize(m);const f=r.isInitialized();s(f),f&&(o.current||(o.current=new Ag(r),tn.addTransport(o.current)),Dg(r))}catch(m){y.error(g.CONTEXT,"Failed to initialize Faro",{error:m instanceof Error?m:String(m)})}})(),()=>{o.current&&(tn.removeTransport(o.current),o.current=null)}),[e,t,r]);const l={captureError:(h,m)=>{r.captureError(h,m)},captureLog:(h,m,f)=>{r.captureLog(h,m,f)},setUser:(h,m)=>{r.setUser(h,m)},getSession:()=>r.getSession(),getSessionId:()=>r.getSessionId(),isInitialized:a};return u.jsx(Ng.Provider,{value:l,children:n})}class Mg{connection=null;async connect(e){return y.info(g.REPOSITORY,"Connecting to WebSocket",{url:e}),new Promise((t,a)=>{try{this.connection=new WebSocket(e);const s=this.connection;s.onopen=()=>{y.info(g.REPOSITORY,"WebSocket connected",{url:e}),this.connection?t(this.connection):a(new Error("WebSocket connection was lost"))},s.onerror=r=>{y.error(g.REPOSITORY,"WebSocket connection error",{url:e,error:r instanceof Error?r.message:String(r)}),a(new Error(`WebSocket connection failed: ${r}`))},s.onclose=()=>{y.debug(g.REPOSITORY,"WebSocket closed",{url:e}),this.connection=null}}catch(s){y.error(g.REPOSITORY,"Failed to create WebSocket",{url:e,error:s instanceof Error?s.message:String(s)}),a(new Error(`Failed to create WebSocket: ${s}`))}})}disconnect(){this.connection&&(y.info(g.REPOSITORY,"Disconnecting WebSocket"),this.connection.close(),this.connection=null)}send(e){if(!this.connection||this.connection.readyState!==WebSocket.OPEN)throw new Error("WebSocket is not connected");const t=typeof e=="string"?e:JSON.stringify(e);this.connection.send(t)}isConnected(){return this.connection!==null&&this.connection.readyState===WebSocket.OPEN}addEventListener(e,t){this.connection&&this.connection.addEventListener(e,t)}removeEventListener(e,t){this.connection&&this.connection.removeEventListener(e,t)}}class Pe{constructor(e,t,a,s){this.status=e,this.lastConnected=t,this.reconnectAttempts=a,this.error=s,this.validate()}validate(){if(!Pe.isValidStatus(this.status))throw new Error("Invalid connection status");if(this.reconnectAttempts<0)throw new Error("Reconnect attempts must be non-negative")}static isValidStatus(e){return["connecting","connected","disconnected","error"].includes(e)}static create(e,t={}){return new Pe(e,t.lastConnected??null,t.reconnectAttempts??0,t.error??null)}isConnected(){return this.status==="connected"}canReconnect(e){return this.status==="disconnected"&&this.reconnectAttempts{this.subscribers.delete(e),y.debug(g.SERVICE,"Message subscriber removed",{subscriberCount:this.subscribers.size})}}getConnectionState(){return this.connectionState}setMaxReconnectAttempts(e){this.maxReconnectAttempts=e}getSubscriberCount(){return this.subscribers.size}getReconnectAttempts(){return this.connectionState.reconnectAttempts}setupMessageHandler(){this.messageHandler&&this.webSocketRepository.removeEventListener("message",this.messageHandler),this.messageHandler=t=>{const a=t;let s;try{s=JSON.parse(a.data)}catch{s=a.data}this.subscribers.forEach(r=>{try{r(s)}catch(o){y.error(g.SERVICE,"Error in message subscriber",{error:o instanceof Error?o.message:String(o)})}})},this.webSocketRepository.addEventListener("message",this.messageHandler);const e=()=>{this.connectionState=Pe.create("disconnected"),this.connectionState.canReconnect(this.maxReconnectAttempts)&&this.scheduleReconnect()};this.webSocketRepository.addEventListener("close",e)}scheduleReconnect(){if(this.reconnectTimer||!this.currentUrl)return;const e=this.connectionState.reconnectAttempts,t=Math.min(this.reconnectDelay*2**e,3e4),a=e===0?"connection_lost":"retry";this.reconnectionCounter.inc({reason:a}),y.info(g.SERVICE,"Scheduling WebSocket reconnection",{attempt:e+1,maxAttempts:this.maxReconnectAttempts,delay:t}),this.reconnectTimer=setTimeout(async()=>{this.reconnectTimer=null;const s=Pe.create("connecting",{reconnectAttempts:e+1});if(this.connectionState=s,!this.currentUrl){y.warn(g.SERVICE,"Cannot reconnect: no URL stored");return}try{await this.connect(this.currentUrl)}catch(r){y.warn(g.SERVICE,"WebSocket reconnection failed",{attempt:e+1,error:r instanceof Error?r.message:String(r)})}},t)}}var Je=(n=>(n.SINGLETON="singleton",n.TRANSIENT="transient",n))(Je||{});class jg{services=new Map;singletonInstances=new Map;resolutionStack=[];register(e){this.services.has(e.name)&&y.warn(g.SERVICE,`Service '${e.name}' already registered, overwriting`,{service:e.name}),this.services.set(e.name,e),y.debug(g.SERVICE,`Service registered: ${e.name}`,{service:e.name,lifecycle:e.lifecycle,dependencies:e.dependencies||[]})}resolve(e){const t=this.services.get(e);if(!t){const a=new Error(`Service '${e}' not registered`);throw y.error(g.SERVICE,`Service resolution failed: ${e}`,{service:e,error:a.message}),a}if(this.resolutionStack.includes(e)){const a=[...this.resolutionStack,e].join(" -> "),s=new Error(`Circular dependency detected: ${a}`);throw y.error(g.SERVICE,"Circular dependency detected",{service:e,cycle:a,error:s.message}),s}if(t.lifecycle===Je.SINGLETON&&this.singletonInstances.has(e))return y.debug(g.SERVICE,`Returning cached singleton: ${e}`,{service:e}),this.singletonInstances.get(e);this.resolutionStack.push(e);try{y.debug(g.SERVICE,`Resolving service: ${e}`,{service:e,lifecycle:t.lifecycle});const a=t.factory(this);return t.lifecycle===Je.SINGLETON&&this.singletonInstances.set(e,a),this.resolutionStack.pop(),y.debug(g.SERVICE,`Service resolved: ${e}`,{service:e}),a}catch(a){throw this.resolutionStack.pop(),y.error(g.SERVICE,`Service resolution error: ${e}`,{service:e,error:a instanceof Error?a.message:String(a)}),a}}has(e){return this.services.has(e)}clear(){y.info(g.SERVICE,"Clearing DI container",{servicesCount:this.services.size,singletonsCount:this.singletonInstances.size}),this.services.clear(),this.singletonInstances.clear(),this.resolutionStack=[]}getRegisteredServices(){return Array.from(this.services.keys())}getDefinition(e){return this.services.get(e)}isSingletonCached(e){return this.singletonInstances.has(e)}}const ct=new jg;function Ug(){y.info(g.SERVICE,"Registering application services"),ct.register({name:"WebSocketRepository",factory:()=>new Mg,lifecycle:Je.SINGLETON}),ct.register({name:"WebSocketService",factory:n=>new Fg(n.resolve("WebSocketRepository")),lifecycle:Je.SINGLETON,dependencies:["WebSocketRepository"]}),ct.register({name:"SearchRepository",factory:()=>new gr,lifecycle:Je.SINGLETON}),ct.register({name:"SearchService",factory:n=>new yr(n.resolve("SearchRepository")),lifecycle:Je.SINGLETON,dependencies:["SearchRepository"]}),y.info(g.SERVICE,"All services registered",{servicesCount:ct.getRegisteredServices().length,services:ct.getRegisteredServices()})}const Wg={EASTER_EGGS_ENABLED:!0,HAL_FINNEY_EGG:!0,PIZZA_DAY_EGG:!0,EASTER_EGG_ANALYTICS:!0};function Ar(){return{...Wg}}function BS(n){const e=Ar();if(!e.EASTER_EGGS_ENABLED)return!1;switch(n){case"hal-finney":return e.HAL_FINNEY_EGG;case"pizza-day":return e.PIZZA_DAY_EGG;case"block-found-demo":return!0;default:return!1}}function zg(n){if(Ar().EASTER_EGG_ANALYTICS)try{const t="blocksight_easter_eggs",a=sessionStorage.getItem(t),s=a?JSON.parse(a):[];s.push(n);const r=s.slice(-100);sessionStorage.setItem(t,JSON.stringify(r))}catch{}}function RS(){try{const e=sessionStorage.getItem("blocksight_easter_eggs");return e?JSON.parse(e):[]}catch{return[]}}function IS(){try{sessionStorage.removeItem("blocksight_easter_eggs")}catch{}}function Vg(n){const e="0000000000000000000",t=Math.floor(Math.random()*4294967295).toString(16).padStart(8,"0"),a=n.toString(16).padStart(8,"0"),s="abcdef1234567890".repeat(3).slice(0,64-e.length-t.length-a.length);return(e+t+a+s).slice(0,64)}function qg(n){const e=n%1e3;return{kind:"real",id:{hash:Vg(n),height:n},minedAtMs:Date.now(),txCount:2500+e%1e3,minFeeRate:1,maxFeeRate:150+e%100,medianFeeRate:10+e%10}}function $g({onComplete:n}){const{triggerAnimation:e}=Tr(),t=d.useRef(!1);return d.useEffect(()=>{if(t.current)return;t.current=!0;const a=926e3+Math.floor(Math.random()*1e3),s={previousTipHeight:a,newTipHeight:a+1,foundAtMs:Date.now(),newBlock:qg(a+1)};e(s),n()},[e,n]),null}const xr={activeEgg:null,activationCount:{},lastActivated:{}},Br=d.createContext({state:xr,activate:()=>{},deactivate:()=>{},isActive:()=>!1,hasActiveEgg:!1});function PS(){return d.useContext(Br)}function Kg({children:n}){const[e,t]=d.useState(xr),a=d.useCallback(h=>{t(m=>{if(m.activeEgg!==null)return m;const f=(m.activationCount[h]||0)+1;return zg({eggId:h,timestamp:Date.now(),sessionCount:f}),{activeEgg:h,activationCount:{...m.activationCount,[h]:f},lastActivated:{...m.lastActivated,[h]:Date.now()}}})},[]),s=d.useCallback(()=>{t(h=>({...h,activeEgg:null}))},[]),r=d.useCallback(h=>e.activeEgg===h,[e.activeEgg]),o=e.activeEgg!==null,l=d.useMemo(()=>({state:e,activate:a,deactivate:s,isActive:r,hasActiveEgg:o}),[e,a,s,r,o]);return u.jsx(Br.Provider,{value:l,children:n})}const rs="/images/halrunning-D8swcRJo.png",is="/images/X-CjyehOJ3.png",Gg="_egg_1apgo_27",Zg="_floatImg_1apgo_45",Yg="_show_1apgo_69",Jg="_tweetImage_1apgo_81",Xg="_active_1apgo_141",Qg="_runner_1apgo_195",ey="_reducedMotionContainer_1apgo_245",ty="_tweetStatic_1apgo_295",ny="_runnerStatic_1apgo_309",ay="_runnerSprite_1apgo_321",Ee={egg:Gg,floatImg:Zg,show:Yg,tweetImage:Jg,active:Xg,runner:Qg,reducedMotionContainer:ey,tweetStatic:ty,runnerStatic:ny,runnerSprite:ay},sy=12e3;function ry({onComplete:n,reducedMotion:e}){const[t,a]=d.useState(!1),s=d.useRef(!1),[r]=d.useState(()=>Math.floor(8+Math.random()*73)),o=d.useCallback(()=>{s.current||(s.current=!0,n())},[n]),l=d.useCallback(h=>{h.animationName.includes("crossRTL")&&(a(!1),o())},[o]);return d.useEffect(()=>{const h=setTimeout(()=>{a(!0)},50),m=setTimeout(()=>{o()},sy+500);return()=>{clearTimeout(h),clearTimeout(m)}},[o]),e?u.jsxs("div",{className:Ee.reducedMotionContainer,children:[u.jsx("div",{className:Ee.tweetStatic,children:u.jsx("img",{src:is,alt:"",className:Ee.tweetImage})}),u.jsx("div",{className:Ee.runnerStatic,style:{bottom:r},children:u.jsx("div",{className:Ee.runnerSprite,style:{backgroundImage:`url(${rs})`}})})]}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:`${Ee.floatImg} ${t?Ee.show:""}`,children:u.jsx("img",{src:is,alt:"",className:Ee.tweetImage})}),u.jsx("div",{className:`${Ee.egg} ${t?Ee.active:""}`,style:{"--bottom":`${r}px`},onAnimationEnd:l,children:u.jsx("div",{className:Ee.runner,style:{backgroundImage:`url(${rs})`}})})]})}const os="data:image/x-icon;base64,AAACAAEAICAAAB0ADwADBAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAgAAAAIAgGAAAAc3p69AAAA8pJREFUeJzll0tsW0UUhr9z7SR27MROmiqOQ94gQiqRpIkCtEUI1KiqxIICYgVqJMQmEqzYIVas2bYbduwQYscGqRKqKtQK1AdtgZBA3k9sx47fj3sPCz/ikEedUKdI/Jp7R3OlO/8/58yZc0YoQFUFsHE8MEVEj4nrYIiqioioqnYDZwAFpEp8xbl/EJE5VRVU1Q6gqhN6fJgocNrtZerSQK7w2KkOinOnix/KiaRsXC0BxblLLjaqSFQRjkeAKvn9txuP0dSab2qVhogghgGyf1AdXoBqocv3Ygh5l0q+ye6zLJuMYNTUYbM7KhWg2xFbtJwUXoXVSNmqLAUrlyWX3CSx9BAzHGT5qxuIFcLWn0AyK7SNvkvzuclKBcj2PpWSJDAVMxXHjMdJRqNktpYgM0cucI8ar4CZRNeWCd6fZurbdXxjXtqdvehqDId/ZE+mPQVocgsrGUBcXmLBALlUEjFM0jMLZOc3MWd/R2ceEo0t0/lRDy5XLdbmFsmsRSgGUcNP26utuNpjSHoL9+hFnD0vVC5g/udrpDbu4nG4MesEuyZxRgLULNwhdn+FzWUvpHN4RlqQdC2R5QjheBIz6ySzBPpHiuxGkKX5Bp65egV3xwD53KP8M/D2FNDYNczqyiqrs7M0tULv0/2Y0zdxdPbR+dwATUvrxDImmXiQmZ+mEE8DDT39NEotmZopcMdpcbrwXf4CV9vgTtdWYoFmXzcvXZoknUox9f1V4rkcnt7zbN3+BtvYEIlQmOhaiubX3sDl8NLY4Sc2dYfVa1/j6XZh8zfhefmTPLmVA8O2Jzm77FGEKqoWdQ4Hp8Y/JBxIEF6fJrQYJHT9FpF4AsfAGCZuDIedtV9+JOl00HBmnESugfqRy3gHzqOWCcaOk7cyCyCCIKhlYrPZqW8dZjMdJufxsXrrHrWDoyyEojz47gqNJ07QNfQi1uISLeZf+E6/w8nRCVQtxHh0fXPgQSSSN1BL1/ME/rxO3eAgc1PznPT4uXvzBpKFc29/TP/YOIu/3Sa28Sv+029xmJLi4JNQBFULl7uJenWyHlrE0dvPyuwDOp4d4tLk53h9HQD0DZ0Fzpb/WhEqS0YitI+9SWR9DQOLp069wnuffonX14FlmQCoZeV9vk/S2Q+PzAUiBqoWjW19tA2/TnBhjgsffIZht6OWhVHwsxhHS6wVJaP8XlBGLryPYRiIYaCqRyY9tICCDGylCk53JKN/gyMu4fEVzf+TkuwAlO8BZbssrxaKc5ditVxAXWFc7ZK8yAX8F65mTxolBU/qev43RMXs4V3hCpcAAAAASUVORK5CYII=",cs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADyklEQVR4nOWXS2xbRRSGv3PtJHbsxE6aKo5D3iBCKpGkiQK0RQjUqKrEggJiBWokxCYSrNghVqzZtht27BBixwapEqoq1ArUB22BkEDeT2zHjt+Pew8LP+KQR51Qp0j8mntHc6U7/z/nzJlzRihAVQWwcTwwRUSPietgiKqKiKiqdgNnAAWkSnzFuX8QkTlVFVTVDqCqE3p8mChw2u1l6tJArvDYqQ6Kc6eLH8qJpGxcLQHFuUsuNqpIVBGOR4Aq+f23G4/R1JpvapWGiCCGAbJ/UB1egGqhy/diCHmXSr7J7rMsm4xg1NRhszsqFaDbEVu0nBRehdVI2aosBSuXJZfcJLH0EDMcZPmrG4gVwtafQDIrtI2+S/O5yUoFyPY+lZIkMBUzFceMx0lGo2S2liAzRy5wjxqvgJlE15YJ3p9m6tt1fGNe2p296GoMh39kT6Y9BWhyCysZQFxeYsEAuVQSMUzSMwtk5zcxZ39HZx4SjS3T+VEPLlct1uYWyaxFKAZRw0/bq6242mNIegv36EWcPS9ULmD+52ukNu7icbgx6wS7JnFGAtQs3CF2f4XNZS+kc3hGWpB0LZHlCOF4EjPrJLME+keK7EaQpfkGnrl6BXfHAPnco/wz8PYU0Ng1zOrKKquzszS1Qu/T/ZjTN3F09tH53ABNS+vEMiaZeJCZn6YQTwMNPf00Si2Zmilwx2lxuvBd/gJX2+BO11ZigWZfNy9dmiSdSjH1/VXiuRye3vNs3f4G29gQiVCY6FqK5tfewOXw0tjhJzZ1h9VrX+PpdmHzN+F5+ZM8uZUDw7YnObvsUYQqqhZ1Dgenxj8kHEgQXp8mtBgkdP0WkXgCx8AYJm4Mh521X34k6XTQcGacRK6B+pHLeAfOo5YJxo6TtzILIIIgqGVis9mpbx1mMx0m5/GxeusetYOjLISiPPjuCo0nTtA19CLW4hIt5l/4Tr/DydEJVC3EeHR9c+BBJJI3UEvX8wT+vE7d4CBzU/Oc9Pi5e/MGkoVzb39M/9g4i7/dJrbxK/7Tb3GYkuLgk1AEVQuXu4l6dbIeWsTR28/K7AM6nh3i0uTneH0dAPQNnQXOlv9aESpLRiK0j71JZH0NA4unTr3Ce59+idfXgWWZAKhl5X2+T9LZD4/MBSIGqhaNbX20Db9OcGGOCx98hmG3o5aFUfCzGEdLrBUlo/xeUEYuvI9hGIhhoKpHJj20gIIMbKUKTncko3+DIy7h8RXN/5OS7ACU7wFluyyvFopzl2K1XEBdYVztkrzIBfwXrmZPGiUFT+p6/jdExezhXeEKlwAAAABJRU5ErkJggg==",An="pizza-day-cursor-style",Gt=29,Zt=15;function iy(){return d.useEffect(()=>{if(document.getElementById(An))return;const n=document.createElement("style");return n.id=An,n.textContent=` /* Pizza Day Cursor - Bitcoin Pizza Day (May 22) */ html, html * { cursor: url('${os}') ${Gt} ${Zt}, url('${cs}') ${Gt} ${Zt}, auto !important; } /* Preserve text cursor in editable elements for UX */ input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="tel"], input[type="number"], input:not([type]), textarea, [contenteditable="true"], [contenteditable=""] { cursor: text !important; } /* Preserve pointer cursor for interactive elements */ a, button, [role="button"], input[type="submit"], input[type="button"], input[type="reset"], select, label[for] { cursor: url('${os}') ${Gt} ${Zt}, url('${cs}') ${Gt} ${Zt}, pointer !important; } `,document.head.appendChild(n),()=>{const e=document.getElementById(An);e&&e.remove()}},[]),null}const Le=new Map;Le.set("hal-finney",{id:"hal-finney",name:"Running Bitcoin",triggerType:"keyboard-sequence",triggerValue:"halfinney",duration:12e3,enabled:!0,component:ry});Le.set("pizza-day",{id:"pizza-day",name:"Pizza Day Cursor",triggerType:"date-based",triggerValue:"05-22",duration:864e5,enabled:!0,component:iy});Le.set("block-found-demo",{id:"block-found-demo",name:"Block Found Demo",triggerType:"keyboard-sequence",triggerValue:"gabrielosem",duration:0,enabled:!0,component:$g});const LS={get(n){return Le.get(n)},has(n){return Le.has(n)},getAll(){return Array.from(Le.values())},getEnabled(){return Array.from(Le.values()).filter(n=>n.enabled)},register(n){Le.set(n.id,n)},unregister(n){return Le.delete(n)},get size(){return Le.size}},ls="/sounds/block-found.ogg",oy="/sounds/block-found.mp3",us=.7,ds=.3;function cy(){const n=new Audio;return n.canPlayType('audio/ogg; codecs="vorbis"')?ls:n.canPlayType("audio/mpeg")?oy:ls}function ly(){const n=d.useRef(null),e=d.useRef(!1),{phase:t,isAnimating:a}=Er(),{flags:s}=hn(),r=s.effects.blockFoundSound,[o,l]=d.useState(()=>typeof document<"u"&&document.visibilityState==="visible");d.useEffect(()=>{if(typeof document>"u")return;const h=()=>{l(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",h),()=>document.removeEventListener("visibilitychange",h)},[]),d.useEffect(()=>{if(!r)return;const h=cy(),m=new Audio(h);return m.preload="auto",m.volume=o?us:ds,n.current=m,()=>{if(n.current){try{n.current.pause()}catch{}n.current.src="",n.current=null}}},[r,o]),d.useEffect(()=>{n.current&&(n.current.volume=o?us:ds)},[o]),d.useEffect(()=>{a||(e.current=!1)},[a]),d.useEffect(()=>{!r||!n.current||t==="anticipation"&&!e.current&&(e.current=!0,n.current.currentTime=0,n.current.play().catch(h=>{console.debug("[BlockFoundSound] Audio playback failed:",h.message)}))},[t,r])}function uy(){return ly(),null}var ae=(n=>(n.HEALTHY="healthy",n.DEGRADED="degraded",n.UNHEALTHY="unhealthy",n))(ae||{});const dy=5e3,hy={websocket:!0,localStorage:!0,fetch:!0,performance:!0,crypto:!1};class my{name="browser";critical=!1;requirements;constructor(e){this.requirements={...hy,...e}}async check(){const e=Date.now(),t=[];if(this.requirements.websocket&&typeof WebSocket>"u"&&t.push("WebSocket"),this.requirements.localStorage)try{const s="__health_check__";localStorage.setItem(s,"test"),localStorage.removeItem(s)}catch{t.push("localStorage")}this.requirements.fetch&&typeof fetch>"u"&&t.push("fetch"),this.requirements.performance&&typeof performance>"u"&&t.push("Performance"),this.requirements.crypto&&typeof crypto>"u"&&t.push("Crypto");const a=Date.now()-e;return t.length===0?{status:ae.HEALTHY,message:"All required APIs available",duration:a}:{status:ae.UNHEALTHY,message:`Missing browser APIs: ${t.join(", ")}`,duration:a,details:{missing:t}}}}class py{name="datastore";critical=!1;maxDataAge;constructor(e=300*1e3){this.maxDataAge=e}async check(){const e=Date.now();try{const t=O.getState(),a=Date.now()-e,s=t.system?.health;if(!s)return{status:ae.DEGRADED,message:"No system health data available",duration:a,details:{hasData:!1}};const r=s.lastCheck||0,o=Date.now()-r,l=o>this.maxDataAge,h=s.services||{},m=Object.entries(h),f=m.filter(([,T])=>T).length,b=m.length,S=b>0?f/b*100:0,v=s.status||"unknown";return v==="unhealthy"||S<50?{status:ae.UNHEALTHY,message:`Backend unhealthy: ${f}/${b} services up`,duration:a,details:{backendStatus:v,services:h,dataAge:o,isDataStale:l,serviceHealthPercent:S}}:v==="degraded"||l||S<80?{status:ae.DEGRADED,message:l?`Data is ${Math.round(o/1e3)}s old (stale)`:`Some services degraded: ${f}/${b} up`,duration:a,details:{backendStatus:v,services:h,dataAge:o,isDataStale:l,serviceHealthPercent:S}}:{status:ae.HEALTHY,message:`All systems operational (${f}/${b} services)`,duration:a,details:{backendStatus:v,services:h,dataAge:o,serviceHealthPercent:S}}}catch(t){const a=Date.now()-e;return{status:ae.UNHEALTHY,message:t instanceof Error?t.message:"Unknown error checking DataStore",duration:a}}}}var V;(function(n){n.assertEqual=s=>{};function e(s){}n.assertIs=e;function t(s){throw new Error}n.assertNever=t,n.arrayToEnum=s=>{const r={};for(const o of s)r[o]=o;return r},n.getValidEnumValues=s=>{const r=n.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),o={};for(const l of r)o[l]=s[l];return n.objectValues(o)},n.objectValues=s=>n.objectKeys(s).map(function(r){return s[r]}),n.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const r=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&r.push(o);return r},n.find=(s,r)=>{for(const o of s)if(r(o))return o},n.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function a(s,r=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(r)}n.joinValues=a,n.jsonStringifyReplacer=(s,r)=>typeof r=="bigint"?r.toString():r})(V||(V={}));var hs;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(hs||(hs={}));const R=V.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),We=n=>{switch(typeof n){case"undefined":return R.undefined;case"string":return R.string;case"number":return Number.isNaN(n)?R.nan:R.number;case"boolean":return R.boolean;case"function":return R.function;case"bigint":return R.bigint;case"symbol":return R.symbol;case"object":return Array.isArray(n)?R.array:n===null?R.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?R.promise:typeof Map<"u"&&n instanceof Map?R.map:typeof Set<"u"&&n instanceof Set?R.set:typeof Date<"u"&&n instanceof Date?R.date:R.object;default:return R.unknown}},C=V.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Fe extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(r){return r.message},a={_errors:[]},s=r=>{for(const o of r.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)a._errors.push(t(o));else{let l=a,h=0;for(;ht.message){const t={},a=[];for(const s of this.issues)if(s.path.length>0){const r=s.path[0];t[r]=t[r]||[],t[r].push(e(s))}else a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}Fe.create=n=>new Fe(n);const Mn=(n,e)=>{let t;switch(n.code){case C.invalid_type:n.received===R.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case C.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,V.jsonStringifyReplacer)}`;break;case C.unrecognized_keys:t=`Unrecognized key(s) in object: ${V.joinValues(n.keys,", ")}`;break;case C.invalid_union:t="Invalid input";break;case C.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${V.joinValues(n.options)}`;break;case C.invalid_enum_value:t=`Invalid enum value. Expected ${V.joinValues(n.options)}, received '${n.received}'`;break;case C.invalid_arguments:t="Invalid function arguments";break;case C.invalid_return_type:t="Invalid function return type";break;case C.invalid_date:t="Invalid date";break;case C.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:V.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case C.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case C.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case C.custom:t="Invalid input";break;case C.invalid_intersection_types:t="Intersection results could not be merged";break;case C.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case C.not_finite:t="Number must be finite";break;default:t=e.defaultError,V.assertNever(n)}return{message:t}};let fy=Mn;function gy(){return fy}const yy=n=>{const{data:e,path:t,errorMaps:a,issueData:s}=n,r=[...t,...s.path||[]],o={...s,path:r};if(s.message!==void 0)return{...s,path:r,message:s.message};let l="";const h=a.filter(m=>!!m).slice().reverse();for(const m of h)l=m(o,{data:e,defaultError:l}).message;return{...s,path:r,message:l}};function A(n,e){const t=gy(),a=yy({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===Mn?void 0:Mn].filter(s=>!!s)});n.common.issues.push(a)}class he{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if(s.status==="aborted")return H;s.status==="dirty"&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const s of t){const r=await s.key,o=await s.value;a.push({key:r,value:o})}return he.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:r,value:o}=s;if(r.status==="aborted"||o.status==="aborted")return H;r.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),r.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(a[r.value]=o.value)}return{status:e.value,value:a}}}const H=Object.freeze({status:"aborted"}),It=n=>({status:"dirty",value:n}),Se=n=>({status:"valid",value:n}),ms=n=>n.status==="aborted",ps=n=>n.status==="dirty",vt=n=>n.status==="valid",an=n=>typeof Promise<"u"&&n instanceof Promise;var I;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e?.message})(I||(I={}));class Ne{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const fs=(n,e)=>{if(vt(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Fe(n.common.issues);return this._error=t,this._error}}};function j(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:s}=n;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,l)=>{const{message:h}=n;return o.code==="invalid_enum_value"?{message:h??l.defaultError}:typeof l.data>"u"?{message:h??a??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:h??t??l.defaultError}},description:s}}class z{get description(){return this._def.description}_getType(e){return We(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:We(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new he,ctx:{common:e.parent.common,data:e.data,parsedType:We(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(an(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:We(e)},s=this._parseSync({data:e,path:a.path,parent:a});return fs(a,s)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:We(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return vt(a)?{value:a.value}:{issues:t.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>vt(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:We(e)},s=this._parse({data:e,path:a.path,parent:a}),r=await(an(s)?s:Promise.resolve(s));return fs(a,r)}refine(e,t){const a=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,r)=>{const o=e(s),l=()=>r.addIssue({code:C.custom,...a(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(h=>h?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(e,t){return this._refinement((a,s)=>e(a)?!0:(s.addIssue(typeof t=="function"?t(a,s):t),!1))}_refinement(e){return new _t({schema:this,typeName:M.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return Ve.create(this,this._def)}nullable(){return wt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return De.create(this)}promise(){return ln.create(this,this._def)}or(e){return rn.create([this,e],this._def)}and(e){return on.create(this,e,this._def)}transform(e){return new _t({...j(this._def),schema:this,typeName:M.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new zn({...j(this._def),innerType:this,defaultValue:t,typeName:M.ZodDefault})}brand(){return new jy({typeName:M.ZodBranded,type:this,...j(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Vn({...j(this._def),innerType:this,catchValue:t,typeName:M.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ia.create(this,e)}readonly(){return qn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const by=/^c[^\s-]{8,}$/i,vy=/^[0-9a-z]+$/,ky=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Sy=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_y=/^[a-z0-9_-]{21}$/i,wy=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ey=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ty=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Cy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let xn;const Ay=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xy=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,By=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ry=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Iy=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Py=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Rr="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ly=new RegExp(`^${Rr}$`);function Ir(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);const t=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Dy(n){return new RegExp(`^${Ir(n)}$`)}function Ny(n){let e=`${Rr}T${Ir(n)}`;const t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Oy(n,e){return!!((e==="v4"||!e)&&Ay.test(n)||(e==="v6"||!e)&&By.test(n))}function My(n,e){if(!wy.test(n))return!1;try{const[t]=n.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),s=JSON.parse(atob(a));return!(typeof s!="object"||s===null||"typ"in s&&s?.typ!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function Hy(n,e){return!!((e==="v4"||!e)&&xy.test(n)||(e==="v6"||!e)&&Ry.test(n))}class He extends z{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==R.string){const r=this._getOrReturnCtx(e);return A(r,{code:C.invalid_type,expected:R.string,received:r.parsedType}),H}const a=new he;let s;for(const r of this._def.checks)if(r.kind==="min")e.data.lengthr.value&&(s=this._getOrReturnCtx(e,s),A(s,{code:C.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),a.dirty());else if(r.kind==="length"){const o=e.data.length>r.value,l=e.data.lengthe.test(s),{validation:t,code:C.invalid_string,...I.errToObj(a)})}_addCheck(e){return new He({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...I.errToObj(e)})}url(e){return this._addCheck({kind:"url",...I.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...I.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...I.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...I.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...I.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...I.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...I.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...I.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...I.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...I.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...I.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...I.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...I.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...I.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...I.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...I.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...I.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...I.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...I.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...I.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...I.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...I.errToObj(t)})}nonempty(e){return this.min(1,I.errToObj(e))}trim(){return new He({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new He({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new He({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew He({checks:[],typeName:M.ZodString,coerce:n?.coerce??!1,...j(n)});function Fy(n,e){const t=(n.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,s=t>a?t:a,r=Number.parseInt(n.toFixed(s).replace(".","")),o=Number.parseInt(e.toFixed(s).replace(".",""));return r%o/10**s}class kt extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==R.number){const r=this._getOrReturnCtx(e);return A(r,{code:C.invalid_type,expected:R.number,received:r.parsedType}),H}let a;const s=new he;for(const r of this._def.checks)r.kind==="int"?V.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{code:C.invalid_type,expected:"integer",received:"float",message:r.message}),s.dirty()):r.kind==="min"?(r.inclusive?e.datar.value:e.data>=r.value)&&(a=this._getOrReturnCtx(e,a),A(a,{code:C.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),s.dirty()):r.kind==="multipleOf"?Fy(e.data,r.value)!==0&&(a=this._getOrReturnCtx(e,a),A(a,{code:C.not_multiple_of,multipleOf:r.value,message:r.message}),s.dirty()):r.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),A(a,{code:C.not_finite,message:r.message}),s.dirty()):V.assertNever(r);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,I.toString(t))}gt(e,t){return this.setLimit("min",e,!1,I.toString(t))}lte(e,t){return this.setLimit("max",e,!0,I.toString(t))}lt(e,t){return this.setLimit("max",e,!1,I.toString(t))}setLimit(e,t,a,s){return new kt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:I.toString(s)}]})}_addCheck(e){return new kt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:I.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:I.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&V.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.valuenew kt({checks:[],typeName:M.ZodNumber,coerce:n?.coerce||!1,...j(n)});class Nt extends z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==R.bigint)return this._getInvalidInput(e);let a;const s=new he;for(const r of this._def.checks)r.kind==="min"?(r.inclusive?e.datar.value:e.data>=r.value)&&(a=this._getOrReturnCtx(e,a),A(a,{code:C.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),s.dirty()):r.kind==="multipleOf"?e.data%r.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),A(a,{code:C.not_multiple_of,multipleOf:r.value,message:r.message}),s.dirty()):V.assertNever(r);return{status:s.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return A(t,{code:C.invalid_type,expected:R.bigint,received:t.parsedType}),H}gte(e,t){return this.setLimit("min",e,!0,I.toString(t))}gt(e,t){return this.setLimit("min",e,!1,I.toString(t))}lte(e,t){return this.setLimit("max",e,!0,I.toString(t))}lt(e,t){return this.setLimit("max",e,!1,I.toString(t))}setLimit(e,t,a,s){return new Nt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:I.toString(s)}]})}_addCheck(e){return new Nt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew Nt({checks:[],typeName:M.ZodBigInt,coerce:n?.coerce??!1,...j(n)});class Hn extends z{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==R.boolean){const a=this._getOrReturnCtx(e);return A(a,{code:C.invalid_type,expected:R.boolean,received:a.parsedType}),H}return Se(e.data)}}Hn.create=n=>new Hn({typeName:M.ZodBoolean,coerce:n?.coerce||!1,...j(n)});class sn extends z{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==R.date){const r=this._getOrReturnCtx(e);return A(r,{code:C.invalid_type,expected:R.date,received:r.parsedType}),H}if(Number.isNaN(e.data.getTime())){const r=this._getOrReturnCtx(e);return A(r,{code:C.invalid_date}),H}const a=new he;let s;for(const r of this._def.checks)r.kind==="min"?e.data.getTime()r.value&&(s=this._getOrReturnCtx(e,s),A(s,{code:C.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),a.dirty()):V.assertNever(r);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new sn({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:I.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:I.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew sn({checks:[],coerce:n?.coerce||!1,typeName:M.ZodDate,...j(n)});class gs extends z{_parse(e){if(this._getType(e)!==R.symbol){const a=this._getOrReturnCtx(e);return A(a,{code:C.invalid_type,expected:R.symbol,received:a.parsedType}),H}return Se(e.data)}}gs.create=n=>new gs({typeName:M.ZodSymbol,...j(n)});class ys extends z{_parse(e){if(this._getType(e)!==R.undefined){const a=this._getOrReturnCtx(e);return A(a,{code:C.invalid_type,expected:R.undefined,received:a.parsedType}),H}return Se(e.data)}}ys.create=n=>new ys({typeName:M.ZodUndefined,...j(n)});class Fn extends z{_parse(e){if(this._getType(e)!==R.null){const a=this._getOrReturnCtx(e);return A(a,{code:C.invalid_type,expected:R.null,received:a.parsedType}),H}return Se(e.data)}}Fn.create=n=>new Fn({typeName:M.ZodNull,...j(n)});class bs extends z{constructor(){super(...arguments),this._any=!0}_parse(e){return Se(e.data)}}bs.create=n=>new bs({typeName:M.ZodAny,...j(n)});class jn extends z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Se(e.data)}}jn.create=n=>new jn({typeName:M.ZodUnknown,...j(n)});class $e extends z{_parse(e){const t=this._getOrReturnCtx(e);return A(t,{code:C.invalid_type,expected:R.never,received:t.parsedType}),H}}$e.create=n=>new $e({typeName:M.ZodNever,...j(n)});class vs extends z{_parse(e){if(this._getType(e)!==R.undefined){const a=this._getOrReturnCtx(e);return A(a,{code:C.invalid_type,expected:R.void,received:a.parsedType}),H}return Se(e.data)}}vs.create=n=>new vs({typeName:M.ZodVoid,...j(n)});class De extends z{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==R.array)return A(t,{code:C.invalid_type,expected:R.array,received:t.parsedType}),H;if(s.exactLength!==null){const o=t.data.length>s.exactLength.value,l=t.data.lengths.maxLength.value&&(A(t,{code:C.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((o,l)=>s.type._parseAsync(new Ne(t,o,t.path,l)))).then(o=>he.mergeArray(a,o));const r=[...t.data].map((o,l)=>s.type._parseSync(new Ne(t,o,t.path,l)));return he.mergeArray(a,r)}get element(){return this._def.type}min(e,t){return new De({...this._def,minLength:{value:e,message:I.toString(t)}})}max(e,t){return new De({...this._def,maxLength:{value:e,message:I.toString(t)}})}length(e,t){return new De({...this._def,exactLength:{value:e,message:I.toString(t)}})}nonempty(e){return this.min(1,e)}}De.create=(n,e)=>new De({type:n,minLength:null,maxLength:null,exactLength:null,typeName:M.ZodArray,...j(e)});function ht(n){if(n instanceof Q){const e={};for(const t in n.shape){const a=n.shape[t];e[t]=Ve.create(ht(a))}return new Q({...n._def,shape:()=>e})}else return n instanceof De?new De({...n._def,type:ht(n.element)}):n instanceof Ve?Ve.create(ht(n.unwrap())):n instanceof wt?wt.create(ht(n.unwrap())):n instanceof tt?tt.create(n.items.map(e=>ht(e))):n}class Q extends z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=V.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==R.object){const m=this._getOrReturnCtx(e);return A(m,{code:C.invalid_type,expected:R.object,received:m.parsedType}),H}const{status:a,ctx:s}=this._processInputParams(e),{shape:r,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof $e&&this._def.unknownKeys==="strip"))for(const m in s.data)o.includes(m)||l.push(m);const h=[];for(const m of o){const f=r[m],b=s.data[m];h.push({key:{status:"valid",value:m},value:f._parse(new Ne(s,b,s.path,m)),alwaysSet:m in s.data})}if(this._def.catchall instanceof $e){const m=this._def.unknownKeys;if(m==="passthrough")for(const f of l)h.push({key:{status:"valid",value:f},value:{status:"valid",value:s.data[f]}});else if(m==="strict")l.length>0&&(A(s,{code:C.unrecognized_keys,keys:l}),a.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const f of l){const b=s.data[f];h.push({key:{status:"valid",value:f},value:m._parse(new Ne(s,b,s.path,f)),alwaysSet:f in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const m=[];for(const f of h){const b=await f.key,S=await f.value;m.push({key:b,value:S,alwaysSet:f.alwaysSet})}return m}).then(m=>he.mergeObjectSync(a,m)):he.mergeObjectSync(a,h)}get shape(){return this._def.shape()}strict(e){return I.errToObj,new Q({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{const s=this._def.errorMap?.(t,a).message??a.defaultError;return t.code==="unrecognized_keys"?{message:I.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new Q({...this._def,unknownKeys:"strip"})}passthrough(){return new Q({...this._def,unknownKeys:"passthrough"})}extend(e){return new Q({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Q({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:M.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Q({...this._def,catchall:e})}pick(e){const t={};for(const a of V.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new Q({...this._def,shape:()=>t})}omit(e){const t={};for(const a of V.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new Q({...this._def,shape:()=>t})}deepPartial(){return ht(this)}partial(e){const t={};for(const a of V.objectKeys(this.shape)){const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()}return new Q({...this._def,shape:()=>t})}required(e){const t={};for(const a of V.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let r=this.shape[a];for(;r instanceof Ve;)r=r._def.innerType;t[a]=r}return new Q({...this._def,shape:()=>t})}keyof(){return Pr(V.objectKeys(this.shape))}}Q.create=(n,e)=>new Q({shape:()=>n,unknownKeys:"strip",catchall:$e.create(),typeName:M.ZodObject,...j(e)});Q.strictCreate=(n,e)=>new Q({shape:()=>n,unknownKeys:"strict",catchall:$e.create(),typeName:M.ZodObject,...j(e)});Q.lazycreate=(n,e)=>new Q({shape:n,unknownKeys:"strip",catchall:$e.create(),typeName:M.ZodObject,...j(e)});class rn extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function s(r){for(const l of r)if(l.result.status==="valid")return l.result;for(const l of r)if(l.result.status==="dirty")return t.common.issues.push(...l.ctx.common.issues),l.result;const o=r.map(l=>new Fe(l.ctx.common.issues));return A(t,{code:C.invalid_union,unionErrors:o}),H}if(t.common.async)return Promise.all(a.map(async r=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await r._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(s);{let r;const o=[];for(const h of a){const m={...t,common:{...t.common,issues:[]},parent:null},f=h._parseSync({data:t.data,path:t.path,parent:m});if(f.status==="valid")return f;f.status==="dirty"&&!r&&(r={result:f,ctx:m}),m.common.issues.length&&o.push(m.common.issues)}if(r)return t.common.issues.push(...r.ctx.common.issues),r.result;const l=o.map(h=>new Fe(h));return A(t,{code:C.invalid_union,unionErrors:l}),H}}get options(){return this._def.options}}rn.create=(n,e)=>new rn({options:n,typeName:M.ZodUnion,...j(e)});function Un(n,e){const t=We(n),a=We(e);if(n===e)return{valid:!0,data:n};if(t===R.object&&a===R.object){const s=V.objectKeys(e),r=V.objectKeys(n).filter(l=>s.indexOf(l)!==-1),o={...n,...e};for(const l of r){const h=Un(n[l],e[l]);if(!h.valid)return{valid:!1};o[l]=h.data}return{valid:!0,data:o}}else if(t===R.array&&a===R.array){if(n.length!==e.length)return{valid:!1};const s=[];for(let r=0;r{if(ms(r)||ms(o))return H;const l=Un(r.value,o.value);return l.valid?((ps(r)||ps(o))&&t.dirty(),{status:t.value,value:l.data}):(A(a,{code:C.invalid_intersection_types}),H)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([r,o])=>s(r,o)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}on.create=(n,e,t)=>new on({left:n,right:e,typeName:M.ZodIntersection,...j(t)});class tt extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.array)return A(a,{code:C.invalid_type,expected:R.array,received:a.parsedType}),H;if(a.data.lengththis._def.items.length&&(A(a,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...a.data].map((o,l)=>{const h=this._def.items[l]||this._def.rest;return h?h._parse(new Ne(a,o,a.path,l)):null}).filter(o=>!!o);return a.common.async?Promise.all(r).then(o=>he.mergeArray(t,o)):he.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new tt({...this._def,rest:e})}}tt.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new tt({items:n,typeName:M.ZodTuple,rest:null,...j(e)})};class cn extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.object)return A(a,{code:C.invalid_type,expected:R.object,received:a.parsedType}),H;const s=[],r=this._def.keyType,o=this._def.valueType;for(const l in a.data)s.push({key:r._parse(new Ne(a,l,a.path,l)),value:o._parse(new Ne(a,a.data[l],a.path,l)),alwaysSet:l in a.data});return a.common.async?he.mergeObjectAsync(t,s):he.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof z?new cn({keyType:e,valueType:t,typeName:M.ZodRecord,...j(a)}):new cn({keyType:He.create(),valueType:e,typeName:M.ZodRecord,...j(t)})}}class ks extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.map)return A(a,{code:C.invalid_type,expected:R.map,received:a.parsedType}),H;const s=this._def.keyType,r=this._def.valueType,o=[...a.data.entries()].map(([l,h],m)=>({key:s._parse(new Ne(a,l,a.path,[m,"key"])),value:r._parse(new Ne(a,h,a.path,[m,"value"]))}));if(a.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const h of o){const m=await h.key,f=await h.value;if(m.status==="aborted"||f.status==="aborted")return H;(m.status==="dirty"||f.status==="dirty")&&t.dirty(),l.set(m.value,f.value)}return{status:t.value,value:l}})}else{const l=new Map;for(const h of o){const m=h.key,f=h.value;if(m.status==="aborted"||f.status==="aborted")return H;(m.status==="dirty"||f.status==="dirty")&&t.dirty(),l.set(m.value,f.value)}return{status:t.value,value:l}}}}ks.create=(n,e,t)=>new ks({valueType:e,keyType:n,typeName:M.ZodMap,...j(t)});class Ot extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.set)return A(a,{code:C.invalid_type,expected:R.set,received:a.parsedType}),H;const s=this._def;s.minSize!==null&&a.data.sizes.maxSize.value&&(A(a,{code:C.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const r=this._def.valueType;function o(h){const m=new Set;for(const f of h){if(f.status==="aborted")return H;f.status==="dirty"&&t.dirty(),m.add(f.value)}return{status:t.value,value:m}}const l=[...a.data.values()].map((h,m)=>r._parse(new Ne(a,h,a.path,m)));return a.common.async?Promise.all(l).then(h=>o(h)):o(l)}min(e,t){return new Ot({...this._def,minSize:{value:e,message:I.toString(t)}})}max(e,t){return new Ot({...this._def,maxSize:{value:e,message:I.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ot.create=(n,e)=>new Ot({valueType:n,minSize:null,maxSize:null,typeName:M.ZodSet,...j(e)});class Ss extends z{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ss.create=(n,e)=>new Ss({getter:n,typeName:M.ZodLazy,...j(e)});class Wn extends z{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return A(t,{received:t.data,code:C.invalid_literal,expected:this._def.value}),H}return{status:"valid",value:e.data}}get value(){return this._def.value}}Wn.create=(n,e)=>new Wn({value:n,typeName:M.ZodLiteral,...j(e)});function Pr(n,e){return new St({values:n,typeName:M.ZodEnum,...j(e)})}class St extends z{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return A(t,{expected:V.joinValues(a),received:t.parsedType,code:C.invalid_type}),H}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return A(t,{received:t.data,code:C.invalid_enum_value,options:a}),H}return Se(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return St.create(e,{...this._def,...t})}exclude(e,t=this._def){return St.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}St.create=Pr;class _s extends z{_parse(e){const t=V.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==R.string&&a.parsedType!==R.number){const s=V.objectValues(t);return A(a,{expected:V.joinValues(s),received:a.parsedType,code:C.invalid_type}),H}if(this._cache||(this._cache=new Set(V.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=V.objectValues(t);return A(a,{received:a.data,code:C.invalid_enum_value,options:s}),H}return Se(e.data)}get enum(){return this._def.values}}_s.create=(n,e)=>new _s({values:n,typeName:M.ZodNativeEnum,...j(e)});class ln extends z{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==R.promise&&t.common.async===!1)return A(t,{code:C.invalid_type,expected:R.promise,received:t.parsedType}),H;const a=t.parsedType===R.promise?t.data:Promise.resolve(t.data);return Se(a.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ln.create=(n,e)=>new ln({type:n,typeName:M.ZodPromise,...j(e)});class _t extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===M.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=this._def.effect||null,r={addIssue:o=>{A(a,o),o.fatal?t.abort():t.dirty()},get path(){return a.path}};if(r.addIssue=r.addIssue.bind(r),s.type==="preprocess"){const o=s.transform(a.data,r);if(a.common.async)return Promise.resolve(o).then(async l=>{if(t.value==="aborted")return H;const h=await this._def.schema._parseAsync({data:l,path:a.path,parent:a});return h.status==="aborted"?H:h.status==="dirty"||t.value==="dirty"?It(h.value):h});{if(t.value==="aborted")return H;const l=this._def.schema._parseSync({data:o,path:a.path,parent:a});return l.status==="aborted"?H:l.status==="dirty"||t.value==="dirty"?It(l.value):l}}if(s.type==="refinement"){const o=l=>{const h=s.refinement(l,r);if(a.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(a.common.async===!1){const l=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return l.status==="aborted"?H:(l.status==="dirty"&&t.dirty(),o(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(l=>l.status==="aborted"?H:(l.status==="dirty"&&t.dirty(),o(l.value).then(()=>({status:t.value,value:l.value}))))}if(s.type==="transform")if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!vt(o))return H;const l=s.transform(o.value,r);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:l}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>vt(o)?Promise.resolve(s.transform(o.value,r)).then(l=>({status:t.value,value:l})):H);V.assertNever(s)}}_t.create=(n,e,t)=>new _t({schema:n,typeName:M.ZodEffects,effect:e,...j(t)});_t.createWithPreprocess=(n,e,t)=>new _t({schema:e,effect:{type:"preprocess",transform:n},typeName:M.ZodEffects,...j(t)});class Ve extends z{_parse(e){return this._getType(e)===R.undefined?Se(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ve.create=(n,e)=>new Ve({innerType:n,typeName:M.ZodOptional,...j(e)});class wt extends z{_parse(e){return this._getType(e)===R.null?Se(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}wt.create=(n,e)=>new wt({innerType:n,typeName:M.ZodNullable,...j(e)});class zn extends z{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===R.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}zn.create=(n,e)=>new zn({innerType:n,typeName:M.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...j(e)});class Vn extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return an(s)?s.then(r=>({status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Fe(a.common.issues)},input:a.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Fe(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Vn.create=(n,e)=>new Vn({innerType:n,typeName:M.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...j(e)});class ws extends z{_parse(e){if(this._getType(e)!==R.nan){const a=this._getOrReturnCtx(e);return A(a,{code:C.invalid_type,expected:R.nan,received:a.parsedType}),H}return{status:"valid",value:e.data}}}ws.create=n=>new ws({typeName:M.ZodNaN,...j(n)});class jy extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class ia extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const r=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return r.status==="aborted"?H:r.status==="dirty"?(t.dirty(),It(r.value)):this._def.out._parseAsync({data:r.value,path:a.path,parent:a})})();{const s=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?H:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:a.path,parent:a})}}static create(e,t){return new ia({in:e,out:t,typeName:M.ZodPipeline})}}class qn extends z{_parse(e){const t=this._def.innerType._parse(e),a=s=>(vt(s)&&(s.value=Object.freeze(s.value)),s);return an(t)?t.then(s=>a(s)):a(t)}unwrap(){return this._def.innerType}}qn.create=(n,e)=>new qn({innerType:n,typeName:M.ZodReadonly,...j(e)});var M;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(M||(M={}));const c=He.create,i=kt.create,B=Hn.create,Uy=Fn.create,oe=jn.create;$e.create;const x=De.create,p=Q.create,ge=rn.create;on.create;tt.create;const Y=cn.create,X=Wn.create,F=St.create;ln.create;Ve.create;wt.create;p({page:i(),limit:i(),total:i(),totalPages:i()});const oa=p({requestId:c().optional(),timestamp:ge([c(),i()]).optional()}).passthrough(),Wy=p({success:X(!1),error:c(),code:i().optional(),meta:oa.optional()}),zy=p({success:X(!1),error:p({code:c(),message:c()}),code:i().optional(),meta:oa.optional()}),Vy=p({success:X(!1),message:c(),code:ge([c(),i()]).optional(),meta:oa.optional()});ge([Wy,zy,Vy]);const Lr=p({source:c().optional(),sequence:i().optional()}).passthrough();function W(n,e){return p({type:X(n),data:e,timestamp:i(),meta:Lr.optional()})}const qy=p({type:c(),data:oe(),timestamp:i(),meta:Lr.optional()});p({id:c(),type:c(),created:ge([c(),i()]),data:oe()});const ca=F(["basic","advanced","premium_plus"]),Dr=F(["owner","admin","developer","billing","viewer"]),$y=p({perSecond:i(),perDay:i()}),Nr=p({id:c(),customerId:c(),url:c(),description:c().nullable(),events:x(c()),status:c(),totalDeliveries:i(),successfulDeliveries:i(),failedDeliveries:i(),lastDeliveryAt:c().nullable(),lastFailureAt:c().nullable(),consecutiveFailures:i(),createdAt:c(),updatedAt:c()}),Or=p({id:c(),endpointId:c(),eventId:c(),eventType:c(),status:c(),attempts:i(),maxAttempts:i(),lastAttemptAt:c().nullable(),nextAttemptAt:c().nullable(),completedAt:c().nullable(),responseCode:i().nullable(),responseTimeMs:i().nullable(),errorMessage:c().nullable(),createdAt:c(),updatedAt:c()}),la=p({customerId:c(),organizationId:c(),userId:c(),email:c(),role:Dr,name:c().nullable().optional(),preferredLanguage:c().optional()}),Mr=ge([c(),p({code:c(),message:c()})]).optional();p({success:B(),data:la.optional(),error:Mr});p({success:B(),data:la.optional(),error:Mr});p({authenticated:B(),data:la.optional()});const Hr=F(["pending","detecting","confirming","paid","expired","cancelled","refunded"]);p({id:c(),invoiceNumber:c(),customerId:c(),subscriptionId:c().nullable(),paymentAddress:c(),amountBtc:c(),amountSats:i(),amountReceivedSats:i().nullable(),status:Hr,paymentTxid:c().nullable(),confirmations:i(),paidAt:c().nullable(),confirmedAt:c().nullable(),expiresAt:c(),createdAt:c(),updatedAt:c(),description:c().nullable(),metadata:Y(oe()).nullable()});p({invoiceId:c(),status:Hr,paymentAddress:c(),amountBtc:c(),amountSats:i(),amountReceivedSats:i().nullable(),confirmations:i(),paymentTxid:c().nullable(),paidAt:c().nullable(),expiresAt:c()});p({id:c(),tier:F(["basic","advanced","premium_plus"]),tierName:c(),status:F(["pending","active","suspended","cancelled","expired"]),startDate:c().optional(),endDate:c().optional(),features:x(c())});p({invoiceId:c(),invoiceNumber:c(),paymentAddress:c(),amountBtc:ge([c(),i()]),amountSats:i(),expiresAt:c(),targetTier:c()});const Ky=p({id:c(),entryType:c(),amountSats:i(),amountBtc:c(),source:c(),description:c().nullable(),balanceAfterSats:i(),createdAt:c()});p({balanceSats:i(),balanceBtc:c(),entries:x(Ky)});const Gy=Nr.extend({status:F(["active","paused","disabled"])});p({endpoint:Gy,secret:c()});Or.extend({status:F(["pending","success","failed","retrying"])});p({name:c(),category:c(),description:c()});p({subscriptionId:c(),dailyCount:i(),dailyLimit:i(),hourlyCount:i(),secondCount:i(),secondLimit:i(),percentUsed:i(),isOverLimit:B()});const Zy=p({date:c(),requests:i(),successful:i(),failed:i(),avgResponseTimeMs:i().nullable()});x(Zy);const Yy=p({restAccess:F(["limited","full","unrestricted"]),blockVisualizerStream:F(["limited","full"]),dashboardStream:B(),singleAddressTracking:B(),multiAddressTracking:B(),singleTransactionTracking:B(),multiTransactionTracking:B(),coBrandedSubdomain:B(),whiteLabelDomain:B(),dedicatedSupport:B(),advancedAnalytics:B()}).passthrough();p({tier:ca,tierName:c(),rateLimits:$y,features:Yy});p({id:c(),customerId:c(),legalName:c().nullable(),billingEmail:c().nullable(),technicalContactEmail:c().nullable(),website:c().nullable(),status:F(["active","suspended","inactive"]),createdAt:c()});p({id:c(),email:c(),name:c().nullable(),role:F(["owner","admin","developer","billing","viewer"]),isActive:B(),createdAt:c(),lastLoginAt:c().nullable()});p({userId:c(),email:c(),role:c()});p({id:c(),keyPrefix:c(),name:c().optional(),status:F(["active","revoked","expired"]),lastUsedAt:c().optional(),usageCount:i(),createdAt:c(),expiresAt:c().optional()});const Jy=p({key:c(),keyPrefix:c(),keyId:c(),createdAt:c()});p({revokedKeyId:c(),newKey:Jy});p({success:X(!0),user:p({id:c(),email:c(),role:c(),name:c()})}).passthrough();p({success:X(!1),error:c()}).passthrough();p({success:B(),authenticated:B(),user:p({id:c(),email:c(),role:c(),name:c().nullable()}).optional()}).passthrough();p({success:B(),error:c().optional()}).passthrough();p({success:X(!0),data:p({invoiceId:c(),paymentAddress:c(),amountSats:i(),amountBtc:c(),tier:c(),expiresAt:c()})}).passthrough();const Tt=ca,Fr=F(["healthy","degraded","down"]),Xy=F(["scheduled","in_progress","completed","cancelled"]),Qy=F(["critical","major","minor","info"]),jr=F(["investigating","identified","monitoring","resolved"]),Ur=p({daily:i().nullable(),weekly:i().nullable(),monthly:i()}).passthrough(),eb=p({total:i(),byTier:Y(Tt,i())}).passthrough(),$n=p({mrr:i(),arr:i(),growthPercent:i(),mrrUsd:i(),arrUsd:i()}).passthrough(),tb=p({name:c(),status:Fr,latencyMs:i().optional(),error:c().optional()}).passthrough();p({activeUsers:Ur,payingCustomers:eb,apiCallsToday:i(),systemUptime:i().nullable(),revenue:$n,activeIncidents:i().nullable(),generatedAt:c()}).passthrough();const nb=p({date:c(),revenueBtc:i(),revenueUsd:i(),newSubscriptions:i(),churns:i()}).passthrough(),ab=p({tier:Tt,subscribers:i(),mrrBtc:i(),mrrUsd:i(),percentOfTotal:i()}).passthrough();p({current:$n,previous:$n.nullable(),dailyRevenue:x(nb),byTier:x(ab),arpu:i(),ltv:i(),period:p({start:c(),end:c(),days:i()}).passthrough()}).passthrough();const sb=p({totalCalls:i(),byTier:Y(Tt,i()),peakRps:i(),avgRps:i(),errorRate:i(),byStatus:p({success2xx:i(),clientError4xx:i(),serverError5xx:i()}).passthrough()}).passthrough(),rb=p({endpoint:c(),method:c(),calls:i(),avgLatencyMs:i(),errorRate:i()}).passthrough(),ib=p({hour:i(),calls:i(),avgLatencyMs:i()}).passthrough();p({activeUsers:Ur,usage:sb,topEndpoints:x(rb).nullable(),hourlyPattern:x(ib).nullable(),period:p({start:c(),end:c()}).passthrough()}).passthrough();const Es=p({apiKeyPrefix:c(),email:c().optional(),tier:Tt,totalCalls:i(),usagePercent:i(),lastActiveAt:c()}).passthrough(),ob=p({apiKeyPrefix:c(),email:c().optional(),tier:Tt,reason:F(["usage_drop","approaching_limit","payment_failed","inactive"]),riskScore:i(),details:c()}).passthrough();p({totalCustomers:i(),newCustomers:i(),topCustomers:x(Es),atRiskCustomers:x(ob),approachingLimits:p({count:i(),customers:x(Es)}).passthrough()}).passthrough();const cb=p({name:c(),uptime:i(),downtimeMinutes:i(),incidentCount:i(),currentStatus:Fr}).passthrough();p({overallUptime:i(),services:x(cb),currentStatus:x(tb),activeIncidents:i(),mttr:i()}).passthrough();const lb=p({id:c(),title:c(),description:c(),scheduledStart:c(),scheduledEnd:c(),status:Xy,affectedServices:x(c()),createdBy:c(),createdAt:c()}).passthrough(),ub=p({id:c(),message:c(),status:jr,timestamp:c(),author:c()}).passthrough(),Ts=p({id:c(),title:c(),description:c(),severity:Qy,status:jr,affectedServices:x(c()),startedAt:c(),resolvedAt:c().optional(),updates:x(ub)}).passthrough(),db=p({id:c(),type:F(["warning","error","info"]),message:c(),service:c(),timestamp:c(),acknowledged:B()}).passthrough();p({scheduledMaintenance:x(lb),activeIncidents:x(Ts),recentIncidents:x(Ts),alerts:x(db),stats:p({upcomingMaintenance:i(),activeIncidents:i(),unresolvedAlerts:i(),incidentsLast30Days:i()}).passthrough()}).passthrough();const hb=p({rate:i(),count:i(),revenueLostBtc:i(),reasons:x(p({reason:c(),count:i()}).passthrough()).optional()}).passthrough(),mb=p({tier:Tt,totalSubscribers:i(),newThisPeriod:i(),churnedThisPeriod:i(),netChange:i(),percentChange:i()}).passthrough();p({totalActive:i(),byTier:x(mb),newSubscriptions:i(),churn:hb,netChange:i(),conversionRate:i()}).passthrough();p({l1HitRate:i(),l2HitRate:i(),evictionCount:i(),invalidationCount:i(),totalKeys:i(),memoryUsage:i(),timestamp:c()}).passthrough();const pb=p({path:c(),count:i(),avgLatency:i()}).passthrough();p({requestsPerSecond:i(),errorRate:i(),p50Latency:i(),p95Latency:i(),p99Latency:i(),topEndpoints:x(pb),timestamp:c()}).passthrough();p({environment:c(),redis:p({connected:B()}).passthrough(),cache:p({ttl:i(),maxSize:i()}).passthrough(),observability:p({prometheusEnabled:B(),lokiEnabled:B(),tempoEnabled:B()}).passthrough()}).passthrough();const Mt=p({id:c(),severity:F(["critical","warning","info"]),message:c(),timestamp:c()}).passthrough();p({active:x(Mt),recent:x(Mt),count:p({critical:i(),warning:i(),info:i()}).passthrough()}).passthrough();const Bn=p({avg:i(),min:i(),max:i(),sampleCount:i(),avgErrorAbs:i(),avgErrorPercent:i()}).passthrough(),Bt=p({last24h:Bn,last7d:Bn,last30d:Bn}).passthrough(),fb=p({blockHeight:i(),predictionType:c(),accuracyPercent:i(),predictedValue:i().optional(),actualValue:i().optional(),errorAbs:i().optional(),errorPercent:i().optional(),predictedCount:i().optional(),actualCount:i().optional(),matched:i().optional(),missed:i().optional(),extra:i().optional()}).passthrough();p({mempool:Bt,feeRate:Bt,blockTime:Bt,sixHourFeeRate:Bt,congestionUtilisation:Bt,recentRecords:x(fb),timestamp:c()}).passthrough();const gb=p({enabled:B(),source:F(["redis","default"])}).passthrough();Y(c(),gb);p({success:B(),message:c().optional(),error:c().optional()}).passthrough();p({success:B(),message:c().optional(),error:c().optional(),data:p({service:c(),enabled:B(),previousValue:B(),timestamp:c(),duration:i()}).passthrough().optional()}).passthrough();const Cs=p({name:c(),status:F(["healthy","degraded","unhealthy","unknown"]),priority:F(["critical","important","optional"]),details:p({available:B(),responsive:B(),metrics:Y(c(),oe()).optional(),lastSuccess:i().optional(),consecutiveFailures:i().optional()}).passthrough(),timestamp:i(),responseTime:i().optional(),error:c().optional()}).passthrough();p({success:B(),message:c().optional(),error:c().optional(),data:ge([Cs,x(Cs)]).optional()}).passthrough();const yb=p({name:c(),status:c(),latency:i().optional(),details:Y(c(),oe()).optional()}).passthrough();x(yb);p({coreTipHeight:i(),pgTipHeight:i(),pgEnrichedHeight:i(),pgTipLagBlocks:i(),enrichmentGapBlocks:i(),unenrichedCount:i(),enrichmentPercent:i(),lastEnrichedAt:c().nullable(),pipelineHealth:F(["normal","degraded","critical"]),timestamp:c()}).passthrough();p({name:c(),enabled:B()}).passthrough();p({success:X(!0),message:c(),timestamp:c(),duration:i()}).passthrough();const bb=p({os:c(),nodeVersion:c(),environment:c(),uptime:i()}).passthrough(),vb=p({host:c(),port:i(),password:c(),status:c()}).passthrough(),kb=p({l1Ttl:i(),l2Ttl:i(),maxKeys:i()}).passthrough(),Sb=p({enabled:B(),emailTo:c(),webhookUrl:c(),smtpUser:c(),smtpPassword:c()}).passthrough();p({success:X(!0),data:p({system:bb,redis:vb,cache:kb,alerts:Sb}).passthrough()}).passthrough();const _b=p({state:F(["CLOSED","OPEN","HALF_OPEN"]),failureCount:i(),successCount:i(),lastFailure:i().optional(),nextAttempt:i().optional(),lastStateChange:i(),totalCalls:i(),totalFailures:i(),totalSuccesses:i()}).passthrough();p({success:X(!0),data:p({circuitBreakers:Y(c(),_b),allClosed:B(),summary:c()}),timestamp:i()}).passthrough();ge([p({received:X(!0),metricsCount:i()}).passthrough(),p({received:X(!1),error:c()}).passthrough()]);const Ht=ca,Wr=F(["active","suspended","inactive"]),wb=F(["contract","invoice","receipt","report","kyc","legal","other"]),zr=Dr,Eb=F(["pending","confirmed","failed","expired"]),Tb=p({id:c(),legalName:c().nullable(),email:c(),status:Wr,tier:Ht,userCount:i(),documentCount:i(),totalRevenueBtc:i(),lastActivityAt:c().nullable(),createdAt:c()}).passthrough();p({clients:x(Tb),total:i(),page:i(),limit:i(),totalPages:i()}).passthrough();const Cb=p({street:c().nullable().optional(),city:c().nullable().optional(),state:c().nullable().optional(),postalCode:c().nullable().optional(),country:c().nullable().optional()}).passthrough(),Ab=p({id:c(),customerId:c(),legalName:c().nullable(),taxId:c().nullable(),billingEmail:c().nullable(),billingAddress:Cb,industry:c().nullable(),website:c().nullable(),logoUrl:c().nullable(),accountTier:Ht.nullable(),primaryContactId:c().nullable(),status:Wr,metadata:Y(c(),oe()),createdAt:c(),updatedAt:c()}).passthrough(),Vr=p({id:c(),action:c(),resourceType:c(),resourceId:c().nullable(),actorName:c().nullable(),actorEmail:c().nullable(),actorType:F(["admin","client"]).nullable(),status:F(["success","failure"]),createdAt:c()}).passthrough();p({organization:Ab,customer:p({id:c(),email:c(),tier:Ht,status:c(),createdAt:c()}).passthrough(),stats:p({userCount:i(),activeUserCount:i(),documentCount:i(),totalRevenueBtc:i(),totalRevenueUsd:i(),lastInvoiceDate:c().nullable(),lastActivityAt:c().nullable()}).passthrough(),recentActivity:x(Vr)}).passthrough();const qr=p({id:c(),email:c(),name:c().nullable(),role:zr,isActive:B(),createdAt:c()}).passthrough();p({id:c(),organizationId:c(),email:c(),name:c().nullable(),role:zr,isActive:B(),notes:c().nullable(),metadata:Y(c(),oe()),createdAt:c(),updatedAt:c()}).passthrough();const $r=p({id:c(),type:wb,title:c(),fileName:c(),fileSize:i(),mimeType:c(),uploadedAt:c(),uploadedBy:c().nullable()}).passthrough(),xb=p({id:c(),invoiceId:c(),clientId:c(),clientName:c().nullable(),clientEmail:c(),amountBtc:i(),amountUsd:i(),status:Eb,txHash:c().nullable(),paidAt:c().nullable(),createdAt:c()}).passthrough();p({transactions:x(xb),total:i(),page:i(),limit:i(),totalPages:i(),summary:p({totalAmountBtc:i(),totalAmountUsd:i(),transactionCount:i()}).passthrough()}).passthrough();p({logs:x(Vr),total:i(),page:i(),limit:i(),totalPages:i()}).passthrough();const Bb=p({totalReceivedBtc:i(),totalReceivedUsd:i(),invoiceTotalBtc:i(),invoiceTotalUsd:i(),paidCount:i(),unpaidCount:i(),pendingCount:i(),overdueCount:i()}).passthrough(),Rb=p({totalClients:i(),activeClients:i(),newClientsThisMonth:i(),churnedThisMonth:i(),churnRate:i()}).passthrough(),Ib=p({id:c(),legalName:c().nullable(),email:c(),tier:Ht,totalRevenueBtc:i(),totalRevenueUsd:i(),invoiceCount:i(),percentOfTotal:i()}).passthrough(),Pb=p({tier:Ht,clientCount:i(),revenueBtc:i(),revenueUsd:i(),percentOfTotal:i()}).passthrough();p({revenue:Bb,customers:Rb,topClients:x(Ib),tierBreakdown:x(Pb),period:p({start:c(),end:c()}).passthrough(),generatedAt:c()}).passthrough();p({documents:x($r)}).passthrough();p({document:$r,message:c()}).passthrough();p({downloadUrl:c(),expiresAt:c(),fileName:c(),mimeType:c()}).passthrough();p({users:x(qr)}).passthrough();p({user:qr,message:c()}).passthrough();p({message:c()}).passthrough();const Lb=p({id:c(),name:c(),priceBtc:i(),priceUsd:i(),features:x(c()),rateLimits:p({perSecond:i(),perDay:i()})}).passthrough();p({tiers:x(Lb)}).passthrough();p({invoiceId:c(),tier:c(),amountBtc:i(),paymentAddress:c(),expiresAt:c(),qrCodeUrl:c(),status:X("pending")}).passthrough();p({invoiceId:c(),tier:c(),amountBtc:i(),paymentAddress:c(),status:F(["pending","detecting","confirming","paid","expired"]),confirmations:i(),requiredConfirmations:i(),expiresAt:c(),paidAt:c().optional(),apiKeyReady:B()}).passthrough();p({apiKey:c(),keyPrefix:c(),tier:c(),expiresAt:c(),rateLimits:p({perSecond:i(),perDay:i()}),note:c()}).passthrough();const Kr=Nr,Db=Or;p({events:x(c())});Kr.extend({secret:c()});p({endpoints:x(Kr)});p({success:X(!0)});p({secret:c(),note:c()});p({deliveries:x(Db)});p({error:p({code:c(),message:c(),details:oe().optional()})});p({deletedCount:i(),olderThanDays:i()}).passthrough();p({error:c()}).passthrough();p({fromHeight:i(),toHeight:i(),enriched:i(),failed:i()}).passthrough();p({error:c()}).passthrough();const lt=p({status:F(["up","degraded","down"]),latencyMs:i(),lastCheck:i(),details:Y(c(),oe()).optional()}).passthrough();p({status:F(["healthy","degraded","unhealthy"]),timestamp:i(),services:p({bitcoinCore:lt,zmq:lt,electrum:lt,redis:lt,postgres:lt,websocket:lt}).passthrough(),summary:p({healthy:i(),degraded:i(),unhealthy:i()}).passthrough()}).passthrough();function Gr(n){return p({success:X(!0),data:n,generatedAt:c()})}p({success:X(!1),error:c(),message:c()}).passthrough();const Nb=p({name:c(),enabled:B(),envVar:c(),description:c(),defaultValue:B(),dependencies:x(c())}).passthrough();Gr(x(Nb));const Ob=p({name:c(),enabled:B(),message:c()});Gr(Ob);const Mb=p({requestId:c(),timestamp:i()});p({success:X(!1),error:p({code:c(),message:c()}),meta:Mb});const Zr=p({isEnabled:B(),circuitBreakerEnabled:B(),rateLimitingEnabled:B(),lastError:c().optional(),lastSuccess:i().optional(),failureCount:i(),isCircuitOpen:B()}).passthrough();p({services:Y(c(),Zr),timestamp:i()});p({service:c(),status:Zr,timestamp:i()});const Hb=p({service:c(),isEnabled:B(),isOpen:B(),failureCount:i(),lastError:c().nullable(),lastSuccess:i().nullable()}).passthrough();p({circuitBreakers:x(Hb),timestamp:i()});const Fb=p({service:c(),isEnabled:B(),isAvailable:B(),lastError:c().nullable(),lastSuccess:i().nullable()}).passthrough();p({rateLimits:x(Fb),timestamp:i()});p({service:c(),enabled:B(),message:c()});p({service:c(),message:c()});p({endpoints:Y(c(),c()),services:Y(c(),c()),environmentVariables:Y(c(),c())});p({active:x(Mt),history:x(Mt)});x(Mt);Y(c(),oe()).and(p({}));Y(c(),oe()).and(p({}));Y(c(),oe()).and(p({}));Y(c(),oe()).and(p({}));p({minutes:i()}).passthrough();const jb=p({id:c(),endpoint:c(),method:c(),statusCode:i(),latencyMs:i(),ipAddress:c().nullable(),apiKeyPrefix:c(),createdAt:c()}).passthrough();p({success:X(!0),data:x(jb),pagination:p({page:i(),limit:i(),total:i(),totalPages:i()}).passthrough()});const Ub=p({method:c(),timestamp:c(),duration_ms:i(),cached:B()});p({success:X(!1),error:p({code:c(),message:c()}),meta:Ub});const Wb=p({branch:x(c()),header:c(),root:c()}).passthrough(),zb=ge([c(),Wb]);ge([p({count:i(),hex:c(),max:i()}).passthrough(),x(zb)]);const Vb=c(),qb=p({txid:c(),hash:c(),version:i(),size:i(),vsize:i(),weight:i(),locktime:i()}).passthrough();ge([Vb,qb]);p({block_height:i(),merkle:x(c()),pos:i()});p({address:c(),confirmed:i(),unconfirmed:i()}).passthrough();p({address:c(),history:x(p({tx_hash:c(),height:i()}))}).passthrough();p({address:c(),utxos:x(p({tx_hash:c(),tx_pos:i(),value:i(),height:i()}))}).passthrough();p({address:c(),mempool:x(p({tx_hash:c(),height:i(),fee:i().optional()}))}).passthrough();p({address:c()}).passthrough();p({address:c(),page:i(),pageSize:i(),direction:c().optional(),includeMempool:B().optional(),transactions:x(oe()),total:i().optional()}).passthrough();p({targetBlocks:i(),feeRate:i()});p({size:i(),bytes:i(),usage:i(),maxmempool:i(),mempoolminfee:i(),minrelaytxfee:i()}).passthrough();p({version:p({serverSoftwareVersion:c(),negotiatedProtocolVersion:c()}).nullable(),features:p({genesis_hash:c(),hash_function:c(),server_version:c(),protocol_max:c(),protocol_min:c()}).passthrough().nullable()}).passthrough();p({usd:i(),change24h:i().optional(),changePercent24h:i().optional(),lastUpdated:i().optional(),source:F(["live","cache","fallback"]).optional()}).passthrough();p({nextBlockFee:i(),sixHourFee:i(),timestamp:i(),isReliable:B(),isFallback:B().optional()}).passthrough();p({congestionScore:i(),congestionLevel:F(["low","moderate","high","extreme"]),mempool:p({txCount:i(),vsizeBytes:i(),minFeeRate:i()}),fees:p({fastest:i(),halfHour:i(),hour:i(),economy:i()}),delayScore:i(),activityLoad:i(),delayLoad:i(),timestamp:i()}).passthrough();p({tipHeight:i(),tipHash:c(),timestamp:ge([c(),i()]),source:F(["postgresql","rpc-fallback"])});const $b=p({priceUsd:i(),congestionLoad:i(),feeRates:p({fastest:i(),halfHour:i(),hour:i(),economy:i()})}),Kb=p({prices:p({id:c(),symbol:c(),name:c(),image:c(),current_price:i(),market_cap:i(),market_cap_rank:i(),fully_diluted_valuation:i(),total_volume:i(),high_24h:i(),low_24h:i(),price_change_24h:i(),price_change_percentage_24h:i(),market_cap_change_24h:i(),market_cap_change_percentage_24h:i(),circulating_supply:i(),total_supply:i(),max_supply:i(),ath:i(),ath_change_percentage:i(),ath_date:c(),atl:i(),atl_change_percentage:i(),atl_date:c(),roi:Uy(),last_updated:c()})}),Gb=p({currency:X("BTC"),fiat:X("USD"),value:i(),change24h:i(),changePercent24h:i(),asOfMs:i(),provider:c()}),Zb=p({rates:Y(c(),i()),timestamp:i(),provider:c()}),Yb=p({base:X("USD"),rates:Y(c(),i()),asOfMs:i(),provider:c()}),Jb=p({rates:Y(c(),p({from:c(),to:c(),rate:i(),inverseRate:i(),lastUpdated:i(),provider:c()})),timestamp:i(),provider:c()}),Xb=p({nextBlockFee:i(),sixHourFee:i(),timestamp:i()}),Qb=p({congestionScore:i(),congestionLevel:F(["low","moderate","high","extreme"]),mempool:p({txCount:i(),vsizeBytes:i(),minFeeRate:i()}),fees:p({fastest:i(),halfHour:i(),hour:i(),economy:i()}),delayScore:i(),activityLoad:i(),delayLoad:i(),timestamp:i()}),ev=p({state:p({athPrice:i(),isAtAth:B(),athReachedAt:i().nullable(),athExpiresAt:i().nullable(),distanceFromAth:i(),currentPollInterval:i(),lastComparedAt:i()}),isNewAth:B(),previousAthPrice:i().optional()}),tv=p({supply:p({circulatingSupply:i(),percentageIssued:i(),issuanceRemaining:i(),issuance24h:i(),blockHeight:i(),timestamp:i()}),halving:p({halvingAtBlock:i(),currentEpoch:i(),blocksRemaining:i(),btcUntilHalving:i(),epochProgress:i(),projectedDate:i(),currentSubsidy:i()})}),nv=W("dashboard.update",$b),av=W("price_update",Kb),sv=W("price.current",Gb),rv=W("exchange_rate_update",Zb),iv=W("fx.rates",Yb),ov=W("exchange.rates",Jb),cv=W("fee_update",Xb),lv=W("congestion_update",Qb),uv=W("ath_update",ev),dv=W("supply_update",tv),ua=p({hash:c(),height:i(),timestamp:i(),txCount:i(),avgfeerate:i(),weight:i().optional(),size:i().optional(),feerateP10:i().optional(),feerateP50:i().optional(),feerateP90:i().optional(),medianfee:i().optional(),totalfee:i().optional(),minerName:c().optional(),minfeerate:i().optional(),maxfeerate:i().optional()}),hv=p({block:p({hash:c(),height:i(),timestamp:i(),tx_count:i(),previous_hash:c(),merkle_root:c(),version:i(),nonce:i(),bits:c(),difficulty:i(),size:i(),weight:i(),miner_name:c().optional()})}),mv=p({height:i(),lastBlockTime:i(),blockStats:p({transactionCount:i(),size:i(),weight:i(),difficulty:i()}).optional()}),Yr=p({chain:c(),blocks:i(),headers:i(),bestblockhash:c(),difficulty:i(),mediantime:i(),verificationprogress:i(),chainwork:c(),pruned:B(),initialblockdownload:B(),size_on_disk:i(),warnings:c()}),pv=p({version:i(),subversion:c(),protocolversion:i(),localservices:c(),localservicesnames:x(c()),localrelay:B(),timeoffset:i(),networkactive:B(),connections:i(),connections_in:i(),connections_out:i(),networks:x(p({name:c(),limited:B(),reachable:B(),proxy:c(),proxy_randomize_credentials:B()})),relayfee:i(),incrementalfee:i(),localaddresses:x(p({address:c(),port:i(),score:i()})),warnings:c()}),fv=p({blocks:i(),currentblockweight:i().optional(),currentblocktx:i().optional(),difficulty:i(),networkhashps:i(),pooledtx:i(),chain:c(),warnings:c()}),gv=p({blocks:x(ua),tipHeight:i(),lastUpdated:i()}),yv=p({blocks:x(ua),startHeight:i(),limit:i(),totalHeight:i(),hasMore:B()}),bv=p({blocks:x(ua),centerHeight:i(),radius:i(),totalHeight:i()}),vv=p({estimatedSeconds:i(),confidence:i(),timeSinceLastBlockSeconds:i(),targetTime:i()}),kv=p({depth:i(),lcaHeight:i().optional(),prevTip:p({height:i(),hash:c()}),newTip:p({height:i(),hash:c()})}),Sv=W("block_added",hv),_v=W("tip.height",mv),wv=W("blockchain_update",Yr),Ev=W("blockchain.info",Yr),Tv=W("blockchain.network",pv),Cv=W("blockchain.mining",fv),Av=W("blocks_history",gv),xv=W("blocks_history_paginated",yv),Bv=W("blocks_range_response",bv),Rv=W("block_time_estimate",vv),Iv=W("chain.reorg",kv),Pv=p({mempool:p({loaded:B(),size:i(),bytes:i(),usage:i(),maxmempool:i(),mempoolminfee:i(),minrelaytxfee:i(),incrementalrelayfee:i(),unbroadcastcount:i(),fullrbf:B()})}),Lv=p({blocks:x(p({hash:c(),height:i(),txCount:i(),minFeeRate:i(),maxFeeRate:i(),medianFeeRate:i(),totalVsize:i(),totalWeight:i(),totalFees:i()})),tipHeight:i(),timestamp:i()}),Dv=p({txCount:i(),vsizeBytes:i(),fees:p({fastest:i(),halfHour:i(),hour:i(),economy:i(),minimum:i()})}),Nv=p({pendingTransactions:i(),vsize:i().optional()}),Ov=p({fast:i(),normal:i(),slow:i(),lastUpdated:i().optional()}),Mv=p({estimatedSeconds:i(),confidence:i(),medianBlockTimeMs:i(),sampleSize:i(),timeSinceLastBlock:i(),lastBlockTime:i()}),Hv=p({size:i(),vsize:i(),usage:i(),maxMempool:i(),mempoolMinFee:i(),minRelayFee:i(),feeEstimates:p({nextBlock:i(),halfHour:i(),hour:i(),economy:i(),minimum:i()}),lastUpdated:i()}),Jr=p({congestionValue:i(),congestionLevel:F(["below-average","average","congestion","extreme-congestion"]),mempoolPressure:i(),blockThroughput:i(),feePressure:i(),lastUpdated:i(),dataQuality:F(["excellent","good","fair","poor"])}),Xr=p({blocks:x(p({height:i(),avgfeerate:i(),txs:i(),total_size:i(),time:i()})),mempool:p({loaded:B(),size:i(),bytes:i(),usage:i(),maxmempool:i(),mempoolminfee:i(),minrelaytxfee:i()}),currentHeight:i(),windowSize:i(),timestamp:i()}),Fv=p({metrics:Jr,window:Xr}),jv=W("mempool_update",Pv),Uv=W("mempool_blocks",Lv),Wv=W("mempool_fees_update",Dv),zv=W("network.mempool",Nv),Vv=W("network.fees",Ov),qv=W("network.estimated-time",Mv),$v=W("network.mempool-fees",Hv),Kv=W("congestiongauge.metrics",Jr),Gv=W("congestiongauge.window",Xr),Zv=W("congestiongauge.update",Fv),Yv=p({health:p({status:F(["healthy","degraded","unhealthy"]),services:Y(c(),F(["online","offline","degraded"])),uptime:i().optional(),lastCheck:i().optional()})}),Jv=p({height:i(),hash:c(),previousHeight:i().optional(),previousHash:c().optional(),isReorg:B(),reorgDepth:i().optional(),timestamp:i()}),Xv=p({previousHeight:i(),previousHash:c(),newHeight:i(),newHash:c(),depth:i(),timestamp:i()}),Qv=p({c:p({score:i(),level:F(["low","medium","high","critical"]),mempoolSize:i(),pendingTxCount:i()}).nullable().optional(),f:p({economy:i(),normal:i(),priority:i(),timestamp:i()}).nullable().optional(),p:p({usd:i(),change24h:i(),volume24h:i(),marketCap:i()}).nullable().optional(),b:p({blockHeight:i(),difficulty:i(),hashrate:i(),blockTime:i()}).nullable().optional(),t:p({timestamps:x(i()),prices:x(i()),volumes:x(i())}).nullable().optional(),m:p({nextHalvingBlocks:i(),nextHalvingDays:i(),currentEra:i()}).nullable().optional(),_full:B().optional()}),ek=p({level:F(["debug","info","warn","error"]),message:c(),timestamp:i(),meta:Y(c(),oe()).optional()}),tk=p({type:c(),data:oe(),originalTimestamp:i()}),nk=p({batchId:c(),events:x(tk),batchMeta:p({eventCount:i(),batchDurationMs:i(),cycleNumber:i()})}),Rn=p({blockHeight:i(),halvingNumber:i(),timestamp:i().optional(),daysUntil:i().optional()}),ut=p({activationBlockHeight:i(),activationDate:i(),name:c(),description:c().optional()}),Yt=p({blockHeight:i(),timestamp:i(),description:c()}),As=p({blocksRemaining:i(),daysRemaining:i(),estimatedDate:i()}),ak=p({halvingEvents:p({currentHalving:Rn,previousHalving:Rn,nextHalving:Rn}),softForkDates:p({taproot:ut.optional(),segwit:ut.optional(),bip65:ut.optional(),bip66:ut.optional(),bip34:ut.optional(),csv:ut.optional()}),historicalFirsts:p({firstBlock:Yt,firstTransaction:Yt,firstThousandBlocks:Yt.optional(),firstMillionTransactions:Yt.optional()}),countdowns:p({nextHalving:As,previousHalving:As.optional()}),timestamp:ge([c(),i()])}),sk=W("health_update",Yv),rk=W("electrum.chain-tip",Jv),ik=W("electrum.reorg",Xv),ok=W("visualization:update",Qv),ck=W("milestone:update",ak),lk=W("logs:stream",ek),uk=W("batch",nk),Qr={"dashboard.update":nv,price_update:av,"price.current":sv,exchange_rate_update:rv,"fx.rates":iv,"exchange.rates":ov,fee_update:cv,congestion_update:lv,ath_update:uv,supply_update:dv,block_added:Sv,"tip.height":_v,blockchain_update:wv,"blockchain.info":Ev,"blockchain.network":Tv,"blockchain.mining":Cv,blocks_history:Av,blocks_history_paginated:xv,blocks_range_response:Bv,block_time_estimate:Rv,"chain.reorg":Iv,mempool_update:jv,mempool_blocks:Uv,mempool_fees_update:Wv,"network.mempool":zv,"network.fees":Vv,"network.estimated-time":qv,"network.mempool-fees":$v,"congestiongauge.metrics":Kv,"congestiongauge.window":Gv,"congestiongauge.update":Zv,health_update:sk,"electrum.chain-tip":rk,"electrum.reorg":ik,"visualization:update":ok,"milestone:update":ck,"logs:stream":lk,batch:uk};function dk(n){const e=qy.safeParse(n);if(!e.success)return{valid:!1,data:null,eventType:null,error:`Invalid WS envelope: ${e.error.issues.map(r=>r.message).join(", ")}`};const t=e.data.type,a=Qr[t];if(!a)return{valid:!0,data:e.data,eventType:t,error:null};const s=a.safeParse(n);return s.success?{valid:!0,data:s.data,eventType:t,error:null}:{valid:!1,data:null,eventType:t,error:`${t}: ${s.error.issues.map(r=>`${r.path.join(".")}: ${r.message}`).join(", ")}`}}Object.keys(Qr).length;const Rt="https://api.blocksight.live",hk={MAIN:`${Rt.replace("http","ws")}/api/v1/ws`,BLOCKS:`${Rt.replace("http","ws")}/api/v1/ws/blocks`,TRANSACTIONS:`${Rt.replace("http","ws")}/api/v1/ws/txs`,NETWORK:`${Rt.replace("http","ws")}/api/v1/ws/network`,FEES:`${Rt.replace("http","ws")}/api/v1/ws/fees`};function Ft(n,e){return(t,a)=>{try{e(t,a)}catch(s){const r=s instanceof Error?s:new Error(`${n} failed`);y.error(g.WEBSOCKET,`Error handling ${n}`,{error:r}),a.handleError(r,"WebSocketBridge")}}}const mk=50,pk=Ft("address activity",(n,e)=>{const t=n.data;if(!t||typeof t!="object"||!t.address||!t.txid){y.warn(g.WEBSOCKET,"[AddressActivity] Invalid payload: missing address or txid");return}const s=e.getState().addressTracking??{trackedAddresses:[],recentActivity:[],lastUpdate:0},r=[t,...s.recentActivity].slice(0,mk),o={addressTracking:{...s,recentActivity:r,lastUpdate:Date.now()}};e.updateState(o)});function fk(n){return n!==null&&typeof n=="object"&&"hash"in n&&"height"in n&&typeof n.hash=="string"&&typeof n.height=="number"}function gk(n){return n!==null&&typeof n=="object"&&"value"in n&&"currency"in n&&typeof n.value=="number"&&typeof n.currency=="string"}function yk(n){return n!==null&&typeof n=="object"&&"rates"in n&&"base"in n&&typeof n.rates=="object"&&typeof n.base=="string"}function bk(n){if(n===null||typeof n!="object")return!1;const e=n;return"state"in e&&"isNewAth"in e&&typeof e.isNewAth=="boolean"&&e.state!==null&&typeof e.state=="object"&&"athPrice"in e.state&&"isAtAth"in e.state&&typeof e.state.athPrice=="number"&&typeof e.state.isAtAth=="boolean"}function fn(n){return n.map(e=>({hash:e.hash,height:e.height,timestamp:dn(e.timestamp),tx_count:e.txCount,avgfeerate:e.avgfeerate??0,version:0,previous_hash:"",merkle_root:"",nonce:0,bits:"0",difficulty:0,size:e.size??0,weight:e.weight??0,feerateP10:e.feerateP10,feerateP50:e.feerateP50,feerateP90:e.feerateP90,totalfee:e.totalfee,minfeerate:e.minfeerate,maxfeerate:e.maxfeerate,miner_name:e.minerName}))}function Ct(n,e,t=bt,a=null){const s=new Set(n.map(v=>v.height)),r=new Map(e.map(v=>[v.height,v])),o=[...n.map(v=>{const T=r.get(v.height);return T?{...v,tx_count:T.tx_count??v.tx_count,avgfeerate:T.avgfeerate??v.avgfeerate,weight:T.weight??v.weight,size:T.size??v.size,feerateP10:T.feerateP10??v.feerateP10,feerateP50:T.feerateP50??v.feerateP50,feerateP90:T.feerateP90??v.feerateP90,totalfee:T.totalfee??v.totalfee,minfeerate:T.minfeerate??v.minfeerate,maxfeerate:T.maxfeerate??v.maxfeerate,miner_name:T.miner_name??v.miner_name}:v}),...e.filter(v=>!s.has(v.height))].sort((v,T)=>T.height-v.height);if(a===null)return o.slice(0,t);const l=o.length>0?o[0].height:0,h=Math.floor(t/2),m=[],f=[];for(const v of o){const T=v.height>=l-1,_=Math.abs(v.height-a)<=h;T?m.push(v):_&&f.push(v)}const b=new Set,S=[];for(const v of[...m,...f])b.has(v.height)||(b.add(v.height),S.push(v));return S.sort((v,T)=>T.height-v.height).slice(0,t)}function vk(n,e,t){const a=n.some(r=>r.height===e.height);let s;return a?s=n.map(r=>r.height===e.height?{...r,tx_count:e.tx_count??r.tx_count,miner_name:e.miner_name??r.miner_name,avgfeerate:e.avgfeerate??r.avgfeerate,weight:e.weight??r.weight,size:e.size??r.size,feerateP10:e.feerateP10??r.feerateP10,feerateP50:e.feerateP50??r.feerateP50,feerateP90:e.feerateP90??r.feerateP90,totalfee:e.totalfee??r.totalfee,minfeerate:e.minfeerate??r.minfeerate,maxfeerate:e.maxfeerate??r.maxfeerate}:r):s=[...n,e],s.length>bt?s=Ct(s,[],bt,t):s=[...s].sort((r,o)=>o.height-r.height),$s(s)}function kk(n,e,t,a){const s=Date.now(),r=a.getState(),o={previousTipHeight:n,newTipHeight:e,foundAtMs:s,newBlock:{kind:"real",id:{hash:t.hash,height:t.height},minedAtMs:dn(t.timestamp),txCount:t.tx_count,minFeeRate:0,maxFeeRate:0,medianFeeRate:0,isEnriched:!1,minerName:t.miner_name}},l={transformed:{...r.transformed,blockFound:{isAnimating:!0,phase:"preparing",currentEvent:o,lastBlockFoundAt:s}}};a.updateState(l)}function Sk(n,e){try{if(n.data.block===null||n.data.block===void 0||(e.markRealDataReceived(),!fk(n.data.block)))return;const t=n.data.block,a=e.getState(),s=a.transformed.blockchain.summary.height,r=a.raw.electrumServer.windowCenter??null;if(s>0&&s-t.height>qs){y.warn(g.WEBSOCKET,"block_added rejected — anomalous height",{blockHeight:t.height,currentTip:s,distance:s-t.height});return}const o=a.raw.electrumServer.blockHeaders,l=o.some(S=>S.height===t.height),h=vk(o,t,r),m=Date.now(),f={raw:{...a.raw,electrumServer:{...a.raw.electrumServer,blockHeaders:h,lastUpdate:m},_meta:{...a.raw._meta,electrumServer:{...a.raw._meta?.electrumServer,lastFetchedAt:m,sourceTimestamp:m,source:"websocket",ttl:12e4,isStale:!1,isMock:!1,confidence:100},coreRpc:{...a.raw._meta?.coreRpc,lastFetchedAt:m,sourceTimestamp:m,source:"websocket",ttl:12e4,isStale:!1,isMock:!1,confidence:100}}}};e.updateState(f),e.transformRawData();const b=e.getState().transformed.blockchain.summary.height;y.debug(g.WEBSOCKET,"block_added processed",{height:t.height,hash:t.hash?.substring(0,12),timestamp:t.timestamp,minedAtMs:dn(t.timestamp),previousTipHeight:s,newTipHeight:b,duplicate:l}),b>s&&r===null&&kk(s,b,t,e)}catch(t){y.error(g.WEBSOCKET,"Error handling block added",{error:t instanceof Error?t:String(t)}),e.handleError(t instanceof Error?t:new Error("Block added handling failed"),"WebSocketBridge")}}function _k(n,e,t,a){const s=Math.max(...n.map(l=>l.height)),r=n.filter(l=>l.height>=s-1);if(r.length===0)return;const o=Ct(e.raw.electrumServer.blockHeaders,r,bt,e.raw.electrumServer.windowCenter);t.updateState({raw:{...e.raw,electrumServer:{...e.raw.electrumServer,blockHeaders:o,lastUpdate:a}}}),t.transformRawData()}function wk(n,e){try{const t=n.data;if(!t.blocks||!Array.isArray(t.blocks)){y.warn(g.WEBSOCKET,"[BlocksHistory] Invalid payload: missing blocks array");return}e.markRealDataReceived();const a=e.getState(),s=Date.now(),r=fn(t.blocks);if(a.raw.electrumServer.windowCenter!==null){_k(r,a,e,s);return}const o=n.meta?.dataSource,l=o?.source||"live",h=o?.staleness,f={live:"websocket",cache:"cache",fallback:"mock",mock:"mock"}[l]||"websocket",b=h?.isStale||!1,S=l==="fallback"||l==="mock",T={live:100,cache:80,fallback:40,mock:20}[l]||100,_=Ct(a.raw.electrumServer.blockHeaders,r),w=$s(_,t.tipHeight),L={raw:{...a.raw,electrumServer:{...a.raw.electrumServer,blockHeaders:w,lastUpdate:s},_meta:{...a.raw._meta,electrumServer:{...a.raw._meta?.electrumServer,lastFetchedAt:s,sourceTimestamp:s,source:f,ttl:h?.maxAgeMs||6e4,isStale:b,isMock:S,confidence:T}}}};e.updateState(L),e.transformRawData()}catch(t){y.error(g.WEBSOCKET,"Error handling blocks history",{error:t instanceof Error?t:String(t)}),e.handleError(t instanceof Error?t:new Error("Blocks history update failed"),"WebSocketBridge")}}function Ek(n,e){try{const t=n.data;if(!t.blocks||!Array.isArray(t.blocks)){y.warn(g.WEBSOCKET,"[BlocksHistoryPaginated] Invalid payload: missing blocks array");return}if(t.blocks.length===0){window.dispatchEvent(new CustomEvent("blocksight:pagination-exhausted")),window.dispatchEvent(new CustomEvent("blocksight:paginated-response"));return}const a=e.getState(),s=Date.now(),r=fn(t.blocks),o=Ct(a.raw.electrumServer.blockHeaders,r),l={raw:{...a.raw,electrumServer:{...a.raw.electrumServer,blockHeaders:o,lastUpdate:s,paginationNextCursor:t.nextCursor??null}}};e.updateState(l),e.transformRawData(),window.dispatchEvent(new CustomEvent("blocksight:paginated-response"))}catch(t){y.error(g.WEBSOCKET,"Error handling blocks history paginated",{error:t instanceof Error?t:String(t)}),e.handleError(t instanceof Error?t:new Error("Blocks history paginated update failed"),"WebSocketBridge")}}function Tk(n,e){try{const t=n.data;if(!t.blocks||!Array.isArray(t.blocks)){y.warn(g.WEBSOCKET,"[BlocksRangeResponse] Invalid payload: missing blocks array");return}const a=e.getState(),s=Date.now(),r=fn(t.blocks),o=t.centerHeight??null,l=Ct(a.raw.electrumServer.blockHeaders,r,bt,o),h={raw:{...a.raw,electrumServer:{...a.raw.electrumServer,blockHeaders:l,lastUpdate:s,windowCenter:o}}};e.updateState(h),e.transformRawData(),window.dispatchEvent(new CustomEvent("blocksight:range-response"))}catch(t){y.error(g.WEBSOCKET,"Error handling blocks range response",{error:t instanceof Error?t:String(t)}),e.handleError(t instanceof Error?t:new Error("Blocks range response update failed"),"WebSocketBridge")}}function Ck(n,e){try{const t=n.data;if(!t.blocks||!Array.isArray(t.blocks)||t.blocks.length===0)return;const a=e.getState(),s=Date.now(),r=fn(t.blocks),o=a.raw.electrumServer.windowCenter??null,l=Ct(a.raw.electrumServer.blockHeaders,r,bt,o),h={raw:{...a.raw,electrumServer:{...a.raw.electrumServer,blockHeaders:l,lastUpdate:s}}};e.updateState(h),e.transformRawData(),window.dispatchEvent(new CustomEvent("blocksight:block-headers-response"))}catch(t){y.error(g.WEBSOCKET,"Error handling block headers response",{error:t instanceof Error?t:String(t)}),e.handleError(t instanceof Error?t:new Error("Block headers response update failed"),"WebSocketBridge")}}function Ak(n,e){try{if(n.data.prices){if(!gk(n.data.prices))return;const t=Date.now(),a=e.getState(),s=n.meta?.dataSource,r=s?.source||"live",o=s?.staleness,h={live:"websocket",cache:"cache",fallback:"mock",mock:"mock"}[r]||"websocket",m=o?.isStale||!1,f=r==="fallback"||r==="mock",S={live:100,cache:80,fallback:40,mock:20}[r]||100,v={raw:{...a.raw,external:{...a.raw.external,priceData:n.data.prices,lastUpdate:t},_meta:{...a.raw._meta,external:{...a.raw._meta?.external,lastFetchedAt:t,sourceTimestamp:t,source:h,ttl:o?.maxAgeMs||3e5,isStale:m,isMock:f,confidence:S}}}};e.updateState(v),e.transformRawData()}}catch(t){y.error(g.WEBSOCKET,"Error handling price update",{error:t instanceof Error?t:String(t)}),e.handleError(t instanceof Error?t:new Error("Price update failed"),"WebSocketBridge")}}function xk(n,e){try{if(n.data.exchangeRates){if(!yk(n.data.exchangeRates))return;const t={raw:{...e.getState().raw,external:{...e.getState().raw.external,exchangeRates:n.data.exchangeRates,lastUpdate:Date.now()}}};e.updateState(t),e.transformRawData()}}catch(t){y.error(g.WEBSOCKET,"Error handling exchange rate update",{error:t instanceof Error?t:String(t)}),e.handleError(t instanceof Error?t:new Error("Exchange rate update failed"),"WebSocketBridge")}}function Bk(n,e){try{const t=n.data;if(!t||!t.blocks||!Array.isArray(t.blocks)){y.warn(g.WEBSOCKET,"[MempoolBlocks] Invalid payload: missing blocks array");return}if(t.blocks.length===0){y.debug(g.WEBSOCKET,"[MempoolBlocks] Empty blocks array received, preserving existing data");return}e.markRealDataReceived();const a=e.getState(),s=Date.now(),r=a.transformed.blockchain.summary.height,o=typeof r=="number"&&!Number.isNaN(r),l=t.blocks.map((m,f)=>({kind:"real",id:{hash:m.hash,height:o?r+f+1:m.height},minedAtMs:t.timestamp||s,txCount:m.txCount,minFeeRate:m.minFeeRate,maxFeeRate:m.maxFeeRate,medianFeeRate:m.medianFeeRate,totalVsize:m.totalVsize,totalWeight:m.totalWeight,totalFees:m.totalFees})),h={transformed:{...a.transformed,blockchain:{...a.transformed.blockchain,summary:{...a.transformed.blockchain.summary,mempoolBlocks:l,lastMempoolBlocksUpdate:s}}}};e.updateState(h)}catch(t){y.error(g.WEBSOCKET,"Error handling mempool blocks update",{error:t instanceof Error?t:String(t)}),e.handleError(t instanceof Error?t:new Error("Mempool blocks update failed"),"WebSocketBridge")}}function Rk(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.congestionScore=="number"&&typeof e.congestionLevel=="string"&&["low","moderate","high","extreme"].includes(e.congestionLevel)&&typeof e.mempool=="object"&&e.mempool!==null&&typeof e.fees=="object"&&e.fees!==null&&typeof e.timestamp=="number"}function Ik(n,e){try{if(!Rk(n.data)){y.warn(g.WEBSOCKET,"[CongestionUpdate] Invalid payload received");return}e.markRealDataReceived();const t=n.data,a=e.getState(),s=Date.now(),r={raw:{...a.raw,coreRpc:{...a.raw.coreRpc,mempoolInfo:a.raw.coreRpc.mempoolInfo?{...a.raw.coreRpc.mempoolInfo,size:t.mempool.txCount,bytes:t.mempool.vsizeBytes,mempoolminfee:t.mempool.minFeeRate/1e5}:{loaded:!0,size:t.mempool.txCount,bytes:t.mempool.vsizeBytes,usage:t.mempool.vsizeBytes,maxmempool:3e8,mempoolminfee:t.mempool.minFeeRate/1e5,minrelaytxfee:t.fees.economy/1e5,incrementalrelayfee:1e-5,unbroadcastcount:0,fullrbf:!1},lastUpdate:s},_meta:{...a.raw._meta,coreRpc:{...a.raw._meta?.coreRpc,lastFetchedAt:s,sourceTimestamp:t.timestamp,source:"websocket",ttl:6e4,isStale:!1,isMock:!1,confidence:100}}},transformed:{...a.transformed,analytics:{...a.transformed.analytics,congestion:{score:t.congestionScore,level:t.congestionLevel,activityLoad:t.activityLoad,delayLoad:t.delayLoad,delayScore:t.delayScore,mempoolTxCount:t.mempool.txCount,timestamp:t.timestamp},derived:{...a.transformed.analytics.derived,feeRates:{fastest:t.fees.fastest,halfHour:t.fees.halfHour,hour:t.fees.hour,economy:t.fees.economy}}}}};e.updateState(r),e.transformRawData()}catch(t){y.error(g.WEBSOCKET,"Error handling congestion update",{error:t instanceof Error?t:String(t)}),e.handleError(t instanceof Error?t:new Error("Congestion update failed"),"WebSocketBridge")}}function Pk(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.nextBlockFee=="number"&&typeof e.sixHourFee=="number"&&typeof e.timestamp=="number"}function Lk(n,e){try{if(!Pk(n.data)){y.warn(g.WEBSOCKET,"[FeeUpdate] Invalid payload received");return}e.markRealDataReceived();const t=n.data,a=e.getState(),s=t.nextBlockFee{if(n.data.health){const t={system:{...e.getState().system,health:{...e.getState().system.health,...n.data.health,lastCheck:Date.now()}}};e.updateState(t)}}),Mk=Ft("ATH update",(n,e)=>{if(!bk(n.data)){y.warn(g.WEBSOCKET,"Invalid ATH update payload received");return}const t=n.data,s={transformed:{...e.getState().transformed,ath:t.state}};e.updateState(s),t.isNewAth?y.info(g.DATA_STORE,"New All-Time High!",{athPrice:t.state.athPrice,previousAthPrice:t.previousAthPrice}):t.state.isAtAth&&y.debug(g.DATA_STORE,"Celebrating ATH",{athPrice:t.state.athPrice})}),Hk=Ft("dashboard update",(n,e)=>{const t=n.data;if(!t.feeRates){y.warn(g.WEBSOCKET,"[DashboardUpdate] Invalid payload: missing feeRates");return}e.markRealDataReceived();const a=e.getState(),s=Date.now(),r=t.priceUsd!=null&&t.priceUsd>0?t.priceUsd:0,o={...r>0?{raw:{...a.raw,external:{...a.raw.external,priceData:a.raw.external.priceData?{...a.raw.external.priceData,value:r,asOfMs:s}:{currency:"BTC",fiat:"USD",value:r,change24h:0,changePercent24h:0,asOfMs:s,provider:"dashboard"}}}}:{},transformed:{...a.transformed,...r>0?{market:{...a.transformed.market,prices:{...a.transformed.market.prices,btc:{...a.transformed.market.prices.btc,usd:r}}}}:{},analytics:{...a.transformed.analytics,derived:{...a.transformed.analytics.derived,feeRates:t.feeRates,calculatedAt:s}}}};e.updateState(o)});function dt(n,e){return n!==void 0?n??null:e??null}const Fk=Ft("visualization update",(n,e)=>{const t=n.data;if(!t||typeof t!="object"){y.warn(g.WEBSOCKET,"[VisualizationUpdate] Invalid payload: not an object");return}e.markRealDataReceived();const a=e.getState(),s=a.transformed.visualization,r={transformed:{...a.transformed,visualization:{congestion:dt(t.c,s?.congestion),fee:dt(t.f,s?.fee),price:dt(t.p,s?.price),blockchainStats:dt(t.b,s?.blockchainStats),timeSeries:dt(t.t,s?.timeSeries),milestone:dt(t.m,s?.milestone),lastUpdate:Date.now(),isFullUpdate:t._full===!0}}};e.updateState(r)});class Ie{static instance=null;isInitialized=!1;eventHandlers=new Map;subscriptionTimeout=null;webSocketService;constructor(e){this.webSocketService=e||Qt,this.setupEventHandlers()}static getInstance(){return Ie.instance||(Ie.instance=new Ie),Ie.instance}static createWithService(e){return new Ie(e)}static resetInstance(){Ie.instance&&(Ie.instance.destroy(),Ie.instance=null)}initialize(){if(!this.isInitialized)try{this.setupWebSocketListeners(),this.webSocketService.isEnabled()&&this.connectToWebSocket(),this.isInitialized=!0}catch(e){y.error(g.WEBSOCKET,"Failed to initialize WebSocket-DataStore bridge:",{error:e instanceof Error?e:String(e)}),O.handleError(e instanceof Error?e:new Error("Bridge initialization failed"),"WebSocketBridge")}}getHandlerDeps(){return{getState:()=>O.getState(),updateState:e=>O.updateState(e),transformRawData:()=>O.transformRawData(),handleError:(e,t)=>O.handleError(e,t),markRealDataReceived:()=>{}}}setupEventHandlers(){this.eventHandlers.set("block_added",e=>Sk(e,this.getHandlerDeps())),this.eventHandlers.set("blocks_history",e=>wk(e,this.getHandlerDeps())),this.eventHandlers.set("blocks_history_paginated",e=>Ek(e,this.getHandlerDeps())),this.eventHandlers.set("blocks_range_response",e=>Tk(e,this.getHandlerDeps())),this.eventHandlers.set("block_headers_response",e=>Ck(e,this.getHandlerDeps())),this.eventHandlers.set("mempool_blocks",e=>Bk(e,this.getHandlerDeps())),this.eventHandlers.set("congestion_update",e=>Ik(e,this.getHandlerDeps())),this.eventHandlers.set("fee_update",e=>Lk(e,this.getHandlerDeps())),this.eventHandlers.set("price_update",e=>Ak(e,this.getHandlerDeps())),this.eventHandlers.set("exchange_rate_update",e=>xk(e,this.getHandlerDeps())),this.eventHandlers.set("price.current",()=>{}),this.eventHandlers.set("exchange.rates",()=>{}),this.eventHandlers.set("pong",()=>{}),this.eventHandlers.set("health_update",e=>{const t=dk(e);t.valid||y.warn(g.WEBSOCKET,"health_update event failed Zod validation",{error:t.error??void 0,eventType:"health_update"}),Ok(e,this.getHandlerDeps())}),this.eventHandlers.set("ath_update",e=>Mk(e,this.getHandlerDeps())),this.eventHandlers.set("dashboard.update",e=>Hk(e,this.getHandlerDeps())),this.eventHandlers.set("visualization:update",e=>Fk(e,this.getHandlerDeps())),this.eventHandlers.set("address.activity",e=>pk(e,this.getHandlerDeps())),this.eventHandlers.set("system:status",()=>{}),this.eventHandlers.set("monica_metrics_update",e=>Nk(e,this.getHandlerDeps())),this.eventHandlers.set("blockchain_stats_update",()=>{})}setupWebSocketListeners(){this.webSocketService.addEventListener("message",this.handleWebSocketMessage.bind(this)),this.webSocketService.addEventListener("open",this.handleWebSocketOpen.bind(this)),this.webSocketService.addEventListener("close",this.handleWebSocketClose.bind(this)),this.webSocketService.addEventListener("error",this.handleWebSocketError.bind(this))}async connectToWebSocket(){try{await this.webSocketService.connect(hk.MAIN),this.webSocketService.resetFailureState()}catch(e){const t=e instanceof Error?e.message:"WebSocket connection failed";if(y.warn(g.WEBSOCKET,"[WebSocketBridge] WebSocket connect() failed:",{error:t}),t.includes("disabled"))return;O.handleError(e instanceof Error?e:new Error("WebSocket connection failed"),"WebSocketBridge")}}handleWebSocketMessage(e){try{const t=JSON.parse(e.data);this.processWebSocketEvent(t)}catch(t){y.error(g.WEBSOCKET,"Error parsing WebSocket message",{error:t instanceof Error?t:String(t)}),O.handleError(t instanceof Error?t:new Error("WebSocket message parsing failed"),"WebSocketBridge")}}handleWebSocketOpen(){const e=O.getState(),t=Date.now();O.updateState({websocket:{...e.websocket,connected:!0,reconnectAttempts:0,lastUpdate:t,lastError:null}}),this.subscribeToEvents()}subscribeToEvents(){try{const e=Array.from(this.eventHandlers.keys()).filter(s=>s!=="pong"),t=["block_added","blocks_history"],a=e.filter(s=>!t.includes(s));this.webSocketService.send({type:"subscribe",payload:{eventTypes:t}}),this.subscriptionTimeout=setTimeout(()=>{this.subscriptionTimeout=null,this.webSocketService.send({type:"subscribe",payload:{eventTypes:a}})},500)}catch(e){y.error(g.WEBSOCKET,"[WebSocketBridge] Failed to subscribe to events",{error:e instanceof Error?e:String(e)})}}handleWebSocketClose(){O.updateState({websocket:{...O.getState().websocket,connected:!1,reconnectAttempts:this.webSocketService.getReconnectAttempts(),lastUpdate:Date.now()}})}handleWebSocketError(e){y.error(g.WEBSOCKET,"WebSocket error in DataStore bridge",{event:e});const t="WebSocket connection error";O.updateState({websocket:{...O.getState().websocket,connected:!1,reconnectAttempts:this.webSocketService.getReconnectAttempts(),lastUpdate:Date.now(),lastError:t}}),O.handleError(new Error(t),"WebSocketBridge")}processWebSocketEvent(e){try{const t=this.eventHandlers.get(e.type);t?t(e):y.warn(g.WEBSOCKET,`[WebSocketBridge] Unhandled event type: "${e.type}"`,{registeredHandlers:Array.from(this.eventHandlers.keys())})}catch(t){y.error(g.WEBSOCKET,"Error processing WebSocket event",{error:t instanceof Error?t:String(t)}),O.handleError(t instanceof Error?t:new Error("Event processing failed"),"WebSocketBridge")}}sendMessage(e){try{this.webSocketService.send(e)}catch(t){y.error(g.WEBSOCKET,"Error sending WebSocket message",{error:t instanceof Error?t:String(t)}),O.handleError(t instanceof Error?t:new Error("Message send failed"),"WebSocketBridge")}}getStatus(){return{initialized:this.isInitialized,websocketConnected:this.webSocketService.getConnectionStatus()==="connected",eventHandlers:this.eventHandlers.size}}destroy(){try{this.subscriptionTimeout&&(clearTimeout(this.subscriptionTimeout),this.subscriptionTimeout=null),this.webSocketService?.removeEventListener&&(this.webSocketService.removeEventListener("message",this.handleWebSocketMessage.bind(this)),this.webSocketService.removeEventListener("open",this.handleWebSocketOpen.bind(this)),this.webSocketService.removeEventListener("close",this.handleWebSocketClose.bind(this)),this.webSocketService.removeEventListener("error",this.handleWebSocketError.bind(this))),this.eventHandlers?.clear(),this.webSocketService?.disconnect&&this.webSocketService.disconnect(),this.isInitialized=!1}catch(e){y.debug(g.WEBSOCKET,"[WebSocketBridge] destroy cleanup error:",{error:e instanceof Error?e.message:String(e)})}}}const ei=Ie.getInstance();class jk{name="websocket";critical=!0;async check(){const e=Date.now();try{const t=ei.getStatus(),a=Date.now()-e;return t.initialized?t.websocketConnected?{status:ae.HEALTHY,message:"WebSocket connected and operational",duration:a,details:{initialized:t.initialized,websocketConnected:!0,eventHandlers:t.eventHandlers}}:{status:ae.DEGRADED,message:"WebSocket disconnected - using cached data",duration:a,details:{initialized:t.initialized,websocketConnected:!1,eventHandlers:t.eventHandlers}}:{status:ae.DEGRADED,message:"WebSocket bridge not initialized",duration:a,details:{initialized:!1,websocketConnected:!1}}}catch(t){const a=Date.now()-e;return{status:ae.UNHEALTHY,message:t instanceof Error?t.message:"Unknown error checking WebSocket",duration:a}}}}const Uk={version:"0.0.0",defaultTimeout:dy};class Wk{checks;config;constructor(e,t){this.checks=e,this.config={...Uk,...t}}processCheckResult(e,t){return t.status==="fulfilled"?{checkResult:t.value,isUnhealthy:t.value.status===ae.UNHEALTHY}:{checkResult:{status:ae.UNHEALTHY,message:t.reason?.message||"Check failed with error",duration:0},isUnhealthy:!0}}determineOverallStatus(e,t){return e?ae.UNHEALTHY:t?ae.DEGRADED:ae.HEALTHY}async checkHealth(){const e=Date.now(),t={},a=await Promise.allSettled(this.checks.map(o=>this.executeCheckWithTimeout(o)));let s=!1,r=!1;for(let o=0;o{const a=this.config.defaultTimeout;let s=!1;const r=setTimeout(()=>{s||(s=!0,t({status:ae.UNHEALTHY,message:`Check timeout after ${a}ms`,duration:a}))},a),o=Date.now();e.check().then(l=>{s||(s=!0,clearTimeout(r),t(l))}).catch(l=>{s||(s=!0,clearTimeout(r),t({status:ae.UNHEALTHY,message:l?.message||"Check failed",duration:Date.now()-o}))})})}}const ti=120*1e3,zk=ti;function Vk(n){const e="0000000000000000000",t=Math.floor(Math.random()*4294967295).toString(16).padStart(8,"0"),a=n.toString(16).padStart(8,"0"),s="abcdef1234567890".repeat(3).slice(0,64-e.length-t.length-a.length);return(e+t+a+s).slice(0,64)}function qk(n,e=Date.now()){const t=n%1e3;return{kind:"real",id:{hash:Vk(n),height:n},minedAtMs:e,txCount:2500+t%1e3,minFeeRate:1,maxFeeRate:150+t%100,medianFeeRate:10+t%10}}function $k(n,e=Date.now()){const t=n+1;return{previousTipHeight:n,newTipHeight:t,foundAtMs:e,newBlock:qk(t,e)}}function Kk(){const{triggerAnimation:n}=Tr(),{flags:e}=hn(),t=e.effects.demoBlockAnimation,a=d.useRef(null),s=d.useRef(null),r=d.useRef(0),o=d.useRef(926549),l=d.useCallback(()=>{const f=o.current;r.current+=1;const b=$k(f);y.debug(g.ANIMATION,"Triggering block found demo",{demoBlock:r.current,previousHeight:f,newHeight:b.newTipHeight}),o.current=b.newTipHeight,n(b)},[n]),h=d.useCallback(()=>{a.current||(y.info(g.ANIMATION,"Starting block found demo mode",{initialDelay:"2 minutes",interval:"2 minutes"}),s.current=setTimeout(()=>{l(),a.current=setInterval(l,ti)},zk))},[l]),m=d.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null),a.current&&(clearInterval(a.current),a.current=null),y.info(g.ANIMATION,"Block found demo mode stopped")},[]);return d.useEffect(()=>(t?h():m(),()=>{m()}),[t,h,m]),{triggerNow:l,start:h,stop:m,isEnabled:t,demoBlockCount:r.current,currentTipHeight:o.current}}function Gk(){return Kk(),null}const Zk={PROD:!0};class Xe{static instance;errorCount=0;maxErrors=10;errorTypes=new Set;constructor(){this.setupGlobalErrorHandlers()}static getInstance(){return Xe.instance||(Xe.instance=new Xe),Xe.instance}setupGlobalErrorHandlers(){window.addEventListener("error",e=>{this.handleError("JavaScript Error",e.error,{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,stack:e.error?.stack})}),window.addEventListener("unhandledrejection",e=>{this.handleError("Unhandled Promise Rejection",e.reason,{stack:e.reason?.stack})}),this.setupReactErrorBoundary()}setupReactErrorBoundary(){const e=console.error;console.error=(...t)=>{const a=t.join(" ");this.isProductionError(a)&&this.handleError("React Error",new Error(a),{args:t,stack:new Error().stack}),e.apply(console,t)}}isProductionError(e){return[/Cannot access .* before initialization/i,/ReferenceError/i,/TypeError.*undefined/i,/Cannot read propert.*of undefined/i,/Cannot read propert.*of null/i,/Module not found/i,/ChunkLoadError/i,/Loading chunk .* failed/i,/OrbitControls.*initialization/i,/three.*initialization/i,/WebGL.*error/i,/Canvas.*error/i].some(a=>a.test(e))}handleError(e,t,a){this.errorCount++,this.errorTypes.add(e),console.error(`[Production Error Detector] ${e}:`,{error:t,context:a,errorCount:this.errorCount,errorTypes:Array.from(this.errorTypes)}),this.errorCount>=this.maxErrors&&this.handleCriticalErrorThreshold(),this.isCriticalError(e,t)&&this.reportCriticalError(e,t,a)}isCriticalError(e,t){const a=[/Cannot access .* before initialization/i,/ReferenceError/i,/Module not found/i,/ChunkLoadError/i],s=t instanceof Error?t.message:String(t);return a.some(r=>r.test(s))}handleCriticalErrorThreshold(){console.error("[Production Error Detector] CRITICAL: Too many errors detected!"),this.showUserError(),this.reportToMonitoring()}reportCriticalError(e,t,a){console.error(`[Production Error Detector] CRITICAL ERROR: ${e}`,{error:t,context:a,timestamp:new Date().toISOString(),userAgent:navigator.userAgent,url:window.location.href}),this.showUserError()}showUserError(){const e=document.createElement("div");e.style.cssText=` position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); color: white; display: flex; align-items: center; justify-content: center; z-index: 9999; font-family: Arial, sans-serif; `,e.innerHTML=`

⚠️ Application Error Detected

We've detected a critical error in the application. Please refresh the page to continue.

`,document.body.appendChild(e)}reportToMonitoring(){y.debug(g.ERROR,"Reporting to monitoring service")}reportError(e,t,a){this.handleError(e,t,a||{})}getErrorStats(){return{count:this.errorCount,types:Array.from(this.errorTypes)}}reset(){this.errorCount=0,this.errorTypes.clear()}}class Yk extends Ue.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){const a=Xe.getInstance(),s=Qo();y.error(g.COMPONENT,"Production error boundary caught error",{error:e.message,componentStack:t.componentStack,errorBoundary:"ProductionErrorBoundary",correlationId:s}),a.reportError("React Error Boundary",e,{componentStack:t.componentStack,errorBoundary:"ProductionErrorBoundary",correlationId:s}),this.setState({error:e,errorInfo:t})}render(){return this.state.hasError?this.props.fallback?typeof this.props.fallback=="function"?this.props.fallback({error:this.state.error,errorInfo:this.state.errorInfo}):Ue.isValidElement(this.props.fallback)?Ue.cloneElement(this.props.fallback,{error:this.state.error,errorInfo:this.state.errorInfo}):this.props.fallback:Ue.createElement("div",{style:{padding:"20px",textAlign:"center",color:"#fff",backgroundColor:"rgba(220, 53, 69, 0.1)",borderRadius:"8px",border:"1px solid rgba(220, 53, 69, 0.3)",margin:"20px"}},[Ue.createElement("h3",{key:"title"},"🚨 Application Error"),Ue.createElement("p",{key:"message"},"Something went wrong. Please refresh the page."),Ue.createElement("button",{key:"refresh",type:"button",onClick:()=>window.location.reload(),style:{padding:"8px 16px",backgroundColor:"#dc3545",color:"white",border:"none",borderRadius:"4px",cursor:"pointer"}},"Refresh Page")]):this.props.children}}const Jk=()=>{(Zk||globalThis.import?.meta?.env)?.PROD?(Xe.getInstance(),y.info(g.ERROR,"Production Error Detector initialized",{environment:"production"})):y.debug(g.ERROR,"Production Error Detector initialized",{environment:"development"})},Xk=ie(()=>k(()=>import("./Starfield-Dz2WGmXg.js"),__vite__mapDeps([23,1,3,8,9,10,24]))),Qk=ie(()=>k(()=>import("./index-CPL8BpyC.js"),__vite__mapDeps([25,1,3,8,9,10,26])).then(n=>({default:n.EasterEggOverlay}))),eS=ie(()=>k(()=>import("./index-CPL8BpyC.js"),__vite__mapDeps([25,1,3,8,9,10,26])).then(n=>({default:n.HalFinneyTrigger}))),tS=ie(()=>k(()=>import("./index-CPL8BpyC.js"),__vite__mapDeps([25,1,3,8,9,10,26])).then(n=>({default:n.PizzaDayTrigger}))),nS=ie(()=>k(()=>import("./index-CPL8BpyC.js"),__vite__mapDeps([25,1,3,8,9,10,26])).then(n=>({default:n.BlockFoundDemoTrigger})));Ug();Jk();Jl();O.initialize();ei.initialize();const ni=new Wk([new my,new jk,new py],{version:"1.0.0"}),aS=6e4;setInterval(async()=>{try{const n=await ni.checkHealth();n.status!=="healthy"&&console.warn("[HealthCheck] System degraded:",n)}catch(n){console.error("[HealthCheck] Failed to run health check:",n)}},aS);ni.checkHealth().then(n=>{y.info(g.HEALTH,"Initial health status",{status:n.status})});const ai=document.getElementById("root");if(!ai)throw new Error("Root element not found");Ni.createRoot(ai).render(u.jsxs(Ue.StrictMode,{children:[u.jsx(Wc,{}),u.jsx(_g,{quality:"high",imageName:"cosmic"}),u.jsx(d.Suspense,{fallback:null,children:u.jsx(Xk,{})}),u.jsx(Yk,{fallback:u.jsx(Zc,{}),children:u.jsx(di,{children:u.jsx(ec,{children:u.jsx(Og,{children:u.jsx(vh,{children:u.jsx(xh,{children:u.jsx(jl,{children:u.jsx(Ch,{children:u.jsx(Eh,{children:u.jsx(Eg,{children:u.jsx(Gl,{children:u.jsx(Mm,{children:u.jsxs(qf,{children:[u.jsx(cl,{children:u.jsx(ul,{children:u.jsx($l,{children:u.jsx(Wm,{children:u.jsx(Vh,{children:u.jsx(pm,{children:u.jsxs(Kg,{children:[u.jsx(Gk,{}),u.jsx(uy,{}),u.jsx(bg,{}),u.jsxs(d.Suspense,{fallback:null,children:[u.jsx(eS,{}),u.jsx(tS,{}),u.jsx(nS,{}),u.jsx(Qk,{})]})]})})})})})})}),u.jsx(Zf,{})]})})})})})})})})})})})})})]}));ig();const xs=async()=>{const[{initializeSentry:n},{initializeTracer:e},{resourceMetricsManager:t},{metricsShipper:a},{initWebVitals:s}]=await Promise.all([k(()=>import("./sentry-_43brHoW.js"),__vite__mapDeps([27,9,1])),k(()=>import("./index-0-drYcX5.js"),__vite__mapDeps([28,1,3,8,9,10])),k(()=>import("./resource-metrics-DeTZOTiS.js"),__vite__mapDeps([29,1,3,8,9,10])),k(()=>import("./index-KUAdLZJd.js"),__vite__mapDeps([30,1,3,8,9,10])),k(()=>import("./index-D_0oDN8-.js"),__vite__mapDeps([31,1,3,8,9,10]))]);n(),e({serviceName:"blocksight-frontend",serviceVersion:"1.0.0",otlpEndpoint:"/api/traces",samplingRate:.1,sampleErrors:!0,enabled:!0}),t.initialize(),s(),a.start(),window.addEventListener("beforeunload",()=>{a.shutdown()})};"requestIdleCallback"in window?requestIdleCallback(()=>{xs()},{timeout:3e3}):setTimeout(()=>{xs()},1);export{mn as $,kh as A,$g as B,Ul as C,Wg as D,Kg as E,ie as F,le as G,ry as H,Hs as I,Os as J,fS as K,ue as L,ft as M,ta as N,yS as O,iy as P,Ma as Q,Js as R,gS as S,y as T,g as U,SS as V,ea as W,Bh as X,O as Y,bS as Z,k as _,RS as a,$h as a0,er as a1,ch as a2,Ld as a3,Zh as a4,hm as a5,mm as a6,wS as a7,kS as a8,rr as a9,kr as aA,rf as aB,Gp as aC,Ah as aD,Jp as aE,dn as aF,Er as aG,ar as aH,qh as aI,Qt as aJ,TS as aK,hn as aL,_S as aM,xS as aN,Ji as aO,vo as aP,vS as aQ,ES as aa,na as ab,mr as ac,dr as ad,vm as ae,bm as af,fm as ag,Wa as ah,fr as ai,gr as aj,yr as ak,Sm as al,km as am,hr as an,CS as ao,_m as ap,ym as aq,AS as ar,pr as as,Vt as at,Fm as au,Vs as av,jm as aw,of as ax,lf as ay,Ro as az,dS as b,IS as c,Yn as d,LS as e,uS as f,Ar as g,lS as h,BS as i,u as j,mS as k,$o as l,hS as m,tc as n,Ca as o,ac as p,un as q,pS as r,Is as s,zg as t,PS as u,nc as v,Z as w,Ls as x,as as y,je as z}; //# sourceMappingURL=index-DNPyU7hT.js.map