(function(){const j=document.createElement("link").relList;if(j&&j.supports&&j.supports("modulepreload"))return;for(const T of document.querySelectorAll('link[rel="modulepreload"]'))s(T);new MutationObserver(T=>{for(const O of T)if(O.type==="childList")for(const Y of O.addedNodes)Y.tagName==="LINK"&&Y.rel==="modulepreload"&&s(Y)}).observe(document,{childList:!0,subtree:!0});function E(T){const O={};return T.integrity&&(O.integrity=T.integrity),T.referrerPolicy&&(O.referrerPolicy=T.referrerPolicy),T.crossOrigin==="use-credentials"?O.credentials="include":T.crossOrigin==="anonymous"?O.credentials="omit":O.credentials="same-origin",O}function s(T){if(T.ep)return;T.ep=!0;const O=E(T);fetch(T.href,O)}})();function Q0(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var ws={exports:{}},ru={};var T0;function Py(){if(T0)return ru;T0=1;var o=Symbol.for("react.transitional.element"),j=Symbol.for("react.fragment");function E(s,T,O){var Y=null;if(O!==void 0&&(Y=""+O),T.key!==void 0&&(Y=""+T.key),"key"in T){O={};for(var K in T)K!=="key"&&(O[K]=T[K])}else O=T;return T=O.ref,{$$typeof:o,type:s,key:Y,ref:T!==void 0?T:null,props:O}}return ru.Fragment=j,ru.jsx=E,ru.jsxs=E,ru}var E0;function l1(){return E0||(E0=1,ws.exports=Py()),ws.exports}var c=l1(),Hs={exports:{}},Z={};var x0;function t1(){if(x0)return Z;x0=1;var o=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),ul=Symbol.for("react.suspense"),rl=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),R=Symbol.for("react.view_transition"),dl=Symbol.iterator;function Q(h){return h===null||typeof h!="object"?null:(h=dl&&h[dl]||h["@@iterator"],typeof h=="function"?h:null)}var Tl={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$=Object.assign,Gl={};function Rl(h,A,H){this.props=h,this.context=A,this.refs=Gl,this.updater=H||Tl}Rl.prototype.isReactComponent={},Rl.prototype.setState=function(h,A){if(typeof h!="object"&&typeof h!="function"&&h!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,h,A,"setState")},Rl.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function Mt(){}Mt.prototype=Rl.prototype;function gl(h,A,H){this.props=h,this.context=A,this.refs=Gl,this.updater=H||Tl}var Xl=gl.prototype=new Mt;Xl.constructor=gl,$(Xl,Rl.prototype),Xl.isPureReactComponent=!0;var jl=Array.isArray;function V(){}var il={H:null,A:null,T:null,S:null},Ql=Object.prototype.hasOwnProperty;function Vl(h,A,H){var q=H.ref;return{$$typeof:o,type:h,key:A,ref:q!==void 0?q:null,props:H}}function Zl(h,A){return Vl(h.type,A,h.props)}function at(h){return typeof h=="object"&&h!==null&&h.$$typeof===o}function ut(h){var A={"=":"=0",":":"=2"};return"$"+h.replace(/[=:]/g,function(H){return A[H]})}var fe=/\/+/g;function Ol(h,A){return typeof h=="object"&&h!==null&&h.key!=null?ut(""+h.key):A.toString(36)}function C(h){switch(h.status){case"fulfilled":return h.value;case"rejected":throw h.reason;default:switch(typeof h.status=="string"?h.then(V,V):(h.status="pending",h.then(function(A){h.status==="pending"&&(h.status="fulfilled",h.value=A)},function(A){h.status==="pending"&&(h.status="rejected",h.reason=A)})),h.status){case"fulfilled":return h.value;case"rejected":throw h.reason}}throw h}function G(h,A,H,q,W){var cl=typeof h;(cl==="undefined"||cl==="boolean")&&(h=null);var ol=!1;if(h===null)ol=!0;else switch(cl){case"bigint":case"string":case"number":ol=!0;break;case"object":switch(h.$$typeof){case o:case j:ol=!0;break;case D:return ol=h._init,G(ol(h._payload),A,H,q,W)}}if(ol)return W=W(h),ol=q===""?"."+Ol(h,0):q,jl(W)?(H="",ol!=null&&(H=ol.replace(fe,"$&/")+"/"),G(W,A,H,"",function(nl){return nl})):W!=null&&(at(W)&&(W=Zl(W,H+(W.key==null||h&&h.key===W.key?"":(""+W.key).replace(fe,"$&/")+"/")+ol)),A.push(W)),1;ol=0;var w=q===""?".":q+":";if(jl(h))for(var p=0;p>>1,hl=C[al];if(0>>1;alT(dt,X))hT(A,dt)?(C[al]=A,C[h]=X,al=h):(C[al]=dt,C[Qt]=X,al=Qt);else if(hT(A,X))C[al]=A,C[h]=X,al=h;else break l}}return G}function T(C,G){var X=C.sortIndex-G.sortIndex;return X!==0?X:C.id-G.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var O=performance;o.unstable_now=function(){return O.now()}}else{var Y=Date,K=Y.now();o.unstable_now=function(){return Y.now()-K}}var ul=[],rl=[],D=1,x=null,R=3,dl=!1,Q=!1,Tl=!1,$=!1,Gl=typeof setTimeout=="function"?setTimeout:null,Rl=typeof clearTimeout=="function"?clearTimeout:null,Mt=typeof setImmediate<"u"?setImmediate:null;function gl(C){for(var G=E(rl);G!==null;){if(G.callback===null)s(rl);else if(G.startTime<=C)s(rl),G.sortIndex=G.expirationTime,j(ul,G);else break;G=E(rl)}}function Xl(C){if(Tl=!1,gl(C),!Q)if(E(ul)!==null)Q=!0,jl||(jl=!0,at());else{var G=E(rl);G!==null&&Ol(Xl,G.startTime-C)}}var jl=!1,V=-1,il=5,Ql=-1;function Vl(){return $?!0:!(o.unstable_now()-QlC&&Vl());){var al=x.callback;if(typeof al=="function"){x.callback=null,R=x.priorityLevel;var hl=al(x.expirationTime<=C);if(C=o.unstable_now(),typeof hl=="function"){x.callback=hl,gl(C),G=!0;break t}x===E(ul)&&s(ul),gl(C)}else s(ul);x=E(ul)}if(x!==null)G=!0;else{var ot=E(rl);ot!==null&&Ol(Xl,ot.startTime-C),G=!1}}break l}finally{x=null,R=X,dl=!1}G=void 0}}finally{G?at():jl=!1}}}var at;if(typeof Mt=="function")at=function(){Mt(Zl)};else if(typeof MessageChannel<"u"){var ut=new MessageChannel,fe=ut.port2;ut.port1.onmessage=Zl,at=function(){fe.postMessage(null)}}else at=function(){Gl(Zl,0)};function Ol(C,G){V=Gl(function(){C(o.unstable_now())},G)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(C){C.callback=null},o.unstable_forceFrameRate=function(C){0>C||125al?(C.sortIndex=X,j(rl,C),E(ul)===null&&C===E(rl)&&(Tl?(Rl(V),V=-1):Tl=!0,Ol(Xl,X-al))):(C.sortIndex=hl,j(ul,C),Q||dl||(Q=!0,jl||(jl=!0,at()))),C},o.unstable_shouldYield=Vl,o.unstable_wrapCallback=function(C){var G=R;return function(){var X=R;R=G;try{return C.apply(this,arguments)}finally{R=X}}}})(Ys)),Ys}var j0;function n1(){return j0||(j0=1,Bs.exports=a1()),Bs.exports}var Gs={exports:{}},et={};var A0;function u1(){if(A0)return et;A0=1;var o=Ks();function j(D){var x="https://react.dev/errors/"+D;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(j){console.error(j)}}return o(),Gs.exports=u1(),Gs.exports}var _0;function c1(){if(_0)return ou;_0=1;var o=n1(),j=Ks(),E=i1();function s(l){var t="https://react.dev/errors/"+l;if(1Vt||(l.current=it[Vt],it[Vt]=null,Vt--)}function fl(l,t){Vt++,it[Vt]=l.current,l.current=t}var Dt=St(null),yn=St(null),Ne=St(null),yu=St(null);function gu(l,t){switch(fl(Ne,t),fl(yn,l),fl(Dt,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)&&(l=l.namespaceURI)?Ch(l):0;break;default:if(l=t.tagName,t=t.namespaceURI)t=Ch(t),l=Mh(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}Ul(Dt),fl(Dt,l)}function Na(){Ul(Dt),Ul(yn),Ul(Ne)}function lc(l){var t=l.memoizedState;t!==null&&(dn._currentValue=t.memoizedState,fl(yu,l)),t=Dt.current;var e=Mh(t,l.type);t!==e&&(fl(yn,l),fl(Dt,e))}function bu(l){yn.current===l&&(Ul(Dt),Ul(yn)),yu.current===l&&(Ul(yu),dn._currentValue=nl)}var tc,$s;function ze(l){if(tc===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);tc=t&&t[1]||"",$s=-1)":-1n||r[a]!==y[n]){var S=` `+r[a].replace(" at new "," at ");return l.displayName&&S.includes("")&&(S=S.replace("",l.displayName)),S}while(1<=a&&0<=n);break}}}finally{ec=!1,Error.prepareStackTrace=e}return(e=l?l.displayName||l.name:"")?ze(e):""}function am(l,t){switch(l.tag){case 26:case 27:case 5:return ze(l.type);case 16:return ze("Lazy");case 13:return l.child!==t&&t!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return ac(l.type,!1);case 11:return ac(l.type.render,!1);case 1:return ac(l.type,!0);case 31:return ze("Activity");case 30:return ze("ViewTransition");default:return""}}function Ws(l){try{var t="",e=null;do t+=am(l,e),e=l,l=l.return;while(l);return t}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var nc=Object.prototype.hasOwnProperty,uc=o.unstable_scheduleCallback,ic=o.unstable_cancelCallback,nm=o.unstable_shouldYield,um=o.unstable_requestPaint,pt=o.unstable_now,im=o.unstable_getCurrentPriorityLevel,Is=o.unstable_ImmediatePriority,Ps=o.unstable_UserBlockingPriority,Su=o.unstable_NormalPriority,cm=o.unstable_LowPriority,lr=o.unstable_IdlePriority,fm=o.log,sm=o.unstable_setDisableYieldValue,gn=null,Tt=null;function je(l){if(typeof fm=="function"&&sm(l),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(gn,l)}catch{}}var Et=Math.clz32?Math.clz32:dm,rm=Math.log,om=Math.LN2;function dm(l){return l>>>=0,l===0?32:31-(rm(l)/om|0)|0}var pu=256,Tu=262144,Eu=4194304;function ta(l){var t=l&42;if(t!==0)return t;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&-l;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function xu(l,t,e){var a=l.pendingLanes;if(a===0)return 0;var n=0,u=l.suspendedLanes,i=l.pingedLanes;l=l.warmLanes;var f=a&134217727;return f!==0?(a=f&~u,a!==0?n=ta(a):(i&=f,i!==0?n=ta(i):e||(e=f&~l,e!==0&&(n=ta(e))))):(f=a&~u,f!==0?n=ta(f):i!==0?n=ta(i):e||(e=a&~l,e!==0&&(n=ta(e)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,e=t&-t,u>=e||u===32&&(e&4194048)!==0)?t:n}function bn(l,t){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&t)===0}function tr(l,t){(t&8)!==0&&(t|=t&32);var e=l.entangledLanes;if(e!==0)for(l=l.entanglements,e&=t;0e;e++)t.push(l);return t}function Sn(l,t){l.pendingLanes|=t,t!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function mm(l,t,e,a,n,u){var i=l.pendingLanes;l.pendingLanes=e,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=e,l.entangledLanes&=e,l.errorRecoveryDisabledLanes&=e,l.shellSuspendCounter=0;var f=l.entanglements,r=l.expirationTimes,y=l.hiddenUpdates;for(e=i&~e;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gc=!1;if(oe)try{var xn={};Object.defineProperty(xn,"passive",{get:function(){gc=!0}}),window.addEventListener("test",xn,xn),window.removeEventListener("test",xn,xn)}catch{gc=!1}var Ae=null,bc=null,_u=null;function zr(){if(_u)return _u;var l,t=bc,e=t.length,a,n="value"in Ae?Ae.value:Ae.textContent,u=n.length;for(l=0;l=jn),Mr=" ",Dr=!1;function Rr(l,t){switch(l){case"keyup":return $m.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ur(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Ra=!1;function Im(l,t){switch(l){case"compositionend":return Ur(t);case"keypress":return t.which!==32?null:(Dr=!0,Mr);case"textInput":return l=t.data,l===Mr&&Dr?null:l;default:return null}}function Pm(l,t){if(Ra)return l==="compositionend"||!xc&&Rr(l,t)?(l=zr(),_u=bc=Ae=null,Ra=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function Lr(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function Qr(l,t){var e=Lr(l);l=0;for(var a;e;){if(e.nodeType===3){if(a=l+e.textContent.length,l<=t&&a>=t)return{node:e,offset:t-l};l=a}l:{for(;e;){if(e.nextSibling){e=e.nextSibling;break l}e=e.parentNode}e=void 0}e=Lr(e)}}function Vr(l,t){return l&&t?l===t?!0:l&&l.nodeType===3?!1:t&&t.nodeType===3?Vr(l,t.parentNode):"contains"in l?l.contains(t):l.compareDocumentPosition?!!(l.compareDocumentPosition(t)&16):!1:!1}function Zr(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var t=jc(l.document);t instanceof l.HTMLIFrameElement;){try{var e=typeof t.contentWindow.location.href=="string"}catch{e=!1}if(e)l=t.contentWindow;else break;t=jc(l.document)}return t}function Ac(l){var t=l&&l.nodeName&&l.nodeName.toLowerCase();return t&&(t==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||t==="textarea"||l.contentEditable==="true")}var cv=oe&&"documentMode"in document&&11>=document.documentMode,Ua=null,Oc=null,Cn=null,_c=!1;function Kr(l,t,e){var a=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;_c||Ua==null||Ua!==jc(a)||(a=Ua,"selectionStart"in a&&Ac(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Cn&&_n(Cn,a)||(Cn=a,a=Ui(Oc,"onSelect"),0>=i,n-=i,It=1<<32-Et(t)+n|e<L?(Yl=B,B=null):Yl=B.sibling;var sl=m(v,B,g[L],N);if(sl===null){B===null&&(B=Yl);break}l&&B&&sl.alternate===null&&t(v,B),d=u(sl,d,L),el===null?M=sl:el.sibling=sl,el=sl,B=Yl}if(L===g.length)return e(v,B),F&&ve(v,L),M;if(B===null){for(;LL?(Yl=B,B=null):Yl=B.sibling;var Ie=m(v,B,sl.value,N);if(Ie===null){B===null&&(B=Yl);break}l&&B&&Ie.alternate===null&&t(v,B),d=u(Ie,d,L),el===null?M=Ie:el.sibling=Ie,el=Ie,B=Yl}if(sl.done)return e(v,B),F&&ve(v,L),M;if(B===null){for(;!sl.done;L++,sl=g.next())sl=z(v,sl.value,N),sl!==null&&(d=u(sl,d,L),el===null?M=sl:el.sibling=sl,el=sl);return F&&ve(v,L),M}for(B=a(B);!sl.done;L++,sl=g.next())sl=b(B,v,L,sl.value,N),sl!==null&&(l&&(Yl=sl.alternate,Yl!==null&&B.delete(Yl.key===null?L:Yl.key)),d=u(sl,d,L),el===null?M=sl:el.sibling=sl,el=sl);return l&&B.forEach(function(Iy){return t(v,Iy)}),F&&ve(v,L),M}function J(v,d,g,N){if(typeof g=="object"&&g!==null&&g.type===Zl&&g.key===null&&g.props.ref===void 0&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Ql:l:{for(var M=g.key;d!==null;){if(d.key===M){if(M=g.type,M===Zl){if(d.tag===7){e(v,d.sibling),N=n(d,g.props.children),Re(N,g),N.return=v,v=N;break l}}else if(d.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===hl&&ma(M)===d.type){e(v,d.sibling),N=n(d,g.props),Re(N,g),N.return=v,v=N;break l}e(v,d);break}else t(v,d);d=d.sibling}g.type===Zl?(N=ca(g.props.children,v.mode,N,g.key),Re(N,g),N.return=v,v=N):(N=Yu(g.type,g.key,g.props,null,v.mode,N),Re(N,g),N.return=v,v=N)}return i(v);case Vl:l:{for(M=g.key;d!==null;){if(d.key===M)if(d.tag===4&&d.stateNode.containerInfo===g.containerInfo&&d.stateNode.implementation===g.implementation){e(v,d.sibling),N=n(d,g.children||[]),N.return=v,v=N;break l}else{e(v,d);break}else t(v,d);d=d.sibling}N=Hc(g,v.mode,N),N.return=v,v=N}return i(v);case hl:return g=ma(g),J(v,d,g,N)}if(ol(g))return _(v,d,g,N);if(q(g)){if(M=q(g),typeof M!="function")throw Error(s(150));return g=M.call(g),U(v,d,g,N)}if(typeof g.then=="function")return J(v,d,Fu(g),N);if(g.$$typeof===Ol)return J(v,d,Zu(v,g),N);$u(v,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,d!==null&&d.tag===6?(e(v,d.sibling),N=n(d,g),N.return=v,v=N):(e(v,d),N=wc(g,v.mode,N),N.return=v,v=N),i(v)):e(v,d)}return function(v,d,g,N){try{Hn=0;var M=J(v,d,g,N);return Qa=null,M}catch(B){if(B===La||B===ku)throw B;var el=mt(29,B,null,v.mode);return el.lanes=N,el.return=v,el}}}var ya=go(!0),bo=go(!1),Ue=!1;function Kc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kc(l,t){l=l.updateQueue,t.updateQueue===l&&(t.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function we(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function He(l,t,e){var a=l.updateQueue;if(a===null)return null;if(a=a.shared,(vl&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Bu(l),lo(l,null,e),t}return qu(l,a,t,e),Bu(l)}function qn(l,t,e){if(t=t.updateQueue,t!==null&&(t=t.shared,(e&4194048)!==0)){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,nr(l,e)}}function Jc(l,t){var e=l.updateQueue,a=l.alternate;if(a!==null&&(a=a.updateQueue,e===a)){var n=null,u=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,e=e.next}while(e!==null);u===null?n=u=t:u=u.next=t}else n=u=t;e={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},l.updateQueue=e;return}l=e.lastBaseUpdate,l===null?e.firstBaseUpdate=t:l.next=t,e.lastBaseUpdate=t}var Fc=!1;function Bn(){if(Fc){var l=Xa;if(l!==null)throw l}}function Yn(l,t,e,a){Fc=!1;var n=l.updateQueue;Ue=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,f=n.shared.pending;if(f!==null){n.shared.pending=null;var r=f,y=r.next;r.next=null,i===null?u=y:i.next=y,i=r;var S=l.alternate;S!==null&&(S=S.updateQueue,f=S.lastBaseUpdate,f!==i&&(f===null?S.firstBaseUpdate=y:f.next=y,S.lastBaseUpdate=r))}if(u!==null){var z=n.baseState;i=0,S=y=r=null,f=u;do{var m=f.lane&-536870913,b=m!==f.lane;if(b?(tl&m)===m:(a&m)===m){m!==0&&m===da&&(Fc=!0),S!==null&&(S=S.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});l:{var _=l,U=f;m=t;var J=e;switch(U.tag){case 1:if(_=U.payload,typeof _=="function"){z=_.call(J,z,m);break l}z=_;break l;case 3:_.flags=_.flags&-65537|128;case 0:if(_=U.payload,m=typeof _=="function"?_.call(J,z,m):_,m==null)break l;z=V({},z,m);break l;case 2:Ue=!0}}m=f.callback,m!==null&&(l.flags|=64,b&&(l.flags|=8192),b=n.callbacks,b===null?n.callbacks=[m]:b.push(m))}else b={lane:m,tag:f.tag,payload:f.payload,callback:f.callback,next:null},S===null?(y=S=b,r=z):S=S.next=b,i|=m;if(f=f.next,f===null){if(f=n.shared.pending,f===null)break;b=f,f=b.next,b.next=null,n.lastBaseUpdate=b,n.shared.pending=null}}while(!0);S===null&&(r=z),n.baseState=r,n.firstBaseUpdate=y,n.lastBaseUpdate=S,u===null&&(n.shared.lanes=0),Qe|=i,l.lanes=i,l.memoizedState=z}}function So(l,t){if(typeof l!="function")throw Error(s(191,l));l.call(t)}function po(l,t){var e=l.callbacks;if(e!==null)for(l.callbacks=null,l=0;lu?u:8;var i=w.T,f={};f.types=i!==null?i.types:null,w.T=f,yf(l,!1,t,e);try{var r=n(),y=w.S;if(y!==null&&y(f,r),r!==null&&typeof r=="object"&&typeof r.then=="function"){var S=bv(r,a);Qn(l,t,S,_t(l))}else Qn(l,t,a,_t(l))}catch(z){Qn(l,t,{then:function(){},status:"rejected",reason:z},_t())}finally{p.p=u,i!==null&&f.types!==null&&(i.types=f.types),w.T=i}}function Nv(){}function mf(l,t,e,a){if(l.tag!==5)throw Error(s(476));var n=Io(l).queue;Wo(l,n,t,nl,e===null?Nv:function(){return Po(l),e(a)})}function Io(l){var t=l.memoizedState;if(t!==null)return t;t={memoizedState:nl,baseState:nl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Se,lastRenderedState:nl},next:null};var e={};return t.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Se,lastRenderedState:e},next:null},l.memoizedState=t,l=l.alternate,l!==null&&(l.memoizedState=t),t}function Po(l){var t=Io(l);t.next===null&&(t=l.alternate.memoizedState),Qn(l,t.next.queue,{},_t())}function vf(){return Wl(dn)}function ld(){return wl().memoizedState}function td(){return wl().memoizedState}function zv(l){for(var t=l.return;t!==null;){switch(t.tag){case 24:case 3:var e=_t();l=we(e);var a=He(t,l,e);a!==null&&(bt(a,t,e),qn(a,t,e)),t={cache:Lc()},l.payload=t;return}t=t.return}}function jv(l,t,e){var a=_t();e={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},ii(l)?ad(t,e):(e=Rc(l,t,e,a),e!==null&&(bt(e,l,a),nd(e,t,a)))}function ed(l,t,e){var a=_t();Qn(l,t,e,a)}function Qn(l,t,e,a){var n={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(ii(l))ad(t,n);else{var u=l.alternate;if(l.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var i=t.lastRenderedState,f=u(i,e);if(n.hasEagerState=!0,n.eagerState=f,Nt(f,i))return qu(l,t,n,0),xl===null&&Hu(),!1}catch{}if(e=Rc(l,t,n,a),e!==null)return bt(e,l,a),nd(e,t,a),!0}return!1}function yf(l,t,e,a){if(a={lane:2,revertLane:is(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ii(l)){if(t)throw Error(s(479))}else t=Rc(l,e,a,2),t!==null&&bt(t,l,2)}function ii(l){var t=l.alternate;return l===k||t!==null&&t===k}function ad(l,t){Va=Pu=!0;var e=l.pending;e===null?t.next=t:(t.next=e.next,e.next=t),l.pending=t}function nd(l,t,e){if((e&4194048)!==0){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,nr(l,e)}}var ci={readContext:Wl,use:ei,useCallback:Ml,useContext:Ml,useEffect:Ml,useImperativeHandle:Ml,useLayoutEffect:Ml,useInsertionEffect:Ml,useMemo:Ml,useReducer:Ml,useRef:Ml,useState:Ml,useDebugValue:Ml,useDeferredValue:Ml,useTransition:Ml,useSyncExternalStore:Ml,useId:Ml,useHostTransitionStatus:Ml,useFormState:Ml,useActionState:Ml,useOptimistic:Ml,useMemoCache:Ml,useCacheRefresh:Ml,useEffectEvent:Ml},ud={readContext:Wl,use:ei,useCallback:function(l,t){return ft().memoizedState=[l,t===void 0?null:t],l},useContext:Wl,useEffect:Lo,useImperativeHandle:function(l,t,e){e=e!=null?e.concat([l]):null,ni(4194308,4,Ko.bind(null,t,l),e)},useLayoutEffect:function(l,t){return ni(4194308,4,l,t)},useInsertionEffect:function(l,t){ni(4,2,l,t)},useMemo:function(l,t){var e=ft();t=t===void 0?null:t;var a=l();if(ga){je(!0);try{l()}finally{je(!1)}}return e.memoizedState=[a,t],a},useReducer:function(l,t,e){var a=ft();if(e!==void 0){var n=e(t);if(ga){je(!0);try{e(t)}finally{je(!1)}}}else n=t;return a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:n},a.queue=l,l=l.dispatch=jv.bind(null,k,l),[a.memoizedState,l]},useRef:function(l){var t=ft();return l={current:l},t.memoizedState=l},useState:function(l){l=sf(l);var t=l.queue,e=ed.bind(null,k,t);return t.dispatch=e,[l.memoizedState,e]},useDebugValue:df,useDeferredValue:function(l,t){var e=ft();return hf(e,l,t)},useTransition:function(){var l=sf(!1);return l=Wo.bind(null,k,l.queue,!0,!1),ft().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,t,e){var a=k,n=ft();if(F){if(e===void 0)throw Error(s(407));e=e()}else{if(e=t(),xl===null)throw Error(s(349));(tl&127)!==0||jo(a,t,e)}n.memoizedState=e;var u={value:e,getSnapshot:t};return n.queue=u,Lo(Oo.bind(null,a,u,l),[l]),a.flags|=2048,Ka(9,{destroy:void 0},Ao.bind(null,a,u,e,t),null),e},useId:function(){var l=ft(),t=xl.identifierPrefix;if(F){var e=Pt,a=It;e=(a&~(1<<32-Et(a)-1)).toString(32)+e,t="_"+t+"R_"+e,e=li++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[$l]=t,u[ht]=a;l:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break l;for(;i.sibling===null;){if(i.return===null||i.return===t)break l;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=u;l:switch(tt(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break l;case"img":a=!0;break l;default:a=!1}a&&Te(t)}}return zl(t),t.subtreeFlags&=-33554433,_f(t,t.type,l===null?null:l.memoizedProps,t.pendingProps,e),null;case 6:if(l&&t.stateNode!=null)l.memoizedProps!==a&&Te(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(s(166));if(l=Ne.current,Ga(t)){if(l=t.stateNode,e=t.memoizedProps,a=null,n=kl,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}l[$l]=t,l=!!(l.nodeValue===e||a!==null&&a.suppressHydrationWarning===!0||Oh(l.nodeValue,e)),l||Me(t,!0)}else l=eu(l).createTextNode(a),l[$l]=t,t.stateNode=l}return zl(t),null;case 31:if(e=t.memoizedState,l===null||l.memoizedState!==null){if(a=Ga(t),e!==null){if(l===null){if(!a)throw Error(s(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(557));l[$l]=t}else fa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;zl(t),l=!1}else e=Yc(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=e),l=!0;if(!l)return t.flags&256?(zt(t),t):(zt(t),null);if((t.flags&128)!==0)throw Error(s(558))}return zl(t),null;case 13:if(a=t.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(n=Ga(t),a!==null&&a.dehydrated!==null){if(l===null){if(!n)throw Error(s(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));n[$l]=t}else fa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;zl(t),n=!1}else n=Yc(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(zt(t),t):(zt(t),null)}return zt(t),(t.flags&128)!==0?(t.lanes=e,t):(e=a!==null,l=l!==null&&l.memoizedState!==null,e&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),e!==l&&e&&(t.child.flags|=8192),hi(t,t.updateQueue),zl(t),null);case 4:return Na(),l===null&&rs(t.stateNode.containerInfo),t.flags|=67108864,zl(t),null;case 10:return ge(t.type),zl(t),null;case 19:if(Pc(t),a=t.memoizedState,a===null)return zl(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)Zn(a,!1);else{if(Dl!==0||l!==null&&(l.flags&128)!==0)for(l=t.child;l!==null;){if(u=Iu(l),u!==null){for(t.flags|=128,Zn(a,!1),l=u.updateQueue,t.updateQueue=l,hi(t,l),t.subtreeFlags=0,l=e,e=t.child;e!==null;)to(e,l),e=e.sibling;return Gn(t,Pl.current&1|2),F&&ve(t,a.treeForkCount),t.child}l=l.sibling}a.tail!==null&&pt()>zi&&(t.flags|=128,n=!0,Zn(a,!1),t.lanes=4194304)}else{if(!n)if(l=Iu(u),l!==null){if(t.flags|=128,n=!0,l=l.updateQueue,t.updateQueue=l,hi(t,l),Zn(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!u.alternate&&!F)return zl(t),null}else 2*pt()-a.renderingStartTime>zi&&e!==536870912&&(t.flags|=128,n=!0,Zn(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(l=a.last,l!==null?l.sibling=u:t.child=u,a.last=u)}if(a.tail!==null){l=a.tail;l:{for(e=l;e!==null;){if(e.alternate!==null){e=!1;break l}e=e.sibling}e=!0}return a.rendering=l,a.tail=l.sibling,a.renderingStartTime=pt(),l.sibling=null,u=Pl.current,u=n?u&1|2:u&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!e||F?Gn(t,u):(e=u,fl(Il,t),fl(Pl,e),nt===null&&(nt=t)),F&&ve(t,a.treeForkCount),l}return zl(t),null;case 22:case 23:return zt(t),Wc(),a=t.memoizedState!==null,l!==null?l.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(e&536870912)!==0&&(t.flags&128)===0&&(zl(t),t.subtreeFlags&6&&(t.flags|=8192)):zl(t),e=t.updateQueue,e!==null&&hi(t,e.retryQueue),e=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(e=l.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==e&&(t.flags|=2048),l!==null&&Ul(ha),null;case 24:return e=null,l!==null&&(e=l.memoizedState.cache),t.memoizedState.cache!==e&&(t.flags|=2048),ge(Hl),zl(t),null;case 25:return null;case 30:return t.flags|=33554432,zl(t),null}throw Error(s(156,t.tag))}function Rv(l,t){switch(qc(t),t.tag){case 1:return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 3:return ge(Hl),Na(),l=t.flags,(l&65536)!==0&&(l&128)===0?(t.flags=l&-65537|128,t):null;case 26:case 27:case 5:return bu(t),null;case 31:if(t.memoizedState!==null){if(zt(t),t.alternate===null)throw Error(s(340));fa()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 13:if(zt(t),l=t.memoizedState,l!==null&&l.dehydrated!==null){if(t.alternate===null)throw Error(s(340));fa()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 19:return Pc(t),l=t.flags,l&65536?(t.flags=l&-65537|128,l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null),t.flags|=4,t):null;case 4:return Na(),null;case 10:return ge(t.type),null;case 22:case 23:return zt(t),Wc(),l!==null&&Ul(ha),l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 24:return ge(Hl),null;case 25:return null;default:return null}}function Cd(l,t){switch(qc(t),t.tag){case 3:ge(Hl),Na();break;case 26:case 27:case 5:bu(t);break;case 4:Na();break;case 31:t.memoizedState!==null&&zt(t);break;case 13:zt(t);break;case 19:Pc(t);break;case 10:ge(t.type);break;case 22:case 23:zt(t),Wc(),l!==null&&Ul(ha);break;case 24:ge(Hl)}}function Kn(l,t){try{var e=t.updateQueue,a=e!==null?e.lastEffect:null;if(a!==null){var n=a.next;e=n;do{if((e.tag&l)===l){a=void 0;var u=e.create,i=e.inst;a=u(),i.destroy=a}e=e.next}while(e!==n)}}catch(f){Sl(t,t.return,f)}}function Ge(l,t,e){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&l)===l){var i=a.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,n=t;var r=e,y=f;try{y()}catch(S){Sl(n,r,S)}}}a=a.next}while(a!==u)}}catch(S){Sl(t,t.return,S)}}function Md(l){var t=l.updateQueue;if(t!==null){var e=l.stateNode;try{po(t,e)}catch(a){Sl(l,l.return,a)}}}function Dd(l,t,e){e.props=ba(l.type,l.memoizedProps),e.state=l.memoizedState;try{e.componentWillUnmount()}catch(a){Sl(l,t,a)}}function le(l,t){try{var e=l.ref;if(e!==null){switch(l.tag){case 26:case 27:case 5:var a=l.stateNode;break;case 30:var n=l.stateNode,u=de(l.memoizedProps,n);(n.ref===null||n.ref.name!==u)&&(n.ref=Yh(u)),a=n.ref;break;case 7:if(l.stateNode===null){var i=new Ct(l);x(l.child,!1,xy,i,void 0,void 0),l.stateNode=i}a=l.stateNode;break;default:a=l.stateNode}typeof e=="function"?l.refCleanup=e(a):e.current=a}}catch(f){Sl(l,t,f)}}function lt(l,t){var e=l.ref,a=l.refCleanup;if(e!==null)if(typeof a=="function")try{a()}catch(n){Sl(l,t,n)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(n){Sl(l,t,n)}else e.current=null}function mi(l,t){if((l.tag===5||l.tag===27||l.tag===6)&&l.alternate===null&&t!==null)for(var e=0;e title"))),tt(a,t,e),a[$l]=l,Kl(a),t=a;break l;case"link":if(u=e0("link","href",n).get(t+(e.href||""))){for(i=0;iJ&&(i=J,J=U,U=i);var v=Qr(f,U),d=Qr(f,J);if(v&&d&&(b.rangeCount!==1||b.anchorNode!==v.node||b.anchorOffset!==v.offset||b.focusNode!==d.node||b.focusOffset!==d.offset)){var g=z.createRange();g.setStart(v.node,v.offset),b.removeAllRanges(),U>J?(b.addRange(g),b.extend(d.node,d.offset)):(g.setEnd(d.node,d.offset),b.addRange(g))}}}}for(z=[],b=f;b=b.parentNode;)b.nodeType===1&&z.push({element:b,left:b.scrollLeft,top:b.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fe?32:e,w.T=null,e=$f,$f=null;var u=Ft,i=ie;if(_l=0,Ea=Ft=null,ie=0,(vl&6)!==0)throw Error(s(331));var f=vl;if(vl|=4,th(u.current),Id(u,u.current,i,e),vl=f,Pn(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(gn,u)}catch{}return!0}finally{p.p=n,w.T=a,yh(l,t)}}function gh(l,t,e){t=wt(e,t),t=Sf(l.stateNode,t,2),l=He(l,t,2),l!==null&&(Sn(l,2),ce(l))}function Sl(l,t,e){if(l.tag===3)gh(l,l,e);else for(;t!==null;){if(t.tag===3){gh(t,l,e);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ve===null||!Ve.has(a))){l=wt(e,l),e=hd(2),a=He(t,e,2),a!==null&&(md(e,a,t,l),Sn(a,2),ce(a));break}}t=t.return}}function as(l,t,e){var a=l.pingCache;if(a===null){a=l.pingCache=new qv;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(e)||(kf=!0,n.add(e),l=Zv.bind(null,l,t,e),t.then(l,l))}function Zv(l,t,e){var a=l.pingCache;a!==null&&a.delete(t),l.pingedLanes|=l.suspendedLanes&e,l.warmLanes&=~e,xl===l&&(tl&e)===e&&((Dl===4||Dl===3&&(tl&62914560)===tl&&300>pt()-Ni)&&(vl&2)===0?an(l,0):xi|=e,Ia===tl&&(Ia=0)),ce(l)}function bh(l,t){t===0&&(t=er()),l=ia(l,t),l!==null&&(Sn(l,t),ce(l))}function Kv(l){var t=l.memoizedState,e=0;t!==null&&(e=t.retryLane),bh(l,e)}function kv(l,t){var e=0;switch(l.tag){case 31:case 13:var a=l.stateNode,n=l.memoizedState;n!==null&&(e=n.retryLane);break;case 19:a=l.stateNode;break;case 22:a=l.stateNode._retryCache;break;default:throw Error(s(314))}a!==null&&a.delete(t),bh(l,e)}function Jv(l,t){return uc(l,t)}var un=null,cn=null,ns=!1,Di=!1,us=!1,Ke=0;function ce(l){l!==cn&&l.next===null&&(cn===null?un=cn=l:cn=cn.next=l),Di=!0,ns||(ns=!0,$v())}function Pn(l,t){if(!us&&Di){us=!0;do for(var e=!1,a=un;a!==null;){if(l!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,f=a.pingedLanes;u=(1<<31-Et(42|l)+1)-1,u&=n&~(i&~f),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(e=!0,Eh(a,u))}else u=tl,u=xu(a,a===xl?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||bn(a,u)||(e=!0,Eh(a,u));a=a.next}while(e);us=!1}}function Fv(){Sh()}function Sh(){Di=ns=!1;var l=0;Ke!==0&&cy()&&(l=Ke);for(var t=pt(),e=null,a=un;a!==null;){var n=a.next,u=ph(a,t);u===0?(a.next=null,e===null?un=n:e.next=n,n===null&&(cn=e)):(e=a,(l!==0||(u&3)!==0)&&(Di=!0)),a=n}_l!==0&&_l!==5||Pn(l),Ke!==0&&(Ke=0)}function ph(l,t){for(var e=l.suspendedLanes,a=l.pingedLanes,n=l.expirationTimes,u=l.pendingLanes&-62914561;0f)break;var S=r.transferSize,z=r.initiatorType;S&&_h(z)&&(r=r.responseEnd,i+=S*(rqi){U.length=_;break}g=new Promise(hy.bind(g)),U.push(g)}}}if(0"u"?null:document;function Ih(l,t,e){var a=sn;if(a&&typeof t=="string"&&t){var n=Rt(t);n='link[rel="'+l+'"][href="'+n+'"]',typeof e=="string"&&(n+='[crossorigin="'+e+'"]'),Wh.has(n)||(Wh.add(n),l={rel:l,crossOrigin:e,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),tt(t,"link",l),Kl(t),a.head.appendChild(t)))}}function Dy(l){xe.D(l),Ih("dns-prefetch",l,null)}function Ry(l,t){xe.C(l,t),Ih("preconnect",l,t)}function Uy(l,t,e){xe.L(l,t,e);var a=sn;if(a&&l&&t){var n='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&e&&e.imageSrcSet?(n+='[imagesrcset="'+Rt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(n+='[imagesizes="'+Rt(e.imageSizes)+'"]')):n+='[href="'+Rt(l)+'"]';var u=n;switch(t){case"style":u=rn(l);break;case"script":u=on(l)}if(!(Xt.has(u)||(l=V({rel:"preload",href:t==="image"&&e&&e.imageSrcSet?void 0:l,as:t},e),Xt.set(u,l),a.querySelector(n)!==null||t==="style"&&a.querySelector(nu(u))||t==="script"&&a.querySelector(uu(u))))){var i=a.createElement("link");tt(i,"link",l),t==="style"&&(i[Nu]=!0,i.onload=i.onerror=function(){rr(i)}),Kl(i),a.head.appendChild(i)}}}function wy(l,t){xe.m(l,t);var e=sn;if(e&&l){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Rt(a)+'"][href="'+Rt(l)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=on(l)}if(!Xt.has(u)&&(l=V({rel:"modulepreload",href:l},t),Xt.set(u,l),e.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(uu(u)))return}a=e.createElement("link"),tt(a,"link",l),Kl(a),e.head.appendChild(a)}}}function Hy(l,t,e){xe.S(l,t,e);var a=sn;if(a&&l){var n=Aa(a).hoistableStyles,u=rn(l);t=t||"default";var i=n.get(u);if(!i){var f={loading:0,preload:null};if(i=a.querySelector(nu(u)))f.loading=5;else{l=V({rel:"stylesheet",href:l,"data-precedence":t},e),(e=Xt.get(u))&&js(l,e);var r=i=a.createElement("link");Kl(r),tt(r,"link",l),r._p=new Promise(function(y,S){r.onload=y,r.onerror=S}),r.addEventListener("load",function(){f.loading|=1}),r.addEventListener("error",function(){f.loading|=2}),f.loading|=4,wi(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:f},n.set(u,i)}}}function qy(l,t){xe.X(l,t);var e=sn;if(e&&l){var a=Aa(e).hoistableScripts,n=on(l),u=a.get(n);u||(u=e.querySelector(uu(n)),u||(l=V({src:l,async:!0},t),(t=Xt.get(n))&&As(l,t),u=e.createElement("script"),Kl(u),tt(u,"link",l),e.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function By(l,t){xe.M(l,t);var e=sn;if(e&&l){var a=Aa(e).hoistableScripts,n=on(l),u=a.get(n);u||(u=e.querySelector(uu(n)),u||(l=V({src:l,async:!0,type:"module"},t),(t=Xt.get(n))&&As(l,t),u=e.createElement("script"),Kl(u),tt(u,"link",l),e.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Ph(l,t,e,a){var n=(n=Ne.current)?au(n):null;if(!n)throw Error(s(446));switch(l){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(e=rn(e.href),t=Aa(n).hoistableStyles,a=t.get(e),a||(a={type:"style",instance:null,count:0,state:null},t.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){l=rn(e.href);var u=Aa(n).hoistableStyles,i=u.get(l);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(l,i),(u=n.querySelector(nu(l)))?u._p||(i.instance=u,i.state.loading=5):(u=Xt.get(l),u||(u={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},Xt.set(l,u)),Yy(n,l,u,i.state))),t&&a===null)throw Error(s(528,""));return i}if(t&&a!==null)throw Error(s(529,""));return null;case"script":return t=e.async,e=e.src,typeof e=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(e=on(e),t=Aa(n).hoistableScripts,a=t.get(e),a||(a={type:"script",instance:null,count:0,state:null},t.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,l))}}function rn(l){return'href="'+Rt(l)+'"'}function nu(l){return'link[rel="stylesheet"]['+l+"]"}function l0(l){return V({},l,{"data-precedence":l.precedence,precedence:null})}function Yy(l,t,e,a){if(t=l.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Nu]!==!0){a.loading=1;return}}else t=l.createElement("link"),t[Nu]=!0,t.onload=t.onerror=rr.bind(null,t),tt(t,"link",e),Kl(t),l.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function on(l){return'[src="'+Rt(l)+'"]'}function uu(l){return"script[async]"+l}function t0(l,t,e){if(t.count++,t.instance===null)switch(t.type){case"style":var a=l.querySelector('style[data-href~="'+Rt(e.href)+'"]');if(a)return t.instance=a,Kl(a),a;var n=V({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(l.ownerDocument||l).createElement("style"),Kl(a),tt(a,"style",n),wi(a,e.precedence,l),t.instance=a;case"stylesheet":n=rn(e.href);var u=l.querySelector(nu(n));if(u)return t.state.loading|=4,t.instance=u,Kl(u),u;a=l0(e),(n=Xt.get(n))&&js(a,n),u=(l.ownerDocument||l).createElement("link"),Kl(u);var i=u;return i._p=new Promise(function(f,r){i.onload=f,i.onerror=r}),tt(u,"link",a),t.state.loading|=4,wi(u,e.precedence,l),t.instance=u;case"script":return u=on(e.src),(n=l.querySelector(uu(u)))?(t.instance=n,Kl(n),n):(a=e,(n=Xt.get(u))&&(a=V({},e),As(a,n)),l=l.ownerDocument||l,n=l.createElement("script"),Kl(n),tt(n,"link",a),l.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,wi(a,e.precedence,l));return t.instance}function wi(l,t,e){for(var a=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i title"):null)}function Gy(l,t,e){if(e===1||t.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(l=t.disabled,typeof t.precedence=="string"&&l==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function a0(l,t){return l==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function n0(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function u0(l){return(l.width||100)*(l.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function i0(l,t){typeof t.decode=="function"&&(l.imgCount++,t.complete||(l.imgBytes+=u0(t),l.suspenseyImages.push(t)),l=Qy.bind(l),t.decode().then(l,l))}function Xy(l,t,e,a){if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var n=rn(a.href),u=t.querySelector(nu(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=iu.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=u,Kl(u);return}u=t.ownerDocument||t,a=l0(a),(n=Xt.get(n))&&js(a,n),u=u.createElement("link"),Kl(u);var i=u;i._p=new Promise(function(f,r){i.onload=f,i.onerror=r}),tt(u,"link",a),e.instance=u}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=iu.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}var qi=0;function Ly(l,t){return l.stylesheets&&l.count===0&&Yi(l,l.stylesheets),0qi?50:800)+t);return l.unsuspend=e,function(){l.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function c0(l){if(l.count===0&&(l.imgCount===0||!l.waitingForImages)){if(l.stylesheets)Yi(l,l.stylesheets);else if(l.unsuspend){var t=l.unsuspend;l.unsuspend=null,t()}}}function iu(){this.count--,c0(this)}function Qy(){this.imgCount--,c0(this)}var Bi=null;function Yi(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Bi=new Map,t.forEach(Vy,l),Bi=null,iu.call(l))}function Vy(l,t){if(!(t.state.loading&4)){var e=Bi.get(l);if(e)var a=e.get(null);else{e=new Map,Bi.set(l,e);for(var n=l.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(j){console.error(j)}}return o(),qs.exports=c1(),qs.exports}var s1=f1();const r1=Q0(s1);const o1=o=>o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),V0=(...o)=>o.filter((j,E,s)=>!!j&&j.trim()!==""&&s.indexOf(j)===E).join(" ").trim();var d1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const h1=ll.forwardRef(({color:o="currentColor",size:j=24,strokeWidth:E=2,absoluteStrokeWidth:s,className:T="",children:O,iconNode:Y,...K},ul)=>ll.createElement("svg",{ref:ul,...d1,width:j,height:j,stroke:o,strokeWidth:s?Number(E)*24/Number(j):E,className:V0("lucide",T),...K},[...Y.map(([rl,D])=>ll.createElement(rl,D)),...Array.isArray(O)?O:[O]]));const Cl=(o,j)=>{const E=ll.forwardRef(({className:s,...T},O)=>ll.createElement(h1,{ref:O,iconNode:j,className:V0(`lucide-${o1(o)}`,s),...T}));return E.displayName=`${o}`,E};const m1=Cl("ArrowDownLeft",[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]]);const du=Cl("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Pe=Cl("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);const Z0=Cl("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const Ki=Cl("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const M0=Cl("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const D0=Cl("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const v1=Cl("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const R0=Cl("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);const y1=Cl("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);const $i=Cl("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const hu=Cl("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const ki=Cl("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const g1=Cl("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);const U0=Cl("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const b1=Cl("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);const w0=Cl("Pickaxe",[["path",{d:"M14.531 12.469 6.619 20.38a1 1 0 1 1-3-3l7.912-7.912",key:"we99rg"}],["path",{d:"M15.686 4.314A12.5 12.5 0 0 0 5.461 2.958 1 1 0 0 0 5.58 4.71a22 22 0 0 1 6.318 3.393",key:"1w6hck"}],["path",{d:"M17.7 3.7a1 1 0 0 0-1.4 0l-4.6 4.6a1 1 0 0 0 0 1.4l2.6 2.6a1 1 0 0 0 1.4 0l4.6-4.6a1 1 0 0 0 0-1.4z",key:"15hgfx"}],["path",{d:"M19.686 8.314a12.501 12.501 0 0 1 1.356 10.225 1 1 0 0 1-1.751-.119 22 22 0 0 0-3.393-6.319",key:"452b4h"}]]);const S1=Cl("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const Vs=Cl("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const Wi=Cl("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const p1=Cl("Swords",[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]]);const Xs=Cl("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);const Ls=Cl("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Ii(o){const j=parseInt(o.slice(-4),16)%100;return j<3?"Legendary":j<15?"Epic":j<40?"Rare":"Common"}function T1(o){return{power:30+parseInt(o.slice(8,10),16)%70,defense:30+parseInt(o.slice(10,12),16)%70,knowledge:30+parseInt(o.slice(12,14),16)%70}}const Pi="wikideck-randomx-testnet-2",K0={coinbaseMaturity:2};function E1(o){return JSON.stringify([Pi,"nft-transfer",o.chainId,o.cardHash,o.from,o.to,o.sequence])}function vn(o,j){let E=o.blocks.find(s=>s.tokenId===j)?.owner;for(const s of o.transfers)s.cardHash===j&&(E=s.to);return E}const k0="wikideck-randomx-testnet-2",ks=6e5,x1=32*1024,Js=new TextEncoder;function vu(o){return btoa(String.fromCharCode(...new Uint8Array(o)))}function la(o,j,E){if(typeof o!="string"||o.length>Math.ceil(E/3)*4||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(o))throw new Error("Invalid backup encoding.");const s=Uint8Array.from(atob(o),T=>T.charCodeAt(0));if(s.lengthE||vu(s)!==o)throw new Error("Invalid backup field size or encoding.");return s}function J0(o,j){if(typeof o!="string"||o.length1024)throw new Error(`Password must contain ${j}–1024 characters.`);return Js.encode(o)}async function F0(o,j,E){const s=J0(o,E==="encrypt"?12:1);try{const T=await crypto.subtle.importKey("raw",s,"PBKDF2",!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:"PBKDF2",hash:"SHA-256",salt:j,iterations:ks},T,{name:"AES-GCM",length:256},!1,[E])}finally{s.fill(0)}}function $0(o){return Js.encode(JSON.stringify([o.format,o.version,o.network,o.kdf,o.iterations,o.cipher,o.salt,o.iv,o.publicKey]))}function W0(o){if(!o||typeof o!="object"||Array.isArray(o)||![Object.prototype,null].includes(Object.getPrototypeOf(o)))throw new Error("Invalid wallet backup.");const j=["format","version","network","kdf","iterations","cipher","salt","iv","publicKey","ciphertext"],E=Object.getOwnPropertyDescriptors(o);if(Reflect.ownKeys(o).length!==j.length||j.some(T=>!Object.hasOwn(E,T)||!Object.hasOwn(E[T],"value")))throw new Error("Invalid wallet backup fields.");const s=o;if(s.format!=="wikideck-wallet-backup"||s.version!==1||s.network!==k0||s.kdf!=="PBKDF2-SHA256"||s.iterations!==ks||s.cipher!=="AES-256-GCM")throw new Error("Unsupported wallet backup format, network, or cryptography.");if(la(s.salt,16,16),la(s.iv,12,12),la(s.publicKey,91,91),la(s.ciphertext,17,4096),Js.encode(JSON.stringify(s)).length>x1)throw new Error("Backup exceeds 32 KB.");return{format:s.format,version:s.version,network:s.network,kdf:s.kdf,iterations:s.iterations,cipher:s.cipher,salt:s.salt,iv:s.iv,publicKey:s.publicKey,ciphertext:s.ciphertext}}async function I0(o,j){if(!o||o.type!=="private"||o.algorithm.name!=="ECDSA"||o.algorithm.namedCurve!=="P-256"||!o.extractable||!o.usages.includes("sign"))throw new Error("An exportable P-256 ECDSA signing key is required.");const E=la(j,91,91),s=await crypto.subtle.importKey("spki",E,{name:"ECDSA",namedCurve:"P-256"},!0,["verify"]);if(vu(await crypto.subtle.exportKey("spki",s))!==j)throw new Error("Public key must be canonical SPKI DER.");const T=crypto.getRandomValues(new Uint8Array(32)),O=await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},o,T);if(!await crypto.subtle.verify({name:"ECDSA",hash:"SHA-256"},s,O,T))throw new Error("Wallet key pair does not match.");const Y=new Uint8Array(await crypto.subtle.digest("SHA-256",E));return Array.from(Y,K=>K.toString(16).padStart(2,"0")).join("")}async function N1(o,j,E){J0(E,12).fill(0),await I0(o,j);const s=crypto.getRandomValues(new Uint8Array(16)),T=crypto.getRandomValues(new Uint8Array(12)),O={format:"wikideck-wallet-backup",version:1,network:k0,kdf:"PBKDF2-SHA256",iterations:ks,cipher:"AES-256-GCM",salt:vu(s),iv:vu(T),publicKey:j,ciphertext:""},Y=await F0(E,s,"encrypt"),K=new Uint8Array(await crypto.subtle.exportKey("pkcs8",o));try{return O.ciphertext=vu(await crypto.subtle.encrypt({name:"AES-GCM",iv:T,additionalData:$0(O),tagLength:128},Y,K)),W0(O)}finally{K.fill(0)}}async function z1(o,j){const E=W0(o),s=await F0(j,la(E.salt,16,16),"decrypt");let T;try{T=new Uint8Array(await crypto.subtle.decrypt({name:"AES-GCM",iv:la(E.iv,12,12),additionalData:$0(E),tagLength:128},s,la(E.ciphertext,17,4096)));const O=await crypto.subtle.importKey("pkcs8",T,{name:"ECDSA",namedCurve:"P-256"},!0,["sign"]),Y=await I0(O,E.publicKey);return{privateKey:O,publicKey:E.publicKey,address:Y}}catch{throw new Error("Cannot unlock backup: incorrect password, damaged backup, or mismatched wallet keys.")}finally{T?.fill(0)}}const P0="wikideck-testnet-wallet-v2",j1=`${P0}:identity`,lm=o=>btoa(String.fromCharCode(...new Uint8Array(o)));function A1(){return new Promise((o,j)=>{const E=indexedDB.open(P0,1);let s=!1;E.onupgradeneeded=()=>E.result.createObjectStore("keys"),E.onsuccess=()=>{if(s){E.result.close();return}E.result.onversionchange=()=>E.result.close(),o(E.result)},E.onblocked=()=>{s=!0,j(new Error("Close other Wikideck tabs to enable wallet storage, then retry."))},E.onerror=()=>j(E.error??new Error("Enable browser storage to use your local wallet."))})}function Zs(o,j,E=!1){return new Promise((s,T)=>{const O=o.transaction("keys",j?"readwrite":"readonly"),Y=O.objectStore("keys");let K;const ul=Y.get("identity");ul.onsuccess=()=>{try{K=ul.result,j&&(!E||K===void 0)&&(Y.put(j,"identity"),K=j)}catch(rl){O.abort(),T(rl)}},O.oncomplete=()=>s(K),O.onabort=()=>T(O.error??new DOMException("Wallet transaction aborted.","AbortError")),O.onerror=()=>T(O.error??new Error("Could not save the wallet."))})}let H0=Promise.resolve();function tm(o){const j=async()=>{for(let s=0;;s++){let T;try{return T=await A1(),await o(T)}catch(O){if(s>=2||!(O instanceof DOMException)||!["AbortError","UnknownError","InvalidStateError"].includes(O.name))throw O}finally{T?.close()}}},E=H0.then(async()=>typeof navigator<"u"&&navigator.locks?await navigator.locks.request(j1,j):await j());return H0=E.catch(()=>{}),E}function q0(){return tm(async o=>{const j=await Zs(o);if(j!==void 0)return j;const E=await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]),s=await crypto.subtle.exportKey("spki",E.publicKey),T=new Uint8Array(await crypto.subtle.digest("SHA-256",s)),O={privateKey:E.privateKey,publicKey:lm(s),address:Array.from(T,Y=>Y.toString(16).padStart(2,"0")).join("")};return await Zs(o,O,!0)})}async function O1(o,j){return lm(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},o.privateKey,new TextEncoder().encode(j)))}function _1(o,j){return N1(o.privateKey,o.publicKey,j)}async function C1(o,j){const E=await z1(o,j);return await tm(s=>Zs(s,E)),E}const M1=[{pageId:22780,title:"Octopus",extract:"An octopus is a soft-bodied marine mollusc with eight arms. These remarkable animals use camouflage, problem-solving, and jet propulsion to navigate their world.",category:"Nature",revisionId:0,source:"offline",url:"https://en.wikipedia.org/?curid=22780",image:"https://upload.wikimedia.org/wikipedia/commons/5/57/Octopus2.jpg"},{pageId:736,title:"Albert Einstein",extract:"Albert Einstein was a theoretical physicist whose work on relativity transformed our understanding of space, time, and gravity. He received the 1921 Nobel Prize in Physics.",category:"People",revisionId:0,source:"offline",url:"https://en.wikipedia.org/?curid=736",image:"https://upload.wikimedia.org/wikipedia/commons/2/28/Albert_Einstein_Head_cleaned.jpg"},{pageId:19331,title:"Moon",extract:"The Moon is Earth’s natural satellite. Its cratered surface records billions of years of impacts, and its gravitational influence helps drive the ocean tides.",category:"Space",revisionId:0,source:"offline",url:"https://en.wikipedia.org/?curid=19331",image:"https://upload.wikimedia.org/wikipedia/commons/e/e1/FullMoon2010.jpg"},{pageId:23053,title:"Periodic table",extract:"The periodic table arranges chemical elements by atomic number and recurring properties. Its structure reveals patterns in the building blocks of matter.",category:"Science",revisionId:0,source:"offline",url:"https://en.wikipedia.org/?curid=23053",image:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Colour_18-col_PT_with_labels.svg/960px-Colour_18-col_PT_with_labels.svg.png"}],mu=M1.map((o,j)=>({article:o,hash:["000eca7498a26d1908613726da6e869d7c9c936f4a461cb439ef24672b9a0008","000b1a387a067a7d698677965ca1ca7b0eb5e590811431bdb9aad62268180001","0008a4fa5893e9ddbd679cbcc7f0938706aa70aab8c8af42a4bc67a42520001","0009a4fa5893e9ddbd679cbcc7f0938706aa70aab8c8af42a4bc67a42520020"][j]}));function D1(o){if(!o.image)return o.url;const j=new URL(o.image).pathname.split("/");return`https://commons.wikimedia.org/wiki/File:${j.includes("thumb")?j.at(-2):j.at(-1)}`}function Ji({card:o,onClick:j}){const{article:E,hash:s}=o,T=Ii(s),O=T1(s);return c.jsxs("button",{className:`wiki-card ${T.toLowerCase()}`,onClick:j,tabIndex:j?0:-1,"aria-label":`View ${E.title} ${T} card`,children:[c.jsxs("div",{className:"card-top",children:[c.jsxs("span",{children:[c.jsx(Wi,{size:11})," ",T]}),c.jsxs("span",{children:["W / ",String(E.pageId).slice(-4)]})]}),c.jsxs("div",{className:`card-art art-${E.category.toLowerCase()}`,children:[E.image?c.jsx("img",{src:E.image,alt:E.title,loading:"lazy",referrerPolicy:"no-referrer",onError:Y=>{Y.currentTarget.style.display="none"}}):c.jsx($i,{size:64}),c.jsx("span",{className:"card-category",children:E.category})]}),c.jsxs("div",{className:"card-content",children:[c.jsxs("div",{className:"card-title",children:[c.jsx("h3",{children:E.title}),c.jsx(Pe,{size:16})]}),c.jsx("p",{children:E.extract}),c.jsxs("div",{className:"card-stats",children:[c.jsxs("span",{children:[c.jsx(p1,{size:12}),O.power]}),c.jsxs("span",{children:[c.jsx(Vs,{size:12}),O.defense]}),c.jsxs("span",{children:[c.jsx(Z0,{size:12}),O.knowledge]})]})]}),c.jsxs("div",{className:"card-bottom",children:[c.jsxs("span",{children:["WIKIPEDIA · #",E.pageId]}),c.jsx("span",{children:o.block?`BLOCK ${o.block.height}`:"PREVIEW"})]})]})}function R1({wallet:o,onRestore:j,onNotice:E}){const s=ll.useId(),[T,O]=ll.useState(""),[Y,K]=ll.useState(""),[ul,rl]=ll.useState(""),[D,x]=ll.useState(),[R,dl]=ll.useState(!1),[Q,Tl]=ll.useState(!1),$=ll.useRef(!1),Gl=ll.useRef(null);async function Rl(gl){if(gl.preventDefault(),!($.current||!o)){if(T.length<12||T.length>1024||T!==Y){E("Use a password of 12–1024 characters and enter it identically twice.");return}$.current=!0,Tl(!0);try{const Xl=await _1(o,T),jl=URL.createObjectURL(new Blob([JSON.stringify(Xl,null,2)],{type:"application/json"})),V=document.createElement("a");V.href=jl,V.download=`wikideck-testnet-wallet-${o.address}.json`,document.body.append(V);try{V.click()}finally{V.remove(),setTimeout(()=>URL.revokeObjectURL(jl),1e3)}E("Encrypted backup download requested. Keep the file and password safe; test recovery before relying on it.")}catch{E("Could not export the wallet. Check browser support and try again.")}finally{O(""),K(""),$.current=!1,Tl(!1)}}}async function Mt(gl){if(gl.preventDefault(),!$.current){if(!D||D.size===0||D.size>32*1024){E("Choose a nonempty wallet backup JSON file no larger than 32 KB.");return}if(o&&!R){E("Confirm replacement of the active wallet first. Back it up before continuing.");return}$.current=!0,Tl(!0);try{const Xl=JSON.parse(await D.text()),jl=await C1(Xl,ul);j(jl),E("Wallet recovered and saved locally. Other open tabs should reload before signing."),x(void 0),dl(!1),Gl.current&&(Gl.current.value="")}catch{E("Recovery failed. Check the password, backup format and network, and browser storage. The backup must be intact.")}finally{rl(""),$.current=!1,Tl(!1)}}}return c.jsxs("section",{"aria-labelledby":`${s}-title`,"aria-busy":Q,children:[c.jsx("h2",{id:`${s}-title`,children:"Wallet backup & recovery"}),c.jsx("p",{children:"This is a recoverable P-256 wallet for wikideck-randomx-testnet-2, separate from your old demo wallet."}),c.jsx("p",{children:"The exportable private key is stored locally in this browser’s IndexedDB, not encrypted by this password. Scripts running on this origin or someone with access to your browser profile may access it. Clearing site data without a backup loses access."}),c.jsx("p",{children:"Backup encryption and recovery happen locally. No private key, backup file, or password is transmitted to a server by this panel. Public addresses, public keys and signatures may be shared during normal wallet use."}),c.jsxs("p",{children:[c.jsx("strong",{children:"Forgotten backup passwords cannot be reset or recovered."})," Keep the encrypted file and a strong, unique password safe and separate. Anyone with both can control this wallet. Downloading does not guarantee the file was saved."]}),c.jsx("form",{onSubmit:Rl,children:c.jsxs("fieldset",{disabled:Q||!o,children:[c.jsx("legend",{children:"Download encrypted backup"}),c.jsx("label",{htmlFor:`${s}-password`,children:"Backup password (at least 12 characters)"}),c.jsx("input",{id:`${s}-password`,type:"password",autoComplete:"new-password",minLength:12,maxLength:1024,required:!0,value:T,onChange:gl=>O(gl.target.value)}),c.jsx("label",{htmlFor:`${s}-confirm`,children:"Confirm backup password"}),c.jsx("input",{id:`${s}-confirm`,type:"password",autoComplete:"new-password",minLength:12,maxLength:1024,required:!0,value:Y,onChange:gl=>K(gl.target.value)}),c.jsx("button",{type:"submit",children:"Download encrypted backup"})]})}),c.jsx("form",{onSubmit:Mt,children:c.jsxs("fieldset",{disabled:Q,children:[c.jsx("legend",{children:"Recover from a local backup"}),c.jsx("label",{htmlFor:`${s}-file`,children:"Backup JSON file (maximum 32 KB)"}),c.jsx("input",{ref:Gl,id:`${s}-file`,type:"file",accept:".json,application/json",required:!0,onChange:gl=>{x(gl.target.files?.[0]),dl(!1)}}),c.jsx("label",{htmlFor:`${s}-import-password`,children:"Backup password"}),c.jsx("input",{id:`${s}-import-password`,type:"password",autoComplete:"off",required:!0,maxLength:1024,value:ul,onChange:gl=>rl(gl.target.value)}),o&&c.jsxs("label",{children:[c.jsx("input",{type:"checkbox",required:!0,checked:R,onChange:gl=>dl(gl.target.checked)}),"I have backed up my active wallet and confirm replacing it. Recovery does not transfer its assets."]}),c.jsx("button",{type:"submit",disabled:!D||!!o&&!R,children:"Recover and save wallet"})]})})]})}function U1(o){ll.useEffect(()=>{if(!o)return;const j=document.activeElement,E=document.querySelector('[role="dialog"]');if(!E)return;const s=Array.from(document.querySelectorAll(".sidebar, .main-shell"));s.forEach(K=>{K.inert=!0});const T=document.body.style.overflow;document.body.style.overflow="hidden";const O=()=>Array.from(E.querySelectorAll('a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), [tabindex="0"]')).filter(K=>K.getClientRects().length>0);O()[0]?.focus();const Y=K=>{if(K.key!=="Tab")return;const ul=O(),rl=ul[0],D=ul.at(-1);K.shiftKey&&document.activeElement===rl?(K.preventDefault(),D?.focus()):!K.shiftKey&&document.activeElement===D&&(K.preventDefault(),rl?.focus())};return E.addEventListener("keydown",Y),()=>{E.removeEventListener("keydown",Y),s.forEach(K=>{K.inert=!1}),document.body.style.overflow=T,j?.isConnected&&j.focus()}},[o])}const Fs=[{id:"mocha",label:"Mocha",base:"#1e1e2e"},{id:"macchiato",label:"Macchiato",base:"#24273a"},{id:"frappe",label:"Frappé",base:"#303446"},{id:"latte",label:"Latte",base:"#eff1f5"}],B0="wikideck-theme",w1="mocha";function em(o){return Fs.some(j=>j.id===o)}function Y0(o){return em(o)?o:w1}function G0(o){document.documentElement.dataset.theme=o,document.documentElement.style.colorScheme=o==="latte"?"light":"dark",document.querySelector('meta[name="theme-color"]')?.setAttribute("content",Fs.find(j=>j.id===o).base)}function H1(){const[o,j]=ll.useState(()=>Y0(document.documentElement.dataset.theme));ll.useEffect(()=>{const s=T=>{if(T.key!==B0&&T.key!==null)return;const O=Y0(T.newValue);G0(O),j(O)};return window.addEventListener("storage",s),()=>window.removeEventListener("storage",s)},[]);const E=s=>{if(em(s)){G0(s),j(s);try{localStorage.setItem(B0,s)}catch{}}};return c.jsxs("label",{className:"theme-picker",title:"Choose your Catppuccin flavor",children:[c.jsx(b1,{size:15,"aria-hidden":"true"}),c.jsx("select",{"aria-label":"Catppuccin theme",value:o,onChange:s=>E(s.target.value),children:Fs.map(s=>c.jsx("option",{value:s.id,children:s.label},s.id))})]})}const Lt=o=>o?`${o.slice(0,6)}…${o.slice(-4)}`:"—",Qs=o=>({article:o.article,hash:o.powHash,block:o}),Fi=o=>o instanceof Error?o.message:"Request failed. Please try again.";async function X0(o,j,E){const s=await fetch(`/api/${o}`,{cache:"no-store",signal:AbortSignal.timeout(15e3),...j===void 0?{}:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)}});if(!s.headers.get("content-type")?.includes("application/json"))throw new Error("The testnet RPC is unavailable. Start the node and web services.");const T=await s.json();if(!s.ok)throw new Error(typeof T.error=="string"?T.error:"Request failed");if(E!==void 0&&s.status!==E)throw new Error("Unexpected testnet RPC response. Refresh before trying again.");return T}function L0(o,j,E){const s=j.block,T=s&&o.blocks.find(O=>O.tokenId===s.tokenId&&O.hash===s.hash);return T?vn(o,T.tokenId)!==E?"This wallet is not the confirmed owner.":o.blocks.length+1-T.heightO.cardHash===T.tokenId)?"A transfer for this NFT is already pending mining.":"":"This NFT is no longer on the canonical chain. Refresh your collection."}function q1(){const[o,j]=ll.useState("Discover"),[E,s]=ll.useState(),[T,O]=ll.useState(),[Y,K]=ll.useState(!1),[ul,rl]=ll.useState(""),[D,x]=ll.useState(""),[R,dl]=ll.useState(null),[Q,Tl]=ll.useState(),[$,Gl]=ll.useState(""),[Rl,Mt]=ll.useState("All cards"),[gl,Xl]=ll.useState(""),[jl,V]=ll.useState(!1),[il,Ql]=ll.useState(""),Vl=ll.useRef(!1),Zl=ll.useRef(0),at=ll.useRef(null);U1(!!(R||Q));const ut=async()=>{const p=++Zl.current;try{const nl=await X0("state");if(nl.network!==Pi||nl.algorithm!=="RandomX"||typeof nl.chainId!="string"||!Array.isArray(nl.blocks)||!Array.isArray(nl.transfers)||!Array.isArray(nl.pendingTransfers)||!nl.nextArticle)throw new Error("Incompatible node. This interface requires the Wikideck RandomX testnet API.");return p===Zl.current&&(O(nl),K(!0),rl("")),nl}catch(nl){throw p===Zl.current&&(K(!1),rl(Fi(nl))),nl}};ll.useEffect(()=>{let p=!0;q0().then(it=>{p&&s(it)}).catch(it=>{p&&rl(Fi(it))}),ut().catch(()=>{});const nl=setInterval(()=>{ut().catch(()=>{})},8e3);return()=>{p=!1,clearInterval(nl),Zl.current++}},[]),ll.useEffect(()=>{if(D){const p=setTimeout(()=>x(""),8e3);return()=>clearTimeout(p)}},[D]),ll.useEffect(()=>{const p=nl=>{nl.key==="Escape"&&!Vl.current&&(dl(null),Tl(void 0),Ql(""))};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[]);const fe=async()=>{if(!(Vl.current||!E||!Q?.block||!T)){Vl.current=!0,V(!0),Ql("");try{const p=await ut();if(p.chainId!==T.chainId)throw new Error("The node chain ID changed. Refresh and review this NFT before signing.");const nl=L0(p,Q,E.address);if(nl)throw new Error(nl);const it=gl.trim().toLowerCase();if(!/^[a-f0-9]{64}$/.test(it)||it===E.address)throw new Error("Enter another wallet’s 64-character receive address.");const Vt=Q.block.tokenId,St={network:Pi,chainId:p.chainId,cardHash:Vt,from:E.address,to:it,sequence:p.transfers.filter(fl=>fl.cardHash===Vt).length},Ul={...St,publicKey:E.publicKey,signature:await O1(E,E1(St))};await X0("transfer",Ul,202),Zl.current++,O(fl=>fl&&fl.chainId===p.chainId?{...fl,pendingTransfers:[...fl.pendingTransfers.filter(Dt=>Dt.cardHash!==Ul.cardHash),Ul]}:fl),dl(null),Xl(""),x("Transfer pending. You remain the confirmed owner until it is mined into the canonical chain."),ut().catch(()=>{})}catch(p){Ql(Fi(p))}finally{Vl.current=!1,V(!1)}}},Ol=T?.blocks.filter(p=>E&&vn(T,p.tokenId)===E.address)??[],C=o==="My collection"?Ol.map(Qs):T?.blocks.length?[...T.blocks].reverse().slice(0,12).map(Qs):mu,G=C.filter(p=>(Rl==="All cards"||p.article.category===Rl)&&`${p.article.title} ${p.article.extract}`.toLowerCase().includes($.toLowerCase())),X=Q?.block,al=X&&T?.blocks.find(p=>p.tokenId===X.tokenId&&p.hash===X.hash),hl=al&&T?T.blocks.length-al.height+1:0,ot=al&&T?vn(T,al.tokenId):void 0,Qt=!!al&&!!T?.pendingTransfers.some(p=>p.cardHash===al.tokenId),dt=Q&&E&&T?L0(T,Q,E.address):"Wallet and node state are required.",h=Y?T?.peers?`${T.peers} peers`:"Isolated node":"Peers unknown",A=`npm run miner -- --wallet --consent --node ${window.location.origin}`,H=()=>{Vl.current||(dl(null),Tl(void 0),Ql(""))},q=()=>{Tl(void 0),dl("wallet")},W=()=>{j("Discover"),setTimeout(()=>at.current?.scrollIntoView({behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth",block:"center"}),50)},cl=async()=>{if(E)try{await navigator.clipboard.writeText(E.address),x("Wallet address copied.")}catch{x("Clipboard unavailable. Select and copy your receive address below.")}},ol=p=>{s(p),Tl(void 0),Xl(""),Ql(""),x("Wallet restored locally. Refreshing confirmed NFT ownership."),ut().catch(()=>{})},w=async()=>{try{s(await q0()),await ut()}catch(p){rl(Fi(p))}};return c.jsxs("div",{className:"app-shell",children:[c.jsxs("aside",{className:"sidebar",children:[c.jsxs("a",{href:"#",className:"brand",onClick:p=>{p.preventDefault(),j("Discover")},children:[c.jsxs("span",{className:"brand-mark",children:["w",c.jsx("span",{children:"✦"})]}),"wikideck",c.jsx("span",{className:"brand-dot",children:"."})]}),c.jsx("div",{className:"sidebar-label",children:"YOUR NEXT DISCOVERY"}),c.jsx("nav",{"aria-label":"Main navigation",children:["Discover","My collection","Block explorer"].map((p,nl)=>{const it=[g1,ki,$i][nl];return c.jsxs("button",{"aria-label":p,"aria-current":o===p?"page":void 0,className:`nav-item ${o===p?"active":""}`,onClick:()=>{j(p),Gl(""),Mt("All cards")},children:[c.jsx(it,{size:18}),p,p==="My collection"&&c.jsx("span",{className:"nav-count",children:Ol.length})]},p)})}),c.jsxs("div",{className:"sidebar-note",children:[c.jsx("span",{className:"tiny-spark",children:"✦"}),c.jsxs("h3",{children:["A little curiosity.",c.jsx("br",{}),"An independent chain."]}),c.jsx("p",{children:"Collect knowledge as native NFTs on a sovereign RandomX testnet."}),c.jsxs("button",{onClick:()=>dl("guide"),children:["How it works ",c.jsx(Pe,{size:15})]})]}),c.jsxs("div",{className:"sidebar-bottom",children:[c.jsx("span",{className:`network-dot ${!Y||!T?.peers?"disconnected":""}`}),c.jsx("span",{children:h}),c.jsx("span",{className:"prototype",children:"TESTNET"})]}),c.jsxs("button",{className:"help-link",onClick:()=>dl("guide"),children:[c.jsx(D0,{size:16})," The field guide ",c.jsx(Pe,{size:14})]})]}),c.jsxs("div",{className:"main-shell",children:[c.jsxs("header",{className:"topbar",children:[c.jsxs("div",{className:"breadcrumbs",children:["Explore ",c.jsx(M0,{size:13}),c.jsx("span",{children:o})]}),c.jsxs("div",{className:"top-actions",children:[c.jsxs("span",{className:"testnet-brand",children:["RandomX ",c.jsx("b",{children:"TESTNET"})]}),c.jsx(H1,{}),c.jsxs("span",{className:"network-pill",children:[c.jsx("span",{className:`network-dot ${!Y||!T?.peers?"disconnected":""}`}),h]}),c.jsxs("button",{className:"wallet-button",onClick:q,children:[c.jsx("span",{className:"wallet-avatar",children:c.jsx(Xs,{size:14})}),E?Lt(E.address):"Open wallet",c.jsx(M0,{size:14})]})]})]}),c.jsxs("main",{children:[c.jsxs("div",{className:"testnet-status",role:"status",children:[c.jsxs("span",{children:[c.jsx("span",{className:`network-dot ${Y?"":"disconnected"}`})," RPC ",Y?"available":"unavailable"]}),c.jsx("span",{children:h}),c.jsx("span",{children:"Unbootstrapped testnet · no public mainnet"}),T&&!Y&&c.jsx("strong",{children:"Showing last known state"})]}),ul&&c.jsxs("div",{className:"error-banner",role:"alert",children:[c.jsx(D0,{size:17}),c.jsx("span",{children:ul}),c.jsx("button",{onClick:w,children:"Retry"}),c.jsx("button",{"aria-label":"Dismiss error",onClick:()=>rl(""),children:c.jsx(Ls,{size:16})})]}),o==="Discover"&&c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"hero",children:[c.jsxs("div",{className:"hero-copy",children:[c.jsxs("span",{className:"eyebrow",children:[c.jsx("span",{})," KNOWLEDGE, COLLECTED ON ITS OWN CHAIN."]}),c.jsxs("h1",{children:["Mine knowledge.",c.jsx("br",{}),"Collect the ",c.jsx("span",{children:"extraordinary."})]}),c.jsx("p",{children:"Four curated article snapshots. A chain of new discoveries. Mine native NFTs with an opt-in RandomX miner, and keep the keys to your collection."}),c.jsxs("div",{className:"hero-actions",children:[c.jsxs("button",{className:"button dark",onClick:W,children:[c.jsx(w0,{size:17})," Explore native mining ",c.jsx(Pe,{size:17})]}),c.jsxs("button",{className:"text-button",onClick:()=>dl("guide"),children:["How it works ",c.jsx(du,{size:16})]})]}),c.jsxs("div",{className:"hero-foot",children:[c.jsxs("span",{children:[c.jsx(Ki,{size:13})," Independent testnet"]}),c.jsxs("span",{children:[c.jsx(Ki,{size:13})," No browser mining"]})]})]}),c.jsxs("div",{className:"hero-visual",children:[c.jsx("div",{className:"orbit orbit-one"}),c.jsx("div",{className:"orbit orbit-two"}),c.jsx("span",{className:"orbit-spark spark-one",children:"✳"}),c.jsx("span",{className:"orbit-spark spark-two",children:"+"}),c.jsxs("div",{className:"floating-label label-top",children:[c.jsx(Wi,{size:12})," Preview cards · not owned"]}),c.jsx("div",{className:"hero-card back-card",children:c.jsx(Ji,{card:mu[2],onClick:()=>Tl(mu[2])})}),c.jsx("div",{className:"hero-card front-card",children:c.jsx(Ji,{card:mu[0],onClick:()=>Tl(mu[0])})}),c.jsxs("div",{className:"floating-label label-bottom",children:[c.jsx(Wi,{size:15})," A world worth collecting ",c.jsx(Pe,{size:13})]})]})]}),c.jsxs("section",{className:"metrics","aria-label":"Canonical chain statistics",children:[c.jsxs("div",{children:[c.jsx("span",{className:"metric-icon",children:c.jsx(ki,{size:19})}),c.jsxs("div",{children:[c.jsx("span",{children:"Native NFTs minted"}),c.jsxs("strong",{children:[T?.blocks.length.toLocaleString()??"—",c.jsx("small",{children:"canonical chain"})]})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"metric-icon",children:c.jsx($i,{size:19})}),c.jsxs("div",{children:[c.jsx("span",{children:"Block height"}),c.jsxs("strong",{children:[T?`#${T.blocks.at(-1)?.height??0}`:"—",c.jsx("small",{children:"current tip"})]})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"metric-icon",children:c.jsx(Xs,{size:19})}),c.jsxs("div",{children:[c.jsx("span",{children:"Confirmed ownership"}),c.jsxs("strong",{children:[E&&T?Ol.length:"—",c.jsx("small",{children:"in your wallet"})]})]})]}),c.jsxs("div",{children:[c.jsx("span",{className:"metric-icon",children:c.jsx(R0,{size:19})}),c.jsxs("div",{children:[c.jsx("span",{children:"Proof of work"}),c.jsxs("strong",{className:"algorithm",children:[T?.algorithm??"RandomX",c.jsx("small",{children:"native CPU mining"})]})]})]})]}),c.jsxs("section",{className:"mining-panel native-mining",ref:at,children:[c.jsxs("div",{className:"mining-description",children:[c.jsxs("div",{className:"section-eyebrow",children:[c.jsx("span",{className:"idle-dot"})," EXPLICIT OPT-IN · OUTSIDE YOUR BROWSER"]}),c.jsx("h2",{children:"Native RandomX mining"}),c.jsx("p",{children:"This page never runs mining code or launches a native program. Build the trusted native binary, download an encrypted wallet backup, then start the miner yourself in an interactive terminal."}),c.jsxs("div",{className:"mining-meta",children:[c.jsxs("span",{children:[c.jsx(R0,{size:13})," One native worker"]}),c.jsxs("span",{children:[c.jsx(Vs,{size:13})," Independent validating peers"]})]}),c.jsxs("div",{className:"native-memory",children:[c.jsx("strong",{children:"Light · default"}),c.jsx("span",{children:"256 MiB cache + scratchpad and overhead."}),c.jsx("strong",{children:"Fast · explicit --fast"}),c.jsx("span",{children:"~2 GiB dataset plus cache; budget over 2.3 GiB per process. Higher CPU, energy and memory use. RandomX is not a promise of ASIC-proof mining."})]})]}),c.jsxs("div",{className:"miner-controls",children:[c.jsx("div",{className:"miner-display",children:c.jsxs("div",{children:[c.jsx("span",{children:"NEXT CONSENSUS ARTICLE"}),c.jsx("strong",{children:T?.nextArticle.title??"Waiting for testnet RPC…"})]})}),c.jsx("p",{className:"muted",children:"Fixed four-article snapshot catalog, not a live random Wikipedia feed."}),c.jsxs("ol",{className:"native-steps",children:[c.jsxs("li",{children:["Build ",c.jsx("code",{children:"wikideck-randomx"})," using the repository’s native build instructions."]}),c.jsx("li",{children:"Save your encrypted backup and keep its password separate."}),c.jsxs("li",{children:["Replace ",c.jsx("code",{children:""})," with your local file path (quote paths with spaces), then run:"]})]}),c.jsx("pre",{className:"native-command",children:c.jsx("code",{children:A})}),c.jsxs("p",{className:"miner-footnote",children:["Node: ",window.location.origin,". Same-origin RPC, including the development proxy. Use HTTPS for remote nodes. Password entry stays local; never put it in the command. Defaults to one worker and at most one block. Ctrl+C stops the native miner; closing this page does not."]}),c.jsxs("button",{className:"button dark full",onClick:q,children:[c.jsx(y1,{size:16})," Download wallet backup"]}),c.jsxs("button",{className:"text-button",onClick:()=>dl("guide"),children:["Read the testnet field guide ",c.jsx(du,{size:14})]})]})]})]}),o!=="Block explorer"?c.jsxs("section",{className:"discover-section",children:[c.jsxs("div",{className:"section-heading",children:[c.jsxs("div",{children:[c.jsx("div",{className:"section-eyebrow",children:o==="My collection"?"YOUR PERSONAL ENCYCLOPEDIA":"AN ENCYCLOPEDIA, REIMAGINED"}),c.jsxs("h2",{children:[o==="My collection"?"Your cabinet of curiosities":"A world of possible discoveries",c.jsx("span",{className:"count-badge",children:C.length})]}),c.jsx("p",{children:o==="My collection"?"Confirmed native NFT ownership. Pending transfers stay here until mined.":T?.blocks.length?"Recent native NFTs on this node’s canonical testnet chain.":"Preview examples from the fixed catalog. These are not owned NFTs."})]}),o==="Discover"&&c.jsxs("button",{className:"text-button",onClick:()=>j("My collection"),children:["My collection ",c.jsx(du,{size:16})]})]}),c.jsxs("div",{className:"filter-bar",children:[c.jsx("div",{className:"category-tabs",children:["All cards","Nature","Space","Science","People","History","Culture"].map(p=>c.jsx("button",{className:Rl===p?"selected":"",onClick:()=>Mt(p),children:p},p))}),c.jsxs("label",{className:"search-input",children:[c.jsx(S1,{size:15}),c.jsx("input",{"aria-label":"Search cards",placeholder:"Find a discovery…",value:$,onChange:p=>Gl(p.target.value)})]})]}),G.length?c.jsx("div",{className:"card-grid",children:G.map(p=>c.jsxs("div",{className:"card-wrap",children:[c.jsx(Ji,{card:p,onClick:()=>{Tl(p),Ql("")}}),c.jsxs("div",{className:"card-list-caption",children:[c.jsx("span",{children:p.block?`Block #${p.block.height}`:"Example discovery"}),c.jsx("span",{className:"caption-dot"}),p.block&&T?Lt(vn(T,p.block.tokenId)??""):"Not owned"]}),p.block&&T?.pendingTransfers.some(nl=>nl.cardHash===p.block.tokenId)&&c.jsx("span",{className:"pending-label",children:"Transfer pending mining"})]},p.block?.tokenId??p.hash))}):c.jsxs("div",{className:"empty-state",children:[c.jsx(ki,{size:38}),c.jsx("h3",{children:$||Rl!=="All cards"?"No discoveries here. Yet.":"Your first discovery is waiting."}),c.jsx("p",{children:$||Rl!=="All cards"?"Try another search or explore a different category.":"Use the native miner or receive a mined transfer on this chain. Restore a backup to access an existing wallet."}),c.jsxs("button",{className:"button dark",onClick:W,children:[c.jsx(w0,{size:16})," Explore native mining"]})]})]}):c.jsxs("section",{className:"explorer-section",children:[c.jsx("div",{className:"section-eyebrow",children:"FOLLOW THE CANONICAL CHAIN"}),c.jsxs("div",{className:"section-heading",children:[c.jsxs("div",{children:[c.jsxs("h1",{children:["Block explorer",c.jsx("span",{className:"count-badge",children:T?.blocks.length??0})]}),c.jsx("p",{children:"Native NFT mints, RandomX proofs, and mined ownership transfers."})]}),c.jsxs("a",{className:"button outline",href:"/api/chain",target:"_blank",rel:"noreferrer",children:["View full chain JSON ",c.jsx(hu,{size:15})]})]}),c.jsxs("div",{className:"explorer-note",children:[c.jsx(Vs,{size:18}),c.jsx("p",{children:"Sovereign testnet with independently validating peers and cumulative-work chain selection. This network is unbootstrapped, not a public mainnet. Zero peers means an isolated node, not a connected network. Canonical ownership can change during a reorganization."})]}),c.jsxs("dl",{className:"chain-summary",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Cumulative work"}),c.jsx("dd",{children:T?.cumulativeWork??"—"})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Peer count"}),c.jsxs("dd",{children:[Y?T?.peers??"—":"Unknown"," · ",h]})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Chain ID · pinned genesis"}),c.jsx("dd",{children:T?.chainId??"—"})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Network"}),c.jsx("dd",{children:Pi})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Tip block ID"}),c.jsx("dd",{children:T?.tip??"—"})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Mint maturity"}),c.jsxs("dd",{children:[T?.maturity??K0.coinbaseMaturity," subsequent blocks at inclusion height"]})]})]}),T?.blocks.length?c.jsx("div",{className:"table-scroll",children:c.jsxs("table",{children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"Block / confirmations"}),c.jsx("th",{children:"Discovery"}),c.jsx("th",{children:"Block ID / NFT token ID"}),c.jsx("th",{children:"Confirmed owner"}),c.jsx("th",{children:"RandomX proof / rarity"})]})}),c.jsx("tbody",{children:[...T.blocks].reverse().map(p=>c.jsxs("tr",{children:[c.jsxs("td",{children:[c.jsxs("button",{className:"explorer-card-link",onClick:()=>Tl(Qs(p)),children:["#",p.height.toString().padStart(4,"0")]}),c.jsxs("small",{children:[T.blocks.length-p.height+1," confirmations"]})]}),c.jsxs("td",{children:[c.jsx("strong",{children:p.article.title}),c.jsxs("small",{children:["Wikipedia #",p.article.pageId]})]}),c.jsxs("td",{className:"mono",children:[c.jsxs("span",{title:p.hash,children:["Block ",Lt(p.hash)]}),c.jsxs("a",{className:"nft-link",href:`/api/nfts/${encodeURIComponent(p.tokenId)}`,target:"_blank",rel:"noreferrer",title:p.tokenId,children:["NFT ",Lt(p.tokenId)," ",c.jsx(hu,{size:11})]})]}),c.jsx("td",{className:"mono",title:vn(T,p.tokenId),children:Lt(vn(T,p.tokenId)??"")}),c.jsxs("td",{children:[c.jsx("span",{className:"proof-caption mono",title:p.powHash,children:Lt(p.powHash)}),c.jsx("span",{className:`rarity-tag ${Ii(p.powHash).toLowerCase()}`,children:Ii(p.powHash)})]})]},p.hash))})]})}):c.jsxs("div",{className:"empty-state",children:[c.jsx($i,{size:40}),c.jsx("h3",{children:"A new chain. A blank page."}),c.jsx("p",{children:"No canonical NFT blocks loaded. Native mining is an explicit, separate step."}),c.jsxs("button",{className:"button dark",onClick:W,children:["Explore native mining ",c.jsx(du,{size:16})]})]}),c.jsx("h2",{className:"transfer-title",children:"Mined ownership transfers"}),T?.transfers.length?c.jsx("div",{className:"journal",children:T.transfers.map((p,nl)=>c.jsxs("div",{children:[c.jsx(m1,{size:18}),c.jsx("a",{href:`/api/nfts/${encodeURIComponent(p.cardHash)}`,target:"_blank",rel:"noreferrer",title:p.cardHash,children:Lt(p.cardHash)}),c.jsxs("span",{children:[Lt(p.from)," → ",Lt(p.to)]}),c.jsxs("span",{children:["Sequence ",p.sequence," · mined #",T.blocks.find(it=>it.transactions.some(Vt=>Vt.signature===p.signature))?.height??"—"]}),c.jsx(Ki,{size:14,"aria-label":`Mined transfer ${nl+1}`})]},`${p.cardHash}-${p.sequence}`))}):c.jsx("p",{className:"muted",children:"No mined transfers. Ownership changes only when a transfer is included in a canonical block."}),c.jsxs("h2",{className:"transfer-title",children:["Pending transfers ",c.jsx("span",{className:"count-badge",children:T?.pendingTransfers.length??0})]}),c.jsx("p",{className:"muted",children:"Mempool only · not confirmed ownership. Pending transactions may be dropped or invalidated by a reorganization."}),c.jsx("div",{className:"journal",children:T?.pendingTransfers.map(p=>c.jsxs("div",{children:[c.jsx(U0,{size:16}),c.jsx("span",{title:p.cardHash,children:Lt(p.cardHash)}),c.jsxs("span",{children:[Lt(p.from)," → ",Lt(p.to)]}),c.jsx("span",{className:"pending-label",children:"Awaiting mining"})]},`${p.cardHash}-${p.sequence}`))})]}),c.jsxs("footer",{children:[c.jsxs("a",{href:"https://en.wikipedia.org",target:"_blank",rel:"noreferrer",children:[c.jsx(Z0,{size:16})," Built on the shoulders of Wikipedia."]}),c.jsxs("span",{children:["Knowledge, not financial promises.",c.jsx("span",{className:"footer-star",children:"✦"})]}),c.jsx("p",{children:"Independent experiment, not affiliated with Wikimedia. Fixed snapshot catalog; attribution and image licenses on each card. Native NFTs are not ERC-721 tokens, fiat, or rights to article content. No promised monetary value."})]})]})]}),D&&c.jsxs("div",{className:"toast",role:"status",children:[c.jsx("span",{children:c.jsx(Ki,{size:16})}),D,c.jsx("button",{onClick:()=>x(""),"aria-label":"Dismiss notification",children:c.jsx(Ls,{size:14})})]}),(R||Q)&&c.jsx("div",{className:"modal-backdrop",onClick:p=>{p.target===p.currentTarget&&H()},children:c.jsxs("section",{className:`modal ${R==="wallet"?"wallet-modal":Q&&!R?"card-modal":""}`,role:"dialog","aria-modal":"true","aria-label":R==="wallet"?"Local testnet wallet":R==="transfer"?"Transfer native NFT":R==="guide"?"How Wikideck works":"Card details",children:[c.jsx("button",{className:"modal-close","aria-label":"Close dialog",onClick:H,disabled:jl,children:c.jsx(Ls,{size:20})}),R==="guide"?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"modal-icon",children:c.jsx(Wi,{size:24})}),c.jsx("div",{className:"section-eyebrow",children:"THE TESTNET FIELD GUIDE"}),c.jsx("h2",{children:"A universe in every card."}),c.jsxs("div",{className:"guide-steps",children:[c.jsxs("div",{children:[c.jsx("span",{children:"01"}),c.jsxs("div",{children:[c.jsx("h3",{children:"Mine natively. Only by choice."}),c.jsx("p",{children:"No browser mining or automatic native execution. Build the trusted RandomX binary and run the miner yourself with an encrypted wallet backup and explicit --consent. One worker defaults to light mode (256 MiB cache plus overhead); --fast adds a ~2 GiB dataset. Mining uses CPU and energy, may warm your device, and is not guaranteed ASIC-proof. Ctrl+C stops it."})]})]}),c.jsxs("div",{children:[c.jsx("span",{children:"02"}),c.jsxs("div",{children:[c.jsx("h3",{children:"A small catalog. A sovereign chain."}),c.jsx("p",{children:"Consensus uses four fixed article snapshots, not live random articles. The genesis and chain ID pin this catalog; expanding it currently requires a genesis reset and a new chain. Independent peers validate RandomX blocks, native NFT mints, and signed transactions, choosing the cumulative-work canonical chain. This testnet is unbootstrapped: there is no public mainnet, and an isolated node has no peer-backed network security."})]})]}),c.jsxs("div",{children:[c.jsx("span",{children:"03"}),c.jsxs("div",{children:[c.jsx("h3",{children:"Keep your keys. Confirm your transfers."}),c.jsx("p",{children:"Your P-256 wallet is a local signing identity, not a server login. The new testnet wallet is separate from the original demo wallet. Download a password-encrypted backup and restore it locally to control the same NFTs. A submitted transfer is pending, not final ownership. Mints require two subsequent blocks at inclusion height; reorganizations can change confirmations and ownership."})]})]})]}),c.jsxs("div",{className:"info-box",children:[c.jsx("strong",{children:"Native NFTs, not content ownership."}),c.jsx("p",{children:"Token IDs identify native assets on this chain, not ERC-721 tokens on another network. RandomX proof hashes determine game rarity and stats; block IDs identify blocks. An NFT does not grant copyright or other intellectual-property rights to Wikipedia text or images. Follow their licenses and attribution. No fiat, financial return, or monetary value is promised."})]}),c.jsxs("button",{className:"button dark full",onClick:()=>{H(),W()},children:["Explore native mining ",c.jsx(du,{size:16})]})]}):R==="wallet"?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"modal-icon",children:c.jsx(Xs,{size:24})}),c.jsx("div",{className:"section-eyebrow",children:"YOUR LOCAL TESTNET IDENTITY"}),c.jsx("h2",{children:"A wallet for your wonders."}),c.jsx("p",{className:"muted",children:"No server login. This recoverable wallet controls native NFTs through local signatures. It is separate from the original demo wallet."}),c.jsx("label",{className:"field-label",children:"YOUR RECEIVE ADDRESS"}),c.jsx("div",{className:"address-box",children:E?.address??"Wallet unavailable. Enable local browser storage and retry."}),c.jsxs("button",{className:"button dark full",onClick:cl,disabled:!E,children:[c.jsx(v1,{size:16})," Copy wallet address"]}),c.jsx("div",{className:"wallet-recovery",children:c.jsx(R1,{wallet:E,onRestore:ol,onNotice:x})}),c.jsxs("p",{className:"wallet-count",children:[c.jsx(ki,{size:17})," ",Ol.length," confirmed native NFTs in your collection"]})]}):R==="transfer"?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"modal-icon",children:c.jsx(Pe,{size:24})}),c.jsx("div",{className:"section-eyebrow",children:"PASS ON THE CURIOSITY"}),c.jsxs("h2",{children:["Send ",Q?.article.title,"."]}),c.jsx("p",{className:"muted",children:"Use the recipient’s 64-character testnet wallet address on this same chain. Signing submits a pending transaction; it does not immediately transfer ownership."}),c.jsx("label",{className:"field-label",children:"NFT TOKEN ID"}),c.jsx("div",{className:"address-box",children:Q?.block?.tokenId}),c.jsx("label",{className:"field-label",htmlFor:"recipient",children:"RECIPIENT ADDRESS"}),c.jsx("input",{className:"recipient-input",id:"recipient",value:gl,disabled:jl,onChange:p=>Xl(p.target.value),placeholder:"Paste a 64-character wallet address",autoComplete:"off",maxLength:64}),c.jsxs("div",{className:"info-box",children:[c.jsx("strong",{children:"Review before signing."}),c.jsx("p",{children:"Transfers take effect only when mined into the canonical chain. Once confirmed, there is no undo button or recovery for a wrong address. Mints require two subsequent blocks at inclusion height; only one pending transfer per NFT is allowed."})]}),(!Y||dt)&&c.jsx("p",{className:"transfer-error",role:"alert",children:Y?dt:"RPC unavailable. Reconnect before signing."}),il&&c.jsx("p",{className:"transfer-error",role:"alert",children:il}),c.jsxs("button",{className:"button dark full",disabled:jl||!Y||!!dt||!/^[a-fA-F0-9]{64}$/.test(gl.trim())||gl.trim().toLowerCase()===E?.address,onClick:fe,children:[jl?c.jsx(U0,{className:"spin",size:16}):c.jsx(Pe,{size:16}),jl?"Signing & submitting…":"Sign & submit pending transfer"]})]}):Q&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"detail-card",children:c.jsx(Ji,{card:Q})}),c.jsxs("div",{className:"detail-copy",children:[c.jsx("div",{className:"section-eyebrow",children:Q.block?`MINTED IN BLOCK #${Q.block.height}`:"EXAMPLE CARD · NOT OWNED"}),c.jsx("h2",{children:Q.article.title}),c.jsx("p",{children:Q.article.extract}),c.jsxs("div",{className:"detail-facts",children:[c.jsxs("span",{children:["Page ID",c.jsxs("strong",{children:["#",Q.article.pageId]})]}),c.jsxs("span",{children:["Rarity",c.jsx("strong",{children:Ii(Q.hash)})]}),c.jsxs("span",{children:["Content",c.jsx("strong",{children:Q.article.source==="live"?`Pinned revision ${Q.article.revisionId}`:"Fixed starter snapshot"})]})]}),Q.block&&c.jsxs(c.Fragment,{children:[c.jsx("label",{className:"field-label",children:"NATIVE NFT TOKEN ID"}),c.jsx("div",{className:"address-box",children:Q.block.tokenId}),c.jsx("label",{className:"field-label",children:"BLOCK ID"}),c.jsx("div",{className:"address-box",children:Q.block.hash}),c.jsx("label",{className:"field-label",children:"RANDOMX PROOF HASH · GAME STATS"}),c.jsx("div",{className:"address-box",children:Q.hash}),c.jsxs("p",{className:"muted",children:[hl," canonical confirmations",Y?"":" · last known state",". ",al?`Confirmed owner: ${ot}`:"This mint is not on the loaded canonical chain."]}),Qt&&c.jsx("p",{className:"pending-label",children:"Transfer pending mining · confirmed owner unchanged."})]}),c.jsxs("div",{className:"detail-links",children:[c.jsxs("a",{href:Q.article.url,target:"_blank",rel:"noreferrer",children:["Read on Wikipedia ",c.jsx(hu,{size:14})]}),c.jsxs("a",{href:D1(Q.article),target:"_blank",rel:"noreferrer",children:["Image & license ",c.jsx(hu,{size:14})]}),Q.block&&c.jsxs("a",{href:`/api/nfts/${encodeURIComponent(Q.block.tokenId)}`,target:"_blank",rel:"noreferrer",children:["NFT metadata ",c.jsx(hu,{size:14})]})]}),c.jsxs("p",{className:"attribution",children:[Q.article.source==="live"?"Pinned text by Wikipedia contributors, CC BY-SA 4.0. Excerpt shortened for card display.":"Original fixed starter summary, linked to the real Wikipedia article; no live revision captured."," Stats are game values, not encyclopedia facts. NFT ownership grants no rights to article text or images."]}),Q.block&&ot===E?.address&&c.jsxs(c.Fragment,{children:[dt&&c.jsx("p",{className:"muted",children:dt}),c.jsxs("button",{className:"button dark full",disabled:!Y||!!dt,onClick:()=>{Xl(""),Ql(""),dl("transfer")},children:["Transfer native NFT ",c.jsx(Pe,{size:16})]})]})]})]})]})})]})}r1.createRoot(document.getElementById("root")).render(c.jsx(e1.StrictMode,{children:c.jsx(q1,{})}));