@doppelgangerdev/doppelganger 0.5.3 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ (function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const p of f)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function d(f){const p={};return f.integrity&&(p.integrity=f.integrity),f.referrerPolicy&&(p.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?p.credentials="include":f.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function u(f){if(f.ep)return;f.ep=!0;const p=d(f);fetch(f.href,p)}})();function rp(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var fu={exports:{}},Si={};var zh;function ex(){if(zh)return Si;zh=1;var s=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function d(u,f,p){var m=null;if(p!==void 0&&(m=""+p),f.key!==void 0&&(m=""+f.key),"key"in f){p={};for(var w in f)w!=="key"&&(p[w]=f[w])}else p=f;return f=p.ref,{$$typeof:s,type:u,key:m,ref:f!==void 0?f:null,props:p}}return Si.Fragment=c,Si.jsx=d,Si.jsxs=d,Si}var Oh;function tx(){return Oh||(Oh=1,fu.exports=ex()),fu.exports}var r=tx(),hu={exports:{}},Se={};var Dh;function ax(){if(Dh)return Se;Dh=1;var s=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),m=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),_=Symbol.iterator;function B(v){return v===null||typeof v!="object"?null:(v=_&&v[_]||v["@@iterator"],typeof v=="function"?v:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,U={};function D(v,q,W){this.props=v,this.context=q,this.refs=U,this.updater=W||O}D.prototype.isReactComponent={},D.prototype.setState=function(v,q){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,q,"setState")},D.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function X(){}X.prototype=D.prototype;function $(v,q,W){this.props=v,this.context=q,this.refs=U,this.updater=W||O}var se=$.prototype=new X;se.constructor=$,C(se,D.prototype),se.isPureReactComponent=!0;var P=Array.isArray;function ee(){}var I={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function re(v,q,W){var Z=W.ref;return{$$typeof:s,type:v,key:q,ref:Z!==void 0?Z:null,props:W}}function le(v,q){return re(v.type,q,v.props)}function Be(v){return typeof v=="object"&&v!==null&&v.$$typeof===s}function ve(v){var q={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(W){return q[W]})}var et=/\/+/g;function Ee(v,q){return typeof v=="object"&&v!==null&&v.key!=null?ve(""+v.key):q.toString(36)}function Ge(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(ee,ee):(v.status="pending",v.then(function(q){v.status==="pending"&&(v.status="fulfilled",v.value=q)},function(q){v.status==="pending"&&(v.status="rejected",v.reason=q)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function z(v,q,W,Z,ne){var pe=typeof v;(pe==="undefined"||pe==="boolean")&&(v=null);var be=!1;if(v===null)be=!0;else switch(pe){case"bigint":case"string":case"number":be=!0;break;case"object":switch(v.$$typeof){case s:case c:be=!0;break;case E:return be=v._init,z(be(v._payload),q,W,Z,ne)}}if(be)return ne=ne(v),be=Z===""?"."+Ee(v,0):Z,P(ne)?(W="",be!=null&&(W=be.replace(et,"$&/")+"/"),z(ne,q,W,"",function(yt){return yt})):ne!=null&&(Be(ne)&&(ne=le(ne,W+(ne.key==null||v&&v.key===ne.key?"":(""+ne.key).replace(et,"$&/")+"/")+be)),q.push(ne)),1;be=0;var Ze=Z===""?".":Z+":";if(P(v))for(var ke=0;ke<v.length;ke++)Z=v[ke],pe=Ze+Ee(Z,ke),be+=z(Z,q,W,pe,ne);else if(ke=B(v),typeof ke=="function")for(v=ke.call(v),ke=0;!(Z=v.next()).done;)Z=Z.value,pe=Ze+Ee(Z,ke++),be+=z(Z,q,W,pe,ne);else if(pe==="object"){if(typeof v.then=="function")return z(Ge(v),q,W,Z,ne);throw q=String(v),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return be}function L(v,q,W){if(v==null)return v;var Z=[],ne=0;return z(v,Z,"","",function(pe){return q.call(W,pe,ne++)}),Z}function F(v){if(v._status===-1){var q=v._result;q=q(),q.then(function(W){(v._status===0||v._status===-1)&&(v._status=1,v._result=W)},function(W){(v._status===0||v._status===-1)&&(v._status=2,v._result=W)}),v._status===-1&&(v._status=0,v._result=q)}if(v._status===1)return v._result.default;throw v._result}var ge=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},he={map:L,forEach:function(v,q,W){L(v,function(){q.apply(this,arguments)},W)},count:function(v){var q=0;return L(v,function(){q++}),q},toArray:function(v){return L(v,function(q){return q})||[]},only:function(v){if(!Be(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return Se.Activity=S,Se.Children=he,Se.Component=D,Se.Fragment=d,Se.Profiler=f,Se.PureComponent=$,Se.StrictMode=u,Se.Suspense=b,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Se.__COMPILER_RUNTIME={__proto__:null,c:function(v){return I.H.useMemoCache(v)}},Se.cache=function(v){return function(){return v.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(v,q,W){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var Z=C({},v.props),ne=v.key;if(q!=null)for(pe in q.key!==void 0&&(ne=""+q.key),q)!fe.call(q,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&q.ref===void 0||(Z[pe]=q[pe]);var pe=arguments.length-2;if(pe===1)Z.children=W;else if(1<pe){for(var be=Array(pe),Ze=0;Ze<pe;Ze++)be[Ze]=arguments[Ze+2];Z.children=be}return re(v.type,ne,Z)},Se.createContext=function(v){return v={$$typeof:m,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:p,_context:v},v},Se.createElement=function(v,q,W){var Z,ne={},pe=null;if(q!=null)for(Z in q.key!==void 0&&(pe=""+q.key),q)fe.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ne[Z]=q[Z]);var be=arguments.length-2;if(be===1)ne.children=W;else if(1<be){for(var Ze=Array(be),ke=0;ke<be;ke++)Ze[ke]=arguments[ke+2];ne.children=Ze}if(v&&v.defaultProps)for(Z in be=v.defaultProps,be)ne[Z]===void 0&&(ne[Z]=be[Z]);return re(v,pe,ne)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(v){return{$$typeof:w,render:v}},Se.isValidElement=Be,Se.lazy=function(v){return{$$typeof:E,_payload:{_status:-1,_result:v},_init:F}},Se.memo=function(v,q){return{$$typeof:g,type:v,compare:q===void 0?null:q}},Se.startTransition=function(v){var q=I.T,W={};I.T=W;try{var Z=v(),ne=I.S;ne!==null&&ne(W,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(ee,ge)}catch(pe){ge(pe)}finally{q!==null&&W.types!==null&&(q.types=W.types),I.T=q}},Se.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Se.use=function(v){return I.H.use(v)},Se.useActionState=function(v,q,W){return I.H.useActionState(v,q,W)},Se.useCallback=function(v,q){return I.H.useCallback(v,q)},Se.useContext=function(v){return I.H.useContext(v)},Se.useDebugValue=function(){},Se.useDeferredValue=function(v,q){return I.H.useDeferredValue(v,q)},Se.useEffect=function(v,q){return I.H.useEffect(v,q)},Se.useEffectEvent=function(v){return I.H.useEffectEvent(v)},Se.useId=function(){return I.H.useId()},Se.useImperativeHandle=function(v,q,W){return I.H.useImperativeHandle(v,q,W)},Se.useInsertionEffect=function(v,q){return I.H.useInsertionEffect(v,q)},Se.useLayoutEffect=function(v,q){return I.H.useLayoutEffect(v,q)},Se.useMemo=function(v,q){return I.H.useMemo(v,q)},Se.useOptimistic=function(v,q){return I.H.useOptimistic(v,q)},Se.useReducer=function(v,q,W){return I.H.useReducer(v,q,W)},Se.useRef=function(v){return I.H.useRef(v)},Se.useState=function(v){return I.H.useState(v)},Se.useSyncExternalStore=function(v,q,W){return I.H.useSyncExternalStore(v,q,W)},Se.useTransition=function(){return I.H.useTransition()},Se.version="19.2.3",Se}var kh;function zu(){return kh||(kh=1,hu.exports=ax()),hu.exports}var x=zu();const lx=rp(x);var pu={exports:{}},ji={},mu={exports:{}},xu={};var Uh;function nx(){return Uh||(Uh=1,(function(s){function c(z,L){var F=z.length;z.push(L);e:for(;0<F;){var ge=F-1>>>1,he=z[ge];if(0<f(he,L))z[ge]=L,z[F]=he,F=ge;else break e}}function d(z){return z.length===0?null:z[0]}function u(z){if(z.length===0)return null;var L=z[0],F=z.pop();if(F!==L){z[0]=F;e:for(var ge=0,he=z.length,v=he>>>1;ge<v;){var q=2*(ge+1)-1,W=z[q],Z=q+1,ne=z[Z];if(0>f(W,F))Z<he&&0>f(ne,W)?(z[ge]=ne,z[Z]=F,ge=Z):(z[ge]=W,z[q]=F,ge=q);else if(Z<he&&0>f(ne,F))z[ge]=ne,z[Z]=F,ge=Z;else break e}}return L}function f(z,L){var F=z.sortIndex-L.sortIndex;return F!==0?F:z.id-L.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;s.unstable_now=function(){return p.now()}}else{var m=Date,w=m.now();s.unstable_now=function(){return m.now()-w}}var b=[],g=[],E=1,S=null,_=3,B=!1,O=!1,C=!1,U=!1,D=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function se(z){for(var L=d(g);L!==null;){if(L.callback===null)u(g);else if(L.startTime<=z)u(g),L.sortIndex=L.expirationTime,c(b,L);else break;L=d(g)}}function P(z){if(C=!1,se(z),!O)if(d(b)!==null)O=!0,ee||(ee=!0,ve());else{var L=d(g);L!==null&&Ge(P,L.startTime-z)}}var ee=!1,I=-1,fe=5,re=-1;function le(){return U?!0:!(s.unstable_now()-re<fe)}function Be(){if(U=!1,ee){var z=s.unstable_now();re=z;var L=!0;try{e:{O=!1,C&&(C=!1,X(I),I=-1),B=!0;var F=_;try{t:{for(se(z),S=d(b);S!==null&&!(S.expirationTime>z&&le());){var ge=S.callback;if(typeof ge=="function"){S.callback=null,_=S.priorityLevel;var he=ge(S.expirationTime<=z);if(z=s.unstable_now(),typeof he=="function"){S.callback=he,se(z),L=!0;break t}S===d(b)&&u(b),se(z)}else u(b);S=d(b)}if(S!==null)L=!0;else{var v=d(g);v!==null&&Ge(P,v.startTime-z),L=!1}}break e}finally{S=null,_=F,B=!1}L=void 0}}finally{L?ve():ee=!1}}}var ve;if(typeof $=="function")ve=function(){$(Be)};else if(typeof MessageChannel<"u"){var et=new MessageChannel,Ee=et.port2;et.port1.onmessage=Be,ve=function(){Ee.postMessage(null)}}else ve=function(){D(Be,0)};function Ge(z,L){I=D(function(){z(s.unstable_now())},L)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(z){z.callback=null},s.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<z?Math.floor(1e3/z):5},s.unstable_getCurrentPriorityLevel=function(){return _},s.unstable_next=function(z){switch(_){case 1:case 2:case 3:var L=3;break;default:L=_}var F=_;_=L;try{return z()}finally{_=F}},s.unstable_requestPaint=function(){U=!0},s.unstable_runWithPriority=function(z,L){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var F=_;_=z;try{return L()}finally{_=F}},s.unstable_scheduleCallback=function(z,L,F){var ge=s.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ge+F:ge):F=ge,z){case 1:var he=-1;break;case 2:he=250;break;case 5:he=1073741823;break;case 4:he=1e4;break;default:he=5e3}return he=F+he,z={id:E++,callback:L,priorityLevel:z,startTime:F,expirationTime:he,sortIndex:-1},F>ge?(z.sortIndex=F,c(g,z),d(b)===null&&z===d(g)&&(C?(X(I),I=-1):C=!0,Ge(P,F-ge))):(z.sortIndex=he,c(b,z),O||B||(O=!0,ee||(ee=!0,ve()))),z},s.unstable_shouldYield=le,s.unstable_wrapCallback=function(z){var L=_;return function(){var F=_;_=L;try{return z.apply(this,arguments)}finally{_=F}}}})(xu)),xu}var Lh;function ix(){return Lh||(Lh=1,mu.exports=nx()),mu.exports}var gu={exports:{}},zt={};var Hh;function sx(){if(Hh)return zt;Hh=1;var s=zu();function c(b){var g="https://react.dev/errors/"+b;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)g+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+b+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var u={d:{f:d,r:function(){throw Error(c(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},f=Symbol.for("react.portal");function p(b,g,E){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:b,containerInfo:g,implementation:E}}var m=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function w(b,g){if(b==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,zt.createPortal=function(b,g){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(c(299));return p(b,g,null,E)},zt.flushSync=function(b){var g=m.T,E=u.p;try{if(m.T=null,u.p=2,b)return b()}finally{m.T=g,u.p=E,u.d.f()}},zt.preconnect=function(b,g){typeof b=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(b,g))},zt.prefetchDNS=function(b){typeof b=="string"&&u.d.D(b)},zt.preinit=function(b,g){if(typeof b=="string"&&g&&typeof g.as=="string"){var E=g.as,S=w(E,g.crossOrigin),_=typeof g.integrity=="string"?g.integrity:void 0,B=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;E==="style"?u.d.S(b,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:_,fetchPriority:B}):E==="script"&&u.d.X(b,{crossOrigin:S,integrity:_,fetchPriority:B,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},zt.preinitModule=function(b,g){if(typeof b=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var E=w(g.as,g.crossOrigin);u.d.M(b,{crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(b)},zt.preload=function(b,g){if(typeof b=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var E=g.as,S=w(E,g.crossOrigin);u.d.L(b,E,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},zt.preloadModule=function(b,g){if(typeof b=="string")if(g){var E=w(g.as,g.crossOrigin);u.d.m(b,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(b)},zt.requestFormReset=function(b){u.d.r(b)},zt.unstable_batchedUpdates=function(b,g){return b(g)},zt.useFormState=function(b,g,E){return m.H.useFormState(b,g,E)},zt.useFormStatus=function(){return m.H.useHostTransitionStatus()},zt.version="19.2.3",zt}var Bh;function rx(){if(Bh)return gu.exports;Bh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(c){console.error(c)}}return s(),gu.exports=sx(),gu.exports}var qh;function cx(){if(qh)return ji;qh=1;var s=ix(),c=zu(),d=rx();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function w(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(p(e)!==e)throw Error(u(188))}function g(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var n=a.return;if(n===null)break;var i=n.alternate;if(i===null){if(l=n.return,l!==null){a=l;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===a)return b(n),e;if(i===l)return b(n),t;i=i.sibling}throw Error(u(188))}if(a.return!==l.return)a=n,l=i;else{for(var o=!1,h=n.child;h;){if(h===a){o=!0,a=n,l=i;break}if(h===l){o=!0,l=n,a=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===a){o=!0,a=i,l=n;break}if(h===l){o=!0,l=i,a=n;break}h=h.sibling}if(!o)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,_=Symbol.for("react.element"),B=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),$=Symbol.for("react.context"),se=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),Be=Symbol.iterator;function ve(e){return e===null||typeof e!="object"?null:(e=Be&&e[Be]||e["@@iterator"],typeof e=="function"?e:null)}var et=Symbol.for("react.client.reference");function Ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===et?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case D:return"Profiler";case U:return"StrictMode";case P:return"Suspense";case ee:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case $:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case se:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:Ee(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return Ee(e(t))}catch{}}return null}var Ge=Array.isArray,z=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},ge=[],he=-1;function v(e){return{current:e}}function q(e){0>he||(e.current=ge[he],ge[he]=null,he--)}function W(e,t){he++,ge[he]=e.current,e.current=t}var Z=v(null),ne=v(null),pe=v(null),be=v(null);function Ze(e,t){switch(W(pe,t),W(ne,e),W(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?th(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=th(t),e=ah(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(Z),W(Z,e)}function ke(){q(Z),q(ne),q(pe)}function yt(e){e.memoizedState!==null&&W(be,e);var t=Z.current,a=ah(t,e.type);t!==a&&(W(ne,e),W(Z,a))}function oa(e){ne.current===e&&(q(Z),q(ne)),be.current===e&&(q(be),yi._currentValue=F)}var ya,va;function Ot(e){if(ya===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ya=t&&t[1]||"",va=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ya+e+va}var Wt=!1;function ba(e,t){if(!e||Wt)return"";Wt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(H){var k=H}Reflect.construct(e,[],Q)}else{try{Q.call()}catch(H){k=H}e.call(Q.prototype)}}else{try{throw Error()}catch(H){k=H}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(H){if(H&&k&&typeof H.stack=="string")return[H.stack,k.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var y=o.split(`
4
+ `),M=h.split(`
5
+ `);for(n=l=0;l<y.length&&!y[l].includes("DetermineComponentFrameRoot");)l++;for(;n<M.length&&!M[n].includes("DetermineComponentFrameRoot");)n++;if(l===y.length||n===M.length)for(l=y.length-1,n=M.length-1;1<=l&&0<=n&&y[l]!==M[n];)n--;for(;1<=l&&0<=n;l--,n--)if(y[l]!==M[n]){if(l!==1||n!==1)do if(l--,n--,0>n||y[l]!==M[n]){var V=`
6
+ `+y[l].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=l&&0<=n);break}}}finally{Wt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ot(a):""}function wa(e,t){switch(e.tag){case 26:case 27:case 5:return Ot(e.type);case 16:return Ot("Lazy");case 13:return e.child!==t&&t!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return ba(e.type,!1);case 11:return ba(e.type.render,!1);case 1:return ba(e.type,!0);case 31:return Ot("Activity");default:return""}}function ie(e){try{var t="",a=null;do t+=wa(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var me=Object.prototype.hasOwnProperty,ue=s.unstable_scheduleCallback,we=s.unstable_cancelCallback,Nt=s.unstable_shouldYield,Ft=s.unstable_requestPaint,wt=s.unstable_now,ql=s.unstable_getCurrentPriorityLevel,Ut=s.unstable_ImmediatePriority,Vl=s.unstable_UserBlockingPriority,Ra=s.unstable_NormalPriority,Yl=s.unstable_LowPriority,da=s.unstable_IdlePriority,Y=s.log,te=s.unstable_setDisableYieldValue,ae=null,oe=null;function Ue(e){if(typeof Y=="function"&&te(e),oe&&typeof oe.setStrictMode=="function")try{oe.setStrictMode(ae,e)}catch{}}var Re=Math.clz32?Math.clz32:Rt,nt=Math.log,it=Math.LN2;function Rt(e){return e>>>=0,e===0?32:31-(nt(e)/it|0)|0}var fa=256,Sa=262144,Mt=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function It(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~i,l!==0?n=tt(l):(o&=h,o!==0?n=tt(o):a||(a=h&~e,a!==0&&(n=tt(a))))):(h=l&~i,h!==0?n=tt(h):o!==0?n=tt(o):a||(a=l&~e,a!==0&&(n=tt(a)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:n}function A(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function j(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function J(){var e=Mt;return Mt<<=1,(Mt&62914560)===0&&(Mt=4194304),e}function Ce(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Le(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function st(e,t,a,l,n,i){var o=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var h=e.entanglements,y=e.expirationTimes,M=e.hiddenUpdates;for(a=o&~a;0<a;){var V=31-Re(a),Q=1<<V;h[V]=0,y[V]=-1;var k=M[V];if(k!==null)for(M[V]=null,V=0;V<k.length;V++){var H=k[V];H!==null&&(H.lane&=-536870913)}a&=~Q}l!==0&&Et(e,l,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Et(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Re(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function ja(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Re(a),n=1<<l;n&t|e[l]&t&&(e[l]|=t),a&=~n}}function wl(e,t){var a=t&-t;return a=(a&42)!==0?1:Sl(a),(a&(e.suspendedLanes|t))!==0?0:a}function Sl(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function K(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function He(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:Eh(e.type))}function ft(e,t){var a=L.p;try{return L.p=e,t()}finally{L.p=a}}var rt=Math.random().toString(36).slice(2),Fe="__reactFiber$"+rt,ht="__reactProps$"+rt,Me="__reactContainer$"+rt,ha="__reactEvents$"+rt,zn="__reactListeners$"+rt,Xp="__reactHandles$"+rt,qu="__reactResources$"+rt,On="__reactMarker$"+rt;function nr(e){delete e[Fe],delete e[ht],delete e[ha],delete e[zn],delete e[Xp]}function Gl(e){var t=e[Fe];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Me]||a[Fe]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=uh(e);e!==null;){if(a=e[Fe])return a;e=uh(e)}return t}e=a,a=e.parentNode}return null}function Xl(e){if(e=e[Fe]||e[Me]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Dn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Ql(e){var t=e[qu];return t||(t=e[qu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[On]=!0}var Vu=new Set,Yu={};function jl(e,t){Zl(e,t),Zl(e+"Capture",t)}function Zl(e,t){for(Yu[e]=t,e=0;e<t.length;e++)Vu.add(t[e])}var Qp=RegExp("^[: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]*$"),Gu={},Xu={};function Zp(e){return me.call(Xu,e)?!0:me.call(Gu,e)?!1:Qp.test(e)?Xu[e]=!0:(Gu[e]=!0,!1)}function zi(e,t,a){if(Zp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Oi(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Ma(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $p(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var n=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(o){a=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ir(e){if(!e._valueTracker){var t=Qu(e)?"checked":"value";e._valueTracker=$p(e,t,""+e[t])}}function Zu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Qu(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Di(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}}var Kp=/[\n"\\]/g;function ea(e){return e.replace(Kp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sr(e,t,a,l,n,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Pt(t)):e.value!==""+Pt(t)&&(e.value=""+Pt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?rr(e,o,Pt(t)):a!=null?rr(e,o,Pt(a)):l!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Pt(h):e.removeAttribute("name")}function $u(e,t,a,l,n,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){ir(e);return}a=a!=null?""+Pt(a):"",t=t!=null?""+Pt(t):a,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),ir(e)}function rr(e,t,a){t==="number"&&Di(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function $l(e,t,a,l){if(e=e.options,t){t={};for(var n=0;n<a.length;n++)t["$"+a[n]]=!0;for(a=0;a<e.length;a++)n=t.hasOwnProperty("$"+e[a].value),e[a].selected!==n&&(e[a].selected=n),n&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Pt(a),t=null,n=0;n<e.length;n++){if(e[n].value===a){e[n].selected=!0,l&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Ku(e,t,a){if(t!=null&&(t=""+Pt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Pt(a):""}function Ju(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(Ge(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Pt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),ir(e)}function Kl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Jp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Wu(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Jp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Fu(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var n in t)l=t[n],t.hasOwnProperty(n)&&a[n]!==l&&Wu(e,n,l)}else for(var i in t)t.hasOwnProperty(i)&&Wu(e,i,t[i])}function cr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Wp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Fp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ki(e){return Fp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function za(){}var ur=null;function or(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jl=null,Wl=null;function Iu(e){var t=Xl(e);if(t&&(e=t.stateNode)){var a=e[ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(sr(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ea(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var n=l[ht]||null;if(!n)throw Error(u(90));sr(l,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Zu(l)}break e;case"textarea":Ku(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&$l(e,!!a.multiple,t,!1)}}}var dr=!1;function Pu(e,t,a){if(dr)return e(t,a);dr=!0;try{var l=e(t);return l}finally{if(dr=!1,(Jl!==null||Wl!==null)&&(Ss(),Jl&&(t=Jl,e=Wl,Wl=Jl=null,Iu(t),e)))for(t=0;t<e.length;t++)Iu(e[t])}}function kn(e,t){var a=e.stateNode;if(a===null)return null;var l=a[ht]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fr=!1;if(Oa)try{var Un={};Object.defineProperty(Un,"passive",{get:function(){fr=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{fr=!1}var Fa=null,hr=null,Ui=null;function eo(){if(Ui)return Ui;var e,t=hr,a=t.length,l,n="value"in Fa?Fa.value:Fa.textContent,i=n.length;for(e=0;e<a&&t[e]===n[e];e++);var o=a-e;for(l=1;l<=o&&t[a-l]===n[i-l];l++);return Ui=n.slice(e,1<l?1-l:void 0)}function Li(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hi(){return!0}function to(){return!1}function Lt(e){function t(a,l,n,i,o){this._reactName=a,this._targetInst=n,this.type=l,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(a=e[h],this[h]=a?a(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Hi:to,this.isPropagationStopped=to,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Hi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Hi)},persist:function(){},isPersistent:Hi}),t}var Nl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bi=Lt(Nl),Ln=S({},Nl,{view:0,detail:0}),Ip=Lt(Ln),pr,mr,Hn,qi=S({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hn&&(Hn&&e.type==="mousemove"?(pr=e.screenX-Hn.screenX,mr=e.screenY-Hn.screenY):mr=pr=0,Hn=e),pr)},movementY:function(e){return"movementY"in e?e.movementY:mr}}),ao=Lt(qi),Pp=S({},qi,{dataTransfer:0}),em=Lt(Pp),tm=S({},Ln,{relatedTarget:0}),xr=Lt(tm),am=S({},Nl,{animationName:0,elapsedTime:0,pseudoElement:0}),lm=Lt(am),nm=S({},Nl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),im=Lt(nm),sm=S({},Nl,{data:0}),lo=Lt(sm),rm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cm={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},um={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function om(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=um[e])?!!t[e]:!1}function gr(){return om}var dm=S({},Ln,{key:function(e){if(e.key){var t=rm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Li(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gr,charCode:function(e){return e.type==="keypress"?Li(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Li(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fm=Lt(dm),hm=S({},qi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),no=Lt(hm),pm=S({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gr}),mm=Lt(pm),xm=S({},Nl,{propertyName:0,elapsedTime:0,pseudoElement:0}),gm=Lt(xm),ym=S({},qi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),vm=Lt(ym),bm=S({},Nl,{newState:0,oldState:0}),wm=Lt(bm),Sm=[9,13,27,32],yr=Oa&&"CompositionEvent"in window,Bn=null;Oa&&"documentMode"in document&&(Bn=document.documentMode);var jm=Oa&&"TextEvent"in window&&!Bn,io=Oa&&(!yr||Bn&&8<Bn&&11>=Bn),so=" ",ro=!1;function co(e,t){switch(e){case"keyup":return Sm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fl=!1;function Nm(e,t){switch(e){case"compositionend":return uo(t);case"keypress":return t.which!==32?null:(ro=!0,so);case"textInput":return e=t.data,e===so&&ro?null:e;default:return null}}function Em(e,t){if(Fl)return e==="compositionend"||!yr&&co(e,t)?(e=eo(),Ui=hr=Fa=null,Fl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return io&&t.locale!=="ko"?null:t.data;default:return null}}var Cm={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Cm[e.type]:t==="textarea"}function fo(e,t,a,l){Jl?Wl?Wl.push(l):Wl=[l]:Jl=l,t=_s(t,"onChange"),0<t.length&&(a=new Bi("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var qn=null,Vn=null;function Am(e){Jf(e,0)}function Vi(e){var t=Dn(e);if(Zu(t))return e}function ho(e,t){if(e==="change")return t}var po=!1;if(Oa){var vr;if(Oa){var br="oninput"in document;if(!br){var mo=document.createElement("div");mo.setAttribute("oninput","return;"),br=typeof mo.oninput=="function"}vr=br}else vr=!1;po=vr&&(!document.documentMode||9<document.documentMode)}function xo(){qn&&(qn.detachEvent("onpropertychange",go),Vn=qn=null)}function go(e){if(e.propertyName==="value"&&Vi(Vn)){var t=[];fo(t,Vn,e,or(e)),Pu(Am,t)}}function Tm(e,t,a){e==="focusin"?(xo(),qn=t,Vn=a,qn.attachEvent("onpropertychange",go)):e==="focusout"&&xo()}function _m(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vi(Vn)}function Rm(e,t){if(e==="click")return Vi(t)}function Mm(e,t){if(e==="input"||e==="change")return Vi(t)}function zm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gt=typeof Object.is=="function"?Object.is:zm;function Yn(e,t){if(Gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var n=a[l];if(!me.call(t,n)||!Gt(e[n],t[n]))return!1}return!0}function yo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vo(e,t){var a=yo(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=yo(a)}}function bo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Di(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Di(e.document)}return t}function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Om=Oa&&"documentMode"in document&&11>=document.documentMode,Il=null,Sr=null,Gn=null,jr=!1;function So(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;jr||Il==null||Il!==Di(l)||(l=Il,"selectionStart"in l&&wr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Gn&&Yn(Gn,l)||(Gn=l,l=_s(Sr,"onSelect"),0<l.length&&(t=new Bi("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Il)))}function El(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Pl={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionrun:El("Transition","TransitionRun"),transitionstart:El("Transition","TransitionStart"),transitioncancel:El("Transition","TransitionCancel"),transitionend:El("Transition","TransitionEnd")},Nr={},jo={};Oa&&(jo=document.createElement("div").style,"AnimationEvent"in window||(delete Pl.animationend.animation,delete Pl.animationiteration.animation,delete Pl.animationstart.animation),"TransitionEvent"in window||delete Pl.transitionend.transition);function Cl(e){if(Nr[e])return Nr[e];if(!Pl[e])return e;var t=Pl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in jo)return Nr[e]=t[a];return e}var No=Cl("animationend"),Eo=Cl("animationiteration"),Co=Cl("animationstart"),Dm=Cl("transitionrun"),km=Cl("transitionstart"),Um=Cl("transitioncancel"),Ao=Cl("transitionend"),To=new Map,Er="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Er.push("scrollEnd");function pa(e,t){To.set(e,t),jl(t,[e])}var Yi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ta=[],en=0,Cr=0;function Gi(){for(var e=en,t=Cr=en=0;t<e;){var a=ta[t];ta[t++]=null;var l=ta[t];ta[t++]=null;var n=ta[t];ta[t++]=null;var i=ta[t];if(ta[t++]=null,l!==null&&n!==null){var o=l.pending;o===null?n.next=n:(n.next=o.next,o.next=n),l.pending=n}i!==0&&_o(a,n,i)}}function Xi(e,t,a,l){ta[en++]=e,ta[en++]=t,ta[en++]=a,ta[en++]=l,Cr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ar(e,t,a,l){return Xi(e,t,a,l),Qi(e)}function Al(e,t){return Xi(e,null,null,t),Qi(e)}function _o(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var n=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-Re(a),e=i.hiddenUpdates,l=e[n],l===null?e[n]=[t]:l.push(t),t.lane=a|536870912),i):null}function Qi(e){if(50<di)throw di=0,Uc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var tn={};function Lm(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,a,l){return new Lm(e,t,a,l)}function Tr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Da(e,t){var a=e.alternate;return a===null?(a=Xt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ro(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Zi(e,t,a,l,n,i){var o=0;if(l=e,typeof e=="function")Tr(e)&&(o=1);else if(typeof e=="string")o=Y0(e,a,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=Xt(31,a,t,n),e.elementType=re,e.lanes=i,e;case C:return Tl(a.children,n,i,t);case U:o=8,n|=24;break;case D:return e=Xt(12,a,t,n|2),e.elementType=D,e.lanes=i,e;case P:return e=Xt(13,a,t,n),e.elementType=P,e.lanes=i,e;case ee:return e=Xt(19,a,t,n),e.elementType=ee,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:o=10;break e;case X:o=9;break e;case se:o=11;break e;case I:o=14;break e;case fe:o=16,l=null;break e}o=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Xt(o,a,t,n),t.elementType=e,t.type=l,t.lanes=i,t}function Tl(e,t,a,l){return e=Xt(7,e,l,t),e.lanes=a,e}function _r(e,t,a){return e=Xt(6,e,null,t),e.lanes=a,e}function Mo(e){var t=Xt(18,null,null,0);return t.stateNode=e,t}function Rr(e,t,a){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zo=new WeakMap;function aa(e,t){if(typeof e=="object"&&e!==null){var a=zo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ie(t)},zo.set(e,t),t)}return{value:e,source:t,stack:ie(t)}}var an=[],ln=0,$i=null,Xn=0,la=[],na=0,Ia=null,Na=1,Ea="";function ka(e,t){an[ln++]=Xn,an[ln++]=$i,$i=e,Xn=t}function Oo(e,t,a){la[na++]=Na,la[na++]=Ea,la[na++]=Ia,Ia=e;var l=Na;e=Ea;var n=32-Re(l)-1;l&=~(1<<n),a+=1;var i=32-Re(t)+n;if(30<i){var o=n-n%5;i=(l&(1<<o)-1).toString(32),l>>=o,n-=o,Na=1<<32-Re(t)+n|a<<n|l,Ea=i+e}else Na=1<<i|a<<n|l,Ea=e}function Mr(e){e.return!==null&&(ka(e,1),Oo(e,1,0))}function zr(e){for(;e===$i;)$i=an[--ln],an[ln]=null,Xn=an[--ln],an[ln]=null;for(;e===Ia;)Ia=la[--na],la[na]=null,Ea=la[--na],la[na]=null,Na=la[--na],la[na]=null}function Do(e,t){la[na++]=Na,la[na++]=Ea,la[na++]=Ia,Na=t.id,Ea=t.overflow,Ia=e}var Ct=null,Ie=null,De=!1,Pa=null,ia=!1,Or=Error(u(519));function el(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qn(aa(t,e)),Or}function ko(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Fe]=e,t[ht]=l,a){case"dialog":_e("cancel",t),_e("close",t);break;case"iframe":case"object":case"embed":_e("load",t);break;case"video":case"audio":for(a=0;a<hi.length;a++)_e(hi[a],t);break;case"source":_e("error",t);break;case"img":case"image":case"link":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"input":_e("invalid",t),$u(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":_e("invalid",t);break;case"textarea":_e("invalid",t),Ju(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Pf(t.textContent,a)?(l.popover!=null&&(_e("beforetoggle",t),_e("toggle",t)),l.onScroll!=null&&_e("scroll",t),l.onScrollEnd!=null&&_e("scrollend",t),l.onClick!=null&&(t.onclick=za),t=!0):t=!1,t||el(e,!0)}function Uo(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:Ct=Ct.return}}function nn(e){if(e!==Ct)return!1;if(!De)return Uo(e),De=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Fc(e.type,e.memoizedProps)),a=!a),a&&Ie&&el(e),Uo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ie=ch(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ie=ch(e)}else t===27?(t=Ie,pl(e.type)?(e=au,au=null,Ie=e):Ie=t):Ie=Ct?ra(e.stateNode.nextSibling):null;return!0}function _l(){Ie=Ct=null,De=!1}function Dr(){var e=Pa;return e!==null&&(Vt===null?Vt=e:Vt.push.apply(Vt,e),Pa=null),e}function Qn(e){Pa===null?Pa=[e]:Pa.push(e)}var kr=v(null),Rl=null,Ua=null;function tl(e,t,a){W(kr,t._currentValue),t._currentValue=a}function La(e){e._currentValue=kr.current,q(kr)}function Ur(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Lr(e,t,a,l){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var o=n.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=n;for(var y=0;y<t.length;y++)if(h.context===t[y]){i.lanes|=a,h=i.alternate,h!==null&&(h.lanes|=a),Ur(i.return,a,e),l||(o=null);break e}i=h.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(u(341));o.lanes|=a,i=o.alternate,i!==null&&(i.lanes|=a),Ur(o,a,e),o=null}else o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===e){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function sn(e,t,a,l){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var o=n.alternate;if(o===null)throw Error(u(387));if(o=o.memoizedProps,o!==null){var h=n.type;Gt(n.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(n===be.current){if(o=n.alternate,o===null)throw Error(u(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(yi):e=[yi])}n=n.return}e!==null&&Lr(t,e,a,l),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!Gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ml(e){Rl=e,Ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function At(e){return Lo(Rl,e)}function Ji(e,t){return Rl===null&&Ml(e),Lo(e,t)}function Lo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ua===null){if(e===null)throw Error(u(308));Ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ua=Ua.next=t;return a}var Hm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Bm=s.unstable_scheduleCallback,qm=s.unstable_NormalPriority,pt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hr(){return{controller:new Hm,data:new Map,refCount:0}}function Zn(e){e.refCount--,e.refCount===0&&Bm(qm,function(){e.controller.abort()})}var $n=null,Br=0,rn=0,cn=null;function Vm(e,t){if($n===null){var a=$n=[];Br=0,rn=Yc(),cn={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Br++,t.then(Ho,Ho),t}function Ho(){if(--Br===0&&$n!==null){cn!==null&&(cn.status="fulfilled");var e=$n;$n=null,rn=0,cn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ym(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(n){a.push(n)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var n=0;n<a.length;n++)(0,a[n])(t)},function(n){for(l.status="rejected",l.reason=n,n=0;n<a.length;n++)(0,a[n])(void 0)}),l}var Bo=z.S;z.S=function(e,t){jf=wt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Vm(e,t),Bo!==null&&Bo(e,t)};var zl=v(null);function qr(){var e=zl.current;return e!==null?e:We.pooledCache}function Wi(e,t){t===null?W(zl,zl.current):W(zl,t.pool)}function qo(){var e=qr();return e===null?null:{parent:pt._currentValue,pool:e}}var un=Error(u(460)),Vr=Error(u(474)),Fi=Error(u(542)),Ii={then:function(){}};function Vo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(za,za),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Xo(e),e;default:if(typeof t.status=="string")t.then(za,za);else{if(e=We,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=l}},function(l){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Xo(e),e}throw Dl=t,un}}function Ol(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Dl=a,un):a}}var Dl=null;function Go(){if(Dl===null)throw Error(u(459));var e=Dl;return Dl=null,e}function Xo(e){if(e===un||e===Fi)throw Error(u(483))}var on=null,Kn=0;function Pi(e){var t=Kn;return Kn+=1,on===null&&(on=[]),Yo(on,e,t)}function Jn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function es(e,t){throw t.$$typeof===_?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qo(e){function t(T,N){if(e){var R=T.deletions;R===null?(T.deletions=[N],T.flags|=16):R.push(N)}}function a(T,N){if(!e)return null;for(;N!==null;)t(T,N),N=N.sibling;return null}function l(T){for(var N=new Map;T!==null;)T.key!==null?N.set(T.key,T):N.set(T.index,T),T=T.sibling;return N}function n(T,N){return T=Da(T,N),T.index=0,T.sibling=null,T}function i(T,N,R){return T.index=R,e?(R=T.alternate,R!==null?(R=R.index,R<N?(T.flags|=67108866,N):R):(T.flags|=67108866,N)):(T.flags|=1048576,N)}function o(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function h(T,N,R,G){return N===null||N.tag!==6?(N=_r(R,T.mode,G),N.return=T,N):(N=n(N,R),N.return=T,N)}function y(T,N,R,G){var xe=R.type;return xe===C?V(T,N,R.props.children,G,R.key):N!==null&&(N.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===fe&&Ol(xe)===N.type)?(N=n(N,R.props),Jn(N,R),N.return=T,N):(N=Zi(R.type,R.key,R.props,null,T.mode,G),Jn(N,R),N.return=T,N)}function M(T,N,R,G){return N===null||N.tag!==4||N.stateNode.containerInfo!==R.containerInfo||N.stateNode.implementation!==R.implementation?(N=Rr(R,T.mode,G),N.return=T,N):(N=n(N,R.children||[]),N.return=T,N)}function V(T,N,R,G,xe){return N===null||N.tag!==7?(N=Tl(R,T.mode,G,xe),N.return=T,N):(N=n(N,R),N.return=T,N)}function Q(T,N,R){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=_r(""+N,T.mode,R),N.return=T,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case B:return R=Zi(N.type,N.key,N.props,null,T.mode,R),Jn(R,N),R.return=T,R;case O:return N=Rr(N,T.mode,R),N.return=T,N;case fe:return N=Ol(N),Q(T,N,R)}if(Ge(N)||ve(N))return N=Tl(N,T.mode,R,null),N.return=T,N;if(typeof N.then=="function")return Q(T,Pi(N),R);if(N.$$typeof===$)return Q(T,Ji(T,N),R);es(T,N)}return null}function k(T,N,R,G){var xe=N!==null?N.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return xe!==null?null:h(T,N,""+R,G);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case B:return R.key===xe?y(T,N,R,G):null;case O:return R.key===xe?M(T,N,R,G):null;case fe:return R=Ol(R),k(T,N,R,G)}if(Ge(R)||ve(R))return xe!==null?null:V(T,N,R,G,null);if(typeof R.then=="function")return k(T,N,Pi(R),G);if(R.$$typeof===$)return k(T,N,Ji(T,R),G);es(T,R)}return null}function H(T,N,R,G,xe){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return T=T.get(R)||null,h(N,T,""+G,xe);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case B:return T=T.get(G.key===null?R:G.key)||null,y(N,T,G,xe);case O:return T=T.get(G.key===null?R:G.key)||null,M(N,T,G,xe);case fe:return G=Ol(G),H(T,N,R,G,xe)}if(Ge(G)||ve(G))return T=T.get(R)||null,V(N,T,G,xe,null);if(typeof G.then=="function")return H(T,N,R,Pi(G),xe);if(G.$$typeof===$)return H(T,N,R,Ji(N,G),xe);es(N,G)}return null}function ce(T,N,R,G){for(var xe=null,qe=null,de=N,Ae=N=0,Oe=null;de!==null&&Ae<R.length;Ae++){de.index>Ae?(Oe=de,de=null):Oe=de.sibling;var Ve=k(T,de,R[Ae],G);if(Ve===null){de===null&&(de=Oe);break}e&&de&&Ve.alternate===null&&t(T,de),N=i(Ve,N,Ae),qe===null?xe=Ve:qe.sibling=Ve,qe=Ve,de=Oe}if(Ae===R.length)return a(T,de),De&&ka(T,Ae),xe;if(de===null){for(;Ae<R.length;Ae++)de=Q(T,R[Ae],G),de!==null&&(N=i(de,N,Ae),qe===null?xe=de:qe.sibling=de,qe=de);return De&&ka(T,Ae),xe}for(de=l(de);Ae<R.length;Ae++)Oe=H(de,T,Ae,R[Ae],G),Oe!==null&&(e&&Oe.alternate!==null&&de.delete(Oe.key===null?Ae:Oe.key),N=i(Oe,N,Ae),qe===null?xe=Oe:qe.sibling=Oe,qe=Oe);return e&&de.forEach(function(vl){return t(T,vl)}),De&&ka(T,Ae),xe}function ye(T,N,R,G){if(R==null)throw Error(u(151));for(var xe=null,qe=null,de=N,Ae=N=0,Oe=null,Ve=R.next();de!==null&&!Ve.done;Ae++,Ve=R.next()){de.index>Ae?(Oe=de,de=null):Oe=de.sibling;var vl=k(T,de,Ve.value,G);if(vl===null){de===null&&(de=Oe);break}e&&de&&vl.alternate===null&&t(T,de),N=i(vl,N,Ae),qe===null?xe=vl:qe.sibling=vl,qe=vl,de=Oe}if(Ve.done)return a(T,de),De&&ka(T,Ae),xe;if(de===null){for(;!Ve.done;Ae++,Ve=R.next())Ve=Q(T,Ve.value,G),Ve!==null&&(N=i(Ve,N,Ae),qe===null?xe=Ve:qe.sibling=Ve,qe=Ve);return De&&ka(T,Ae),xe}for(de=l(de);!Ve.done;Ae++,Ve=R.next())Ve=H(de,T,Ae,Ve.value,G),Ve!==null&&(e&&Ve.alternate!==null&&de.delete(Ve.key===null?Ae:Ve.key),N=i(Ve,N,Ae),qe===null?xe=Ve:qe.sibling=Ve,qe=Ve);return e&&de.forEach(function(P0){return t(T,P0)}),De&&ka(T,Ae),xe}function Je(T,N,R,G){if(typeof R=="object"&&R!==null&&R.type===C&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case B:e:{for(var xe=R.key;N!==null;){if(N.key===xe){if(xe=R.type,xe===C){if(N.tag===7){a(T,N.sibling),G=n(N,R.props.children),G.return=T,T=G;break e}}else if(N.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===fe&&Ol(xe)===N.type){a(T,N.sibling),G=n(N,R.props),Jn(G,R),G.return=T,T=G;break e}a(T,N);break}else t(T,N);N=N.sibling}R.type===C?(G=Tl(R.props.children,T.mode,G,R.key),G.return=T,T=G):(G=Zi(R.type,R.key,R.props,null,T.mode,G),Jn(G,R),G.return=T,T=G)}return o(T);case O:e:{for(xe=R.key;N!==null;){if(N.key===xe)if(N.tag===4&&N.stateNode.containerInfo===R.containerInfo&&N.stateNode.implementation===R.implementation){a(T,N.sibling),G=n(N,R.children||[]),G.return=T,T=G;break e}else{a(T,N);break}else t(T,N);N=N.sibling}G=Rr(R,T.mode,G),G.return=T,T=G}return o(T);case fe:return R=Ol(R),Je(T,N,R,G)}if(Ge(R))return ce(T,N,R,G);if(ve(R)){if(xe=ve(R),typeof xe!="function")throw Error(u(150));return R=xe.call(R),ye(T,N,R,G)}if(typeof R.then=="function")return Je(T,N,Pi(R),G);if(R.$$typeof===$)return Je(T,N,Ji(T,R),G);es(T,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,N!==null&&N.tag===6?(a(T,N.sibling),G=n(N,R),G.return=T,T=G):(a(T,N),G=_r(R,T.mode,G),G.return=T,T=G),o(T)):a(T,N)}return function(T,N,R,G){try{Kn=0;var xe=Je(T,N,R,G);return on=null,xe}catch(de){if(de===un||de===Fi)throw de;var qe=Xt(29,de,null,T.mode);return qe.lanes=G,qe.return=T,qe}}}var kl=Qo(!0),Zo=Qo(!1),al=!1;function Yr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ll(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function nl(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ye&2)!==0){var n=l.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),l.pending=t,t=Qi(e),_o(e,null,a),t}return Xi(e,l,t,a),Qi(e)}function Wn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ja(e,a)}}function Xr(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var n=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?n=i=o:i=i.next=o,a=a.next}while(a!==null);i===null?n=i=t:i=i.next=t}else n=i=t;a={baseState:l.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Qr=!1;function Fn(){if(Qr){var e=cn;if(e!==null)throw e}}function In(e,t,a,l){Qr=!1;var n=e.updateQueue;al=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var y=h,M=y.next;y.next=null,o===null?i=M:o.next=M,o=y;var V=e.alternate;V!==null&&(V=V.updateQueue,h=V.lastBaseUpdate,h!==o&&(h===null?V.firstBaseUpdate=M:h.next=M,V.lastBaseUpdate=y))}if(i!==null){var Q=n.baseState;o=0,V=M=y=null,h=i;do{var k=h.lane&-536870913,H=k!==h.lane;if(H?(ze&k)===k:(l&k)===k){k!==0&&k===rn&&(Qr=!0),V!==null&&(V=V.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var ce=e,ye=h;k=t;var Je=a;switch(ye.tag){case 1:if(ce=ye.payload,typeof ce=="function"){Q=ce.call(Je,Q,k);break e}Q=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ye.payload,k=typeof ce=="function"?ce.call(Je,Q,k):ce,k==null)break e;Q=S({},Q,k);break e;case 2:al=!0}}k=h.callback,k!==null&&(e.flags|=64,H&&(e.flags|=8192),H=n.callbacks,H===null?n.callbacks=[k]:H.push(k))}else H={lane:k,tag:h.tag,payload:h.payload,callback:h.callback,next:null},V===null?(M=V=H,y=Q):V=V.next=H,o|=k;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;H=h,h=H.next,H.next=null,n.lastBaseUpdate=H,n.shared.pending=null}}while(!0);V===null&&(y=Q),n.baseState=y,n.firstBaseUpdate=M,n.lastBaseUpdate=V,i===null&&(n.shared.lanes=0),ul|=o,e.lanes=o,e.memoizedState=Q}}function $o(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Ko(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)$o(a[e],t)}var dn=v(null),ts=v(0);function Jo(e,t){e=Za,W(ts,e),W(dn,t),Za=e|t.baseLanes}function Zr(){W(ts,Za),W(dn,dn.current)}function $r(){Za=ts.current,q(dn),q(ts)}var Qt=v(null),sa=null;function il(e){var t=e.alternate;W(ot,ot.current&1),W(Qt,e),sa===null&&(t===null||dn.current!==null||t.memoizedState!==null)&&(sa=e)}function Kr(e){W(ot,ot.current),W(Qt,e),sa===null&&(sa=e)}function Wo(e){e.tag===22?(W(ot,ot.current),W(Qt,e),sa===null&&(sa=e)):sl()}function sl(){W(ot,ot.current),W(Qt,Qt.current)}function Zt(e){q(Qt),sa===e&&(sa=null),q(ot)}var ot=v(0);function as(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||eu(a)||tu(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ha=0,Ne=null,$e=null,mt=null,ls=!1,fn=!1,Ul=!1,ns=0,Pn=0,hn=null,Gm=0;function ct(){throw Error(u(321))}function Jr(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Gt(e[a],t[a]))return!1;return!0}function Wr(e,t,a,l,n,i){return Ha=i,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Od:dc,Ul=!1,i=a(l,n),Ul=!1,fn&&(i=Io(t,a,l,n)),Fo(e),i}function Fo(e){z.H=ai;var t=$e!==null&&$e.next!==null;if(Ha=0,mt=$e=Ne=null,ls=!1,Pn=0,hn=null,t)throw Error(u(300));e===null||xt||(e=e.dependencies,e!==null&&Ki(e)&&(xt=!0))}function Io(e,t,a,l){Ne=e;var n=0;do{if(fn&&(hn=null),Pn=0,fn=!1,25<=n)throw Error(u(301));if(n+=1,mt=$e=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}z.H=Dd,i=t(a,l)}while(fn);return i}function Xm(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?ei(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Fr(){var e=ns!==0;return ns=0,e}function Ir(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Pr(e){if(ls){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ls=!1}Ha=0,mt=$e=Ne=null,fn=!1,Pn=ns=0,hn=null}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?Ne.memoizedState=mt=e:mt=mt.next=e,mt}function dt(){if($e===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=mt===null?Ne.memoizedState:mt.next;if(t!==null)mt=t,$e=e;else{if(e===null)throw Ne.alternate===null?Error(u(467)):Error(u(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},mt===null?Ne.memoizedState=mt=e:mt=mt.next=e}return mt}function is(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ei(e){var t=Pn;return Pn+=1,hn===null&&(hn=[]),e=Yo(hn,e,t),t=Ne,(mt===null?t.memoizedState:mt.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Od:dc),e}function ss(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ei(e);if(e.$$typeof===$)return At(e)}throw Error(u(438,String(e)))}function ec(e){var t=null,a=Ne.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Ne.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=is(),Ne.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=le;return t.index++,a}function Ba(e,t){return typeof t=="function"?t(e):t}function rs(e){var t=dt();return tc(t,$e,e)}function tc(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var n=e.baseQueue,i=l.pending;if(i!==null){if(n!==null){var o=n.next;n.next=i.next,i.next=o}t.baseQueue=n=i,l.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var h=o=null,y=null,M=t,V=!1;do{var Q=M.lane&-536870913;if(Q!==M.lane?(ze&Q)===Q:(Ha&Q)===Q){var k=M.revertLane;if(k===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),Q===rn&&(V=!0);else if((Ha&k)===k){M=M.next,k===rn&&(V=!0);continue}else Q={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},y===null?(h=y=Q,o=i):y=y.next=Q,Ne.lanes|=k,ul|=k;Q=M.action,Ul&&a(i,Q),i=M.hasEagerState?M.eagerState:a(i,Q)}else k={lane:Q,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},y===null?(h=y=k,o=i):y=y.next=k,Ne.lanes|=Q,ul|=Q;M=M.next}while(M!==null&&M!==t);if(y===null?o=i:y.next=h,!Gt(i,e.memoizedState)&&(xt=!0,V&&(a=cn,a!==null)))throw a;e.memoizedState=i,e.baseState=o,e.baseQueue=y,l.lastRenderedState=i}return n===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function ac(e){var t=dt(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,n=a.pending,i=t.memoizedState;if(n!==null){a.pending=null;var o=n=n.next;do i=e(i,o.action),o=o.next;while(o!==n);Gt(i,t.memoizedState)||(xt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Po(e,t,a){var l=Ne,n=dt(),i=De;if(i){if(a===void 0)throw Error(u(407));a=a()}else a=t();var o=!Gt(($e||n).memoizedState,a);if(o&&(n.memoizedState=a,xt=!0),n=n.queue,ic(ad.bind(null,l,n,e),[e]),n.getSnapshot!==t||o||mt!==null&&mt.memoizedState.tag&1){if(l.flags|=2048,pn(9,{destroy:void 0},td.bind(null,l,n,a,t),null),We===null)throw Error(u(349));i||(Ha&127)!==0||ed(l,t,a)}return a}function ed(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ne.updateQueue,t===null?(t=is(),Ne.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function td(e,t,a,l){t.value=a,t.getSnapshot=l,ld(t)&&nd(e)}function ad(e,t,a){return a(function(){ld(t)&&nd(e)})}function ld(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Gt(e,a)}catch{return!0}}function nd(e){var t=Al(e,2);t!==null&&Yt(t,e,2)}function lc(e){var t=Dt();if(typeof e=="function"){var a=e;if(e=a(),Ul){Ue(!0);try{a()}finally{Ue(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ba,lastRenderedState:e},t}function id(e,t,a,l){return e.baseState=a,tc(e,$e,typeof l=="function"?l:Ba)}function Qm(e,t,a,l,n){if(os(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};z.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,sd(t,i)):(i.next=a.next,t.pending=a.next=i)}}function sd(e,t){var a=t.action,l=t.payload,n=e.state;if(t.isTransition){var i=z.T,o={};z.T=o;try{var h=a(n,l),y=z.S;y!==null&&y(o,h),rd(e,t,h)}catch(M){nc(e,t,M)}finally{i!==null&&o.types!==null&&(i.types=o.types),z.T=i}}else try{i=a(n,l),rd(e,t,i)}catch(M){nc(e,t,M)}}function rd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){cd(e,t,l)},function(l){return nc(e,t,l)}):cd(e,t,a)}function cd(e,t,a){t.status="fulfilled",t.value=a,ud(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,sd(e,a)))}function nc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,ud(t),t=t.next;while(t!==l)}e.action=null}function ud(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function od(e,t){return t}function dd(e,t){if(De){var a=We.formState;if(a!==null){e:{var l=Ne;if(De){if(Ie){t:{for(var n=Ie,i=ia;n.nodeType!==8;){if(!i){n=null;break t}if(n=ra(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Ie=ra(n.nextSibling),l=n.data==="F!";break e}}el(l)}l=!1}l&&(t=a[0])}}return a=Dt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:od,lastRenderedState:t},a.queue=l,a=Rd.bind(null,Ne,l),l.dispatch=a,l=lc(!1),i=oc.bind(null,Ne,!1,l.queue),l=Dt(),n={state:t,dispatch:null,action:e,pending:null},l.queue=n,a=Qm.bind(null,Ne,n,i,a),n.dispatch=a,l.memoizedState=e,[t,a,!1]}function fd(e){var t=dt();return hd(t,$e,e)}function hd(e,t,a){if(t=tc(e,t,od)[0],e=rs(Ba)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ei(t)}catch(o){throw o===un?Fi:o}else l=t;t=dt();var n=t.queue,i=n.dispatch;return a!==t.memoizedState&&(Ne.flags|=2048,pn(9,{destroy:void 0},Zm.bind(null,n,a),null)),[l,i,e]}function Zm(e,t){e.action=t}function pd(e){var t=dt(),a=$e;if(a!==null)return hd(t,a,e);dt(),t=t.memoizedState,a=dt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function pn(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=is(),Ne.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function md(){return dt().memoizedState}function cs(e,t,a,l){var n=Dt();Ne.flags|=e,n.memoizedState=pn(1|t,{destroy:void 0},a,l===void 0?null:l)}function us(e,t,a,l){var n=dt();l=l===void 0?null:l;var i=n.memoizedState.inst;$e!==null&&l!==null&&Jr(l,$e.memoizedState.deps)?n.memoizedState=pn(t,i,a,l):(Ne.flags|=e,n.memoizedState=pn(1|t,i,a,l))}function xd(e,t){cs(8390656,8,e,t)}function ic(e,t){us(2048,8,e,t)}function $m(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=is(),Ne.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function gd(e){var t=dt().memoizedState;return $m({ref:t,nextImpl:e}),function(){if((Ye&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function yd(e,t){return us(4,2,e,t)}function vd(e,t){return us(4,4,e,t)}function bd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function wd(e,t,a){a=a!=null?a.concat([e]):null,us(4,4,bd.bind(null,t,e),a)}function sc(){}function Sd(e,t){var a=dt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Jr(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function jd(e,t){var a=dt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Jr(t,l[1]))return l[0];if(l=e(),Ul){Ue(!0);try{e()}finally{Ue(!1)}}return a.memoizedState=[l,t],l}function rc(e,t,a){return a===void 0||(Ha&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Ef(),Ne.lanes|=e,ul|=e,a)}function Nd(e,t,a,l){return Gt(a,t)?a:dn.current!==null?(e=rc(e,a,l),Gt(e,t)||(xt=!0),e):(Ha&42)===0||(Ha&1073741824)!==0&&(ze&261930)===0?(xt=!0,e.memoizedState=a):(e=Ef(),Ne.lanes|=e,ul|=e,t)}function Ed(e,t,a,l,n){var i=L.p;L.p=i!==0&&8>i?i:8;var o=z.T,h={};z.T=h,oc(e,!1,t,a);try{var y=n(),M=z.S;if(M!==null&&M(h,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var V=Ym(y,l);ti(e,t,V,Jt(e))}else ti(e,t,l,Jt(e))}catch(Q){ti(e,t,{then:function(){},status:"rejected",reason:Q},Jt())}finally{L.p=i,o!==null&&h.types!==null&&(o.types=h.types),z.T=o}}function Km(){}function cc(e,t,a,l){if(e.tag!==5)throw Error(u(476));var n=Cd(e).queue;Ed(e,n,t,F,a===null?Km:function(){return Ad(e),a(l)})}function Cd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ba,lastRenderedState:F},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ba,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ad(e){var t=Cd(e);t.next===null&&(t=e.alternate.memoizedState),ti(e,t.next.queue,{},Jt())}function uc(){return At(yi)}function Td(){return dt().memoizedState}function _d(){return dt().memoizedState}function Jm(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Jt();e=ll(a);var l=nl(t,e,a);l!==null&&(Yt(l,t,a),Wn(l,t,a)),t={cache:Hr()},e.payload=t;return}t=t.return}}function Wm(e,t,a){var l=Jt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},os(e)?Md(t,a):(a=Ar(e,t,a,l),a!==null&&(Yt(a,e,l),zd(a,t,l)))}function Rd(e,t,a){var l=Jt();ti(e,t,a,l)}function ti(e,t,a,l){var n={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(os(e))Md(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,a);if(n.hasEagerState=!0,n.eagerState=h,Gt(h,o))return Xi(e,t,n,0),We===null&&Gi(),!1}catch{}if(a=Ar(e,t,n,l),a!==null)return Yt(a,e,l),zd(a,t,l),!0}return!1}function oc(e,t,a,l){if(l={lane:2,revertLane:Yc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},os(e)){if(t)throw Error(u(479))}else t=Ar(e,a,l,2),t!==null&&Yt(t,e,2)}function os(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Md(e,t){fn=ls=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function zd(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ja(e,a)}}var ai={readContext:At,use:ss,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};ai.useEffectEvent=ct;var Od={readContext:At,use:ss,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:xd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,cs(4194308,4,bd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var a=Dt();t=t===void 0?null:t;var l=e();if(Ul){Ue(!0);try{e()}finally{Ue(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Dt();if(a!==void 0){var n=a(t);if(Ul){Ue(!0);try{a(t)}finally{Ue(!1)}}}else n=t;return l.memoizedState=l.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=Wm.bind(null,Ne,e),[l.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:function(e){e=lc(e);var t=e.queue,a=Rd.bind(null,Ne,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:sc,useDeferredValue:function(e,t){var a=Dt();return rc(a,e,t)},useTransition:function(){var e=lc(!1);return e=Ed.bind(null,Ne,e.queue,!0,!1),Dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Ne,n=Dt();if(De){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),We===null)throw Error(u(349));(ze&127)!==0||ed(l,t,a)}n.memoizedState=a;var i={value:a,getSnapshot:t};return n.queue=i,xd(ad.bind(null,l,i,e),[e]),l.flags|=2048,pn(9,{destroy:void 0},td.bind(null,l,i,a,t),null),a},useId:function(){var e=Dt(),t=We.identifierPrefix;if(De){var a=Ea,l=Na;a=(l&~(1<<32-Re(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ns++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Gm++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uc,useFormState:dd,useActionState:dd,useOptimistic:function(e){var t=Dt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=oc.bind(null,Ne,!0,a),a.dispatch=t,[e,t]},useMemoCache:ec,useCacheRefresh:function(){return Dt().memoizedState=Jm.bind(null,Ne)},useEffectEvent:function(e){var t=Dt(),a={impl:e};return t.memoizedState=a,function(){if((Ye&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},dc={readContext:At,use:ss,useCallback:Sd,useContext:At,useEffect:ic,useImperativeHandle:wd,useInsertionEffect:yd,useLayoutEffect:vd,useMemo:jd,useReducer:rs,useRef:md,useState:function(){return rs(Ba)},useDebugValue:sc,useDeferredValue:function(e,t){var a=dt();return Nd(a,$e.memoizedState,e,t)},useTransition:function(){var e=rs(Ba)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:Po,useId:Td,useHostTransitionStatus:uc,useFormState:fd,useActionState:fd,useOptimistic:function(e,t){var a=dt();return id(a,$e,e,t)},useMemoCache:ec,useCacheRefresh:_d};dc.useEffectEvent=gd;var Dd={readContext:At,use:ss,useCallback:Sd,useContext:At,useEffect:ic,useImperativeHandle:wd,useInsertionEffect:yd,useLayoutEffect:vd,useMemo:jd,useReducer:ac,useRef:md,useState:function(){return ac(Ba)},useDebugValue:sc,useDeferredValue:function(e,t){var a=dt();return $e===null?rc(a,e,t):Nd(a,$e.memoizedState,e,t)},useTransition:function(){var e=ac(Ba)[0],t=dt().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:Po,useId:Td,useHostTransitionStatus:uc,useFormState:pd,useActionState:pd,useOptimistic:function(e,t){var a=dt();return $e!==null?id(a,$e,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:ec,useCacheRefresh:_d};Dd.useEffectEvent=gd;function fc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:S({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var hc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Jt(),n=ll(l);n.payload=t,a!=null&&(n.callback=a),t=nl(e,n,l),t!==null&&(Yt(t,e,l),Wn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Jt(),n=ll(l);n.tag=1,n.payload=t,a!=null&&(n.callback=a),t=nl(e,n,l),t!==null&&(Yt(t,e,l),Wn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Jt(),l=ll(a);l.tag=2,t!=null&&(l.callback=t),t=nl(e,l,a),t!==null&&(Yt(t,e,a),Wn(t,e,a))}};function kd(e,t,a,l,n,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,o):t.prototype&&t.prototype.isPureReactComponent?!Yn(a,l)||!Yn(n,i):!0}function Ud(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&hc.enqueueReplaceState(t,t.state,null)}function Ll(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=S({},a));for(var n in e)a[n]===void 0&&(a[n]=e[n])}return a}function Ld(e){Yi(e)}function Hd(e){console.error(e)}function Bd(e){Yi(e)}function ds(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function qd(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function pc(e,t,a){return a=ll(a),a.tag=3,a.payload={element:null},a.callback=function(){ds(e,t)},a}function Vd(e){return e=ll(e),e.tag=3,e}function Yd(e,t,a,l){var n=a.type.getDerivedStateFromError;if(typeof n=="function"){var i=l.value;e.payload=function(){return n(i)},e.callback=function(){qd(t,a,l)}}var o=a.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){qd(t,a,l),typeof n!="function"&&(ol===null?ol=new Set([this]):ol.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Fm(e,t,a,l,n){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&sn(t,a,n,!0),a=Qt.current,a!==null){switch(a.tag){case 31:case 13:return sa===null?js():a.alternate===null&&ut===0&&(ut=3),a.flags&=-257,a.flags|=65536,a.lanes=n,l===Ii?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Bc(e,l,n)),!1;case 22:return a.flags|=65536,l===Ii?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Bc(e,l,n)),!1}throw Error(u(435,a.tag))}return Bc(e,l,n),js(),!1}if(De)return t=Qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,l!==Or&&(e=Error(u(422),{cause:l}),Qn(aa(e,a)))):(l!==Or&&(t=Error(u(423),{cause:l}),Qn(aa(t,a))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,l=aa(l,a),n=pc(e.stateNode,l,n),Xr(e,n),ut!==4&&(ut=2)),!1;var i=Error(u(520),{cause:l});if(i=aa(i,a),oi===null?oi=[i]:oi.push(i),ut!==4&&(ut=2),t===null)return!0;l=aa(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=n&-n,a.lanes|=e,e=pc(a.stateNode,l,e),Xr(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(ol===null||!ol.has(i))))return a.flags|=65536,n&=-n,a.lanes|=n,n=Vd(n),Yd(n,e,a,l),Xr(a,n),!1}a=a.return}while(a!==null);return!1}var mc=Error(u(461)),xt=!1;function Tt(e,t,a,l){t.child=e===null?Zo(t,null,a,l):kl(t,e.child,a,l)}function Gd(e,t,a,l,n){a=a.render;var i=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return Ml(t),l=Wr(e,t,a,o,i,n),h=Fr(),e!==null&&!xt?(Ir(e,t,n),qa(e,t,n)):(De&&h&&Mr(t),t.flags|=1,Tt(e,t,l,n),t.child)}function Xd(e,t,a,l,n){if(e===null){var i=a.type;return typeof i=="function"&&!Tr(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Qd(e,t,i,l,n)):(e=Zi(a.type,null,l,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!jc(e,n)){var o=i.memoizedProps;if(a=a.compare,a=a!==null?a:Yn,a(o,l)&&e.ref===t.ref)return qa(e,t,n)}return t.flags|=1,e=Da(i,l),e.ref=t.ref,e.return=t,t.child=e}function Qd(e,t,a,l,n){if(e!==null){var i=e.memoizedProps;if(Yn(i,l)&&e.ref===t.ref)if(xt=!1,t.pendingProps=l=i,jc(e,n))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,qa(e,t,n)}return xc(e,t,a,l,n)}function Zd(e,t,a,l){var n=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,n=0;l!==null;)n=n|l.lanes|l.childLanes,l=l.sibling;l=n&~i}else l=0,t.child=null;return $d(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wi(t,i!==null?i.cachePool:null),i!==null?Jo(t,i):Zr(),Wo(t);else return l=t.lanes=536870912,$d(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(Wi(t,i.cachePool),Jo(t,i),sl(),t.memoizedState=null):(e!==null&&Wi(t,null),Zr(),sl());return Tt(e,t,n,a),t.child}function li(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function $d(e,t,a,l,n){var i=qr();return i=i===null?null:{parent:pt._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&Wi(t,null),Zr(),Wo(t),e!==null&&sn(e,t,l,!0),t.childLanes=n,null}function fs(e,t){return t=ps({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Kd(e,t,a){return kl(t,e.child,null,a),e=fs(t,t.pendingProps),e.flags|=2,Zt(t),t.memoizedState=null,e}function Im(e,t,a){var l=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(De){if(l.mode==="hidden")return e=fs(t,l),t.lanes=536870912,li(null,e);if(Kr(t),(e=Ie)?(e=rh(e,ia),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ia!==null?{id:Na,overflow:Ea}:null,retryLane:536870912,hydrationErrors:null},a=Mo(e),a.return=t,t.child=a,Ct=t,Ie=null)):e=null,e===null)throw el(t);return t.lanes=536870912,null}return fs(t,l)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Kr(t),n)if(t.flags&256)t.flags&=-257,t=Kd(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(xt||sn(e,t,a,!1),n=(a&e.childLanes)!==0,xt||n){if(l=We,l!==null&&(o=wl(l,a),o!==0&&o!==i.retryLane))throw i.retryLane=o,Al(e,o),Yt(l,e,o),mc;js(),t=Kd(e,t,a)}else e=i.treeContext,Ie=ra(o.nextSibling),Ct=t,De=!0,Pa=null,ia=!1,e!==null&&Do(t,e),t=fs(t,l),t.flags|=4096;return t}return e=Da(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function xc(e,t,a,l,n){return Ml(t),a=Wr(e,t,a,l,void 0,n),l=Fr(),e!==null&&!xt?(Ir(e,t,n),qa(e,t,n)):(De&&l&&Mr(t),t.flags|=1,Tt(e,t,a,n),t.child)}function Jd(e,t,a,l,n,i){return Ml(t),t.updateQueue=null,a=Io(t,l,a,n),Fo(e),l=Fr(),e!==null&&!xt?(Ir(e,t,i),qa(e,t,i)):(De&&l&&Mr(t),t.flags|=1,Tt(e,t,a,i),t.child)}function Wd(e,t,a,l,n){if(Ml(t),t.stateNode===null){var i=tn,o=a.contextType;typeof o=="object"&&o!==null&&(i=At(o)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=hc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},Yr(t),o=a.contextType,i.context=typeof o=="object"&&o!==null?At(o):tn,i.state=t.memoizedState,o=a.getDerivedStateFromProps,typeof o=="function"&&(fc(t,a,o,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&hc.enqueueReplaceState(i,i.state,null),In(t,l,i,n),Fn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,y=Ll(a,h);i.props=y;var M=i.context,V=a.contextType;o=tn,typeof V=="object"&&V!==null&&(o=At(V));var Q=a.getDerivedStateFromProps;V=typeof Q=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,V||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||M!==o)&&Ud(t,i,l,o),al=!1;var k=t.memoizedState;i.state=k,In(t,l,i,n),Fn(),M=t.memoizedState,h||k!==M||al?(typeof Q=="function"&&(fc(t,a,Q,l),M=t.memoizedState),(y=al||kd(t,a,y,l,k,M,o))?(V||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=M),i.props=l,i.state=M,i.context=o,l=y):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,Gr(e,t),o=t.memoizedProps,V=Ll(a,o),i.props=V,Q=t.pendingProps,k=i.context,M=a.contextType,y=tn,typeof M=="object"&&M!==null&&(y=At(M)),h=a.getDerivedStateFromProps,(M=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==Q||k!==y)&&Ud(t,i,l,y),al=!1,k=t.memoizedState,i.state=k,In(t,l,i,n),Fn();var H=t.memoizedState;o!==Q||k!==H||al||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof h=="function"&&(fc(t,a,h,l),H=t.memoizedState),(V=al||kd(t,a,V,l,k,H,y)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(M||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,H,y),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,H,y)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=H),i.props=l,i.state=H,i.context=y,l=V):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,hs(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=kl(t,e.child,null,n),t.child=kl(t,null,a,n)):Tt(e,t,a,n),t.memoizedState=i.state,e=t.child):e=qa(e,t,n),e}function Fd(e,t,a,l){return _l(),t.flags|=256,Tt(e,t,a,l),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yc(e){return{baseLanes:e,cachePool:qo()}}function vc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Kt),e}function Id(e,t,a){var l=t.pendingProps,n=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(ot.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(De){if(n?il(t):sl(),(e=Ie)?(e=rh(e,ia),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ia!==null?{id:Na,overflow:Ea}:null,retryLane:536870912,hydrationErrors:null},a=Mo(e),a.return=t,t.child=a,Ct=t,Ie=null)):e=null,e===null)throw el(t);return tu(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,n?(sl(),n=t.mode,h=ps({mode:"hidden",children:h},n),l=Tl(l,n,a,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=yc(a),l.childLanes=vc(e,o,a),t.memoizedState=gc,li(null,l)):(il(t),bc(t,h))}var y=e.memoizedState;if(y!==null&&(h=y.dehydrated,h!==null)){if(i)t.flags&256?(il(t),t.flags&=-257,t=wc(e,t,a)):t.memoizedState!==null?(sl(),t.child=e.child,t.flags|=128,t=null):(sl(),h=l.fallback,n=t.mode,l=ps({mode:"visible",children:l.children},n),h=Tl(h,n,a,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,kl(t,e.child,null,a),l=t.child,l.memoizedState=yc(a),l.childLanes=vc(e,o,a),t.memoizedState=gc,t=li(null,l));else if(il(t),tu(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var M=o.dgst;o=M,l=Error(u(419)),l.stack="",l.digest=o,Qn({value:l,source:null,stack:null}),t=wc(e,t,a)}else if(xt||sn(e,t,a,!1),o=(a&e.childLanes)!==0,xt||o){if(o=We,o!==null&&(l=wl(o,a),l!==0&&l!==y.retryLane))throw y.retryLane=l,Al(e,l),Yt(o,e,l),mc;eu(h)||js(),t=wc(e,t,a)}else eu(h)?(t.flags|=192,t.child=e.child,t=null):(e=y.treeContext,Ie=ra(h.nextSibling),Ct=t,De=!0,Pa=null,ia=!1,e!==null&&Do(t,e),t=bc(t,l.children),t.flags|=4096);return t}return n?(sl(),h=l.fallback,n=t.mode,y=e.child,M=y.sibling,l=Da(y,{mode:"hidden",children:l.children}),l.subtreeFlags=y.subtreeFlags&65011712,M!==null?h=Da(M,h):(h=Tl(h,n,a,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,li(null,l),l=t.child,h=e.child.memoizedState,h===null?h=yc(a):(n=h.cachePool,n!==null?(y=pt._currentValue,n=n.parent!==y?{parent:y,pool:y}:n):n=qo(),h={baseLanes:h.baseLanes|a,cachePool:n}),l.memoizedState=h,l.childLanes=vc(e,o,a),t.memoizedState=gc,li(e.child,l)):(il(t),a=e.child,e=a.sibling,a=Da(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=a,t.memoizedState=null,a)}function bc(e,t){return t=ps({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ps(e,t){return e=Xt(22,e,null,t),e.lanes=0,e}function wc(e,t,a){return kl(t,e.child,null,a),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Pd(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ur(e.return,t,a)}function Sc(e,t,a,l,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:n,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=a,o.tailMode=n,o.treeForkCount=i)}function ef(e,t,a){var l=t.pendingProps,n=l.revealOrder,i=l.tail;l=l.children;var o=ot.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,W(ot,o),Tt(e,t,l,a),l=De?Xn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pd(e,a,t);else if(e.tag===19)Pd(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(a=t.child,n=null;a!==null;)e=a.alternate,e!==null&&as(e)===null&&(n=a),a=a.sibling;a=n,a===null?(n=t.child,t.child=null):(n=a.sibling,a.sibling=null),Sc(t,!1,n,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&as(e)===null){t.child=n;break}e=n.sibling,n.sibling=a,a=n,n=e}Sc(t,!0,a,null,i,l);break;case"together":Sc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function qa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),ul|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(sn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=Da(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Da(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ki(e)))}function Pm(e,t,a){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),tl(t,pt,e.memoizedState.cache),_l();break;case 27:case 5:yt(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:tl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Kr(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(il(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Id(e,t,a):(il(t),e=qa(e,t,a),e!==null?e.sibling:null);il(t);break;case 19:var n=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(sn(e,t,a,!1),l=(a&t.childLanes)!==0),n){if(l)return ef(e,t,a);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),W(ot,ot.current),l)break;return null;case 22:return t.lanes=0,Zd(e,t,a,t.pendingProps);case 24:tl(t,pt,e.memoizedState.cache)}return qa(e,t,a)}function tf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!jc(e,a)&&(t.flags&128)===0)return xt=!1,Pm(e,t,a);xt=(e.flags&131072)!==0}else xt=!1,De&&(t.flags&1048576)!==0&&Oo(t,Xn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ol(t.elementType),t.type=e,typeof e=="function")Tr(e)?(l=Ll(e,l),t.tag=1,t=Wd(null,t,e,l,a)):(t.tag=0,t=xc(null,t,e,l,a));else{if(e!=null){var n=e.$$typeof;if(n===se){t.tag=11,t=Gd(null,t,e,l,a);break e}else if(n===I){t.tag=14,t=Xd(null,t,e,l,a);break e}}throw t=Ee(e)||e,Error(u(306,t,""))}}return t;case 0:return xc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,n=Ll(l,t.pendingProps),Wd(e,t,l,n,a);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var i=t.memoizedState;n=i.element,Gr(e,t),In(t,l,null,a);var o=t.memoizedState;if(l=o.cache,tl(t,pt,l),l!==i.cache&&Lr(t,[pt],a,!0),Fn(),l=o.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Fd(e,t,l,a);break e}else if(l!==n){n=aa(Error(u(424)),t),Qn(n),t=Fd(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ie=ra(e.firstChild),Ct=t,De=!0,Pa=null,ia=!0,a=Zo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(_l(),l===n){t=qa(e,t,a);break e}Tt(e,t,l,a)}t=t.child}return t;case 26:return hs(e,t),e===null?(a=hh(t.type,null,t.pendingProps,null))?t.memoizedState=a:De||(a=t.type,e=t.pendingProps,l=Rs(pe.current).createElement(a),l[Fe]=t,l[ht]=e,_t(l,a,e),St(l),t.stateNode=l):t.memoizedState=hh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return yt(t),e===null&&De&&(l=t.stateNode=oh(t.type,t.pendingProps,pe.current),Ct=t,ia=!0,n=Ie,pl(t.type)?(au=n,Ie=ra(l.firstChild)):Ie=n),Tt(e,t,t.pendingProps.children,a),hs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&De&&((n=l=Ie)&&(l=_0(l,t.type,t.pendingProps,ia),l!==null?(t.stateNode=l,Ct=t,Ie=ra(l.firstChild),ia=!1,n=!0):n=!1),n||el(t)),yt(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Fc(n,i)?l=null:o!==null&&Fc(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=Wr(e,t,Xm,null,null,a),yi._currentValue=n),hs(e,t),Tt(e,t,l,a),t.child;case 6:return e===null&&De&&((e=a=Ie)&&(a=R0(a,t.pendingProps,ia),a!==null?(t.stateNode=a,Ct=t,Ie=null,e=!0):e=!1),e||el(t)),null;case 13:return Id(e,t,a);case 4:return Ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=kl(t,null,l,a):Tt(e,t,l,a),t.child;case 11:return Gd(e,t,t.type,t.pendingProps,a);case 7:return Tt(e,t,t.pendingProps,a),t.child;case 8:return Tt(e,t,t.pendingProps.children,a),t.child;case 12:return Tt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,tl(t,t.type,l.value),Tt(e,t,l.children,a),t.child;case 9:return n=t.type._context,l=t.pendingProps.children,Ml(t),n=At(n),l=l(n),t.flags|=1,Tt(e,t,l,a),t.child;case 14:return Xd(e,t,t.type,t.pendingProps,a);case 15:return Qd(e,t,t.type,t.pendingProps,a);case 19:return ef(e,t,a);case 31:return Im(e,t,a);case 22:return Zd(e,t,a,t.pendingProps);case 24:return Ml(t),l=At(pt),e===null?(n=qr(),n===null&&(n=We,i=Hr(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=a),n=i),t.memoizedState={parent:l,cache:n},Yr(t),tl(t,pt,n)):((e.lanes&a)!==0&&(Gr(e,t),In(t,null,null,a),Fn()),n=e.memoizedState,i=t.memoizedState,n.parent!==l?(n={parent:l,cache:l},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),tl(t,pt,l)):(l=i.cache,tl(t,pt,l),l!==n.cache&&Lr(t,[pt],a,!0))),Tt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Va(e){e.flags|=4}function Nc(e,t,a,l,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(_f())e.flags|=8192;else throw Dl=Ii,Vr}else e.flags&=-16777217}function af(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!yh(t))if(_f())e.flags|=8192;else throw Dl=Ii,Vr}function ms(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?J():536870912,e.lanes|=t,yn|=t)}function ni(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags&65011712,l|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags,l|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function e0(e,t,a){var l=t.pendingProps;switch(zr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Pe(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),La(pt),ke(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(nn(t)?Va(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dr())),Pe(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(Va(t),i!==null?(Pe(t),af(t,i)):(Pe(t),Nc(t,n,null,l,a))):i?i!==e.memoizedState?(Va(t),Pe(t),af(t,i)):(Pe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Va(t),Pe(t),Nc(t,n,e,l,a)),null;case 27:if(oa(t),a=pe.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Va(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}e=Z.current,nn(t)?ko(t):(e=oh(n,l,a),t.stateNode=e,Va(t))}return Pe(t),null;case 5:if(oa(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Va(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Pe(t),null}if(i=Z.current,nn(t))ko(t);else{var o=Rs(pe.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?o.createElement(n,{is:l.is}):o.createElement(n)}}i[Fe]=t,i[ht]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(_t(i,n,l),n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Va(t)}}return Pe(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Va(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=pe.current,nn(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,n=Ct,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}e[Fe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Pf(e.nodeValue,a)),e||el(t,!0)}else e=Rs(e).createTextNode(l),e[Fe]=t,t.stateNode=e}return Pe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=nn(t),a!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Fe]=t}else _l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),e=!1}else a=Dr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Zt(t),t):(Zt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Pe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=nn(t),l!==null&&l.dehydrated!==null){if(e===null){if(!n)throw Error(u(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(u(317));n[Fe]=t}else _l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Pe(t),n=!1}else n=Dr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Zt(t),t):(Zt(t),null)}return Zt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==n&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ms(t,t.updateQueue),Pe(t),null);case 4:return ke(),e===null&&Zc(t.stateNode.containerInfo),Pe(t),null;case 10:return La(t.type),Pe(t),null;case 19:if(q(ot),l=t.memoizedState,l===null)return Pe(t),null;if(n=(t.flags&128)!==0,i=l.rendering,i===null)if(n)ni(l,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=as(e),i!==null){for(t.flags|=128,ni(l,!1),e=i.updateQueue,t.updateQueue=e,ms(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ro(a,e),a=a.sibling;return W(ot,ot.current&1|2),De&&ka(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&wt()>bs&&(t.flags|=128,n=!0,ni(l,!1),t.lanes=4194304)}else{if(!n)if(e=as(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ms(t,e),ni(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!De)return Pe(t),null}else 2*wt()-l.renderingStartTime>bs&&a!==536870912&&(t.flags|=128,n=!0,ni(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=wt(),e.sibling=null,a=ot.current,W(ot,n?a&1|2:a&1),De&&ka(t,l.treeForkCount),e):(Pe(t),null);case 22:case 23:return Zt(t),$r(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),a=t.updateQueue,a!==null&&ms(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&q(zl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),La(pt),Pe(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function t0(e,t){switch(zr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return La(pt),ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oa(t),null;case 31:if(t.memoizedState!==null){if(Zt(t),t.alternate===null)throw Error(u(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(ot),null;case 4:return ke(),null;case 10:return La(t.type),null;case 22:case 23:return Zt(t),$r(),e!==null&&q(zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return La(pt),null;case 25:return null;default:return null}}function lf(e,t){switch(zr(t),t.tag){case 3:La(pt),ke();break;case 26:case 27:case 5:oa(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&Zt(t);break;case 13:Zt(t);break;case 19:q(ot);break;case 10:La(t.type);break;case 22:case 23:Zt(t),$r(),e!==null&&q(zl);break;case 24:La(pt)}}function ii(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var n=l.next;a=n;do{if((a.tag&e)===e){l=void 0;var i=a.create,o=a.inst;l=i(),o.destroy=l}a=a.next}while(a!==n)}}catch(h){Qe(t,t.return,h)}}function rl(e,t,a){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,n=t;var y=a,M=h;try{M()}catch(V){Qe(n,y,V)}}}l=l.next}while(l!==i)}}catch(V){Qe(t,t.return,V)}}function nf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ko(t,a)}catch(l){Qe(e,e.return,l)}}}function sf(e,t,a){a.props=Ll(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Qe(e,t,l)}}function si(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(n){Qe(e,t,n)}}function Ca(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(n){Qe(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){Qe(e,t,n)}else a.current=null}function rf(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(n){Qe(e,e.return,n)}}function Ec(e,t,a){try{var l=e.stateNode;j0(l,e.type,a,t),l[ht]=t}catch(n){Qe(e,e.return,n)}}function cf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&pl(e.type)||e.tag===4}function Cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&pl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ac(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=za));else if(l!==4&&(l===27&&pl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Ac(e,t,a),e=e.sibling;e!==null;)Ac(e,t,a),e=e.sibling}function xs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&pl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(xs(e,t,a),e=e.sibling;e!==null;)xs(e,t,a),e=e.sibling}function uf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);_t(t,l,a),t[Fe]=e,t[ht]=a}catch(i){Qe(e,e.return,i)}}var Ya=!1,gt=!1,Tc=!1,of=typeof WeakSet=="function"?WeakSet:Set,jt=null;function a0(e,t){if(e=e.containerInfo,Jc=Ls,e=wo(e),wr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var n=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var o=0,h=-1,y=-1,M=0,V=0,Q=e,k=null;t:for(;;){for(var H;Q!==a||n!==0&&Q.nodeType!==3||(h=o+n),Q!==i||l!==0&&Q.nodeType!==3||(y=o+l),Q.nodeType===3&&(o+=Q.nodeValue.length),(H=Q.firstChild)!==null;)k=Q,Q=H;for(;;){if(Q===e)break t;if(k===a&&++M===n&&(h=o),k===i&&++V===l&&(y=o),(H=Q.nextSibling)!==null)break;Q=k,k=Q.parentNode}Q=H}a=h===-1||y===-1?null:{start:h,end:y}}else a=null}a=a||{start:0,end:0}}else a=null;for(Wc={focusedElem:e,selectionRange:a},Ls=!1,jt=t;jt!==null;)if(t=jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,jt=e;else for(;jt!==null;){switch(t=jt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)n=e[a],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,n=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var ce=Ll(a.type,n);e=l.getSnapshotBeforeUpdate(ce,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Qe(a,a.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Pc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,jt=e;break}jt=t.return}}function df(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Xa(e,a),l&4&&ii(5,a);break;case 1:if(Xa(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(o){Qe(a,a.return,o)}else{var n=Ll(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Qe(a,a.return,o)}}l&64&&nf(a),l&512&&si(a,a.return);break;case 3:if(Xa(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Ko(e,t)}catch(o){Qe(a,a.return,o)}}break;case 27:t===null&&l&4&&uf(a);case 26:case 5:Xa(e,a),t===null&&l&4&&rf(a),l&512&&si(a,a.return);break;case 12:Xa(e,a);break;case 31:Xa(e,a),l&4&&pf(e,a);break;case 13:Xa(e,a),l&4&&mf(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=d0.bind(null,a),M0(e,a))));break;case 22:if(l=a.memoizedState!==null||Ya,!l){t=t!==null&&t.memoizedState!==null||gt,n=Ya;var i=gt;Ya=l,(gt=t)&&!i?Qa(e,a,(a.subtreeFlags&8772)!==0):Xa(e,a),Ya=n,gt=i}break;case 30:break;default:Xa(e,a)}}function ff(e){var t=e.alternate;t!==null&&(e.alternate=null,ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&nr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var at=null,Ht=!1;function Ga(e,t,a){for(a=a.child;a!==null;)hf(e,t,a),a=a.sibling}function hf(e,t,a){if(oe&&typeof oe.onCommitFiberUnmount=="function")try{oe.onCommitFiberUnmount(ae,a)}catch{}switch(a.tag){case 26:gt||Ca(a,t),Ga(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:gt||Ca(a,t);var l=at,n=Ht;pl(a.type)&&(at=a.stateNode,Ht=!1),Ga(e,t,a),mi(a.stateNode),at=l,Ht=n;break;case 5:gt||Ca(a,t);case 6:if(l=at,n=Ht,at=null,Ga(e,t,a),at=l,Ht=n,at!==null)if(Ht)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(a.stateNode)}catch(i){Qe(a,t,i)}else try{at.removeChild(a.stateNode)}catch(i){Qe(a,t,i)}break;case 18:at!==null&&(Ht?(e=at,ih(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Cn(e)):ih(at,a.stateNode));break;case 4:l=at,n=Ht,at=a.stateNode.containerInfo,Ht=!0,Ga(e,t,a),at=l,Ht=n;break;case 0:case 11:case 14:case 15:rl(2,a,t),gt||rl(4,a,t),Ga(e,t,a);break;case 1:gt||(Ca(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&sf(a,t,l)),Ga(e,t,a);break;case 21:Ga(e,t,a);break;case 22:gt=(l=gt)||a.memoizedState!==null,Ga(e,t,a),gt=l;break;default:Ga(e,t,a)}}function pf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Cn(e)}catch(a){Qe(t,t.return,a)}}}function mf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Cn(e)}catch(a){Qe(t,t.return,a)}}function l0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new of),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new of),t;default:throw Error(u(435,e.tag))}}function gs(e,t){var a=l0(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var n=f0.bind(null,e,l);l.then(n,n)}})}function Bt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var n=a[l],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(pl(h.type)){at=h.stateNode,Ht=!1;break e}break;case 5:at=h.stateNode,Ht=!1;break e;case 3:case 4:at=h.stateNode.containerInfo,Ht=!0;break e}h=h.return}if(at===null)throw Error(u(160));hf(i,o,n),at=null,Ht=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xf(t,e),t=t.sibling}var ma=null;function xf(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Bt(t,e),qt(e),l&4&&(rl(3,e,e.return),ii(3,e),rl(5,e,e.return));break;case 1:Bt(t,e),qt(e),l&512&&(gt||a===null||Ca(a,a.return)),l&64&&Ya&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var n=ma;if(Bt(t,e),qt(e),l&512&&(gt||a===null||Ca(a,a.return)),l&4){var i=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,n=n.ownerDocument||n;t:switch(l){case"title":i=n.getElementsByTagName("title")[0],(!i||i[On]||i[Fe]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(l),n.head.insertBefore(i,n.querySelector("head > title"))),_t(i,l,a),i[Fe]=e,St(i),l=i;break e;case"link":var o=xh("link","href",n).get(l+(a.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){o.splice(h,1);break t}}i=n.createElement(l),_t(i,l,a),n.head.appendChild(i);break;case"meta":if(o=xh("meta","content",n).get(l+(a.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){o.splice(h,1);break t}}i=n.createElement(l),_t(i,l,a),n.head.appendChild(i);break;default:throw Error(u(468,l))}i[Fe]=e,St(i),l=i}e.stateNode=l}else gh(n,e.type,e.stateNode);else e.stateNode=mh(n,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?gh(n,e.type,e.stateNode):mh(n,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ec(e,e.memoizedProps,a.memoizedProps)}break;case 27:Bt(t,e),qt(e),l&512&&(gt||a===null||Ca(a,a.return)),a!==null&&l&4&&Ec(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Bt(t,e),qt(e),l&512&&(gt||a===null||Ca(a,a.return)),e.flags&32){n=e.stateNode;try{Kl(n,"")}catch(ce){Qe(e,e.return,ce)}}l&4&&e.stateNode!=null&&(n=e.memoizedProps,Ec(e,n,a!==null?a.memoizedProps:n)),l&1024&&(Tc=!0);break;case 6:if(Bt(t,e),qt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ce){Qe(e,e.return,ce)}}break;case 3:if(Os=null,n=ma,ma=Ms(t.containerInfo),Bt(t,e),ma=n,qt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Cn(t.containerInfo)}catch(ce){Qe(e,e.return,ce)}Tc&&(Tc=!1,gf(e));break;case 4:l=ma,ma=Ms(e.stateNode.containerInfo),Bt(t,e),qt(e),ma=l;break;case 12:Bt(t,e),qt(e);break;case 31:Bt(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,gs(e,l)));break;case 13:Bt(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(vs=wt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,gs(e,l)));break;case 22:n=e.memoizedState!==null;var y=a!==null&&a.memoizedState!==null,M=Ya,V=gt;if(Ya=M||n,gt=V||y,Bt(t,e),gt=V,Ya=M,qt(e),l&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(a===null||y||Ya||gt||Hl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){y=a=t;try{if(i=y.stateNode,n)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=y.stateNode;var Q=y.memoizedProps.style,k=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;h.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(ce){Qe(y,y.return,ce)}}}else if(t.tag===6){if(a===null){y=t;try{y.stateNode.nodeValue=n?"":y.memoizedProps}catch(ce){Qe(y,y.return,ce)}}}else if(t.tag===18){if(a===null){y=t;try{var H=y.stateNode;n?sh(H,!0):sh(y.stateNode,!1)}catch(ce){Qe(y,y.return,ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,gs(e,a))));break;case 19:Bt(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,gs(e,l)));break;case 30:break;case 21:break;default:Bt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(cf(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var n=a.stateNode,i=Cc(e);xs(e,i,n);break;case 5:var o=a.stateNode;a.flags&32&&(Kl(o,""),a.flags&=-33);var h=Cc(e);xs(e,h,o);break;case 3:case 4:var y=a.stateNode.containerInfo,M=Cc(e);Ac(e,M,y);break;default:throw Error(u(161))}}catch(V){Qe(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Xa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)df(e,t.alternate,t),t=t.sibling}function Hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:rl(4,t,t.return),Hl(t);break;case 1:Ca(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&sf(t,t.return,a),Hl(t);break;case 27:mi(t.stateNode);case 26:case 5:Ca(t,t.return),Hl(t);break;case 22:t.memoizedState===null&&Hl(t);break;case 30:Hl(t);break;default:Hl(t)}e=e.sibling}}function Qa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,n=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:Qa(n,i,a),ii(4,i);break;case 1:if(Qa(n,i,a),l=i,n=l.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(M){Qe(l,l.return,M)}if(l=i,n=l.updateQueue,n!==null){var h=l.stateNode;try{var y=n.shared.hiddenCallbacks;if(y!==null)for(n.shared.hiddenCallbacks=null,n=0;n<y.length;n++)$o(y[n],h)}catch(M){Qe(l,l.return,M)}}a&&o&64&&nf(i),si(i,i.return);break;case 27:uf(i);case 26:case 5:Qa(n,i,a),a&&l===null&&o&4&&rf(i),si(i,i.return);break;case 12:Qa(n,i,a);break;case 31:Qa(n,i,a),a&&o&4&&pf(n,i);break;case 13:Qa(n,i,a),a&&o&4&&mf(n,i);break;case 22:i.memoizedState===null&&Qa(n,i,a),si(i,i.return);break;case 30:break;default:Qa(n,i,a)}t=t.sibling}}function _c(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Zn(a))}function Rc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zn(e))}function xa(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)yf(e,t,a,l),t=t.sibling}function yf(e,t,a,l){var n=t.flags;switch(t.tag){case 0:case 11:case 15:xa(e,t,a,l),n&2048&&ii(9,t);break;case 1:xa(e,t,a,l);break;case 3:xa(e,t,a,l),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zn(e)));break;case 12:if(n&2048){xa(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(y){Qe(t,t.return,y)}}else xa(e,t,a,l);break;case 31:xa(e,t,a,l);break;case 13:xa(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?xa(e,t,a,l):ri(e,t):i._visibility&2?xa(e,t,a,l):(i._visibility|=2,mn(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),n&2048&&_c(o,t);break;case 24:xa(e,t,a,l),n&2048&&Rc(t.alternate,t);break;default:xa(e,t,a,l)}}function mn(e,t,a,l,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=a,y=l,M=o.flags;switch(o.tag){case 0:case 11:case 15:mn(i,o,h,y,n),ii(8,o);break;case 23:break;case 22:var V=o.stateNode;o.memoizedState!==null?V._visibility&2?mn(i,o,h,y,n):ri(i,o):(V._visibility|=2,mn(i,o,h,y,n)),n&&M&2048&&_c(o.alternate,o);break;case 24:mn(i,o,h,y,n),n&&M&2048&&Rc(o.alternate,o);break;default:mn(i,o,h,y,n)}t=t.sibling}}function ri(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,n=l.flags;switch(l.tag){case 22:ri(a,l),n&2048&&_c(l.alternate,l);break;case 24:ri(a,l),n&2048&&Rc(l.alternate,l);break;default:ri(a,l)}t=t.sibling}}var ci=8192;function xn(e,t,a){if(e.subtreeFlags&ci)for(e=e.child;e!==null;)vf(e,t,a),e=e.sibling}function vf(e,t,a){switch(e.tag){case 26:xn(e,t,a),e.flags&ci&&e.memoizedState!==null&&G0(a,ma,e.memoizedState,e.memoizedProps);break;case 5:xn(e,t,a);break;case 3:case 4:var l=ma;ma=Ms(e.stateNode.containerInfo),xn(e,t,a),ma=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=ci,ci=16777216,xn(e,t,a),ci=l):xn(e,t,a));break;default:xn(e,t,a)}}function bf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ui(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];jt=l,Sf(l,e)}bf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wf(e),e=e.sibling}function wf(e){switch(e.tag){case 0:case 11:case 15:ui(e),e.flags&2048&&rl(9,e,e.return);break;case 3:ui(e);break;case 12:ui(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ys(e)):ui(e);break;default:ui(e)}}function ys(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];jt=l,Sf(l,e)}bf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:rl(8,t,t.return),ys(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ys(t));break;default:ys(t)}e=e.sibling}}function Sf(e,t){for(;jt!==null;){var a=jt;switch(a.tag){case 0:case 11:case 15:rl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Zn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,jt=l;else e:for(a=e;jt!==null;){l=jt;var n=l.sibling,i=l.return;if(ff(l),l===a){jt=null;break e}if(n!==null){n.return=i,jt=n;break e}jt=i}}}var n0={getCacheForType:function(e){var t=At(pt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return At(pt).controller.signal}},i0=typeof WeakMap=="function"?WeakMap:Map,Ye=0,We=null,Te=null,ze=0,Xe=0,$t=null,cl=!1,gn=!1,Mc=!1,Za=0,ut=0,ul=0,Bl=0,zc=0,Kt=0,yn=0,oi=null,Vt=null,Oc=!1,vs=0,jf=0,bs=1/0,ws=null,ol=null,vt=0,dl=null,vn=null,$a=0,Dc=0,kc=null,Nf=null,di=0,Uc=null;function Jt(){return(Ye&2)!==0&&ze!==0?ze&-ze:z.T!==null?Yc():He()}function Ef(){if(Kt===0)if((ze&536870912)===0||De){var e=Sa;Sa<<=1,(Sa&3932160)===0&&(Sa=262144),Kt=e}else Kt=536870912;return e=Qt.current,e!==null&&(e.flags|=32),Kt}function Yt(e,t,a){(e===We&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(bn(e,0),fl(e,ze,Kt,!1)),Le(e,a),((Ye&2)===0||e!==We)&&(e===We&&((Ye&2)===0&&(Bl|=a),ut===4&&fl(e,ze,Kt,!1)),Aa(e))}function Cf(e,t,a){if((Ye&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||A(e,t),n=l?c0(e,t):Hc(e,t,!0),i=l;do{if(n===0){gn&&!l&&fl(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!s0(a)){n=Hc(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;n=oi;var y=h.current.memoizedState.isDehydrated;if(y&&(bn(h,o).flags|=256),o=Hc(h,o,!1),o!==2){if(Mc&&!y){h.errorRecoveryDisabledLanes|=i,Bl|=i,n=4;break e}i=Vt,Vt=n,i!==null&&(Vt===null?Vt=i:Vt.push.apply(Vt,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){bn(e,0),fl(e,t,0,!0);break}e:{switch(l=e,i=n,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:fl(l,t,Kt,!cl);break e;case 2:Vt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(n=vs+300-wt(),10<n)){if(fl(l,t,Kt,!cl),It(l,0,!0)!==0)break e;$a=t,l.timeoutHandle=lh(Af.bind(null,l,a,Vt,ws,Oc,t,Kt,Bl,yn,cl,i,"Throttled",-0,0),n);break e}Af(l,a,Vt,ws,Oc,t,Kt,Bl,yn,cl,i,null,-0,0)}}break}while(!0);Aa(e)}function Af(e,t,a,l,n,i,o,h,y,M,V,Q,k,H){if(e.timeoutHandle=-1,Q=t.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:za},vf(t,i,Q);var ce=(i&62914560)===i?vs-wt():(i&4194048)===i?jf-wt():0;if(ce=X0(Q,ce),ce!==null){$a=i,e.cancelPendingCommit=ce(kf.bind(null,e,t,i,a,l,n,o,h,y,V,Q,null,k,H)),fl(e,i,o,!M);return}}kf(e,t,i,a,l,n,o,h,y)}function s0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var n=a[l],i=n.getSnapshot;n=n.value;try{if(!Gt(i(),n))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function fl(e,t,a,l){t&=~zc,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var n=t;0<n;){var i=31-Re(n),o=1<<i;l[i]=-1,n&=~o}a!==0&&Et(e,a,t)}function Ss(){return(Ye&6)===0?(fi(0),!1):!0}function Lc(){if(Te!==null){if(Xe===0)var e=Te.return;else e=Te,Ua=Rl=null,Pr(e),on=null,Kn=0,e=Te;for(;e!==null;)lf(e.alternate,e),e=e.return;Te=null}}function bn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,C0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),$a=0,Lc(),We=e,Te=a=Da(e.current,null),ze=t,Xe=0,$t=null,cl=!1,gn=A(e,t),Mc=!1,yn=Kt=zc=Bl=ul=ut=0,Vt=oi=null,Oc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var n=31-Re(l),i=1<<n;t|=e[n],l&=~i}return Za=t,Gi(),a}function Tf(e,t){Ne=null,z.H=ai,t===un||t===Fi?(t=Go(),Xe=3):t===Vr?(t=Go(),Xe=4):Xe=t===mc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,$t=t,Te===null&&(ut=1,ds(e,aa(t,e.current)))}function _f(){var e=Qt.current;return e===null?!0:(ze&4194048)===ze?sa===null:(ze&62914560)===ze||(ze&536870912)!==0?e===sa:!1}function Rf(){var e=z.H;return z.H=ai,e===null?ai:e}function Mf(){var e=z.A;return z.A=n0,e}function js(){ut=4,cl||(ze&4194048)!==ze&&Qt.current!==null||(gn=!0),(ul&134217727)===0&&(Bl&134217727)===0||We===null||fl(We,ze,Kt,!1)}function Hc(e,t,a){var l=Ye;Ye|=2;var n=Rf(),i=Mf();(We!==e||ze!==t)&&(ws=null,bn(e,t)),t=!1;var o=ut;e:do try{if(Xe!==0&&Te!==null){var h=Te,y=$t;switch(Xe){case 8:Lc(),o=6;break e;case 3:case 2:case 9:case 6:Qt.current===null&&(t=!0);var M=Xe;if(Xe=0,$t=null,wn(e,h,y,M),a&&gn){o=0;break e}break;default:M=Xe,Xe=0,$t=null,wn(e,h,y,M)}}r0(),o=ut;break}catch(V){Tf(e,V)}while(!0);return t&&e.shellSuspendCounter++,Ua=Rl=null,Ye=l,z.H=n,z.A=i,Te===null&&(We=null,ze=0,Gi()),o}function r0(){for(;Te!==null;)zf(Te)}function c0(e,t){var a=Ye;Ye|=2;var l=Rf(),n=Mf();We!==e||ze!==t?(ws=null,bs=wt()+500,bn(e,t)):gn=A(e,t);e:do try{if(Xe!==0&&Te!==null){t=Te;var i=$t;t:switch(Xe){case 1:Xe=0,$t=null,wn(e,t,i,1);break;case 2:case 9:if(Vo(i)){Xe=0,$t=null,Of(t);break}t=function(){Xe!==2&&Xe!==9||We!==e||(Xe=7),Aa(e)},i.then(t,t);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Vo(i)?(Xe=0,$t=null,Of(t)):(Xe=0,$t=null,wn(e,t,i,7));break;case 5:var o=null;switch(Te.tag){case 26:o=Te.memoizedState;case 5:case 27:var h=Te;if(o?yh(o):h.stateNode.complete){Xe=0,$t=null;var y=h.sibling;if(y!==null)Te=y;else{var M=h.return;M!==null?(Te=M,Ns(M)):Te=null}break t}}Xe=0,$t=null,wn(e,t,i,5);break;case 6:Xe=0,$t=null,wn(e,t,i,6);break;case 8:Lc(),ut=6;break e;default:throw Error(u(462))}}u0();break}catch(V){Tf(e,V)}while(!0);return Ua=Rl=null,z.H=l,z.A=n,Ye=a,Te!==null?0:(We=null,ze=0,Gi(),ut)}function u0(){for(;Te!==null&&!Nt();)zf(Te)}function zf(e){var t=tf(e.alternate,e,Za);e.memoizedProps=e.pendingProps,t===null?Ns(e):Te=t}function Of(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Jd(a,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=Jd(a,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Pr(t);default:lf(a,t),t=Te=Ro(t,Za),t=tf(a,t,Za)}e.memoizedProps=e.pendingProps,t===null?Ns(e):Te=t}function wn(e,t,a,l){Ua=Rl=null,Pr(t),on=null,Kn=0;var n=t.return;try{if(Fm(e,n,t,a,ze)){ut=1,ds(e,aa(a,e.current)),Te=null;return}}catch(i){if(n!==null)throw Te=n,i;ut=1,ds(e,aa(a,e.current)),Te=null;return}t.flags&32768?(De||l===1?e=!0:gn||(ze&536870912)!==0?e=!1:(cl=e=!0,(l===2||l===9||l===3||l===6)&&(l=Qt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Df(t,e)):Ns(t)}function Ns(e){var t=e;do{if((t.flags&32768)!==0){Df(t,cl);return}e=t.return;var a=e0(t.alternate,t,Za);if(a!==null){Te=a;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);ut===0&&(ut=5)}function Df(e,t){do{var a=t0(e.alternate,e);if(a!==null){a.flags&=32767,Te=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=a}while(e!==null);ut=6,Te=null}function kf(e,t,a,l,n,i,o,h,y){e.cancelPendingCommit=null;do Es();while(vt!==0);if((Ye&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=Cr,st(e,a,i,o,h,y),e===We&&(Te=We=null,ze=0),vn=t,dl=e,$a=a,Dc=i,kc=n,Nf=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,h0(Ra,function(){return qf(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=z.T,z.T=null,n=L.p,L.p=2,o=Ye,Ye|=4;try{a0(e,t,a)}finally{Ye=o,L.p=n,z.T=l}}vt=1,Uf(),Lf(),Hf()}}function Uf(){if(vt===1){vt=0;var e=dl,t=vn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null;var l=L.p;L.p=2;var n=Ye;Ye|=4;try{xf(t,e);var i=Wc,o=wo(e.containerInfo),h=i.focusedElem,y=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&bo(h.ownerDocument.documentElement,h)){if(y!==null&&wr(h)){var M=y.start,V=y.end;if(V===void 0&&(V=M),"selectionStart"in h)h.selectionStart=M,h.selectionEnd=Math.min(V,h.value.length);else{var Q=h.ownerDocument||document,k=Q&&Q.defaultView||window;if(k.getSelection){var H=k.getSelection(),ce=h.textContent.length,ye=Math.min(y.start,ce),Je=y.end===void 0?ye:Math.min(y.end,ce);!H.extend&&ye>Je&&(o=Je,Je=ye,ye=o);var T=vo(h,ye),N=vo(h,Je);if(T&&N&&(H.rangeCount!==1||H.anchorNode!==T.node||H.anchorOffset!==T.offset||H.focusNode!==N.node||H.focusOffset!==N.offset)){var R=Q.createRange();R.setStart(T.node,T.offset),H.removeAllRanges(),ye>Je?(H.addRange(R),H.extend(N.node,N.offset)):(R.setEnd(N.node,N.offset),H.addRange(R))}}}}for(Q=[],H=h;H=H.parentNode;)H.nodeType===1&&Q.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<Q.length;h++){var G=Q[h];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Ls=!!Jc,Wc=Jc=null}finally{Ye=n,L.p=l,z.T=a}}e.current=t,vt=2}}function Lf(){if(vt===2){vt=0;var e=dl,t=vn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=z.T,z.T=null;var l=L.p;L.p=2;var n=Ye;Ye|=4;try{df(e,t.alternate,t)}finally{Ye=n,L.p=l,z.T=a}}vt=3}}function Hf(){if(vt===4||vt===3){vt=0,Ft();var e=dl,t=vn,a=$a,l=Nf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,vn=dl=null,Bf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(ol=null),K(a),t=t.stateNode,oe&&typeof oe.onCommitFiberRoot=="function")try{oe.onCommitFiberRoot(ae,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=z.T,n=L.p,L.p=2,z.T=null;try{for(var i=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];i(h.value,{componentStack:h.stack})}}finally{z.T=t,L.p=n}}($a&3)!==0&&Es(),Aa(e),n=e.pendingLanes,(a&261930)!==0&&(n&42)!==0?e===Uc?di++:(di=0,Uc=e):di=0,fi(0)}}function Bf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zn(t)))}function Es(){return Uf(),Lf(),Hf(),qf()}function qf(){if(vt!==5)return!1;var e=dl,t=Dc;Dc=0;var a=K($a),l=z.T,n=L.p;try{L.p=32>a?32:a,z.T=null,a=kc,kc=null;var i=dl,o=$a;if(vt=0,vn=dl=null,$a=0,(Ye&6)!==0)throw Error(u(331));var h=Ye;if(Ye|=4,wf(i.current),yf(i,i.current,o,a),Ye=h,fi(0,!1),oe&&typeof oe.onPostCommitFiberRoot=="function")try{oe.onPostCommitFiberRoot(ae,i)}catch{}return!0}finally{L.p=n,z.T=l,Bf(e,t)}}function Vf(e,t,a){t=aa(a,t),t=pc(e.stateNode,t,2),e=nl(e,t,2),e!==null&&(Le(e,2),Aa(e))}function Qe(e,t,a){if(e.tag===3)Vf(e,e,a);else for(;t!==null;){if(t.tag===3){Vf(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ol===null||!ol.has(l))){e=aa(a,e),a=Vd(2),l=nl(t,a,2),l!==null&&(Yd(a,l,t,e),Le(l,2),Aa(l));break}}t=t.return}}function Bc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new i0;var n=new Set;l.set(t,n)}else n=l.get(t),n===void 0&&(n=new Set,l.set(t,n));n.has(a)||(Mc=!0,n.add(a),e=o0.bind(null,e,t,a),t.then(e,e))}function o0(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,We===e&&(ze&a)===a&&(ut===4||ut===3&&(ze&62914560)===ze&&300>wt()-vs?(Ye&2)===0&&bn(e,0):zc|=a,yn===ze&&(yn=0)),Aa(e)}function Yf(e,t){t===0&&(t=J()),e=Al(e,t),e!==null&&(Le(e,t),Aa(e))}function d0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Yf(e,a)}function f0(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,n=e.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Yf(e,a)}function h0(e,t){return ue(e,t)}var Cs=null,Sn=null,qc=!1,As=!1,Vc=!1,hl=0;function Aa(e){e!==Sn&&e.next===null&&(Sn===null?Cs=Sn=e:Sn=Sn.next=e),As=!0,qc||(qc=!0,m0())}function fi(e,t){if(!Vc&&As){Vc=!0;do for(var a=!1,l=Cs;l!==null;){if(e!==0){var n=l.pendingLanes;if(n===0)var i=0;else{var o=l.suspendedLanes,h=l.pingedLanes;i=(1<<31-Re(42|e)+1)-1,i&=n&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Zf(l,i))}else i=ze,i=It(l,l===We?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||A(l,i)||(a=!0,Zf(l,i));l=l.next}while(a);Vc=!1}}function p0(){Gf()}function Gf(){As=qc=!1;var e=0;hl!==0&&E0()&&(e=hl);for(var t=wt(),a=null,l=Cs;l!==null;){var n=l.next,i=Xf(l,t);i===0?(l.next=null,a===null?Cs=n:a.next=n,n===null&&(Sn=a)):(a=l,(e!==0||(i&3)!==0)&&(As=!0)),l=n}vt!==0&&vt!==5||fi(e),hl!==0&&(hl=0)}function Xf(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-Re(i),h=1<<o,y=n[o];y===-1?((h&a)===0||(h&l)!==0)&&(n[o]=j(h,t)):y<=t&&(e.expiredLanes|=h),i&=~h}if(t=We,a=ze,a=It(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&we(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||A(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&we(l),K(a)){case 2:case 8:a=Vl;break;case 32:a=Ra;break;case 268435456:a=da;break;default:a=Ra}return l=Qf.bind(null,e),a=ue(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&we(l),e.callbackPriority=2,e.callbackNode=null,2}function Qf(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Es()&&e.callbackNode!==a)return null;var l=ze;return l=It(e,e===We?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Cf(e,l,t),Xf(e,wt()),e.callbackNode!=null&&e.callbackNode===a?Qf.bind(null,e):null)}function Zf(e,t){if(Es())return null;Cf(e,t,!0)}function m0(){A0(function(){(Ye&6)!==0?ue(Ut,p0):Gf()})}function Yc(){if(hl===0){var e=rn;e===0&&(e=fa,fa<<=1,(fa&261888)===0&&(fa=256)),hl=e}return hl}function $f(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ki(""+e)}function Kf(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function x0(e,t,a,l,n){if(t==="submit"&&a&&a.stateNode===n){var i=$f((n[ht]||null).action),o=l.submitter;o&&(t=(t=o[ht]||null)?$f(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new Bi("action","action",null,l,n);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(hl!==0){var y=o?Kf(n,o):new FormData(n);cc(a,{pending:!0,data:y,method:n.method,action:i},null,y)}}else typeof i=="function"&&(h.preventDefault(),y=o?Kf(n,o):new FormData(n),cc(a,{pending:!0,data:y,method:n.method,action:i},i,y))},currentTarget:n}]})}}for(var Gc=0;Gc<Er.length;Gc++){var Xc=Er[Gc],g0=Xc.toLowerCase(),y0=Xc[0].toUpperCase()+Xc.slice(1);pa(g0,"on"+y0)}pa(No,"onAnimationEnd"),pa(Eo,"onAnimationIteration"),pa(Co,"onAnimationStart"),pa("dblclick","onDoubleClick"),pa("focusin","onFocus"),pa("focusout","onBlur"),pa(Dm,"onTransitionRun"),pa(km,"onTransitionStart"),pa(Um,"onTransitionCancel"),pa(Ao,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),v0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hi));function Jf(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],n=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],y=h.instance,M=h.currentTarget;if(h=h.listener,y!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=M;try{i(n)}catch(V){Yi(V)}n.currentTarget=null,i=y}else for(o=0;o<l.length;o++){if(h=l[o],y=h.instance,M=h.currentTarget,h=h.listener,y!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=M;try{i(n)}catch(V){Yi(V)}n.currentTarget=null,i=y}}}}function _e(e,t){var a=t[ha];a===void 0&&(a=t[ha]=new Set);var l=e+"__bubble";a.has(l)||(Wf(t,e,2,!1),a.add(l))}function Qc(e,t,a){var l=0;t&&(l|=4),Wf(a,e,l,t)}var Ts="_reactListening"+Math.random().toString(36).slice(2);function Zc(e){if(!e[Ts]){e[Ts]=!0,Vu.forEach(function(a){a!=="selectionchange"&&(v0.has(a)||Qc(a,!1,e),Qc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ts]||(t[Ts]=!0,Qc("selectionchange",!1,t))}}function Wf(e,t,a,l){switch(Eh(t)){case 2:var n=$0;break;case 8:n=K0;break;default:n=ru}a=n.bind(null,t,a,e),n=void 0,!fr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),l?n!==void 0?e.addEventListener(t,a,{capture:!0,passive:n}):e.addEventListener(t,a,!0):n!==void 0?e.addEventListener(t,a,{passive:n}):e.addEventListener(t,a,!1)}function $c(e,t,a,l,n){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===n)break;if(o===4)for(o=l.return;o!==null;){var y=o.tag;if((y===3||y===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;h!==null;){if(o=Gl(h),o===null)return;if(y=o.tag,y===5||y===6||y===26||y===27){l=i=o;continue e}h=h.parentNode}}l=l.return}Pu(function(){var M=i,V=or(a),Q=[];e:{var k=To.get(e);if(k!==void 0){var H=Bi,ce=e;switch(e){case"keypress":if(Li(a)===0)break e;case"keydown":case"keyup":H=fm;break;case"focusin":ce="focus",H=xr;break;case"focusout":ce="blur",H=xr;break;case"beforeblur":case"afterblur":H=xr;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=ao;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=em;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=mm;break;case No:case Eo:case Co:H=lm;break;case Ao:H=gm;break;case"scroll":case"scrollend":H=Ip;break;case"wheel":H=vm;break;case"copy":case"cut":case"paste":H=im;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=no;break;case"toggle":case"beforetoggle":H=wm}var ye=(t&4)!==0,Je=!ye&&(e==="scroll"||e==="scrollend"),T=ye?k!==null?k+"Capture":null:k;ye=[];for(var N=M,R;N!==null;){var G=N;if(R=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||R===null||T===null||(G=kn(N,T),G!=null&&ye.push(pi(N,G,R))),Je)break;N=N.return}0<ye.length&&(k=new H(k,ce,null,a,V),Q.push({event:k,listeners:ye}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",k&&a!==ur&&(ce=a.relatedTarget||a.fromElement)&&(Gl(ce)||ce[Me]))break e;if((H||k)&&(k=V.window===V?V:(k=V.ownerDocument)?k.defaultView||k.parentWindow:window,H?(ce=a.relatedTarget||a.toElement,H=M,ce=ce?Gl(ce):null,ce!==null&&(Je=p(ce),ye=ce.tag,ce!==Je||ye!==5&&ye!==27&&ye!==6)&&(ce=null)):(H=null,ce=M),H!==ce)){if(ye=ao,G="onMouseLeave",T="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ye=no,G="onPointerLeave",T="onPointerEnter",N="pointer"),Je=H==null?k:Dn(H),R=ce==null?k:Dn(ce),k=new ye(G,N+"leave",H,a,V),k.target=Je,k.relatedTarget=R,G=null,Gl(V)===M&&(ye=new ye(T,N+"enter",ce,a,V),ye.target=R,ye.relatedTarget=Je,G=ye),Je=G,H&&ce)t:{for(ye=b0,T=H,N=ce,R=0,G=T;G;G=ye(G))R++;G=0;for(var xe=N;xe;xe=ye(xe))G++;for(;0<R-G;)T=ye(T),R--;for(;0<G-R;)N=ye(N),G--;for(;R--;){if(T===N||N!==null&&T===N.alternate){ye=T;break t}T=ye(T),N=ye(N)}ye=null}else ye=null;H!==null&&Ff(Q,k,H,ye,!1),ce!==null&&Je!==null&&Ff(Q,Je,ce,ye,!0)}}e:{if(k=M?Dn(M):window,H=k.nodeName&&k.nodeName.toLowerCase(),H==="select"||H==="input"&&k.type==="file")var qe=ho;else if(oo(k))if(po)qe=Mm;else{qe=_m;var de=Tm}else H=k.nodeName,!H||H.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?M&&cr(M.elementType)&&(qe=ho):qe=Rm;if(qe&&(qe=qe(e,M))){fo(Q,qe,a,V);break e}de&&de(e,k,M),e==="focusout"&&M&&k.type==="number"&&M.memoizedProps.value!=null&&rr(k,"number",k.value)}switch(de=M?Dn(M):window,e){case"focusin":(oo(de)||de.contentEditable==="true")&&(Il=de,Sr=M,Gn=null);break;case"focusout":Gn=Sr=Il=null;break;case"mousedown":jr=!0;break;case"contextmenu":case"mouseup":case"dragend":jr=!1,So(Q,a,V);break;case"selectionchange":if(Om)break;case"keydown":case"keyup":So(Q,a,V)}var Ae;if(yr)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Fl?co(e,a)&&(Oe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Oe="onCompositionStart");Oe&&(io&&a.locale!=="ko"&&(Fl||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Fl&&(Ae=eo()):(Fa=V,hr="value"in Fa?Fa.value:Fa.textContent,Fl=!0)),de=_s(M,Oe),0<de.length&&(Oe=new lo(Oe,e,null,a,V),Q.push({event:Oe,listeners:de}),Ae?Oe.data=Ae:(Ae=uo(a),Ae!==null&&(Oe.data=Ae)))),(Ae=jm?Nm(e,a):Em(e,a))&&(Oe=_s(M,"onBeforeInput"),0<Oe.length&&(de=new lo("onBeforeInput","beforeinput",null,a,V),Q.push({event:de,listeners:Oe}),de.data=Ae)),x0(Q,e,M,a,V)}Jf(Q,t)})}function pi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function _s(e,t){for(var a=t+"Capture",l=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=kn(e,a),n!=null&&l.unshift(pi(e,n,i)),n=kn(e,t),n!=null&&l.push(pi(e,n,i))),e.tag===3)return l;e=e.return}return[]}function b0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ff(e,t,a,l,n){for(var i=t._reactName,o=[];a!==null&&a!==l;){var h=a,y=h.alternate,M=h.stateNode;if(h=h.tag,y!==null&&y===l)break;h!==5&&h!==26&&h!==27||M===null||(y=M,n?(M=kn(a,i),M!=null&&o.unshift(pi(a,M,y))):n||(M=kn(a,i),M!=null&&o.push(pi(a,M,y)))),a=a.return}o.length!==0&&e.push({event:t,listeners:o})}var w0=/\r\n?/g,S0=/\u0000|\uFFFD/g;function If(e){return(typeof e=="string"?e:""+e).replace(w0,`
9
+ `).replace(S0,"")}function Pf(e,t){return t=If(t),If(e)===t}function Ke(e,t,a,l,n,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Kl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Kl(e,""+l);break;case"className":Oi(e,"class",l);break;case"tabIndex":Oi(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Oi(e,a,l);break;case"style":Fu(e,l,i);break;case"data":if(t!=="object"){Oi(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ki(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&Ke(e,t,"name",n.name,n,null),Ke(e,t,"formEncType",n.formEncType,n,null),Ke(e,t,"formMethod",n.formMethod,n,null),Ke(e,t,"formTarget",n.formTarget,n,null)):(Ke(e,t,"encType",n.encType,n,null),Ke(e,t,"method",n.method,n,null),Ke(e,t,"target",n.target,n,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ki(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=za);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=ki(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":_e("beforetoggle",e),_e("toggle",e),zi(e,"popover",l);break;case"xlinkActuate":Ma(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ma(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ma(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ma(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ma(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ma(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ma(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ma(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ma(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":zi(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Wp.get(a)||a,zi(e,a,l))}}function Kc(e,t,a,l,n,i){switch(a){case"style":Fu(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Kl(e,l):(typeof l=="number"||typeof l=="bigint")&&Kl(e,""+l);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"onClick":l!=null&&(e.onclick=za);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yu.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),t=a.slice(2,n?a.length-7:void 0),i=e[ht]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,n);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):zi(e,a,l)}}}function _t(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("load",e);var l=!1,n=!1,i;for(i in a)if(a.hasOwnProperty(i)){var o=a[i];if(o!=null)switch(i){case"src":l=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ke(e,t,i,o,a,null)}}n&&Ke(e,t,"srcSet",a.srcSet,a,null),l&&Ke(e,t,"src",a.src,a,null);return;case"input":_e("invalid",e);var h=i=o=n=null,y=null,M=null;for(l in a)if(a.hasOwnProperty(l)){var V=a[l];if(V!=null)switch(l){case"name":n=V;break;case"type":o=V;break;case"checked":y=V;break;case"defaultChecked":M=V;break;case"value":i=V;break;case"defaultValue":h=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(u(137,t));break;default:Ke(e,t,l,V,a,null)}}$u(e,i,h,y,M,o,n,!1);return;case"select":_e("invalid",e),l=o=i=null;for(n in a)if(a.hasOwnProperty(n)&&(h=a[n],h!=null))switch(n){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:Ke(e,t,n,h,a,null)}t=i,a=o,e.multiple=!!l,t!=null?$l(e,!!l,t,!1):a!=null&&$l(e,!!l,a,!0);return;case"textarea":_e("invalid",e),i=n=l=null;for(o in a)if(a.hasOwnProperty(o)&&(h=a[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":n=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(u(91));break;default:Ke(e,t,o,h,a,null)}Ju(e,l,n,i);return;case"option":for(y in a)a.hasOwnProperty(y)&&(l=a[y],l!=null)&&(y==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ke(e,t,y,l,a,null));return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(l=0;l<hi.length;l++)_e(hi[l],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(M in a)if(a.hasOwnProperty(M)&&(l=a[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ke(e,t,M,l,a,null)}return;default:if(cr(t)){for(V in a)a.hasOwnProperty(V)&&(l=a[V],l!==void 0&&Kc(e,t,V,l,a,void 0));return}}for(h in a)a.hasOwnProperty(h)&&(l=a[h],l!=null&&Ke(e,t,h,l,a,null))}function j0(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,o=null,h=null,y=null,M=null,V=null;for(H in a){var Q=a[H];if(a.hasOwnProperty(H)&&Q!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":y=Q;default:l.hasOwnProperty(H)||Ke(e,t,H,null,l,Q)}}for(var k in l){var H=l[k];if(Q=a[k],l.hasOwnProperty(k)&&(H!=null||Q!=null))switch(k){case"type":i=H;break;case"name":n=H;break;case"checked":M=H;break;case"defaultChecked":V=H;break;case"value":o=H;break;case"defaultValue":h=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(u(137,t));break;default:H!==Q&&Ke(e,t,k,H,l,Q)}}sr(e,o,h,y,M,V,i,n);return;case"select":H=o=h=k=null;for(i in a)if(y=a[i],a.hasOwnProperty(i)&&y!=null)switch(i){case"value":break;case"multiple":H=y;default:l.hasOwnProperty(i)||Ke(e,t,i,null,l,y)}for(n in l)if(i=l[n],y=a[n],l.hasOwnProperty(n)&&(i!=null||y!=null))switch(n){case"value":k=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==y&&Ke(e,t,n,i,l,y)}t=h,a=o,l=H,k!=null?$l(e,!!a,k,!1):!!l!=!!a&&(t!=null?$l(e,!!a,t,!0):$l(e,!!a,a?[]:"",!1));return;case"textarea":H=k=null;for(h in a)if(n=a[h],a.hasOwnProperty(h)&&n!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Ke(e,t,h,null,l,n)}for(o in l)if(n=l[o],i=a[o],l.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":k=n;break;case"defaultValue":H=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(u(91));break;default:n!==i&&Ke(e,t,o,n,l,i)}Ku(e,k,H);return;case"option":for(var ce in a)k=a[ce],a.hasOwnProperty(ce)&&k!=null&&!l.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:Ke(e,t,ce,null,l,k));for(y in l)k=l[y],H=a[y],l.hasOwnProperty(y)&&k!==H&&(k!=null||H!=null)&&(y==="selected"?e.selected=k&&typeof k!="function"&&typeof k!="symbol":Ke(e,t,y,k,l,H));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ye in a)k=a[ye],a.hasOwnProperty(ye)&&k!=null&&!l.hasOwnProperty(ye)&&Ke(e,t,ye,null,l,k);for(M in l)if(k=l[M],H=a[M],l.hasOwnProperty(M)&&k!==H&&(k!=null||H!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(137,t));break;default:Ke(e,t,M,k,l,H)}return;default:if(cr(t)){for(var Je in a)k=a[Je],a.hasOwnProperty(Je)&&k!==void 0&&!l.hasOwnProperty(Je)&&Kc(e,t,Je,void 0,l,k);for(V in l)k=l[V],H=a[V],!l.hasOwnProperty(V)||k===H||k===void 0&&H===void 0||Kc(e,t,V,k,l,H);return}}for(var T in a)k=a[T],a.hasOwnProperty(T)&&k!=null&&!l.hasOwnProperty(T)&&Ke(e,t,T,null,l,k);for(Q in l)k=l[Q],H=a[Q],!l.hasOwnProperty(Q)||k===H||k==null&&H==null||Ke(e,t,Q,k,l,H)}function eh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function N0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var n=a[l],i=n.transferSize,o=n.initiatorType,h=n.duration;if(i&&h&&eh(o)){for(o=0,h=n.responseEnd,l+=1;l<a.length;l++){var y=a[l],M=y.startTime;if(M>h)break;var V=y.transferSize,Q=y.initiatorType;V&&eh(Q)&&(y=y.responseEnd,o+=V*(y<h?1:(h-M)/(y-M)))}if(--l,t+=8*(i+o)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Jc=null,Wc=null;function Rs(e){return e.nodeType===9?e:e.ownerDocument}function th(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ah(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Fc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ic=null;function E0(){var e=window.event;return e&&e.type==="popstate"?e===Ic?!1:(Ic=e,!0):(Ic=null,!1)}var lh=typeof setTimeout=="function"?setTimeout:void 0,C0=typeof clearTimeout=="function"?clearTimeout:void 0,nh=typeof Promise=="function"?Promise:void 0,A0=typeof queueMicrotask=="function"?queueMicrotask:typeof nh<"u"?function(e){return nh.resolve(null).then(e).catch(T0)}:lh;function T0(e){setTimeout(function(){throw e})}function pl(e){return e==="head"}function ih(e,t){var a=t,l=0;do{var n=a.nextSibling;if(e.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(n),Cn(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")mi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,mi(a);for(var i=a.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[On]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=o}}else a==="body"&&mi(e.ownerDocument.body);a=n}while(a);Cn(t)}function sh(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Pc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Pc(a),nr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function _0(e,t,a,l){for(;e.nodeType===1;){var n=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[On])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=ra(e.nextSibling),e===null)break}return null}function R0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ra(e.nextSibling),e===null))return null;return e}function rh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ra(e.nextSibling),e===null))return null;return e}function eu(e){return e.data==="$?"||e.data==="$~"}function tu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function M0(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function ra(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var au=null;function ch(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ra(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function uh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function oh(e,t,a){switch(t=Rs(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function mi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);nr(e)}var ca=new Map,dh=new Set;function Ms(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ka=L.d;L.d={f:z0,r:O0,D:D0,C:k0,L:U0,m:L0,X:B0,S:H0,M:q0};function z0(){var e=Ka.f(),t=Ss();return e||t}function O0(e){var t=Xl(e);t!==null&&t.tag===5&&t.type==="form"?Ad(t):Ka.r(e)}var jn=typeof document>"u"?null:document;function fh(e,t,a){var l=jn;if(l&&typeof t=="string"&&t){var n=ea(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),dh.has(n)||(dh.add(n),e={rel:e,crossOrigin:a,href:t},l.querySelector(n)===null&&(t=l.createElement("link"),_t(t,"link",e),St(t),l.head.appendChild(t)))}}function D0(e){Ka.D(e),fh("dns-prefetch",e,null)}function k0(e,t){Ka.C(e,t),fh("preconnect",e,t)}function U0(e,t,a){Ka.L(e,t,a);var l=jn;if(l&&e&&t){var n='link[rel="preload"][as="'+ea(t)+'"]';t==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+ea(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+ea(a.imageSizes)+'"]')):n+='[href="'+ea(e)+'"]';var i=n;switch(t){case"style":i=Nn(e);break;case"script":i=En(e)}ca.has(i)||(e=S({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ca.set(i,e),l.querySelector(n)!==null||t==="style"&&l.querySelector(xi(i))||t==="script"&&l.querySelector(gi(i))||(t=l.createElement("link"),_t(t,"link",e),St(t),l.head.appendChild(t)))}}function L0(e,t){Ka.m(e,t);var a=jn;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+ea(l)+'"][href="'+ea(e)+'"]',i=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=En(e)}if(!ca.has(i)&&(e=S({rel:"modulepreload",href:e},t),ca.set(i,e),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(gi(i)))return}l=a.createElement("link"),_t(l,"link",e),St(l),a.head.appendChild(l)}}}function H0(e,t,a){Ka.S(e,t,a);var l=jn;if(l&&e){var n=Ql(l).hoistableStyles,i=Nn(e);t=t||"default";var o=n.get(i);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(xi(i)))h.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ca.get(i))&&lu(e,a);var y=o=l.createElement("link");St(y),_t(y,"link",e),y._p=new Promise(function(M,V){y.onload=M,y.onerror=V}),y.addEventListener("load",function(){h.loading|=1}),y.addEventListener("error",function(){h.loading|=2}),h.loading|=4,zs(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},n.set(i,o)}}}function B0(e,t){Ka.X(e,t);var a=jn;if(a&&e){var l=Ql(a).hoistableScripts,n=En(e),i=l.get(n);i||(i=a.querySelector(gi(n)),i||(e=S({src:e,async:!0},t),(t=ca.get(n))&&nu(e,t),i=a.createElement("script"),St(i),_t(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function q0(e,t){Ka.M(e,t);var a=jn;if(a&&e){var l=Ql(a).hoistableScripts,n=En(e),i=l.get(n);i||(i=a.querySelector(gi(n)),i||(e=S({src:e,async:!0,type:"module"},t),(t=ca.get(n))&&nu(e,t),i=a.createElement("script"),St(i),_t(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function hh(e,t,a,l){var n=(n=pe.current)?Ms(n):null;if(!n)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Nn(a.href),a=Ql(n).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Nn(a.href);var i=Ql(n).hoistableStyles,o=i.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=n.querySelector(xi(e)))&&!i._p&&(o.instance=i,o.state.loading=5),ca.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ca.set(e,a),i||V0(n,e,a,o.state))),t&&l===null)throw Error(u(528,""));return o}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=En(a),a=Ql(n).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Nn(e){return'href="'+ea(e)+'"'}function xi(e){return'link[rel="stylesheet"]['+e+"]"}function ph(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function V0(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),_t(t,"link",a),St(t),e.head.appendChild(t))}function En(e){return'[src="'+ea(e)+'"]'}function gi(e){return"script[async]"+e}function mh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+ea(a.href)+'"]');if(l)return t.instance=l,St(l),l;var n=S({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),St(l),_t(l,"style",n),zs(l,a.precedence,e),t.instance=l;case"stylesheet":n=Nn(a.href);var i=e.querySelector(xi(n));if(i)return t.state.loading|=4,t.instance=i,St(i),i;l=ph(a),(n=ca.get(n))&&lu(l,n),i=(e.ownerDocument||e).createElement("link"),St(i);var o=i;return o._p=new Promise(function(h,y){o.onload=h,o.onerror=y}),_t(i,"link",l),t.state.loading|=4,zs(i,a.precedence,e),t.instance=i;case"script":return i=En(a.src),(n=e.querySelector(gi(i)))?(t.instance=n,St(n),n):(l=a,(n=ca.get(i))&&(l=S({},a),nu(l,n)),e=e.ownerDocument||e,n=e.createElement("script"),St(n),_t(n,"link",l),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,zs(l,a.precedence,e));return t.instance}function zs(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,i=n,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)i=h;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function lu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Os=null;function xh(e,t,a){if(Os===null){var l=new Map,n=Os=new Map;n.set(a,l)}else n=Os,l=n.get(a),l||(l=new Map,n.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),n=0;n<a.length;n++){var i=a[n];if(!(i[On]||i[Fe]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(i):l.set(o,[i])}}return l}function gh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Y0(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function yh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function G0(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Nn(l.href),i=t.querySelector(xi(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ds.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,St(i);return}i=t.ownerDocument||t,l=ph(l),(n=ca.get(n))&&lu(l,n),i=i.createElement("link"),St(i);var o=i;o._p=new Promise(function(h,y){o.onload=h,o.onerror=y}),_t(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ds.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var iu=0;function X0(e,t){return e.stylesheets&&e.count===0&&Us(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&iu===0&&(iu=62500*N0());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>iu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(n)}}:null}function Ds(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Us(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ks=null;function Us(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ks=new Map,t.forEach(Q0,e),ks=null,Ds.call(e))}function Q0(e,t){if(!(t.state.loading&4)){var a=ks.get(e);if(a)var l=a.get(null);else{a=new Map,ks.set(e,a);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(a.set(o.dataset.precedence,o),l=o)}l&&a.set(null,l)}n=t.instance,o=n.getAttribute("data-precedence"),i=a.get(o)||l,i===l&&a.set(null,n),a.set(o,n),this.count++,l=Ds.bind(this),n.addEventListener("load",l),n.addEventListener("error",l),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var yi={$$typeof:$,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Z0(e,t,a,l,n,i,o,h,y){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ce(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ce(0),this.hiddenUpdates=Ce(null),this.identifierPrefix=l,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function vh(e,t,a,l,n,i,o,h,y,M,V,Q){return e=new Z0(e,t,a,o,y,M,V,Q,h),t=1,i===!0&&(t|=24),i=Xt(3,null,null,t),e.current=i,i.stateNode=e,t=Hr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},Yr(i),e}function bh(e){return e?(e=tn,e):tn}function wh(e,t,a,l,n,i){n=bh(n),l.context===null?l.context=n:l.pendingContext=n,l=ll(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=nl(e,l,t),a!==null&&(Yt(a,e,t),Wn(a,e,t))}function Sh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function su(e,t){Sh(e,t),(e=e.alternate)&&Sh(e,t)}function jh(e){if(e.tag===13||e.tag===31){var t=Al(e,67108864);t!==null&&Yt(t,e,67108864),su(e,67108864)}}function Nh(e){if(e.tag===13||e.tag===31){var t=Jt();t=Sl(t);var a=Al(e,t);a!==null&&Yt(a,e,t),su(e,t)}}var Ls=!0;function $0(e,t,a,l){var n=z.T;z.T=null;var i=L.p;try{L.p=2,ru(e,t,a,l)}finally{L.p=i,z.T=n}}function K0(e,t,a,l){var n=z.T;z.T=null;var i=L.p;try{L.p=8,ru(e,t,a,l)}finally{L.p=i,z.T=n}}function ru(e,t,a,l){if(Ls){var n=cu(l);if(n===null)$c(e,t,l,Hs,a),Ch(e,l);else if(W0(n,e,t,a,l))l.stopPropagation();else if(Ch(e,l),t&4&&-1<J0.indexOf(e)){for(;n!==null;){var i=Xl(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=tt(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var y=1<<31-Re(o);h.entanglements[1]|=y,o&=~y}Aa(i),(Ye&6)===0&&(bs=wt()+500,fi(0))}}break;case 31:case 13:h=Al(i,2),h!==null&&Yt(h,i,2),Ss(),su(i,2)}if(i=cu(l),i===null&&$c(e,t,l,Hs,a),i===n)break;n=i}n!==null&&l.stopPropagation()}else $c(e,t,l,null,a)}}function cu(e){return e=or(e),uu(e)}var Hs=null;function uu(e){if(Hs=null,e=Gl(e),e!==null){var t=p(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=w(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Hs=e,null}function Eh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ql()){case Ut:return 2;case Vl:return 8;case Ra:case Yl:return 32;case da:return 268435456;default:return 32}default:return 32}}var ou=!1,ml=null,xl=null,gl=null,vi=new Map,bi=new Map,yl=[],J0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ch(e,t){switch(e){case"focusin":case"focusout":ml=null;break;case"dragenter":case"dragleave":xl=null;break;case"mouseover":case"mouseout":gl=null;break;case"pointerover":case"pointerout":vi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bi.delete(t.pointerId)}}function wi(e,t,a,l,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[n]},t!==null&&(t=Xl(t),t!==null&&jh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function W0(e,t,a,l,n){switch(t){case"focusin":return ml=wi(ml,e,t,a,l,n),!0;case"dragenter":return xl=wi(xl,e,t,a,l,n),!0;case"mouseover":return gl=wi(gl,e,t,a,l,n),!0;case"pointerover":var i=n.pointerId;return vi.set(i,wi(vi.get(i)||null,e,t,a,l,n)),!0;case"gotpointercapture":return i=n.pointerId,bi.set(i,wi(bi.get(i)||null,e,t,a,l,n)),!0}return!1}function Ah(e){var t=Gl(e.target);if(t!==null){var a=p(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,ft(e.priority,function(){Nh(a)});return}}else if(t===31){if(t=w(a),t!==null){e.blockedOn=t,ft(e.priority,function(){Nh(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=cu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);ur=l,a.target.dispatchEvent(l),ur=null}else return t=Xl(a),t!==null&&jh(t),e.blockedOn=a,!1;t.shift()}return!0}function Th(e,t,a){Bs(e)&&a.delete(t)}function F0(){ou=!1,ml!==null&&Bs(ml)&&(ml=null),xl!==null&&Bs(xl)&&(xl=null),gl!==null&&Bs(gl)&&(gl=null),vi.forEach(Th),bi.forEach(Th)}function qs(e,t){e.blockedOn===t&&(e.blockedOn=null,ou||(ou=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,F0)))}var Vs=null;function _h(e){Vs!==e&&(Vs=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Vs===e&&(Vs=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],n=e[t+2];if(typeof l!="function"){if(uu(l||a)===null)continue;break}var i=Xl(a);i!==null&&(e.splice(t,3),t-=3,cc(i,{pending:!0,data:n,method:a.method,action:l},l,n))}}))}function Cn(e){function t(y){return qs(y,e)}ml!==null&&qs(ml,e),xl!==null&&qs(xl,e),gl!==null&&qs(gl,e),vi.forEach(t),bi.forEach(t);for(var a=0;a<yl.length;a++){var l=yl[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<yl.length&&(a=yl[0],a.blockedOn===null);)Ah(a),a.blockedOn===null&&yl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var n=a[l],i=a[l+1],o=n[ht]||null;if(typeof i=="function")o||_h(a);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[ht]||null)h=o.formAction;else if(uu(n)!==null)continue}else h=o.action;typeof h=="function"?a[l+1]=h:(a.splice(l,3),l-=3),_h(a)}}}function Rh(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function du(e){this._internalRoot=e}Ys.prototype.render=du.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=Jt();wh(a,l,e,t,null,null)},Ys.prototype.unmount=du.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wh(e.current,2,null,e,null,null),Ss(),t[Me]=null}};function Ys(e){this._internalRoot=e}Ys.prototype.unstable_scheduleHydration=function(e){if(e){var t=He();e={blockedOn:null,target:e,priority:t};for(var a=0;a<yl.length&&t!==0&&t<yl[a].priority;a++);yl.splice(a,0,e),a===0&&Ah(e)}};var Mh=c.version;if(Mh!=="19.2.3")throw Error(u(527,Mh,"19.2.3"));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=g(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var I0={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gs.isDisabled&&Gs.supportsFiber)try{ae=Gs.inject(I0),oe=Gs}catch{}}return ji.createRoot=function(e,t){if(!f(e))throw Error(u(299));var a=!1,l="",n=Ld,i=Hd,o=Bd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=vh(e,1,!1,null,null,a,l,null,n,i,o,Rh),e[Me]=t.current,Zc(e),new du(t)},ji.hydrateRoot=function(e,t,a){if(!f(e))throw Error(u(299));var l=!1,n="",i=Ld,o=Hd,h=Bd,y=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(o=a.onCaughtError),a.onRecoverableError!==void 0&&(h=a.onRecoverableError),a.formState!==void 0&&(y=a.formState)),t=vh(e,1,!0,t,a??null,l,n,y,i,o,h,Rh),t.context=bh(null),a=t.current,l=Jt(),l=Sl(l),n=ll(l),n.callback=null,nl(a,n,l),a=l,t.current.lanes=a,Le(t,a),Aa(t),e[Me]=t.current,Zc(e),new Ys(t)},ji.version="19.2.3",ji}var Vh;function ux(){if(Vh)return pu.exports;Vh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(c){console.error(c)}}return s(),pu.exports=cx(),pu.exports}var ox=ux();const dx=rp(ox);var Yh="popstate";function fx(s={}){function c(u,f){let{pathname:p,search:m,hash:w}=u.location;return Cu("",{pathname:p,search:m,hash:w},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(u,f){return typeof f=="string"?f:Ci(f)}return px(c,d,null,s)}function lt(s,c){if(s===!1||s===null||typeof s>"u")throw new Error(c)}function ga(s,c){if(!s){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function hx(){return Math.random().toString(36).substring(2,10)}function Gh(s,c){return{usr:s.state,key:s.key,idx:c}}function Cu(s,c,d=null,u){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof c=="string"?_n(c):c,state:d,key:c&&c.key||u||hx()}}function Ci({pathname:s="/",search:c="",hash:d=""}){return c&&c!=="?"&&(s+=c.charAt(0)==="?"?c:"?"+c),d&&d!=="#"&&(s+=d.charAt(0)==="#"?d:"#"+d),s}function _n(s){let c={};if(s){let d=s.indexOf("#");d>=0&&(c.hash=s.substring(d),s=s.substring(0,d));let u=s.indexOf("?");u>=0&&(c.search=s.substring(u),s=s.substring(0,u)),s&&(c.pathname=s)}return c}function px(s,c,d,u={}){let{window:f=document.defaultView,v5Compat:p=!1}=u,m=f.history,w="POP",b=null,g=E();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function E(){return(m.state||{idx:null}).idx}function S(){w="POP";let U=E(),D=U==null?null:U-g;g=U,b&&b({action:w,location:C.location,delta:D})}function _(U,D){w="PUSH";let X=Cu(C.location,U,D);g=E()+1;let $=Gh(X,g),se=C.createHref(X);try{m.pushState($,"",se)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;f.location.assign(se)}p&&b&&b({action:w,location:C.location,delta:1})}function B(U,D){w="REPLACE";let X=Cu(C.location,U,D);g=E();let $=Gh(X,g),se=C.createHref(X);m.replaceState($,"",se),p&&b&&b({action:w,location:C.location,delta:0})}function O(U){return mx(U)}let C={get action(){return w},get location(){return s(f,m)},listen(U){if(b)throw new Error("A history only accepts one active listener");return f.addEventListener(Yh,S),b=U,()=>{f.removeEventListener(Yh,S),b=null}},createHref(U){return c(f,U)},createURL:O,encodeLocation(U){let D=O(U);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:_,replace:B,go(U){return m.go(U)}};return C}function mx(s,c=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),lt(d,"No window.location.(origin|href) available to create URL");let u=typeof s=="string"?s:Ci(s);return u=u.replace(/ $/,"%20"),!c&&u.startsWith("//")&&(u=d+u),new URL(u,d)}function cp(s,c,d="/"){return xx(s,c,d,!1)}function xx(s,c,d,u){let f=typeof c=="string"?_n(c):c,p=Wa(f.pathname||"/",d);if(p==null)return null;let m=up(s);gx(m);let w=null;for(let b=0;w==null&&b<m.length;++b){let g=Tx(p);w=Cx(m[b],g,u)}return w}function up(s,c=[],d=[],u="",f=!1){let p=(m,w,b=f,g)=>{let E={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:w,route:m};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(u)&&b)return;lt(E.relativePath.startsWith(u),`Absolute route path "${E.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(u.length)}let S=Ja([u,E.relativePath]),_=d.concat(E);m.children&&m.children.length>0&&(lt(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),up(m.children,c,_,S,b)),!(m.path==null&&!m.index)&&c.push({path:S,score:Nx(S,m.index),routesMeta:_})};return s.forEach((m,w)=>{if(m.path===""||!m.path?.includes("?"))p(m,w);else for(let b of op(m.path))p(m,w,!0,b)}),c}function op(s){let c=s.split("/");if(c.length===0)return[];let[d,...u]=c,f=d.endsWith("?"),p=d.replace(/\?$/,"");if(u.length===0)return f?[p,""]:[p];let m=op(u.join("/")),w=[];return w.push(...m.map(b=>b===""?p:[p,b].join("/"))),f&&w.push(...m),w.map(b=>s.startsWith("/")&&b===""?"/":b)}function gx(s){s.sort((c,d)=>c.score!==d.score?d.score-c.score:Ex(c.routesMeta.map(u=>u.childrenIndex),d.routesMeta.map(u=>u.childrenIndex)))}var yx=/^:[\w-]+$/,vx=3,bx=2,wx=1,Sx=10,jx=-2,Xh=s=>s==="*";function Nx(s,c){let d=s.split("/"),u=d.length;return d.some(Xh)&&(u+=jx),c&&(u+=bx),d.filter(f=>!Xh(f)).reduce((f,p)=>f+(yx.test(p)?vx:p===""?wx:Sx),u)}function Ex(s,c){return s.length===c.length&&s.slice(0,-1).every((u,f)=>u===c[f])?s[s.length-1]-c[c.length-1]:0}function Cx(s,c,d=!1){let{routesMeta:u}=s,f={},p="/",m=[];for(let w=0;w<u.length;++w){let b=u[w],g=w===u.length-1,E=p==="/"?c:c.slice(p.length)||"/",S=er({path:b.relativePath,caseSensitive:b.caseSensitive,end:g},E),_=b.route;if(!S&&g&&d&&!u[u.length-1].route.index&&(S=er({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},E)),!S)return null;Object.assign(f,S.params),m.push({params:f,pathname:Ja([p,S.pathname]),pathnameBase:zx(Ja([p,S.pathnameBase])),route:_}),S.pathnameBase!=="/"&&(p=Ja([p,S.pathnameBase]))}return m}function er(s,c){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[d,u]=Ax(s.path,s.caseSensitive,s.end),f=c.match(d);if(!f)return null;let p=f[0],m=p.replace(/(.)\/+$/,"$1"),w=f.slice(1);return{params:u.reduce((g,{paramName:E,isOptional:S},_)=>{if(E==="*"){let O=w[_]||"";m=p.slice(0,p.length-O.length).replace(/(.)\/+$/,"$1")}const B=w[_];return S&&!B?g[E]=void 0:g[E]=(B||"").replace(/%2F/g,"/"),g},{}),pathname:p,pathnameBase:m,pattern:s}}function Ax(s,c=!1,d=!0){ga(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let u=[],f="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,w,b)=>(u.push({paramName:w,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(u.push({paramName:"*"}),f+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?f+="\\/*$":s!==""&&s!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,c?void 0:"i"),u]}function Tx(s){try{return s.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return ga(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),s}}function Wa(s,c){if(c==="/")return s;if(!s.toLowerCase().startsWith(c.toLowerCase()))return null;let d=c.endsWith("/")?c.length-1:c.length,u=s.charAt(d);return u&&u!=="/"?null:s.slice(d)||"/"}var dp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_x=s=>dp.test(s);function Rx(s,c="/"){let{pathname:d,search:u="",hash:f=""}=typeof s=="string"?_n(s):s,p;if(d)if(_x(d))p=d;else{if(d.includes("//")){let m=d;d=d.replace(/\/\/+/g,"/"),ga(!1,`Pathnames cannot have embedded double slashes - normalizing ${m} -> ${d}`)}d.startsWith("/")?p=Qh(d.substring(1),"/"):p=Qh(d,c)}else p=c;return{pathname:p,search:Ox(u),hash:Dx(f)}}function Qh(s,c){let d=c.replace(/\/+$/,"").split("/");return s.split("/").forEach(f=>{f===".."?d.length>1&&d.pop():f!=="."&&d.push(f)}),d.length>1?d.join("/"):"/"}function yu(s,c,d,u){return`Cannot include a '${s}' character in a manually specified \`to.${c}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Mx(s){return s.filter((c,d)=>d===0||c.route.path&&c.route.path.length>0)}function fp(s){let c=Mx(s);return c.map((d,u)=>u===c.length-1?d.pathname:d.pathnameBase)}function hp(s,c,d,u=!1){let f;typeof s=="string"?f=_n(s):(f={...s},lt(!f.pathname||!f.pathname.includes("?"),yu("?","pathname","search",f)),lt(!f.pathname||!f.pathname.includes("#"),yu("#","pathname","hash",f)),lt(!f.search||!f.search.includes("#"),yu("#","search","hash",f)));let p=s===""||f.pathname==="",m=p?"/":f.pathname,w;if(m==null)w=d;else{let S=c.length-1;if(!u&&m.startsWith("..")){let _=m.split("/");for(;_[0]==="..";)_.shift(),S-=1;f.pathname=_.join("/")}w=S>=0?c[S]:"/"}let b=Rx(f,w),g=m&&m!=="/"&&m.endsWith("/"),E=(p||m===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(g||E)&&(b.pathname+="/"),b}var Ja=s=>s.join("/").replace(/\/\/+/g,"/"),zx=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),Ox=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Dx=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,kx=class{constructor(s,c,d,u=!1){this.status=s,this.statusText=c||"",this.internal=u,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function Ux(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function Lx(s){return s.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var pp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function mp(s,c){let d=s;if(typeof d!="string"||!dp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let u=d,f=!1;if(pp)try{let p=new URL(window.location.href),m=d.startsWith("//")?new URL(p.protocol+d):new URL(d),w=Wa(m.pathname,c);m.origin===p.origin&&w!=null?d=w+m.search+m.hash:f=!0}catch{ga(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:f,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xp=["POST","PUT","PATCH","DELETE"];new Set(xp);var Hx=["GET",...xp];new Set(Hx);var Rn=x.createContext(null);Rn.displayName="DataRouter";var tr=x.createContext(null);tr.displayName="DataRouterState";var Bx=x.createContext(!1),gp=x.createContext({isTransitioning:!1});gp.displayName="ViewTransition";var qx=x.createContext(new Map);qx.displayName="Fetchers";var Vx=x.createContext(null);Vx.displayName="Await";var ua=x.createContext(null);ua.displayName="Navigation";var _i=x.createContext(null);_i.displayName="Location";var _a=x.createContext({outlet:null,matches:[],isDataRoute:!1});_a.displayName="Route";var Ou=x.createContext(null);Ou.displayName="RouteError";var yp="REACT_ROUTER_ERROR",Yx="REDIRECT",Gx="ROUTE_ERROR_RESPONSE";function Xx(s){if(s.startsWith(`${yp}:${Yx}:{`))try{let c=JSON.parse(s.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function Qx(s){if(s.startsWith(`${yp}:${Gx}:{`))try{let c=JSON.parse(s.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new kx(c.status,c.statusText,c.data)}catch{}}function Zx(s,{relative:c}={}){lt(Ri(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:u}=x.useContext(ua),{hash:f,pathname:p,search:m}=Mi(s,{relative:c}),w=p;return d!=="/"&&(w=p==="/"?d:Ja([d,p])),u.createHref({pathname:w,search:m,hash:f})}function Ri(){return x.useContext(_i)!=null}function bl(){return lt(Ri(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(_i).location}var vp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function bp(s){x.useContext(ua).static||x.useLayoutEffect(s)}function Mn(){let{isDataRoute:s}=x.useContext(_a);return s?ig():$x()}function $x(){lt(Ri(),"useNavigate() may be used only in the context of a <Router> component.");let s=x.useContext(Rn),{basename:c,navigator:d}=x.useContext(ua),{matches:u}=x.useContext(_a),{pathname:f}=bl(),p=JSON.stringify(fp(u)),m=x.useRef(!1);return bp(()=>{m.current=!0}),x.useCallback((b,g={})=>{if(ga(m.current,vp),!m.current)return;if(typeof b=="number"){d.go(b);return}let E=hp(b,JSON.parse(p),f,g.relative==="path");s==null&&c!=="/"&&(E.pathname=E.pathname==="/"?c:Ja([c,E.pathname])),(g.replace?d.replace:d.push)(E,g.state,g)},[c,d,p,f,s])}x.createContext(null);function wp(){let{matches:s}=x.useContext(_a),c=s[s.length-1];return c?c.params:{}}function Mi(s,{relative:c}={}){let{matches:d}=x.useContext(_a),{pathname:u}=bl(),f=JSON.stringify(fp(d));return x.useMemo(()=>hp(s,JSON.parse(f),u,c==="path"),[s,f,u,c])}function Kx(s,c){return Sp(s,c)}function Sp(s,c,d,u,f){lt(Ri(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:p}=x.useContext(ua),{matches:m}=x.useContext(_a),w=m[m.length-1],b=w?w.params:{},g=w?w.pathname:"/",E=w?w.pathnameBase:"/",S=w&&w.route;{let X=S&&S.path||"";Np(g,!S||X.endsWith("*")||X.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${X}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${X}"> to <Route path="${X==="/"?"*":`${X}/*`}">.`)}let _=bl(),B;if(c){let X=typeof c=="string"?_n(c):c;lt(E==="/"||X.pathname?.startsWith(E),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${E}" but pathname "${X.pathname}" was given in the \`location\` prop.`),B=X}else B=_;let O=B.pathname||"/",C=O;if(E!=="/"){let X=E.replace(/^\//,"").split("/");C="/"+O.replace(/^\//,"").split("/").slice(X.length).join("/")}let U=cp(s,{pathname:C});ga(S||U!=null,`No routes matched location "${B.pathname}${B.search}${B.hash}" `),ga(U==null||U[U.length-1].route.element!==void 0||U[U.length-1].route.Component!==void 0||U[U.length-1].route.lazy!==void 0,`Matched leaf route at location "${B.pathname}${B.search}${B.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let D=Px(U&&U.map(X=>Object.assign({},X,{params:Object.assign({},b,X.params),pathname:Ja([E,p.encodeLocation?p.encodeLocation(X.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:X.pathname]),pathnameBase:X.pathnameBase==="/"?E:Ja([E,p.encodeLocation?p.encodeLocation(X.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:X.pathnameBase])})),m,d,u,f);return c&&D?x.createElement(_i.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...B},navigationType:"POP"}},D):D}function Jx(){let s=ng(),c=Ux(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),d=s instanceof Error?s.stack:null,u="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:u},p={padding:"2px 4px",backgroundColor:u},m=null;return console.error("Error handled by React Router default ErrorBoundary:",s),m=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:p},"ErrorBoundary")," or"," ",x.createElement("code",{style:p},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},c),d?x.createElement("pre",{style:f},d):null,m)}var Wx=x.createElement(Jx,null),jp=class extends x.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,c){return c.location!==s.location||c.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:c.error,location:c.location,revalidation:s.revalidation||c.revalidation}}componentDidCatch(s,c){this.props.onError?this.props.onError(s,c):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const d=Qx(s.digest);d&&(s=d)}let c=s!==void 0?x.createElement(_a.Provider,{value:this.props.routeContext},x.createElement(Ou.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?x.createElement(Fx,{error:s},c):c}};jp.contextType=Bx;var vu=new WeakMap;function Fx({children:s,error:c}){let{basename:d}=x.useContext(ua);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let u=Xx(c.digest);if(u){let f=vu.get(c);if(f)throw f;let p=mp(u.location,d);if(pp&&!vu.get(c))if(p.isExternal||u.reloadDocument)window.location.href=p.absoluteURL||p.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:u.replace}));throw vu.set(c,m),m}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p.absoluteURL||p.to}`})}}return s}function Ix({routeContext:s,match:c,children:d}){let u=x.useContext(Rn);return u&&u.static&&u.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=c.route.id),x.createElement(_a.Provider,{value:s},d)}function Px(s,c=[],d=null,u=null,f=null){if(s==null){if(!d)return null;if(d.errors)s=d.matches;else if(c.length===0&&!d.initialized&&d.matches.length>0)s=d.matches;else return null}let p=s,m=d?.errors;if(m!=null){let E=p.findIndex(S=>S.route.id&&m?.[S.route.id]!==void 0);lt(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),p=p.slice(0,Math.min(p.length,E+1))}let w=!1,b=-1;if(d)for(let E=0;E<p.length;E++){let S=p[E];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(b=E),S.route.id){let{loaderData:_,errors:B}=d,O=S.route.loader&&!_.hasOwnProperty(S.route.id)&&(!B||B[S.route.id]===void 0);if(S.route.lazy||O){w=!0,b>=0?p=p.slice(0,b+1):p=[p[0]];break}}}let g=d&&u?(E,S)=>{u(E,{location:d.location,params:d.matches?.[0]?.params??{},unstable_pattern:Lx(d.matches),errorInfo:S})}:void 0;return p.reduceRight((E,S,_)=>{let B,O=!1,C=null,U=null;d&&(B=m&&S.route.id?m[S.route.id]:void 0,C=S.route.errorElement||Wx,w&&(b<0&&_===0?(Np("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),O=!0,U=null):b===_&&(O=!0,U=S.route.hydrateFallbackElement||null)));let D=c.concat(p.slice(0,_+1)),X=()=>{let $;return B?$=C:O?$=U:S.route.Component?$=x.createElement(S.route.Component,null):S.route.element?$=S.route.element:$=E,x.createElement(Ix,{match:S,routeContext:{outlet:E,matches:D,isDataRoute:d!=null},children:$})};return d&&(S.route.ErrorBoundary||S.route.errorElement||_===0)?x.createElement(jp,{location:d.location,revalidation:d.revalidation,component:C,error:B,children:X(),routeContext:{outlet:null,matches:D,isDataRoute:!0},onError:g}):X()},null)}function Du(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function eg(s){let c=x.useContext(Rn);return lt(c,Du(s)),c}function tg(s){let c=x.useContext(tr);return lt(c,Du(s)),c}function ag(s){let c=x.useContext(_a);return lt(c,Du(s)),c}function ku(s){let c=ag(s),d=c.matches[c.matches.length-1];return lt(d.route.id,`${s} can only be used on routes that contain a unique "id"`),d.route.id}function lg(){return ku("useRouteId")}function ng(){let s=x.useContext(Ou),c=tg("useRouteError"),d=ku("useRouteError");return s!==void 0?s:c.errors?.[d]}function ig(){let{router:s}=eg("useNavigate"),c=ku("useNavigate"),d=x.useRef(!1);return bp(()=>{d.current=!0}),x.useCallback(async(f,p={})=>{ga(d.current,vp),d.current&&(typeof f=="number"?await s.navigate(f):await s.navigate(f,{fromRouteId:c,...p}))},[s,c])}var Zh={};function Np(s,c,d){!c&&!Zh[s]&&(Zh[s]=!0,ga(!1,d))}x.memo(sg);function sg({routes:s,future:c,state:d,onError:u}){return Sp(s,void 0,d,u,c)}function Ta(s){lt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function rg({basename:s="/",children:c=null,location:d,navigationType:u="POP",navigator:f,static:p=!1,unstable_useTransitions:m}){lt(!Ri(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let w=s.replace(/^\/*/,"/"),b=x.useMemo(()=>({basename:w,navigator:f,static:p,unstable_useTransitions:m,future:{}}),[w,f,p,m]);typeof d=="string"&&(d=_n(d));let{pathname:g="/",search:E="",hash:S="",state:_=null,key:B="default"}=d,O=x.useMemo(()=>{let C=Wa(g,w);return C==null?null:{location:{pathname:C,search:E,hash:S,state:_,key:B},navigationType:u}},[w,g,E,S,_,B,u]);return ga(O!=null,`<Router basename="${w}"> is not able to match the URL "${g}${E}${S}" because it does not start with the basename, so the <Router> won't render anything.`),O==null?null:x.createElement(ua.Provider,{value:b},x.createElement(_i.Provider,{children:c,value:O}))}function cg({children:s,location:c}){return Kx(Au(s),c)}function Au(s,c=[]){let d=[];return x.Children.forEach(s,(u,f)=>{if(!x.isValidElement(u))return;let p=[...c,f];if(u.type===x.Fragment){d.push.apply(d,Au(u.props.children,p));return}lt(u.type===Ta,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),lt(!u.props.index||!u.props.children,"An index route cannot have child routes.");let m={id:u.props.id||p.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=Au(u.props.children,p)),d.push(m)}),d}var Is="get",Ps="application/x-www-form-urlencoded";function ar(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function ug(s){return ar(s)&&s.tagName.toLowerCase()==="button"}function og(s){return ar(s)&&s.tagName.toLowerCase()==="form"}function dg(s){return ar(s)&&s.tagName.toLowerCase()==="input"}function fg(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function hg(s,c){return s.button===0&&(!c||c==="_self")&&!fg(s)}var Xs=null;function pg(){if(Xs===null)try{new FormData(document.createElement("form"),0),Xs=!1}catch{Xs=!0}return Xs}var mg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bu(s){return s!=null&&!mg.has(s)?(ga(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ps}"`),null):s}function xg(s,c){let d,u,f,p,m;if(og(s)){let w=s.getAttribute("action");u=w?Wa(w,c):null,d=s.getAttribute("method")||Is,f=bu(s.getAttribute("enctype"))||Ps,p=new FormData(s)}else if(ug(s)||dg(s)&&(s.type==="submit"||s.type==="image")){let w=s.form;if(w==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=s.getAttribute("formaction")||w.getAttribute("action");if(u=b?Wa(b,c):null,d=s.getAttribute("formmethod")||w.getAttribute("method")||Is,f=bu(s.getAttribute("formenctype"))||bu(w.getAttribute("enctype"))||Ps,p=new FormData(w,s),!pg()){let{name:g,type:E,value:S}=s;if(E==="image"){let _=g?`${g}.`:"";p.append(`${_}x`,"0"),p.append(`${_}y`,"0")}else g&&p.append(g,S)}}else{if(ar(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Is,u=null,f=Ps,m=s}return p&&f==="text/plain"&&(m=p,p=void 0),{action:u,method:d.toLowerCase(),encType:f,formData:p,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Uu(s,c){if(s===!1||s===null||typeof s>"u")throw new Error(c)}function gg(s,c,d){let u=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return u.pathname==="/"?u.pathname=`_root.${d}`:c&&Wa(u.pathname,c)==="/"?u.pathname=`${c.replace(/\/$/,"")}/_root.${d}`:u.pathname=`${u.pathname.replace(/\/$/,"")}.${d}`,u}async function yg(s,c){if(s.id in c)return c[s.id];try{let d=await import(s.module);return c[s.id]=d,d}catch(d){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function vg(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function bg(s,c,d){let u=await Promise.all(s.map(async f=>{let p=c.routes[f.route.id];if(p){let m=await yg(p,d);return m.links?m.links():[]}return[]}));return Ng(u.flat(1).filter(vg).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function $h(s,c,d,u,f,p){let m=(b,g)=>d[g]?b.route.id!==d[g].route.id:!0,w=(b,g)=>d[g].pathname!==b.pathname||d[g].route.path?.endsWith("*")&&d[g].params["*"]!==b.params["*"];return p==="assets"?c.filter((b,g)=>m(b,g)||w(b,g)):p==="data"?c.filter((b,g)=>{let E=u.routes[b.route.id];if(!E||!E.hasLoader)return!1;if(m(b,g)||w(b,g))return!0;if(b.route.shouldRevalidate){let S=b.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:d[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function wg(s,c,{includeHydrateFallback:d}={}){return Sg(s.map(u=>{let f=c.routes[u.route.id];if(!f)return[];let p=[f.module];return f.clientActionModule&&(p=p.concat(f.clientActionModule)),f.clientLoaderModule&&(p=p.concat(f.clientLoaderModule)),d&&f.hydrateFallbackModule&&(p=p.concat(f.hydrateFallbackModule)),f.imports&&(p=p.concat(f.imports)),p}).flat(1))}function Sg(s){return[...new Set(s)]}function jg(s){let c={},d=Object.keys(s).sort();for(let u of d)c[u]=s[u];return c}function Ng(s,c){let d=new Set;return new Set(c),s.reduce((u,f)=>{let p=JSON.stringify(jg(f));return d.has(p)||(d.add(p),u.push({key:p,link:f})),u},[])}function Ep(){let s=x.useContext(Rn);return Uu(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function Eg(){let s=x.useContext(tr);return Uu(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Lu=x.createContext(void 0);Lu.displayName="FrameworkContext";function Cp(){let s=x.useContext(Lu);return Uu(s,"You must render this element inside a <HydratedRouter> element"),s}function Cg(s,c){let d=x.useContext(Lu),[u,f]=x.useState(!1),[p,m]=x.useState(!1),{onFocus:w,onBlur:b,onMouseEnter:g,onMouseLeave:E,onTouchStart:S}=c,_=x.useRef(null);x.useEffect(()=>{if(s==="render"&&m(!0),s==="viewport"){let C=D=>{D.forEach(X=>{m(X.isIntersecting)})},U=new IntersectionObserver(C,{threshold:.5});return _.current&&U.observe(_.current),()=>{U.disconnect()}}},[s]),x.useEffect(()=>{if(u){let C=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(C)}}},[u]);let B=()=>{f(!0)},O=()=>{f(!1),m(!1)};return d?s!=="intent"?[p,_,{}]:[p,_,{onFocus:Ni(w,B),onBlur:Ni(b,O),onMouseEnter:Ni(g,B),onMouseLeave:Ni(E,O),onTouchStart:Ni(S,B)}]:[!1,_,{}]}function Ni(s,c){return d=>{s&&s(d),d.defaultPrevented||c(d)}}function Ag({page:s,...c}){let{router:d}=Ep(),u=x.useMemo(()=>cp(d.routes,s,d.basename),[d.routes,s,d.basename]);return u?x.createElement(_g,{page:s,matches:u,...c}):null}function Tg(s){let{manifest:c,routeModules:d}=Cp(),[u,f]=x.useState([]);return x.useEffect(()=>{let p=!1;return bg(s,c,d).then(m=>{p||f(m)}),()=>{p=!0}},[s,c,d]),u}function _g({page:s,matches:c,...d}){let u=bl(),{manifest:f,routeModules:p}=Cp(),{basename:m}=Ep(),{loaderData:w,matches:b}=Eg(),g=x.useMemo(()=>$h(s,c,b,f,u,"data"),[s,c,b,f,u]),E=x.useMemo(()=>$h(s,c,b,f,u,"assets"),[s,c,b,f,u]),S=x.useMemo(()=>{if(s===u.pathname+u.search+u.hash)return[];let O=new Set,C=!1;if(c.forEach(D=>{let X=f.routes[D.route.id];!X||!X.hasLoader||(!g.some($=>$.route.id===D.route.id)&&D.route.id in w&&p[D.route.id]?.shouldRevalidate||X.hasClientLoader?C=!0:O.add(D.route.id))}),O.size===0)return[];let U=gg(s,m,"data");return C&&O.size>0&&U.searchParams.set("_routes",c.filter(D=>O.has(D.route.id)).map(D=>D.route.id).join(",")),[U.pathname+U.search]},[m,w,u,f,g,c,s,p]),_=x.useMemo(()=>wg(E,f),[E,f]),B=Tg(E);return x.createElement(x.Fragment,null,S.map(O=>x.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...d})),_.map(O=>x.createElement("link",{key:O,rel:"modulepreload",href:O,...d})),B.map(({key:O,link:C})=>x.createElement("link",{key:O,nonce:d.nonce,...C})))}function Rg(...s){return c=>{s.forEach(d=>{typeof d=="function"?d(c):d!=null&&(d.current=c)})}}var Mg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Mg&&(window.__reactRouterVersion="7.11.0")}catch{}function zg({basename:s,children:c,unstable_useTransitions:d,window:u}){let f=x.useRef();f.current==null&&(f.current=fx({window:u,v5Compat:!0}));let p=f.current,[m,w]=x.useState({action:p.action,location:p.location}),b=x.useCallback(g=>{d===!1?w(g):x.startTransition(()=>w(g))},[d]);return x.useLayoutEffect(()=>p.listen(b),[p,b]),x.createElement(rg,{basename:s,children:c,location:m.location,navigationType:m.action,navigator:p,unstable_useTransitions:d})}var Ap=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tp=x.forwardRef(function({onClick:c,discover:d="render",prefetch:u="none",relative:f,reloadDocument:p,replace:m,state:w,target:b,to:g,preventScrollReset:E,viewTransition:S,unstable_defaultShouldRevalidate:_,...B},O){let{basename:C,unstable_useTransitions:U}=x.useContext(ua),D=typeof g=="string"&&Ap.test(g),X=mp(g,C);g=X.to;let $=Zx(g,{relative:f}),[se,P,ee]=Cg(u,B),I=Ug(g,{replace:m,state:w,target:b,preventScrollReset:E,relative:f,viewTransition:S,unstable_defaultShouldRevalidate:_,unstable_useTransitions:U});function fe(le){c&&c(le),le.defaultPrevented||I(le)}let re=x.createElement("a",{...B,...ee,href:X.absoluteURL||$,onClick:X.isExternal||p?c:fe,ref:Rg(O,P),target:b,"data-discover":!D&&d==="render"?"true":void 0});return se&&!D?x.createElement(x.Fragment,null,re,x.createElement(Ag,{page:$})):re});Tp.displayName="Link";var Og=x.forwardRef(function({"aria-current":c="page",caseSensitive:d=!1,className:u="",end:f=!1,style:p,to:m,viewTransition:w,children:b,...g},E){let S=Mi(m,{relative:g.relative}),_=bl(),B=x.useContext(tr),{navigator:O,basename:C}=x.useContext(ua),U=B!=null&&Vg(S)&&w===!0,D=O.encodeLocation?O.encodeLocation(S).pathname:S.pathname,X=_.pathname,$=B&&B.navigation&&B.navigation.location?B.navigation.location.pathname:null;d||(X=X.toLowerCase(),$=$?$.toLowerCase():null,D=D.toLowerCase()),$&&C&&($=Wa($,C)||$);const se=D!=="/"&&D.endsWith("/")?D.length-1:D.length;let P=X===D||!f&&X.startsWith(D)&&X.charAt(se)==="/",ee=$!=null&&($===D||!f&&$.startsWith(D)&&$.charAt(D.length)==="/"),I={isActive:P,isPending:ee,isTransitioning:U},fe=P?c:void 0,re;typeof u=="function"?re=u(I):re=[u,P?"active":null,ee?"pending":null,U?"transitioning":null].filter(Boolean).join(" ");let le=typeof p=="function"?p(I):p;return x.createElement(Tp,{...g,"aria-current":fe,className:re,ref:E,style:le,to:m,viewTransition:w},typeof b=="function"?b(I):b)});Og.displayName="NavLink";var Dg=x.forwardRef(({discover:s="render",fetcherKey:c,navigate:d,reloadDocument:u,replace:f,state:p,method:m=Is,action:w,onSubmit:b,relative:g,preventScrollReset:E,viewTransition:S,unstable_defaultShouldRevalidate:_,...B},O)=>{let{unstable_useTransitions:C}=x.useContext(ua),U=Bg(),D=qg(w,{relative:g}),X=m.toLowerCase()==="get"?"get":"post",$=typeof w=="string"&&Ap.test(w),se=P=>{if(b&&b(P),P.defaultPrevented)return;P.preventDefault();let ee=P.nativeEvent.submitter,I=ee?.getAttribute("formmethod")||m,fe=()=>U(ee||P.currentTarget,{fetcherKey:c,method:I,navigate:d,replace:f,state:p,relative:g,preventScrollReset:E,viewTransition:S,unstable_defaultShouldRevalidate:_});C&&d!==!1?x.startTransition(()=>fe()):fe()};return x.createElement("form",{ref:O,method:X,action:D,onSubmit:u?b:se,...B,"data-discover":!$&&s==="render"?"true":void 0})});Dg.displayName="Form";function kg(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _p(s){let c=x.useContext(Rn);return lt(c,kg(s)),c}function Ug(s,{target:c,replace:d,state:u,preventScrollReset:f,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:w,unstable_useTransitions:b}={}){let g=Mn(),E=bl(),S=Mi(s,{relative:p});return x.useCallback(_=>{if(hg(_,c)){_.preventDefault();let B=d!==void 0?d:Ci(E)===Ci(S),O=()=>g(s,{replace:B,state:u,preventScrollReset:f,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:w});b?x.startTransition(()=>O()):O()}},[E,g,S,d,u,c,s,f,p,m,w,b])}var Lg=0,Hg=()=>`__${String(++Lg)}__`;function Bg(){let{router:s}=_p("useSubmit"),{basename:c}=x.useContext(ua),d=lg(),u=s.fetch,f=s.navigate;return x.useCallback(async(p,m={})=>{let{action:w,method:b,encType:g,formData:E,body:S}=xg(p,c);if(m.navigate===!1){let _=m.fetcherKey||Hg();await u(_,d,m.action||w,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:E,body:S,formMethod:m.method||b,formEncType:m.encType||g,flushSync:m.flushSync})}else await f(m.action||w,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:E,body:S,formMethod:m.method||b,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:d,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,f,c,d])}function qg(s,{relative:c}={}){let{basename:d}=x.useContext(ua),u=x.useContext(_a);lt(u,"useFormAction must be used inside a RouteContext");let[f]=u.matches.slice(-1),p={...Mi(s||".",{relative:c})},m=bl();if(s==null){p.search=m.search;let w=new URLSearchParams(p.search),b=w.getAll("index");if(b.some(E=>E==="")){w.delete("index"),b.filter(S=>S).forEach(S=>w.append("index",S));let E=w.toString();p.search=E?`?${E}`:""}}return(!s||s===".")&&f.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(p.pathname=p.pathname==="/"?d:Ja([d,p.pathname])),Ci(p)}function Vg(s,{relative:c}={}){let d=x.useContext(gp);lt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=_p("useViewTransitionState"),f=Mi(s,{relative:c});if(!d.isTransitioning)return!1;let p=Wa(d.currentLocation.pathname,u)||d.currentLocation.pathname,m=Wa(d.nextLocation.pathname,u)||d.nextLocation.pathname;return er(f.pathname,m)!=null||er(f.pathname,p)!=null}const Yg=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gg=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(c,d,u)=>u?u.toUpperCase():d.toLowerCase()),Kh=s=>{const c=Gg(s);return c.charAt(0).toUpperCase()+c.slice(1)},Rp=(...s)=>s.filter((c,d,u)=>!!c&&c.trim()!==""&&u.indexOf(c)===d).join(" ").trim(),Xg=s=>{for(const c in s)if(c.startsWith("aria-")||c==="role"||c==="title")return!0};var Qg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Zg=x.forwardRef(({color:s="currentColor",size:c=24,strokeWidth:d=2,absoluteStrokeWidth:u,className:f="",children:p,iconNode:m,...w},b)=>x.createElement("svg",{ref:b,...Qg,width:c,height:c,stroke:s,strokeWidth:u?Number(d)*24/Number(c):d,className:Rp("lucide",f),...!p&&!Xg(w)&&{"aria-hidden":"true"},...w},[...m.map(([g,E])=>x.createElement(g,E)),...Array.isArray(p)?p:[p]]));const je=(s,c)=>{const d=x.forwardRef(({className:u,...f},p)=>x.createElement(Zg,{ref:p,iconNode:c,className:Rp(`lucide-${Yg(Kh(s))}`,`lucide-${s}`,u),...f}));return d.displayName=Kh(s),d};const $g=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]],Kg=je("arrow-down-up",$g);const Jg=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Mp=je("camera",Jg);const Wg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ai=je("check",Wg);const Fg=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ig=je("circle-play",Fg);const Pg=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ey=je("clock",Pg);const ty=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],ay=je("cloud",ty);const ly=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ny=je("code",ly);const iy=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ti=je("copy",iy);const sy=[["path",{d:"m10 15 5 5 5-5",key:"1hpjnr"}],["path",{d:"M4 4h7a4 4 0 0 1 4 4v12",key:"wcbgct"}]],ry=je("corner-right-down",sy);const cy=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],zp=je("database",cy);const uy=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],oy=je("download",uy);const dy=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],fy=je("eye-off",dy);const hy=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],py=je("eye",hy);const my=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],xy=je("globe",my);const gy=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Op=je("history",gy);const yy=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],vy=je("house",yy);const by=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],wy=je("keyboard",by);const Sy=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],jy=je("layers",Sy);const Ny=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Ey=je("list",Ny);const Cy=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ay=je("log-out",Cy);const Ty=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],_y=je("monitor",Ty);const Ry=[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]],My=je("mouse-pointer-2",Ry);const zy=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],Oy=je("move-left",zy);const Dy=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],ky=je("play",Dy);const Uy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ly=je("plus",Uy);const Hy=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Dp=je("refresh-cw",Hy);const By=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]],qy=je("repeat",By);const Vy=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],Yy=je("rocket",Vy);const Gy=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Xy=je("settings",Gy);const Qy=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Zy=je("shield-check",Qy);const $y=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],Ky=je("split",$y);const Jy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Jh=je("square",Jy);const Wy=[["path",{d:"M8.34 8.34 2 9.27l5 4.87L5.82 21 12 17.77 18.18 21l-.59-3.43",key:"16m0ql"}],["path",{d:"M18.42 12.76 22 9.27l-6.91-1L12 2l-1.44 2.91",key:"1vt8nq"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],Fy=je("star-off",Wy);const Iy=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Py=je("star",Iy);const ev=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],tv=je("table",ev);const av=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],lv=je("target",av);const nv=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],iv=je("terminal",nv);const sv=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Hu=je("trash-2",sv);const rv=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],cv=je("triangle-alert",rv);const uv=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],ov=je("type",uv);const dv=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],fv=je("upload",dv);const hv=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],pv=je("variable",hv);const mv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Bu=je("x",mv),xv=({onNavigate:s,onNewTask:c,onLogout:d,currentScreen:u})=>r.jsxs("aside",{className:"w-20 h-full border-r border-white/10 glass flex flex-col items-center py-8 shrink-0 z-50",children:[r.jsx("button",{onClick:()=>s("dashboard"),className:"mb-12 hover:opacity-80 transition-opacity",children:r.jsx("img",{src:"/icon.png",alt:"Logo",className:"w-10 h-10",onError:f=>{f.currentTarget.src="/icon.png"}})}),r.jsxs("div",{className:"flex-1 flex flex-col gap-6",children:[r.jsx("button",{onClick:c,className:"w-12 h-12 rounded-2xl flex items-center justify-center text-white bg-white/5 hover:bg-white/10 transition-all",title:"New Task",children:r.jsx(Ly,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>s("dashboard"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="dashboard"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Dashboard",children:r.jsx(vy,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>s("settings"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="settings"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Settings",children:r.jsx(Xy,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>s("executions"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="executions"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Executions",children:r.jsx(Op,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>s("captures"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="captures"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Captures",children:r.jsx(Mp,{className:"w-6 h-6"})})]}),r.jsx("button",{onClick:d,className:"w-12 h-12 rounded-2xl flex items-center justify-center text-gray-500 hover:bg-red-500/10 hover:text-red-500 transition-all",title:"Logout",children:r.jsx(Ay,{className:"w-6 h-6"})})]}),gv=({status:s,onSubmit:c,error:d})=>{const[u,f]=x.useState(""),[p,m]=x.useState(""),[w,b]=x.useState(""),[g,E]=x.useState(""),S=()=>{c(p,w,u,g)};return r.jsxs("div",{className:"fixed inset-0 z-[100] bg-[#020202] flex items-center justify-center",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),r.jsxs("div",{className:"w-[400px] glass-card p-10 rounded-[48px] space-y-8 relative",children:[r.jsxs("div",{className:"text-center space-y-2",children:[r.jsx("h1",{className:"text-2xl font-bold tracking-tighter text-white uppercase",children:"Doppelganger"}),r.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:s==="setup"?"Initializing System":"Access Restricted"})]}),r.jsxs("div",{className:"space-y-4",children:[s==="setup"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Name"}),r.jsx("input",{type:"text",value:u,onChange:_=>f(_.target.value),placeholder:"Full Name",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Email"}),r.jsx("input",{type:"email",value:p,onChange:_=>m(_.target.value),placeholder:"user@example.com",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Password"}),r.jsx("input",{type:"password",value:w,onChange:_=>b(_.target.value),placeholder:"••••••••",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]}),s==="setup"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Confirm Password"}),r.jsx("input",{type:"password",value:g,onChange:_=>E(_.target.value),placeholder:"••••••••",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]})]}),r.jsx("button",{onClick:S,className:"shine-effect w-full bg-white text-black py-4 rounded-2xl font-bold text-[10px] tracking-[0.3em] uppercase hover:scale-[1.02] active:scale-[0.98] transition-all",children:s==="setup"?"Create Account":"Authenticate"}),d&&r.jsx("div",{className:"text-[9px] font-bold text-red-500 text-center uppercase tracking-widest",children:d})]})]})},Wh=({tasks:s,onNewTask:c,onEditTask:d,onDeleteTask:u,onExportTasks:f,onImportTasks:p})=>{const m=x.useRef(null),w=E=>{try{return E?`https://www.google.com/s2/favicons?domain=${new URL(E).hostname}&sz=64`:null}catch{return null}},b=()=>{m.current?.click()},g=E=>{const S=E.target.files?.[0];S&&p(S),E.target.value=""};return r.jsx("div",{className:"flex-1 overflow-hidden animate-in fade-in duration-500",children:r.jsxs("div",{className:"h-full flex flex-col px-12 py-12 max-w-7xl mx-auto space-y-12 w-full",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-500 uppercase tracking-[0.4em]",children:"Status"}),r.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Dashboard"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("button",{onClick:f,className:"px-4 py-3 rounded-2xl border border-white/10 text-white text-[9px] font-bold uppercase tracking-[0.3em] hover:bg-white/5 transition-all",children:[r.jsx(oy,{className:"w-4 h-4 inline-block mr-2"}),"Export"]}),r.jsxs("button",{onClick:b,className:"px-4 py-3 rounded-2xl border border-white/10 text-white text-[9px] font-bold uppercase tracking-[0.3em] hover:bg-white/5 transition-all",children:[r.jsx(fv,{className:"w-4 h-4 inline-block mr-2"}),"Import"]}),r.jsx("button",{onClick:c,className:"shine-effect bg-white text-black px-8 py-3 rounded-2xl font-bold text-[10px] tracking-[0.2em] uppercase transition-all hover:scale-105 active:scale-95",children:"+ New Task"}),r.jsx("input",{ref:m,type:"file",accept:"application/json",className:"hidden",onChange:g})]})]}),r.jsxs("div",{className:"relative flex-1 min-h-0",children:[r.jsx("div",{className:"pointer-events-none absolute top-0 left-0 right-0 h-10 bg-gradient-to-b from-[#050505] via-[#050505]/50 to-transparent z-10"}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6 overflow-y-auto custom-scrollbar pb-12 pr-4 h-full",children:s.map(E=>{const S=w(E.url);return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] flex flex-col gap-6 group hover:-translate-y-1",children:[r.jsxs("div",{className:"flex justify-between items-start",children:[r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-white/5 border border-white/10 flex items-center justify-center overflow-hidden",children:S?r.jsx("img",{src:S,alt:"",className:"w-6 h-6 object-contain",onError:_=>{_.target.style.display="none"}}):r.jsx(xy,{className:"w-5 h-5 text-gray-500"})}),r.jsx("div",{className:"px-3 py-1 rounded-full bg-white/5 text-[7px] font-bold uppercase tracking-widest text-gray-500",children:E.mode})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-white truncate",children:E.name||"Untitled"}),r.jsx("p",{className:"text-[10px] text-gray-600 font-mono truncate mt-1",children:E.url||"Target undefined"})]}),r.jsxs("div",{className:"flex gap-3 pt-4 border-t border-white/5",children:[r.jsx("button",{onClick:()=>d(E),className:"flex-1 py-2 rounded-xl bg-white text-black text-[9px] font-bold uppercase tracking-widest hover:scale-105 transition-all",children:"Edit Task"}),r.jsx("button",{onClick:()=>u(E.id),className:"w-10 h-10 rounded-xl bg-white/5 border border-white/10 flex items-center justify-center hover:bg-red-500/10 hover:text-red-500 transition-all",children:r.jsx(Bu,{className:"w-4 h-4"})})]})]},E.id)})})]}),s.length===0&&r.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center space-y-6 opacity-20",children:[r.jsx("div",{className:"w-20 h-20 border-2 border-dashed border-white rounded-[40px] flex items-center justify-center text-3xl",children:r.jsx(Yy,{className:"w-8 h-8 text-white/70"})}),r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.3em]",children:"No Tasks Found"})]})]})})},bt=s=>s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),yv=new Set(["const","let","var","function","return","if","else","for","while","do","switch","case","break","continue","try","catch","finally","throw","new","class","extends","super","import","from","export","default","await","async","typeof","instanceof","in","of","this"]),kp=(s,c)=>{const d=/\{\$(\w+)\}/g;let u="",f=0,p;const m=b=>!!c&&(b in c||b==="now"),w=b=>{if(b==="now")return!0;const g=c?c[b]:void 0;return g&&g.value!==""&&g.value!==void 0&&g.value!==null};for(;(p=d.exec(s))!==null;){p.index>f&&(u+=bt(s.substring(f,p.index)));const b=p[1],g=m(b),E=w(b);u+=`<span class="${g?E?"var-highlight-default":"var-highlight":"var-highlight-undefined"}">${bt(p[0])}</span>`,f=d.lastIndex}return u+=bt(s.substring(f)),u},vv=s=>{const c=/("(?:\\.|[^"\\])*")|(-?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|\b(true|false|null)\b/g;let d="",u=0,f;for(;(f=c.exec(s))!==null;){f.index>u&&(d+=bt(s.substring(u,f.index)));const p=f[0];if(f[1]){let m=!1,w=f.index+p.length;for(;w<s.length&&/\s/.test(s[w]);)w+=1;s[w]===":"&&(m=!0),d+=`<span class="${m?"code-token-key":"code-token-string"}">${bt(p)}</span>`}else f[2]?d+=`<span class="code-token-number">${bt(p)}</span>`:d+=`<span class="code-token-boolean">${bt(p)}</span>`;u=c.lastIndex}return d+=bt(s.substring(u)),d},bv=(s,c)=>{const d=/(\{\$\w+\})|(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`(?:\\.|[^`\\])*`)|(\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|(\btrue\b|\bfalse\b|\bnull\b|\bundefined\b)|(\b[A-Za-z_]\w*\b)/g;let u="",f=0,p;for(;(p=d.exec(s))!==null;){p.index>f&&(u+=bt(s.substring(f,p.index)));const m=p[0];if(p[1])u+=kp(m,c);else if(p[2])u+=`<span class="code-token-comment">${bt(m)}</span>`;else if(p[3])u+=`<span class="code-token-string">${bt(m)}</span>`;else if(p[4])u+=`<span class="code-token-number">${bt(m)}</span>`;else if(p[5])u+=`<span class="code-token-boolean">${bt(m)}</span>`;else if(p[6]){const w=yv.has(m)?"code-token-keyword":"code-token-identifier";u+=`<span class="${w}">${bt(m)}</span>`}else u+=bt(m);f=d.lastIndex}return u+=bt(s.substring(f)),u},wv=s=>{const c=/<\/?[^>]+>/g;let d="",u=0,f;for(;(f=c.exec(s))!==null;){f.index>u&&(d+=bt(s.substring(u,f.index)));const p=f[0];let m=bt(p);m=m.replace(/^(&lt;\/?)([A-Za-z0-9-]+)/,'$1<span class="code-token-tag">$2</span>'),m=m.replace(/(\s)([A-Za-z0-9-:]+)(=)/g,'$1<span class="code-token-attr">$2</span>$3'),m=m.replace(/(&quot;.*?&quot;|&#39;.*?&#39;)/g,'<span class="code-token-string">$1</span>'),d+=`<span class="code-token-punct">${m}</span>`,u=c.lastIndex}return d+=bt(s.substring(u)),d},Up=(s,c,d)=>c==="javascript"?bv(s,d):c==="json"?vv(s):c==="html"?wv(s):kp(s,d),kt=({value:s,onChange:c,placeholder:d,variables:u,className:f,syntax:p="plain"})=>{const m=x.useRef(null);return x.useEffect(()=>{if(m.current){const w=m.current.innerHTML,b=Up(s,p,u);if(w!==b){const g=window.getSelection();let E=0;if(g&&g.rangeCount>0){const S=g.getRangeAt(0),_=S.cloneRange();_.selectNodeContents(m.current),_.setEnd(S.endContainer,S.endOffset),E=_.toString().length}if(m.current.innerHTML=b,E>0){const S=document.createTreeWalker(m.current,NodeFilter.SHOW_TEXT);let _=0,B=S.nextNode();for(;B;){const O=B.textContent?.length||0;if(_+O>=E){const C=document.createRange();C.setStart(B,E-_),C.collapse(!0),g?.removeAllRanges(),g?.addRange(C);break}_+=O,B=S.nextNode()}}}}},[s,u]),r.jsx("div",{ref:m,contentEditable:!0,className:`rich-input-content w-full bg-transparent focus:outline-none text-white min-h-[1.5rem] ${f}`,"data-placeholder":d,onInput:w=>c(w.currentTarget.textContent||""),onBlur:w=>c(w.currentTarget.textContent||"")})},Tn=({value:s,onChange:c,language:d,placeholder:u,className:f,readOnly:p,variables:m})=>{const w=x.useRef(null),b=x.useRef(null),g=s||u||"",E=!s&&!!u,S=x.useMemo(()=>Up(g,d,m),[g,d,m]);return x.useEffect(()=>{const _=w.current,B=b.current;if(!_||!B)return;const O=()=>{B.scrollTop=_.scrollTop,B.scrollLeft=_.scrollLeft};return _.addEventListener("scroll",O),()=>{_.removeEventListener("scroll",O)}},[]),r.jsxs("div",{className:`code-editor ${f||""}`,onWheel:_=>{const B=w.current;B&&(B.scrollHeight<=B.clientHeight||(B.scrollTop+=_.deltaY,B.scrollLeft+=_.deltaX,B.focus(),_.preventDefault()))},children:[r.jsx("pre",{ref:b,className:`code-editor-pre ${E?"code-editor-placeholder":""}`,"aria-hidden":!0,dangerouslySetInnerHTML:{__html:S}}),r.jsx("textarea",{ref:w,value:s,onChange:_=>c?.(_.target.value),spellCheck:!1,wrap:"off",readOnly:p,className:`code-editor-textarea ${p?"code-editor-textarea-readonly":""}`,"aria-label":"Code editor",tabIndex:p?-1:0})]})},Tu=[{type:"click",label:"Click",description:"Click an element"},{type:"type",label:"Type",description:"Type text into a field"},{type:"hover",label:"Hover",description:"Hover an element"},{type:"press",label:"Press",description:"Press a key"},{type:"wait",label:"Wait",description:"Pause for seconds"},{type:"scroll",label:"Scroll",description:"Scroll the page or container"},{type:"javascript",label:"JavaScript",description:"Run custom JS"},{type:"csv",label:"CSV",description:"Parse CSV into rows"},{type:"merge",label:"Merge",description:"Merge inputs into a single output"},{type:"screenshot",label:"Screenshot",description:"Capture a screenshot"},{type:"if",label:"If",description:"Conditional block start"},{type:"else",label:"Else",description:"Conditional alternate path"},{type:"end",label:"End Block",description:"Close a block"},{type:"while",label:"While",description:"Loop while condition true"},{type:"repeat",label:"Repeat N",description:"Repeat block N times"},{type:"foreach",label:"For Each",description:"Loop through items"},{type:"set",label:"Set Variable",description:"Update variable value"},{type:"stop",label:"Stop Task",description:"Stop task with status"},{type:"on_error",label:"On Error",description:"Run on failure"},{type:"start",label:"Start Task",description:"Run another task"}],Sv=({open:s,query:c,onQueryChange:d,onClose:u,onSelect:f})=>{const p=x.useRef(null),m=x.useMemo(()=>{const w=c.trim().toLowerCase();return w?Tu.filter(b=>b.label.toLowerCase().includes(w)||b.description.toLowerCase().includes(w)):Tu},[c]);return s?r.jsx("div",{className:"fixed inset-0 z-[190] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",onClick:u,children:r.jsxs("div",{className:"glass-card w-full max-w-xl rounded-[28px] border border-white/10 p-6 shadow-2xl",onClick:w=>w.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"Add Block"}),r.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Search actions and control flow blocks."})]}),r.jsx("button",{onClick:u,className:"p-2 rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all","aria-label":"Close",children:r.jsx(Bu,{className:"w-4 h-4"})})]}),r.jsx("input",{ref:w=>{p.current=w,w&&w.focus()},value:c,onChange:w=>d(w.target.value),placeholder:"Type to filter (e.g., if, click, loop)",className:"w-full rounded-xl bg-black/40 border border-white/10 px-4 py-3 text-sm text-white placeholder:text-gray-600 focus:outline-none focus:border-white/30"}),r.jsxs("div",{className:"mt-4 max-h-[320px] overflow-y-auto custom-scrollbar space-y-2",children:[m.map(w=>r.jsxs("button",{onClick:()=>f(w.type),className:"w-full text-left px-4 py-3 rounded-xl border border-white/5 bg-white/[0.02] hover:bg-white/[0.06] transition-all",children:[r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-white",children:w.label}),r.jsx("div",{className:"text-[9px] text-gray-500 mt-1",children:w.description})]},w.type)),m.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No matches."})]})]})}):null},jv=({task:s,onChange:c,onCopy:d,copiedId:u})=>{const[f,p]=x.useState(()=>JSON.stringify(s,null,2)),[m,w]=x.useState(!1),b=g=>{const E=s,S={...E,...g&&typeof g=="object"?g:{}};return(!S.name||typeof S.name!="string")&&(S.name=E.name||"Task"),(!S.mode||!["scrape","agent","headful"].includes(S.mode))&&(S.mode=E.mode||"agent"),typeof S.wait!="number"&&(S.wait=typeof E.wait=="number"?E.wait:3),S.stealth||(S.stealth=E.stealth),(!S.variables||Array.isArray(S.variables))&&(S.variables=E.variables||{}),Array.isArray(S.actions)||(S.actions=E.actions||[]),S.extractionFormat||(S.extractionFormat=E.extractionFormat||"json"),S.includeShadowDom===void 0&&(S.includeShadowDom=E.includeShadowDom??!0),E.id&&S.id!==E.id&&(S.id=E.id),delete S.versions,delete S.last_opened,S};return x.useEffect(()=>{m||p(JSON.stringify(s,null,2))},[s,m]),r.jsxs("div",{className:"h-full flex flex-col min-h-0",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Protocol JSON"}),r.jsxs("button",{onClick:()=>{d(JSON.stringify(s,null,2),"json")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${u==="json"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[u==="json"?r.jsx(Ai,{className:"w-3 h-3"}):r.jsx(Ti,{className:"w-3 h-3"}),u==="json"?"Copied":"Copy"]})]}),r.jsx(Tn,{value:f,onChange:g=>{p(g);try{const E=JSON.parse(g),S=b(E);c(S),w(!1)}catch{w(!0)}},language:"json",className:"flex-1 min-h-0"})]})};function _u(){return _u=Object.assign?Object.assign.bind():function(s){for(var c=1;c<arguments.length;c++){var d=arguments[c];for(var u in d)({}).hasOwnProperty.call(d,u)&&(s[u]=d[u])}return s},_u.apply(null,arguments)}function Fh(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function Ru(s,c){return Ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,u){return d.__proto__=u,d},Ru(s,c)}function Nv(s,c){s.prototype=Object.create(c.prototype),s.prototype.constructor=s,Ru(s,c)}var Ih=Number.isNaN||function(c){return typeof c=="number"&&c!==c};function Ev(s,c){return!!(s===c||Ih(s)&&Ih(c))}function Cv(s,c){if(s.length!==c.length)return!1;for(var d=0;d<s.length;d++)if(!Ev(s[d],c[d]))return!1;return!0}function wu(s,c){c===void 0&&(c=Cv);var d,u=[],f,p=!1;function m(){for(var w=[],b=0;b<arguments.length;b++)w[b]=arguments[b];return p&&d===this&&c(w,u)||(f=s.apply(this,w),p=!0,d=this,u=w),f}return m}var Av=typeof performance=="object"&&typeof performance.now=="function",Ph=Av?function(){return performance.now()}:function(){return Date.now()};function ep(s){cancelAnimationFrame(s.id)}function Tv(s,c){var d=Ph();function u(){Ph()-d>=c?s.call(null):f.id=requestAnimationFrame(u)}var f={id:requestAnimationFrame(u)};return f}var Su=-1;function tp(s){if(s===void 0&&(s=!1),Su===-1||s){var c=document.createElement("div"),d=c.style;d.width="50px",d.height="50px",d.overflow="scroll",document.body.appendChild(c),Su=c.offsetWidth-c.clientWidth,document.body.removeChild(c)}return Su}var An=null;function ap(s){if(s===void 0&&(s=!1),An===null||s){var c=document.createElement("div"),d=c.style;d.width="50px",d.height="50px",d.overflow="scroll",d.direction="rtl";var u=document.createElement("div"),f=u.style;return f.width="100px",f.height="100px",c.appendChild(u),document.body.appendChild(c),c.scrollLeft>0?An="positive-descending":(c.scrollLeft=1,c.scrollLeft===0?An="negative":An="positive-ascending"),document.body.removeChild(c),An}return An}var _v=150,Rv=function(c,d){return c};function Mv(s){var c,d=s.getItemOffset,u=s.getEstimatedTotalSize,f=s.getItemSize,p=s.getOffsetForIndexAndAlignment,m=s.getStartIndexForOffset,w=s.getStopIndexForStartIndex,b=s.initInstanceProps,g=s.shouldResetStyleCacheOnItemSizeChange,E=s.validateProps;return c=(function(S){Nv(_,S);function _(O){var C;return C=S.call(this,O)||this,C._instanceProps=b(C.props,Fh(C)),C._outerRef=void 0,C._resetIsScrollingTimeoutId=null,C.state={instance:Fh(C),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof C.props.initialScrollOffset=="number"?C.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},C._callOnItemsRendered=void 0,C._callOnItemsRendered=wu(function(U,D,X,$){return C.props.onItemsRendered({overscanStartIndex:U,overscanStopIndex:D,visibleStartIndex:X,visibleStopIndex:$})}),C._callOnScroll=void 0,C._callOnScroll=wu(function(U,D,X){return C.props.onScroll({scrollDirection:U,scrollOffset:D,scrollUpdateWasRequested:X})}),C._getItemStyle=void 0,C._getItemStyle=function(U){var D=C.props,X=D.direction,$=D.itemSize,se=D.layout,P=C._getItemStyleCache(g&&$,g&&se,g&&X),ee;if(P.hasOwnProperty(U))ee=P[U];else{var I=d(C.props,U,C._instanceProps),fe=f(C.props,U,C._instanceProps),re=X==="horizontal"||se==="horizontal",le=X==="rtl",Be=re?I:0;P[U]=ee={position:"absolute",left:le?void 0:Be,right:le?Be:void 0,top:re?0:I,height:re?"100%":fe,width:re?fe:"100%"}}return ee},C._getItemStyleCache=void 0,C._getItemStyleCache=wu(function(U,D,X){return{}}),C._onScrollHorizontal=function(U){var D=U.currentTarget,X=D.clientWidth,$=D.scrollLeft,se=D.scrollWidth;C.setState(function(P){if(P.scrollOffset===$)return null;var ee=C.props.direction,I=$;if(ee==="rtl")switch(ap()){case"negative":I=-$;break;case"positive-descending":I=se-X-$;break}return I=Math.max(0,Math.min(I,se-X)),{isScrolling:!0,scrollDirection:P.scrollOffset<I?"forward":"backward",scrollOffset:I,scrollUpdateWasRequested:!1}},C._resetIsScrollingDebounced)},C._onScrollVertical=function(U){var D=U.currentTarget,X=D.clientHeight,$=D.scrollHeight,se=D.scrollTop;C.setState(function(P){if(P.scrollOffset===se)return null;var ee=Math.max(0,Math.min(se,$-X));return{isScrolling:!0,scrollDirection:P.scrollOffset<ee?"forward":"backward",scrollOffset:ee,scrollUpdateWasRequested:!1}},C._resetIsScrollingDebounced)},C._outerRefSetter=function(U){var D=C.props.outerRef;C._outerRef=U,typeof D=="function"?D(U):D!=null&&typeof D=="object"&&D.hasOwnProperty("current")&&(D.current=U)},C._resetIsScrollingDebounced=function(){C._resetIsScrollingTimeoutId!==null&&ep(C._resetIsScrollingTimeoutId),C._resetIsScrollingTimeoutId=Tv(C._resetIsScrolling,_v)},C._resetIsScrolling=function(){C._resetIsScrollingTimeoutId=null,C.setState({isScrolling:!1},function(){C._getItemStyleCache(-1,null)})},C}_.getDerivedStateFromProps=function(C,U){return zv(C,U),E(C),null};var B=_.prototype;return B.scrollTo=function(C){C=Math.max(0,C),this.setState(function(U){return U.scrollOffset===C?null:{scrollDirection:U.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},B.scrollToItem=function(C,U){U===void 0&&(U="auto");var D=this.props,X=D.itemCount,$=D.layout,se=this.state.scrollOffset;C=Math.max(0,Math.min(C,X-1));var P=0;if(this._outerRef){var ee=this._outerRef;$==="vertical"?P=ee.scrollWidth>ee.clientWidth?tp():0:P=ee.scrollHeight>ee.clientHeight?tp():0}this.scrollTo(p(this.props,C,U,se,this._instanceProps,P))},B.componentDidMount=function(){var C=this.props,U=C.direction,D=C.initialScrollOffset,X=C.layout;if(typeof D=="number"&&this._outerRef!=null){var $=this._outerRef;U==="horizontal"||X==="horizontal"?$.scrollLeft=D:$.scrollTop=D}this._callPropsCallbacks()},B.componentDidUpdate=function(){var C=this.props,U=C.direction,D=C.layout,X=this.state,$=X.scrollOffset,se=X.scrollUpdateWasRequested;if(se&&this._outerRef!=null){var P=this._outerRef;if(U==="horizontal"||D==="horizontal")if(U==="rtl")switch(ap()){case"negative":P.scrollLeft=-$;break;case"positive-ascending":P.scrollLeft=$;break;default:var ee=P.clientWidth,I=P.scrollWidth;P.scrollLeft=I-ee-$;break}else P.scrollLeft=$;else P.scrollTop=$}this._callPropsCallbacks()},B.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ep(this._resetIsScrollingTimeoutId)},B.render=function(){var C=this.props,U=C.children,D=C.className,X=C.direction,$=C.height,se=C.innerRef,P=C.innerElementType,ee=C.innerTagName,I=C.itemCount,fe=C.itemData,re=C.itemKey,le=re===void 0?Rv:re,Be=C.layout,ve=C.outerElementType,et=C.outerTagName,Ee=C.style,Ge=C.useIsScrolling,z=C.width,L=this.state.isScrolling,F=X==="horizontal"||Be==="horizontal",ge=F?this._onScrollHorizontal:this._onScrollVertical,he=this._getRangeToRender(),v=he[0],q=he[1],W=[];if(I>0)for(var Z=v;Z<=q;Z++)W.push(x.createElement(U,{data:fe,key:le(Z,fe),index:Z,isScrolling:Ge?L:void 0,style:this._getItemStyle(Z)}));var ne=u(this.props,this._instanceProps);return x.createElement(ve||et||"div",{className:D,onScroll:ge,ref:this._outerRefSetter,style:_u({position:"relative",height:$,width:z,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:X},Ee)},x.createElement(P||ee||"div",{children:W,ref:se,style:{height:F?"100%":ne,pointerEvents:L?"none":void 0,width:F?ne:"100%"}}))},B._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var C=this.props.itemCount;if(C>0){var U=this._getRangeToRender(),D=U[0],X=U[1],$=U[2],se=U[3];this._callOnItemsRendered(D,X,$,se)}}if(typeof this.props.onScroll=="function"){var P=this.state,ee=P.scrollDirection,I=P.scrollOffset,fe=P.scrollUpdateWasRequested;this._callOnScroll(ee,I,fe)}},B._getRangeToRender=function(){var C=this.props,U=C.itemCount,D=C.overscanCount,X=this.state,$=X.isScrolling,se=X.scrollDirection,P=X.scrollOffset;if(U===0)return[0,0,0,0];var ee=m(this.props,P,this._instanceProps),I=w(this.props,ee,P,this._instanceProps),fe=!$||se==="backward"?Math.max(1,D):1,re=!$||se==="forward"?Math.max(1,D):1;return[Math.max(0,ee-fe),Math.max(0,Math.min(U-1,I+re)),ee,I]},_})(x.PureComponent),c.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},c}var zv=function(c,d){c.children,c.direction,c.height,c.layout,c.innerTagName,c.outerTagName,c.width,d.instance},lr=Mv({getItemOffset:function(c,d){var u=c.itemSize;return d*u},getItemSize:function(c,d){var u=c.itemSize;return u},getEstimatedTotalSize:function(c){var d=c.itemCount,u=c.itemSize;return u*d},getOffsetForIndexAndAlignment:function(c,d,u,f,p,m){var w=c.direction,b=c.height,g=c.itemCount,E=c.itemSize,S=c.layout,_=c.width,B=w==="horizontal"||S==="horizontal",O=B?_:b,C=Math.max(0,g*E-O),U=Math.min(C,d*E),D=Math.max(0,d*E-O+E+m);switch(u==="smart"&&(f>=D-O&&f<=U+O?u="auto":u="center"),u){case"start":return U;case"end":return D;case"center":{var X=Math.round(D+(U-D)/2);return X<Math.ceil(O/2)?0:X>C+Math.floor(O/2)?C:X}default:return f>=D&&f<=U?f:f<D?D:U}},getStartIndexForOffset:function(c,d){var u=c.itemCount,f=c.itemSize;return Math.max(0,Math.min(u-1,Math.floor(d/f)))},getStopIndexForStartIndex:function(c,d,u){var f=c.direction,p=c.height,m=c.itemCount,w=c.itemSize,b=c.layout,g=c.width,E=f==="horizontal"||b==="horizontal",S=d*w,_=E?g:p,B=Math.ceil((_+u-S)/w);return Math.max(0,Math.min(m-1,d+B-1))},initInstanceProps:function(c){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(c){c.itemSize}});const Lp=({capture:s,onDelete:c})=>r.jsxs("div",{className:"rounded-2xl border border-white/10 bg-white/[0.02] overflow-hidden",children:[r.jsxs("div",{className:"p-3 border-b border-white/10 flex items-center justify-between",children:[r.jsx("div",{className:"text-[9px] font-bold text-white uppercase tracking-widest",children:s.type==="recording"?"Recording":"Screenshot"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer",className:"text-[9px] font-bold uppercase tracking-widest text-blue-300 hover:text-blue-200",children:"Open"}),c&&r.jsx("button",{onClick:()=>c(s.name),className:"text-[9px] font-bold uppercase tracking-widest text-red-300 hover:text-red-200",children:"Delete"})]})]}),r.jsx("div",{className:"bg-black",children:s.type==="recording"?r.jsx("video",{src:s.url,controls:!0,className:"w-full h-64 object-contain bg-black"}):r.jsx("img",{src:s.url,className:"w-full h-64 object-contain bg-black"})}),r.jsx("div",{className:"p-3 text-[9px] text-gray-500 uppercase tracking-widest",children:s.name})]}),Qs=6e4,ju=200,lp=200,Ei=1e6,Nu=2e3,Eu=2e3,Ov=360,Hp=12,Zs=Ov+Hp,Dv=4,kv=4,Uv=({index:s,style:c,data:d})=>{const u=d[s];return u?r.jsx("div",{style:{...c,paddingBottom:Hp},children:r.jsx(Lp,{capture:u})}):null},Lv=s=>`${(s/(1024*1024)).toFixed(2)} MB`,Hv=s=>{if(typeof s=="boolean")return s;if(typeof s=="string"){const c=s.trim().toLowerCase();if(c==="true")return!0;if(c==="false")return!1}return null},$s=(s,c)=>s.length<=c?{text:s,truncated:!1}:{text:s.slice(0,c),truncated:!0},Bv=s=>!s||s.data===void 0||s.data===null?{reason:"No data to copy."}:{raw:s.data},Ks=(s,c,d)=>s.length<=c?s:(d.push(`first ${c.toLocaleString()} chars`),s.slice(0,c)),qv=s=>{const c=[];if(typeof s=="string")return{text:Ks(s,Ei,c),truncated:c.length>0,reason:c.join(", ")};if(Array.isArray(s)){let u=s;s.length>Nu&&(u=s.slice(0,Nu),c.push(`first ${Nu.toLocaleString()} items`));let f="";try{f=JSON.stringify(u,null,2)}catch{f=String(u)}return f=Ks(f,Ei,c),{text:f,truncated:c.length>0,reason:c.join(", ")}}if(s&&typeof s=="object"){let u=s;const f=Object.keys(s);f.length>Eu&&(u=f.slice(0,Eu).reduce((m,w)=>(m[w]=s[w],m),{}),c.push(`first ${Eu.toLocaleString()} keys`));let p="";try{p=JSON.stringify(u,null,2)}catch{p=String(u)}return p=Ks(p,Ei,c),{text:p,truncated:c.length>0,reason:c.join(", ")}}return{text:Ks(String(s),Ei,c),truncated:c.length>0,reason:c.join(", ")}},Vv=s=>{if(typeof s=="string")return s;try{return JSON.stringify(s,null,2)}catch{return String(s)}},np=s=>{if(!s||s.data===void 0||s.data===null||s.data==="")return{text:"",truncated:!1,language:"plain"};const c=s.data;if(typeof c=="string"){const u=c.trim(),f=u.startsWith("<")&&u.includes(">")?"html":u.startsWith("{")||u.startsWith("[")?"json":"plain",p=$s(c,Qs);return{text:p.text,truncated:p.truncated,language:f}}if(Array.isArray(c)){const u=c.length>ju?c.slice(0,ju):c,f=JSON.stringify(u,null,2),p=$s(f,Qs);return{text:p.text,truncated:p.truncated||c.length>ju,language:"json"}}if(c&&typeof c=="object"){const u=Object.keys(c);let f=c,p=!1;u.length>lp&&(p=!0,f=u.slice(0,lp).reduce((b,g)=>(b[g]=c[g],b),{}));const m=JSON.stringify(f,null,2),w=$s(m,Qs);return{text:w.text,truncated:w.truncated||p,language:"json"}}const d=$s(String(c),Qs);return{text:d.text,truncated:d.truncated,language:"plain"}},Yv=s=>{const c=[];let d=[],u="",f=!1;for(let p=0;p<s.length;p+=1){const m=s[p];f?m==='"'?s[p+1]==='"'?(u+='"',p+=1):f=!1:u+=m:m==='"'?f=!0:m===","?(d.push(u),u=""):m===`
12
+ `?(d.push(u),c.push(d),d=[],u=""):m==="\r"||(u+=m)}return d.push(u),(d.length>1||d[0]!==""||c.length>0)&&c.push(d),c},Gv=s=>{if(!s)return null;if(typeof s=="string"){const c=s.trim();if(!c.includes(",")||!c.includes(`
13
+ `))return null;const d=Yv(c).filter(p=>p.some(m=>String(m||"").trim()!==""));if(d.length<2)return null;const u=d[0].map((p,m)=>String(p||"").trim()||`column_${m+1}`),f=d.slice(1);return u.length<2?null:{headers:u,rows:f}}if(Array.isArray(s)){if(s.length===0)return null;if(s.every(c=>c&&typeof c=="object"&&!Array.isArray(c))){const c=[];if(s.forEach(u=>{Object.keys(u).forEach(f=>{c.includes(f)||c.push(f)})}),c.length===0)return null;const d=s.map(u=>c.map(f=>u[f]??""));return{headers:c,rows:d}}if(s.every(c=>Array.isArray(c))){const c=Math.max(...s.map(u=>u.length));return{headers:Array.from({length:c},(u,f)=>`column_${f+1}`),rows:s}}return null}if(s&&typeof s=="object"){const c=Object.keys(s);return c.length===0?null:{headers:c,rows:[c.map(d=>s[d]??"")]}}return null},Xv=(s,c)=>s==null?null:typeof s=="string"?c?{content:s,mime:"text/csv",ext:"csv"}:{content:s,mime:"application/json",ext:"json"}:{content:JSON.stringify(s,null,2),mime:"application/json",ext:"json"},Qv=(s,c,d)=>{const u=new Blob([c],{type:d}),f=URL.createObjectURL(u),p=document.createElement("a");p.href=f,p.download=s,document.body.appendChild(p),p.click(),p.remove(),URL.revokeObjectURL(f)},Bp=({results:s,pinnedResults:c,isExecuting:d,isHeadful:u,runId:f,onConfirm:p,onNotify:m,onPin:w,onUnpin:b,fullWidth:g})=>{const[E,S]=x.useState(null),[_,B]=x.useState("raw"),[O,C]=x.useState(()=>c&&!s?"pinned":"latest"),[U,D]=x.useState("checking"),[X,$]=x.useState(!1),[se,P]=x.useState(!1),[ee,I]=x.useState([]),fe=x.useRef(null),re=O==="pinned"&&c?c:s,le=Gv(re?.data),Be=re&&re.data!==void 0&&re.data!==null&&re.data!==""?np(re):null,ve=re?.screenshotUrl?`${re.screenshotUrl}${O==="latest"?`?t=${Date.now()}`:""}`:null,et=L=>{const F=Hv(L);return F!==null?F?r.jsx(Ai,{className:"w-3 h-3 text-blue-400"}):"":L??""},Ee=async()=>{P(!0);try{const L=f?`?runId=${encodeURIComponent(f)}`:"",F=await fetch(`/api/data/captures${L}`),ge=F.ok?await F.json():{captures:[]};I(Array.isArray(ge.captures)?ge.captures:[])}catch{I([])}finally{P(!1)}};x.useEffect(()=>{B(le?"table":"raw")},[re]),x.useEffect(()=>{if(s){C("latest");return}c&&C("pinned")},[s,c]),x.useEffect(()=>{!c&&O==="pinned"&&C("latest")},[c,O]),x.useEffect(()=>{if(!u||O!=="latest")return;let L=!1;return(async()=>{try{const ge=await fetch("/novnc/core/rfb.js",{method:"HEAD",cache:"no-store"});L||D(ge.ok?"novnc":"native")}catch{L||D("native")}})(),()=>{L=!0}},[u,O]);const Ge=async(L,F,ge)=>{if(!L){m("Nothing to copy.","error");return}let he=L;try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(he);else{const v=document.createElement("textarea");v.value=he,v.style.position="fixed",v.style.left="-999999px",v.style.top="-999999px",document.body.appendChild(v),v.focus(),v.select(),document.execCommand("copy"),v.remove()}S(F),setTimeout(()=>S(null),2e3),ge?.truncatedNotice?m("Copied truncated data.","success"):he.length!==L.length&&m("Copied a truncated preview.","success")}catch(v){console.error("Copy failed:",v),m("Copy failed.","error")}};if(u&&O==="latest"){const{origin:L,hostname:F}=window.location,ge=`${L}/novnc.html?host=${F}&path=websockify`,he=()=>{const v=fe.current;if(v){if(document.fullscreenElement){document.exitFullscreen().catch(()=>{});return}v.requestFullscreen?.().catch(()=>{})}};return U==="native"?r.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Headful session running in a native browser window."})}):U==="checking"?r.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Checking headful viewer..."})}):r.jsxs("div",{ref:fe,className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative",children:[r.jsx("button",{type:"button",onClick:he,className:"absolute top-4 right-4 z-10 px-3 py-2 rounded-xl border border-white/20 bg-black/40 text-[9px] font-bold uppercase tracking-widest text-white/80 hover:bg-black/60 transition-all",title:"Toggle fullscreen",children:"Fullscreen"}),r.jsx("iframe",{src:ge,className:"absolute inset-0 w-full h-full",title:"Headful Browser"})]})}if(!re&&!(d&&O==="latest"))return r.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center space-y-4 opacity-20",children:[r.jsx("div",{className:"w-16 h-16 border border-white/10 rounded-full flex items-center justify-center",children:r.jsx(iv,{className:"w-6 h-6 text-white"})}),r.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.3em]",children:"Ready"})]});const z=g?"space-y-12 relative z-10 w-full":"space-y-12 relative z-10 max-w-5xl mx-auto";return r.jsxs("div",{className:z,children:[r.jsxs("div",{className:"flex items-end justify-between border-b border-white/5 pb-10",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsx("p",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Preview"}),r.jsx("h2",{className:"text-xl font-mono text-white truncate max-w-xl tracking-tight italic",children:re?.finalUrl||re?.url||""})]}),r.jsx("div",{className:`px-4 py-2 rounded-xl text-[9px] font-bold uppercase tracking-[0.2em] ${O==="pinned"?"bg-amber-500/10 text-amber-300":d?"bg-blue-500/10 text-blue-400 animate-pulse":"bg-green-500/10 text-green-400"}`,children:O==="pinned"?"Pinned":d?"Running":"Finished"})]}),r.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[r.jsxs("div",{className:"glass-card rounded-[32px] overflow-hidden flex flex-col min-h-[400px]",children:[r.jsxs("div",{className:"p-6 border-b border-white/5 flex items-center justify-between text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:[r.jsx("span",{children:"Screenshot"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-white/20",children:re?.timestamp||"--:--:--"}),r.jsx("button",{type:"button",onClick:()=>{$(!0),Ee()},className:"px-3 py-2 rounded-xl border border-white/10 text-[8px] font-bold uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all",children:"View All Captures"})]})]}),r.jsx("div",{className:"relative bg-black flex-1 flex items-center justify-center overflow-hidden",children:ve?r.jsx("img",{src:ve,className:"absolute inset-0 w-full h-full object-contain transition-opacity duration-1000"}):r.jsx("div",{className:"text-[8px] font-bold text-white/5 uppercase tracking-widest",children:"Waiting for Frame..."})})]}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col h-[400px]",children:[r.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest mb-6 border-b border-white/5 pb-4",children:"Activity Log"}),r.jsxs("div",{className:"flex-1 font-mono text-[10px] text-gray-400 space-y-2 overflow-y-auto custom-scrollbar pr-2",children:[re?.logs?.map((L,F)=>r.jsxs("div",{className:"flex gap-2",children:[r.jsx("span",{className:"text-white/10 shrink-0",children:"›"})," ",r.jsx("span",{children:L})]},F)),d&&O==="latest"&&(!re?.logs||re?.logs.length===0)&&r.jsx("div",{className:"animate-pulse",children:"Connecting to kernel..."})]})]})]}),X&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-6",children:r.jsxs("div",{className:"glass-card rounded-[32px] w-full max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[r.jsxs("div",{className:"p-6 border-b border-white/10 flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-widest",children:"Captures"}),r.jsx("div",{className:"text-sm font-bold text-white",children:"Recordings and Screenshots"})]}),r.jsx("button",{onClick:()=>$(!1),className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all bg-white/5 border-white/10 text-white hover:bg-white/10",children:"Close"})]}),r.jsxs("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:[se&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!se&&ee.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!se&&ee.length>0&&r.jsx(lr,{height:Math.min(Math.max(Zs,ee.length*Zs),Zs*Dv),width:"100%",itemCount:ee.length,itemSize:Zs,overscanCount:kv,itemData:ee,children:Uv})]})]})}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col relative",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[r.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Data"}),r.jsxs("div",{className:"flex items-center gap-2",children:[c&&r.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["latest","pinned"].map(L=>r.jsx("button",{onClick:()=>C(L),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${O===L?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:L},L))}),le&&r.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["table","raw"].map(L=>r.jsx("button",{onClick:()=>B(L),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${_===L?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:L},L))}),O==="pinned"?r.jsx("button",{onClick:()=>{b?.(),C("latest")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-amber-200 hover:bg-white/10",title:"Unpin data",children:"Unpin"}):r.jsx("button",{onClick:()=>{if(!re){m("No data to pin.","error");return}w?.(re),C("pinned")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-white hover:bg-white/10",title:"Pin data",children:c?"Update Pin":"Pin"}),r.jsx("button",{onClick:()=>{const L=Xv(re?.data,le);if(!L){m("No data to export.","error");return}const F=`doppelganger-data-${new Date().toISOString().replace(/[:.]/g,"-")}.${L.ext}`;Qv(F,L.content,L.mime),m(`Exported ${L.ext.toUpperCase()}.`,"success")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-white hover:bg-white/10",title:"Export extracted data",children:"Export"}),r.jsxs("button",{onClick:async()=>{const L=Bv(re);if(L.reason){m(L.reason||"Data too large to copy safely.","error");return}const F=np(re);let he=Vv(L.raw),v=!1;F.truncated&&(await p({message:"Preview is truncated for performance.",confirmLabel:"Copy full",cancelLabel:"Copy preview"})||(he=F.text||"",v=!0)),he.length>Ei&&(await p({message:`Copying ${Lv(he.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:v?"Copy preview":"Copy truncated"})||(he=qv(L.raw).text,v=!0)),Ge(he,"data",{skipSizeConfirm:!0,truncatedNotice:v})},className:`px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${E==="data"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,title:"Copy extracted data",children:[E==="data"?r.jsx(Ai,{className:"w-3 h-3"}):r.jsx(Ti,{className:"w-3 h-3"}),E==="data"?"Copied":"Copy"]})]})]}),Be?.truncated&&r.jsx("button",{type:"button",onClick:()=>m("Preview truncated for performance.","error"),className:"absolute top-5 right-5 h-2.5 w-2.5 rounded-full bg-amber-400 shadow-[0_0_8px_rgba(251,191,36,0.6)]",title:"Preview truncated"}),r.jsx("div",{className:"max-h-[70vh] overflow-y-auto custom-scrollbar pr-2 relative",children:d&&O==="latest"&&(!re||re.data===void 0)?r.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"Buffering data stream..."}):!re||re.data===void 0||re.data===null||re.data===""?r.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"No data available."}):r.jsx("div",{children:le&&_==="table"?r.jsx("div",{className:"overflow-auto custom-scrollbar rounded-2xl border border-white/10",children:r.jsxs("table",{className:"min-w-full table-auto text-[10px] text-left text-white/80 font-mono",children:[r.jsx("thead",{className:"bg-white/5 text-[9px] uppercase tracking-widest text-white/50",children:r.jsx("tr",{children:le.headers.map(L=>r.jsx("th",{className:"px-3 py-2 border-b border-white/10 whitespace-nowrap",children:L},L))})}),r.jsx("tbody",{children:le.rows.map((L,F)=>r.jsx("tr",{className:"odd:bg-white/[0.02]",children:le.headers.map((ge,he)=>r.jsx("td",{className:"px-3 py-2 border-b border-white/5 align-top whitespace-normal break-words",children:et(L[he])},`${F}-${he}`))},F))})]})}):r.jsx(Tn,{readOnly:!0,value:Be?.text||"",language:Be?.language||"plain"})})})]})]})},Zv=[{value:"Control",label:"Ctrl"},{value:"Shift",label:"Shift"},{value:"Alt",label:"Alt"},{value:"Meta",label:"Meta"}],$v=["Enter","Tab","Escape","Space","Backspace","Delete","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown","F1","F2","F3","F4","F5"].concat([...Array(10)].map((s,c)=>`${c}`)).concat(Array.from({length:26},(s,c)=>String.fromCharCode(65+c))),Kv=[{value:"replace",label:"Replace Text"},{value:"append",label:"Append Text"}],Jv=s=>{if(!s)return{modifiers:[],baseKey:""};const c=s.split("+"),d=c.pop()||"";return{modifiers:c,baseKey:d}},ip=(s,c)=>[...s.filter(Boolean),c].filter(Boolean).join("+"),Wv=({name:s,def:c,updateVariable:d,removeVariable:u})=>{const[f,p]=x.useState(s);return x.useEffect(()=>{p(s)},[s]),r.jsxs("div",{className:"flex gap-2 items-center",children:[r.jsx("input",{type:"text",value:f,onChange:m=>p(m.target.value),onBlur:()=>{f!==s&&d(s,f,c.type,c.value)},className:"var-name flex-1 bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),r.jsxs("select",{value:c.type,onChange:m=>d(s,s,m.target.value,c.value),className:"custom-select var-type bg-white/[0.05] border border-white/10 rounded-xl px-2 py-2 text-[8px] font-bold uppercase text-white/40",children:[r.jsx("option",{value:"string",children:"STR"}),r.jsx("option",{value:"number",children:"NUM"}),r.jsx("option",{value:"boolean",children:"BOOL"})]}),r.jsx("div",{className:"flex-1",children:c.type==="boolean"?r.jsxs("select",{value:String(c.value),onChange:m=>d(s,s,c.type,m.target.value),className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[10px] text-white",children:[r.jsx("option",{value:"true",children:"True"}),r.jsx("option",{value:"false",children:"False"})]}):r.jsx("input",{type:c.type==="number"?"number":"text",value:c.value,onChange:m=>d(s,s,c.type,m.target.value),className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})}),r.jsx("button",{onClick:()=>u(s),className:"p-2 text-red-500 hover:text-red-400",children:"×"})]})},qp=({currentTask:s,setCurrentTask:c,tasks:d=[],editorView:u,setEditorView:f,isExecuting:p,onSave:m,onRun:w,results:b,pinnedResults:g,saveMsg:E,onConfirm:S,onNotify:_,onPinResults:B,onUnpinResults:O,onRunSnapshot:C,runId:U,onStop:D,hasUnsavedChanges:X})=>{const[$,se]=x.useState(null),[P,ee]=x.useState(null),I=x.useRef(null),fe=x.useRef(null),[,re]=x.useState(null),[le,Be]=x.useState(null),[ve,et]=x.useState(null),[Ee,Ge]=x.useState([]),[z,L]=x.useState(!1),[F,ge]=x.useState(!1),[he,v]=x.useState(""),[q,W]=x.useState(null),[Z,ne]=x.useState(null),[pe,be]=x.useState(!1),[Ze,ke]=x.useState({}),[yt,oa]=x.useState([]),[ya,va]=x.useState(!1),Ot=()=>{try{const A=localStorage.getItem("doppelganger.layout.leftWidthPct");if(!A)return .3;const j=parseFloat(A);return Number.isNaN(j)?.3:Math.min(.75,Math.max(.25,j))}catch{return .3}},Wt=A=>{const J=Math.floor(window.innerWidth*.8);return Math.max(320,Math.min(J,A))},[ba,wa]=x.useState(()=>{if(typeof window>"u")return 360;const A=Ot();return Wt(Math.round(window.innerWidth*A))}),ie=x.useRef(!1),me=d.filter(A=>String(A.id||"")!==String(s.id||"")),ue=ya&&yt.length===1&&yt[0]?.id==="host",we=1e6,Nt=A=>`${(A/(1024*1024)).toFixed(2)} MB`,Ft=async(A,j,J)=>{if(!A){_("Nothing to copy.","error");return}let Ce=A;A.length>we&&(await S({message:`Copying ${Nt(A.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:"Copy segment"})||(Ce=A.slice(0,we)));try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(Ce);else{const Le=document.createElement("textarea");Le.value=Ce,Le.style.position="fixed",Le.style.left="-999999px",Le.style.top="-999999px",document.body.appendChild(Le),Le.focus(),Le.select(),document.execCommand("copy"),Le.remove()}se(j),setTimeout(()=>se(null),2e3),J?.truncatedNotice||Ce.length!==A.length&&_("Copied a truncated preview.","success")}catch(Le){console.error("Copy failed:",Le),_("Copy failed.","error")}};x.useEffect(()=>{let A=!1;return(async()=>{try{const J=await fetch("/api/settings/proxies",{credentials:"include"});if(!J.ok)throw new Error("Failed to load proxies");const Ce=await J.json();if(A)return;oa(Array.isArray(Ce.proxies)?Ce.proxies:[])}catch{A||oa([])}finally{A||va(!0)}})(),()=>{A=!0}},[]),x.useEffect(()=>{ue&&s.rotateProxies&&c({...s,rotateProxies:!1})},[ue,s,c]);const wt=new Set(["if","while","repeat","foreach","on_error"]),ql=A=>{const j=(A||"").trim(),J=j.match(/^\{\$([\w.]+)\}$/);return J?J[1]:j},Ut={string:[{value:"equals",label:"Equals"},{value:"not_equals",label:"Not equal"},{value:"contains",label:"Contains"},{value:"starts_with",label:"Starts with"},{value:"ends_with",label:"Ends with"},{value:"matches",label:"Matches regex"}],number:[{value:"equals",label:"Equals"},{value:"not_equals",label:"Not equal"},{value:"gt",label:"Greater than"},{value:"gte",label:"Greater or equal"},{value:"lt",label:"Less than"},{value:"lte",label:"Less or equal"}],boolean:[{value:"is_true",label:"Is true"},{value:"is_false",label:"Is false"}]},Vl=A=>{let j=0;return A.map(J=>{(J.type==="else"||J.type==="end")&&(j=Math.max(0,j-1));const Ce=j;return(J.type==="else"||wt.has(J.type))&&(j+=1),Ce})},Ra=A=>{const j={id:"act_"+Date.now(),type:A,selector:"",value:""};A==="set"&&(j.varName=""),A==="merge"&&(j.varName=""),A==="start"&&(j.value=""),A==="type"&&(j.typeMode="replace"),A==="if"&&(j.conditionVar="",j.conditionVarType="string",j.conditionOp="equals",j.conditionValue=""),A==="while"&&(j.conditionVar="",j.conditionVarType="string",j.conditionOp="equals",j.conditionValue=""),c({...s,actions:[...s.actions,j]})},Yl=A=>{ge(!0),v(""),W(A||null)},da=A=>{c({...s,actions:s.actions.filter(j=>j.id!==A)})},Y=(A,j)=>{c({...s,actions:s.actions.map(J=>J.id===A?{...J,...j}:J)})},te=(A,j)=>{if(A===j)return;const J=[...s.actions],Ce=J.findIndex(Et=>Et.id===A),Le=J.findIndex(Et=>Et.id===j);if(Ce===-1||Le===-1)return;const[st]=J.splice(Ce,1);J.splice(Le,0,st),c({...s,actions:J})},ae=A=>!A||!(A instanceof HTMLElement)?!1:!!A.closest('input, textarea, select, button, a, [contenteditable="true"], [data-no-drag="true"]'),oe=(A,j,J,Ce)=>{if(J!==void 0&&Ce!==void 0&&Math.abs(A-Ce)<14)return J;const Le=s.actions;let st=Le.length-1;for(let Et=0;Et<Le.length;Et++){if(Le[Et].id===j)continue;const ja=document.getElementById(`action-${Le[Et].id}`);if(!ja)continue;const wl=ja.getBoundingClientRect(),Sl=wl.top+wl.height*.4;if(A<Sl){st=Et;break}}return st},Ue=()=>{if(le){if(ve!==null&&ve!==le.index){const A=s.actions[ve]?.id;A&&te(le.id,A)}Be(null),et(null),I.current=null}};x.useEffect(()=>{if(!le)return;const A=J=>{if(I.current!==null&&J.pointerId!==I.current)return;if(fe.current){const st=fe.current.getBoundingClientRect();J.clientY<st.top+28&&(fe.current.scrollTop-=14),J.clientY>st.bottom-28&&(fe.current.scrollTop+=14)}const Ce=le.originTop+le.height/2,Le=oe(J.clientY,le.id,le.index,Ce);Be(st=>st&&{...st,currentY:J.clientY}),et(Le)},j=J=>{I.current!==null&&J.pointerId!==I.current||Ue()};return window.addEventListener("pointermove",A),window.addEventListener("pointerup",j),window.addEventListener("pointercancel",j),()=>{window.removeEventListener("pointermove",A),window.removeEventListener("pointerup",j),window.removeEventListener("pointercancel",j)}},[le,ve,s.actions]);const Re=()=>{const A="var_"+Date.now().toString().slice(-4);c({...s,variables:{...s.variables,[A]:{type:"string",value:""}}})},nt=A=>({...A,id:"act_"+Date.now()+"_"+Math.floor(Math.random()*1e3)}),it=(A,j)=>{A.preventDefault();const J=8,Ce=200,Le=190,st=Math.min(Math.max(A.clientX+12,J),window.innerWidth-Ce-J),Et=Math.min(Math.max(A.clientY+12,J),window.innerHeight-Le-J);ee({id:j,x:st,y:Et})},Rt=()=>ee(null);x.useEffect(()=>{if(!P)return;const A=J=>{J.target?.closest(".action-context-menu")||ee(null)},j=J=>{J.key==="Escape"&&ee(null)};return window.addEventListener("mousedown",A),window.addEventListener("keydown",j),window.addEventListener("scroll",A,!0),()=>{window.removeEventListener("mousedown",A),window.removeEventListener("keydown",j),window.removeEventListener("scroll",A,!0)}},[P]),x.useEffect(()=>{if(!U||s.mode!=="agent")return;ke({});const A=new EventSource(`/api/executions/stream?runId=${encodeURIComponent(U)}`,{withCredentials:!0});return A.onmessage=j=>{if(j.data)try{const J=JSON.parse(j.data);J&&J.actionId&&J.status&&ke(Ce=>({...Ce,[J.actionId]:J.status}))}catch{}},A.addEventListener("ready",()=>{}),A.onopen=()=>{},A.onerror=()=>{A.close()},()=>{A.close()}},[U,s.mode]),x.useEffect(()=>{if(typeof window>"u")return;const A=Ot();wa(Wt(Math.round(window.innerWidth*A)))},[]),x.useEffect(()=>{const A=J=>{if(!ie.current)return;const Ce=Wt(J.clientX);wa(Ce)},j=()=>{ie.current=!1,document.body.style.cursor="",document.body.style.userSelect=""};return window.addEventListener("pointermove",A),window.addEventListener("pointerup",j),window.addEventListener("pointercancel",j),()=>{window.removeEventListener("pointermove",A),window.removeEventListener("pointerup",j),window.removeEventListener("pointercancel",j)}},[]);const fa=A=>{const j={...s.variables};delete j[A],c({...s,variables:j})},Sa=(A,j,J,Ce)=>{const Le={...s.variables};delete Le[A];let st=Ce;J==="number"&&(st=parseFloat(Ce)||0),J==="boolean"&&(st=Ce==="true"||Ce===!0),Le[j]={type:J,value:st},c({...s,variables:Le})},Mt=async()=>{if(s.id){L(!0);try{const A=await fetch(`/api/tasks/${s.id}/versions`);if(!A.ok)throw new Error("Failed to load versions");const j=await A.json();Ge(Array.isArray(j.versions)?j.versions:[])}catch{Ge([])}finally{L(!1)}}},tt=async A=>{if(!(!s.id||!await S("Rollback to this version? Current changes will be saved as a new version.")))try{const J=await fetch(`/api/tasks/${s.id}/rollback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({versionId:A})});if(!J.ok)throw new Error("Rollback failed");const Ce=await J.json();c(Ce),_("Rolled back to selected version.","success"),Mt()}catch{_("Rollback failed.","error")}},It=async A=>{if(s.id){be(!0);try{const j=await fetch(`/api/tasks/${s.id}/versions/${A}`);if(!j.ok)throw new Error("Failed to load version");const J=await j.json();if(!J?.snapshot)throw new Error("Missing snapshot");ne({id:J.metadata?.id||A,timestamp:J.metadata?.timestamp||Date.now(),snapshot:J.snapshot})}catch{_("Failed to load version snapshot.","error")}finally{be(!1)}}};return x.useEffect(()=>{u==="history"&&Mt()},[u,s.id]),r.jsxs("div",{className:"flex-1 flex overflow-hidden animate-in fade-in slide-in-from-bottom-4 duration-500",children:[r.jsxs("aside",{className:"glass border-r border-white/10 flex flex-col shrink-0 overflow-hidden",style:{width:ba},children:[r.jsxs("div",{className:"p-8 border-b border-white/10 space-y-6 shrink-0",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("input",{type:"text",value:s.name,onChange:A=>c({...s,name:A.target.value}),placeholder:"Task Name...",className:"bg-transparent text-xl font-bold tracking-tight text-white focus:outline-none border-none p-0 w-full placeholder:text-white/10"}),r.jsxs("div",{className:"flex items-center gap-6",children:[r.jsx("button",{onClick:()=>f("history"),className:"w-8 h-8 rounded-full text-gray-400 hover:text-white hover:bg-white/5 transition-all flex items-center justify-center",title:"Task History",children:r.jsx(Op,{className:"w-3.5 h-3.5"})}),r.jsx("button",{onClick:m,disabled:!X,className:`px-4 py-2 text-[9px] font-bold rounded-full uppercase tracking-widest transition-all ${E==="SAVED"?"text-green-400 border border-green-400/20":"bg-blue-500/10 border border-white/10 text-blue-400"} ${X?"hover:bg-blue-500/20":"opacity-50 cursor-not-allowed"}`,children:E==="SAVED"?"SAVED":"SAVE"})]})]}),r.jsx("div",{className:"bg-white/5 p-1 rounded-xl flex gap-1 border border-white/5",children:["scrape","agent","headful"].map(A=>r.jsx("button",{onClick:()=>c({...s,mode:A}),className:`flex-1 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${s.mode===A?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:A==="scrape"?"Scraper":A==="agent"?"Agent":"Headful"},A))}),r.jsxs("div",{className:"flex items-center justify-between px-2",children:[r.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Interface Mode"}),r.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/5",children:["visual","json","api"].map(A=>r.jsx("button",{onClick:()=>f(A),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${u===A?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:A},A))})]})]}),r.jsxs("div",{className:`flex-1 p-8 min-h-0 relative ${u==="json"?"overflow-hidden":"overflow-y-auto custom-scrollbar"} ${u==="visual"?"space-y-8":""}`,children:[u==="visual"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Target URL"}),r.jsx("div",{className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-sm focus-within:border-white/30 transition-all",children:r.jsx(kt,{value:s.url,onChange:A=>c({...s,url:A}),variables:s.variables,placeholder:"https://..."})})]}),r.jsx("div",{className:"grid grid-cols-2 gap-4",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Wait (Sec)"}),r.jsx("input",{type:"number",value:s.wait,onChange:A=>c({...s,wait:parseFloat(A.target.value)||0}),className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-white/30 transition-all text-white"})]})}),s.mode==="agent"&&r.jsxs("div",{className:"space-y-6 order-1",children:[r.jsxs("div",{className:"space-y-3",ref:fe,children:[(()=>{const A=Vl(s.actions);return s.actions.map((j,J)=>{const Ce=le?.id===j.id,st=le&&ve!==null&&le.index!==ve&&j.id!==le.id&&(le.index<ve&&J>le.index&&J<=ve||le.index>ve&&J<le.index&&J>=ve)?(le?.height||0)*(le.index<(ve??0)?-1:1):0,Et=A[J]||0,ja=j.disabled?"skipped":Ze[j.id],wl=ja==="running"?"border-yellow-400/60":ja==="success"?"border-green-400/60":ja==="error"?"border-red-400/70":ja==="skipped"?"border-gray-500/40":"",Sl=K=>{const He="w-3 h-3";return K==="if"||K==="else"?r.jsx(Ky,{className:`${He} text-blue-400`}):K==="end"?r.jsx(ry,{className:`${He} text-gray-500`}):K==="while"||K==="repeat"?r.jsx(qy,{className:`${He} text-amber-400`}):K==="foreach"?r.jsx(Ey,{className:`${He} text-amber-300`}):K==="on_error"?r.jsx(cv,{className:`${He} text-red-400`}):K==="set"?r.jsx(pv,{className:`${He} text-green-400`}):K==="stop"?r.jsx(Jh,{className:`${He} text-red-400`}):K==="click"?r.jsx(My,{className:`${He} text-blue-300`}):K==="type"?r.jsx(ov,{className:`${He} text-green-300`}):K==="hover"?r.jsx(lv,{className:`${He} text-purple-300`}):K==="press"?r.jsx(wy,{className:`${He} text-amber-300`}):K==="wait"?r.jsx(ey,{className:`${He} text-slate-300`}):K==="scroll"?r.jsx(Kg,{className:`${He} text-cyan-300`}):K==="javascript"?r.jsx(ny,{className:`${He} text-yellow-300`}):K==="csv"?r.jsx(tv,{className:`${He} text-emerald-300`}):K==="merge"?r.jsx(jy,{className:`${He} text-emerald-200`}):K==="screenshot"?r.jsx(Mp,{className:`${He} text-emerald-300`}):K==="start"?r.jsx(Ig,{className:`${He} text-emerald-300`}):r.jsx("span",{className:"text-[9px] text-white/20",children:"|"})};return r.jsxs("div",{id:`action-${j.id}`,onPointerDown:K=>{if(ae(K.target)||K.button!==0)return;K.preventDefault();const He=K.currentTarget.getBoundingClientRect(),ft=K.clientY-He.top;I.current=K.pointerId,K.currentTarget.setPointerCapture(K.pointerId),Be({id:j.id,startY:K.clientY,currentY:K.clientY,height:He.height,index:J,originTop:He.top,pointerOffset:ft}),et(J)},onPointerUp:K=>{I.current!==null&&K.pointerId!==I.current||Ue()},onContextMenu:K=>it(K,j.id),className:`glass-card p-5 rounded-2xl space-y-4 group/item relative transition-[transform,box-shadow,opacity,filter,background-color,border-color] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform select-none touch-none ${wl} ${Ce?"ring-2 ring-white/40 scale-[1.02] -translate-y-0.5 shadow-[0_30px_80px_rgba(0,0,0,0.45)] opacity-85 z-20":""} ${ve===J&&!Ce?"ring-2 ring-blue-400/60 bg-blue-500/5":""} ${j.disabled?"opacity-40 grayscale":""}`,style:{transform:Ce?`translateY(${(le?.currentY||0)-(le?.pointerOffset||0)-(le?.originTop||0)}px)`:st?`translateY(${st}px)`:void 0,marginLeft:Et?Et*12:void 0},children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"text-[8px] font-bold text-white/20 font-mono tracking-tighter",children:(J+1).toString().padStart(2,"0")}),r.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:Sl(j.type)}),r.jsx("button",{onClick:()=>Yl(j.id),className:"action-type-select text-[10px] font-bold uppercase tracking-[0.2em] text-blue-400 focus:outline-none cursor-pointer",children:Tu.find(K=>K.type===j.type)?.label||j.type})]}),r.jsx("button",{"data-no-drag":"true",onClick:()=>da(j.id),className:"text-gray-600 hover:text-red-500 transition-colors opacity-0 group-hover/item:opacity-100",children:r.jsx(Bu,{className:"w-4 h-4"})})]}),(j.type==="click"||j.type==="type"||j.type==="hover")&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.selector||"",onChange:K=>Y(j.id,{selector:K}),variables:s.variables,placeholder:".btn-primary"})})]}),j.type==="scroll"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.selector||"",onChange:K=>Y(j.id,{selector:K}),variables:s.variables,placeholder:".scroll-container or leave empty"})})]}),j.type==="scroll"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Scroll Speed (ms)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.key||"",onChange:K=>Y(j.id,{key:K}),variables:s.variables,placeholder:"500"})})]}),(j.type==="type"||j.type==="wait"||j.type==="scroll"||j.type==="javascript"||j.type==="csv")&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:j.type==="type"?"Content":j.type==="wait"?"Seconds":j.type==="scroll"?"Pixels":j.type==="csv"?"CSV Input":"Script"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:j.type==="javascript"?r.jsx(Tn,{value:j.value||"",onChange:K=>Y(j.id,{value:K}),language:"javascript",variables:s.variables,className:"min-h-[120px]",placeholder:"return document.title"}):j.type==="csv"?r.jsx(Tn,{value:j.value||"",onChange:K=>Y(j.id,{value:K}),language:"plain",variables:s.variables,className:"min-h-[120px]",placeholder:"name,age\\nAda,31"}):r.jsx(kt,{value:j.value||"",onChange:K=>Y(j.id,{value:K}),variables:s.variables,placeholder:j.type==="type"?"Search keywords":j.type==="wait"?"3":"400"})}),j.type==="type"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Mode"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx("select",{value:j.typeMode||"replace",onChange:K=>Y(j.id,{typeMode:K.target.value}),className:"custom-select w-full bg-transparent border-none px-0 py-0 text-[11px] text-white",children:Kv.map(K=>r.jsx("option",{value:K.value,children:K.label},K.value))})})]})]}),j.type==="screenshot"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Label (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.value||"",onChange:K=>Y(j.id,{value:K}),variables:s.variables,placeholder:"checkout-step"})})]}),j.type==="press"&&(()=>{const{modifiers:K,baseKey:He}=Jv(j.key);return r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Key"}),r.jsx("div",{className:"grid grid-cols-2 gap-1 text-[10px] text-white",children:Zv.map(ft=>r.jsxs("label",{className:"inline-flex items-center space-x-1",children:[r.jsx("input",{type:"checkbox",checked:K.includes(ft.value),onChange:rt=>{const Fe=rt.target.checked?[...K,ft.value]:K.filter(ht=>ht!==ft.value);Y(j.id,{key:ip(Fe,He)})},className:"h-3 w-3 rounded border border-white/30 bg-black/80"}),r.jsx("span",{className:"uppercase text-[9px] text-white/70",children:ft.label})]},ft.value))}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsxs("select",{value:He,onChange:ft=>Y(j.id,{key:ip(K,ft.target.value)}),className:"custom-select w-full bg-transparent border-none px-0 py-0 text-[11px] text-white",children:[r.jsx("option",{value:"",children:"Select key"}),$v.map(ft=>r.jsx("option",{value:ft,children:ft},ft))]})})]})})(),j.type==="if"&&(()=>{const K=Object.keys(s.variables||{}),He=ql(j.conditionVar||""),ft=He&&s.variables?.[He]?.type,rt=j.conditionVarType||ft||"string",Fe=Ut[rt]||Ut.string,ht=j.conditionOp||Fe[0].value;return r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Variable"}),r.jsx("input",{type:"text",list:`if-var-${j.id}`,value:j.conditionVar||"",onChange:Me=>Y(j.id,{conditionVar:Me.target.value}),placeholder:"variable name",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),K.length>0&&r.jsx("datalist",{id:`if-var-${j.id}`,children:K.map(Me=>r.jsx("option",{value:Me},Me))})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Type"}),r.jsxs("select",{value:rt,onChange:Me=>{const ha=Me.target.value,zn=Ut[ha]||Ut.string;Y(j.id,{conditionVarType:ha,conditionOp:zn[0].value,conditionValue:ha==="boolean"?"":j.conditionValue||""})},className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:[r.jsx("option",{value:"string",children:"String"}),r.jsx("option",{value:"number",children:"Number"}),r.jsx("option",{value:"boolean",children:"Boolean"})]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Relation"}),r.jsx("select",{value:ht,onChange:Me=>Y(j.id,{conditionOp:Me.target.value}),className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:Fe.map(Me=>r.jsx("option",{value:Me.value,children:Me.label},Me.value))})]})]}),rt!=="boolean"&&r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Value"}),r.jsx("input",{type:rt==="number"?"number":"text",value:j.conditionValue||"",onChange:Me=>Y(j.id,{conditionValue:Me.target.value}),placeholder:rt==="number"?"0":"value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})]})]})})(),j.type==="while"&&(()=>{const K=Object.keys(s.variables||{}),He=ql(j.conditionVar||""),ft=He&&s.variables?.[He]?.type,rt=j.conditionVarType||ft||"string",Fe=Ut[rt]||Ut.string,ht=j.conditionOp||Fe[0].value;return r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Variable"}),r.jsx("input",{type:"text",list:`while-var-${j.id}`,value:j.conditionVar||"",onChange:Me=>Y(j.id,{conditionVar:Me.target.value}),placeholder:"variable name",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),K.length>0&&r.jsx("datalist",{id:`while-var-${j.id}`,children:K.map(Me=>r.jsx("option",{value:Me},Me))})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Type"}),r.jsxs("select",{value:rt,onChange:Me=>{const ha=Me.target.value,zn=Ut[ha]||Ut.string;Y(j.id,{conditionVarType:ha,conditionOp:zn[0].value,conditionValue:ha==="boolean"?"":j.conditionValue||""})},className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:[r.jsx("option",{value:"string",children:"String"}),r.jsx("option",{value:"number",children:"Number"}),r.jsx("option",{value:"boolean",children:"Boolean"})]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Relation"}),r.jsx("select",{value:ht,onChange:Me=>Y(j.id,{conditionOp:Me.target.value}),className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:Fe.map(Me=>r.jsx("option",{value:Me.value,children:Me.label},Me.value))})]})]}),rt!=="boolean"&&r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Value"}),r.jsx("input",{type:rt==="number"?"number":"text",value:j.conditionValue||"",onChange:Me=>Y(j.id,{conditionValue:Me.target.value}),placeholder:rt==="number"?"0":"value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})]})]})})(),j.type==="repeat"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Times"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.value||"",onChange:K=>Y(j.id,{value:K}),variables:s.variables,placeholder:"3"})})]}),j.type==="foreach"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.selector||"",onChange:K=>Y(j.id,{selector:K}),variables:s.variables,placeholder:".list-item"})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable (Array Name)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.varName||"",onChange:K=>Y(j.id,{varName:K}),variables:s.variables,placeholder:"items"})})]})]}),j.type==="set"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable Name"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.varName||"",onChange:K=>Y(j.id,{varName:K}),variables:s.variables,placeholder:"status"})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Value"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.value||"",onChange:K=>Y(j.id,{value:K}),variables:s.variables,placeholder:"ready"})})]})]}),j.type==="merge"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Sources"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.value||"",onChange:K=>Y(j.id,{value:K}),variables:s.variables,placeholder:"items, extraItems, {$block.output}"})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Target Variable (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(kt,{value:j.varName||"",onChange:K=>Y(j.id,{varName:K}),variables:s.variables,placeholder:"allItems"})})]})]}),j.type==="stop"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Outcome"}),r.jsxs("select",{value:j.value||"success",onChange:K=>Y(j.id,{value:K.target.value}),className:"custom-select w-full bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[9px] font-bold uppercase tracking-[0.2em] text-white/70 focus:outline-none",children:[r.jsx("option",{value:"success",children:"Success"}),r.jsx("option",{value:"error",children:"Error"})]})]}),j.type==="on_error"&&r.jsx("div",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Runs if any action fails."}),j.type==="start"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Task"}),r.jsxs("select",{value:j.value||"",onChange:K=>Y(j.id,{value:K.target.value}),className:"custom-select w-full bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[9px] font-bold uppercase tracking-[0.2em] text-white/70 focus:outline-none",children:[r.jsx("option",{value:"",disabled:!0,children:"Select task"}),me.length===0&&r.jsx("option",{value:"",disabled:!0,children:"No other tasks"}),me.map(K=>r.jsx("option",{value:K.id,children:K.name||K.id},K.id))]})]})]},j.id)})})(),P&&(()=>{const A=s.actions.findIndex(J=>J.id===P.id),j=s.actions[A];return j?r.jsxs("div",{className:"action-context-menu fixed z-50 w-[200px] bg-[#0b0b0b] border border-white/10 rounded-xl shadow-2xl p-2 text-[10px] font-bold uppercase tracking-widest text-white/80",style:{left:P.x,top:P.y},children:[r.jsx("button",{onClick:()=>{Y(j.id,{disabled:!j.disabled}),Rt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:j.disabled?"Enable":"Disable"}),r.jsx("button",{onClick:()=>{da(j.id),Rt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors text-red-400",children:"Delete"}),r.jsx("button",{onClick:()=>{re(nt(j)),da(j.id),Rt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Cut"}),r.jsx("button",{onClick:()=>{re(nt(j)),Rt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Copy"}),r.jsx("button",{onClick:()=>{const J=nt(j),Ce=[...s.actions];Ce.splice(A+1,0,J),c({...s,actions:Ce}),Rt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Duplicate"})]}):null})(),r.jsx("button",{onClick:()=>Yl(),className:"w-full py-3 border border-dashed border-white/20 rounded-xl text-[9px] font-bold uppercase tracking-widest text-gray-500 hover:text-white transition-all bg-white/[0.02]",children:"+ Append Action Seq"})]}),r.jsxs("div",{className:"bg-white/5 rounded-xl p-4 border border-white/5 space-y-4",children:[r.jsx("h4",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest border-b border-white/5 pb-2",children:"Behavior Config"}),r.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(s.stealth).map(([A,j])=>r.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:j,onChange:J=>c({...s,stealth:{...s.stealth,[A]:J.target.checked},humanTyping:A==="naturalTyping"?J.target.checked:s.humanTyping}),className:"w-3 h-3 rounded bg-transparent border-white/20"}),r.jsx("span",{className:"text-[9px] font-bold text-gray-500 group-hover:text-white transition-all",children:A.replace(/([A-Z])/g," $1").toUpperCase()})]},A))})]})]}),r.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[r.jsx("summary",{className:"cursor-pointer text-[9px] font-bold text-gray-500 uppercase tracking-[0.2em] hover:text-gray-400 transition-all",children:"Variables (Injectable)"}),r.jsxs("div",{className:"space-y-3 mt-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("p",{className:"text-[8px] text-gray-600",children:"Dynamic Params"}),r.jsx("button",{onClick:Re,className:"px-3 py-1 bg-white/5 border border-white/10 text-white text-[8px] font-bold rounded-lg uppercase tracking-widest hover:bg-white/10 transition-all",children:"+ Add"})]}),r.jsx("div",{className:"space-y-2",children:Object.entries(s.variables).map(([A,j])=>r.jsx(Wv,{name:A,def:j,updateVariable:Sa,removeVariable:fa},A))})]})]}),r.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[r.jsx("summary",{className:"cursor-pointer text-[9px] font-bold text-gray-500 uppercase tracking-[0.2em] hover:text-gray-400 transition-all",children:"Extraction Script"}),r.jsxs("div",{className:"space-y-3 mt-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Output format"}),r.jsxs("select",{value:s.extractionFormat||"json",onChange:A=>c({...s,extractionFormat:A.target.value}),className:"custom-select bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:[r.jsx("option",{value:"json",children:"JSON"}),r.jsx("option",{value:"csv",children:"CSV"})]})]}),r.jsxs("p",{className:"text-[8px] text-gray-600",children:["Process scraped HTML with JavaScript. Use ",r.jsx("code",{className:"text-blue-400 bg-white/5 px-1 py-0.5 rounded",children:"$$data.html()"})," to access the raw HTML."]}),r.jsx("div",{className:"w-full bg-[#050505] border border-white/10 rounded-xl p-4 font-mono text-xs text-green-300 focus-within:border-white/30 resize-none custom-scrollbar leading-relaxed min-h-[200px] whitespace-pre-wrap",children:r.jsx(kt,{value:s.extractionScript||"",onChange:A=>c({...s,extractionScript:A}),variables:s.variables,syntax:"javascript",placeholder:`// Example: Extract all links
14
+ const html = $$data.html();
15
+ const parser = new DOMParser();
16
+ const doc = parser.parseFromString(html, 'text/html');
17
+ const links = Array.from(doc.querySelectorAll('a')).map(a => a.href);
18
+ return JSON.stringify(links, null, 2);`})})]})]}),s.mode==="scrape"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Selector Filter"}),r.jsx("div",{className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-sm focus-within:border-white/30 transition-all",children:r.jsx(kt,{value:s.selector||"",onChange:A=>c({...s,selector:A}),variables:s.variables,placeholder:".main-content"})})]}),r.jsxs("div",{className:"pt-4 border-t border-white/10 space-y-3",children:[r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:s.rotateUserAgents,onChange:A=>c({...s,rotateUserAgents:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotate UA"})]}),r.jsxs("label",{className:`flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 transition-all ${ue?"opacity-50 cursor-not-allowed":"hover:bg-white/[0.05] cursor-pointer group"}`,title:ue?"Configure proxies in Settings → Proxies to enable rotation.":"Rotate proxies per task.",children:[r.jsx("input",{type:"checkbox",checked:s.rotateProxies,onChange:A=>c({...s,rotateProxies:A.target.checked}),disabled:ue,className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:`text-[10px] font-bold text-gray-500 uppercase tracking-widest ${ue?"":"group-hover:text-white"}`,children:"Rotate Proxies"})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:s.rotateViewport,onChange:A=>c({...s,rotateViewport:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotate Viewport"})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:s.includeShadowDom!==!1,onChange:A=>c({...s,includeShadowDom:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include Shadow DOM in HTML"})]})]})]}),u==="json"&&r.jsx(jv,{task:s,onChange:c,onCopy:(A,j)=>{Ft(A,j)},copiedId:$}),u==="api"&&r.jsxs("div",{className:"h-full flex flex-col",children:[r.jsxs("div",{className:"space-y-6 flex-1 flex flex-col min-h-0",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Deployment Endpoint"}),r.jsxs("div",{className:"flex gap-2 items-center",children:[r.jsx("input",{type:"text",readOnly:!0,value:s.id?`${window.location.origin}/tasks/${s.id}/api`:"Save task to view endpoint",className:"flex-1 bg-[#050505] border border-white/10 rounded-xl px-4 py-2 font-mono text-xs text-green-300 focus:outline-none"}),r.jsxs("button",{onClick:()=>{const A=s.id?`${window.location.origin}/tasks/${s.id}/api`:"";A&&Ft(A,"endpoint")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${$==="endpoint"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[$==="endpoint"?r.jsx(Ai,{className:"w-3 h-3"}):r.jsx(Ti,{className:"w-3 h-3"}),$==="endpoint"?"Copied":"Copy"]})]})]}),r.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Override Variables (JSON)"}),r.jsxs("button",{onClick:()=>{const A={};Object.entries(s.variables).forEach(([j,J])=>A[j]=J.value),Ft(JSON.stringify({variables:A},null,2),"vars")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${$==="vars"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[$==="vars"?r.jsx(Ai,{className:"w-3 h-3"}):r.jsx(Ti,{className:"w-3 h-3"}),$==="vars"?"Copied":"Copy"]})]}),r.jsx(Tn,{readOnly:!0,value:(()=>{const A={};return Object.entries(s.variables).forEach(([j,J])=>A[j]=J.value),JSON.stringify({variables:A},null,2)})(),language:"json",className:"flex-1"})]})]}),r.jsx("p",{className:"text-[8px] text-gray-600 mt-4 font-mono uppercase tracking-widest leading-loose",children:"Automate via HTTP POST to the above endpoint with your API key in the headers."})]}),u==="history"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Task Versions"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:Mt,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white hover:bg-white/5 transition-all",children:"Refresh"}),r.jsx("button",{onClick:async()=>{if(!s.id||!await S("Clear all task versions?"))return;(await fetch(`/api/tasks/${s.id}/versions/clear`,{method:"POST"})).ok?(_("Version history cleared.","success"),Mt()):_("Clear failed.","error")},className:"px-4 py-2 border border-red-500/20 text-[9px] font-bold rounded-xl uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all",children:"Clear"})]})]}),z&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading versions..."}),!z&&Ee.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No versions yet. Save changes to create history."}),r.jsx("div",{className:"space-y-3",children:Ee.map(A=>r.jsxs("div",{className:"glass-card p-4 rounded-2xl flex items-center justify-between",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:A.name}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(A.timestamp).toLocaleString()," | ",A.mode]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:()=>It(A.id),disabled:pe,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:pe?"Loading...":"View"}),r.jsx("button",{onClick:()=>tt(A.id),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Rollback"})]})]},A.id))})]})]}),r.jsx(Sv,{open:F,query:he,onQueryChange:v,onClose:()=>ge(!1),onSelect:A=>{q?A==="if"?Y(q,{type:A,conditionVar:"",conditionVarType:"string",conditionOp:"equals",conditionValue:""}):A==="while"?Y(q,{type:A,conditionVar:"",conditionVarType:"string",conditionOp:"equals",conditionValue:""}):Y(q,{type:A}):Ra(A),ge(!1)}}),r.jsx("div",{className:"p-8 border-t border-white/10 backdrop-blur-xl shrink-0",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("button",{onClick:w,disabled:p&&s.mode!=="headful",className:"shine-effect flex-1 bg-white text-black py-4 rounded-2xl font-bold text-[10px] tracking-[0.3em] uppercase transition-all shadow-xl shadow-white/5 flex items-center justify-center gap-3 disabled:opacity-50",children:[p&&s.mode!=="headful"?r.jsx("div",{className:"w-3 h-3 border-2 border-black/20 border-t-black rounded-full animate-spin"}):r.jsx(ky,{className:"w-3 h-3 fill-black"}),r.jsx("span",{children:p&&s.mode==="headful"?"Stop Headful":p?"Running...":"Run Task"})]}),p&&r.jsx("button",{onClick:()=>D?.(),className:"w-12 h-12 rounded-2xl border border-white/10 text-white/80 hover:text-white hover:bg-white/10 transition-all flex items-center justify-center",title:"Stop task",children:r.jsx(Jh,{className:"w-4 h-4"})})]})})]}),r.jsx("div",{className:"w-2 cursor-col-resize bg-white/5 hover:bg-white/10 transition-colors",onPointerDown:A=>{A.preventDefault(),ie.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}),r.jsxs("main",{className:"flex-1 overflow-y-auto custom-scrollbar bg-[#020202] p-12 relative",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.02] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),r.jsx(Bp,{results:b,pinnedResults:g,isExecuting:p,isHeadful:s.mode==="headful",runId:U,onConfirm:S,onNotify:_,onPin:B,onUnpin:O,fullWidth:s.mode==="headful"}),Z&&r.jsx("div",{className:"fixed inset-0 z-[210] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:r.jsxs("div",{className:"glass-card w-full max-w-6xl rounded-[32px] border border-white/10 p-8 shadow-2xl flex flex-col max-h-[90vh]",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Task Snapshot"}),r.jsx("div",{className:"text-lg font-bold text-white",children:Z.snapshot.name}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(Z.timestamp).toLocaleString()," | ",Z.snapshot.mode]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:()=>ne(null),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Close"}),r.jsx("button",{onClick:()=>{C&&C(Z.snapshot),ne(null)},className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white text-black hover:bg-white/90 transition-all",children:"Run Version"})]})]}),r.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6 overflow-y-auto custom-scrollbar pr-2 flex-1 min-h-0",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Snapshot JSON"}),r.jsx(Tn,{readOnly:!0,value:JSON.stringify(Z.snapshot,null,2),language:"json",className:"min-h-[320px]"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"}),r.jsx("div",{className:"glass-card rounded-2xl p-6 border border-white/10 text-[10px] text-gray-500",children:"No output captured for this snapshot yet. Run this version to see results."})]})]})]})})]})]})},Fv=({apiKey:s,loading:c,saving:d,onRegenerate:u,onCopy:f})=>{const[p,m]=x.useState(!1);return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(zp,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"API Key"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage task API access"})]})]}),r.jsxs("div",{className:"flex flex-col gap-4",children:[r.jsxs("div",{className:"rounded-2xl bg-black/40 border border-white/10 px-4 py-3 font-mono text-[10px] text-blue-200/80 break-all min-h-[44px] flex items-center justify-between gap-3",children:[r.jsx("span",{className:s&&!p?"text-[14px] leading-none":void 0,children:c?"Loading...":s?p?s:"••••••••••••••••••••••••••••••••••••••••":"No API key set"}),r.jsx("button",{onClick:()=>m(w=>!w),disabled:!s,className:"p-2 rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all disabled:opacity-50",title:p?"Hide key":"Show key","aria-label":p?"Hide key":"Show key",children:p?r.jsx(fy,{className:"w-4 h-4"}):r.jsx(py,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsx("button",{onClick:u,disabled:d,className:"flex-1 px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest bg-white text-black hover:scale-105 transition-all disabled:opacity-60 disabled:hover:scale-100",children:s?"Rotate Key":"Generate Key"}),r.jsxs("button",{onClick:f,disabled:!s,className:"flex-1 px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 text-white hover:bg-white/5 transition-all disabled:opacity-50 inline-flex items-center justify-center gap-2",children:[r.jsx(Ti,{className:"w-4 h-4"}),"Copy Key"]})]}),r.jsx("p",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Use this key in `key`, `x-api-key`, or `Authorization: Bearer` headers."})]})]})},Iv=({onClearStorage:s})=>r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(Hu,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Storage"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage stored data"})]})]}),r.jsxs("div",{className:"flex gap-4",children:[r.jsx("button",{onClick:()=>s("screenshots"),className:"flex-1 px-6 py-4 bg-red-500/5 border border-red-500/10 text-red-400 rounded-2xl text-[9px] font-bold uppercase tracking-widest hover:bg-red-500/10 transition-all",children:"Clear Captures"}),r.jsx("button",{onClick:()=>s("cookies"),className:"flex-1 px-6 py-4 bg-yellow-500/5 border border-yellow-500/10 text-yellow-400 rounded-2xl text-[9px] font-bold uppercase tracking-widest hover:bg-yellow-500/10 transition-all",children:"Reset Cookies"})]})]}),Pv=72,Vp=6,Js=Pv+Vp,eb=5,tb=2,ab=({index:s,style:c,data:d})=>{const u=d.captures[s];return u?r.jsx("div",{style:{...c,paddingBottom:Vp},children:r.jsxs("div",{className:"flex items-center justify-between gap-4 p-4 rounded-2xl border border-white/10 bg-white/[0.02]",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:u.type==="recording"?"Recording":"Screenshot"}),r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:u.name})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:u.url,target:"_blank",rel:"noreferrer",className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all","aria-label":`Open ${u.name}`,children:"Open"}),r.jsx("button",{onClick:()=>d.onDelete(u.name),className:"px-3 py-2 rounded-xl border border-red-500/20 text-[9px] font-bold uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all",children:"Delete"})]})]})}):null},lb=({captures:s,loading:c,onRefresh:d,onDelete:u})=>{const f=Math.min(Math.max(Js,s.length*Js),Js*eb);return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Captures"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Recordings and screenshots"})]}),r.jsx("button",{onClick:d,disabled:c,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all disabled:opacity-50",children:"Refresh"})]}),c&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!c&&s.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!c&&s.length>0&&r.jsx(lr,{height:f,width:"100%",itemCount:s.length,itemSize:Js,overscanCount:tb,itemData:{captures:s,onDelete:u},children:ab})]})},nb=({cookies:s,originsCount:c,loading:d,onClear:u,onDelete:f})=>{const[p,m]=x.useState({}),[w,b]=x.useState({}),g=O=>`${O.name}|${O.domain||""}|${O.path||""}|${O.expires||""}`,E=O=>{if(!O)return!1;let C=0;for(let U=0;U<O.length;U+=1){const D=O.charCodeAt(U);(D===9||D===10||D===13||D>=32&&D<=126)&&(C+=1)}return C/O.length>=.85},S=O=>{if(!O)return null;if(/%[0-9A-Fa-f]{2}/.test(O))try{const C=decodeURIComponent(O);if(C!==O&&E(C))return{value:C,kind:"URL"}}catch{}if(/^[A-Za-z0-9+/=]+$/.test(O)&&O.length>=12&&O.length%4===0)try{const C=atob(O);if(C&&E(C))return{value:C,kind:"Base64"}}catch{}return null},_=O=>{const C=g(O);m(U=>({...U,[C]:!U[C]}))},B=O=>{const C=g(O);b(U=>({...U,[C]:!U[C]}))};return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(zp,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Cookies"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Browser storage state"})]})]}),r.jsx("button",{onClick:u,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-yellow-500/5 border border-yellow-500/10 text-yellow-400 hover:bg-yellow-500/10 transition-all",children:"Clear Cookies"})]}),d&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading data..."}),!d&&s.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No cookies found."}),r.jsx("div",{className:"space-y-3",children:s.map(O=>{const C=g(O),U=!!p[C],D=O.value||"",X=S(D),$=!!X&&!!w[C],se=$&&X?X.value:D,P=U||se.length<=120?se:`${se.slice(0,120)}...`;return r.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-4 space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:O.name}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[O.domain||"local"," | ",O.path||"/",O.expires?` | ${new Date(O.expires*1e3).toLocaleString()}`:""]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[X&&r.jsx("button",{onClick:()=>B(O),className:"px-3 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all",children:$?"Show Raw":`Decode ${X.kind}`}),r.jsx("button",{onClick:()=>f(O),className:"px-3 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-red-500/5 border border-red-500/10 text-red-400 hover:bg-red-500/10 transition-all",children:"Delete"})]})]}),r.jsx("div",{onClick:()=>_(O),className:"cursor-pointer rounded-xl bg-black/40 border border-white/10 px-3 py-2 font-mono text-[10px] text-blue-200/80 whitespace-pre-wrap break-words",title:"Click to expand/collapse",children:P||"(empty)"})]},C)})}),!d&&c>0&&r.jsxs("div",{className:"pt-2 text-[8px] text-gray-600 uppercase tracking-widest",children:["Origins stored: ",c]})]})},ib=({tab:s,onTabChange:c})=>r.jsxs("div",{className:"flex items-end justify-between mb-8",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-purple-500 uppercase tracking-[0.4em]",children:"System"}),r.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Settings"})]}),r.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["system","data","proxies"].map(d=>r.jsx("button",{onClick:()=>c(d),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${s===d?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:d},d))})]}),sb=({splitPercent:s,onChange:c,onReset:d})=>{const u=Number.isFinite(s)?Math.min(75,Math.max(25,s)):30;return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Layout"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Default editor split"})]}),r.jsx("button",{onClick:d,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all",children:"Reset 30/70"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[r.jsx("span",{children:"Editor"}),r.jsxs("span",{children:[u,"%"]})]}),r.jsx("input",{type:"range",min:25,max:75,step:5,value:u,onChange:f=>c(Math.min(75,Math.max(25,Number(f.target.value)))),className:"w-full accent-white"}),r.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[r.jsx("span",{children:"Preview"}),r.jsxs("span",{children:[100-u,"%"]})]})]})]})},rb=({proxies:s,defaultProxyId:c,includeDefaultInRotation:d,rotationMode:u,loading:f,onRefresh:p,onAdd:m,onImport:w,onUpdate:b,onDelete:g,onSetDefault:E,onToggleIncludeDefault:S,onRotationModeChange:_})=>{const[B,O]=x.useState(""),[C,U]=x.useState(""),[D,X]=x.useState(""),[$,se]=x.useState(""),[P,ee]=x.useState(null),[I,fe]=x.useState(""),[re,le]=x.useState(""),[Be,ve]=x.useState(""),[et,Ee]=x.useState(""),[Ge,z]=x.useState(""),L=x.useRef(null),F=()=>{B.trim()&&(m({server:B.trim(),username:C.trim()||void 0,password:D.trim()||void 0,label:$.trim()||void 0}),O(""),U(""),X(""),se(""))},ge=Z=>{ee(Z.id),fe(Z.server),le(Z.username||""),ve(""),Ee(Z.label||"")},he=()=>{ee(null),fe(""),le(""),ve(""),Ee("")},v=()=>{!P||!I.trim()||(b(P,{server:I.trim(),username:re.trim()||void 0,password:Be.trim()||void 0,label:et.trim()||void 0}),he())},q=Z=>{const ne=Z.trim();if(!ne)return null;if(ne.includes("://"))return{server:ne};const pe=ne.split(":");if(pe.length<2)return null;const be=pe[0]?.trim(),Ze=pe[1]?.trim();if(!be||!Ze)return null;const ke=pe[2]?pe[2].trim():"",yt=pe.length>3?pe.slice(3).join(":").trim():"";return{server:`${be}:${Ze}`,username:ke||void 0,password:yt||void 0}},W=async Z=>{const ne=Array.from(Z.target.files||[]);if(ne.length)try{const Ze=(await Promise.all(ne.map(ke=>ke.text()))).join(`
19
+ `).split(/\r?\n/).flatMap(ke=>ke.split(/[,;]+/)).map(q).filter(Boolean);if(Ze.length===0){z("No valid proxies found in file.");return}z(""),w(Ze)}catch{z("Failed to read file.")}finally{L.current&&(L.current.value="")}};return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(Zy,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Proxies"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Set defaults and rotate per task"})]}),r.jsx("div",{className:"ml-auto",children:r.jsxs("button",{onClick:p,disabled:f,className:"px-4 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all disabled:opacity-50 inline-flex items-center gap-2",children:[r.jsx(Dp,{className:`w-3 h-3 ${f?"animate-spin":""}`}),"Refresh"]})})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsx("input",{type:"text",placeholder:"Proxy server (host:port or scheme://host:port)",value:B,onChange:Z=>O(Z.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),r.jsx("input",{type:"text",placeholder:"Label (optional)",value:$,onChange:Z=>se(Z.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),r.jsx("input",{type:"text",placeholder:"Username (optional)",value:C,onChange:Z=>U(Z.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),r.jsx("input",{type:"password",placeholder:"Password (optional)",value:D,onChange:Z=>X(Z.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:F,className:"px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest bg-white text-black hover:scale-105 transition-all",children:"Add Proxy"}),r.jsx("button",{onClick:()=>L.current?.click(),className:"px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 text-white hover:bg-white/5 transition-all",children:"Import"}),r.jsx("button",{onClick:()=>E("host"),className:`px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 transition-all ${c?"text-white hover:bg-white/5":"bg-white/10 text-white"}`,children:"Use Host IP"})]}),r.jsx("input",{ref:L,type:"file",accept:".txt,text/plain",onChange:W,className:"hidden"}),Ge&&r.jsx("div",{className:"text-[9px] text-red-400 uppercase tracking-widest",children:Ge}),r.jsxs("label",{className:"flex items-center justify-between gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all group",children:[r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotation mode"}),r.jsxs("select",{value:u,onChange:Z=>_(Z.target.value==="random"?"random":"round-robin"),className:"bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[10px] text-white uppercase tracking-widest",children:[r.jsx("option",{value:"round-robin",children:"Round robin"}),r.jsx("option",{value:"random",children:"Random"})]})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:d,onChange:Z=>S(Z.target.checked),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include default IP in rotation pool"})]}),r.jsxs("div",{className:"space-y-3",children:[f&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading proxies..."}),!f&&s.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No proxies saved yet."}),!f&&s.map(Z=>{const ne=Z.id===c,pe=Z.id===P;return r.jsx("div",{className:"flex items-center justify-between gap-4 p-4 rounded-2xl border border-white/10 bg-white/[0.02]",children:pe?r.jsxs("div",{className:"w-full space-y-3",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[r.jsx("input",{type:"text",value:I,onChange:be=>fe(be.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),r.jsx("input",{type:"text",value:et,onChange:be=>Ee(be.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),r.jsx("input",{type:"text",value:re,onChange:be=>le(be.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),r.jsx("input",{type:"password",value:Be,onChange:be=>ve(be.target.value),placeholder:"Password (leave blank to keep)",className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:v,className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all",children:"Save"}),r.jsx("button",{onClick:he,className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white/70 hover:bg-white/5 transition-all",children:"Cancel"})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:Z.label||Z.server}),r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:Z.server})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>E(Z.id),className:`px-3 py-2 rounded-xl border text-[9px] font-bold uppercase tracking-widest transition-all inline-flex items-center gap-2 ${ne?"bg-white text-black border-white":"border-white/10 text-white hover:bg-white/5"}`,children:[ne?r.jsx(Py,{className:"w-3 h-3"}):r.jsx(Fy,{className:"w-3 h-3"}),ne?"Default":"Set Default"]}),Z.id!=="host"&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>ge(Z),className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all",children:"Edit"}),r.jsxs("button",{onClick:()=>g(Z.id),className:"px-3 py-2 rounded-xl border border-red-500/20 text-[9px] font-bold uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all inline-flex items-center gap-2",children:[r.jsx(Hu,{className:"w-3 h-3"}),"Delete"]})]})]})]})},Z.id)})]})]})},cb=({selection:s,options:c,loading:d,onChange:u})=>r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"User Agent"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Default browser identity"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("select",{value:s,onChange:f=>u(f.target.value),disabled:d,className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white uppercase tracking-widest disabled:opacity-60",children:[r.jsx("option",{value:"system",children:"System user agent (default)"}),c.map(f=>r.jsx("option",{value:f,children:f},f))]}),r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Applies when rotate UA is disabled in tasks."})]})]}),ub=({onClearStorage:s,onConfirm:c,onNotify:d})=>{const[u,f]=x.useState("system"),[p,m]=x.useState([]),[w,b]=x.useState([]),[g,E]=x.useState([]),[S,_]=x.useState(!1),[B,O]=x.useState(null),[C,U]=x.useState(!1),[D,X]=x.useState(!1),[$,se]=x.useState(30),[P,ee]=x.useState([]),[I,fe]=x.useState(null),[re,le]=x.useState(!1),[Be,ve]=x.useState("round-robin"),[et,Ee]=x.useState(!1),[Ge,z]=x.useState("system"),[L,F]=x.useState([]),[ge,he]=x.useState(!1),v="doppelganger.layout.leftWidthPct";x.useEffect(()=>{try{const ie=localStorage.getItem(v);if(ie){const me=Math.min(75,Math.max(25,Math.round(parseFloat(ie)*100)));Number.isNaN(me)||se(me)}}catch{}},[]);const q=async()=>{_(!0);try{const[ie,me]=await Promise.all([fetch("/api/data/captures"),fetch("/api/data/cookies")]),ue=ie.ok?await ie.json():{captures:[]},we=me.ok?await me.json():{cookies:[],origins:[]};m(Array.isArray(ue.captures)?ue.captures:[]),b(Array.isArray(we.cookies)?we.cookies:[]),E(Array.isArray(we.origins)?we.origins:[])}catch{m([]),b([]),E([])}finally{_(!1)}},W=async ie=>{if(!await c(`Delete capture ${ie}?`))return;(await fetch(`/api/data/captures/${encodeURIComponent(ie)}`,{method:"DELETE"})).ok?(d("Capture deleted.","success"),q()):d("Delete failed.","error")},Z=async ie=>{if(!await c(`Delete cookie ${ie.name}?`))return;(await fetch("/api/data/cookies/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:ie.name,domain:ie.domain,path:ie.path})})).ok?(d("Cookie deleted.","success"),q()):d("Delete failed.","error")},ne=async()=>{U(!0);try{const ie=await fetch("/api/settings/api-key",{credentials:"include"});if(!ie.ok){ie.status===401&&d("Session expired. Please log in again.","error"),O(null);return}const me=await ie.json();O(me.apiKey||null)}catch{O(null)}finally{U(!1)}},pe=async()=>{Ee(!0);try{const ie=await fetch("/api/settings/proxies",{credentials:"include"});if(!ie.ok){ie.status===401&&d("Session expired. Please log in again.","error"),ee([]),fe(null),ve("round-robin");return}const me=await ie.json();ee(Array.isArray(me.proxies)?me.proxies:[]),fe(me.defaultProxyId||null),le(!!me.includeDefaultInRotation),ve(me.rotationMode==="random"?"random":"round-robin")}catch{ee([]),fe(null),le(!1),ve("round-robin")}finally{Ee(!1)}},be=async ie=>{Ee(!0);try{const me=await fetch("/api/settings/proxies",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(ie)});if(!me.ok){let we="";try{const Nt=await me.json();we=Nt?.error||Nt?.message||""}catch{we=""}d(`Failed to add proxy${we?`: ${we}`:""}.`,"error");return}const ue=await me.json();ee(Array.isArray(ue.proxies)?ue.proxies:[]),fe(ue.defaultProxyId||null),le(!!ue.includeDefaultInRotation),ve(ue.rotationMode==="random"?"random":"round-robin"),d("Proxy added.","success")}catch{d("Failed to add proxy.","error")}finally{Ee(!1)}},Ze=async()=>{he(!0);try{const ie=await fetch("/api/settings/user-agent",{credentials:"include"});if(!ie.ok){ie.status===401&&d("Session expired. Please log in again.","error"),z("system"),F([]);return}const me=await ie.json();z(me.selection==="system"?"system":String(me.selection||"system")),F(Array.isArray(me.userAgents)?me.userAgents:[])}catch{z("system"),F([])}finally{he(!1)}},ke=async ie=>{he(!0);try{const me=await fetch("/api/settings/user-agent",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({selection:ie})});if(!me.ok){d("Failed to update user agent.","error");return}const ue=await me.json();z(ue.selection==="system"?"system":String(ue.selection||"system")),F(Array.isArray(ue.userAgents)?ue.userAgents:[]),d("User agent updated.","success")}catch{d("Failed to update user agent.","error")}finally{he(!1)}},yt=async ie=>{if(!ie.length){d("No valid proxies found in file.","error");return}Ee(!0);try{const me=await fetch("/api/settings/proxies/import",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({proxies:ie})});if(!me.ok){let we="";try{const Nt=await me.json();we=Nt?.error||Nt?.message||""}catch{we=""}d(`Failed to import proxies${we?`: ${we}`:""}.`,"error");return}const ue=await me.json();ee(Array.isArray(ue.proxies)?ue.proxies:[]),fe(ue.defaultProxyId||null),le(!!ue.includeDefaultInRotation),ve(ue.rotationMode==="random"?"random":"round-robin"),d("Proxies imported.","success")}catch{d("Failed to import proxies.","error")}finally{Ee(!1)}},oa=async(ie,me)=>{Ee(!0);try{const ue=await fetch(`/api/settings/proxies/${encodeURIComponent(ie)}`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(me)});if(!ue.ok){let Nt="";try{const Ft=await ue.json();Nt=Ft?.error||Ft?.message||""}catch{Nt=""}d(`Failed to update proxy${Nt?`: ${Nt}`:""}.`,"error");return}const we=await ue.json();ee(Array.isArray(we.proxies)?we.proxies:[]),fe(we.defaultProxyId||null),le(!!we.includeDefaultInRotation),ve(we.rotationMode==="random"?"random":"round-robin"),d("Proxy updated.","success")}catch{d("Failed to update proxy.","error")}finally{Ee(!1)}},ya=async ie=>{if(!(ie==="host"||!await c("Delete this proxy?"))){Ee(!0);try{const ue=await fetch(`/api/settings/proxies/${encodeURIComponent(ie)}`,{method:"DELETE",credentials:"include"});if(!ue.ok){d("Delete failed.","error");return}const we=await ue.json();ee(Array.isArray(we.proxies)?we.proxies:[]),fe(we.defaultProxyId||null),le(!!we.includeDefaultInRotation),ve(we.rotationMode==="random"?"random":"round-robin"),d("Proxy deleted.","success")}catch{d("Delete failed.","error")}finally{Ee(!1)}}},va=async ie=>{const me=ie==="host"?null:ie;Ee(!0);try{const ue=await fetch("/api/settings/proxies/default",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({id:me})});if(!ue.ok){d("Failed to set default.","error");return}const we=await ue.json();ee(Array.isArray(we.proxies)?we.proxies:[]),fe(we.defaultProxyId||null),le(!!we.includeDefaultInRotation),ve(we.rotationMode==="random"?"random":"round-robin"),d("Default proxy updated.","success")}catch{d("Failed to set default.","error")}finally{Ee(!1)}},Ot=async ie=>{Ee(!0);try{const me=await fetch("/api/settings/proxies/rotation",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({includeDefaultInRotation:ie})});if(!me.ok){d("Failed to update rotation setting.","error");return}const ue=await me.json();ee(Array.isArray(ue.proxies)?ue.proxies:[]),fe(ue.defaultProxyId||null),le(!!ue.includeDefaultInRotation),ve(ue.rotationMode==="random"?"random":"round-robin"),d("Rotation setting updated.","success")}catch{d("Failed to update rotation setting.","error")}finally{Ee(!1)}},Wt=async ie=>{Ee(!0);try{const me=await fetch("/api/settings/proxies/rotation",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({rotationMode:ie})});if(!me.ok){d("Failed to update rotation mode.","error");return}const ue=await me.json();ee(Array.isArray(ue.proxies)?ue.proxies:[]),fe(ue.defaultProxyId||null),le(!!ue.includeDefaultInRotation),ve(ue.rotationMode==="random"?"random":"round-robin"),d("Rotation mode updated.","success")}catch{d("Failed to update rotation mode.","error")}finally{Ee(!1)}},ba=async()=>{X(!0);try{const ie=await fetch("/api/settings/api-key",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"});if(!ie.ok){let ue="";try{const we=await ie.json();ue=we?.error||we?.message||""}catch{ue=""}ie.status===401?d("Session expired. Please log in again.","error"):d(`Failed to generate API key${ue?`: ${ue}`:""}.`,"error");return}const me=await ie.json();O(me.apiKey||null),d("API key generated.","success")}catch{d("Failed to generate API key.","error")}finally{X(!1)}},wa=async()=>{if(B)try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(B);else{const ie=document.createElement("textarea");ie.value=B,ie.style.position="fixed",ie.style.opacity="0",document.body.appendChild(ie),ie.select();const me=document.execCommand("copy");if(document.body.removeChild(ie),!me)throw new Error("Copy failed")}d("API key copied.","success")}catch{d("Copy failed.","error")}};return x.useEffect(()=>{u==="data"&&q(),u==="system"&&(ne(),Ze()),u==="proxies"&&pe()},[u]),x.useEffect(()=>{try{localStorage.setItem(v,String($/100))}catch{}},[$]),r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[r.jsx(ib,{tab:u,onTabChange:f}),u==="system"&&r.jsxs(r.Fragment,{children:[r.jsx(Fv,{apiKey:B,loading:C,saving:D,onRegenerate:ba,onCopy:wa}),r.jsx(cb,{selection:Ge,options:L,loading:ge,onChange:ke}),r.jsx(sb,{splitPercent:$,onChange:se,onReset:()=>se(30)}),r.jsx(Iv,{onClearStorage:s})]}),u==="data"&&r.jsxs(r.Fragment,{children:[r.jsx(lb,{captures:p,loading:S,onRefresh:q,onDelete:W}),r.jsx(nb,{cookies:w,originsCount:g.length,loading:S,onClear:()=>s("cookies"),onDelete:Z})]}),u==="proxies"&&r.jsx(rb,{proxies:P,defaultProxyId:I,includeDefaultInRotation:re,rotationMode:Be,loading:et,onRefresh:pe,onAdd:be,onImport:yt,onUpdate:oa,onDelete:ya,onSetDefault:va,onToggleIncludeDefault:Ot,onRotationModeChange:Wt})]})})},Mu=({title:s="Loading",subtitle:c})=>r.jsxs("div",{className:"fixed inset-0 z-[80] bg-[#020202] flex items-center justify-center",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),r.jsxs("div",{className:"glass-card p-10 rounded-[40px] text-center space-y-4",children:[r.jsx("div",{className:"w-12 h-12 mx-auto rounded-full border border-white/10 flex items-center justify-center",children:r.jsx("div",{className:"w-5 h-5 border-2 border-white/20 border-t-white rounded-full animate-spin"})}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:s}),c&&r.jsx("p",{className:"text-xs font-mono text-white/80",children:c})]})]})]}),Ws=140,ob=6,db=4,fb=({index:s,style:c,data:d})=>{const u=d.items[s];return u?r.jsxs("div",{style:c,onClick:()=>d.navigate(`/executions/${u.id}`),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),d.navigate(`/executions/${u.id}`))},role:"button",tabIndex:0,className:"glass-card w-full rounded-2xl p-5 flex items-center gap-4 text-left hover:bg-white/[0.06] transition-all cursor-pointer",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:u.source==="api"?r.jsx(ay,{className:"w-5 h-5"}):r.jsx(_y,{className:"w-5 h-5"})}),r.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:u.taskName||u.mode}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(u.timestamp).toLocaleString()," | ",u.source," | ",u.mode," | ",u.status," | ",u.durationMs,"ms"]}),u.url&&r.jsx("div",{className:"text-[9px] text-white/50 truncate font-mono",children:u.url})]}),r.jsx("button",{onClick:f=>{f.stopPropagation(),d.deleteExecution(u.id)},className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-red-500/5 border border-red-500/10 text-red-400 hover:bg-red-500/10 transition-all",children:"Delete"})]}):null},hb=({onConfirm:s,onNotify:c})=>{const d=Mn(),[u,f]=x.useState([]),[p,m]=x.useState("all"),[w,b]=x.useState(!1),g=x.useCallback(async()=>{b(!0);try{const B=await fetch("/api/executions");if(!B.ok)throw new Error("Failed to load");const O=await B.json();f(Array.isArray(O.executions)?O.executions:[])}catch{f([])}finally{b(!1)}},[]),E=x.useCallback(async()=>{if(!await s("Clear all executions?"))return;(await fetch("/api/executions/clear",{method:"POST"})).ok?(c("Executions cleared.","success"),g()):c("Clear failed.","error")},[g,s,c]),S=x.useCallback(async B=>{if(!await s("Delete this execution?"))return;(await fetch(`/api/executions/${B}`,{method:"DELETE"})).ok?(c("Execution deleted.","success"),f(U=>U.filter(D=>D.id!==B))):c("Delete failed.","error")},[s,c]);x.useEffect(()=>{g()},[g]);const _=x.useMemo(()=>u.filter(B=>p==="all"?!0:B.source===p),[u,p]);return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Executions"}),r.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Run History"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["all","editor","api"].map(B=>r.jsx("button",{onClick:()=>m(B),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${p===B?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:B},B))}),r.jsx("button",{onClick:g,className:"w-10 h-10 rounded-2xl border border-white/10 text-gray-400 hover:text-white hover:bg-white/5 transition-all flex items-center justify-center",title:"Refresh",children:r.jsx(Dp,{className:"w-4 h-4"})}),r.jsx("button",{onClick:E,className:"w-10 h-10 rounded-2xl border border-red-500/20 text-red-400 hover:bg-red-500/10 transition-all flex items-center justify-center",title:"Clear all",children:r.jsx(Hu,{className:"w-4 h-4"})})]})]}),w&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading executions..."}),!w&&_.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No executions found."}),!w&&_.length>0&&r.jsx(lr,{height:Math.min(Math.max(Ws,_.length*Ws),Ws*ob),itemCount:_.length,itemSize:Ws,width:"100%",overscanCount:db,itemData:{items:_,deleteExecution:S,navigate:d},children:fb})]})})},pb=s=>{if(!s.result)return null;const c=s.result||{};return{url:s.url||c.url||"",finalUrl:c.final_url||c.finalUrl,html:c.html,data:c.data??c.html??"",screenshotUrl:c.screenshot_url||c.screenshotUrl,logs:c.logs||[],timestamp:new Date(s.timestamp).toLocaleTimeString()}},mb=({onConfirm:s,onNotify:c})=>{const{id:d}=wp(),u=Mn(),[f,p]=x.useState(null),[m,w]=x.useState(!1);if(x.useEffect(()=>{(async()=>{if(d){w(!0);try{const E=await fetch(`/api/executions/${d}`);if(!E.ok)throw new Error("Failed to load execution");const S=await E.json();p(S.execution||null)}catch{p(null)}finally{w(!1)}}})()},[d]),m)return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsx("div",{className:"max-w-6xl mx-auto text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading execution..."})});if(!f)return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[r.jsx("button",{onClick:()=>u("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Back"}),r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Execution not found."})]})});const b=pb(f);return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Execution"}),r.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:f.taskName||f.mode}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(f.timestamp).toLocaleString()," | ",f.source," | ",f.mode," | ",f.status," | ",f.durationMs,"ms"]})]}),r.jsx("button",{onClick:()=>u("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Back"})]}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col min-h-[420px]",children:[r.jsx("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:r.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"})}),b?r.jsx(Bp,{results:b,isExecuting:!1,onConfirm:s,onNotify:c,fullWidth:!0}):r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"No output captured."})]})]})})},xb=360,Yp=12,Fs=xb+Yp,gb=6,yb=4,vb=({index:s,style:c,data:d})=>{const u=d.captures[s];return u?r.jsx("div",{style:{...c,paddingBottom:Yp},children:r.jsx(Lp,{capture:u,onDelete:d.onDelete})}):null},bb=({onConfirm:s,onNotify:c})=>{const d=Mn(),[u,f]=x.useState([]),[p,m]=x.useState(!1),w=async()=>{m(!0);try{const g=await fetch("/api/data/captures"),E=g.ok?await g.json():{captures:[]};f(Array.isArray(E.captures)?E.captures:[])}catch{f([])}finally{m(!1)}},b=x.useCallback(async g=>{if(!await s(`Delete capture ${g}?`))return;(await fetch(`/api/data/captures/${encodeURIComponent(g)}`,{method:"DELETE"})).ok?(f(_=>_.filter(B=>B.name!==g)),c("Capture deleted.","success")):c("Delete failed.","error")},[s,c]);return x.useEffect(()=>{w()},[]),r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Captures"}),r.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:"All Captures"}),r.jsx("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:"Recordings and screenshots from every run"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:w,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Refresh"}),r.jsx("button",{onClick:()=>d("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Executions"})]})]}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8",children:[p&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!p&&u.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!p&&u.length>0&&r.jsx("div",{className:"space-y-4",children:r.jsx(lr,{height:Math.min(Math.max(Fs,u.length*Fs),Fs*gb),width:"100%",itemCount:u.length,itemSize:Fs,overscanCount:yb,itemData:{captures:u,onDelete:b},children:vb})})]})]})})},Gp=({title:s="Not Found",subtitle:c="The page you requested does not exist.",onBack:d})=>r.jsx("div",{className:"h-full flex items-center justify-center px-10",children:r.jsxs("div",{className:"glass-card w-full max-w-2xl rounded-[40px] border border-white/10 p-10 text-center space-y-6",children:[r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"404"}),r.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:s}),r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.25em] text-gray-500",children:c}),d&&r.jsxs("button",{onClick:d,className:"mt-2 inline-flex items-center gap-2 px-6 py-3 rounded-2xl bg-white text-black text-[9px] font-bold uppercase tracking-[0.3em] hover:scale-105 transition-all",children:[r.jsx(Oy,{className:"w-4 h-4"}),"Back"]})]})}),wb=({message:s,tone:c,onClose:d})=>{const[u,f]=x.useState(!1);return x.useEffect(()=>{const p=setTimeout(()=>{f(!0)},2500);return()=>clearTimeout(p)},[]),x.useEffect(()=>{if(!u)return;const p=setTimeout(()=>d(),240);return()=>clearTimeout(p)},[u,d]),r.jsx("div",{className:`fixed bottom-6 right-6 z-[220] max-w-sm w-full ${u?"animate-out fade-out slide-out-to-bottom-3 duration-200":"animate-in fade-in slide-in-from-bottom-3 duration-300"}`,children:r.jsxs("div",{className:`glass-card rounded-2xl border border-white/10 p-4 shadow-2xl flex items-start gap-3 ${u?"animate-out fade-out zoom-out-95 duration-200":"animate-in fade-in zoom-in-95 duration-300"}`,children:[r.jsx("div",{className:`mt-1 h-2.5 w-2.5 rounded-full ${c==="error"?"bg-red-400":"bg-emerald-400"}`}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-[8px] font-bold uppercase tracking-[0.35em] text-gray-500",children:"Notification"}),r.jsx("p",{className:"mt-2 font-mono text-[11px] text-white leading-relaxed",children:s})]}),r.jsx("button",{onClick:()=>f(!0),className:"px-2 py-1 text-[8px] font-bold uppercase tracking-[0.2em] text-white/60 hover:text-white",children:"Close"})]})})},Sb=({request:s,onResolve:c})=>r.jsx("div",{className:"fixed inset-0 z-[201] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:r.jsxs("div",{className:"glass-card w-full max-w-md rounded-[32px] border border-white/10 p-8 text-center shadow-2xl",children:[r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:s.title??"Confirm"}),r.jsx("p",{className:"mt-4 font-mono text-sm text-white",children:s.message}),r.jsxs("div",{className:"mt-6 flex gap-4",children:[r.jsx("button",{onClick:()=>c(!1),className:"w-full rounded-2xl px-6 py-3 text-[9px] font-bold uppercase tracking-[0.3em] transition-all bg-white/5 border border-white/10 text-gray-300 hover:bg-white/10",children:s.cancelLabel??"Cancel"}),r.jsx("button",{onClick:()=>c(!0),className:"w-full rounded-2xl px-6 py-3 text-[9px] font-bold uppercase tracking-[0.3em] transition-all bg-white text-black hover:scale-105 shadow-xl shadow-white/10",children:s.confirmLabel??"Confirm"})]})]})}),jb=({tasks:s,loadTasks:c,touchTask:d,currentTask:u,setCurrentTask:f,hasUnsavedChanges:p,onTaskLoaded:m,...w})=>{const{id:b}=wp(),g=Mn(),[E,S]=x.useState(!1),[_,B]=x.useState(!1);return x.useEffect(()=>{(async()=>{if(u?.id===b)return;S(!0),B(!1);let C=s;s.length===0&&(C=await c());const U=C.find(D=>String(D.id)===String(b));if(U){const D={...U};(!D.variables||Array.isArray(D.variables))&&(D.variables={}),D.stealth||(D.stealth={allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1}),Array.isArray(D.actions)&&(D.actions=D.actions.map((X,$)=>X&&X.id?X:{...X,id:`act_${Date.now()}_${$}_${Math.floor(Math.random()*1e3)}`})),D.includeShadowDom===void 0&&(D.includeShadowDom=!0),f(D),m?.(D),b&&d(b)}else B(!0);S(!1)})()},[b,s]),_?r.jsx(Gp,{title:"Task Not Found",subtitle:"This task does not exist or was deleted.",onBack:()=>g("/dashboard")}):E||!u||String(u.id)!==String(b)?r.jsx(Mu,{title:"Loading Mission Data",subtitle:"Syncing task payload"}):r.jsx(qp,{currentTask:u,setCurrentTask:f,tasks:s,hasUnsavedChanges:p,...w})},sp=s=>{if(!s)return"";const c=JSON.parse(JSON.stringify(s));return delete c.last_opened,JSON.stringify(c)};function Nb(){const s=Mn(),c=bl(),[,d]=x.useState(null),[u,f]=x.useState("checking"),[p,m]=x.useState(!1),w=x.useRef(""),[b,g]=x.useState(""),[E,S]=x.useState([]),[_,B]=x.useState(null),[O,C]=x.useState("visual"),[U,D]=x.useState(!1),[X,$]=x.useState(null),[se,P]=x.useState({}),[ee,I]=x.useState(""),[fe,re]=x.useState(null),[le,Be]=x.useState(null),[ve,et]=x.useState(null),Ee=x.useRef(null),Ge=x.useRef(null),z=(Y,te="success")=>{Be({message:Y,tone:te}),te==="success"&&setTimeout(()=>{Be(ae=>ae&&ae.message===Y?null:ae)},2e3)},L=Y=>new Promise(te=>{Ee.current=te,et(typeof Y=="string"?{message:Y}:Y)}),F=Y=>{const te=Ee.current;Ee.current=null,et(null),te&&te(Y)},ge=Y=>Y&&Y[0].toUpperCase()+Y.slice(1),he=Y=>{if(!Y.actions||!Array.isArray(Y.actions))return Y;let te=!1;const ae=Y.actions.map((oe,Ue)=>oe.id?oe:(te=!0,{...oe,id:`act_${Date.now()}_${Ue}_${Math.floor(Math.random()*1e3)}`}));return te?{...Y,actions:ae}:Y},v="doppelganger.pinnedResults",W=(Y=>Y?.id?String(Y.id):"new")(_),Z=_&&se[W]||null,ne=(Y,te)=>{const ae=String(Y||"").trim();if(!ae)return"Execution failed.";const oe=ae.toLowerCase();if(te==="headful"){if(oe.includes("missing x server")||oe.includes("$display"))return"Headful browser could not start because no display server is available.";if(oe.includes("failed to connect to the bus"))return"Headful browser could not start due to missing system services."}let Ue=ae;const Re=Ue.indexOf("--disable-");return Re>0&&(Ue=Ue.slice(0,Re).trim()),Ue.length>240&&(Ue=`${Ue.slice(0,240)}...`),Ue||"Execution failed."},pe=Y=>{const te=String(Y||"").toLowerCase();return te.includes("missing x server")||te.includes("$display")||te.includes("platform failed to initialize")||te.includes("no display server")},be=()=>({name:"Imported Task",url:"",mode:"scrape",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,rotateViewport:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},includeShadowDom:!0});x.useEffect(()=>{Ze()},[]),x.useEffect(()=>{try{const Y=localStorage.getItem(v);if(Y){const te=JSON.parse(Y);te&&typeof te=="object"&&P(te)}}catch{}},[]),x.useEffect(()=>{try{localStorage.setItem(v,JSON.stringify(se))}catch{}},[se]),x.useEffect(()=>{!c.pathname.startsWith("/tasks")&&O==="history"&&C("visual")},[c.pathname,O]),x.useEffect(()=>{if(c.pathname==="/tasks/new"&&!_){const Y=ya();B(Y),$(null)}},[c.pathname,_]),x.useEffect(()=>{if(!_){m(!1);return}const Y=sp(_);m(Y!==w.current)},[_]),x.useEffect(()=>{if(typeof window>"u")return;const Y=te=>{p&&(te.preventDefault(),te.returnValue="")};return window.addEventListener("beforeunload",Y),()=>window.removeEventListener("beforeunload",Y)},[p]);const Ze=async()=>{try{const te=await(await fetch("/api/auth/me")).json();if(te.authenticated)d(te.user),f("authenticated"),yt();else{const oe=await(await fetch("/api/auth/check-setup")).json();f(oe.setupRequired?"setup":"login")}}catch{f("login")}},ke=async(Y,te,ae,oe)=>{if(!Y||!te)return;if(u==="setup"&&(!ae||te!==oe)){g(ae?"Passwords do not match":"Name required");return}const Ue=u==="setup"?"/api/auth/setup":"/api/auth/login",Re=u==="setup"?{name:ae,email:Y,password:te}:{email:Y,password:te};try{(await fetch(Ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Re)})).ok?(g(""),await Ze(),s("/")):g(u==="setup"?"Setup failed":"Invalid credentials")}catch{g("Network error")}},yt=async()=>{try{const ae=[...await(await fetch("/api/tasks")).json()].sort((oe,Ue)=>(Ue.last_opened||0)-(oe.last_opened||0));return S(ae),ae}catch(Y){return console.error("Failed to load tasks",Y),[]}},oa=async()=>{await L("Are you sure you want to log out?")&&(await fetch("/api/auth/logout",{method:"POST"}),d(null),f("login"),s("/"),z("Logged out.","success"))};function ya(){return{name:"Task "+Math.floor(Math.random()*100),url:"",mode:"agent",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,rotateViewport:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},extractionFormat:"json",includeShadowDom:!0}}const va=()=>{const Y=ya();w.current="",m(!0),B(Y),$(null),s("/tasks/new")},Ot=Y=>{_&&P(te=>({...te,[W]:Y}))},Wt=()=>{_&&P(Y=>{const te={...Y};return delete te[W],te})},ba=async Y=>{try{await fetch(`/api/tasks/${Y}/touch`,{method:"POST"}),yt()}catch(te){console.error("Failed to touch task",te)}},wa=Y=>{w.current=sp(Y),m(!1)},ie=Y=>{const te={...Y};(!te.variables||Array.isArray(te.variables))&&(te.variables={}),te.stealth||(te.stealth={allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1}),te.rotateProxies===void 0&&(te.rotateProxies=!1),te.rotateViewport===void 0&&(te.rotateViewport=!1),te.extractionFormat||(te.extractionFormat="json"),te.includeShadowDom===void 0&&(te.includeShadowDom=!0);const ae=he(te);B(ae),wa(ae),$(null),s(`/tasks/${Y.id}`),Y.id&&ba(Y.id)},me=async Y=>{await L("Are you sure you want to delete this task?")&&(await fetch(`/api/tasks/${Y}`,{method:"DELETE"}),yt(),c.pathname.includes(Y)&&s("/dashboard"))},ue=async()=>{if(!_)return;const Y={..._,last_opened:Date.now()},ae=await(await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Y)})).json();B(ae),I("SAVED"),setTimeout(()=>I(""),2e3),wa(ae),yt(),c.pathname.includes("new")&&s(`/tasks/${ae.id}`,{replace:!0})},we=async()=>{try{await fetch("/headful/stop",{method:"POST"})}catch(Y){console.error("Failed to stop headful session",Y)}finally{D(!1)}},Nt=async()=>{if(_?.mode==="headful"){await we();return}if(fe)try{await fetch("/api/executions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:fe})})}catch(Y){console.error("Failed to request stop",Y)}Ge.current&&Ge.current.abort(),D(!1)},Ft=async Y=>{const te=Y||_;if(!te||!te.url)return;const ae=he(te);_&&ae!==_&&B(ae);const oe=`run_${Date.now()}_${Math.floor(Math.random()*1e3)}`;if(re(oe),U&&ae.mode==="headful"){await we();return}D(!0),$({url:ae.url,logs:[],timestamp:"Running..."});let Ue=null;try{const Re={};Object.entries(ae.variables).forEach(([tt,It])=>{Re[tt]=It.value});const nt=tt=>tt.replace(/\{\$(\w+)\}/g,(It,A)=>{if(A==="now")return new Date().toISOString();const j=Re[A];return j==null||j===""?"":String(j)}),it=tt=>typeof tt!="string"?tt:nt(tt),Rt=ae.mode!=="agent";Ue={...{...ae,url:Rt?nt(ae.url||""):ae.url||"",selector:Rt?it(ae.selector):ae.selector,actions:Rt?ae.actions.map(tt=>({...tt,selector:it(tt.selector),value:it(tt.value),key:it(tt.key)})):ae.actions},taskVariables:Re,variables:Re,runSource:"editor",taskId:ae.id,taskName:ae.name,taskSnapshot:ae,runId:oe};const Mt=await(async tt=>{const It=new AbortController;Ge.current=It;const A=await fetch(`/${tt}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ue),signal:It.signal});if(!A.ok){let j=null;try{j=await A.json()}catch{j=null}const J=new Error(j?.details||j?.error||"Request failed");throw J.code=j?.error,J}return A.json()})(ae.mode);$({url:ae.url,finalUrl:Mt.final_url,html:Mt.html,data:Mt.data??Mt.html??"No data captured.",screenshotUrl:Mt.screenshot_url,logs:Mt.logs||[],timestamp:new Date().toLocaleTimeString()})}catch(Re){if(Re?.name==="AbortError"){z("Execution stopped.","success"),D(!1);return}if(ae?.mode==="headful"&&Ue&&(Re?.code==="HEADFUL_DISPLAY_UNAVAILABLE"||pe(Re?.message||String(Re))))try{const it=await(async()=>{const Rt=new AbortController;Ge.current=Rt;const fa=await fetch("/scrape",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ue),signal:Rt.signal});if(!fa.ok){const Sa=await fa.json();throw new Error(Sa.details||Sa.error||"Request failed")}return fa.json()})();it.logs=["Headful display unavailable; ran headless instead.",...it.logs||[]],$({url:ae.url,finalUrl:it.final_url,html:it.html,data:it.data??it.html??"No data captured.",screenshotUrl:it.screenshot_url,logs:it.logs||[],timestamp:new Date().toLocaleTimeString()}),D(!1);return}catch(it){const Rt=ne(it?.message||String(it),ae?.mode);z(`Execution crash: ${Rt}`,"error"),D(!1);return}const nt=ne(Re?.message||String(Re),ae?.mode);z(`Execution crash: ${nt}`,"error"),ae?.mode==="headful"&&D(!1)}finally{Ge.current=null,ae.mode!=="headful"&&D(!1)}},wt=async()=>{await Ft()},ql=async Y=>{if(!await L(`Delete all ${Y}?`))return;await fetch(Y==="screenshots"?"/api/clear-screenshots":"/api/clear-cookies",{method:"POST"}),z(`${ge(Y)} cleared.`,"success")},Ut=()=>{const Y={exportedAt:new Date().toISOString(),tasks:E},te=new Blob([JSON.stringify(Y,null,2)],{type:"application/json"}),ae=URL.createObjectURL(te),oe=document.createElement("a"),Ue=new Date().toISOString().slice(0,10);oe.href=ae,oe.download=`doppelganger-tasks-${Ue}.json`,document.body.appendChild(oe),oe.click(),oe.remove(),URL.revokeObjectURL(ae),z("Tasks exported.","success")},Vl=(Y,te)=>{if(!Y||typeof Y!="object")return null;const ae=be(),oe={...ae,...Y};return(!oe.name||typeof oe.name!="string")&&(oe.name=`Imported Task ${te+1}`),(!oe.mode||!["scrape","agent","headful"].includes(oe.mode))&&(oe.mode="scrape"),typeof oe.wait!="number"&&(oe.wait=3),oe.stealth||(oe.stealth=ae.stealth),(!oe.variables||Array.isArray(oe.variables))&&(oe.variables={}),Array.isArray(oe.actions)||(oe.actions=[]),oe.rotateProxies===void 0&&(oe.rotateProxies=!1),delete oe.versions,delete oe.last_opened,oe},Ra=async Y=>{try{const te=await Y.text(),ae=JSON.parse(te),oe=Array.isArray(ae)?ae:ae?.tasks;if(!Array.isArray(oe)){z("Invalid import file.","error");return}const Ue=Date.now(),Re=oe.map((nt,it)=>Vl(nt,it)).filter(nt=>!!nt).map(nt=>nt.id?nt:{...nt,id:`task_${Ue}`});if(Re.length===0){z("No tasks to import.","error");return}await Promise.all(Re.map(nt=>fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(nt)}))),await yt(),z(`Imported ${Re.length} task(s).`,"success")}catch(te){z(`Import failed: ${te.message||"Unknown error"}`,"error")}},Yl=()=>c.pathname.startsWith("/tasks")?"editor":c.pathname==="/settings"?"settings":c.pathname==="/executions"?"executions":c.pathname==="/captures"?"captures":"dashboard";let da;return u==="login"||u==="setup"?da=r.jsx(gv,{status:u,onSubmit:ke,error:b}):u==="checking"?da=r.jsx(Mu,{title:"Authenticating",subtitle:"Verifying session state"}):da=r.jsxs("div",{className:"h-full flex flex-row overflow-hidden bg-[#020202]",children:[r.jsx(xv,{onNavigate:Y=>{Y==="dashboard"?s("/dashboard"):Y==="settings"?s("/settings"):Y==="executions"?s("/executions"):Y==="captures"&&s("/captures")},onNewTask:va,onLogout:oa,currentScreen:Yl()}),r.jsxs(cg,{children:[r.jsx(Ta,{path:"/",element:r.jsx(Wh,{tasks:E,onNewTask:va,onEditTask:ie,onDeleteTask:me,onExportTasks:Ut,onImportTasks:Ra})}),r.jsx(Ta,{path:"/dashboard",element:r.jsx(Wh,{tasks:E,onNewTask:va,onEditTask:ie,onDeleteTask:me,onExportTasks:Ut,onImportTasks:Ra})}),r.jsx(Ta,{path:"/tasks/new",element:_?r.jsx(qp,{currentTask:_,setCurrentTask:B,tasks:E,editorView:O,setEditorView:C,isExecuting:U,onSave:ue,onRun:wt,onRunSnapshot:Ft,results:X,pinnedResults:Z,saveMsg:ee,onConfirm:L,onNotify:z,onPinResults:Ot,onUnpinResults:Wt,runId:fe,onStop:Nt,hasUnsavedChanges:p}):r.jsx(Mu,{title:"Initializing",subtitle:"Preparing task workspace"})}),r.jsx(Ta,{path:"/tasks/:id",element:r.jsx(jb,{tasks:E,loadTasks:yt,touchTask:ba,currentTask:_,setCurrentTask:B,editorView:O,setEditorView:C,isExecuting:U,onSave:ue,onRun:wt,onRunSnapshot:Ft,results:X,pinnedResults:Z,saveMsg:ee,onConfirm:L,onNotify:z,onPinResults:Ot,onUnpinResults:Wt,runId:fe,onStop:Nt,hasUnsavedChanges:p,onTaskLoaded:wa})}),r.jsx(Ta,{path:"/settings",element:r.jsx(ub,{onClearStorage:ql,onConfirm:L,onNotify:z})}),r.jsx(Ta,{path:"/executions",element:r.jsx(hb,{onConfirm:L,onNotify:z})}),r.jsx(Ta,{path:"/executions/:id",element:r.jsx(mb,{onConfirm:L,onNotify:z})}),r.jsx(Ta,{path:"/captures",element:r.jsx(bb,{onConfirm:L,onNotify:z})}),r.jsx(Ta,{path:"*",element:r.jsx(Gp,{onBack:()=>s("/dashboard")})})]})]}),r.jsxs("div",{className:"h-full",children:[le&&r.jsx(wb,{message:le.message,tone:le.tone,onClose:()=>Be(null)}),ve&&r.jsx(Sb,{request:ve,onResolve:F}),da]})}dx.createRoot(document.getElementById("root")).render(r.jsx(lx.StrictMode,{children:r.jsx(zg,{children:r.jsx(Nb,{})})}));